@sito/dashboard-app 0.0.54 → 0.0.55

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