@sito/dashboard-app 0.0.57 → 0.0.59

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 (70) hide show
  1. package/README.md +58 -2
  2. package/dist/components/BottomNavigation/BottomNavigation.d.ts +8 -0
  3. package/dist/components/BottomNavigation/NavLink.d.ts +13 -0
  4. package/dist/components/BottomNavigation/index.d.ts +2 -0
  5. package/dist/components/BottomNavigation/testmap.d.ts +2 -0
  6. package/dist/components/BottomNavigation/types.d.ts +26 -0
  7. package/dist/components/BottomNavigation/utils.d.ts +17 -0
  8. package/dist/components/Buttons/IconButton.d.ts +5 -0
  9. package/dist/components/Buttons/ToTop.d.ts +5 -0
  10. package/dist/components/Dialog/ConfirmationDialog.d.ts +5 -0
  11. package/dist/components/Dialog/Dialog.d.ts +5 -0
  12. package/dist/components/Dialog/DialogActions.d.ts +5 -0
  13. package/dist/components/Dialog/FormDialog.d.ts +5 -0
  14. package/dist/components/Dialog/ImportDialog/Error.d.ts +6 -5
  15. package/dist/components/Dialog/ImportDialog/ImportDialog.d.ts +5 -0
  16. package/dist/components/Dialog/ImportDialog/Loading.d.ts +6 -5
  17. package/dist/components/Dialog/ImportDialog/Preview.d.ts +5 -0
  18. package/dist/components/Dialog/ImportDialog/types.d.ts +33 -0
  19. package/dist/components/Drawer/Drawer.d.ts +5 -0
  20. package/dist/components/Empty/Empty.d.ts +5 -0
  21. package/dist/components/Error/Error.d.ts +5 -0
  22. package/dist/components/Form/FormContainer.d.ts +5 -0
  23. package/dist/components/Form/PasswordInput.d.ts +6 -0
  24. package/dist/components/Loading/SplashScreen.d.ts +5 -0
  25. package/dist/components/Navbar/Navbar.d.ts +5 -0
  26. package/dist/components/Notification/Notification.d.ts +4 -0
  27. package/dist/components/Onboarding/Onboarding.d.ts +5 -0
  28. package/dist/components/Onboarding/Step.d.ts +5 -0
  29. package/dist/components/Page/Page.d.ts +5 -0
  30. package/dist/components/Page/PageHeader.d.ts +5 -0
  31. package/dist/components/PrettyGrid/PrettyGrid.d.ts +5 -0
  32. package/dist/components/TabsLayout/Tab.d.ts +5 -0
  33. package/dist/components/TabsLayout/TabsLayout.d.ts +5 -0
  34. package/dist/components/index.d.ts +1 -0
  35. package/dist/dashboard-app.cjs +1 -1
  36. package/dist/dashboard-app.js +1247 -1138
  37. package/dist/hooks/actions/types.d.ts +1 -0
  38. package/dist/hooks/actions/useDeleteAction.d.ts +5 -0
  39. package/dist/hooks/actions/useEditAction.d.ts +5 -0
  40. package/dist/hooks/actions/useExportAction.d.ts +5 -0
  41. package/dist/hooks/actions/useImportAction.d.ts +5 -0
  42. package/dist/hooks/actions/useRestoreAction.d.ts +5 -0
  43. package/dist/hooks/dialogs/useDeleteDialog.d.ts +5 -0
  44. package/dist/hooks/dialogs/useDialog.d.ts +4 -0
  45. package/dist/hooks/dialogs/useFormDialog.d.ts +5 -0
  46. package/dist/hooks/dialogs/useImportDialog.d.ts +5 -0
  47. package/dist/hooks/dialogs/usePostDialog.d.ts +5 -0
  48. package/dist/hooks/dialogs/usePutDialog.d.ts +5 -0
  49. package/dist/hooks/dialogs/useRestoreDialog.d.ts +5 -0
  50. package/dist/hooks/forms/useConfirmationForm.d.ts +5 -0
  51. package/dist/hooks/forms/usePostForm.d.ts +5 -0
  52. package/dist/hooks/mutate/useExportActionMutate.d.ts +5 -0
  53. package/dist/hooks/useScrollTrigger.d.ts +5 -0
  54. package/dist/hooks/useTimeAge.d.ts +4 -0
  55. package/dist/lib/Notification.d.ts +1 -0
  56. package/dist/lib/api/AuthClient.d.ts +6 -0
  57. package/dist/lib/api/BaseClient.d.ts +6 -3
  58. package/dist/lib/api/IManager.d.ts +6 -0
  59. package/dist/lib/api/IndexedDBClient.d.ts +6 -0
  60. package/dist/lib/api/SupabaseDataClient.d.ts +6 -0
  61. package/dist/lib/api/supabaseAuth.d.ts +6 -0
  62. package/dist/lib/api/utils/services.d.ts +7 -0
  63. package/dist/lib/errors.d.ts +16 -0
  64. package/dist/lib/utils/enums.d.ts +5 -0
  65. package/dist/lib/utils/os.d.ts +4 -0
  66. package/dist/main.css +1 -1
  67. package/dist/providers/Auth/authContext.d.ts +10 -0
  68. package/dist/providers/NotificationProvider.d.ts +5 -0
  69. package/dist/providers/Supbase/SupabaseContext.d.ts +5 -0
  70. package/package.json +1 -1
@@ -1,89 +1,89 @@
1
- var Ye = Object.defineProperty;
2
- var Xe = (r, e, s) => e in r ? Ye(r, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[e] = s;
3
- var N = (r, e, s) => Xe(r, typeof e != "symbol" ? e + "" : e, s);
1
+ var Xe = Object.defineProperty;
2
+ var Ze = (n, e, s) => e in n ? Xe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[e] = s;
3
+ var A = (n, e, s) => Ze(n, typeof e != "symbol" ? e + "" : e, s);
4
4
  import "./main.css";
5
- import { State as Ze, inputStateClassName as et, labelStateClassName as tt, helperTextStateClassName as st, useTranslation as k, Button as H, Loading as re, TextInput as rt, FileInput as nt, IconButton as ot, Actions as it, ActionsDropdown as at, useTableOptions as ct, Badge as lt, Action as ut } from "@sito/dashboard";
5
+ import { State as et, inputStateClassName as tt, labelStateClassName as st, helperTextStateClassName as nt, useTranslation as N, Button as q, Loading as ne, TextInput as rt, FileInput as ot, IconButton as it, Actions as at, ActionsDropdown as ct, useTableOptions as lt, Badge as ut, Action as dt } from "@sito/dashboard";
6
6
  export * from "@sito/dashboard";
7
- import { Action as fr, Actions as pr, ActionsDropdown as gr, Button as br } from "@sito/dashboard";
8
- import { jsxs as v, jsx as h, Fragment as ae } from "react/jsx-runtime";
9
- import { FontAwesomeIcon as q } from "@fortawesome/react-fontawesome";
10
- import { forwardRef as $e, useState as R, useCallback as S, useEffect as M, useReducer as xe, useRef as F, useMemo as V, createContext as Y, useContext as X, useLayoutEffect as dt } from "react";
11
- import { faEyeSlash as mt, faEye as ht, faClose as De, faTrash as ft, faRotateLeft as Le, faPencil as pt, faCircleNotch as Re, faCloudArrowDown as gt, faCloudUpload as bt, faArrowUp as yt, faArrowLeft as wt, faAdd as ve, faFilter as St, faBars as Tt, faSearch as Ct, faCircleCheck as vt, faWarning as Et } from "@fortawesome/free-solid-svg-icons";
12
- import { createPortal as Ie } from "react-dom";
13
- import { QueryClient as kt, QueryClientProvider as _e, useMutation as ne, useQueryClient as Z, useQuery as Nt } from "@tanstack/react-query";
7
+ import { Action as Cn, Actions as vn, ActionsDropdown as Tn, Button as kn } from "@sito/dashboard";
8
+ import { jsxs as E, jsx as m, Fragment as ce } from "react/jsx-runtime";
9
+ import { FontAwesomeIcon as F } from "@fortawesome/react-fontawesome";
10
+ import { forwardRef as $e, useState as R, useCallback as S, useEffect as M, useReducer as De, useRef as U, useMemo as B, createContext as X, useContext as Y, useLayoutEffect as mt } from "react";
11
+ import { faEyeSlash as ht, faEye as ft, faClose as Le, faTrash as pt, faRotateLeft as Re, faPencil as gt, faCircleNotch as Ie, faCloudArrowDown as bt, faCloudUpload as yt, faArrowUp as wt, faArrowLeft as St, faAdd as Te, faFilter as Ct, faBars as vt, faSearch as Tt, faCircleCheck as kt, faWarning as Et, faPlus as Nt } from "@fortawesome/free-solid-svg-icons";
12
+ import { createPortal as _e } from "react-dom";
14
13
  import { faSadTear as At } from "@fortawesome/free-regular-svg-icons";
15
- import { useForm as Pe } from "react-hook-form";
16
- const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
14
+ import { QueryClient as xt, QueryClientProvider as Pe, useMutation as re, useQueryClient as Z, useQuery as $t } from "@tanstack/react-query";
15
+ import { useForm as Me } from "react-hook-form";
16
+ const ke = (n) => n == null ? !1 : `${n}`.length > 0, As = $e(function(n, e) {
17
17
  const {
18
18
  value: s,
19
19
  defaultValue: t,
20
- onChange: n,
21
- state: o = Ze.default,
20
+ onChange: r,
21
+ state: o = et.default,
22
22
  name: i = "",
23
23
  id: c = "",
24
24
  label: a = "",
25
25
  disabled: l = !1,
26
26
  required: u = !1,
27
27
  containerClassName: d = "",
28
- inputClassName: m = "",
29
- labelClassName: f = "",
30
- helperText: p = "",
28
+ inputClassName: h = "",
29
+ labelClassName: p = "",
30
+ helperText: f = "",
31
31
  helperTextClassName: b = "",
32
- ...g
33
- } = r, y = s !== void 0, [T, w] = R(
34
- () => Ee(t)
35
- ), E = y ? Ee(s) : T, A = (U) => {
36
- y || w(U.currentTarget.value.length > 0), n == null || n(U);
32
+ ...y
33
+ } = n, g = s !== void 0, [C, w] = R(
34
+ () => ke(t)
35
+ ), k = g ? ke(s) : C, v = (K) => {
36
+ g || w(K.currentTarget.value.length > 0), r == null || r(K);
37
37
  };
38
- return /* @__PURE__ */ v("div", { className: `form-paragraph-container group ${d}`, children: [
39
- /* @__PURE__ */ h(
38
+ return /* @__PURE__ */ E("div", { className: `form-paragraph-container group ${d}`, children: [
39
+ /* @__PURE__ */ m(
40
40
  "textarea",
41
41
  {
42
42
  ref: e,
43
43
  name: i,
44
44
  id: c,
45
- className: `text-input text-area form-paragraph-textarea peer ${et(o)} ${E ? "has-value" : ""} ${g.placeholder ? "has-placeholder" : ""} ${m}`,
45
+ className: `text-input text-area form-paragraph-textarea peer ${tt(o)} ${k ? "has-value" : ""} ${y.placeholder ? "has-placeholder" : ""} ${h}`,
46
46
  required: u,
47
47
  defaultValue: t,
48
- ...y ? { value: s } : {},
49
- onChange: A,
48
+ ...g ? { value: s } : {},
49
+ onChange: v,
50
50
  disabled: l,
51
- ...g
51
+ ...y
52
52
  }
53
53
  ),
54
- /* @__PURE__ */ v(
54
+ /* @__PURE__ */ E(
55
55
  "label",
56
56
  {
57
57
  htmlFor: c,
58
- className: `text-input-label ${tt(o)} ${f}`,
58
+ className: `text-input-label ${st(o)} ${p}`,
59
59
  children: [
60
60
  a,
61
61
  u ? " *" : ""
62
62
  ]
63
63
  }
64
64
  ),
65
- !!p && /* @__PURE__ */ h(
65
+ !!f && /* @__PURE__ */ m(
66
66
  "p",
67
67
  {
68
- className: `text-input-helper-text ${st(o)} ${b}`,
69
- children: p
68
+ className: `text-input-helper-text ${nt(o)} ${b}`,
69
+ children: f
70
70
  }
71
71
  )
72
72
  ] });
73
- }), Es = (r) => {
74
- const { t: e } = k(), {
73
+ }), xs = (n) => {
74
+ const { t: e } = N(), {
75
75
  children: s,
76
76
  handleSubmit: t,
77
- onSubmit: n,
77
+ onSubmit: r,
78
78
  isLoading: o = !1,
79
79
  buttonEnd: i = !0,
80
80
  reset: c
81
- } = r;
82
- return /* @__PURE__ */ v("form", { className: "form-container", onSubmit: t(n), children: [
81
+ } = n;
82
+ return /* @__PURE__ */ E("form", { className: "form-container", onSubmit: t(r), children: [
83
83
  s,
84
- /* @__PURE__ */ v("div", { className: `form-actions ${i ? "end" : ""}`, children: [
85
- /* @__PURE__ */ v(
86
- H,
84
+ /* @__PURE__ */ E("div", { className: `form-actions ${i ? "end" : ""}`, children: [
85
+ /* @__PURE__ */ E(
86
+ q,
87
87
  {
88
88
  type: "submit",
89
89
  color: "primary",
@@ -92,8 +92,8 @@ const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
92
92
  name: e("_accessibility:buttons.submit"),
93
93
  "aria-label": e("_accessibility:ariaLabels.submit"),
94
94
  children: [
95
- o ? /* @__PURE__ */ h(
96
- re,
95
+ o ? /* @__PURE__ */ m(
96
+ ne,
97
97
  {
98
98
  color: "stroke-base",
99
99
  loaderClass: "!w-6 mt-1",
@@ -104,8 +104,8 @@ const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
104
104
  ]
105
105
  }
106
106
  ),
107
- /* @__PURE__ */ h(
108
- H,
107
+ /* @__PURE__ */ m(
108
+ q,
109
109
  {
110
110
  type: "button",
111
111
  variant: "outlined",
@@ -117,9 +117,9 @@ const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
117
117
  )
118
118
  ] })
119
119
  ] });
120
- }, ks = $e(function(r, e) {
121
- const { t: s } = k(), [t, n] = R(!1);
122
- return /* @__PURE__ */ h(rt, { ...r, type: t ? "text" : "password", ref: e, children: /* @__PURE__ */ h(
120
+ }, $s = $e(function(n, e) {
121
+ const { t: s } = N(), [t, r] = R(!1);
122
+ return /* @__PURE__ */ m(rt, { ...n, type: t ? "text" : "password", ref: e, children: /* @__PURE__ */ m(
123
123
  z,
124
124
  {
125
125
  type: "button",
@@ -128,63 +128,63 @@ const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
128
128
  t ? "_accessibility:ariaLabels.hidePassword" : "_accessibility:ariaLabels.showPassword"
129
129
  ),
130
130
  className: "password-icon",
131
- onClick: () => n(!t),
132
- icon: t ? mt : ht
131
+ onClick: () => r(!t),
132
+ icon: t ? ht : ft
133
133
  }
134
134
  ) });
135
- }), be = (r) => {
136
- const { t: e } = k(), {
135
+ }), ye = (n) => {
136
+ const { t: e } = N(), {
137
137
  title: s,
138
138
  children: t,
139
- handleClose: n,
139
+ handleClose: r,
140
140
  open: o = !1,
141
141
  containerClassName: i = "",
142
142
  className: c = "",
143
143
  animationClass: a = "appear"
144
- } = r, l = S(
144
+ } = n, l = S(
145
145
  (d) => {
146
- d.key === "Escape" && o && n();
146
+ d.key === "Escape" && o && r();
147
147
  },
148
- [o, n]
148
+ [o, r]
149
149
  );
150
150
  M(() => (window.addEventListener("keydown", l), () => {
151
151
  window.removeEventListener("keydown", l);
152
152
  }), [l]);
153
153
  const u = S(
154
154
  (d) => {
155
- d.target === d.currentTarget && n();
155
+ d.target === d.currentTarget && r();
156
156
  },
157
- [n]
157
+ [r]
158
158
  );
159
159
  return M(() => {
160
- const d = (m) => {
161
- m ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
160
+ const d = (h) => {
161
+ h ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
162
162
  };
163
163
  return d(o), () => {
164
164
  d(!1);
165
165
  };
166
- }, [o]), Ie(
167
- /* @__PURE__ */ h(
166
+ }, [o]), _e(
167
+ /* @__PURE__ */ m(
168
168
  "div",
169
169
  {
170
170
  "aria-label": e("_accessibility:ariaLabels.closeDialog"),
171
171
  "aria-hidden": !o,
172
172
  onClick: u,
173
173
  className: `dialog-backdrop animated ${o ? `opened ${a}` : "closed"} ${i}`,
174
- children: /* @__PURE__ */ v(
174
+ children: /* @__PURE__ */ E(
175
175
  "div",
176
176
  {
177
177
  className: `dialog elevated animated ${o ? `opened ${a}` : "closed"} ${c}`,
178
178
  children: [
179
- /* @__PURE__ */ v("div", { className: "dialog-header", children: [
180
- /* @__PURE__ */ h("h3", { className: "dialog-title", children: s }),
181
- /* @__PURE__ */ h(
179
+ /* @__PURE__ */ E("div", { className: "dialog-header", children: [
180
+ /* @__PURE__ */ m("h3", { className: "dialog-title", children: s }),
181
+ /* @__PURE__ */ m(
182
182
  z,
183
183
  {
184
- icon: De,
184
+ icon: Le,
185
185
  disabled: !o,
186
186
  "aria-disabled": !o,
187
- onClick: n,
187
+ onClick: r,
188
188
  variant: "text",
189
189
  color: "error",
190
190
  className: "icon-button dialog-close-btn",
@@ -201,12 +201,12 @@ const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
201
201
  ),
202
202
  document.body
203
203
  );
204
- }, ye = (r) => {
204
+ }, we = (n) => {
205
205
  const {
206
206
  primaryText: e,
207
207
  cancelText: s,
208
208
  onPrimaryClick: t,
209
- onCancel: n,
209
+ onCancel: r,
210
210
  isLoading: o = !1,
211
211
  disabled: i = !1,
212
212
  primaryType: c = "submit",
@@ -214,18 +214,18 @@ const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
214
214
  primaryClassName: l = "",
215
215
  alignEnd: u = !1,
216
216
  primaryName: d,
217
- primaryAriaLabel: m,
218
- cancelName: f,
219
- cancelAriaLabel: p,
217
+ primaryAriaLabel: h,
218
+ cancelName: p,
219
+ cancelAriaLabel: f,
220
220
  extraActions: b = []
221
- } = r;
222
- return /* @__PURE__ */ v(
221
+ } = n;
222
+ return /* @__PURE__ */ E(
223
223
  "div",
224
224
  {
225
225
  className: `dialog-actions ${u ? "end" : ""} ${a}`,
226
226
  children: [
227
- /* @__PURE__ */ v(
228
- H,
227
+ /* @__PURE__ */ E(
228
+ q,
229
229
  {
230
230
  type: c,
231
231
  color: "primary",
@@ -234,10 +234,10 @@ const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
234
234
  disabled: i,
235
235
  onClick: t,
236
236
  name: d,
237
- "aria-label": m,
237
+ "aria-label": h,
238
238
  children: [
239
- o ? /* @__PURE__ */ h(
240
- re,
239
+ o ? /* @__PURE__ */ m(
240
+ ne,
241
241
  {
242
242
  color: "stroke-base",
243
243
  loaderClass: "!w-6 mt-1",
@@ -248,37 +248,37 @@ const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
248
248
  ]
249
249
  }
250
250
  ),
251
- b == null ? void 0 : b.map((g) => /* @__PURE__ */ h(H, { ...g }, g.id)),
252
- /* @__PURE__ */ h(
253
- H,
251
+ b == null ? void 0 : b.map((y) => /* @__PURE__ */ m(q, { ...y }, y.id)),
252
+ /* @__PURE__ */ m(
253
+ q,
254
254
  {
255
255
  type: "button",
256
256
  variant: "outlined",
257
257
  disabled: i,
258
- onClick: n,
259
- name: f,
260
- "aria-label": p,
258
+ onClick: r,
259
+ name: p,
260
+ "aria-label": f,
261
261
  children: s
262
262
  }
263
263
  )
264
264
  ]
265
265
  }
266
266
  );
267
- }, Ns = (r) => {
268
- const { t: e } = k(), {
267
+ }, Ds = (n) => {
268
+ const { t: e } = N(), {
269
269
  children: s,
270
270
  handleSubmit: t,
271
- onSubmit: n,
271
+ onSubmit: r,
272
272
  handleClose: o,
273
273
  isLoading: i = !1,
274
274
  buttonEnd: c = !0,
275
275
  extraActions: a = [],
276
276
  ...l
277
- } = r;
278
- return /* @__PURE__ */ h(be, { ...l, handleClose: o, children: /* @__PURE__ */ v("form", { onSubmit: t(n), children: [
279
- /* @__PURE__ */ h("div", { className: "form-container", children: s }),
280
- /* @__PURE__ */ h(
281
- ye,
277
+ } = n;
278
+ return /* @__PURE__ */ m(ye, { ...l, handleClose: o, children: /* @__PURE__ */ E("form", { onSubmit: t(r), children: [
279
+ /* @__PURE__ */ m("div", { className: "form-container", children: s }),
280
+ /* @__PURE__ */ m(
281
+ we,
282
282
  {
283
283
  primaryType: "submit",
284
284
  primaryText: e("_accessibility:buttons.submit"),
@@ -296,24 +296,24 @@ const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
296
296
  }
297
297
  )
298
298
  ] }) });
299
- }, As = (r) => {
300
- const { t: e } = k(), {
299
+ }, Ls = (n) => {
300
+ const { t: e } = N(), {
301
301
  children: s,
302
302
  handleSubmit: t,
303
- handleClose: n,
303
+ handleClose: r,
304
304
  isLoading: o = !1,
305
305
  extraActions: i = [],
306
306
  ...c
307
- } = r;
308
- return /* @__PURE__ */ v(be, { ...c, handleClose: n, children: [
307
+ } = n;
308
+ return /* @__PURE__ */ E(ye, { ...c, handleClose: r, children: [
309
309
  s,
310
- /* @__PURE__ */ h(
311
- ye,
310
+ /* @__PURE__ */ m(
311
+ we,
312
312
  {
313
313
  primaryText: e("_accessibility:buttons.ok"),
314
314
  cancelText: e("_accessibility:buttons.cancel"),
315
315
  onPrimaryClick: t,
316
- onCancel: n,
316
+ onCancel: r,
317
317
  isLoading: o,
318
318
  disabled: o,
319
319
  primaryType: "button",
@@ -327,34 +327,34 @@ const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
327
327
  )
328
328
  ] });
329
329
  };
330
- function $t(r) {
331
- const { message: e, className: s = "" } = r, { t } = k();
332
- return /* @__PURE__ */ h("p", { className: `import-error-message ${s}`, children: e ?? t("_messages:errors.parseFile", {
330
+ function Dt(n) {
331
+ const { message: e, className: s = "" } = n, { t } = N();
332
+ return /* @__PURE__ */ m("p", { className: `import-error-message ${s}`, children: e ?? t("_messages:errors.parseFile", {
333
333
  defaultValue: "Failed to process file"
334
334
  }) });
335
335
  }
336
- function xt(r) {
337
- const { message: e, className: s = "" } = r, { t } = k();
338
- return /* @__PURE__ */ v("div", { className: `import-loading ${s}`, children: [
339
- /* @__PURE__ */ h(re, { loaderClass: "w-5 h-5", className: "!w-auto" }),
340
- /* @__PURE__ */ h("span", { children: e ?? t("_messages:loading.processingFile", {
336
+ function Lt(n) {
337
+ const { message: e, className: s = "" } = n, { t } = N();
338
+ return /* @__PURE__ */ E("div", { className: `import-loading ${s}`, children: [
339
+ /* @__PURE__ */ m(ne, { loaderClass: "w-5 h-5", className: "!w-auto" }),
340
+ /* @__PURE__ */ m("span", { children: e ?? t("_messages:loading.processingFile", {
341
341
  defaultValue: "Processing file..."
342
342
  }) })
343
343
  ] });
344
344
  }
345
- function Dt(r) {
346
- const { items: e, max: s = 5, className: t = "" } = r, { t: n } = k();
345
+ function Rt(n) {
346
+ const { items: e, max: s = 5, className: t = "" } = n, { t: r } = N();
347
347
  if (!e || e.length === 0) return null;
348
348
  const o = e.slice(0, s);
349
- return /* @__PURE__ */ v("div", { className: `import-preview ${t}`, children: [
350
- /* @__PURE__ */ h("p", { className: "import-preview-count", children: n("_pages:common.actions.import.previewCount", {
349
+ return /* @__PURE__ */ E("div", { className: `import-preview ${t}`, children: [
350
+ /* @__PURE__ */ m("p", { className: "import-preview-count", children: r("_pages:common.actions.import.previewCount", {
351
351
  count: e.length,
352
352
  defaultValue: `Preview: ${e.length} items`
353
353
  }) }),
354
- /* @__PURE__ */ h("pre", { className: "import-preview-content", children: JSON.stringify(o, null, 2) })
354
+ /* @__PURE__ */ m("pre", { className: "import-preview-content", children: JSON.stringify(o, null, 2) })
355
355
  ] });
356
356
  }
357
- const Me = () => ({
357
+ const Oe = () => ({
358
358
  file: null,
359
359
  previewItems: null,
360
360
  parseError: null,
@@ -362,43 +362,43 @@ const Me = () => ({
362
362
  overrideExisting: !1,
363
363
  inputKey: 0
364
364
  });
365
- function Lt(r, e) {
365
+ function It(n, e) {
366
366
  switch (e.type) {
367
367
  case "SET_FILE":
368
368
  return {
369
- ...r,
369
+ ...n,
370
370
  file: e.file,
371
371
  previewItems: null,
372
372
  parseError: null,
373
373
  processing: !1
374
374
  };
375
375
  case "START_PROCESSING":
376
- return { ...r, processing: !0 };
376
+ return { ...n, processing: !0 };
377
377
  case "SET_PREVIEW":
378
378
  return {
379
- ...r,
379
+ ...n,
380
380
  previewItems: e.items,
381
381
  parseError: null,
382
382
  processing: !1
383
383
  };
384
384
  case "SET_ERROR":
385
385
  return {
386
- ...r,
386
+ ...n,
387
387
  previewItems: null,
388
388
  parseError: e.message,
389
389
  processing: !1
390
390
  };
391
391
  case "SET_OVERRIDE":
392
- return { ...r, overrideExisting: e.value };
392
+ return { ...n, overrideExisting: e.value };
393
393
  case "RESET":
394
- return { ...Me(), inputKey: r.inputKey + 1 };
394
+ return { ...Oe(), inputKey: n.inputKey + 1 };
395
395
  }
396
396
  }
397
- const $s = (r) => {
398
- const { t: e } = k(), {
397
+ const Rs = (n) => {
398
+ const { t: e } = N(), {
399
399
  children: s,
400
400
  handleSubmit: t,
401
- handleClose: n,
401
+ handleClose: r,
402
402
  isLoading: o = !1,
403
403
  fileProcessor: i,
404
404
  onFileProcessed: c,
@@ -406,92 +406,92 @@ const $s = (r) => {
406
406
  onOverrideChange: l,
407
407
  open: u,
408
408
  extraActions: d = [],
409
- ...m
410
- } = r, [f, p] = xe(
411
- Lt,
412
- Me()
409
+ ...h
410
+ } = n, [p, f] = De(
411
+ It,
412
+ Oe()
413
413
  ), {
414
414
  file: b,
415
- previewItems: g,
416
- parseError: y,
417
- processing: T,
415
+ previewItems: y,
416
+ parseError: g,
417
+ processing: C,
418
418
  overrideExisting: w,
419
- inputKey: E
420
- } = f, A = F(c), U = F(i);
419
+ inputKey: k
420
+ } = p, v = U(c), K = U(i);
421
421
  M(() => {
422
- A.current = c;
422
+ v.current = c;
423
423
  }, [c]), M(() => {
424
- U.current = i;
424
+ K.current = i;
425
425
  }, [i]), M(() => {
426
- u || p({ type: "RESET" });
426
+ u || f({ type: "RESET" });
427
427
  }, [u]);
428
- const B = S(
429
- async (C, D) => {
428
+ const V = S(
429
+ async (T, D) => {
430
430
  var L;
431
- if (U.current) {
432
- p({ type: "START_PROCESSING" });
431
+ if (K.current) {
432
+ f({ type: "START_PROCESSING" });
433
433
  try {
434
- const _ = await U.current(C, { override: D });
435
- p({ type: "SET_PREVIEW", items: _ ?? [] }), (L = A.current) == null || L.call(A, _ ?? []);
434
+ const _ = await K.current(T, { override: D });
435
+ f({ type: "SET_PREVIEW", items: _ ?? [] }), (L = v.current) == null || L.call(v, _ ?? []);
436
436
  } catch (_) {
437
437
  console.error(_);
438
- const K = _ instanceof Error ? _.message : "Failed to parse file";
439
- p({ type: "SET_ERROR", message: K });
438
+ const j = _ instanceof Error ? _.message : "Failed to parse file";
439
+ f({ type: "SET_ERROR", message: j });
440
440
  }
441
441
  }
442
442
  },
443
443
  []
444
444
  );
445
- return /* @__PURE__ */ v(be, { ...m, open: u, handleClose: n, children: [
446
- /* @__PURE__ */ h(
447
- nt,
445
+ return /* @__PURE__ */ E(ye, { ...h, open: u, handleClose: r, children: [
446
+ /* @__PURE__ */ m(
447
+ ot,
448
448
  {
449
449
  onClear: () => {
450
- var C;
451
- p({ type: "SET_FILE", file: null }), (C = A.current) == null || C.call(A, []);
450
+ var T;
451
+ f({ type: "SET_FILE", file: null }), (T = v.current) == null || T.call(v, []);
452
452
  },
453
- onChange: (C) => {
453
+ onChange: (T) => {
454
454
  var L, _;
455
- const D = (L = C.target.files) == null ? void 0 : L[0];
455
+ const D = (L = T.target.files) == null ? void 0 : L[0];
456
456
  if (!D) {
457
- p({ type: "SET_FILE", file: null }), (_ = A.current) == null || _.call(A, []);
457
+ f({ type: "SET_FILE", file: null }), (_ = v.current) == null || _.call(v, []);
458
458
  return;
459
459
  }
460
- p({ type: "SET_FILE", file: D }), B(D, w);
460
+ f({ type: "SET_FILE", file: D }), V(D, w);
461
461
  },
462
462
  label: e("_accessibility:labels.file")
463
463
  },
464
- E
464
+ k
465
465
  ),
466
- /* @__PURE__ */ v("label", { className: "import-override-label", children: [
467
- /* @__PURE__ */ h(
466
+ /* @__PURE__ */ E("label", { className: "import-override-label", children: [
467
+ /* @__PURE__ */ m(
468
468
  "input",
469
469
  {
470
470
  type: "checkbox",
471
471
  checked: w,
472
- onChange: (C) => {
473
- const D = C.target.checked;
474
- p({ type: "SET_OVERRIDE", value: D }), l == null || l(D), b && B(b, D);
472
+ onChange: (T) => {
473
+ const D = T.target.checked;
474
+ f({ type: "SET_OVERRIDE", value: D }), l == null || l(D), b && V(b, D);
475
475
  }
476
476
  }
477
477
  ),
478
- /* @__PURE__ */ h("span", { children: e("_pages:common.actions.import.override", {
478
+ /* @__PURE__ */ m("span", { children: e("_pages:common.actions.import.override", {
479
479
  defaultValue: "Override existing items"
480
480
  }) })
481
481
  ] }),
482
- /* @__PURE__ */ h($t, { message: y }),
483
- T && /* @__PURE__ */ h(xt, {}),
484
- a ? a(g) : !!g && g.length > 0 && /* @__PURE__ */ h(Dt, { items: g }),
482
+ /* @__PURE__ */ m(Dt, { message: g }),
483
+ C && /* @__PURE__ */ m(Lt, {}),
484
+ a ? a(y) : !!y && y.length > 0 && /* @__PURE__ */ m(Rt, { items: y }),
485
485
  s,
486
- /* @__PURE__ */ h(
487
- ye,
486
+ /* @__PURE__ */ m(
487
+ we,
488
488
  {
489
489
  primaryText: e("_accessibility:buttons.ok"),
490
490
  cancelText: e("_accessibility:buttons.cancel"),
491
491
  onPrimaryClick: () => {
492
- (!i || !!g && g.length > 0) && t();
492
+ (!i || !!y && y.length > 0) && t();
493
493
  },
494
- onCancel: n,
494
+ onCancel: r,
495
495
  isLoading: o,
496
496
  primaryType: "button",
497
497
  containerClassName: "import-dialog-actions",
@@ -504,18 +504,18 @@ const $s = (r) => {
504
504
  )
505
505
  ] });
506
506
  };
507
- var O = /* @__PURE__ */ ((r) => (r[r.success = 0] = "success", r[r.error = 1] = "error", r[r.warning = 2] = "warning", r[r.info = 3] = "info", r))(O || {}), P = /* @__PURE__ */ ((r) => (r.GET = "GET", r.POST = "POST", r.PUT = "PUT", r.PATCH = "PATCH", r.DELETE = "DELETE", r))(P || {});
508
- const Rt = (r) => Array.isArray(r) || r instanceof Headers ? !1 : typeof r == "object" && r !== null && ("headers" in r || "credentials" in r), It = (r) => r ? Rt(r) ? r : { headers: r } : {}, _t = (r) => r ? r instanceof Headers ? Object.fromEntries(r.entries()) : Array.isArray(r) ? Object.fromEntries(r) : r : {};
509
- async function me(r, e = "GET", s, t) {
510
- const n = It(t), o = {
507
+ var O = /* @__PURE__ */ ((n) => (n[n.success = 0] = "success", n[n.error = 1] = "error", n[n.warning = 2] = "warning", n[n.info = 3] = "info", n))(O || {}), P = /* @__PURE__ */ ((n) => (n.GET = "GET", n.POST = "POST", n.PUT = "PUT", n.PATCH = "PATCH", n.DELETE = "DELETE", n))(P || {});
508
+ const _t = (n) => Array.isArray(n) || n instanceof Headers ? !1 : typeof n == "object" && n !== null && ("headers" in n || "credentials" in n), Pt = (n) => n ? _t(n) ? n : { headers: n } : {}, Mt = (n) => n ? n instanceof Headers ? Object.fromEntries(n.entries()) : Array.isArray(n) ? Object.fromEntries(n) : n : {};
509
+ async function he(n, e = "GET", s, t) {
510
+ const r = Pt(t), o = {
511
511
  ...s !== void 0 ? { "Content-Type": "application/json" } : {},
512
- ..._t(n.headers)
512
+ ...Mt(r.headers)
513
513
  };
514
514
  try {
515
- const i = await fetch(r, {
515
+ const i = await fetch(n, {
516
516
  method: e,
517
517
  headers: o,
518
- ...n.credentials ? { credentials: n.credentials } : {},
518
+ ...r.credentials ? { credentials: r.credentials } : {},
519
519
  ...s !== void 0 ? { body: JSON.stringify(s) } : {}
520
520
  }), c = await i.text();
521
521
  let a = null;
@@ -551,44 +551,44 @@ async function me(r, e = "GET", s, t) {
551
551
  };
552
552
  }
553
553
  }
554
- function Pt(r, e) {
554
+ function Ot(n, e) {
555
555
  const s = (t) => t instanceof Date ? t.toISOString() : String(t);
556
556
  if (e) {
557
- const t = Object.entries(e).filter(([, n]) => n != null).map(
558
- ([n, o]) => `${encodeURIComponent(n)}=${encodeURIComponent(s(o))}`
557
+ const t = Object.entries(e).filter(([, r]) => r != null).map(
558
+ ([r, o]) => `${encodeURIComponent(r)}=${encodeURIComponent(s(o))}`
559
559
  ).join("&");
560
- return t ? `${r}?${t}` : r;
560
+ return t ? `${n}?${t}` : n;
561
561
  }
562
- return r;
562
+ return n;
563
563
  }
564
- const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Date ? encodeURIComponent(r.toISOString()) : encodeURIComponent(String(r)), Mt = (r) => {
565
- if (typeof r != "string") return;
566
- const e = r.trim().toUpperCase();
564
+ const fe = (n) => typeof n == "object" && n !== null, G = (n) => n instanceof Date ? encodeURIComponent(n.toISOString()) : encodeURIComponent(String(n)), Ft = (n) => {
565
+ if (typeof n != "string") return;
566
+ const e = n.trim().toUpperCase();
567
567
  if (e === "ACTIVE" || e === "DELETED" || e === "ALL")
568
568
  return e;
569
- }, Oe = (r, e, s) => {
569
+ }, Fe = (n, e, s) => {
570
570
  const t = [];
571
571
  if (e) {
572
- const { sortingBy: n, sortingOrder: o, currentPage: i, pageSize: c } = e;
573
- n !== void 0 && t.push(`sort=${String(n)}`), o !== void 0 && t.push(`order=${o}`), i !== void 0 && t.push(`page=${i}`), c !== void 0 && t.push(`pageSize=${c}`);
572
+ const { sortingBy: r, sortingOrder: o, currentPage: i, pageSize: c } = e;
573
+ r !== void 0 && t.push(`sort=${String(r)}`), o !== void 0 && t.push(`order=${o}`), i !== void 0 && t.push(`page=${i}`), c !== void 0 && t.push(`pageSize=${c}`);
574
574
  }
575
575
  if (s) {
576
- const n = Mt(s.softDeleteScope);
577
- n && t.push(`softDeleteScope=${encodeURIComponent(n)}`);
576
+ const r = Ft(s.softDeleteScope);
577
+ r && t.push(`softDeleteScope=${encodeURIComponent(r)}`);
578
578
  const o = Object.entries(s).filter(
579
579
  ([i, c]) => i !== "softDeleteScope" && c !== null && c !== void 0 && c !== ""
580
580
  ).flatMap(([i, c]) => {
581
581
  if (Array.isArray(c))
582
- return c.map((a) => a instanceof Date ? `${i}==${W(a)}` : he(a) ? `${i}==${W(a.id ?? "")}` : `${i}==${W(a)}`);
583
- if (he(c) && "start" in c && "end" in c) {
582
+ return c.map((a) => a instanceof Date ? `${i}==${G(a)}` : fe(a) ? `${i}==${G(a.id ?? "")}` : `${i}==${G(a)}`);
583
+ if (fe(c) && "start" in c && "end" in c) {
584
584
  const a = [];
585
- return c.start != null && c.start !== "" && a.push(`${i}>=${W(c.start)}`), c.end != null && c.end !== "" && a.push(`${i}<=${W(c.end)}`), a;
585
+ return c.start != null && c.start !== "" && a.push(`${i}>=${G(c.start)}`), c.end != null && c.end !== "" && a.push(`${i}<=${G(c.end)}`), a;
586
586
  }
587
- return c instanceof Date ? `${i}==${W(c)}` : he(c) ? `${i}==${W(c.id ?? "")}` : `${i}==${W(c)}`;
587
+ return c instanceof Date ? `${i}==${G(c)}` : fe(c) ? `${i}==${G(c.id ?? "")}` : `${i}==${G(c)}`;
588
588
  });
589
589
  o.length > 0 && t.push(`filters=${o.join(",")}`);
590
590
  }
591
- return t.length ? `${r}?${t.join("&")}` : r;
591
+ return t.length ? `${n}?${t.join("&")}` : n;
592
592
  }, se = class se {
593
593
  /**
594
594
  * @param baseUrl the base url of the server
@@ -596,21 +596,21 @@ const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Da
596
596
  * @param secured if the api client requires token
597
597
  * @param tokenAcquirer custom token acquirer
598
598
  */
599
- constructor(e, s = "user", t = !0, n, o = {}) {
600
- N(this, "baseUrl");
601
- N(this, "userKey");
602
- N(this, "rememberKey");
603
- N(this, "refreshTokenKey");
604
- N(this, "accessTokenExpiresAtKey");
605
- N(this, "refreshEndpoint");
606
- N(this, "refreshExpirySkewMs");
607
- N(this, "secured");
608
- N(this, "tokenAcquirer");
609
- this.baseUrl = e, this.secured = t, this.userKey = s, this.rememberKey = o.rememberKey ?? "remember", this.refreshTokenKey = o.refreshTokenKey ?? "refreshToken", this.accessTokenExpiresAtKey = o.accessTokenExpiresAtKey ?? "accessTokenExpiresAt", this.refreshEndpoint = o.refreshEndpoint ?? "auth/refresh", this.refreshExpirySkewMs = o.refreshExpirySkewMs ?? 5e3, this.tokenAcquirer = n ?? this.defaultTokenAcquirer;
599
+ constructor(e, s = "user", t = !0, r, o = {}) {
600
+ A(this, "baseUrl");
601
+ A(this, "userKey");
602
+ A(this, "rememberKey");
603
+ A(this, "refreshTokenKey");
604
+ A(this, "accessTokenExpiresAtKey");
605
+ A(this, "refreshEndpoint");
606
+ A(this, "refreshExpirySkewMs");
607
+ A(this, "secured");
608
+ A(this, "tokenAcquirer");
609
+ this.baseUrl = e, this.secured = t, this.userKey = s, this.rememberKey = o.rememberKey ?? "remember", this.refreshTokenKey = o.refreshTokenKey ?? "refreshToken", this.accessTokenExpiresAtKey = o.accessTokenExpiresAtKey ?? "accessTokenExpiresAt", this.refreshEndpoint = o.refreshEndpoint ?? "auth/refresh", this.refreshExpirySkewMs = o.refreshExpirySkewMs ?? 5e3, this.tokenAcquirer = r ?? this.defaultTokenAcquirer;
610
610
  }
611
611
  defaultTokenAcquirer(e) {
612
612
  if (e) return { credentials: "include" };
613
- const s = G(this.userKey);
613
+ const s = W(this.userKey);
614
614
  if (s && s.length) return { Authorization: `Bearer ${s}` };
615
615
  }
616
616
  getRefreshLockKey() {
@@ -621,12 +621,12 @@ const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Da
621
621
  return `${s}${t}`;
622
622
  }
623
623
  getRefreshToken() {
624
- const e = G(this.refreshTokenKey);
624
+ const e = W(this.refreshTokenKey);
625
625
  if (typeof e == "string" && e.length)
626
626
  return e;
627
627
  }
628
628
  getAccessTokenExpiresAt() {
629
- const e = G(this.accessTokenExpiresAtKey);
629
+ const e = W(this.accessTokenExpiresAtKey);
630
630
  if (typeof e == "string" && e.length)
631
631
  return e;
632
632
  }
@@ -643,9 +643,9 @@ const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Da
643
643
  I(this.userKey), I(this.rememberKey), I(this.refreshTokenKey), I(this.accessTokenExpiresAtKey);
644
644
  }
645
645
  storeSession(e, s) {
646
- Q(this.userKey, e.token);
646
+ H(this.userKey, e.token);
647
647
  const t = e.refreshToken === void 0 ? s : e.refreshToken;
648
- typeof t == "string" && t.length ? Q(this.refreshTokenKey, t) : I(this.refreshTokenKey), typeof e.accessTokenExpiresAt == "string" && e.accessTokenExpiresAt.length ? Q(this.accessTokenExpiresAtKey, e.accessTokenExpiresAt) : I(this.accessTokenExpiresAtKey);
648
+ typeof t == "string" && t.length ? H(this.refreshTokenKey, t) : I(this.refreshTokenKey), typeof e.accessTokenExpiresAt == "string" && e.accessTokenExpiresAt.length ? H(this.accessTokenExpiresAtKey, e.accessTokenExpiresAt) : I(this.accessTokenExpiresAtKey);
649
649
  }
650
650
  async refreshAccessTokenWithMutex() {
651
651
  const e = this.getRefreshToken();
@@ -659,8 +659,8 @@ const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Da
659
659
  await t;
660
660
  return;
661
661
  }
662
- const n = (async () => {
663
- const { data: o, status: i, error: c } = await me(
662
+ const r = (async () => {
663
+ const { data: o, status: i, error: c } = await he(
664
664
  this.buildUrl(this.refreshEndpoint),
665
665
  P.POST,
666
666
  { refreshToken: e }
@@ -672,9 +672,9 @@ const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Da
672
672
  };
673
673
  this.storeSession(o, e);
674
674
  })();
675
- se.refreshInFlight.set(s, n);
675
+ se.refreshInFlight.set(s, r);
676
676
  try {
677
- await n;
677
+ await r;
678
678
  } finally {
679
679
  se.refreshInFlight.delete(s);
680
680
  }
@@ -689,30 +689,30 @@ const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Da
689
689
  return e ? e instanceof Headers ? Object.fromEntries(e.entries()) : Array.isArray(e) ? Object.fromEntries(e) : e : {};
690
690
  }
691
691
  mergeRequestConfig(e) {
692
- const s = this.secured ? this.tokenAcquirer() : void 0, t = this.toRequestOptions(s), n = this.toRequestOptions(e), o = {
692
+ const s = this.secured ? this.tokenAcquirer() : void 0, t = this.toRequestOptions(s), r = this.toRequestOptions(e), o = {
693
693
  ...this.toHeaderRecord(t.headers),
694
- ...this.toHeaderRecord(n.headers)
695
- }, i = n.credentials ?? t.credentials, c = Object.keys(o).length > 0;
694
+ ...this.toHeaderRecord(r.headers)
695
+ }, i = r.credentials ?? t.credentials, c = Object.keys(o).length > 0;
696
696
  if (i)
697
697
  return c ? { headers: o, credentials: i } : { credentials: i };
698
698
  if (c) return o;
699
699
  }
700
- async makeRequestWithRefresh(e, s, t, n) {
700
+ async makeRequestWithRefresh(e, s, t, r) {
701
701
  this.secured && this.shouldRefreshBeforeRequest() && await this.refreshAccessTokenWithMutex();
702
- let o = await me(
702
+ let o = await he(
703
703
  this.buildUrl(e),
704
704
  s,
705
705
  t,
706
- this.mergeRequestConfig(n)
706
+ this.mergeRequestConfig(r)
707
707
  );
708
- return this.secured && o.status === 401 && this.canRefresh() && (await this.refreshAccessTokenWithMutex(), o = await me(
708
+ return this.secured && o.status === 401 && this.canRefresh() && (await this.refreshAccessTokenWithMutex(), o = await he(
709
709
  this.buildUrl(e),
710
710
  s,
711
711
  t,
712
- this.mergeRequestConfig(n)
712
+ this.mergeRequestConfig(r)
713
713
  )), o;
714
714
  }
715
- async doQuery(e, s = P.GET, t, n) {
715
+ async doQuery(e, s = P.GET, t, r) {
716
716
  const {
717
717
  data: o,
718
718
  status: i,
@@ -721,7 +721,7 @@ const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Da
721
721
  e,
722
722
  s,
723
723
  t,
724
- n
724
+ r
725
725
  );
726
726
  if (c || i < 200 || i >= 300)
727
727
  throw c ?? {
@@ -737,12 +737,12 @@ const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Da
737
737
  * @returns Result list
738
738
  */
739
739
  async get(e, s, t) {
740
- const n = Oe(e, s, t), {
740
+ const r = Fe(e, s, t), {
741
741
  data: o,
742
742
  error: i,
743
743
  status: c
744
744
  } = await this.makeRequestWithRefresh(
745
- n,
745
+ r,
746
746
  P.GET
747
747
  );
748
748
  if (i || c < 200 || c >= 300 || !o)
@@ -761,19 +761,19 @@ const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Da
761
761
  async patch(e, s) {
762
762
  const {
763
763
  error: t,
764
- data: n,
764
+ data: r,
765
765
  status: o
766
766
  } = await this.makeRequestWithRefresh(
767
767
  e,
768
768
  P.PATCH,
769
769
  s
770
770
  );
771
- if (t || n === null || n === void 0)
771
+ if (t || r === null || r === void 0)
772
772
  throw t ?? {
773
773
  status: o,
774
774
  message: "Unknown error"
775
775
  };
776
- return n;
776
+ return r;
777
777
  }
778
778
  /**
779
779
  * @param endpoint - backend endpoint
@@ -783,19 +783,19 @@ const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Da
783
783
  async delete(e, s) {
784
784
  const {
785
785
  error: t,
786
- data: n,
786
+ data: r,
787
787
  status: o
788
788
  } = await this.makeRequestWithRefresh(
789
789
  e,
790
790
  P.DELETE,
791
791
  s
792
792
  );
793
- if (t || n === null || n === void 0)
793
+ if (t || r === null || r === void 0)
794
794
  throw t ?? {
795
795
  status: o,
796
796
  message: "Unknown error"
797
797
  };
798
- return n;
798
+ return r;
799
799
  }
800
800
  /**
801
801
  *
@@ -806,26 +806,31 @@ const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Da
806
806
  async post(e, s) {
807
807
  const {
808
808
  error: t,
809
- data: n,
809
+ data: r,
810
810
  status: o
811
811
  } = await this.makeRequestWithRefresh(
812
812
  e,
813
813
  P.POST,
814
814
  s
815
815
  );
816
- if (t || n === null || n === void 0)
816
+ if (t || r === null || r === void 0)
817
817
  throw t ?? {
818
818
  status: o,
819
819
  message: "Unknown error"
820
820
  };
821
- return n;
821
+ return r;
822
822
  }
823
823
  };
824
- N(se, "refreshInFlight", /* @__PURE__ */ new Map());
824
+ A(se, "refreshInFlight", /* @__PURE__ */ new Map());
825
825
  let de = se;
826
- class Ot {
826
+ class Ut {
827
+ /**
828
+ * @param baseUrl - API base URL.
829
+ * @param userKey - Storage key for user session data.
830
+ * @param authConfig - Custom auth storage key configuration.
831
+ */
827
832
  constructor(e, s = "user", t = {}) {
828
- N(this, "api");
833
+ A(this, "api");
829
834
  this.api = new de(e, s, !1, void 0, t);
830
835
  }
831
836
  async login(e) {
@@ -846,11 +851,11 @@ class Ot {
846
851
  async logout(e) {
847
852
  const s = "auth/sign-out", t = e != null && e.accessToken ? {
848
853
  Authorization: `Bearer ${e.accessToken}`
849
- } : void 0, n = e != null && e.refreshToken ? { refreshToken: e.refreshToken } : void 0;
854
+ } : void 0, r = e != null && e.refreshToken ? { refreshToken: e.refreshToken } : void 0;
850
855
  return await this.api.doQuery(
851
856
  s,
852
857
  P.POST,
853
- n,
858
+ r,
854
859
  t
855
860
  );
856
861
  }
@@ -870,10 +875,15 @@ class Ot {
870
875
  );
871
876
  }
872
877
  }
873
- class xs {
878
+ class Is {
879
+ /**
880
+ * @param baseUrl - API base URL.
881
+ * @param userKey - Storage key for user session data.
882
+ * @param authConfig - Custom auth storage key configuration.
883
+ */
874
884
  constructor(e, s, t = {}) {
875
- N(this, "auth");
876
- this.auth = new Ot(e, s, t);
885
+ A(this, "auth");
886
+ this.auth = new Ut(e, s, t);
877
887
  }
878
888
  /**
879
889
  * @returns auth
@@ -882,17 +892,19 @@ class xs {
882
892
  return this.auth;
883
893
  }
884
894
  }
885
- class Ds {
895
+ class _s {
886
896
  /**
887
- *
888
- * @param table
889
- * @param secured to see if the api client requires jwt protection
897
+ * @param table - Resource table/endpoint name.
898
+ * @param baseUrl - API base URL.
899
+ * @param userKey - Storage key for user session data.
900
+ * @param secured - Whether this client requires auth headers.
901
+ * @param authConfig - Custom auth storage key configuration.
890
902
  */
891
- constructor(e, s, t = "user", n = !0, o = {}) {
892
- N(this, "table");
893
- N(this, "secured");
894
- N(this, "api");
895
- this.table = e, this.secured = n, this.api = new de(s, t, n, void 0, o);
903
+ constructor(e, s, t = "user", r = !0, o = {}) {
904
+ A(this, "table");
905
+ A(this, "secured");
906
+ A(this, "api");
907
+ this.table = e, this.secured = r, this.api = new de(s, t, r, void 0, o);
896
908
  }
897
909
  /**
898
910
  *
@@ -940,7 +952,7 @@ class Ds {
940
952
  * @returns - List of elements
941
953
  */
942
954
  async export(e) {
943
- const s = Oe(
955
+ const s = Fe(
944
956
  `${this.table}/export`,
945
957
  void 0,
946
958
  e
@@ -966,7 +978,7 @@ class Ds {
966
978
  */
967
979
  async commonGet(e) {
968
980
  return await this.api.doQuery(
969
- Pt(`${this.table}/common`, e),
981
+ Ot(`${this.table}/common`, e),
970
982
  P.GET
971
983
  );
972
984
  }
@@ -985,12 +997,17 @@ class Ds {
985
997
  return await this.api.patch(`${this.table}/restore`, e);
986
998
  }
987
999
  }
988
- class Ls {
1000
+ class Ps {
1001
+ /**
1002
+ * @param table - Object store name.
1003
+ * @param dbName - IndexedDB database name.
1004
+ * @param version - IndexedDB schema version.
1005
+ */
989
1006
  constructor(e, s, t = 1) {
990
- N(this, "table");
991
- N(this, "dbName");
992
- N(this, "version");
993
- N(this, "db", null);
1007
+ A(this, "table");
1008
+ A(this, "dbName");
1009
+ A(this, "version");
1010
+ A(this, "db", null);
994
1011
  this.table = e, this.dbName = s, this.version = t;
995
1012
  }
996
1013
  close() {
@@ -999,18 +1016,18 @@ class Ls {
999
1016
  open() {
1000
1017
  return this.db ? Promise.resolve(this.db) : new Promise((e, s) => {
1001
1018
  const t = indexedDB.open(this.dbName, this.version);
1002
- t.onupgradeneeded = (n) => {
1003
- const o = n.target.result;
1019
+ t.onupgradeneeded = (r) => {
1020
+ const o = r.target.result;
1004
1021
  o.objectStoreNames.contains(this.table) || o.createObjectStore(this.table, {
1005
1022
  keyPath: "id",
1006
1023
  autoIncrement: !0
1007
1024
  });
1008
- }, t.onsuccess = (n) => {
1009
- this.db = n.target.result, this.db.onversionchange = () => {
1025
+ }, t.onsuccess = (r) => {
1026
+ this.db = r.target.result, this.db.onversionchange = () => {
1010
1027
  this.close();
1011
1028
  }, e(this.db);
1012
- }, t.onerror = (n) => {
1013
- s(n.target.error);
1029
+ }, t.onerror = (r) => {
1030
+ s(r.target.error);
1014
1031
  };
1015
1032
  });
1016
1033
  }
@@ -1029,25 +1046,25 @@ class Ls {
1029
1046
  async insertMany(e) {
1030
1047
  const s = await this.transaction("readwrite");
1031
1048
  let t = 0;
1032
- for (const n of e)
1033
- t = await this.request(s.add(n));
1049
+ for (const r of e)
1050
+ t = await this.request(s.add(r));
1034
1051
  return { ...e[e.length - 1], id: t };
1035
1052
  }
1036
1053
  async update(e, s) {
1037
1054
  const t = typeof e == "number" ? s : e;
1038
1055
  if (!t)
1039
1056
  throw new Error("IndexedDBClient.update requires a value payload");
1040
- const n = typeof e == "number" ? { ...t, id: t.id ?? e } : t, o = await this.transaction("readwrite");
1041
- return await this.request(o.put(n)), n;
1057
+ const r = typeof e == "number" ? { ...t, id: t.id ?? e } : t, o = await this.transaction("readwrite");
1058
+ return await this.request(o.put(r)), r;
1042
1059
  }
1043
1060
  async get(e, s) {
1044
- var f;
1045
- const t = await this.transaction("readonly"), n = await this.request(t.getAll()), o = this.applyFilter(n, s), i = (e == null ? void 0 : e.sortingBy) ?? "id", c = ((f = e == null ? void 0 : e.sortingOrder) == null ? void 0 : f.toLowerCase()) ?? "asc";
1046
- o.sort((p, b) => {
1047
- const g = p[i], y = b[i];
1048
- return g < y ? c === "asc" ? -1 : 1 : g > y ? c === "asc" ? 1 : -1 : 0;
1061
+ var p;
1062
+ const t = await this.transaction("readonly"), r = await this.request(t.getAll()), o = this.applyFilter(r, s), i = (e == null ? void 0 : e.sortingBy) ?? "id", c = ((p = e == null ? void 0 : e.sortingOrder) == null ? void 0 : p.toLowerCase()) ?? "asc";
1063
+ o.sort((f, b) => {
1064
+ const y = f[i], g = b[i];
1065
+ return y < g ? c === "asc" ? -1 : 1 : y > g ? c === "asc" ? 1 : -1 : 0;
1049
1066
  });
1050
- const a = (e == null ? void 0 : e.pageSize) ?? 10, l = (e == null ? void 0 : e.currentPage) ?? 0, u = o.length, d = Math.ceil(u / a), m = o.slice(
1067
+ const a = (e == null ? void 0 : e.pageSize) ?? 10, l = (e == null ? void 0 : e.currentPage) ?? 0, u = o.length, d = Math.ceil(u / a), h = o.slice(
1051
1068
  l * a,
1052
1069
  l * a + a
1053
1070
  );
@@ -1058,7 +1075,7 @@ class Ls {
1058
1075
  pageSize: a,
1059
1076
  totalElements: u,
1060
1077
  totalPages: d,
1061
- items: m
1078
+ items: h
1062
1079
  };
1063
1080
  }
1064
1081
  async export(e) {
@@ -1068,8 +1085,8 @@ class Ls {
1068
1085
  async import(e) {
1069
1086
  const s = await this.transaction("readwrite");
1070
1087
  let t = 0;
1071
- for (const n of e.items)
1072
- e.override ? await this.request(s.put(n)) : await this.request(s.add(n)), t++;
1088
+ for (const r of e.items)
1089
+ e.override ? await this.request(s.put(r)) : await this.request(s.add(r)), t++;
1073
1090
  return t;
1074
1091
  }
1075
1092
  async commonGet(e) {
@@ -1084,8 +1101,8 @@ class Ls {
1084
1101
  async softDelete(e) {
1085
1102
  const s = await this.transaction("readwrite");
1086
1103
  let t = 0;
1087
- for (const n of e) {
1088
- const o = await this.request(s.get(n));
1104
+ for (const r of e) {
1105
+ const o = await this.request(s.get(r));
1089
1106
  o && (await this.request(s.put({ ...o, deletedAt: /* @__PURE__ */ new Date() })), t++);
1090
1107
  }
1091
1108
  return t;
@@ -1093,15 +1110,15 @@ class Ls {
1093
1110
  async restore(e) {
1094
1111
  const s = await this.transaction("readwrite");
1095
1112
  let t = 0;
1096
- for (const n of e) {
1097
- const o = await this.request(s.get(n));
1113
+ for (const r of e) {
1114
+ const o = await this.request(s.get(r));
1098
1115
  o && (await this.request(s.put({ ...o, deletedAt: null })), t++);
1099
1116
  }
1100
1117
  return t;
1101
1118
  }
1102
1119
  applyFilter(e, s) {
1103
1120
  if (!s) return e;
1104
- const t = this.resolveSoftDeleteScope(s.softDeleteScope), n = t === void 0 ? e : e.filter(
1121
+ const t = this.resolveSoftDeleteScope(s.softDeleteScope), r = t === void 0 ? e : e.filter(
1105
1122
  (i) => this.matchesSoftDeleteScope(
1106
1123
  t,
1107
1124
  i.deletedAt
@@ -1109,7 +1126,7 @@ class Ls {
1109
1126
  ), o = Object.entries(s).filter(
1110
1127
  ([i, c]) => i !== "softDeleteScope" && c !== void 0
1111
1128
  );
1112
- return o.length === 0 ? n : n.filter(
1129
+ return o.length === 0 ? r : r.filter(
1113
1130
  (i) => o.every(
1114
1131
  ([c, a]) => this.matchesFilterValue(
1115
1132
  a,
@@ -1143,34 +1160,39 @@ class Ls {
1143
1160
  return e === "DELETED" ? t : !t;
1144
1161
  }
1145
1162
  }
1146
- const ge = (r) => typeof r == "object" && r !== null, Ft = (r) => ge(r) ? "start" in r || "end" in r : !1, Ut = (r) => r !== void 0, ie = (r) => r instanceof Date ? r.toISOString() : r, Kt = (r) => {
1147
- if (typeof r != "string") return;
1148
- const e = r.trim().toUpperCase();
1163
+ const be = (n) => typeof n == "object" && n !== null, Kt = (n) => be(n) ? "start" in n || "end" in n : !1, jt = (n) => n !== void 0, ae = (n) => n instanceof Date ? n.toISOString() : n, Qt = (n) => {
1164
+ if (typeof n != "string") return;
1165
+ const e = n.trim().toUpperCase();
1149
1166
  if (e === "ACTIVE") return "ACTIVE";
1150
1167
  if (e === "DELETED") return "DELETED";
1151
1168
  if (e === "ALL") return "ALL";
1152
1169
  };
1153
- class Rs {
1170
+ class Ms {
1171
+ /**
1172
+ * @param table - Resource table name.
1173
+ * @param supabase - Supabase client with `from` capability.
1174
+ * @param options - Mapping and column configuration options.
1175
+ */
1154
1176
  constructor(e, s, t = {}) {
1155
- N(this, "table");
1156
- N(this, "supabase");
1157
- N(this, "idColumn");
1158
- N(this, "deletedAtColumn");
1159
- N(this, "defaultSortColumn");
1160
- N(this, "options");
1177
+ A(this, "table");
1178
+ A(this, "supabase");
1179
+ A(this, "idColumn");
1180
+ A(this, "deletedAtColumn");
1181
+ A(this, "defaultSortColumn");
1182
+ A(this, "options");
1161
1183
  this.table = e, this.supabase = s, this.options = t, this.idColumn = t.idColumn ?? "id", this.deletedAtColumn = t.deletedAtColumn ?? "deletedAt", this.defaultSortColumn = t.defaultSortColumn ?? this.idColumn;
1162
1184
  }
1163
1185
  resolveStatus(e) {
1164
1186
  return typeof e == "number" && Number.isFinite(e) ? e : 500;
1165
1187
  }
1166
- throwHttpError(e, s, t, n = "Unknown error") {
1188
+ throwHttpError(e, s, t, r = "Unknown error") {
1167
1189
  throw {
1168
1190
  status: this.resolveStatus(s),
1169
- message: (e == null ? void 0 : e.message) || t || n
1191
+ message: (e == null ? void 0 : e.message) || t || r
1170
1192
  };
1171
1193
  }
1172
- assertNoError(e, s, t, n) {
1173
- e && this.throwHttpError(e, s, t, n);
1194
+ assertNoError(e, s, t, r) {
1195
+ e && this.throwHttpError(e, s, t, r);
1174
1196
  }
1175
1197
  toDto(e) {
1176
1198
  return this.options.mapRowToDto ? this.options.mapRowToDto(e) : e;
@@ -1188,28 +1210,28 @@ class Rs {
1188
1210
  return this.options.mapImportPreviewToRow ? this.options.mapImportPreviewToRow(e) : e;
1189
1211
  }
1190
1212
  resolveObjectFilterValue(e) {
1191
- return "id" in e ? ie(e.id) : "";
1213
+ return "id" in e ? ae(e.id) : "";
1192
1214
  }
1193
1215
  applyFilters(e, s) {
1194
1216
  if (!s) return e;
1195
1217
  let t = e;
1196
- const n = Kt(s.softDeleteScope);
1197
- return n === "ACTIVE" ? t = t.is(this.deletedAtColumn, null) : n === "DELETED" && (t = t.not(this.deletedAtColumn, "is", null)), Object.entries(s).forEach(([o, i]) => {
1218
+ const r = Qt(s.softDeleteScope);
1219
+ return r === "ACTIVE" ? t = t.is(this.deletedAtColumn, null) : r === "DELETED" && (t = t.not(this.deletedAtColumn, "is", null)), Object.entries(s).forEach(([o, i]) => {
1198
1220
  if (o === "softDeleteScope" || i === void 0 || i === null || i === "")
1199
1221
  return;
1200
1222
  const c = o === "deletedAt" ? this.deletedAtColumn : o;
1201
1223
  if (Array.isArray(i)) {
1202
- const a = i.map((l) => l instanceof Date ? l.toISOString() : ge(l) ? this.resolveObjectFilterValue(l) : ie(l)).filter(Ut);
1224
+ const a = i.map((l) => l instanceof Date ? l.toISOString() : be(l) ? this.resolveObjectFilterValue(l) : ae(l)).filter(jt);
1203
1225
  a.length > 0 && (t = t.in(c, a));
1204
1226
  return;
1205
1227
  }
1206
- if (Ft(i)) {
1228
+ if (Kt(i)) {
1207
1229
  i.start !== void 0 && i.start !== "" && (t = t.gte(
1208
1230
  c,
1209
- ie(i.start)
1231
+ ae(i.start)
1210
1232
  )), i.end !== void 0 && i.end !== "" && (t = t.lte(
1211
1233
  c,
1212
- ie(i.end)
1234
+ ae(i.end)
1213
1235
  ));
1214
1236
  return;
1215
1237
  }
@@ -1217,7 +1239,7 @@ class Rs {
1217
1239
  t = t.eq(c, i.toISOString());
1218
1240
  return;
1219
1241
  }
1220
- if (ge(i)) {
1242
+ if (be(i)) {
1221
1243
  t = t.eq(
1222
1244
  c,
1223
1245
  this.resolveObjectFilterValue(i)
@@ -1226,7 +1248,7 @@ class Rs {
1226
1248
  }
1227
1249
  t = t.eq(
1228
1250
  c,
1229
- ie(i)
1251
+ ae(i)
1230
1252
  );
1231
1253
  }), t;
1232
1254
  }
@@ -1254,13 +1276,13 @@ class Rs {
1254
1276
  t.statusText,
1255
1277
  "Unable to insert many rows"
1256
1278
  );
1257
- const n = (o = t.data) == null ? void 0 : o.at(-1);
1258
- return n || this.throwHttpError(
1279
+ const r = (o = t.data) == null ? void 0 : o.at(-1);
1280
+ return r || this.throwHttpError(
1259
1281
  null,
1260
1282
  t.status,
1261
1283
  t.statusText,
1262
1284
  "Unable to insert many rows"
1263
- ), this.toDto(n);
1285
+ ), this.toDto(r);
1264
1286
  }
1265
1287
  async update(e) {
1266
1288
  const s = {
@@ -1279,7 +1301,7 @@ class Rs {
1279
1301
  ), this.toDto(t.data);
1280
1302
  }
1281
1303
  async get(e, s) {
1282
- const t = (e == null ? void 0 : e.pageSize) ?? 10, n = (e == null ? void 0 : e.currentPage) ?? 0, o = String((e == null ? void 0 : e.sortingBy) ?? this.defaultSortColumn), i = String((e == null ? void 0 : e.sortingOrder) ?? "asc").toLowerCase() === "desc" ? "desc" : "asc", c = n * t, a = c + t - 1;
1304
+ const t = (e == null ? void 0 : e.pageSize) ?? 10, r = (e == null ? void 0 : e.currentPage) ?? 0, o = String((e == null ? void 0 : e.sortingBy) ?? this.defaultSortColumn), i = String((e == null ? void 0 : e.sortingOrder) ?? "asc").toLowerCase() === "desc" ? "desc" : "asc", c = r * t, a = c + t - 1;
1283
1305
  let l = this.supabase.from(this.table).select("*", {
1284
1306
  count: "exact"
1285
1307
  });
@@ -1291,14 +1313,14 @@ class Rs {
1291
1313
  u.statusText,
1292
1314
  "Unable to load list"
1293
1315
  );
1294
- const d = (u.data ?? []).map((f) => this.toDto(f)), m = u.count ?? d.length;
1316
+ const d = (u.data ?? []).map((p) => this.toDto(p)), h = u.count ?? d.length;
1295
1317
  return {
1296
1318
  sort: o,
1297
1319
  order: i,
1298
- currentPage: n,
1320
+ currentPage: r,
1299
1321
  pageSize: t,
1300
- totalElements: m,
1301
- totalPages: t > 0 ? Math.ceil(m / t) : 0,
1322
+ totalElements: h,
1323
+ totalPages: t > 0 ? Math.ceil(h / t) : 0,
1302
1324
  items: d
1303
1325
  };
1304
1326
  }
@@ -1311,18 +1333,18 @@ class Rs {
1311
1333
  t.status,
1312
1334
  t.statusText,
1313
1335
  "Unable to export"
1314
- ), (t.data ?? []).map((n) => this.toDto(n));
1336
+ ), (t.data ?? []).map((r) => this.toDto(r));
1315
1337
  }
1316
1338
  async import(e) {
1317
1339
  var o;
1318
1340
  if (e.items.length === 0) return 0;
1319
- const s = e.items.map((i) => this.toImportRow(i)), n = await (e.override ? this.supabase.from(this.table).upsert(s, { onConflict: this.idColumn }).select(this.idColumn) : this.supabase.from(this.table).insert(s).select(this.idColumn));
1341
+ const s = e.items.map((i) => this.toImportRow(i)), r = await (e.override ? this.supabase.from(this.table).upsert(s, { onConflict: this.idColumn }).select(this.idColumn) : this.supabase.from(this.table).insert(s).select(this.idColumn));
1320
1342
  return this.assertNoError(
1321
- n.error,
1322
- n.status,
1323
- n.statusText,
1343
+ r.error,
1344
+ r.status,
1345
+ r.statusText,
1324
1346
  "Unable to import rows"
1325
- ), ((o = n.data) == null ? void 0 : o.length) ?? 0;
1347
+ ), ((o = r.data) == null ? void 0 : o.length) ?? 0;
1326
1348
  }
1327
1349
  async commonGet(e) {
1328
1350
  let s = this.supabase.from(this.table).select("*");
@@ -1333,7 +1355,7 @@ class Rs {
1333
1355
  t.status,
1334
1356
  t.statusText,
1335
1357
  "Unable to load common data"
1336
- ), (t.data ?? []).map((n) => this.toCommonDto(n));
1358
+ ), (t.data ?? []).map((r) => this.toCommonDto(r));
1337
1359
  }
1338
1360
  async getById(e) {
1339
1361
  const s = {
@@ -1356,7 +1378,7 @@ class Rs {
1356
1378
  if (e.length === 0) return 0;
1357
1379
  const s = ((c = (i = this.options).nowFactory) == null ? void 0 : c.call(i).toISOString()) ?? (/* @__PURE__ */ new Date()).toISOString(), t = this.supabase.from(this.table).update({
1358
1380
  [this.deletedAtColumn]: s
1359
- }), n = `(${e.join(",")})`, o = await t.filter(this.idColumn, "in", n).select(this.idColumn);
1381
+ }), r = `(${e.join(",")})`, o = await t.filter(this.idColumn, "in", r).select(this.idColumn);
1360
1382
  return this.assertNoError(
1361
1383
  o.error,
1362
1384
  o.status,
@@ -1367,53 +1389,53 @@ class Rs {
1367
1389
  async restore(e) {
1368
1390
  var o;
1369
1391
  if (e.length === 0) return 0;
1370
- const s = this.supabase.from(this.table).update({ [this.deletedAtColumn]: null }), t = `(${e.join(",")})`, n = await s.filter(this.idColumn, "in", t).select(this.idColumn);
1392
+ const s = this.supabase.from(this.table).update({ [this.deletedAtColumn]: null }), t = `(${e.join(",")})`, r = await s.filter(this.idColumn, "in", t).select(this.idColumn);
1371
1393
  return this.assertNoError(
1372
- n.error,
1373
- n.status,
1374
- n.statusText,
1394
+ r.error,
1395
+ r.status,
1396
+ r.statusText,
1375
1397
  "Unable to restore"
1376
- ), ((o = n.data) == null ? void 0 : o.length) ?? 0;
1398
+ ), ((o = r.data) == null ? void 0 : o.length) ?? 0;
1377
1399
  }
1378
1400
  }
1379
- const jt = (r) => typeof r == "object" && r !== null, Qt = (r, e) => {
1380
- if (jt(r))
1401
+ const Ht = (n) => typeof n == "object" && n !== null, qt = (n, e) => {
1402
+ if (Ht(n))
1381
1403
  for (const s of e) {
1382
- const t = r[s];
1404
+ const t = n[s];
1383
1405
  if (typeof t == "string" && t.trim().length > 0)
1384
1406
  return t.trim();
1385
1407
  }
1386
- }, qt = (r, e) => {
1387
- if (!r) return e;
1388
- const s = Number(r);
1408
+ }, Bt = (n, e) => {
1409
+ if (!n) return e;
1410
+ const s = Number(n);
1389
1411
  return Number.isFinite(s) ? s : e;
1390
- }, ke = (r, e) => {
1412
+ }, Ee = (n, e) => {
1391
1413
  const {
1392
1414
  defaultId: s = 0,
1393
1415
  defaultUsername: t = "",
1394
- defaultEmail: n = "",
1416
+ defaultEmail: r = "",
1395
1417
  usernameMetadataKeys: o = ["username", "name", "full_name"]
1396
- } = e ?? {}, i = Qt(
1397
- r.user.user_metadata,
1418
+ } = e ?? {}, i = qt(
1419
+ n.user.user_metadata,
1398
1420
  o
1399
1421
  );
1400
1422
  return {
1401
- id: qt(r.user.id, s),
1423
+ id: Bt(n.user.id, s),
1402
1424
  username: i ?? t,
1403
- email: r.user.email ?? n,
1404
- token: r.access_token,
1405
- refreshToken: r.refresh_token ?? null,
1406
- accessTokenExpiresAt: typeof r.expires_at == "number" ? new Date(r.expires_at * 1e3).toISOString() : null
1425
+ email: n.user.email ?? r,
1426
+ token: n.access_token,
1427
+ refreshToken: n.refresh_token ?? null,
1428
+ accessTokenExpiresAt: typeof n.expires_at == "number" ? new Date(n.expires_at * 1e3).toISOString() : null
1407
1429
  };
1408
1430
  };
1409
- function Is(r) {
1410
- return Object.keys(r).filter((e) => isNaN(Number(e))).map((e) => ({
1431
+ function Os(n) {
1432
+ return Object.keys(n).filter((e) => isNaN(Number(e))).map((e) => ({
1411
1433
  key: e,
1412
- value: r[e]
1434
+ value: n[e]
1413
1435
  }));
1414
1436
  }
1415
- const G = (r, e = "") => {
1416
- const s = localStorage.getItem(r) ?? void 0;
1437
+ const W = (n, e = "") => {
1438
+ const s = localStorage.getItem(n) ?? void 0;
1417
1439
  if (s && e.length)
1418
1440
  switch (e) {
1419
1441
  case "object":
@@ -1426,12 +1448,12 @@ const G = (r, e = "") => {
1426
1448
  return s;
1427
1449
  }
1428
1450
  return s;
1429
- }, Q = (r, e) => localStorage.setItem(
1430
- r,
1451
+ }, H = (n, e) => localStorage.setItem(
1452
+ n,
1431
1453
  typeof e == "object" ? JSON.stringify(e) : e
1432
- ), I = (r) => localStorage.removeItem(r);
1433
- function _s(r) {
1434
- const e = r ? new Date(r) : /* @__PURE__ */ new Date(), s = {
1454
+ ), I = (n) => localStorage.removeItem(n);
1455
+ function Fs(n) {
1456
+ const e = n ? new Date(n) : /* @__PURE__ */ new Date(), s = {
1435
1457
  weekday: "long",
1436
1458
  // martes
1437
1459
  day: "numeric",
@@ -1452,70 +1474,70 @@ function _s(r) {
1452
1474
  s
1453
1475
  );
1454
1476
  }
1455
- function Ps(r) {
1456
- const e = r ? new Date(r) : /* @__PURE__ */ new Date(), s = String(e.getDate()).padStart(2, "0"), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getFullYear()).slice(-2), o = String(e.getHours()).padStart(2, "0"), i = String(e.getMinutes()).padStart(2, "0");
1457
- return `${s}/${t}/${n} ${o}:${i}`;
1477
+ function Us(n) {
1478
+ const e = n ? new Date(n) : /* @__PURE__ */ new Date(), s = String(e.getDate()).padStart(2, "0"), t = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getFullYear()).slice(-2), o = String(e.getHours()).padStart(2, "0"), i = String(e.getMinutes()).padStart(2, "0");
1479
+ return `${s}/${t}/${r} ${o}:${i}`;
1458
1480
  }
1459
- function Ms(r) {
1460
- const e = r ? new Date(r) : /* @__PURE__ */ new Date(), s = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0"), o = String(e.getHours()).padStart(2, "0"), i = String(e.getMinutes()).padStart(2, "0");
1461
- return `${s}-${t}-${n}T${o}:${i}`;
1481
+ function Ks(n) {
1482
+ const e = n ? new Date(n) : /* @__PURE__ */ new Date(), s = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getDate()).padStart(2, "0"), o = String(e.getHours()).padStart(2, "0"), i = String(e.getMinutes()).padStart(2, "0");
1483
+ return `${s}-${t}-${r}T${o}:${i}`;
1462
1484
  }
1463
- const Ht = () => {
1485
+ const Vt = () => {
1464
1486
  var s;
1465
- const r = navigator, e = ((s = r == null ? void 0 : r.userAgentData) == null ? void 0 : s.platform) || (r == null ? void 0 : r.platform) || "";
1487
+ const n = navigator, e = ((s = n == null ? void 0 : n.userAgentData) == null ? void 0 : s.platform) || (n == null ? void 0 : n.platform) || "";
1466
1488
  return /Mac|iPhone|iPod|iPad/i.test(e);
1467
1489
  };
1468
- function we(r) {
1469
- if (!r || typeof r != "object") return !1;
1470
- const e = r;
1490
+ function Se(n) {
1491
+ if (!n || typeof n != "object") return !1;
1492
+ const e = n;
1471
1493
  return Array.isArray(e.errors) && e.errors.every(
1472
1494
  (s) => Array.isArray(s) && s.length === 2 && typeof s[0] == "string"
1473
1495
  );
1474
1496
  }
1475
- function Se(r) {
1476
- if (!r || typeof r != "object") return !1;
1477
- const e = r;
1497
+ function Ce(n) {
1498
+ if (!n || typeof n != "object") return !1;
1499
+ const e = n;
1478
1500
  return typeof (e == null ? void 0 : e.status) == "number" && typeof (e == null ? void 0 : e.message) == "string";
1479
1501
  }
1480
- function Os(r, e) {
1481
- return r != null && r.errors ? r.errors.map(([s, t]) => e(s, t)) : [];
1502
+ function js(n, e) {
1503
+ return n != null && n.errors ? n.errors.map(([s, t]) => e(s, t)) : [];
1482
1504
  }
1483
- const Fe = Y(
1505
+ const Ue = X(
1484
1506
  void 0
1485
1507
  );
1486
- function Fs(r) {
1487
- const { children: e } = r, s = F(0), [t, n] = xe(
1488
- (m, f) => {
1489
- const { type: p, items: b, id: g } = f;
1490
- switch (p) {
1508
+ function Qs(n) {
1509
+ const { children: e } = n, s = U(0), [t, r] = De(
1510
+ (h, p) => {
1511
+ const { type: f, items: b, id: y } = p;
1512
+ switch (f) {
1491
1513
  case "set":
1492
1514
  return b ?? [];
1493
1515
  case "remove":
1494
- return g !== void 0 ? m.filter((y) => y.id !== g) : [];
1516
+ return y !== void 0 ? h.filter((g) => g.id !== y) : [];
1495
1517
  }
1496
- return m;
1518
+ return h;
1497
1519
  },
1498
1520
  [],
1499
1521
  () => []
1500
- ), o = (m) => m.map((f) => ({ ...f, id: s.current++ })), i = S(
1501
- (m) => n({
1522
+ ), o = (h) => h.map((p) => ({ ...p, id: s.current++ })), i = S(
1523
+ (h) => r({
1502
1524
  type: "set",
1503
- items: o([{ ...m, type: O.error }])
1525
+ items: o([{ ...h, type: O.error }])
1504
1526
  }),
1505
1527
  []
1506
1528
  ), c = S(
1507
- (m) => n({ type: "set", items: o([{ ...m }]) }),
1529
+ (h) => r({ type: "set", items: o([{ ...h }]) }),
1508
1530
  []
1509
1531
  ), a = S(
1510
- (m) => n({ type: "set", items: o(m) }),
1532
+ (h) => r({ type: "set", items: o(h) }),
1511
1533
  []
1512
1534
  ), l = S(
1513
- (m) => n({
1535
+ (h) => r({
1514
1536
  type: "set",
1515
- items: o([{ ...m, type: O.success }])
1537
+ items: o([{ ...h, type: O.success }])
1516
1538
  }),
1517
1539
  []
1518
- ), u = (m) => n({ type: "remove", id: m }), d = V(() => ({
1540
+ ), u = (h) => r({ type: "remove", id: h }), d = B(() => ({
1519
1541
  notification: t,
1520
1542
  removeNotification: u,
1521
1543
  showErrorNotification: i,
@@ -1529,14 +1551,14 @@ function Fs(r) {
1529
1551
  a,
1530
1552
  l
1531
1553
  ]);
1532
- return /* @__PURE__ */ h(Fe.Provider, { value: d, children: e });
1554
+ return /* @__PURE__ */ m(Ue.Provider, { value: d, children: e });
1533
1555
  }
1534
1556
  const oe = () => {
1535
- const r = X(Fe);
1536
- if (!r)
1557
+ const n = Y(Ue);
1558
+ if (!n)
1537
1559
  throw new Error("NotificationContext must be used within a Provider");
1538
- return r;
1539
- }, Te = () => new kt({
1560
+ return n;
1561
+ }, ve = () => new xt({
1540
1562
  defaultOptions: {
1541
1563
  queries: {
1542
1564
  refetchInterval: !1,
@@ -1548,50 +1570,50 @@ const oe = () => {
1548
1570
  // default: true
1549
1571
  }
1550
1572
  }
1551
- }), Us = Te(), Ue = Y(
1573
+ }), Hs = ve(), Ke = X(
1552
1574
  void 0
1553
- ), Ks = (r) => {
1554
- const { children: e, manager: s, queryClient: t } = r, [n] = R(Te), o = t ?? n;
1555
- return /* @__PURE__ */ h(Ue.Provider, { value: { client: s }, children: /* @__PURE__ */ h(_e, { client: o, children: e }) });
1556
- }, Bt = () => {
1557
- const r = X(Ue);
1558
- if (!r)
1575
+ ), qs = (n) => {
1576
+ const { children: e, manager: s, queryClient: t } = n, [r] = R(ve), o = t ?? r;
1577
+ return /* @__PURE__ */ m(Ke.Provider, { value: { client: s }, children: /* @__PURE__ */ m(Pe, { client: o, children: e }) });
1578
+ }, Wt = () => {
1579
+ const n = Y(Ke);
1580
+ if (!n)
1559
1581
  throw new Error("managerContext must be used within a Provider");
1560
- return r.client;
1561
- }, Ce = Y(
1582
+ return n.client;
1583
+ }, me = X(
1562
1584
  void 0
1563
- ), Vt = () => {
1564
- const r = X(Ce);
1565
- if (!r) throw new Error("authContext must be used within a Provider");
1566
- return r;
1567
- }, js = (r) => {
1585
+ ), zt = () => {
1586
+ const n = Y(me);
1587
+ if (!n) throw new Error("authContext must be used within a Provider");
1588
+ return n;
1589
+ }, je = () => Y(me), Bs = (n) => {
1568
1590
  const {
1569
1591
  children: e,
1570
1592
  guestMode: s = "guest_mode",
1571
1593
  user: t = "user",
1572
- remember: n = "remember",
1594
+ remember: r = "remember",
1573
1595
  refreshTokenKey: o = "refreshToken",
1574
1596
  accessTokenExpiresAtKey: i = "accessTokenExpiresAt"
1575
- } = r, c = Bt(), [a, l] = R({}), u = S(() => {
1576
- I(t), I(n), I(o), I(i);
1577
- }, [i, o, n, t]), d = S(() => !!G(s, "boolean") && a.token === void 0, [a.token, s]), m = S(
1578
- (y) => {
1579
- Q(s, y);
1597
+ } = n, c = Wt(), [a, l] = R({}), u = S(() => {
1598
+ I(t), I(r), I(o), I(i);
1599
+ }, [i, o, r, t]), d = S(() => !!W(s, "boolean") && a.token === void 0, [a.token, s]), h = S(
1600
+ (g) => {
1601
+ H(s, g);
1580
1602
  },
1581
1603
  [s]
1582
- ), f = S(
1583
- (y, T) => {
1584
- if (!y) return;
1585
- const w = G(n, "boolean"), E = T ?? (typeof w == "boolean" ? w : !1);
1586
- l(y), I(s), Q(t, y.token), Q(n, E), typeof y.refreshToken == "string" && y.refreshToken.length ? Q(o, y.refreshToken) : I(o), typeof y.accessTokenExpiresAt == "string" && y.accessTokenExpiresAt.length ? Q(i, y.accessTokenExpiresAt) : I(i);
1604
+ ), p = S(
1605
+ (g, C) => {
1606
+ if (!g) return;
1607
+ const w = W(r, "boolean"), k = C ?? (typeof w == "boolean" ? w : !1);
1608
+ l(g), I(s), H(t, g.token), H(r, k), typeof g.refreshToken == "string" && g.refreshToken.length ? H(o, g.refreshToken) : I(o), typeof g.accessTokenExpiresAt == "string" && g.accessTokenExpiresAt.length ? H(i, g.accessTokenExpiresAt) : I(i);
1587
1609
  },
1588
- [i, s, o, n, t]
1589
- ), p = S(async () => {
1590
- const y = G(t) ?? a.token, T = G(o) ?? (typeof a.refreshToken == "string" ? a.refreshToken : void 0);
1610
+ [i, s, o, r, t]
1611
+ ), f = S(async () => {
1612
+ const g = W(t) ?? a.token, C = W(o) ?? (typeof a.refreshToken == "string" ? a.refreshToken : void 0);
1591
1613
  try {
1592
1614
  await c.Auth.logout({
1593
- accessToken: y,
1594
- refreshToken: T
1615
+ accessToken: g,
1616
+ refreshToken: C
1595
1617
  });
1596
1618
  } catch (w) {
1597
1619
  console.error(w);
@@ -1606,133 +1628,133 @@ const oe = () => {
1606
1628
  t
1607
1629
  ]), b = S(async () => {
1608
1630
  try {
1609
- const y = await c.Auth.getSession();
1610
- f(y);
1611
- } catch (y) {
1612
- console.error(y), p();
1631
+ const g = await c.Auth.getSession();
1632
+ p(g);
1633
+ } catch (g) {
1634
+ console.error(g), f();
1613
1635
  }
1614
- }, [f, p, c.Auth]), g = V(() => ({
1636
+ }, [p, f, c.Auth]), y = B(() => ({
1615
1637
  account: a,
1616
- logUser: f,
1617
- logoutUser: p,
1638
+ logUser: p,
1639
+ logoutUser: f,
1618
1640
  logUserFromLocal: b,
1619
1641
  isInGuestMode: d,
1620
- setGuestMode: m
1642
+ setGuestMode: h
1621
1643
  }), [
1622
1644
  a,
1623
- f,
1624
1645
  p,
1646
+ f,
1625
1647
  b,
1626
1648
  d,
1627
- m
1649
+ h
1628
1650
  ]);
1629
- return /* @__PURE__ */ h(Ce.Provider, { value: g, children: e });
1630
- }, Ke = () => Vt(), je = Y(void 0), Gt = () => {
1631
- const r = X(je);
1632
- if (!r)
1651
+ return /* @__PURE__ */ m(me.Provider, { value: y, children: e });
1652
+ }, Vs = () => zt(), Qe = X(void 0), Gt = () => {
1653
+ const n = Y(Qe);
1654
+ if (!n)
1633
1655
  throw new Error("supabaseManagerContext must be used within a Provider");
1634
- return r.client;
1635
- }, Qs = (r) => {
1656
+ return n.client;
1657
+ }, Ws = (n) => {
1636
1658
  const {
1637
1659
  children: e,
1638
1660
  guestMode: s = "guest_mode",
1639
1661
  user: t = "user",
1640
- remember: n = "remember",
1662
+ remember: r = "remember",
1641
1663
  refreshTokenKey: o = "refreshToken",
1642
1664
  accessTokenExpiresAtKey: i = "accessTokenExpiresAt",
1643
1665
  sessionMapper: c
1644
- } = r, a = Gt(), l = F(c ?? ke);
1666
+ } = n, a = Gt(), l = U(c ?? Ee);
1645
1667
  M(() => {
1646
- l.current = c ?? ke;
1668
+ l.current = c ?? Ee;
1647
1669
  }, [c]);
1648
- const [u, d] = R({}), m = S(() => {
1649
- I(t), I(n), I(o), I(i);
1650
- }, [i, o, n, t]), f = S(() => !!G(s, "boolean") && u.token === void 0, [u.token, s]), p = S(
1670
+ const [u, d] = R({}), h = S(() => {
1671
+ I(t), I(r), I(o), I(i);
1672
+ }, [i, o, r, t]), p = S(() => !!W(s, "boolean") && u.token === void 0, [u.token, s]), f = S(
1651
1673
  (w) => {
1652
- Q(s, w);
1674
+ H(s, w);
1653
1675
  },
1654
1676
  [s]
1655
1677
  ), b = S(
1656
- (w, E) => {
1678
+ (w, k) => {
1657
1679
  if (!w) return;
1658
- const A = G(n, "boolean"), U = E ?? (typeof A == "boolean" ? A : !1);
1659
- d(w), I(s), Q(t, w.token), Q(n, U), typeof w.refreshToken == "string" && w.refreshToken.length ? Q(o, w.refreshToken) : I(o), typeof w.accessTokenExpiresAt == "string" && w.accessTokenExpiresAt.length ? Q(i, w.accessTokenExpiresAt) : I(i);
1680
+ const v = W(r, "boolean"), K = k ?? (typeof v == "boolean" ? v : !1);
1681
+ d(w), I(s), H(t, w.token), H(r, K), typeof w.refreshToken == "string" && w.refreshToken.length ? H(o, w.refreshToken) : I(o), typeof w.accessTokenExpiresAt == "string" && w.accessTokenExpiresAt.length ? H(i, w.accessTokenExpiresAt) : I(i);
1660
1682
  },
1661
- [i, s, o, n, t]
1662
- ), g = S(async () => {
1683
+ [i, s, o, r, t]
1684
+ ), y = S(async () => {
1663
1685
  try {
1664
1686
  await a.auth.signOut();
1665
1687
  } catch (w) {
1666
1688
  console.error(w);
1667
1689
  }
1668
- d({}), m();
1669
- }, [m, a.auth]), y = S(async () => {
1690
+ d({}), h();
1691
+ }, [h, a.auth]), g = S(async () => {
1670
1692
  try {
1671
- const { data: w, error: E } = await a.auth.getSession();
1672
- if (E) throw E;
1693
+ const { data: w, error: k } = await a.auth.getSession();
1694
+ if (k) throw k;
1673
1695
  if (!w.session) {
1674
- d({}), m();
1696
+ d({}), h();
1675
1697
  return;
1676
1698
  }
1677
1699
  b(l.current(w.session));
1678
1700
  } catch (w) {
1679
- console.error(w), await g();
1701
+ console.error(w), await y();
1680
1702
  }
1681
- }, [m, b, g, a.auth]);
1703
+ }, [h, b, y, a.auth]);
1682
1704
  M(() => {
1683
1705
  let w = !0;
1684
1706
  (async () => {
1685
- w && await y();
1707
+ w && await g();
1686
1708
  })();
1687
- const { data: A } = a.auth.onAuthStateChange((U, B) => {
1709
+ const { data: v } = a.auth.onAuthStateChange((K, V) => {
1688
1710
  if (w) {
1689
- if (!B) {
1690
- d({}), m();
1711
+ if (!V) {
1712
+ d({}), h();
1691
1713
  return;
1692
1714
  }
1693
- b(l.current(B));
1715
+ b(l.current(V));
1694
1716
  }
1695
1717
  });
1696
1718
  return () => {
1697
- w = !1, A.subscription.unsubscribe();
1719
+ w = !1, v.subscription.unsubscribe();
1698
1720
  };
1699
- }, [m, b, y, a.auth]);
1700
- const T = V(() => ({
1721
+ }, [h, b, g, a.auth]);
1722
+ const C = B(() => ({
1701
1723
  account: u,
1702
1724
  logUser: b,
1703
- logoutUser: g,
1704
- logUserFromLocal: y,
1705
- isInGuestMode: f,
1706
- setGuestMode: p
1725
+ logoutUser: y,
1726
+ logUserFromLocal: g,
1727
+ isInGuestMode: p,
1728
+ setGuestMode: f
1707
1729
  }), [
1708
1730
  u,
1709
1731
  b,
1710
- g,
1711
1732
  y,
1712
- f,
1713
- p
1733
+ g,
1734
+ p,
1735
+ f
1714
1736
  ]);
1715
- return /* @__PURE__ */ h(Ce.Provider, { value: T, children: e });
1716
- }, qs = (r) => {
1717
- const { children: e, supabase: s, queryClient: t } = r, [n] = R(Te), o = t ?? n;
1718
- return /* @__PURE__ */ h(je.Provider, { value: { client: s }, children: /* @__PURE__ */ h(_e, { client: o, children: e }) });
1719
- }, Qe = Y({}), Hs = (r) => {
1720
- const { children: e, location: s, navigate: t, linkComponent: n, searchComponent: o } = r;
1721
- return /* @__PURE__ */ h(
1722
- Qe.Provider,
1737
+ return /* @__PURE__ */ m(me.Provider, { value: C, children: e });
1738
+ }, zs = (n) => {
1739
+ const { children: e, supabase: s, queryClient: t } = n, [r] = R(ve), o = t ?? r;
1740
+ return /* @__PURE__ */ m(Qe.Provider, { value: { client: s }, children: /* @__PURE__ */ m(Pe, { client: o, children: e }) });
1741
+ }, He = X({}), Gs = (n) => {
1742
+ const { children: e, location: s, navigate: t, linkComponent: r, searchComponent: o } = n;
1743
+ return /* @__PURE__ */ m(
1744
+ He.Provider,
1723
1745
  {
1724
- value: { location: s, navigate: t, linkComponent: n, searchComponent: o },
1746
+ value: { location: s, navigate: t, linkComponent: r, searchComponent: o },
1725
1747
  children: e
1726
1748
  }
1727
1749
  );
1728
- }, ce = () => {
1729
- const r = X(Qe);
1730
- if (r === void 0 || Object.keys(r).length === 0)
1750
+ }, ie = () => {
1751
+ const n = Y(He);
1752
+ if (n === void 0 || Object.keys(n).length === 0)
1731
1753
  throw new Error(
1732
1754
  "Config provider has not been set. This step is required and cannot be skipped."
1733
1755
  );
1734
- return r;
1735
- }, Wt = {
1756
+ return n;
1757
+ }, Jt = {
1736
1758
  addChildItem: () => {
1737
1759
  },
1738
1760
  removeChildItem: () => {
@@ -1740,10 +1762,10 @@ const oe = () => {
1740
1762
  clearDynamicItems: () => {
1741
1763
  },
1742
1764
  dynamicItems: {}
1743
- }, qe = Y(
1744
- Wt
1745
- ), Bs = (r) => {
1746
- const { children: e } = r, [s, t] = R({}), n = S(
1765
+ }, qe = X(
1766
+ Jt
1767
+ ), Js = (n) => {
1768
+ const { children: e } = n, [s, t] = R({}), r = S(
1747
1769
  (a, l) => t((u) => ({
1748
1770
  ...u,
1749
1771
  [a]: [...u[a] ?? [], l]
@@ -1752,7 +1774,7 @@ const oe = () => {
1752
1774
  ), o = S(
1753
1775
  (a, l) => t((u) => ({
1754
1776
  ...u,
1755
- [a]: (u[a] ?? []).filter((d, m) => m !== l)
1777
+ [a]: (u[a] ?? []).filter((d, h) => h !== l)
1756
1778
  })),
1757
1779
  []
1758
1780
  ), i = S((a) => {
@@ -1760,45 +1782,47 @@ const oe = () => {
1760
1782
  ...l,
1761
1783
  [a]: []
1762
1784
  }) : {});
1763
- }, []), c = V(
1785
+ }, []), c = B(
1764
1786
  () => ({
1765
1787
  dynamicItems: s,
1766
- addChildItem: n,
1788
+ addChildItem: r,
1767
1789
  removeChildItem: o,
1768
1790
  clearDynamicItems: i
1769
1791
  }),
1770
- [s, i, o, n]
1792
+ [s, i, o, r]
1771
1793
  );
1772
- return /* @__PURE__ */ h(
1794
+ return /* @__PURE__ */ m(
1773
1795
  qe.Provider,
1774
1796
  {
1775
1797
  value: c,
1776
1798
  children: e
1777
1799
  }
1778
1800
  );
1779
- }, zt = () => X(qe);
1780
- function Vs(r) {
1781
- const { t: e } = k(), { open: s, onClose: t, menuMap: n, logo: o } = r, { account: i } = Ke(), { dynamicItems: c } = zt(), { linkComponent: a, location: l } = ce(), u = a, d = V(() => n.filter((g) => {
1782
- const y = g.auth, T = !!(i != null && i.email);
1783
- return y == null || y && T || !y && !T;
1784
- }), [i == null ? void 0 : i.email, n]), m = S(
1801
+ }, Yt = () => Y(qe);
1802
+ function Ys(n) {
1803
+ var y;
1804
+ const { t: e } = N(), { open: s, onClose: t, menuMap: r, logo: o } = n, i = je(), { dynamicItems: c } = Yt(), { linkComponent: a, location: l } = ie(), u = a, d = B(() => r.filter((g) => {
1805
+ var k;
1806
+ const C = g.auth, w = !!((k = i == null ? void 0 : i.account) != null && k.email);
1807
+ return C == null || C && w || !C && !w;
1808
+ }), [(y = i == null ? void 0 : i.account) == null ? void 0 : y.email, r]), h = S(
1785
1809
  (g) => {
1786
1810
  g.key === "Escape" && s && t();
1787
1811
  },
1788
1812
  [t, s]
1789
1813
  );
1790
- M(() => (document.addEventListener("keydown", m), () => {
1791
- document.removeEventListener("keydown", m);
1792
- }), [m]);
1793
- const f = S(
1794
- (g, y) => y ? g === `${l.pathname}${l.search}` : g === l.pathname,
1814
+ M(() => (document.addEventListener("keydown", h), () => {
1815
+ document.removeEventListener("keydown", h);
1816
+ }), [h]);
1817
+ const p = S(
1818
+ (g, C) => C ? g === `${l.pathname}${l.search}` : g === l.pathname,
1795
1819
  [l.pathname, l.search]
1796
- ), p = S(
1797
- (g) => /* @__PURE__ */ h(
1820
+ ), f = S(
1821
+ (g) => /* @__PURE__ */ m(
1798
1822
  "li",
1799
1823
  {
1800
- className: `drawer-list-item-child ${f(g.path, !0) ? "active" : ""} animated`,
1801
- children: g.path ? /* @__PURE__ */ h(
1824
+ className: `drawer-list-item-child ${p(g.path, !0) ? "active" : ""} animated`,
1825
+ children: g.path ? /* @__PURE__ */ m(
1802
1826
  u,
1803
1827
  {
1804
1828
  tabIndex: s ? 0 : -1,
@@ -1813,14 +1837,14 @@ function Vs(r) {
1813
1837
  },
1814
1838
  g.id
1815
1839
  ),
1816
- [u, s, e, f]
1817
- ), b = V(() => d.map((g, y) => {
1818
- const T = g.page ?? String(y), w = `drawer-list-item ${f(g.path) ? "active" : ""} animated`;
1840
+ [u, s, e, p]
1841
+ ), b = B(() => d.map((g, C) => {
1842
+ const w = g.page ?? String(C), k = `drawer-list-item ${p(g.path) ? "active" : ""} animated`;
1819
1843
  if (g.type === "divider")
1820
- return /* @__PURE__ */ h("li", { className: w, children: /* @__PURE__ */ h("hr", { className: "drawer-divider" }) }, T);
1821
- const E = g.children ?? (g.page && c ? c[g.page] : null);
1822
- return /* @__PURE__ */ v("li", { className: w, children: [
1823
- /* @__PURE__ */ v(
1844
+ return /* @__PURE__ */ m("li", { className: k, children: /* @__PURE__ */ m("hr", { className: "drawer-divider" }) }, w);
1845
+ const v = g.children ?? (g.page && c ? c[g.page] : null);
1846
+ return /* @__PURE__ */ E("li", { className: k, children: [
1847
+ /* @__PURE__ */ E(
1824
1848
  u,
1825
1849
  {
1826
1850
  tabIndex: s ? 0 : -1,
@@ -1835,32 +1859,32 @@ function Vs(r) {
1835
1859
  ]
1836
1860
  }
1837
1861
  ),
1838
- E && /* @__PURE__ */ h("ul", { className: "drawer-children-list", children: E.map(p) })
1839
- ] }, T);
1840
- }), [u, c, f, s, d, p, e]);
1841
- return /* @__PURE__ */ h(
1862
+ v && /* @__PURE__ */ m("ul", { className: "drawer-children-list", children: v.map(f) })
1863
+ ] }, w);
1864
+ }), [u, c, p, s, d, f, e]);
1865
+ return /* @__PURE__ */ m(
1842
1866
  "div",
1843
1867
  {
1844
1868
  "aria-label": e("_accessibility:ariaLabels.closeMenu"),
1845
1869
  "aria-disabled": !s,
1846
1870
  className: `${s ? "opened" : "closed"} drawer-backdrop`,
1847
1871
  onClick: () => t(),
1848
- children: /* @__PURE__ */ v("aside", { className: `${s ? "opened" : "closed"} drawer animated`, children: [
1849
- /* @__PURE__ */ v("div", { className: "drawer-header-container", children: [
1872
+ children: /* @__PURE__ */ E("aside", { className: `${s ? "opened" : "closed"} drawer animated`, children: [
1873
+ /* @__PURE__ */ E("div", { className: "drawer-header-container", children: [
1850
1874
  o,
1851
- /* @__PURE__ */ h("h2", { className: "drawer-header poppins", children: e("_pages:home.appName") })
1875
+ /* @__PURE__ */ m("h2", { className: "drawer-header poppins", children: e("_pages:home.appName") })
1852
1876
  ] }),
1853
- /* @__PURE__ */ h("ul", { className: "drawer-menu-list", children: b })
1877
+ /* @__PURE__ */ m("ul", { className: "drawer-menu-list", children: b })
1854
1878
  ] })
1855
1879
  }
1856
1880
  );
1857
1881
  }
1858
- const z = ({ icon: r, ...e }) => /* @__PURE__ */ h(ot, { icon: /* @__PURE__ */ h(q, { icon: r }), ...e });
1859
- var fe, Ne;
1860
- function Jt() {
1861
- if (Ne) return fe;
1882
+ const z = ({ icon: n, ...e }) => /* @__PURE__ */ m(it, { icon: /* @__PURE__ */ m(F, { icon: n }), ...e });
1883
+ var pe, Ne;
1884
+ function Xt() {
1885
+ if (Ne) return pe;
1862
1886
  Ne = 1;
1863
- const r = (c, a = "local", l = void 0) => {
1887
+ const n = (c, a = "local", l = void 0) => {
1864
1888
  if (a === "local") {
1865
1889
  if (localStorage.getItem(c) !== void 0 && localStorage.getItem(c) !== "undefined" && localStorage.getItem(c) !== null)
1866
1890
  return l === void 0 || l !== void 0 && localStorage.getItem(c) === l;
@@ -1870,86 +1894,86 @@ function Jt() {
1870
1894
  }, e = (c) => {
1871
1895
  const a = {};
1872
1896
  return c.substring(1).split("&").forEach((u) => {
1873
- const [d, m] = u.split("=");
1874
- a[d] = m;
1897
+ const [d, h] = u.split("=");
1898
+ a[d] = h;
1875
1899
  }), a;
1876
1900
  }, s = (c = "") => {
1877
1901
  if (o(c) && c.length) return o(c);
1878
1902
  {
1879
1903
  let a = navigator.language || navigator.userLanguage;
1880
1904
  if (a.indexOf("en") < 0 && a.indexOf("es") < 0 && (a = "en-US"), a = a.split("-")[0], a)
1881
- return c.length && n(c, 730, a), a;
1905
+ return c.length && r(c, 730, a), a;
1882
1906
  }
1883
1907
  return "en";
1884
1908
  }, t = (c = 0, a = 0, l = window, u = "smooth") => l.scroll({
1885
1909
  top: c,
1886
1910
  left: a,
1887
1911
  behavior: u
1888
- }), n = (c, a, l, u = "/", d = "Lax") => {
1889
- var m = /* @__PURE__ */ new Date();
1890
- m.setTime(m.getTime() + a * 24 * 60 * 60 * 1e3);
1891
- const f = "; expires=" + m.toUTCString();
1892
- document.cookie = `${c}=${l || ""}${f};path=${u};SameSite=${d}`;
1912
+ }), r = (c, a, l, u = "/", d = "Lax") => {
1913
+ var h = /* @__PURE__ */ new Date();
1914
+ h.setTime(h.getTime() + a * 24 * 60 * 60 * 1e3);
1915
+ const p = "; expires=" + h.toUTCString();
1916
+ document.cookie = `${c}=${l || ""}${p};path=${u};SameSite=${d}`;
1893
1917
  }, o = (c) => {
1894
1918
  const a = `${c}=`, u = decodeURIComponent(document.cookie).split(";");
1895
1919
  for (let d = 0; d < u.length; d += 1) {
1896
- let m = u[d];
1897
- for (; m.charAt(0) === " "; )
1898
- m = m.substring(1);
1899
- if (m.indexOf(a) === 0)
1900
- return m.substring(a.length, m.length);
1920
+ let h = u[d];
1921
+ for (; h.charAt(0) === " "; )
1922
+ h = h.substring(1);
1923
+ if (h.indexOf(a) === 0)
1924
+ return h.substring(a.length, h.length);
1901
1925
  }
1902
1926
  return "";
1903
1927
  };
1904
- return fe = {
1928
+ return pe = {
1905
1929
  getCookie: o,
1906
- createCookie: n,
1930
+ createCookie: r,
1907
1931
  deleteCookie: (c) => document.cookie = `${c}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,
1908
1932
  getUserLanguage: s,
1909
1933
  scrollTo: t,
1910
1934
  parseQueries: e,
1911
- validation: r
1912
- }, fe;
1935
+ validation: n
1936
+ }, pe;
1913
1937
  }
1914
- var Yt = Jt();
1915
- function Gs() {
1916
- const { t: r, language: e } = k();
1938
+ var Zt = Xt();
1939
+ function Xs() {
1940
+ const { t: n, language: e } = N();
1917
1941
  return { timeAge: S(
1918
1942
  (t) => {
1919
- const o = /* @__PURE__ */ new Date() - t, i = Math.floor(o / (1e3 * 60)), c = Math.floor(i / 60), a = e === "es", l = r("_accessibility:labels.ago"), u = r("_accessibility:labels.minute"), d = r("_accessibility:labels.minutes"), m = r("_accessibility:labels.hour"), f = r("_accessibility:labels.hours"), p = r("_accessibility:labels.yesterday"), b = r("_accessibility:labels.justNow");
1920
- return o < 1e3 * 60 ? b : i < 60 ? `${a ? l : ""} ${i} ${i === 1 ? u : d} ${a ? "" : l}` : c < 24 ? `${a ? l : ""} ${c} ${c === 1 ? m : f} ${a ? "" : l}` : c < 48 ? p : t.toLocaleDateString(navigator.language || "es-ES", {
1943
+ const o = /* @__PURE__ */ new Date() - t, i = Math.floor(o / (1e3 * 60)), c = Math.floor(i / 60), a = e === "es", l = n("_accessibility:labels.ago"), u = n("_accessibility:labels.minute"), d = n("_accessibility:labels.minutes"), h = n("_accessibility:labels.hour"), p = n("_accessibility:labels.hours"), f = n("_accessibility:labels.yesterday"), b = n("_accessibility:labels.justNow");
1944
+ return o < 1e3 * 60 ? b : i < 60 ? `${a ? l : ""} ${i} ${i === 1 ? u : d} ${a ? "" : l}` : c < 24 ? `${a ? l : ""} ${c} ${c === 1 ? h : p} ${a ? "" : l}` : c < 48 ? f : t.toLocaleDateString(navigator.language || "es-ES", {
1921
1945
  day: "2-digit",
1922
1946
  month: "2-digit",
1923
1947
  year: "numeric"
1924
1948
  });
1925
1949
  },
1926
- [r, e]
1950
+ [n, e]
1927
1951
  ) };
1928
1952
  }
1929
- const He = (r) => {
1930
- const { showSuccessNotification: e } = oe(), { mutationFn: s, onError: t, onSuccess: n, onSuccessMessage: o } = r, [i, c] = R([]), { open: a, handleClose: l, handleOpen: u } = Be(), d = () => {
1953
+ const Be = (n) => {
1954
+ const { showSuccessNotification: e } = oe(), { mutationFn: s, onError: t, onSuccess: r, onSuccessMessage: o } = n, [i, c] = R([]), { open: a, handleClose: l, handleOpen: u } = Ve(), d = () => {
1931
1955
  l(), c([]);
1932
- }, m = async (p) => {
1933
- c(p), u();
1934
- }, f = ne({
1956
+ }, h = async (f) => {
1957
+ c(f), u();
1958
+ }, p = re({
1935
1959
  mutationFn: () => s(
1936
1960
  Array.isArray(i) ? i : [i]
1937
1961
  ),
1938
- onError: (p) => {
1939
- console.error(p), t && t(p), d();
1962
+ onError: (f) => {
1963
+ console.error(f), t && t(f), d();
1940
1964
  },
1941
- onSuccess: async (p) => {
1942
- n && n(p), e({
1965
+ onSuccess: async (f) => {
1966
+ r && r(f), e({
1943
1967
  message: o
1944
1968
  }), d();
1945
1969
  }
1946
1970
  });
1947
- return { open: a, onClick: m, close: d, dialogFn: f, isLoading: f.isPending };
1948
- }, Ws = (r) => {
1949
- const { t: e } = k(), {
1971
+ return { open: a, onClick: h, close: d, dialogFn: p, isLoading: p.isPending };
1972
+ }, Zs = (n) => {
1973
+ const { t: e } = N(), {
1950
1974
  showStackNotifications: s,
1951
1975
  showSuccessNotification: t,
1952
- showErrorNotification: n
1976
+ showErrorNotification: r
1953
1977
  } = oe(), o = Z(), {
1954
1978
  defaultValues: i,
1955
1979
  mutationFn: c,
@@ -1957,42 +1981,42 @@ const He = (r) => {
1957
1981
  onError: l,
1958
1982
  onSuccess: u,
1959
1983
  queryKey: d,
1960
- onSuccessMessage: m
1961
- } = r, { control: f, handleSubmit: p, reset: b, setError: g, getValues: y, setValue: T } = Pe({
1984
+ onSuccessMessage: h
1985
+ } = n, { control: p, handleSubmit: f, reset: b, setError: y, getValues: g, setValue: C } = Me({
1962
1986
  defaultValues: i
1963
- }), w = F(null), E = S(() => {
1964
- const C = document.activeElement;
1965
- if (!(C instanceof HTMLElement)) {
1987
+ }), w = U(null), k = S(() => {
1988
+ const T = document.activeElement;
1989
+ if (!(T instanceof HTMLElement)) {
1966
1990
  w.current = null;
1967
1991
  return;
1968
1992
  }
1969
- w.current = C.closest("form");
1970
- }, []), A = S(
1971
- (C) => {
1972
- const D = C == null ? void 0 : C.errors, L = [], _ = w.current;
1993
+ w.current = T.closest("form");
1994
+ }, []), v = S(
1995
+ (T) => {
1996
+ const D = T == null ? void 0 : T.errors, L = [], _ = w.current;
1973
1997
  if (!_) return L;
1974
- let K = !1;
1998
+ let j = !1;
1975
1999
  return D && D.forEach(([le, ee]) => {
1976
- const j = _.querySelector(`[name="${le}"]`);
1977
- (j instanceof HTMLInputElement || j instanceof HTMLTextAreaElement || j instanceof HTMLSelectElement) && (K || (j.focus(), K = !0), j.classList.add("error"), L.push(e(`_entities:${d}.${le}.${ee}`)));
2000
+ const Q = _.querySelector(`[name="${le}"]`);
2001
+ (Q instanceof HTMLInputElement || Q instanceof HTMLTextAreaElement || Q instanceof HTMLSelectElement) && (j || (Q.focus(), j = !0), Q.classList.add("error"), L.push(e(`_entities:${d}.${le}.${ee}`)));
1978
2002
  }), L;
1979
2003
  },
1980
2004
  [e, d]
1981
- ), U = S(() => {
1982
- const C = w.current;
1983
- if (!C) return;
1984
- C.querySelectorAll("input, textarea, select").forEach((L) => {
2005
+ ), K = S(() => {
2006
+ const T = w.current;
2007
+ if (!T) return;
2008
+ T.querySelectorAll("input, textarea, select").forEach((L) => {
1985
2009
  L.classList.remove("error");
1986
2010
  });
1987
- }, []), B = ne(
2011
+ }, []), V = re(
1988
2012
  {
1989
2013
  mutationFn: c,
1990
- onError: (C) => {
1991
- console.error(C);
1992
- const D = C;
1993
- if (l) l(C);
1994
- else if (we(D)) {
1995
- const L = A(D);
2014
+ onError: (T) => {
2015
+ console.error(T);
2016
+ const D = T;
2017
+ if (l) l(T);
2018
+ else if (Se(D)) {
2019
+ const L = v(D);
1996
2020
  s(
1997
2021
  L.map(
1998
2022
  (_) => ({
@@ -2001,71 +2025,71 @@ const He = (r) => {
2001
2025
  })
2002
2026
  )
2003
2027
  );
2004
- } else if (Se(D)) {
2028
+ } else if (Ce(D)) {
2005
2029
  const L = D.message || e("_accessibility:errors.500"), _ = e(`_accessibility:errors.${D.status}`);
2006
- n({ message: _ || L });
2030
+ r({ message: _ || L });
2007
2031
  } else
2008
- n({ message: e("_accessibility:errors.500") });
2032
+ r({ message: e("_accessibility:errors.500") });
2009
2033
  },
2010
- onSuccess: async (C) => {
2011
- await o.invalidateQueries({ queryKey: d }), u && u(C), m && t({
2012
- message: m
2034
+ onSuccess: async (T) => {
2035
+ await o.invalidateQueries({ queryKey: d }), u && u(T), h && t({
2036
+ message: h
2013
2037
  });
2014
2038
  }
2015
2039
  }
2016
2040
  );
2017
2041
  return {
2018
- control: f,
2019
- getValues: y,
2020
- setValue: T,
2021
- handleSubmit: p,
2022
- onSubmit: (C) => {
2023
- E(), U(), B.mutate(
2024
- a ? a(C) : C
2042
+ control: p,
2043
+ getValues: g,
2044
+ setValue: C,
2045
+ handleSubmit: f,
2046
+ onSubmit: (T) => {
2047
+ k(), K(), V.mutate(
2048
+ a ? a(T) : T
2025
2049
  );
2026
2050
  },
2027
2051
  reset: b,
2028
- setError: g,
2029
- isLoading: B.isPending
2052
+ setError: y,
2053
+ isLoading: V.isPending
2030
2054
  };
2031
- }, Xt = (r) => {
2032
- const { t: e } = k(), {
2055
+ }, es = (n) => {
2056
+ const { t: e } = N(), {
2033
2057
  onClick: s,
2034
- icon: t = ft,
2035
- sticky: n = !0,
2058
+ icon: t = pt,
2059
+ sticky: r = !0,
2036
2060
  hidden: o = !1,
2037
2061
  multiple: i = !0,
2038
2062
  disabled: c = !1,
2039
2063
  id: a = J.Delete,
2040
2064
  tooltip: l = e("_pages:common.actions.delete.text")
2041
- } = r;
2065
+ } = n;
2042
2066
  return {
2043
2067
  action: S(
2044
2068
  (d) => ({
2045
2069
  id: a,
2046
- sticky: n,
2070
+ sticky: r,
2047
2071
  tooltip: l,
2048
2072
  multiple: i,
2049
2073
  onClick: () => s([d == null ? void 0 : d.id]),
2050
2074
  hidden: !!d.deletedAt || o,
2051
2075
  disabled: !!d.deletedAt || c,
2052
- icon: /* @__PURE__ */ h(q, { className: "text-bg-error", icon: t }),
2053
- onMultipleClick: (m) => s(m.map((f) => f.id))
2076
+ icon: /* @__PURE__ */ m(F, { className: "text-bg-error", icon: t }),
2077
+ onMultipleClick: (h) => s(h.map((p) => p.id))
2054
2078
  }),
2055
- [c, o, t, a, i, s, n, l]
2079
+ [c, o, t, a, i, s, r, l]
2056
2080
  )
2057
2081
  };
2058
- }, Zt = (r) => {
2059
- const { t: e } = k(), {
2082
+ }, ts = (n) => {
2083
+ const { t: e } = N(), {
2060
2084
  onClick: s,
2061
2085
  sticky: t = !0,
2062
- hidden: n = !1,
2086
+ hidden: r = !1,
2063
2087
  disabled: o = !1,
2064
2088
  multiple: i = !1,
2065
- icon: c = Le,
2089
+ icon: c = Re,
2066
2090
  id: a = J.Restore,
2067
2091
  tooltip: l = e("_pages:common.actions.restore.text")
2068
- } = r;
2092
+ } = n;
2069
2093
  return {
2070
2094
  action: S(
2071
2095
  (d) => ({
@@ -2074,121 +2098,121 @@ const He = (r) => {
2074
2098
  tooltip: l,
2075
2099
  multiple: i,
2076
2100
  onClick: () => s([d == null ? void 0 : d.id]),
2077
- hidden: !d.deletedAt || n,
2101
+ hidden: !d.deletedAt || r,
2078
2102
  disabled: !d.deletedAt || o,
2079
- icon: /* @__PURE__ */ h(q, { className: "text-bg-error", icon: c }),
2080
- onMultipleClick: (m) => s(m.map((f) => f.id))
2103
+ icon: /* @__PURE__ */ m(F, { className: "text-bg-error", icon: c }),
2104
+ onMultipleClick: (h) => s(h.map((p) => p.id))
2081
2105
  }),
2082
- [o, n, c, a, i, s, t, l]
2106
+ [o, r, c, a, i, s, t, l]
2083
2107
  )
2084
2108
  };
2085
- }, zs = (r) => {
2086
- const { t: e } = k(), {
2109
+ }, en = (n) => {
2110
+ const { t: e } = N(), {
2087
2111
  onClick: s,
2088
2112
  hidden: t = !1,
2089
- sticky: n = !0,
2113
+ sticky: r = !0,
2090
2114
  disabled: o = !1,
2091
2115
  id: i = J.Edit,
2092
- icon: c = pt,
2116
+ icon: c = gt,
2093
2117
  tooltip: a = e("_pages:common.actions.edit.text")
2094
- } = r;
2118
+ } = n;
2095
2119
  return {
2096
2120
  action: S(
2097
2121
  (u) => ({
2098
2122
  id: i,
2099
- sticky: n,
2123
+ sticky: r,
2100
2124
  tooltip: a,
2101
2125
  onClick: () => s(u == null ? void 0 : u.id),
2102
2126
  hidden: !!u.deletedAt || t,
2103
2127
  disabled: !!u.deletedAt || o,
2104
- icon: /* @__PURE__ */ h(q, { className: "primary", icon: c })
2128
+ icon: /* @__PURE__ */ m(F, { className: "primary", icon: c })
2105
2129
  }),
2106
- [o, t, c, i, s, n, a]
2130
+ [o, t, c, i, s, r, a]
2107
2131
  )
2108
2132
  };
2109
2133
  };
2110
- var J = /* @__PURE__ */ ((r) => (r.Add = "add", r.Edit = "edit", r.Delete = "delete", r.Restore = "restore", r.Refresh = "refresh", r.Export = "export", r.Import = "import", r))(J || {});
2111
- const es = (r) => {
2112
- const { t: e } = k(), {
2134
+ var J = /* @__PURE__ */ ((n) => (n.Add = "add", n.Edit = "edit", n.Delete = "delete", n.Restore = "restore", n.Refresh = "refresh", n.Export = "export", n.Import = "import", n))(J || {});
2135
+ const ss = (n) => {
2136
+ const { t: e } = N(), {
2113
2137
  onClick: s,
2114
2138
  hidden: t = !1,
2115
- disabled: n = !1,
2139
+ disabled: r = !1,
2116
2140
  isLoading: o = !1
2117
- } = r;
2141
+ } = n;
2118
2142
  return {
2119
2143
  action: S(
2120
2144
  () => ({
2121
2145
  id: J.Export,
2122
2146
  hidden: t,
2123
- disabled: n,
2124
- icon: /* @__PURE__ */ h(
2125
- q,
2147
+ disabled: r,
2148
+ icon: /* @__PURE__ */ m(
2149
+ F,
2126
2150
  {
2127
2151
  className: `${o ? "rotate" : ""}`,
2128
- icon: o ? Re : gt
2152
+ icon: o ? Ie : bt
2129
2153
  }
2130
2154
  ),
2131
2155
  tooltip: e("_pages:common.actions.export.text"),
2132
2156
  onClick: s
2133
2157
  }),
2134
- [n, t, o, s, e]
2158
+ [r, t, o, s, e]
2135
2159
  )
2136
2160
  };
2137
- }, ts = (r) => {
2138
- const { t: e } = k(), {
2161
+ }, ns = (n) => {
2162
+ const { t: e } = N(), {
2139
2163
  onClick: s,
2140
2164
  hidden: t = !1,
2141
- disabled: n = !1,
2165
+ disabled: r = !1,
2142
2166
  isLoading: o = !1
2143
- } = r;
2167
+ } = n;
2144
2168
  return {
2145
2169
  action: S(
2146
2170
  () => ({
2147
2171
  id: J.Import,
2148
2172
  hidden: t,
2149
- disabled: n,
2150
- icon: /* @__PURE__ */ h(
2151
- q,
2173
+ disabled: r,
2174
+ icon: /* @__PURE__ */ m(
2175
+ F,
2152
2176
  {
2153
2177
  className: `${o ? "rotate" : ""}`,
2154
- icon: o ? Re : bt
2178
+ icon: o ? Ie : yt
2155
2179
  }
2156
2180
  ),
2157
2181
  tooltip: e("_pages:common.actions.import.text"),
2158
2182
  onClick: s
2159
2183
  }),
2160
- [n, t, o, s, e]
2184
+ [r, t, o, s, e]
2161
2185
  )
2162
2186
  };
2163
- }, Js = (r) => {
2164
- const { queryKey: e, onSuccess: s, ...t } = r, n = Z(), { showStackNotifications: o } = oe(), { t: i } = k(), { open: c, onClick: a, close: l, dialogFn: u, isLoading: d } = He({
2187
+ }, tn = (n) => {
2188
+ const { queryKey: e, onSuccess: s, ...t } = n, r = Z(), { showStackNotifications: o } = oe(), { t: i } = N(), { open: c, onClick: a, close: l, dialogFn: u, isLoading: d } = Be({
2165
2189
  onSuccessMessage: i("_pages:common.actions.delete.successMessage"),
2166
- onError: (f) => {
2167
- const p = f;
2168
- if (we(p))
2190
+ onError: (p) => {
2191
+ const f = p;
2192
+ if (Se(f))
2169
2193
  o(
2170
- p.errors.map(
2171
- ([b, g]) => ({
2172
- message: i(`_pages:${b}.errors.${g}`),
2194
+ f.errors.map(
2195
+ ([b, y]) => ({
2196
+ message: i(`_pages:${b}.errors.${y}`),
2173
2197
  type: O.error
2174
2198
  })
2175
2199
  )
2176
2200
  );
2177
- else if (Se(p)) {
2178
- const b = p.message || i("_accessibility:errors.500"), g = i(`_accessibility:errors.${p.status}`);
2201
+ else if (Ce(f)) {
2202
+ const b = f.message || i("_accessibility:errors.500"), y = i(`_accessibility:errors.${f.status}`);
2179
2203
  o([
2180
2204
  {
2181
- message: g || b,
2205
+ message: y || b,
2182
2206
  type: O.error
2183
2207
  }
2184
2208
  ]);
2185
2209
  }
2186
2210
  },
2187
- onSuccess: async (f) => {
2188
- await n.invalidateQueries({ queryKey: e }), s && s(f);
2211
+ onSuccess: async (p) => {
2212
+ await r.invalidateQueries({ queryKey: e }), s && s(p);
2189
2213
  },
2190
2214
  ...t
2191
- }), { action: m } = Xt({ onClick: a });
2215
+ }), { action: h } = es({ onClick: a });
2192
2216
  return {
2193
2217
  onClick: a,
2194
2218
  title: i("_pages:common.actions.delete.dialog.title"),
@@ -2196,17 +2220,17 @@ const es = (r) => {
2196
2220
  isLoading: d,
2197
2221
  handleSubmit: () => u.mutate(),
2198
2222
  handleClose: l,
2199
- action: m
2223
+ action: h
2200
2224
  };
2201
- }, Be = () => {
2202
- const [r, e] = R(!1);
2203
- return { open: r, setOpen: e, handleClose: () => e(!1), handleOpen: () => e(!0) };
2204
- }, Ve = (r) => {
2225
+ }, Ve = () => {
2226
+ const [n, e] = R(!1);
2227
+ return { open: n, setOpen: e, handleClose: () => e(!1), handleOpen: () => e(!0) };
2228
+ }, We = (n) => {
2205
2229
  const {
2206
2230
  closeOnSubmit: e = !0,
2207
2231
  defaultValues: s,
2208
2232
  dtoToForm: t,
2209
- formToDto: n,
2233
+ formToDto: r,
2210
2234
  mode: o = "state",
2211
2235
  onApply: i,
2212
2236
  onClear: c,
@@ -2214,149 +2238,149 @@ const es = (r) => {
2214
2238
  onSubmit: l,
2215
2239
  reinitializeOnOpen: u,
2216
2240
  resetOnOpen: d,
2217
- title: m
2218
- } = r, [f, p] = R(), [b, g] = R(!1), y = F(!1), T = F(null), { open: w, handleClose: E, handleOpen: A } = Be(), { control: U, handleSubmit: B, reset: C, setError: D, getValues: L, setValue: _ } = Pe({
2241
+ title: h
2242
+ } = n, [p, f] = R(), [b, y] = R(!1), g = U(!1), C = U(null), { open: w, handleClose: k, handleOpen: v } = Ve(), { control: K, handleSubmit: V, reset: T, setError: D, getValues: L, setValue: _ } = Me({
2219
2243
  defaultValues: s || {}
2220
2244
  });
2221
2245
  M(() => {
2222
2246
  if (!w) {
2223
- y.current = !1, T.current = null;
2247
+ g.current = !1, C.current = null;
2224
2248
  return;
2225
2249
  }
2226
- if (y.current) return;
2227
- if (y.current = !0, T.current) {
2228
- C(T.current), T.current = null;
2250
+ if (g.current) return;
2251
+ if (g.current = !0, C.current) {
2252
+ T(C.current), C.current = null;
2229
2253
  return;
2230
2254
  }
2231
- const x = t;
2232
- if (u && x) {
2233
- C(x(s || {}));
2255
+ const $ = t;
2256
+ if (u && $) {
2257
+ T($(s || {}));
2234
2258
  return;
2235
2259
  }
2236
2260
  if (u && s) {
2237
- C(s);
2261
+ T(s);
2238
2262
  return;
2239
2263
  }
2240
- d && C(s || {});
2241
- }, [s, t, w, u, C, d]);
2242
- const K = S(() => {
2243
- E(), C();
2244
- }, [E, C]), le = S(
2245
- (x) => {
2246
- let $, te;
2247
- typeof x == "number" || x == null ? $ = x : ($ = x.id, te = x.values), p($), te ? w ? C(te) : T.current = te : T.current = null, w || A();
2264
+ d && T(s || {});
2265
+ }, [s, t, w, u, T, d]);
2266
+ const j = S(() => {
2267
+ k(), T();
2268
+ }, [k, T]), le = S(
2269
+ ($) => {
2270
+ let x, te;
2271
+ typeof $ == "number" || $ == null ? x = $ : (x = $.id, te = $.values), f(x), te ? w ? T(te) : C.current = te : C.current = null, w || v();
2248
2272
  },
2249
- [A, w, C]
2273
+ [v, w, T]
2250
2274
  ), ee = S(
2251
- (x) => {
2252
- const $ = n;
2253
- return $ ? $(x, { id: f }) : x;
2275
+ ($) => {
2276
+ const x = r;
2277
+ return x ? x($, { id: p }) : $;
2254
2278
  },
2255
- [n, f]
2256
- ), j = S(
2257
- async (x, $, te) => {
2258
- a && await a(x, {
2259
- close: K,
2260
- id: f,
2261
- phase: $,
2279
+ [r, p]
2280
+ ), Q = S(
2281
+ async ($, x, te) => {
2282
+ a && await a($, {
2283
+ close: j,
2284
+ id: p,
2285
+ phase: x,
2262
2286
  values: te
2263
2287
  });
2264
2288
  },
2265
- [K, f, a]
2266
- ), We = S(async () => {
2289
+ [j, p, a]
2290
+ ), Ge = S(async () => {
2267
2291
  if (!i) return;
2268
- const x = L();
2269
- g(!0);
2292
+ const $ = L();
2293
+ y(!0);
2270
2294
  try {
2271
- const $ = ee(x);
2272
- await i($, {
2273
- close: K,
2274
- id: f,
2275
- values: x
2295
+ const x = ee($);
2296
+ await i(x, {
2297
+ close: j,
2298
+ id: p,
2299
+ values: $
2276
2300
  });
2277
- } catch ($) {
2278
- throw await j($, "apply", x).catch(() => {
2279
- }), $;
2301
+ } catch (x) {
2302
+ throw await Q(x, "apply", $).catch(() => {
2303
+ }), x;
2280
2304
  } finally {
2281
- g(!1);
2305
+ y(!1);
2282
2306
  }
2283
- }, [K, L, j, f, ee, i]), ze = S(async () => {
2284
- const x = L();
2307
+ }, [j, L, Q, p, ee, i]), Je = S(async () => {
2308
+ const $ = L();
2285
2309
  if (c) {
2286
- g(!0);
2310
+ y(!0);
2287
2311
  try {
2288
2312
  await c();
2289
- } catch ($) {
2290
- throw await j($, "clear", x).catch(() => {
2291
- }), $;
2313
+ } catch (x) {
2314
+ throw await Q(x, "clear", $).catch(() => {
2315
+ }), x;
2292
2316
  } finally {
2293
- g(!1);
2317
+ y(!1);
2294
2318
  }
2295
2319
  }
2296
2320
  try {
2297
- C(s || {});
2298
- } catch ($) {
2299
- throw await j($, "clear", x).catch(() => {
2300
- }), $;
2321
+ T(s || {});
2322
+ } catch (x) {
2323
+ throw await Q(x, "clear", $).catch(() => {
2324
+ }), x;
2301
2325
  }
2302
- }, [s, L, j, c, C]), Je = S(
2303
- async (x) => {
2304
- g(!0);
2326
+ }, [s, L, Q, c, T]), Ye = S(
2327
+ async ($) => {
2328
+ y(!0);
2305
2329
  try {
2306
- const $ = ee(x);
2307
- l && await l($, {
2308
- close: K,
2309
- id: f,
2310
- values: x
2311
- }), e && K();
2312
- } catch ($) {
2313
- throw await j($, "submit", x).catch(() => {
2314
- }), $;
2330
+ const x = ee($);
2331
+ l && await l(x, {
2332
+ close: j,
2333
+ id: p,
2334
+ values: $
2335
+ }), e && j();
2336
+ } catch (x) {
2337
+ throw await Q(x, "submit", $).catch(() => {
2338
+ }), x;
2315
2339
  } finally {
2316
- g(!1);
2340
+ y(!1);
2317
2341
  }
2318
2342
  },
2319
- [K, e, j, f, ee, l]
2343
+ [j, e, Q, p, ee, l]
2320
2344
  );
2321
2345
  return {
2322
2346
  open: w,
2323
2347
  mode: o,
2324
- id: f,
2348
+ id: p,
2325
2349
  openDialog: le,
2326
- handleClose: K,
2327
- control: U,
2350
+ handleClose: j,
2351
+ control: K,
2328
2352
  getValues: L,
2329
2353
  setValue: _,
2330
- handleSubmit: B,
2331
- onSubmit: Je,
2332
- reset: C,
2354
+ handleSubmit: V,
2355
+ onSubmit: Ye,
2356
+ reset: T,
2333
2357
  setError: D,
2334
- title: m,
2358
+ title: h,
2335
2359
  isSubmitting: b,
2336
- onApply: We,
2337
- onClear: ze,
2360
+ onApply: Ge,
2361
+ onClear: Je,
2338
2362
  isLoading: b
2339
2363
  };
2340
- }, Ys = (r) => {
2341
- const e = Z(), { mutationFn: s, queryKey: t, onSuccess: n, onError: o, formToDto: i, ...c } = r, a = ne({
2364
+ }, sn = (n) => {
2365
+ const e = Z(), { mutationFn: s, queryKey: t, onSuccess: r, onError: o, formToDto: i, ...c } = n, a = re({
2342
2366
  mutationFn: s
2343
2367
  });
2344
- return Ve({
2368
+ return We({
2345
2369
  ...c,
2346
2370
  mode: "entity",
2347
2371
  formToDto: i,
2348
2372
  onSubmit: async (l) => {
2349
2373
  try {
2350
2374
  const u = await a.mutateAsync(l);
2351
- t && await e.invalidateQueries({ queryKey: t }), n && await n(u);
2375
+ t && await e.invalidateQueries({ queryKey: t }), r && await r(u);
2352
2376
  } catch (u) {
2353
2377
  throw o && o(u), u;
2354
2378
  }
2355
2379
  }
2356
2380
  });
2357
- }, Xs = (r) => {
2358
- const e = Z(), s = F(), t = F(), {
2359
- mutationFn: n,
2381
+ }, nn = (n) => {
2382
+ const e = Z(), s = U(), t = U(), {
2383
+ mutationFn: r,
2360
2384
  queryKey: o,
2361
2385
  onSuccess: i,
2362
2386
  onError: c,
@@ -2364,75 +2388,75 @@ const es = (r) => {
2364
2388
  getFunction: l,
2365
2389
  dtoToForm: u,
2366
2390
  title: d,
2367
- ...m
2368
- } = r, f = F(u);
2391
+ ...h
2392
+ } = n, p = U(u);
2369
2393
  M(() => {
2370
- f.current = u;
2394
+ p.current = u;
2371
2395
  }, [u]);
2372
- const p = ne({
2373
- mutationFn: n
2374
- }), b = Ve({
2375
- ...m,
2396
+ const f = re({
2397
+ mutationFn: r
2398
+ }), b = We({
2399
+ ...h,
2376
2400
  mode: "entity",
2377
2401
  title: d,
2378
2402
  onSubmit: async (w) => {
2379
2403
  try {
2380
- const E = await p.mutateAsync(w);
2381
- o && await e.invalidateQueries({ queryKey: o }), i && await i(E);
2382
- } catch (E) {
2383
- throw c && c(E), E;
2404
+ const k = await f.mutateAsync(w);
2405
+ o && await e.invalidateQueries({ queryKey: o }), i && await i(k);
2406
+ } catch (k) {
2407
+ throw c && c(k), k;
2384
2408
  }
2385
2409
  },
2386
2410
  formToDto: (w) => {
2387
- const E = a;
2388
- return E ? E(w, s.current) : w;
2411
+ const k = a;
2412
+ return k ? k(w, s.current) : w;
2389
2413
  }
2390
- }), { reset: g } = b, T = Nt({
2414
+ }), { reset: y } = b, C = $t({
2391
2415
  queryFn: () => l(b.id),
2392
2416
  queryKey: [...o || ["put-dialog", d], b.id],
2393
2417
  enabled: b.open && !!b.id
2394
2418
  });
2395
2419
  return M(() => {
2396
- if (T.data && t.current !== T.data) {
2397
- if (s.current = T.data, t.current = T.data, f.current && g) {
2398
- g(f.current(T.data));
2420
+ if (C.data && t.current !== C.data) {
2421
+ if (s.current = C.data, t.current = C.data, p.current && y) {
2422
+ y(p.current(C.data));
2399
2423
  return;
2400
2424
  }
2401
- g == null || g(T.data);
2425
+ y == null || y(C.data);
2402
2426
  }
2403
- }, [T.data, g]), {
2427
+ }, [C.data, y]), {
2404
2428
  ...b,
2405
- isLoading: b.isLoading || p.isPending || T.isFetching || T.isLoading
2429
+ isLoading: b.isLoading || f.isPending || C.isFetching || C.isLoading
2406
2430
  };
2407
- }, Zs = (r) => {
2408
- const { queryKey: e, onSuccess: s, ...t } = r, n = Z(), { showStackNotifications: o } = oe(), { t: i } = k(), { open: c, onClick: a, close: l, dialogFn: u, isLoading: d } = He({
2431
+ }, rn = (n) => {
2432
+ const { queryKey: e, onSuccess: s, ...t } = n, r = Z(), { showStackNotifications: o } = oe(), { t: i } = N(), { open: c, onClick: a, close: l, dialogFn: u, isLoading: d } = Be({
2409
2433
  onSuccessMessage: i("_pages:common.actions.restore.successMessage"),
2410
- onError: (f) => {
2411
- const p = f;
2412
- if (we(p))
2434
+ onError: (p) => {
2435
+ const f = p;
2436
+ if (Se(f))
2413
2437
  o(
2414
- p.errors.map(
2415
- ([b, g]) => ({
2416
- message: i(`_pages:${b}.errors.${g}`),
2438
+ f.errors.map(
2439
+ ([b, y]) => ({
2440
+ message: i(`_pages:${b}.errors.${y}`),
2417
2441
  type: O.error
2418
2442
  })
2419
2443
  )
2420
2444
  );
2421
- else if (Se(p)) {
2422
- const b = p.message || i("_accessibility:errors.500"), g = i(`_accessibility:errors.${p.status}`);
2445
+ else if (Ce(f)) {
2446
+ const b = f.message || i("_accessibility:errors.500"), y = i(`_accessibility:errors.${f.status}`);
2423
2447
  o([
2424
2448
  {
2425
- message: g || b,
2449
+ message: y || b,
2426
2450
  type: O.error
2427
2451
  }
2428
2452
  ]);
2429
2453
  }
2430
2454
  },
2431
- onSuccess: async (f) => {
2432
- await n.invalidateQueries({ queryKey: e }), s && s(f);
2455
+ onSuccess: async (p) => {
2456
+ await r.invalidateQueries({ queryKey: e }), s && s(p);
2433
2457
  },
2434
2458
  ...t
2435
- }), { action: m } = Zt({ onClick: a });
2459
+ }), { action: h } = ts({ onClick: a });
2436
2460
  return {
2437
2461
  onClick: a,
2438
2462
  title: i("_pages:common.actions.restore.dialog.title"),
@@ -2440,26 +2464,26 @@ const es = (r) => {
2440
2464
  isLoading: d,
2441
2465
  handleSubmit: () => u.mutate(),
2442
2466
  handleClose: l,
2443
- action: m
2467
+ action: h
2444
2468
  };
2445
2469
  };
2446
- function er(r) {
2447
- const { t: e } = k(), s = Z(), {
2470
+ function on(n) {
2471
+ const { t: e } = N(), s = Z(), {
2448
2472
  queryKey: t,
2449
- mutationFn: n,
2473
+ mutationFn: r,
2450
2474
  entity: o,
2451
2475
  fileProcessor: i,
2452
2476
  renderCustomPreview: c,
2453
2477
  onError: a
2454
- } = r, [l, u] = R(!1), [d, m] = R(null), [f, p] = R(!1), b = ne({
2455
- mutationFn: n,
2456
- onError: (y) => {
2457
- console.error(y), a == null || a(y);
2478
+ } = n, [l, u] = R(!1), [d, h] = R(null), [p, f] = R(!1), b = re({
2479
+ mutationFn: r,
2480
+ onError: (g) => {
2481
+ console.error(g), a == null || a(g);
2458
2482
  },
2459
2483
  onSuccess: async () => {
2460
2484
  await s.invalidateQueries({ queryKey: t });
2461
2485
  }
2462
- }), { action: g } = ts({
2486
+ }), { action: y } = ns({
2463
2487
  onClick: () => u(!0)
2464
2488
  });
2465
2489
  return {
@@ -2468,48 +2492,48 @@ function er(r) {
2468
2492
  try {
2469
2493
  await b.mutateAsync({
2470
2494
  items: d,
2471
- override: f
2472
- }), u(!1), m(null), p(!1);
2473
- } catch (y) {
2474
- console.error(y);
2495
+ override: p
2496
+ }), u(!1), h(null), f(!1);
2497
+ } catch (g) {
2498
+ console.error(g);
2475
2499
  }
2476
2500
  },
2477
2501
  isLoading: b.isPending,
2478
2502
  fileProcessor: i,
2479
- onFileProcessed: (y) => m(y),
2503
+ onFileProcessed: (g) => h(g),
2480
2504
  renderCustomPreview: c,
2481
- onOverrideChange: (y) => p(y),
2505
+ onOverrideChange: (g) => f(g),
2482
2506
  open: l,
2483
2507
  title: e("_pages:common.actions.import.dialog.title", {
2484
2508
  entity: e(`_pages:${o}.title`)
2485
2509
  }),
2486
2510
  handleClose: () => {
2487
- u(!1), m(null), p(!1);
2511
+ u(!1), h(null), f(!1);
2488
2512
  },
2489
- action: g
2513
+ action: y
2490
2514
  };
2491
2515
  }
2492
- const tr = (r) => {
2493
- const { showSuccessNotification: e } = oe(), { t: s } = k(), {
2516
+ const an = (n) => {
2517
+ const { showSuccessNotification: e } = oe(), { t: s } = N(), {
2494
2518
  entity: t,
2495
- mutationFn: n,
2519
+ mutationFn: r,
2496
2520
  onError: o,
2497
2521
  onSuccess: i,
2498
2522
  onSuccessMessage: c = s("_pages:common.actions.export.successMessage")
2499
- } = r, a = ne({
2500
- mutationFn: () => n(),
2523
+ } = n, a = re({
2524
+ mutationFn: () => r(),
2501
2525
  onError: (d) => {
2502
2526
  console.error(d), o && o(d);
2503
2527
  },
2504
2528
  onSuccess: async (d) => {
2505
- const m = JSON.stringify(d, null, 2), f = new Blob([m], { type: "application/json" }), p = URL.createObjectURL(f), b = document.createElement("a");
2506
- b.href = p, b.download = `${t}.json`, b.click(), URL.revokeObjectURL(p), i && i(d), e({
2529
+ const h = JSON.stringify(d, null, 2), p = new Blob([h], { type: "application/json" }), f = URL.createObjectURL(p), b = document.createElement("a");
2530
+ b.href = f, b.download = `${t}.json`, b.click(), URL.revokeObjectURL(f), i && i(d), e({
2507
2531
  message: c
2508
2532
  });
2509
2533
  }
2510
2534
  }), l = S(() => {
2511
2535
  a.mutate();
2512
- }, [a]), { action: u } = es({
2536
+ }, [a]), { action: u } = ss({
2513
2537
  onClick: l,
2514
2538
  isLoading: a.isPending
2515
2539
  });
@@ -2517,19 +2541,19 @@ const tr = (r) => {
2517
2541
  action: u
2518
2542
  };
2519
2543
  }, Ae = () => typeof window < "u" ? window.scrollY : 0;
2520
- function ss(r) {
2544
+ function rs(n) {
2521
2545
  const [e, s] = R(Ae), t = S(() => {
2522
2546
  s(Ae());
2523
2547
  }, []);
2524
2548
  return M(() => (window.addEventListener("scroll", t), () => {
2525
2549
  window.removeEventListener("scroll", t);
2526
- }), [t]), e > r;
2550
+ }), [t]), e > n;
2527
2551
  }
2528
- const sr = (r) => {
2529
- const { t: e } = k(), {
2530
- icon: s = yt,
2552
+ const cn = (n) => {
2553
+ const { t: e } = N(), {
2554
+ icon: s = wt,
2531
2555
  threshold: t = 200,
2532
- scrollTop: n = 0,
2556
+ scrollTop: r = 0,
2533
2557
  scrollLeft: o = 0,
2534
2558
  tooltip: i = e("_accessibility:buttons.toTop"),
2535
2559
  scrollOnClick: c = !0,
@@ -2537,9 +2561,9 @@ const sr = (r) => {
2537
2561
  className: l = "",
2538
2562
  variant: u = "submit",
2539
2563
  color: d = "primary",
2540
- ...m
2541
- } = r, f = ss(t);
2542
- return /* @__PURE__ */ h(
2564
+ ...h
2565
+ } = n, p = rs(t);
2566
+ return /* @__PURE__ */ m(
2543
2567
  z,
2544
2568
  {
2545
2569
  variant: u,
@@ -2547,23 +2571,23 @@ const sr = (r) => {
2547
2571
  icon: s,
2548
2572
  "data-tooltip-id": "tooltip",
2549
2573
  onClick: () => {
2550
- a == null || a(), c && Yt.scrollTo(o, n);
2574
+ a == null || a(), c && Zt.scrollTo(o, r);
2551
2575
  },
2552
- className: `to-top ${f ? "show" : "hide"} ${l}`.trim(),
2576
+ className: `to-top ${p ? "show" : "hide"} ${l}`.trim(),
2553
2577
  "data-tooltip-content": i,
2554
- ...m
2578
+ ...h
2555
2579
  }
2556
2580
  );
2557
2581
  };
2558
- function rr(r) {
2559
- const { t: e } = k();
2560
- if ("children" in r) {
2561
- const { children: E, className: A } = r;
2562
- return /* @__PURE__ */ h("div", { className: `error-container${A ? ` ${A}` : ""}`, children: E });
2582
+ function ln(n) {
2583
+ const { t: e } = N();
2584
+ if ("children" in n) {
2585
+ const { children: k, className: v } = n;
2586
+ return /* @__PURE__ */ m("div", { className: `error-container${v ? ` ${v}` : ""}`, children: k });
2563
2587
  }
2564
2588
  const {
2565
2589
  error: t,
2566
- message: n,
2590
+ message: r,
2567
2591
  iconProps: o,
2568
2592
  onRetry: i,
2569
2593
  retryLabel: c,
@@ -2571,72 +2595,72 @@ function rr(r) {
2571
2595
  messageProps: l,
2572
2596
  className: u,
2573
2597
  resetErrorBoundary: d
2574
- } = r, m = i ?? d, {
2575
- className: f,
2576
- children: p,
2598
+ } = n, h = i ?? d, {
2599
+ className: p,
2600
+ children: f,
2577
2601
  onClick: b,
2578
- ...g
2579
- } = a ?? {}, { className: y, ...T } = l ?? {}, w = o !== null;
2580
- return /* @__PURE__ */ v("div", { className: `error-container${u ? ` ${u}` : ""}`, children: [
2581
- w && /* @__PURE__ */ h(
2582
- q,
2602
+ ...y
2603
+ } = a ?? {}, { className: g, ...C } = l ?? {}, w = o !== null;
2604
+ return /* @__PURE__ */ E("div", { className: `error-container${u ? ` ${u}` : ""}`, children: [
2605
+ w && /* @__PURE__ */ m(
2606
+ F,
2583
2607
  {
2584
2608
  ...o,
2585
2609
  icon: (o == null ? void 0 : o.icon) ?? At,
2586
2610
  className: `error-icon${o != null && o.className ? ` ${o.className}` : ""}`
2587
2611
  }
2588
2612
  ),
2589
- /* @__PURE__ */ h(
2613
+ /* @__PURE__ */ m(
2590
2614
  "p",
2591
2615
  {
2592
- ...T,
2593
- className: `error-message${y ? ` ${y}` : ""}`,
2594
- children: n ?? (t == null ? void 0 : t.message) ?? e("_accessibility:errors.unknownError")
2616
+ ...C,
2617
+ className: `error-message${g ? ` ${g}` : ""}`,
2618
+ children: r ?? (t == null ? void 0 : t.message) ?? e("_accessibility:errors.unknownError")
2595
2619
  }
2596
2620
  ),
2597
- m && /* @__PURE__ */ h(
2598
- H,
2621
+ h && /* @__PURE__ */ m(
2622
+ q,
2599
2623
  {
2600
2624
  type: "button",
2601
2625
  variant: "submit",
2602
2626
  color: "primary",
2603
- ...g,
2604
- className: `error-retry ${f ? ` ${f}` : ""}`,
2605
- onClick: (E) => {
2606
- b == null || b(E), E.defaultPrevented || m();
2627
+ ...y,
2628
+ className: `error-retry ${p ? ` ${p}` : ""}`,
2629
+ onClick: (k) => {
2630
+ b == null || b(k), k.defaultPrevented || h();
2607
2631
  },
2608
- children: p ?? c ?? e("_accessibility:actions.retry", { defaultValue: "Retry" })
2632
+ children: f ?? c ?? e("_accessibility:actions.retry", { defaultValue: "Retry" })
2609
2633
  }
2610
2634
  )
2611
2635
  ] });
2612
2636
  }
2613
- const rs = (r) => {
2614
- const { showBackButton: e, title: s, actions: t } = r, { t: n } = k(), { navigate: o } = ce();
2615
- return /* @__PURE__ */ v("div", { className: "page-header", children: [
2616
- /* @__PURE__ */ v("div", { className: "page-header-left", children: [
2617
- e && /* @__PURE__ */ h(
2637
+ const os = (n) => {
2638
+ const { showBackButton: e, title: s, actions: t } = n, { t: r } = N(), { navigate: o } = ie();
2639
+ return /* @__PURE__ */ E("div", { className: "page-header", children: [
2640
+ /* @__PURE__ */ E("div", { className: "page-header-left", children: [
2641
+ e && /* @__PURE__ */ m(
2618
2642
  z,
2619
2643
  {
2620
- icon: wt,
2644
+ icon: St,
2621
2645
  onClick: () => o(-1),
2622
2646
  className: "page-header-back",
2623
- name: n("_accessibility:buttons.back"),
2647
+ name: r("_accessibility:buttons.back"),
2624
2648
  "data-tooltip-id": "tooltip",
2625
- "data-tooltip-content": n("_accessibility:buttons.back")
2649
+ "data-tooltip-content": r("_accessibility:buttons.back")
2626
2650
  }
2627
2651
  ),
2628
- /* @__PURE__ */ h("h2", { className: "page-header-title", children: s })
2652
+ /* @__PURE__ */ m("h2", { className: "page-header-title", children: s })
2629
2653
  ] }),
2630
- /* @__PURE__ */ v("div", { children: [
2631
- /* @__PURE__ */ h(
2632
- it,
2654
+ /* @__PURE__ */ E("div", { children: [
2655
+ /* @__PURE__ */ m(
2656
+ at,
2633
2657
  {
2634
2658
  className: "page-header-actions-desktop",
2635
2659
  actions: t ?? []
2636
2660
  }
2637
2661
  ),
2638
- /* @__PURE__ */ h(
2639
- at,
2662
+ /* @__PURE__ */ m(
2663
+ ct,
2640
2664
  {
2641
2665
  className: "page-header-actions-mobile",
2642
2666
  actions: t ?? []
@@ -2644,90 +2668,90 @@ const rs = (r) => {
2644
2668
  )
2645
2669
  ] })
2646
2670
  ] });
2647
- }, nr = (r) => {
2671
+ }, un = (n) => {
2648
2672
  const {
2649
2673
  title: e,
2650
2674
  children: s,
2651
2675
  addOptions: t,
2652
- filterOptions: n,
2676
+ filterOptions: r,
2653
2677
  actions: o,
2654
2678
  queryKey: i,
2655
2679
  isLoading: c = !1,
2656
2680
  isAnimated: a = !0,
2657
2681
  showBackButton: l = !1
2658
- } = r, { t: u } = k(), d = Z(), { countOfFilters: m } = ct(), f = V(() => {
2659
- const p = Array.isArray(o) ? [...o] : [];
2682
+ } = n, { t: u } = N(), d = Z(), { countOfFilters: h } = lt(), p = B(() => {
2683
+ const f = Array.isArray(o) ? [...o] : [];
2660
2684
  if (i) {
2661
2685
  const b = {
2662
2686
  id: J.Refresh,
2663
2687
  onClick: () => d.invalidateQueries({ queryKey: i }),
2664
- icon: /* @__PURE__ */ h(q, { icon: Le }),
2688
+ icon: /* @__PURE__ */ m(F, { icon: Re }),
2665
2689
  tooltip: u("_pages:common.actions.refresh.text")
2666
2690
  };
2667
- p.unshift(b);
2691
+ f.unshift(b);
2668
2692
  }
2669
2693
  if (t) {
2670
2694
  const b = {
2671
2695
  ...t,
2672
2696
  id: J.Add,
2673
- icon: /* @__PURE__ */ h(q, { icon: ve })
2697
+ icon: /* @__PURE__ */ m(F, { icon: Te })
2674
2698
  };
2675
- p.unshift(b);
2699
+ f.unshift(b);
2676
2700
  }
2677
- if (n) {
2701
+ if (r) {
2678
2702
  const b = {
2679
- ...n,
2703
+ ...r,
2680
2704
  id: "filter",
2681
- icon: /* @__PURE__ */ h(q, { icon: St }),
2682
- children: /* @__PURE__ */ h(
2683
- lt,
2705
+ icon: /* @__PURE__ */ m(F, { icon: Ct }),
2706
+ children: /* @__PURE__ */ m(
2707
+ ut,
2684
2708
  {
2685
- className: `${m > 0 ? "show" : "hide"} `,
2686
- count: m
2709
+ className: `${h > 0 ? "show" : "hide"} `,
2710
+ count: h
2687
2711
  }
2688
2712
  )
2689
2713
  };
2690
- p.push(b);
2714
+ f.push(b);
2691
2715
  }
2692
- return p;
2716
+ return f;
2693
2717
  }, [
2694
2718
  o,
2695
2719
  t,
2696
- m,
2697
- n,
2720
+ h,
2721
+ r,
2698
2722
  d,
2699
2723
  i,
2700
2724
  u
2701
2725
  ]);
2702
- return /* @__PURE__ */ v("main", { className: "page-main", children: [
2703
- /* @__PURE__ */ h(
2704
- rs,
2726
+ return /* @__PURE__ */ E("main", { className: "page-main", children: [
2727
+ /* @__PURE__ */ m(
2728
+ os,
2705
2729
  {
2706
2730
  showBackButton: l,
2707
- actions: f,
2731
+ actions: p,
2708
2732
  title: e
2709
2733
  }
2710
2734
  ),
2711
- /* @__PURE__ */ h("div", { className: `page-main-content ${a ? "appear" : ""}`, children: c ? /* @__PURE__ */ h(re, { className: "page-loading" }) : s }),
2712
- t && /* @__PURE__ */ h(
2735
+ /* @__PURE__ */ m("div", { className: `page-main-content ${a ? "appear" : ""}`, children: c ? /* @__PURE__ */ m(ne, { className: "page-loading" }) : s }),
2736
+ t && /* @__PURE__ */ m(
2713
2737
  z,
2714
2738
  {
2715
- icon: t.icon ?? ve,
2739
+ icon: t.icon ?? Te,
2716
2740
  color: t.color ?? "primary",
2717
2741
  variant: t.variant ?? "submit",
2718
2742
  onClick: () => {
2719
- var p;
2720
- return (p = t.onClick) == null ? void 0 : p.call(t);
2743
+ var f;
2744
+ return (f = t.onClick) == null ? void 0 : f.call(t);
2721
2745
  },
2722
2746
  className: `button page-fab ${t.className ?? ""}`
2723
2747
  }
2724
2748
  )
2725
2749
  ] });
2726
- }, or = (r) => {
2727
- const { t: e } = k(), {
2750
+ }, dn = (n) => {
2751
+ const { t: e } = N(), {
2728
2752
  className: s = "",
2729
2753
  itemClassName: t = "",
2730
- loading: n = !1,
2754
+ loading: r = !1,
2731
2755
  emptyComponent: o = null,
2732
2756
  emptyMessage: i = e("_accessibility:messages.empty"),
2733
2757
  renderComponent: c,
@@ -2735,10 +2759,10 @@ const rs = (r) => {
2735
2759
  hasMore: l = !1,
2736
2760
  loadingMore: u = !1,
2737
2761
  onLoadMore: d,
2738
- loadMoreComponent: m = null,
2739
- observerRootMargin: f = "0px 0px 200px 0px",
2740
- observerThreshold: p = 0
2741
- } = r, b = F(!1), g = F(null), y = S(async () => {
2762
+ loadMoreComponent: h = null,
2763
+ observerRootMargin: p = "0px 0px 200px 0px",
2764
+ observerThreshold: f = 0
2765
+ } = n, b = U(!1), y = U(null), g = S(async () => {
2742
2766
  if (!(!l || !d) && !(u || b.current)) {
2743
2767
  b.current = !0;
2744
2768
  try {
@@ -2749,85 +2773,85 @@ const rs = (r) => {
2749
2773
  }
2750
2774
  }, [l, u, d]);
2751
2775
  return M(() => {
2752
- if (!l || !d || !g.current || typeof IntersectionObserver > "u") return;
2753
- const T = new IntersectionObserver(
2776
+ if (!l || !d || !y.current || typeof IntersectionObserver > "u") return;
2777
+ const C = new IntersectionObserver(
2754
2778
  (w) => {
2755
- w.some((E) => E.isIntersecting) && y();
2779
+ w.some((k) => k.isIntersecting) && g();
2756
2780
  },
2757
2781
  {
2758
- rootMargin: f,
2759
- threshold: p
2782
+ rootMargin: p,
2783
+ threshold: f
2760
2784
  }
2761
2785
  );
2762
- return T.observe(g.current), () => T.disconnect();
2786
+ return C.observe(y.current), () => C.disconnect();
2763
2787
  }, [
2764
2788
  l,
2765
2789
  d,
2766
- f,
2767
2790
  p,
2768
- y
2769
- ]), n ? /* @__PURE__ */ h(re, {}) : /* @__PURE__ */ h(ae, { children: a != null && a.length ? /* @__PURE__ */ v("ul", { className: `pretty-grid-main ${s}`, children: [
2770
- a == null ? void 0 : a.map((T) => /* @__PURE__ */ h("li", { className: `pretty-grid-item ${t}`, children: c(T) }, T.id)),
2771
- l && d && /* @__PURE__ */ h("li", { className: "pretty-grid-load-more", ref: g, children: m })
2772
- ] }) : /* @__PURE__ */ h(ae, { children: o || /* @__PURE__ */ h(ds, { message: i }) }) });
2773
- }, Ge = Y({
2791
+ f,
2792
+ g
2793
+ ]), r ? /* @__PURE__ */ m(ne, {}) : /* @__PURE__ */ m(ce, { children: a != null && a.length ? /* @__PURE__ */ E("ul", { className: `pretty-grid-main ${s}`, children: [
2794
+ a == null ? void 0 : a.map((C) => /* @__PURE__ */ m("li", { className: `pretty-grid-item ${t}`, children: c(C) }, C.id)),
2795
+ l && d && /* @__PURE__ */ m("li", { className: "pretty-grid-load-more", ref: y, children: h })
2796
+ ] }) : /* @__PURE__ */ m(ce, { children: o || /* @__PURE__ */ m(ps, { message: i }) }) });
2797
+ }, ze = X({
2774
2798
  title: "",
2775
2799
  setTitle: () => {
2776
2800
  },
2777
2801
  rightContent: null,
2778
2802
  setRightContent: () => {
2779
2803
  }
2780
- }), ir = (r) => {
2781
- const { children: e } = r, [s, t] = R(""), [n, o] = R(null), i = S((l) => {
2804
+ }), mn = (n) => {
2805
+ const { children: e } = n, [s, t] = R(""), [r, o] = R(null), i = S((l) => {
2782
2806
  t(l);
2783
2807
  }, []), c = S((l) => {
2784
2808
  o(l);
2785
- }, []), a = V(
2809
+ }, []), a = B(
2786
2810
  () => ({
2787
2811
  title: s,
2788
2812
  setTitle: i,
2789
- rightContent: n,
2813
+ rightContent: r,
2790
2814
  setRightContent: c
2791
2815
  }),
2792
- [s, i, n, c]
2816
+ [s, i, r, c]
2793
2817
  );
2794
- return /* @__PURE__ */ h(Ge.Provider, { value: a, children: e });
2795
- }, ns = () => X(Ge);
2796
- function ar(r) {
2797
- const { t: e } = k(), { openDrawer: s, showSearch: t = !0, menuButtonProps: n } = r, { searchComponent: o, location: i } = ce(), { title: c, rightContent: a } = ns(), [l, u] = R(!1), d = S((p) => {
2798
- (Ht() ? p.metaKey : p.ctrlKey) && p.shiftKey && p.key.toLowerCase() === "f" && (u(!0), p.preventDefault());
2818
+ return /* @__PURE__ */ m(ze.Provider, { value: a, children: e });
2819
+ }, is = () => Y(ze);
2820
+ function hn(n) {
2821
+ const { t: e } = N(), { openDrawer: s, showSearch: t = !0, menuButtonProps: r } = n, { searchComponent: o, location: i } = ie(), { title: c, rightContent: a } = is(), [l, u] = R(!1), d = S((f) => {
2822
+ (Vt() ? f.metaKey : f.ctrlKey) && f.shiftKey && f.key.toLowerCase() === "f" && (u(!0), f.preventDefault());
2799
2823
  }, []);
2800
2824
  M(() => (window.addEventListener("keydown", d), () => {
2801
2825
  window.removeEventListener("keydown", d);
2802
2826
  }), [d]);
2803
- const m = o, f = t && !!m;
2804
- return /* @__PURE__ */ v(ae, { children: [
2805
- i.pathname !== "/" && !!m && /* @__PURE__ */ h(m, { open: l, onClose: () => u(!1) }),
2806
- /* @__PURE__ */ v("header", { id: "header", className: "header", children: [
2807
- /* @__PURE__ */ v("div", { className: "navbar-left", children: [
2808
- /* @__PURE__ */ h(
2827
+ const h = o, p = t && !!h;
2828
+ return /* @__PURE__ */ E(ce, { children: [
2829
+ i.pathname !== "/" && !!h && /* @__PURE__ */ m(h, { open: l, onClose: () => u(!1) }),
2830
+ /* @__PURE__ */ E("header", { id: "header", className: "header", children: [
2831
+ /* @__PURE__ */ E("div", { className: "navbar-left", children: [
2832
+ /* @__PURE__ */ m(
2809
2833
  z,
2810
2834
  {
2811
- ...n,
2812
- type: (n == null ? void 0 : n.type) ?? "button",
2813
- icon: (n == null ? void 0 : n.icon) ?? Tt,
2814
- onClick: (p) => {
2835
+ ...r,
2836
+ type: (r == null ? void 0 : r.type) ?? "button",
2837
+ icon: (r == null ? void 0 : r.icon) ?? vt,
2838
+ onClick: (f) => {
2815
2839
  var b;
2816
- (b = n == null ? void 0 : n.onClick) == null || b.call(n, p), s();
2840
+ (b = r == null ? void 0 : r.onClick) == null || b.call(r, f), s();
2817
2841
  },
2818
- name: (n == null ? void 0 : n.name) ?? e("_accessibility:buttons.openMenu"),
2819
- "aria-label": (n == null ? void 0 : n["aria-label"]) ?? e("_accessibility:ariaLabels.openMenu"),
2820
- className: `navbar-menu animated ${(n == null ? void 0 : n.className) ?? ""}`
2842
+ name: (r == null ? void 0 : r.name) ?? e("_accessibility:buttons.openMenu"),
2843
+ "aria-label": (r == null ? void 0 : r["aria-label"]) ?? e("_accessibility:ariaLabels.openMenu"),
2844
+ className: `navbar-menu animated ${(r == null ? void 0 : r.className) ?? ""}`
2821
2845
  }
2822
2846
  ),
2823
- /* @__PURE__ */ h("h1", { className: "poppins navbar-title", children: c || e("_pages:home.appName") })
2847
+ /* @__PURE__ */ m("h1", { className: "poppins navbar-title", children: c || e("_pages:home.appName") })
2824
2848
  ] }),
2825
- /* @__PURE__ */ v("div", { className: "navbar-right", children: [
2849
+ /* @__PURE__ */ E("div", { className: "navbar-right", children: [
2826
2850
  a,
2827
- f && /* @__PURE__ */ h(
2851
+ p && /* @__PURE__ */ m(
2828
2852
  z,
2829
2853
  {
2830
- icon: Ct,
2854
+ icon: Tt,
2831
2855
  className: "navbar-search-btn",
2832
2856
  onClick: () => u(!0)
2833
2857
  }
@@ -2836,15 +2860,15 @@ function ar(r) {
2836
2860
  ] })
2837
2861
  ] });
2838
2862
  }
2839
- const ue = 300, os = (r) => r ?? O.error, is = (r) => {
2840
- switch (r) {
2863
+ const ue = 300, as = (n) => n ?? O.error, cs = (n) => {
2864
+ switch (n) {
2841
2865
  case O.error:
2842
2866
  return Et;
2843
2867
  default:
2844
- return vt;
2868
+ return kt;
2845
2869
  }
2846
- }, pe = (r) => {
2847
- switch (r) {
2870
+ }, ge = (n) => {
2871
+ switch (n) {
2848
2872
  case O.success:
2849
2873
  return "!text-success";
2850
2874
  case O.error:
@@ -2854,8 +2878,8 @@ const ue = 300, os = (r) => r ?? O.error, is = (r) => {
2854
2878
  default:
2855
2879
  return "!text-info";
2856
2880
  }
2857
- }, as = (r) => {
2858
- switch (r) {
2881
+ }, ls = (n) => {
2882
+ switch (n) {
2859
2883
  case O.success:
2860
2884
  return "bg-bg-success";
2861
2885
  case O.error:
@@ -2866,19 +2890,19 @@ const ue = 300, os = (r) => r ?? O.error, is = (r) => {
2866
2890
  return "bg-bg-info";
2867
2891
  }
2868
2892
  };
2869
- function cr() {
2870
- const { t: r } = k(), { notification: e, removeNotification: s } = oe(), [t, n] = R([]), o = F(t);
2871
- dt(() => {
2893
+ function fn() {
2894
+ const { t: n } = N(), { notification: e, removeNotification: s } = oe(), [t, r] = R([]), o = U(t);
2895
+ mt(() => {
2872
2896
  o.current = t;
2873
2897
  });
2874
- const i = F(null), c = S(
2898
+ const i = U(null), c = S(
2875
2899
  (a) => {
2876
- n(
2900
+ r(
2877
2901
  (l) => a !== void 0 ? l.map((u) => u.id === a ? { ...u, closing: !0 } : u) : l.map((u) => ({ ...u, closing: !0 }))
2878
2902
  ), a !== void 0 ? setTimeout(() => {
2879
- s(a), n((l) => l.filter((u) => u.id !== a));
2903
+ s(a), r((l) => l.filter((u) => u.id !== a));
2880
2904
  }, ue) : (i.current && clearTimeout(i.current), i.current = setTimeout(() => {
2881
- s(), n([]), i.current = null;
2905
+ s(), r([]), i.current = null;
2882
2906
  }, ue));
2883
2907
  },
2884
2908
  [s]
@@ -2890,30 +2914,30 @@ function cr() {
2890
2914
  };
2891
2915
  if (e.length === 0)
2892
2916
  return o.current.length === 0 ? void 0 : (i.current && clearTimeout(i.current), a = setTimeout(() => {
2893
- n((f) => f.map((p) => ({ ...p, closing: !0 }))), a = null;
2917
+ r((p) => p.map((f) => ({ ...f, closing: !0 }))), a = null;
2894
2918
  }, 0), i.current = setTimeout(() => {
2895
- n([]), i.current = null;
2919
+ r([]), i.current = null;
2896
2920
  }, ue), l);
2897
- const u = new Set(o.current.map((f) => f.id));
2921
+ const u = new Set(o.current.map((p) => p.id));
2898
2922
  if (!e.some(
2899
- (f) => f.id !== void 0 && !u.has(f.id)
2923
+ (p) => p.id !== void 0 && !u.has(p.id)
2900
2924
  )) return;
2901
2925
  if (o.current.length === 0) {
2902
- const f = [...e];
2926
+ const p = [...e];
2903
2927
  return a = setTimeout(() => {
2904
- n(f.map((p) => ({ ...p, closing: !1 }))), a = null;
2928
+ r(p.map((f) => ({ ...f, closing: !1 }))), a = null;
2905
2929
  }, 0), () => {
2906
2930
  a && clearTimeout(a);
2907
2931
  };
2908
2932
  }
2909
2933
  i.current && clearTimeout(i.current), a = setTimeout(() => {
2910
- n(
2911
- (f) => f.every((p) => p.closing) ? f : f.map((p) => ({ ...p, closing: !0 }))
2934
+ r(
2935
+ (p) => p.every((f) => f.closing) ? p : p.map((f) => ({ ...f, closing: !0 }))
2912
2936
  ), a = null;
2913
2937
  }, 0);
2914
- const m = [...e];
2938
+ const h = [...e];
2915
2939
  return i.current = setTimeout(() => {
2916
- n(m.map((f) => ({ ...f, closing: !1 }))), i.current = null;
2940
+ r(h.map((p) => ({ ...p, closing: !1 }))), i.current = null;
2917
2941
  }, ue), l;
2918
2942
  }, [e]), M(() => {
2919
2943
  if (!t.length) return;
@@ -2926,38 +2950,38 @@ function cr() {
2926
2950
  return window.addEventListener("keydown", u), () => {
2927
2951
  window.clearTimeout(l), a && window.removeEventListener("click", a), window.removeEventListener("keydown", u);
2928
2952
  };
2929
- }, [t.length, c]), Ie(
2930
- /* @__PURE__ */ h("div", { className: `notification-portal ${t.length ? "active" : ""}`, children: t.map(({ id: a, type: l, message: u, closing: d }) => {
2931
- const m = os(l);
2932
- return /* @__PURE__ */ v(
2953
+ }, [t.length, c]), _e(
2954
+ /* @__PURE__ */ m("div", { className: `notification-portal ${t.length ? "active" : ""}`, children: t.map(({ id: a, type: l, message: u, closing: d }) => {
2955
+ const h = as(l);
2956
+ return /* @__PURE__ */ E(
2933
2957
  "div",
2934
2958
  {
2935
- className: `notification ${d ? "closing" : ""} ${as(m)}`,
2936
- onClick: (f) => f.stopPropagation(),
2959
+ className: `notification ${d ? "closing" : ""} ${ls(h)}`,
2960
+ onClick: (p) => p.stopPropagation(),
2937
2961
  children: [
2938
- /* @__PURE__ */ v("div", { className: "notification-body", children: [
2939
- /* @__PURE__ */ h(
2940
- q,
2962
+ /* @__PURE__ */ E("div", { className: "notification-body", children: [
2963
+ /* @__PURE__ */ m(
2964
+ F,
2941
2965
  {
2942
- icon: is(m),
2943
- className: `notification-icon ${pe(m)}`
2966
+ icon: cs(h),
2967
+ className: `notification-icon ${ge(h)}`
2944
2968
  }
2945
2969
  ),
2946
- /* @__PURE__ */ h("p", { className: `notification-text ${pe(m)}`, children: u })
2970
+ /* @__PURE__ */ m("p", { className: `notification-text ${ge(h)}`, children: u })
2947
2971
  ] }),
2948
- /* @__PURE__ */ h(
2972
+ /* @__PURE__ */ m(
2949
2973
  z,
2950
2974
  {
2951
2975
  type: "button",
2952
- icon: De,
2976
+ icon: Le,
2953
2977
  color: "error",
2954
2978
  className: "notification-close group",
2955
- onClick: (f) => {
2956
- f.stopPropagation(), a !== void 0 && c(a);
2979
+ onClick: (p) => {
2980
+ p.stopPropagation(), a !== void 0 && c(a);
2957
2981
  },
2958
- iconClassName: `${pe(m)} notification-close-icon`,
2959
- name: r("_accessibility:buttons.closeNotification"),
2960
- "aria-label": r("_accessibility:ariaLabels.closeNotification")
2982
+ iconClassName: `${ge(h)} notification-close-icon`,
2983
+ name: n("_accessibility:buttons.closeNotification"),
2984
+ "aria-label": n("_accessibility:ariaLabels.closeNotification")
2961
2985
  }
2962
2986
  )
2963
2987
  ]
@@ -2968,113 +2992,113 @@ function cr() {
2968
2992
  document.body
2969
2993
  );
2970
2994
  }
2971
- function lr(r) {
2972
- const { className: e, ...s } = r;
2973
- return /* @__PURE__ */ h("div", { className: "splash-screen", children: /* @__PURE__ */ h(
2974
- re,
2995
+ function pn(n) {
2996
+ const { className: e, ...s } = n;
2997
+ return /* @__PURE__ */ m("div", { className: "splash-screen", children: /* @__PURE__ */ m(
2998
+ ne,
2975
2999
  {
2976
3000
  className: `blur-appear ${e ? ` ${e}` : ""}`,
2977
3001
  ...s
2978
3002
  }
2979
3003
  ) });
2980
3004
  }
2981
- const cs = (r) => {
3005
+ const us = (n) => {
2982
3006
  const {
2983
3007
  id: e,
2984
3008
  active: s,
2985
3009
  onClick: t,
2986
- children: n,
3010
+ children: r,
2987
3011
  to: o,
2988
3012
  useLinks: i = !0,
2989
3013
  tabButtonProps: c
2990
- } = r, { linkComponent: a } = ce(), l = a;
3014
+ } = n, { linkComponent: a } = ie(), l = a;
2991
3015
  if (!i) {
2992
3016
  const {
2993
3017
  className: d = "",
2994
- variant: m = s ? "submit" : "outlined",
2995
- color: f = s ? "primary" : "default",
2996
- ...p
3018
+ variant: h = s ? "submit" : "outlined",
3019
+ color: p = s ? "primary" : "default",
3020
+ ...f
2997
3021
  } = c ?? {};
2998
- return /* @__PURE__ */ h(
2999
- H,
3022
+ return /* @__PURE__ */ m(
3023
+ q,
3000
3024
  {
3001
3025
  type: "button",
3002
- variant: m,
3003
- color: f,
3026
+ variant: h,
3027
+ color: p,
3004
3028
  className: `tab ${d}`,
3005
3029
  onClick: t,
3006
- ...p,
3007
- children: n
3030
+ ...f,
3031
+ children: r
3008
3032
  }
3009
3033
  );
3010
3034
  }
3011
3035
  const u = `button submit tab ${s ? "primary" : "outlined"} ${(c == null ? void 0 : c.className) ?? ""}`.trim();
3012
- return /* @__PURE__ */ h(
3036
+ return /* @__PURE__ */ m(
3013
3037
  l,
3014
3038
  {
3015
3039
  to: o ?? `#${e}`,
3016
3040
  onClick: () => t(),
3017
3041
  className: u,
3018
- children: n
3042
+ children: r
3019
3043
  }
3020
3044
  );
3021
- }, ls = (r) => {
3022
- var f;
3045
+ }, ds = (n) => {
3046
+ var p;
3023
3047
  const {
3024
3048
  tabs: e = [],
3025
3049
  defaultTab: s,
3026
3050
  currentTab: t,
3027
- onTabChange: n,
3051
+ onTabChange: r,
3028
3052
  className: o = "",
3029
3053
  tabsContainerClassName: i = "",
3030
3054
  useLinks: c = !0,
3031
3055
  tabButtonProps: a
3032
- } = r, [l, u] = R(s ?? ((f = e[0]) == null ? void 0 : f.id)), d = t ?? l, m = V(() => e.find((p) => p.id === d), [e, d]);
3033
- return /* @__PURE__ */ v("div", { className: `tabs-layout-main ${o}`, children: [
3034
- /* @__PURE__ */ h(
3056
+ } = n, [l, u] = R(s ?? ((p = e[0]) == null ? void 0 : p.id)), d = t ?? l, h = B(() => e.find((f) => f.id === d), [e, d]);
3057
+ return /* @__PURE__ */ E("div", { className: `tabs-layout-main ${o}`, children: [
3058
+ /* @__PURE__ */ m(
3035
3059
  "ul",
3036
3060
  {
3037
3061
  className: `horizontal tabs tabs-container ${i}`,
3038
- children: e.map(({ id: p, to: b, label: g }) => /* @__PURE__ */ h("li", { children: /* @__PURE__ */ h(
3039
- cs,
3062
+ children: e.map(({ id: f, to: b, label: y }) => /* @__PURE__ */ m("li", { children: /* @__PURE__ */ m(
3063
+ us,
3040
3064
  {
3041
3065
  onClick: () => {
3042
- t === void 0 && u(p), n == null || n(p);
3066
+ t === void 0 && u(f), r == null || r(f);
3043
3067
  },
3044
- id: p,
3068
+ id: f,
3045
3069
  to: b,
3046
3070
  siblings: e.length > 1,
3047
- active: d === p,
3071
+ active: d === f,
3048
3072
  useLinks: c,
3049
3073
  tabButtonProps: a,
3050
- children: g
3074
+ children: y
3051
3075
  }
3052
- ) }, p))
3076
+ ) }, f))
3053
3077
  }
3054
3078
  ),
3055
- m == null ? void 0 : m.content
3079
+ h == null ? void 0 : h.content
3056
3080
  ] });
3057
- }, us = (r) => {
3081
+ }, ms = (n) => {
3058
3082
  const {
3059
3083
  title: e,
3060
3084
  body: s,
3061
3085
  content: t,
3062
- onClickNext: n,
3086
+ onClickNext: r,
3063
3087
  onSkip: o,
3064
3088
  onStartAsGuest: i,
3065
3089
  onSignIn: c,
3066
3090
  image: a = "",
3067
3091
  alt: l = "",
3068
3092
  final: u = !1
3069
- } = r, { t: d } = k();
3070
- return /* @__PURE__ */ v("div", { className: "big-appear step-container", children: [
3071
- a && /* @__PURE__ */ h("img", { src: a, alt: l }),
3072
- e != null && /* @__PURE__ */ h("h2", { className: "step-title", children: e }),
3073
- s != null && /* @__PURE__ */ h("div", { className: "step-body", children: s }),
3074
- t != null && /* @__PURE__ */ h("div", { className: "step-content", children: t }),
3075
- /* @__PURE__ */ h("div", { className: "step-actions", children: u ? /* @__PURE__ */ v(ae, { children: [
3076
- /* @__PURE__ */ h(
3077
- H,
3093
+ } = n, { t: d } = N();
3094
+ return /* @__PURE__ */ E("div", { className: "big-appear step-container", children: [
3095
+ a && /* @__PURE__ */ m("img", { src: a, alt: l }),
3096
+ e != null && /* @__PURE__ */ m("h2", { className: "step-title", children: e }),
3097
+ s != null && /* @__PURE__ */ m("div", { className: "step-body", children: s }),
3098
+ t != null && /* @__PURE__ */ m("div", { className: "step-content", children: t }),
3099
+ /* @__PURE__ */ m("div", { className: "step-actions", children: u ? /* @__PURE__ */ E(ce, { children: [
3100
+ /* @__PURE__ */ m(
3101
+ q,
3078
3102
  {
3079
3103
  color: "primary",
3080
3104
  className: "step-button",
@@ -3084,8 +3108,8 @@ const cs = (r) => {
3084
3108
  children: d("_accessibility:buttons.startAsGuest")
3085
3109
  }
3086
3110
  ),
3087
- /* @__PURE__ */ h(
3088
- H,
3111
+ /* @__PURE__ */ m(
3112
+ q,
3089
3113
  {
3090
3114
  color: "primary",
3091
3115
  variant: "submit",
@@ -3095,9 +3119,9 @@ const cs = (r) => {
3095
3119
  children: d("_accessibility:buttons.signIn")
3096
3120
  }
3097
3121
  )
3098
- ] }) : /* @__PURE__ */ v(ae, { children: [
3099
- /* @__PURE__ */ h(
3100
- H,
3122
+ ] }) : /* @__PURE__ */ E(ce, { children: [
3123
+ /* @__PURE__ */ m(
3124
+ q,
3101
3125
  {
3102
3126
  color: "primary",
3103
3127
  className: "step-button",
@@ -3107,171 +3131,256 @@ const cs = (r) => {
3107
3131
  children: d("_accessibility:buttons.skip")
3108
3132
  }
3109
3133
  ),
3110
- /* @__PURE__ */ h(
3111
- H,
3134
+ /* @__PURE__ */ m(
3135
+ q,
3112
3136
  {
3113
3137
  color: "primary",
3114
3138
  className: "step-button",
3115
3139
  variant: "outlined",
3116
- onClick: () => n(),
3140
+ onClick: () => r(),
3117
3141
  "aria-label": d("_accessibility:ariaLabels.next"),
3118
3142
  children: d("_accessibility:buttons.next")
3119
3143
  }
3120
3144
  )
3121
3145
  ] }) })
3122
3146
  ] });
3123
- }, ur = (r) => {
3147
+ }, gn = (n) => {
3124
3148
  const {
3125
3149
  steps: e,
3126
3150
  signInPath: s = "/auth/sign-in",
3127
3151
  guestPath: t = "/",
3128
- onSkip: n,
3152
+ onSkip: r,
3129
3153
  onSignIn: o,
3130
3154
  onStartAsGuest: i
3131
- } = r, { setGuestMode: c } = Ke(), { navigate: a } = ce(), [l, u] = R(1), d = S(() => {
3132
- if (n) {
3133
- n();
3155
+ } = n, c = je(), { navigate: a } = ie(), [l, u] = R(1), d = S(() => {
3156
+ if (r) {
3157
+ r();
3134
3158
  return;
3135
3159
  }
3136
3160
  a(s);
3137
- }, [a, n, s]), m = S(() => {
3161
+ }, [a, r, s]), h = S(() => {
3138
3162
  if (o) {
3139
3163
  o();
3140
3164
  return;
3141
3165
  }
3142
3166
  a(s);
3143
- }, [a, o, s]), f = S(() => {
3167
+ }, [a, o, s]), p = S(() => {
3144
3168
  if (i) {
3145
3169
  i();
3146
3170
  return;
3147
3171
  }
3148
- c(!0), a(t);
3149
- }, [t, a, i, c]), p = V(() => e.map((b, g) => ({
3150
- id: g + 1,
3172
+ c == null || c.setGuestMode(!0), a(t);
3173
+ }, [c, t, a, i]), f = B(() => e.map((b, y) => ({
3174
+ id: y + 1,
3151
3175
  label: "",
3152
- content: /* @__PURE__ */ h(
3153
- us,
3176
+ content: /* @__PURE__ */ m(
3177
+ ms,
3154
3178
  {
3155
3179
  ...b,
3156
- final: g === e.length - 1,
3157
- onClickNext: () => u((y) => y + 1),
3180
+ final: y === e.length - 1,
3181
+ onClickNext: () => u((g) => g + 1),
3158
3182
  onSkip: d,
3159
- onStartAsGuest: f,
3160
- onSignIn: m
3183
+ onStartAsGuest: p,
3184
+ onSignIn: h
3161
3185
  }
3162
3186
  )
3163
- })), [m, d, f, e]);
3164
- return /* @__PURE__ */ h("div", { className: "onboarding-main", children: /* @__PURE__ */ h(
3165
- ls,
3187
+ })), [h, d, p, e]);
3188
+ return /* @__PURE__ */ m("div", { className: "onboarding-main", children: /* @__PURE__ */ m(
3189
+ ds,
3166
3190
  {
3167
3191
  currentTab: l,
3168
3192
  onTabChange: (b) => u(Number(b)),
3169
- tabs: p,
3193
+ tabs: f,
3170
3194
  useLinks: !1
3171
3195
  }
3172
3196
  ) });
3173
- }, ds = (r) => {
3197
+ }, hs = (n, e) => e === "/" ? n === "/" : n.startsWith(e), fs = (n) => {
3198
+ const e = n.filter((s) => !s.hidden);
3199
+ return {
3200
+ leftItems: e.filter((s) => s.position !== "right"),
3201
+ rightItems: e.filter((s) => s.position === "right")
3202
+ };
3203
+ }, xe = ({
3204
+ item: n,
3205
+ isActive: e,
3206
+ linkComponent: s
3207
+ }) => {
3208
+ const o = `flex flex-col items-center justify-center gap-0.5 flex-1 py-2 transition-colors ${e ? "text-hover-primary" : "text-text-muted/60"}`.trim(), i = n.ariaLabel ?? n.label;
3209
+ return n.disabled ? /* @__PURE__ */ E(
3210
+ "span",
3211
+ {
3212
+ className: `${o} opacity-50 cursor-not-allowed`,
3213
+ "aria-disabled": !0,
3214
+ children: [
3215
+ /* @__PURE__ */ m("span", { className: "text-lg", children: /* @__PURE__ */ m(F, { icon: n.icon }) }),
3216
+ /* @__PURE__ */ m("span", { className: "text-[10px] leading-tight", children: n.label })
3217
+ ]
3218
+ }
3219
+ ) : /* @__PURE__ */ E(s, { to: n.to, className: o, "aria-label": i, children: [
3220
+ /* @__PURE__ */ m("span", { className: "text-lg", children: /* @__PURE__ */ m(F, { icon: n.icon }) }),
3221
+ /* @__PURE__ */ m("span", { className: "text-[10px] leading-tight", children: n.label })
3222
+ ] });
3223
+ }, bn = (n) => {
3224
+ const { items: e, centerAction: s, className: t = "", isItemActive: r } = n, { location: o, navigate: i, linkComponent: c } = ie(), { leftItems: a, rightItems: l } = B(
3225
+ () => fs(e),
3226
+ [e]
3227
+ ), {
3228
+ hidden: u,
3229
+ to: d,
3230
+ icon: h = Nt,
3231
+ ariaLabel: p = "Bottom navigation action",
3232
+ onClick: f,
3233
+ variant: b = "submit",
3234
+ color: y = "primary",
3235
+ className: g = "",
3236
+ ...C
3237
+ } = s ?? {}, w = !!s && !u, k = (v) => r ? r(o.pathname, v) : hs(o.pathname, v.to);
3238
+ return /* @__PURE__ */ m(
3239
+ "nav",
3240
+ {
3241
+ className: `fixed -bottom-1 left-0 right-0 z-20 bg-base border-t border-border sm:hidden ${t}`.trim(),
3242
+ children: /* @__PURE__ */ E("div", { className: "flex items-center justify-around h-16", children: [
3243
+ a.map((v) => /* @__PURE__ */ m(
3244
+ xe,
3245
+ {
3246
+ item: v,
3247
+ isActive: k(v),
3248
+ linkComponent: c
3249
+ },
3250
+ v.id
3251
+ )),
3252
+ w && /* @__PURE__ */ m("div", { className: "flex items-center justify-center flex-1", children: /* @__PURE__ */ m(
3253
+ z,
3254
+ {
3255
+ ...C,
3256
+ type: "button",
3257
+ variant: b,
3258
+ color: y,
3259
+ icon: h,
3260
+ name: p,
3261
+ "aria-label": p,
3262
+ onClick: (v) => {
3263
+ f == null || f(v), !v.defaultPrevented && d && i(d);
3264
+ },
3265
+ className: `rounded-full! w-12! h-12! min-w-0! p-0! flex items-center justify-center shadow-lg -mt-4 ${g}`.trim()
3266
+ }
3267
+ ) }),
3268
+ l.map((v) => /* @__PURE__ */ m(
3269
+ xe,
3270
+ {
3271
+ item: v,
3272
+ isActive: k(v),
3273
+ linkComponent: c
3274
+ },
3275
+ v.id
3276
+ ))
3277
+ ] })
3278
+ }
3279
+ );
3280
+ }, ps = (n) => {
3174
3281
  const {
3175
3282
  message: e,
3176
3283
  messageProps: s = { className: "empty-message" },
3177
3284
  action: t,
3178
- iconProps: n
3179
- } = r;
3180
- return /* @__PURE__ */ v("div", { className: "empty-container", children: [
3181
- n && /* @__PURE__ */ h(q, { ...n }),
3182
- /* @__PURE__ */ h("p", { ...s, children: e }),
3183
- t && /* @__PURE__ */ h(ut, { showTooltips: !1, showText: !0, ...t })
3285
+ iconProps: r
3286
+ } = n;
3287
+ return /* @__PURE__ */ E("div", { className: "empty-container", children: [
3288
+ r && /* @__PURE__ */ m(F, { ...r }),
3289
+ /* @__PURE__ */ m("p", { ...s, children: e }),
3290
+ t && /* @__PURE__ */ m(dt, { showTooltips: !1, showText: !0, ...t })
3184
3291
  ] });
3185
3292
  };
3186
3293
  export {
3187
3294
  de as APIClient,
3188
- fr as Action,
3189
- pr as Actions,
3190
- gr as ActionsDropdown,
3295
+ Cn as Action,
3296
+ vn as Actions,
3297
+ Tn as ActionsDropdown,
3191
3298
  z as AppIconButton,
3192
- Ot as AuthClient,
3193
- Ce as AuthContext,
3194
- js as AuthProvider,
3195
- Ds as BaseClient,
3196
- br as Button,
3197
- Hs as ConfigProvider,
3198
- As as ConfirmationDialog,
3199
- be as Dialog,
3200
- ye as DialogActions,
3201
- Vs as Drawer,
3299
+ Ut as AuthClient,
3300
+ me as AuthContext,
3301
+ Bs as AuthProvider,
3302
+ _s as BaseClient,
3303
+ bn as BottomNavigation,
3304
+ kn as Button,
3305
+ Gs as ConfigProvider,
3306
+ Ls as ConfirmationDialog,
3307
+ ye as Dialog,
3308
+ we as DialogActions,
3309
+ Ys as Drawer,
3202
3310
  qe as DrawerMenuContext,
3203
- Bs as DrawerMenuProvider,
3204
- ds as Empty,
3205
- rr as Error,
3206
- Es as FormContainer,
3207
- Ns as FormDialog,
3311
+ Js as DrawerMenuProvider,
3312
+ ps as Empty,
3313
+ ln as Error,
3314
+ xs as FormContainer,
3315
+ Ds as FormDialog,
3208
3316
  J as GlobalActions,
3209
- xs as IManager,
3317
+ Is as IManager,
3210
3318
  z as IconButton,
3211
- $s as ImportDialog,
3212
- Ls as IndexedDBClient,
3213
- Ks as ManagerProvider,
3319
+ Rs as ImportDialog,
3320
+ Ps as IndexedDBClient,
3321
+ qs as ManagerProvider,
3214
3322
  P as Methods,
3215
- ar as Navbar,
3216
- Ge as NavbarContext,
3217
- ir as NavbarProvider,
3218
- cr as Notification,
3323
+ hn as Navbar,
3324
+ ze as NavbarContext,
3325
+ mn as NavbarProvider,
3326
+ fn as Notification,
3219
3327
  O as NotificationEnumType,
3220
- Fs as NotificationProvider,
3221
- ur as Onboarding,
3222
- nr as Page,
3223
- vs as ParagraphInput,
3224
- ks as PasswordInput,
3225
- or as PrettyGrid,
3226
- lr as SplashScreen,
3227
- us as Step,
3228
- Qs as SupabaseAuthProvider,
3229
- Rs as SupabaseDataClient,
3230
- je as SupabaseManagerContext,
3231
- qs as SupabaseManagerProvider,
3232
- cs as Tab,
3233
- ls as TabsLayout,
3234
- sr as ToTop,
3235
- Pt as buildQueryUrl,
3236
- Te as createQueryClient,
3237
- Is as enumToKeyValueArray,
3238
- Ms as formatForDatetimeLocal,
3239
- G as fromLocal,
3240
- _s as getFormattedDateTime,
3241
- Ps as getShortFormattedDateTime,
3242
- Se as isHttpError,
3243
- Ht as isMac,
3244
- we as isValidationError,
3245
- me as makeRequest,
3246
- ke as mapSupabaseSessionToSessionDto,
3247
- Os as mapValidationErrors,
3248
- Oe as parseQueries,
3249
- Us as queryClient,
3328
+ Qs as NotificationProvider,
3329
+ gn as Onboarding,
3330
+ un as Page,
3331
+ As as ParagraphInput,
3332
+ $s as PasswordInput,
3333
+ dn as PrettyGrid,
3334
+ pn as SplashScreen,
3335
+ ms as Step,
3336
+ Ws as SupabaseAuthProvider,
3337
+ Ms as SupabaseDataClient,
3338
+ Qe as SupabaseManagerContext,
3339
+ zs as SupabaseManagerProvider,
3340
+ us as Tab,
3341
+ ds as TabsLayout,
3342
+ cn as ToTop,
3343
+ Ot as buildQueryUrl,
3344
+ ve as createQueryClient,
3345
+ Os as enumToKeyValueArray,
3346
+ Ks as formatForDatetimeLocal,
3347
+ W as fromLocal,
3348
+ Fs as getFormattedDateTime,
3349
+ Us as getShortFormattedDateTime,
3350
+ Ce as isHttpError,
3351
+ Vt as isMac,
3352
+ Se as isValidationError,
3353
+ he as makeRequest,
3354
+ Ee as mapSupabaseSessionToSessionDto,
3355
+ js as mapValidationErrors,
3356
+ Fe as parseQueries,
3357
+ Hs as queryClient,
3250
3358
  I as removeFromLocal,
3251
- Q as toLocal,
3252
- Ke as useAuth,
3253
- Vt as useAuthContext,
3254
- ce as useConfig,
3255
- He as useConfirmationForm,
3256
- Xt as useDeleteAction,
3257
- Js as useDeleteDialog,
3258
- Be as useDialog,
3259
- zt as useDrawerMenu,
3260
- zs as useEditAction,
3261
- es as useExportAction,
3262
- tr as useExportActionMutate,
3263
- Ve as useFormDialog,
3264
- ts as useImportAction,
3265
- er as useImportDialog,
3266
- Bt as useManager,
3267
- ns as useNavbar,
3359
+ H as toLocal,
3360
+ Vs as useAuth,
3361
+ zt as useAuthContext,
3362
+ ie as useConfig,
3363
+ Be as useConfirmationForm,
3364
+ es as useDeleteAction,
3365
+ tn as useDeleteDialog,
3366
+ Ve as useDialog,
3367
+ Yt as useDrawerMenu,
3368
+ en as useEditAction,
3369
+ ss as useExportAction,
3370
+ an as useExportActionMutate,
3371
+ We as useFormDialog,
3372
+ ns as useImportAction,
3373
+ on as useImportDialog,
3374
+ Wt as useManager,
3375
+ is as useNavbar,
3268
3376
  oe as useNotification,
3269
- Ys as usePostDialog,
3270
- Ws as usePostForm,
3271
- Xs as usePutDialog,
3272
- Zt as useRestoreAction,
3273
- Zs as useRestoreDialog,
3274
- ss as useScrollTrigger,
3377
+ je as useOptionalAuthContext,
3378
+ sn as usePostDialog,
3379
+ Zs as usePostForm,
3380
+ nn as usePutDialog,
3381
+ ts as useRestoreAction,
3382
+ rn as useRestoreDialog,
3383
+ rs as useScrollTrigger,
3275
3384
  Gt as useSupabase,
3276
- Gs as useTimeAge
3385
+ Xs as useTimeAge
3277
3386
  };