react-luminus-components 2.0.2-table-d7f5ad24d53c7cff099af497e38cd1c5dbfb2918 → 2.0.3-beta.r19-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +349 -349
  2. package/dist/.vite/manifest.json +46 -46
  3. package/dist/FormDisabledProvider-CNVOqN9X.js +40 -0
  4. package/dist/FormDisabledProvider-DmZDEoe7.cjs +1 -0
  5. package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +6 -3
  6. package/dist/components/Documents/components/DocumentsModals/components/CreateFolderModal/hooks/useDocCreateFolderForm.d.ts +4 -1
  7. package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/hooks/useEditFileForm.d.ts +6 -1
  8. package/dist/components/Documents/hooks/useDocumentsReducer.d.ts +1 -1
  9. package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +6 -3
  10. package/dist/components/Dropdown/comps/UserAvatarToggle/UserAvatarToggle.d.ts +3 -1
  11. package/dist/components/Flexmonster/Flexmonster.d.ts +1 -1
  12. package/dist/components/Flexmonster/hooks/useReportVersionApi.d.ts +1 -1
  13. package/dist/components/Flexmonster/utils/flexMonsterUtils.d.ts +1 -1
  14. package/dist/components/HookForm/MiniDetailWrapper/MiniDetailWrapper.d.ts +1 -1
  15. package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +4 -17
  16. package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +7 -38
  17. package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +8 -38
  18. package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +8 -38
  19. package/dist/components/ResponsiveContextDropdown/components/ResponsiveContextDropdownItem/ResponsiveContextDropdownItem.d.ts +1 -1
  20. package/dist/components/ResponsiveContextDropdown/hooks/useReponsiveContextDropdownHelpers.d.ts +2 -2
  21. package/dist/components/ResponsiveContextDropdown/utils/responsiveContextDropdownUtils.d.ts +1 -1
  22. package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +2 -2
  23. package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +1 -1
  24. package/dist/components/common/AuthTemplate/AuthTemplate.d.ts +1 -1
  25. package/dist/components/common/ColumnResizer/ColumnResizer.d.ts +1 -1
  26. package/dist/components/common/DisabledRowLabelLink/DisabledRowLabelLink.d.ts +1 -1
  27. package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +7 -3
  28. package/dist/components/common/FromToDatePicker/components/FromToDatePickerDropdownToggle/FromToDatePickerDropdownToggle.d.ts +3 -1
  29. package/dist/components/common/LineChart/comps/LineChartTooltip/LineChartTooltip.d.ts +2 -2
  30. package/dist/components/common/PermissionsSubstitute/Detail/hooks/useSubstDetailForm.d.ts +8 -1
  31. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/PhotoPreviews.d.ts +15 -0
  32. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/PhotoPreview.d.ts +14 -0
  33. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/comps/PreviewShadow/PreviewShadow.d.ts +5 -0
  34. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/comps/index.d.ts +1 -0
  35. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/index.d.ts +1 -0
  36. package/dist/components/common/PhotoLightbox/comps/index.d.ts +1 -0
  37. package/dist/components/common/QrCode/QrCode.d.ts +1 -1
  38. package/dist/components/common/RouteLink/RouteLink.d.ts +1 -1
  39. package/dist/components/common/SimplePicker/SimplePicker.d.ts +1 -1
  40. package/dist/components/common/index.d.ts +0 -1
  41. package/dist/contexts.cjs.js +1 -1
  42. package/dist/contexts.es.js +274 -921
  43. package/dist/hooks/useClickOutside/useClickOutside.d.ts +1 -1
  44. package/dist/hooks/useScrollSave/useScrollSave.d.ts +1 -1
  45. package/dist/hooks.cjs.js +1 -1
  46. package/dist/hooks.es.js +105 -89
  47. package/dist/layout.cjs.js +1 -1
  48. package/dist/layout.es.js +109 -120
  49. package/dist/{localStorageUtils-NrZA2Syo.js → localStorageUtils-DKh4zlsM.js} +1 -1
  50. package/dist/localStorageUtils-VI7zmTA0.cjs +1 -0
  51. package/dist/main.cjs.js +21 -183
  52. package/dist/main.es.js +6372 -11355
  53. package/dist/models/bntTable/IBnfTableDefColumn.d.ts +40 -0
  54. package/dist/models/prop-types/InputContainerProps.d.ts +4 -12
  55. package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +1 -1
  56. package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +4 -2
  57. package/dist/models/prop-types/InputProps/NumericInputProps.d.ts +1 -1
  58. package/dist/models/prop-types/InputProps/TextInputProps.d.ts +1 -1
  59. package/dist/{ShortcutLinksContext-B6B_uG2X.js → nivo-bar-DXK3wbjv.js} +28480 -28322
  60. package/dist/nivo-bar-U0TkOANS.cjs +306 -0
  61. package/dist/style.css +1 -1
  62. package/dist/useEmployeePhotoPath-DdMmh1qU.js +65 -0
  63. package/dist/useEmployeePhotoPath-Q0EhpWOh.cjs +1 -0
  64. package/dist/{useLocalStorageState-DG9g_lFm.js → useLocalStorageState-B3o2yBVf.js} +15 -14
  65. package/dist/useLocalStorageState-BWT4Z8eu.cjs +1 -0
  66. package/dist/utils/route/apiPathUtils.d.ts +1 -1
  67. package/dist/utils.cjs.js +1 -1
  68. package/dist/utils.es.js +79 -80
  69. package/dist/variables.scss +165 -165
  70. package/package.json +124 -123
  71. package/dist/FormDisabledProvider-BNE4w-91.cjs +0 -1
  72. package/dist/FormDisabledProvider-Ct-odePz.js +0 -40
  73. package/dist/ShortcutLinksContext-d3AdgJhg.cjs +0 -334
  74. package/dist/components/common/StrictModeDroppable/StrictModeDroppable.d.ts +0 -5
  75. package/dist/localStorageUtils-CFey67IX.cjs +0 -1
  76. package/dist/useLocalStorageState-CGKmNXMv.cjs +0 -1
  77. package/dist/useRenderDraggableInPortal-D0OLp7Qb.js +0 -78
  78. package/dist/useRenderDraggableInPortal-QPCaw-E_.cjs +0 -1
@@ -1,1000 +1,353 @@
1
- var Ee = Object.defineProperty;
2
- var Oe = (e, t, n) => t in e ? Ee(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var E = (e, t, n) => Oe(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { t as N, bG as we, j as d, bH as De, P as z, bp as Pe, bI as me, $ as O, bh as ke, Q as G, bJ as je, aX as Ie, aw as Me, aq as pe, bj as he, at as I, as as Le, bK as He, aP as oe, bL as _e, ab as ye, bM as ae, bN as $e, aR as Re, af as Ue, a1 as Ne } from "./ShortcutLinksContext-B6B_uG2X.js";
5
- import { bO as Bt, be as Yt } from "./ShortcutLinksContext-B6B_uG2X.js";
6
- import D, { useState as S, useCallback as h, useMemo as T, useContext as _, useEffect as j, useRef as te, Component as re } from "react";
7
- import { EventType as W, InteractionRequiredAuthError as Fe } from "@azure/msal-browser";
8
- import { MsalProvider as qe } from "@azure/msal-react";
9
- import "react-router-dom";
1
+ import { t as E, bJ as K, bK as j, P as M, al as J, bL as R, a3 as T, ai as Q, Q as O, bM as V, ap as $, an as W, bb as q, bx as z, bd as k, ao as X, bN as Y, aC as H, bO as Z, bP as ee, am as te, b6 as ne, a4 as oe } from "./nivo-bar-DXK3wbjv.js";
2
+ import { bQ as He, af as _e } from "./nivo-bar-DXK3wbjv.js";
3
+ import { jsxs as w, jsx as u } from "react/jsx-runtime";
4
+ import { useState as x, useCallback as m, useMemo as h, useContext as p, useEffect as b, useRef as G } from "react";
5
+ import { EventType as I, InteractionRequiredAuthError as se } from "@azure/msal-browser";
6
+ import { MsalProvider as re } from "@azure/msal-react";
7
+ import "react-router";
10
8
  import "react-dom";
11
9
  import "react-hook-form";
12
10
  import "react-flexmonster";
13
- import { L as Ge, b as ze } from "./FormDisabledProvider-Ct-odePz.js";
14
- import { F as Wt } from "./FormDisabledProvider-Ct-odePz.js";
15
- import { a as Ke, u as Ve } from "./useLocalStorageState-DG9g_lFm.js";
16
- function Be(e) {
17
- const t = N(e);
18
- return t.setHours(23, 59, 59, 999), t;
11
+ import { L as ae, b as ce } from "./FormDisabledProvider-CNVOqN9X.js";
12
+ import { F as Re } from "./FormDisabledProvider-CNVOqN9X.js";
13
+ import { a as le, u as ie } from "./useLocalStorageState-B3o2yBVf.js";
14
+ function ue(t) {
15
+ const r = E(t);
16
+ return r.setHours(23, 59, 59, 999), r;
19
17
  }
20
- function Ye() {
21
- return Be(Date.now());
18
+ function de() {
19
+ return ue(Date.now());
22
20
  }
23
- function Je(e, t) {
24
- const n = +N(e), [r, s] = [
25
- +N(t.start),
26
- +N(t.end)
27
- ].sort((o, l) => o - l);
28
- return n >= r && n <= s;
21
+ function me(t, r) {
22
+ const o = +E(t), [e, n] = [
23
+ +E(r.start),
24
+ +E(r.end)
25
+ ].sort((s, a) => s - a);
26
+ return o >= e && o <= n;
29
27
  }
30
- function We() {
31
- return we(Date.now());
28
+ function fe() {
29
+ return K(Date.now());
32
30
  }
33
- const Qe = ({ children: e }) => {
34
- const [t, n] = S(!1), [r, s] = S(""), [o, l] = S(void 0), i = h((u, f) => {
35
- n(!0), s(u), l(f);
36
- }, []), c = h(() => {
37
- n(!1);
38
- }, []), a = T(() => ({ show: t, text: r, showConfirm: i, hideConfirm: c, textSm: o }), [t, r, i, c, o]);
39
- return /* @__PURE__ */ d.jsxs(De.Provider, { value: a, children: [
40
- /* @__PURE__ */ d.jsx(wt, {}),
41
- e
31
+ const ge = ({ children: t }) => {
32
+ const [r, o] = x(!1), [e, n] = x(""), [s, a] = x(void 0), l = m((f, d) => {
33
+ o(!0), n(f), a(d);
34
+ }, []), i = m(() => {
35
+ o(!1);
36
+ }, []), c = h(() => ({ show: r, text: e, showConfirm: l, hideConfirm: i, textSm: s }), [r, e, l, i, s]);
37
+ return /* @__PURE__ */ w(j.Provider, { value: c, children: [
38
+ /* @__PURE__ */ u(xe, {}),
39
+ t
42
40
  ] });
43
- }, Xe = () => {
44
- const { texts: { confirm: e } } = _(z), { isShown: t, text: n, onFinish: r } = Pe(), { options: s } = _(me), [o, l] = S(s.defaultValue ?? ""), i = h(() => {
45
- r(null);
46
- }, [r]), c = h((u) => {
47
- u.preventDefault(), !(s.required && !o) && (r(o), l(""));
48
- }, [r, s.required, o]), a = T(() => ({
49
- value: o,
50
- onChange: (u) => l(u.currentTarget.value),
41
+ }, he = () => {
42
+ const { texts: { confirm: t } } = p(M), { isShown: r, text: o, onFinish: e } = J(), { options: n } = p(R), [s, a] = x(n.defaultValue ?? ""), l = m(() => {
43
+ e(null);
44
+ }, [e]), i = m((f) => {
45
+ f.preventDefault(), !(n.required && !s) && (e(s), a(""));
46
+ }, [e, n.required, s]), c = h(() => ({
47
+ value: s,
48
+ onChange: (f) => a(f.currentTarget.value),
51
49
  className: "w-100",
52
50
  autoFocus: !0,
53
51
  tabIndex: 0
54
- }), [o]);
55
- return j(() => {
56
- t === !0 && l(s.defaultValue ?? "");
57
- }, [t, s.defaultValue]), /* @__PURE__ */ d.jsxs(O, { show: t, size: "sm", centered: !0, onHide: i, children: [
58
- /* @__PURE__ */ d.jsx(O.Header, { className: "justify-content-center", children: /* @__PURE__ */ d.jsx(O.Title, { children: n }) }),
59
- /* @__PURE__ */ d.jsxs("form", { onSubmit: c, onKeyDown: (u) => u.stopPropagation(), children: [
60
- /* @__PURE__ */ d.jsxs(O.Body, { children: [
61
- s.input === "textarea" ? /* @__PURE__ */ d.jsx("textarea", { ...a, rows: 5 }) : void 0,
62
- s.input === "input" ? /* @__PURE__ */ d.jsx(ke, { ...a, type: s.type }) : void 0
52
+ }), [s]);
53
+ return b(() => {
54
+ r === !0 && a(n.defaultValue ?? "");
55
+ }, [r, n.defaultValue]), /* @__PURE__ */ w(T, { show: r, size: "sm", centered: !0, onHide: l, children: [
56
+ /* @__PURE__ */ u(T.Header, { className: "justify-content-center", children: /* @__PURE__ */ u(T.Title, { children: o }) }),
57
+ /* @__PURE__ */ w("form", { onSubmit: i, onKeyDown: (f) => f.stopPropagation(), children: [
58
+ /* @__PURE__ */ w(T.Body, { children: [
59
+ n.input === "textarea" ? /* @__PURE__ */ u("textarea", { ...c, rows: 5 }) : void 0,
60
+ n.input === "input" ? /* @__PURE__ */ u(Q, { ...c, type: n.type }) : void 0
63
61
  ] }),
64
- /* @__PURE__ */ d.jsxs(O.Footer, { className: "w-100 d-flex gap-5", children: [
65
- /* @__PURE__ */ d.jsx(G, { variant: "outlined", color: "secondary", onClick: i, className: "flex-grow-1", children: e.cancel }),
66
- /* @__PURE__ */ d.jsx(G, { color: "primary", disabled: s.required && !o, type: "submit", className: "flex-grow-1", children: e.confirm })
62
+ /* @__PURE__ */ w(T.Footer, { className: "w-100 d-flex gap-5", children: [
63
+ /* @__PURE__ */ u(O, { variant: "outlined", color: "secondary", onClick: l, className: "flex-grow-1", children: t.cancel }),
64
+ /* @__PURE__ */ u(O, { color: "primary", disabled: n.required && !s, type: "submit", className: "flex-grow-1", children: t.confirm })
67
65
  ] })
68
66
  ] })
69
67
  ] });
70
- }, Ze = ({ children: e }) => {
71
- const [t, n] = S(!1), [r, s] = S(""), [o, l] = S({ input: "textarea", type: "text" }), i = te(() => {
72
- }), c = h((f) => {
73
- s(f), n(!0);
74
- }, []), a = h(() => {
75
- n(!1);
76
- }, []), u = T(() => ({
77
- isShown: t,
78
- text: r,
79
- showPrompt: c,
80
- hidePrompt: a,
81
- resolveRef: i,
82
- options: o,
83
- setOptions: l
84
- }), [t, r, c, a, o]);
85
- return /* @__PURE__ */ d.jsxs(me.Provider, { value: u, children: [
86
- e,
87
- /* @__PURE__ */ d.jsx(Xe, {})
68
+ }, ve = ({ children: t }) => {
69
+ const [r, o] = x(!1), [e, n] = x(""), [s, a] = x({ input: "textarea", type: "text" }), l = G(() => {
70
+ }), i = m((d) => {
71
+ n(d), o(!0);
72
+ }, []), c = m(() => {
73
+ o(!1);
74
+ }, []), f = h(() => ({
75
+ isShown: r,
76
+ text: e,
77
+ showPrompt: i,
78
+ hidePrompt: c,
79
+ resolveRef: l,
80
+ options: s,
81
+ setOptions: a
82
+ }), [r, e, i, c, s]);
83
+ return /* @__PURE__ */ w(R.Provider, { value: f, children: [
84
+ t,
85
+ /* @__PURE__ */ u(he, {})
88
86
  ] });
89
- }, Ut = ({ cookieDomain: e, axiosOptions: t, language: n, texts: r, ProjectIconComponent: s, localizationContext: o, chartColorPalette: l, children: i }) => {
90
- const c = T(() => ({
91
- axiosOptions: t,
92
- cookieDomain: e,
93
- language: n,
94
- texts: r,
95
- ProjectIconComponent: s,
96
- localizationContext: o,
97
- chartColorPalette: l
87
+ }, Ae = ({ cookieDomain: t, axiosOptions: r, language: o, texts: e, ProjectIconComponent: n, localizationContext: s, chartColorPalette: a, children: l }) => {
88
+ const i = h(() => ({
89
+ axiosOptions: r,
90
+ cookieDomain: t,
91
+ language: o,
92
+ texts: e,
93
+ ProjectIconComponent: n,
94
+ localizationContext: s,
95
+ chartColorPalette: a
98
96
  }), [
97
+ r,
99
98
  t,
100
- e,
99
+ o,
101
100
  n,
102
101
  s,
103
- o,
104
- r,
105
- l
102
+ e,
103
+ a
106
104
  ]);
107
- return /* @__PURE__ */ d.jsx(z.Provider, { value: c, children: /* @__PURE__ */ d.jsx(Qe, { children: /* @__PURE__ */ d.jsxs(Ze, { children: [
108
- /* @__PURE__ */ d.jsx(je, {}),
109
- i
105
+ return /* @__PURE__ */ u(M.Provider, { value: i, children: /* @__PURE__ */ u(ge, { children: /* @__PURE__ */ w(ve, { children: [
106
+ /* @__PURE__ */ u(V, {}),
107
+ l
110
108
  ] }) }) });
111
- }, Nt = ({ children: e }) => {
112
- const [t, n] = S(!1), [r] = S(/* @__PURE__ */ new Set()), s = h((i) => {
113
- r.add(i), n(!0);
114
- }, [r]), o = h((i) => {
115
- r.delete(i), r.size === 0 && n(!1);
116
- }, [r]), l = T(() => ({ isLoading: t, startLoading: s, stopLoading: o }), [t, s, o]);
117
- return /* @__PURE__ */ d.jsxs(Ie.Provider, { value: l, children: [
118
- t && /* @__PURE__ */ d.jsx(Ge, {}),
119
- e
109
+ }, Ee = ({ children: t }) => {
110
+ const [r, o] = x(!1), [e] = x(/* @__PURE__ */ new Set()), n = m((l) => {
111
+ e.add(l), o(!0);
112
+ }, [e]), s = m((l) => {
113
+ e.delete(l), e.size === 0 && o(!1);
114
+ }, [e]), a = h(() => ({ isLoading: r, startLoading: n, stopLoading: s }), [r, n, s]);
115
+ return /* @__PURE__ */ w($.Provider, { value: a, children: [
116
+ r && /* @__PURE__ */ u(ae, {}),
117
+ t
120
118
  ] });
121
- }, Ft = ({ children: e }) => {
122
- const t = Me(), { msalInstance: n, getToken: r } = _(pe), { delegation: s, setDelegation: o, setAvailableDelegations: l, refreshAvailableDelegations: i } = _(he), [c, a] = S(null), u = h(async () => {
123
- const g = await r();
124
- g && a(g.token);
125
- }, [r]);
126
- j(() => {
127
- u();
128
- }, [u]);
129
- const m = h(() => {
119
+ }, Oe = ({ children: t }) => {
120
+ const r = W(), { msalInstance: o, getToken: e } = p(q), { delegation: n, setDelegation: s, setAvailableDelegations: a, refreshAvailableDelegations: l } = p(z), [i, c] = x(null), f = m(async () => {
121
+ const g = await e();
122
+ g && c(g.token);
123
+ }, [e]);
124
+ b(() => {
125
+ f();
126
+ }, [f]);
127
+ const v = m(() => {
130
128
  const g = localStorage.getItem("user") ?? null;
131
129
  return g ? JSON.parse(g ?? "") : null;
132
- }, [])(), [p, y] = S({
133
- state: m ? I.LOGGED_IN : I.LOGGING_IN,
134
- user: m
135
- }), v = h(async (g) => {
136
- let b = null;
137
- return await t.get("/user/detail", g ? { headers: { Authorization: `Bearer ${g}` } } : void 0).then((K) => {
138
- b = K.data;
130
+ }, [])(), [C, D] = x({
131
+ state: v ? k.LOGGED_IN : k.LOGGING_IN,
132
+ user: v
133
+ }), S = m(async (g) => {
134
+ let y = null;
135
+ return await r.get("/user/detail", g ? { headers: { Authorization: `Bearer ${g}` } } : void 0).then((N) => {
136
+ y = N.data;
139
137
  }).catch(() => {
140
- b = null;
141
- }), b;
142
- }, [t]), C = h(() => {
143
- localStorage.removeItem("user"), y({
144
- state: I.LOGGED_OUT,
138
+ y = null;
139
+ }), y;
140
+ }, [r]), A = m(() => {
141
+ localStorage.removeItem("user"), D({
142
+ state: k.LOGGED_OUT,
145
143
  user: null
146
- }), o(null), l(null);
147
- }, [l, o]), w = h(async (g) => {
148
- y({
149
- state: I.LOGGING_IN,
144
+ }), s(null), a(null);
145
+ }, [a, s]), P = m(async (g) => {
146
+ D({
147
+ state: k.LOGGING_IN,
150
148
  user: null
151
149
  });
152
- const b = await v(g);
153
- return b ? (y({
154
- state: I.LOGGED_IN,
155
- user: b
156
- }), localStorage.setItem("user", JSON.stringify(b)), await i(), !0) : (y({
157
- state: I.LOGIN_FAILED,
150
+ const y = await S(g);
151
+ return y ? (D({
152
+ state: k.LOGGED_IN,
153
+ user: y
154
+ }), localStorage.setItem("user", JSON.stringify(y)), await l(), !0) : (D({
155
+ state: k.LOGIN_FAILED,
158
156
  user: null
159
157
  }), !1);
160
- }, [v, i]), P = h(() => {
161
- C();
162
- }, [C]);
163
- j(() => {
164
- if (n) {
165
- const g = n.addEventCallback((b) => {
166
- if (b.eventType === W.LOGIN_SUCCESS && b.payload) {
167
- const K = b.payload;
168
- a(K.accessToken);
158
+ }, [S, l]), L = m(() => {
159
+ A();
160
+ }, [A]);
161
+ b(() => {
162
+ if (o) {
163
+ const g = o.addEventCallback((y) => {
164
+ if (y.eventType === I.LOGIN_SUCCESS && y.payload) {
165
+ const N = y.payload;
166
+ c(N.accessToken);
169
167
  }
170
168
  });
171
169
  return () => {
172
- g && n.removeEventCallback(g);
170
+ g && o.removeEventCallback(g);
173
171
  };
174
172
  }
175
173
  return () => {
176
174
  };
177
- }, [n, w, P]);
178
- const se = h(async (g) => {
179
- g && await w(g).catch(() => {
180
- P(), o(null);
175
+ }, [o, P, L]);
176
+ const U = m(async (g) => {
177
+ g && await P(g).catch(() => {
178
+ L(), s(null);
181
179
  });
182
- }, [w, P, o]);
183
- j(() => {
184
- se(c);
185
- }, [c, s == null ? void 0 : s.id, se]);
186
- const Ce = T(() => ({
187
- user: p.user,
188
- userLoginState: p,
189
- loginUser: w,
190
- logoutUser: P
191
- }), [p, w, P]);
192
- return /* @__PURE__ */ d.jsx(Le.Provider, { value: Ce, children: e });
193
- }, qt = ({ ...e }) => {
194
- const { cookieDomain: t } = _(z), [, n] = He(["Authorization"]), r = T(
195
- () => e.useMsal ? e.msalInstance : null,
180
+ }, [P, L, s]);
181
+ b(() => {
182
+ U(i);
183
+ }, [i, n == null ? void 0 : n.id, U]);
184
+ const B = h(() => ({
185
+ user: C.user,
186
+ userLoginState: C,
187
+ loginUser: P,
188
+ logoutUser: L
189
+ }), [C, P, L]);
190
+ return /* @__PURE__ */ u(X.Provider, { value: B, children: t });
191
+ }, Me = ({ ...t }) => {
192
+ const { cookieDomain: r } = p(M), [, o] = Y(["Authorization"]), e = h(
193
+ () => t.useMsal ? t.msalInstance : null,
196
194
  // eslint-disable-next-line react-hooks/exhaustive-deps
197
- [e.useMsal, e.useMsal ? e.msalInstance : null]
198
- ), s = T(
199
- () => e.useMsal ? e.msalScopes : [],
195
+ [t.useMsal, t.useMsal ? t.msalInstance : null]
196
+ ), n = h(
197
+ () => t.useMsal ? t.msalScopes : [],
200
198
  // eslint-disable-next-line react-hooks/exhaustive-deps
201
- [e.useMsal, e.useMsal ? e.msalScopes : null]
202
- ), o = T(
203
- () => e.useMsal ? e.msalExtraScopes : [],
199
+ [t.useMsal, t.useMsal ? t.msalScopes : null]
200
+ ), s = h(
201
+ () => t.useMsal ? t.msalExtraScopes : [],
204
202
  // eslint-disable-next-line react-hooks/exhaustive-deps
205
- [e.useMsal, e.useMsal ? e.msalExtraScopes : null]
206
- ), l = te(null), i = h(() => {
207
- const f = localStorage.getItem("token");
208
- return f ? {
209
- token: f,
210
- expiresOn: ze(new Date(Date.now()), 1)
203
+ [t.useMsal, t.useMsal ? t.msalExtraScopes : null]
204
+ ), a = G(null), l = m(() => {
205
+ const d = localStorage.getItem("token");
206
+ return d ? {
207
+ token: d,
208
+ expiresOn: ce(new Date(Date.now()), 1)
211
209
  } : null;
212
- }, []), c = h(async () => {
213
- var y;
214
- if (l.current)
215
- return l.current;
216
- const f = r == null ? void 0 : r.getActiveAccount(), m = f ?? ((y = r == null ? void 0 : r.getAllAccounts()) == null ? void 0 : y.at(0)) ?? void 0;
217
- if (!m)
210
+ }, []), i = m(async () => {
211
+ var D;
212
+ if (a.current)
213
+ return a.current;
214
+ const d = e == null ? void 0 : e.getActiveAccount(), v = d ?? ((D = e == null ? void 0 : e.getAllAccounts()) == null ? void 0 : D.at(0)) ?? void 0;
215
+ if (!v)
218
216
  return null;
219
- f || r == null || r.setActiveAccount(m);
220
- const p = r == null ? void 0 : r.acquireTokenSilent({
221
- scopes: s,
222
- account: m
223
- }).then((v) => ({
224
- token: v.accessToken,
225
- expiresOn: v.expiresOn ?? new Date(Date.now())
226
- })).catch((v) => {
227
- if (console.error("Error acquiring token", v), v instanceof Fe)
228
- return console.log("Silent token acquisition failed. Acquiring token using redirect"), r == null || r.acquireTokenRedirect({
229
- scopes: s,
230
- extraScopesToConsent: o
217
+ d || e == null || e.setActiveAccount(v);
218
+ const C = e == null ? void 0 : e.acquireTokenSilent({
219
+ scopes: n,
220
+ account: v
221
+ }).then((S) => ({
222
+ token: S.accessToken,
223
+ expiresOn: S.expiresOn ?? new Date(Date.now())
224
+ })).catch((S) => {
225
+ if (console.error("Error acquiring token", S), S instanceof se)
226
+ return console.log("Silent token acquisition failed. Acquiring token using redirect"), e == null || e.acquireTokenRedirect({
227
+ scopes: n,
228
+ extraScopesToConsent: s
231
229
  }), null;
232
- throw v;
230
+ throw S;
233
231
  }).finally(() => {
234
- l.current = null;
232
+ a.current = null;
235
233
  });
236
- return l.current = p ?? null, p ?? null;
237
- }, [r, s, o]), a = h(async () => e.useMsal ? c() : i(), [i, c, e.useMsal]), u = T(() => ({
238
- useMsal: e.useMsal ?? !1,
239
- msalInstance: r,
240
- msalScopes: s,
241
- msalExtraScopes: o,
242
- getToken: a
243
- }), [e.useMsal, r, s, o, a]);
244
- return j(() => {
245
- if (e.useMsal && r) {
246
- const f = r.addEventCallback((m) => {
247
- if (m.eventType === W.LOGIN_SUCCESS || m.eventType === W.ACQUIRE_TOKEN_SUCCESS && m.payload) {
248
- const p = m.payload, y = p.account;
249
- r.setActiveAccount(y);
250
- const v = p.accessToken, C = p.expiresOn;
251
- n("Authorization", v, {
234
+ return a.current = C ?? null, C ?? null;
235
+ }, [e, n, s]), c = m(async () => t.useMsal ? i() : l(), [l, i, t.useMsal]), f = h(() => ({
236
+ useMsal: t.useMsal ?? !1,
237
+ msalInstance: e,
238
+ msalScopes: n,
239
+ msalExtraScopes: s,
240
+ getToken: c
241
+ }), [t.useMsal, e, n, s, c]);
242
+ return b(() => {
243
+ if (t.useMsal && e) {
244
+ const d = e.addEventCallback((v) => {
245
+ if (v.eventType === I.LOGIN_SUCCESS || v.eventType === I.ACQUIRE_TOKEN_SUCCESS && v.payload) {
246
+ const C = v.payload, D = C.account;
247
+ e.setActiveAccount(D);
248
+ const S = C.accessToken, A = C.expiresOn;
249
+ o("Authorization", S, {
252
250
  path: "/",
253
251
  secure: !0,
254
252
  sameSite: "none",
255
- domain: t,
256
- expires: C ?? void 0
253
+ domain: r,
254
+ expires: A ?? void 0
257
255
  });
258
256
  }
259
- m.error && console.error("AuthProvider MSAL Error", m);
257
+ v.error && console.error("AuthProvider MSAL Error", v);
260
258
  });
261
259
  return () => {
262
- f && r.removeEventCallback(f);
260
+ d && e.removeEventCallback(d);
263
261
  };
264
262
  }
265
263
  return () => {
266
264
  };
267
- }, [e.useMsal, r, n, t]), /* @__PURE__ */ d.jsx(pe.Provider, { value: u, children: e.useMsal ? /* @__PURE__ */ d.jsx(qe, { instance: e.msalInstance, children: e.children }) : e.children });
268
- }, Gt = ({ children: e, relativeEndpoint: t }) => {
269
- const [n, r, s] = Ke("user-delegation", null), o = T(() => {
270
- if (!n)
265
+ }, [t.useMsal, e, o, r]), /* @__PURE__ */ u(q.Provider, { value: f, children: t.useMsal ? /* @__PURE__ */ u(re, { instance: t.msalInstance, children: t.children }) : t.children });
266
+ }, Ne = ({ children: t, relativeEndpoint: r }) => {
267
+ const [o, e, n] = le("user-delegation", null), s = h(() => {
268
+ if (!o)
271
269
  return null;
272
- const f = n.from ? oe(n.from) : We(), m = n.to ? oe(n.to) : Ye();
273
- return Je(new Date(Date.now()), { start: f, end: m }) ? n : (r(null), null);
274
- }, [n, r]), { data: l, setData: i, reloadData: c } = Ve(t, {
270
+ const d = o.from ? H(o.from) : fe(), v = o.to ? H(o.to) : de();
271
+ return me(new Date(Date.now()), { start: d, end: v }) ? o : (e(null), null);
272
+ }, [o, e]), { data: a, setData: l, reloadData: i } = ie(r, {
275
273
  nullStateBeforeLoad: !1,
276
274
  nullStateOnFail: !0
277
- }), a = te(null);
278
- j(() => {
279
- const f = () => {
280
- c(), a.current = window.setTimeout(f, _e() + 5e3);
275
+ }), c = G(null);
276
+ b(() => {
277
+ const d = () => {
278
+ i(), c.current = window.setTimeout(d, Z() + 5e3);
281
279
  };
282
- return f(), () => {
283
- a.current !== null && window.clearTimeout(a.current);
280
+ return d(), () => {
281
+ c.current !== null && window.clearTimeout(c.current);
284
282
  };
285
- }, [c]), j(() => {
286
- const f = () => {
287
- s();
283
+ }, [i]), b(() => {
284
+ const d = () => {
285
+ n();
288
286
  };
289
- return window.addEventListener("focus", f), () => {
290
- window.removeEventListener("focus", f);
287
+ return window.addEventListener("focus", d), () => {
288
+ window.removeEventListener("focus", d);
291
289
  };
292
- }, [s, c]);
293
- const u = T(() => ({
294
- delegation: o,
295
- setDelegation: r,
296
- availableDelegations: l,
297
- setAvailableDelegations: i,
298
- refreshAvailableDelegations: c
290
+ }, [n, i]);
291
+ const f = h(() => ({
292
+ delegation: s,
293
+ setDelegation: e,
294
+ availableDelegations: a,
295
+ setAvailableDelegations: l,
296
+ refreshAvailableDelegations: i
299
297
  }), [
300
- o,
301
- r,
298
+ s,
299
+ e,
300
+ a,
302
301
  l,
303
- i,
304
- c
302
+ i
305
303
  ]);
306
- return /* @__PURE__ */ d.jsx(he.Provider, { value: u, children: e });
307
- };
308
- var et = typeof Element < "u", tt = typeof Map == "function", rt = typeof Set == "function", nt = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
309
- function F(e, t) {
310
- if (e === t) return !0;
311
- if (e && t && typeof e == "object" && typeof t == "object") {
312
- if (e.constructor !== t.constructor) return !1;
313
- var n, r, s;
314
- if (Array.isArray(e)) {
315
- if (n = e.length, n != t.length) return !1;
316
- for (r = n; r-- !== 0; )
317
- if (!F(e[r], t[r])) return !1;
318
- return !0;
319
- }
320
- var o;
321
- if (tt && e instanceof Map && t instanceof Map) {
322
- if (e.size !== t.size) return !1;
323
- for (o = e.entries(); !(r = o.next()).done; )
324
- if (!t.has(r.value[0])) return !1;
325
- for (o = e.entries(); !(r = o.next()).done; )
326
- if (!F(r.value[1], t.get(r.value[0]))) return !1;
327
- return !0;
328
- }
329
- if (rt && e instanceof Set && t instanceof Set) {
330
- if (e.size !== t.size) return !1;
331
- for (o = e.entries(); !(r = o.next()).done; )
332
- if (!t.has(r.value[0])) return !1;
333
- return !0;
334
- }
335
- if (nt && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
336
- if (n = e.length, n != t.length) return !1;
337
- for (r = n; r-- !== 0; )
338
- if (e[r] !== t[r]) return !1;
339
- return !0;
340
- }
341
- if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
342
- if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof t.valueOf == "function") return e.valueOf() === t.valueOf();
343
- if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof t.toString == "function") return e.toString() === t.toString();
344
- if (s = Object.keys(e), n = s.length, n !== Object.keys(t).length) return !1;
345
- for (r = n; r-- !== 0; )
346
- if (!Object.prototype.hasOwnProperty.call(t, s[r])) return !1;
347
- if (et && e instanceof Element) return !1;
348
- for (r = n; r-- !== 0; )
349
- if (!((s[r] === "_owner" || s[r] === "__v" || s[r] === "__o") && e.$$typeof) && !F(e[s[r]], t[s[r]]))
350
- return !1;
351
- return !0;
352
- }
353
- return e !== e && t !== t;
354
- }
355
- var st = function(t, n) {
356
- try {
357
- return F(t, n);
358
- } catch (r) {
359
- if ((r.message || "").match(/stack|recursion/i))
360
- return console.warn("react-fast-compare cannot handle circular refs"), !1;
361
- throw r;
362
- }
363
- };
364
- const ot = /* @__PURE__ */ ye(st);
365
- var at = function(t, n, r, s) {
366
- var o = r ? r.call(s, t, n) : void 0;
367
- if (o !== void 0)
368
- return !!o;
369
- if (t === n)
370
- return !0;
371
- if (typeof t != "object" || !t || typeof n != "object" || !n)
372
- return !1;
373
- var l = Object.keys(t), i = Object.keys(n);
374
- if (l.length !== i.length)
375
- return !1;
376
- for (var c = Object.prototype.hasOwnProperty.bind(n), a = 0; a < l.length; a++) {
377
- var u = l[a];
378
- if (!c(u))
379
- return !1;
380
- var f = t[u], m = n[u];
381
- if (o = r ? r.call(s, f, m, u) : void 0, o === !1 || o === void 0 && f !== m)
382
- return !1;
383
- }
384
- return !0;
385
- };
386
- const it = /* @__PURE__ */ ye(at);
387
- var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(ge || {}), V = {
388
- link: { rel: ["amphtml", "canonical", "alternate"] },
389
- script: { type: ["application/ld+json"] },
390
- meta: {
391
- charset: "",
392
- name: ["generator", "robots", "description"],
393
- property: [
394
- "og:type",
395
- "og:title",
396
- "og:url",
397
- "og:image",
398
- "og:image:alt",
399
- "og:description",
400
- "twitter:url",
401
- "twitter:title",
402
- "twitter:description",
403
- "twitter:image",
404
- "twitter:image:alt",
405
- "twitter:card",
406
- "twitter:site"
407
- ]
408
- }
409
- }, ie = Object.values(ge), ne = {
410
- accesskey: "accessKey",
411
- charset: "charSet",
412
- class: "className",
413
- contenteditable: "contentEditable",
414
- contextmenu: "contextMenu",
415
- "http-equiv": "httpEquiv",
416
- itemprop: "itemProp",
417
- tabindex: "tabIndex"
418
- }, lt = Object.entries(ne).reduce(
419
- (e, [t, n]) => (e[n] = t, e),
420
- {}
421
- ), A = "data-rh", L = {
422
- DEFAULT_TITLE: "defaultTitle",
423
- DEFER: "defer",
424
- ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
425
- ON_CHANGE_CLIENT_STATE: "onChangeClientState",
426
- TITLE_TEMPLATE: "titleTemplate",
427
- PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
428
- }, H = (e, t) => {
429
- for (let n = e.length - 1; n >= 0; n -= 1) {
430
- const r = e[n];
431
- if (Object.prototype.hasOwnProperty.call(r, t))
432
- return r[t];
433
- }
434
- return null;
435
- }, ct = (e) => {
436
- let t = H(
437
- e,
438
- "title"
439
- /* TITLE */
440
- );
441
- const n = H(e, L.TITLE_TEMPLATE);
442
- if (Array.isArray(t) && (t = t.join("")), n && t)
443
- return n.replace(/%s/g, () => t);
444
- const r = H(e, L.DEFAULT_TITLE);
445
- return t || r || void 0;
446
- }, ut = (e) => H(e, L.ON_CHANGE_CLIENT_STATE) || (() => {
447
- }), B = (e, t) => t.filter((n) => typeof n[e] < "u").map((n) => n[e]).reduce((n, r) => ({ ...n, ...r }), {}), ft = (e, t) => t.filter((n) => typeof n.base < "u").map((n) => n.base).reverse().reduce((n, r) => {
448
- if (!n.length) {
449
- const s = Object.keys(r);
450
- for (let o = 0; o < s.length; o += 1) {
451
- const i = s[o].toLowerCase();
452
- if (e.indexOf(i) !== -1 && r[i])
453
- return n.concat(r);
454
- }
455
- }
456
- return n;
457
- }, []), dt = (e) => console && typeof console.warn == "function" && console.warn(e), $ = (e, t, n) => {
458
- const r = {};
459
- return n.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && dt(
460
- `Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`
461
- ), !1)).map((s) => s[e]).reverse().reduce((s, o) => {
462
- const l = {};
463
- o.filter((c) => {
464
- let a;
465
- const u = Object.keys(c);
466
- for (let m = 0; m < u.length; m += 1) {
467
- const p = u[m], y = p.toLowerCase();
468
- t.indexOf(y) !== -1 && !(a === "rel" && c[a].toLowerCase() === "canonical") && !(y === "rel" && c[y].toLowerCase() === "stylesheet") && (a = y), t.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (a = p);
469
- }
470
- if (!a || !c[a])
471
- return !1;
472
- const f = c[a].toLowerCase();
473
- return r[a] || (r[a] = {}), l[a] || (l[a] = {}), r[a][f] ? !1 : (l[a][f] = !0, !0);
474
- }).reverse().forEach((c) => s.push(c));
475
- const i = Object.keys(l);
476
- for (let c = 0; c < i.length; c += 1) {
477
- const a = i[c], u = {
478
- ...r[a],
479
- ...l[a]
480
- };
481
- r[a] = u;
482
- }
483
- return s;
484
- }, []).reverse();
485
- }, mt = (e, t) => {
486
- if (Array.isArray(e) && e.length) {
487
- for (let n = 0; n < e.length; n += 1)
488
- if (e[n][t])
489
- return !0;
490
- }
491
- return !1;
492
- }, pt = (e) => ({
493
- baseTag: ft([
494
- "href"
495
- /* HREF */
496
- ], e),
497
- bodyAttributes: B("bodyAttributes", e),
498
- defer: H(e, L.DEFER),
499
- encode: H(e, L.ENCODE_SPECIAL_CHARACTERS),
500
- htmlAttributes: B("htmlAttributes", e),
501
- linkTags: $(
502
- "link",
503
- [
504
- "rel",
505
- "href"
506
- /* HREF */
507
- ],
508
- e
509
- ),
510
- metaTags: $(
511
- "meta",
512
- [
513
- "name",
514
- "charset",
515
- "http-equiv",
516
- "property",
517
- "itemprop"
518
- /* ITEM_PROP */
519
- ],
520
- e
521
- ),
522
- noscriptTags: $("noscript", [
523
- "innerHTML"
524
- /* INNER_HTML */
525
- ], e),
526
- onChangeClientState: ut(e),
527
- scriptTags: $(
528
- "script",
529
- [
530
- "src",
531
- "innerHTML"
532
- /* INNER_HTML */
533
- ],
534
- e
535
- ),
536
- styleTags: $("style", [
537
- "cssText"
538
- /* CSS_TEXT */
539
- ], e),
540
- title: ct(e),
541
- titleAttributes: B("titleAttributes", e),
542
- prioritizeSeoTags: mt(e, L.PRIORITIZE_SEO_TAGS)
543
- }), Te = (e) => Array.isArray(e) ? e.join("") : e, ht = (e, t) => {
544
- const n = Object.keys(e);
545
- for (let r = 0; r < n.length; r += 1)
546
- if (t[n[r]] && t[n[r]].includes(e[n[r]]))
547
- return !0;
548
- return !1;
549
- }, Y = (e, t) => Array.isArray(e) ? e.reduce(
550
- (n, r) => (ht(r, t) ? n.priority.push(r) : n.default.push(r), n),
551
- { priority: [], default: [] }
552
- ) : { default: e, priority: [] }, le = (e, t) => ({
553
- ...e,
554
- [t]: void 0
555
- }), yt = [
556
- "noscript",
557
- "script",
558
- "style"
559
- /* STYLE */
560
- ], Q = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;"), ve = (e) => Object.keys(e).reduce((t, n) => {
561
- const r = typeof e[n] < "u" ? `${n}="${e[n]}"` : `${n}`;
562
- return t ? `${t} ${r}` : r;
563
- }, ""), gt = (e, t, n, r) => {
564
- const s = ve(n), o = Te(t);
565
- return s ? `<${e} ${A}="true" ${s}>${Q(
566
- o,
304
+ return /* @__PURE__ */ u(z.Provider, { value: f, children: t });
305
+ }, _ = (t, r) => t ? `${t} | ${r}` : r, Ie = ({ defaultHelmet: t, children: r, helmetPrefix: o }) => {
306
+ const [e, n] = x([
307
+ _(o ?? "", t)
308
+ ]), s = m((c) => {
309
+ n((f) => [...f, _(o ?? "", c)]);
310
+ }, [o]), a = m(() => {
311
+ n((c) => c.length > 1 ? c.slice(0, -1) : c);
312
+ }, [n]), l = h(() => e.at(-1) ?? "", [e]), i = h(() => ({ addHelmet: s, removeHelmet: a }), [s, a]);
313
+ return /* @__PURE__ */ w(ee.Provider, { value: i, children: [
314
+ /* @__PURE__ */ u("title", { children: l }),
567
315
  r
568
- )}</${e}>` : `<${e} ${A}="true">${Q(
569
- o,
570
- r
571
- )}</${e}>`;
572
- }, Tt = (e, t, n = !0) => t.reduce((r, s) => {
573
- const o = s, l = Object.keys(o).filter(
574
- (a) => !(a === "innerHTML" || a === "cssText")
575
- ).reduce((a, u) => {
576
- const f = typeof o[u] > "u" ? u : `${u}="${Q(o[u], n)}"`;
577
- return a ? `${a} ${f}` : f;
578
- }, ""), i = o.innerHTML || o.cssText || "", c = yt.indexOf(e) === -1;
579
- return `${r}<${e} ${A}="true" ${l}${c ? "/>" : `>${i}</${e}>`}`;
580
- }, ""), xe = (e, t = {}) => Object.keys(e).reduce((n, r) => {
581
- const s = ne[r];
582
- return n[s || r] = e[r], n;
583
- }, t), vt = (e, t, n) => {
584
- const r = {
585
- key: t,
586
- [A]: !0
587
- }, s = xe(n, r);
588
- return [D.createElement("title", s, t)];
589
- }, q = (e, t) => t.map((n, r) => {
590
- const s = {
591
- key: r,
592
- [A]: !0
593
- };
594
- return Object.keys(n).forEach((o) => {
595
- const i = ne[o] || o;
596
- if (i === "innerHTML" || i === "cssText") {
597
- const c = n.innerHTML || n.cssText;
598
- s.dangerouslySetInnerHTML = { __html: c };
599
- } else
600
- s[i] = n[o];
601
- }), D.createElement(e, s);
602
- }), x = (e, t, n = !0) => {
603
- switch (e) {
604
- case "title":
605
- return {
606
- toComponent: () => vt(e, t.title, t.titleAttributes),
607
- toString: () => gt(e, t.title, t.titleAttributes, n)
608
- };
609
- case "bodyAttributes":
610
- case "htmlAttributes":
611
- return {
612
- toComponent: () => xe(t),
613
- toString: () => ve(t)
614
- };
615
- default:
616
- return {
617
- toComponent: () => q(e, t),
618
- toString: () => Tt(e, t, n)
619
- };
620
- }
621
- }, xt = ({ metaTags: e, linkTags: t, scriptTags: n, encode: r }) => {
622
- const s = Y(e, V.meta), o = Y(t, V.link), l = Y(n, V.script);
623
- return {
624
- priorityMethods: {
625
- toComponent: () => [
626
- ...q("meta", s.priority),
627
- ...q("link", o.priority),
628
- ...q("script", l.priority)
629
- ],
630
- toString: () => (
631
- // generate all the tags as strings and concatenate them
632
- `${x("meta", s.priority, r)} ${x(
633
- "link",
634
- o.priority,
635
- r
636
- )} ${x("script", l.priority, r)}`
637
- )
638
- },
639
- metaTags: s.default,
640
- linkTags: o.default,
641
- scriptTags: l.default
642
- };
643
- }, St = (e) => {
644
- const {
645
- baseTag: t,
646
- bodyAttributes: n,
647
- encode: r = !0,
648
- htmlAttributes: s,
649
- noscriptTags: o,
650
- styleTags: l,
651
- title: i = "",
652
- titleAttributes: c,
653
- prioritizeSeoTags: a
654
- } = e;
655
- let { linkTags: u, metaTags: f, scriptTags: m } = e, p = {
656
- toComponent: () => {
657
- },
658
- toString: () => ""
659
- };
660
- return a && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: m } = xt(e)), {
661
- priority: p,
662
- base: x("base", t, r),
663
- bodyAttributes: x("bodyAttributes", n, r),
664
- htmlAttributes: x("htmlAttributes", s, r),
665
- link: x("link", u, r),
666
- meta: x("meta", f, r),
667
- noscript: x("noscript", o, r),
668
- script: x("script", m, r),
669
- style: x("style", l, r),
670
- title: x("title", { title: i, titleAttributes: c }, r)
671
- };
672
- }, X = St, U = [], Se = !!(typeof window < "u" && window.document && window.document.createElement), Z = class {
673
- constructor(e, t) {
674
- E(this, "instances", []);
675
- E(this, "canUseDOM", Se);
676
- E(this, "context");
677
- E(this, "value", {
678
- setHelmet: (e) => {
679
- this.context.helmet = e;
680
- },
681
- helmetInstances: {
682
- get: () => this.canUseDOM ? U : this.instances,
683
- add: (e) => {
684
- (this.canUseDOM ? U : this.instances).push(e);
685
- },
686
- remove: (e) => {
687
- const t = (this.canUseDOM ? U : this.instances).indexOf(e);
688
- (this.canUseDOM ? U : this.instances).splice(t, 1);
689
- }
690
- }
691
- });
692
- this.context = e, this.canUseDOM = t || !1, t || (e.helmet = X({
693
- baseTag: [],
694
- bodyAttributes: {},
695
- encodeSpecialCharacters: !0,
696
- htmlAttributes: {},
697
- linkTags: [],
698
- metaTags: [],
699
- noscriptTags: [],
700
- scriptTags: [],
701
- styleTags: [],
702
- title: "",
703
- titleAttributes: {}
704
- }));
705
- }
706
- }, bt = {}, be = D.createContext(bt), k, Ae = (k = class extends re {
707
- constructor(n) {
708
- super(n);
709
- E(this, "helmetData");
710
- this.helmetData = new Z(this.props.context || {}, k.canUseDOM);
711
- }
712
- render() {
713
- return /* @__PURE__ */ D.createElement(be.Provider, { value: this.helmetData.value }, this.props.children);
714
- }
715
- }, E(k, "canUseDOM", Se), k), M = (e, t) => {
716
- const n = document.head || document.querySelector(
717
- "head"
718
- /* HEAD */
719
- ), r = n.querySelectorAll(`${e}[${A}]`), s = [].slice.call(r), o = [];
720
- let l;
721
- return t && t.length && t.forEach((i) => {
722
- const c = document.createElement(e);
723
- for (const a in i)
724
- if (Object.prototype.hasOwnProperty.call(i, a))
725
- if (a === "innerHTML")
726
- c.innerHTML = i.innerHTML;
727
- else if (a === "cssText")
728
- c.styleSheet ? c.styleSheet.cssText = i.cssText : c.appendChild(document.createTextNode(i.cssText));
729
- else {
730
- const u = a, f = typeof i[u] > "u" ? "" : i[u];
731
- c.setAttribute(a, f);
732
- }
733
- c.setAttribute(A, "true"), s.some((a, u) => (l = u, c.isEqualNode(a))) ? s.splice(l, 1) : o.push(c);
734
- }), s.forEach((i) => {
735
- var c;
736
- return (c = i.parentNode) == null ? void 0 : c.removeChild(i);
737
- }), o.forEach((i) => n.appendChild(i)), {
738
- oldTags: s,
739
- newTags: o
740
- };
741
- }, ee = (e, t) => {
742
- const n = document.getElementsByTagName(e)[0];
743
- if (!n)
744
- return;
745
- const r = n.getAttribute(A), s = r ? r.split(",") : [], o = [...s], l = Object.keys(t);
746
- for (const i of l) {
747
- const c = t[i] || "";
748
- n.getAttribute(i) !== c && n.setAttribute(i, c), s.indexOf(i) === -1 && s.push(i);
749
- const a = o.indexOf(i);
750
- a !== -1 && o.splice(a, 1);
751
- }
752
- for (let i = o.length - 1; i >= 0; i -= 1)
753
- n.removeAttribute(o[i]);
754
- s.length === o.length ? n.removeAttribute(A) : n.getAttribute(A) !== l.join(",") && n.setAttribute(A, l.join(","));
755
- }, At = (e, t) => {
756
- typeof e < "u" && document.title !== e && (document.title = Te(e)), ee("title", t);
757
- }, ce = (e, t) => {
758
- const {
759
- baseTag: n,
760
- bodyAttributes: r,
761
- htmlAttributes: s,
762
- linkTags: o,
763
- metaTags: l,
764
- noscriptTags: i,
765
- onChangeClientState: c,
766
- scriptTags: a,
767
- styleTags: u,
768
- title: f,
769
- titleAttributes: m
770
- } = e;
771
- ee("body", r), ee("html", s), At(f, m);
772
- const p = {
773
- baseTag: M("base", n),
774
- linkTags: M("link", o),
775
- metaTags: M("meta", l),
776
- noscriptTags: M("noscript", i),
777
- scriptTags: M("script", a),
778
- styleTags: M("style", u)
779
- }, y = {}, v = {};
780
- Object.keys(p).forEach((C) => {
781
- const { newTags: w, oldTags: P } = p[C];
782
- w.length && (y[C] = w), P.length && (v[C] = p[C].oldTags);
783
- }), t && t(), c(e, y, v);
784
- }, R = null, Ct = (e) => {
785
- R && cancelAnimationFrame(R), e.defer ? R = requestAnimationFrame(() => {
786
- ce(e, () => {
787
- R = null;
788
- });
789
- }) : (ce(e), R = null);
790
- }, Et = Ct, ue = class extends re {
791
- constructor() {
792
- super(...arguments);
793
- E(this, "rendered", !1);
794
- }
795
- shouldComponentUpdate(t) {
796
- return !it(t, this.props);
797
- }
798
- componentDidUpdate() {
799
- this.emitChange();
800
- }
801
- componentWillUnmount() {
802
- const { helmetInstances: t } = this.props.context;
803
- t.remove(this), this.emitChange();
804
- }
805
- emitChange() {
806
- const { helmetInstances: t, setHelmet: n } = this.props.context;
807
- let r = null;
808
- const s = pt(
809
- t.get().map((o) => {
810
- const l = { ...o.props };
811
- return delete l.context, l;
812
- })
813
- );
814
- Ae.canUseDOM ? Et(s) : X && (r = X(s)), n(r);
815
- }
816
- // componentWillMount will be deprecated
817
- // for SSR, initialize on first render
818
- // constructor is also unsafe in StrictMode
819
- init() {
820
- if (this.rendered)
821
- return;
822
- this.rendered = !0;
823
- const { helmetInstances: t } = this.props.context;
824
- t.add(this), this.emitChange();
825
- }
826
- render() {
827
- return this.init(), null;
828
- }
829
- }, J, Ot = (J = class extends re {
830
- shouldComponentUpdate(e) {
831
- return !ot(le(this.props, "helmetData"), le(e, "helmetData"));
832
- }
833
- mapNestedChildrenToProps(e, t) {
834
- if (!t)
835
- return null;
836
- switch (e.type) {
837
- case "script":
838
- case "noscript":
839
- return {
840
- innerHTML: t
841
- };
842
- case "style":
843
- return {
844
- cssText: t
845
- };
846
- default:
847
- throw new Error(
848
- `<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`
849
- );
850
- }
851
- }
852
- flattenArrayTypeChildren(e, t, n, r) {
853
- return {
854
- ...t,
855
- [e.type]: [
856
- ...t[e.type] || [],
857
- {
858
- ...n,
859
- ...this.mapNestedChildrenToProps(e, r)
860
- }
861
- ]
862
- };
863
- }
864
- mapObjectTypeChildren(e, t, n, r) {
865
- switch (e.type) {
866
- case "title":
867
- return {
868
- ...t,
869
- [e.type]: r,
870
- titleAttributes: { ...n }
871
- };
872
- case "body":
873
- return {
874
- ...t,
875
- bodyAttributes: { ...n }
876
- };
877
- case "html":
878
- return {
879
- ...t,
880
- htmlAttributes: { ...n }
881
- };
882
- default:
883
- return {
884
- ...t,
885
- [e.type]: { ...n }
886
- };
887
- }
888
- }
889
- mapArrayTypeChildrenToProps(e, t) {
890
- let n = { ...t };
891
- return Object.keys(e).forEach((r) => {
892
- n = {
893
- ...n,
894
- [r]: e[r]
895
- };
896
- }), n;
897
- }
898
- warnOnInvalidChildren(e, t) {
899
- return ae(
900
- ie.some((n) => e.type === n),
901
- typeof e.type == "function" ? "You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information." : `Only elements types ${ie.join(
902
- ", "
903
- )} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`
904
- ), ae(
905
- !t || typeof t == "string" || Array.isArray(t) && !t.some((n) => typeof n != "string"),
906
- `Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`
907
- ), !0;
908
- }
909
- mapChildrenToProps(e, t) {
910
- let n = {};
911
- return D.Children.forEach(e, (r) => {
912
- if (!r || !r.props)
913
- return;
914
- const { children: s, ...o } = r.props, l = Object.keys(o).reduce((c, a) => (c[lt[a] || a] = o[a], c), {});
915
- let { type: i } = r;
916
- switch (typeof i == "symbol" ? i = i.toString() : this.warnOnInvalidChildren(r, s), i) {
917
- case "Symbol(react.fragment)":
918
- t = this.mapChildrenToProps(s, t);
919
- break;
920
- case "link":
921
- case "meta":
922
- case "noscript":
923
- case "script":
924
- case "style":
925
- n = this.flattenArrayTypeChildren(
926
- r,
927
- n,
928
- l,
929
- s
930
- );
931
- break;
932
- default:
933
- t = this.mapObjectTypeChildren(r, t, l, s);
934
- break;
935
- }
936
- }), this.mapArrayTypeChildrenToProps(n, t);
937
- }
938
- render() {
939
- const { children: e, ...t } = this.props;
940
- let n = { ...t }, { helmetData: r } = t;
941
- if (e && (n = this.mapChildrenToProps(e, n)), r && !(r instanceof Z)) {
942
- const s = r;
943
- r = new Z(s.context, !0), delete n.helmetData;
944
- }
945
- return r ? /* @__PURE__ */ D.createElement(ue, { ...n, context: r.value }) : /* @__PURE__ */ D.createElement(be.Consumer, null, (s) => /* @__PURE__ */ D.createElement(ue, { ...n, context: s }));
946
- }
947
- }, E(J, "defaultProps", {
948
- defer: !0,
949
- encodeSpecialCharacters: !0,
950
- prioritizeSeoTags: !1
951
- }), J);
952
- const fe = (e, t) => e ? `${e} | ${t}` : t, zt = ({ defaultHelmet: e, children: t, helmetPrefix: n }) => {
953
- const [r, s] = S([
954
- fe(n ?? "", e)
955
- ]), o = h((a) => {
956
- s((u) => [...u, fe(n ?? "", a)]);
957
- }, [n]), l = h(() => {
958
- s((a) => a.length > 1 ? a.slice(0, -1) : a);
959
- }, [s]), i = T(() => r.at(-1) ?? "", [r]), c = T(() => ({ addHelmet: o, removeHelmet: l }), [o, l]);
960
- return /* @__PURE__ */ d.jsx($e.Provider, { value: c, children: /* @__PURE__ */ d.jsxs(Ae, { children: [
961
- /* @__PURE__ */ d.jsx(Ot, { defer: !1, children: /* @__PURE__ */ d.jsx("title", { children: i }) }),
962
- t
963
- ] }) });
964
- }, de = 50, wt = () => {
965
- const { texts: { confirm: e } } = _(z), { onConfirm: t, onCancel: n, text: r, show: s, textSm: o } = Re(), l = T(() => o === void 0 ? r.length > de : o, [r, o]), i = T(() => r.length > de, [r]), c = h((a) => {
966
- if (s)
967
- switch (a.key) {
316
+ ] });
317
+ }, F = 50, xe = () => {
318
+ const { texts: { confirm: t } } = p(M), { onConfirm: r, onCancel: o, text: e, show: n, textSm: s } = te(), a = h(() => s === void 0 ? e.length > F : s, [e, s]), l = h(() => e.length > F, [e]), i = m((c) => {
319
+ if (n)
320
+ switch (c.key) {
968
321
  case "Enter":
969
- a.preventDefault(), a.stopPropagation(), t();
322
+ c.preventDefault(), c.stopPropagation(), r();
970
323
  break;
971
324
  case "Escape":
972
- a.preventDefault(), a.stopPropagation(), n();
325
+ c.preventDefault(), c.stopPropagation(), o();
973
326
  break;
974
327
  }
975
- }, [t, n, s]);
976
- return Ue(c), /* @__PURE__ */ d.jsxs(O, { show: s, size: i ? void 0 : "sm", centered: !0, onHide: n, children: [
977
- /* @__PURE__ */ d.jsx(O.Header, { className: "justify-content-center", children: l ? /* @__PURE__ */ d.jsx(Ne, { variant: "body", children: r }) : /* @__PURE__ */ d.jsx(O.Title, { children: r }) }),
978
- /* @__PURE__ */ d.jsx(O.Body, { children: /* @__PURE__ */ d.jsxs("div", { className: "w-100 d-flex gap-5", children: [
979
- /* @__PURE__ */ d.jsx(G, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: n, children: e.no }),
980
- /* @__PURE__ */ d.jsx(G, { type: "button", color: "primary", onClick: t, className: "w-100 ml", children: e.yes })
328
+ }, [r, o, n]);
329
+ return ne(i), /* @__PURE__ */ w(T, { show: n, size: l ? void 0 : "sm", centered: !0, onHide: o, children: [
330
+ /* @__PURE__ */ u(T.Header, { className: "justify-content-center", children: a ? /* @__PURE__ */ u(oe, { variant: "body", children: e }) : /* @__PURE__ */ u(T.Title, { children: e }) }),
331
+ /* @__PURE__ */ u(T.Body, { children: /* @__PURE__ */ w("div", { className: "w-100 d-flex gap-5", children: [
332
+ /* @__PURE__ */ u(O, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: o, children: t.no }),
333
+ /* @__PURE__ */ u(O, { type: "button", color: "primary", onClick: r, className: "w-100 ml", children: t.yes })
981
334
  ] }) })
982
335
  ] });
983
336
  };
984
337
  export {
985
- pe as AuthContext,
986
- qt as AuthProvider,
987
- he as DelegationContext,
988
- Gt as DelegationProvider,
989
- Bt as FormDisabledContext,
990
- Wt as FormDisabledProvider,
991
- $e as HelmetContext,
992
- zt as HelmetProvider,
993
- Ie as LoadingContext,
994
- Nt as LoadingProvider,
995
- z as LuminusComponentsContext,
996
- Ut as LuminusComponentsProvider,
997
- Le as UserContext,
998
- Ft as UserProvider,
999
- Yt as useFormDisabledContext
338
+ q as AuthContext,
339
+ Me as AuthProvider,
340
+ z as DelegationContext,
341
+ Ne as DelegationProvider,
342
+ He as FormDisabledContext,
343
+ Re as FormDisabledProvider,
344
+ ee as HelmetContext,
345
+ Ie as HelmetProvider,
346
+ $ as LoadingContext,
347
+ Ee as LoadingProvider,
348
+ M as LuminusComponentsContext,
349
+ Ae as LuminusComponentsProvider,
350
+ X as UserContext,
351
+ Oe as UserProvider,
352
+ _e as useFormDisabledContext
1000
353
  };