@sito/dashboard-app 0.0.33 → 0.0.35

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,5 +1,5 @@
1
- var bs = Object.defineProperty;
2
- var ws = (e, t, s) => t in e ? bs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
1
+ var ps = Object.defineProperty;
2
+ var ws = (e, t, s) => t in e ? ps(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
3
  var me = (e, t, s) => ws(e, typeof t != "symbol" ? t + "" : t, s);
4
4
  import "./main.css";
5
5
  import { useTranslation as T, State as vs, inputStateClassName as xs, labelStateClassName as _s, helperTextStateClassName as Cs, Loading as Ve, TextInput as Ss, FileInput as ks, useTableOptions as Ns, Badge as As } from "@sito/dashboard";
@@ -9,79 +9,79 @@ import ae, { useRef as Be, useCallback as E, useEffect as Z, useReducer as Es, c
9
9
  import { faTrash as $s, faRotateLeft as Ot, faPencil as Fs, faCircleNotch as Ut, faCloudArrowDown as Ls, faCloudUpload as Ts, faArrowUp as Ds, faEllipsisV as Vs, faEyeSlash as Ps, faEye as Ms, faClose as Rt, faArrowLeft as Is, faAdd as vt, faFilter as Os, faBars as Us, faSearch as Rs, faCircleCheck as qs, faWarning as Bs } from "@fortawesome/free-solid-svg-icons";
10
10
  import { FontAwesomeIcon as ce } from "@fortawesome/react-fontawesome";
11
11
  import { createPortal as qt } from "react-dom";
12
- import { css as js } from "@emotion/css";
13
- import { QueryClient as Hs, QueryClientProvider as Qs, useMutation as Ie, useQuery as Ks } from "@tanstack/react-query";
12
+ import { css as Hs } from "@emotion/css";
13
+ import { QueryClient as js, QueryClientProvider as Qs, useMutation as Ie, useQuery as Ks } from "@tanstack/react-query";
14
14
  import { faSadTear as Ws } from "@fortawesome/free-regular-svg-icons";
15
15
  function Bt(e) {
16
16
  const {
17
17
  id: t,
18
18
  icon: s,
19
- tooltip: r,
19
+ tooltip: n,
20
20
  onClick: i,
21
- children: n,
21
+ children: r,
22
22
  hidden: c = !1,
23
23
  disabled: a = !1,
24
- showText: u = !1,
25
- showTooltips: f = !0
24
+ showText: d = !1,
25
+ showTooltips: m = !0
26
26
  } = e;
27
27
  return c ? null : /* @__PURE__ */ A(
28
28
  "button",
29
29
  {
30
30
  id: t,
31
- className: `action ${u ? "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,
35
35
  "data-tooltip-id": "tooltip",
36
- "data-tooltip-content": f ? r : "",
36
+ "data-tooltip-content": m ? n : "",
37
37
  children: [
38
38
  s,
39
39
  " ",
40
- u && r,
41
- n
40
+ d && n,
41
+ r
42
42
  ]
43
43
  }
44
44
  );
45
45
  }
46
- function jt(e) {
46
+ function Ht(e) {
47
47
  const {
48
48
  actions: t = [],
49
49
  className: s = "",
50
- showTooltips: r = !0,
50
+ showTooltips: n = !0,
51
51
  showActionTexts: i = !1
52
52
  } = e;
53
- return /* @__PURE__ */ h("ul", { className: `actions-container ${s}`, children: t == null ? void 0 : t.map((n) => /* @__PURE__ */ h("li", { children: /* @__PURE__ */ h(
53
+ return /* @__PURE__ */ h("ul", { className: `actions-container ${s}`, children: t == null ? void 0 : t.map((r) => /* @__PURE__ */ h("li", { children: /* @__PURE__ */ h(
54
54
  Bt,
55
55
  {
56
- showTooltips: r,
56
+ showTooltips: n,
57
57
  showText: i,
58
- ...n,
59
- children: n.children
58
+ ...r,
59
+ children: r.children
60
60
  }
61
- ) }, n.id)) });
61
+ ) }, r.id)) });
62
62
  }
63
63
  const zs = (e) => {
64
- const { children: t, open: s, onClose: r } = e, i = Be(null), n = E(
64
+ const { children: t, open: s, onClose: n } = e, i = Be(null), r = E(
65
65
  (a) => {
66
- const u = i.current;
67
- !s || !u || u.contains(a.target) || r();
66
+ const d = i.current;
67
+ !s || !d || d.contains(a.target) || n();
68
68
  },
69
- [s, r]
69
+ [s, n]
70
70
  ), c = E(
71
71
  (a) => {
72
- s && a.key === "Escape" && r();
72
+ s && a.key === "Escape" && n();
73
73
  },
74
- [s, r]
74
+ [s, n]
75
75
  );
76
76
  return Z(() => {
77
77
  if (s)
78
78
  return setTimeout(() => {
79
79
  var a;
80
80
  return (a = i.current) == null ? void 0 : a.focus();
81
- }, 0), document.addEventListener("mousedown", n), document.addEventListener("keydown", c), () => {
82
- document.removeEventListener("mousedown", n), document.removeEventListener("keydown", c);
81
+ }, 0), document.addEventListener("mousedown", r), document.addEventListener("keydown", c), () => {
82
+ document.removeEventListener("mousedown", r), document.removeEventListener("keydown", c);
83
83
  };
84
- }, [s, n, c]), /* @__PURE__ */ h(
84
+ }, [s, r, c]), /* @__PURE__ */ h(
85
85
  "div",
86
86
  {
87
87
  ref: i,
@@ -93,23 +93,23 @@ const zs = (e) => {
93
93
  children: t
94
94
  }
95
95
  );
96
- }, pe = (e) => {
96
+ }, be = (e) => {
97
97
  const {
98
98
  children: t,
99
99
  icon: s,
100
- type: r = "button",
100
+ type: n = "button",
101
101
  className: i = "",
102
- variant: n = "text",
102
+ variant: r = "text",
103
103
  color: c = "default",
104
104
  iconClassName: a = "",
105
- ...u
105
+ ...d
106
106
  } = e;
107
107
  return /* @__PURE__ */ A(
108
108
  "button",
109
109
  {
110
- type: r,
111
- className: `icon-button ${i} ${n} ${c}`,
112
- ...u,
110
+ type: n,
111
+ className: `icon-button ${i} ${r} ${c}`,
112
+ ...d,
113
113
  children: [
114
114
  /* @__PURE__ */ h(ce, { icon: s, className: `!w-auto ${a}` }),
115
115
  t
@@ -120,64 +120,64 @@ const zs = (e) => {
120
120
  const {
121
121
  children: t,
122
122
  type: s = "button",
123
- variant: r = "text",
123
+ variant: n = "text",
124
124
  color: i = "default",
125
- className: n = "",
125
+ className: r = "",
126
126
  ...c
127
127
  } = e;
128
- return /* @__PURE__ */ h("button", { type: s, className: `button ${r} ${i} ${n}`, ...c, children: t });
128
+ return /* @__PURE__ */ h("button", { type: s, className: `button ${n} ${i} ${r}`, ...c, children: t });
129
129
  };
130
130
  var tt, xt;
131
131
  function Gs() {
132
132
  if (xt) return tt;
133
133
  xt = 1;
134
- const e = (a, u = "local", f = void 0) => {
135
- if (u === "local") {
134
+ const e = (a, d = "local", m = void 0) => {
135
+ if (d === "local") {
136
136
  if (localStorage.getItem(a) !== void 0 && localStorage.getItem(a) !== "undefined" && localStorage.getItem(a) !== null)
137
- return f === void 0 || f !== void 0 && localStorage.getItem(a) === f;
138
- } else if (u === "session" && sessionStorage.getItem(a) !== void 0 && sessionStorage.getItem(a) !== "undefined" && sessionStorage.getItem(a) !== null)
139
- return f === void 0 || f !== void 0 && sessionStorage.getItem(a) === f;
137
+ return m === void 0 || m !== void 0 && localStorage.getItem(a) === m;
138
+ } else if (d === "session" && sessionStorage.getItem(a) !== void 0 && sessionStorage.getItem(a) !== "undefined" && sessionStorage.getItem(a) !== null)
139
+ return m === void 0 || m !== void 0 && sessionStorage.getItem(a) === m;
140
140
  return !1;
141
141
  }, t = (a) => {
142
- const u = {};
143
- return a.substring(1).split("&").forEach((p) => {
144
- const [y, m] = p.split("=");
145
- u[y] = m;
146
- }), u;
142
+ const d = {};
143
+ return a.substring(1).split("&").forEach((b) => {
144
+ const [y, f] = b.split("=");
145
+ d[y] = f;
146
+ }), d;
147
147
  }, s = (a = "") => {
148
- if (n(a) && a.length) return n(a);
148
+ if (r(a) && a.length) return r(a);
149
149
  {
150
- let u = navigator.language || navigator.userLanguage;
151
- if (u.indexOf("en") < 0 && u.indexOf("es") < 0 && (u = "en-US"), u = u.split("-")[0], u)
152
- return a.length && i(a, 730, u), u;
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, u = 0, f = window, p = "smooth") => f.scroll({
155
+ }, n = (a = 0, d = 0, m = window, b = "smooth") => m.scroll({
156
156
  top: a,
157
- left: u,
158
- behavior: p
159
- }), i = (a, u, f, p = "/", y = "Lax") => {
160
- var m = /* @__PURE__ */ new Date();
161
- m.setTime(m.getTime() + u * 24 * 60 * 60 * 1e3);
162
- const v = "; expires=" + m.toUTCString();
163
- document.cookie = `${a}=${f || ""}${v};path=${p};SameSite=${y}`;
164
- }, n = (a) => {
165
- const u = `${a}=`, p = decodeURIComponent(document.cookie).split(";");
166
- for (let y = 0; y < p.length; y += 1) {
167
- let m = p[y];
168
- for (; m.charAt(0) === " "; )
169
- m = m.substring(1);
170
- if (m.indexOf(u) === 0)
171
- return m.substring(u.length, m.length);
157
+ left: d,
158
+ behavior: b
159
+ }), i = (a, d, m, b = "/", y = "Lax") => {
160
+ var f = /* @__PURE__ */ new Date();
161
+ f.setTime(f.getTime() + d * 24 * 60 * 60 * 1e3);
162
+ const w = "; expires=" + f.toUTCString();
163
+ document.cookie = `${a}=${m || ""}${w};path=${b};SameSite=${y}`;
164
+ }, r = (a) => {
165
+ const d = `${a}=`, b = decodeURIComponent(document.cookie).split(";");
166
+ for (let y = 0; y < b.length; y += 1) {
167
+ let f = b[y];
168
+ for (; f.charAt(0) === " "; )
169
+ f = f.substring(1);
170
+ if (f.indexOf(d) === 0)
171
+ return f.substring(d.length, f.length);
172
172
  }
173
173
  return "";
174
174
  };
175
175
  return tt = {
176
- getCookie: n,
176
+ getCookie: r,
177
177
  createCookie: i,
178
178
  deleteCookie: (a) => document.cookie = `${a}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,
179
179
  getUserLanguage: s,
180
- scrollTo: r,
180
+ scrollTo: n,
181
181
  parseQueries: t,
182
182
  validation: e
183
183
  }, tt;
@@ -186,9 +186,9 @@ var Js = Gs();
186
186
  function Xr() {
187
187
  const { t: e, language: t } = T();
188
188
  return { timeAge: E(
189
- (r) => {
190
- const n = /* @__PURE__ */ new Date() - r, c = Math.floor(n / (1e3 * 60)), a = Math.floor(c / 60), u = t === "es", f = e("_accessibility:labels.ago"), p = e("_accessibility:labels.minute"), y = e("_accessibility:labels.minutes"), m = e("_accessibility:labels.hour"), v = e("_accessibility:labels.hours"), C = e("_accessibility:labels.yesterday"), g = e("_accessibility:labels.justNow");
191
- return n < 1e3 * 60 ? g : c < 60 ? `${u ? f : ""} ${c} ${c === 1 ? p : y} ${u ? "" : f}` : a < 24 ? `${u ? f : ""} ${a} ${a === 1 ? m : v} ${u ? "" : f}` : a < 48 ? C : r.toLocaleDateString(navigator.language || "es-ES", {
189
+ (n) => {
190
+ const r = /* @__PURE__ */ new Date() - n, c = Math.floor(r / (1e3 * 60)), a = Math.floor(c / 60), d = t === "es", m = e("_accessibility:labels.ago"), b = e("_accessibility:labels.minute"), y = e("_accessibility:labels.minutes"), f = e("_accessibility:labels.hour"), w = e("_accessibility:labels.hours"), C = e("_accessibility:labels.yesterday"), g = e("_accessibility:labels.justNow");
191
+ return r < 1e3 * 60 ? g : c < 60 ? `${d ? m : ""} ${c} ${c === 1 ? b : y} ${d ? "" : m}` : a < 24 ? `${d ? m : ""} ${a} ${a === 1 ? f : w} ${d ? "" : m}` : a < 48 ? C : n.toLocaleDateString(navigator.language || "es-ES", {
192
192
  day: "2-digit",
193
193
  month: "2-digit",
194
194
  year: "numeric"
@@ -198,85 +198,85 @@ function Xr() {
198
198
  ) };
199
199
  }
200
200
  var Q = /* @__PURE__ */ ((e) => (e[e.success = 0] = "success", e[e.error = 1] = "error", e[e.warning = 2] = "warning", e[e.info = 3] = "info", e))(Q || {}), ne = /* @__PURE__ */ ((e) => (e.GET = "GET", e.POST = "POST", e.PUT = "PUT", e.PATCH = "PATCH", e.DELETE = "DELETE", e))(ne || {});
201
- async function Ee(e, t = "GET", s, r) {
201
+ async function Ee(e, t = "GET", s, n) {
202
202
  const i = {
203
203
  ...s ? { "Content-Type": "application/json" } : {},
204
- ...r
204
+ ...n
205
205
  };
206
206
  try {
207
- const n = await fetch(e, {
207
+ const r = await fetch(e, {
208
208
  method: t,
209
209
  headers: i,
210
210
  ...s ? { body: JSON.stringify(s) } : {}
211
- }), c = await n.text();
211
+ }), c = await r.text();
212
212
  let a = null;
213
213
  try {
214
214
  a = c ? JSON.parse(c) : null;
215
215
  } catch {
216
216
  a = null;
217
217
  }
218
- if (!n.ok) {
219
- const u = typeof a == "object" && a !== null ? a.message ?? a.error ?? c : c || n.statusText;
218
+ if (!r.ok) {
219
+ const d = typeof a == "object" && a !== null ? a.message ?? a.error ?? c : c || r.statusText;
220
220
  return {
221
221
  data: null,
222
- status: n.status,
222
+ status: r.status,
223
223
  error: {
224
- status: n.status,
225
- message: u || "Unknown error occurred"
224
+ status: r.status,
225
+ message: d || "Unknown error occurred"
226
226
  }
227
227
  };
228
228
  }
229
229
  return {
230
- data: n.status !== 204 && a !== null ? a : null,
231
- status: n.status,
230
+ data: r.status !== 204 && a !== null ? a : null,
231
+ status: r.status,
232
232
  error: null
233
233
  };
234
- } catch (n) {
234
+ } catch (r) {
235
235
  return {
236
236
  data: null,
237
237
  status: 500,
238
238
  error: {
239
239
  status: 500,
240
- message: n instanceof Error ? n.message : "Unknown error occurred"
240
+ message: r instanceof Error ? r.message : "Unknown error occurred"
241
241
  }
242
242
  };
243
243
  }
244
244
  }
245
245
  function Ys(e, t) {
246
246
  if (t) {
247
- const s = Object.entries(t).filter(([, r]) => r != null).map(
248
- ([r, i]) => `${encodeURIComponent(r)}=${encodeURIComponent(String(i))}`
247
+ const s = Object.entries(t).filter(([, n]) => n != null).map(
248
+ ([n, i]) => `${encodeURIComponent(n)}=${encodeURIComponent(String(i))}`
249
249
  ).join("&");
250
250
  return s ? `${e}?${s}` : e;
251
251
  }
252
252
  return e;
253
253
  }
254
- const Ht = (e, t, s) => {
255
- const r = [];
254
+ const jt = (e, t, s) => {
255
+ const n = [];
256
256
  if (t) {
257
- const { sortingBy: i, sortingOrder: n, currentPage: c, pageSize: a } = t;
258
- r.push(
257
+ const { sortingBy: i, sortingOrder: r, currentPage: c, pageSize: a } = t;
258
+ n.push(
259
259
  `sort=${String(i)}`,
260
- `order=${n}`,
260
+ `order=${r}`,
261
261
  `page=${c}`,
262
262
  `pageSize=${a}`
263
263
  );
264
264
  }
265
265
  if (s) {
266
266
  const i = Object.entries(s).filter(
267
- ([, n]) => n != null && n !== ""
268
- ).flatMap(([n, c]) => {
267
+ ([, r]) => r != null && r !== ""
268
+ ).flatMap(([r, c]) => {
269
269
  if (Array.isArray(c))
270
- return c.map((a) => `${n}==${encodeURIComponent((a == null ? void 0 : a.id) ?? a)}`);
270
+ return c.map((a) => `${r}==${encodeURIComponent((a == null ? void 0 : a.id) ?? a)}`);
271
271
  if (typeof c == "object" && c !== null && "start" in c && "end" in c) {
272
272
  const a = [];
273
- return c.start != null && c.start !== "" && a.push(`${n}>=${encodeURIComponent(c.start)}`), c.end != null && c.end !== "" && a.push(`${n}<=${encodeURIComponent(c.end)}`), a;
273
+ return c.start != null && c.start !== "" && a.push(`${r}>=${encodeURIComponent(c.start)}`), c.end != null && c.end !== "" && a.push(`${r}<=${encodeURIComponent(c.end)}`), a;
274
274
  }
275
- return typeof c == "object" && c !== null ? `${n}==${encodeURIComponent(c.id ?? "")}` : `${n}==${encodeURIComponent(c)}`;
275
+ return typeof c == "object" && c !== null ? `${r}==${encodeURIComponent(c.id ?? "")}` : `${r}==${encodeURIComponent(c)}`;
276
276
  });
277
- i.length > 0 && r.push(`filters=${i.join(",")}`);
277
+ i.length > 0 && n.push(`filters=${i.join(",")}`);
278
278
  }
279
- return r.length ? `${e}?${r.join("&")}` : e;
279
+ return n.length ? `${e}?${n.join("&")}` : e;
280
280
  };
281
281
  class Qt {
282
282
  /**
@@ -285,12 +285,12 @@ class Qt {
285
285
  * @param secured if the api client requires token
286
286
  * @param tokenAcquirer custom token acquirer
287
287
  */
288
- constructor(t, s = "user", r = !0, i = null) {
288
+ constructor(t, s = "user", n = !0, i = null) {
289
289
  me(this, "baseUrl");
290
290
  me(this, "userKey");
291
291
  me(this, "secured");
292
292
  me(this, "tokenAcquirer");
293
- this.baseUrl = t, this.secured = r, this.userKey = s, i || (this.tokenAcquirer = this.defaultTokenAcquirer);
293
+ this.baseUrl = t, this.secured = n, this.userKey = s, i || (this.tokenAcquirer = this.defaultTokenAcquirer);
294
294
  }
295
295
  defaultTokenAcquirer(t) {
296
296
  if (t) return { credentials: "include" };
@@ -298,18 +298,18 @@ class Qt {
298
298
  if (s && s.length)
299
299
  return { Authorization: `Bearer ${s}` };
300
300
  }
301
- async doQuery(t, s = ne.GET, r, i) {
302
- const n = this.secured ? this.defaultTokenAcquirer() : {}, { data: c, status: a, error: u } = await Ee(
301
+ async doQuery(t, s = ne.GET, n, i) {
302
+ const r = this.secured ? this.defaultTokenAcquirer() : {}, { data: c, status: a, error: d } = await Ee(
303
303
  `${this.baseUrl}${t}`,
304
304
  s,
305
- r,
305
+ n,
306
306
  {
307
- ...n,
307
+ ...r,
308
308
  ...i ?? {}
309
309
  }
310
310
  );
311
- if (u || a < 200 || a >= 300)
312
- throw u ?? {
311
+ if (d || a < 200 || a >= 300)
312
+ throw d ?? {
313
313
  status: a,
314
314
  message: String(a)
315
315
  };
@@ -321,12 +321,12 @@ class Qt {
321
321
  * @param query - query parameters
322
322
  * @returns Result list
323
323
  */
324
- async get(t, s, r) {
325
- const i = Ht(t, s, r), n = this.secured ? this.defaultTokenAcquirer() : void 0, { data: c, error: a } = await Ee(
324
+ async get(t, s, n) {
325
+ const i = jt(t, s, n), r = this.secured ? this.defaultTokenAcquirer() : void 0, { data: c, error: a } = await Ee(
326
326
  `${this.baseUrl}${i}`,
327
327
  ne.GET,
328
328
  null,
329
- n
329
+ r
330
330
  );
331
331
  if (a) throw a;
332
332
  return c;
@@ -338,18 +338,18 @@ class Qt {
338
338
  * @returns updated entity
339
339
  */
340
340
  async patch(t, s) {
341
- const r = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: n, status: c } = await Ee(
341
+ const n = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: r, status: c } = await Ee(
342
342
  `${this.baseUrl}${t}`,
343
343
  ne.PATCH,
344
344
  s,
345
- r
345
+ n
346
346
  );
347
- if (i || !n)
347
+ if (i || !r)
348
348
  throw i ?? {
349
349
  status: c,
350
350
  message: "Unknown error"
351
351
  };
352
- return n;
352
+ return r;
353
353
  }
354
354
  /**
355
355
  * @param endpoint - backend endpoint
@@ -357,18 +357,18 @@ class Qt {
357
357
  * @returns delete result
358
358
  */
359
359
  async delete(t, s) {
360
- const r = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: n, status: c } = await Ee(
360
+ const n = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: r, status: c } = await Ee(
361
361
  `${this.baseUrl}${t}`,
362
362
  ne.DELETE,
363
363
  s,
364
- r
364
+ n
365
365
  );
366
- if (i || !n)
366
+ if (i || !r)
367
367
  throw i ?? {
368
368
  status: c,
369
369
  message: "Unknown error"
370
370
  };
371
- return n;
371
+ return r;
372
372
  }
373
373
  /**
374
374
  *
@@ -377,18 +377,18 @@ class Qt {
377
377
  * @returns inserted item
378
378
  */
379
379
  async post(t, s) {
380
- const r = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: n, status: c } = await Ee(
380
+ const n = this.secured ? this.defaultTokenAcquirer() : void 0, { error: i, data: r, status: c } = await Ee(
381
381
  `${this.baseUrl}${t}`,
382
382
  ne.POST,
383
383
  s,
384
- r
384
+ n
385
385
  );
386
- if (i || !n)
386
+ if (i || !r)
387
387
  throw i ?? {
388
388
  status: c,
389
389
  message: "Unknown error"
390
390
  };
391
- return n;
391
+ return r;
392
392
  }
393
393
  }
394
394
  class Xs {
@@ -397,11 +397,11 @@ class Xs {
397
397
  this.api = new Qt(t, s, !1);
398
398
  }
399
399
  async login(t) {
400
- const s = "auth/sign-in", r = t;
400
+ const s = "auth/sign-in", n = t;
401
401
  return await this.api.doQuery(
402
402
  s,
403
403
  ne.POST,
404
- r
404
+ n
405
405
  );
406
406
  }
407
407
  async logout() {
@@ -438,11 +438,11 @@ class en {
438
438
  * @param table
439
439
  * @param secured to see if the api client requires jwt protection
440
440
  */
441
- constructor(t, s, r = "user", i = !0) {
441
+ constructor(t, s, n = "user", i = !0) {
442
442
  me(this, "table");
443
443
  me(this, "secured");
444
444
  me(this, "api");
445
- this.table = t, this.secured = i, this.api = new Qt(s, r, i);
445
+ this.table = t, this.secured = i, this.api = new Qt(s, n, i);
446
446
  }
447
447
  /**
448
448
  *
@@ -490,7 +490,7 @@ class en {
490
490
  * @returns - List of elements
491
491
  */
492
492
  async export(t) {
493
- const s = Ht(
493
+ const s = jt(
494
494
  `${this.table}/export`,
495
495
  void 0,
496
496
  t
@@ -582,12 +582,12 @@ function St(e) {
582
582
  );
583
583
  }
584
584
  function Zs(e) {
585
- const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = String(t.getDate()).padStart(2, "0"), r = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getFullYear()).slice(-2), n = String(t.getHours()).padStart(2, "0"), c = String(t.getMinutes()).padStart(2, "0");
586
- return `${s}/${r}/${i} ${n}:${c}`;
585
+ const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = String(t.getDate()).padStart(2, "0"), n = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getFullYear()).slice(-2), r = String(t.getHours()).padStart(2, "0"), c = String(t.getMinutes()).padStart(2, "0");
586
+ return `${s}/${n}/${i} ${r}:${c}`;
587
587
  }
588
588
  function sn(e) {
589
- const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0"), n = String(t.getHours()).padStart(2, "0"), c = String(t.getMinutes()).padStart(2, "0");
590
- return `${s}-${r}-${i}T${n}:${c}`;
589
+ const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0"), r = String(t.getHours()).padStart(2, "0"), c = String(t.getMinutes()).padStart(2, "0");
590
+ return `${s}-${n}-${i}T${r}:${c}`;
591
591
  }
592
592
  const er = () => {
593
593
  var s;
@@ -607,44 +607,44 @@ function We(e) {
607
607
  return typeof (t == null ? void 0 : t.status) == "number" && typeof (t == null ? void 0 : t.message) == "string";
608
608
  }
609
609
  function rn(e, t) {
610
- return e != null && e.errors ? e.errors.map(([s, r]) => t(s, r)) : [];
610
+ return e != null && e.errors ? e.errors.map(([s, n]) => t(s, n)) : [];
611
611
  }
612
612
  const Wt = Pe({});
613
613
  function nn(e) {
614
- const { children: t } = e, [s, r] = Es(
615
- (f, p) => {
616
- const { type: y, items: m, index: v } = p;
614
+ const { children: t } = e, [s, n] = Es(
615
+ (m, b) => {
616
+ const { type: y, items: f, index: w } = b;
617
617
  switch (y) {
618
618
  case "set":
619
- return (m == null ? void 0 : m.map((C, g) => ({
619
+ return (f == null ? void 0 : f.map((C, g) => ({
620
620
  ...C,
621
621
  id: g
622
622
  }))) ?? [];
623
623
  case "remove":
624
- return v !== void 0 ? f.filter((C, g) => g !== v) : [];
624
+ return w !== void 0 ? m.filter((C, g) => g !== w) : [];
625
625
  }
626
- return f;
626
+ return m;
627
627
  },
628
628
  [],
629
629
  () => []
630
- ), i = (f) => r({
630
+ ), i = (m) => n({
631
631
  type: "set",
632
- items: [{ ...f, type: Q.error }]
633
- }), n = (f) => r({
632
+ items: [{ ...m, type: Q.error }]
633
+ }), r = (m) => n({
634
634
  type: "set",
635
- items: [{ ...f }]
636
- }), c = (f) => r({ type: "set", items: f }), a = (f) => r({
635
+ items: [{ ...m }]
636
+ }), c = (m) => n({ type: "set", items: m }), a = (m) => n({
637
637
  type: "set",
638
- items: [{ ...f, type: Q.success }]
639
- }), u = (f) => r({ type: "remove", index: f });
638
+ items: [{ ...m, type: Q.success }]
639
+ }), d = (m) => n({ type: "remove", index: m });
640
640
  return /* @__PURE__ */ h(
641
641
  Wt.Provider,
642
642
  {
643
643
  value: {
644
644
  notification: s,
645
- removeNotification: u,
645
+ removeNotification: d,
646
646
  showErrorNotification: i,
647
- showNotification: n,
647
+ showNotification: r,
648
648
  showSuccessNotification: a,
649
649
  showStackNotifications: c
650
650
  },
@@ -657,7 +657,7 @@ const Ne = () => {
657
657
  if (e === void 0)
658
658
  throw new Error("NotificationContext must be used within a Provider");
659
659
  return e;
660
- }, be = new Hs({
660
+ }, pe = new js({
661
661
  defaultOptions: {
662
662
  queries: {
663
663
  refetchInterval: !1,
@@ -671,51 +671,51 @@ const Ne = () => {
671
671
  }
672
672
  }), zt = Pe({}), an = (e) => {
673
673
  const { children: t, manager: s } = e;
674
- return /* @__PURE__ */ h(zt.Provider, { value: { client: s }, children: /* @__PURE__ */ h(Qs, { client: be, children: t }) });
674
+ return /* @__PURE__ */ h(zt.Provider, { value: { client: s }, children: /* @__PURE__ */ h(Qs, { client: pe, children: t }) });
675
675
  }, tr = () => {
676
676
  const e = Me(zt);
677
677
  if (e === void 0)
678
678
  throw new Error("managerContext must be used within a Provider");
679
679
  return e.client;
680
680
  }, Gt = Pe({}), on = (e) => {
681
- const { children: t, guestMode: s = "guest_mode", user: r = "user" } = e, i = tr(), [n, c] = B({}), a = E(() => !!Kt(s, "boolean") && n.token === void 0, [n.token]), u = E((v) => {
682
- _t(s, v);
683
- }, []), f = E((v) => {
684
- v && (c(v), Ct(s), _t(r, v.token));
685
- }, []), p = E(async () => {
681
+ const { children: t, guestMode: s = "guest_mode", user: n = "user" } = e, i = tr(), [r, c] = B({}), a = E(() => !!Kt(s, "boolean") && r.token === void 0, [r.token]), d = E((w) => {
682
+ _t(s, w);
683
+ }, []), m = E((w) => {
684
+ w && (c(w), Ct(s), _t(n, w.token));
685
+ }, []), b = E(async () => {
686
686
  try {
687
687
  await i.Auth.logout();
688
- } catch (v) {
689
- console.error(v);
688
+ } catch (w) {
689
+ console.error(w);
690
690
  }
691
- c({}), Ct(r);
691
+ c({}), Ct(n);
692
692
  }, [i.Auth]), y = E(async () => {
693
693
  try {
694
- const v = await i.Auth.getSession();
695
- f(v);
696
- } catch (v) {
697
- console.error(v), p();
694
+ const w = await i.Auth.getSession();
695
+ m(w);
696
+ } catch (w) {
697
+ console.error(w), b();
698
698
  }
699
- }, [f, p, i.Auth]), m = {
700
- account: n,
701
- logUser: f,
702
- logoutUser: p,
699
+ }, [m, b, i.Auth]), f = {
700
+ account: r,
701
+ logUser: m,
702
+ logoutUser: b,
703
703
  logUserFromLocal: y,
704
704
  isInGuestMode: a,
705
- setGuestMode: u
705
+ setGuestMode: d
706
706
  };
707
- return /* @__PURE__ */ h(Gt.Provider, { value: m, children: t });
707
+ return /* @__PURE__ */ h(Gt.Provider, { value: f, children: t });
708
708
  }, Jt = () => {
709
709
  const e = Me(Gt);
710
710
  if (e === void 0)
711
711
  throw new Error("authContext must be used within a Provider");
712
712
  return e;
713
713
  }, Yt = Pe({}), cn = (e) => {
714
- const { children: t, location: s, navigate: r, linkComponent: i, searchComponent: n } = e;
714
+ const { children: t, location: s, navigate: n, linkComponent: i, searchComponent: r } = e;
715
715
  return /* @__PURE__ */ h(
716
716
  Yt.Provider,
717
717
  {
718
- value: { location: s, navigate: r, linkComponent: i, searchComponent: n },
718
+ value: { location: s, navigate: n, linkComponent: i, searchComponent: r },
719
719
  children: t
720
720
  }
721
721
  );
@@ -727,54 +727,54 @@ const Ne = () => {
727
727
  );
728
728
  return e;
729
729
  }, Xt = Pe({}), ln = (e) => {
730
- const { children: t } = e, [s, r] = B({}), i = E(
731
- (u, f) => r((p) => ({
732
- ...p,
733
- [u]: [...p[u] ?? [], f]
730
+ const { children: t } = e, [s, n] = B({}), i = E(
731
+ (d, m) => n((b) => ({
732
+ ...b,
733
+ [d]: [...b[d] ?? [], m]
734
734
  })),
735
735
  []
736
- ), n = E(
737
- (u, f) => r((p) => ({
738
- ...p,
739
- [u]: (p[u] ?? []).filter((y, m) => m !== f)
736
+ ), r = E(
737
+ (d, m) => n((b) => ({
738
+ ...b,
739
+ [d]: (b[d] ?? []).filter((y, f) => f !== m)
740
740
  })),
741
741
  []
742
- ), c = E((u) => {
743
- r(u ? (f) => ({
744
- ...f,
745
- [u]: []
742
+ ), c = E((d) => {
743
+ n(d ? (m) => ({
744
+ ...m,
745
+ [d]: []
746
746
  }) : {});
747
747
  }, []), a = ke(
748
748
  () => ({
749
749
  dynamicItems: s,
750
750
  addChildItem: i,
751
- removeChildItem: n,
751
+ removeChildItem: r,
752
752
  clearDynamicItems: c
753
753
  }),
754
- [s, c, n, i]
754
+ [s, c, r, i]
755
755
  );
756
756
  return /* @__PURE__ */ h(Xt.Provider, { value: a, children: t });
757
757
  }, sr = () => Me(
758
758
  Xt
759
759
  ), Zt = (e) => {
760
- const { showSuccessNotification: t } = Ne(), { mutationFn: s, onError: r, onSuccess: i, onSuccessMessage: n } = e, [c, a] = B([]), { open: u, handleClose: f, handleOpen: p } = cs(), y = () => {
761
- f(), a([]);
762
- }, m = async (C) => {
763
- a(C), p();
764
- }, v = Ie({
760
+ const { showSuccessNotification: t } = Ne(), { mutationFn: s, onError: n, onSuccess: i, onSuccessMessage: r } = e, [c, a] = B([]), { open: d, handleClose: m, handleOpen: b } = cs(), y = () => {
761
+ m(), a([]);
762
+ }, f = async (C) => {
763
+ a(C), b();
764
+ }, w = Ie({
765
765
  mutationFn: () => s(
766
766
  Array.isArray(c) ? c : [c]
767
767
  ),
768
768
  onError: (C) => {
769
- console.error(C), r && r(C), y();
769
+ console.error(C), n && n(C), y();
770
770
  },
771
771
  onSuccess: async (C) => {
772
772
  i && i(C), t({
773
- message: n
773
+ message: r
774
774
  }), y();
775
775
  }
776
776
  });
777
- return { open: u, onClick: m, close: y, dialogFn: v, isLoading: v.isPending };
777
+ return { open: d, onClick: f, close: y, dialogFn: w, isLoading: w.isPending };
778
778
  };
779
779
  var Oe = (e) => e.type === "checkbox", Se = (e) => e instanceof Date, se = (e) => e == null;
780
780
  const es = (e) => typeof e == "object";
@@ -784,10 +784,10 @@ var K = (e) => !se(e) && !Array.isArray(e) && es(e) && !Se(e), rr = (e) => K(e)
784
784
  }, nt = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
785
785
  function X(e) {
786
786
  let t;
787
- const s = Array.isArray(e), r = typeof FileList < "u" ? e instanceof FileList : !1;
787
+ const s = Array.isArray(e), n = typeof FileList < "u" ? e instanceof FileList : !1;
788
788
  if (e instanceof Date)
789
789
  t = new Date(e);
790
- else if (!(nt && (e instanceof Blob || r)) && (s || K(e)))
790
+ else if (!(nt && (e instanceof Blob || n)) && (s || K(e)))
791
791
  if (t = s ? [] : {}, !s && !ar(e))
792
792
  t = e;
793
793
  else
@@ -800,21 +800,21 @@ function X(e) {
800
800
  var Ge = (e) => /^\w*$/.test(e), z = (e) => e === void 0, it = (e) => Array.isArray(e) ? e.filter(Boolean) : [], at = (e) => it(e.replace(/["|']|\]/g, "").split(/\.|\[/)), _ = (e, t, s) => {
801
801
  if (!t || !K(e))
802
802
  return s;
803
- const r = (Ge(t) ? [t] : at(t)).reduce((i, n) => se(i) ? i : i[n], e);
804
- return z(r) || r === e ? z(e[t]) ? s : e[t] : r;
803
+ const n = (Ge(t) ? [t] : at(t)).reduce((i, r) => se(i) ? i : i[r], e);
804
+ return z(n) || n === e ? z(e[t]) ? s : e[t] : n;
805
805
  }, he = (e) => typeof e == "boolean", R = (e, t, s) => {
806
- let r = -1;
807
- const i = Ge(t) ? [t] : at(t), n = i.length, c = n - 1;
808
- for (; ++r < n; ) {
809
- const a = i[r];
810
- let u = s;
811
- if (r !== c) {
812
- const f = e[a];
813
- u = K(f) || Array.isArray(f) ? f : isNaN(+i[r + 1]) ? {} : [];
806
+ let n = -1;
807
+ const i = Ge(t) ? [t] : at(t), r = i.length, c = r - 1;
808
+ for (; ++n < r; ) {
809
+ const a = i[n];
810
+ let d = s;
811
+ if (n !== c) {
812
+ const m = e[a];
813
+ d = K(m) || Array.isArray(m) ? m : isNaN(+i[n + 1]) ? {} : [];
814
814
  }
815
815
  if (a === "__proto__" || a === "constructor" || a === "prototype")
816
816
  return;
817
- e[a] = u, e = e[a];
817
+ e[a] = d, e = e[a];
818
818
  }
819
819
  };
820
820
  const kt = {
@@ -836,49 +836,49 @@ const kt = {
836
836
  validate: "validate"
837
837
  }, or = ae.createContext(null);
838
838
  or.displayName = "HookFormContext";
839
- var cr = (e, t, s, r = !0) => {
839
+ var cr = (e, t, s, n = !0) => {
840
840
  const i = {
841
841
  defaultValues: t._defaultValues
842
842
  };
843
- for (const n in e)
844
- Object.defineProperty(i, n, {
843
+ for (const r in e)
844
+ Object.defineProperty(i, r, {
845
845
  get: () => {
846
- const c = n;
847
- return t._proxyFormState[c] !== de.all && (t._proxyFormState[c] = !r || de.all), e[c];
846
+ const c = r;
847
+ return t._proxyFormState[c] !== de.all && (t._proxyFormState[c] = !n || de.all), e[c];
848
848
  }
849
849
  });
850
850
  return i;
851
851
  };
852
852
  const lr = typeof window < "u" ? ae.useLayoutEffect : ae.useEffect;
853
- var ye = (e) => typeof e == "string", ur = (e, t, s, r, i) => ye(e) ? (r && t.watch.add(e), _(s, e, i)) : Array.isArray(e) ? e.map((n) => (r && t.watch.add(n), _(s, n))) : (r && (t.watchAll = !0), s), rt = (e) => se(e) || !es(e);
853
+ var ye = (e) => typeof e == "string", ur = (e, t, s, n, i) => ye(e) ? (n && t.watch.add(e), _(s, e, i)) : Array.isArray(e) ? e.map((r) => (n && t.watch.add(r), _(s, r))) : (n && (t.watchAll = !0), s), rt = (e) => se(e) || !es(e);
854
854
  function ve(e, t, s = /* @__PURE__ */ new WeakSet()) {
855
855
  if (rt(e) || rt(t))
856
856
  return e === t;
857
857
  if (Se(e) && Se(t))
858
858
  return e.getTime() === t.getTime();
859
- const r = Object.keys(e), i = Object.keys(t);
860
- if (r.length !== i.length)
859
+ const n = Object.keys(e), i = Object.keys(t);
860
+ if (n.length !== i.length)
861
861
  return !1;
862
862
  if (s.has(e) || s.has(t))
863
863
  return !0;
864
864
  s.add(e), s.add(t);
865
- for (const n of r) {
866
- const c = e[n];
867
- if (!i.includes(n))
865
+ for (const r of n) {
866
+ const c = e[r];
867
+ if (!i.includes(r))
868
868
  return !1;
869
- if (n !== "ref") {
870
- const a = t[n];
869
+ if (r !== "ref") {
870
+ const a = t[r];
871
871
  if (Se(c) && Se(a) || K(c) && K(a) || Array.isArray(c) && Array.isArray(a) ? !ve(c, a, s) : c !== a)
872
872
  return !1;
873
873
  }
874
874
  }
875
875
  return !0;
876
876
  }
877
- var dr = (e, t, s, r, i) => t ? {
877
+ var dr = (e, t, s, n, i) => t ? {
878
878
  ...s[e],
879
879
  types: {
880
880
  ...s[e] && s[e].types ? s[e].types : {},
881
- [r]: i || !0
881
+ [n]: i || !0
882
882
  }
883
883
  } : {}, Le = (e) => Array.isArray(e) ? e : [e], Nt = () => {
884
884
  let e = [];
@@ -887,29 +887,29 @@ var dr = (e, t, s, r, i) => t ? {
887
887
  return e;
888
888
  },
889
889
  next: (i) => {
890
- for (const n of e)
891
- n.next && n.next(i);
890
+ for (const r of e)
891
+ r.next && r.next(i);
892
892
  },
893
893
  subscribe: (i) => (e.push(i), {
894
894
  unsubscribe: () => {
895
- e = e.filter((n) => n !== i);
895
+ e = e.filter((r) => r !== i);
896
896
  }
897
897
  }),
898
898
  unsubscribe: () => {
899
899
  e = [];
900
900
  }
901
901
  };
902
- }, re = (e) => K(e) && !Object.keys(e).length, ot = (e) => e.type === "file", fe = (e) => typeof e == "function", je = (e) => {
902
+ }, re = (e) => K(e) && !Object.keys(e).length, ot = (e) => e.type === "file", fe = (e) => typeof e == "function", He = (e) => {
903
903
  if (!nt)
904
904
  return !1;
905
905
  const t = e ? e.ownerDocument : 0;
906
906
  return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
907
- }, ts = (e) => e.type === "select-multiple", ct = (e) => e.type === "radio", fr = (e) => ct(e) || Oe(e), st = (e) => je(e) && e.isConnected;
907
+ }, ts = (e) => e.type === "select-multiple", ct = (e) => e.type === "radio", fr = (e) => ct(e) || Oe(e), st = (e) => He(e) && e.isConnected;
908
908
  function mr(e, t) {
909
909
  const s = t.slice(0, -1).length;
910
- let r = 0;
911
- for (; r < s; )
912
- e = z(e) ? r++ : e[t[r++]];
910
+ let n = 0;
911
+ for (; n < s; )
912
+ e = z(e) ? n++ : e[t[n++]];
913
913
  return e;
914
914
  }
915
915
  function hr(e) {
@@ -919,8 +919,8 @@ function hr(e) {
919
919
  return !0;
920
920
  }
921
921
  function W(e, t) {
922
- const s = Array.isArray(t) ? t : Ge(t) ? [t] : at(t), r = s.length === 1 ? e : mr(e, s), i = s.length - 1, n = s[i];
923
- return r && delete r[n], i !== 0 && (K(r) && re(r) || Array.isArray(r) && hr(r)) && W(e, s.slice(0, -1)), e;
922
+ const s = Array.isArray(t) ? t : Ge(t) ? [t] : at(t), n = s.length === 1 ? e : mr(e, s), i = s.length - 1, r = s[i];
923
+ return n && delete n[r], i !== 0 && (K(n) && re(n) || Array.isArray(n) && hr(n)) && W(e, s.slice(0, -1)), e;
924
924
  }
925
925
  var ss = (e) => {
926
926
  for (const t in e)
@@ -928,21 +928,21 @@ var ss = (e) => {
928
928
  return !0;
929
929
  return !1;
930
930
  };
931
- function He(e, t = {}) {
931
+ function je(e, t = {}) {
932
932
  const s = Array.isArray(e);
933
933
  if (K(e) || s)
934
- for (const r in e)
935
- Array.isArray(e[r]) || K(e[r]) && !ss(e[r]) ? (t[r] = Array.isArray(e[r]) ? [] : {}, He(e[r], t[r])) : se(e[r]) || (t[r] = !0);
934
+ for (const n in e)
935
+ Array.isArray(e[n]) || K(e[n]) && !ss(e[n]) ? (t[n] = Array.isArray(e[n]) ? [] : {}, je(e[n], t[n])) : se(e[n]) || (t[n] = !0);
936
936
  return t;
937
937
  }
938
938
  function rs(e, t, s) {
939
- const r = Array.isArray(e);
940
- if (K(e) || r)
939
+ const n = Array.isArray(e);
940
+ if (K(e) || n)
941
941
  for (const i in e)
942
- Array.isArray(e[i]) || K(e[i]) && !ss(e[i]) ? z(t) || rt(s[i]) ? s[i] = Array.isArray(e[i]) ? He(e[i], []) : { ...He(e[i]) } : rs(e[i], se(t) ? {} : t[i], s[i]) : s[i] = !ve(e[i], t[i]);
942
+ Array.isArray(e[i]) || K(e[i]) && !ss(e[i]) ? z(t) || rt(s[i]) ? s[i] = Array.isArray(e[i]) ? je(e[i], []) : { ...je(e[i]) } : rs(e[i], se(t) ? {} : t[i], s[i]) : s[i] = !ve(e[i], t[i]);
943
943
  return s;
944
944
  }
945
- var $e = (e, t) => rs(e, t, He(t));
945
+ var $e = (e, t) => rs(e, t, je(t));
946
946
  const At = {
947
947
  value: !1,
948
948
  isValid: !1
@@ -959,7 +959,7 @@ var ns = (e) => {
959
959
  ) : At;
960
960
  }
961
961
  return At;
962
- }, is = (e, { valueAsNumber: t, valueAsDate: s, setValueAs: r }) => z(e) ? e : t ? e === "" ? NaN : e && +e : s && ye(e) ? new Date(e) : r ? r(e) : e;
962
+ }, is = (e, { valueAsNumber: t, valueAsDate: s, setValueAs: n }) => z(e) ? e : t ? e === "" ? NaN : e && +e : s && ye(e) ? new Date(e) : n ? n(e) : e;
963
963
  const $t = {
964
964
  isValid: !1,
965
965
  value: null
@@ -972,17 +972,17 @@ function Ft(e) {
972
972
  const t = e.ref;
973
973
  return ot(t) ? t.files : ct(t) ? as(e.refs).value : ts(t) ? [...t.selectedOptions].map(({ value: s }) => s) : Oe(t) ? ns(e.refs).value : is(z(t.value) ? e.ref.value : t.value, e);
974
974
  }
975
- var yr = (e, t, s, r) => {
975
+ var yr = (e, t, s, n) => {
976
976
  const i = {};
977
- for (const n of e) {
978
- const c = _(t, n);
979
- c && R(i, n, c._f);
977
+ for (const r of e) {
978
+ const c = _(t, r);
979
+ c && R(i, r, c._f);
980
980
  }
981
981
  return {
982
982
  criteriaMode: s,
983
983
  names: [...e],
984
984
  fields: i,
985
- shouldUseNativeValidation: r
985
+ shouldUseNativeValidation: n
986
986
  };
987
987
  }, Qe = (e) => e instanceof RegExp, Fe = (e) => z(e) ? e : Qe(e) ? e.source : K(e) ? Qe(e.value) ? e.value.source : e.value : e, Lt = (e) => ({
988
988
  isOnSubmit: !e || e === de.onSubmit,
@@ -992,16 +992,16 @@ var yr = (e, t, s, r) => {
992
992
  isOnTouch: e === de.onTouched
993
993
  });
994
994
  const Tt = "AsyncFunction";
995
- var gr = (e) => !!e && !!e.validate && !!(fe(e.validate) && e.validate.constructor.name === Tt || K(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === Tt)), pr = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Dt = (e, t, s) => !s && (t.watchAll || t.watch.has(e) || [...t.watch].some((r) => e.startsWith(r) && /^\.\w+/.test(e.slice(r.length))));
996
- const Te = (e, t, s, r) => {
995
+ var gr = (e) => !!e && !!e.validate && !!(fe(e.validate) && e.validate.constructor.name === Tt || K(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === Tt)), br = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Dt = (e, t, s) => !s && (t.watchAll || t.watch.has(e) || [...t.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length))));
996
+ const Te = (e, t, s, n) => {
997
997
  for (const i of s || Object.keys(e)) {
998
- const n = _(e, i);
999
- if (n) {
1000
- const { _f: c, ...a } = n;
998
+ const r = _(e, i);
999
+ if (r) {
1000
+ const { _f: c, ...a } = r;
1001
1001
  if (c) {
1002
- if (c.refs && c.refs[0] && t(c.refs[0], i) && !r)
1002
+ if (c.refs && c.refs[0] && t(c.refs[0], i) && !n)
1003
1003
  return !0;
1004
- if (c.ref && t(c.ref, c.name) && !r)
1004
+ if (c.ref && t(c.ref, c.name) && !n)
1005
1005
  return !0;
1006
1006
  if (Te(a, t))
1007
1007
  break;
@@ -1011,25 +1011,25 @@ const Te = (e, t, s, r) => {
1011
1011
  }
1012
1012
  };
1013
1013
  function Vt(e, t, s) {
1014
- const r = _(e, s);
1015
- if (r || Ge(s))
1014
+ const n = _(e, s);
1015
+ if (n || Ge(s))
1016
1016
  return {
1017
- error: r,
1017
+ error: n,
1018
1018
  name: s
1019
1019
  };
1020
1020
  const i = s.split(".");
1021
1021
  for (; i.length; ) {
1022
- const n = i.join("."), c = _(t, n), a = _(e, n);
1023
- if (c && !Array.isArray(c) && s !== n)
1022
+ const r = i.join("."), c = _(t, r), a = _(e, r);
1023
+ if (c && !Array.isArray(c) && s !== r)
1024
1024
  return { name: s };
1025
1025
  if (a && a.type)
1026
1026
  return {
1027
- name: n,
1027
+ name: r,
1028
1028
  error: a
1029
1029
  };
1030
1030
  if (a && a.root && a.root.type)
1031
1031
  return {
1032
- name: `${n}.root`,
1032
+ name: `${r}.root`,
1033
1033
  error: a.root
1034
1034
  };
1035
1035
  i.pop();
@@ -1038,13 +1038,13 @@ function Vt(e, t, s) {
1038
1038
  name: s
1039
1039
  };
1040
1040
  }
1041
- var br = (e, t, s, r) => {
1041
+ var pr = (e, t, s, n) => {
1042
1042
  s(e);
1043
- const { name: i, ...n } = e;
1044
- return re(n) || Object.keys(n).length >= Object.keys(t).length || Object.keys(n).find((c) => t[c] === (!r || de.all));
1045
- }, wr = (e, t, s) => !e || !t || e === t || Le(e).some((r) => r && (s ? r === t : r.startsWith(t) || t.startsWith(r))), vr = (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, xr = (e, t) => !it(_(e, t)).length && W(e, t), _r = (e, t, s) => {
1046
- const r = Le(_(e, s));
1047
- return R(r, "root", t[s]), R(e, s, r), e;
1043
+ const { name: i, ...r } = e;
1044
+ return re(r) || Object.keys(r).length >= Object.keys(t).length || Object.keys(r).find((c) => t[c] === (!n || de.all));
1045
+ }, wr = (e, t, s) => !e || !t || e === t || Le(e).some((n) => n && (s ? n === t : n.startsWith(t) || t.startsWith(n))), vr = (e, t, s, n, i) => i.isOnAll ? !1 : !s && i.isOnTouch ? !(t || e) : (s ? n.isOnBlur : i.isOnBlur) ? !e : (s ? n.isOnChange : i.isOnChange) ? e : !0, xr = (e, t) => !it(_(e, t)).length && W(e, t), _r = (e, t, s) => {
1046
+ const n = Le(_(e, s));
1047
+ return R(n, "root", t[s]), R(e, s, n), e;
1048
1048
  }, qe = (e) => ye(e);
1049
1049
  function Pt(e, t, s = "validate") {
1050
1050
  if (qe(e) || Array.isArray(e) && e.every(qe) || he(e) && !e)
@@ -1057,13 +1057,13 @@ function Pt(e, t, s = "validate") {
1057
1057
  var Ae = (e) => K(e) && !Qe(e) ? e : {
1058
1058
  value: e,
1059
1059
  message: ""
1060
- }, Mt = async (e, t, s, r, i, n) => {
1061
- const { ref: c, refs: a, required: u, maxLength: f, minLength: p, min: y, max: m, pattern: v, validate: C, name: g, valueAsNumber: L, mount: G } = e._f, k = _(s, g);
1060
+ }, Mt = async (e, t, s, n, i, r) => {
1061
+ const { ref: c, refs: a, required: d, maxLength: m, minLength: b, min: y, max: f, pattern: w, validate: C, name: g, valueAsNumber: L, mount: G } = e._f, k = _(s, g);
1062
1062
  if (!G || t.has(g))
1063
1063
  return {};
1064
- const j = a ? a[0] : c, V = (N) => {
1065
- i && j.reportValidity && (j.setCustomValidity(he(N) ? "" : N || ""), j.reportValidity());
1066
- }, F = {}, J = ct(c), P = Oe(c), le = J || P, H = (L || ot(c)) && z(c.value) && z(k) || je(c) && c.value === "" || k === "" || Array.isArray(k) && !k.length, U = dr.bind(null, g, r, F), O = (N, $, q, Y = ge.maxLength, ee = ge.minLength) => {
1064
+ const H = a ? a[0] : c, V = (N) => {
1065
+ i && H.reportValidity && (H.setCustomValidity(he(N) ? "" : N || ""), H.reportValidity());
1066
+ }, F = {}, J = ct(c), P = Oe(c), le = J || P, j = (L || ot(c)) && z(c.value) && z(k) || He(c) && c.value === "" || k === "" || Array.isArray(k) && !k.length, U = dr.bind(null, g, n, F), O = (N, $, q, Y = ge.maxLength, ee = ge.minLength) => {
1067
1067
  const M = N ? $ : q;
1068
1068
  F[g] = {
1069
1069
  type: N ? Y : ee,
@@ -1072,19 +1072,19 @@ var Ae = (e) => K(e) && !Qe(e) ? e : {
1072
1072
  ...U(N ? Y : ee, M)
1073
1073
  };
1074
1074
  };
1075
- if (n ? !Array.isArray(k) || !k.length : u && (!le && (H || se(k)) || he(k) && !k || P && !ns(a).isValid || J && !as(a).isValid)) {
1076
- const { value: N, message: $ } = qe(u) ? { value: !!u, message: u } : Ae(u);
1075
+ if (r ? !Array.isArray(k) || !k.length : d && (!le && (j || se(k)) || he(k) && !k || P && !ns(a).isValid || J && !as(a).isValid)) {
1076
+ const { value: N, message: $ } = qe(d) ? { value: !!d, message: d } : Ae(d);
1077
1077
  if (N && (F[g] = {
1078
1078
  type: ge.required,
1079
1079
  message: $,
1080
- ref: j,
1080
+ ref: H,
1081
1081
  ...U(ge.required, $)
1082
- }, !r))
1082
+ }, !n))
1083
1083
  return V($), F;
1084
1084
  }
1085
- if (!H && (!se(y) || !se(m))) {
1085
+ if (!j && (!se(y) || !se(f))) {
1086
1086
  let N, $;
1087
- const q = Ae(m), Y = Ae(y);
1087
+ const q = Ae(f), Y = Ae(y);
1088
1088
  if (!se(k) && !isNaN(k)) {
1089
1089
  const ee = c.valueAsNumber || k && +k;
1090
1090
  se(q.value) || (N = ee > q.value), se(Y.value) || ($ = ee < Y.value);
@@ -1092,47 +1092,47 @@ var Ae = (e) => K(e) && !Qe(e) ? e : {
1092
1092
  const ee = c.valueAsDate || new Date(k), M = (ue) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + ue), te = c.type == "time", ie = c.type == "week";
1093
1093
  ye(q.value) && k && (N = te ? M(k) > M(q.value) : ie ? k > q.value : ee > new Date(q.value)), ye(Y.value) && k && ($ = te ? M(k) < M(Y.value) : ie ? k < Y.value : ee < new Date(Y.value));
1094
1094
  }
1095
- if ((N || $) && (O(!!N, q.message, Y.message, ge.max, ge.min), !r))
1095
+ if ((N || $) && (O(!!N, q.message, Y.message, ge.max, ge.min), !n))
1096
1096
  return V(F[g].message), F;
1097
1097
  }
1098
- if ((f || p) && !H && (ye(k) || n && Array.isArray(k))) {
1099
- const N = Ae(f), $ = Ae(p), q = !se(N.value) && k.length > +N.value, Y = !se($.value) && k.length < +$.value;
1100
- if ((q || Y) && (O(q, N.message, $.message), !r))
1098
+ if ((m || b) && !j && (ye(k) || r && Array.isArray(k))) {
1099
+ const N = Ae(m), $ = Ae(b), q = !se(N.value) && k.length > +N.value, Y = !se($.value) && k.length < +$.value;
1100
+ if ((q || Y) && (O(q, N.message, $.message), !n))
1101
1101
  return V(F[g].message), F;
1102
1102
  }
1103
- if (v && !H && ye(k)) {
1104
- const { value: N, message: $ } = Ae(v);
1103
+ if (w && !j && ye(k)) {
1104
+ const { value: N, message: $ } = Ae(w);
1105
1105
  if (Qe(N) && !k.match(N) && (F[g] = {
1106
1106
  type: ge.pattern,
1107
1107
  message: $,
1108
1108
  ref: c,
1109
1109
  ...U(ge.pattern, $)
1110
- }, !r))
1110
+ }, !n))
1111
1111
  return V($), F;
1112
1112
  }
1113
1113
  if (C) {
1114
1114
  if (fe(C)) {
1115
- const N = await C(k, s), $ = Pt(N, j);
1115
+ const N = await C(k, s), $ = Pt(N, H);
1116
1116
  if ($ && (F[g] = {
1117
1117
  ...$,
1118
1118
  ...U(ge.validate, $.message)
1119
- }, !r))
1119
+ }, !n))
1120
1120
  return V($.message), F;
1121
1121
  } else if (K(C)) {
1122
1122
  let N = {};
1123
1123
  for (const $ in C) {
1124
- if (!re(N) && !r)
1124
+ if (!re(N) && !n)
1125
1125
  break;
1126
- const q = Pt(await C[$](k, s), j, $);
1126
+ const q = Pt(await C[$](k, s), H, $);
1127
1127
  q && (N = {
1128
1128
  ...q,
1129
1129
  ...U($, q.message)
1130
- }, V(q.message), r && (F[g] = N));
1130
+ }, V(q.message), n && (F[g] = N));
1131
1131
  }
1132
1132
  if (!re(N) && (F[g] = {
1133
- ref: j,
1133
+ ref: H,
1134
1134
  ...N
1135
- }, !r))
1135
+ }, !n))
1136
1136
  return F;
1137
1137
  }
1138
1138
  }
@@ -1162,7 +1162,7 @@ function Sr(e = {}) {
1162
1162
  validatingFields: {},
1163
1163
  errors: t.errors || {},
1164
1164
  disabled: t.disabled || !1
1165
- }, r = {}, i = K(t.defaultValues) || K(t.values) ? X(t.defaultValues || t.values) || {} : {}, n = t.shouldUnregister ? {} : X(i), c = {
1165
+ }, n = {}, i = K(t.defaultValues) || K(t.values) ? X(t.defaultValues || t.values) || {} : {}, r = t.shouldUnregister ? {} : X(i), c = {
1166
1166
  action: !1,
1167
1167
  mount: !1,
1168
1168
  watch: !1
@@ -1172,8 +1172,8 @@ function Sr(e = {}) {
1172
1172
  unMount: /* @__PURE__ */ new Set(),
1173
1173
  array: /* @__PURE__ */ new Set(),
1174
1174
  watch: /* @__PURE__ */ new Set()
1175
- }, u, f = 0;
1176
- const p = {
1175
+ }, d, m = 0;
1176
+ const b = {
1177
1177
  isDirty: !1,
1178
1178
  dirtyFields: !1,
1179
1179
  validatingFields: !1,
@@ -1183,42 +1183,42 @@ function Sr(e = {}) {
1183
1183
  errors: !1
1184
1184
  };
1185
1185
  let y = {
1186
- ...p
1186
+ ...b
1187
1187
  };
1188
- const m = {
1188
+ const f = {
1189
1189
  array: Nt(),
1190
1190
  state: Nt()
1191
- }, v = t.criteriaMode === de.all, C = (o) => (l) => {
1192
- clearTimeout(f), f = setTimeout(o, l);
1191
+ }, w = t.criteriaMode === de.all, C = (o) => (l) => {
1192
+ clearTimeout(m), m = setTimeout(o, l);
1193
1193
  }, g = async (o) => {
1194
- if (!t.disabled && (p.isValid || y.isValid || o)) {
1195
- const l = t.resolver ? re((await P()).errors) : await H(r, !0);
1196
- l !== s.isValid && m.state.next({
1194
+ if (!t.disabled && (b.isValid || y.isValid || o)) {
1195
+ const l = t.resolver ? re((await P()).errors) : await j(n, !0);
1196
+ l !== s.isValid && f.state.next({
1197
1197
  isValid: l
1198
1198
  });
1199
1199
  }
1200
1200
  }, L = (o, l) => {
1201
- !t.disabled && (p.isValidating || p.validatingFields || y.isValidating || y.validatingFields) && ((o || Array.from(a.mount)).forEach((d) => {
1202
- d && (l ? R(s.validatingFields, d, l) : W(s.validatingFields, d));
1203
- }), m.state.next({
1201
+ !t.disabled && (b.isValidating || b.validatingFields || y.isValidating || y.validatingFields) && ((o || Array.from(a.mount)).forEach((u) => {
1202
+ u && (l ? R(s.validatingFields, u, l) : W(s.validatingFields, u));
1203
+ }), f.state.next({
1204
1204
  validatingFields: s.validatingFields,
1205
1205
  isValidating: !re(s.validatingFields)
1206
1206
  }));
1207
- }, G = (o, l = [], d, x, w = !0, b = !0) => {
1208
- if (x && d && !t.disabled) {
1209
- if (c.action = !0, b && Array.isArray(_(r, o))) {
1210
- const S = d(_(r, o), x.argA, x.argB);
1211
- w && R(r, o, S);
1207
+ }, G = (o, l = [], u, x, v = !0, p = !0) => {
1208
+ if (x && u && !t.disabled) {
1209
+ if (c.action = !0, p && Array.isArray(_(n, o))) {
1210
+ const S = u(_(n, o), x.argA, x.argB);
1211
+ v && R(n, o, S);
1212
1212
  }
1213
- if (b && Array.isArray(_(s.errors, o))) {
1214
- const S = d(_(s.errors, o), x.argA, x.argB);
1215
- w && R(s.errors, o, S), xr(s.errors, o);
1213
+ if (p && Array.isArray(_(s.errors, o))) {
1214
+ const S = u(_(s.errors, o), x.argA, x.argB);
1215
+ v && R(s.errors, o, S), xr(s.errors, o);
1216
1216
  }
1217
- if ((p.touchedFields || y.touchedFields) && b && Array.isArray(_(s.touchedFields, o))) {
1218
- const S = d(_(s.touchedFields, o), x.argA, x.argB);
1219
- w && R(s.touchedFields, o, S);
1217
+ if ((b.touchedFields || y.touchedFields) && p && Array.isArray(_(s.touchedFields, o))) {
1218
+ const S = u(_(s.touchedFields, o), x.argA, x.argB);
1219
+ v && R(s.touchedFields, o, S);
1220
1220
  }
1221
- (p.dirtyFields || y.dirtyFields) && (s.dirtyFields = $e(i, n)), m.state.next({
1221
+ (b.dirtyFields || y.dirtyFields) && (s.dirtyFields = $e(i, r)), f.state.next({
1222
1222
  name: o,
1223
1223
  isDirty: O(o, l),
1224
1224
  dirtyFields: s.dirtyFields,
@@ -1226,179 +1226,179 @@ function Sr(e = {}) {
1226
1226
  isValid: s.isValid
1227
1227
  });
1228
1228
  } else
1229
- R(n, o, l);
1229
+ R(r, o, l);
1230
1230
  }, k = (o, l) => {
1231
- R(s.errors, o, l), m.state.next({
1231
+ R(s.errors, o, l), f.state.next({
1232
1232
  errors: s.errors
1233
1233
  });
1234
- }, j = (o) => {
1235
- s.errors = o, m.state.next({
1234
+ }, H = (o) => {
1235
+ s.errors = o, f.state.next({
1236
1236
  errors: s.errors,
1237
1237
  isValid: !1
1238
1238
  });
1239
- }, V = (o, l, d, x) => {
1240
- const w = _(r, o);
1241
- if (w) {
1242
- const b = _(n, o, z(d) ? _(i, o) : d);
1243
- z(b) || x && x.defaultChecked || l ? R(n, o, l ? b : Ft(w._f)) : q(o, b), c.mount && g();
1239
+ }, V = (o, l, u, x) => {
1240
+ const v = _(n, o);
1241
+ if (v) {
1242
+ const p = _(r, o, z(u) ? _(i, o) : u);
1243
+ z(p) || x && x.defaultChecked || l ? R(r, o, l ? p : Ft(v._f)) : q(o, p), c.mount && g();
1244
1244
  }
1245
- }, F = (o, l, d, x, w) => {
1246
- let b = !1, S = !1;
1245
+ }, F = (o, l, u, x, v) => {
1246
+ let p = !1, S = !1;
1247
1247
  const D = {
1248
1248
  name: o
1249
1249
  };
1250
1250
  if (!t.disabled) {
1251
- if (!d || x) {
1252
- (p.isDirty || y.isDirty) && (S = s.isDirty, s.isDirty = D.isDirty = O(), b = S !== D.isDirty);
1251
+ if (!u || x) {
1252
+ (b.isDirty || y.isDirty) && (S = s.isDirty, s.isDirty = D.isDirty = O(), p = S !== D.isDirty);
1253
1253
  const I = ve(_(i, o), l);
1254
- S = !!_(s.dirtyFields, o), I ? W(s.dirtyFields, o) : R(s.dirtyFields, o, !0), D.dirtyFields = s.dirtyFields, b = b || (p.dirtyFields || y.dirtyFields) && S !== !I;
1254
+ S = !!_(s.dirtyFields, o), I ? W(s.dirtyFields, o) : R(s.dirtyFields, o, !0), D.dirtyFields = s.dirtyFields, p = p || (b.dirtyFields || y.dirtyFields) && S !== !I;
1255
1255
  }
1256
- if (d) {
1256
+ if (u) {
1257
1257
  const I = _(s.touchedFields, o);
1258
- I || (R(s.touchedFields, o, d), D.touchedFields = s.touchedFields, b = b || (p.touchedFields || y.touchedFields) && I !== d);
1258
+ I || (R(s.touchedFields, o, u), D.touchedFields = s.touchedFields, p = p || (b.touchedFields || y.touchedFields) && I !== u);
1259
1259
  }
1260
- b && w && m.state.next(D);
1260
+ p && v && f.state.next(D);
1261
1261
  }
1262
- return b ? D : {};
1263
- }, J = (o, l, d, x) => {
1264
- const w = _(s.errors, o), b = (p.isValid || y.isValid) && he(l) && s.isValid !== l;
1265
- if (t.delayError && d ? (u = C(() => k(o, d)), u(t.delayError)) : (clearTimeout(f), u = null, d ? R(s.errors, o, d) : W(s.errors, o)), (d ? !ve(w, d) : w) || !re(x) || b) {
1262
+ return p ? D : {};
1263
+ }, J = (o, l, u, x) => {
1264
+ const v = _(s.errors, o), p = (b.isValid || y.isValid) && he(l) && s.isValid !== l;
1265
+ if (t.delayError && u ? (d = C(() => k(o, u)), d(t.delayError)) : (clearTimeout(m), d = null, u ? R(s.errors, o, u) : W(s.errors, o)), (u ? !ve(v, u) : v) || !re(x) || p) {
1266
1266
  const S = {
1267
1267
  ...x,
1268
- ...b && he(l) ? { isValid: l } : {},
1268
+ ...p && he(l) ? { isValid: l } : {},
1269
1269
  errors: s.errors,
1270
1270
  name: o
1271
1271
  };
1272
1272
  s = {
1273
1273
  ...s,
1274
1274
  ...S
1275
- }, m.state.next(S);
1275
+ }, f.state.next(S);
1276
1276
  }
1277
1277
  }, P = async (o) => {
1278
1278
  L(o, !0);
1279
- const l = await t.resolver(n, t.context, yr(o || a.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
1279
+ const l = await t.resolver(r, t.context, yr(o || a.mount, n, t.criteriaMode, t.shouldUseNativeValidation));
1280
1280
  return L(o), l;
1281
1281
  }, le = async (o) => {
1282
1282
  const { errors: l } = await P(o);
1283
1283
  if (o)
1284
- for (const d of o) {
1285
- const x = _(l, d);
1286
- x ? R(s.errors, d, x) : W(s.errors, d);
1284
+ for (const u of o) {
1285
+ const x = _(l, u);
1286
+ x ? R(s.errors, u, x) : W(s.errors, u);
1287
1287
  }
1288
1288
  else
1289
1289
  s.errors = l;
1290
1290
  return l;
1291
- }, H = async (o, l, d = {
1291
+ }, j = async (o, l, u = {
1292
1292
  valid: !0
1293
1293
  }) => {
1294
1294
  for (const x in o) {
1295
- const w = o[x];
1296
- if (w) {
1297
- const { _f: b, ...S } = w;
1298
- if (b) {
1299
- const D = a.array.has(b.name), I = w._f && gr(w._f);
1300
- I && p.validatingFields && L([x], !0);
1301
- const oe = await Mt(w, a.disabled, n, v, t.shouldUseNativeValidation && !l, D);
1302
- if (I && p.validatingFields && L([x]), oe[b.name] && (d.valid = !1, l))
1295
+ const v = o[x];
1296
+ if (v) {
1297
+ const { _f: p, ...S } = v;
1298
+ if (p) {
1299
+ const D = a.array.has(p.name), I = v._f && gr(v._f);
1300
+ I && b.validatingFields && L([x], !0);
1301
+ const oe = await Mt(v, a.disabled, r, w, t.shouldUseNativeValidation && !l, D);
1302
+ if (I && b.validatingFields && L([x]), oe[p.name] && (u.valid = !1, l))
1303
1303
  break;
1304
- !l && (_(oe, b.name) ? D ? _r(s.errors, oe, b.name) : R(s.errors, b.name, oe[b.name]) : W(s.errors, b.name));
1304
+ !l && (_(oe, p.name) ? D ? _r(s.errors, oe, p.name) : R(s.errors, p.name, oe[p.name]) : W(s.errors, p.name));
1305
1305
  }
1306
- !re(S) && await H(S, l, d);
1306
+ !re(S) && await j(S, l, u);
1307
1307
  }
1308
1308
  }
1309
- return d.valid;
1309
+ return u.valid;
1310
1310
  }, U = () => {
1311
1311
  for (const o of a.unMount) {
1312
- const l = _(r, o);
1313
- l && (l._f.refs ? l._f.refs.every((d) => !st(d)) : !st(l._f.ref)) && Je(o);
1312
+ const l = _(n, o);
1313
+ l && (l._f.refs ? l._f.refs.every((u) => !st(u)) : !st(l._f.ref)) && Je(o);
1314
1314
  }
1315
1315
  a.unMount = /* @__PURE__ */ new Set();
1316
- }, O = (o, l) => !t.disabled && (o && l && R(n, o, l), !ve(ue(), i)), N = (o, l, d) => ur(o, a, {
1317
- ...c.mount ? n : z(l) ? i : ye(o) ? { [o]: l } : l
1318
- }, d, l), $ = (o) => it(_(c.mount ? n : i, o, t.shouldUnregister ? _(i, o, []) : [])), q = (o, l, d = {}) => {
1319
- const x = _(r, o);
1320
- let w = l;
1316
+ }, O = (o, l) => !t.disabled && (o && l && R(r, o, l), !ve(ue(), i)), N = (o, l, u) => ur(o, a, {
1317
+ ...c.mount ? r : z(l) ? i : ye(o) ? { [o]: l } : l
1318
+ }, u, l), $ = (o) => it(_(c.mount ? r : i, o, t.shouldUnregister ? _(i, o, []) : [])), q = (o, l, u = {}) => {
1319
+ const x = _(n, o);
1320
+ let v = l;
1321
1321
  if (x) {
1322
- const b = x._f;
1323
- b && (!b.disabled && R(n, o, is(l, b)), w = je(b.ref) && se(l) ? "" : l, ts(b.ref) ? [...b.ref.options].forEach((S) => S.selected = w.includes(S.value)) : b.refs ? Oe(b.ref) ? b.refs.forEach((S) => {
1324
- (!S.defaultChecked || !S.disabled) && (Array.isArray(w) ? S.checked = !!w.find((D) => D === S.value) : S.checked = w === S.value || !!w);
1325
- }) : b.refs.forEach((S) => S.checked = S.value === w) : ot(b.ref) ? b.ref.value = "" : (b.ref.value = w, b.ref.type || m.state.next({
1322
+ const p = x._f;
1323
+ p && (!p.disabled && R(r, o, is(l, p)), v = He(p.ref) && se(l) ? "" : l, ts(p.ref) ? [...p.ref.options].forEach((S) => S.selected = v.includes(S.value)) : p.refs ? Oe(p.ref) ? p.refs.forEach((S) => {
1324
+ (!S.defaultChecked || !S.disabled) && (Array.isArray(v) ? S.checked = !!v.find((D) => D === S.value) : S.checked = v === S.value || !!v);
1325
+ }) : p.refs.forEach((S) => S.checked = S.value === v) : ot(p.ref) ? p.ref.value = "" : (p.ref.value = v, p.ref.type || f.state.next({
1326
1326
  name: o,
1327
- values: X(n)
1327
+ values: X(r)
1328
1328
  })));
1329
1329
  }
1330
- (d.shouldDirty || d.shouldTouch) && F(o, w, d.shouldTouch, d.shouldDirty, !0), d.shouldValidate && ie(o);
1331
- }, Y = (o, l, d) => {
1330
+ (u.shouldDirty || u.shouldTouch) && F(o, v, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && ie(o);
1331
+ }, Y = (o, l, u) => {
1332
1332
  for (const x in l) {
1333
1333
  if (!l.hasOwnProperty(x))
1334
1334
  return;
1335
- const w = l[x], b = o + "." + x, S = _(r, b);
1336
- (a.array.has(o) || K(w) || S && !S._f) && !Se(w) ? Y(b, w, d) : q(b, w, d);
1335
+ const v = l[x], p = o + "." + x, S = _(n, p);
1336
+ (a.array.has(o) || K(v) || S && !S._f) && !Se(v) ? Y(p, v, u) : q(p, v, u);
1337
1337
  }
1338
- }, ee = (o, l, d = {}) => {
1339
- const x = _(r, o), w = a.array.has(o), b = X(l);
1340
- R(n, o, b), w ? (m.array.next({
1338
+ }, ee = (o, l, u = {}) => {
1339
+ const x = _(n, o), v = a.array.has(o), p = X(l);
1340
+ R(r, o, p), v ? (f.array.next({
1341
1341
  name: o,
1342
- values: X(n)
1343
- }), (p.isDirty || p.dirtyFields || y.isDirty || y.dirtyFields) && d.shouldDirty && m.state.next({
1342
+ values: X(r)
1343
+ }), (b.isDirty || b.dirtyFields || y.isDirty || y.dirtyFields) && u.shouldDirty && f.state.next({
1344
1344
  name: o,
1345
- dirtyFields: $e(i, n),
1346
- isDirty: O(o, b)
1347
- })) : x && !x._f && !se(b) ? Y(o, b, d) : q(o, b, d), Dt(o, a) && m.state.next({ ...s, name: o }), m.state.next({
1345
+ dirtyFields: $e(i, r),
1346
+ isDirty: O(o, p)
1347
+ })) : x && !x._f && !se(p) ? Y(o, p, u) : q(o, p, u), Dt(o, a) && f.state.next({ ...s, name: o }), f.state.next({
1348
1348
  name: c.mount ? o : void 0,
1349
- values: X(n)
1349
+ values: X(r)
1350
1350
  });
1351
1351
  }, M = async (o) => {
1352
1352
  c.mount = !0;
1353
1353
  const l = o.target;
1354
- let d = l.name, x = !0;
1355
- const w = _(r, d), b = (I) => {
1356
- x = Number.isNaN(I) || Se(I) && isNaN(I.getTime()) || ve(I, _(n, d, I));
1354
+ let u = l.name, x = !0;
1355
+ const v = _(n, u), p = (I) => {
1356
+ x = Number.isNaN(I) || Se(I) && isNaN(I.getTime()) || ve(I, _(r, u, I));
1357
1357
  }, S = Lt(t.mode), D = Lt(t.reValidateMode);
1358
- if (w) {
1358
+ if (v) {
1359
1359
  let I, oe;
1360
- const Re = l.type ? Ft(w._f) : rr(o), we = o.type === kt.BLUR || o.type === kt.FOCUS_OUT, ys = !pr(w._f) && !t.resolver && !_(s.errors, d) && !w._f.deps || vr(we, _(s.touchedFields, d), s.isSubmitted, D, S), Ze = Dt(d, a, we);
1361
- R(n, d, Re), we ? (w._f.onBlur && w._f.onBlur(o), u && u(0)) : w._f.onChange && w._f.onChange(o);
1362
- const et = F(d, Re, we), gs = !re(et) || Ze;
1363
- if (!we && m.state.next({
1364
- name: d,
1360
+ const Re = l.type ? Ft(v._f) : rr(o), we = o.type === kt.BLUR || o.type === kt.FOCUS_OUT, ys = !br(v._f) && !t.resolver && !_(s.errors, u) && !v._f.deps || vr(we, _(s.touchedFields, u), s.isSubmitted, D, S), Ze = Dt(u, a, we);
1361
+ R(r, u, Re), we ? (v._f.onBlur && v._f.onBlur(o), d && d(0)) : v._f.onChange && v._f.onChange(o);
1362
+ const et = F(u, Re, we), gs = !re(et) || Ze;
1363
+ if (!we && f.state.next({
1364
+ name: u,
1365
1365
  type: o.type,
1366
- values: X(n)
1366
+ values: X(r)
1367
1367
  }), ys)
1368
- return (p.isValid || y.isValid) && (t.mode === "onBlur" ? we && g() : we || g()), gs && m.state.next({ name: d, ...Ze ? {} : et });
1369
- if (!we && Ze && m.state.next({ ...s }), t.resolver) {
1370
- const { errors: bt } = await P([d]);
1371
- if (b(Re), x) {
1372
- const ps = Vt(s.errors, r, d), wt = Vt(bt, r, ps.name || d);
1373
- I = wt.error, d = wt.name, oe = re(bt);
1368
+ return (b.isValid || y.isValid) && (t.mode === "onBlur" ? we && g() : we || g()), gs && f.state.next({ name: u, ...Ze ? {} : et });
1369
+ if (!we && Ze && f.state.next({ ...s }), t.resolver) {
1370
+ const { errors: pt } = await P([u]);
1371
+ if (p(Re), x) {
1372
+ const bs = Vt(s.errors, n, u), wt = Vt(pt, n, bs.name || u);
1373
+ I = wt.error, u = wt.name, oe = re(pt);
1374
1374
  }
1375
1375
  } else
1376
- L([d], !0), I = (await Mt(w, a.disabled, n, v, t.shouldUseNativeValidation))[d], L([d]), b(Re), x && (I ? oe = !1 : (p.isValid || y.isValid) && (oe = await H(r, !0)));
1377
- x && (w._f.deps && ie(w._f.deps), J(d, oe, I, et));
1376
+ L([u], !0), I = (await Mt(v, a.disabled, r, w, t.shouldUseNativeValidation))[u], L([u]), p(Re), x && (I ? oe = !1 : (b.isValid || y.isValid) && (oe = await j(n, !0)));
1377
+ x && (v._f.deps && ie(v._f.deps), J(u, oe, I, et));
1378
1378
  }
1379
1379
  }, te = (o, l) => {
1380
1380
  if (_(s.errors, l) && o.focus)
1381
1381
  return o.focus(), 1;
1382
1382
  }, ie = async (o, l = {}) => {
1383
- let d, x;
1384
- const w = Le(o);
1383
+ let u, x;
1384
+ const v = Le(o);
1385
1385
  if (t.resolver) {
1386
- const b = await le(z(o) ? o : w);
1387
- d = re(b), x = o ? !w.some((S) => _(b, S)) : d;
1388
- } else o ? (x = (await Promise.all(w.map(async (b) => {
1389
- const S = _(r, b);
1390
- return await H(S && S._f ? { [b]: S } : S);
1391
- }))).every(Boolean), !(!x && !s.isValid) && g()) : x = d = await H(r);
1392
- return m.state.next({
1393
- ...!ye(o) || (p.isValid || y.isValid) && d !== s.isValid ? {} : { name: o },
1394
- ...t.resolver || !o ? { isValid: d } : {},
1386
+ const p = await le(z(o) ? o : v);
1387
+ u = re(p), x = o ? !v.some((S) => _(p, S)) : u;
1388
+ } else o ? (x = (await Promise.all(v.map(async (p) => {
1389
+ const S = _(n, p);
1390
+ return await j(S && S._f ? { [p]: S } : S);
1391
+ }))).every(Boolean), !(!x && !s.isValid) && g()) : x = u = await j(n);
1392
+ return f.state.next({
1393
+ ...!ye(o) || (b.isValid || y.isValid) && u !== s.isValid ? {} : { name: o },
1394
+ ...t.resolver || !o ? { isValid: u } : {},
1395
1395
  errors: s.errors
1396
- }), l.shouldFocus && !x && Te(r, te, o ? w : a.mount), x;
1396
+ }), l.shouldFocus && !x && Te(n, te, o ? v : a.mount), x;
1397
1397
  }, ue = (o) => {
1398
1398
  const l = {
1399
- ...c.mount ? n : i
1399
+ ...c.mount ? r : i
1400
1400
  };
1401
- return z(o) ? l : ye(o) ? _(l, o) : o.map((d) => _(l, d));
1401
+ return z(o) ? l : ye(o) ? _(l, o) : o.map((u) => _(l, u));
1402
1402
  }, Ue = (o, l) => ({
1403
1403
  invalid: !!_((l || s).errors, o),
1404
1404
  isDirty: !!_((l || s).dirtyFields, o),
@@ -1406,26 +1406,26 @@ function Sr(e = {}) {
1406
1406
  isValidating: !!_(s.validatingFields, o),
1407
1407
  isTouched: !!_((l || s).touchedFields, o)
1408
1408
  }), Ce = (o) => {
1409
- o && Le(o).forEach((l) => W(s.errors, l)), m.state.next({
1409
+ o && Le(o).forEach((l) => W(s.errors, l)), f.state.next({
1410
1410
  errors: o ? s.errors : {}
1411
1411
  });
1412
- }, dt = (o, l, d) => {
1413
- const x = (_(r, o, { _f: {} })._f || {}).ref, w = _(s.errors, o) || {}, { ref: b, message: S, type: D, ...I } = w;
1412
+ }, dt = (o, l, u) => {
1413
+ const x = (_(n, o, { _f: {} })._f || {}).ref, v = _(s.errors, o) || {}, { ref: p, message: S, type: D, ...I } = v;
1414
1414
  R(s.errors, o, {
1415
1415
  ...I,
1416
1416
  ...l,
1417
1417
  ref: x
1418
- }), m.state.next({
1418
+ }), f.state.next({
1419
1419
  name: o,
1420
1420
  errors: s.errors,
1421
1421
  isValid: !1
1422
- }), d && d.shouldFocus && x && x.focus && x.focus();
1423
- }, ls = (o, l) => fe(o) ? m.state.subscribe({
1424
- next: (d) => "values" in d && o(N(void 0, l), d)
1425
- }) : N(o, l, !0), ft = (o) => m.state.subscribe({
1422
+ }), u && u.shouldFocus && x && x.focus && x.focus();
1423
+ }, ls = (o, l) => fe(o) ? f.state.subscribe({
1424
+ next: (u) => "values" in u && o(N(void 0, l), u)
1425
+ }) : N(o, l, !0), ft = (o) => f.state.subscribe({
1426
1426
  next: (l) => {
1427
- wr(o.name, l.name, o.exact) && br(l, o.formState || p, hs, o.reRenderRoot) && o.callback({
1428
- values: { ...n },
1427
+ wr(o.name, l.name, o.exact) && pr(l, o.formState || b, hs, o.reRenderRoot) && o.callback({
1428
+ values: { ...r },
1429
1429
  ...s,
1430
1430
  ...l,
1431
1431
  defaultValues: i
@@ -1438,28 +1438,28 @@ function Sr(e = {}) {
1438
1438
  ...o,
1439
1439
  formState: y
1440
1440
  })), Je = (o, l = {}) => {
1441
- for (const d of o ? Le(o) : a.mount)
1442
- a.mount.delete(d), a.array.delete(d), l.keepValue || (W(r, d), W(n, d)), !l.keepError && W(s.errors, d), !l.keepDirty && W(s.dirtyFields, d), !l.keepTouched && W(s.touchedFields, d), !l.keepIsValidating && W(s.validatingFields, d), !t.shouldUnregister && !l.keepDefaultValue && W(i, d);
1443
- m.state.next({
1444
- values: X(n)
1445
- }), m.state.next({
1441
+ for (const u of o ? Le(o) : a.mount)
1442
+ a.mount.delete(u), a.array.delete(u), l.keepValue || (W(n, u), W(r, u)), !l.keepError && W(s.errors, u), !l.keepDirty && W(s.dirtyFields, u), !l.keepTouched && W(s.touchedFields, u), !l.keepIsValidating && W(s.validatingFields, u), !t.shouldUnregister && !l.keepDefaultValue && W(i, u);
1443
+ f.state.next({
1444
+ values: X(r)
1445
+ }), f.state.next({
1446
1446
  ...s,
1447
1447
  ...l.keepDirty ? { isDirty: O() } : {}
1448
1448
  }), !l.keepIsValid && g();
1449
1449
  }, mt = ({ disabled: o, name: l }) => {
1450
1450
  (he(o) && c.mount || o || a.disabled.has(l)) && (o ? a.disabled.add(l) : a.disabled.delete(l));
1451
1451
  }, Ye = (o, l = {}) => {
1452
- let d = _(r, o);
1452
+ let u = _(n, o);
1453
1453
  const x = he(l.disabled) || he(t.disabled);
1454
- return R(r, o, {
1455
- ...d || {},
1454
+ return R(n, o, {
1455
+ ...u || {},
1456
1456
  _f: {
1457
- ...d && d._f ? d._f : { ref: { name: o } },
1457
+ ...u && u._f ? u._f : { ref: { name: o } },
1458
1458
  name: o,
1459
1459
  mount: !0,
1460
1460
  ...l
1461
1461
  }
1462
- }), a.mount.add(o), d ? mt({
1462
+ }), a.mount.add(o), u ? mt({
1463
1463
  disabled: he(l.disabled) ? l.disabled : t.disabled,
1464
1464
  name: o
1465
1465
  }) : V(o, !0, l.value), {
@@ -1475,62 +1475,62 @@ function Sr(e = {}) {
1475
1475
  name: o,
1476
1476
  onChange: M,
1477
1477
  onBlur: M,
1478
- ref: (w) => {
1479
- if (w) {
1480
- Ye(o, l), d = _(r, o);
1481
- const b = z(w.value) && w.querySelectorAll && w.querySelectorAll("input,select,textarea")[0] || w, S = fr(b), D = d._f.refs || [];
1482
- if (S ? D.find((I) => I === b) : b === d._f.ref)
1478
+ ref: (v) => {
1479
+ if (v) {
1480
+ Ye(o, l), u = _(n, o);
1481
+ const p = z(v.value) && v.querySelectorAll && v.querySelectorAll("input,select,textarea")[0] || v, S = fr(p), D = u._f.refs || [];
1482
+ if (S ? D.find((I) => I === p) : p === u._f.ref)
1483
1483
  return;
1484
- R(r, o, {
1484
+ R(n, o, {
1485
1485
  _f: {
1486
- ...d._f,
1486
+ ...u._f,
1487
1487
  ...S ? {
1488
1488
  refs: [
1489
1489
  ...D.filter(st),
1490
- b,
1490
+ p,
1491
1491
  ...Array.isArray(_(i, o)) ? [{}] : []
1492
1492
  ],
1493
- ref: { type: b.type, name: o }
1494
- } : { ref: b }
1493
+ ref: { type: p.type, name: o }
1494
+ } : { ref: p }
1495
1495
  }
1496
- }), V(o, !1, void 0, b);
1496
+ }), V(o, !1, void 0, p);
1497
1497
  } else
1498
- d = _(r, o, {}), d._f && (d._f.mount = !1), (t.shouldUnregister || l.shouldUnregister) && !(ir(a.array, o) && c.action) && a.unMount.add(o);
1498
+ u = _(n, o, {}), u._f && (u._f.mount = !1), (t.shouldUnregister || l.shouldUnregister) && !(ir(a.array, o) && c.action) && a.unMount.add(o);
1499
1499
  }
1500
1500
  };
1501
- }, Xe = () => t.shouldFocusError && Te(r, te, a.mount), ds = (o) => {
1502
- he(o) && (m.state.next({ disabled: o }), Te(r, (l, d) => {
1503
- const x = _(r, d);
1504
- x && (l.disabled = x._f.disabled || o, Array.isArray(x._f.refs) && x._f.refs.forEach((w) => {
1505
- w.disabled = x._f.disabled || o;
1501
+ }, Xe = () => t.shouldFocusError && Te(n, te, a.mount), ds = (o) => {
1502
+ he(o) && (f.state.next({ disabled: o }), Te(n, (l, u) => {
1503
+ const x = _(n, u);
1504
+ x && (l.disabled = x._f.disabled || o, Array.isArray(x._f.refs) && x._f.refs.forEach((v) => {
1505
+ v.disabled = x._f.disabled || o;
1506
1506
  }));
1507
1507
  }, 0, !1));
1508
- }, ht = (o, l) => async (d) => {
1508
+ }, ht = (o, l) => async (u) => {
1509
1509
  let x;
1510
- d && (d.preventDefault && d.preventDefault(), d.persist && d.persist());
1511
- let w = X(n);
1512
- if (m.state.next({
1510
+ u && (u.preventDefault && u.preventDefault(), u.persist && u.persist());
1511
+ let v = X(r);
1512
+ if (f.state.next({
1513
1513
  isSubmitting: !0
1514
1514
  }), t.resolver) {
1515
- const { errors: b, values: S } = await P();
1516
- s.errors = b, w = X(S);
1515
+ const { errors: p, values: S } = await P();
1516
+ s.errors = p, v = X(S);
1517
1517
  } else
1518
- await H(r);
1518
+ await j(n);
1519
1519
  if (a.disabled.size)
1520
- for (const b of a.disabled)
1521
- W(w, b);
1520
+ for (const p of a.disabled)
1521
+ W(v, p);
1522
1522
  if (W(s.errors, "root"), re(s.errors)) {
1523
- m.state.next({
1523
+ f.state.next({
1524
1524
  errors: {}
1525
1525
  });
1526
1526
  try {
1527
- await o(w, d);
1528
- } catch (b) {
1529
- x = b;
1527
+ await o(v, u);
1528
+ } catch (p) {
1529
+ x = p;
1530
1530
  }
1531
1531
  } else
1532
- l && await l({ ...s.errors }, d), Xe(), setTimeout(Xe);
1533
- if (m.state.next({
1532
+ l && await l({ ...s.errors }, u), Xe(), setTimeout(Xe);
1533
+ if (f.state.next({
1534
1534
  isSubmitted: !0,
1535
1535
  isSubmitting: !1,
1536
1536
  isSubmitSuccessful: re(s.errors) && !x,
@@ -1539,24 +1539,24 @@ function Sr(e = {}) {
1539
1539
  }), x)
1540
1540
  throw x;
1541
1541
  }, fs = (o, l = {}) => {
1542
- _(r, o) && (z(l.defaultValue) ? ee(o, X(_(i, o))) : (ee(o, l.defaultValue), R(i, o, X(l.defaultValue))), l.keepTouched || W(s.touchedFields, o), l.keepDirty || (W(s.dirtyFields, o), s.isDirty = l.defaultValue ? O(o, X(_(i, o))) : O()), l.keepError || (W(s.errors, o), p.isValid && g()), m.state.next({ ...s }));
1542
+ _(n, o) && (z(l.defaultValue) ? ee(o, X(_(i, o))) : (ee(o, l.defaultValue), R(i, o, X(l.defaultValue))), l.keepTouched || W(s.touchedFields, o), l.keepDirty || (W(s.dirtyFields, o), s.isDirty = l.defaultValue ? O(o, X(_(i, o))) : O()), l.keepError || (W(s.errors, o), b.isValid && g()), f.state.next({ ...s }));
1543
1543
  }, yt = (o, l = {}) => {
1544
- const d = o ? X(o) : i, x = X(d), w = re(o), b = w ? i : x;
1545
- if (l.keepDefaultValues || (i = d), !l.keepValues) {
1544
+ const u = o ? X(o) : i, x = X(u), v = re(o), p = v ? i : x;
1545
+ if (l.keepDefaultValues || (i = u), !l.keepValues) {
1546
1546
  if (l.keepDirtyValues) {
1547
1547
  const S = /* @__PURE__ */ new Set([
1548
1548
  ...a.mount,
1549
- ...Object.keys($e(i, n))
1549
+ ...Object.keys($e(i, r))
1550
1550
  ]);
1551
1551
  for (const D of Array.from(S))
1552
- _(s.dirtyFields, D) ? R(b, D, _(n, D)) : ee(D, _(b, D));
1552
+ _(s.dirtyFields, D) ? R(p, D, _(r, D)) : ee(D, _(p, D));
1553
1553
  } else {
1554
1554
  if (nt && z(o))
1555
1555
  for (const S of a.mount) {
1556
- const D = _(r, S);
1556
+ const D = _(n, S);
1557
1557
  if (D && D._f) {
1558
1558
  const I = Array.isArray(D._f.refs) ? D._f.refs[0] : D._f.ref;
1559
- if (je(I)) {
1559
+ if (He(I)) {
1560
1560
  const oe = I.closest("form");
1561
1561
  if (oe) {
1562
1562
  oe.reset();
@@ -1567,14 +1567,14 @@ function Sr(e = {}) {
1567
1567
  }
1568
1568
  if (l.keepFieldsRef)
1569
1569
  for (const S of a.mount)
1570
- ee(S, _(b, S));
1570
+ ee(S, _(p, S));
1571
1571
  else
1572
- r = {};
1572
+ n = {};
1573
1573
  }
1574
- n = t.shouldUnregister ? l.keepDefaultValues ? X(i) : {} : X(b), m.array.next({
1575
- values: { ...b }
1576
- }), m.state.next({
1577
- values: { ...b }
1574
+ r = t.shouldUnregister ? l.keepDefaultValues ? X(i) : {} : X(p), f.array.next({
1575
+ values: { ...p }
1576
+ }), f.state.next({
1577
+ values: { ...p }
1578
1578
  });
1579
1579
  }
1580
1580
  a = {
@@ -1585,28 +1585,28 @@ function Sr(e = {}) {
1585
1585
  watch: /* @__PURE__ */ new Set(),
1586
1586
  watchAll: !1,
1587
1587
  focus: ""
1588
- }, c.mount = !p.isValid || !!l.keepIsValid || !!l.keepDirtyValues, c.watch = !!t.shouldUnregister, m.state.next({
1588
+ }, c.mount = !b.isValid || !!l.keepIsValid || !!l.keepDirtyValues, c.watch = !!t.shouldUnregister, f.state.next({
1589
1589
  submitCount: l.keepSubmitCount ? s.submitCount : 0,
1590
- isDirty: w ? !1 : l.keepDirty ? s.isDirty : !!(l.keepDefaultValues && !ve(o, i)),
1590
+ isDirty: v ? !1 : l.keepDirty ? s.isDirty : !!(l.keepDefaultValues && !ve(o, i)),
1591
1591
  isSubmitted: l.keepIsSubmitted ? s.isSubmitted : !1,
1592
- dirtyFields: w ? {} : l.keepDirtyValues ? l.keepDefaultValues && n ? $e(i, n) : s.dirtyFields : l.keepDefaultValues && o ? $e(i, o) : l.keepDirty ? s.dirtyFields : {},
1592
+ dirtyFields: v ? {} : l.keepDirtyValues ? l.keepDefaultValues && r ? $e(i, r) : s.dirtyFields : l.keepDefaultValues && o ? $e(i, o) : l.keepDirty ? s.dirtyFields : {},
1593
1593
  touchedFields: l.keepTouched ? s.touchedFields : {},
1594
1594
  errors: l.keepErrors ? s.errors : {},
1595
1595
  isSubmitSuccessful: l.keepIsSubmitSuccessful ? s.isSubmitSuccessful : !1,
1596
1596
  isSubmitting: !1
1597
1597
  });
1598
- }, gt = (o, l) => yt(fe(o) ? o(n) : o, l), ms = (o, l = {}) => {
1599
- const d = _(r, o), x = d && d._f;
1598
+ }, gt = (o, l) => yt(fe(o) ? o(r) : o, l), ms = (o, l = {}) => {
1599
+ const u = _(n, o), x = u && u._f;
1600
1600
  if (x) {
1601
- const w = x.refs ? x.refs[0] : x.ref;
1602
- w.focus && (w.focus(), l.shouldSelect && fe(w.select) && w.select());
1601
+ const v = x.refs ? x.refs[0] : x.ref;
1602
+ v.focus && (v.focus(), l.shouldSelect && fe(v.select) && v.select());
1603
1603
  }
1604
1604
  }, hs = (o) => {
1605
1605
  s = {
1606
1606
  ...s,
1607
1607
  ...o
1608
1608
  };
1609
- }, pt = {
1609
+ }, bt = {
1610
1610
  control: {
1611
1611
  register: Ye,
1612
1612
  unregister: Je,
@@ -1621,23 +1621,23 @@ function Sr(e = {}) {
1621
1621
  _setValid: g,
1622
1622
  _setFieldArray: G,
1623
1623
  _setDisabledField: mt,
1624
- _setErrors: j,
1624
+ _setErrors: H,
1625
1625
  _getFieldArray: $,
1626
1626
  _reset: yt,
1627
1627
  _resetDefaultValues: () => fe(t.defaultValues) && t.defaultValues().then((o) => {
1628
- gt(o, t.resetOptions), m.state.next({
1628
+ gt(o, t.resetOptions), f.state.next({
1629
1629
  isLoading: !1
1630
1630
  });
1631
1631
  }),
1632
1632
  _removeUnmounted: U,
1633
1633
  _disableForm: ds,
1634
- _subjects: m,
1635
- _proxyFormState: p,
1634
+ _subjects: f,
1635
+ _proxyFormState: b,
1636
1636
  get _fields() {
1637
- return r;
1637
+ return n;
1638
1638
  },
1639
1639
  get _formValues() {
1640
- return n;
1640
+ return r;
1641
1641
  },
1642
1642
  get _state() {
1643
1643
  return c;
@@ -1683,12 +1683,12 @@ function Sr(e = {}) {
1683
1683
  getFieldState: Ue
1684
1684
  };
1685
1685
  return {
1686
- ...pt,
1687
- formControl: pt
1686
+ ...bt,
1687
+ formControl: bt
1688
1688
  };
1689
1689
  }
1690
1690
  function os(e = {}) {
1691
- const t = ae.useRef(void 0), s = ae.useRef(void 0), [r, i] = ae.useState({
1691
+ const t = ae.useRef(void 0), s = ae.useRef(void 0), [n, i] = ae.useState({
1692
1692
  isDirty: !1,
1693
1693
  isValidating: !1,
1694
1694
  isLoading: fe(e.defaultValues),
@@ -1709,77 +1709,77 @@ function os(e = {}) {
1709
1709
  if (e.formControl)
1710
1710
  t.current = {
1711
1711
  ...e.formControl,
1712
- formState: r
1712
+ formState: n
1713
1713
  }, e.defaultValues && !fe(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
1714
1714
  else {
1715
1715
  const { formControl: c, ...a } = Sr(e);
1716
1716
  t.current = {
1717
1717
  ...a,
1718
- formState: r
1718
+ formState: n
1719
1719
  };
1720
1720
  }
1721
- const n = t.current.control;
1722
- return n._options = e, lr(() => {
1723
- const c = n._subscribe({
1724
- formState: n._proxyFormState,
1725
- callback: () => i({ ...n._formState }),
1721
+ const r = t.current.control;
1722
+ return r._options = e, lr(() => {
1723
+ const c = r._subscribe({
1724
+ formState: r._proxyFormState,
1725
+ callback: () => i({ ...r._formState }),
1726
1726
  reRenderRoot: !0
1727
1727
  });
1728
1728
  return i((a) => ({
1729
1729
  ...a,
1730
1730
  isReady: !0
1731
- })), n._formState.isReady = !0, c;
1732
- }, [n]), ae.useEffect(() => n._disableForm(e.disabled), [n, e.disabled]), ae.useEffect(() => {
1733
- e.mode && (n._options.mode = e.mode), e.reValidateMode && (n._options.reValidateMode = e.reValidateMode);
1734
- }, [n, e.mode, e.reValidateMode]), ae.useEffect(() => {
1735
- e.errors && (n._setErrors(e.errors), n._focusError());
1736
- }, [n, e.errors]), ae.useEffect(() => {
1737
- e.shouldUnregister && n._subjects.state.next({
1738
- values: n._getWatch()
1731
+ })), r._formState.isReady = !0, c;
1732
+ }, [r]), ae.useEffect(() => r._disableForm(e.disabled), [r, e.disabled]), ae.useEffect(() => {
1733
+ e.mode && (r._options.mode = e.mode), e.reValidateMode && (r._options.reValidateMode = e.reValidateMode);
1734
+ }, [r, e.mode, e.reValidateMode]), ae.useEffect(() => {
1735
+ e.errors && (r._setErrors(e.errors), r._focusError());
1736
+ }, [r, e.errors]), ae.useEffect(() => {
1737
+ e.shouldUnregister && r._subjects.state.next({
1738
+ values: r._getWatch()
1739
1739
  });
1740
- }, [n, e.shouldUnregister]), ae.useEffect(() => {
1741
- if (n._proxyFormState.isDirty) {
1742
- const c = n._getDirty();
1743
- c !== r.isDirty && n._subjects.state.next({
1740
+ }, [r, e.shouldUnregister]), ae.useEffect(() => {
1741
+ if (r._proxyFormState.isDirty) {
1742
+ const c = r._getDirty();
1743
+ c !== n.isDirty && r._subjects.state.next({
1744
1744
  isDirty: c
1745
1745
  });
1746
1746
  }
1747
- }, [n, r.isDirty]), ae.useEffect(() => {
1748
- e.values && !ve(e.values, s.current) ? (n._reset(e.values, {
1747
+ }, [r, n.isDirty]), ae.useEffect(() => {
1748
+ e.values && !ve(e.values, s.current) ? (r._reset(e.values, {
1749
1749
  keepFieldsRef: !0,
1750
- ...n._options.resetOptions
1751
- }), s.current = e.values, i((c) => ({ ...c }))) : n._resetDefaultValues();
1752
- }, [n, e.values]), ae.useEffect(() => {
1753
- n._state.mount || (n._setValid(), n._state.mount = !0), n._state.watch && (n._state.watch = !1, n._subjects.state.next({ ...n._formState })), n._removeUnmounted();
1754
- }), t.current.formState = cr(r, n), t.current;
1750
+ ...r._options.resetOptions
1751
+ }), s.current = e.values, i((c) => ({ ...c }))) : r._resetDefaultValues();
1752
+ }, [r, e.values]), ae.useEffect(() => {
1753
+ r._state.mount || (r._setValid(), r._state.mount = !0), r._state.watch && (r._state.watch = !1, r._subjects.state.next({ ...r._formState })), r._removeUnmounted();
1754
+ }), t.current.formState = cr(n, r), t.current;
1755
1755
  }
1756
1756
  const un = (e) => {
1757
- const { t } = T(), { showStackNotifications: s, showSuccessNotification: r } = Ne(), {
1757
+ const { t } = T(), { showStackNotifications: s, showSuccessNotification: n } = Ne(), {
1758
1758
  defaultValues: i,
1759
- mutationFn: n,
1759
+ mutationFn: r,
1760
1760
  formToDto: c,
1761
1761
  onError: a,
1762
- onSuccess: u,
1763
- queryKey: f,
1764
- onSuccessMessage: p
1765
- } = e, { control: y, handleSubmit: m, reset: v, setError: C, getValues: g, setValue: L } = os({
1762
+ onSuccess: d,
1763
+ queryKey: m,
1764
+ onSuccessMessage: b
1765
+ } = e, { control: y, handleSubmit: f, reset: w, setError: C, getValues: g, setValue: L } = os({
1766
1766
  defaultValues: i
1767
1767
  }), G = E(
1768
1768
  (V) => {
1769
1769
  const F = V == null ? void 0 : V.errors, J = [];
1770
1770
  return F && F.forEach(([P, le]) => {
1771
- const H = document.querySelector(`[name="${P}"]`);
1772
- (H instanceof HTMLInputElement || H instanceof HTMLTextAreaElement || H instanceof HTMLSelectElement) && (H.focus(), H.classList.add("error"), J.push(t(`_entities:${f}.${P}.${le}`)));
1771
+ const j = document.querySelector(`[name="${P}"]`);
1772
+ (j instanceof HTMLInputElement || j instanceof HTMLTextAreaElement || j instanceof HTMLSelectElement) && (j.focus(), j.classList.add("error"), J.push(t(`_entities:${m}.${P}.${le}`)));
1773
1773
  }), J;
1774
1774
  },
1775
- [t, f]
1775
+ [t, m]
1776
1776
  ), k = E(() => {
1777
1777
  document.querySelectorAll("input, textarea, select").forEach((F) => {
1778
1778
  F.classList.remove("error");
1779
1779
  });
1780
- }, []), j = Ie(
1780
+ }, []), H = Ie(
1781
1781
  {
1782
- mutationFn: n,
1782
+ mutationFn: r,
1783
1783
  onError: (V) => {
1784
1784
  console.error(V);
1785
1785
  const F = V;
@@ -1805,8 +1805,8 @@ const un = (e) => {
1805
1805
  }
1806
1806
  },
1807
1807
  onSuccess: async (V) => {
1808
- be && await be.invalidateQueries({ queryKey: f }), u && u(V), p && r({
1809
- message: p
1808
+ pe && await pe.invalidateQueries({ queryKey: m }), d && d(V), b && n({
1809
+ message: b
1810
1810
  });
1811
1811
  }
1812
1812
  }
@@ -1815,63 +1815,63 @@ const un = (e) => {
1815
1815
  control: y,
1816
1816
  getValues: g,
1817
1817
  setValue: L,
1818
- handleSubmit: m,
1819
- onSubmit: (V) => j.mutate(
1818
+ handleSubmit: f,
1819
+ onSubmit: (V) => H.mutate(
1820
1820
  c ? c(V) : V
1821
1821
  ),
1822
- reset: v,
1822
+ reset: w,
1823
1823
  setError: C,
1824
1824
  parseFormError: G,
1825
1825
  releaseFormError: k,
1826
- isLoading: j.isPending
1826
+ isLoading: H.isPending
1827
1827
  };
1828
1828
  }, kr = (e) => {
1829
- const { t } = T(), { onClick: s, hidden: r = !1, disabled: i = !1 } = e;
1829
+ const { t } = T(), { onClick: s, hidden: n = !1, disabled: i = !1 } = e;
1830
1830
  return {
1831
1831
  action: E(
1832
1832
  (c) => ({
1833
1833
  id: _e.Delete,
1834
- hidden: !!c.deletedAt || r,
1834
+ hidden: !!c.deletedAt || n,
1835
1835
  disabled: !!c.deletedAt || i,
1836
1836
  icon: /* @__PURE__ */ h(ce, { className: "text-red-500", icon: $s }),
1837
1837
  tooltip: t("_pages:common.actions.delete.text"),
1838
1838
  onClick: () => s([c == null ? void 0 : c.id]),
1839
- onMultipleClick: (a) => s(a.map((u) => u.id)),
1839
+ onMultipleClick: (a) => s(a.map((d) => d.id)),
1840
1840
  multiple: !0
1841
1841
  }),
1842
- [i, r, s, t]
1842
+ [i, n, s, t]
1843
1843
  )
1844
1844
  };
1845
1845
  }, Nr = (e) => {
1846
- const { t } = T(), { onClick: s, hidden: r = !1 } = e;
1846
+ const { t } = T(), { onClick: s, hidden: n = !1 } = e;
1847
1847
  return {
1848
1848
  action: E(
1849
- (n) => ({
1849
+ (r) => ({
1850
1850
  id: _e.Restore,
1851
- hidden: !n.deletedAt || r,
1852
- disabled: !n.deletedAt,
1851
+ hidden: !r.deletedAt || n,
1852
+ disabled: !r.deletedAt,
1853
1853
  icon: /* @__PURE__ */ h(ce, { className: "text-red-500", icon: Ot }),
1854
1854
  tooltip: t("_pages:common.actions.restore.text"),
1855
- onClick: () => s([n == null ? void 0 : n.id]),
1855
+ onClick: () => s([r == null ? void 0 : r.id]),
1856
1856
  onMultipleClick: (c) => s(c.map((a) => a.id)),
1857
1857
  multiple: !0
1858
1858
  }),
1859
- [r, s, t]
1859
+ [n, s, t]
1860
1860
  )
1861
1861
  };
1862
1862
  }, dn = (e) => {
1863
- const { t } = T(), { onClick: s, hidden: r = !1 } = e;
1863
+ const { t } = T(), { onClick: s, hidden: n = !1 } = e;
1864
1864
  return {
1865
1865
  action: E(
1866
- (n) => ({
1866
+ (r) => ({
1867
1867
  id: _e.Edit,
1868
- hidden: !!n.deletedAt || r,
1869
- disabled: !!n.deletedAt,
1868
+ hidden: !!r.deletedAt || n,
1869
+ disabled: !!r.deletedAt,
1870
1870
  icon: /* @__PURE__ */ h(ce, { className: "primary", icon: Fs }),
1871
1871
  tooltip: t("_pages:common.actions.edit.text"),
1872
- onClick: () => s(n == null ? void 0 : n.id)
1872
+ onClick: () => s(r == null ? void 0 : r.id)
1873
1873
  }),
1874
- [r, s, t]
1874
+ [n, s, t]
1875
1875
  )
1876
1876
  };
1877
1877
  };
@@ -1879,71 +1879,71 @@ var _e = /* @__PURE__ */ ((e) => (e.Add = "add", e.Edit = "edit", e.Delete = "de
1879
1879
  const Ar = (e) => {
1880
1880
  const { t } = T(), {
1881
1881
  onClick: s,
1882
- hidden: r = !1,
1882
+ hidden: n = !1,
1883
1883
  disabled: i = !1,
1884
- isLoading: n = !1
1884
+ isLoading: r = !1
1885
1885
  } = e;
1886
1886
  return {
1887
1887
  action: E(
1888
1888
  () => ({
1889
1889
  id: _e.Export,
1890
- hidden: r,
1890
+ hidden: n,
1891
1891
  disabled: i,
1892
1892
  icon: /* @__PURE__ */ h(
1893
1893
  ce,
1894
1894
  {
1895
- className: `${n ? "rotate" : ""}`,
1896
- icon: n ? Ut : Ls
1895
+ className: `${r ? "rotate" : ""}`,
1896
+ icon: r ? Ut : Ls
1897
1897
  }
1898
1898
  ),
1899
1899
  tooltip: t("_pages:common.actions.export.text"),
1900
1900
  onClick: s
1901
1901
  }),
1902
- [i, r, n, s, t]
1902
+ [i, n, r, s, t]
1903
1903
  )
1904
1904
  };
1905
1905
  }, Er = (e) => {
1906
1906
  const { t } = T(), {
1907
1907
  onClick: s,
1908
- hidden: r = !1,
1908
+ hidden: n = !1,
1909
1909
  disabled: i = !1,
1910
- isLoading: n = !1
1910
+ isLoading: r = !1
1911
1911
  } = e;
1912
1912
  return {
1913
1913
  action: E(
1914
1914
  () => ({
1915
1915
  id: _e.Import,
1916
- hidden: r,
1916
+ hidden: n,
1917
1917
  disabled: i,
1918
1918
  icon: /* @__PURE__ */ h(
1919
1919
  ce,
1920
1920
  {
1921
- className: `${n ? "rotate" : ""}`,
1922
- icon: n ? Ut : Ts
1921
+ className: `${r ? "rotate" : ""}`,
1922
+ icon: r ? Ut : Ts
1923
1923
  }
1924
1924
  ),
1925
1925
  tooltip: t("_pages:common.actions.import.text"),
1926
1926
  onClick: s
1927
1927
  }),
1928
- [i, r, n, s, t]
1928
+ [i, n, r, s, t]
1929
1929
  )
1930
1930
  };
1931
1931
  }, fn = (e) => {
1932
- const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = Ne(), { t: n } = T(), { open: c, onClick: a, close: u, dialogFn: f, isLoading: p } = Zt({
1933
- onSuccessMessage: n("_pages:common.actions.delete.successMessage"),
1934
- onError: (m) => {
1935
- const v = m;
1936
- if (Ke(v))
1932
+ const { queryKey: t, onSuccess: s, ...n } = e, { showStackNotifications: i } = Ne(), { t: r } = T(), { open: c, onClick: a, close: d, dialogFn: m, isLoading: b } = Zt({
1933
+ onSuccessMessage: r("_pages:common.actions.delete.successMessage"),
1934
+ onError: (f) => {
1935
+ const w = f;
1936
+ if (Ke(w))
1937
1937
  i(
1938
- v.errors.map(
1938
+ w.errors.map(
1939
1939
  ([C, g]) => ({
1940
- message: n(`_pages:${C}.errors.${g}`),
1940
+ message: r(`_pages:${C}.errors.${g}`),
1941
1941
  type: Q.error
1942
1942
  })
1943
1943
  )
1944
1944
  );
1945
- else if (We(v)) {
1946
- const C = v.message || n("_accessibility:errors.500"), g = n(`_accessibility:errors.${v.status}`);
1945
+ else if (We(w)) {
1946
+ const C = w.message || r("_accessibility:errors.500"), g = r(`_accessibility:errors.${w.status}`);
1947
1947
  i([
1948
1948
  {
1949
1949
  message: g || C,
@@ -1952,18 +1952,18 @@ const Ar = (e) => {
1952
1952
  ]);
1953
1953
  }
1954
1954
  },
1955
- onSuccess: async (m) => {
1956
- await be.invalidateQueries({ queryKey: t }), s && s(m);
1955
+ onSuccess: async (f) => {
1956
+ await pe.invalidateQueries({ queryKey: t }), s && s(f);
1957
1957
  },
1958
- ...r
1958
+ ...n
1959
1959
  }), { action: y } = kr({ onClick: a });
1960
1960
  return {
1961
1961
  onClick: a,
1962
- title: n("_pages:common.actions.delete.dialog.title"),
1962
+ title: r("_pages:common.actions.delete.dialog.title"),
1963
1963
  open: c,
1964
- isLoading: p,
1965
- handleSubmit: () => f.mutate(),
1966
- handleClose: u,
1964
+ isLoading: b,
1965
+ handleSubmit: () => m.mutate(),
1966
+ handleClose: d,
1967
1967
  action: y
1968
1968
  };
1969
1969
  }, cs = () => {
@@ -1972,58 +1972,58 @@ const Ar = (e) => {
1972
1972
  }, mn = (e) => {
1973
1973
  const { t } = T(), {
1974
1974
  showErrorNotification: s,
1975
- showStackNotifications: r,
1975
+ showStackNotifications: n,
1976
1976
  showSuccessNotification: i
1977
1977
  } = Ne(), {
1978
- defaultValues: n,
1978
+ defaultValues: r,
1979
1979
  getFunction: c,
1980
1980
  mutationFn: a,
1981
- formToDto: u,
1982
- dtoToForm: f,
1983
- onError: p,
1981
+ formToDto: d,
1982
+ dtoToForm: m,
1983
+ onError: b,
1984
1984
  onSuccess: y,
1985
- queryKey: m,
1986
- onSuccessMessage: v,
1985
+ queryKey: f,
1986
+ onSuccessMessage: w,
1987
1987
  title: C
1988
- } = e, [g, L] = B(0), { open: G, handleClose: k, handleOpen: j } = cs(), { control: V, handleSubmit: F, reset: J, setError: P, getValues: le, setValue: H } = os({
1989
- defaultValues: n
1988
+ } = e, [g, L] = B(0), { open: G, handleClose: k, handleOpen: H } = cs(), { control: V, handleSubmit: F, reset: J, setError: P, getValues: le, setValue: j } = os({
1989
+ defaultValues: r
1990
1990
  }), { data: U, isLoading: O } = Ks({
1991
1991
  queryFn: () => c == null ? void 0 : c(g),
1992
- queryKey: [...m, g],
1993
- enabled: !!c && !!m && !!g
1992
+ queryKey: [...f, g],
1993
+ enabled: !!c && !!f && !!g
1994
1994
  });
1995
1995
  Z(() => {
1996
- U && f && J({ ...f(U) });
1996
+ U && m && J({ ...m(U) });
1997
1997
  }, [U]);
1998
1998
  const N = E(
1999
1999
  (M) => {
2000
2000
  const te = M == null ? void 0 : M.errors, ie = [];
2001
2001
  return te && te.forEach(([ue, Ue]) => {
2002
2002
  const Ce = document.querySelector(`[name="${ue}"]`);
2003
- (Ce instanceof HTMLInputElement || Ce instanceof HTMLTextAreaElement || Ce instanceof HTMLSelectElement) && (Ce.focus(), Ce.classList.add("error"), ie.push(t(`_entities:${m}.${ue}.${Ue}`)));
2003
+ (Ce instanceof HTMLInputElement || Ce instanceof HTMLTextAreaElement || Ce instanceof HTMLSelectElement) && (Ce.focus(), Ce.classList.add("error"), ie.push(t(`_entities:${f}.${ue}.${Ue}`)));
2004
2004
  }), ie;
2005
2005
  },
2006
- [t, m]
2006
+ [t, f]
2007
2007
  ), $ = E(() => {
2008
2008
  document.querySelectorAll("input, textarea, select").forEach((te) => {
2009
2009
  te.classList.remove("error");
2010
2010
  });
2011
2011
  }, []), q = E(
2012
2012
  (M) => {
2013
- L(M ?? 0), j();
2013
+ L(M ?? 0), H();
2014
2014
  },
2015
- [j]
2015
+ [H]
2016
2016
  ), Y = E(() => {
2017
2017
  $(), k(), J();
2018
2018
  }, [J, $, k]), ee = Ie({
2019
2019
  mutationFn: a,
2020
2020
  onError: (M) => {
2021
- if (console.error(M), p) p(M);
2021
+ if (console.error(M), b) b(M);
2022
2022
  else {
2023
2023
  const te = M;
2024
2024
  if (Ke(te)) {
2025
2025
  const ie = N(te);
2026
- r(
2026
+ n(
2027
2027
  ie.map(
2028
2028
  (ue) => ({
2029
2029
  message: ue,
@@ -2039,8 +2039,8 @@ const Ar = (e) => {
2039
2039
  }
2040
2040
  },
2041
2041
  onSuccess: async (M) => {
2042
- await be.invalidateQueries({ queryKey: m }), y && y(M), i({
2043
- message: v
2042
+ await pe.invalidateQueries({ queryKey: f }), y && y(M), i({
2043
+ message: w
2044
2044
  }), Y();
2045
2045
  }
2046
2046
  });
@@ -2050,10 +2050,10 @@ const Ar = (e) => {
2050
2050
  handleClose: Y,
2051
2051
  control: V,
2052
2052
  getValues: le,
2053
- setValue: H,
2053
+ setValue: j,
2054
2054
  handleSubmit: F,
2055
2055
  onSubmit: (M) => ee.mutate(
2056
- u ? u(M) : M
2056
+ d ? d(M) : M
2057
2057
  ),
2058
2058
  reset: J,
2059
2059
  setError: P,
@@ -2063,21 +2063,21 @@ const Ar = (e) => {
2063
2063
  isLoading: O || ee.isPending
2064
2064
  };
2065
2065
  }, hn = (e) => {
2066
- const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = Ne(), { t: n } = T(), { open: c, onClick: a, close: u, dialogFn: f, isLoading: p } = Zt({
2067
- onSuccessMessage: n("_pages:common.actions.restore.successMessage"),
2068
- onError: (m) => {
2069
- const v = m;
2070
- if (Ke(v))
2066
+ const { queryKey: t, onSuccess: s, ...n } = e, { showStackNotifications: i } = Ne(), { t: r } = T(), { open: c, onClick: a, close: d, dialogFn: m, isLoading: b } = Zt({
2067
+ onSuccessMessage: r("_pages:common.actions.restore.successMessage"),
2068
+ onError: (f) => {
2069
+ const w = f;
2070
+ if (Ke(w))
2071
2071
  i(
2072
- v.errors.map(
2072
+ w.errors.map(
2073
2073
  ([C, g]) => ({
2074
- message: n(`_pages:${C}.errors.${g}`),
2074
+ message: r(`_pages:${C}.errors.${g}`),
2075
2075
  type: Q.error
2076
2076
  })
2077
2077
  )
2078
2078
  );
2079
- else if (We(v)) {
2080
- const C = v.message || n("_accessibility:errors.500"), g = n(`_accessibility:errors.${v.status}`);
2079
+ else if (We(w)) {
2080
+ const C = w.message || r("_accessibility:errors.500"), g = r(`_accessibility:errors.${w.status}`);
2081
2081
  i([
2082
2082
  {
2083
2083
  message: g || C,
@@ -2086,100 +2086,100 @@ const Ar = (e) => {
2086
2086
  ]);
2087
2087
  }
2088
2088
  },
2089
- onSuccess: async (m) => {
2090
- await be.invalidateQueries({ queryKey: t }), s && s(m);
2089
+ onSuccess: async (f) => {
2090
+ await pe.invalidateQueries({ queryKey: t }), s && s(f);
2091
2091
  },
2092
- ...r
2092
+ ...n
2093
2093
  }), { action: y } = Nr({ onClick: a });
2094
2094
  return {
2095
2095
  onClick: a,
2096
- title: n("_pages:common.actions.restore.dialog.title"),
2096
+ title: r("_pages:common.actions.restore.dialog.title"),
2097
2097
  open: c,
2098
- isLoading: p,
2099
- handleSubmit: () => f.mutate(),
2100
- handleClose: u,
2098
+ isLoading: b,
2099
+ handleSubmit: () => m.mutate(),
2100
+ handleClose: d,
2101
2101
  action: y
2102
2102
  };
2103
2103
  };
2104
2104
  function yn(e) {
2105
- const { t } = T(), { queryKey: s, mutationFn: r, entity: i, fileProcessor: n, onError: c } = e, [a, u] = B(!1), [f, p] = B(null), [y, m] = B(!1), v = Ie({
2106
- mutationFn: r,
2105
+ const { t } = T(), { queryKey: s, mutationFn: n, entity: i, fileProcessor: r, onError: c } = e, [a, d] = B(!1), [m, b] = B(null), [y, f] = B(!1), w = Ie({
2106
+ mutationFn: n,
2107
2107
  onError: (g) => {
2108
2108
  console.error(g), c == null || c(g);
2109
2109
  },
2110
2110
  onSuccess: async () => {
2111
- be && await be.invalidateQueries({ queryKey: s });
2111
+ pe && await pe.invalidateQueries({ queryKey: s });
2112
2112
  }
2113
2113
  }), { action: C } = Er({
2114
- onClick: () => u(!0)
2114
+ onClick: () => d(!0)
2115
2115
  });
2116
2116
  return {
2117
2117
  handleSubmit: async () => {
2118
- if (!(!f || f.length === 0))
2118
+ if (!(!m || m.length === 0))
2119
2119
  try {
2120
- await v.mutateAsync({
2121
- items: f,
2120
+ await w.mutateAsync({
2121
+ items: m,
2122
2122
  override: y
2123
- }), u(!1), p(null), m(!1);
2123
+ }), d(!1), b(null), f(!1);
2124
2124
  } catch (g) {
2125
2125
  console.error(g);
2126
2126
  }
2127
2127
  },
2128
- isLoading: v.isPending,
2129
- fileProcessor: n,
2130
- onFileProcessed: (g) => p(g),
2131
- onOverrideChange: (g) => m(g),
2128
+ isLoading: w.isPending,
2129
+ fileProcessor: r,
2130
+ onFileProcessed: (g) => b(g),
2131
+ onOverrideChange: (g) => f(g),
2132
2132
  open: a,
2133
2133
  title: t("_pages:common.actions.import.dialog.title", {
2134
2134
  entity: t(`_pages:${i}.title`)
2135
2135
  }),
2136
2136
  handleClose: () => {
2137
- u(!1), p(null);
2137
+ d(!1), b(null);
2138
2138
  },
2139
2139
  action: C
2140
2140
  };
2141
2141
  }
2142
2142
  const gn = (e) => {
2143
2143
  const { showSuccessNotification: t } = Ne(), { t: s } = T(), {
2144
- entity: r,
2144
+ entity: n,
2145
2145
  mutationFn: i,
2146
- onError: n,
2146
+ onError: r,
2147
2147
  onSuccess: c,
2148
2148
  onSuccessMessage: a = s("_pages:common.actions.export.successMessage")
2149
- } = e, u = Ie({
2149
+ } = e, d = Ie({
2150
2150
  mutationFn: () => i(),
2151
2151
  onError: (y) => {
2152
- console.error(y), n && n(y);
2152
+ console.error(y), r && r(y);
2153
2153
  },
2154
2154
  onSuccess: async (y) => {
2155
- const m = JSON.stringify(y, null, 2), v = new Blob([m], { type: "application/json" }), C = URL.createObjectURL(v), g = document.createElement("a");
2156
- g.href = C, g.download = `${r}.json`, g.click(), URL.revokeObjectURL(C), c && c(y), t({
2155
+ const f = JSON.stringify(y, null, 2), w = new Blob([f], { type: "application/json" }), C = URL.createObjectURL(w), g = document.createElement("a");
2156
+ g.href = C, g.download = `${n}.json`, g.click(), URL.revokeObjectURL(C), c && c(y), t({
2157
2157
  message: a
2158
2158
  });
2159
2159
  }
2160
- }), f = E(() => {
2161
- u.mutate();
2162
- }, [u]), { action: p } = Ar({
2163
- onClick: f,
2164
- isLoading: u.isPending
2160
+ }), m = E(() => {
2161
+ d.mutate();
2162
+ }, [d]), { action: b } = Ar({
2163
+ onClick: m,
2164
+ isLoading: d.isPending
2165
2165
  });
2166
2166
  return {
2167
- action: p
2167
+ action: b
2168
2168
  };
2169
2169
  };
2170
2170
  function $r(e) {
2171
- const [t, s] = B(!1), r = E(() => {
2171
+ const [t, s] = B(!1), n = E(() => {
2172
2172
  const i = window.scrollY > e;
2173
2173
  s(i);
2174
2174
  }, [e]);
2175
- return Z(() => (window.addEventListener("scroll", r), () => {
2176
- window.removeEventListener("scroll", r);
2177
- }), [r]), t;
2175
+ return Z(() => (window.addEventListener("scroll", n), () => {
2176
+ window.removeEventListener("scroll", n);
2177
+ }), [n]), t;
2178
2178
  }
2179
- const pn = () => {
2179
+ const bn = () => {
2180
2180
  const { t: e } = T(), t = $r(200);
2181
2181
  return /* @__PURE__ */ h(
2182
- pe,
2182
+ be,
2183
2183
  {
2184
2184
  icon: Ds,
2185
2185
  onClick: () => Js.scrollTo(0, 0),
@@ -2189,19 +2189,19 @@ const pn = () => {
2189
2189
  }
2190
2190
  );
2191
2191
  }, Fr = (e) => {
2192
- const { actions: t = [], className: s = "" } = e, { t: r } = T(), [i, n] = B(!1);
2192
+ const { actions: t = [], className: s = "" } = e, { t: n } = T(), [i, r] = B(!1);
2193
2193
  return /* @__PURE__ */ A("div", { className: `actions-dropdown ${s}`, children: [
2194
2194
  /* @__PURE__ */ h(
2195
- pe,
2195
+ be,
2196
2196
  {
2197
2197
  icon: Vs,
2198
- onClick: () => n(!0),
2198
+ onClick: () => r(!0),
2199
2199
  "data-tooltip-id": "tooltip",
2200
- "data-tooltip-content": r("_accessibility:buttons.openActions")
2200
+ "data-tooltip-content": n("_accessibility:buttons.openActions")
2201
2201
  }
2202
2202
  ),
2203
- /* @__PURE__ */ h(zs, { open: i, onClose: () => n(!1), children: /* @__PURE__ */ h(
2204
- jt,
2203
+ /* @__PURE__ */ h(zs, { open: i, onClose: () => r(!1), children: /* @__PURE__ */ h(
2204
+ Ht,
2205
2205
  {
2206
2206
  showActionTexts: !0,
2207
2207
  actions: t,
@@ -2210,67 +2210,67 @@ const pn = () => {
2210
2210
  }
2211
2211
  ) })
2212
2212
  ] });
2213
- }, bn = It(function(e, t) {
2213
+ }, pn = It(function(e, t) {
2214
2214
  const {
2215
2215
  value: s,
2216
- onChange: r,
2216
+ onChange: n,
2217
2217
  state: i = vs.default,
2218
- name: n = "",
2218
+ name: r = "",
2219
2219
  id: c = "",
2220
2220
  label: a = "",
2221
- disabled: u = !1,
2222
- required: f = !1,
2223
- containerClassName: p = "",
2221
+ disabled: d = !1,
2222
+ required: m = !1,
2223
+ containerClassName: b = "",
2224
2224
  inputClassName: y = "",
2225
- labelClassName: m = "",
2226
- helperText: v = "",
2225
+ labelClassName: f = "",
2226
+ helperText: w = "",
2227
2227
  helperTextClassName: C = "",
2228
2228
  ...g
2229
2229
  } = e;
2230
- return /* @__PURE__ */ A("div", { className: `relative z-0 w-full mb-5 group ${p}`, children: [
2230
+ return /* @__PURE__ */ A("div", { className: `relative z-0 w-full mb-5 group ${b}`, children: [
2231
2231
  /* @__PURE__ */ h(
2232
2232
  "textarea",
2233
2233
  {
2234
2234
  ref: t,
2235
- name: n,
2235
+ name: r,
2236
2236
  id: c,
2237
2237
  className: `text-input text-area ${xs(i)} ${y} peer`,
2238
- required: f,
2238
+ required: m,
2239
2239
  value: s,
2240
- onChange: r,
2241
- disabled: u,
2240
+ onChange: n,
2241
+ disabled: d,
2242
2242
  ...g
2243
2243
  }
2244
2244
  ),
2245
2245
  /* @__PURE__ */ A(
2246
2246
  "label",
2247
2247
  {
2248
- htmlFor: n,
2249
- className: `text-input-label ${_s(i)} ${m}`,
2248
+ htmlFor: r,
2249
+ className: `text-input-label ${_s(i)} ${f}`,
2250
2250
  children: [
2251
2251
  a,
2252
- f ? " *" : ""
2252
+ m ? " *" : ""
2253
2253
  ]
2254
2254
  }
2255
2255
  ),
2256
- !!v && /* @__PURE__ */ h(
2256
+ !!w && /* @__PURE__ */ h(
2257
2257
  "p",
2258
2258
  {
2259
2259
  className: `text-input-helper-text ${Cs(i)} ${C}`,
2260
- children: v
2260
+ children: w
2261
2261
  }
2262
2262
  )
2263
2263
  ] });
2264
2264
  }), wn = (e) => {
2265
2265
  const { t } = T(), {
2266
2266
  children: s,
2267
- handleSubmit: r,
2267
+ handleSubmit: n,
2268
2268
  onSubmit: i,
2269
- isLoading: n = !1,
2269
+ isLoading: r = !1,
2270
2270
  buttonEnd: c = !0,
2271
2271
  reset: a
2272
2272
  } = e;
2273
- return /* @__PURE__ */ A("form", { className: "form-container", onSubmit: r(i), children: [
2273
+ return /* @__PURE__ */ A("form", { className: "form-container", onSubmit: n(i), children: [
2274
2274
  s,
2275
2275
  /* @__PURE__ */ A("div", { className: `flex gap-2 mt-5 ${c ? "justify-end" : ""}`, children: [
2276
2276
  /* @__PURE__ */ A(
@@ -2279,11 +2279,11 @@ const pn = () => {
2279
2279
  type: "submit",
2280
2280
  color: "primary",
2281
2281
  variant: "submit",
2282
- disabled: n,
2282
+ disabled: r,
2283
2283
  name: t("_accessibility:buttons.submit"),
2284
2284
  "aria-label": t("_accessibility:ariaLabels.submit"),
2285
2285
  children: [
2286
- n ? /* @__PURE__ */ h(Ve, { color: "stroke-base", loaderClass: "!w-6 mt-1", strokeWidth: "6" }) : null,
2286
+ r ? /* @__PURE__ */ h(Ve, { color: "stroke-base", loaderClass: "!w-6 mt-1", strokeWidth: "6" }) : null,
2287
2287
  t("_accessibility:buttons.submit")
2288
2288
  ]
2289
2289
  }
@@ -2302,42 +2302,42 @@ const pn = () => {
2302
2302
  ] })
2303
2303
  ] });
2304
2304
  }, vn = It(function(e, t) {
2305
- const [s, r] = B(!1);
2305
+ const [s, n] = B(!1);
2306
2306
  return /* @__PURE__ */ h(Ss, { ...e, type: s ? "text" : "password", ref: t, children: /* @__PURE__ */ h(
2307
- pe,
2307
+ be,
2308
2308
  {
2309
2309
  type: "button",
2310
2310
  tabIndex: -1,
2311
2311
  className: "absolute right-2 password-icon",
2312
- onClick: () => r(!s),
2312
+ onClick: () => n(!s),
2313
2313
  icon: s ? Ps : Ms
2314
2314
  }
2315
2315
  ) });
2316
2316
  }), lt = (e) => {
2317
2317
  const { t } = T(), {
2318
2318
  title: s,
2319
- children: r,
2319
+ children: n,
2320
2320
  handleClose: i,
2321
- open: n = !1,
2321
+ open: r = !1,
2322
2322
  containerClassName: c = "",
2323
2323
  className: a = "",
2324
- animationClass: u = "appear"
2325
- } = e, [f, p] = B(window.innerWidth), y = E(
2324
+ animationClass: d = "appear"
2325
+ } = e, [m, b] = B(window.innerWidth), y = E(
2326
2326
  (g) => {
2327
- g.key === "Escape" && n && i();
2327
+ g.key === "Escape" && r && i();
2328
2328
  },
2329
- [n, i]
2329
+ [r, i]
2330
2330
  );
2331
2331
  Z(() => (window.addEventListener("keydown", y), () => {
2332
2332
  window.removeEventListener("keydown", y);
2333
2333
  }), [y]);
2334
- const m = E(() => {
2335
- p(window.innerWidth);
2334
+ const f = E(() => {
2335
+ b(window.innerWidth);
2336
2336
  }, []);
2337
- Z(() => (window.addEventListener("resize", m), () => {
2338
- window.removeEventListener("resize", m);
2339
- }), [m]);
2340
- const v = ke(() => js({ width: `${f}px` }), [f]), C = E(
2337
+ Z(() => (window.addEventListener("resize", f), () => {
2338
+ window.removeEventListener("resize", f);
2339
+ }), [f]);
2340
+ const w = ke(() => Hs({ width: `${m}px` }), [m]), C = E(
2341
2341
  (g) => {
2342
2342
  var L;
2343
2343
  ((L = g == null ? void 0 : g.currentTarget) == null ? void 0 : L.getAttribute("name")) === t("_accessibility:buttons.closeDialog") && i();
@@ -2348,30 +2348,30 @@ const pn = () => {
2348
2348
  const g = (L) => {
2349
2349
  L ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
2350
2350
  };
2351
- return g(n), () => {
2352
- g(n);
2351
+ return g(r), () => {
2352
+ g(r);
2353
2353
  };
2354
- }, [n]), qt(
2354
+ }, [r]), qt(
2355
2355
  /* @__PURE__ */ h(
2356
2356
  "div",
2357
2357
  {
2358
2358
  "aria-label": t("_accessibility:ariaLabels.closeDialog"),
2359
- "aria-disabled": !n,
2359
+ "aria-disabled": !r,
2360
2360
  onClick: C,
2361
- className: `dialog-backdrop animated ${n ? `opened ${u}` : "closed"} ${v} h-screen ${n ? "bg-base/20 backdrop-blur-xl" : "pointer-events-none"} ${c}`,
2361
+ className: `dialog-backdrop animated ${r ? `opened ${d}` : "closed"} ${w} h-screen ${r ? "bg-base/20 backdrop-blur-xl" : "pointer-events-none"} ${c}`,
2362
2362
  children: /* @__PURE__ */ A(
2363
2363
  "div",
2364
2364
  {
2365
- className: `dialog elevated animated ${n ? `opened ${u}` : "closed"} ${a}`,
2365
+ className: `dialog elevated animated ${r ? `opened ${d}` : "closed"} ${a}`,
2366
2366
  children: [
2367
2367
  /* @__PURE__ */ A("div", { className: "dialog-header", children: [
2368
2368
  /* @__PURE__ */ h("h3", { className: "text-text text-xl", children: s }),
2369
2369
  /* @__PURE__ */ h(
2370
- pe,
2370
+ be,
2371
2371
  {
2372
2372
  icon: Rt,
2373
- disabled: !n,
2374
- "aria-disabled": !n,
2373
+ disabled: !r,
2374
+ "aria-disabled": !r,
2375
2375
  onClick: i,
2376
2376
  className: "icon-button text-red-400",
2377
2377
  name: t("_accessibility:buttons.closeDialog"),
@@ -2379,7 +2379,7 @@ const pn = () => {
2379
2379
  }
2380
2380
  )
2381
2381
  ] }),
2382
- r
2382
+ n
2383
2383
  ]
2384
2384
  }
2385
2385
  )
@@ -2391,23 +2391,23 @@ const pn = () => {
2391
2391
  const {
2392
2392
  primaryText: t,
2393
2393
  cancelText: s,
2394
- onPrimaryClick: r,
2394
+ onPrimaryClick: n,
2395
2395
  onCancel: i,
2396
- isLoading: n = !1,
2396
+ isLoading: r = !1,
2397
2397
  disabled: c = !1,
2398
2398
  primaryType: a = "submit",
2399
- containerClassName: u = "",
2400
- primaryClassName: f = "",
2401
- alignEnd: p = !1,
2399
+ containerClassName: d = "",
2400
+ primaryClassName: m = "",
2401
+ alignEnd: b = !1,
2402
2402
  primaryName: y,
2403
- primaryAriaLabel: m,
2404
- cancelName: v,
2403
+ primaryAriaLabel: f,
2404
+ cancelName: w,
2405
2405
  cancelAriaLabel: C
2406
2406
  } = e;
2407
2407
  return /* @__PURE__ */ A(
2408
2408
  "div",
2409
2409
  {
2410
- className: `flex gap-2 mt-2 ${p ? "justify-end" : ""} ${u}`,
2410
+ className: `flex gap-2 mt-2 ${b ? "justify-end" : ""} ${d}`,
2411
2411
  children: [
2412
2412
  /* @__PURE__ */ A(
2413
2413
  xe,
@@ -2415,13 +2415,13 @@ const pn = () => {
2415
2415
  type: a,
2416
2416
  color: "primary",
2417
2417
  variant: "submit",
2418
- className: f,
2418
+ className: m,
2419
2419
  disabled: c,
2420
- onClick: a === "button" ? r : void 0,
2420
+ onClick: a === "button" ? n : void 0,
2421
2421
  name: y,
2422
- "aria-label": m,
2422
+ "aria-label": f,
2423
2423
  children: [
2424
- n ? /* @__PURE__ */ h(Ve, { color: "stroke-base", loaderClass: "!w-6 mt-1", strokeWidth: "6" }) : null,
2424
+ r ? /* @__PURE__ */ h(Ve, { color: "stroke-base", loaderClass: "!w-6 mt-1", strokeWidth: "6" }) : null,
2425
2425
  t
2426
2426
  ]
2427
2427
  }
@@ -2433,7 +2433,7 @@ const pn = () => {
2433
2433
  variant: "outlined",
2434
2434
  disabled: c,
2435
2435
  onClick: i,
2436
- name: v,
2436
+ name: w,
2437
2437
  "aria-label": C,
2438
2438
  children: s
2439
2439
  }
@@ -2444,14 +2444,14 @@ const pn = () => {
2444
2444
  }, xn = (e) => {
2445
2445
  const { t } = T(), {
2446
2446
  children: s,
2447
- handleSubmit: r,
2447
+ handleSubmit: n,
2448
2448
  onSubmit: i,
2449
- handleClose: n,
2449
+ handleClose: r,
2450
2450
  isLoading: c = !1,
2451
2451
  buttonEnd: a = !0,
2452
- ...u
2452
+ ...d
2453
2453
  } = e;
2454
- return /* @__PURE__ */ h(lt, { ...u, handleClose: n, children: /* @__PURE__ */ A("form", { onSubmit: r(i), children: [
2454
+ return /* @__PURE__ */ h(lt, { ...d, handleClose: r, children: /* @__PURE__ */ A("form", { onSubmit: n(i), children: [
2455
2455
  /* @__PURE__ */ h("div", { className: "form-container", children: s }),
2456
2456
  /* @__PURE__ */ h(
2457
2457
  ut,
@@ -2459,7 +2459,7 @@ const pn = () => {
2459
2459
  primaryType: "submit",
2460
2460
  primaryText: t("_accessibility:buttons.submit"),
2461
2461
  cancelText: t("_accessibility:buttons.cancel"),
2462
- onCancel: n,
2462
+ onCancel: r,
2463
2463
  isLoading: c,
2464
2464
  disabled: c,
2465
2465
  primaryClassName: "!px-6",
@@ -2474,9 +2474,9 @@ const pn = () => {
2474
2474
  }, _n = (e) => {
2475
2475
  const { t } = T(), {
2476
2476
  children: s,
2477
- handleSubmit: r,
2477
+ handleSubmit: n,
2478
2478
  handleClose: i,
2479
- isLoading: n = !1,
2479
+ isLoading: r = !1,
2480
2480
  ...c
2481
2481
  } = e;
2482
2482
  return /* @__PURE__ */ A(lt, { ...c, handleClose: i, children: [
@@ -2486,10 +2486,10 @@ const pn = () => {
2486
2486
  {
2487
2487
  primaryText: t("_accessibility:buttons.ok"),
2488
2488
  cancelText: t("_accessibility:buttons.cancel"),
2489
- onPrimaryClick: r,
2489
+ onPrimaryClick: n,
2490
2490
  onCancel: i,
2491
- isLoading: n,
2492
- disabled: n,
2491
+ isLoading: r,
2492
+ disabled: r,
2493
2493
  primaryType: "button",
2494
2494
  containerClassName: "mt-5",
2495
2495
  primaryName: t("_accessibility:buttons.ok"),
@@ -2501,18 +2501,18 @@ const pn = () => {
2501
2501
  ] });
2502
2502
  };
2503
2503
  function Lr(e) {
2504
- const { message: t, className: s = "" } = e, { t: r } = T();
2505
- return t ? /* @__PURE__ */ h("p", { className: `text-red-600 text-sm mt-2 ${s}`, children: t || r("_messages:errors.parseFile", { defaultValue: "Failed to process file" }) }) : null;
2504
+ const { message: t, className: s = "" } = e, { t: n } = T();
2505
+ return t ? /* @__PURE__ */ h("p", { className: `text-red-600 text-sm mt-2 ${s}`, children: t || n("_messages:errors.parseFile", { defaultValue: "Failed to process file" }) }) : null;
2506
2506
  }
2507
2507
  function Tr(e) {
2508
- const { message: t, className: s = "" } = e, { t: r } = T();
2508
+ const { message: t, className: s = "" } = e, { t: n } = T();
2509
2509
  return /* @__PURE__ */ A(
2510
2510
  "div",
2511
2511
  {
2512
2512
  className: `my-4 mx-auto flex items-center gap-3 text-sm text-gray-600 ${s}`,
2513
2513
  children: [
2514
2514
  /* @__PURE__ */ h(Ve, { loaderClass: "w-5 h-5", className: "!w-auto" }),
2515
- /* @__PURE__ */ h("span", { children: t ?? r("_messages:loading.processingFile", {
2515
+ /* @__PURE__ */ h("span", { children: t ?? n("_messages:loading.processingFile", {
2516
2516
  defaultValue: "Processing file..."
2517
2517
  }) })
2518
2518
  ]
@@ -2520,27 +2520,27 @@ function Tr(e) {
2520
2520
  );
2521
2521
  }
2522
2522
  function Dr(e) {
2523
- const { items: t, max: s = 5, className: r = "" } = e, { t: i } = T();
2523
+ const { items: t, max: s = 5, className: n = "" } = e, { t: i } = T();
2524
2524
  if (!t || t.length === 0) return null;
2525
- const n = t.slice(0, s);
2526
- return /* @__PURE__ */ A("div", { className: `mt-4 ${r}`, children: [
2525
+ const r = t.slice(0, s);
2526
+ return /* @__PURE__ */ A("div", { className: `mt-4 ${n}`, children: [
2527
2527
  /* @__PURE__ */ h("p", { className: "text-sm text-gray-600", children: i("_pages:common.actions.import.previewCount", {
2528
2528
  count: t.length,
2529
2529
  defaultValue: `Preview: ${t.length} items`
2530
2530
  }) }),
2531
- /* @__PURE__ */ h("pre", { className: "mt-2 max-h-56 overflow-auto rounded bg-gray-100 p-3 text-xs", children: JSON.stringify(n, null, 2) })
2531
+ /* @__PURE__ */ h("pre", { className: "mt-2 max-h-56 overflow-auto rounded bg-gray-100 p-3 text-xs", children: JSON.stringify(r, null, 2) })
2532
2532
  ] });
2533
2533
  }
2534
2534
  const Cn = (e) => {
2535
- const { t } = T(), [s, r] = B(null), [i, n] = B(null), [c, a] = B(null), [u, f] = B(!1), [p, y] = B(!1), {
2536
- children: m,
2537
- handleSubmit: v,
2535
+ const { t } = T(), [s, n] = B(null), [i, r] = B(null), [c, a] = B(null), [d, m] = B(!1), [b, y] = B(!1), {
2536
+ children: f,
2537
+ handleSubmit: w,
2538
2538
  handleClose: C,
2539
2539
  isLoading: g = !1,
2540
2540
  fileProcessor: L,
2541
2541
  onFileProcessed: G,
2542
2542
  onOverrideChange: k,
2543
- open: j,
2543
+ open: H,
2544
2544
  ...V
2545
2545
  } = e, [F, J] = B(0), P = Be(G), le = Be(L);
2546
2546
  Z(() => {
@@ -2548,43 +2548,43 @@ const Cn = (e) => {
2548
2548
  }, [G]), Z(() => {
2549
2549
  le.current = L;
2550
2550
  }, [L]), Z(() => {
2551
- j || (r(null), n(null), a(null), f(!1), y(!1), J((U) => U + 1));
2552
- }, [j]);
2553
- const H = E(async () => {
2551
+ H || (n(null), r(null), a(null), m(!1), y(!1), J((U) => U + 1));
2552
+ }, [H]);
2553
+ const j = E(async () => {
2554
2554
  var U;
2555
2555
  if (le.current && s) {
2556
- f(!0);
2556
+ m(!0);
2557
2557
  try {
2558
2558
  const O = await le.current(s, {
2559
- override: p
2559
+ override: b
2560
2560
  });
2561
- n(O ?? []), a(null), (U = P.current) == null || U.call(P, O ?? []);
2561
+ r(O ?? []), a(null), (U = P.current) == null || U.call(P, O ?? []);
2562
2562
  } catch (O) {
2563
- console.error(O), n(null);
2563
+ console.error(O), r(null);
2564
2564
  const N = O instanceof Error ? O.message : "Failed to parse file";
2565
2565
  a(N);
2566
2566
  }
2567
- f(!1);
2567
+ m(!1);
2568
2568
  }
2569
- }, [s, p]);
2569
+ }, [s, b]);
2570
2570
  return Z(() => {
2571
- H();
2572
- }, [H]), /* @__PURE__ */ A(lt, { ...V, open: j, handleClose: C, children: [
2571
+ j();
2572
+ }, [j]), /* @__PURE__ */ A(lt, { ...V, open: H, handleClose: C, children: [
2573
2573
  /* @__PURE__ */ h(
2574
2574
  ks,
2575
2575
  {
2576
2576
  onClear: () => {
2577
2577
  var U;
2578
- r(null), n(null), a(null), f(!1), (U = P.current) == null || U.call(P, []);
2578
+ n(null), r(null), a(null), m(!1), (U = P.current) == null || U.call(P, []);
2579
2579
  },
2580
2580
  onChange: (U) => {
2581
2581
  var N, $;
2582
2582
  const O = (N = U.target.files) == null ? void 0 : N[0];
2583
2583
  if (!O) {
2584
- r(null), n(null), a(null), f(!1), ($ = P.current) == null || $.call(P, []);
2584
+ n(null), r(null), a(null), m(!1), ($ = P.current) == null || $.call(P, []);
2585
2585
  return;
2586
2586
  }
2587
- r(O);
2587
+ n(O);
2588
2588
  },
2589
2589
  label: t("_accessibility:labels.file")
2590
2590
  },
@@ -2595,7 +2595,7 @@ const Cn = (e) => {
2595
2595
  "input",
2596
2596
  {
2597
2597
  type: "checkbox",
2598
- checked: p,
2598
+ checked: b,
2599
2599
  onChange: (U) => {
2600
2600
  const O = U.target.checked;
2601
2601
  y(O), k == null || k(O);
@@ -2607,16 +2607,16 @@ const Cn = (e) => {
2607
2607
  }) })
2608
2608
  ] }),
2609
2609
  /* @__PURE__ */ h(Lr, { message: c ?? void 0 }),
2610
- u && /* @__PURE__ */ h(Tr, {}),
2610
+ d && /* @__PURE__ */ h(Tr, {}),
2611
2611
  !!i && i.length > 0 && /* @__PURE__ */ h(Dr, { items: i }),
2612
- m,
2612
+ f,
2613
2613
  /* @__PURE__ */ h(
2614
2614
  ut,
2615
2615
  {
2616
2616
  primaryText: t("_accessibility:buttons.ok"),
2617
2617
  cancelText: t("_accessibility:buttons.cancel"),
2618
2618
  onPrimaryClick: () => {
2619
- (!L || !!i && i.length > 0) && v();
2619
+ (!L || !!i && i.length > 0) && w();
2620
2620
  },
2621
2621
  onCancel: C,
2622
2622
  isLoading: g,
@@ -2631,28 +2631,28 @@ const Cn = (e) => {
2631
2631
  ] });
2632
2632
  };
2633
2633
  function Sn(e) {
2634
- const { t } = T(), { open: s, onClose: r, menuMap: i, logo: n } = e, { account: c } = Jt(), { dynamicItems: a } = sr(), { linkComponent: u } = ze(), f = u, p = ke(() => i.filter((g) => {
2634
+ const { t } = T(), { open: s, onClose: n, menuMap: i, logo: r } = e, { account: c } = Jt(), { dynamicItems: a } = sr(), { linkComponent: d } = ze(), m = d, b = ke(() => i.filter((g) => {
2635
2635
  const L = g.auth, G = !!(c != null && c.email);
2636
2636
  return L == null || L && G || !L && !G;
2637
2637
  }), [c == null ? void 0 : c.email, i]), y = E(
2638
2638
  (g) => {
2639
- g.key === "Escape" && s && r();
2639
+ g.key === "Escape" && s && n();
2640
2640
  },
2641
- [r, s]
2641
+ [n, s]
2642
2642
  );
2643
2643
  Z(() => (document.addEventListener("keydown", y), () => {
2644
2644
  document.removeEventListener("keydown", y);
2645
2645
  }), [y]);
2646
- const m = E(
2646
+ const f = E(
2647
2647
  (g, L) => L ? g === `${location.pathname}${location.search}` : g === location.pathname,
2648
2648
  []
2649
- ), v = E(
2649
+ ), w = E(
2650
2650
  (g) => /* @__PURE__ */ h(
2651
2651
  "li",
2652
2652
  {
2653
- className: `drawer-list-item-child ${m(g.path, !0) ? "active" : ""} animated`,
2653
+ className: `drawer-list-item-child ${f(g.path, !0) ? "active" : ""} animated`,
2654
2654
  children: g.path ? /* @__PURE__ */ h(
2655
- f,
2655
+ m,
2656
2656
  {
2657
2657
  "aria-disabled": !s,
2658
2658
  to: g.path ?? "/",
@@ -2664,15 +2664,15 @@ function Sn(e) {
2664
2664
  },
2665
2665
  g.id
2666
2666
  ),
2667
- [f, s, t, m]
2668
- ), C = ke(() => p.map((g, L) => {
2669
- const G = g.page ?? String(L), k = `drawer-list-item ${m(g.path) ? "active" : ""} animated`;
2667
+ [m, s, t, f]
2668
+ ), C = ke(() => b.map((g, L) => {
2669
+ const G = g.page ?? String(L), k = `drawer-list-item ${f(g.path) ? "active" : ""} animated`;
2670
2670
  if (g.type === "divider")
2671
2671
  return /* @__PURE__ */ h("li", { className: k, children: /* @__PURE__ */ h("hr", { className: "drawer-divider" }) }, G);
2672
- const j = g.children ?? (g.page && a ? a[g.page] : null);
2672
+ const H = g.children ?? (g.page && a ? a[g.page] : null);
2673
2673
  return /* @__PURE__ */ A("li", { className: k, children: [
2674
2674
  /* @__PURE__ */ A(
2675
- f,
2675
+ m,
2676
2676
  {
2677
2677
  "aria-disabled": !s,
2678
2678
  to: g.path ?? "/",
@@ -2684,19 +2684,19 @@ function Sn(e) {
2684
2684
  ]
2685
2685
  }
2686
2686
  ),
2687
- j && /* @__PURE__ */ h("ul", { className: "drawer-children-list", children: j.map(v) })
2687
+ H && /* @__PURE__ */ h("ul", { className: "drawer-children-list", children: H.map(w) })
2688
2688
  ] }, G);
2689
- }), [f, a, m, s, p, v, t]);
2689
+ }), [m, a, f, s, b, w, t]);
2690
2690
  return /* @__PURE__ */ h(
2691
2691
  "div",
2692
2692
  {
2693
2693
  "aria-label": t("_accessibility:ariaLabels.closeMenu"),
2694
2694
  "aria-disabled": !s,
2695
2695
  className: `${s ? "opened" : "closed"} drawer-backdrop`,
2696
- onClick: () => r(),
2696
+ onClick: () => n(),
2697
2697
  children: /* @__PURE__ */ A("aside", { className: `${s ? "opened" : "closed"} drawer animated`, children: [
2698
2698
  /* @__PURE__ */ A("div", { className: "drawer-header-container", children: [
2699
- n,
2699
+ r,
2700
2700
  /* @__PURE__ */ h("h2", { className: "drawer-header poppins", children: t("_pages:home.appName") })
2701
2701
  ] }),
2702
2702
  /* @__PURE__ */ h("ul", { className: "flex flex-col", children: C })
@@ -2712,14 +2712,14 @@ function kn(e) {
2712
2712
  ] });
2713
2713
  }
2714
2714
  const Vr = (e) => {
2715
- const { showBackButton: t, title: s, actions: r } = e, { t: i } = T(), { navigate: n } = ze();
2715
+ const { showBackButton: t, title: s, actions: n } = e, { t: i } = T(), { navigate: r } = ze();
2716
2716
  return /* @__PURE__ */ A("div", { className: "page-header", children: [
2717
2717
  /* @__PURE__ */ A("div", { className: "page-header-left", children: [
2718
2718
  t && /* @__PURE__ */ h(
2719
- pe,
2719
+ be,
2720
2720
  {
2721
2721
  icon: Is,
2722
- onClick: () => n(-1),
2722
+ onClick: () => r(-1),
2723
2723
  name: i("_accessibility:buttons.back"),
2724
2724
  "data-tooltip-id": "tooltip",
2725
2725
  "data-tooltip-content": i("_accessibility:buttons.back")
@@ -2728,39 +2728,39 @@ const Vr = (e) => {
2728
2728
  /* @__PURE__ */ h("h2", { className: "page-header-title", children: s })
2729
2729
  ] }),
2730
2730
  /* @__PURE__ */ A("div", { children: [
2731
- /* @__PURE__ */ h(jt, { className: "max-xs:!hidden", actions: r ?? [] }),
2732
- /* @__PURE__ */ h(Fr, { className: "min-xs:hidden", actions: r ?? [] })
2731
+ /* @__PURE__ */ h(Ht, { className: "max-xs:!hidden", actions: n ?? [] }),
2732
+ /* @__PURE__ */ h(Fr, { className: "min-xs:hidden", actions: n ?? [] })
2733
2733
  ] })
2734
2734
  ] });
2735
2735
  }, Nn = (e) => {
2736
2736
  const {
2737
2737
  title: t,
2738
2738
  children: s,
2739
- addOptions: r,
2739
+ addOptions: n,
2740
2740
  filterOptions: i,
2741
- actions: n,
2741
+ actions: r,
2742
2742
  queryKey: c,
2743
2743
  isLoading: a = !1,
2744
- isAnimated: u = !0,
2745
- showBackButton: f = !1
2746
- } = e, { t: p } = T(), { countOfFilters: y } = Ns(), m = ke(() => {
2747
- const v = Array.isArray(n) ? [...n] : [];
2744
+ isAnimated: d = !0,
2745
+ showBackButton: m = !1
2746
+ } = e, { t: b } = T(), { countOfFilters: y } = Ns(), f = ke(() => {
2747
+ const w = Array.isArray(r) ? [...r] : [];
2748
2748
  if (c) {
2749
2749
  const C = {
2750
2750
  id: _e.Refresh,
2751
- onClick: () => be.invalidateQueries({ queryKey: c }),
2751
+ onClick: () => pe.invalidateQueries({ queryKey: c }),
2752
2752
  icon: /* @__PURE__ */ h(ce, { icon: Ot }),
2753
- tooltip: p("_pages:common.actions.refresh.text")
2753
+ tooltip: b("_pages:common.actions.refresh.text")
2754
2754
  };
2755
- v.unshift(C);
2755
+ w.unshift(C);
2756
2756
  }
2757
- if (r) {
2757
+ if (n) {
2758
2758
  const C = {
2759
- ...r,
2759
+ ...n,
2760
2760
  id: _e.Add,
2761
2761
  icon: /* @__PURE__ */ h(ce, { icon: vt })
2762
2762
  };
2763
- v.unshift(C);
2763
+ w.unshift(C);
2764
2764
  }
2765
2765
  if (i) {
2766
2766
  const C = {
@@ -2775,105 +2775,111 @@ const Vr = (e) => {
2775
2775
  }
2776
2776
  )
2777
2777
  };
2778
- v.push(C);
2778
+ w.push(C);
2779
2779
  }
2780
- return v;
2781
- }, [n, r, y, i, c, p]);
2780
+ return w;
2781
+ }, [r, n, y, i, c, b]);
2782
2782
  return /* @__PURE__ */ A("main", { className: "page-main", children: [
2783
2783
  /* @__PURE__ */ h(
2784
2784
  Vr,
2785
2785
  {
2786
- showBackButton: f,
2787
- actions: m,
2786
+ showBackButton: m,
2787
+ actions: f,
2788
2788
  title: t
2789
2789
  }
2790
2790
  ),
2791
- /* @__PURE__ */ h("div", { className: `page-main-content ${u ? "appear" : ""}`, children: a ? /* @__PURE__ */ h(Ve, { className: "page-loading" }) : s }),
2792
- r && /* @__PURE__ */ h(
2793
- pe,
2791
+ /* @__PURE__ */ h("div", { className: `page-main-content ${d ? "appear" : ""}`, children: a ? /* @__PURE__ */ h(Ve, { className: "page-loading" }) : s }),
2792
+ n && /* @__PURE__ */ h(
2793
+ be,
2794
2794
  {
2795
- icon: r.icon ?? vt,
2796
- color: r.color ?? "primary",
2797
- variant: r.variant ?? "submit",
2795
+ icon: n.icon ?? vt,
2796
+ color: n.color ?? "primary",
2797
+ variant: n.variant ?? "submit",
2798
2798
  onClick: () => {
2799
- var v;
2800
- return (v = r.onClick) == null ? void 0 : v.call(r);
2799
+ var w;
2800
+ return (w = n.onClick) == null ? void 0 : w.call(n);
2801
2801
  },
2802
- className: `button fab min-xs:!hidden ${r.className ?? ""}`
2802
+ className: `button fab min-xs:!hidden ${n.className ?? ""}`
2803
2803
  }
2804
2804
  )
2805
2805
  ] });
2806
2806
  }, An = (e) => {
2807
2807
  const { t } = T(), {
2808
2808
  className: s = "",
2809
- itemClassName: r = "",
2809
+ itemClassName: n = "",
2810
2810
  loading: i = !1,
2811
- emptyComponent: n = null,
2811
+ emptyComponent: r = null,
2812
2812
  emptyMessage: c = t("_accessibility:messages.empty"),
2813
2813
  renderComponent: a,
2814
- data: u = []
2814
+ data: d = []
2815
2815
  } = e;
2816
- return /* @__PURE__ */ h(De, { children: u != null && u.length ? /* @__PURE__ */ h("ul", { className: `pretty-grid-main ${s}`, children: u == null ? void 0 : u.map((f) => /* @__PURE__ */ h("li", { className: `pretty-grid-item ${r}`, children: a(f) }, f.id)) }) : /* @__PURE__ */ h(De, { children: n || /* @__PURE__ */ h(Ur, { message: c }) }) });
2816
+ return /* @__PURE__ */ h(De, { children: d != null && d.length ? /* @__PURE__ */ h("ul", { className: `pretty-grid-main ${s}`, children: d == null ? void 0 : d.map((m) => /* @__PURE__ */ h("li", { className: `pretty-grid-item ${n}`, children: a(m) }, m.id)) }) : /* @__PURE__ */ h(De, { children: r || /* @__PURE__ */ h(Ur, { message: c }) }) });
2817
2817
  }, Pr = () => {
2818
2818
  const [e, t] = B(St());
2819
2819
  return Z(() => {
2820
- const s = window.matchMedia("(min-width: 768px)"), r = () => {
2820
+ const s = window.matchMedia("(min-width: 768px)"), n = () => {
2821
2821
  t(
2822
2822
  s.matches ? St() : Zs()
2823
2823
  );
2824
- }, i = setInterval(r, 1e3);
2825
- return s.addEventListener("change", r), () => {
2826
- clearInterval(i), s.removeEventListener("change", r);
2824
+ }, i = setInterval(n, 1e3);
2825
+ return s.addEventListener("change", n), () => {
2826
+ clearInterval(i), s.removeEventListener("change", n);
2827
2827
  };
2828
2828
  }, []), /* @__PURE__ */ h("p", { className: "capitalize max-xs:hidden", children: e });
2829
2829
  };
2830
2830
  function En(e) {
2831
- const { t } = T(), { openDrawer: s, showClock: r = !0, showSearch: i = !0 } = e, { searchComponent: n } = ze(), [c, a] = B(!1), u = E((p) => {
2832
- (er() ? p.metaKey : p.ctrlKey) && p.shiftKey && p.key.toLowerCase() === "f" && (a(!0), p.preventDefault());
2831
+ const { t } = T(), {
2832
+ openDrawer: s,
2833
+ showClock: n = !0,
2834
+ showSearch: i = !0,
2835
+ menuButtonProps: r
2836
+ } = e, c = {
2837
+ ...r,
2838
+ type: (r == null ? void 0 : r.type) ?? "button",
2839
+ icon: (r == null ? void 0 : r.icon) ?? Us,
2840
+ onClick: (f) => {
2841
+ var w;
2842
+ (w = r == null ? void 0 : r.onClick) == null || w.call(r, f), s();
2843
+ },
2844
+ name: (r == null ? void 0 : r.name) ?? t("_accessibility:buttons.openMenu"),
2845
+ ariaLabel: (r == null ? void 0 : r["aria-label"]) ?? t("_accessibility:ariaLabels.openMenu"),
2846
+ className: `navbar-menu animated ${(r == null ? void 0 : r.className) ?? ""}`
2847
+ }, { searchComponent: a } = ze(), [d, m] = B(!1), b = E((f) => {
2848
+ (er() ? f.metaKey : f.ctrlKey) && f.shiftKey && f.key.toLowerCase() === "f" && (m(!0), f.preventDefault());
2833
2849
  }, []);
2834
- Z(() => (window.addEventListener("keydown", u), () => {
2835
- window.removeEventListener("keydown", u);
2836
- }), [u]);
2837
- const f = n;
2850
+ Z(() => (window.addEventListener("keydown", b), () => {
2851
+ window.removeEventListener("keydown", b);
2852
+ }), [b]);
2853
+ const y = a;
2838
2854
  return /* @__PURE__ */ A(De, { children: [
2839
- location.pathname !== "/" && !!f && /* @__PURE__ */ h(f, { open: c, onClose: () => a(!1) }),
2855
+ location.pathname !== "/" && !!y && /* @__PURE__ */ h(y, { open: d, onClose: () => m(!1) }),
2840
2856
  /* @__PURE__ */ A("header", { id: "header", className: "header", children: [
2841
- /* @__PURE__ */ A("div", { className: "flex gap-2 items-center", children: [
2842
- /* @__PURE__ */ h(
2843
- pe,
2844
- {
2845
- type: "button",
2846
- icon: Us,
2847
- onClick: s,
2848
- name: t("_accessibility:buttons.openMenu"),
2849
- "aria-label": t("_accessibility:ariaLabels.openMenu"),
2850
- className: "menu animated"
2851
- }
2852
- ),
2853
- /* @__PURE__ */ h("h1", { className: "text-lg text-text pointer-events-none poppins font-bold", children: t("_pages:home.appName") })
2857
+ /* @__PURE__ */ A("div", { className: "navbar-left", children: [
2858
+ /* @__PURE__ */ h(be, { ...c }),
2859
+ /* @__PURE__ */ h("h1", { className: "poppins navbar-title", children: t("_pages:home.appName") })
2854
2860
  ] }),
2855
- /* @__PURE__ */ A("div", { className: "flex items-center justify-end gap-2", children: [
2861
+ /* @__PURE__ */ A("div", { className: "navbar-right", children: [
2856
2862
  i && /* @__PURE__ */ h(
2857
- pe,
2863
+ be,
2858
2864
  {
2859
2865
  icon: Rs,
2860
2866
  className: "min-md:!hidden",
2861
- onClick: () => a(!0)
2867
+ onClick: () => m(!0)
2862
2868
  }
2863
2869
  ),
2864
- r && /* @__PURE__ */ h(Pr, {})
2870
+ n && /* @__PURE__ */ h(Pr, {})
2865
2871
  ] })
2866
2872
  ] })
2867
2873
  ] });
2868
2874
  }
2869
2875
  function $n() {
2870
- const { t: e } = T(), { notification: t, removeNotification: s } = Ne(), [r, i] = B(/* @__PURE__ */ new Set()), n = E(
2876
+ const { t: e } = T(), { notification: t, removeNotification: s } = Ne(), [n, i] = B(/* @__PURE__ */ new Set()), r = E(
2871
2877
  (y) => {
2872
2878
  if (y === void 0) {
2873
- const m = new Set(t.map((v, C) => C));
2874
- i(m), window.setTimeout(() => s(), 300);
2879
+ const f = new Set(t.map((w, C) => C));
2880
+ i(f), window.setTimeout(() => s(), 300);
2875
2881
  } else
2876
- i((m) => new Set(m).add(y)), window.setTimeout(() => s(y), 300);
2882
+ i((f) => new Set(f).add(y)), window.setTimeout(() => s(y), 300);
2877
2883
  },
2878
2884
  [t, s]
2879
2885
  ), c = E((y) => {
@@ -2894,7 +2900,7 @@ function $n() {
2894
2900
  default:
2895
2901
  return "!text-info";
2896
2902
  }
2897
- }, []), u = E((y) => {
2903
+ }, []), d = E((y) => {
2898
2904
  switch (y) {
2899
2905
  case Q.success:
2900
2906
  return "bg-bg-success";
@@ -2905,39 +2911,39 @@ function $n() {
2905
2911
  default:
2906
2912
  return "bg-bg-info";
2907
2913
  }
2908
- }, []), f = Be();
2914
+ }, []), m = Be();
2909
2915
  Z(() => {
2910
- f.current = () => n();
2911
- }, [n]), Z(() => {
2916
+ m.current = () => r();
2917
+ }, [r]), Z(() => {
2912
2918
  if (!(t != null && t.length)) return;
2913
- const y = (m) => {
2914
- var v;
2915
- return (v = f.current) == null ? void 0 : v.call(f, m);
2919
+ const y = (f) => {
2920
+ var w;
2921
+ return (w = m.current) == null ? void 0 : w.call(m, f);
2916
2922
  };
2917
2923
  return window.addEventListener("click", y), () => {
2918
2924
  window.removeEventListener("click", y);
2919
2925
  };
2920
2926
  }, [t == null ? void 0 : t.length]);
2921
- const p = E(
2927
+ const b = E(
2922
2928
  (y) => {
2923
- y.key === "Escape" && t.length && n();
2929
+ y.key === "Escape" && t.length && r();
2924
2930
  },
2925
- [t, n]
2931
+ [t, r]
2926
2932
  );
2927
- return Z(() => (window.addEventListener("keydown", p), () => {
2928
- window.removeEventListener("keydown", p);
2929
- }), [p]), Z(() => {
2933
+ return Z(() => (window.addEventListener("keydown", b), () => {
2934
+ window.removeEventListener("keydown", b);
2935
+ }), [b]), Z(() => {
2930
2936
  i(/* @__PURE__ */ new Set());
2931
2937
  }, [t]), qt(
2932
2938
  /* @__PURE__ */ h(
2933
2939
  "div",
2934
2940
  {
2935
2941
  className: `notification-portal ${t != null && t.length ? "w-screen h-screen" : ""}`,
2936
- children: t != null && t.length ? t == null ? void 0 : t.map(({ id: y, type: m, message: v }, C) => /* @__PURE__ */ A(
2942
+ children: t != null && t.length ? t == null ? void 0 : t.map(({ id: y, type: f, message: w }, C) => /* @__PURE__ */ A(
2937
2943
  "div",
2938
2944
  {
2939
- className: `notification ${r.has(C) ? "closing" : ""} ${u(
2940
- m ?? Q.error
2945
+ className: `notification ${n.has(C) ? "closing" : ""} ${d(
2946
+ f ?? Q.error
2941
2947
  )}`,
2942
2948
  onClick: (g) => g.stopPropagation(),
2943
2949
  children: [
@@ -2945,32 +2951,32 @@ function $n() {
2945
2951
  /* @__PURE__ */ h(
2946
2952
  ce,
2947
2953
  {
2948
- icon: c(m ?? Q.error),
2949
- className: `${a(m ?? Q.error)}`
2954
+ icon: c(f ?? Q.error),
2955
+ className: `${a(f ?? Q.error)}`
2950
2956
  }
2951
2957
  ),
2952
2958
  /* @__PURE__ */ h(
2953
2959
  "p",
2954
2960
  {
2955
2961
  className: `whitespace-nowrap ${a(
2956
- m ?? Q.error
2962
+ f ?? Q.error
2957
2963
  )}`,
2958
- children: v
2964
+ children: w
2959
2965
  }
2960
2966
  )
2961
2967
  ] }),
2962
2968
  /* @__PURE__ */ h(
2963
- pe,
2969
+ be,
2964
2970
  {
2965
2971
  type: "button",
2966
2972
  icon: Rt,
2967
2973
  color: "error",
2968
2974
  className: "group",
2969
2975
  onClick: (g) => {
2970
- g.stopPropagation(), n(C);
2976
+ g.stopPropagation(), r(C);
2971
2977
  },
2972
2978
  iconClassName: `${a(
2973
- m ?? Q.error
2979
+ f ?? Q.error
2974
2980
  )} group-hover:!text-red-400 cursor-pointer`,
2975
2981
  name: e("_accessibility:buttons.closeNotification"),
2976
2982
  "aria-label": e("_accessibility:ariaLabels.closeNotification")
@@ -2989,42 +2995,42 @@ function Fn() {
2989
2995
  return /* @__PURE__ */ h("div", { className: "w-screen h-screen flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ h(Ve, { className: "blur-appear" }) });
2990
2996
  }
2991
2997
  const Mr = (e) => {
2992
- const { id: t, active: s, onClick: r, children: i, to: n } = e, { linkComponent: c } = ze();
2998
+ const { id: t, active: s, onClick: n, children: i, to: r } = e, { linkComponent: c } = ze();
2993
2999
  return /* @__PURE__ */ h(
2994
3000
  c,
2995
3001
  {
2996
- to: n ?? `#${t}`,
2997
- onClick: () => r(),
3002
+ to: r ?? `#${t}`,
3003
+ onClick: () => n(),
2998
3004
  className: `button submit tab ${s ? "primary" : "outlined"}`,
2999
3005
  children: i
3000
3006
  }
3001
3007
  );
3002
3008
  }, Ir = (e) => {
3003
- var u;
3009
+ var d;
3004
3010
  const {
3005
3011
  tabs: t = [],
3006
3012
  defaultTab: s,
3007
- className: r = "",
3013
+ className: n = "",
3008
3014
  tabsContainerClassName: i = ""
3009
- } = e, [n, c] = B((u = t[0]) == null ? void 0 : u.id), a = ke(() => t.find((f) => f.id === n), [t, n]);
3015
+ } = e, [r, c] = B((d = t[0]) == null ? void 0 : d.id), a = ke(() => t.find((m) => m.id === r), [t, r]);
3010
3016
  return Z(() => {
3011
3017
  s && c(s);
3012
- }, [s]), /* @__PURE__ */ A("div", { className: `tabs-layout-main ${r}`, children: [
3018
+ }, [s]), /* @__PURE__ */ A("div", { className: `tabs-layout-main ${n}`, children: [
3013
3019
  /* @__PURE__ */ h(
3014
3020
  "ul",
3015
3021
  {
3016
3022
  className: `horizontal tabs tabs-container ${i}`,
3017
- children: t.map(({ id: f, to: p, label: y }) => /* @__PURE__ */ h("li", { children: /* @__PURE__ */ h(
3023
+ children: t.map(({ id: m, to: b, label: y }) => /* @__PURE__ */ h("li", { children: /* @__PURE__ */ h(
3018
3024
  Mr,
3019
3025
  {
3020
- onClick: () => c(f),
3021
- id: f,
3022
- to: p ?? "",
3026
+ onClick: () => c(m),
3027
+ id: m,
3028
+ to: b ?? "",
3023
3029
  siblings: t.length > 1,
3024
- active: n === f,
3030
+ active: r === m,
3025
3031
  children: y
3026
3032
  }
3027
- ) }, f))
3033
+ ) }, m))
3028
3034
  }
3029
3035
  ),
3030
3036
  a == null ? void 0 : a.content
@@ -3033,15 +3039,15 @@ const Mr = (e) => {
3033
3039
  const {
3034
3040
  translation: t,
3035
3041
  onClickNext: s,
3036
- image: r = "",
3042
+ image: n = "",
3037
3043
  alt: i = "",
3038
- final: n = !1
3044
+ final: r = !1
3039
3045
  } = e, { setGuestMode: c } = Jt(), { t: a } = T();
3040
3046
  return /* @__PURE__ */ A("div", { className: "big-appear w-md flex flex-col gap-20", children: [
3041
- /* @__PURE__ */ h("img", { src: r, alt: i }),
3047
+ /* @__PURE__ */ h("img", { src: n, alt: i }),
3042
3048
  /* @__PURE__ */ h("h2", { className: "text-5xl text-center leading-16", children: a(`_pages:onboarding.${t}.title`) }),
3043
3049
  /* @__PURE__ */ h("p", { className: "text-center !text-lg", children: a(`_pages:onboarding.${t}.body`) }),
3044
- /* @__PURE__ */ h("div", { className: "flex gap-5 items-center justify-center", children: n ? /* @__PURE__ */ A(De, { children: [
3050
+ /* @__PURE__ */ h("div", { className: "flex gap-5 items-center justify-center", children: r ? /* @__PURE__ */ A(De, { children: [
3045
3051
  /* @__PURE__ */ h(
3046
3052
  xe,
3047
3053
  {
@@ -3092,15 +3098,15 @@ const Mr = (e) => {
3092
3098
  ] }) })
3093
3099
  ] });
3094
3100
  }, Ln = (e) => {
3095
- const { steps: t } = e, [s, r] = B(1), i = ke(() => t.map((n, c) => ({
3101
+ const { steps: t } = e, [s, n] = B(1), i = ke(() => t.map((r, c) => ({
3096
3102
  id: c + 1,
3097
3103
  label: "",
3098
3104
  content: /* @__PURE__ */ h(
3099
3105
  Or,
3100
3106
  {
3101
- translation: n,
3107
+ translation: r,
3102
3108
  final: c === t.length - 1,
3103
- onClickNext: () => r(s + 1)
3109
+ onClickNext: () => n(s + 1)
3104
3110
  }
3105
3111
  )
3106
3112
  })), [s]);
@@ -3109,19 +3115,19 @@ const Mr = (e) => {
3109
3115
  const {
3110
3116
  message: t,
3111
3117
  messageProps: s = { className: "text-gray-400 text-balance text-center" },
3112
- action: r,
3118
+ action: n,
3113
3119
  iconProps: i
3114
3120
  } = e;
3115
3121
  return /* @__PURE__ */ A("div", { className: "flex flex-col items-center justify-center gap-5 pt-5", children: [
3116
3122
  i && /* @__PURE__ */ h(ce, { ...i ?? {} }),
3117
3123
  /* @__PURE__ */ h("p", { ...s ?? {}, children: t }),
3118
- r && /* @__PURE__ */ h(Bt, { showTooltips: !1, showText: !0, ...r })
3124
+ n && /* @__PURE__ */ h(Bt, { showTooltips: !1, showText: !0, ...n })
3119
3125
  ] });
3120
3126
  };
3121
3127
  export {
3122
3128
  Qt as APIClient,
3123
3129
  Bt as Action,
3124
- jt as Actions,
3130
+ Ht as Actions,
3125
3131
  Fr as ActionsDropdown,
3126
3132
  Xs as AuthClient,
3127
3133
  on as AuthProvider,
@@ -3141,7 +3147,7 @@ export {
3141
3147
  xn as FormDialog,
3142
3148
  _e as GlobalActions,
3143
3149
  Zr as IManager,
3144
- pe as IconButton,
3150
+ be as IconButton,
3145
3151
  Cn as ImportDialog,
3146
3152
  an as ManagerProvider,
3147
3153
  ne as Methods,
@@ -3151,14 +3157,14 @@ export {
3151
3157
  nn as NotificationProvider,
3152
3158
  Ln as Onboarding,
3153
3159
  Nn as Page,
3154
- bn as ParagraphInput,
3160
+ pn as ParagraphInput,
3155
3161
  vn as PasswordInput,
3156
3162
  An as PrettyGrid,
3157
3163
  Fn as SplashScreen,
3158
3164
  Or as Step,
3159
3165
  Mr as Tab,
3160
3166
  Ir as TabsLayout,
3161
- pn as ToTop,
3167
+ bn as ToTop,
3162
3168
  Ys as buildQueryUrl,
3163
3169
  tn as enumToKeyValueArray,
3164
3170
  sn as formatForDatetimeLocal,
@@ -3170,8 +3176,8 @@ export {
3170
3176
  Ke as isValidationError,
3171
3177
  Ee as makeRequest,
3172
3178
  rn as mapValidationErrors,
3173
- Ht as parseQueries,
3174
- be as queryClient,
3179
+ jt as parseQueries,
3180
+ pe as queryClient,
3175
3181
  Ct as removeFromLocal,
3176
3182
  _t as toLocal,
3177
3183
  Jt as useAuth,