@sito/dashboard-app 0.0.42 → 0.0.43

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.
@@ -18,13 +18,13 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
18
18
  defaultValue: n,
19
19
  onChange: i,
20
20
  state: r = Cs.default,
21
- name: o = "",
21
+ name: a = "",
22
22
  id: c = "",
23
- label: u = "",
23
+ label: l = "",
24
24
  disabled: m = !1,
25
- required: h = !1,
26
- containerClassName: y = "",
27
- inputClassName: f = "",
25
+ required: y = !1,
26
+ containerClassName: h = "",
27
+ inputClassName: d = "",
28
28
  labelClassName: p = "",
29
29
  helperText: _ = "",
30
30
  helperTextClassName: C = "",
@@ -34,15 +34,15 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
34
34
  ), x = B ? Ct(s) : N, A = (I) => {
35
35
  B || $(I.currentTarget.value.length > 0), i == null || i(I);
36
36
  };
37
- return /* @__PURE__ */ T("div", { className: `form-paragraph-container group ${y}`, children: [
37
+ return /* @__PURE__ */ T("div", { className: `form-paragraph-container group ${h}`, children: [
38
38
  /* @__PURE__ */ g(
39
39
  "textarea",
40
40
  {
41
41
  ref: t,
42
- name: o,
42
+ name: a,
43
43
  id: c,
44
- className: `text-input text-area form-paragraph-textarea peer ${Es(r)} ${x ? "has-value" : ""} ${k.placeholder ? "has-placeholder" : ""} ${f}`,
45
- required: h,
44
+ className: `text-input text-area form-paragraph-textarea peer ${Es(r)} ${x ? "has-value" : ""} ${k.placeholder ? "has-placeholder" : ""} ${d}`,
45
+ required: y,
46
46
  defaultValue: n,
47
47
  ...B ? { value: s } : {},
48
48
  onChange: A,
@@ -56,8 +56,8 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
56
56
  htmlFor: c,
57
57
  className: `text-input-label ${ks(r)} ${p}`,
58
58
  children: [
59
- u,
60
- h ? " *" : ""
59
+ l,
60
+ y ? " *" : ""
61
61
  ]
62
62
  }
63
63
  ),
@@ -75,12 +75,12 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
75
75
  handleSubmit: n,
76
76
  onSubmit: i,
77
77
  isLoading: r = !1,
78
- buttonEnd: o = !0,
78
+ buttonEnd: a = !0,
79
79
  reset: c
80
80
  } = e;
81
81
  return /* @__PURE__ */ T("form", { className: "form-container", onSubmit: n(i), children: [
82
82
  s,
83
- /* @__PURE__ */ T("div", { className: `form-actions ${o ? "end" : ""}`, children: [
83
+ /* @__PURE__ */ T("div", { className: `form-actions ${a ? "end" : ""}`, children: [
84
84
  /* @__PURE__ */ T(
85
85
  we,
86
86
  {
@@ -130,30 +130,30 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
130
130
  children: n,
131
131
  handleClose: i,
132
132
  open: r = !1,
133
- containerClassName: o = "",
133
+ containerClassName: a = "",
134
134
  className: c = "",
135
- animationClass: u = "appear"
135
+ animationClass: l = "appear"
136
136
  } = e, m = D(
137
- (y) => {
138
- y.key === "Escape" && r && i();
137
+ (h) => {
138
+ h.key === "Escape" && r && i();
139
139
  },
140
140
  [r, i]
141
141
  );
142
142
  le(() => (window.addEventListener("keydown", m), () => {
143
143
  window.removeEventListener("keydown", m);
144
144
  }), [m]);
145
- const h = D(
146
- (y) => {
147
- y.target === y.currentTarget && i();
145
+ const y = D(
146
+ (h) => {
147
+ h.target === h.currentTarget && i();
148
148
  },
149
149
  [i]
150
150
  );
151
151
  return le(() => {
152
- const y = (f) => {
153
- f ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
152
+ const h = (d) => {
153
+ d ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
154
154
  };
155
- return y(r), () => {
156
- y(!1);
155
+ return h(r), () => {
156
+ h(!1);
157
157
  };
158
158
  }, [r]), Kt(
159
159
  /* @__PURE__ */ g(
@@ -161,12 +161,12 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
161
161
  {
162
162
  "aria-label": t("_accessibility:ariaLabels.closeDialog"),
163
163
  "aria-hidden": !r,
164
- onClick: h,
165
- className: `dialog-backdrop animated ${r ? `opened ${u}` : "closed"} ${o}`,
164
+ onClick: y,
165
+ className: `dialog-backdrop animated ${r ? `opened ${l}` : "closed"} ${a}`,
166
166
  children: /* @__PURE__ */ T(
167
167
  "div",
168
168
  {
169
- className: `dialog elevated animated ${r ? `opened ${u}` : "closed"} ${c}`,
169
+ className: `dialog elevated animated ${r ? `opened ${l}` : "closed"} ${c}`,
170
170
  children: [
171
171
  /* @__PURE__ */ T("div", { className: "dialog-header", children: [
172
172
  /* @__PURE__ */ g("h3", { className: "dialog-title", children: s }),
@@ -198,20 +198,20 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
198
198
  onPrimaryClick: n,
199
199
  onCancel: i,
200
200
  isLoading: r = !1,
201
- disabled: o = !1,
201
+ disabled: a = !1,
202
202
  primaryType: c = "submit",
203
- containerClassName: u = "",
203
+ containerClassName: l = "",
204
204
  primaryClassName: m = "",
205
- alignEnd: h = !1,
206
- primaryName: y,
207
- primaryAriaLabel: f,
205
+ alignEnd: y = !1,
206
+ primaryName: h,
207
+ primaryAriaLabel: d,
208
208
  cancelName: p,
209
209
  cancelAriaLabel: _
210
210
  } = e;
211
211
  return /* @__PURE__ */ T(
212
212
  "div",
213
213
  {
214
- className: `dialog-actions ${h ? "end" : ""} ${u}`,
214
+ className: `dialog-actions ${y ? "end" : ""} ${l}`,
215
215
  children: [
216
216
  /* @__PURE__ */ T(
217
217
  we,
@@ -220,10 +220,10 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
220
220
  color: "primary",
221
221
  variant: "submit",
222
222
  className: m,
223
- disabled: o,
223
+ disabled: a,
224
224
  onClick: n,
225
- name: y,
226
- "aria-label": f,
225
+ name: h,
226
+ "aria-label": d,
227
227
  children: [
228
228
  r ? /* @__PURE__ */ g(xe, { color: "stroke-base", loaderClass: "!w-6 mt-1", strokeWidth: "6" }) : null,
229
229
  t
@@ -235,7 +235,7 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
235
235
  {
236
236
  type: "button",
237
237
  variant: "outlined",
238
- disabled: o,
238
+ disabled: a,
239
239
  onClick: i,
240
240
  name: p,
241
241
  "aria-label": _,
@@ -251,11 +251,11 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
251
251
  handleSubmit: n,
252
252
  onSubmit: i,
253
253
  handleClose: r,
254
- isLoading: o = !1,
254
+ isLoading: a = !1,
255
255
  buttonEnd: c = !0,
256
- ...u
256
+ ...l
257
257
  } = e;
258
- return /* @__PURE__ */ g(at, { ...u, handleClose: r, children: /* @__PURE__ */ T("form", { onSubmit: n(i), children: [
258
+ return /* @__PURE__ */ g(at, { ...l, handleClose: r, children: /* @__PURE__ */ T("form", { onSubmit: n(i), children: [
259
259
  /* @__PURE__ */ g("div", { className: "form-container", children: s }),
260
260
  /* @__PURE__ */ g(
261
261
  ot,
@@ -264,8 +264,8 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
264
264
  primaryText: t("_accessibility:buttons.submit"),
265
265
  cancelText: t("_accessibility:buttons.cancel"),
266
266
  onCancel: r,
267
- isLoading: o,
268
- disabled: o,
267
+ isLoading: a,
268
+ disabled: a,
269
269
  primaryClassName: "dialog-form-primary",
270
270
  alignEnd: c,
271
271
  primaryName: t("_accessibility:buttons.submit"),
@@ -281,9 +281,9 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
281
281
  handleSubmit: n,
282
282
  handleClose: i,
283
283
  isLoading: r = !1,
284
- ...o
284
+ ...a
285
285
  } = e;
286
- return /* @__PURE__ */ T(at, { ...o, handleClose: i, children: [
286
+ return /* @__PURE__ */ T(at, { ...a, handleClose: i, children: [
287
287
  s,
288
288
  /* @__PURE__ */ g(
289
289
  ot,
@@ -361,49 +361,49 @@ const un = (e) => {
361
361
  handleSubmit: n,
362
362
  handleClose: i,
363
363
  isLoading: r = !1,
364
- fileProcessor: o,
364
+ fileProcessor: a,
365
365
  onFileProcessed: c,
366
- onOverrideChange: u,
366
+ onOverrideChange: l,
367
367
  open: m,
368
- ...h
369
- } = e, [y, f] = qt(sr, jt()), { file: p, previewItems: _, parseError: C, processing: k, overrideExisting: B, inputKey: N } = y, $ = Ie(c), x = Ie(o);
368
+ ...y
369
+ } = e, [h, d] = qt(sr, jt()), { file: p, previewItems: _, parseError: C, processing: k, overrideExisting: B, inputKey: N } = h, $ = Ie(c), x = Ie(a);
370
370
  le(() => {
371
371
  $.current = c;
372
372
  }, [c]), le(() => {
373
- x.current = o;
374
- }, [o]), le(() => {
375
- m || f({ type: "RESET" });
373
+ x.current = a;
374
+ }, [a]), le(() => {
375
+ m || d({ type: "RESET" });
376
376
  }, [m]);
377
377
  const A = D(async (I, M) => {
378
378
  var se;
379
379
  if (x.current) {
380
- f({ type: "START_PROCESSING" });
380
+ d({ type: "START_PROCESSING" });
381
381
  try {
382
382
  const P = await x.current(I, { override: M });
383
- f({ type: "SET_PREVIEW", items: P ?? [] }), (se = $.current) == null || se.call($, P ?? []);
383
+ d({ type: "SET_PREVIEW", items: P ?? [] }), (se = $.current) == null || se.call($, P ?? []);
384
384
  } catch (P) {
385
385
  console.error(P);
386
386
  const re = P instanceof Error ? P.message : "Failed to parse file";
387
- f({ type: "SET_ERROR", message: re });
387
+ d({ type: "SET_ERROR", message: re });
388
388
  }
389
389
  }
390
390
  }, []);
391
- return /* @__PURE__ */ T(at, { ...h, open: m, handleClose: i, children: [
391
+ return /* @__PURE__ */ T(at, { ...y, open: m, handleClose: i, children: [
392
392
  /* @__PURE__ */ g(
393
393
  xs,
394
394
  {
395
395
  onClear: () => {
396
396
  var I;
397
- f({ type: "SET_FILE", file: null }), (I = $.current) == null || I.call($, []);
397
+ d({ type: "SET_FILE", file: null }), (I = $.current) == null || I.call($, []);
398
398
  },
399
399
  onChange: (I) => {
400
400
  var se, P;
401
401
  const M = (se = I.target.files) == null ? void 0 : se[0];
402
402
  if (!M) {
403
- f({ type: "SET_FILE", file: null }), (P = $.current) == null || P.call($, []);
403
+ d({ type: "SET_FILE", file: null }), (P = $.current) == null || P.call($, []);
404
404
  return;
405
405
  }
406
- f({ type: "SET_FILE", file: M }), A(M, B);
406
+ d({ type: "SET_FILE", file: M }), A(M, B);
407
407
  },
408
408
  label: t("_accessibility:labels.file")
409
409
  },
@@ -417,7 +417,7 @@ const un = (e) => {
417
417
  checked: B,
418
418
  onChange: (I) => {
419
419
  const M = I.target.checked;
420
- f({ type: "SET_OVERRIDE", value: M }), u == null || u(M), p && A(p, M);
420
+ d({ type: "SET_OVERRIDE", value: M }), l == null || l(M), p && A(p, M);
421
421
  }
422
422
  }
423
423
  ),
@@ -435,7 +435,7 @@ const un = (e) => {
435
435
  primaryText: t("_accessibility:buttons.ok"),
436
436
  cancelText: t("_accessibility:buttons.cancel"),
437
437
  onPrimaryClick: () => {
438
- (!o || !!_ && _.length > 0) && n();
438
+ (!a || !!_ && _.length > 0) && n();
439
439
  },
440
440
  onCancel: i,
441
441
  isLoading: r,
@@ -460,21 +460,21 @@ async function Te(e, t = "GET", s, n) {
460
460
  method: t,
461
461
  headers: i,
462
462
  ...s ? { body: JSON.stringify(s) } : {}
463
- }), o = await r.text();
463
+ }), a = await r.text();
464
464
  let c = null;
465
465
  try {
466
- c = o ? JSON.parse(o) : null;
466
+ c = a ? JSON.parse(a) : null;
467
467
  } catch {
468
468
  c = null;
469
469
  }
470
470
  if (!r.ok) {
471
- const u = typeof c == "object" && c !== null ? c.message ?? c.error ?? o : o || r.statusText;
471
+ const l = typeof c == "object" && c !== null ? c.message ?? c.error ?? a : a || r.statusText;
472
472
  return {
473
473
  data: null,
474
474
  status: r.status,
475
475
  error: {
476
476
  status: r.status,
477
- message: u || "Unknown error occurred"
477
+ message: l || "Unknown error occurred"
478
478
  }
479
479
  };
480
480
  }
@@ -506,25 +506,25 @@ function rr(e, t) {
506
506
  const Wt = (e, t, s) => {
507
507
  const n = [];
508
508
  if (t) {
509
- const { sortingBy: i, sortingOrder: r, currentPage: o, pageSize: c } = t;
509
+ const { sortingBy: i, sortingOrder: r, currentPage: a, pageSize: c } = t;
510
510
  n.push(
511
511
  `sort=${String(i)}`,
512
512
  `order=${r}`,
513
- `page=${o}`,
513
+ `page=${a}`,
514
514
  `pageSize=${c}`
515
515
  );
516
516
  }
517
517
  if (s) {
518
518
  const i = Object.entries(s).filter(
519
519
  ([, r]) => r != null && r !== ""
520
- ).flatMap(([r, o]) => {
521
- if (Array.isArray(o))
522
- return o.map((c) => `${r}==${encodeURIComponent((c == null ? void 0 : c.id) ?? c)}`);
523
- if (typeof o == "object" && o !== null && "start" in o && "end" in o) {
520
+ ).flatMap(([r, a]) => {
521
+ if (Array.isArray(a))
522
+ return a.map((c) => `${r}==${encodeURIComponent((c == null ? void 0 : c.id) ?? c)}`);
523
+ if (typeof a == "object" && a !== null && "start" in a && "end" in a) {
524
524
  const c = [];
525
- return o.start != null && o.start !== "" && c.push(`${r}>=${encodeURIComponent(o.start)}`), o.end != null && o.end !== "" && c.push(`${r}<=${encodeURIComponent(o.end)}`), c;
525
+ return a.start != null && a.start !== "" && c.push(`${r}>=${encodeURIComponent(a.start)}`), a.end != null && a.end !== "" && c.push(`${r}<=${encodeURIComponent(a.end)}`), c;
526
526
  }
527
- return typeof o == "object" && o !== null ? `${r}==${encodeURIComponent(o.id ?? "")}` : `${r}==${encodeURIComponent(o)}`;
527
+ return typeof a == "object" && a !== null ? `${r}==${encodeURIComponent(a.id ?? "")}` : `${r}==${encodeURIComponent(a)}`;
528
528
  });
529
529
  i.length > 0 && n.push(`filters=${i.join(",")}`);
530
530
  }
@@ -551,7 +551,7 @@ class Gt {
551
551
  return { Authorization: `Bearer ${s}` };
552
552
  }
553
553
  async doQuery(t, s = te.GET, n, i) {
554
- const r = this.secured ? this.tokenAcquirer() : {}, { data: o, status: c, error: u } = await Te(
554
+ const r = this.secured ? this.tokenAcquirer() : {}, { data: a, status: c, error: l } = await Te(
555
555
  `${this.baseUrl}${t}`,
556
556
  s,
557
557
  n,
@@ -560,12 +560,12 @@ class Gt {
560
560
  ...i ?? {}
561
561
  }
562
562
  );
563
- if (u || c < 200 || c >= 300)
564
- throw u ?? {
563
+ if (l || c < 200 || c >= 300)
564
+ throw l ?? {
565
565
  status: c,
566
566
  message: String(c)
567
567
  };
568
- return o;
568
+ return a;
569
569
  }
570
570
  /**
571
571
  * @description Get all objects
@@ -574,14 +574,14 @@ class Gt {
574
574
  * @returns Result list
575
575
  */
576
576
  async get(t, s, n) {
577
- const i = Wt(t, s, n), r = this.secured ? this.tokenAcquirer() : void 0, { data: o, error: c } = await Te(
577
+ const i = Wt(t, s, n), r = this.secured ? this.tokenAcquirer() : void 0, { data: a, error: c } = await Te(
578
578
  `${this.baseUrl}${i}`,
579
579
  te.GET,
580
580
  null,
581
581
  r
582
582
  );
583
583
  if (c) throw c;
584
- return o;
584
+ return a;
585
585
  }
586
586
  /**
587
587
  * @description Get entity by id
@@ -590,7 +590,7 @@ class Gt {
590
590
  * @returns updated entity
591
591
  */
592
592
  async patch(t, s) {
593
- const n = this.secured ? this.tokenAcquirer() : void 0, { error: i, data: r, status: o } = await Te(
593
+ const n = this.secured ? this.tokenAcquirer() : void 0, { error: i, data: r, status: a } = await Te(
594
594
  `${this.baseUrl}${t}`,
595
595
  te.PATCH,
596
596
  s,
@@ -598,7 +598,7 @@ class Gt {
598
598
  );
599
599
  if (i || !r)
600
600
  throw i ?? {
601
- status: o,
601
+ status: a,
602
602
  message: "Unknown error"
603
603
  };
604
604
  return r;
@@ -609,7 +609,7 @@ class Gt {
609
609
  * @returns delete result
610
610
  */
611
611
  async delete(t, s) {
612
- const n = this.secured ? this.tokenAcquirer() : void 0, { error: i, data: r, status: o } = await Te(
612
+ const n = this.secured ? this.tokenAcquirer() : void 0, { error: i, data: r, status: a } = await Te(
613
613
  `${this.baseUrl}${t}`,
614
614
  te.DELETE,
615
615
  s,
@@ -617,7 +617,7 @@ class Gt {
617
617
  );
618
618
  if (i || !r)
619
619
  throw i ?? {
620
- status: o,
620
+ status: a,
621
621
  message: "Unknown error"
622
622
  };
623
623
  return r;
@@ -629,7 +629,7 @@ class Gt {
629
629
  * @returns inserted item
630
630
  */
631
631
  async post(t, s) {
632
- const n = this.secured ? this.tokenAcquirer() : void 0, { error: i, data: r, status: o } = await Te(
632
+ const n = this.secured ? this.tokenAcquirer() : void 0, { error: i, data: r, status: a } = await Te(
633
633
  `${this.baseUrl}${t}`,
634
634
  te.POST,
635
635
  s,
@@ -637,7 +637,7 @@ class Gt {
637
637
  );
638
638
  if (i || !r)
639
639
  throw i ?? {
640
- status: o,
640
+ status: a,
641
641
  message: "Unknown error"
642
642
  };
643
643
  return r;
@@ -834,12 +834,12 @@ function Nt(e) {
834
834
  );
835
835
  }
836
836
  function ir(e) {
837
- 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"), o = String(t.getMinutes()).padStart(2, "0");
838
- return `${s}/${n}/${i} ${r}:${o}`;
837
+ 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"), a = String(t.getMinutes()).padStart(2, "0");
838
+ return `${s}/${n}/${i} ${r}:${a}`;
839
839
  }
840
840
  function hn(e) {
841
- 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"), o = String(t.getMinutes()).padStart(2, "0");
842
- return `${s}-${n}-${i}T${r}:${o}`;
841
+ 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"), a = String(t.getMinutes()).padStart(2, "0");
842
+ return `${s}-${n}-${i}T${r}:${a}`;
843
843
  }
844
844
  const ar = () => {
845
845
  var s;
@@ -864,35 +864,35 @@ function yn(e, t) {
864
864
  const zt = Pe({});
865
865
  function gn(e) {
866
866
  const { children: t } = e, s = Ie(0), [n, i] = qt(
867
- (y, f) => {
868
- const { type: p, items: _, id: C } = f;
867
+ (h, d) => {
868
+ const { type: p, items: _, id: C } = d;
869
869
  switch (p) {
870
870
  case "set":
871
871
  return _ ?? [];
872
872
  case "remove":
873
- return C !== void 0 ? y.filter((k) => k.id !== C) : [];
873
+ return C !== void 0 ? h.filter((k) => k.id !== C) : [];
874
874
  }
875
- return y;
875
+ return h;
876
876
  },
877
877
  [],
878
878
  () => []
879
- ), r = (y) => y.map((f) => ({ ...f, id: s.current++ })), o = (y) => i({
879
+ ), r = (h) => h.map((d) => ({ ...d, id: s.current++ })), a = (h) => i({
880
880
  type: "set",
881
- items: r([{ ...y, type: J.error }])
882
- }), c = (y) => i({ type: "set", items: r([{ ...y }]) }), u = (y) => i({ type: "set", items: r(y) }), m = (y) => i({
881
+ items: r([{ ...h, type: J.error }])
882
+ }), c = (h) => i({ type: "set", items: r([{ ...h }]) }), l = (h) => i({ type: "set", items: r(h) }), m = (h) => i({
883
883
  type: "set",
884
- items: r([{ ...y, type: J.success }])
885
- }), h = (y) => i({ type: "remove", id: y });
884
+ items: r([{ ...h, type: J.success }])
885
+ }), y = (h) => i({ type: "remove", id: h });
886
886
  return /* @__PURE__ */ g(
887
887
  zt.Provider,
888
888
  {
889
889
  value: {
890
890
  notification: n,
891
- removeNotification: h,
892
- showErrorNotification: o,
891
+ removeNotification: y,
892
+ showErrorNotification: a,
893
893
  showNotification: c,
894
894
  showSuccessNotification: m,
895
- showStackNotifications: u
895
+ showStackNotifications: l
896
896
  },
897
897
  children: t
898
898
  }
@@ -928,33 +928,33 @@ const ke = () => {
928
928
  }, Xt = Pe(
929
929
  void 0
930
930
  ), bn = (e) => {
931
- const { children: t, guestMode: s = "guest_mode", user: n = "user" } = e, i = or(), [r, o] = X({}), c = D(() => !!Jt(s, "boolean") && r.token === void 0, [r.token, s]), u = D((p) => {
931
+ const { children: t, guestMode: s = "guest_mode", user: n = "user" } = e, i = or(), [r, a] = X({}), c = D(() => !!Jt(s, "boolean") && r.token === void 0, [r.token, s]), l = D((p) => {
932
932
  Et(s, p);
933
933
  }, [s]), m = D((p) => {
934
- p && (o(p), kt(s), Et(n, p.token));
935
- }, [s, n]), h = D(async () => {
934
+ p && (a(p), kt(s), Et(n, p.token));
935
+ }, [s, n]), y = D(async () => {
936
936
  try {
937
937
  await i.Auth.logout();
938
938
  } catch (p) {
939
939
  console.error(p);
940
940
  }
941
- o({}), kt(n);
942
- }, [i.Auth, n]), y = D(async () => {
941
+ a({}), kt(n);
942
+ }, [i.Auth, n]), h = D(async () => {
943
943
  try {
944
944
  const p = await i.Auth.getSession();
945
945
  m(p);
946
946
  } catch (p) {
947
- console.error(p), h();
947
+ console.error(p), y();
948
948
  }
949
- }, [m, h, i.Auth]), f = {
949
+ }, [m, y, i.Auth]), d = {
950
950
  account: r,
951
951
  logUser: m,
952
- logoutUser: h,
953
- logUserFromLocal: y,
952
+ logoutUser: y,
953
+ logUserFromLocal: h,
954
954
  isInGuestMode: c,
955
- setGuestMode: u
955
+ setGuestMode: l
956
956
  };
957
- return /* @__PURE__ */ g(Xt.Provider, { value: f, children: t });
957
+ return /* @__PURE__ */ g(Xt.Provider, { value: d, children: t });
958
958
  }, Zt = () => {
959
959
  const e = Oe(Xt);
960
960
  if (!e)
@@ -978,48 +978,48 @@ const ke = () => {
978
978
  return e;
979
979
  }, ts = Pe({}), wn = (e) => {
980
980
  const { children: t } = e, [s, n] = X({}), i = D(
981
- (u, m) => n((h) => ({
982
- ...h,
983
- [u]: [...h[u] ?? [], m]
981
+ (l, m) => n((y) => ({
982
+ ...y,
983
+ [l]: [...y[l] ?? [], m]
984
984
  })),
985
985
  []
986
986
  ), r = D(
987
- (u, m) => n((h) => ({
988
- ...h,
989
- [u]: (h[u] ?? []).filter((y, f) => f !== m)
987
+ (l, m) => n((y) => ({
988
+ ...y,
989
+ [l]: (y[l] ?? []).filter((h, d) => d !== m)
990
990
  })),
991
991
  []
992
- ), o = D((u) => {
993
- n(u ? (m) => ({
992
+ ), a = D((l) => {
993
+ n(l ? (m) => ({
994
994
  ...m,
995
- [u]: []
995
+ [l]: []
996
996
  }) : {});
997
997
  }, []), c = Ae(
998
998
  () => ({
999
999
  dynamicItems: s,
1000
1000
  addChildItem: i,
1001
1001
  removeChildItem: r,
1002
- clearDynamicItems: o
1002
+ clearDynamicItems: a
1003
1003
  }),
1004
- [s, o, r, i]
1004
+ [s, a, r, i]
1005
1005
  );
1006
1006
  return /* @__PURE__ */ g(ts.Provider, { value: c, children: t });
1007
1007
  }, cr = () => Oe(
1008
1008
  ts
1009
1009
  );
1010
1010
  function _n(e) {
1011
- const { t } = V(), { open: s, onClose: n, menuMap: i, logo: r } = e, { account: o } = Zt(), { dynamicItems: c } = cr(), { linkComponent: u, location: m } = Re(), h = u, y = Ae(() => i.filter((k) => {
1012
- const B = k.auth, N = !!(o != null && o.email);
1011
+ const { t } = V(), { open: s, onClose: n, menuMap: i, logo: r } = e, { account: a } = Zt(), { dynamicItems: c } = cr(), { linkComponent: l, location: m } = Re(), y = l, h = Ae(() => i.filter((k) => {
1012
+ const B = k.auth, N = !!(a != null && a.email);
1013
1013
  return B == null || B && N || !B && !N;
1014
- }), [o == null ? void 0 : o.email, i]), f = D(
1014
+ }), [a == null ? void 0 : a.email, i]), d = D(
1015
1015
  (k) => {
1016
1016
  k.key === "Escape" && s && n();
1017
1017
  },
1018
1018
  [n, s]
1019
1019
  );
1020
- le(() => (document.addEventListener("keydown", f), () => {
1021
- document.removeEventListener("keydown", f);
1022
- }), [f]);
1020
+ le(() => (document.addEventListener("keydown", d), () => {
1021
+ document.removeEventListener("keydown", d);
1022
+ }), [d]);
1023
1023
  const p = D(
1024
1024
  (k, B) => B ? k === `${m.pathname}${m.search}` : k === m.pathname,
1025
1025
  [m.pathname, m.search]
@@ -1029,7 +1029,7 @@ function _n(e) {
1029
1029
  {
1030
1030
  className: `drawer-list-item-child ${p(k.path, !0) ? "active" : ""} animated`,
1031
1031
  children: k.path ? /* @__PURE__ */ g(
1032
- h,
1032
+ y,
1033
1033
  {
1034
1034
  tabIndex: s ? 0 : -1,
1035
1035
  to: k.path ?? "/",
@@ -1043,15 +1043,15 @@ function _n(e) {
1043
1043
  },
1044
1044
  k.id
1045
1045
  ),
1046
- [h, s, t, p]
1047
- ), C = Ae(() => y.map((k, B) => {
1046
+ [y, s, t, p]
1047
+ ), C = Ae(() => h.map((k, B) => {
1048
1048
  const N = k.page ?? String(B), $ = `drawer-list-item ${p(k.path) ? "active" : ""} animated`;
1049
1049
  if (k.type === "divider")
1050
1050
  return /* @__PURE__ */ g("li", { className: $, children: /* @__PURE__ */ g("hr", { className: "drawer-divider" }) }, N);
1051
1051
  const x = k.children ?? (k.page && c ? c[k.page] : null);
1052
1052
  return /* @__PURE__ */ T("li", { className: $, children: [
1053
1053
  /* @__PURE__ */ T(
1054
- h,
1054
+ y,
1055
1055
  {
1056
1056
  tabIndex: s ? 0 : -1,
1057
1057
  to: k.path ?? "/",
@@ -1067,7 +1067,7 @@ function _n(e) {
1067
1067
  ),
1068
1068
  x && /* @__PURE__ */ g("ul", { className: "drawer-children-list", children: x.map(_) })
1069
1069
  ] }, N);
1070
- }), [h, c, p, s, y, _, t]);
1070
+ }), [y, c, p, s, h, _, t]);
1071
1071
  return /* @__PURE__ */ g(
1072
1072
  "div",
1073
1073
  {
@@ -1097,8 +1097,8 @@ function Cn() {
1097
1097
  const { t: e, language: t } = V();
1098
1098
  return { timeAge: D(
1099
1099
  (n) => {
1100
- const r = /* @__PURE__ */ new Date() - n, o = Math.floor(r / (1e3 * 60)), c = Math.floor(o / 60), u = t === "es", m = e("_accessibility:labels.ago"), h = e("_accessibility:labels.minute"), y = e("_accessibility:labels.minutes"), f = e("_accessibility:labels.hour"), p = e("_accessibility:labels.hours"), _ = e("_accessibility:labels.yesterday"), C = e("_accessibility:labels.justNow");
1101
- return r < 1e3 * 60 ? C : o < 60 ? `${u ? m : ""} ${o} ${o === 1 ? h : y} ${u ? "" : m}` : c < 24 ? `${u ? m : ""} ${c} ${c === 1 ? f : p} ${u ? "" : m}` : c < 48 ? _ : n.toLocaleDateString(navigator.language || "es-ES", {
1100
+ const r = /* @__PURE__ */ new Date() - n, a = Math.floor(r / (1e3 * 60)), c = Math.floor(a / 60), l = t === "es", m = e("_accessibility:labels.ago"), y = e("_accessibility:labels.minute"), h = e("_accessibility:labels.minutes"), d = e("_accessibility:labels.hour"), p = e("_accessibility:labels.hours"), _ = e("_accessibility:labels.yesterday"), C = e("_accessibility:labels.justNow");
1101
+ return r < 1e3 * 60 ? C : a < 60 ? `${l ? m : ""} ${a} ${a === 1 ? y : h} ${l ? "" : m}` : c < 24 ? `${l ? m : ""} ${c} ${c === 1 ? d : p} ${l ? "" : m}` : c < 48 ? _ : n.toLocaleDateString(navigator.language || "es-ES", {
1102
1102
  day: "2-digit",
1103
1103
  month: "2-digit",
1104
1104
  year: "numeric"
@@ -1108,24 +1108,24 @@ function Cn() {
1108
1108
  ) };
1109
1109
  }
1110
1110
  const ss = (e) => {
1111
- const { showSuccessNotification: t } = ke(), { mutationFn: s, onError: n, onSuccess: i, onSuccessMessage: r } = e, [o, c] = X([]), { open: u, handleClose: m, handleOpen: h } = ds(), y = () => {
1111
+ const { showSuccessNotification: t } = ke(), { mutationFn: s, onError: n, onSuccess: i, onSuccessMessage: r } = e, [a, c] = X([]), { open: l, handleClose: m, handleOpen: y } = ds(), h = () => {
1112
1112
  m(), c([]);
1113
- }, f = async (_) => {
1114
- c(_), h();
1113
+ }, d = async (_) => {
1114
+ c(_), y();
1115
1115
  }, p = Me({
1116
1116
  mutationFn: () => s(
1117
- Array.isArray(o) ? o : [o]
1117
+ Array.isArray(a) ? a : [a]
1118
1118
  ),
1119
1119
  onError: (_) => {
1120
- console.error(_), n && n(_), y();
1120
+ console.error(_), n && n(_), h();
1121
1121
  },
1122
1122
  onSuccess: async (_) => {
1123
1123
  i && i(_), t({
1124
1124
  message: r
1125
- }), y();
1125
+ }), h();
1126
1126
  }
1127
1127
  });
1128
- return { open: u, onClick: f, close: y, dialogFn: p, isLoading: p.isPending };
1128
+ return { open: l, onClick: d, close: h, dialogFn: p, isLoading: p.isPending };
1129
1129
  };
1130
1130
  var Ue = (e) => e.type === "checkbox", Ee = (e) => e instanceof Date, Z = (e) => e == null;
1131
1131
  const rs = (e) => typeof e == "object";
@@ -1155,17 +1155,17 @@ var ze = (e) => /^\w*$/.test(e), j = (e) => e === void 0, lt = (e) => Array.isAr
1155
1155
  return j(n) || n === e ? j(e[t]) ? s : e[t] : n;
1156
1156
  }, he = (e) => typeof e == "boolean", q = (e, t, s) => {
1157
1157
  let n = -1;
1158
- const i = ze(t) ? [t] : ut(t), r = i.length, o = r - 1;
1158
+ const i = ze(t) ? [t] : ut(t), r = i.length, a = r - 1;
1159
1159
  for (; ++n < r; ) {
1160
1160
  const c = i[n];
1161
- let u = s;
1162
- if (n !== o) {
1161
+ let l = s;
1162
+ if (n !== a) {
1163
1163
  const m = e[c];
1164
- u = Q(m) || Array.isArray(m) ? m : isNaN(+i[n + 1]) ? {} : [];
1164
+ l = Q(m) || Array.isArray(m) ? m : isNaN(+i[n + 1]) ? {} : [];
1165
1165
  }
1166
1166
  if (c === "__proto__" || c === "constructor" || c === "prototype")
1167
1167
  return;
1168
- e[c] = u, e = e[c];
1168
+ e[c] = l, e = e[c];
1169
1169
  }
1170
1170
  };
1171
1171
  const At = {
@@ -1194,8 +1194,8 @@ var hr = (e, t, s, n = !0) => {
1194
1194
  for (const r in e)
1195
1195
  Object.defineProperty(i, r, {
1196
1196
  get: () => {
1197
- const o = r;
1198
- return t._proxyFormState[o] !== de.all && (t._proxyFormState[o] = !n || de.all), e[o];
1197
+ const a = r;
1198
+ return t._proxyFormState[a] !== de.all && (t._proxyFormState[a] = !n || de.all), e[a];
1199
1199
  }
1200
1200
  });
1201
1201
  return i;
@@ -1214,12 +1214,12 @@ function ve(e, t, s = /* @__PURE__ */ new WeakSet()) {
1214
1214
  return !0;
1215
1215
  s.add(e), s.add(t);
1216
1216
  for (const r of n) {
1217
- const o = e[r];
1217
+ const a = e[r];
1218
1218
  if (!i.includes(r))
1219
1219
  return !1;
1220
1220
  if (r !== "ref") {
1221
1221
  const c = t[r];
1222
- if (Ee(o) && Ee(c) || Q(o) && Q(c) || Array.isArray(o) && Array.isArray(c) ? !ve(o, c, s) : o !== c)
1222
+ if (Ee(a) && Ee(c) || Q(a) && Q(c) || Array.isArray(a) && Array.isArray(c) ? !ve(a, c, s) : a !== c)
1223
1223
  return !1;
1224
1224
  }
1225
1225
  }
@@ -1326,8 +1326,8 @@ function Lt(e) {
1326
1326
  var _r = (e, t, s, n) => {
1327
1327
  const i = {};
1328
1328
  for (const r of e) {
1329
- const o = S(t, r);
1330
- o && q(i, r, o._f);
1329
+ const a = S(t, r);
1330
+ a && q(i, r, a._f);
1331
1331
  }
1332
1332
  return {
1333
1333
  criteriaMode: s,
@@ -1348,11 +1348,11 @@ const De = (e, t, s, n) => {
1348
1348
  for (const i of s || Object.keys(e)) {
1349
1349
  const r = S(e, i);
1350
1350
  if (r) {
1351
- const { _f: o, ...c } = r;
1352
- if (o) {
1353
- if (o.refs && o.refs[0] && t(o.refs[0], i) && !n)
1351
+ const { _f: a, ...c } = r;
1352
+ if (a) {
1353
+ if (a.refs && a.refs[0] && t(a.refs[0], i) && !n)
1354
1354
  return !0;
1355
- if (o.ref && t(o.ref, o.name) && !n)
1355
+ if (a.ref && t(a.ref, a.name) && !n)
1356
1356
  return !0;
1357
1357
  if (De(c, t))
1358
1358
  break;
@@ -1370,8 +1370,8 @@ function Pt(e, t, s) {
1370
1370
  };
1371
1371
  const i = s.split(".");
1372
1372
  for (; i.length; ) {
1373
- const r = i.join("."), o = S(t, r), c = S(e, r);
1374
- if (o && !Array.isArray(o) && s !== r)
1373
+ const r = i.join("."), a = S(t, r), c = S(e, r);
1374
+ if (a && !Array.isArray(a) && s !== r)
1375
1375
  return { name: s };
1376
1376
  if (c && c.type)
1377
1377
  return {
@@ -1392,7 +1392,7 @@ function Pt(e, t, s) {
1392
1392
  var Er = (e, t, s, n) => {
1393
1393
  s(e);
1394
1394
  const { name: i, ...r } = e;
1395
- return ee(r) || Object.keys(r).length >= Object.keys(t).length || Object.keys(r).find((o) => t[o] === (!n || de.all));
1395
+ return ee(r) || Object.keys(r).length >= Object.keys(t).length || Object.keys(r).find((a) => t[a] === (!n || de.all));
1396
1396
  }, kr = (e, t, s) => !e || !t || e === t || Le(e).some((n) => n && (s ? n === t : n.startsWith(t) || t.startsWith(n))), Nr = (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, Ar = (e, t) => !lt(S(e, t)).length && K(e, t), xr = (e, t, s) => {
1397
1397
  const n = Le(S(e, s));
1398
1398
  return q(n, "root", t[s]), q(e, s, n), e;
@@ -1409,22 +1409,22 @@ var Ne = (e) => Q(e) && !We(e) ? e : {
1409
1409
  value: e,
1410
1410
  message: ""
1411
1411
  }, Mt = async (e, t, s, n, i, r) => {
1412
- const { ref: o, refs: c, required: u, maxLength: m, minLength: h, min: y, max: f, pattern: p, validate: _, name: C, valueAsNumber: k, mount: B } = e._f, N = S(s, C);
1412
+ const { ref: a, refs: c, required: l, maxLength: m, minLength: y, min: h, max: d, pattern: p, validate: _, name: C, valueAsNumber: k, mount: B } = e._f, N = S(s, C);
1413
1413
  if (!B || t.has(C))
1414
1414
  return {};
1415
- const $ = c ? c[0] : o, x = (F) => {
1415
+ const $ = c ? c[0] : a, x = (F) => {
1416
1416
  i && $.reportValidity && ($.setCustomValidity(he(F) ? "" : F || ""), $.reportValidity());
1417
- }, A = {}, I = ft(o), M = Ue(o), se = I || M, P = (k || dt(o)) && j(o.value) && j(N) || Ke(o) && o.value === "" || N === "" || Array.isArray(N) && !N.length, re = pr.bind(null, C, n, A), ae = (F, L, H, W = ge.maxLength, z = ge.minLength) => {
1417
+ }, A = {}, I = ft(a), M = Ue(a), se = I || M, P = (k || dt(a)) && j(a.value) && j(N) || Ke(a) && a.value === "" || N === "" || Array.isArray(N) && !N.length, re = pr.bind(null, C, n, A), ae = (F, L, H, W = ge.maxLength, z = ge.minLength) => {
1418
1418
  const R = F ? L : H;
1419
1419
  A[C] = {
1420
1420
  type: F ? W : z,
1421
1421
  message: R,
1422
- ref: o,
1422
+ ref: a,
1423
1423
  ...re(F ? W : z, R)
1424
1424
  };
1425
1425
  };
1426
- if (r ? !Array.isArray(N) || !N.length : u && (!se && (P || Z(N)) || he(N) && !N || M && !os(c).isValid || I && !ls(c).isValid)) {
1427
- const { value: F, message: L } = Qe(u) ? { value: !!u, message: u } : Ne(u);
1426
+ if (r ? !Array.isArray(N) || !N.length : l && (!se && (P || Z(N)) || he(N) && !N || M && !os(c).isValid || I && !ls(c).isValid)) {
1427
+ const { value: F, message: L } = Qe(l) ? { value: !!l, message: l } : Ne(l);
1428
1428
  if (F && (A[C] = {
1429
1429
  type: ge.required,
1430
1430
  message: L,
@@ -1433,21 +1433,21 @@ var Ne = (e) => Q(e) && !We(e) ? e : {
1433
1433
  }, !n))
1434
1434
  return x(L), A;
1435
1435
  }
1436
- if (!P && (!Z(y) || !Z(f))) {
1436
+ if (!P && (!Z(h) || !Z(d))) {
1437
1437
  let F, L;
1438
- const H = Ne(f), W = Ne(y);
1438
+ const H = Ne(d), W = Ne(h);
1439
1439
  if (!Z(N) && !isNaN(N)) {
1440
- const z = o.valueAsNumber || N && +N;
1440
+ const z = a.valueAsNumber || N && +N;
1441
1441
  Z(H.value) || (F = z > H.value), Z(W.value) || (L = z < W.value);
1442
1442
  } else {
1443
- const z = o.valueAsDate || new Date(N), R = (ue) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + ue), Y = o.type == "time", ne = o.type == "week";
1443
+ const z = a.valueAsDate || new Date(N), R = (ue) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + ue), Y = a.type == "time", ne = a.type == "week";
1444
1444
  ye(H.value) && N && (F = Y ? R(N) > R(H.value) : ne ? N > H.value : z > new Date(H.value)), ye(W.value) && N && (L = Y ? R(N) < R(W.value) : ne ? N < W.value : z < new Date(W.value));
1445
1445
  }
1446
1446
  if ((F || L) && (ae(!!F, H.message, W.message, ge.max, ge.min), !n))
1447
1447
  return x(A[C].message), A;
1448
1448
  }
1449
- if ((m || h) && !P && (ye(N) || r && Array.isArray(N))) {
1450
- const F = Ne(m), L = Ne(h), H = !Z(F.value) && N.length > +F.value, W = !Z(L.value) && N.length < +L.value;
1449
+ if ((m || y) && !P && (ye(N) || r && Array.isArray(N))) {
1450
+ const F = Ne(m), L = Ne(y), H = !Z(F.value) && N.length > +F.value, W = !Z(L.value) && N.length < +L.value;
1451
1451
  if ((H || W) && (ae(H, F.message, L.message), !n))
1452
1452
  return x(A[C].message), A;
1453
1453
  }
@@ -1456,7 +1456,7 @@ var Ne = (e) => Q(e) && !We(e) ? e : {
1456
1456
  if (We(F) && !N.match(F) && (A[C] = {
1457
1457
  type: ge.pattern,
1458
1458
  message: L,
1459
- ref: o,
1459
+ ref: a,
1460
1460
  ...re(ge.pattern, L)
1461
1461
  }, !n))
1462
1462
  return x(L), A;
@@ -1513,7 +1513,7 @@ function Fr(e = {}) {
1513
1513
  validatingFields: {},
1514
1514
  errors: t.errors || {},
1515
1515
  disabled: t.disabled || !1
1516
- }, n = {}, i = Q(t.defaultValues) || Q(t.values) ? G(t.defaultValues || t.values) || {} : {}, r = t.shouldUnregister ? {} : G(i), o = {
1516
+ }, n = {}, i = Q(t.defaultValues) || Q(t.values) ? G(t.defaultValues || t.values) || {} : {}, r = t.shouldUnregister ? {} : G(i), a = {
1517
1517
  action: !1,
1518
1518
  mount: !1,
1519
1519
  watch: !1
@@ -1523,8 +1523,8 @@ function Fr(e = {}) {
1523
1523
  unMount: /* @__PURE__ */ new Set(),
1524
1524
  array: /* @__PURE__ */ new Set(),
1525
1525
  watch: /* @__PURE__ */ new Set()
1526
- }, u, m = 0;
1527
- const h = {
1526
+ }, l, m = 0;
1527
+ const y = {
1528
1528
  isDirty: !1,
1529
1529
  dirtyFields: !1,
1530
1530
  validatingFields: !1,
@@ -1533,334 +1533,334 @@ function Fr(e = {}) {
1533
1533
  isValid: !1,
1534
1534
  errors: !1
1535
1535
  };
1536
- let y = {
1537
- ...h
1536
+ let h = {
1537
+ ...y
1538
1538
  };
1539
- const f = {
1539
+ const d = {
1540
1540
  array: xt(),
1541
1541
  state: xt()
1542
- }, p = t.criteriaMode === de.all, _ = (a) => (l) => {
1543
- clearTimeout(m), m = setTimeout(a, l);
1544
- }, C = async (a) => {
1545
- if (!t.disabled && (h.isValid || y.isValid || a)) {
1546
- const l = t.resolver ? ee((await M()).errors) : await P(n, !0);
1547
- l !== s.isValid && f.state.next({
1548
- isValid: l
1542
+ }, p = t.criteriaMode === de.all, _ = (o) => (u) => {
1543
+ clearTimeout(m), m = setTimeout(o, u);
1544
+ }, C = async (o) => {
1545
+ if (!t.disabled && (y.isValid || h.isValid || o)) {
1546
+ const u = t.resolver ? ee((await M()).errors) : await P(n, !0);
1547
+ u !== s.isValid && d.state.next({
1548
+ isValid: u
1549
1549
  });
1550
1550
  }
1551
- }, k = (a, l) => {
1552
- !t.disabled && (h.isValidating || h.validatingFields || y.isValidating || y.validatingFields) && ((a || Array.from(c.mount)).forEach((d) => {
1553
- d && (l ? q(s.validatingFields, d, l) : K(s.validatingFields, d));
1554
- }), f.state.next({
1551
+ }, k = (o, u) => {
1552
+ !t.disabled && (y.isValidating || y.validatingFields || h.isValidating || h.validatingFields) && ((o || Array.from(c.mount)).forEach((f) => {
1553
+ f && (u ? q(s.validatingFields, f, u) : K(s.validatingFields, f));
1554
+ }), d.state.next({
1555
1555
  validatingFields: s.validatingFields,
1556
1556
  isValidating: !ee(s.validatingFields)
1557
1557
  }));
1558
- }, B = (a, l = [], d, w, v = !0, b = !0) => {
1559
- if (w && d && !t.disabled) {
1560
- if (o.action = !0, b && Array.isArray(S(n, a))) {
1561
- const E = d(S(n, a), w.argA, w.argB);
1562
- v && q(n, a, E);
1558
+ }, B = (o, u = [], f, w, v = !0, b = !0) => {
1559
+ if (w && f && !t.disabled) {
1560
+ if (a.action = !0, b && Array.isArray(S(n, o))) {
1561
+ const E = f(S(n, o), w.argA, w.argB);
1562
+ v && q(n, o, E);
1563
1563
  }
1564
- if (b && Array.isArray(S(s.errors, a))) {
1565
- const E = d(S(s.errors, a), w.argA, w.argB);
1566
- v && q(s.errors, a, E), Ar(s.errors, a);
1564
+ if (b && Array.isArray(S(s.errors, o))) {
1565
+ const E = f(S(s.errors, o), w.argA, w.argB);
1566
+ v && q(s.errors, o, E), Ar(s.errors, o);
1567
1567
  }
1568
- if ((h.touchedFields || y.touchedFields) && b && Array.isArray(S(s.touchedFields, a))) {
1569
- const E = d(S(s.touchedFields, a), w.argA, w.argB);
1570
- v && q(s.touchedFields, a, E);
1568
+ if ((y.touchedFields || h.touchedFields) && b && Array.isArray(S(s.touchedFields, o))) {
1569
+ const E = f(S(s.touchedFields, o), w.argA, w.argB);
1570
+ v && q(s.touchedFields, o, E);
1571
1571
  }
1572
- (h.dirtyFields || y.dirtyFields) && (s.dirtyFields = Fe(i, r)), f.state.next({
1573
- name: a,
1574
- isDirty: ae(a, l),
1572
+ (y.dirtyFields || h.dirtyFields) && (s.dirtyFields = Fe(i, r)), d.state.next({
1573
+ name: o,
1574
+ isDirty: ae(o, u),
1575
1575
  dirtyFields: s.dirtyFields,
1576
1576
  errors: s.errors,
1577
1577
  isValid: s.isValid
1578
1578
  });
1579
1579
  } else
1580
- q(r, a, l);
1581
- }, N = (a, l) => {
1582
- q(s.errors, a, l), f.state.next({
1580
+ q(r, o, u);
1581
+ }, N = (o, u) => {
1582
+ q(s.errors, o, u), d.state.next({
1583
1583
  errors: s.errors
1584
1584
  });
1585
- }, $ = (a) => {
1586
- s.errors = a, f.state.next({
1585
+ }, $ = (o) => {
1586
+ s.errors = o, d.state.next({
1587
1587
  errors: s.errors,
1588
1588
  isValid: !1
1589
1589
  });
1590
- }, x = (a, l, d, w) => {
1591
- const v = S(n, a);
1590
+ }, x = (o, u, f, w) => {
1591
+ const v = S(n, o);
1592
1592
  if (v) {
1593
- const b = S(r, a, j(d) ? S(i, a) : d);
1594
- j(b) || w && w.defaultChecked || l ? q(r, a, l ? b : Lt(v._f)) : H(a, b), o.mount && C();
1593
+ const b = S(r, o, j(f) ? S(i, o) : f);
1594
+ j(b) || w && w.defaultChecked || u ? q(r, o, u ? b : Lt(v._f)) : H(o, b), a.mount && C();
1595
1595
  }
1596
- }, A = (a, l, d, w, v) => {
1596
+ }, A = (o, u, f, w, v) => {
1597
1597
  let b = !1, E = !1;
1598
1598
  const O = {
1599
- name: a
1599
+ name: o
1600
1600
  };
1601
1601
  if (!t.disabled) {
1602
- if (!d || w) {
1603
- (h.isDirty || y.isDirty) && (E = s.isDirty, s.isDirty = O.isDirty = ae(), b = E !== O.isDirty);
1604
- const U = ve(S(i, a), l);
1605
- E = !!S(s.dirtyFields, a), U ? K(s.dirtyFields, a) : q(s.dirtyFields, a, !0), O.dirtyFields = s.dirtyFields, b = b || (h.dirtyFields || y.dirtyFields) && E !== !U;
1602
+ if (!f || w) {
1603
+ (y.isDirty || h.isDirty) && (E = s.isDirty, s.isDirty = O.isDirty = ae(), b = E !== O.isDirty);
1604
+ const U = ve(S(i, o), u);
1605
+ E = !!S(s.dirtyFields, o), U ? K(s.dirtyFields, o) : q(s.dirtyFields, o, !0), O.dirtyFields = s.dirtyFields, b = b || (y.dirtyFields || h.dirtyFields) && E !== !U;
1606
1606
  }
1607
- if (d) {
1608
- const U = S(s.touchedFields, a);
1609
- U || (q(s.touchedFields, a, d), O.touchedFields = s.touchedFields, b = b || (h.touchedFields || y.touchedFields) && U !== d);
1607
+ if (f) {
1608
+ const U = S(s.touchedFields, o);
1609
+ U || (q(s.touchedFields, o, f), O.touchedFields = s.touchedFields, b = b || (y.touchedFields || h.touchedFields) && U !== f);
1610
1610
  }
1611
- b && v && f.state.next(O);
1611
+ b && v && d.state.next(O);
1612
1612
  }
1613
1613
  return b ? O : {};
1614
- }, I = (a, l, d, w) => {
1615
- const v = S(s.errors, a), b = (h.isValid || y.isValid) && he(l) && s.isValid !== l;
1616
- if (t.delayError && d ? (u = _(() => N(a, d)), u(t.delayError)) : (clearTimeout(m), u = null, d ? q(s.errors, a, d) : K(s.errors, a)), (d ? !ve(v, d) : v) || !ee(w) || b) {
1614
+ }, I = (o, u, f, w) => {
1615
+ const v = S(s.errors, o), b = (y.isValid || h.isValid) && he(u) && s.isValid !== u;
1616
+ if (t.delayError && f ? (l = _(() => N(o, f)), l(t.delayError)) : (clearTimeout(m), l = null, f ? q(s.errors, o, f) : K(s.errors, o)), (f ? !ve(v, f) : v) || !ee(w) || b) {
1617
1617
  const E = {
1618
1618
  ...w,
1619
- ...b && he(l) ? { isValid: l } : {},
1619
+ ...b && he(u) ? { isValid: u } : {},
1620
1620
  errors: s.errors,
1621
- name: a
1621
+ name: o
1622
1622
  };
1623
1623
  s = {
1624
1624
  ...s,
1625
1625
  ...E
1626
- }, f.state.next(E);
1626
+ }, d.state.next(E);
1627
1627
  }
1628
- }, M = async (a) => {
1629
- k(a, !0);
1630
- const l = await t.resolver(r, t.context, _r(a || c.mount, n, t.criteriaMode, t.shouldUseNativeValidation));
1631
- return k(a), l;
1632
- }, se = async (a) => {
1633
- const { errors: l } = await M(a);
1634
- if (a)
1635
- for (const d of a) {
1636
- const w = S(l, d);
1637
- w ? q(s.errors, d, w) : K(s.errors, d);
1628
+ }, M = async (o) => {
1629
+ k(o, !0);
1630
+ const u = await t.resolver(r, t.context, _r(o || c.mount, n, t.criteriaMode, t.shouldUseNativeValidation));
1631
+ return k(o), u;
1632
+ }, se = async (o) => {
1633
+ const { errors: u } = await M(o);
1634
+ if (o)
1635
+ for (const f of o) {
1636
+ const w = S(u, f);
1637
+ w ? q(s.errors, f, w) : K(s.errors, f);
1638
1638
  }
1639
1639
  else
1640
- s.errors = l;
1641
- return l;
1642
- }, P = async (a, l, d = {
1640
+ s.errors = u;
1641
+ return u;
1642
+ }, P = async (o, u, f = {
1643
1643
  valid: !0
1644
1644
  }) => {
1645
- for (const w in a) {
1646
- const v = a[w];
1645
+ for (const w in o) {
1646
+ const v = o[w];
1647
1647
  if (v) {
1648
1648
  const { _f: b, ...E } = v;
1649
1649
  if (b) {
1650
1650
  const O = c.array.has(b.name), U = v._f && Sr(v._f);
1651
- U && h.validatingFields && k([w], !0);
1652
- const oe = await Mt(v, c.disabled, r, p, t.shouldUseNativeValidation && !l, O);
1653
- if (U && h.validatingFields && k([w]), oe[b.name] && (d.valid = !1, l))
1651
+ U && y.validatingFields && k([w], !0);
1652
+ const oe = await Mt(v, c.disabled, r, p, t.shouldUseNativeValidation && !u, O);
1653
+ if (U && y.validatingFields && k([w]), oe[b.name] && (f.valid = !1, u))
1654
1654
  break;
1655
- !l && (S(oe, b.name) ? O ? xr(s.errors, oe, b.name) : q(s.errors, b.name, oe[b.name]) : K(s.errors, b.name));
1655
+ !u && (S(oe, b.name) ? O ? xr(s.errors, oe, b.name) : q(s.errors, b.name, oe[b.name]) : K(s.errors, b.name));
1656
1656
  }
1657
- !ee(E) && await P(E, l, d);
1657
+ !ee(E) && await P(E, u, f);
1658
1658
  }
1659
1659
  }
1660
- return d.valid;
1660
+ return f.valid;
1661
1661
  }, re = () => {
1662
- for (const a of c.unMount) {
1663
- const l = S(n, a);
1664
- l && (l._f.refs ? l._f.refs.every((d) => !st(d)) : !st(l._f.ref)) && Ye(a);
1662
+ for (const o of c.unMount) {
1663
+ const u = S(n, o);
1664
+ u && (u._f.refs ? u._f.refs.every((f) => !st(f)) : !st(u._f.ref)) && Ye(o);
1665
1665
  }
1666
1666
  c.unMount = /* @__PURE__ */ new Set();
1667
- }, ae = (a, l) => !t.disabled && (a && l && q(r, a, l), !ve(ue(), i)), F = (a, l, d) => gr(a, c, {
1668
- ...o.mount ? r : j(l) ? i : ye(a) ? { [a]: l } : l
1669
- }, d, l), L = (a) => lt(S(o.mount ? r : i, a, t.shouldUnregister ? S(i, a, []) : [])), H = (a, l, d = {}) => {
1670
- const w = S(n, a);
1671
- let v = l;
1667
+ }, ae = (o, u) => !t.disabled && (o && u && q(r, o, u), !ve(ue(), i)), F = (o, u, f) => gr(o, c, {
1668
+ ...a.mount ? r : j(u) ? i : ye(o) ? { [o]: u } : u
1669
+ }, f, u), L = (o) => lt(S(a.mount ? r : i, o, t.shouldUnregister ? S(i, o, []) : [])), H = (o, u, f = {}) => {
1670
+ const w = S(n, o);
1671
+ let v = u;
1672
1672
  if (w) {
1673
1673
  const b = w._f;
1674
- b && (!b.disabled && q(r, a, cs(l, b)), v = Ke(b.ref) && Z(l) ? "" : l, ns(b.ref) ? [...b.ref.options].forEach((E) => E.selected = v.includes(E.value)) : b.refs ? Ue(b.ref) ? b.refs.forEach((E) => {
1674
+ b && (!b.disabled && q(r, o, cs(u, b)), v = Ke(b.ref) && Z(u) ? "" : u, ns(b.ref) ? [...b.ref.options].forEach((E) => E.selected = v.includes(E.value)) : b.refs ? Ue(b.ref) ? b.refs.forEach((E) => {
1675
1675
  (!E.defaultChecked || !E.disabled) && (Array.isArray(v) ? E.checked = !!v.find((O) => O === E.value) : E.checked = v === E.value || !!v);
1676
- }) : b.refs.forEach((E) => E.checked = E.value === v) : dt(b.ref) ? b.ref.value = "" : (b.ref.value = v, b.ref.type || f.state.next({
1677
- name: a,
1676
+ }) : b.refs.forEach((E) => E.checked = E.value === v) : dt(b.ref) ? b.ref.value = "" : (b.ref.value = v, b.ref.type || d.state.next({
1677
+ name: o,
1678
1678
  values: G(r)
1679
1679
  })));
1680
1680
  }
1681
- (d.shouldDirty || d.shouldTouch) && A(a, v, d.shouldTouch, d.shouldDirty, !0), d.shouldValidate && ne(a);
1682
- }, W = (a, l, d) => {
1683
- for (const w in l) {
1684
- if (!l.hasOwnProperty(w))
1681
+ (f.shouldDirty || f.shouldTouch) && A(o, v, f.shouldTouch, f.shouldDirty, !0), f.shouldValidate && ne(o);
1682
+ }, W = (o, u, f) => {
1683
+ for (const w in u) {
1684
+ if (!u.hasOwnProperty(w))
1685
1685
  return;
1686
- const v = l[w], b = a + "." + w, E = S(n, b);
1687
- (c.array.has(a) || Q(v) || E && !E._f) && !Ee(v) ? W(b, v, d) : H(b, v, d);
1686
+ const v = u[w], b = o + "." + w, E = S(n, b);
1687
+ (c.array.has(o) || Q(v) || E && !E._f) && !Ee(v) ? W(b, v, f) : H(b, v, f);
1688
1688
  }
1689
- }, z = (a, l, d = {}) => {
1690
- const w = S(n, a), v = c.array.has(a), b = G(l);
1691
- q(r, a, b), v ? (f.array.next({
1692
- name: a,
1689
+ }, z = (o, u, f = {}) => {
1690
+ const w = S(n, o), v = c.array.has(o), b = G(u);
1691
+ q(r, o, b), v ? (d.array.next({
1692
+ name: o,
1693
1693
  values: G(r)
1694
- }), (h.isDirty || h.dirtyFields || y.isDirty || y.dirtyFields) && d.shouldDirty && f.state.next({
1695
- name: a,
1694
+ }), (y.isDirty || y.dirtyFields || h.isDirty || h.dirtyFields) && f.shouldDirty && d.state.next({
1695
+ name: o,
1696
1696
  dirtyFields: Fe(i, r),
1697
- isDirty: ae(a, b)
1698
- })) : w && !w._f && !Z(b) ? W(a, b, d) : H(a, b, d), It(a, c) && f.state.next({ ...s, name: a }), f.state.next({
1699
- name: o.mount ? a : void 0,
1697
+ isDirty: ae(o, b)
1698
+ })) : w && !w._f && !Z(b) ? W(o, b, f) : H(o, b, f), It(o, c) && d.state.next({ ...s, name: o }), d.state.next({
1699
+ name: a.mount ? o : void 0,
1700
1700
  values: G(r)
1701
1701
  });
1702
- }, R = async (a) => {
1703
- o.mount = !0;
1704
- const l = a.target;
1705
- let d = l.name, w = !0;
1706
- const v = S(n, d), b = (U) => {
1707
- w = Number.isNaN(U) || Ee(U) && isNaN(U.getTime()) || ve(U, S(r, d, U));
1702
+ }, R = async (o) => {
1703
+ a.mount = !0;
1704
+ const u = o.target;
1705
+ let f = u.name, w = !0;
1706
+ const v = S(n, f), b = (U) => {
1707
+ w = Number.isNaN(U) || Ee(U) && isNaN(U.getTime()) || ve(U, S(r, f, U));
1708
1708
  }, E = Dt(t.mode), O = Dt(t.reValidateMode);
1709
1709
  if (v) {
1710
1710
  let U, oe;
1711
- const He = l.type ? Lt(v._f) : lr(a), be = a.type === At.BLUR || a.type === At.FOCUS_OUT, bs = !Cr(v._f) && !t.resolver && !S(s.errors, d) && !v._f.deps || Nr(be, S(s.touchedFields, d), s.isSubmitted, O, E), et = It(d, c, be);
1712
- q(r, d, He), be ? (v._f.onBlur && v._f.onBlur(a), u && u(0)) : v._f.onChange && v._f.onChange(a);
1713
- const tt = A(d, He, be), vs = !ee(tt) || et;
1714
- if (!be && f.state.next({
1715
- name: d,
1716
- type: a.type,
1711
+ const He = u.type ? Lt(v._f) : lr(o), be = o.type === At.BLUR || o.type === At.FOCUS_OUT, bs = !Cr(v._f) && !t.resolver && !S(s.errors, f) && !v._f.deps || Nr(be, S(s.touchedFields, f), s.isSubmitted, O, E), et = It(f, c, be);
1712
+ q(r, f, He), be ? (v._f.onBlur && v._f.onBlur(o), l && l(0)) : v._f.onChange && v._f.onChange(o);
1713
+ const tt = A(f, He, be), vs = !ee(tt) || et;
1714
+ if (!be && d.state.next({
1715
+ name: f,
1716
+ type: o.type,
1717
1717
  values: G(r)
1718
1718
  }), bs)
1719
- return (h.isValid || y.isValid) && (t.mode === "onBlur" ? be && C() : be || C()), vs && f.state.next({ name: d, ...et ? {} : tt });
1720
- if (!be && et && f.state.next({ ...s }), t.resolver) {
1721
- const { errors: wt } = await M([d]);
1719
+ return (y.isValid || h.isValid) && (t.mode === "onBlur" ? be && C() : be || C()), vs && d.state.next({ name: f, ...et ? {} : tt });
1720
+ if (!be && et && d.state.next({ ...s }), t.resolver) {
1721
+ const { errors: wt } = await M([f]);
1722
1722
  if (b(He), w) {
1723
- const ws = Pt(s.errors, n, d), _t = Pt(wt, n, ws.name || d);
1724
- U = _t.error, d = _t.name, oe = ee(wt);
1723
+ const ws = Pt(s.errors, n, f), _t = Pt(wt, n, ws.name || f);
1724
+ U = _t.error, f = _t.name, oe = ee(wt);
1725
1725
  }
1726
1726
  } else
1727
- k([d], !0), U = (await Mt(v, c.disabled, r, p, t.shouldUseNativeValidation))[d], k([d]), b(He), w && (U ? oe = !1 : (h.isValid || y.isValid) && (oe = await P(n, !0)));
1728
- w && (v._f.deps && ne(v._f.deps), I(d, oe, U, tt));
1727
+ k([f], !0), U = (await Mt(v, c.disabled, r, p, t.shouldUseNativeValidation))[f], k([f]), b(He), w && (U ? oe = !1 : (y.isValid || h.isValid) && (oe = await P(n, !0)));
1728
+ w && (v._f.deps && ne(v._f.deps), I(f, oe, U, tt));
1729
1729
  }
1730
- }, Y = (a, l) => {
1731
- if (S(s.errors, l) && a.focus)
1732
- return a.focus(), 1;
1733
- }, ne = async (a, l = {}) => {
1734
- let d, w;
1735
- const v = Le(a);
1730
+ }, Y = (o, u) => {
1731
+ if (S(s.errors, u) && o.focus)
1732
+ return o.focus(), 1;
1733
+ }, ne = async (o, u = {}) => {
1734
+ let f, w;
1735
+ const v = Le(o);
1736
1736
  if (t.resolver) {
1737
- const b = await se(j(a) ? a : v);
1738
- d = ee(b), w = a ? !v.some((E) => S(b, E)) : d;
1739
- } else a ? (w = (await Promise.all(v.map(async (b) => {
1737
+ const b = await se(j(o) ? o : v);
1738
+ f = ee(b), w = o ? !v.some((E) => S(b, E)) : f;
1739
+ } else o ? (w = (await Promise.all(v.map(async (b) => {
1740
1740
  const E = S(n, b);
1741
1741
  return await P(E && E._f ? { [b]: E } : E);
1742
- }))).every(Boolean), !(!w && !s.isValid) && C()) : w = d = await P(n);
1743
- return f.state.next({
1744
- ...!ye(a) || (h.isValid || y.isValid) && d !== s.isValid ? {} : { name: a },
1745
- ...t.resolver || !a ? { isValid: d } : {},
1742
+ }))).every(Boolean), !(!w && !s.isValid) && C()) : w = f = await P(n);
1743
+ return d.state.next({
1744
+ ...!ye(o) || (y.isValid || h.isValid) && f !== s.isValid ? {} : { name: o },
1745
+ ...t.resolver || !o ? { isValid: f } : {},
1746
1746
  errors: s.errors
1747
- }), l.shouldFocus && !w && De(n, Y, a ? v : c.mount), w;
1748
- }, ue = (a) => {
1749
- const l = {
1750
- ...o.mount ? r : i
1747
+ }), u.shouldFocus && !w && De(n, Y, o ? v : c.mount), w;
1748
+ }, ue = (o) => {
1749
+ const u = {
1750
+ ...a.mount ? r : i
1751
1751
  };
1752
- return j(a) ? l : ye(a) ? S(l, a) : a.map((d) => S(l, d));
1753
- }, qe = (a, l) => ({
1754
- invalid: !!S((l || s).errors, a),
1755
- isDirty: !!S((l || s).dirtyFields, a),
1756
- error: S((l || s).errors, a),
1757
- isValidating: !!S(s.validatingFields, a),
1758
- isTouched: !!S((l || s).touchedFields, a)
1759
- }), Ce = (a) => {
1760
- a && Le(a).forEach((l) => K(s.errors, l)), f.state.next({
1761
- errors: a ? s.errors : {}
1752
+ return j(o) ? u : ye(o) ? S(u, o) : o.map((f) => S(u, f));
1753
+ }, qe = (o, u) => ({
1754
+ invalid: !!S((u || s).errors, o),
1755
+ isDirty: !!S((u || s).dirtyFields, o),
1756
+ error: S((u || s).errors, o),
1757
+ isValidating: !!S(s.validatingFields, o),
1758
+ isTouched: !!S((u || s).touchedFields, o)
1759
+ }), Ce = (o) => {
1760
+ o && Le(o).forEach((u) => K(s.errors, u)), d.state.next({
1761
+ errors: o ? s.errors : {}
1762
1762
  });
1763
- }, mt = (a, l, d) => {
1764
- const w = (S(n, a, { _f: {} })._f || {}).ref, v = S(s.errors, a) || {}, { ref: b, message: E, type: O, ...U } = v;
1765
- q(s.errors, a, {
1763
+ }, mt = (o, u, f) => {
1764
+ const w = (S(n, o, { _f: {} })._f || {}).ref, v = S(s.errors, o) || {}, { ref: b, message: E, type: O, ...U } = v;
1765
+ q(s.errors, o, {
1766
1766
  ...U,
1767
- ...l,
1767
+ ...u,
1768
1768
  ref: w
1769
- }), f.state.next({
1770
- name: a,
1769
+ }), d.state.next({
1770
+ name: o,
1771
1771
  errors: s.errors,
1772
1772
  isValid: !1
1773
- }), d && d.shouldFocus && w && w.focus && w.focus();
1774
- }, fs = (a, l) => fe(a) ? f.state.subscribe({
1775
- next: (d) => "values" in d && a(F(void 0, l), d)
1776
- }) : F(a, l, !0), ht = (a) => f.state.subscribe({
1777
- next: (l) => {
1778
- kr(a.name, l.name, a.exact) && Er(l, a.formState || h, ps, a.reRenderRoot) && a.callback({
1773
+ }), f && f.shouldFocus && w && w.focus && w.focus();
1774
+ }, fs = (o, u) => fe(o) ? d.state.subscribe({
1775
+ next: (f) => "values" in f && o(F(void 0, u), f)
1776
+ }) : F(o, u, !0), ht = (o) => d.state.subscribe({
1777
+ next: (u) => {
1778
+ kr(o.name, u.name, o.exact) && Er(u, o.formState || y, ps, o.reRenderRoot) && o.callback({
1779
1779
  values: { ...r },
1780
1780
  ...s,
1781
- ...l,
1781
+ ...u,
1782
1782
  defaultValues: i
1783
1783
  });
1784
1784
  }
1785
- }).unsubscribe, ms = (a) => (o.mount = !0, y = {
1786
- ...y,
1787
- ...a.formState
1785
+ }).unsubscribe, ms = (o) => (a.mount = !0, h = {
1786
+ ...h,
1787
+ ...o.formState
1788
1788
  }, ht({
1789
- ...a,
1790
- formState: y
1791
- })), Ye = (a, l = {}) => {
1792
- for (const d of a ? Le(a) : c.mount)
1793
- c.mount.delete(d), c.array.delete(d), l.keepValue || (K(n, d), K(r, d)), !l.keepError && K(s.errors, d), !l.keepDirty && K(s.dirtyFields, d), !l.keepTouched && K(s.touchedFields, d), !l.keepIsValidating && K(s.validatingFields, d), !t.shouldUnregister && !l.keepDefaultValue && K(i, d);
1794
- f.state.next({
1789
+ ...o,
1790
+ formState: h
1791
+ })), Ye = (o, u = {}) => {
1792
+ for (const f of o ? Le(o) : c.mount)
1793
+ c.mount.delete(f), c.array.delete(f), u.keepValue || (K(n, f), K(r, f)), !u.keepError && K(s.errors, f), !u.keepDirty && K(s.dirtyFields, f), !u.keepTouched && K(s.touchedFields, f), !u.keepIsValidating && K(s.validatingFields, f), !t.shouldUnregister && !u.keepDefaultValue && K(i, f);
1794
+ d.state.next({
1795
1795
  values: G(r)
1796
- }), f.state.next({
1796
+ }), d.state.next({
1797
1797
  ...s,
1798
- ...l.keepDirty ? { isDirty: ae() } : {}
1799
- }), !l.keepIsValid && C();
1800
- }, yt = ({ disabled: a, name: l }) => {
1801
- (he(a) && o.mount || a || c.disabled.has(l)) && (a ? c.disabled.add(l) : c.disabled.delete(l));
1802
- }, Xe = (a, l = {}) => {
1803
- let d = S(n, a);
1804
- const w = he(l.disabled) || he(t.disabled);
1805
- return q(n, a, {
1806
- ...d || {},
1798
+ ...u.keepDirty ? { isDirty: ae() } : {}
1799
+ }), !u.keepIsValid && C();
1800
+ }, yt = ({ disabled: o, name: u }) => {
1801
+ (he(o) && a.mount || o || c.disabled.has(u)) && (o ? c.disabled.add(u) : c.disabled.delete(u));
1802
+ }, Xe = (o, u = {}) => {
1803
+ let f = S(n, o);
1804
+ const w = he(u.disabled) || he(t.disabled);
1805
+ return q(n, o, {
1806
+ ...f || {},
1807
1807
  _f: {
1808
- ...d && d._f ? d._f : { ref: { name: a } },
1809
- name: a,
1808
+ ...f && f._f ? f._f : { ref: { name: o } },
1809
+ name: o,
1810
1810
  mount: !0,
1811
- ...l
1811
+ ...u
1812
1812
  }
1813
- }), c.mount.add(a), d ? yt({
1814
- disabled: he(l.disabled) ? l.disabled : t.disabled,
1815
- name: a
1816
- }) : x(a, !0, l.value), {
1817
- ...w ? { disabled: l.disabled || t.disabled } : {},
1813
+ }), c.mount.add(o), f ? yt({
1814
+ disabled: he(u.disabled) ? u.disabled : t.disabled,
1815
+ name: o
1816
+ }) : x(o, !0, u.value), {
1817
+ ...w ? { disabled: u.disabled || t.disabled } : {},
1818
1818
  ...t.progressive ? {
1819
- required: !!l.required,
1820
- min: $e(l.min),
1821
- max: $e(l.max),
1822
- minLength: $e(l.minLength),
1823
- maxLength: $e(l.maxLength),
1824
- pattern: $e(l.pattern)
1819
+ required: !!u.required,
1820
+ min: $e(u.min),
1821
+ max: $e(u.max),
1822
+ minLength: $e(u.minLength),
1823
+ maxLength: $e(u.maxLength),
1824
+ pattern: $e(u.pattern)
1825
1825
  } : {},
1826
- name: a,
1826
+ name: o,
1827
1827
  onChange: R,
1828
1828
  onBlur: R,
1829
1829
  ref: (v) => {
1830
1830
  if (v) {
1831
- Xe(a, l), d = S(n, a);
1832
- const b = j(v.value) && v.querySelectorAll && v.querySelectorAll("input,select,textarea")[0] || v, E = br(b), O = d._f.refs || [];
1833
- if (E ? O.find((U) => U === b) : b === d._f.ref)
1831
+ Xe(o, u), f = S(n, o);
1832
+ const b = j(v.value) && v.querySelectorAll && v.querySelectorAll("input,select,textarea")[0] || v, E = br(b), O = f._f.refs || [];
1833
+ if (E ? O.find((U) => U === b) : b === f._f.ref)
1834
1834
  return;
1835
- q(n, a, {
1835
+ q(n, o, {
1836
1836
  _f: {
1837
- ...d._f,
1837
+ ...f._f,
1838
1838
  ...E ? {
1839
1839
  refs: [
1840
1840
  ...O.filter(st),
1841
1841
  b,
1842
- ...Array.isArray(S(i, a)) ? [{}] : []
1842
+ ...Array.isArray(S(i, o)) ? [{}] : []
1843
1843
  ],
1844
- ref: { type: b.type, name: a }
1844
+ ref: { type: b.type, name: o }
1845
1845
  } : { ref: b }
1846
1846
  }
1847
- }), x(a, !1, void 0, b);
1847
+ }), x(o, !1, void 0, b);
1848
1848
  } else
1849
- d = S(n, a, {}), d._f && (d._f.mount = !1), (t.shouldUnregister || l.shouldUnregister) && !(dr(c.array, a) && o.action) && c.unMount.add(a);
1849
+ f = S(n, o, {}), f._f && (f._f.mount = !1), (t.shouldUnregister || u.shouldUnregister) && !(dr(c.array, o) && a.action) && c.unMount.add(o);
1850
1850
  }
1851
1851
  };
1852
- }, Ze = () => t.shouldFocusError && De(n, Y, c.mount), hs = (a) => {
1853
- he(a) && (f.state.next({ disabled: a }), De(n, (l, d) => {
1854
- const w = S(n, d);
1855
- w && (l.disabled = w._f.disabled || a, Array.isArray(w._f.refs) && w._f.refs.forEach((v) => {
1856
- v.disabled = w._f.disabled || a;
1852
+ }, Ze = () => t.shouldFocusError && De(n, Y, c.mount), hs = (o) => {
1853
+ he(o) && (d.state.next({ disabled: o }), De(n, (u, f) => {
1854
+ const w = S(n, f);
1855
+ w && (u.disabled = w._f.disabled || o, Array.isArray(w._f.refs) && w._f.refs.forEach((v) => {
1856
+ v.disabled = w._f.disabled || o;
1857
1857
  }));
1858
1858
  }, 0, !1));
1859
- }, gt = (a, l) => async (d) => {
1859
+ }, gt = (o, u) => async (f) => {
1860
1860
  let w;
1861
- d && (d.preventDefault && d.preventDefault(), d.persist && d.persist());
1861
+ f && (f.preventDefault && f.preventDefault(), f.persist && f.persist());
1862
1862
  let v = G(r);
1863
- if (f.state.next({
1863
+ if (d.state.next({
1864
1864
  isSubmitting: !0
1865
1865
  }), t.resolver) {
1866
1866
  const { errors: b, values: E } = await M();
@@ -1871,17 +1871,17 @@ function Fr(e = {}) {
1871
1871
  for (const b of c.disabled)
1872
1872
  K(v, b);
1873
1873
  if (K(s.errors, "root"), ee(s.errors)) {
1874
- f.state.next({
1874
+ d.state.next({
1875
1875
  errors: {}
1876
1876
  });
1877
1877
  try {
1878
- await a(v, d);
1878
+ await o(v, f);
1879
1879
  } catch (b) {
1880
1880
  w = b;
1881
1881
  }
1882
1882
  } else
1883
- l && await l({ ...s.errors }, d), Ze(), setTimeout(Ze);
1884
- if (f.state.next({
1883
+ u && await u({ ...s.errors }, f), Ze(), setTimeout(Ze);
1884
+ if (d.state.next({
1885
1885
  isSubmitted: !0,
1886
1886
  isSubmitting: !1,
1887
1887
  isSubmitSuccessful: ee(s.errors) && !w,
@@ -1889,12 +1889,12 @@ function Fr(e = {}) {
1889
1889
  errors: s.errors
1890
1890
  }), w)
1891
1891
  throw w;
1892
- }, ys = (a, l = {}) => {
1893
- S(n, a) && (j(l.defaultValue) ? z(a, G(S(i, a))) : (z(a, l.defaultValue), q(i, a, G(l.defaultValue))), l.keepTouched || K(s.touchedFields, a), l.keepDirty || (K(s.dirtyFields, a), s.isDirty = l.defaultValue ? ae(a, G(S(i, a))) : ae()), l.keepError || (K(s.errors, a), h.isValid && C()), f.state.next({ ...s }));
1894
- }, pt = (a, l = {}) => {
1895
- const d = a ? G(a) : i, w = G(d), v = ee(a), b = v ? i : w;
1896
- if (l.keepDefaultValues || (i = d), !l.keepValues) {
1897
- if (l.keepDirtyValues) {
1892
+ }, ys = (o, u = {}) => {
1893
+ S(n, o) && (j(u.defaultValue) ? z(o, G(S(i, o))) : (z(o, u.defaultValue), q(i, o, G(u.defaultValue))), u.keepTouched || K(s.touchedFields, o), u.keepDirty || (K(s.dirtyFields, o), s.isDirty = u.defaultValue ? ae(o, G(S(i, o))) : ae()), u.keepError || (K(s.errors, o), y.isValid && C()), d.state.next({ ...s }));
1894
+ }, pt = (o, u = {}) => {
1895
+ const f = o ? G(o) : i, w = G(f), v = ee(o), b = v ? i : w;
1896
+ if (u.keepDefaultValues || (i = f), !u.keepValues) {
1897
+ if (u.keepDirtyValues) {
1898
1898
  const E = /* @__PURE__ */ new Set([
1899
1899
  ...c.mount,
1900
1900
  ...Object.keys(Fe(i, r))
@@ -1902,7 +1902,7 @@ function Fr(e = {}) {
1902
1902
  for (const O of Array.from(E))
1903
1903
  S(s.dirtyFields, O) ? q(b, O, S(r, O)) : z(O, S(b, O));
1904
1904
  } else {
1905
- if (ct && j(a))
1905
+ if (ct && j(o))
1906
1906
  for (const E of c.mount) {
1907
1907
  const O = S(n, E);
1908
1908
  if (O && O._f) {
@@ -1916,46 +1916,46 @@ function Fr(e = {}) {
1916
1916
  }
1917
1917
  }
1918
1918
  }
1919
- if (l.keepFieldsRef)
1919
+ if (u.keepFieldsRef)
1920
1920
  for (const E of c.mount)
1921
1921
  z(E, S(b, E));
1922
1922
  else
1923
1923
  n = {};
1924
1924
  }
1925
- r = t.shouldUnregister ? l.keepDefaultValues ? G(i) : {} : G(b), f.array.next({
1925
+ r = t.shouldUnregister ? u.keepDefaultValues ? G(i) : {} : G(b), d.array.next({
1926
1926
  values: { ...b }
1927
- }), f.state.next({
1927
+ }), d.state.next({
1928
1928
  values: { ...b }
1929
1929
  });
1930
1930
  }
1931
1931
  c = {
1932
- mount: l.keepDirtyValues ? c.mount : /* @__PURE__ */ new Set(),
1932
+ mount: u.keepDirtyValues ? c.mount : /* @__PURE__ */ new Set(),
1933
1933
  unMount: /* @__PURE__ */ new Set(),
1934
1934
  array: /* @__PURE__ */ new Set(),
1935
1935
  disabled: /* @__PURE__ */ new Set(),
1936
1936
  watch: /* @__PURE__ */ new Set(),
1937
1937
  watchAll: !1,
1938
1938
  focus: ""
1939
- }, o.mount = !h.isValid || !!l.keepIsValid || !!l.keepDirtyValues, o.watch = !!t.shouldUnregister, f.state.next({
1940
- submitCount: l.keepSubmitCount ? s.submitCount : 0,
1941
- isDirty: v ? !1 : l.keepDirty ? s.isDirty : !!(l.keepDefaultValues && !ve(a, i)),
1942
- isSubmitted: l.keepIsSubmitted ? s.isSubmitted : !1,
1943
- dirtyFields: v ? {} : l.keepDirtyValues ? l.keepDefaultValues && r ? Fe(i, r) : s.dirtyFields : l.keepDefaultValues && a ? Fe(i, a) : l.keepDirty ? s.dirtyFields : {},
1944
- touchedFields: l.keepTouched ? s.touchedFields : {},
1945
- errors: l.keepErrors ? s.errors : {},
1946
- isSubmitSuccessful: l.keepIsSubmitSuccessful ? s.isSubmitSuccessful : !1,
1939
+ }, a.mount = !y.isValid || !!u.keepIsValid || !!u.keepDirtyValues, a.watch = !!t.shouldUnregister, d.state.next({
1940
+ submitCount: u.keepSubmitCount ? s.submitCount : 0,
1941
+ isDirty: v ? !1 : u.keepDirty ? s.isDirty : !!(u.keepDefaultValues && !ve(o, i)),
1942
+ isSubmitted: u.keepIsSubmitted ? s.isSubmitted : !1,
1943
+ dirtyFields: v ? {} : u.keepDirtyValues ? u.keepDefaultValues && r ? Fe(i, r) : s.dirtyFields : u.keepDefaultValues && o ? Fe(i, o) : u.keepDirty ? s.dirtyFields : {},
1944
+ touchedFields: u.keepTouched ? s.touchedFields : {},
1945
+ errors: u.keepErrors ? s.errors : {},
1946
+ isSubmitSuccessful: u.keepIsSubmitSuccessful ? s.isSubmitSuccessful : !1,
1947
1947
  isSubmitting: !1
1948
1948
  });
1949
- }, bt = (a, l) => pt(fe(a) ? a(r) : a, l), gs = (a, l = {}) => {
1950
- const d = S(n, a), w = d && d._f;
1949
+ }, bt = (o, u) => pt(fe(o) ? o(r) : o, u), gs = (o, u = {}) => {
1950
+ const f = S(n, o), w = f && f._f;
1951
1951
  if (w) {
1952
1952
  const v = w.refs ? w.refs[0] : w.ref;
1953
- v.focus && (v.focus(), l.shouldSelect && fe(v.select) && v.select());
1953
+ v.focus && (v.focus(), u.shouldSelect && fe(v.select) && v.select());
1954
1954
  }
1955
- }, ps = (a) => {
1955
+ }, ps = (o) => {
1956
1956
  s = {
1957
1957
  ...s,
1958
- ...a
1958
+ ...o
1959
1959
  };
1960
1960
  }, vt = {
1961
1961
  control: {
@@ -1975,15 +1975,15 @@ function Fr(e = {}) {
1975
1975
  _setErrors: $,
1976
1976
  _getFieldArray: L,
1977
1977
  _reset: pt,
1978
- _resetDefaultValues: () => fe(t.defaultValues) && t.defaultValues().then((a) => {
1979
- bt(a, t.resetOptions), f.state.next({
1978
+ _resetDefaultValues: () => fe(t.defaultValues) && t.defaultValues().then((o) => {
1979
+ bt(o, t.resetOptions), d.state.next({
1980
1980
  isLoading: !1
1981
1981
  });
1982
1982
  }),
1983
1983
  _removeUnmounted: re,
1984
1984
  _disableForm: hs,
1985
- _subjects: f,
1986
- _proxyFormState: h,
1985
+ _subjects: d,
1986
+ _proxyFormState: y,
1987
1987
  get _fields() {
1988
1988
  return n;
1989
1989
  },
@@ -1991,10 +1991,10 @@ function Fr(e = {}) {
1991
1991
  return r;
1992
1992
  },
1993
1993
  get _state() {
1994
- return o;
1994
+ return a;
1995
1995
  },
1996
- set _state(a) {
1997
- o = a;
1996
+ set _state(o) {
1997
+ a = o;
1998
1998
  },
1999
1999
  get _defaultValues() {
2000
2000
  return i;
@@ -2002,8 +2002,8 @@ function Fr(e = {}) {
2002
2002
  get _names() {
2003
2003
  return c;
2004
2004
  },
2005
- set _names(a) {
2006
- c = a;
2005
+ set _names(o) {
2006
+ c = o;
2007
2007
  },
2008
2008
  get _formState() {
2009
2009
  return s;
@@ -2011,10 +2011,10 @@ function Fr(e = {}) {
2011
2011
  get _options() {
2012
2012
  return t;
2013
2013
  },
2014
- set _options(a) {
2014
+ set _options(o) {
2015
2015
  t = {
2016
2016
  ...t,
2017
- ...a
2017
+ ...o
2018
2018
  };
2019
2019
  }
2020
2020
  },
@@ -2063,7 +2063,7 @@ function us(e = {}) {
2063
2063
  formState: n
2064
2064
  }, e.defaultValues && !fe(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
2065
2065
  else {
2066
- const { formControl: o, ...c } = Fr(e);
2066
+ const { formControl: a, ...c } = Fr(e);
2067
2067
  t.current = {
2068
2068
  ...c,
2069
2069
  formState: n
@@ -2071,7 +2071,7 @@ function us(e = {}) {
2071
2071
  }
2072
2072
  const r = t.current.control;
2073
2073
  return r._options = e, yr(() => {
2074
- const o = r._subscribe({
2074
+ const a = r._subscribe({
2075
2075
  formState: r._proxyFormState,
2076
2076
  callback: () => i({ ...r._formState }),
2077
2077
  reRenderRoot: !0
@@ -2079,7 +2079,7 @@ function us(e = {}) {
2079
2079
  return i((c) => ({
2080
2080
  ...c,
2081
2081
  isReady: !0
2082
- })), r._formState.isReady = !0, o;
2082
+ })), r._formState.isReady = !0, a;
2083
2083
  }, [r]), ie.useEffect(() => r._disableForm(e.disabled), [r, e.disabled]), ie.useEffect(() => {
2084
2084
  e.mode && (r._options.mode = e.mode), e.reValidateMode && (r._options.reValidateMode = e.reValidateMode);
2085
2085
  }, [r, e.mode, e.reValidateMode]), ie.useEffect(() => {
@@ -2090,16 +2090,16 @@ function us(e = {}) {
2090
2090
  });
2091
2091
  }, [r, e.shouldUnregister]), ie.useEffect(() => {
2092
2092
  if (r._proxyFormState.isDirty) {
2093
- const o = r._getDirty();
2094
- o !== n.isDirty && r._subjects.state.next({
2095
- isDirty: o
2093
+ const a = r._getDirty();
2094
+ a !== n.isDirty && r._subjects.state.next({
2095
+ isDirty: a
2096
2096
  });
2097
2097
  }
2098
2098
  }, [r, n.isDirty]), ie.useEffect(() => {
2099
2099
  e.values && !ve(e.values, s.current) ? (r._reset(e.values, {
2100
2100
  keepFieldsRef: !0,
2101
2101
  ...r._options.resetOptions
2102
- }), s.current = e.values, i((o) => ({ ...o }))) : r._resetDefaultValues();
2102
+ }), s.current = e.values, i((a) => ({ ...a }))) : r._resetDefaultValues();
2103
2103
  }, [r, e.values]), ie.useEffect(() => {
2104
2104
  r._state.mount || (r._setValid(), r._state.mount = !0), r._state.watch && (r._state.watch = !1, r._subjects.state.next({ ...r._formState })), r._removeUnmounted();
2105
2105
  }), t.current.formState = hr(n, r), t.current;
@@ -2108,12 +2108,12 @@ const En = (e) => {
2108
2108
  const { t } = V(), { showStackNotifications: s, showSuccessNotification: n } = ke(), {
2109
2109
  defaultValues: i,
2110
2110
  mutationFn: r,
2111
- formToDto: o,
2111
+ formToDto: a,
2112
2112
  onError: c,
2113
- onSuccess: u,
2113
+ onSuccess: l,
2114
2114
  queryKey: m,
2115
- onSuccessMessage: h
2116
- } = e, { control: y, handleSubmit: f, reset: p, setError: _, getValues: C, setValue: k } = us({
2115
+ onSuccessMessage: y
2116
+ } = e, { control: h, handleSubmit: d, reset: p, setError: _, getValues: C, setValue: k } = us({
2117
2117
  defaultValues: i
2118
2118
  }), B = D(
2119
2119
  (x) => {
@@ -2156,20 +2156,20 @@ const En = (e) => {
2156
2156
  }
2157
2157
  },
2158
2158
  onSuccess: async (x) => {
2159
- pe && await pe.invalidateQueries({ queryKey: m }), u && u(x), h && n({
2160
- message: h
2159
+ pe && await pe.invalidateQueries({ queryKey: m }), l && l(x), y && n({
2160
+ message: y
2161
2161
  });
2162
2162
  }
2163
2163
  }
2164
2164
  );
2165
2165
  return {
2166
- control: y,
2166
+ control: h,
2167
2167
  getValues: C,
2168
2168
  setValue: k,
2169
- handleSubmit: f,
2169
+ handleSubmit: d,
2170
2170
  onSubmit: (x) => {
2171
2171
  N(), $.mutate(
2172
- o ? o(x) : x
2172
+ a ? a(x) : x
2173
2173
  );
2174
2174
  },
2175
2175
  reset: p,
@@ -2177,52 +2177,81 @@ const En = (e) => {
2177
2177
  isLoading: $.isPending
2178
2178
  };
2179
2179
  }, $r = (e) => {
2180
- const { t } = V(), { onClick: s, hidden: n = !1, disabled: i = !1 } = e;
2180
+ const { t } = V(), {
2181
+ onClick: s,
2182
+ icon: n = Ms,
2183
+ sticky: i = !0,
2184
+ hidden: r = !1,
2185
+ multiple: a = !0,
2186
+ disabled: c = !1,
2187
+ id: l = _e.Delete,
2188
+ tooltip: m = t("_pages:common.actions.delete.text")
2189
+ } = e;
2181
2190
  return {
2182
2191
  action: D(
2183
- (o) => ({
2184
- id: _e.Delete,
2185
- hidden: !!o.deletedAt || n,
2186
- disabled: !!o.deletedAt || i,
2187
- icon: /* @__PURE__ */ g(ce, { className: "text-bg-error", icon: Ms }),
2188
- tooltip: t("_pages:common.actions.delete.text"),
2189
- onClick: () => s([o == null ? void 0 : o.id]),
2190
- onMultipleClick: (c) => s(c.map((u) => u.id)),
2191
- multiple: !0
2192
+ (h) => ({
2193
+ id: l,
2194
+ sticky: i,
2195
+ tooltip: m,
2196
+ multiple: a,
2197
+ onClick: () => s([h == null ? void 0 : h.id]),
2198
+ hidden: !!h.deletedAt || r,
2199
+ disabled: !!h.deletedAt || c,
2200
+ icon: /* @__PURE__ */ g(ce, { className: "text-bg-error", icon: n }),
2201
+ onMultipleClick: (d) => s(d.map((p) => p.id))
2192
2202
  }),
2193
- [i, n, s, t]
2203
+ [c, r, n, l, a, s, i, m]
2194
2204
  )
2195
2205
  };
2196
2206
  }, Lr = (e) => {
2197
- const { t } = V(), { onClick: s, hidden: n = !1 } = e;
2207
+ const { t } = V(), {
2208
+ onClick: s,
2209
+ sticky: n = !0,
2210
+ hidden: i = !1,
2211
+ disabled: r = !1,
2212
+ multiple: a = !1,
2213
+ icon: c = Bt,
2214
+ id: l = _e.Restore,
2215
+ tooltip: m = t("_pages:common.actions.restore.text")
2216
+ } = e;
2198
2217
  return {
2199
2218
  action: D(
2200
- (r) => ({
2201
- id: _e.Restore,
2202
- hidden: !r.deletedAt || n,
2203
- disabled: !r.deletedAt,
2204
- icon: /* @__PURE__ */ g(ce, { className: "text-bg-error", icon: Bt }),
2205
- tooltip: t("_pages:common.actions.restore.text"),
2206
- onClick: () => s([r == null ? void 0 : r.id]),
2207
- onMultipleClick: (o) => s(o.map((c) => c.id)),
2208
- multiple: !0
2219
+ (h) => ({
2220
+ id: l,
2221
+ sticky: n,
2222
+ tooltip: m,
2223
+ multiple: a,
2224
+ onClick: () => s([h == null ? void 0 : h.id]),
2225
+ hidden: !h.deletedAt || i,
2226
+ disabled: !h.deletedAt || r,
2227
+ icon: /* @__PURE__ */ g(ce, { className: "text-bg-error", icon: c }),
2228
+ onMultipleClick: (d) => s(d.map((p) => p.id))
2209
2229
  }),
2210
- [n, s, t]
2230
+ [r, i, c, l, a, s, n, m]
2211
2231
  )
2212
2232
  };
2213
2233
  }, kn = (e) => {
2214
- const { t } = V(), { onClick: s, hidden: n = !1 } = e;
2234
+ const { t } = V(), {
2235
+ onClick: s,
2236
+ hidden: n = !1,
2237
+ sticky: i = !0,
2238
+ disabled: r = !1,
2239
+ id: a = _e.Edit,
2240
+ icon: c = Rs,
2241
+ tooltip: l = t("_pages:common.actions.edit.text")
2242
+ } = e;
2215
2243
  return {
2216
2244
  action: D(
2217
- (r) => ({
2218
- id: _e.Edit,
2219
- hidden: !!r.deletedAt || n,
2220
- disabled: !!r.deletedAt,
2221
- icon: /* @__PURE__ */ g(ce, { className: "primary", icon: Rs }),
2222
- tooltip: t("_pages:common.actions.edit.text"),
2223
- onClick: () => s(r == null ? void 0 : r.id)
2245
+ (y) => ({
2246
+ id: a,
2247
+ sticky: i,
2248
+ tooltip: l,
2249
+ onClick: () => s(y == null ? void 0 : y.id),
2250
+ hidden: !!y.deletedAt || n,
2251
+ disabled: !!y.deletedAt || r,
2252
+ icon: /* @__PURE__ */ g(ce, { className: "primary", icon: c })
2224
2253
  }),
2225
- [n, s, t]
2254
+ [r, n, c, a, s, i, l]
2226
2255
  )
2227
2256
  };
2228
2257
  };
@@ -2280,10 +2309,10 @@ const Dr = (e) => {
2280
2309
  )
2281
2310
  };
2282
2311
  }, Nn = (e) => {
2283
- const { queryKey: t, onSuccess: s, ...n } = e, { showStackNotifications: i } = ke(), { t: r } = V(), { open: o, onClick: c, close: u, dialogFn: m, isLoading: h } = ss({
2312
+ const { queryKey: t, onSuccess: s, ...n } = e, { showStackNotifications: i } = ke(), { t: r } = V(), { open: a, onClick: c, close: l, dialogFn: m, isLoading: y } = ss({
2284
2313
  onSuccessMessage: r("_pages:common.actions.delete.successMessage"),
2285
- onError: (f) => {
2286
- const p = f;
2314
+ onError: (d) => {
2315
+ const p = d;
2287
2316
  if (Ge(p))
2288
2317
  i(
2289
2318
  p.errors.map(
@@ -2303,19 +2332,19 @@ const Dr = (e) => {
2303
2332
  ]);
2304
2333
  }
2305
2334
  },
2306
- onSuccess: async (f) => {
2307
- await pe.invalidateQueries({ queryKey: t }), s && s(f);
2335
+ onSuccess: async (d) => {
2336
+ await pe.invalidateQueries({ queryKey: t }), s && s(d);
2308
2337
  },
2309
2338
  ...n
2310
- }), { action: y } = $r({ onClick: c });
2339
+ }), { action: h } = $r({ onClick: c });
2311
2340
  return {
2312
2341
  onClick: c,
2313
2342
  title: r("_pages:common.actions.delete.dialog.title"),
2314
- open: o,
2315
- isLoading: h,
2343
+ open: a,
2344
+ isLoading: y,
2316
2345
  handleSubmit: () => m.mutate(),
2317
- handleClose: u,
2318
- action: y
2346
+ handleClose: l,
2347
+ action: h
2319
2348
  };
2320
2349
  }, ds = () => {
2321
2350
  const [e, t] = X(!1);
@@ -2327,21 +2356,21 @@ const Dr = (e) => {
2327
2356
  showSuccessNotification: i
2328
2357
  } = ke(), {
2329
2358
  defaultValues: r,
2330
- getFunction: o,
2359
+ getFunction: a,
2331
2360
  mutationFn: c,
2332
- formToDto: u,
2361
+ formToDto: l,
2333
2362
  dtoToForm: m,
2334
- onError: h,
2335
- onSuccess: y,
2336
- queryKey: f,
2363
+ onError: y,
2364
+ onSuccess: h,
2365
+ queryKey: d,
2337
2366
  onSuccessMessage: p,
2338
2367
  title: _
2339
2368
  } = e, [C, k] = X(0), { open: B, handleClose: N, handleOpen: $ } = ds(), { control: x, handleSubmit: A, reset: I, setError: M, getValues: se, setValue: P } = us({
2340
2369
  defaultValues: r
2341
2370
  }), { data: re, isLoading: ae } = Ys({
2342
- queryFn: () => o == null ? void 0 : o(C),
2343
- queryKey: [...f, C],
2344
- enabled: !!o && !!f && !!C
2371
+ queryFn: () => a == null ? void 0 : a(C),
2372
+ queryKey: [...d, C],
2373
+ enabled: !!a && !!d && !!C
2345
2374
  });
2346
2375
  le(() => {
2347
2376
  re && m && I({ ...m(re) });
@@ -2351,10 +2380,10 @@ const Dr = (e) => {
2351
2380
  const Y = R == null ? void 0 : R.errors, ne = [];
2352
2381
  return Y && Y.forEach(([ue, qe]) => {
2353
2382
  const Ce = document.querySelector(`[name="${ue}"]`);
2354
- (Ce instanceof HTMLInputElement || Ce instanceof HTMLTextAreaElement || Ce instanceof HTMLSelectElement) && (Ce.focus(), Ce.classList.add("error"), ne.push(t(`_entities:${f}.${ue}.${qe}`)));
2383
+ (Ce instanceof HTMLInputElement || Ce instanceof HTMLTextAreaElement || Ce instanceof HTMLSelectElement) && (Ce.focus(), Ce.classList.add("error"), ne.push(t(`_entities:${d}.${ue}.${qe}`)));
2355
2384
  }), ne;
2356
2385
  },
2357
- [t, f]
2386
+ [t, d]
2358
2387
  ), L = D(() => {
2359
2388
  document.querySelectorAll("input, textarea, select").forEach((Y) => {
2360
2389
  Y.classList.remove("error");
@@ -2369,7 +2398,7 @@ const Dr = (e) => {
2369
2398
  }, [I, L, N]), z = Me({
2370
2399
  mutationFn: c,
2371
2400
  onError: (R) => {
2372
- if (console.error(R), h) h(R);
2401
+ if (console.error(R), y) y(R);
2373
2402
  else {
2374
2403
  const Y = R;
2375
2404
  if (Ge(Y)) {
@@ -2390,7 +2419,7 @@ const Dr = (e) => {
2390
2419
  }
2391
2420
  },
2392
2421
  onSuccess: async (R) => {
2393
- await pe.invalidateQueries({ queryKey: f }), y && y(R), i({
2422
+ await pe.invalidateQueries({ queryKey: d }), h && h(R), i({
2394
2423
  message: p
2395
2424
  }), W();
2396
2425
  }
@@ -2404,7 +2433,7 @@ const Dr = (e) => {
2404
2433
  setValue: P,
2405
2434
  handleSubmit: A,
2406
2435
  onSubmit: (R) => z.mutate(
2407
- u ? u(R) : R
2436
+ l ? l(R) : R
2408
2437
  ),
2409
2438
  reset: I,
2410
2439
  setError: M,
@@ -2412,10 +2441,10 @@ const Dr = (e) => {
2412
2441
  isLoading: ae || z.isPending
2413
2442
  };
2414
2443
  }, xn = (e) => {
2415
- const { queryKey: t, onSuccess: s, ...n } = e, { showStackNotifications: i } = ke(), { t: r } = V(), { open: o, onClick: c, close: u, dialogFn: m, isLoading: h } = ss({
2444
+ const { queryKey: t, onSuccess: s, ...n } = e, { showStackNotifications: i } = ke(), { t: r } = V(), { open: a, onClick: c, close: l, dialogFn: m, isLoading: y } = ss({
2416
2445
  onSuccessMessage: r("_pages:common.actions.restore.successMessage"),
2417
- onError: (f) => {
2418
- const p = f;
2446
+ onError: (d) => {
2447
+ const p = d;
2419
2448
  if (Ge(p))
2420
2449
  i(
2421
2450
  p.errors.map(
@@ -2435,32 +2464,32 @@ const Dr = (e) => {
2435
2464
  ]);
2436
2465
  }
2437
2466
  },
2438
- onSuccess: async (f) => {
2439
- await pe.invalidateQueries({ queryKey: t }), s && s(f);
2467
+ onSuccess: async (d) => {
2468
+ await pe.invalidateQueries({ queryKey: t }), s && s(d);
2440
2469
  },
2441
2470
  ...n
2442
- }), { action: y } = Lr({ onClick: c });
2471
+ }), { action: h } = Lr({ onClick: c });
2443
2472
  return {
2444
2473
  onClick: c,
2445
2474
  title: r("_pages:common.actions.restore.dialog.title"),
2446
- open: o,
2447
- isLoading: h,
2475
+ open: a,
2476
+ isLoading: y,
2448
2477
  handleSubmit: () => m.mutate(),
2449
- handleClose: u,
2450
- action: y
2478
+ handleClose: l,
2479
+ action: h
2451
2480
  };
2452
2481
  };
2453
2482
  function Tn(e) {
2454
- const { t } = V(), { queryKey: s, mutationFn: n, entity: i, fileProcessor: r, onError: o } = e, [c, u] = X(!1), [m, h] = X(null), [y, f] = X(!1), p = Me({
2483
+ const { t } = V(), { queryKey: s, mutationFn: n, entity: i, fileProcessor: r, onError: a } = e, [c, l] = X(!1), [m, y] = X(null), [h, d] = X(!1), p = Me({
2455
2484
  mutationFn: n,
2456
2485
  onError: (C) => {
2457
- console.error(C), o == null || o(C);
2486
+ console.error(C), a == null || a(C);
2458
2487
  },
2459
2488
  onSuccess: async () => {
2460
2489
  pe && await pe.invalidateQueries({ queryKey: s });
2461
2490
  }
2462
2491
  }), { action: _ } = Vr({
2463
- onClick: () => u(!0)
2492
+ onClick: () => l(!0)
2464
2493
  });
2465
2494
  return {
2466
2495
  handleSubmit: async () => {
@@ -2468,22 +2497,22 @@ function Tn(e) {
2468
2497
  try {
2469
2498
  await p.mutateAsync({
2470
2499
  items: m,
2471
- override: y
2472
- }), u(!1), h(null), f(!1);
2500
+ override: h
2501
+ }), l(!1), y(null), d(!1);
2473
2502
  } catch (C) {
2474
2503
  console.error(C);
2475
2504
  }
2476
2505
  },
2477
2506
  isLoading: p.isPending,
2478
2507
  fileProcessor: r,
2479
- onFileProcessed: (C) => h(C),
2480
- onOverrideChange: (C) => f(C),
2508
+ onFileProcessed: (C) => y(C),
2509
+ onOverrideChange: (C) => d(C),
2481
2510
  open: c,
2482
2511
  title: t("_pages:common.actions.import.dialog.title", {
2483
2512
  entity: t(`_pages:${i}.title`)
2484
2513
  }),
2485
2514
  handleClose: () => {
2486
- u(!1), h(null);
2515
+ l(!1), y(null);
2487
2516
  },
2488
2517
  action: _
2489
2518
  };
@@ -2493,27 +2522,27 @@ const Fn = (e) => {
2493
2522
  entity: n,
2494
2523
  mutationFn: i,
2495
2524
  onError: r,
2496
- onSuccess: o,
2525
+ onSuccess: a,
2497
2526
  onSuccessMessage: c = s("_pages:common.actions.export.successMessage")
2498
- } = e, u = Me({
2527
+ } = e, l = Me({
2499
2528
  mutationFn: () => i(),
2500
- onError: (y) => {
2501
- console.error(y), r && r(y);
2529
+ onError: (h) => {
2530
+ console.error(h), r && r(h);
2502
2531
  },
2503
- onSuccess: async (y) => {
2504
- const f = JSON.stringify(y, null, 2), p = new Blob([f], { type: "application/json" }), _ = URL.createObjectURL(p), C = document.createElement("a");
2505
- C.href = _, C.download = `${n}.json`, C.click(), URL.revokeObjectURL(_), o && o(y), t({
2532
+ onSuccess: async (h) => {
2533
+ const d = JSON.stringify(h, null, 2), p = new Blob([d], { type: "application/json" }), _ = URL.createObjectURL(p), C = document.createElement("a");
2534
+ C.href = _, C.download = `${n}.json`, C.click(), URL.revokeObjectURL(_), a && a(h), t({
2506
2535
  message: c
2507
2536
  });
2508
2537
  }
2509
2538
  }), m = D(() => {
2510
- u.mutate();
2511
- }, [u]), { action: h } = Dr({
2539
+ l.mutate();
2540
+ }, [l]), { action: y } = Dr({
2512
2541
  onClick: m,
2513
- isLoading: u.isPending
2542
+ isLoading: l.isPending
2514
2543
  });
2515
2544
  return {
2516
- action: h
2545
+ action: y
2517
2546
  };
2518
2547
  };
2519
2548
  function Ir(e) {
@@ -2553,18 +2582,18 @@ const Pr = (e) => {
2553
2582
  addOptions: n,
2554
2583
  filterOptions: i,
2555
2584
  actions: r,
2556
- queryKey: o,
2585
+ queryKey: a,
2557
2586
  isLoading: c = !1,
2558
- isAnimated: u = !0,
2587
+ isAnimated: l = !0,
2559
2588
  showBackButton: m = !1
2560
- } = e, { t: h } = V(), { countOfFilters: y } = $s(), f = Ae(() => {
2589
+ } = e, { t: y } = V(), { countOfFilters: h } = $s(), d = Ae(() => {
2561
2590
  const p = Array.isArray(r) ? [...r] : [];
2562
- if (o) {
2591
+ if (a) {
2563
2592
  const _ = {
2564
2593
  id: _e.Refresh,
2565
- onClick: () => pe.invalidateQueries({ queryKey: o }),
2594
+ onClick: () => pe.invalidateQueries({ queryKey: a }),
2566
2595
  icon: /* @__PURE__ */ g(ce, { icon: Bt }),
2567
- tooltip: h("_pages:common.actions.refresh.text")
2596
+ tooltip: y("_pages:common.actions.refresh.text")
2568
2597
  };
2569
2598
  p.unshift(_);
2570
2599
  }
@@ -2584,25 +2613,25 @@ const Pr = (e) => {
2584
2613
  children: /* @__PURE__ */ g(
2585
2614
  Ls,
2586
2615
  {
2587
- className: `${y > 0 ? "show" : "hide"} `,
2588
- count: y
2616
+ className: `${h > 0 ? "show" : "hide"} `,
2617
+ count: h
2589
2618
  }
2590
2619
  )
2591
2620
  };
2592
2621
  p.push(_);
2593
2622
  }
2594
2623
  return p;
2595
- }, [r, n, y, i, o, h]);
2624
+ }, [r, n, h, i, a, y]);
2596
2625
  return /* @__PURE__ */ T("main", { className: "page-main", children: [
2597
2626
  /* @__PURE__ */ g(
2598
2627
  Pr,
2599
2628
  {
2600
2629
  showBackButton: m,
2601
- actions: f,
2630
+ actions: d,
2602
2631
  title: t
2603
2632
  }
2604
2633
  ),
2605
- /* @__PURE__ */ g("div", { className: `page-main-content ${u ? "appear" : ""}`, children: c ? /* @__PURE__ */ g(xe, { className: "page-loading" }) : s }),
2634
+ /* @__PURE__ */ g("div", { className: `page-main-content ${l ? "appear" : ""}`, children: c ? /* @__PURE__ */ g(xe, { className: "page-loading" }) : s }),
2606
2635
  n && /* @__PURE__ */ g(
2607
2636
  Se,
2608
2637
  {
@@ -2623,11 +2652,11 @@ const Pr = (e) => {
2623
2652
  itemClassName: n = "",
2624
2653
  loading: i = !1,
2625
2654
  emptyComponent: r = null,
2626
- emptyMessage: o = t("_accessibility:messages.empty"),
2655
+ emptyMessage: a = t("_accessibility:messages.empty"),
2627
2656
  renderComponent: c,
2628
- data: u = []
2657
+ data: l = []
2629
2658
  } = e;
2630
- return i ? /* @__PURE__ */ g(xe, {}) : /* @__PURE__ */ g(Ve, { children: u != null && u.length ? /* @__PURE__ */ g("ul", { className: `pretty-grid-main ${s}`, children: u == null ? void 0 : u.map((m) => /* @__PURE__ */ g("li", { className: `pretty-grid-item ${n}`, children: c(m) }, m.id)) }) : /* @__PURE__ */ g(Ve, { children: r || /* @__PURE__ */ g(jr, { message: o }) }) });
2659
+ return i ? /* @__PURE__ */ g(xe, {}) : /* @__PURE__ */ g(Ve, { children: l != null && l.length ? /* @__PURE__ */ g("ul", { className: `pretty-grid-main ${s}`, children: l == null ? void 0 : l.map((m) => /* @__PURE__ */ g("li", { className: `pretty-grid-item ${n}`, children: c(m) }, m.id)) }) : /* @__PURE__ */ g(Ve, { children: r || /* @__PURE__ */ g(jr, { message: a }) }) });
2631
2660
  }, Or = () => {
2632
2661
  const [e, t] = X(Nt());
2633
2662
  return le(() => {
@@ -2647,15 +2676,15 @@ function Dn(e) {
2647
2676
  showClock: n = !0,
2648
2677
  showSearch: i = !0,
2649
2678
  menuButtonProps: r
2650
- } = e, { searchComponent: o, location: c } = Re(), [u, m] = X(!1), h = D((f) => {
2651
- (ar() ? f.metaKey : f.ctrlKey) && f.shiftKey && f.key.toLowerCase() === "f" && (m(!0), f.preventDefault());
2679
+ } = e, { searchComponent: a, location: c } = Re(), [l, m] = X(!1), y = D((d) => {
2680
+ (ar() ? d.metaKey : d.ctrlKey) && d.shiftKey && d.key.toLowerCase() === "f" && (m(!0), d.preventDefault());
2652
2681
  }, []);
2653
- le(() => (window.addEventListener("keydown", h), () => {
2654
- window.removeEventListener("keydown", h);
2655
- }), [h]);
2656
- const y = o;
2682
+ le(() => (window.addEventListener("keydown", y), () => {
2683
+ window.removeEventListener("keydown", y);
2684
+ }), [y]);
2685
+ const h = a;
2657
2686
  return /* @__PURE__ */ T(Ve, { children: [
2658
- c.pathname !== "/" && !!y && /* @__PURE__ */ g(y, { open: u, onClose: () => m(!1) }),
2687
+ c.pathname !== "/" && !!h && /* @__PURE__ */ g(h, { open: l, onClose: () => m(!1) }),
2659
2688
  /* @__PURE__ */ T("header", { id: "header", className: "header", children: [
2660
2689
  /* @__PURE__ */ T("div", { className: "navbar-left", children: [
2661
2690
  /* @__PURE__ */ g(
@@ -2664,9 +2693,9 @@ function Dn(e) {
2664
2693
  ...r,
2665
2694
  type: (r == null ? void 0 : r.type) ?? "button",
2666
2695
  icon: (r == null ? void 0 : r.icon) ?? Qs,
2667
- onClick: (f) => {
2696
+ onClick: (d) => {
2668
2697
  var p;
2669
- (p = r == null ? void 0 : r.onClick) == null || p.call(r, f), s();
2698
+ (p = r == null ? void 0 : r.onClick) == null || p.call(r, d), s();
2670
2699
  },
2671
2700
  name: (r == null ? void 0 : r.name) ?? t("_accessibility:buttons.openMenu"),
2672
2701
  "aria-label": (r == null ? void 0 : r["aria-label"]) ?? t("_accessibility:ariaLabels.openMenu"),
@@ -2694,44 +2723,44 @@ var rt, Rt;
2694
2723
  function Mr() {
2695
2724
  if (Rt) return rt;
2696
2725
  Rt = 1;
2697
- const e = (c, u = "local", m = void 0) => {
2698
- if (u === "local") {
2726
+ const e = (c, l = "local", m = void 0) => {
2727
+ if (l === "local") {
2699
2728
  if (localStorage.getItem(c) !== void 0 && localStorage.getItem(c) !== "undefined" && localStorage.getItem(c) !== null)
2700
2729
  return m === void 0 || m !== void 0 && localStorage.getItem(c) === m;
2701
- } else if (u === "session" && sessionStorage.getItem(c) !== void 0 && sessionStorage.getItem(c) !== "undefined" && sessionStorage.getItem(c) !== null)
2730
+ } else if (l === "session" && sessionStorage.getItem(c) !== void 0 && sessionStorage.getItem(c) !== "undefined" && sessionStorage.getItem(c) !== null)
2702
2731
  return m === void 0 || m !== void 0 && sessionStorage.getItem(c) === m;
2703
2732
  return !1;
2704
2733
  }, t = (c) => {
2705
- const u = {};
2706
- return c.substring(1).split("&").forEach((h) => {
2707
- const [y, f] = h.split("=");
2708
- u[y] = f;
2709
- }), u;
2734
+ const l = {};
2735
+ return c.substring(1).split("&").forEach((y) => {
2736
+ const [h, d] = y.split("=");
2737
+ l[h] = d;
2738
+ }), l;
2710
2739
  }, s = (c = "") => {
2711
2740
  if (r(c) && c.length) return r(c);
2712
2741
  {
2713
- let u = navigator.language || navigator.userLanguage;
2714
- if (u.indexOf("en") < 0 && u.indexOf("es") < 0 && (u = "en-US"), u = u.split("-")[0], u)
2715
- return c.length && i(c, 730, u), u;
2742
+ let l = navigator.language || navigator.userLanguage;
2743
+ if (l.indexOf("en") < 0 && l.indexOf("es") < 0 && (l = "en-US"), l = l.split("-")[0], l)
2744
+ return c.length && i(c, 730, l), l;
2716
2745
  }
2717
2746
  return "en";
2718
- }, n = (c = 0, u = 0, m = window, h = "smooth") => m.scroll({
2747
+ }, n = (c = 0, l = 0, m = window, y = "smooth") => m.scroll({
2719
2748
  top: c,
2720
- left: u,
2721
- behavior: h
2722
- }), i = (c, u, m, h = "/", y = "Lax") => {
2723
- var f = /* @__PURE__ */ new Date();
2724
- f.setTime(f.getTime() + u * 24 * 60 * 60 * 1e3);
2725
- const p = "; expires=" + f.toUTCString();
2726
- document.cookie = `${c}=${m || ""}${p};path=${h};SameSite=${y}`;
2749
+ left: l,
2750
+ behavior: y
2751
+ }), i = (c, l, m, y = "/", h = "Lax") => {
2752
+ var d = /* @__PURE__ */ new Date();
2753
+ d.setTime(d.getTime() + l * 24 * 60 * 60 * 1e3);
2754
+ const p = "; expires=" + d.toUTCString();
2755
+ document.cookie = `${c}=${m || ""}${p};path=${y};SameSite=${h}`;
2727
2756
  }, r = (c) => {
2728
- const u = `${c}=`, h = decodeURIComponent(document.cookie).split(";");
2729
- for (let y = 0; y < h.length; y += 1) {
2730
- let f = h[y];
2731
- for (; f.charAt(0) === " "; )
2732
- f = f.substring(1);
2733
- if (f.indexOf(u) === 0)
2734
- return f.substring(u.length, f.length);
2757
+ const l = `${c}=`, y = decodeURIComponent(document.cookie).split(";");
2758
+ for (let h = 0; h < y.length; h += 1) {
2759
+ let d = y[h];
2760
+ for (; d.charAt(0) === " "; )
2761
+ d = d.substring(1);
2762
+ if (d.indexOf(l) === 0)
2763
+ return d.substring(l.length, d.length);
2735
2764
  }
2736
2765
  return "";
2737
2766
  };
@@ -2795,79 +2824,79 @@ function In() {
2795
2824
  Is(() => {
2796
2825
  r.current = n;
2797
2826
  });
2798
- const o = Ie(null), c = D(
2799
- (u) => {
2827
+ const a = Ie(null), c = D(
2828
+ (l) => {
2800
2829
  i(
2801
- (m) => u !== void 0 ? m.map((h) => h.id === u ? { ...h, closing: !0 } : h) : m.map((h) => ({ ...h, closing: !0 }))
2802
- ), u !== void 0 ? setTimeout(() => {
2803
- s(u), i((m) => m.filter((h) => h.id !== u));
2804
- }, Be) : (o.current && clearTimeout(o.current), o.current = setTimeout(() => {
2805
- s(), i([]), o.current = null;
2830
+ (m) => l !== void 0 ? m.map((y) => y.id === l ? { ...y, closing: !0 } : y) : m.map((y) => ({ ...y, closing: !0 }))
2831
+ ), l !== void 0 ? setTimeout(() => {
2832
+ s(l), i((m) => m.filter((y) => y.id !== l));
2833
+ }, Be) : (a.current && clearTimeout(a.current), a.current = setTimeout(() => {
2834
+ s(), i([]), a.current = null;
2806
2835
  }, Be));
2807
2836
  },
2808
2837
  [s]
2809
2838
  );
2810
2839
  return le(() => {
2811
- let u = null;
2840
+ let l = null;
2812
2841
  const m = () => {
2813
- u && clearTimeout(u), o.current && (clearTimeout(o.current), o.current = null);
2842
+ l && clearTimeout(l), a.current && (clearTimeout(a.current), a.current = null);
2814
2843
  };
2815
2844
  if (t.length === 0)
2816
- return r.current.length === 0 ? void 0 : (o.current && clearTimeout(o.current), u = setTimeout(() => {
2817
- i((p) => p.map((_) => ({ ..._, closing: !0 }))), u = null;
2818
- }, 0), o.current = setTimeout(() => {
2819
- i([]), o.current = null;
2845
+ return r.current.length === 0 ? void 0 : (a.current && clearTimeout(a.current), l = setTimeout(() => {
2846
+ i((p) => p.map((_) => ({ ..._, closing: !0 }))), l = null;
2847
+ }, 0), a.current = setTimeout(() => {
2848
+ i([]), a.current = null;
2820
2849
  }, Be), m);
2821
- const h = new Set(r.current.map((p) => p.id));
2850
+ const y = new Set(r.current.map((p) => p.id));
2822
2851
  if (!t.some(
2823
- (p) => p.id !== void 0 && !h.has(p.id)
2852
+ (p) => p.id !== void 0 && !y.has(p.id)
2824
2853
  )) return;
2825
2854
  if (r.current.length === 0) {
2826
2855
  const p = [...t];
2827
- return u = setTimeout(() => {
2828
- i(p.map((_) => ({ ..._, closing: !1 }))), u = null;
2856
+ return l = setTimeout(() => {
2857
+ i(p.map((_) => ({ ..._, closing: !1 }))), l = null;
2829
2858
  }, 0), () => {
2830
- u && clearTimeout(u);
2859
+ l && clearTimeout(l);
2831
2860
  };
2832
2861
  }
2833
- o.current && clearTimeout(o.current), u = setTimeout(() => {
2862
+ a.current && clearTimeout(a.current), l = setTimeout(() => {
2834
2863
  i(
2835
2864
  (p) => p.every((_) => _.closing) ? p : p.map((_) => ({ ..._, closing: !0 }))
2836
- ), u = null;
2865
+ ), l = null;
2837
2866
  }, 0);
2838
- const f = [...t];
2839
- return o.current = setTimeout(() => {
2840
- i(f.map((p) => ({ ...p, closing: !1 }))), o.current = null;
2867
+ const d = [...t];
2868
+ return a.current = setTimeout(() => {
2869
+ i(d.map((p) => ({ ...p, closing: !1 }))), a.current = null;
2841
2870
  }, Be), m;
2842
2871
  }, [t]), le(() => {
2843
2872
  if (!n.length) return;
2844
- let u;
2873
+ let l;
2845
2874
  const m = window.setTimeout(() => {
2846
- u = () => c(), window.addEventListener("click", u);
2847
- }, 0), h = (y) => {
2848
- y.key === "Escape" && c();
2875
+ l = () => c(), window.addEventListener("click", l);
2876
+ }, 0), y = (h) => {
2877
+ h.key === "Escape" && c();
2849
2878
  };
2850
- return window.addEventListener("keydown", h), () => {
2851
- window.clearTimeout(m), u && window.removeEventListener("click", u), window.removeEventListener("keydown", h);
2879
+ return window.addEventListener("keydown", y), () => {
2880
+ window.clearTimeout(m), l && window.removeEventListener("click", l), window.removeEventListener("keydown", y);
2852
2881
  };
2853
2882
  }, [n.length, c]), Kt(
2854
- /* @__PURE__ */ g("div", { className: `notification-portal ${n.length ? "active" : ""}`, children: n.map(({ id: u, type: m, message: h, closing: y }) => {
2855
- const f = Ur(m);
2883
+ /* @__PURE__ */ g("div", { className: `notification-portal ${n.length ? "active" : ""}`, children: n.map(({ id: l, type: m, message: y, closing: h }) => {
2884
+ const d = Ur(m);
2856
2885
  return /* @__PURE__ */ T(
2857
2886
  "div",
2858
2887
  {
2859
- className: `notification ${y ? "closing" : ""} ${Hr(f)}`,
2888
+ className: `notification ${h ? "closing" : ""} ${Hr(d)}`,
2860
2889
  onClick: (p) => p.stopPropagation(),
2861
2890
  children: [
2862
2891
  /* @__PURE__ */ T("div", { className: "notification-body", children: [
2863
2892
  /* @__PURE__ */ g(
2864
2893
  ce,
2865
2894
  {
2866
- icon: qr(f),
2867
- className: `notification-icon ${nt(f)}`
2895
+ icon: qr(d),
2896
+ className: `notification-icon ${nt(d)}`
2868
2897
  }
2869
2898
  ),
2870
- /* @__PURE__ */ g("p", { className: `notification-text ${nt(f)}`, children: h })
2899
+ /* @__PURE__ */ g("p", { className: `notification-text ${nt(d)}`, children: y })
2871
2900
  ] }),
2872
2901
  /* @__PURE__ */ g(
2873
2902
  Se,
@@ -2877,16 +2906,16 @@ function In() {
2877
2906
  color: "error",
2878
2907
  className: "notification-close group",
2879
2908
  onClick: (p) => {
2880
- p.stopPropagation(), u !== void 0 && c(u);
2909
+ p.stopPropagation(), l !== void 0 && c(l);
2881
2910
  },
2882
- iconClassName: `${nt(f)} notification-close-icon`,
2911
+ iconClassName: `${nt(d)} notification-close-icon`,
2883
2912
  name: e("_accessibility:buttons.closeNotification"),
2884
2913
  "aria-label": e("_accessibility:ariaLabels.closeNotification")
2885
2914
  }
2886
2915
  )
2887
2916
  ]
2888
2917
  },
2889
- u
2918
+ l
2890
2919
  );
2891
2920
  }) }),
2892
2921
  document.body
@@ -2897,9 +2926,9 @@ function Pn(e) {
2897
2926
  return /* @__PURE__ */ g("div", { className: "splash-screen", children: /* @__PURE__ */ g(xe, { className: `blur-appear ${t ? ` ${t}` : ""}`, ...s }) });
2898
2927
  }
2899
2928
  const Br = (e) => {
2900
- const { id: t, active: s, onClick: n, children: i, to: r } = e, { linkComponent: o } = Re();
2929
+ const { id: t, active: s, onClick: n, children: i, to: r } = e, { linkComponent: a } = Re();
2901
2930
  return /* @__PURE__ */ g(
2902
- o,
2931
+ a,
2903
2932
  {
2904
2933
  to: r ?? `#${t}`,
2905
2934
  onClick: () => n(),
@@ -2908,27 +2937,27 @@ const Br = (e) => {
2908
2937
  }
2909
2938
  );
2910
2939
  }, Qr = (e) => {
2911
- var u;
2940
+ var l;
2912
2941
  const {
2913
2942
  tabs: t = [],
2914
2943
  defaultTab: s,
2915
2944
  className: n = "",
2916
2945
  tabsContainerClassName: i = ""
2917
- } = e, [r, o] = X(s ?? ((u = t[0]) == null ? void 0 : u.id)), c = Ae(() => t.find((m) => m.id === r), [t, r]);
2946
+ } = e, [r, a] = X(s ?? ((l = t[0]) == null ? void 0 : l.id)), c = Ae(() => t.find((m) => m.id === r), [t, r]);
2918
2947
  return /* @__PURE__ */ T("div", { className: `tabs-layout-main ${n}`, children: [
2919
2948
  /* @__PURE__ */ g(
2920
2949
  "ul",
2921
2950
  {
2922
2951
  className: `horizontal tabs tabs-container ${i}`,
2923
- children: t.map(({ id: m, to: h, label: y }) => /* @__PURE__ */ g("li", { children: /* @__PURE__ */ g(
2952
+ children: t.map(({ id: m, to: y, label: h }) => /* @__PURE__ */ g("li", { children: /* @__PURE__ */ g(
2924
2953
  Br,
2925
2954
  {
2926
- onClick: () => o(m),
2955
+ onClick: () => a(m),
2927
2956
  id: m,
2928
- to: h ?? "",
2957
+ to: y ?? "",
2929
2958
  siblings: t.length > 1,
2930
2959
  active: r === m,
2931
- children: y
2960
+ children: h
2932
2961
  }
2933
2962
  ) }, m))
2934
2963
  }
@@ -2942,11 +2971,11 @@ const Br = (e) => {
2942
2971
  image: n = "",
2943
2972
  alt: i = "",
2944
2973
  final: r = !1
2945
- } = e, { setGuestMode: o } = Zt(), { navigate: c } = Re(), { t: u } = V();
2974
+ } = e, { setGuestMode: a } = Zt(), { navigate: c } = Re(), { t: l } = V();
2946
2975
  return /* @__PURE__ */ T("div", { className: "big-appear step-container", children: [
2947
2976
  n && /* @__PURE__ */ g("img", { src: n, alt: i }),
2948
- /* @__PURE__ */ g("h2", { className: "step-title", children: u(`_pages:onboarding.${t}.title`) }),
2949
- /* @__PURE__ */ g("p", { className: "step-body", children: u(`_pages:onboarding.${t}.body`) }),
2977
+ /* @__PURE__ */ g("h2", { className: "step-title", children: l(`_pages:onboarding.${t}.title`) }),
2978
+ /* @__PURE__ */ g("p", { className: "step-body", children: l(`_pages:onboarding.${t}.body`) }),
2950
2979
  /* @__PURE__ */ g("div", { className: "step-actions", children: r ? /* @__PURE__ */ T(Ve, { children: [
2951
2980
  /* @__PURE__ */ g(
2952
2981
  we,
@@ -2955,10 +2984,10 @@ const Br = (e) => {
2955
2984
  className: "step-button",
2956
2985
  variant: "outlined",
2957
2986
  onClick: () => {
2958
- o(!0), c("/");
2987
+ a(!0), c("/");
2959
2988
  },
2960
- "aria-label": u("_accessibility:ariaLabels.start"),
2961
- children: u("_accessibility:buttons.startAsGuest")
2989
+ "aria-label": l("_accessibility:ariaLabels.start"),
2990
+ children: l("_accessibility:buttons.startAsGuest")
2962
2991
  }
2963
2992
  ),
2964
2993
  /* @__PURE__ */ g(
@@ -2967,9 +2996,9 @@ const Br = (e) => {
2967
2996
  color: "primary",
2968
2997
  variant: "submit",
2969
2998
  className: "step-button",
2970
- "aria-label": u("_accessibility:ariaLabels.start"),
2999
+ "aria-label": l("_accessibility:ariaLabels.start"),
2971
3000
  onClick: () => c("/auth/sign-in"),
2972
- children: u("_accessibility:buttons.signIn")
3001
+ children: l("_accessibility:buttons.signIn")
2973
3002
  }
2974
3003
  )
2975
3004
  ] }) : /* @__PURE__ */ T(Ve, { children: [
@@ -2980,8 +3009,8 @@ const Br = (e) => {
2980
3009
  className: "step-button",
2981
3010
  variant: "outlined",
2982
3011
  onClick: () => c("/auth/sign-in"),
2983
- "aria-label": u("_accessibility:ariaLabels.skip"),
2984
- children: u("_accessibility:buttons.skip")
3012
+ "aria-label": l("_accessibility:ariaLabels.skip"),
3013
+ children: l("_accessibility:buttons.skip")
2985
3014
  }
2986
3015
  ),
2987
3016
  /* @__PURE__ */ g(
@@ -2991,21 +3020,21 @@ const Br = (e) => {
2991
3020
  className: "step-button",
2992
3021
  variant: "outlined",
2993
3022
  onClick: () => s(),
2994
- "aria-label": u("_accessibility:ariaLabels.next"),
2995
- children: u("_accessibility:buttons.next")
3023
+ "aria-label": l("_accessibility:ariaLabels.next"),
3024
+ children: l("_accessibility:buttons.next")
2996
3025
  }
2997
3026
  )
2998
3027
  ] }) })
2999
3028
  ] });
3000
3029
  }, On = (e) => {
3001
- const { steps: t } = e, [s, n] = X(1), i = Ae(() => t.map((r, o) => ({
3002
- id: o + 1,
3030
+ const { steps: t } = e, [s, n] = X(1), i = Ae(() => t.map((r, a) => ({
3031
+ id: a + 1,
3003
3032
  label: "",
3004
3033
  content: /* @__PURE__ */ g(
3005
3034
  Kr,
3006
3035
  {
3007
3036
  translation: r,
3008
- final: o === t.length - 1,
3037
+ final: a === t.length - 1,
3009
3038
  onClickNext: () => n((c) => c + 1)
3010
3039
  }
3011
3040
  )