@sito/dashboard-app 0.0.13 → 0.0.14

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.
@@ -5,8 +5,8 @@ import "./main.css";
5
5
  import { useTranslation as D, State as bs, inputStateClassName as ps, labelStateClassName as ws, helperTextStateClassName as vs, Loading as qe, TextInput as xs, useTableOptions as _s, Badge as Cs } from "@sito/dashboard";
6
6
  export * from "@sito/dashboard";
7
7
  import { jsxs as A, jsx as y, Fragment as Le } from "react/jsx-runtime";
8
- import ee, { useRef as Vt, useCallback as $, useEffect as te, useReducer as Ss, createContext as Be, useContext as je, useState as X, forwardRef as Pt, useMemo as De } from "react";
9
- import { faTrash as ks, faRotateLeft as Mt, faPencil as Ns, faCircleNotch as Ot, faCloudArrowDown as As, faCloudUpload as Es, faArrowUp as $s, faEllipsisV as Fs, faEyeSlash as Ts, faEye as Ls, faClose as It, faArrowLeft as Ds, faAdd as bt, faFilter as Vs, faBars as Ps, faSearch as Ms, faCircleCheck as Os, faWarning as Is } from "@fortawesome/free-solid-svg-icons";
8
+ import ee, { useRef as Vt, useCallback as F, useEffect as te, useReducer as Ss, createContext as Be, useContext as je, useState as X, forwardRef as Pt, useMemo as De } from "react";
9
+ import { faTrash as ks, faRotateLeft as Mt, faPencil as Ns, faCircleNotch as Ot, faCloudArrowDown as As, faCloudUpload as Es, faArrowUp as Fs, faEllipsisV as $s, faEyeSlash as Ts, faEye as Ls, faClose as It, faArrowLeft as Ds, faAdd as bt, faFilter as Vs, faBars as Ps, faSearch as Ms, faCircleCheck as Os, faWarning as Is } from "@fortawesome/free-solid-svg-icons";
10
10
  import { FontAwesomeIcon as ie } from "@fortawesome/react-fontawesome";
11
11
  import { createPortal as Ut } from "react-dom";
12
12
  import { css as Us } from "@emotion/css";
@@ -21,14 +21,14 @@ function Rt(e) {
21
21
  children: n,
22
22
  hidden: c = !1,
23
23
  disabled: a = !1,
24
- showText: m = !1,
24
+ showText: d = !1,
25
25
  showTooltips: h = !0
26
26
  } = e;
27
27
  return c ? null : /* @__PURE__ */ A(
28
28
  "button",
29
29
  {
30
30
  id: t,
31
- className: `action ${m ? "text-action" : "icon-action"}`,
31
+ className: `action ${d ? "text-action" : "icon-action"}`,
32
32
  disabled: a,
33
33
  onClick: () => i(),
34
34
  "aria-disabled": a,
@@ -37,7 +37,7 @@ function Rt(e) {
37
37
  children: [
38
38
  s,
39
39
  " ",
40
- m && r,
40
+ d && r,
41
41
  n
42
42
  ]
43
43
  }
@@ -61,13 +61,13 @@ function qt(e) {
61
61
  ) }, n.id)) });
62
62
  }
63
63
  const Hs = (e) => {
64
- const { children: t, open: s, onClose: r } = e, i = Vt(null), n = $(
64
+ const { children: t, open: s, onClose: r } = e, i = Vt(null), n = F(
65
65
  (a) => {
66
- const m = i.current;
67
- !s || !m || m.contains(a.target) || r();
66
+ const d = i.current;
67
+ !s || !d || d.contains(a.target) || r();
68
68
  },
69
69
  [s, r]
70
- ), c = $(
70
+ ), c = F(
71
71
  (a) => {
72
72
  s && a.key === "Escape" && r();
73
73
  },
@@ -102,14 +102,14 @@ const Hs = (e) => {
102
102
  variant: n = "text",
103
103
  color: c = "default",
104
104
  iconClassName: a = "",
105
- ...m
105
+ ...d
106
106
  } = e;
107
107
  return /* @__PURE__ */ A(
108
108
  "button",
109
109
  {
110
110
  type: r,
111
111
  className: `icon-button ${i} ${n} ${c}`,
112
- ...m,
112
+ ...d,
113
113
  children: [
114
114
  /* @__PURE__ */ y(ie, { icon: s, className: `!w-auto ${a}` }),
115
115
  t
@@ -131,44 +131,44 @@ var Xe, pt;
131
131
  function Qs() {
132
132
  if (pt) return Xe;
133
133
  pt = 1;
134
- const e = (a, m = "local", h = void 0) => {
135
- if (m === "local") {
134
+ const e = (a, d = "local", h = void 0) => {
135
+ if (d === "local") {
136
136
  if (localStorage.getItem(a) !== void 0 && localStorage.getItem(a) !== "undefined" && localStorage.getItem(a) !== null)
137
137
  return h === void 0 || h !== void 0 && localStorage.getItem(a) === h;
138
- } else if (m === "session" && sessionStorage.getItem(a) !== void 0 && sessionStorage.getItem(a) !== "undefined" && sessionStorage.getItem(a) !== null)
138
+ } else if (d === "session" && sessionStorage.getItem(a) !== void 0 && sessionStorage.getItem(a) !== "undefined" && sessionStorage.getItem(a) !== null)
139
139
  return h === void 0 || h !== void 0 && sessionStorage.getItem(a) === h;
140
140
  return !1;
141
141
  }, t = (a) => {
142
- const m = {};
143
- return a.substring(1).split("&").forEach((d) => {
144
- const [g, f] = d.split("=");
145
- m[g] = f;
146
- }), m;
142
+ const d = {};
143
+ return a.substring(1).split("&").forEach((f) => {
144
+ const [g, m] = f.split("=");
145
+ d[g] = m;
146
+ }), d;
147
147
  }, s = (a = "") => {
148
148
  if (n(a) && a.length) return n(a);
149
149
  {
150
- let m = navigator.language || navigator.userLanguage;
151
- if (m.indexOf("en") < 0 && m.indexOf("es") < 0 && (m = "en-US"), m = m.split("-")[0], m)
152
- return a.length && i(a, 730, m), m;
150
+ let d = navigator.language || navigator.userLanguage;
151
+ if (d.indexOf("en") < 0 && d.indexOf("es") < 0 && (d = "en-US"), d = d.split("-")[0], d)
152
+ return a.length && i(a, 730, d), d;
153
153
  }
154
154
  return "en";
155
- }, r = (a = 0, m = 0, h = window, d = "smooth") => h.scroll({
155
+ }, r = (a = 0, d = 0, h = window, f = "smooth") => h.scroll({
156
156
  top: a,
157
- left: m,
158
- behavior: d
159
- }), i = (a, m, h, d = "/", g = "Lax") => {
160
- var f = /* @__PURE__ */ new Date();
161
- f.setTime(f.getTime() + m * 24 * 60 * 60 * 1e3);
162
- const x = "; expires=" + f.toUTCString();
163
- document.cookie = `${a}=${h || ""}${x};path=${d};SameSite=${g}`;
157
+ left: d,
158
+ behavior: f
159
+ }), i = (a, d, h, f = "/", g = "Lax") => {
160
+ var m = /* @__PURE__ */ new Date();
161
+ m.setTime(m.getTime() + d * 24 * 60 * 60 * 1e3);
162
+ const x = "; expires=" + m.toUTCString();
163
+ document.cookie = `${a}=${h || ""}${x};path=${f};SameSite=${g}`;
164
164
  }, n = (a) => {
165
- const m = `${a}=`, d = decodeURIComponent(document.cookie).split(";");
166
- for (let g = 0; g < d.length; g += 1) {
167
- let f = d[g];
168
- for (; f.charAt(0) === " "; )
169
- f = f.substring(1);
170
- if (f.indexOf(m) === 0)
171
- return f.substring(m.length, f.length);
165
+ const d = `${a}=`, f = decodeURIComponent(document.cookie).split(";");
166
+ for (let g = 0; g < f.length; g += 1) {
167
+ let m = f[g];
168
+ for (; m.charAt(0) === " "; )
169
+ m = m.substring(1);
170
+ if (m.indexOf(d) === 0)
171
+ return m.substring(d.length, m.length);
172
172
  }
173
173
  return "";
174
174
  };
@@ -185,10 +185,10 @@ function Qs() {
185
185
  var Ks = Qs();
186
186
  function Qr() {
187
187
  const { t: e, language: t } = D();
188
- return { timeAge: $(
188
+ return { timeAge: F(
189
189
  (r) => {
190
- const n = /* @__PURE__ */ new Date() - r, c = Math.floor(n / (1e3 * 60)), a = Math.floor(c / 60), m = t === "es", h = e("_accessibility:labels.ago"), d = e("_accessibility:labels.minute"), g = e("_accessibility:labels.minutes"), f = e("_accessibility:labels.hour"), x = e("_accessibility:labels.hours"), C = e("_accessibility:labels.yesterday"), S = e("_accessibility:labels.justNow");
191
- return n < 1e3 * 60 ? S : c < 60 ? `${m ? h : ""} ${c} ${c === 1 ? d : g} ${m ? "" : h}` : a < 24 ? `${m ? h : ""} ${a} ${a === 1 ? f : x} ${m ? "" : h}` : a < 48 ? C : r.toLocaleDateString(navigator.language || "es-ES", {
190
+ const n = /* @__PURE__ */ new Date() - r, c = Math.floor(n / (1e3 * 60)), a = Math.floor(c / 60), d = t === "es", h = e("_accessibility:labels.ago"), f = e("_accessibility:labels.minute"), g = e("_accessibility:labels.minutes"), m = e("_accessibility:labels.hour"), x = e("_accessibility:labels.hours"), C = e("_accessibility:labels.yesterday"), S = e("_accessibility:labels.justNow");
191
+ return n < 1e3 * 60 ? S : c < 60 ? `${d ? h : ""} ${c} ${c === 1 ? f : g} ${d ? "" : h}` : a < 24 ? `${d ? h : ""} ${a} ${a === 1 ? m : x} ${d ? "" : h}` : a < 48 ? C : r.toLocaleDateString(navigator.language || "es-ES", {
192
192
  day: "2-digit",
193
193
  month: "2-digit",
194
194
  year: "numeric"
@@ -212,10 +212,10 @@ async function Ae(e, t = "GET", s, r) {
212
212
  };
213
213
  try {
214
214
  const a = await fetch(e, n), h = ((c = a.headers.get("content-type")) == null ? void 0 : c.includes("application/json")) ? await a.json() : null;
215
- let d = null;
215
+ let f = null;
216
216
  if (!a.ok || Ws(a.status)) {
217
217
  const g = await a.text();
218
- g && (d = {
218
+ g && (f = {
219
219
  status: a.status,
220
220
  message: g
221
221
  });
@@ -223,7 +223,7 @@ async function Ae(e, t = "GET", s, r) {
223
223
  return {
224
224
  data: a.ok && a.status !== 204 ? h : null,
225
225
  status: a.status,
226
- error: d
226
+ error: f
227
227
  };
228
228
  } catch (a) {
229
229
  return {
@@ -293,7 +293,7 @@ class jt {
293
293
  return { Authorization: `Bearer ${s}` };
294
294
  }
295
295
  async doQuery(t, s = Y.GET, r, i) {
296
- const n = this.secured ? this.defaultTokenAcquirer() : {}, { data: c, status: a } = await Ae(
296
+ const n = this.secured ? this.defaultTokenAcquirer() : {}, { data: c, status: a, error: d } = await Ae(
297
297
  `${this.baseUrl}${t}`,
298
298
  s,
299
299
  r,
@@ -302,7 +302,11 @@ class jt {
302
302
  ...i ?? {}
303
303
  }
304
304
  );
305
- if (a < 200 || a >= 300) throw new Error(String(a));
305
+ if (d || a < 200 || a >= 300)
306
+ throw d ?? {
307
+ status: a,
308
+ message: String(a)
309
+ };
306
310
  return c;
307
311
  }
308
312
  /**
@@ -318,7 +322,7 @@ class jt {
318
322
  null,
319
323
  n
320
324
  );
321
- if (a) throw new Error(`${a.status} ${a.message}`);
325
+ if (a) throw a;
322
326
  return c;
323
327
  }
324
328
  /**
@@ -328,13 +332,17 @@ class jt {
328
332
  * @returns updated entity
329
333
  */
330
334
  async patch(t, s) {
331
- const r = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: n } = await Ae(
335
+ const r = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: n, status: c } = await Ae(
332
336
  `${this.baseUrl}${t}`,
333
337
  Y.PATCH,
334
338
  s,
335
339
  r
336
340
  );
337
- if (i || !n) throw new Error(i == null ? void 0 : i.message);
341
+ if (i || !n)
342
+ throw i ?? {
343
+ status: c,
344
+ message: "Unknown error"
345
+ };
338
346
  return n;
339
347
  }
340
348
  /**
@@ -343,13 +351,17 @@ class jt {
343
351
  * @returns delete result
344
352
  */
345
353
  async delete(t, s) {
346
- const r = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: n } = await Ae(
354
+ const r = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: n, status: c } = await Ae(
347
355
  `${this.baseUrl}${t}`,
348
356
  Y.DELETE,
349
357
  s,
350
358
  r
351
359
  );
352
- if (i || !n) throw new Error(i == null ? void 0 : i.message);
360
+ if (i || !n)
361
+ throw i ?? {
362
+ status: c,
363
+ message: "Unknown error"
364
+ };
353
365
  return n;
354
366
  }
355
367
  /**
@@ -359,14 +371,17 @@ class jt {
359
371
  * @returns inserted item
360
372
  */
361
373
  async post(t, s) {
362
- const r = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: n } = await Ae(
374
+ const r = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: n, status: c } = await Ae(
363
375
  `${this.baseUrl}${t}`,
364
376
  Y.POST,
365
377
  s,
366
378
  r
367
379
  );
368
380
  if (i || !n)
369
- throw new Error((i == null ? void 0 : i.message) ?? String(i == null ? void 0 : i.status));
381
+ throw i ?? {
382
+ status: c,
383
+ message: "Unknown error"
384
+ };
370
385
  return n;
371
386
  }
372
387
  }
@@ -571,11 +586,11 @@ const Js = () => {
571
586
  }, Qt = Be({});
572
587
  function Jr(e) {
573
588
  const { children: t } = e, [s, r] = Ss(
574
- (h, d) => {
575
- const { type: g, items: f, index: x } = d;
589
+ (h, f) => {
590
+ const { type: g, items: m, index: x } = f;
576
591
  switch (g) {
577
592
  case "set":
578
- return (f == null ? void 0 : f.map((C, S) => ({
593
+ return (m == null ? void 0 : m.map((C, S) => ({
579
594
  ...C,
580
595
  id: S
581
596
  }))) ?? [];
@@ -595,13 +610,13 @@ function Jr(e) {
595
610
  }), c = (h) => r({ type: "set", items: h }), a = (h) => r({
596
611
  type: "set",
597
612
  items: [{ ...h, type: B.success }]
598
- }), m = (h) => r({ type: "remove", index: h });
613
+ }), d = (h) => r({ type: "remove", index: h });
599
614
  return /* @__PURE__ */ y(
600
615
  Qt.Provider,
601
616
  {
602
617
  value: {
603
618
  notification: s,
604
- removeNotification: m,
619
+ removeNotification: d,
605
620
  showErrorNotification: i,
606
621
  showNotification: n,
607
622
  showSuccessNotification: a,
@@ -637,33 +652,33 @@ const ke = () => {
637
652
  throw new Error("managerContext must be used within a Provider");
638
653
  return e.client;
639
654
  }, Wt = Be({}), Xr = (e) => {
640
- const { children: t, guestMode: s = "guest_mode", user: r = "user" } = e, i = Ys(), [n, c] = X({}), a = $(() => !!Ht(s, "boolean") && n.token === void 0, [n.token]), m = $((x) => {
655
+ const { children: t, guestMode: s = "guest_mode", user: r = "user" } = e, i = Ys(), [n, c] = X({}), a = F(() => !!Ht(s, "boolean") && n.token === void 0, [n.token]), d = F((x) => {
641
656
  wt(s, x);
642
- }, []), h = $((x) => {
657
+ }, []), h = F((x) => {
643
658
  x && (c(x), vt(s), wt(r, x.token));
644
- }, []), d = $(async () => {
659
+ }, []), f = F(async () => {
645
660
  try {
646
661
  await i.Auth.logout();
647
662
  } catch (x) {
648
663
  console.error(x);
649
664
  }
650
665
  c({}), vt(r);
651
- }, [i.Auth]), g = $(async () => {
666
+ }, [i.Auth]), g = F(async () => {
652
667
  try {
653
668
  const x = await i.Auth.getSession();
654
669
  h(x);
655
670
  } catch (x) {
656
- console.error(x), d();
671
+ console.error(x), f();
657
672
  }
658
- }, [h, d, i.Auth]), f = {
673
+ }, [h, f, i.Auth]), m = {
659
674
  account: n,
660
675
  logUser: h,
661
- logoutUser: d,
676
+ logoutUser: f,
662
677
  logUserFromLocal: g,
663
678
  isInGuestMode: a,
664
- setGuestMode: m
679
+ setGuestMode: d
665
680
  };
666
- return /* @__PURE__ */ y(Wt.Provider, { value: f, children: t });
681
+ return /* @__PURE__ */ y(Wt.Provider, { value: m, children: t });
667
682
  }, zt = () => {
668
683
  const e = je(Wt);
669
684
  if (e === void 0)
@@ -686,10 +701,10 @@ const ke = () => {
686
701
  );
687
702
  return e;
688
703
  }, Jt = (e) => {
689
- const { showSuccessNotification: t } = ke(), { mutationFn: s, onError: r, onSuccess: i, onSuccessMessage: n } = e, [c, a] = X([]), { open: m, handleClose: h, handleOpen: d } = is(), g = () => {
704
+ const { showSuccessNotification: t } = ke(), { mutationFn: s, onError: r, onSuccess: i, onSuccessMessage: n } = e, [c, a] = X([]), { open: d, handleClose: h, handleOpen: f } = is(), g = () => {
690
705
  h(), a([]);
691
- }, f = async (C) => {
692
- a(C), d();
706
+ }, m = async (C) => {
707
+ a(C), f();
693
708
  }, x = He({
694
709
  mutationFn: () => s(
695
710
  Array.isArray(c) ? c : [c]
@@ -703,7 +718,7 @@ const ke = () => {
703
718
  }), g();
704
719
  }
705
720
  });
706
- return { open: m, onClick: f, close: g, dialogFn: x, isLoading: x.isPending };
721
+ return { open: d, onClick: m, close: g, dialogFn: x, isLoading: x.isPending };
707
722
  };
708
723
  var Ve = (e) => e.type === "checkbox", Ce = (e) => e instanceof Date, z = (e) => e == null;
709
724
  const Yt = (e) => typeof e == "object";
@@ -736,14 +751,14 @@ var Ke = (e) => /^\w*$/.test(e), R = (e) => e === void 0, st = (e) => Array.isAr
736
751
  const i = Ke(t) ? [t] : rt(t), n = i.length, c = n - 1;
737
752
  for (; ++r < n; ) {
738
753
  const a = i[r];
739
- let m = s;
754
+ let d = s;
740
755
  if (r !== c) {
741
756
  const h = e[a];
742
- m = I(h) || Array.isArray(h) ? h : isNaN(+i[r + 1]) ? {} : [];
757
+ d = I(h) || Array.isArray(h) ? h : isNaN(+i[r + 1]) ? {} : [];
743
758
  }
744
759
  if (a === "__proto__" || a === "constructor" || a === "prototype")
745
760
  return;
746
- e[a] = m, e = e[a];
761
+ e[a] = d, e = e[a];
747
762
  }
748
763
  };
749
764
  const _t = {
@@ -809,7 +824,7 @@ var or = (e, t, s, r, i) => t ? {
809
824
  ...s[e] && s[e].types ? s[e].types : {},
810
825
  [r]: i || !0
811
826
  }
812
- } : {}, Fe = (e) => Array.isArray(e) ? e : [e], Ct = () => {
827
+ } : {}, $e = (e) => Array.isArray(e) ? e : [e], Ct = () => {
813
828
  let e = [];
814
829
  return {
815
830
  get observers() {
@@ -913,15 +928,15 @@ var ur = (e, t, s, r) => {
913
928
  fields: i,
914
929
  shouldUseNativeValidation: r
915
930
  };
916
- }, Re = (e) => e instanceof RegExp, $e = (e) => R(e) ? e : Re(e) ? e.source : I(e) ? Re(e.value) ? e.value.source : e.value : e, Et = (e) => ({
931
+ }, Re = (e) => e instanceof RegExp, Fe = (e) => R(e) ? e : Re(e) ? e.source : I(e) ? Re(e.value) ? e.value.source : e.value : e, Et = (e) => ({
917
932
  isOnSubmit: !e || e === ce.onSubmit,
918
933
  isOnBlur: e === ce.onBlur,
919
934
  isOnChange: e === ce.onChange,
920
935
  isOnAll: e === ce.all,
921
936
  isOnTouch: e === ce.onTouched
922
937
  });
923
- const $t = "AsyncFunction";
924
- var dr = (e) => !!e && !!e.validate && !!(le(e.validate) && e.validate.constructor.name === $t || I(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === $t)), fr = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Ft = (e, t, s) => !s && (t.watchAll || t.watch.has(e) || [...t.watch].some((r) => e.startsWith(r) && /^\.\w+/.test(e.slice(r.length))));
938
+ const Ft = "AsyncFunction";
939
+ var dr = (e) => !!e && !!e.validate && !!(le(e.validate) && e.validate.constructor.name === Ft || I(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === Ft)), fr = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), $t = (e, t, s) => !s && (t.watchAll || t.watch.has(e) || [...t.watch].some((r) => e.startsWith(r) && /^\.\w+/.test(e.slice(r.length))));
925
940
  const Te = (e, t, s, r) => {
926
941
  for (const i of s || Object.keys(e)) {
927
942
  const n = v(e, i);
@@ -971,8 +986,8 @@ var mr = (e, t, s, r) => {
971
986
  s(e);
972
987
  const { name: i, ...n } = e;
973
988
  return J(n) || Object.keys(n).length >= Object.keys(t).length || Object.keys(n).find((c) => t[c] === (!r || ce.all));
974
- }, hr = (e, t, s) => !e || !t || e === t || Fe(e).some((r) => r && (s ? r === t : r.startsWith(t) || t.startsWith(r))), yr = (e, t, s, r, i) => i.isOnAll ? !1 : !s && i.isOnTouch ? !(t || e) : (s ? r.isOnBlur : i.isOnBlur) ? !e : (s ? r.isOnChange : i.isOnChange) ? e : !0, gr = (e, t) => !st(v(e, t)).length && U(e, t), br = (e, t, s) => {
975
- const r = Fe(v(e, s));
989
+ }, hr = (e, t, s) => !e || !t || e === t || $e(e).some((r) => r && (s ? r === t : r.startsWith(t) || t.startsWith(r))), yr = (e, t, s, r, i) => i.isOnAll ? !1 : !s && i.isOnTouch ? !(t || e) : (s ? r.isOnBlur : i.isOnBlur) ? !e : (s ? r.isOnChange : i.isOnChange) ? e : !0, gr = (e, t) => !st(v(e, t)).length && U(e, t), br = (e, t, s) => {
990
+ const r = $e(v(e, s));
976
991
  return M(r, "root", t[s]), M(e, s, r), e;
977
992
  }, Oe = (e) => fe(e);
978
993
  function Lt(e, t, s = "validate") {
@@ -987,7 +1002,7 @@ var Ne = (e) => I(e) && !Re(e) ? e : {
987
1002
  value: e,
988
1003
  message: ""
989
1004
  }, Dt = async (e, t, s, r, i, n) => {
990
- const { ref: c, refs: a, required: m, maxLength: h, minLength: d, min: g, max: f, pattern: x, validate: C, name: S, valueAsNumber: Q, mount: ye } = e._f, k = v(s, S);
1005
+ const { ref: c, refs: a, required: d, maxLength: h, minLength: f, min: g, max: m, pattern: x, validate: C, name: S, valueAsNumber: Q, mount: ye } = e._f, k = v(s, S);
991
1006
  if (!ye || t.has(S))
992
1007
  return {};
993
1008
  const W = a ? a[0] : c, L = (N) => {
@@ -1001,8 +1016,8 @@ var Ne = (e) => I(e) && !Re(e) ? e : {
1001
1016
  ...oe(N ? j : K, V)
1002
1017
  };
1003
1018
  };
1004
- if (n ? !Array.isArray(k) || !k.length : m && (!ve && (q || z(k)) || de(k) && !k || Z && !ts(a).isValid || G && !rs(a).isValid)) {
1005
- const { value: N, message: E } = Oe(m) ? { value: !!m, message: m } : Ne(m);
1019
+ if (n ? !Array.isArray(k) || !k.length : d && (!ve && (q || z(k)) || de(k) && !k || Z && !ts(a).isValid || G && !rs(a).isValid)) {
1020
+ const { value: N, message: E } = Oe(d) ? { value: !!d, message: d } : Ne(d);
1006
1021
  if (N && (T[S] = {
1007
1022
  type: me.required,
1008
1023
  message: E,
@@ -1011,9 +1026,9 @@ var Ne = (e) => I(e) && !Re(e) ? e : {
1011
1026
  }, !r))
1012
1027
  return L(E), T;
1013
1028
  }
1014
- if (!q && (!z(g) || !z(f))) {
1029
+ if (!q && (!z(g) || !z(m))) {
1015
1030
  let N, E;
1016
- const O = Ne(f), j = Ne(g);
1031
+ const O = Ne(m), j = Ne(g);
1017
1032
  if (!z(k) && !isNaN(k)) {
1018
1033
  const K = c.valueAsNumber || k && +k;
1019
1034
  z(O.value) || (N = K > O.value), z(j.value) || (E = K < j.value);
@@ -1024,8 +1039,8 @@ var Ne = (e) => I(e) && !Re(e) ? e : {
1024
1039
  if ((N || E) && (se(!!N, O.message, j.message, me.max, me.min), !r))
1025
1040
  return L(T[S].message), T;
1026
1041
  }
1027
- if ((h || d) && !q && (fe(k) || n && Array.isArray(k))) {
1028
- const N = Ne(h), E = Ne(d), O = !z(N.value) && k.length > +N.value, j = !z(E.value) && k.length < +E.value;
1042
+ if ((h || f) && !q && (fe(k) || n && Array.isArray(k))) {
1043
+ const N = Ne(h), E = Ne(f), O = !z(N.value) && k.length > +N.value, j = !z(E.value) && k.length < +E.value;
1029
1044
  if ((O || j) && (se(O, N.message, E.message), !r))
1030
1045
  return L(T[S].message), T;
1031
1046
  }
@@ -1101,8 +1116,8 @@ function wr(e = {}) {
1101
1116
  unMount: /* @__PURE__ */ new Set(),
1102
1117
  array: /* @__PURE__ */ new Set(),
1103
1118
  watch: /* @__PURE__ */ new Set()
1104
- }, m, h = 0;
1105
- const d = {
1119
+ }, d, h = 0;
1120
+ const f = {
1106
1121
  isDirty: !1,
1107
1122
  dirtyFields: !1,
1108
1123
  validatingFields: !1,
@@ -1112,24 +1127,24 @@ function wr(e = {}) {
1112
1127
  errors: !1
1113
1128
  };
1114
1129
  let g = {
1115
- ...d
1130
+ ...f
1116
1131
  };
1117
- const f = {
1132
+ const m = {
1118
1133
  array: Ct(),
1119
1134
  state: Ct()
1120
1135
  }, x = t.criteriaMode === ce.all, C = (o) => (l) => {
1121
1136
  clearTimeout(h), h = setTimeout(o, l);
1122
1137
  }, S = async (o) => {
1123
- if (!t.disabled && (d.isValid || g.isValid || o)) {
1138
+ if (!t.disabled && (f.isValid || g.isValid || o)) {
1124
1139
  const l = t.resolver ? J((await Z()).errors) : await q(r, !0);
1125
- l !== s.isValid && f.state.next({
1140
+ l !== s.isValid && m.state.next({
1126
1141
  isValid: l
1127
1142
  });
1128
1143
  }
1129
1144
  }, Q = (o, l) => {
1130
- !t.disabled && (d.isValidating || d.validatingFields || g.isValidating || g.validatingFields) && ((o || Array.from(a.mount)).forEach((u) => {
1145
+ !t.disabled && (f.isValidating || f.validatingFields || g.isValidating || g.validatingFields) && ((o || Array.from(a.mount)).forEach((u) => {
1131
1146
  u && (l ? M(s.validatingFields, u, l) : U(s.validatingFields, u));
1132
- }), f.state.next({
1147
+ }), m.state.next({
1133
1148
  validatingFields: s.validatingFields,
1134
1149
  isValidating: !J(s.validatingFields)
1135
1150
  }));
@@ -1143,11 +1158,11 @@ function wr(e = {}) {
1143
1158
  const _ = u(v(s.errors, o), w.argA, w.argB);
1144
1159
  p && M(s.errors, o, _), gr(s.errors, o);
1145
1160
  }
1146
- if ((d.touchedFields || g.touchedFields) && b && Array.isArray(v(s.touchedFields, o))) {
1161
+ if ((f.touchedFields || g.touchedFields) && b && Array.isArray(v(s.touchedFields, o))) {
1147
1162
  const _ = u(v(s.touchedFields, o), w.argA, w.argB);
1148
1163
  p && M(s.touchedFields, o, _);
1149
1164
  }
1150
- (d.dirtyFields || g.dirtyFields) && (s.dirtyFields = Ee(i, n)), f.state.next({
1165
+ (f.dirtyFields || g.dirtyFields) && (s.dirtyFields = Ee(i, n)), m.state.next({
1151
1166
  name: o,
1152
1167
  isDirty: se(o, l),
1153
1168
  dirtyFields: s.dirtyFields,
@@ -1157,11 +1172,11 @@ function wr(e = {}) {
1157
1172
  } else
1158
1173
  M(n, o, l);
1159
1174
  }, k = (o, l) => {
1160
- M(s.errors, o, l), f.state.next({
1175
+ M(s.errors, o, l), m.state.next({
1161
1176
  errors: s.errors
1162
1177
  });
1163
1178
  }, W = (o) => {
1164
- s.errors = o, f.state.next({
1179
+ s.errors = o, m.state.next({
1165
1180
  errors: s.errors,
1166
1181
  isValid: !1
1167
1182
  });
@@ -1173,25 +1188,25 @@ function wr(e = {}) {
1173
1188
  }
1174
1189
  }, T = (o, l, u, w, p) => {
1175
1190
  let b = !1, _ = !1;
1176
- const F = {
1191
+ const $ = {
1177
1192
  name: o
1178
1193
  };
1179
1194
  if (!t.disabled) {
1180
1195
  if (!u || w) {
1181
- (d.isDirty || g.isDirty) && (_ = s.isDirty, s.isDirty = F.isDirty = se(), b = _ !== F.isDirty);
1196
+ (f.isDirty || g.isDirty) && (_ = s.isDirty, s.isDirty = $.isDirty = se(), b = _ !== $.isDirty);
1182
1197
  const P = be(v(i, o), l);
1183
- _ = !!v(s.dirtyFields, o), P ? U(s.dirtyFields, o) : M(s.dirtyFields, o, !0), F.dirtyFields = s.dirtyFields, b = b || (d.dirtyFields || g.dirtyFields) && _ !== !P;
1198
+ _ = !!v(s.dirtyFields, o), P ? U(s.dirtyFields, o) : M(s.dirtyFields, o, !0), $.dirtyFields = s.dirtyFields, b = b || (f.dirtyFields || g.dirtyFields) && _ !== !P;
1184
1199
  }
1185
1200
  if (u) {
1186
1201
  const P = v(s.touchedFields, o);
1187
- P || (M(s.touchedFields, o, u), F.touchedFields = s.touchedFields, b = b || (d.touchedFields || g.touchedFields) && P !== u);
1202
+ P || (M(s.touchedFields, o, u), $.touchedFields = s.touchedFields, b = b || (f.touchedFields || g.touchedFields) && P !== u);
1188
1203
  }
1189
- b && p && f.state.next(F);
1204
+ b && p && m.state.next($);
1190
1205
  }
1191
- return b ? F : {};
1206
+ return b ? $ : {};
1192
1207
  }, G = (o, l, u, w) => {
1193
- const p = v(s.errors, o), b = (d.isValid || g.isValid) && de(l) && s.isValid !== l;
1194
- if (t.delayError && u ? (m = C(() => k(o, u)), m(t.delayError)) : (clearTimeout(h), m = null, u ? M(s.errors, o, u) : U(s.errors, o)), (u ? !be(p, u) : p) || !J(w) || b) {
1208
+ const p = v(s.errors, o), b = (f.isValid || g.isValid) && de(l) && s.isValid !== l;
1209
+ if (t.delayError && u ? (d = C(() => k(o, u)), d(t.delayError)) : (clearTimeout(h), d = null, u ? M(s.errors, o, u) : U(s.errors, o)), (u ? !be(p, u) : p) || !J(w) || b) {
1195
1210
  const _ = {
1196
1211
  ...w,
1197
1212
  ...b && de(l) ? { isValid: l } : {},
@@ -1201,7 +1216,7 @@ function wr(e = {}) {
1201
1216
  s = {
1202
1217
  ...s,
1203
1218
  ..._
1204
- }, f.state.next(_);
1219
+ }, m.state.next(_);
1205
1220
  }
1206
1221
  }, Z = async (o) => {
1207
1222
  Q(o, !0);
@@ -1225,12 +1240,12 @@ function wr(e = {}) {
1225
1240
  if (p) {
1226
1241
  const { _f: b, ..._ } = p;
1227
1242
  if (b) {
1228
- const F = a.array.has(b.name), P = p._f && dr(p._f);
1229
- P && d.validatingFields && Q([w], !0);
1230
- const ne = await Dt(p, a.disabled, n, x, t.shouldUseNativeValidation && !l, F);
1231
- if (P && d.validatingFields && Q([w]), ne[b.name] && (u.valid = !1, l))
1243
+ const $ = a.array.has(b.name), P = p._f && dr(p._f);
1244
+ P && f.validatingFields && Q([w], !0);
1245
+ const ne = await Dt(p, a.disabled, n, x, t.shouldUseNativeValidation && !l, $);
1246
+ if (P && f.validatingFields && Q([w]), ne[b.name] && (u.valid = !1, l))
1232
1247
  break;
1233
- !l && (v(ne, b.name) ? F ? br(s.errors, ne, b.name) : M(s.errors, b.name, ne[b.name]) : U(s.errors, b.name));
1248
+ !l && (v(ne, b.name) ? $ ? br(s.errors, ne, b.name) : M(s.errors, b.name, ne[b.name]) : U(s.errors, b.name));
1234
1249
  }
1235
1250
  !J(_) && await q(_, l, u);
1236
1251
  }
@@ -1250,8 +1265,8 @@ function wr(e = {}) {
1250
1265
  if (w) {
1251
1266
  const b = w._f;
1252
1267
  b && (!b.disabled && M(n, o, ss(l, b)), p = Ie(b.ref) && z(l) ? "" : l, Xt(b.ref) ? [...b.ref.options].forEach((_) => _.selected = p.includes(_.value)) : b.refs ? Ve(b.ref) ? b.refs.forEach((_) => {
1253
- (!_.defaultChecked || !_.disabled) && (Array.isArray(p) ? _.checked = !!p.find((F) => F === _.value) : _.checked = p === _.value || !!p);
1254
- }) : b.refs.forEach((_) => _.checked = _.value === p) : nt(b.ref) ? b.ref.value = "" : (b.ref.value = p, b.ref.type || f.state.next({
1268
+ (!_.defaultChecked || !_.disabled) && (Array.isArray(p) ? _.checked = !!p.find(($) => $ === _.value) : _.checked = p === _.value || !!p);
1269
+ }) : b.refs.forEach((_) => _.checked = _.value === p) : nt(b.ref) ? b.ref.value = "" : (b.ref.value = p, b.ref.type || m.state.next({
1255
1270
  name: o,
1256
1271
  values: H(n)
1257
1272
  })));
@@ -1266,14 +1281,14 @@ function wr(e = {}) {
1266
1281
  }
1267
1282
  }, K = (o, l, u = {}) => {
1268
1283
  const w = v(r, o), p = a.array.has(o), b = H(l);
1269
- M(n, o, b), p ? (f.array.next({
1284
+ M(n, o, b), p ? (m.array.next({
1270
1285
  name: o,
1271
1286
  values: H(n)
1272
- }), (d.isDirty || d.dirtyFields || g.isDirty || g.dirtyFields) && u.shouldDirty && f.state.next({
1287
+ }), (f.isDirty || f.dirtyFields || g.isDirty || g.dirtyFields) && u.shouldDirty && m.state.next({
1273
1288
  name: o,
1274
1289
  dirtyFields: Ee(i, n),
1275
1290
  isDirty: se(o, b)
1276
- })) : w && !w._f && !z(b) ? j(o, b, u) : O(o, b, u), Ft(o, a) && f.state.next({ ...s, name: o }), f.state.next({
1291
+ })) : w && !w._f && !z(b) ? j(o, b, u) : O(o, b, u), $t(o, a) && m.state.next({ ...s, name: o }), m.state.next({
1277
1292
  name: c.mount ? o : void 0,
1278
1293
  values: H(n)
1279
1294
  });
@@ -1283,26 +1298,26 @@ function wr(e = {}) {
1283
1298
  let u = l.name, w = !0;
1284
1299
  const p = v(r, u), b = (P) => {
1285
1300
  w = Number.isNaN(P) || Ce(P) && isNaN(P.getTime()) || be(P, v(n, u, P));
1286
- }, _ = Et(t.mode), F = Et(t.reValidateMode);
1301
+ }, _ = Et(t.mode), $ = Et(t.reValidateMode);
1287
1302
  if (p) {
1288
1303
  let P, ne;
1289
- const Me = l.type ? At(p._f) : Xs(o), ge = o.type === _t.BLUR || o.type === _t.FOCUS_OUT, fs = !fr(p._f) && !t.resolver && !v(s.errors, u) && !p._f.deps || yr(ge, v(s.touchedFields, u), s.isSubmitted, F, _), Je = Ft(u, a, ge);
1290
- M(n, u, Me), ge ? (p._f.onBlur && p._f.onBlur(o), m && m(0)) : p._f.onChange && p._f.onChange(o);
1304
+ const Me = l.type ? At(p._f) : Xs(o), ge = o.type === _t.BLUR || o.type === _t.FOCUS_OUT, fs = !fr(p._f) && !t.resolver && !v(s.errors, u) && !p._f.deps || yr(ge, v(s.touchedFields, u), s.isSubmitted, $, _), Je = $t(u, a, ge);
1305
+ M(n, u, Me), ge ? (p._f.onBlur && p._f.onBlur(o), d && d(0)) : p._f.onChange && p._f.onChange(o);
1291
1306
  const Ye = T(u, Me, ge), ms = !J(Ye) || Je;
1292
- if (!ge && f.state.next({
1307
+ if (!ge && m.state.next({
1293
1308
  name: u,
1294
1309
  type: o.type,
1295
1310
  values: H(n)
1296
1311
  }), fs)
1297
- return (d.isValid || g.isValid) && (t.mode === "onBlur" ? ge && S() : ge || S()), ms && f.state.next({ name: u, ...Je ? {} : Ye });
1298
- if (!ge && Je && f.state.next({ ...s }), t.resolver) {
1312
+ return (f.isValid || g.isValid) && (t.mode === "onBlur" ? ge && S() : ge || S()), ms && m.state.next({ name: u, ...Je ? {} : Ye });
1313
+ if (!ge && Je && m.state.next({ ...s }), t.resolver) {
1299
1314
  const { errors: yt } = await Z([u]);
1300
1315
  if (b(Me), w) {
1301
1316
  const hs = Tt(s.errors, r, u), gt = Tt(yt, r, hs.name || u);
1302
1317
  P = gt.error, u = gt.name, ne = J(yt);
1303
1318
  }
1304
1319
  } else
1305
- Q([u], !0), P = (await Dt(p, a.disabled, n, x, t.shouldUseNativeValidation))[u], Q([u]), b(Me), w && (P ? ne = !1 : (d.isValid || g.isValid) && (ne = await q(r, !0)));
1320
+ Q([u], !0), P = (await Dt(p, a.disabled, n, x, t.shouldUseNativeValidation))[u], Q([u]), b(Me), w && (P ? ne = !1 : (f.isValid || g.isValid) && (ne = await q(r, !0)));
1306
1321
  w && (p._f.deps && ae(p._f.deps), G(u, ne, P, Ye));
1307
1322
  }
1308
1323
  }, re = (o, l) => {
@@ -1310,7 +1325,7 @@ function wr(e = {}) {
1310
1325
  return o.focus(), 1;
1311
1326
  }, ae = async (o, l = {}) => {
1312
1327
  let u, w;
1313
- const p = Fe(o);
1328
+ const p = $e(o);
1314
1329
  if (t.resolver) {
1315
1330
  const b = await ve(R(o) ? o : p);
1316
1331
  u = J(b), w = o ? !p.some((_) => v(b, _)) : u;
@@ -1318,8 +1333,8 @@ function wr(e = {}) {
1318
1333
  const _ = v(r, b);
1319
1334
  return await q(_ && _._f ? { [b]: _ } : _);
1320
1335
  }))).every(Boolean), !(!w && !s.isValid) && S()) : w = u = await q(r);
1321
- return f.state.next({
1322
- ...!fe(o) || (d.isValid || g.isValid) && u !== s.isValid ? {} : { name: o },
1336
+ return m.state.next({
1337
+ ...!fe(o) || (f.isValid || g.isValid) && u !== s.isValid ? {} : { name: o },
1323
1338
  ...t.resolver || !o ? { isValid: u } : {},
1324
1339
  errors: s.errors
1325
1340
  }), l.shouldFocus && !w && Te(r, re, o ? p : a.mount), w;
@@ -1335,25 +1350,25 @@ function wr(e = {}) {
1335
1350
  isValidating: !!v(s.validatingFields, o),
1336
1351
  isTouched: !!v((l || s).touchedFields, o)
1337
1352
  }), _e = (o) => {
1338
- o && Fe(o).forEach((l) => U(s.errors, l)), f.state.next({
1353
+ o && $e(o).forEach((l) => U(s.errors, l)), m.state.next({
1339
1354
  errors: o ? s.errors : {}
1340
1355
  });
1341
1356
  }, ct = (o, l, u) => {
1342
- const w = (v(r, o, { _f: {} })._f || {}).ref, p = v(s.errors, o) || {}, { ref: b, message: _, type: F, ...P } = p;
1357
+ const w = (v(r, o, { _f: {} })._f || {}).ref, p = v(s.errors, o) || {}, { ref: b, message: _, type: $, ...P } = p;
1343
1358
  M(s.errors, o, {
1344
1359
  ...P,
1345
1360
  ...l,
1346
1361
  ref: w
1347
- }), f.state.next({
1362
+ }), m.state.next({
1348
1363
  name: o,
1349
1364
  errors: s.errors,
1350
1365
  isValid: !1
1351
1366
  }), u && u.shouldFocus && w && w.focus && w.focus();
1352
- }, os = (o, l) => le(o) ? f.state.subscribe({
1367
+ }, os = (o, l) => le(o) ? m.state.subscribe({
1353
1368
  next: (u) => "values" in u && o(N(void 0, l), u)
1354
- }) : N(o, l, !0), lt = (o) => f.state.subscribe({
1369
+ }) : N(o, l, !0), lt = (o) => m.state.subscribe({
1355
1370
  next: (l) => {
1356
- hr(o.name, l.name, o.exact) && mr(l, o.formState || d, ds, o.reRenderRoot) && o.callback({
1371
+ hr(o.name, l.name, o.exact) && mr(l, o.formState || f, ds, o.reRenderRoot) && o.callback({
1357
1372
  values: { ...n },
1358
1373
  ...s,
1359
1374
  ...l,
@@ -1367,11 +1382,11 @@ function wr(e = {}) {
1367
1382
  ...o,
1368
1383
  formState: g
1369
1384
  })), We = (o, l = {}) => {
1370
- for (const u of o ? Fe(o) : a.mount)
1385
+ for (const u of o ? $e(o) : a.mount)
1371
1386
  a.mount.delete(u), a.array.delete(u), l.keepValue || (U(r, u), U(n, u)), !l.keepError && U(s.errors, u), !l.keepDirty && U(s.dirtyFields, u), !l.keepTouched && U(s.touchedFields, u), !l.keepIsValidating && U(s.validatingFields, u), !t.shouldUnregister && !l.keepDefaultValue && U(i, u);
1372
- f.state.next({
1387
+ m.state.next({
1373
1388
  values: H(n)
1374
- }), f.state.next({
1389
+ }), m.state.next({
1375
1390
  ...s,
1376
1391
  ...l.keepDirty ? { isDirty: se() } : {}
1377
1392
  }), !l.keepIsValid && S();
@@ -1395,11 +1410,11 @@ function wr(e = {}) {
1395
1410
  ...w ? { disabled: l.disabled || t.disabled } : {},
1396
1411
  ...t.progressive ? {
1397
1412
  required: !!l.required,
1398
- min: $e(l.min),
1399
- max: $e(l.max),
1400
- minLength: $e(l.minLength),
1401
- maxLength: $e(l.maxLength),
1402
- pattern: $e(l.pattern)
1413
+ min: Fe(l.min),
1414
+ max: Fe(l.max),
1415
+ minLength: Fe(l.minLength),
1416
+ maxLength: Fe(l.maxLength),
1417
+ pattern: Fe(l.pattern)
1403
1418
  } : {},
1404
1419
  name: o,
1405
1420
  onChange: V,
@@ -1407,15 +1422,15 @@ function wr(e = {}) {
1407
1422
  ref: (p) => {
1408
1423
  if (p) {
1409
1424
  ze(o, l), u = v(r, o);
1410
- const b = R(p.value) && p.querySelectorAll && p.querySelectorAll("input,select,textarea")[0] || p, _ = ar(b), F = u._f.refs || [];
1411
- if (_ ? F.find((P) => P === b) : b === u._f.ref)
1425
+ const b = R(p.value) && p.querySelectorAll && p.querySelectorAll("input,select,textarea")[0] || p, _ = ar(b), $ = u._f.refs || [];
1426
+ if (_ ? $.find((P) => P === b) : b === u._f.ref)
1412
1427
  return;
1413
1428
  M(r, o, {
1414
1429
  _f: {
1415
1430
  ...u._f,
1416
1431
  ..._ ? {
1417
1432
  refs: [
1418
- ...F.filter(Ze),
1433
+ ...$.filter(Ze),
1419
1434
  b,
1420
1435
  ...Array.isArray(v(i, o)) ? [{}] : []
1421
1436
  ],
@@ -1428,7 +1443,7 @@ function wr(e = {}) {
1428
1443
  }
1429
1444
  };
1430
1445
  }, Ge = () => t.shouldFocusError && Te(r, re, a.mount), cs = (o) => {
1431
- de(o) && (f.state.next({ disabled: o }), Te(r, (l, u) => {
1446
+ de(o) && (m.state.next({ disabled: o }), Te(r, (l, u) => {
1432
1447
  const w = v(r, u);
1433
1448
  w && (l.disabled = w._f.disabled || o, Array.isArray(w._f.refs) && w._f.refs.forEach((p) => {
1434
1449
  p.disabled = w._f.disabled || o;
@@ -1438,7 +1453,7 @@ function wr(e = {}) {
1438
1453
  let w;
1439
1454
  u && (u.preventDefault && u.preventDefault(), u.persist && u.persist());
1440
1455
  let p = H(n);
1441
- if (f.state.next({
1456
+ if (m.state.next({
1442
1457
  isSubmitting: !0
1443
1458
  }), t.resolver) {
1444
1459
  const { errors: b, values: _ } = await Z();
@@ -1449,7 +1464,7 @@ function wr(e = {}) {
1449
1464
  for (const b of a.disabled)
1450
1465
  U(p, b);
1451
1466
  if (U(s.errors, "root"), J(s.errors)) {
1452
- f.state.next({
1467
+ m.state.next({
1453
1468
  errors: {}
1454
1469
  });
1455
1470
  try {
@@ -1459,7 +1474,7 @@ function wr(e = {}) {
1459
1474
  }
1460
1475
  } else
1461
1476
  l && await l({ ...s.errors }, u), Ge(), setTimeout(Ge);
1462
- if (f.state.next({
1477
+ if (m.state.next({
1463
1478
  isSubmitted: !0,
1464
1479
  isSubmitting: !1,
1465
1480
  isSubmitSuccessful: J(s.errors) && !w,
@@ -1468,7 +1483,7 @@ function wr(e = {}) {
1468
1483
  }), w)
1469
1484
  throw w;
1470
1485
  }, ls = (o, l = {}) => {
1471
- v(r, o) && (R(l.defaultValue) ? K(o, H(v(i, o))) : (K(o, l.defaultValue), M(i, o, H(l.defaultValue))), l.keepTouched || U(s.touchedFields, o), l.keepDirty || (U(s.dirtyFields, o), s.isDirty = l.defaultValue ? se(o, H(v(i, o))) : se()), l.keepError || (U(s.errors, o), d.isValid && S()), f.state.next({ ...s }));
1486
+ v(r, o) && (R(l.defaultValue) ? K(o, H(v(i, o))) : (K(o, l.defaultValue), M(i, o, H(l.defaultValue))), l.keepTouched || U(s.touchedFields, o), l.keepDirty || (U(s.dirtyFields, o), s.isDirty = l.defaultValue ? se(o, H(v(i, o))) : se()), l.keepError || (U(s.errors, o), f.isValid && S()), m.state.next({ ...s }));
1472
1487
  }, ft = (o, l = {}) => {
1473
1488
  const u = o ? H(o) : i, w = H(u), p = J(o), b = p ? i : w;
1474
1489
  if (l.keepDefaultValues || (i = u), !l.keepValues) {
@@ -1477,14 +1492,14 @@ function wr(e = {}) {
1477
1492
  ...a.mount,
1478
1493
  ...Object.keys(Ee(i, n))
1479
1494
  ]);
1480
- for (const F of Array.from(_))
1481
- v(s.dirtyFields, F) ? M(b, F, v(n, F)) : K(F, v(b, F));
1495
+ for (const $ of Array.from(_))
1496
+ v(s.dirtyFields, $) ? M(b, $, v(n, $)) : K($, v(b, $));
1482
1497
  } else {
1483
1498
  if (tt && R(o))
1484
1499
  for (const _ of a.mount) {
1485
- const F = v(r, _);
1486
- if (F && F._f) {
1487
- const P = Array.isArray(F._f.refs) ? F._f.refs[0] : F._f.ref;
1500
+ const $ = v(r, _);
1501
+ if ($ && $._f) {
1502
+ const P = Array.isArray($._f.refs) ? $._f.refs[0] : $._f.ref;
1488
1503
  if (Ie(P)) {
1489
1504
  const ne = P.closest("form");
1490
1505
  if (ne) {
@@ -1500,9 +1515,9 @@ function wr(e = {}) {
1500
1515
  else
1501
1516
  r = {};
1502
1517
  }
1503
- n = t.shouldUnregister ? l.keepDefaultValues ? H(i) : {} : H(b), f.array.next({
1518
+ n = t.shouldUnregister ? l.keepDefaultValues ? H(i) : {} : H(b), m.array.next({
1504
1519
  values: { ...b }
1505
- }), f.state.next({
1520
+ }), m.state.next({
1506
1521
  values: { ...b }
1507
1522
  });
1508
1523
  }
@@ -1514,7 +1529,7 @@ function wr(e = {}) {
1514
1529
  watch: /* @__PURE__ */ new Set(),
1515
1530
  watchAll: !1,
1516
1531
  focus: ""
1517
- }, c.mount = !d.isValid || !!l.keepIsValid || !!l.keepDirtyValues, c.watch = !!t.shouldUnregister, f.state.next({
1532
+ }, c.mount = !f.isValid || !!l.keepIsValid || !!l.keepDirtyValues, c.watch = !!t.shouldUnregister, m.state.next({
1518
1533
  submitCount: l.keepSubmitCount ? s.submitCount : 0,
1519
1534
  isDirty: p ? !1 : l.keepDirty ? s.isDirty : !!(l.keepDefaultValues && !be(o, i)),
1520
1535
  isSubmitted: l.keepIsSubmitted ? s.isSubmitted : !1,
@@ -1554,14 +1569,14 @@ function wr(e = {}) {
1554
1569
  _getFieldArray: E,
1555
1570
  _reset: ft,
1556
1571
  _resetDefaultValues: () => le(t.defaultValues) && t.defaultValues().then((o) => {
1557
- mt(o, t.resetOptions), f.state.next({
1572
+ mt(o, t.resetOptions), m.state.next({
1558
1573
  isLoading: !1
1559
1574
  });
1560
1575
  }),
1561
1576
  _removeUnmounted: oe,
1562
1577
  _disableForm: cs,
1563
- _subjects: f,
1564
- _proxyFormState: d,
1578
+ _subjects: m,
1579
+ _proxyFormState: f,
1565
1580
  get _fields() {
1566
1581
  return r;
1567
1582
  },
@@ -1688,12 +1703,12 @@ const vr = (e) => {
1688
1703
  mutationFn: n,
1689
1704
  formToDto: c,
1690
1705
  onError: a,
1691
- onSuccess: m,
1706
+ onSuccess: d,
1692
1707
  queryKey: h,
1693
- onSuccessMessage: d
1694
- } = e, { control: g, handleSubmit: f, reset: x, setError: C, getValues: S, setValue: Q } = ns({
1708
+ onSuccessMessage: f
1709
+ } = e, { control: g, handleSubmit: m, reset: x, setError: C, getValues: S, setValue: Q } = ns({
1695
1710
  defaultValues: i
1696
- }), ye = $(
1711
+ }), ye = F(
1697
1712
  (L) => {
1698
1713
  const T = L == null ? void 0 : L.errors, G = [];
1699
1714
  return T && T.forEach(([Z, ve]) => {
@@ -1702,7 +1717,7 @@ const vr = (e) => {
1702
1717
  }), G;
1703
1718
  },
1704
1719
  [t, h]
1705
- ), k = $(() => {
1720
+ ), k = F(() => {
1706
1721
  document.querySelectorAll("input, textarea, select").forEach((T) => {
1707
1722
  T.classList.remove("error");
1708
1723
  });
@@ -1724,8 +1739,8 @@ const vr = (e) => {
1724
1739
  a && a(L);
1725
1740
  },
1726
1741
  onSuccess: async (L) => {
1727
- Se && await Se.invalidateQueries({ queryKey: h }), m && m(L), d && r({
1728
- message: d
1742
+ Se && await Se.invalidateQueries({ queryKey: h }), d && d(L), f && r({
1743
+ message: f
1729
1744
  });
1730
1745
  }
1731
1746
  }
@@ -1734,7 +1749,7 @@ const vr = (e) => {
1734
1749
  control: g,
1735
1750
  getValues: S,
1736
1751
  setValue: Q,
1737
- handleSubmit: f,
1752
+ handleSubmit: m,
1738
1753
  onSubmit: (L) => W.mutate(
1739
1754
  c ? c(L) : L
1740
1755
  ),
@@ -1747,7 +1762,7 @@ const vr = (e) => {
1747
1762
  }, xr = (e) => {
1748
1763
  const { t } = D(), { onClick: s, hidden: r = !1, disabled: i = !1 } = e;
1749
1764
  return {
1750
- action: $(
1765
+ action: F(
1751
1766
  (c) => ({
1752
1767
  id: we.Delete,
1753
1768
  hidden: c.deleted || r,
@@ -1762,7 +1777,7 @@ const vr = (e) => {
1762
1777
  }, _r = (e) => {
1763
1778
  const { t } = D(), { onClick: s, hidden: r = !1 } = e;
1764
1779
  return {
1765
- action: $(
1780
+ action: F(
1766
1781
  (n) => ({
1767
1782
  id: we.Restore,
1768
1783
  hidden: !n.deleted || r,
@@ -1777,7 +1792,7 @@ const vr = (e) => {
1777
1792
  }, en = (e) => {
1778
1793
  const { t } = D(), { onClick: s, hidden: r = !1 } = e;
1779
1794
  return {
1780
- action: $(
1795
+ action: F(
1781
1796
  (n) => ({
1782
1797
  id: we.Edit,
1783
1798
  hidden: n.deleted || r,
@@ -1799,7 +1814,7 @@ const Cr = (e) => {
1799
1814
  isLoading: n = !1
1800
1815
  } = e;
1801
1816
  return {
1802
- action: $(
1817
+ action: F(
1803
1818
  () => ({
1804
1819
  id: we.Export,
1805
1820
  hidden: r,
@@ -1825,7 +1840,7 @@ const Cr = (e) => {
1825
1840
  isLoading: n = !1
1826
1841
  } = e;
1827
1842
  return {
1828
- action: $(
1843
+ action: F(
1829
1844
  () => ({
1830
1845
  id: we.Import,
1831
1846
  hidden: r,
@@ -1844,11 +1859,11 @@ const Cr = (e) => {
1844
1859
  )
1845
1860
  };
1846
1861
  }, tn = (e) => {
1847
- const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = ke(), { t: n } = D(), { open: c, onClick: a, close: m, dialogFn: h, isLoading: d } = Jt({
1862
+ const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = ke(), { t: n } = D(), { open: c, onClick: a, close: d, dialogFn: h, isLoading: f } = Jt({
1848
1863
  onSuccessMessage: n("_pages:common.actions.delete.successMessage"),
1849
- onError: (f) => {
1850
- f.errors && i(
1851
- f.errors.map(
1864
+ onError: (m) => {
1865
+ m.errors && i(
1866
+ m.errors.map(
1852
1867
  ([x, C]) => ({
1853
1868
  message: n(`_pages:${x}.errors.${C}`),
1854
1869
  type: B.error
@@ -1856,8 +1871,8 @@ const Cr = (e) => {
1856
1871
  )
1857
1872
  );
1858
1873
  },
1859
- onSuccess: async (f) => {
1860
- await Se.invalidateQueries({ queryKey: t }), s && s(f);
1874
+ onSuccess: async (m) => {
1875
+ await Se.invalidateQueries({ queryKey: t }), s && s(m);
1861
1876
  },
1862
1877
  ...r
1863
1878
  }), { action: g } = xr({ onClick: a });
@@ -1865,9 +1880,9 @@ const Cr = (e) => {
1865
1880
  onClick: a,
1866
1881
  title: n("_pages:common.actions.delete.dialog.title"),
1867
1882
  open: c,
1868
- isLoading: d,
1883
+ isLoading: f,
1869
1884
  handleSubmit: () => h.mutate(),
1870
- handleClose: m,
1885
+ handleClose: d,
1871
1886
  action: g
1872
1887
  };
1873
1888
  }, is = () => {
@@ -1882,42 +1897,42 @@ const Cr = (e) => {
1882
1897
  defaultValues: n,
1883
1898
  getFunction: c,
1884
1899
  mutationFn: a,
1885
- formToDto: m,
1900
+ formToDto: d,
1886
1901
  dtoToForm: h,
1887
- onError: d,
1902
+ onError: f,
1888
1903
  onSuccess: g,
1889
- queryKey: f,
1904
+ queryKey: m,
1890
1905
  onSuccessMessage: x,
1891
1906
  title: C
1892
1907
  } = e, [S, Q] = X(0), { open: ye, handleClose: k, handleOpen: W } = is(), { control: L, handleSubmit: T, reset: G, setError: Z, getValues: ve, setValue: q } = ns({
1893
1908
  defaultValues: n
1894
1909
  }), { data: oe, isLoading: se } = Bs({
1895
1910
  queryFn: () => c == null ? void 0 : c(S),
1896
- queryKey: [...f, S],
1897
- enabled: !!c && !!f && !!S
1911
+ queryKey: [...m, S],
1912
+ enabled: !!c && !!m && !!S
1898
1913
  });
1899
1914
  te(() => {
1900
1915
  oe && h && G({ ...h(oe) });
1901
1916
  }, [oe]);
1902
- const N = $(
1917
+ const N = F(
1903
1918
  (V) => {
1904
1919
  const re = V == null ? void 0 : V.errors, ae = [];
1905
1920
  return re && re.forEach(([xe, Pe]) => {
1906
1921
  const _e = document.querySelector(`[name="${xe}"]`);
1907
- (_e instanceof HTMLInputElement || _e instanceof HTMLTextAreaElement || _e instanceof HTMLSelectElement) && (_e.focus(), _e.classList.add("error"), ae.push(t(`_entities:${f}.${xe}.${Pe}`)));
1922
+ (_e instanceof HTMLInputElement || _e instanceof HTMLTextAreaElement || _e instanceof HTMLSelectElement) && (_e.focus(), _e.classList.add("error"), ae.push(t(`_entities:${m}.${xe}.${Pe}`)));
1908
1923
  }), ae;
1909
1924
  },
1910
- [t, f]
1911
- ), E = $(() => {
1925
+ [t, m]
1926
+ ), E = F(() => {
1912
1927
  document.querySelectorAll("input, textarea, select").forEach((re) => {
1913
1928
  re.classList.remove("error");
1914
1929
  });
1915
- }, []), O = $(
1930
+ }, []), O = F(
1916
1931
  (V) => {
1917
1932
  Q(V ?? 0), W();
1918
1933
  },
1919
1934
  [W]
1920
- ), j = $(() => {
1935
+ ), j = F(() => {
1921
1936
  E(), k(), G();
1922
1937
  }, [G, E, k]), K = He({
1923
1938
  mutationFn: a,
@@ -1932,10 +1947,10 @@ const Cr = (e) => {
1932
1947
  })
1933
1948
  )
1934
1949
  );
1935
- } else d ? d(V) : s({ message: t("_accessibility:errors.500") });
1950
+ } else f ? f(V) : s({ message: t("_accessibility:errors.500") });
1936
1951
  },
1937
1952
  onSuccess: async (V) => {
1938
- await Se.invalidateQueries({ queryKey: f }), g && g(V), i({
1953
+ await Se.invalidateQueries({ queryKey: m }), g && g(V), i({
1939
1954
  message: x
1940
1955
  }), j();
1941
1956
  }
@@ -1948,7 +1963,7 @@ const Cr = (e) => {
1948
1963
  getValues: ve,
1949
1964
  setValue: q,
1950
1965
  handleSubmit: T,
1951
- onSubmit: (V) => K.mutate(m(V)),
1966
+ onSubmit: (V) => K.mutate(d(V)),
1952
1967
  reset: G,
1953
1968
  setError: Z,
1954
1969
  parseFormError: N,
@@ -1957,11 +1972,11 @@ const Cr = (e) => {
1957
1972
  isLoading: se || K.isPending
1958
1973
  };
1959
1974
  }, rn = (e) => {
1960
- const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = ke(), { t: n } = D(), { open: c, onClick: a, close: m, dialogFn: h, isLoading: d } = Jt({
1975
+ const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = ke(), { t: n } = D(), { open: c, onClick: a, close: d, dialogFn: h, isLoading: f } = Jt({
1961
1976
  onSuccessMessage: n("_pages:common.actions.restore.successMessage"),
1962
- onError: (f) => {
1963
- f.errors && i(
1964
- f.errors.map(
1977
+ onError: (m) => {
1978
+ m.errors && i(
1979
+ m.errors.map(
1965
1980
  ([x, C]) => ({
1966
1981
  message: n(`_pages:${x}.errors.${C}`),
1967
1982
  type: B.error
@@ -1969,8 +1984,8 @@ const Cr = (e) => {
1969
1984
  )
1970
1985
  );
1971
1986
  },
1972
- onSuccess: async (f) => {
1973
- await Se.invalidateQueries({ queryKey: t }), s && s(f);
1987
+ onSuccess: async (m) => {
1988
+ await Se.invalidateQueries({ queryKey: t }), s && s(m);
1974
1989
  },
1975
1990
  ...r
1976
1991
  }), { action: g } = _r({ onClick: a });
@@ -1978,9 +1993,9 @@ const Cr = (e) => {
1978
1993
  onClick: a,
1979
1994
  title: n("_pages:common.actions.restore.dialog.title"),
1980
1995
  open: c,
1981
- isLoading: d,
1996
+ isLoading: f,
1982
1997
  handleSubmit: () => h.mutate(),
1983
- handleClose: m,
1998
+ handleClose: d,
1984
1999
  action: g
1985
2000
  };
1986
2001
  };
@@ -1989,7 +2004,7 @@ function nn(e) {
1989
2004
  mutationFn: r,
1990
2005
  onSuccessMessage: t("_pages:common.actions.import.successMessage"),
1991
2006
  queryKey: s
1992
- }), { action: m } = Sr({
2007
+ }), { action: d } = Sr({
1993
2008
  onClick: () => c(!0)
1994
2009
  });
1995
2010
  return {
@@ -1999,7 +2014,7 @@ function nn(e) {
1999
2014
  entity: t(`_pages:${i}.title`)
2000
2015
  }),
2001
2016
  handleClose: () => c(!1),
2002
- action: m
2017
+ action: d
2003
2018
  };
2004
2019
  }
2005
2020
  const on = (e) => {
@@ -2009,29 +2024,29 @@ const on = (e) => {
2009
2024
  onError: n,
2010
2025
  onSuccess: c,
2011
2026
  onSuccessMessage: a = s("_pages:common.actions.export.successMessage")
2012
- } = e, m = He({
2027
+ } = e, d = He({
2013
2028
  mutationFn: () => i(),
2014
2029
  onError: (g) => {
2015
2030
  console.error(g), n && n(g);
2016
2031
  },
2017
2032
  onSuccess: async (g) => {
2018
- const f = JSON.stringify(g, null, 2), x = new Blob([f], { type: "application/json" }), C = URL.createObjectURL(x), S = document.createElement("a");
2033
+ const m = JSON.stringify(g, null, 2), x = new Blob([m], { type: "application/json" }), C = URL.createObjectURL(x), S = document.createElement("a");
2019
2034
  S.href = C, S.download = `${r}.json`, S.click(), URL.revokeObjectURL(C), c && c(g), t({
2020
2035
  message: a
2021
2036
  });
2022
2037
  }
2023
- }), h = $(() => {
2024
- m.mutate();
2025
- }, [m]), { action: d } = Cr({
2038
+ }), h = F(() => {
2039
+ d.mutate();
2040
+ }, [d]), { action: f } = Cr({
2026
2041
  onClick: h,
2027
- isLoading: m.isPending
2042
+ isLoading: d.isPending
2028
2043
  });
2029
2044
  return {
2030
- action: d
2045
+ action: f
2031
2046
  };
2032
2047
  };
2033
2048
  function kr(e) {
2034
- const [t, s] = X(!1), r = $(() => {
2049
+ const [t, s] = X(!1), r = F(() => {
2035
2050
  const i = window.scrollY > e;
2036
2051
  s(i);
2037
2052
  }, [e]);
@@ -2044,7 +2059,7 @@ const an = () => {
2044
2059
  return /* @__PURE__ */ y(
2045
2060
  he,
2046
2061
  {
2047
- icon: $s,
2062
+ icon: Fs,
2048
2063
  onClick: () => Ks.scrollTo(0, 0),
2049
2064
  "data-tooltip-id": "tooltip",
2050
2065
  "data-tooltip-content": e("_accessibility:buttons.toTop"),
@@ -2057,7 +2072,7 @@ const an = () => {
2057
2072
  /* @__PURE__ */ y(
2058
2073
  he,
2059
2074
  {
2060
- icon: Fs,
2075
+ icon: $s,
2061
2076
  onClick: () => n(!0),
2062
2077
  "data-tooltip-id": "tooltip",
2063
2078
  "data-tooltip-content": r("_accessibility:buttons.openActions")
@@ -2081,16 +2096,16 @@ const an = () => {
2081
2096
  name: n = "",
2082
2097
  id: c = "",
2083
2098
  label: a = "",
2084
- disabled: m = !1,
2099
+ disabled: d = !1,
2085
2100
  required: h = !1,
2086
- containerClassName: d = "",
2101
+ containerClassName: f = "",
2087
2102
  inputClassName: g = "",
2088
- labelClassName: f = "",
2103
+ labelClassName: m = "",
2089
2104
  helperText: x = "",
2090
2105
  helperTextClassName: C = "",
2091
2106
  ...S
2092
2107
  } = e;
2093
- return /* @__PURE__ */ A("div", { className: `relative z-0 w-full mb-5 group ${d}`, children: [
2108
+ return /* @__PURE__ */ A("div", { className: `relative z-0 w-full mb-5 group ${f}`, children: [
2094
2109
  /* @__PURE__ */ y(
2095
2110
  "textarea",
2096
2111
  {
@@ -2101,7 +2116,7 @@ const an = () => {
2101
2116
  required: h,
2102
2117
  value: s,
2103
2118
  onChange: r,
2104
- disabled: m,
2119
+ disabled: d,
2105
2120
  ...S
2106
2121
  }
2107
2122
  ),
@@ -2109,7 +2124,7 @@ const an = () => {
2109
2124
  "label",
2110
2125
  {
2111
2126
  htmlFor: n,
2112
- className: `text-input-label ${ws(i)} ${f}`,
2127
+ className: `text-input-label ${ws(i)} ${m}`,
2113
2128
  children: [
2114
2129
  a,
2115
2130
  h ? " *" : ""
@@ -2184,8 +2199,8 @@ const an = () => {
2184
2199
  open: n = !1,
2185
2200
  containerClassName: c = "",
2186
2201
  className: a = "",
2187
- animationClass: m = "appear"
2188
- } = e, [h, d] = X(window.innerWidth), g = $(
2202
+ animationClass: d = "appear"
2203
+ } = e, [h, f] = X(window.innerWidth), g = F(
2189
2204
  (S) => {
2190
2205
  S.key === "Escape" && n && i();
2191
2206
  },
@@ -2194,13 +2209,13 @@ const an = () => {
2194
2209
  te(() => (window.addEventListener("keydown", g), () => {
2195
2210
  window.removeEventListener("keydown", g);
2196
2211
  }), [g]);
2197
- const f = $(() => {
2198
- d(window.innerWidth);
2212
+ const m = F(() => {
2213
+ f(window.innerWidth);
2199
2214
  }, []);
2200
- te(() => (window.addEventListener("resize", f), () => {
2201
- window.removeEventListener("resize", f);
2202
- }), [f]);
2203
- const x = De(() => Us({ width: `${h}px` }), [h]), C = $(
2215
+ te(() => (window.addEventListener("resize", m), () => {
2216
+ window.removeEventListener("resize", m);
2217
+ }), [m]);
2218
+ const x = De(() => Us({ width: `${h}px` }), [h]), C = F(
2204
2219
  (S) => {
2205
2220
  var Q;
2206
2221
  ((Q = S == null ? void 0 : S.currentTarget) == null ? void 0 : Q.getAttribute("name")) === t("_accessibility:buttons.closeDialog") && i();
@@ -2221,11 +2236,11 @@ const an = () => {
2221
2236
  "aria-label": t("_accessibility:ariaLabels.closeDialog"),
2222
2237
  "aria-disabled": !n,
2223
2238
  onClick: C,
2224
- className: `dialog-backdrop animated ${n ? `opened ${m}` : "closed"} ${x} h-screen ${n ? "bg-base/20 backdrop-blur-xl" : "pointer-events-none"} ${c}`,
2239
+ className: `dialog-backdrop animated ${n ? `opened ${d}` : "closed"} ${x} h-screen ${n ? "bg-base/20 backdrop-blur-xl" : "pointer-events-none"} ${c}`,
2225
2240
  children: /* @__PURE__ */ A(
2226
2241
  "div",
2227
2242
  {
2228
- className: `dialog elevated animated ${n ? `opened ${m}` : "closed"} ${a}`,
2243
+ className: `dialog elevated animated ${n ? `opened ${d}` : "closed"} ${a}`,
2229
2244
  children: [
2230
2245
  /* @__PURE__ */ A("div", { className: "dialog-header", children: [
2231
2246
  /* @__PURE__ */ y("h3", { className: "text-text text-xl", children: s }),
@@ -2259,18 +2274,18 @@ const an = () => {
2259
2274
  isLoading: n = !1,
2260
2275
  disabled: c = !1,
2261
2276
  primaryType: a = "button",
2262
- containerClassName: m = "",
2277
+ containerClassName: d = "",
2263
2278
  primaryClassName: h = "",
2264
- alignEnd: d = !1,
2279
+ alignEnd: f = !1,
2265
2280
  primaryName: g,
2266
- primaryAriaLabel: f,
2281
+ primaryAriaLabel: m,
2267
2282
  cancelName: x,
2268
2283
  cancelAriaLabel: C
2269
2284
  } = e;
2270
2285
  return /* @__PURE__ */ A(
2271
2286
  "div",
2272
2287
  {
2273
- className: `flex gap-2 mt-2 ${d ? "justify-end" : ""} ${m}`,
2288
+ className: `flex gap-2 mt-2 ${f ? "justify-end" : ""} ${d}`,
2274
2289
  children: [
2275
2290
  /* @__PURE__ */ A(
2276
2291
  pe,
@@ -2282,7 +2297,7 @@ const an = () => {
2282
2297
  disabled: c,
2283
2298
  onClick: a === "button" ? r : void 0,
2284
2299
  name: g,
2285
- "aria-label": f,
2300
+ "aria-label": m,
2286
2301
  children: [
2287
2302
  n ? /* @__PURE__ */ y(qe, { color: "stroke-base", loaderClass: "!w-6 mt-1", strokeWidth: "6" }) : null,
2288
2303
  t
@@ -2312,9 +2327,9 @@ const an = () => {
2312
2327
  handleClose: n,
2313
2328
  isLoading: c = !1,
2314
2329
  buttonEnd: a = !0,
2315
- ...m
2330
+ ...d
2316
2331
  } = e;
2317
- return /* @__PURE__ */ y(ot, { ...m, handleClose: n, children: /* @__PURE__ */ A("form", { onSubmit: r(i), children: [
2332
+ return /* @__PURE__ */ y(ot, { ...d, handleClose: n, children: /* @__PURE__ */ A("form", { onSubmit: r(i), children: [
2318
2333
  /* @__PURE__ */ y("div", { className: "form-container", children: s }),
2319
2334
  /* @__PURE__ */ y(
2320
2335
  at,
@@ -2392,12 +2407,12 @@ const an = () => {
2392
2407
  ] });
2393
2408
  };
2394
2409
  function hn(e) {
2395
- const { t } = D(), { open: s, onClose: r, menuMap: i } = e, { account: n } = zt(), { linkComponent: c } = Qe(), a = c, m = De(() => i.filter((d) => {
2396
- const g = d.auth, f = !!(n != null && n.email);
2397
- return g == null || g && f || !g && !f;
2398
- }), [n]), h = $(
2399
- (d) => {
2400
- d.key === "Escape" && s && r();
2410
+ const { t } = D(), { open: s, onClose: r, menuMap: i } = e, { account: n } = zt(), { linkComponent: c } = Qe(), a = c, d = De(() => i.filter((f) => {
2411
+ const g = f.auth, m = !!(n != null && n.email);
2412
+ return g == null || g && m || !g && !m;
2413
+ }), [n]), h = F(
2414
+ (f) => {
2415
+ f.key === "Escape" && s && r();
2401
2416
  },
2402
2417
  [r, s]
2403
2418
  );
@@ -2416,25 +2431,25 @@ function hn(e) {
2416
2431
  className: `${s ? "opened" : "closed"} bg-base drawer animated`,
2417
2432
  children: [
2418
2433
  /* @__PURE__ */ y("h2", { className: "text-xl text-text px-5 pb-5 font-bold poppins", children: t("_pages:home.appName") }),
2419
- /* @__PURE__ */ y("ul", { className: "flex flex-col", children: m.map((d, g) => /* @__PURE__ */ y(
2434
+ /* @__PURE__ */ y("ul", { className: "flex flex-col", children: d.map((f, g) => /* @__PURE__ */ y(
2420
2435
  "li",
2421
2436
  {
2422
- className: `w-full flex hover:bg-base-light ${d.path === location.pathname ? "bg-base-light" : ""} animated`,
2423
- children: d.type !== "divider" && a ? /* @__PURE__ */ A(
2437
+ className: `w-full flex hover:bg-base-light ${f.path === location.pathname ? "bg-base-light" : ""} animated`,
2438
+ children: f.type !== "divider" && a ? /* @__PURE__ */ A(
2424
2439
  a,
2425
2440
  {
2426
2441
  "aria-disabled": !s,
2427
- to: d.path ?? `/${d.path}`,
2428
- "aria-label": t(`_accessibility:ariaLabels.${d.path}`),
2442
+ to: f.path ?? `/${f.path}`,
2443
+ "aria-label": t(`_accessibility:ariaLabels.${f.path}`),
2429
2444
  className: "text-lg text-text-muted w-full py-2 px-5 flex items-center justify-start gap-2",
2430
2445
  children: [
2431
- d.icon,
2432
- t(`_pages:${d.page}.title`)
2446
+ f.icon,
2447
+ t(`_pages:${f.page}.title`)
2433
2448
  ]
2434
2449
  }
2435
2450
  ) : /* @__PURE__ */ y("hr", { className: "border-border border-spacing-x-0.5 w-full" })
2436
2451
  },
2437
- `${d.page ?? g}`
2452
+ `${f.page ?? g}`
2438
2453
  )) })
2439
2454
  ]
2440
2455
  }
@@ -2479,16 +2494,16 @@ const Ar = (e) => {
2479
2494
  actions: n,
2480
2495
  queryKey: c,
2481
2496
  isLoading: a = !1,
2482
- isAnimated: m = !0,
2497
+ isAnimated: d = !0,
2483
2498
  showBackButton: h = !1
2484
- } = e, { t: d } = D(), { countOfFilters: g } = _s(), f = De(() => {
2499
+ } = e, { t: f } = D(), { countOfFilters: g } = _s(), m = De(() => {
2485
2500
  const x = Array.isArray(n) ? [...n] : [];
2486
2501
  if (c) {
2487
2502
  const C = {
2488
2503
  id: we.Refresh,
2489
2504
  onClick: () => Se.invalidateQueries({ queryKey: c }),
2490
2505
  icon: /* @__PURE__ */ y(ie, { icon: Mt }),
2491
- tooltip: d("_pages:common.actions.refresh.text")
2506
+ tooltip: f("_pages:common.actions.refresh.text")
2492
2507
  };
2493
2508
  x.unshift(C);
2494
2509
  }
@@ -2516,21 +2531,21 @@ const Ar = (e) => {
2516
2531
  x.push(C);
2517
2532
  }
2518
2533
  return x;
2519
- }, [n, r, g, i, c, d]);
2534
+ }, [n, r, g, i, c, f]);
2520
2535
  return /* @__PURE__ */ A("main", { className: "", children: [
2521
2536
  /* @__PURE__ */ A("div", { className: "flex flex-col", children: [
2522
2537
  /* @__PURE__ */ y(
2523
2538
  Ar,
2524
2539
  {
2525
2540
  showBackButton: h,
2526
- actions: f,
2541
+ actions: m,
2527
2542
  title: t
2528
2543
  }
2529
2544
  ),
2530
2545
  /* @__PURE__ */ y(
2531
2546
  "div",
2532
2547
  {
2533
- className: `px-5 py-3 h-useConfigfull ${m ? "appear" : ""}`,
2548
+ className: `px-5 py-3 h-useConfigfull ${d ? "appear" : ""}`,
2534
2549
  children: a ? /* @__PURE__ */ y(qe, { className: "flex justify-center items-center h-50" }) : s
2535
2550
  }
2536
2551
  )
@@ -2568,8 +2583,8 @@ const Ar = (e) => {
2568
2583
  }, []), /* @__PURE__ */ y("p", { className: "capitalize max-xs:hidden", children: e });
2569
2584
  };
2570
2585
  function pn(e) {
2571
- const { t } = D(), { openDrawer: s } = e, { searchComponent: r } = Qe(), [i, n] = X(!1), c = $((m) => {
2572
- (Js() ? m.metaKey : m.ctrlKey) && m.shiftKey && m.key.toLowerCase() === "f" && (n(!0), m.preventDefault());
2586
+ const { t } = D(), { openDrawer: s } = e, { searchComponent: r } = Qe(), [i, n] = X(!1), c = F((d) => {
2587
+ (Js() ? d.metaKey : d.ctrlKey) && d.shiftKey && d.key.toLowerCase() === "f" && (n(!0), d.preventDefault());
2573
2588
  }, []);
2574
2589
  te(() => (window.addEventListener("keydown", c), () => {
2575
2590
  window.removeEventListener("keydown", c);
@@ -2613,24 +2628,24 @@ function pn(e) {
2613
2628
  ] });
2614
2629
  }
2615
2630
  function wn() {
2616
- const { t: e } = D(), { notification: t, removeNotification: s } = ke(), [r, i] = X(/* @__PURE__ */ new Set()), n = $(
2617
- (d) => {
2618
- if (d === void 0) {
2619
- const g = new Set(t.map((f, x) => x));
2631
+ const { t: e } = D(), { notification: t, removeNotification: s } = ke(), [r, i] = X(/* @__PURE__ */ new Set()), n = F(
2632
+ (f) => {
2633
+ if (f === void 0) {
2634
+ const g = new Set(t.map((m, x) => x));
2620
2635
  i(g), window.setTimeout(() => s(), 300);
2621
2636
  } else
2622
- i((g) => new Set(g).add(d)), window.setTimeout(() => s(d), 300);
2637
+ i((g) => new Set(g).add(f)), window.setTimeout(() => s(f), 300);
2623
2638
  },
2624
2639
  [t, s]
2625
- ), c = $((d) => {
2626
- switch (d) {
2640
+ ), c = F((f) => {
2641
+ switch (f) {
2627
2642
  case B.error:
2628
2643
  return Is;
2629
2644
  default:
2630
2645
  return Os;
2631
2646
  }
2632
- }, []), a = $((d) => {
2633
- switch (d) {
2647
+ }, []), a = F((f) => {
2648
+ switch (f) {
2634
2649
  case B.success:
2635
2650
  return "!text-success";
2636
2651
  case B.error:
@@ -2640,8 +2655,8 @@ function wn() {
2640
2655
  default:
2641
2656
  return "!text-info";
2642
2657
  }
2643
- }, []), m = $((d) => {
2644
- switch (d) {
2658
+ }, []), d = F((f) => {
2659
+ switch (f) {
2645
2660
  case B.success:
2646
2661
  return "bg-bg-success";
2647
2662
  case B.error:
@@ -2656,12 +2671,12 @@ function wn() {
2656
2671
  h.current = () => n();
2657
2672
  }, [n]), te(() => {
2658
2673
  if (!(t != null && t.length)) return;
2659
- const d = (g) => {
2660
- var f;
2661
- return (f = h.current) == null ? void 0 : f.call(h, g);
2674
+ const f = (g) => {
2675
+ var m;
2676
+ return (m = h.current) == null ? void 0 : m.call(h, g);
2662
2677
  };
2663
- return window.addEventListener("click", d), () => {
2664
- window.removeEventListener("click", d);
2678
+ return window.addEventListener("click", f), () => {
2679
+ window.removeEventListener("click", f);
2665
2680
  };
2666
2681
  }, [t == null ? void 0 : t.length]), te(() => {
2667
2682
  i(/* @__PURE__ */ new Set());
@@ -2670,10 +2685,10 @@ function wn() {
2670
2685
  "div",
2671
2686
  {
2672
2687
  className: `notification-portal ${t != null && t.length ? "w-screen h-screen" : ""}`,
2673
- children: t != null && t.length ? t == null ? void 0 : t.map(({ id: d, type: g, message: f }, x) => /* @__PURE__ */ A(
2688
+ children: t != null && t.length ? t == null ? void 0 : t.map(({ id: f, type: g, message: m }, x) => /* @__PURE__ */ A(
2674
2689
  "div",
2675
2690
  {
2676
- className: `notification ${r.has(x) ? "closing" : ""} ${m(
2691
+ className: `notification ${r.has(x) ? "closing" : ""} ${d(
2677
2692
  g ?? B.error
2678
2693
  )}`,
2679
2694
  onClick: (C) => C.stopPropagation(),
@@ -2692,7 +2707,7 @@ function wn() {
2692
2707
  className: `whitespace-nowrap ${a(
2693
2708
  g ?? B.error
2694
2709
  )}`,
2695
- children: f
2710
+ children: m
2696
2711
  }
2697
2712
  )
2698
2713
  ] }),
@@ -2715,7 +2730,7 @@ function wn() {
2715
2730
  )
2716
2731
  ]
2717
2732
  },
2718
- d
2733
+ f
2719
2734
  )) : null
2720
2735
  }
2721
2736
  ),
@@ -2725,7 +2740,7 @@ function wn() {
2725
2740
  function vn() {
2726
2741
  return /* @__PURE__ */ y("div", { className: "w-screen h-screen flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ y(qe, { className: "blur-appear" }) });
2727
2742
  }
2728
- const $r = (e) => {
2743
+ const Fr = (e) => {
2729
2744
  const { id: t, active: s, onClick: r, children: i, to: n } = e, { linkComponent: c } = Qe();
2730
2745
  return /* @__PURE__ */ y(
2731
2746
  c,
@@ -2736,14 +2751,14 @@ const $r = (e) => {
2736
2751
  children: i
2737
2752
  }
2738
2753
  );
2739
- }, Fr = (e) => {
2740
- var m;
2754
+ }, $r = (e) => {
2755
+ var d;
2741
2756
  const {
2742
2757
  tabs: t = [],
2743
2758
  defaultTab: s,
2744
2759
  className: r = "",
2745
2760
  tabsContainerClassName: i = ""
2746
- } = e, [n, c] = X((m = t[0]) == null ? void 0 : m.id), a = De(() => t.find((h) => h.id === n), [t, n]);
2761
+ } = e, [n, c] = X((d = t[0]) == null ? void 0 : d.id), a = De(() => t.find((h) => h.id === n), [t, n]);
2747
2762
  return te(() => {
2748
2763
  s && c(s);
2749
2764
  }, [s]), /* @__PURE__ */ A("div", { className: `tabs-layout-main ${r}`, children: [
@@ -2751,12 +2766,12 @@ const $r = (e) => {
2751
2766
  "ul",
2752
2767
  {
2753
2768
  className: `horizontal tabs tabs-container ${i}`,
2754
- children: t.map(({ id: h, to: d, label: g }) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ y(
2755
- $r,
2769
+ children: t.map(({ id: h, to: f, label: g }) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ y(
2770
+ Fr,
2756
2771
  {
2757
2772
  onClick: () => c(h),
2758
2773
  id: h,
2759
- to: d ?? "",
2774
+ to: f ?? "",
2760
2775
  siblings: t.length > 1,
2761
2776
  active: n === h,
2762
2777
  children: g
@@ -2841,7 +2856,7 @@ const $r = (e) => {
2841
2856
  }
2842
2857
  )
2843
2858
  })), [s]);
2844
- return /* @__PURE__ */ y("div", { className: "onboarding-main", children: /* @__PURE__ */ y(Fr, { defaultTab: s, tabs: i }) });
2859
+ return /* @__PURE__ */ y("div", { className: "onboarding-main", children: /* @__PURE__ */ y($r, { defaultTab: s, tabs: i }) });
2845
2860
  }, Lr = (e) => {
2846
2861
  const {
2847
2862
  message: t,
@@ -2891,8 +2906,8 @@ export {
2891
2906
  bn as PrettyGrid,
2892
2907
  vn as SplashScreen,
2893
2908
  Tr as Step,
2894
- $r as Tab,
2895
- Fr as TabsLayout,
2909
+ Fr as Tab,
2910
+ $r as TabsLayout,
2896
2911
  an as ToTop,
2897
2912
  zs as buildQueryUrl,
2898
2913
  zr as enumToKeyValueArray,