react-luminus-components 1.4.45 → 1.4.47

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