biblio-react 3.0.62 → 3.0.64

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.
package/dist/index.js CHANGED
@@ -121,9 +121,9 @@ import { SimpleTreeView as Gp } from "@mui/x-tree-view/SimpleTreeView";
121
121
  import { TreeItem as Ms } from "@mui/x-tree-view/TreeItem";
122
122
  import Hp from "@mui/icons-material/Groups";
123
123
  const jp = wr((e, t) => {
124
- const o = he(), { onClose: r } = Nd(), a = Sr(), s = a.form_275, c = a.form_59;
124
+ const o = he(), { onClose: r } = Nd(), s = Sr(), a = s.form_275, c = s.form_59;
125
125
  return [
126
- s ? /* @__PURE__ */ Qn(
126
+ a ? /* @__PURE__ */ Qn(
127
127
  et,
128
128
  {
129
129
  component: ir,
@@ -173,20 +173,20 @@ const jp = wr((e, t) => {
173
173
  t && /* @__PURE__ */ i(Y, { component: "span", sx: { flex: 1 } })
174
174
  ] });
175
175
  }, "CustomAppBar"), Tl = ct(), _o = /* @__PURE__ */ n(({ children: e }) => {
176
- const [t, o] = te(!1), [r, a] = te(""), s = de(
176
+ const [t, o] = te(!1), [r, s] = te(""), a = de(
177
177
  () => ({
178
178
  open: t,
179
179
  mensaje: r,
180
180
  show: /* @__PURE__ */ n((c = "") => {
181
- a(c), o(!0);
181
+ s(c), o(!0);
182
182
  }, "show"),
183
183
  hide: /* @__PURE__ */ n(() => {
184
- o(!1), a("");
184
+ o(!1), s("");
185
185
  }, "hide")
186
186
  }),
187
- [t, r, o, a]
187
+ [t, r, o, s]
188
188
  );
189
- return /* @__PURE__ */ i(Tl.Provider, { value: s, children: e });
189
+ return /* @__PURE__ */ i(Tl.Provider, { value: a, children: e });
190
190
  }, "ProgressProvider"), Co = /* @__PURE__ */ n(() => we(Tl), "useFormProgress"), lr = ct(), cr = ct(0), Kp = /* @__PURE__ */ n((e, t) => {
191
191
  for (let o = e.length - 1; o >= 0; o -= 1)
192
192
  if (t(e[o], o))
@@ -207,18 +207,18 @@ const jp = wr((e, t) => {
207
207
  }
208
208
  return null;
209
209
  }, "getHideMatcher"), Fs = /* @__PURE__ */ n(({ children: e, isolate: t = !1 }) => {
210
- const o = we(lr), [r, a] = te([]), [s, c] = te(null), l = r.length > 0, d = r[r.length - 1] || {}, p = de(
210
+ const o = we(lr), [r, s] = te([]), [a, c] = te(null), l = r.length > 0, d = r[r.length - 1] || {}, p = de(
211
211
  () => ({
212
212
  open: l,
213
213
  props: d,
214
214
  stack: r,
215
- hostId: s,
215
+ hostId: a,
216
216
  registerHost: /* @__PURE__ */ n((u) => c((m) => m === null ? u : m), "registerHost"),
217
217
  unregisterHost: /* @__PURE__ */ n((u) => c((m) => m === u ? null : m), "unregisterHost"),
218
218
  show: /* @__PURE__ */ n((u) => {
219
- a((m) => [...m, u]);
219
+ s((m) => [...m, u]);
220
220
  }, "show"),
221
- hide: /* @__PURE__ */ n((u) => a((m) => {
221
+ hide: /* @__PURE__ */ n((u) => s((m) => {
222
222
  if (!m.length)
223
223
  return m;
224
224
  const h = Yp(u);
@@ -228,7 +228,7 @@ const jp = wr((e, t) => {
228
228
  return Xp(m, f);
229
229
  }), "hide")
230
230
  }),
231
- [l, d, r, s]
231
+ [l, d, r, a]
232
232
  );
233
233
  return o && !t ? e : /* @__PURE__ */ i(lr.Provider, { value: p, children: e });
234
234
  }, "AsistenteProvider"), It = /* @__PURE__ */ n(() => we(lr), "useAsistente"), Ps = !1, Is = "mui", kl = ct(), Rs = /* @__PURE__ */ n(({
@@ -236,8 +236,8 @@ const jp = wr((e, t) => {
236
236
  hasSeleccionMultiple: t,
237
237
  chkSeleccion: o,
238
238
  handleSeleccionMultiple: r,
239
- hideViewModeMenu: a = !1,
240
- hideGridToolbarActions: s = !0,
239
+ hideViewModeMenu: s = !1,
240
+ hideGridToolbarActions: a = !0,
241
241
  children: c
242
242
  }) => {
243
243
  const l = _e(null), d = _e(null), p = _e(null), [u, m] = te({
@@ -264,8 +264,8 @@ const jp = wr((e, t) => {
264
264
  hasSeleccionMultiple: t,
265
265
  chkSeleccion: o,
266
266
  handleSeleccionMultiple: r,
267
- hideViewModeMenu: a,
268
- hideGridToolbarActions: s,
267
+ hideViewModeMenu: s,
268
+ hideGridToolbarActions: a,
269
269
  filterActionsContainerRef: l,
270
270
  actionsContainerRef: d,
271
271
  gridContainerRef: p,
@@ -281,8 +281,8 @@ const jp = wr((e, t) => {
281
281
  t,
282
282
  o,
283
283
  r,
284
- a,
285
284
  s,
285
+ a,
286
286
  l,
287
287
  d,
288
288
  p,
@@ -293,11 +293,11 @@ const jp = wr((e, t) => {
293
293
  ]
294
294
  );
295
295
  return /* @__PURE__ */ i(kl.Provider, { value: P, children: c });
296
- }, "GrillaEtriekProvider"), Gt = /* @__PURE__ */ n(() => we(kl), "useGrillaEtriek"), Jp = /* @__PURE__ */ n((e, t, o, r, a) => ({
296
+ }, "GrillaEtriekProvider"), Gt = /* @__PURE__ */ n(() => we(kl), "useGrillaEtriek"), Jp = /* @__PURE__ */ n((e, t, o, r, s) => ({
297
297
  type: "RELOAD_CB",
298
298
  payload: {
299
299
  id: e,
300
- scope: a,
300
+ scope: s,
301
301
  method: t,
302
302
  params: o,
303
303
  callback: r
@@ -346,16 +346,16 @@ const jp = wr((e, t) => {
346
346
  }), "clearReduxScopeAction");
347
347
  let Ts = 0;
348
348
  const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createReduxScope"), Br = /* @__PURE__ */ n((e, t, o) => Array.isArray(e) && e.find((r) => r?.id === t && r?.scope === o) || null, "findReduxScopedItem"), Lr = ct({}), $o = ct(void 0), tn = ct(), $r = /* @__PURE__ */ n(({ value: e, children: t }) => {
349
- const o = Ge()?.control, [r, a] = te({}), s = zt(), c = e.scopeIdentity ?? e.estado ?? "ficha", l = _e(c), [d, p] = te(
349
+ const o = Ge()?.control, [r, s] = te({}), a = zt(), c = e.scopeIdentity ?? e.estado ?? "ficha", l = _e(c), [d, p] = te(
350
350
  () => ur("ficha")
351
351
  );
352
352
  ie(() => {
353
- l.current !== c && (l.current = c, s(dr(d)), a({}), p(ur("ficha")));
354
- }, [s, d, c]), ie(
353
+ l.current !== c && (l.current = c, a(dr(d)), s({}), p(ur("ficha")));
354
+ }, [a, d, c]), ie(
355
355
  () => () => {
356
- s(dr(d));
356
+ a(dr(d));
357
357
  },
358
- [s, d]
358
+ [a, d]
359
359
  );
360
360
  const u = de(
361
361
  () => ({
@@ -369,12 +369,12 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
369
369
  parentFormControl: o,
370
370
  propsContenidos: r,
371
371
  setPropsContenidos: /* @__PURE__ */ n((m) => {
372
- a((h) => ({ ...h, ...m }));
372
+ s((h) => ({ ...h, ...m }));
373
373
  }, "setPropsContenidos")
374
374
  }),
375
375
  [
376
376
  r,
377
- a,
377
+ s,
378
378
  e.estado,
379
379
  e.initialValues,
380
380
  e.isLoading,
@@ -396,8 +396,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
396
396
  const { source: t } = e, {
397
397
  estado: o,
398
398
  isLoading: r,
399
- fichaProps: a = {},
400
- propsContenidos: s = {}
399
+ fichaProps: s = {},
400
+ propsContenidos: a = {}
401
401
  } = Re(), l = we($o) !== void 0, d = Rt(), p = Tr(($e) => Br($e.configInputs, t, d)), {
402
402
  conts: u = []
403
403
  //user = [],
@@ -415,7 +415,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
415
415
  } = p || {}, y = de(
416
416
  () => typeof P == "function" ? P : P === void 0 ? void 0 : () => P,
417
417
  [P]
418
- ), { [t]: F = {} } = a, { [t]: M = {} } = s, {
418
+ ), { [t]: F = {} } = s, { [t]: M = {} } = a, {
419
419
  onFocus: I,
420
420
  onChange: k,
421
421
  onBlur: _,
@@ -499,8 +499,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
499
499
  };
500
500
  }, "useContenidoController"), im = /* @__PURE__ */ n((e) => e.split("_")[1], "getFormcodFromResource"), rm = /^\d{2}\/\d{2}\/\d{4}$/, ni = /* @__PURE__ */ n((e) => {
501
501
  if (!(e instanceof Date) || isNaN(e.getDate())) return "";
502
- const t = "00", o = e.getFullYear().toString(), r = (e.getMonth() + 1).toString(), a = e.getDate().toString();
503
- return `${o}-${(t + r).slice(-2)}-${(t + a).slice(-2)}`;
502
+ const t = "00", o = e.getFullYear().toString(), r = (e.getMonth() + 1).toString(), s = e.getDate().toString();
503
+ return `${o}-${(t + r).slice(-2)}-${(t + s).slice(-2)}`;
504
504
  }, "convertDateToString$2"), Bx = /* @__PURE__ */ n((e) => {
505
505
  if (e == null || e === "")
506
506
  return "";
@@ -552,8 +552,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
552
552
  record: t,
553
553
  hasEdit: o,
554
554
  hasShow: r,
555
- hasList: a,
556
- resource: s,
555
+ hasList: s,
556
+ resource: a,
557
557
  totalPages: c,
558
558
  showFilter: l,
559
559
  setSort: d,
@@ -590,15 +590,15 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
590
590
  className: t,
591
591
  data: o,
592
592
  hasShow: r,
593
- ...a
593
+ ...s
594
594
  }) => {
595
- const s = v.Children.toArray(e);
596
- return !r && s.length === 0 ? null : /* @__PURE__ */ R(
595
+ const a = v.Children.toArray(e);
596
+ return !r && a.length === 0 ? null : /* @__PURE__ */ R(
597
597
  Ea,
598
598
  {
599
599
  className: t,
600
600
  sx: { flex: "0 0 auto", flexShrink: 0, flexGrow: 0 },
601
- ...am(a),
601
+ ...am(s),
602
602
  children: [
603
603
  e,
604
604
  r && /* @__PURE__ */ i(Hd, { record: o })
@@ -608,8 +608,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
608
608
  }, "FichaActions"), _l = Gd(), Hx = _l, jx = { inputFormat: "dd/MM/yyyy" }, qx = /* @__PURE__ */ n((e) => (t, o) => {
609
609
  const r = o[e];
610
610
  if (t && r) {
611
- const a = new Date(r.split("/").reverse().join("/")), s = new Date(t.split("/").reverse().join("/"));
612
- if (Ku(a, s))
611
+ const s = new Date(r.split("/").reverse().join("/")), a = new Date(t.split("/").reverse().join("/"));
612
+ if (Ku(s, a))
613
613
  return {
614
614
  message: "validation.greater_or_equal",
615
615
  args: { menor: r }
@@ -639,8 +639,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
639
639
  return new Date(r, o - 1, t);
640
640
  }, "stringToDate"), Jx = /* @__PURE__ */ n((e) => {
641
641
  if (!e) return "";
642
- const [t, o] = e.split(" "), [r, a, s] = t.split("/").map(Number), [c, l] = o.split(":").map(Number);
643
- return new Date(s, a - 1, r, c, l);
642
+ const [t, o] = e.split(" "), [r, s, a] = t.split("/").map(Number), [c, l] = o.split(":").map(Number);
643
+ return new Date(a, s - 1, r, c, l);
644
644
  }, "stringToDateTime"), Qx = /* @__PURE__ */ n((e) => {
645
645
  if (!e) return "";
646
646
  const t = e?.value ?? e;
@@ -657,8 +657,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
657
657
  } else typeof o == "number" && (o = new Date(o));
658
658
  if (!(o instanceof Date) || Number.isNaN(o.getTime()))
659
659
  return String(t);
660
- const r = String(o.getDate()).padStart(2, "0"), a = String(o.getMonth() + 1).padStart(2, "0"), s = String(o.getFullYear());
661
- return `${r}/${a}/${s}`;
660
+ const r = String(o.getDate()).padStart(2, "0"), s = String(o.getMonth() + 1).padStart(2, "0"), a = String(o.getFullYear());
661
+ return `${r}/${s}/${a}`;
662
662
  }, "dateToString"), Zx = /* @__PURE__ */ n((e) => {
663
663
  const t = {
664
664
  day: "2-digit",
@@ -682,10 +682,10 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
682
682
  return !t || o.length === 0 ? !1 : o.some((r) => r === t);
683
683
  }, "estaAccionOculta"), to = /* @__PURE__ */ n((e, t) => El(e, t?.perbot) && !on(e, t?.key), "esAccionVisible"), Ol = /* @__PURE__ */ n(() => {
684
684
  const e = we(Dl), t = di();
685
- return /* @__PURE__ */ n((r, a = {}) => {
686
- const { opcion: s, estado: c, ...l } = a, d = `form_${String(r)}`;
685
+ return /* @__PURE__ */ n((r, s = {}) => {
686
+ const { opcion: a, estado: c, ...l } = s, d = `form_${String(r)}`;
687
687
  let p = d;
688
- s === "F" && (p += c === "N" ? "/create" : `/${l.clave}`), setTimeout(() => {
688
+ a === "F" && (p += c === "N" ? "/create" : `/${l.clave}`), setTimeout(() => {
689
689
  const u = e.current.panels.find(
690
690
  (m) => m.id === `win_${d}`
691
691
  );
@@ -701,8 +701,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
701
701
  }, "useAbrirVentanaSistema"), Bl = /* @__PURE__ */ n(() => {
702
702
  const e = zt(), t = Rt();
703
703
  return ne(
704
- (o, r, a, s) => {
705
- e(Jp(o, r, a, s, t));
704
+ (o, r, s, a) => {
705
+ e(Jp(o, r, s, a, t));
706
706
  },
707
707
  [e, t]
708
708
  );
@@ -757,7 +757,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
757
757
  );
758
758
  };
759
759
  }, "useNotifyEtriek"), dm = /* @__PURE__ */ n((e, t, o = !1) => {
760
- const r = Nt(), a = Bo(), s = Co(), { mutateAsync: c, isPending: l } = Ju({
760
+ const r = Nt(), s = Bo(), a = Co(), { mutateAsync: c, isPending: l } = Ju({
761
761
  mutationFn: /* @__PURE__ */ n((d) => {
762
762
  const { method: p, params: u } = d;
763
763
  return r.getJson(e, {
@@ -767,14 +767,14 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
767
767
  });
768
768
  }, "mutationFn"),
769
769
  ...t,
770
- onError: /* @__PURE__ */ n((d, ...p) => (d?.body?.excepcionNoControlada === !0 && (s?.hide(), t?.onError || a(d.message, { type: "error" })), t?.onError?.(d, ...p)), "onError")
770
+ onError: /* @__PURE__ */ n((d, ...p) => (d?.body?.excepcionNoControlada === !0 && (a?.hide(), t?.onError || s(d.message, { type: "error" })), t?.onError?.(d, ...p)), "onError")
771
771
  });
772
772
  return { mutateAsync: c, isLoading: l };
773
773
  }, "useGetJson"), Nr = /* @__PURE__ */ n((e, t) => {
774
774
  const { mutateAsync: o, isLoading: r } = dm(e, void 0, t);
775
775
  return [ne(
776
- (s, c, l) => o(
777
- { method: s, params: c },
776
+ (a, c, l) => o(
777
+ { method: a, params: c },
778
778
  {
779
779
  onSuccess: l,
780
780
  onError: /* @__PURE__ */ n((d, ...p) => {
@@ -785,26 +785,26 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
785
785
  [o]
786
786
  ), r];
787
787
  }, "useAjax"), zl = ct(), Gl = /* @__PURE__ */ n(({ children: e }) => {
788
- const [t, o] = te({}), r = /* @__PURE__ */ n((s, c) => {
788
+ const [t, o] = te({}), r = /* @__PURE__ */ n((a, c) => {
789
789
  o((l) => ({
790
790
  ...l,
791
- [s]: c
791
+ [a]: c
792
792
  }));
793
- }, "setVisibilidad"), a = de(
793
+ }, "setVisibilidad"), s = de(
794
794
  () => ({
795
795
  hidden: t,
796
796
  setHidden: r
797
797
  }),
798
798
  [t]
799
799
  );
800
- return /* @__PURE__ */ i(zl.Provider, { value: a, children: e });
800
+ return /* @__PURE__ */ i(zl.Provider, { value: s, children: e });
801
801
  }, "FormToolbarProvider"), Hl = /* @__PURE__ */ n(() => we(zl), "useFormToolbar"), jl = /* @__PURE__ */ n((e) => {
802
802
  const t = xe(e), o = fn();
803
803
  return ne(() => {
804
804
  o.refetchQueries({ queryKey: [t], type: "active" });
805
805
  }, [o, t]);
806
806
  }, "useResourceRefresh"), hn = /* @__PURE__ */ n(() => ({}), "useDefaultHook"), xi = /* @__PURE__ */ n((e) => {
807
- const t = oo(), o = gt(), r = Vt(), a = di(), s = Co(), c = xe(e), l = jl(e), d = jd(c), p = It(), u = Gt(), m = he(), h = Ol(), [f] = Nr(c), g = we(Oa), C = Sr(), x = `lista_${c.split("_")[1]}`, { getItem: b } = qd(), P = b(`${x}.selectedIds`), S = b(`${x}.selectedDetails`), y = /* @__PURE__ */ n((F) => {
807
+ const t = oo(), o = gt(), r = Vt(), s = di(), a = Co(), c = xe(e), l = jl(e), d = jd(c), p = It(), u = Gt(), m = he(), h = Ol(), [f] = Nr(c), g = we(Oa), C = Sr(), x = `lista_${c.split("_")[1]}`, { getItem: b } = qd(), P = b(`${x}.selectedIds`), S = b(`${x}.selectedDetails`), y = /* @__PURE__ */ n((F) => {
808
808
  const M = F?.name;
809
809
  !M || C?.[M] || g?.register?.(F);
810
810
  }, "registerResource");
@@ -817,12 +817,12 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
817
817
  selectedDetails: S
818
818
  },
819
819
  notify: o,
820
- navigate: a,
820
+ navigate: s,
821
821
  redirect: r,
822
822
  refresh: l,
823
823
  refetch: t.refetch,
824
824
  resource: c,
825
- progress: s,
825
+ progress: a,
826
826
  unselectAll: d,
827
827
  asistente: p,
828
828
  translate: m,
@@ -830,7 +830,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
830
830
  registerResource: y
831
831
  };
832
832
  }, "useUtilsGrilla"), ey = /* @__PURE__ */ n((e) => {
833
- const t = Bl(), o = Ll(), r = $l(), a = Nl(), s = Vl(), c = Wl(), l = Co(), d = gt(), p = Vt(), u = di(), m = xe(e), h = It(), {
833
+ const t = Bl(), o = Ll(), r = $l(), s = Nl(), a = Vl(), c = Wl(), l = Co(), d = gt(), p = Vt(), u = di(), m = xe(e), h = It(), {
834
834
  propsContenidos: f,
835
835
  setPropsContenidos: g,
836
836
  fichaProps: { etrs: C = {} } = {}
@@ -846,24 +846,24 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
846
846
  ficha: { propsContenidos: f, setPropsContenidos: g },
847
847
  setHidden: o,
848
848
  setDisable: r,
849
- setRequire: a,
850
- setError: s,
849
+ setRequire: s,
850
+ setError: a,
851
851
  setLabel: c,
852
852
  etrs: C,
853
853
  asisEtr: x
854
854
  };
855
855
  }, "useUtilsSubmit"), On = /* @__PURE__ */ new Map(), St = /* @__PURE__ */ n((e) => {
856
- const t = xe(e), o = e?.id ?? "new", r = Rt(), { parentFormControl: a } = Re(), s = r ?? `${t}-${o}`, c = Ge(), l = c?.control === a ? null : c;
856
+ const t = xe(e), o = e?.id ?? "new", r = Rt(), { parentFormControl: s } = Re(), a = r ?? `${t}-${o}`, c = Ge(), l = c?.control === s ? null : c;
857
857
  ie(() => {
858
858
  if (!l) return;
859
- const O = On.get(s) ?? /* @__PURE__ */ new Map(), G = O.get(l.control) ?? { count: 0 };
860
- return G.form = l, G.count += 1, O.set(l.control, G), On.set(s, O), () => {
861
- G.count--, G.count === 0 && O.delete(l.control), O.size === 0 && On.delete(s);
859
+ const O = On.get(a) ?? /* @__PURE__ */ new Map(), G = O.get(l.control) ?? { count: 0 };
860
+ return G.form = l, G.count += 1, O.set(l.control, G), On.set(a, O), () => {
861
+ G.count--, G.count === 0 && O.delete(l.control), O.size === 0 && On.delete(a);
862
862
  };
863
- }, [s, l]);
863
+ }, [a, l]);
864
864
  const d = /* @__PURE__ */ n(() => {
865
865
  if (l) return l;
866
- const O = On.get(s);
866
+ const O = On.get(a);
867
867
  return O?.size === 1 ? O.values().next().value.form : null;
868
868
  }, "getForm"), p = /* @__PURE__ */ n((...O) => d()?.trigger?.(...O), "trigger"), u = /* @__PURE__ */ n((O) => (G, Q) => {
869
869
  O(G, Q), setTimeout(() => p(G), 0);
@@ -905,11 +905,11 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
905
905
  isActive: !0,
906
906
  hasBeenActive: !0
907
907
  }), um = /* @__PURE__ */ n(({ value: e, children: t }) => /* @__PURE__ */ i(ql.Provider, { value: e, children: t }), "TabVisibilityProvider"), yi = /* @__PURE__ */ n(() => we(ql), "useTabVisibility"), Ul = /* @__PURE__ */ n((e) => {
908
- const { estado: t, isLoading: o, fichaProps: r = {} } = Re(), { [e.source]: a = {} } = r, { hidden: s = !1, ...c } = e, {
908
+ const { estado: t, isLoading: o, fichaProps: r = {} } = Re(), { [e.source]: s = {} } = r, { hidden: a = !1, ...c } = e, {
909
909
  hidden: l,
910
910
  useContenido: d = hn,
911
911
  ...p
912
- } = a, u = l !== void 0 ? l : s, m = d({
912
+ } = s, u = l !== void 0 ? l : a, m = d({
913
913
  ...c,
914
914
  estado: t,
915
915
  hidden: u,
@@ -930,18 +930,18 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
930
930
  hidden: h !== void 0 ? h : u
931
931
  };
932
932
  }, "useFieldController"), pm = /* @__PURE__ */ n((e) => {
933
- const { tipo: t, ...o } = e, { propsContenido: r, hidden: a } = Ul(o), s = {
933
+ const { tipo: t, ...o } = e, { propsContenido: r, hidden: s } = Ul(o), a = {
934
934
  ...r
935
935
  };
936
- return !a && (t === "N" || t === "D" ? /* @__PURE__ */ i(Ud, { ...s }) : t === "F" ? /* @__PURE__ */ i(bs, { ...s }) : t === "Z" ? /* @__PURE__ */ i(bs, { ...s, showTime: !0 }) : /* @__PURE__ */ i(Yo, { ...s }));
936
+ return !s && (t === "N" || t === "D" ? /* @__PURE__ */ i(Ud, { ...a }) : t === "F" ? /* @__PURE__ */ i(bs, { ...a }) : t === "Z" ? /* @__PURE__ */ i(bs, { ...a, showTime: !0 }) : /* @__PURE__ */ i(Yo, { ...a }));
937
937
  }, "TextField"), ty = /* @__PURE__ */ n((e, t, o) => {
938
- const r = /* @__PURE__ */ n((a) => /* @__PURE__ */ i(
938
+ const r = /* @__PURE__ */ n((s) => /* @__PURE__ */ i(
939
939
  Kd,
940
940
  {
941
941
  reference: o,
942
942
  source: t,
943
943
  queryOptions: { meta: { etr: e } },
944
- record: { [t]: a.row[t] },
944
+ record: { [t]: s.row[t] },
945
945
  children: /* @__PURE__ */ i(pm, { source: "etiqueta" })
946
946
  }
947
947
  ), "renderComboCell");
@@ -954,10 +954,10 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
954
954
  }, "syncExternalRows"), mm = /* @__PURE__ */ n((e, t) => {
955
955
  e.__setEtrRows?.((o) => [...Array.isArray(o) ? o : [], t]);
956
956
  }, "addExternalRow"), Yl = /* @__PURE__ */ n((e) => {
957
- const { apiRef: t, source: o, enviarTodo: r } = e, a = "N";
957
+ const { apiRef: t, source: o, enviarTodo: r } = e, s = "N";
958
958
  return ne(
959
- (s, c) => {
960
- const l = Kl(s), d = Math.max(
959
+ (a, c) => {
960
+ const l = Kl(a), d = Math.max(
961
961
  0,
962
962
  ...t.current.getAllRowIds().filter((m) => typeof m == "number")
963
963
  ) + 1, p = { ...l, id: d };
@@ -965,23 +965,23 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
965
965
  const u = r ? Array.from(t.current.getRowModels().values(), (m) => ({
966
966
  ...m,
967
967
  claveFila: "",
968
- estado: a
968
+ estado: s
969
969
  })) || [] : c.getValues()[o] || [];
970
970
  return r || u.push({
971
971
  ...l,
972
972
  claveFila: "",
973
973
  _id: d,
974
- estado: a
974
+ estado: s
975
975
  }), c.setValue(o, u, { shouldDirty: !0 }), p;
976
976
  },
977
977
  [t, r, o]
978
978
  );
979
979
  }, "useAddRow"), Jl = /* @__PURE__ */ n((e) => {
980
- const { apiRef: t, source: o, enviarTodo: r } = e, a = "M";
980
+ const { apiRef: t, source: o, enviarTodo: r } = e, s = "M";
981
981
  return ne(
982
- (s, c, l) => {
982
+ (a, c, l) => {
983
983
  const d = Kl(c);
984
- if (t.current.updateRows([{ ...d, id: s }]), ii(t), r) {
984
+ if (t.current.updateRows([{ ...d, id: a }]), ii(t), r) {
985
985
  const h = Array.from(t.current.getRowModels().values(), (f) => ({
986
986
  ...f,
987
987
  claveFila: "",
@@ -992,24 +992,24 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
992
992
  }
993
993
  const p = l.getValues()[o] || [];
994
994
  let u = p.findIndex(
995
- (h) => typeof s == "number" ? h?._id === s : h?.claveFila === s
995
+ (h) => typeof a == "number" ? h?._id === a : h?.claveFila === a
996
996
  );
997
- const m = t.current.getRowIndexRelativeToVisibleRows(s);
997
+ const m = t.current.getRowIndexRelativeToVisibleRows(a);
998
998
  u = u !== -1 ? u : m !== void 0 ? m : p.length, p[u] = {
999
999
  ...d,
1000
- claveFila: p[u]?.estado === "N" ? "" : s,
1001
- _id: s,
1002
- estado: p[u]?.estado === "N" ? "N" : a
1000
+ claveFila: p[u]?.estado === "N" ? "" : a,
1001
+ _id: a,
1002
+ estado: p[u]?.estado === "N" ? "N" : s
1003
1003
  }, l.setValue(o, p, { shouldDirty: !0 });
1004
1004
  },
1005
1005
  [t, r, o]
1006
1006
  );
1007
1007
  }, "useEditRow"), Ql = /* @__PURE__ */ n((e) => {
1008
- const { apiRef: t, source: o, enviarTodo: r } = e, a = "B";
1008
+ const { apiRef: t, source: o, enviarTodo: r } = e, s = "B";
1009
1009
  return ne(
1010
- (s, c) => {
1011
- const l = t.current.getRowModels().get(s);
1012
- if (t.current.updateRows([{ id: s, _action: "delete" }]), ii(t), r) {
1010
+ (a, c) => {
1011
+ const l = t.current.getRowModels().get(a);
1012
+ if (t.current.updateRows([{ id: a, _action: "delete" }]), ii(t), r) {
1013
1013
  const p = Array.from(t.current.getRowModels().values(), (u) => ({
1014
1014
  ...u,
1015
1015
  claveFila: "",
@@ -1019,31 +1019,31 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
1019
1019
  return;
1020
1020
  }
1021
1021
  const d = c.getValues()[o] || [];
1022
- if (typeof s == "number") {
1022
+ if (typeof a == "number") {
1023
1023
  const p = d.findIndex(
1024
- (u) => u && u._id === s
1024
+ (u) => u && u._id === a
1025
1025
  );
1026
1026
  p !== -1 && d.splice(p, 1);
1027
1027
  } else {
1028
1028
  let p = d.findIndex(
1029
- (u) => u?.claveFila === s
1029
+ (u) => u?.claveFila === a
1030
1030
  );
1031
1031
  p !== -1 ? d[p] = {
1032
1032
  ...l,
1033
- estado: a,
1034
- claveFila: s
1035
- } : d.push({ ...l, estado: a, claveFila: s });
1033
+ estado: s,
1034
+ claveFila: a
1035
+ } : d.push({ ...l, estado: s, claveFila: a });
1036
1036
  }
1037
1037
  c.setValue(o, d, { shouldDirty: !0 });
1038
1038
  },
1039
1039
  [t, r, o]
1040
1040
  );
1041
1041
  }, "useDeleteRow"), oy = /* @__PURE__ */ n((e) => {
1042
- const { [e.source]: t } = e.useFormulario(), o = { ...e, enviarTodo: !!t?.enviarTodo }, r = Yl(o), a = Jl(o), s = Ql(o);
1042
+ const { [e.source]: t } = e.useFormulario(), o = { ...e, enviarTodo: !!t?.enviarTodo }, r = Yl(o), s = Jl(o), a = Ql(o);
1043
1043
  return {
1044
1044
  addRow: r,
1045
- editRow: a,
1046
- deleteRow: s,
1045
+ editRow: s,
1046
+ deleteRow: a,
1047
1047
  getRows: /* @__PURE__ */ n(() => Xl(e.apiRef), "getRows"),
1048
1048
  setRows: /* @__PURE__ */ n((p, u) => {
1049
1049
  const m = Array.isArray(p) ? p : [];
@@ -1437,14 +1437,14 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
1437
1437
  `${t}nro`
1438
1438
  ] : [];
1439
1439
  }, "getLookupCodeCandidates"), Tm = /* @__PURE__ */ n((e) => e && typeof e == "object" ? new Set(Object.keys(e).map(ft)) : /* @__PURE__ */ new Set(), "getNormalizedRowFields"), km = /* @__PURE__ */ n((e) => Array.isArray(e) ? new Set(e.map((t) => ft(t?.field))) : /* @__PURE__ */ new Set(), "getNormalizedColumnFields"), Am = /* @__PURE__ */ n(({ colDef: e, row: t, columns: o, primaryField: r }) => {
1440
- const a = ec(e?.field);
1441
- if (a.length === 0)
1440
+ const s = ec(e?.field);
1441
+ if (s.length === 0)
1442
1442
  return !1;
1443
- const s = ft(r);
1444
- if (s && a.includes(s))
1443
+ const a = ft(r);
1444
+ if (a && s.includes(a))
1445
1445
  return !1;
1446
1446
  const c = Tm(t), l = km(o);
1447
- return a.some(
1447
+ return s.some(
1448
1448
  (d) => c.has(d) || l.has(d)
1449
1449
  );
1450
1450
  }, "hasLookupCodePeer"), _m = /* @__PURE__ */ n(({ colDef: e, primaryField: t }) => {
@@ -1454,8 +1454,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
1454
1454
  const r = ft(t);
1455
1455
  return !!(r && o.includes(r));
1456
1456
  }, "isPrimaryRecordNameField"), Dm = /* @__PURE__ */ n((e) => !!Wr(e?.field) && Mm(e?.headerName), "isOwnRecordNameField"), Em = /* @__PURE__ */ n((e) => e?.metiriValueKind === ks || e?.renderCell?.metiriValueKind === ks || e?.type === "singleSelect" || ft(e?.field).endsWith("_lis"), "isExplicitComboCellColumn"), zr = /* @__PURE__ */ n((e, t = {}) => {
1457
- const o = ft(e?.field), r = ft(e?.headerName), a = !!Wr(o) && !_m({ colDef: e, ...t });
1458
- return pr.test(o) || pr.test(r) ? !1 : Em(e) ? !0 : Dm(e) ? !1 : Am({ colDef: e, ...t }) || a;
1457
+ const o = ft(e?.field), r = ft(e?.headerName), s = !!Wr(o) && !_m({ colDef: e, ...t });
1458
+ return pr.test(o) || pr.test(r) ? !1 : Em(e) ? !0 : Dm(e) ? !1 : Am({ colDef: e, ...t }) || s;
1459
1459
  }, "isComboCellColumn"), Om = /* @__PURE__ */ n((e) => {
1460
1460
  if (typeof e == "boolean")
1461
1461
  return e;
@@ -1468,11 +1468,11 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
1468
1468
  const t = pt(e);
1469
1469
  if (!t || !/^[+-]?\d+(?:[.,]\d+)*$/.test(t))
1470
1470
  return null;
1471
- const o = t.replace(/^[+-]/, ""), r = o.match(/[.,]/g) || [], a = r.length > 0, s = o.lastIndexOf("."), c = o.lastIndexOf(","), l = a && s !== c ? s > c ? "." : "," : null, d = l === null ? "" : o.slice(
1472
- Math.max(s, c) + 1
1473
- ), p = a && new RegExp(
1471
+ const o = t.replace(/^[+-]/, ""), r = o.match(/[.,]/g) || [], s = r.length > 0, a = o.lastIndexOf("."), c = o.lastIndexOf(","), l = s && a !== c ? a > c ? "." : "," : null, d = l === null ? "" : o.slice(
1472
+ Math.max(a, c) + 1
1473
+ ), p = s && new RegExp(
1474
1474
  `^\\d{1,3}(\\${r[0]}\\d{3})+$`
1475
- ).test(o), u = a && !p && l !== null && d !== "", m = u ? t.replace(
1475
+ ).test(o), u = s && !p && l !== null && d !== "", m = u ? t.replace(
1476
1476
  l === "." ? /,/g : /\./g,
1477
1477
  ""
1478
1478
  ).replace(l, ".") : t.replace(/[.,]/g, ""), h = Number(m);
@@ -1498,8 +1498,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
1498
1498
  t
1499
1499
  ) : !1;
1500
1500
  }, "isDateLikeValue"), Nm = /* @__PURE__ */ n((e, t) => {
1501
- const o = pt(e?.type).toLowerCase(), r = pt(e?.field).toLowerCase(), a = pt(e?.headerName).toLowerCase();
1502
- return o === "date" || o === "datetime" || o === "date-time" || r.includes("fecha") || r.startsWith("fec") || r.endsWith("fec") || a.includes("fecha") || $m(t);
1501
+ const o = pt(e?.type).toLowerCase(), r = pt(e?.field).toLowerCase(), s = pt(e?.headerName).toLowerCase();
1502
+ return o === "date" || o === "datetime" || o === "date-time" || r.includes("fecha") || r.startsWith("fec") || r.endsWith("fec") || s.includes("fecha") || $m(t);
1503
1503
  }, "isDateLikeColumn"), Vm = /* @__PURE__ */ n(({ children: e, formattedValue: t, value: o }) => e ?? t ?? o ?? "", "getDisplayText"), Zt = /* @__PURE__ */ n((e) => {
1504
1504
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean")
1505
1505
  return String(e);
@@ -1516,22 +1516,22 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
1516
1516
  return !1;
1517
1517
  const o = t.replace(/\s+/g, " ").split(" ").filter(Boolean);
1518
1518
  return o.length >= 2 && o.length <= 6 && o.every((r) => /^[A-Za-zÁÉÍÓÚÜÑáéíóúüñ'´-]{2,}$/.test(r));
1519
- }, "isPersonNameText"), jm = /* @__PURE__ */ n(({ colDef: e, displayValue: t, formattedValue: o, value: r, children: a }) => {
1520
- const s = ft(e?.field), c = ft(e?.headerName);
1521
- return pr.test(`${s} ${c}`) ? !0 : vm.test(`${s} ${c}`) ? Hm(
1522
- oc({ children: a, displayValue: t, formattedValue: o, value: r })
1519
+ }, "isPersonNameText"), jm = /* @__PURE__ */ n(({ colDef: e, displayValue: t, formattedValue: o, value: r, children: s }) => {
1520
+ const a = ft(e?.field), c = ft(e?.headerName);
1521
+ return pr.test(`${a} ${c}`) ? !0 : vm.test(`${a} ${c}`) ? Hm(
1522
+ oc({ children: s, displayValue: t, formattedValue: o, value: r })
1523
1523
  ) : !1;
1524
1524
  }, "shouldShowComboAsPlainText"), ho = /* @__PURE__ */ n(({
1525
1525
  colDef: e,
1526
1526
  value: t,
1527
1527
  formattedValue: o,
1528
1528
  row: r,
1529
- columns: a,
1530
- primaryField: s,
1529
+ columns: s,
1530
+ primaryField: a,
1531
1531
  children: c,
1532
1532
  disableCombo: l = !1
1533
1533
  }) => {
1534
- const d = Oo(), p = Vm({ children: c, formattedValue: o, value: t }), u = Zt(o) ?? Zt(t) ?? Zt(c), m = !l && zr(e, { row: r, columns: a, primaryField: s }), h = Gm({
1534
+ const d = Oo(), p = Vm({ children: c, formattedValue: o, value: t }), u = Zt(o) ?? Zt(t) ?? Zt(c), m = !l && zr(e, { row: r, columns: s, primaryField: a }), h = Gm({
1535
1535
  children: c,
1536
1536
  displayValue: p,
1537
1537
  formattedValue: o,
@@ -1589,8 +1589,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
1589
1589
  value: t,
1590
1590
  formattedValue: o,
1591
1591
  row: r,
1592
- columns: a,
1593
- primaryField: s,
1592
+ columns: s,
1593
+ primaryField: a,
1594
1594
  disableCombo: !0,
1595
1595
  children: c
1596
1596
  }
@@ -1603,8 +1603,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
1603
1603
  value: t,
1604
1604
  formattedValue: o,
1605
1605
  row: r,
1606
- columns: a,
1607
- primaryField: s,
1606
+ columns: s,
1607
+ primaryField: a,
1608
1608
  disableCombo: !0,
1609
1609
  children: c
1610
1610
  }
@@ -1623,8 +1623,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
1623
1623
  value: t,
1624
1624
  formattedValue: o,
1625
1625
  row: r,
1626
- columns: a,
1627
- primaryField: s,
1626
+ columns: s,
1627
+ primaryField: a,
1628
1628
  disableCombo: !0,
1629
1629
  children: c
1630
1630
  }
@@ -1711,7 +1711,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
1711
1711
  const t = io(), o = Oo(), r = bo(
1712
1712
  t,
1713
1713
  rl
1714
- ), s = bo(t, _u).has(e.id), c = v.useMemo(
1714
+ ), a = bo(t, _u).has(e.id), c = v.useMemo(
1715
1715
  () => Object.keys(r).filter(
1716
1716
  (y) => r[y] !== !1
1717
1717
  ),
@@ -1806,9 +1806,9 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
1806
1806
  width: "100%",
1807
1807
  overflow: "hidden",
1808
1808
  borderRadius: "12px",
1809
- backgroundColor: s ? se(o.palette.primary.main, 0.1) : "background.paper",
1810
- borderColor: s ? o.palette.primary.main : se(o.palette.primary.main, 0.12),
1811
- boxShadow: s ? `0 0 0 2px ${se(o.palette.primary.main, 0.3)}` : `0 4px 16px ${se(
1809
+ backgroundColor: a ? se(o.palette.primary.main, 0.1) : "background.paper",
1810
+ borderColor: a ? o.palette.primary.main : se(o.palette.primary.main, 0.12),
1811
+ boxShadow: a ? `0 0 0 2px ${se(o.palette.primary.main, 0.3)}` : `0 4px 16px ${se(
1812
1812
  o.palette.common.black,
1813
1813
  0.08
1814
1814
  )}`,
@@ -2151,13 +2151,13 @@ function nc(e) {
2151
2151
  }
2152
2152
  n(nc, "DrawerHeader");
2153
2153
  function Gr(e) {
2154
- const { children: t, anchor: o, width: r = 320, container: a, ...s } = e, c = o === "bottom", l = gp("(hover: none)");
2154
+ const { children: t, anchor: o, width: r = 320, container: s, ...a } = e, c = o === "bottom", l = gp("(hover: none)");
2155
2155
  return /* @__PURE__ */ R(
2156
2156
  hp,
2157
2157
  {
2158
- ...s,
2158
+ ...a,
2159
2159
  anchor: o,
2160
- container: a,
2160
+ container: s,
2161
2161
  PaperProps: {
2162
2162
  sx: {
2163
2163
  boxSizing: "border-box",
@@ -2183,7 +2183,7 @@ function Gr(e) {
2183
2183
  }
2184
2184
  n(Gr, "Drawer");
2185
2185
  function Km(e) {
2186
- const t = he(), { listView: o, container: r } = e, [a, s] = v.useState(!1), c = io(), l = bo(c, sl), d = bo(
2186
+ const t = he(), { listView: o, container: r } = e, [s, a] = v.useState(!1), c = io(), l = bo(c, sl), d = bo(
2187
2187
  c,
2188
2188
  rl
2189
2189
  ), p = /* @__PURE__ */ n((u) => {
@@ -2193,14 +2193,14 @@ function Km(e) {
2193
2193
  );
2194
2194
  }, "toggleFieldVisibility");
2195
2195
  return /* @__PURE__ */ R(v.Fragment, { children: [
2196
- /* @__PURE__ */ i(si, { onClick: /* @__PURE__ */ n(() => s(!0), "onClick"), children: /* @__PURE__ */ i(Du, { fontSize: "small" }) }),
2196
+ /* @__PURE__ */ i(si, { onClick: /* @__PURE__ */ n(() => a(!0), "onClick"), children: /* @__PURE__ */ i(Du, { fontSize: "small" }) }),
2197
2197
  /* @__PURE__ */ R(
2198
2198
  Gr,
2199
2199
  {
2200
2200
  anchor: o ? "bottom" : "right",
2201
- open: a,
2201
+ open: s,
2202
2202
  container: r,
2203
- onClose: /* @__PURE__ */ n(() => s(!1), "onClose"),
2203
+ onClose: /* @__PURE__ */ n(() => a(!1), "onClose"),
2204
2204
  children: [
2205
2205
  /* @__PURE__ */ i(nc, { children: /* @__PURE__ */ i(Pt, { fontWeight: 500, children: t("pos.columns") }) }),
2206
2206
  /* @__PURE__ */ i(Ao, { children: l.map((u) => {
@@ -2224,12 +2224,12 @@ function Km(e) {
2224
2224
  }
2225
2225
  n(Km, "ToolbarColumnsItem");
2226
2226
  function Xm(e) {
2227
- const t = he(), { listView: o, container: r, containerRef: a } = e, [s, c] = v.useState(!1), [l, d] = v.useState(null), p = io(), u = bo(p, sl), m = bo(p, Eu), h = u.filter((x) => x.sortable), f = m.length, g = /* @__PURE__ */ n((x, b) => {
2227
+ const t = he(), { listView: o, container: r, containerRef: s } = e, [a, c] = v.useState(!1), [l, d] = v.useState(null), p = io(), u = bo(p, sl), m = bo(p, Eu), h = u.filter((x) => x.sortable), f = m.length, g = /* @__PURE__ */ n((x, b) => {
2228
2228
  p.current.sortColumn(x, b, !0);
2229
2229
  }, "handleSortChange");
2230
2230
  v.useEffect(() => {
2231
- a?.current && d(a.current);
2232
- }, [a]);
2231
+ s?.current && d(s.current);
2232
+ }, [s]);
2233
2233
  const C = /* @__PURE__ */ R(v.Fragment, { children: [
2234
2234
  /* @__PURE__ */ i(
2235
2235
  si,
@@ -2243,7 +2243,7 @@ function Xm(e) {
2243
2243
  Gr,
2244
2244
  {
2245
2245
  anchor: o ? "bottom" : "right",
2246
- open: s,
2246
+ open: a,
2247
2247
  container: r,
2248
2248
  onClose: /* @__PURE__ */ n(() => c(!1), "onClose"),
2249
2249
  children: [
@@ -2274,7 +2274,7 @@ function Xm(e) {
2274
2274
  }
2275
2275
  )
2276
2276
  ] });
2277
- return a && !l ? null : l ? _r(C, l) : C;
2277
+ return s && !l ? null : l ? _r(C, l) : C;
2278
2278
  }
2279
2279
  n(Xm, "ToolbarSortItem");
2280
2280
  const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "getBooleanGridValue"), jr = /* @__PURE__ */ n((e) => e ? "Si" : "No", "formatBooleanExportValue"), Ym = /* @__PURE__ */ n((e, t) => {
@@ -2307,35 +2307,35 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
2307
2307
  }).join("").trim().replace(/[<>:"/\\|?*]/g, "").replace(/\s+/g, "_").replace(/_+/g, "_").replace(/^[._-]+|[._-]+$/g, "") || void 0, "buildExportFileName"), ef = /* @__PURE__ */ n((e) => e == null || v.isValidElement(e) ? "" : String(typeof e == "object" ? e?.label ?? e?.name ?? e?.title ?? "" : e), "stringifyPdfValue"), tf = /* @__PURE__ */ n((e, t = {}) => {
2308
2308
  const o = Array.isArray(t.fields) ? new Set(t.fields) : null;
2309
2309
  return (t.allColumns ? e.current?.getAllColumns?.() ?? [] : e.current?.getVisibleColumns?.() ?? []).filter(
2310
- (a) => (!o || o.has(a.field)) && a.disableExport !== !0 && a.field !== "__check__" && a.type !== "actions"
2310
+ (s) => (!o || o.has(s.field)) && s.disableExport !== !0 && s.field !== "__check__" && s.type !== "actions"
2311
2311
  );
2312
2312
  }, "getPdfColumns"), of = /* @__PURE__ */ n((e, t, o) => {
2313
2313
  const r = e.current?.getCellParams?.(t, o.field);
2314
2314
  return ef(
2315
2315
  r?.formattedValue ?? r?.value ?? e.current?.getRow?.(t)?.[o.field]
2316
2316
  );
2317
- }, "getPdfCellValue"), As = /* @__PURE__ */ n((e, t, o, r) => (e.setFontSize(10), e.setFont(void 0, "bold"), e.text(t, o, o), e.setFont(void 0, "normal"), e.setFontSize(7), r), "addPdfPageHeader"), _s = /* @__PURE__ */ n((e, t, o, r, a, s) => {
2317
+ }, "getPdfCellValue"), As = /* @__PURE__ */ n((e, t, o, r) => (e.setFontSize(10), e.setFont(void 0, "bold"), e.text(t, o, o), e.setFont(void 0, "normal"), e.setFontSize(7), r), "addPdfPageHeader"), _s = /* @__PURE__ */ n((e, t, o, r, s, a) => {
2318
2318
  e.setFillColor(235, 238, 242), e.setDrawColor(205, 211, 219), e.rect(
2319
2319
  r,
2320
- a,
2321
- o.reduce((l, d) => l + d, 0),
2322
2320
  s,
2321
+ o.reduce((l, d) => l + d, 0),
2322
+ a,
2323
2323
  "FD"
2324
2324
  ), e.setFont(void 0, "bold");
2325
2325
  let c = r;
2326
2326
  t.forEach((l, d) => {
2327
- e.text(l.headerName || l.field, c + 1.2, a + 4.2, {
2327
+ e.text(l.headerName || l.field, c + 1.2, s + 4.2, {
2328
2328
  maxWidth: o[d] - 2.4
2329
2329
  }), c += o[d];
2330
2330
  }), e.setFont(void 0, "normal");
2331
2331
  }, "drawPdfHeader"), nf = /* @__PURE__ */ n(async (e, t = {}) => {
2332
- const { jsPDF: o } = await import("jspdf"), r = new o({ orientation: "landscape", unit: "mm" }), a = 8, s = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(), l = s - a * 2, d = tf(e, t), p = t.getRowsToExport?.({ apiRef: e }) ?? rc({ apiRef: e });
2332
+ const { jsPDF: o } = await import("jspdf"), r = new o({ orientation: "landscape", unit: "mm" }), s = 8, a = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(), l = a - s * 2, d = tf(e, t), p = t.getRowsToExport?.({ apiRef: e }) ?? rc({ apiRef: e });
2333
2333
  if (!d.length)
2334
2334
  return;
2335
2335
  const u = l / d.length, m = d.map(() => u), h = t.fileName?.replace(/_/g, " ") || "Grilla";
2336
- let f = As(r, h, a, a + 8);
2336
+ let f = As(r, h, s, s + 8);
2337
2337
  const g = 7, C = d.length > 10 ? 5 : 7;
2338
- r.setFontSize(C), _s(r, d, m, a, f, g), f += g, p.forEach((b) => {
2338
+ r.setFontSize(C), _s(r, d, m, s, f, g), f += g, p.forEach((b) => {
2339
2339
  const P = d.map(
2340
2340
  (F, M) => r.splitTextToSize(
2341
2341
  of(e, b, F),
@@ -2345,8 +2345,8 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
2345
2345
  6,
2346
2346
  ...P.map((F) => F.length * 3.2 + 2.4)
2347
2347
  );
2348
- f + S > c - a && (r.addPage(), f = As(r, h, a, a + 8), r.setFontSize(C), _s(r, d, m, a, f, g), f += g);
2349
- let y = a;
2348
+ f + S > c - s && (r.addPage(), f = As(r, h, s, s + 8), r.setFontSize(C), _s(r, d, m, s, f, g), f += g);
2349
+ let y = s;
2350
2350
  d.forEach((F, M) => {
2351
2351
  r.setDrawColor(225, 229, 235), r.rect(y, f, m[M], S), r.text(P[M], y + 1.2, f + 4, {
2352
2352
  maxWidth: m[M] - 2.4
@@ -2355,7 +2355,7 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
2355
2355
  });
2356
2356
  const x = r.internal.getNumberOfPages();
2357
2357
  for (let b = 1; b <= x; b += 1)
2358
- r.setPage(b), r.setFontSize(7), r.text(`${b}/${x}`, s - a, c - 4, {
2358
+ r.setPage(b), r.setFontSize(7), r.text(`${b}/${x}`, a - s, c - 4, {
2359
2359
  align: "right"
2360
2360
  });
2361
2361
  r.save(`${t.fileName || "grilla"}.pdf`);
@@ -2375,28 +2375,28 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
2375
2375
  }), "toolbarPortalButtonSx"), sc = /* @__PURE__ */ n((e) => [
2376
2376
  rf,
2377
2377
  ...(Array.isArray(e) ? e : [e]).filter(Boolean)
2378
- ], "mergeToolbarPortalButtonSx"), Vi = /* @__PURE__ */ n(({ disabled: e, hideMenu: t, label: o, onExport: r, options: a }) => {
2379
- const s = al(), c = s.slots.baseMenuItem;
2378
+ ], "mergeToolbarPortalButtonSx"), Vi = /* @__PURE__ */ n(({ disabled: e, hideMenu: t, label: o, onExport: r, options: s }) => {
2379
+ const a = al(), c = a.slots.baseMenuItem;
2380
2380
  return /* @__PURE__ */ i(
2381
2381
  c,
2382
2382
  {
2383
- ...s.slotProps?.baseMenuItem,
2383
+ ...a.slotProps?.baseMenuItem,
2384
2384
  disabled: e,
2385
2385
  onClick: /* @__PURE__ */ n(async (l) => {
2386
- s.slotProps?.baseMenuItem?.onClick?.(l), !(e || l.defaultPrevented) && (t?.(), await r(a));
2386
+ a.slotProps?.baseMenuItem?.onClick?.(l), !(e || l.defaultPrevented) && (t?.(), await r(s));
2387
2387
  }, "onClick"),
2388
2388
  children: o
2389
2389
  }
2390
2390
  );
2391
2391
  }, "ExportMenuItem"), ac = /* @__PURE__ */ n(({ containerRef: e, fetchRowsForExport: t, ...o }) => {
2392
- const [r, a] = te(null), [s, c] = te(!1), l = io(), d = Bo(), p = he(), {
2392
+ const [r, s] = te(null), [a, c] = te(!1), l = io(), d = Bo(), p = he(), {
2393
2393
  csvOptions: u = {},
2394
2394
  excelOptions: m = {},
2395
2395
  printOptions: h = {},
2396
2396
  ...f
2397
2397
  } = o, { slotProps: g = {}, ...C } = f, x = xe(), b = no({ resource: x }), P = v.useContext(Ye) || {};
2398
2398
  ie(() => {
2399
- e?.current && a(e.current);
2399
+ e?.current && s(e.current);
2400
2400
  }, [e]);
2401
2401
  const S = v.useCallback(
2402
2402
  (E, O) => l.current?.getLocaleText?.(E) ?? O,
@@ -2436,7 +2436,7 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
2436
2436
  [l]
2437
2437
  ), I = v.useCallback(
2438
2438
  async (E, O) => {
2439
- if (s)
2439
+ if (a)
2440
2440
  return;
2441
2441
  let G = null, Q = !1;
2442
2442
  try {
@@ -2451,7 +2451,7 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
2451
2451
  Q && G && l.current?.setRows?.(G), c(!1);
2452
2452
  }
2453
2453
  },
2454
- [l, t, s, d]
2454
+ [l, t, a, d]
2455
2455
  );
2456
2456
  if (!r) return null;
2457
2457
  const k = F(u), _ = M(
@@ -2460,7 +2460,7 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
2460
2460
  hideFooter: !0,
2461
2461
  hideToolbar: !0,
2462
2462
  ...h
2463
- }), W = u.disableToolbarButton !== !0 && typeof l.current?.exportDataAsCsv == "function", j = m.disableToolbarButton !== !0 && typeof l.current?.exportDataAsExcel == "function", q = h.disableToolbarButton !== !0, D = !!s || !!g?.button?.disabled;
2463
+ }), W = u.disableToolbarButton !== !0 && typeof l.current?.exportDataAsCsv == "function", j = m.disableToolbarButton !== !0 && typeof l.current?.exportDataAsExcel == "function", q = h.disableToolbarButton !== !0, D = !!a || !!g?.button?.disabled;
2464
2464
  return !W && !j && !q ? null : _r(
2465
2465
  /* @__PURE__ */ R(
2466
2466
  $u,
@@ -2512,19 +2512,19 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
2512
2512
  if (ie(() => {
2513
2513
  e?.current && r(e.current);
2514
2514
  }, [e]), !o) return null;
2515
- const { slotProps: a = {}, ...s } = t;
2515
+ const { slotProps: s = {}, ...a } = t;
2516
2516
  return _r(
2517
2517
  /* @__PURE__ */ i(
2518
2518
  Lu,
2519
2519
  {
2520
2520
  slotProps: {
2521
- ...a,
2521
+ ...s,
2522
2522
  button: {
2523
- ...a?.button,
2524
- sx: sc(a?.button?.sx)
2523
+ ...s?.button,
2524
+ sx: sc(s?.button?.sx)
2525
2525
  }
2526
2526
  },
2527
- ...s
2527
+ ...a
2528
2528
  }
2529
2529
  ),
2530
2530
  o
@@ -2535,8 +2535,8 @@ function sf(e) {
2535
2535
  listView: t = !1,
2536
2536
  container: o,
2537
2537
  fetchRowsForExport: r,
2538
- showQuickFilter: a,
2539
- showSelection: s = !1,
2538
+ showQuickFilter: s,
2539
+ showSelection: a = !1,
2540
2540
  pivotActive: c = !1
2541
2541
  } = e, l = io(), { exporter: d } = oo(), {
2542
2542
  props: {
@@ -2548,7 +2548,7 @@ function sf(e) {
2548
2548
  } = Gt(), f = bo(
2549
2549
  l,
2550
2550
  Vu
2551
- ), g = s && f > 0, C = t && m && !c && !g, x = /* @__PURE__ */ n(() => {
2551
+ ), g = a && f > 0, C = t && m && !c && !g, x = /* @__PURE__ */ n(() => {
2552
2552
  l.current.setRowSelectionModel([]);
2553
2553
  }, "handleClearSelection"), b = {
2554
2554
  listView: t,
@@ -2583,7 +2583,7 @@ function sf(e) {
2583
2583
  " seleccionado"
2584
2584
  ] })
2585
2585
  ] }) : /* @__PURE__ */ R(v.Fragment, { children: [
2586
- !m && a && /* @__PURE__ */ i(
2586
+ !m && s && /* @__PURE__ */ i(
2587
2587
  Me,
2588
2588
  {
2589
2589
  sx: {
@@ -2658,7 +2658,7 @@ n(sf, "Toolbar");
2658
2658
  const Ci = /* @__PURE__ */ n((e) => {
2659
2659
  if (!e.metiri?.fichaVisual)
2660
2660
  return {};
2661
- const { primary: t, background: o, text: r, error: a, divider: s } = e.palette;
2661
+ const { primary: t, background: o, text: r, error: s, divider: a } = e.palette;
2662
2662
  return {
2663
2663
  "--ficha-accent": t.main,
2664
2664
  "& .MuiCardContent-root": { padding: "20px !important" },
@@ -2697,8 +2697,8 @@ const Ci = /* @__PURE__ */ n((e) => {
2697
2697
  boxShadow: `0 0 0 3px ${se(t.main, 0.075)}`
2698
2698
  },
2699
2699
  "&.Mui-error": {
2700
- background: se(a.main, 0.035),
2701
- boxShadow: `0 0 0 3px ${se(a.main, 0.045)}`
2700
+ background: se(s.main, 0.035),
2701
+ boxShadow: `0 0 0 3px ${se(s.main, 0.045)}`
2702
2702
  },
2703
2703
  "&.Mui-disabled": {
2704
2704
  background: se(t.main, 0.055)
@@ -2708,7 +2708,7 @@ const Ci = /* @__PURE__ */ n((e) => {
2708
2708
  fontSize: 14,
2709
2709
  color: r.secondary,
2710
2710
  "&.Mui-focused": { color: t.main },
2711
- "&.Mui-error": { color: a.main }
2711
+ "&.Mui-error": { color: s.main }
2712
2712
  },
2713
2713
  "& .FichaVisual-control .MuiOutlinedInput-notchedOutline, & .ra-input .MuiOutlinedInput-notchedOutline": {
2714
2714
  borderColor: se(t.main, 0.22),
@@ -2806,7 +2806,7 @@ const Ci = /* @__PURE__ */ n((e) => {
2806
2806
  "& .Metiri-CheckBox": {
2807
2807
  margin: 0,
2808
2808
  boxSizing: "border-box",
2809
- border: `1px solid ${s}`,
2809
+ border: `1px solid ${a}`,
2810
2810
  borderRadius: "7px",
2811
2811
  background: se(t.main, 0.015),
2812
2812
  "&:has(input:checked)": {
@@ -3052,17 +3052,17 @@ const Ci = /* @__PURE__ */ n((e) => {
3052
3052
  }
3053
3053
  }
3054
3054
  }, Bn = { width: 0.98, height: 0.94 }, Io = { width: 520, height: 360 }, Ds = 32, df = ".dv-react-part", uf = ".dv-groupview.dv-active-group .dv-content-container > .dv-react-part", pf = ".dv-groupview", mf = ".dv-groupview.dv-active-group", Es = ".MuiDialog-paper", Os = /* @__PURE__ */ n((e, t, o) => {
3055
- const r = Number.isFinite(t) ? t : 0, a = Number.isFinite(o) ? o : e;
3056
- return Math.min(a, Math.max(r, e));
3055
+ const r = Number.isFinite(t) ? t : 0, s = Number.isFinite(o) ? o : e;
3056
+ return Math.min(s, Math.max(r, e));
3057
3057
  }, "clamp"), Wi = /* @__PURE__ */ n((e, t) => {
3058
3058
  if (e == null)
3059
3059
  return t;
3060
3060
  if (typeof e == "string") {
3061
3061
  const o = e.trim();
3062
3062
  if (o.endsWith("%")) {
3063
- const a = parseFloat(o.slice(0, -1));
3064
- if (Number.isFinite(a))
3065
- return a / 100;
3063
+ const s = parseFloat(o.slice(0, -1));
3064
+ if (Number.isFinite(s))
3065
+ return s / 100;
3066
3066
  }
3067
3067
  const r = parseFloat(o);
3068
3068
  return Number.isFinite(r) ? r > 1 ? r / 100 : r : t;
@@ -3099,14 +3099,14 @@ const Ci = /* @__PURE__ */ n((e) => {
3099
3099
  const r = document.querySelector(uf);
3100
3100
  if (r)
3101
3101
  return Ln(r);
3102
- const a = t?.closest?.(pf);
3103
- return Ln(a || document.querySelector(mf));
3102
+ const s = t?.closest?.(pf);
3103
+ return Ln(s || document.querySelector(mf));
3104
3104
  }, "getDockviewTabContainer"), hf = /* @__PURE__ */ n(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }, "getViewportSize"), zi = /* @__PURE__ */ n(({ rect: e, ratio: t }) => {
3105
- const o = hf(), r = e?.width || o.width, a = e?.height || o.height, s = Math.min(
3105
+ const o = hf(), r = e?.width || o.width, s = e?.height || o.height, a = Math.min(
3106
3106
  r,
3107
3107
  Math.max(Io.width, o.width - Ds)
3108
3108
  ), c = Math.min(
3109
- a,
3109
+ s,
3110
3110
  Math.max(
3111
3111
  Io.height,
3112
3112
  o.height - Ds
@@ -3114,16 +3114,16 @@ const Ci = /* @__PURE__ */ n((e) => {
3114
3114
  ), l = Os(
3115
3115
  Math.round(r * t.width),
3116
3116
  Io.width,
3117
- s
3117
+ a
3118
3118
  ), d = Os(
3119
- Math.round(a * t.height),
3119
+ Math.round(s * t.height),
3120
3120
  Io.height,
3121
3121
  c
3122
3122
  );
3123
3123
  return {
3124
3124
  width: l,
3125
3125
  height: d,
3126
- maxWidth: s,
3126
+ maxWidth: a,
3127
3127
  maxHeight: c,
3128
3128
  minWidth: Io.width,
3129
3129
  minHeight: Io.height
@@ -3155,15 +3155,15 @@ const Ci = /* @__PURE__ */ n((e) => {
3155
3155
  }, "removeStoredSize"), xf = /* @__PURE__ */ n((e, t) => {
3156
3156
  !e || !t || (e.style.width = `${Math.round(t.width)}px`, e.style.height = `${Math.round(t.height)}px`, e.style.maxWidth = `${Math.round(t.maxWidth)}px`, e.style.maxHeight = `${Math.round(t.maxHeight)}px`, e.style.minWidth = `${Math.round(t.minWidth)}px`, e.style.minHeight = `${Math.round(t.minHeight)}px`);
3157
3157
  }, "applyPopupSizeStyles"), ai = /* @__PURE__ */ n((e) => {
3158
- const t = Oo(), o = t.metiri?.fichaVisual === !0, r = he(), a = xe(), s = e?.resource ?? a ?? "default", l = Gt()?.props, d = e?.dockviewTabParent === !0, p = v.useContext(Ye) || {}, u = p?.popup ?? p?.popupSize ?? null, m = v.useMemo(
3158
+ const t = Oo(), o = t.metiri?.fichaVisual === !0, r = he(), s = xe(), a = e?.resource ?? s ?? "default", l = Gt()?.props, d = e?.dockviewTabParent === !0, p = v.useContext(Ye) || {}, u = p?.popup ?? p?.popupSize ?? null, m = v.useMemo(
3159
3159
  () => ff(u, e?.popupRatio),
3160
3160
  [u, e?.popupRatio]
3161
3161
  ), h = mt((E) => E.breakpoints.down("sm")), [f, g] = v.useState(null), C = v.useMemo(
3162
3162
  () => d ? Ls(l) : null,
3163
3163
  [d, l]
3164
3164
  ), x = v.useMemo(
3165
- () => `metiri_popup_size_${s}`,
3166
- [s]
3165
+ () => `metiri_popup_size_${a}`,
3166
+ [a]
3167
3167
  ), [b, P] = v.useState(
3168
3168
  () => gf(x)
3169
3169
  ), S = v.useRef(null), [y, F] = v.useState(null);
@@ -3343,8 +3343,8 @@ const Ci = /* @__PURE__ */ n((e) => {
3343
3343
  }, "closePopup"), Ns = /* @__PURE__ */ n((e, t, o, r) => !e && !t?.hide && !o ? e : {
3344
3344
  ...e,
3345
3345
  ...o ? { _popupKey: o } : {},
3346
- onSuccess: /* @__PURE__ */ n((...a) => {
3347
- typeof e?.onSuccess == "function" ? e.onSuccess(...a) : typeof r == "function" && r(...a), Xn(t, o);
3346
+ onSuccess: /* @__PURE__ */ n((...s) => {
3347
+ typeof e?.onSuccess == "function" ? e.onSuccess(...s) : typeof r == "function" && r(...s), Xn(t, o);
3348
3348
  }, "onSuccess")
3349
3349
  }, "wrapMutationOptions"), yf = /* @__PURE__ */ n((e, t) => {
3350
3350
  const o = e || {}, r = t || {};
@@ -3376,15 +3376,15 @@ const Ci = /* @__PURE__ */ n((e) => {
3376
3376
  }) => {
3377
3377
  if (!e?.open)
3378
3378
  return o;
3379
- const a = e?.props?.dialogProps;
3380
- if (!a)
3379
+ const s = e?.props?.dialogProps;
3380
+ if (!s)
3381
3381
  return t;
3382
3382
  if (!Cf(r))
3383
3383
  return o;
3384
- const s = yf(t, a);
3385
- return a?.container === void 0 && delete s.container, s;
3384
+ const a = yf(t, s);
3385
+ return s?.container === void 0 && delete a.container, a;
3386
3386
  }, "resolvePopupDialogProps"), qr = /* @__PURE__ */ n((e) => {
3387
- const t = xe(), o = e?.resource ?? t, r = no({ resource: o }).options?.label, a = ci(), s = he(), c = gt(), l = It(), d = cf(), u = Gt()?.props, m = d?.resolve ? d.resolve(o) : null, h = ai({
3387
+ const t = xe(), o = e?.resource ?? t, r = no({ resource: o }).options?.label, s = ci(), a = he(), c = gt(), l = It(), d = cf(), u = Gt()?.props, m = d?.resolve ? d.resolve(o) : null, h = ai({
3388
3388
  resource: o,
3389
3389
  popupRatio: e?.popupRatio
3390
3390
  }), f = ai({
@@ -3396,7 +3396,7 @@ const Ci = /* @__PURE__ */ n((e) => {
3396
3396
  const P = m?.create;
3397
3397
  if (!P || !o || !l?.show)
3398
3398
  return;
3399
- const S = b?.title ?? `${s("ra.action.create")} ${Zo(r || a(o, 1) || o)}`, y = Gi(`${o}:create`), F = b?.panel && typeof b.panel == "object" ? b.panel : {}, M = Ns(
3399
+ const S = b?.title ?? `${a("ra.action.create")} ${Zo(r || s(o, 1) || o)}`, y = Gi(`${o}:create`), F = b?.panel && typeof b.panel == "object" ? b.panel : {}, M = Ns(
3400
3400
  b?.mutationOptions ?? F.mutationOptions,
3401
3401
  l,
3402
3402
  y,
@@ -3431,7 +3431,7 @@ const Ci = /* @__PURE__ */ n((e) => {
3431
3431
  },
3432
3432
  [
3433
3433
  l,
3434
- a,
3434
+ s,
3435
3435
  c,
3436
3436
  h,
3437
3437
  f,
@@ -3439,14 +3439,14 @@ const Ci = /* @__PURE__ */ n((e) => {
3439
3439
  o,
3440
3440
  r,
3441
3441
  m?.create,
3442
- s
3442
+ a
3443
3443
  ]
3444
3444
  ), C = v.useCallback(
3445
3445
  (b) => {
3446
3446
  const P = m?.edit, S = b?.id ?? b?.record?.id;
3447
3447
  if (!P || !o || !l?.show || !S)
3448
3448
  return;
3449
- const y = b?.title ?? `${s("ra.action.edit")} ${Zo(r || a(o, 1) || o)}`, F = Gi(`${o}:${S}`), M = b?.panel && typeof b.panel == "object" ? b.panel : {}, I = Ns(
3449
+ const y = b?.title ?? `${a("ra.action.edit")} ${Zo(r || s(o, 1) || o)}`, F = Gi(`${o}:${S}`), M = b?.panel && typeof b.panel == "object" ? b.panel : {}, I = Ns(
3450
3450
  b?.mutationOptions ?? M.mutationOptions,
3451
3451
  l,
3452
3452
  F,
@@ -3481,7 +3481,7 @@ const Ci = /* @__PURE__ */ n((e) => {
3481
3481
  },
3482
3482
  [
3483
3483
  l,
3484
- a,
3484
+ s,
3485
3485
  c,
3486
3486
  h,
3487
3487
  f,
@@ -3489,14 +3489,14 @@ const Ci = /* @__PURE__ */ n((e) => {
3489
3489
  o,
3490
3490
  r,
3491
3491
  m?.edit,
3492
- s
3492
+ a
3493
3493
  ]
3494
3494
  ), x = v.useCallback(
3495
3495
  (b) => {
3496
3496
  const P = m?.show, S = b?.id;
3497
3497
  if (!P || !o || !l?.show || !S)
3498
3498
  return;
3499
- const y = b?.title ?? `${Zo(r || a(o, 1) || o)}`, F = Gi(`${o}:show:${S}`), M = Hi({
3499
+ const y = b?.title ?? `${Zo(r || s(o, 1) || o)}`, F = Gi(`${o}:show:${S}`), M = Hi({
3500
3500
  asistente: l,
3501
3501
  popupDialogProps: h,
3502
3502
  popupFormDialogProps: f,
@@ -3513,7 +3513,7 @@ const Ci = /* @__PURE__ */ n((e) => {
3513
3513
  },
3514
3514
  [
3515
3515
  l,
3516
- a,
3516
+ s,
3517
3517
  h,
3518
3518
  f,
3519
3519
  u,
@@ -3545,8 +3545,8 @@ const Ci = /* @__PURE__ */ n((e) => {
3545
3545
  params: t,
3546
3546
  actions: o,
3547
3547
  hasEdit: r,
3548
- editIcon: a,
3549
- deleteIcon: s,
3548
+ editIcon: s,
3549
+ deleteIcon: a,
3550
3550
  hasVerFicha: c,
3551
3551
  isRowEditable: l,
3552
3552
  isRowDeletable: d,
@@ -3582,7 +3582,7 @@ const Ci = /* @__PURE__ */ n((e) => {
3582
3582
  }, "onClick"),
3583
3583
  children: [
3584
3584
  /* @__PURE__ */ i(Qt, { children: r ? F ? /* @__PURE__ */ i(oi, { color: "inherit" }) : wf(
3585
- a,
3585
+ s,
3586
3586
  /* @__PURE__ */ i(
3587
3587
  ml,
3588
3588
  {
@@ -3635,7 +3635,7 @@ const Ci = /* @__PURE__ */ n((e) => {
3635
3635
  }, "onClick"),
3636
3636
  children: [
3637
3637
  /* @__PURE__ */ i(Qt, { children: dc(
3638
- s,
3638
+ a,
3639
3639
  /* @__PURE__ */ i(pn, {})
3640
3640
  ) }),
3641
3641
  /* @__PURE__ */ i(
@@ -3672,15 +3672,15 @@ const Ci = /* @__PURE__ */ n((e) => {
3672
3672
  }
3673
3673
  );
3674
3674
  }, "DrawerContent"), vf = /* @__PURE__ */ n((e) => {
3675
- const { onClose: t, params: o, open: r, container: a, ...s } = e;
3675
+ const { onClose: t, params: o, open: r, container: s, ...a } = e;
3676
3676
  return /* @__PURE__ */ i(
3677
3677
  Gr,
3678
3678
  {
3679
3679
  anchor: "bottom",
3680
3680
  open: r,
3681
- container: a,
3681
+ container: s,
3682
3682
  onClose: t,
3683
- children: o && /* @__PURE__ */ i(Sf, { params: o, onClose: t, ...s })
3683
+ children: o && /* @__PURE__ */ i(Sf, { params: o, onClose: t, ...a })
3684
3684
  }
3685
3685
  );
3686
3686
  }, "ActionDrawer"), uc = /^(\d{2})\/(\d{2})\/(\d{4})$/, Mf = /^(\d{4})-(\d{2})-(\d{2})/, Vs = /* @__PURE__ */ n((e) => String(e).padStart(2, "0"), "padDatePart"), Ws = /* @__PURE__ */ n((e) => {
@@ -3690,10 +3690,10 @@ const Ci = /* @__PURE__ */ n((e) => {
3690
3690
  const o = e.trim();
3691
3691
  if (o.match(uc))
3692
3692
  return o;
3693
- const a = o.match(Mf);
3694
- if (a) {
3695
- const [, s, c, l] = a;
3696
- return `${l}/${c}/${s}`;
3693
+ const s = o.match(Mf);
3694
+ if (s) {
3695
+ const [, a, c, l] = s;
3696
+ return `${l}/${c}/${a}`;
3697
3697
  }
3698
3698
  }
3699
3699
  const t = e instanceof Date ? e : new Date(e);
@@ -3704,8 +3704,8 @@ const Ci = /* @__PURE__ */ n((e) => {
3704
3704
  const t = String(e ?? "").trim().match(uc);
3705
3705
  if (!t)
3706
3706
  return null;
3707
- const [, o, r, a] = t, s = Number(o), c = Number(r), l = Number(a), d = new Date(l, c - 1, s);
3708
- return d.getFullYear() !== l || d.getMonth() !== c - 1 || d.getDate() !== s ? null : d;
3707
+ const [, o, r, s] = t, a = Number(o), c = Number(r), l = Number(s), d = new Date(l, c - 1, a);
3708
+ return d.getFullYear() !== l || d.getMonth() !== c - 1 || d.getDate() !== a ? null : d;
3709
3709
  }, "parseDateFilterValue"), Pf = /* @__PURE__ */ n((e) => {
3710
3710
  const t = String(e ?? "").replace(/\D/g, "").slice(0, 8);
3711
3711
  return t.length <= 2 ? t : t.length <= 4 ? `${t.slice(0, 2)}/${t.slice(2)}` : `${t.slice(0, 2)}/${t.slice(2, 4)}/${t.slice(4)}`;
@@ -3714,15 +3714,15 @@ const Ci = /* @__PURE__ */ n((e) => {
3714
3714
  applyValue: t,
3715
3715
  apiRef: o,
3716
3716
  focusElementRef: r,
3717
- slotProps: a,
3718
- headerFilterMenu: s,
3717
+ slotProps: s,
3718
+ headerFilterMenu: a,
3719
3719
  clearButton: c,
3720
3720
  tabIndex: l,
3721
3721
  disabled: d,
3722
3722
  type: p,
3723
3723
  ...u
3724
3724
  }) => {
3725
- const m = al(), h = a?.root?.slotProps, f = v.useId(), [g, C] = v.useState(
3725
+ const m = al(), h = s?.root?.slotProps, f = v.useId(), [g, C] = v.useState(
3726
3726
  () => Ws(e.value)
3727
3727
  );
3728
3728
  v.useEffect(() => {
@@ -3761,19 +3761,19 @@ const Ci = /* @__PURE__ */ n((e) => {
3761
3761
  },
3762
3762
  ...m.slotProps?.baseTextField,
3763
3763
  ...u,
3764
- ...a?.root
3764
+ ...s?.root
3765
3765
  }
3766
3766
  ),
3767
- s,
3767
+ a,
3768
3768
  c
3769
3769
  ] });
3770
3770
  }, "DateFilterInput"), Rf = /* @__PURE__ */ n((e) => {
3771
- const { onRenderGrilla: t, onLoadGrilla: o, apiRef: r = {} } = e, { isLoading: a } = oo(), s = xi(e);
3771
+ const { onRenderGrilla: t, onLoadGrilla: o, apiRef: r = {} } = e, { isLoading: s } = oo(), a = xi(e);
3772
3772
  ie(() => {
3773
- t && t({ ...s, api: r?.current });
3773
+ t && t({ ...a, api: r?.current });
3774
3774
  }, []), ie(() => {
3775
- a || o && o({ ...s, api: r?.current });
3776
- }, [a]);
3775
+ s || o && o({ ...a, api: r?.current });
3776
+ }, [s]);
3777
3777
  }, "useInitGrilla"), Tf = /* @__PURE__ */ n(() => {
3778
3778
  }, "noop$1"), fr = v.createContext(Tf), kf = /* @__PURE__ */ n(() => v.useContext(fr), "useListSelectionChange"), Af = /* @__PURE__ */ n((e = [], t = []) => e.length === t.length && e.every((o, r) => o === t[r]), "areFieldArraysEqual"), _f = /* @__PURE__ */ n(({
3779
3779
  columns: e = [],
@@ -3781,16 +3781,16 @@ const Ci = /* @__PURE__ */ n((e) => {
3781
3781
  widths: o = {}
3782
3782
  }) => {
3783
3783
  const r = new Map(
3784
- e.map((s) => [String(s?.field ?? ""), s])
3784
+ e.map((a) => [String(a?.field ?? ""), a])
3785
3785
  );
3786
3786
  return [
3787
- ...t.filter((s) => r.has(s)),
3788
- ...e.map((s) => String(s?.field ?? "")).filter((s) => s && !t.includes(s))
3789
- ].map((s) => {
3790
- const c = r.get(s);
3787
+ ...t.filter((a) => r.has(a)),
3788
+ ...e.map((a) => String(a?.field ?? "")).filter((a) => a && !t.includes(a))
3789
+ ].map((a) => {
3790
+ const c = r.get(a);
3791
3791
  if (!c)
3792
3792
  return null;
3793
- const l = o[s];
3793
+ const l = o[a];
3794
3794
  return Number.isFinite(l) ? {
3795
3795
  ...c,
3796
3796
  flex: void 0,
@@ -3798,11 +3798,11 @@ const Ci = /* @__PURE__ */ n((e) => {
3798
3798
  } : c;
3799
3799
  }).filter(Boolean);
3800
3800
  }, "buildColumnsWithPersistedState"), Df = /* @__PURE__ */ n(({ apiRef: e, columns: t, enabled: o = !0 }) => {
3801
- const [r, a] = v.useState([]), [s, c] = v.useState({}), l = v.useMemo(() => o ? _f({
3801
+ const [r, s] = v.useState([]), [a, c] = v.useState({}), l = v.useMemo(() => o ? _f({
3802
3802
  columns: t,
3803
3803
  orderedFields: r,
3804
- widths: s
3805
- }) : t, [t, o, r, s]), d = v.useCallback(
3804
+ widths: a
3805
+ }) : t, [t, o, r, a]), d = v.useCallback(
3806
3806
  (u) => {
3807
3807
  if (!o)
3808
3808
  return;
@@ -3816,7 +3816,7 @@ const Ci = /* @__PURE__ */ n((e) => {
3816
3816
  if (!o)
3817
3817
  return;
3818
3818
  const u = e.current?.getAllColumns?.()?.map((m) => String(m?.field ?? "")).filter(Boolean) ?? [];
3819
- a(
3819
+ s(
3820
3820
  (m) => Af(m, u) ? m : u
3821
3821
  );
3822
3822
  }, [e, o]);
@@ -3832,16 +3832,16 @@ const Ci = /* @__PURE__ */ n((e) => {
3832
3832
  if (!t.length) return e;
3833
3833
  const r = nn(e).filter(
3834
3834
  ({ field: l }) => (l !== "id" || t.includes(l)) && !l.startsWith("__row_group_by_columns_group__")
3835
- ), a = nn(o);
3836
- let s = r.filter(({ field: l }) => !t.includes(l));
3837
- !s.length && r.some(
3838
- (l) => a.find((d) => d.field === l.field)?.sort !== l.sort
3839
- ) && (s = a.filter(({ field: l }) => !t.includes(l) && l !== "id"));
3835
+ ), s = nn(o);
3836
+ let a = r.filter(({ field: l }) => !t.includes(l));
3837
+ !a.length && r.some(
3838
+ (l) => s.find((d) => d.field === l.field)?.sort !== l.sort
3839
+ ) && (a = s.filter(({ field: l }) => !t.includes(l) && l !== "id"));
3840
3840
  const c = [
3841
3841
  ...t.map(
3842
- (l) => r.find((d) => d.field === l) || a.find((d) => d.field === l) || { field: l, sort: "asc" }
3842
+ (l) => r.find((d) => d.field === l) || s.find((d) => d.field === l) || { field: l, sort: "asc" }
3843
3843
  ),
3844
- ...s
3844
+ ...a
3845
3845
  ];
3846
3846
  return {
3847
3847
  field: c.map((l) => l.field).join(","),
@@ -3886,8 +3886,8 @@ const Ci = /* @__PURE__ */ n((e) => {
3886
3886
  return null;
3887
3887
  let t = 0, o = 0;
3888
3888
  for (let r = 0; r < e.length; r += 1) {
3889
- const a = e[r];
3890
- $n(a) && (o += 1, t += a);
3889
+ const s = e[r];
3890
+ $n(s) && (o += 1, t += s);
3891
3891
  }
3892
3892
  return t === 0 ? null : t / o;
3893
3893
  }, "apply")
@@ -3898,8 +3898,8 @@ const Ci = /* @__PURE__ */ n((e) => {
3898
3898
  return null;
3899
3899
  let t = !1, o = 1 / 0;
3900
3900
  for (let r = 0; r < e.length; r += 1) {
3901
- const a = e[r];
3902
- a != null && a < o && (o = a, t = !0);
3901
+ const s = e[r];
3902
+ s != null && s < o && (o = s, t = !0);
3903
3903
  }
3904
3904
  return t ? o : null;
3905
3905
  }, "apply")
@@ -3910,8 +3910,8 @@ const Ci = /* @__PURE__ */ n((e) => {
3910
3910
  return null;
3911
3911
  let t = !1, o = -1 / 0;
3912
3912
  for (let r = 0; r < e.length; r += 1) {
3913
- const a = e[r];
3914
- a != null && a > o && (o = a, t = !0);
3913
+ const s = e[r];
3914
+ s != null && s > o && (o = s, t = !0);
3915
3915
  }
3916
3916
  return t ? o : null;
3917
3917
  }, "apply")
@@ -3971,31 +3971,31 @@ const Ci = /* @__PURE__ */ n((e) => {
3971
3971
  ({ id: t, fromInput: o, ...r }) => r
3972
3972
  )
3973
3973
  }), "normalizeFilterModelForComparison"), Nn = /* @__PURE__ */ n((e, t) => JSON.stringify(Ys(e)) === JSON.stringify(Ys(t)), "areFilterModelsEqual"), zf = /* @__PURE__ */ n((e) => {
3974
- const t = e.items ?? [], o = t.reduce((r, a) => {
3975
- if (typeof a.field < "u" && a.operator) {
3976
- let s = a.field;
3977
- s === "__row_group_by_columns_group__" && e.groupingField && (s = e.groupingField), Us.has(a.operator) ? r[`${s}_${Us.get(a.operator)}`] = Ks(a) : r[s] = Ks(a);
3974
+ const t = e.items ?? [], o = t.reduce((r, s) => {
3975
+ if (typeof s.field < "u" && s.operator) {
3976
+ let a = s.field;
3977
+ a === "__row_group_by_columns_group__" && e.groupingField && (a = e.groupingField), Us.has(s.operator) ? r[`${a}_${Us.get(s.operator)}`] = Ks(s) : r[a] = Ks(s);
3978
3978
  }
3979
3979
  return r;
3980
3980
  }, {});
3981
3981
  return t.length > 1 && (o[gr] = bc(e.logicOperator)), o;
3982
3982
  }, "defaultConvertFilterModelToFilterValues"), Gf = /* @__PURE__ */ n((e, t, o) => {
3983
3983
  const r = Array.from(gc.entries()).find(
3984
- ([a]) => e.endsWith(`_${a}`)
3984
+ ([s]) => e.endsWith(`_${s}`)
3985
3985
  );
3986
3986
  if (r) {
3987
- const [a, s] = r, c = e.slice(0, -a.length - 1);
3988
- return o.has(c) ? { field: c, operator: s, value: t } : null;
3987
+ const [s, a] = r, c = e.slice(0, -s.length - 1);
3988
+ return o.has(c) ? { field: c, operator: a, value: t } : null;
3989
3989
  }
3990
3990
  return o.has(e) ? { field: e, operator: "equals", value: t } : null;
3991
3991
  }, "resolveFilterModelItem"), Hf = /* @__PURE__ */ n((e, t) => {
3992
3992
  const o = new Set(
3993
- (t ?? []).map((s) => s?.field).filter(Boolean)
3993
+ (t ?? []).map((a) => a?.field).filter(Boolean)
3994
3994
  );
3995
3995
  return {
3996
- items: (e && typeof e == "object" ? Object.entries(e) : []).filter(([s, c]) => s === gr ? !1 : c != null && c !== "").map(([s, c]) => Gf(s, c, o)).filter(Boolean).map((s, c) => ({
3997
- id: `${s.field}-${s.operator}-${c}`,
3998
- ...s
3996
+ items: (e && typeof e == "object" ? Object.entries(e) : []).filter(([a, c]) => a === gr ? !1 : c != null && c !== "").map(([a, c]) => Gf(a, c, o)).filter(Boolean).map((a, c) => ({
3997
+ id: `${a.field}-${a.operator}-${c}`,
3998
+ ...a
3999
3999
  })),
4000
4000
  logicOperator: bc(
4001
4001
  e?.[gr]
@@ -4072,21 +4072,21 @@ const Ci = /* @__PURE__ */ n((e) => {
4072
4072
  ...t ? [Uf] : [],
4073
4073
  ...Array.isArray(e) ? e : e ? [e] : []
4074
4074
  ], "mergeFirstCustomActionSx"), yc = v.forwardRef((e, t) => {
4075
- const { material: o, ...r } = e, a = typeof r["aria-label"] == "string" ? r["aria-label"] : "", s = /* @__PURE__ */ i(lt, { ref: t, ...r, ...o });
4076
- return a ? /* @__PURE__ */ i(wt, { title: a, children: /* @__PURE__ */ i("span", { children: s }) }) : s;
4075
+ const { material: o, ...r } = e, s = typeof r["aria-label"] == "string" ? r["aria-label"] : "", a = /* @__PURE__ */ i(lt, { ref: t, ...r, ...o });
4076
+ return s ? /* @__PURE__ */ i(wt, { title: s, children: /* @__PURE__ */ i("span", { children: a }) }) : a;
4077
4077
  });
4078
4078
  process.env.NODE_ENV !== "production" && (yc.displayName = "BaseIconButtonWithTitle");
4079
4079
  const Xf = v.memo(/* @__PURE__ */ n(function({
4080
4080
  actionsContainerRef: t,
4081
4081
  exporter: o,
4082
4082
  fetchRowsForExport: r,
4083
- filterActionsContainerRef: a
4083
+ filterActionsContainerRef: s
4084
4084
  }) {
4085
4085
  return /* @__PURE__ */ R(ut, { children: [
4086
4086
  /* @__PURE__ */ i(
4087
4087
  lc,
4088
4088
  {
4089
- containerRef: a,
4089
+ containerRef: s,
4090
4090
  slotProps: {
4091
4091
  button: {
4092
4092
  size: "small"
@@ -4107,8 +4107,8 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
4107
4107
  actionButtons: t = [],
4108
4108
  actionButtonsHeader: o,
4109
4109
  bulkActionButtons: r,
4110
- sx: a,
4111
- columns: s,
4110
+ sx: s,
4111
+ columns: a,
4112
4112
  isRowEditable: c,
4113
4113
  isRowDeletable: l,
4114
4114
  primaryText: d,
@@ -4369,7 +4369,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
4369
4369
  ), Li = jo.length;
4370
4370
  }
4371
4371
  const Sd = Oi.length === 0 && ms.length === 0 && Bi.length > 0 ? Bi.map(Vn).filter(Boolean).map((Xt) => {
4372
- const kn = s.find(
4372
+ const kn = a.find(
4373
4373
  (An) => An.field === Xt
4374
4374
  );
4375
4375
  return {
@@ -4478,7 +4478,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
4478
4478
  return [];
4479
4479
  }
4480
4480
  }, [zo]), es = v.useMemo(
4481
- () => s.map((w) => {
4481
+ () => a.map((w) => {
4482
4482
  const A = Fn[w.field.replace("_lis", "")];
4483
4483
  return A ? { ...w, ...A } : w;
4484
4484
  }).sort(
@@ -4486,7 +4486,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
4486
4486
  Fn[w.field.replace("_lis", "")]?.orden
4487
4487
  ) - parseInt(Fn[A.field.replace("_lis", "")]?.orden)
4488
4488
  ),
4489
- [s, Fn]
4489
+ [a, Fn]
4490
4490
  ), {
4491
4491
  columns: { columnVisibilityModel: ts = pc },
4492
4492
  ...In
@@ -5059,7 +5059,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
5059
5059
  ), bd = {
5060
5060
  height: "100%",
5061
5061
  ...xm,
5062
- ...a,
5062
+ ...s,
5063
5063
  ...B && {
5064
5064
  "& .MuiDataGrid-columnSeparator": {
5065
5065
  opacity: 1,
@@ -5479,8 +5479,8 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
5479
5479
  columns: t,
5480
5480
  primaryText: o,
5481
5481
  secondaryText: r,
5482
- initialState: a,
5483
- actionButtons: s = [],
5482
+ initialState: s,
5483
+ actionButtons: a = [],
5484
5484
  mobileColumns: c = "",
5485
5485
  hasEdit: l,
5486
5486
  editIcon: d,
@@ -5493,7 +5493,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
5493
5493
  pivotActive: C = !1,
5494
5494
  forceListView: x,
5495
5495
  ...b
5496
- } = e, P = v.useRef(null), S = we(Ye) || {}, { lang: y = [] } = S, F = on(S, "borrar") || on(S, "delete"), M = f && !F, I = C ? [] : (s || []).filter(
5496
+ } = e, P = v.useRef(null), S = we(Ye) || {}, { lang: y = [] } = S, F = on(S, "borrar") || on(S, "delete"), M = f && !F, I = C ? [] : (a || []).filter(
5497
5497
  (me) => to(S, me)
5498
5498
  ), k = !!(!C && (l || u || g || M || I.length)), _ = xe(e), { sort: L } = oo(), W = /* @__PURE__ */ n(() => P.current, "container"), j = mt((me) => me.breakpoints.down("md")), q = x ?? j, D = x && !j, [E] = vr(), O = (E === "en" ? Dr : Er).components.MuiDataGrid.defaultProps.localeText, G = Ir(), {
5499
5499
  props: { gridContainerRef: Q, chkSeleccion: T }
@@ -5501,7 +5501,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
5501
5501
  overlay: null,
5502
5502
  params: null
5503
5503
  });
5504
- let Z = a?.rowGrouping?.model?.[0];
5504
+ let Z = s?.rowGrouping?.model?.[0];
5505
5505
  try {
5506
5506
  Z = JSON.parse(
5507
5507
  localStorage.getItem(
@@ -5598,7 +5598,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
5598
5598
  sorting: {
5599
5599
  sortModel: nn(L)
5600
5600
  },
5601
- ...a,
5601
+ ...s,
5602
5602
  rowGrouping: null
5603
5603
  },
5604
5604
  sx: {
@@ -5699,8 +5699,8 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
5699
5699
  );
5700
5700
  }, "GrillaSm"), Jf = /* @__PURE__ */ n((e) => {
5701
5701
  const t = mt((S) => S.breakpoints.down("md")), { hasEdit: o, options: r } = no(e), {
5702
- hasDelete: a,
5703
- editIcon: s,
5702
+ hasDelete: s,
5703
+ editIcon: a,
5704
5704
  deleteIcon: c,
5705
5705
  pivotEnabled: l = !1,
5706
5706
  pivotUi: d = "mui",
@@ -5726,7 +5726,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
5726
5726
  return y;
5727
5727
  },
5728
5728
  [p, u]
5729
- ), f = a === !1 ? a : r?.borra, g = s, C = c, {
5729
+ ), f = s === !1 ? s : r?.borra, g = a, C = c, {
5730
5730
  props: { viewMode: x = "grilla" }
5731
5731
  } = Gt(), b = l && x === "pivot";
5732
5732
  return /* @__PURE__ */ i(Y, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: !b && (t ? !0 : x === "ficha") ? /* @__PURE__ */ i(
@@ -5761,14 +5761,14 @@ function wc(e) {
5761
5761
  var t, o, r = "";
5762
5762
  if (typeof e == "string" || typeof e == "number") r += e;
5763
5763
  else if (typeof e == "object") if (Array.isArray(e)) {
5764
- var a = e.length;
5765
- for (t = 0; t < a; t++) e[t] && (o = wc(e[t])) && (r && (r += " "), r += o);
5764
+ var s = e.length;
5765
+ for (t = 0; t < s; t++) e[t] && (o = wc(e[t])) && (r && (r += " "), r += o);
5766
5766
  } else for (o in e) e[o] && (r && (r += " "), r += o);
5767
5767
  return r;
5768
5768
  }
5769
5769
  n(wc, "r");
5770
5770
  function Si() {
5771
- for (var e, t, o = 0, r = "", a = arguments.length; o < a; o++) (e = arguments[o]) && (t = wc(e)) && (r && (r += " "), r += t);
5771
+ for (var e, t, o = 0, r = "", s = arguments.length; o < s; o++) (e = arguments[o]) && (t = wc(e)) && (r && (r += " "), r += t);
5772
5772
  return r;
5773
5773
  }
5774
5774
  n(Si, "clsx");
@@ -5780,8 +5780,8 @@ const Sc = /* @__PURE__ */ n((e) => {
5780
5780
  allowNull: t,
5781
5781
  alwaysOn: o,
5782
5782
  beforeSubmit: r,
5783
- component: a,
5784
- data: s,
5783
+ component: s,
5784
+ data: a,
5785
5785
  defaultValue: c,
5786
5786
  error: l,
5787
5787
  format: d,
@@ -5826,8 +5826,8 @@ const Sc = /* @__PURE__ */ n((e) => {
5826
5826
  defaultValue: t,
5827
5827
  format: o = oh,
5828
5828
  label: r,
5829
- name: a,
5830
- source: s,
5829
+ name: s,
5830
+ source: a,
5831
5831
  resource: c,
5832
5832
  helperText: l,
5833
5833
  margin: d,
@@ -5843,13 +5843,13 @@ const Sc = /* @__PURE__ */ n((e) => {
5843
5843
  }) => {
5844
5844
  const { field: P, fieldState: S, id: y, isRequired: F } = ln({
5845
5845
  defaultValue: t,
5846
- name: a,
5846
+ name: s,
5847
5847
  format: o,
5848
5848
  parse: m,
5849
5849
  onBlur: p,
5850
5850
  onChange: u,
5851
5851
  resource: c,
5852
- source: s,
5852
+ source: a,
5853
5853
  validate: h,
5854
5854
  disabled: g,
5855
5855
  readOnly: C,
@@ -5860,7 +5860,7 @@ const Sc = /* @__PURE__ */ n((e) => {
5860
5860
  {
5861
5861
  id: y,
5862
5862
  ...P,
5863
- className: Si("ra-input", `ra-input-${s}`, e),
5863
+ className: Si("ra-input", `ra-input-${a}`, e),
5864
5864
  type: "date",
5865
5865
  size: "small",
5866
5866
  variant: f,
@@ -5879,7 +5879,7 @@ const Sc = /* @__PURE__ */ n((e) => {
5879
5879
  La,
5880
5880
  {
5881
5881
  label: r,
5882
- source: s,
5882
+ source: a,
5883
5883
  resource: c,
5884
5884
  isRequired: F
5885
5885
  }
@@ -5891,15 +5891,15 @@ const Sc = /* @__PURE__ */ n((e) => {
5891
5891
  );
5892
5892
  }, "DateInput"), Zs = /* @__PURE__ */ n((e) => {
5893
5893
  if (!(e instanceof Date) || isNaN(e.getDate())) return "";
5894
- const t = "00", o = e.getFullYear().toString(), r = (e.getMonth() + 1).toString(), a = e.getDate().toString();
5895
- return `${o}-${(t + r).slice(-2)}-${(t + a).slice(-2)}`;
5894
+ const t = "00", o = e.getFullYear().toString(), r = (e.getMonth() + 1).toString(), s = e.getDate().toString();
5895
+ return `${o}-${(t + r).slice(-2)}-${(t + s).slice(-2)}`;
5896
5896
  }, "convertDateToString$1"), eh = /^\d{4}-\d{2}-\d{2}$/, th = { shrink: !0 }, oh = /* @__PURE__ */ n((e) => e == null || e === "" ? "" : e instanceof Date ? Zs(e) : eh.test(e) ? e : Zs(new Date(e)), "getStringFromDate"), nh = /* @__PURE__ */ n((e) => e ? new Date(e) : e === "" ? null : e, "parseDateTime"), ih = /* @__PURE__ */ n(({
5897
5897
  className: e,
5898
5898
  defaultValue: t,
5899
5899
  format: o = lh,
5900
5900
  label: r,
5901
- helperText: a,
5902
- margin: s,
5901
+ helperText: s,
5902
+ margin: a,
5903
5903
  onBlur: c,
5904
5904
  onChange: l,
5905
5905
  source: d,
@@ -5924,7 +5924,7 @@ const Sc = /* @__PURE__ */ n((e) => {
5924
5924
  disabled: f,
5925
5925
  readOnly: g,
5926
5926
  ...x
5927
- }), { error: F, invalid: M } = P, I = a !== !1 || M;
5927
+ }), { error: F, invalid: M } = P, I = s !== !1 || M;
5928
5928
  return /* @__PURE__ */ i(
5929
5929
  kr,
5930
5930
  {
@@ -5934,7 +5934,7 @@ const Sc = /* @__PURE__ */ n((e) => {
5934
5934
  type: "datetime-local",
5935
5935
  size: "small",
5936
5936
  variant: h,
5937
- margin: s,
5937
+ margin: a,
5938
5938
  error: M,
5939
5939
  disabled: f || g,
5940
5940
  readOnly: g,
@@ -5942,7 +5942,7 @@ const Sc = /* @__PURE__ */ n((e) => {
5942
5942
  Sc,
5943
5943
  {
5944
5944
  error: F?.message,
5945
- helperText: a
5945
+ helperText: s
5946
5946
  }
5947
5947
  ) : null,
5948
5948
  label: /* @__PURE__ */ i(
@@ -5961,16 +5961,16 @@ const Sc = /* @__PURE__ */ n((e) => {
5961
5961
  );
5962
5962
  }, "DateTimeInput"), Mc = /* @__PURE__ */ n((e = 2) => (t) => ("0".repeat(e) + t).slice(-e), "leftPad"), rh = Mc(4), Wn = Mc(2), ea = /* @__PURE__ */ n((e) => {
5963
5963
  if (!(e instanceof Date) || isNaN(e.getDate())) return "";
5964
- const t = rh(e.getFullYear()), o = Wn(e.getMonth() + 1), r = Wn(e.getDate()), a = Wn(e.getHours()), s = Wn(e.getMinutes());
5965
- return `${t}-${o}-${r}T${a}:${s}`;
5964
+ const t = rh(e.getFullYear()), o = Wn(e.getMonth() + 1), r = Wn(e.getDate()), s = Wn(e.getHours()), a = Wn(e.getMinutes());
5965
+ return `${t}-${o}-${r}T${s}:${a}`;
5966
5966
  }, "convertDateToString"), sh = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/, ah = { shrink: !0 }, lh = /* @__PURE__ */ n((e) => e == null || e === "" ? "" : e instanceof Date ? ea(e) : sh.test(e) ? e : ea(new Date(e)), "formatDateTime"), ch = /* @__PURE__ */ n(({
5967
5967
  totalDigits: e = 10,
5968
5968
  maxDecimals: t = 2,
5969
5969
  decimalComma: o = !0,
5970
5970
  allowNegative: r = !0,
5971
- ...a
5971
+ ...s
5972
5972
  }) => {
5973
- const s = ne(
5973
+ const a = ne(
5974
5974
  (p) => {
5975
5975
  if (!p)
5976
5976
  return "";
@@ -5987,14 +5987,14 @@ const Sc = /* @__PURE__ */ n((e) => {
5987
5987
  [e, t, r]
5988
5988
  ), c = ne(
5989
5989
  (p) => {
5990
- p.target.value = s(p.target.value);
5990
+ p.target.value = a(p.target.value);
5991
5991
  },
5992
- [s]
5993
- ), l = /* @__PURE__ */ n((p) => p === "" ? "" : s(p), "parse"), d = /* @__PURE__ */ n((p) => p == null || p === "" ? "" : String(p).replace(".", o ? "," : "."), "format");
5992
+ [a]
5993
+ ), l = /* @__PURE__ */ n((p) => p === "" ? "" : a(p), "parse"), d = /* @__PURE__ */ n((p) => p == null || p === "" ? "" : String(p).replace(".", o ? "," : "."), "format");
5994
5994
  return /* @__PURE__ */ i(
5995
5995
  $t,
5996
5996
  {
5997
- ...a,
5997
+ ...s,
5998
5998
  inputProps: {
5999
5999
  onInput: c,
6000
6000
  inputMode: "decimal",
@@ -6030,20 +6030,20 @@ const Sc = /* @__PURE__ */ n((e) => {
6030
6030
  }
6031
6031
  );
6032
6032
  }, "IntegerInput"), uh = /* @__PURE__ */ n((e) => {
6033
- const { tipo: t, ...o } = e, { propsContenido: r, hidden: a } = tt(o), s = {
6033
+ const { tipo: t, ...o } = e, { propsContenido: r, hidden: s } = tt(o), a = {
6034
6034
  ...r
6035
6035
  };
6036
- return a ? null : t === "N" ? /* @__PURE__ */ i(dh, { ...s }) : t === "D" ? /* @__PURE__ */ i(ch, { ...s, totalDigits: s.maxLength }) : t === "F" ? /* @__PURE__ */ i(Zf, { ...s }) : t === "Z" ? /* @__PURE__ */ i(ih, { ...s }) : t === "H" ? /* @__PURE__ */ i($t, { ...s, type: "time" }) : t === "TF" ? /* @__PURE__ */ i(
6036
+ return s ? null : t === "N" ? /* @__PURE__ */ i(dh, { ...a }) : t === "D" ? /* @__PURE__ */ i(ch, { ...a, totalDigits: a.maxLength }) : t === "F" ? /* @__PURE__ */ i(Zf, { ...a }) : t === "Z" ? /* @__PURE__ */ i(ih, { ...a }) : t === "H" ? /* @__PURE__ */ i($t, { ...a, type: "time" }) : t === "TF" ? /* @__PURE__ */ i(
6037
6037
  $t,
6038
6038
  {
6039
- ...s,
6040
- inputProps: { maxLength: s.maxLength || 10 }
6039
+ ...a,
6040
+ inputProps: { maxLength: a.maxLength || 10 }
6041
6041
  }
6042
6042
  ) : /* @__PURE__ */ i(
6043
6043
  $t,
6044
6044
  {
6045
- ...s,
6046
- inputProps: { maxLength: s.maxLength }
6045
+ ...a,
6046
+ inputProps: { maxLength: a.maxLength }
6047
6047
  }
6048
6048
  );
6049
6049
  }, "TextBox"), ph = {}, Fc = v.createContext(null), iy = /* @__PURE__ */ n(({ value: e, children: t }) => /* @__PURE__ */ i(Fc.Provider, { value: e || ph, children: t }), "PreviewSandboxProvider"), gn = /* @__PURE__ */ n(() => v.useContext(Fc) || null, "usePreviewSandbox"), vi = /* @__PURE__ */ n((e) => {
@@ -6076,13 +6076,13 @@ const Sc = /* @__PURE__ */ n((e) => {
6076
6076
  fullWidth: t,
6077
6077
  isTC: o,
6078
6078
  optionText: r,
6079
- restProps: a,
6080
- sx: s
6079
+ restProps: s,
6080
+ sx: a
6081
6081
  }) => /* @__PURE__ */ i(
6082
6082
  Y,
6083
6083
  {
6084
6084
  sx: {
6085
- ...s,
6085
+ ...a,
6086
6086
  display: {
6087
6087
  xs: "flex",
6088
6088
  md: t || o ? "flex" : "inline-flex"
@@ -6100,11 +6100,11 @@ const Sc = /* @__PURE__ */ n((e) => {
6100
6100
  children: /* @__PURE__ */ i(Y, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ i(
6101
6101
  Na,
6102
6102
  {
6103
- ...a,
6103
+ ...s,
6104
6104
  choices: e,
6105
6105
  optionText: r,
6106
6106
  size: "small",
6107
- slotProps: Pc(a.slotProps),
6107
+ slotProps: Pc(s.slotProps),
6108
6108
  sx: {
6109
6109
  width: t || o ? "100% !important" : "100%",
6110
6110
  minWidth: t ? 0 : 220,
@@ -6126,14 +6126,14 @@ const Sc = /* @__PURE__ */ n((e) => {
6126
6126
  const o = t ?? e.id;
6127
6127
  return o == null ? "" : String(o);
6128
6128
  }, "resolveChoiceLabel"), gh = /* @__PURE__ */ n((e, t, o) => {
6129
- const r = e && typeof e == "object" ? { ...e } : {}, a = typeof o == "string" && o.endsWith("cod") ? `${o.slice(0, -3)}nom` : null, s = typeof o == "string" && o.endsWith("id") ? `${o.slice(0, -2)}name` : null, c = r.etiqueta ?? (a ? r[a] : void 0) ?? (s ? r[s] : void 0) ?? r.name ?? r.label;
6129
+ const r = e && typeof e == "object" ? { ...e } : {}, s = typeof o == "string" && o.endsWith("cod") ? `${o.slice(0, -3)}nom` : null, a = typeof o == "string" && o.endsWith("id") ? `${o.slice(0, -2)}name` : null, c = r.etiqueta ?? (s ? r[s] : void 0) ?? (a ? r[a] : void 0) ?? r.name ?? r.label;
6130
6130
  return (r.id === void 0 || r.id === null || r.id === "") && (r.id = t), (r.etiqueta === void 0 || r.etiqueta === null || r.etiqueta === "") && r.id !== void 0 && r.id !== null && r.id !== "" && (r.etiqueta = c == null ? Ic(r) : String(c)), r;
6131
6131
  }, "buildChoiceRecord"), ta = /* @__PURE__ */ n((e, t) => {
6132
6132
  if (!Array.isArray(e) || !t)
6133
6133
  return e;
6134
6134
  const o = e.findIndex((r) => Do(r?.id, t.id));
6135
6135
  return o === -1 ? [t, ...e] : e.map(
6136
- (r, a) => a === o ? { ...r, ...t } : r
6136
+ (r, s) => s === o ? { ...r, ...t } : r
6137
6137
  );
6138
6138
  }, "mergeChoiceIntoItems"), zn = /* @__PURE__ */ n((e, t) => !e || !t ? e : Array.isArray(e) ? ta(e, t) : Array.isArray(e?.data) ? {
6139
6139
  ...e,
@@ -6143,8 +6143,8 @@ const Sc = /* @__PURE__ */ n((e) => {
6143
6143
  callback: t,
6144
6144
  callbackKey: o,
6145
6145
  sx: r,
6146
- isTC: a,
6147
- onChange: s,
6146
+ isTC: s,
6147
+ onChange: a,
6148
6148
  onInputChange: c,
6149
6149
  injectedChoices: l = [],
6150
6150
  fullWidth: d = !1,
@@ -6164,14 +6164,14 @@ const Sc = /* @__PURE__ */ n((e) => {
6164
6164
  }), F;
6165
6165
  }, [f, l]), b = de(() => u?.isRequired || m || !Array.isArray(x) ? !1 : !x.some((y) => Do(y?.id, "0")), [m, x, u?.isRequired]), P = ne(
6166
6166
  (y, F) => {
6167
- typeof s == "function" && s({
6167
+ typeof a == "function" && a({
6168
6168
  target: {
6169
6169
  value: y
6170
6170
  },
6171
6171
  label: Ic(F)
6172
6172
  });
6173
6173
  },
6174
- [s, u.source]
6174
+ [a, u.source]
6175
6175
  ), S = ne(
6176
6176
  (y, F, M) => {
6177
6177
  typeof c == "function" && c(y, F, M);
@@ -6188,7 +6188,7 @@ const Sc = /* @__PURE__ */ n((e) => {
6188
6188
  }, [h, t, o, m]), /* @__PURE__ */ i(mh, { title: g.current?.value || "", placement: "top", arrow: !0, disableInteractive: !0, children: /* @__PURE__ */ i(
6189
6189
  Y,
6190
6190
  {
6191
- sx: a ? { marginLeft: 1, ...r } : {
6191
+ sx: s ? { marginLeft: 1, ...r } : {
6192
6192
  display: {
6193
6193
  xs: "inherit",
6194
6194
  md: d ? "flex" : "inline-flex"
@@ -6196,7 +6196,7 @@ const Sc = /* @__PURE__ */ n((e) => {
6196
6196
  verticalAlign: "top",
6197
6197
  ...r
6198
6198
  },
6199
- width: a ? {} : {
6199
+ width: s ? {} : {
6200
6200
  xs: "100%",
6201
6201
  md: d ? "100%" : "auto"
6202
6202
  },
@@ -6205,8 +6205,8 @@ const Sc = /* @__PURE__ */ n((e) => {
6205
6205
  {
6206
6206
  size: "small",
6207
6207
  sx: {
6208
- width: d || a ? "100% !important" : "100%",
6209
- ...a ? {
6208
+ width: d || s ? "100% !important" : "100%",
6209
+ ...s ? {
6210
6210
  "& .MuiAutocomplete-input": Kr
6211
6211
  } : {}
6212
6212
  },
@@ -6223,7 +6223,7 @@ const Sc = /* @__PURE__ */ n((e) => {
6223
6223
  }
6224
6224
  ) });
6225
6225
  }, "SelectInputEtriek"), Rc = /* @__PURE__ */ n((e) => {
6226
- const { propsContenido: t, hidden: o } = tt(e), r = zt(), a = fn(), s = Ge(), { isLoading: c } = Re(), {
6226
+ const { propsContenido: t, hidden: o } = tt(e), r = zt(), s = fn(), a = Ge(), { isLoading: c } = Re(), {
6227
6227
  isActive: l,
6228
6228
  hasBeenActive: d = l
6229
6229
  } = yi(), {
@@ -6246,33 +6246,33 @@ const Sc = /* @__PURE__ */ n((e) => {
6246
6246
  }, T = O?.id ?? O?.[g] ?? Q?.id ?? Q?.[g] ?? G?.id ?? G?.data?.id ?? G?.data?.[g], V = gh(Q, T, g);
6247
6247
  V && V.id !== void 0 && V.id !== null && V.id !== "" && (F((H) => H.some(
6248
6248
  (oe) => Do(oe?.id, V.id)
6249
- ) ? H : [V, ...H].slice(0, 10)), a.setQueriesData(
6249
+ ) ? H : [V, ...H].slice(0, 10)), s.setQueriesData(
6250
6250
  { queryKey: [C, "getList"] },
6251
6251
  (H) => zn(H, V)
6252
- ), a.setQueriesData(
6252
+ ), s.setQueriesData(
6253
6253
  { queryKey: [C, "getManyReference"] },
6254
6254
  (H) => zn(H, V)
6255
- ), a.setQueriesData(
6255
+ ), s.setQueriesData(
6256
6256
  { queryKey: [C, "getMany"] },
6257
6257
  (H) => zn(H, V)
6258
- ), a.setQueriesData(
6258
+ ), s.setQueriesData(
6259
6259
  { queryKey: [C, "getOne"] },
6260
6260
  (H) => zn(H, V)
6261
- )), a.invalidateQueries({
6261
+ )), s.invalidateQueries({
6262
6262
  queryKey: [C, "getList"]
6263
- }), a.invalidateQueries({
6263
+ }), s.invalidateQueries({
6264
6264
  queryKey: [C, "getMany"]
6265
- }), a.invalidateQueries({
6265
+ }), s.invalidateQueries({
6266
6266
  queryKey: [C, "getManyReference"]
6267
- }), a.invalidateQueries({
6267
+ }), s.invalidateQueries({
6268
6268
  queryKey: [C, "getOne"]
6269
- }), typeof s?.setValue == "function" && T !== void 0 && T !== null && T !== "" && s.setValue(g, T, {
6269
+ }), typeof a?.setValue == "function" && T !== void 0 && T !== null && T !== "" && a.setValue(g, T, {
6270
6270
  shouldDirty: !0,
6271
6271
  shouldTouch: !0,
6272
6272
  shouldValidate: !0
6273
6273
  });
6274
6274
  },
6275
- [s, a, C, g]
6275
+ [a, s, C, g]
6276
6276
  ), E = ne(
6277
6277
  (O, G, Q) => {
6278
6278
  Q === "input" && Array.isArray(y) && y.length > 0 && G !== void 0 && F([]);
@@ -6362,20 +6362,20 @@ const Sc = /* @__PURE__ */ n((e) => {
6362
6362
  }
6363
6363
  ) : null;
6364
6364
  }, "ComboBox"), qi = /* @__PURE__ */ n((e) => typeof e == "string" ? e.trimStart() : e, "trimLeading"), xh = /* @__PURE__ */ n((e) => {
6365
- const { label: t, sx: o, source: r } = e, a = Ge(), { estado: s } = Re(), {
6365
+ const { label: t, sx: o, source: r } = e, s = Ge(), { estado: a } = Re(), {
6366
6366
  hidden: c,
6367
6367
  propsContenido: { helperText: l, sx: d, readOnly: p, onChange: u, InputProps: m }
6368
6368
  } = tt(e);
6369
6369
  return v.useEffect(() => {
6370
- if (s !== "ND" || !r)
6370
+ if (a !== "ND" || !r)
6371
6371
  return;
6372
- const h = a.getValues(r), f = qi(h);
6373
- f !== h && a.setValue(r, f, {
6372
+ const h = s.getValues(r), f = qi(h);
6373
+ f !== h && s.setValue(r, f, {
6374
6374
  shouldDirty: !1,
6375
6375
  shouldTouch: !1,
6376
6376
  shouldValidate: !1
6377
6377
  });
6378
- }, [s, a, r]), c ? null : /* @__PURE__ */ R(
6378
+ }, [a, s, r]), c ? null : /* @__PURE__ */ R(
6379
6379
  Y,
6380
6380
  {
6381
6381
  className: "Metiri-TextCombo",
@@ -6419,18 +6419,18 @@ const Sc = /* @__PURE__ */ n((e) => {
6419
6419
  }
6420
6420
  );
6421
6421
  }, "TextCombo"), yh = /* @__PURE__ */ n((e) => {
6422
- const { propsContenido: t, hidden: o } = tt(e), { conts: r = {} } = we(Ye) || {}, a = r?.[e.source]?.options, s = v.useMemo(() => {
6423
- if (!(typeof a != "string" || a.trim() === ""))
6422
+ const { propsContenido: t, hidden: o } = tt(e), { conts: r = {} } = we(Ye) || {}, s = r?.[e.source]?.options, a = v.useMemo(() => {
6423
+ if (!(typeof s != "string" || s.trim() === ""))
6424
6424
  try {
6425
- const p = JSON.parse(a);
6425
+ const p = JSON.parse(s);
6426
6426
  return Array.isArray(p) ? p : void 0;
6427
6427
  } catch {
6428
6428
  return;
6429
6429
  }
6430
- }, [a]), c = v.useMemo(() => {
6430
+ }, [s]), c = v.useMemo(() => {
6431
6431
  const p = t?.choices, u = e?.choices;
6432
- return p !== void 0 && p !== u ? p : s !== void 0 ? s : u;
6433
- }, [t?.choices, e?.choices, s]), l = v.useMemo(() => t?.isRequired || !Array.isArray(c) ? !1 : !c.some(
6432
+ return p !== void 0 && p !== u ? p : a !== void 0 ? a : u;
6433
+ }, [t?.choices, e?.choices, a]), l = v.useMemo(() => t?.isRequired || !Array.isArray(c) ? !1 : !c.some(
6434
6434
  (p) => String(p?.id ?? "").trim() === "0"
6435
6435
  ), [c, t?.isRequired]), d = v.useMemo(() => {
6436
6436
  const p = { ...t };
@@ -6446,15 +6446,15 @@ const Sc = /* @__PURE__ */ n((e) => {
6446
6446
  display: "inline-flex"
6447
6447
  }
6448
6448
  }, Ch = /* @__PURE__ */ n((e) => {
6449
- const { sx: t, ...o } = e, r = !!t?.gridColumn, { propsContenido: a, hidden: s } = tt(
6449
+ const { sx: t, ...o } = e, r = !!t?.gridColumn, { propsContenido: s, hidden: a } = tt(
6450
6450
  r ? o : e
6451
6451
  );
6452
- return !s && /* @__PURE__ */ i(
6452
+ return !a && /* @__PURE__ */ i(
6453
6453
  Y,
6454
6454
  {
6455
6455
  className: "Metiri-CheckBox",
6456
6456
  sx: r ? [oa, t] : oa,
6457
- children: /* @__PURE__ */ i(Jd, { ...a })
6457
+ children: /* @__PURE__ */ i(Jd, { ...s })
6458
6458
  }
6459
6459
  );
6460
6460
  }, "CheckBox"), wh = /* @__PURE__ */ n((e) => {
@@ -6479,38 +6479,38 @@ const Sc = /* @__PURE__ */ n((e) => {
6479
6479
  emptyText: t,
6480
6480
  items: o,
6481
6481
  onDoubleClick: r,
6482
- selectedSet: a
6482
+ selectedSet: s
6483
6483
  }) => /* @__PURE__ */ i(
6484
6484
  mn,
6485
6485
  {
6486
6486
  variant: "outlined",
6487
- sx: /* @__PURE__ */ n((s) => ({
6487
+ sx: /* @__PURE__ */ n((a) => ({
6488
6488
  width: "100%",
6489
- minWidth: s.spacing(24),
6490
- height: s.spacing(22),
6489
+ minWidth: a.spacing(24),
6490
+ height: a.spacing(22),
6491
6491
  overflow: "auto",
6492
- bgcolor: e ? s.palette.action.disabledBackground : "background.paper"
6492
+ bgcolor: e ? a.palette.action.disabledBackground : "background.paper"
6493
6493
  }), "sx"),
6494
- children: /* @__PURE__ */ i(Ao, { dense: !0, disablePadding: !0, children: o.length ? o.map((s) => /* @__PURE__ */ R(
6494
+ children: /* @__PURE__ */ i(Ao, { dense: !0, disablePadding: !0, children: o.length ? o.map((a) => /* @__PURE__ */ R(
6495
6495
  Jt,
6496
6496
  {
6497
6497
  disabled: e,
6498
- onDoubleClick: /* @__PURE__ */ n(() => r(s.id), "onDoubleClick"),
6498
+ onDoubleClick: /* @__PURE__ */ n(() => r(a.id), "onDoubleClick"),
6499
6499
  children: [
6500
6500
  /* @__PURE__ */ i(Qt, { sx: { minWidth: 36 }, children: /* @__PURE__ */ i(
6501
6501
  xl,
6502
6502
  {
6503
6503
  edge: "start",
6504
- checked: a.has(s.id),
6504
+ checked: s.has(a.id),
6505
6505
  tabIndex: -1,
6506
6506
  disableRipple: !0,
6507
6507
  disabled: e
6508
6508
  }
6509
6509
  ) }),
6510
- /* @__PURE__ */ i(Bt, { primary: s.etiqueta })
6510
+ /* @__PURE__ */ i(Bt, { primary: a.etiqueta })
6511
6511
  ]
6512
6512
  },
6513
- s.id
6513
+ a.id
6514
6514
  )) : /* @__PURE__ */ i(Ar, { children: /* @__PURE__ */ i(
6515
6515
  Bt,
6516
6516
  {
@@ -6521,8 +6521,8 @@ const Sc = /* @__PURE__ */ n((e) => {
6521
6521
  }
6522
6522
  ) }) })
6523
6523
  }
6524
- ), "SandboxChoiceList"), Fh = /* @__PURE__ */ n(({ choices: e, disabled: t, label: o, source: r, sx: a }) => {
6525
- const { field: s } = ln({ source: r }), c = Array.isArray(s.value) ? s.value : [], l = v.useMemo(
6524
+ ), "SandboxChoiceList"), Fh = /* @__PURE__ */ n(({ choices: e, disabled: t, label: o, source: r, sx: s }) => {
6525
+ const { field: a } = ln({ source: r }), c = Array.isArray(a.value) ? a.value : [], l = v.useMemo(
6526
6526
  () => Mh(e),
6527
6527
  [e]
6528
6528
  ), d = v.useMemo(() => new Set(c), [c]), p = v.useMemo(
@@ -6532,15 +6532,15 @@ const Sc = /* @__PURE__ */ n((e) => {
6532
6532
  () => c.map((f) => l.find((g) => g.id === f)).filter(Boolean),
6533
6533
  [l, c]
6534
6534
  ), m = /* @__PURE__ */ n((f) => {
6535
- t || d.has(f) || s.onChange([...c, f]);
6535
+ t || d.has(f) || a.onChange([...c, f]);
6536
6536
  }, "moveRight"), h = /* @__PURE__ */ n((f) => {
6537
- t || s.onChange(c.filter((g) => g !== f));
6537
+ t || a.onChange(c.filter((g) => g !== f));
6538
6538
  }, "moveLeft");
6539
6539
  return /* @__PURE__ */ i(
6540
6540
  Me,
6541
6541
  {
6542
6542
  sx: {
6543
- ...a,
6543
+ ...s,
6544
6544
  width: { xs: "100%", md: "calc(48vw + 2em)" },
6545
6545
  maxWidth: "100%",
6546
6546
  display: "inline-block",
@@ -6584,7 +6584,7 @@ const Sc = /* @__PURE__ */ n((e) => {
6584
6584
  }
6585
6585
  );
6586
6586
  }, "ListCheckPreviewSandbox"), ia = /* @__PURE__ */ n((e, t) => e.filter((o) => !t.includes(o)), "not"), Mt = /* @__PURE__ */ n((e, t) => e.filter((o) => t.includes(o)), "intersection"), Ph = /* @__PURE__ */ n((e) => {
6587
- const t = he(), { source: o, record: r, sx: a = {}, readOnly: s, disabled: c } = e, l = !!(s || c), { allChoices: d, availableChoices: p } = Va(), [u, m] = v.useState([]), [h, f] = v.useState(null), g = Ge(), C = qu({ control: g.control, name: o }), x = Array.isArray(C) ? C : r?.[o] || [], b = v.useMemo(
6587
+ const t = he(), { source: o, record: r, sx: s = {}, readOnly: a, disabled: c } = e, l = !!(a || c), { allChoices: d, availableChoices: p } = Va(), [u, m] = v.useState([]), [h, f] = v.useState(null), g = Ge(), C = qu({ control: g.control, name: o }), x = Array.isArray(C) ? C : r?.[o] || [], b = v.useMemo(
6588
6588
  () => Array.isArray(r?.[o]) ? r[o] : [],
6589
6589
  [r, o]
6590
6590
  ), [P, S] = v.useState(""), { field: y } = ln({ defaultValue: "", ...e }), F = v.useMemo(
@@ -6801,7 +6801,7 @@ const Sc = /* @__PURE__ */ n((e) => {
6801
6801
  minWidth: 0,
6802
6802
  pt: 1,
6803
6803
  gridColumn: "1 / -1",
6804
- ...a
6804
+ ...s
6805
6805
  }), "sx"),
6806
6806
  children: [
6807
6807
  /* @__PURE__ */ i(
@@ -6976,12 +6976,12 @@ const Sc = /* @__PURE__ */ n((e) => {
6976
6976
  }, "TransferListChild"), Ih = /* @__PURE__ */ n((e) => {
6977
6977
  const {
6978
6978
  propsContenido: { sx: t, choices: o = [], ...r },
6979
- hidden: a
6980
- } = tt(e), { isLoading: s } = Re(), c = gn(), {
6979
+ hidden: s
6980
+ } = tt(e), { isLoading: a } = Re(), c = gn(), {
6981
6981
  isActive: l,
6982
6982
  hasBeenActive: d = l
6983
6983
  } = yi(), p = mt((f) => f.breakpoints.down("md")), { source: u, reference: m } = e, h = st(e) || {};
6984
- return !a && c?.enabled ? /* @__PURE__ */ i(
6984
+ return !s && c?.enabled ? /* @__PURE__ */ i(
6985
6985
  Fh,
6986
6986
  {
6987
6987
  ...r,
@@ -6989,7 +6989,7 @@ const Sc = /* @__PURE__ */ n((e) => {
6989
6989
  source: u,
6990
6990
  choices: o
6991
6991
  }
6992
- ) : !a && !s && d ? /* @__PURE__ */ i(
6992
+ ) : !s && !a && d ? /* @__PURE__ */ i(
6993
6993
  Qd,
6994
6994
  {
6995
6995
  source: u,
@@ -7024,8 +7024,8 @@ const Sc = /* @__PURE__ */ n((e) => {
7024
7024
  const {
7025
7025
  propsContenido: { sx: t, ...o },
7026
7026
  hidden: r
7027
- } = tt(e), { isLoading: a } = Re(), { source: s, reference: c } = e;
7028
- return !r && !a ? /* @__PURE__ */ i($a, { source: s, reference: c, children: /* @__PURE__ */ i(
7027
+ } = tt(e), { isLoading: s } = Re(), { source: a, reference: c } = e;
7028
+ return !r && !s ? /* @__PURE__ */ i($a, { source: a, reference: c, children: /* @__PURE__ */ i(
7029
7029
  za,
7030
7030
  {
7031
7031
  ...o,
@@ -7041,15 +7041,15 @@ const Sc = /* @__PURE__ */ n((e) => {
7041
7041
  const {
7042
7042
  propsContenido: { sx: t, ...o },
7043
7043
  hidden: r
7044
- } = tt(e), { conts: a = {} } = we(Ye) || {}, s = a?.[e.source]?.options, c = v.useMemo(() => {
7045
- if (!(typeof s != "string" || s.trim() === ""))
7044
+ } = tt(e), { conts: s = {} } = we(Ye) || {}, a = s?.[e.source]?.options, c = v.useMemo(() => {
7045
+ if (!(typeof a != "string" || a.trim() === ""))
7046
7046
  try {
7047
- const p = JSON.parse(s);
7047
+ const p = JSON.parse(a);
7048
7048
  return Array.isArray(p) ? p : void 0;
7049
7049
  } catch {
7050
7050
  return;
7051
7051
  }
7052
- }, [s]), l = v.useMemo(() => {
7052
+ }, [a]), l = v.useMemo(() => {
7053
7053
  const p = o?.choices, u = e?.choices;
7054
7054
  return p !== void 0 && p !== u ? p : c !== void 0 ? c : u;
7055
7055
  }, [o?.choices, e?.choices, c]), d = v.useMemo(() => {
@@ -7066,22 +7066,22 @@ const Sc = /* @__PURE__ */ n((e) => {
7066
7066
  }
7067
7067
  }
7068
7068
  );
7069
- }, "RadioButtonManual"), Tc = /* @__PURE__ */ n((e, { Grid: t, Box: o, controls: r, SectionGroup: a }) => ko.map(e, (s) => {
7070
- if (!Ft(s))
7071
- return s;
7072
- const c = ko.toArray(s.props.children);
7073
- if (!(s.type === t && !s.props.container && c.some((f) => Ft(f) && r.has(f.type))))
7074
- return s.props.children && (!s.props.source || s.type === a) ? Ct(
7075
- s,
7069
+ }, "RadioButtonManual"), Tc = /* @__PURE__ */ n((e, { Grid: t, Box: o, controls: r, SectionGroup: s }) => ko.map(e, (a) => {
7070
+ if (!Ft(a))
7071
+ return a;
7072
+ const c = ko.toArray(a.props.children);
7073
+ if (!(a.type === t && !a.props.container && c.some((f) => Ft(f) && r.has(f.type))))
7074
+ return a.props.children && (!a.props.source || a.type === s) ? Ct(
7075
+ a,
7076
7076
  {},
7077
- Tc(s.props.children, {
7077
+ Tc(a.props.children, {
7078
7078
  Grid: t,
7079
7079
  Box: o,
7080
7080
  controls: r,
7081
- SectionGroup: a
7081
+ SectionGroup: s
7082
7082
  })
7083
- ) : s;
7084
- const d = s.props.sx, p = typeof d?.gridTemplateColumns == "string" ? Number(d.gridTemplateColumns.match(/repeat\((\d+)/)?.[1]) : 0, m = `@container (width < ${p ? p * 200 + (p - 1) * 8 : 824}px)`, h = c.map((f) => {
7083
+ ) : a;
7084
+ const d = a.props.sx, p = typeof d?.gridTemplateColumns == "string" ? Number(d.gridTemplateColumns.match(/repeat\((\d+)/)?.[1]) : 0, m = `@container (width < ${p ? p * 200 + (p - 1) * 8 : 824}px)`, h = c.map((f) => {
7085
7085
  const g = Ft(f) && r.get(f.type);
7086
7086
  if (!g)
7087
7087
  return f;
@@ -7135,9 +7135,9 @@ const Sc = /* @__PURE__ */ n((e) => {
7135
7135
  );
7136
7136
  });
7137
7137
  return Ct(
7138
- s,
7138
+ a,
7139
7139
  {
7140
- className: [s.props.className, "FichaVisual-row"].filter(Boolean).join(" "),
7140
+ className: [a.props.className, "FichaVisual-row"].filter(Boolean).join(" "),
7141
7141
  sx: [
7142
7142
  d,
7143
7143
  {
@@ -7161,10 +7161,10 @@ const Sc = /* @__PURE__ */ n((e) => {
7161
7161
  },
7162
7162
  h
7163
7163
  );
7164
- }), "presentFichaChildren"), kh = /* @__PURE__ */ n(({ title: e, children: t, sx: o, source: r, ...a }) => {
7165
- const s = ui(), { hidden: c, propsContenido: l } = tt({
7164
+ }), "presentFichaChildren"), kh = /* @__PURE__ */ n(({ title: e, children: t, sx: o, source: r, ...s }) => {
7165
+ const a = ui(), { hidden: c, propsContenido: l } = tt({
7166
7166
  source: r,
7167
- ...a
7167
+ ...s
7168
7168
  }), d = l.title ?? l.label ?? e;
7169
7169
  return c ? null : /* @__PURE__ */ R(
7170
7170
  Me,
@@ -7192,11 +7192,11 @@ const Sc = /* @__PURE__ */ n((e) => {
7192
7192
  "& .MuiGrid-root": {
7193
7193
  minWidth: 0
7194
7194
  },
7195
- ...af(s),
7195
+ ...af(a),
7196
7196
  ...o
7197
7197
  },
7198
7198
  id: r,
7199
- ...a,
7199
+ ...s,
7200
7200
  children: [
7201
7201
  /* @__PURE__ */ i(
7202
7202
  Pt,
@@ -7258,20 +7258,20 @@ const Sc = /* @__PURE__ */ n((e) => {
7258
7258
  controls: kc,
7259
7259
  SectionGroup: kh
7260
7260
  }), "presentFicha"), _h = /* @__PURE__ */ n((e) => {
7261
- const { validateDelete: t, className: o } = e, r = xe(e), a = st(), s = gt(), { mutationOptions: { onError: c } = {} } = Re(), { open: l, isLoading: d, handleDialogOpen: p, handleDialogClose: u } = eu({ record: a, resource: r }), m = /* @__PURE__ */ n((f) => {
7261
+ const { validateDelete: t, className: o } = e, r = xe(e), s = st(), a = gt(), { mutationOptions: { onError: c } = {} } = Re(), { open: l, isLoading: d, handleDialogOpen: p, handleDialogClose: u } = eu({ record: s, resource: r }), m = /* @__PURE__ */ n((f) => {
7262
7262
  p(f);
7263
7263
  }, "handleClick"), h = ne(
7264
7264
  async (f) => {
7265
- if (a)
7265
+ if (s)
7266
7266
  try {
7267
- await t(a);
7267
+ await t(s);
7268
7268
  } catch (g) {
7269
- c && typeof c == "function" ? c(g) : s(g.message, { type: "error" });
7269
+ c && typeof c == "function" ? c(g) : a(g.message, { type: "error" });
7270
7270
  } finally {
7271
7271
  u(f);
7272
7272
  }
7273
7273
  },
7274
- [a, t, s, u, c]
7274
+ [s, t, a, u, c]
7275
7275
  );
7276
7276
  return /* @__PURE__ */ R(rt, { children: [
7277
7277
  /* @__PURE__ */ i(
@@ -7308,8 +7308,8 @@ const Sc = /* @__PURE__ */ n((e) => {
7308
7308
  }, "composeCallbacks"), rn = /* @__PURE__ */ n((e, t) => {
7309
7309
  if (!e && !t)
7310
7310
  return;
7311
- const o = e || {}, r = t || {}, a = { ...r, ...o };
7312
- return a.onSuccess = Ui(o.onSuccess, r.onSuccess), a.onError = Ui(o.onError, r.onError), a.onSettled = Ui(o.onSettled, r.onSettled), a;
7311
+ const o = e || {}, r = t || {}, s = { ...r, ...o };
7312
+ return s.onSuccess = Ui(o.onSuccess, r.onSuccess), s.onError = Ui(o.onError, r.onError), s.onSettled = Ui(o.onSettled, r.onSettled), s;
7313
7313
  }, "mergeMutationOptions"), Ac = {
7314
7314
  position: "relative",
7315
7315
  width: "100%",
@@ -7355,8 +7355,8 @@ const Sc = /* @__PURE__ */ n((e) => {
7355
7355
  "& .MuiButton-root": { minHeight: 44 }
7356
7356
  }
7357
7357
  }, _c = /* @__PURE__ */ n(({ disabled: e = !1 } = {}) => {
7358
- const { isSubmitting: t } = cl(), o = tu(), { reset: r } = Ge(), [a, s] = v.useState(!1), c = he(), l = o ? "#92610D" : "#6B7890", d = e || t, p = /* @__PURE__ */ n(() => {
7359
- d || (r(), s(!1));
7358
+ const { isSubmitting: t } = cl(), o = tu(), { reset: r } = Ge(), [s, a] = v.useState(!1), c = he(), l = o ? "#92610D" : "#6B7890", d = e || t, p = /* @__PURE__ */ n(() => {
7359
+ d || (r(), a(!1));
7360
7360
  }, "discard");
7361
7361
  return /* @__PURE__ */ R(rt, { children: [
7362
7362
  o && /* @__PURE__ */ i(
@@ -7367,7 +7367,7 @@ const Sc = /* @__PURE__ */ n((e) => {
7367
7367
  className: "metiri-discard-button",
7368
7368
  startIcon: /* @__PURE__ */ i(ei, {}),
7369
7369
  disabled: d,
7370
- onClick: /* @__PURE__ */ n(() => s(!0), "onClick"),
7370
+ onClick: /* @__PURE__ */ n(() => a(!0), "onClick"),
7371
7371
  children: c("pos.form_discard", { _: "Descartar" })
7372
7372
  }
7373
7373
  ),
@@ -7397,7 +7397,7 @@ const Sc = /* @__PURE__ */ n((e) => {
7397
7397
  /* @__PURE__ */ i(
7398
7398
  cn,
7399
7399
  {
7400
- isOpen: a,
7400
+ isOpen: s,
7401
7401
  loading: d,
7402
7402
  title: c("pos.form_discard_title", { _: "Hay cambios sin guardar" }),
7403
7403
  content: c("pos.form_discard_content", { _: "¿Volver a los valores iniciales de esta ficha?" }),
@@ -7405,7 +7405,7 @@ const Sc = /* @__PURE__ */ n((e) => {
7405
7405
  cancel: c("pos.form_discard_cancel", { _: "Seguir editando" }),
7406
7406
  ConfirmIcon: ei,
7407
7407
  onConfirm: p,
7408
- onClose: /* @__PURE__ */ n(() => s(!1), "onClose")
7408
+ onClose: /* @__PURE__ */ n(() => a(!1), "onClose")
7409
7409
  }
7410
7410
  )
7411
7411
  ] });
@@ -7463,11 +7463,11 @@ const Sc = /* @__PURE__ */ n((e) => {
7463
7463
  }
7464
7464
  }
7465
7465
  }), "getClassesForm"), Fi = /* @__PURE__ */ n((e) => {
7466
- const { deleteButton: t = !0, sx: o, ...r } = e, { estado: a } = Re(), s = xe(e), c = no({ resource: s }), l = Pi({ borrar: !0, ...r });
7466
+ const { deleteButton: t = !0, sx: o, ...r } = e, { estado: s } = Re(), a = xe(e), c = no({ resource: a }), l = Pi({ borrar: !0, ...r });
7467
7467
  return /* @__PURE__ */ i(Ga, { ...r, sx: [Ac, ...Array.isArray(o) ? o : o ? [o] : []], children: /* @__PURE__ */ R("div", { className: ou.defaultToolbar, children: [
7468
7468
  /* @__PURE__ */ i(dn, { className: "metiri-save-button" }),
7469
7469
  /* @__PURE__ */ i(_c, {}),
7470
- a === "M" && c?.options?.borra && t && /* @__PURE__ */ i(
7470
+ s === "M" && c?.options?.borra && t && /* @__PURE__ */ i(
7471
7471
  _h,
7472
7472
  {
7473
7473
  resource: r.resource,
@@ -7477,7 +7477,7 @@ const Sc = /* @__PURE__ */ n((e) => {
7477
7477
  ] }) });
7478
7478
  }, "ToolbarFicha"), Ki = /* @__PURE__ */ n(() => {
7479
7479
  }, "dontSave"), Eh = /* @__PURE__ */ n(() => typeof document > "u" ? !1 : !!document.activeElement?.closest?.(Dh), "isDialogInteraction$1"), Oh = /* @__PURE__ */ n((e, t) => typeof e?.hide != "function" || !e?.open ? !1 : t ? !0 : Eh() ? !!(e?.props?._popupKey || e?.props?.tipo === "vista") : !1, "canHideAsistentePopup$1"), Pi = /* @__PURE__ */ n((e) => {
7480
- const { borrar: t = !1 } = e, o = xe(), r = st(), a = he(), s = Vt(), c = gt(), l = It(), {
7480
+ const { borrar: t = !1 } = e, o = xe(), r = st(), s = he(), a = Vt(), c = gt(), l = It(), {
7481
7481
  estado: d,
7482
7482
  mutationOptions: p = {},
7483
7483
  fichaProps: { onBeforeSubmitFicha: u } = {}
@@ -7493,12 +7493,12 @@ const Sc = /* @__PURE__ */ n((e) => {
7493
7493
  type: "info",
7494
7494
  messageArgs: {
7495
7495
  smart_count: 1,
7496
- _: a("ra.notification.deleted", {
7496
+ _: s("ra.notification.deleted", {
7497
7497
  smart_count: 1
7498
7498
  })
7499
7499
  },
7500
7500
  undoable: !1
7501
- }), Oh(l, f) && (f ? l.hide({ popupKey: f }) : l.hide()), s("list", o, void 0, void 0, {
7501
+ }), Oh(l, f) && (f ? l.hide({ popupKey: f }) : l.hide()), a("list", o, void 0, void 0, {
7502
7502
  _scrollToTop: !1
7503
7503
  });
7504
7504
  }, "onSuccess"),
@@ -7574,17 +7574,17 @@ const Dc = /* @__PURE__ */ n(() => {
7574
7574
  opacity: 0.6,
7575
7575
  position: "relative"
7576
7576
  }, Wh = /* @__PURE__ */ n((e) => {
7577
- const t = Ge(), o = Co(), r = _e(ur("etr")).current, a = zt(), s = o.open ? Vh : Nh;
7577
+ const t = Ge(), o = Co(), r = _e(ur("etr")).current, s = zt(), a = o.open ? Vh : Nh;
7578
7578
  return ie(
7579
7579
  () => () => {
7580
- a(dr(r));
7580
+ s(dr(r));
7581
7581
  },
7582
- [a, r]
7582
+ [s, r]
7583
7583
  ), /* @__PURE__ */ i($o.Provider, { value: { form: t, reduxScope: r }, children: /* @__PURE__ */ R(
7584
7584
  Ra,
7585
7585
  {
7586
7586
  sx: {
7587
- ...s
7587
+ ...a
7588
7588
  },
7589
7589
  children: [
7590
7590
  o.open && /* @__PURE__ */ i(
@@ -7647,24 +7647,24 @@ const Dc = /* @__PURE__ */ n(() => {
7647
7647
  const t = ui(), {
7648
7648
  form: o,
7649
7649
  resource: r,
7650
- estado: a,
7651
- editors: s,
7650
+ estado: s,
7651
+ editors: a,
7652
7652
  recordPadre: c,
7653
7653
  camposClaveFila: l,
7654
7654
  setOpen: d,
7655
7655
  open: p
7656
7656
  } = e, { dirtyFields: u, isValid: m } = cl(), { fichaProps: { [e.source]: h = {} } = {} } = Re(), f = Co(), { onAfterRenderAsistente: g, ...C } = h, x = St({ resource: r });
7657
7657
  return ie(() => {
7658
- p && typeof g == "function" && g({ ...x, form: o }, a);
7658
+ p && typeof g == "function" && g({ ...x, form: o }, s);
7659
7659
  }, [p]), /* @__PURE__ */ R(rt, { children: [
7660
- /* @__PURE__ */ i(fi, { className: "Asistente-content", children: /* @__PURE__ */ i(li, { spacing: t.metiri?.fichaVisual ? "19px" : 4, children: ko.map(s, (b) => {
7660
+ /* @__PURE__ */ i(fi, { className: "Asistente-content", children: /* @__PURE__ */ i(li, { spacing: t.metiri?.fichaVisual ? "19px" : 4, children: ko.map(a, (b) => {
7661
7661
  const P = Ct(b, {
7662
7662
  resource: r,
7663
- estado: a,
7663
+ estado: s,
7664
7664
  defaultValue: c[b.props.source] || "",
7665
7665
  fullWidth: !0,
7666
7666
  sx: { margin: 0 },
7667
- disabled: a !== "N" && (l.indexOf(b.props.source) !== -1 || b.props.disabled),
7667
+ disabled: s !== "N" && (l.indexOf(b.props.source) !== -1 || b.props.disabled),
7668
7668
  ...C[b.props.source]
7669
7669
  /*InputLabelProps: { shrink: true },*/
7670
7670
  }), S = kc.get(b.type);
@@ -7701,13 +7701,13 @@ const Dc = /* @__PURE__ */ n(() => {
7701
7701
  editors: t,
7702
7702
  record: o,
7703
7703
  camposClaveFila: r,
7704
- label: a,
7705
- source: s,
7704
+ label: s,
7705
+ source: a,
7706
7706
  enviarTodo: c,
7707
7707
  onBeforeSubmitAsistente: l = Eo,
7708
7708
  onAfterSubmitAsistente: d = Eo,
7709
7709
  validateAllowAdd: p
7710
- } = e, [u, m] = v.useState(!1), h = xe(e), f = Ge(), g = io(), C = Yl({ apiRef: g, source: s, enviarTodo: c }), x = "N", { estado: b } = Re(), P = St(), y = he()("ra.action.create");
7710
+ } = e, [u, m] = v.useState(!1), h = xe(e), f = Ge(), g = io(), C = Yl({ apiRef: g, source: a, enviarTodo: c }), x = "N", { estado: b } = Re(), P = St(), y = he()("ra.action.create");
7711
7711
  return /* @__PURE__ */ R(rt, { children: [
7712
7712
  /* @__PURE__ */ i(
7713
7713
  Ze,
@@ -7727,7 +7727,7 @@ const Dc = /* @__PURE__ */ n(() => {
7727
7727
  m(!1), M.stopPropagation();
7728
7728
  }, "onClose"),
7729
7729
  labelEstado: y,
7730
- label: a,
7730
+ label: s,
7731
7731
  resource: h,
7732
7732
  onSubmit: /* @__PURE__ */ n(async (M, I) => {
7733
7733
  const k = await l(
@@ -7741,7 +7741,7 @@ const Dc = /* @__PURE__ */ n(() => {
7741
7741
  children: /* @__PURE__ */ i(
7742
7742
  Oc,
7743
7743
  {
7744
- source: s,
7744
+ source: a,
7745
7745
  form: f,
7746
7746
  resource: h,
7747
7747
  estado: x,
@@ -7762,13 +7762,13 @@ const Dc = /* @__PURE__ */ n(() => {
7762
7762
  editors: t,
7763
7763
  camposClaveFila: o,
7764
7764
  resource: r,
7765
- label: a,
7766
- source: s,
7765
+ label: s,
7766
+ source: a,
7767
7767
  row: c,
7768
7768
  enviarTodo: l,
7769
7769
  onBeforeSubmitAsistente: d = Eo,
7770
7770
  onAfterSubmitAsistente: p = Eo
7771
- } = e, u = he(), [m, h] = v.useState(!1), f = io(), g = Ge(), C = Jl({ apiRef: f, source: s, enviarTodo: l }), x = "M", { estado: b } = Re(), P = St(), S = u("ra.action.edit");
7771
+ } = e, u = he(), [m, h] = v.useState(!1), f = io(), g = Ge(), C = Jl({ apiRef: f, source: a, enviarTodo: l }), x = "M", { estado: b } = Re(), P = St(), S = u("ra.action.edit");
7772
7772
  return /* @__PURE__ */ R(rt, { children: [
7773
7773
  /* @__PURE__ */ i(
7774
7774
  Ze,
@@ -7787,7 +7787,7 @@ const Dc = /* @__PURE__ */ n(() => {
7787
7787
  h(!1), F.stopPropagation();
7788
7788
  }, "onClose"),
7789
7789
  labelEstado: S,
7790
- label: a,
7790
+ label: s,
7791
7791
  resource: r,
7792
7792
  onSubmit: /* @__PURE__ */ n(async (F, M) => {
7793
7793
  const I = await d(
@@ -7801,7 +7801,7 @@ const Dc = /* @__PURE__ */ n(() => {
7801
7801
  children: /* @__PURE__ */ i(
7802
7802
  Oc,
7803
7803
  {
7804
- source: s,
7804
+ source: a,
7805
7805
  form: g,
7806
7806
  resource: r,
7807
7807
  estado: x,
@@ -7823,11 +7823,11 @@ const Dc = /* @__PURE__ */ n(() => {
7823
7823
  //'ra.action.delete'
7824
7824
  confirmContent: o = "ra.message.delete_content",
7825
7825
  row: r,
7826
- source: a,
7827
- enviarTodo: s,
7826
+ source: s,
7827
+ enviarTodo: a,
7828
7828
  onBeforeSubmitAsistente: c = Eo,
7829
7829
  onAfterSubmitAsistente: l = Eo
7830
- } = e, [d, p] = v.useState(!1), u = io(), m = Ge(), h = Ql({ apiRef: u, source: a, enviarTodo: s }), { estado: f } = Re(), g = St();
7830
+ } = e, [d, p] = v.useState(!1), u = io(), m = Ge(), h = Ql({ apiRef: u, source: s, enviarTodo: a }), { estado: f } = Re(), g = St();
7831
7831
  return /* @__PURE__ */ R(ut, { children: [
7832
7832
  /* @__PURE__ */ i(
7833
7833
  Lh,
@@ -7865,8 +7865,8 @@ const Dc = /* @__PURE__ */ n(() => {
7865
7865
  filterBy: t = "",
7866
7866
  claves: o,
7867
7867
  sortModel: r,
7868
- columns: a,
7869
- reference: s,
7868
+ columns: s,
7869
+ reference: a,
7870
7870
  allowEdit: c = !0,
7871
7871
  allowAdd: l = !0,
7872
7872
  allowRemove: d = !0,
@@ -7949,7 +7949,7 @@ const Dc = /* @__PURE__ */ n(() => {
7949
7949
  const z = _e();
7950
7950
  ie(() => () => clearTimeout(z.current), [f]);
7951
7951
  const { isFetching: Ne, refetch: $e } = ja(
7952
- s,
7952
+ a,
7953
7953
  {
7954
7954
  pagination: { page: 1, perPage: 200 },
7955
7955
  sort: { field: at, order: Je },
@@ -8027,7 +8027,7 @@ const Dc = /* @__PURE__ */ n(() => {
8027
8027
  label: Ot,
8028
8028
  confirmTitle: yn,
8029
8029
  confirmContent: Ve
8030
- }, Oe = a.map((Be) => {
8030
+ }, Oe = s.map((Be) => {
8031
8031
  const ao = {
8032
8032
  ...Be,
8033
8033
  ...He?.[Be.field] || {},
@@ -8101,7 +8101,7 @@ const Dc = /* @__PURE__ */ n(() => {
8101
8101
  }, "renderCell")
8102
8102
  })), Oe;
8103
8103
  }, [
8104
- a,
8104
+ s,
8105
8105
  He,
8106
8106
  At,
8107
8107
  be,
@@ -8342,8 +8342,8 @@ const Dc = /* @__PURE__ */ n(() => {
8342
8342
  filterBy: t = "",
8343
8343
  sortModel: o,
8344
8344
  columns: r,
8345
- reference: a,
8346
- enableLoad: s = !0,
8345
+ reference: s,
8346
+ enableLoad: a = !0,
8347
8347
  initialState: c,
8348
8348
  ...l
8349
8349
  } = e, { isLoading: d } = Re(), p = st(e), [u, m] = te(o), [{ field: h, sort: f }] = o;
@@ -8366,14 +8366,14 @@ const Dc = /* @__PURE__ */ n(() => {
8366
8366
  isFetching: L,
8367
8367
  refetch: W
8368
8368
  } = ja(
8369
- a,
8369
+ s,
8370
8370
  {
8371
8371
  pagination: { page: 1, perPage: 200 },
8372
8372
  sort: { field: h, order: f },
8373
8373
  filter: g
8374
8374
  },
8375
8375
  {
8376
- enabled: s && !d && F
8376
+ enabled: a && !d && F
8377
8377
  }
8378
8378
  ), j = Ir(), q = ll({
8379
8379
  apiRef: j,
@@ -8433,8 +8433,8 @@ const Dc = /* @__PURE__ */ n(() => {
8433
8433
  const {
8434
8434
  filterValues: t,
8435
8435
  setFilters: o,
8436
- tabs: { ids: r, ...a },
8437
- GridComponent: s = Jf,
8436
+ tabs: { ids: r, ...s },
8437
+ GridComponent: a = Jf,
8438
8438
  ...c
8439
8439
  } = e, l = t.id;
8440
8440
  return /* @__PURE__ */ R(ut, { children: [
@@ -8457,7 +8457,7 @@ const Dc = /* @__PURE__ */ n(() => {
8457
8457
  }
8458
8458
  ),
8459
8459
  /* @__PURE__ */ i(Or, {}),
8460
- /* @__PURE__ */ i(s, { ...c, ...a[l] })
8460
+ /* @__PURE__ */ i(a, { ...c, ...s[l] })
8461
8461
  ] });
8462
8462
  }, "TabbedGrillaEtriek"), Xr = /* @__PURE__ */ n((e) => {
8463
8463
  const { useFormulario: t = hn, ...o } = e;
@@ -8465,16 +8465,16 @@ const Dc = /* @__PURE__ */ n(() => {
8465
8465
  }, "useInitFicha"), jh = /* @__PURE__ */ n((e, t, o) => qa(e, { id: o?.id || "-1", meta: o }, t), "useNuevo"), cy = /* @__PURE__ */ n((e, t) => {
8466
8466
  const o = xe(), {
8467
8467
  data: r,
8468
- isFetching: a,
8469
- error: s
8468
+ isFetching: s,
8469
+ error: a
8470
8470
  } = qa("cb_" + im(o) + "_" + e, {
8471
8471
  id: t
8472
8472
  });
8473
- return a || s ? "" : r?.etiqueta || "";
8473
+ return s || a ? "" : r?.etiqueta || "";
8474
8474
  }, "useReferenceLabel"), Bc = /* @__PURE__ */ n((e) => {
8475
- const t = he(), { defaultTitle: o, onClose: r, record: a, title: s } = e;
8475
+ const t = he(), { defaultTitle: o, onClose: r, record: s, title: a } = e;
8476
8476
  return /* @__PURE__ */ R(qh, { id: "edit-dialog-title", children: [
8477
- Ft(s) ? Ct(s, { record: a }) : s ? t(s, { _: s }) : o,
8477
+ Ft(a) ? Ct(a, { record: s }) : a ? t(a, { _: a }) : o,
8478
8478
  /* @__PURE__ */ i(
8479
8479
  lt,
8480
8480
  {
@@ -8509,8 +8509,8 @@ const Dc = /* @__PURE__ */ n(() => {
8509
8509
  hasCreate: t = null,
8510
8510
  hasEdit: o = null,
8511
8511
  hasList: r = null,
8512
- hasShow: a = null,
8513
- history: s = null,
8512
+ hasShow: s = null,
8513
+ history: a = null,
8514
8514
  loaded: c = null,
8515
8515
  loading: l = null,
8516
8516
  location: d = null,
@@ -8531,13 +8531,13 @@ const Dc = /* @__PURE__ */ n(() => {
8531
8531
  title: M = null,
8532
8532
  ...I
8533
8533
  }) => I, "sanitizeRestProps$4"), Kh = /* @__PURE__ */ n((e) => {
8534
- const t = xe(e), o = Vc(e), r = !!(o?.isOpen ?? e.isOpen), a = o?.close ?? e.close;
8534
+ const t = xe(e), o = Vc(e), r = !!(o?.isOpen ?? e.isOpen), s = o?.close ?? e.close;
8535
8535
  return /* @__PURE__ */ i(
8536
8536
  Xh,
8537
8537
  {
8538
8538
  resource: t,
8539
8539
  isOpen: r,
8540
- close: a,
8540
+ close: s,
8541
8541
  ...e
8542
8542
  }
8543
8543
  );
@@ -8547,20 +8547,20 @@ const Dc = /* @__PURE__ */ n(() => {
8547
8547
  // ?? debe ser "form-only" (sin <Create>)
8548
8548
  title: o,
8549
8549
  resource: r,
8550
- isOpen: a,
8551
- close: s,
8550
+ isOpen: s,
8551
+ close: a,
8552
8552
  maxWidth: c = "md",
8553
8553
  fullWidth: l = !0,
8554
8554
  PaperProps: d,
8555
8555
  mutationOptions: p,
8556
8556
  ...u
8557
8557
  } = e, m = xe(e), h = r ?? m, f = no({ resource: h }).options?.label, g = ci(), C = he(), x = Vt(), b = v.useCallback(() => {
8558
- if (s)
8559
- return s();
8558
+ if (a)
8559
+ return a();
8560
8560
  x("list", h, void 0, void 0, {
8561
8561
  _scrollToTop: !1
8562
8562
  });
8563
- }, [s, x, h]), P = v.useMemo(
8563
+ }, [a, x, h]), P = v.useMemo(
8564
8564
  () => ({
8565
8565
  resource: h,
8566
8566
  redirect: !1,
@@ -8573,7 +8573,7 @@ const Dc = /* @__PURE__ */ n(() => {
8573
8573
  }),
8574
8574
  [h, p, b]
8575
8575
  ), S = iu(P), y = o ?? `${C("ra.action.create")} ${h ? f || g(h, 1) : ""}`.trim(), F = /* @__PURE__ */ i(Ro, { value: h, children: /* @__PURE__ */ i(ru, { value: S, children: t }) });
8576
- return /* @__PURE__ */ i(rt, { children: a && /* @__PURE__ */ R(
8576
+ return /* @__PURE__ */ i(rt, { children: s && /* @__PURE__ */ R(
8577
8577
  Zn,
8578
8578
  {
8579
8579
  open: !0,
@@ -8617,17 +8617,17 @@ const Dc = /* @__PURE__ */ n(() => {
8617
8617
  }
8618
8618
  ) });
8619
8619
  }, "CreateDialogView"), Wc = /* @__PURE__ */ n((e) => {
8620
- const t = he(), [o, r] = te(!1), a = ne(() => {
8620
+ const t = he(), [o, r] = te(!1), s = ne(() => {
8621
8621
  r(!0);
8622
- }, []), s = ne(() => {
8622
+ }, []), a = ne(() => {
8623
8623
  r(!1);
8624
8624
  }, []), c = de(
8625
8625
  () => ({
8626
8626
  isOpen: o,
8627
- open: a,
8628
- close: s
8627
+ open: s,
8628
+ close: a
8629
8629
  }),
8630
- [s, o, a]
8630
+ [a, o, s]
8631
8631
  ), {
8632
8632
  icon: l = Yh,
8633
8633
  label: d = "",
@@ -8636,9 +8636,9 @@ const Dc = /* @__PURE__ */ n(() => {
8636
8636
  ButtonProps: m
8637
8637
  } = e, h = ne(
8638
8638
  (C) => {
8639
- a(), C.stopPropagation();
8639
+ s(), C.stopPropagation();
8640
8640
  },
8641
- [a]
8641
+ [s]
8642
8642
  ), f = t(d, { _: d }), g = p ? /* @__PURE__ */ i(wt, { title: f, children: /* @__PURE__ */ i(
8643
8643
  lt,
8644
8644
  {
@@ -8659,9 +8659,9 @@ const Dc = /* @__PURE__ */ n(() => {
8659
8659
  inline: t,
8660
8660
  icon: o = Qh,
8661
8661
  label: r = "ra.action.create",
8662
- ButtonProps: a,
8663
- ...s
8664
- } = e, c = /* @__PURE__ */ i(Kh, { ...s });
8662
+ ButtonProps: s,
8663
+ ...a
8664
+ } = e, c = /* @__PURE__ */ i(Kh, { ...a });
8665
8665
  return /* @__PURE__ */ i(
8666
8666
  Wc,
8667
8667
  {
@@ -8669,11 +8669,11 @@ const Dc = /* @__PURE__ */ n(() => {
8669
8669
  label: r,
8670
8670
  dialog: c,
8671
8671
  inline: t,
8672
- ButtonProps: a
8672
+ ButtonProps: s
8673
8673
  }
8674
8674
  );
8675
8675
  }, "CreateInDialogButton"), Qh = /* @__PURE__ */ i(un, {}), Hn = /* @__PURE__ */ new Set(), Zh = /* @__PURE__ */ n((e) => {
8676
- const { children: t, enableLoad: o, queryOptions: r, fichaProps: a, mutationOptions: s } = e, [c, l] = te(null), d = dt(), p = Nt(), u = xe(e), m = vi(u), h = e.estado ?? (d?.state?.estado || "N"), f = d?.state?.record, g = e.record ?? f, C = e.id ?? d?.state?.id ?? g?.id ?? "-1", x = `${u}:${h}:${C}`, P = C === "-1" && g && typeof g == "object" && !Array.isArray(g) ? Object.fromEntries(
8676
+ const { children: t, enableLoad: o, queryOptions: r, fichaProps: s, mutationOptions: a } = e, [c, l] = te(null), d = dt(), p = Nt(), u = xe(e), m = vi(u), h = e.estado ?? (d?.state?.estado || "N"), f = d?.state?.record, g = e.record ?? f, C = e.id ?? d?.state?.id ?? g?.id ?? "-1", x = `${u}:${h}:${C}`, P = C === "-1" && g && typeof g == "object" && !Array.isArray(g) ? Object.fromEntries(
8677
8677
  Object.entries(g).filter(
8678
8678
  ([, W]) => W != null && (typeof W == "string" || typeof W == "number" || typeof W == "boolean")
8679
8679
  )
@@ -8693,15 +8693,15 @@ const Dc = /* @__PURE__ */ n(() => {
8693
8693
  estado: h,
8694
8694
  initialValues: _ || {},
8695
8695
  isLoading: k,
8696
- mutationOptions: s,
8697
- fichaProps: a,
8696
+ mutationOptions: a,
8697
+ fichaProps: s,
8698
8698
  scopeIdentity: x
8699
8699
  }),
8700
8700
  [
8701
8701
  _,
8702
8702
  k,
8703
- s,
8704
8703
  a,
8704
+ s,
8705
8705
  h,
8706
8706
  x
8707
8707
  ]
@@ -8734,8 +8734,8 @@ const Dc = /* @__PURE__ */ n(() => {
8734
8734
  const t = dt(), {
8735
8735
  useFormulario: o,
8736
8736
  enableLoad: r = !0,
8737
- tipo: a,
8738
- queryOptions: s,
8737
+ tipo: s,
8738
+ queryOptions: a,
8739
8739
  mutationOptions: c,
8740
8740
  popupMutationOptions: l,
8741
8741
  children: d,
@@ -8743,7 +8743,7 @@ const Dc = /* @__PURE__ */ n(() => {
8743
8743
  id: u,
8744
8744
  record: m,
8745
8745
  ...h
8746
- } = e, f = p ?? (t?.state?.estado || "N"), { fichaProps: g } = Xr({ ...e, estado: f }), C = a === "ventana" ? Jh : su, x = de(
8746
+ } = e, f = p ?? (t?.state?.estado || "N"), { fichaProps: g } = Xr({ ...e, estado: f }), C = s === "ventana" ? Jh : su, x = de(
8747
8747
  () => rn(
8748
8748
  rn(
8749
8749
  c,
@@ -8771,7 +8771,7 @@ const Dc = /* @__PURE__ */ n(() => {
8771
8771
  record: m,
8772
8772
  fichaProps: g,
8773
8773
  enableLoad: r,
8774
- queryOptions: s,
8774
+ queryOptions: a,
8775
8775
  mutationOptions: x,
8776
8776
  children: d
8777
8777
  }
@@ -8780,39 +8780,39 @@ const Dc = /* @__PURE__ */ n(() => {
8780
8780
  );
8781
8781
  return /* @__PURE__ */ i(_o, { children: b });
8782
8782
  }, "CreateEtriekView"), eg = /* @__PURE__ */ n((e) => {
8783
- const t = dt(), o = It(), r = Vt(), a = gt(), s = xe(e), c = no({ resource: s }).options?.label, l = ai({
8784
- resource: s,
8783
+ const t = dt(), o = It(), r = Vt(), s = gt(), a = xe(e), c = no({ resource: a }).options?.label, l = ai({
8784
+ resource: a,
8785
8785
  dockviewTabParent: !0
8786
- }), d = ci(), p = he(), u = _e(!1), m = t?.state?._asistentePopup === "router" && typeof o?.show == "function", h = m ? `${s}:create` : null;
8786
+ }), d = ci(), p = he(), u = _e(!1), m = t?.state?._asistentePopup === "router" && typeof o?.show == "function", h = m ? `${a}:create` : null;
8787
8787
  return ie(() => {
8788
8788
  if (!m || u.current || (u.current = !0, h && (Hn.has(h) || o?.open && o?.props?._popupKey === h) || !h))
8789
8789
  return;
8790
8790
  h && Hn.add(h);
8791
8791
  const f = /* @__PURE__ */ n(() => {
8792
- h && Hn.delete(h), h ? o.hide({ popupKey: h }) : o.hide(), r("list", s, void 0, void 0, {
8792
+ h && Hn.delete(h), h ? o.hide({ popupKey: h }) : o.hide(), r("list", a, void 0, void 0, {
8793
8793
  _scrollToTop: !1
8794
8794
  });
8795
8795
  }, "handleClose"), g = e.mutationOptions || {}, C = {
8796
8796
  ...g,
8797
8797
  ...h ? { _popupKey: h } : {},
8798
8798
  onSuccess: /* @__PURE__ */ n((...b) => {
8799
- typeof g.onSuccess == "function" ? g.onSuccess(...b) : a("ra.notification.created", {
8799
+ typeof g.onSuccess == "function" ? g.onSuccess(...b) : s("ra.notification.created", {
8800
8800
  type: "info",
8801
8801
  messageArgs: { smart_count: 1 }
8802
8802
  }), h && Hn.delete(h), h ? o.hide({ popupKey: h }) : o.hide();
8803
8803
  }, "onSuccess")
8804
- }, x = e.title ?? `${p("ra.action.create")} ${Zo(c || d(s, 1) || s)}`;
8804
+ }, x = e.title ?? `${p("ra.action.create")} ${Zo(c || d(a, 1) || a)}`;
8805
8805
  o.show({
8806
8806
  title: x,
8807
8807
  tipo: "vista",
8808
8808
  cancelar: f,
8809
8809
  dialogProps: l,
8810
8810
  _popupKey: h,
8811
- controles: /* @__PURE__ */ i(Ro, { value: s, children: /* @__PURE__ */ i(
8811
+ controles: /* @__PURE__ */ i(Ro, { value: a, children: /* @__PURE__ */ i(
8812
8812
  la,
8813
8813
  {
8814
8814
  ...e,
8815
- resource: s,
8815
+ resource: a,
8816
8816
  tipo: void 0,
8817
8817
  mutationOptions: C
8818
8818
  }
@@ -8822,12 +8822,12 @@ const Dc = /* @__PURE__ */ n(() => {
8822
8822
  o,
8823
8823
  d,
8824
8824
  m,
8825
- a,
8825
+ s,
8826
8826
  l,
8827
8827
  h,
8828
8828
  e,
8829
8829
  r,
8830
- s,
8830
+ a,
8831
8831
  c,
8832
8832
  p
8833
8833
  ]), m ? null : /* @__PURE__ */ i(la, { ...e });
@@ -8848,9 +8848,9 @@ const Dc = /* @__PURE__ */ n(() => {
8848
8848
  mutationOptions: t,
8849
8849
  title: o,
8850
8850
  redirect: r = "list",
8851
- ...a
8851
+ ...s
8852
8852
  }) => {
8853
- const s = Vt(), c = gt(), l = fn(), d = {
8853
+ const a = Vt(), c = gt(), l = fn(), d = {
8854
8854
  onSuccess: /* @__PURE__ */ n((S) => {
8855
8855
  c("ra.notification.created", {
8856
8856
  type: "info",
@@ -8859,19 +8859,19 @@ const Dc = /* @__PURE__ */ n(() => {
8859
8859
  queryKey: [h, "getList"]
8860
8860
  }), l.invalidateQueries({
8861
8861
  queryKey: [h, "getManyReference"]
8862
- }), a.close ? a.close() : s(r, a.resource, S.id, S, {
8862
+ }), s.close ? s.close() : a(r, s.resource, S.id, S, {
8863
8863
  _scrollToTop: !1
8864
8864
  });
8865
8865
  }, "onSuccess"),
8866
8866
  ...t
8867
8867
  }, p = au({
8868
- ...a,
8868
+ ...s,
8869
8869
  mutationOptions: d
8870
8870
  }), { defaultTitle: u, record: m, resource: h } = p, f = /* @__PURE__ */ n(() => {
8871
- a.close ? a.close() : s("list", a.resource, void 0, void 0, {
8871
+ s.close ? s.close() : a("list", s.resource, void 0, void 0, {
8872
8872
  _scrollToTop: !1
8873
8873
  });
8874
- }, "handleClose"), g = og(a), {
8874
+ }, "handleClose"), g = og(s), {
8875
8875
  disableEnforceFocus: C = !0,
8876
8876
  disableAutoFocus: x = !0,
8877
8877
  disableRestoreFocus: b = !0,
@@ -8880,7 +8880,7 @@ const Dc = /* @__PURE__ */ n(() => {
8880
8880
  return /* @__PURE__ */ R(
8881
8881
  Zn,
8882
8882
  {
8883
- open: a.isOpen,
8883
+ open: s.isOpen,
8884
8884
  "aria-labelledby": "list-dialog-title",
8885
8885
  onClose: f,
8886
8886
  "data-testid": "list-dialog",
@@ -8908,8 +8908,8 @@ const Dc = /* @__PURE__ */ n(() => {
8908
8908
  hasCreate: t = null,
8909
8909
  hasEdit: o = null,
8910
8910
  hasShow: r = null,
8911
- history: a = null,
8912
- loaded: s = null,
8911
+ history: s = null,
8912
+ loaded: a = null,
8913
8913
  loading: c = null,
8914
8914
  location: l = null,
8915
8915
  match: d = null,
@@ -8926,9 +8926,9 @@ const Dc = /* @__PURE__ */ n(() => {
8926
8926
  inline: t,
8927
8927
  icon: o = ig,
8928
8928
  label: r = "ra.action.list",
8929
- ButtonProps: a,
8930
- ...s
8931
- } = e, c = /* @__PURE__ */ i(tg, { ...s });
8929
+ ButtonProps: s,
8930
+ ...a
8931
+ } = e, c = /* @__PURE__ */ i(tg, { ...a });
8932
8932
  return /* @__PURE__ */ i(
8933
8933
  Wc,
8934
8934
  {
@@ -8936,7 +8936,7 @@ const Dc = /* @__PURE__ */ n(() => {
8936
8936
  label: r,
8937
8937
  dialog: c,
8938
8938
  inline: t,
8939
- ButtonProps: a
8939
+ ButtonProps: s
8940
8940
  }
8941
8941
  );
8942
8942
  }, "ListInDialogButton"), ig = /* @__PURE__ */ i(un, {}), da = 52, rg = 16, ua = ".RaList-main > .MuiTablePagination-root", pa = 100, sg = [25, 50, 100, 200], ag = /* @__PURE__ */ n((e) => /* @__PURE__ */ i(lu, { ...e, children: /* @__PURE__ */ i(Fr, { source: "q", resettable: !0, alwaysOn: !0 }) }), "DefaultListFilter"), lg = /* @__PURE__ */ n(({ pagination: e }) => {
@@ -8947,14 +8947,14 @@ const Dc = /* @__PURE__ */ n(() => {
8947
8947
  const t = xe(e), {
8948
8948
  tipo: o,
8949
8949
  hasCreate: r,
8950
- hasSeleccionMultiple: a,
8951
- chkSeleccion: s = !1,
8950
+ hasSeleccionMultiple: s,
8951
+ chkSeleccion: a = !1,
8952
8952
  hideViewModeMenu: c = !1,
8953
8953
  hideGridToolbarActions: l = !0,
8954
8954
  onSelectionChange: d,
8955
8955
  storeKey: p,
8956
8956
  ...u
8957
- } = e, m = we(tn), h = o === "ventana" ? ng : Ka, f = vi(t), { pathname: g, state: C } = dt(), x = Nt(), [b, P] = te(null), [S, y] = te(s), [F, M] = te([]), [I, k] = te({}), [_, L] = te(
8957
+ } = e, m = we(tn), h = o === "ventana" ? ng : Ka, f = vi(t), { pathname: g, state: C } = dt(), x = Nt(), [b, P] = te(null), [S, y] = te(a), [F, M] = te([]), [I, k] = te({}), [_, L] = te(
8958
8958
  u.sort || { field: "id", order: "ASC" }
8959
8959
  ), [W, j] = te(
8960
8960
  da
@@ -9047,7 +9047,7 @@ const Dc = /* @__PURE__ */ n(() => {
9047
9047
  Rs,
9048
9048
  {
9049
9049
  hasCreate: r,
9050
- hasSeleccionMultiple: a,
9050
+ hasSeleccionMultiple: s,
9051
9051
  chkSeleccion: S,
9052
9052
  handleSeleccionMultiple: D,
9053
9053
  hideViewModeMenu: c,
@@ -9080,7 +9080,7 @@ const Dc = /* @__PURE__ */ n(() => {
9080
9080
  Rs,
9081
9081
  {
9082
9082
  hasCreate: r,
9083
- hasSeleccionMultiple: a,
9083
+ hasSeleccionMultiple: s,
9084
9084
  chkSeleccion: S,
9085
9085
  handleSeleccionMultiple: D,
9086
9086
  hideViewModeMenu: c,
@@ -9182,8 +9182,8 @@ const Dc = /* @__PURE__ */ n(() => {
9182
9182
  filterValues: t,
9183
9183
  handleSubmit: o,
9184
9184
  invalid: r,
9185
- label: a,
9186
- pristine: s,
9185
+ label: s,
9186
+ pristine: a,
9187
9187
  resource: c,
9188
9188
  saving: l,
9189
9189
  selectedIds: d,
@@ -9193,8 +9193,8 @@ const Dc = /* @__PURE__ */ n(() => {
9193
9193
  const t = he(), {
9194
9194
  resource: o,
9195
9195
  className: r,
9196
- icon: a = /* @__PURE__ */ i(pn, {}),
9197
- label: s = "ra.action.delete",
9196
+ icon: s = /* @__PURE__ */ i(pn, {}),
9197
+ label: a = "ra.action.delete",
9198
9198
  ...c
9199
9199
  } = e, l = st(), [d, { isFetching: p }] = Ha(o, {
9200
9200
  id: l.id
@@ -9204,11 +9204,11 @@ const Dc = /* @__PURE__ */ n(() => {
9204
9204
  {
9205
9205
  disabled: p,
9206
9206
  onClick: /* @__PURE__ */ n(() => d(), "onClick"),
9207
- label: s,
9207
+ label: a,
9208
9208
  className: Si("ra-delete-button", r),
9209
9209
  ...cg(c),
9210
9210
  size: "large",
9211
- children: a
9211
+ children: s
9212
9212
  },
9213
9213
  "button"
9214
9214
  ) });
@@ -9218,7 +9218,7 @@ const Dc = /* @__PURE__ */ n(() => {
9218
9218
  typeof e[o] == "string" && e[o].trim().length === 0 || (e[o] == null && (e[o] = ""), t[o] = e[o]);
9219
9219
  return t;
9220
9220
  }, "defaultTransform"), ug = /* @__PURE__ */ n((e) => {
9221
- const { children: t, fichaProps: o, mutationOptions: r } = e, a = uu(), [s, c] = te(null), l = dt(), d = Nt(), p = xe(e), u = vi(p), { record: m, isFetching: h } = a, f = u?.record || u?.initialValues || m, g = u ? !1 : h, C = e.estado ?? (l?.state?.estado || "M"), x = m?.id ?? l?.state?.id ?? "edit", b = `${p}:${C}:${x}`, P = _e(null), S = g && P.current !== b;
9221
+ const { children: t, fichaProps: o, mutationOptions: r } = e, s = uu(), [a, c] = te(null), l = dt(), d = Nt(), p = xe(e), u = vi(p), { record: m, isFetching: h } = s, f = u?.record || u?.initialValues || m, g = u ? !1 : h, C = e.estado ?? (l?.state?.estado || "M"), x = m?.id ?? l?.state?.id ?? "edit", b = `${p}:${C}:${x}`, P = _e(null), S = g && P.current !== b;
9222
9222
  ie(() => {
9223
9223
  !g && f && (P.current = b);
9224
9224
  }, [g, f, b]);
@@ -9260,27 +9260,27 @@ const Dc = /* @__PURE__ */ n(() => {
9260
9260
  p,
9261
9261
  u,
9262
9262
  b
9263
- ]), s === null ? /* @__PURE__ */ i(yo, { loadingPrimary: "", loadingSecondary: "", timeout: 0 }) : /* @__PURE__ */ i($r, { value: y, children: /* @__PURE__ */ i(Ye.Provider, { value: s, children: t }) });
9263
+ ]), a === null ? /* @__PURE__ */ i(yo, { loadingPrimary: "", loadingSecondary: "", timeout: 0 }) : /* @__PURE__ */ i($r, { value: y, children: /* @__PURE__ */ i(Ye.Provider, { value: a, children: t }) });
9264
9264
  }, "EditChildren"), ma = /* @__PURE__ */ n((e) => {
9265
9265
  const t = dt(), {
9266
9266
  useFormulario: o,
9267
9267
  mutationMode: r = "pessimistic",
9268
- mutationOptions: a,
9269
- popupMutationOptions: s,
9268
+ mutationOptions: s,
9269
+ popupMutationOptions: a,
9270
9270
  children: c,
9271
9271
  ...l
9272
9272
  } = e, d = ol(), p = Al(e) ?? d?.id, u = e.estado ?? (t?.state?.estado || "M"), { fichaProps: m } = Xr({ ...e, estado: u }), h = de(
9273
9273
  () => rn(
9274
9274
  rn(
9275
- a,
9275
+ s,
9276
9276
  m?.panel?.mutationOptions
9277
9277
  ),
9278
- s
9278
+ a
9279
9279
  ),
9280
9280
  [
9281
- a,
9281
+ s,
9282
9282
  m?.panel?.mutationOptions,
9283
- s
9283
+ a
9284
9284
  ]
9285
9285
  ), f = l.queryOptions ?? m?.panel?.queryOptions, g = /* @__PURE__ */ i(
9286
9286
  du,
@@ -9309,40 +9309,40 @@ const Dc = /* @__PURE__ */ n(() => {
9309
9309
  );
9310
9310
  return /* @__PURE__ */ i(_o, { children: g });
9311
9311
  }, "EditEtriekView"), pg = /* @__PURE__ */ n((e) => {
9312
- const t = dt(), o = It(), r = Vt(), a = gt(), s = xe(e), c = no({ resource: s }).options?.label, l = ai({
9313
- resource: s,
9312
+ const t = dt(), o = It(), r = Vt(), s = gt(), a = xe(e), c = no({ resource: a }).options?.label, l = ai({
9313
+ resource: a,
9314
9314
  dockviewTabParent: !0
9315
- }), d = ci(), p = he(), u = ol(), m = _e(!1), h = t?.state?._asistentePopup === "router" && typeof o?.show == "function", f = en(`/${s}/:id/*`, t.pathname) || en(`/${s}/:id`, t.pathname), g = e.id ?? u?.id ?? t?.state?.id ?? t?.state?.record?.id ?? e.record?.id ?? f?.params?.id, C = h && !!g, x = C ? `${s}:${g}` : null;
9315
+ }), d = ci(), p = he(), u = ol(), m = _e(!1), h = t?.state?._asistentePopup === "router" && typeof o?.show == "function", f = en(`/${a}/:id/*`, t.pathname) || en(`/${a}/:id`, t.pathname), g = e.id ?? u?.id ?? t?.state?.id ?? t?.state?.record?.id ?? e.record?.id ?? f?.params?.id, C = h && !!g, x = C ? `${a}:${g}` : null;
9316
9316
  return ie(() => {
9317
9317
  if (!C || m.current || (m.current = !0, x && (jn.has(x) || o?.open && o?.props?._popupKey === x) || !x))
9318
9318
  return;
9319
9319
  x && jn.add(x);
9320
9320
  const b = /* @__PURE__ */ n(() => {
9321
- x && jn.delete(x), x ? o.hide({ popupKey: x }) : o.hide(), r("list", s, void 0, void 0, {
9321
+ x && jn.delete(x), x ? o.hide({ popupKey: x }) : o.hide(), r("list", a, void 0, void 0, {
9322
9322
  _scrollToTop: !1
9323
9323
  });
9324
9324
  }, "handleClose"), P = e.mutationOptions || {}, S = {
9325
9325
  ...P,
9326
9326
  ...x ? { _popupKey: x } : {},
9327
9327
  onSuccess: /* @__PURE__ */ n((...F) => {
9328
- typeof P.onSuccess == "function" ? P.onSuccess(...F) : a("ra.notification.updated", {
9328
+ typeof P.onSuccess == "function" ? P.onSuccess(...F) : s("ra.notification.updated", {
9329
9329
  type: "info",
9330
9330
  messageArgs: { smart_count: 1 }
9331
9331
  }), x && jn.delete(x), x ? o.hide({ popupKey: x }) : o.hide();
9332
9332
  }, "onSuccess")
9333
- }, y = e.title ?? `${p("ra.action.edit")} ${Zo(c || d(s, 1) || s)}`;
9333
+ }, y = e.title ?? `${p("ra.action.edit")} ${Zo(c || d(a, 1) || a)}`;
9334
9334
  o.show({
9335
9335
  title: y,
9336
9336
  tipo: "vista",
9337
9337
  cancelar: b,
9338
9338
  dialogProps: l,
9339
9339
  _popupKey: x,
9340
- controles: /* @__PURE__ */ i(Ro, { value: s, children: /* @__PURE__ */ i(tn.Provider, { value: g, children: /* @__PURE__ */ i(
9340
+ controles: /* @__PURE__ */ i(Ro, { value: a, children: /* @__PURE__ */ i(tn.Provider, { value: g, children: /* @__PURE__ */ i(
9341
9341
  ma,
9342
9342
  {
9343
9343
  ...e,
9344
9344
  id: g,
9345
- resource: s,
9345
+ resource: a,
9346
9346
  mutationOptions: S
9347
9347
  }
9348
9348
  ) }) })
@@ -9351,12 +9351,12 @@ const Dc = /* @__PURE__ */ n(() => {
9351
9351
  o,
9352
9352
  C,
9353
9353
  d,
9354
- a,
9354
+ s,
9355
9355
  l,
9356
9356
  x,
9357
9357
  e,
9358
9358
  r,
9359
- s,
9359
+ a,
9360
9360
  c,
9361
9361
  p
9362
9362
  ]), C ? null : /* @__PURE__ */ i(ma, { ...e });
@@ -9367,15 +9367,15 @@ const Dc = /* @__PURE__ */ n(() => {
9367
9367
  const {
9368
9368
  isOpen: o,
9369
9369
  onSubmit: r,
9370
- onClose: a,
9371
- title: s,
9370
+ onClose: s,
9371
+ title: a,
9372
9372
  dialogText: c,
9373
9373
  children: l,
9374
9374
  hasAccept: d = !0,
9375
9375
  hasCancel: p = !0,
9376
9376
  isLoading: u = !1
9377
9377
  } = e, m = xe(e), h = /* @__PURE__ */ n((f) => {
9378
- a && a(f);
9378
+ s && s(f);
9379
9379
  }, "handleClose");
9380
9380
  return /* @__PURE__ */ R(
9381
9381
  pi,
@@ -9386,7 +9386,7 @@ const Dc = /* @__PURE__ */ n(() => {
9386
9386
  onClose: h,
9387
9387
  "aria-labelledby": "form-dialog-title",
9388
9388
  children: [
9389
- /* @__PURE__ */ i(hi, { id: "form-dialog-title", children: s }),
9389
+ /* @__PURE__ */ i(hi, { id: "form-dialog-title", children: a }),
9390
9390
  /* @__PURE__ */ R(Lo, { resource: m, onSubmit: r, children: [
9391
9391
  /* @__PURE__ */ R(fi, { dividers: !0, children: [
9392
9392
  /* @__PURE__ */ i(il, { children: c }),
@@ -9438,12 +9438,12 @@ const Dc = /* @__PURE__ */ n(() => {
9438
9438
  }
9439
9439
  }),
9440
9440
  [t]
9441
- ), r = xe(e), { estado: a, isLoading: s, initialValues: c, fichaProps: l } = Re(), d = St({ resource: r });
9441
+ ), r = xe(e), { estado: s, isLoading: a, initialValues: c, fichaProps: l } = Re(), d = St({ resource: r });
9442
9442
  if (ie(() => {
9443
- l.onRenderFicha && l.onRenderFicha(d, a);
9443
+ l.onRenderFicha && l.onRenderFicha(d, s);
9444
9444
  }, []), ie(() => {
9445
- s || l.onLoadFicha && l.onLoadFicha(d, a, c);
9446
- }, [s]), s)
9445
+ a || l.onLoadFicha && l.onLoadFicha(d, s, c);
9446
+ }, [a]), a)
9447
9447
  return /* @__PURE__ */ i(
9448
9448
  yo,
9449
9449
  {
@@ -9473,7 +9473,7 @@ const Dc = /* @__PURE__ */ n(() => {
9473
9473
  }, hg = ".MuiDialog-paper", Xi = /* @__PURE__ */ n((e) => {
9474
9474
  e.preventDefault();
9475
9475
  }, "disableKeyboardEvents"), gg = /* @__PURE__ */ n(() => typeof document > "u" ? !1 : !!document.activeElement?.closest?.(hg), "isDialogInteraction"), bg = /* @__PURE__ */ n((e, t) => typeof e?.hide != "function" || !e?.open ? !1 : t ? !0 : gg() ? !!(e?.props?._popupKey || e?.props?.tipo === "vista") : !1, "canHideAsistentePopup"), Gc = /* @__PURE__ */ n((e) => {
9476
- const t = Co(), o = dt(), r = xe(), a = Vt(), s = st(), c = It(), { estado: l, mutationOptions: d = {} } = Re(), p = d?._popupKey, u = l === "B" || o.state?.estado === "B", m = Pi({ borrar: u, ...e }), h = t.open || u, f = t.open ? fg : mg;
9476
+ const t = Co(), o = dt(), r = xe(), s = Vt(), a = st(), c = It(), { estado: l, mutationOptions: d = {} } = Re(), p = d?._popupKey, u = l === "B" || o.state?.estado === "B", m = Pi({ borrar: u, ...e }), h = t.open || u, f = t.open ? fg : mg;
9477
9477
  return /* @__PURE__ */ R(rt, { children: [
9478
9478
  t.open && /* @__PURE__ */ i(
9479
9479
  yo,
@@ -9510,14 +9510,14 @@ const Dc = /* @__PURE__ */ n(() => {
9510
9510
  title: "pos.delete_title",
9511
9511
  content: "pos.delete_confirm",
9512
9512
  onConfirm: /* @__PURE__ */ n(async () => {
9513
- await m(s);
9513
+ await m(a);
9514
9514
  }, "onConfirm"),
9515
9515
  onClose: /* @__PURE__ */ n((g, C) => {
9516
9516
  if (bg(c, p)) {
9517
9517
  p ? c.hide({ popupKey: p }) : c.hide();
9518
9518
  return;
9519
9519
  }
9520
- C !== "backdropClick" && a("list", r);
9520
+ C !== "backdropClick" && s("list", r);
9521
9521
  }, "onClose")
9522
9522
  }
9523
9523
  )
@@ -9539,8 +9539,8 @@ const Dc = /* @__PURE__ */ n(() => {
9539
9539
  }), {
9540
9540
  children: o,
9541
9541
  className: r,
9542
- component: a = xg,
9543
- contentScroll: s = "inner",
9542
+ component: s = xg,
9543
+ contentScroll: a = "inner",
9544
9544
  toolbar: c = Cg,
9545
9545
  ...l
9546
9546
  } = t;
@@ -9568,11 +9568,11 @@ const Dc = /* @__PURE__ */ n(() => {
9568
9568
  minWidth: 0,
9569
9569
  width: "100%",
9570
9570
  maxWidth: "100%",
9571
- overflowY: s === "inner" ? "auto" : "visible",
9571
+ overflowY: a === "inner" ? "auto" : "visible",
9572
9572
  overflowX: "hidden",
9573
9573
  backgroundColor: /* @__PURE__ */ n((d) => (d.vars || d).palette.background.paper, "backgroundColor")
9574
9574
  },
9575
- children: /* @__PURE__ */ i(a, { children: o })
9575
+ children: /* @__PURE__ */ i(s, { children: o })
9576
9576
  }
9577
9577
  ),
9578
9578
  c !== !1 ? /* @__PURE__ */ i(
@@ -9631,15 +9631,15 @@ const Dc = /* @__PURE__ */ n(() => {
9631
9631
  children: t,
9632
9632
  contentScroll: o = "inner",
9633
9633
  deleteButton: r = !0,
9634
- toolbar: a,
9635
- ...s
9634
+ toolbar: s,
9635
+ ...a
9636
9636
  } = e, {
9637
9637
  initialValues: c,
9638
9638
  scopeIdentity: l,
9639
9639
  fichaProps: { config: d = {} } = {}
9640
9640
  } = Re(), p = Pi(e);
9641
9641
  if (!c) return null;
9642
- const { toolbar: u, ...m } = d, h = u !== void 0 ? u : a !== void 0 ? a : /* @__PURE__ */ i(Fi, { deleteButton: r });
9642
+ const { toolbar: u, ...m } = d, h = u !== void 0 ? u : s !== void 0 ? s : /* @__PURE__ */ i(Fi, { deleteButton: r });
9643
9643
  return /* @__PURE__ */ i(Gl, { children: /* @__PURE__ */ i(Gc, { children: /* @__PURE__ */ i(
9644
9644
  wg,
9645
9645
  {
@@ -9647,8 +9647,8 @@ const Dc = /* @__PURE__ */ n(() => {
9647
9647
  onSubmit: p,
9648
9648
  defaultValues: c,
9649
9649
  ...m,
9650
- ...s,
9651
- className: [s.className, "FichaVisual-root"].filter(Boolean).join(" "),
9650
+ ...a,
9651
+ className: [a.className, "FichaVisual-root"].filter(Boolean).join(" "),
9652
9652
  children: /* @__PURE__ */ R(
9653
9653
  yg,
9654
9654
  {
@@ -9664,8 +9664,8 @@ const Dc = /* @__PURE__ */ n(() => {
9664
9664
  l
9665
9665
  ) }) });
9666
9666
  }, "FormEtriek"), vg = /* @__PURE__ */ n((e) => {
9667
- const { handleToggle: t, isOpen: o, name: r, icon: a, children: s, dense: c } = e, l = he(), [d] = Xa(), p = /* @__PURE__ */ R(et, { dense: c, onClick: t, children: [
9668
- /* @__PURE__ */ i(Lt, { sx: { minWidth: 5 }, children: o ? /* @__PURE__ */ i(dl, {}) : a }),
9667
+ const { handleToggle: t, isOpen: o, name: r, icon: s, children: a, dense: c } = e, l = he(), [d] = Xa(), p = /* @__PURE__ */ R(et, { dense: c, onClick: t, children: [
9668
+ /* @__PURE__ */ i(Lt, { sx: { minWidth: 5 }, children: o ? /* @__PURE__ */ i(dl, {}) : s }),
9669
9669
  /* @__PURE__ */ i(fo, { variant: "inherit", color: "textSecondary", children: l(r) })
9670
9670
  ] });
9671
9671
  return /* @__PURE__ */ R("div", { children: [
@@ -9687,20 +9687,20 @@ const Dc = /* @__PURE__ */ n(() => {
9687
9687
  paddingLeft: d ? 4 : 2
9688
9688
  }
9689
9689
  },
9690
- children: s
9690
+ children: a
9691
9691
  }
9692
9692
  ) })
9693
9693
  ] });
9694
9694
  }, "SubMenu"), Hc = /* @__PURE__ */ n((e) => {
9695
- const { items: t, translate: o, ...r } = e, { state: a, handleToggle: s, dense: c } = r;
9695
+ const { items: t, translate: o, ...r } = e, { state: s, handleToggle: a, dense: c } = r;
9696
9696
  return t && /* @__PURE__ */ i("div", { children: t.map((l) => {
9697
9697
  const { name: d, menu: p, label: u } = l;
9698
9698
  return p ? /* @__PURE__ */ i(
9699
9699
  vg,
9700
9700
  {
9701
9701
  name: u,
9702
- handleToggle: /* @__PURE__ */ n(() => s(d), "handleToggle"),
9703
- isOpen: a[d],
9702
+ handleToggle: /* @__PURE__ */ n(() => a(d), "handleToggle"),
9703
+ isOpen: s[d],
9704
9704
  icon: /* @__PURE__ */ i(sr, {}),
9705
9705
  dense: c,
9706
9706
  children: Hc({ items: p, translate: o, ...r })
@@ -9720,7 +9720,7 @@ const Dc = /* @__PURE__ */ n(() => {
9720
9720
  );
9721
9721
  }) });
9722
9722
  }, "renderMenu"), Mg = /* @__PURE__ */ n(({ dense: e = !1 }) => {
9723
- const t = he(), [o, r] = te({ mnuPrueba: !1 }), a = mt((h) => h.breakpoints.down("sm")), [s] = Xa(), c = JSON.parse(localStorage.getItem("menus")), m = Hc({
9723
+ const t = he(), [o, r] = te({ mnuPrueba: !1 }), s = mt((h) => h.breakpoints.down("sm")), [a] = Xa(), c = JSON.parse(localStorage.getItem("menus")), m = Hc({
9724
9724
  items: c,
9725
9725
  handleToggle: /* @__PURE__ */ n((h) => {
9726
9726
  r((f) => ({ ...f, [h]: !f[h] }));
@@ -9729,7 +9729,7 @@ const Dc = /* @__PURE__ */ n(() => {
9729
9729
  activeClassName: "",
9730
9730
  iconClass: "",
9731
9731
  className: "",
9732
- open: s,
9732
+ open: a,
9733
9733
  dense: e,
9734
9734
  translate: t
9735
9735
  });
@@ -9737,7 +9737,7 @@ const Dc = /* @__PURE__ */ n(() => {
9737
9737
  Y,
9738
9738
  {
9739
9739
  sx: {
9740
- width: s ? 230 : 50,
9740
+ width: a ? 230 : 50,
9741
9741
  marginTop: 1,
9742
9742
  marginBottom: 1,
9743
9743
  transition: /* @__PURE__ */ n((h) => h.transitions.create("width", {
@@ -9753,7 +9753,7 @@ const Dc = /* @__PURE__ */ n(() => {
9753
9753
  }
9754
9754
  ),
9755
9755
  m,
9756
- a && /* @__PURE__ */ i(
9756
+ s && /* @__PURE__ */ i(
9757
9757
  Ya,
9758
9758
  {
9759
9759
  to: "/configuration",
@@ -9770,23 +9770,23 @@ const Dc = /* @__PURE__ */ n(() => {
9770
9770
  label: t = "ra.action.refresh",
9771
9771
  icon: o = Pg,
9772
9772
  onClick: r,
9773
- ...a
9774
- } = e, s = jl(e), c = ne(
9773
+ ...s
9774
+ } = e, a = jl(e), c = ne(
9775
9775
  (l) => {
9776
- l.preventDefault(), s(), typeof r == "function" && r(l);
9776
+ l.preventDefault(), a(), typeof r == "function" && r(l);
9777
9777
  },
9778
- [s, r]
9778
+ [a, r]
9779
9779
  );
9780
- return /* @__PURE__ */ i(Ze, { label: t, onClick: c, ...a, children: o });
9780
+ return /* @__PURE__ */ i(Ze, { label: t, onClick: c, ...s, children: o });
9781
9781
  }, "RefreshButton"), Pg = /* @__PURE__ */ i(Sp, {}), Ig = /* @__PURE__ */ n((e, t) => {
9782
9782
  alert("Falta implementar la función jsBotonGrilla");
9783
9783
  }, "defaultJsBotonGrilla"), Rg = [], jc = /* @__PURE__ */ n((e, t) => (e || []).map((o) => {
9784
9784
  if (!to(t, o))
9785
9785
  return null;
9786
- const a = Array.isArray(o?.children) ? jc(o.children, t) : [];
9786
+ const s = Array.isArray(o?.children) ? jc(o.children, t) : [];
9787
9787
  return {
9788
9788
  ...o,
9789
- children: a
9789
+ children: s
9790
9790
  };
9791
9791
  }).filter(Boolean), "filtrarOpcionesVisibles"), fa = {
9792
9792
  display: "flex",
@@ -9813,8 +9813,8 @@ const Dc = /* @__PURE__ */ n(() => {
9813
9813
  const {
9814
9814
  className: o,
9815
9815
  filters: r,
9816
- hasCreate: a,
9817
- children: s,
9816
+ hasCreate: s,
9817
+ children: a,
9818
9818
  hideFilterButton: c = !0,
9819
9819
  hideMenuButton: l = !1,
9820
9820
  jsBotonGrilla: d = Ig,
@@ -9854,7 +9854,7 @@ const Dc = /* @__PURE__ */ n(() => {
9854
9854
  }, "handleSubMenuItemSelect");
9855
9855
  delete u.hasCreate;
9856
9856
  const He = v.useMemo(
9857
- () => ko.map(s, (X, pe) => {
9857
+ () => ko.map(a, (X, pe) => {
9858
9858
  const re = X.props || {};
9859
9859
  if (Array.isArray(re.options) && re.options.length > 0)
9860
9860
  return {
@@ -9894,7 +9894,7 @@ const Dc = /* @__PURE__ */ n(() => {
9894
9894
  }
9895
9895
  return null;
9896
9896
  }) || [],
9897
- [s]
9897
+ [a]
9898
9898
  ), Ue = v.useMemo(() => {
9899
9899
  const X = [...ae, ...He || []].map((pe) => {
9900
9900
  if (pe?.type === "Button")
@@ -10195,11 +10195,11 @@ const Dc = /* @__PURE__ */ n(() => {
10195
10195
  loginBackgroundImage: t,
10196
10196
  nameSource: o = "username",
10197
10197
  passwordSource: r = "password"
10198
- } = e, [a, s] = te(!1), c = he(), l = c("ra.auth.sign_in"), d = gt(), p = xu(), u = dt();
10198
+ } = e, [s, a] = te(!1), c = he(), l = c("ra.auth.sign_in"), d = gt(), p = xu(), u = dt();
10199
10199
  return /* @__PURE__ */ i(Lo, { onSubmit: /* @__PURE__ */ n((f) => {
10200
- s(!0), p(f, u.state ? u.state.nextPathname : "/").catch(
10200
+ a(!0), p(f, u.state ? u.state.nextPathname : "/").catch(
10201
10201
  (g) => {
10202
- s(!1), d(
10202
+ a(!1), d(
10203
10203
  typeof g == "string" ? g : typeof g > "u" || !g.message ? "ra.auth.sign_in_error" : g.message,
10204
10204
  {
10205
10205
  type: "error",
@@ -10267,7 +10267,7 @@ const Dc = /* @__PURE__ */ n(() => {
10267
10267
  fullWidth: !0,
10268
10268
  name: o,
10269
10269
  label: c("ra.auth.username"),
10270
- disabled: a
10270
+ disabled: s
10271
10271
  }
10272
10272
  ) }),
10273
10273
  /* @__PURE__ */ i(Y, { sx: { marginTop: 0 }, children: /* @__PURE__ */ i(
@@ -10276,7 +10276,7 @@ const Dc = /* @__PURE__ */ n(() => {
10276
10276
  name: r,
10277
10277
  label: c("ra.auth.password"),
10278
10278
  type: "password",
10279
- disabled: a
10279
+ disabled: s
10280
10280
  }
10281
10281
  ) })
10282
10282
  ] }),
@@ -10286,10 +10286,10 @@ const Dc = /* @__PURE__ */ n(() => {
10286
10286
  variant: "contained",
10287
10287
  type: "submit",
10288
10288
  color: "primary",
10289
- disabled: a,
10289
+ disabled: s,
10290
10290
  fullWidth: !0,
10291
10291
  children: [
10292
- a && /* @__PURE__ */ i(
10292
+ s && /* @__PURE__ */ i(
10293
10293
  ul,
10294
10294
  {
10295
10295
  sx: { position: "absolute" },
@@ -10325,12 +10325,12 @@ const Dc = /* @__PURE__ */ n(() => {
10325
10325
  options: t = [],
10326
10326
  icon: o,
10327
10327
  disabled: r,
10328
- initialSelectedIndex: a = 0,
10328
+ initialSelectedIndex: s = 0,
10329
10329
  // NUEVO (opcional): si querés forzar el tooltip del botón, aunque el seleccionado sea otro
10330
- title: s
10330
+ title: a
10331
10331
  // string
10332
10332
  } = e, [c, l] = te(!1), d = _e(), p = xe(e), u = we(Ye) || {}, { menuModel: m, leafOptions: h, menuVisible: f } = de(() => {
10333
- const M = [], I = [], k = t?.[a];
10333
+ const M = [], I = [], k = t?.[s];
10334
10334
  return to(u, k) ? ((t || []).forEach((_) => {
10335
10335
  if (!to(u, _))
10336
10336
  return;
@@ -10364,9 +10364,9 @@ const Dc = /* @__PURE__ */ n(() => {
10364
10364
  indent: 0
10365
10365
  });
10366
10366
  }), { menuModel: I, leafOptions: M, menuVisible: !0 }) : { menuModel: I, leafOptions: M, menuVisible: !1 };
10367
- }, [u, a, t]), g = Math.max(
10367
+ }, [u, s, t]), g = Math.max(
10368
10368
  0,
10369
- Math.min(a, Math.max(h.length - 1, 0))
10369
+ Math.min(s, Math.max(h.length - 1, 0))
10370
10370
  ), [C, x] = te(g);
10371
10371
  ie(() => {
10372
10372
  x(
@@ -10384,7 +10384,7 @@ const Dc = /* @__PURE__ */ n(() => {
10384
10384
  x(I), l(!1);
10385
10385
  }, "handleLeafClick"), y = h[C], F = y?.icon || o;
10386
10386
  return !f || h.length === 0 ? null : /* @__PURE__ */ R(ut, { children: [
10387
- /* @__PURE__ */ i(gi, { title: s ?? y?.label, children: /* @__PURE__ */ R(
10387
+ /* @__PURE__ */ i(gi, { title: a ?? y?.label, children: /* @__PURE__ */ R(
10388
10388
  xo,
10389
10389
  {
10390
10390
  color: "primary",
@@ -10489,7 +10489,7 @@ const Dc = /* @__PURE__ */ n(() => {
10489
10489
  }) })
10490
10490
  ] });
10491
10491
  }, "MenuButton"), yy = /* @__PURE__ */ n((e) => {
10492
- const { fields: t, className: o, ...r } = e, { campos: a, separador: s = "", secundario: c = [], hasSecundario: l } = t, d = st(), p = a.map((u) => d[u] !== void 0 ? d[u] : u).join(`${s}`);
10492
+ const { fields: t, className: o, ...r } = e, { campos: s, separador: a = "", secundario: c = [], hasSecundario: l } = t, d = st(), p = s.map((u) => d[u] !== void 0 ? d[u] : u).join(`${a}`);
10493
10493
  return /* @__PURE__ */ R(Pt, { noWrap: !0, variant: "inherit", className: o, ...r, children: [
10494
10494
  p,
10495
10495
  l && /* @__PURE__ */ i(
@@ -10506,7 +10506,7 @@ const Dc = /* @__PURE__ */ n(() => {
10506
10506
  )
10507
10507
  ] });
10508
10508
  }, "MultiTextField"), kg = /* @__PURE__ */ n((e) => {
10509
- const { children: t, fichaProps: o } = e, r = Cu(), [a, s] = te(null), c = dt(), l = Nt(), d = xe(e), { record: p, isFetching: u } = r, m = e.estado ?? (c?.state?.estado || "M"), h = p?.id ?? c?.state?.id ?? "show", f = `${d}:${m}:${h}`, g = de(
10509
+ const { children: t, fichaProps: o } = e, r = Cu(), [s, a] = te(null), c = dt(), l = Nt(), d = xe(e), { record: p, isFetching: u } = r, m = e.estado ?? (c?.state?.estado || "M"), h = p?.id ?? c?.state?.id ?? "show", f = `${d}:${m}:${h}`, g = de(
10510
10510
  () => ({
10511
10511
  estado: m,
10512
10512
  initialValues: p,
@@ -10518,19 +10518,19 @@ const Dc = /* @__PURE__ */ n(() => {
10518
10518
  );
10519
10519
  return ie(() => {
10520
10520
  let C = !0;
10521
- return s(null), u ? () => {
10521
+ return a(null), u ? () => {
10522
10522
  C = !1;
10523
10523
  } : (l.getFichaConfig(d, { estado: "M" }).then((x) => {
10524
- C && s(x.data);
10524
+ C && a(x.data);
10525
10525
  }).catch(() => {
10526
- C && s({});
10526
+ C && a({});
10527
10527
  }), () => {
10528
10528
  C = !1;
10529
10529
  });
10530
- }, [l, m, u, d]), a === null ? /* @__PURE__ */ i(yo, { loadingPrimary: "", loadingSecondary: "", timeout: 0 }) : /* @__PURE__ */ i($r, { value: g, children: /* @__PURE__ */ i(Ye.Provider, { value: a, children: t }) });
10530
+ }, [l, m, u, d]), s === null ? /* @__PURE__ */ i(yo, { loadingPrimary: "", loadingSecondary: "", timeout: 0 }) : /* @__PURE__ */ i($r, { value: g, children: /* @__PURE__ */ i(Ye.Provider, { value: s, children: t }) });
10531
10531
  }, "ShowChildren"), Ag = /* @__PURE__ */ n((e) => {
10532
- const t = dt(), { useFormulario: o, children: r, ...a } = e, s = Al(e), c = e.estado ?? (t?.state?.estado || "M"), { fichaProps: l } = Xr({ ...e, estado: c });
10533
- return /* @__PURE__ */ i(_o, { children: /* @__PURE__ */ i(yu, { id: s, emptyWhileLoading: !0, ...a, ...l?.panel, children: /* @__PURE__ */ i(kg, { estado: c, fichaProps: l, children: r }) }) });
10532
+ const t = dt(), { useFormulario: o, children: r, ...s } = e, a = Al(e), c = e.estado ?? (t?.state?.estado || "M"), { fichaProps: l } = Xr({ ...e, estado: c });
10533
+ return /* @__PURE__ */ i(_o, { children: /* @__PURE__ */ i(yu, { id: a, emptyWhileLoading: !0, ...s, ...l?.panel, children: /* @__PURE__ */ i(kg, { estado: c, fichaProps: l, children: r }) }) });
10534
10534
  }, "ShowEtriek"), Cy = Wt(Ag, {
10535
10535
  name: sn,
10536
10536
  overridesResolver: /* @__PURE__ */ n((e, t) => t.root, "overridesResolver")
@@ -10539,17 +10539,17 @@ const Dc = /* @__PURE__ */ n(() => {
10539
10539
  children: t,
10540
10540
  className: o,
10541
10541
  disabled: r,
10542
- label: a,
10543
- color: s = "primary",
10542
+ label: s,
10543
+ color: a = "primary",
10544
10544
  to: c,
10545
10545
  ...l
10546
- } = e, d = he(), p = a ? d(a, { _: a }) : void 0, u = Dg(c);
10547
- return a && !r ? /* @__PURE__ */ i(wt, { title: p, children: /* @__PURE__ */ i(
10546
+ } = e, d = he(), p = s ? d(s, { _: s }) : void 0, u = Dg(c);
10547
+ return s && !r ? /* @__PURE__ */ i(wt, { title: p, children: /* @__PURE__ */ i(
10548
10548
  lt,
10549
10549
  {
10550
10550
  "aria-label": p,
10551
10551
  className: o,
10552
- color: s,
10552
+ color: a,
10553
10553
  size: "medium",
10554
10554
  ...l,
10555
10555
  ...u,
@@ -10559,7 +10559,7 @@ const Dc = /* @__PURE__ */ n(() => {
10559
10559
  lt,
10560
10560
  {
10561
10561
  className: o,
10562
- color: s,
10562
+ color: a,
10563
10563
  disabled: r,
10564
10564
  size: "medium",
10565
10565
  ...l,
@@ -10572,9 +10572,9 @@ const Dc = /* @__PURE__ */ n(() => {
10572
10572
  return;
10573
10573
  if (typeof e == "string")
10574
10574
  return { to: e };
10575
- const { redirect: t, replace: o, state: r, ...a } = e;
10575
+ const { redirect: t, replace: o, state: r, ...s } = e;
10576
10576
  return {
10577
- to: a,
10577
+ to: s,
10578
10578
  redirect: t,
10579
10579
  replace: o,
10580
10580
  state: r
@@ -10584,8 +10584,8 @@ const Dc = /* @__PURE__ */ n(() => {
10584
10584
  icon: t = Bg,
10585
10585
  label: o = "ra.action.show",
10586
10586
  record: r,
10587
- resource: a,
10588
- scrollToTop: s = !0,
10587
+ resource: s,
10588
+ scrollToTop: a = !0,
10589
10589
  ...c
10590
10590
  } = e, l = xe(e), d = st(e), p = wu();
10591
10591
  return d ? /* @__PURE__ */ i(
@@ -10593,7 +10593,7 @@ const Dc = /* @__PURE__ */ n(() => {
10593
10593
  {
10594
10594
  component: ir,
10595
10595
  to: p({ type: "show", resource: l, id: d.id }),
10596
- state: Og[String(s)],
10596
+ state: Og[String(a)],
10597
10597
  label: o,
10598
10598
  onClick: Lg,
10599
10599
  ...c,
@@ -10637,8 +10637,8 @@ const Dc = /* @__PURE__ */ n(() => {
10637
10637
  }), {
10638
10638
  children: o,
10639
10639
  className: r,
10640
- component: a = Ng,
10641
- formRootPathname: s,
10640
+ component: s = Ng,
10641
+ formRootPathname: a,
10642
10642
  syncWithLocation: c = !0,
10643
10643
  tabs: l = Wg,
10644
10644
  toolbar: d = zg,
@@ -10700,7 +10700,7 @@ const Dc = /* @__PURE__ */ n(() => {
10700
10700
  onChange: M,
10701
10701
  action: F,
10702
10702
  syncWithLocation: c,
10703
- url: s,
10703
+ url: a,
10704
10704
  value: W,
10705
10705
  variant: "scrollable",
10706
10706
  scrollButtons: !0,
@@ -10807,7 +10807,7 @@ const Dc = /* @__PURE__ */ n(() => {
10807
10807
  overflowX: "hidden",
10808
10808
  backgroundColor: /* @__PURE__ */ n((D) => (D.vars || D).palette.background.paper, "backgroundColor")
10809
10809
  },
10810
- children: /* @__PURE__ */ i(a, { children: (() => {
10810
+ children: /* @__PURE__ */ i(s, { children: (() => {
10811
10811
  let D = -1;
10812
10812
  return ko.map(o, (E) => {
10813
10813
  if (!E)
@@ -10926,8 +10926,8 @@ const Dc = /* @__PURE__ */ n(() => {
10926
10926
  children: t,
10927
10927
  syncWithLocation: o = !1,
10928
10928
  deleteButton: r = !0,
10929
- toolbar: a,
10930
- tabs: s,
10929
+ toolbar: s,
10930
+ tabs: a,
10931
10931
  onChange: c,
10932
10932
  ...l
10933
10933
  } = e, {
@@ -10941,7 +10941,7 @@ const Dc = /* @__PURE__ */ n(() => {
10941
10941
  tabs: g,
10942
10942
  onChange: C,
10943
10943
  ...x
10944
- } = u, b = f !== void 0 ? f : a !== void 0 ? a : /* @__PURE__ */ i(Fi, { deleteButton: r }), P = g !== void 0 ? g : s !== void 0 ? s : /* @__PURE__ */ i(Ja, {}), S = C !== void 0 ? C : c;
10944
+ } = u, b = f !== void 0 ? f : s !== void 0 ? s : /* @__PURE__ */ i(Fi, { deleteButton: r }), P = g !== void 0 ? g : a !== void 0 ? a : /* @__PURE__ */ i(Ja, {}), S = C !== void 0 ? C : c;
10945
10945
  return /* @__PURE__ */ i(Gl, { children: /* @__PURE__ */ i(Gc, { children: /* @__PURE__ */ i(
10946
10946
  Gg,
10947
10947
  {
@@ -11064,16 +11064,16 @@ const Dc = /* @__PURE__ */ n(() => {
11064
11064
  disableAutoFocus: !0,
11065
11065
  disableRestoreFocus: !0
11066
11066
  }, My = /* @__PURE__ */ n((e) => {
11067
- const { isLoading: t } = e, o = he(), r = xe(e), a = It(), s = we(ya), c = _e(
11067
+ const { isLoading: t } = e, o = he(), r = xe(e), s = It(), a = we(ya), c = _e(
11068
11068
  `asistente-host-${Math.random().toString(36).slice(2)}`
11069
- ), l = a?.hostId, d = !l || l === c.current;
11069
+ ), l = s?.hostId, d = !l || l === c.current;
11070
11070
  ie(() => {
11071
- if (!(!a?.registerHost || !d))
11072
- return a.registerHost(c.current), () => {
11073
- a.unregisterHost && a.unregisterHost(c.current);
11071
+ if (!(!s?.registerHost || !d))
11072
+ return s.registerHost(c.current), () => {
11073
+ s.unregisterHost && s.unregisterHost(c.current);
11074
11074
  };
11075
- }, [a, d]);
11076
- const { hide: p, stack: u = [] } = a || {}, m = /* @__PURE__ */ n(({ botonesExtra: C }) => {
11075
+ }, [s, d]);
11076
+ const { hide: p, stack: u = [] } = s || {}, m = /* @__PURE__ */ n(({ botonesExtra: C }) => {
11077
11077
  const x = Ge(), b = /* @__PURE__ */ n((P) => (S) => {
11078
11078
  if (typeof P != "function")
11079
11079
  return;
@@ -11354,7 +11354,7 @@ const Dc = /* @__PURE__ */ n(() => {
11354
11354
  )
11355
11355
  ] })
11356
11356
  ] }), "getConfirm");
11357
- return s || !d ? null : /* @__PURE__ */ i(ya.Provider, { value: !0, children: u.map((C, x) => {
11357
+ return a || !d ? null : /* @__PURE__ */ i(ya.Provider, { value: !0, children: u.map((C, x) => {
11358
11358
  const b = x === u.length - 1, P = C?.tipo === "confirm" && x > 0, {
11359
11359
  title: S,
11360
11360
  controles: y,
@@ -11467,8 +11467,8 @@ const Dc = /* @__PURE__ */ n(() => {
11467
11467
  jsBotoneraPart: t,
11468
11468
  estado: o,
11469
11469
  buttons: r,
11470
- incluyeAcciones: a = !1,
11471
- saveButtonProps: s,
11470
+ incluyeAcciones: s = !1,
11471
+ saveButtonProps: a,
11472
11472
  ...c
11473
11473
  } = e, [l, d] = te(!1), p = St(c), u = gt(), m = he(), { trigger: h } = Ge(), { hidden: f } = Hl(), g = v.useContext(Ye) || {}, C = v.useMemo(
11474
11474
  () => [...r || [], ...t?.buttons || []],
@@ -11486,8 +11486,8 @@ const Dc = /* @__PURE__ */ n(() => {
11486
11486
  [h, t, p, u, m]
11487
11487
  );
11488
11488
  return /* @__PURE__ */ R(Ga, { sx: Ac, children: [
11489
- a ? /* @__PURE__ */ i(dn, { ...s, className: ["metiri-save-button", s?.className].filter(Boolean).join(" ") }) : null,
11490
- a && /* @__PURE__ */ i(_c, { disabled: l }),
11489
+ s ? /* @__PURE__ */ i(dn, { ...a, className: ["metiri-save-button", a?.className].filter(Boolean).join(" ") }) : null,
11490
+ s && /* @__PURE__ */ i(_c, { disabled: l }),
11491
11491
  C.filter(
11492
11492
  (b) => !f[b.name] && El(g, b.perbot)
11493
11493
  ).map((b) => /* @__PURE__ */ i(
@@ -11510,7 +11510,7 @@ const Dc = /* @__PURE__ */ n(() => {
11510
11510
  overflow: "hidden",
11511
11511
  textOverflow: "ellipsis"
11512
11512
  }, Iy = /* @__PURE__ */ n((e) => {
11513
- const t = Oo(), { label: o, icon: r, ...a } = e, s = mt((C) => C.breakpoints.down("md")), c = r ?? _p, l = o ?? "", d = !!a.hidden, [p, u] = te(!d);
11513
+ const t = Oo(), { label: o, icon: r, ...s } = e, a = mt((C) => C.breakpoints.down("md")), c = r ?? _p, l = o ?? "", d = !!s.hidden, [p, u] = te(!d);
11514
11514
  ie(() => {
11515
11515
  d || u(!0);
11516
11516
  }, [d]);
@@ -11521,7 +11521,7 @@ const Dc = /* @__PURE__ */ n(() => {
11521
11521
  hasBeenActive: m
11522
11522
  }),
11523
11523
  [m, d]
11524
- ), f = /* @__PURE__ */ i(wt, { title: l, children: /* @__PURE__ */ i(c, { fontSize: "medium" }) }), g = s && !t.metiri?.fichaVisual ? "" : /* @__PURE__ */ i(wt, { title: l, children: /* @__PURE__ */ i("span", { style: Kg, children: o }) });
11524
+ ), f = /* @__PURE__ */ i(wt, { title: l, children: /* @__PURE__ */ i(c, { fontSize: "medium" }) }), g = a && !t.metiri?.fichaVisual ? "" : /* @__PURE__ */ i(wt, { title: l, children: /* @__PURE__ */ i("span", { style: Kg, children: o }) });
11525
11525
  return /* @__PURE__ */ i(um, { value: h, children: /* @__PURE__ */ i(
11526
11526
  vu,
11527
11527
  {
@@ -11529,7 +11529,7 @@ const Dc = /* @__PURE__ */ n(() => {
11529
11529
  icon: f,
11530
11530
  label: g,
11531
11531
  iconPosition: t.metiri?.fichaVisual ? "start" : void 0,
11532
- ...a
11532
+ ...s
11533
11533
  }
11534
11534
  ) });
11535
11535
  }, "FormTab");
@@ -11721,13 +11721,13 @@ const Ty = {
11721
11721
  }, ky = /* @__PURE__ */ n((e) => {
11722
11722
  const { propsContenido: t, hidden: o } = Ul(e), r = st();
11723
11723
  if (o || !r) return null;
11724
- const a = r[e.source], s = {
11724
+ const s = r[e.source], a = {
11725
11725
  ...r,
11726
- [e.source]: a != "" && a != "0"
11726
+ [e.source]: s != "" && s != "0"
11727
11727
  };
11728
- return /* @__PURE__ */ i(Mu, { ...t, record: s });
11728
+ return /* @__PURE__ */ i(Mu, { ...t, record: a });
11729
11729
  }, "BooleanField"), Ca = /* @__PURE__ */ n((e) => {
11730
- const [t, o] = te(!1), [r, a] = te(!1), s = Ge(), c = gt(), l = _e(c), d = _e(null), p = _e(null), u = he(), {
11730
+ const [t, o] = te(!1), [r, s] = te(!1), a = Ge(), c = gt(), l = _e(c), d = _e(null), p = _e(null), u = he(), {
11731
11731
  field: m,
11732
11732
  sx: h,
11733
11733
  className: f,
@@ -11736,7 +11736,7 @@ const Ty = {
11736
11736
  label: x = u("from_camera")
11737
11737
  } = e, b = !C && typeof navigator < "u" && /Android|iPhone|iPad|iPod/i.test(navigator.userAgent), P = /* @__PURE__ */ n(({ target: S }) => {
11738
11738
  const [y] = S.files;
11739
- y && (s.setValue(
11739
+ y && (a.setValue(
11740
11740
  m,
11741
11741
  {
11742
11742
  title: y.name,
@@ -11792,7 +11792,7 @@ const Ty = {
11792
11792
  0,
11793
11793
  y.width,
11794
11794
  y.height
11795
- ), a(!0);
11795
+ ), s(!0);
11796
11796
  }, "onClick"),
11797
11797
  startIcon: /* @__PURE__ */ i(Bp, {}),
11798
11798
  children: u("take_foto")
@@ -11841,7 +11841,7 @@ const Ty = {
11841
11841
  const F = new File([y], `${m}-img.jpg`, {
11842
11842
  type: "image/jpeg"
11843
11843
  }), M = URL.createObjectURL(F);
11844
- s.setValue(
11844
+ a.setValue(
11845
11845
  m,
11846
11846
  {
11847
11847
  title: F.name,
@@ -11849,11 +11849,11 @@ const Ty = {
11849
11849
  rawFile: F
11850
11850
  },
11851
11851
  { shouldDirty: !0, shouldValidate: !0 }
11852
- ), s.trigger(m), a(!1), o(!1);
11852
+ ), a.trigger(m), s(!1), o(!1);
11853
11853
  }, "image/jpeg");
11854
11854
  }, "onConfirm"),
11855
11855
  onClose: /* @__PURE__ */ n(() => {
11856
- a(!1), o(!1);
11856
+ s(!1), o(!1);
11857
11857
  }, "onClose")
11858
11858
  }
11859
11859
  ),
@@ -11896,16 +11896,16 @@ const Ty = {
11896
11896
  }, "addCacheBust"), wa = /* @__PURE__ */ n((e, t, o, r) => {
11897
11897
  if (!(!e || e === "")) {
11898
11898
  if (typeof e == "string") {
11899
- const a = t ? `${t}/${e}` : o;
11899
+ const s = t ? `${t}/${e}` : o;
11900
11900
  return {
11901
- src: yr(a, r),
11901
+ src: yr(s, r),
11902
11902
  title: Yr(e)
11903
11903
  };
11904
11904
  }
11905
- return e?.src || Array.isArray(e) && e[0]?.src ? e : e instanceof File ? { src: URL.createObjectURL(e), title: e.name, rawFile: e } : Array.isArray(e) && e.length && e[0] instanceof File ? e.map((a) => ({
11906
- src: URL.createObjectURL(a),
11907
- title: a.name,
11908
- rawFile: a
11905
+ return e?.src || Array.isArray(e) && e[0]?.src ? e : e instanceof File ? { src: URL.createObjectURL(e), title: e.name, rawFile: e } : Array.isArray(e) && e.length && e[0] instanceof File ? e.map((s) => ({
11906
+ src: URL.createObjectURL(s),
11907
+ title: s.name,
11908
+ rawFile: s
11909
11909
  })) : e;
11910
11910
  }
11911
11911
  }, "formatFile"), Yg = /* @__PURE__ */ n(({ actions: e }) => {
@@ -12089,8 +12089,8 @@ const Ty = {
12089
12089
  "application/vnd.android.package-archive"
12090
12090
  ], Ay = /* @__PURE__ */ n((e) => {
12091
12091
  const t = Bo(), { propsContenido: o, hidden: r } = tt(e), {
12092
- options: a = {},
12093
- readOnly: s = !1,
12092
+ options: s = {},
12093
+ readOnly: a = !1,
12094
12094
  tipo: c = "file",
12095
12095
  camera: l = !0,
12096
12096
  /* @deprecated */
@@ -12135,9 +12135,9 @@ const Ty = {
12135
12135
  id: f.source,
12136
12136
  maxSize: 5e6,
12137
12137
  ...f,
12138
- readOnly: s,
12139
- options: { ...a, disabled: s || a.disabled },
12140
- validateFileRemoval: s ? Sa : f.validateFileRemoval,
12138
+ readOnly: a,
12139
+ options: { ...s, disabled: a || s.disabled },
12140
+ validateFileRemoval: a ? Sa : f.validateFileRemoval,
12141
12141
  format: /* @__PURE__ */ n((L) => wa(L, d, M, P), "format"),
12142
12142
  placeholder: x("ra.input.image.upload_single"),
12143
12143
  accept: g,
@@ -12147,7 +12147,7 @@ const Ty = {
12147
12147
  },
12148
12148
  sx: [
12149
12149
  ...Array.isArray(h) ? h : [h],
12150
- s && {
12150
+ a && {
12151
12151
  "& .RaFileInputPreview-removeButton": { display: "none" }
12152
12152
  }
12153
12153
  ],
@@ -12157,7 +12157,7 @@ const Ty = {
12157
12157
  ] })
12158
12158
  }
12159
12159
  ),
12160
- !s && !y && /* @__PURE__ */ i(Ca, { className: "Camino-camera", sx: { mt: 3 }, field: f.source })
12160
+ !a && !y && /* @__PURE__ */ i(Ca, { className: "Camino-camera", sx: { mt: 3 }, field: f.source })
12161
12161
  ]
12162
12162
  }
12163
12163
  ) : /* @__PURE__ */ R(
@@ -12175,8 +12175,8 @@ const Ty = {
12175
12175
  id: f.source,
12176
12176
  maxSize: 5e6,
12177
12177
  ...f,
12178
- readOnly: s,
12179
- validateFileRemoval: s ? Sa : f.validateFileRemoval,
12178
+ readOnly: a,
12179
+ validateFileRemoval: a ? Sa : f.validateFileRemoval,
12180
12180
  options: {
12181
12181
  ...c !== "image" ? { validator: C } : {},
12182
12182
  onDropRejected: /* @__PURE__ */ n((L) => {
@@ -12185,8 +12185,8 @@ const Ty = {
12185
12185
  { type: "error" }
12186
12186
  );
12187
12187
  }, "onDropRejected"),
12188
- ...a,
12189
- disabled: s || a.disabled
12188
+ ...s,
12189
+ disabled: a || s.disabled
12190
12190
  },
12191
12191
  format: /* @__PURE__ */ n((L) => wa(L, d, M, P), "format"),
12192
12192
  placeholder: x("ra.input.file.upload_single"),
@@ -12207,24 +12207,24 @@ const Ty = {
12207
12207
  bottom: 3
12208
12208
  }
12209
12209
  },
12210
- s && {
12210
+ a && {
12211
12211
  "& .RaFileInputPreview-removeButton": { display: "none" }
12212
12212
  }
12213
12213
  ],
12214
12214
  children: /* @__PURE__ */ i(Yg, { actions: _ })
12215
12215
  }
12216
12216
  ),
12217
- !s && l && /* @__PURE__ */ i(Ca, { className: "Camino-camera", sx: { mt: 3 }, field: f.source })
12217
+ !a && l && /* @__PURE__ */ i(Ca, { className: "Camino-camera", sx: { mt: 3 }, field: f.source })
12218
12218
  ]
12219
12219
  }
12220
12220
  ));
12221
12221
  }, "Camino"), _y = /* @__PURE__ */ n((e) => {
12222
- const { title: t, source: o, src: r } = e, a = st(e), s = `${r}/${a[o]}`;
12223
- return /* @__PURE__ */ i(gl, { title: t, src: s });
12222
+ const { title: t, source: o, src: r } = e, s = st(e), a = `${r}/${s[o]}`;
12223
+ return /* @__PURE__ */ i(gl, { title: t, src: a });
12224
12224
  }, "ImageField"), tb = v.forwardRef(/* @__PURE__ */ n(function(t, o) {
12225
- const r = v.useRef(null), a = v.useCallback(
12226
- (s) => {
12227
- r.current = s, typeof o == "function" ? o(s) : o && (o.current = s);
12225
+ const r = v.useRef(null), s = v.useCallback(
12226
+ (a) => {
12227
+ r.current = a, typeof o == "function" ? o(a) : o && (o.current = a);
12228
12228
  },
12229
12229
  [o]
12230
12230
  );
@@ -12234,7 +12234,7 @@ const Ty = {
12234
12234
  nodeRef: r,
12235
12235
  handle: "#draggable-dialog-title",
12236
12236
  cancel: '[class*="MuiDialogContent-root"]',
12237
- children: /* @__PURE__ */ i(Da, { ref: a, ...t })
12237
+ children: /* @__PURE__ */ i(Da, { ref: s, ...t })
12238
12238
  }
12239
12239
  );
12240
12240
  }, "PaperComponent2")), ob = { cursor: "move" }, nb = /* @__PURE__ */ n((e) => {
@@ -12242,8 +12242,8 @@ const Ty = {
12242
12242
  isOpen: t = !1,
12243
12243
  isLoading: o,
12244
12244
  title: r,
12245
- content: a,
12246
- cancel: s = "ra.action.cancel",
12245
+ content: s,
12246
+ cancel: a = "ra.action.cancel",
12247
12247
  //confirmColor = 'primary',
12248
12248
  ConfirmIcon: c = vl,
12249
12249
  CancelIcon: l = Ml,
@@ -12270,11 +12270,11 @@ const Ty = {
12270
12270
  "aria-labelledby": "draggable-dialog-title",
12271
12271
  children: [
12272
12272
  /* @__PURE__ */ i(hi, { style: ob, id: "draggable-dialog-title", children: h(r, { _: r, ...m }) }),
12273
- /* @__PURE__ */ i(fi, { dividers: !0, children: a }),
12273
+ /* @__PURE__ */ i(fi, { dividers: !0, children: s }),
12274
12274
  /* @__PURE__ */ R(mi, { children: [
12275
12275
  /* @__PURE__ */ R(yt, { disabled: o, onClick: d, children: [
12276
12276
  /* @__PURE__ */ i(l, { sx: { paddingRight: "0.5em" } }),
12277
- h(s, { _: s })
12277
+ h(a, { _: a })
12278
12278
  ] }),
12279
12279
  /* @__PURE__ */ R(
12280
12280
  yt,
@@ -12299,7 +12299,7 @@ const Ty = {
12299
12299
  }, sb = /* @__PURE__ */ n((e, t) => !e || e?.all ? t("pos.all") : e?.none || e.seleccion.length === 0 ? t("pos.none") : t("pos.selection_count", {
12300
12300
  count: e.seleccion.split(",").length
12301
12301
  }), "format"), ab = /* @__PURE__ */ n((e) => e, "parse"), Dy = /* @__PURE__ */ n((e) => {
12302
- const t = he(), [o, r] = te(!1), [a, s] = te(null), [c, l] = te(null), d = _e(!1), p = gn(), {
12302
+ const t = he(), [o, r] = te(!1), [s, a] = te(null), [c, l] = te(null), d = _e(!1), p = gn(), {
12303
12303
  hidden: u,
12304
12304
  propsContenido: {
12305
12305
  readOnly: m,
@@ -12327,13 +12327,13 @@ const Ty = {
12327
12327
  none: !1
12328
12328
  }), g(k);
12329
12329
  }, "handleConfirm"), M = /* @__PURE__ */ n((k) => {
12330
- s(null), S.setValue(b, {
12330
+ a(null), S.setValue(b, {
12331
12331
  seleccion: "",
12332
12332
  all: !1,
12333
12333
  none: !0
12334
12334
  }), g(k);
12335
12335
  }, "handleNinguno"), I = /* @__PURE__ */ n((k) => {
12336
- s(null), S.setValue(b, {
12336
+ a(null), S.setValue(b, {
12337
12337
  seleccion: "",
12338
12338
  all: !0,
12339
12339
  none: !1
@@ -12386,11 +12386,11 @@ const Ty = {
12386
12386
  /* @__PURE__ */ i(
12387
12387
  xo,
12388
12388
  {
12389
- onClick: /* @__PURE__ */ n((k) => s(k.currentTarget), "onClick"),
12389
+ onClick: /* @__PURE__ */ n((k) => a(k.currentTarget), "onClick"),
12390
12390
  disabled: m,
12391
12391
  "aria-label": `${h}: ${t("pos.selection")}`,
12392
12392
  "aria-haspopup": "menu",
12393
- "aria-expanded": !!a,
12393
+ "aria-expanded": !!s,
12394
12394
  size: "small",
12395
12395
  title: t("pos.selection"),
12396
12396
  children: /* @__PURE__ */ i(bi, {})
@@ -12418,9 +12418,9 @@ const Ty = {
12418
12418
  /* @__PURE__ */ R(
12419
12419
  go,
12420
12420
  {
12421
- anchorEl: a,
12422
- open: !!a,
12423
- onClose: /* @__PURE__ */ n(() => s(null), "onClose"),
12421
+ anchorEl: s,
12422
+ open: !!s,
12423
+ onClose: /* @__PURE__ */ n(() => a(null), "onClose"),
12424
12424
  children: [
12425
12425
  /* @__PURE__ */ R(et, { onClick: I, children: [
12426
12426
  /* @__PURE__ */ i(Cl, { sx: { mr: 1 } }),
@@ -12499,12 +12499,12 @@ const Ty = {
12499
12499
  soloActivos: mo(e.soloActivos)
12500
12500
  };
12501
12501
  }, "normalizeFieldValue"), cb = /* @__PURE__ */ n((e, t) => String(e.funnro || "").trim() === t || String(e.funcod || "").trim() === t, "matchesFuncionario"), db = /* @__PURE__ */ n(async (e, t, o) => {
12502
- const r = lb(o), a = [{ funnro: t }, { funcod: t }, { q: t }];
12503
- for (const s of a) {
12502
+ const r = lb(o), s = [{ funnro: t }, { funcod: t }, { q: t }];
12503
+ for (const a of s) {
12504
12504
  const { data: c = [] } = await e.getList("form_224", {
12505
12505
  pagination: { page: 1, perPage: 10 },
12506
12506
  sort: { field: "funnro", order: "ASC" },
12507
- filter: s,
12507
+ filter: a,
12508
12508
  meta: r
12509
12509
  }), l = c.find(
12510
12510
  (d) => cb(d, t)
@@ -12519,33 +12519,33 @@ const Ty = {
12519
12519
  pagination: { page: 1, perPage: 10 },
12520
12520
  sort: { field: "funnro", order: "ASC" },
12521
12521
  filter: { funcod: t }
12522
- }, { data: a = [] } = await o.fetchQuery({
12522
+ }, { data: s = [] } = await o.fetchQuery({
12523
12523
  queryKey: ["form_224", "getList", r],
12524
12524
  queryFn: /* @__PURE__ */ n(() => e.getList("form_224", r), "queryFn"),
12525
12525
  staleTime: 6e4,
12526
12526
  retry: !1
12527
- }), s = a.find((c) => String(c.funcod || "").trim() === t);
12528
- return s ? [
12529
- String(s.funnro || s.funcod || "").trim(),
12530
- String(s.funpriape || "").trim(),
12531
- String(s.funprinom || "").trim()
12527
+ }), a = s.find((c) => String(c.funcod || "").trim() === t);
12528
+ return a ? [
12529
+ String(a.funnro || a.funcod || "").trim(),
12530
+ String(a.funpriape || "").trim(),
12531
+ String(a.funprinom || "").trim()
12532
12532
  ].filter(Boolean).join(" - ") : t;
12533
12533
  } catch {
12534
12534
  return t;
12535
12535
  }
12536
12536
  }, "getFuncionarioTooltipLine"), pb = /* @__PURE__ */ n((e) => e ? typeof e == "string" ? e.trim() : typeof e == "object" && !Array.isArray(e) ? String(e.fillista || e.filgrilla || "").trim() : "" : "", "normalizeFilgrilla"), Fa = /* @__PURE__ */ n((e, t) => t ? !e || e === "null" ? t : `(${e}) AND (${t})` : e, "combineFillista"), mb = /* @__PURE__ */ n(({ onRecordsLoaded: e }) => {
12537
- const { data: t = [], isPending: o, isLoading: r, isFetching: a } = oo(), s = de(
12537
+ const { data: t = [], isPending: o, isLoading: r, isFetching: s } = oo(), a = de(
12538
12538
  () => Array.isArray(t) ? t : Object.values(t),
12539
12539
  [t]
12540
12540
  ), c = de(
12541
- () => s.map((d) => String(d.id)).join("|"),
12542
- [s]
12543
- ), l = v.useRef(s);
12541
+ () => a.map((d) => String(d.id)).join("|"),
12542
+ [a]
12543
+ ), l = v.useRef(a);
12544
12544
  return ie(() => {
12545
- l.current = s;
12546
- }, [s]), ie(() => {
12547
- !e || o || r || a || e(l.current);
12548
- }, [e, c, a, r, o]), null;
12545
+ l.current = a;
12546
+ }, [a]), ie(() => {
12547
+ !e || o || r || s || e(l.current);
12548
+ }, [e, c, s, r, o]), null;
12549
12549
  }, "ListSelectionBridge"), fb = [
12550
12550
  { source: "funcod", label: "pos.code" },
12551
12551
  { source: "funced", label: "pos.id_number" },
@@ -12581,17 +12581,17 @@ const Ty = {
12581
12581
  ] }, t)) })
12582
12582
  ] })
12583
12583
  }
12584
- ), "FuncionariosGridSkeleton"), hb = /* @__PURE__ */ n(() => /* @__PURE__ */ i(
12584
+ ), "FuncionariosGridSkeleton"), hb = /* @__PURE__ */ n(({ queryOptions: e }) => /* @__PURE__ */ i(
12585
12585
  Ba,
12586
12586
  {
12587
- selectAllButton: /* @__PURE__ */ i(ku, { label: "pos.select_all_pages" })
12587
+ selectAllButton: /* @__PURE__ */ i(ku, { label: "pos.select_all_pages", queryOptions: e })
12588
12588
  }
12589
- ), "TBSFBulkActionsToolbar"), gb = /* @__PURE__ */ n(() => {
12590
- const { isPending: e, isLoading: t, isFetching: o } = oo();
12591
- return e || t || o ? /* @__PURE__ */ i(Uc, {}) : /* @__PURE__ */ R(
12589
+ ), "TBSFBulkActionsToolbar"), gb = /* @__PURE__ */ n(({ queryOptions: e }) => {
12590
+ const { isPending: t, isLoading: o, isFetching: r } = oo();
12591
+ return t || o || r ? /* @__PURE__ */ i(Uc, {}) : /* @__PURE__ */ R(
12592
12592
  Tu,
12593
12593
  {
12594
- bulkActionsToolbar: /* @__PURE__ */ i(hb, {}),
12594
+ bulkActionsToolbar: /* @__PURE__ */ i(hb, { queryOptions: e }),
12595
12595
  bulkActionButtons: /* @__PURE__ */ i("span", {}),
12596
12596
  rowClick: "toggleSelection",
12597
12597
  sx: {
@@ -12605,13 +12605,13 @@ const Ty = {
12605
12605
  display: "none"
12606
12606
  },
12607
12607
  "& .RaDatagrid-headerCell": {
12608
- fontSize: /* @__PURE__ */ n((r) => r.typography.caption.fontSize, "fontSize")
12608
+ fontSize: /* @__PURE__ */ n((s) => s.typography.caption.fontSize, "fontSize")
12609
12609
  },
12610
12610
  "& .RaDatagrid-rowCell": {
12611
- fontSize: /* @__PURE__ */ n((r) => r.typography.caption.fontSize, "fontSize")
12611
+ fontSize: /* @__PURE__ */ n((s) => s.typography.caption.fontSize, "fontSize")
12612
12612
  },
12613
12613
  "& .RaDatagrid-rowCell *": {
12614
- fontSize: /* @__PURE__ */ n((r) => r.typography.caption.fontSize, "fontSize")
12614
+ fontSize: /* @__PURE__ */ n((s) => s.typography.caption.fontSize, "fontSize")
12615
12615
  },
12616
12616
  "& .MuiCheckbox-root .MuiSvgIcon-root": {
12617
12617
  fontSize: 18
@@ -12657,7 +12657,7 @@ const Ty = {
12657
12657
  },
12658
12658
  children: [
12659
12659
  /* @__PURE__ */ i(mb, { onRecordsLoaded: e }),
12660
- /* @__PURE__ */ i(gb, {})
12660
+ /* @__PURE__ */ i(gb, { queryOptions: t })
12661
12661
  ]
12662
12662
  }
12663
12663
  ), "AsistenteList"), xb = { fillista: "empcod=-1", mapId: ["funcod"] }, Kn = {
@@ -12738,8 +12738,8 @@ const Ty = {
12738
12738
  const t = he(), {
12739
12739
  filgrilla: o = {},
12740
12740
  meta: r,
12741
- onRecordsLoaded: a,
12742
- onListParamsChange: s,
12741
+ onRecordsLoaded: s,
12742
+ onListParamsChange: a,
12743
12743
  onStructureFilterChange: c,
12744
12744
  onStatusFilterChange: l,
12745
12745
  initialFilterKey: d = Xo[0].key,
@@ -12763,7 +12763,8 @@ const Ty = {
12763
12763
  ), D = de(
12764
12764
  () => ({
12765
12765
  ...r || {},
12766
- ...F.getMeta()
12766
+ ...F.getMeta(),
12767
+ esPOST: !0
12767
12768
  }),
12768
12769
  [r, F]
12769
12770
  ), E = de(
@@ -12780,11 +12781,11 @@ const Ty = {
12780
12781
  ) || u[0] || Xo[0];
12781
12782
  M($), P(!0);
12782
12783
  }, [u, d]), ie(() => {
12783
- s && s({
12784
+ a && a({
12784
12785
  filter: m,
12785
12786
  meta: D
12786
12787
  });
12787
- }, [m, D, s]), ie(() => {
12788
+ }, [m, D, a]), ie(() => {
12788
12789
  let $ = !0;
12789
12790
  return (/* @__PURE__ */ n(async () => {
12790
12791
  try {
@@ -12820,9 +12821,9 @@ const Ty = {
12820
12821
  [q, D, c, f]
12821
12822
  ), G = ne(
12822
12823
  ($) => {
12823
- P(!1), a && a($);
12824
+ P(!1), s && s($);
12824
12825
  },
12825
- [a]
12826
+ [s]
12826
12827
  ), Q = /* @__PURE__ */ n(async ($, J, fe) => {
12827
12828
  const Se = Cr(f, J);
12828
12829
  if (!(!fe || !Se?.hasItems || Se.children.length > 0))
@@ -13066,9 +13067,9 @@ const Ty = {
13066
13067
  }
13067
13068
  );
13068
13069
  }, "TreeWithList"), Cb = v.forwardRef(/* @__PURE__ */ n(function(t, o) {
13069
- const r = v.useRef(null), a = v.useCallback(
13070
- (s) => {
13071
- r.current = s, typeof o == "function" ? o(s) : o && (o.current = s);
13070
+ const r = v.useRef(null), s = v.useCallback(
13071
+ (a) => {
13072
+ r.current = a, typeof o == "function" ? o(a) : o && (o.current = a);
13072
13073
  },
13073
13074
  [o]
13074
13075
  );
@@ -13078,7 +13079,7 @@ const Ty = {
13078
13079
  nodeRef: r,
13079
13080
  handle: "#draggable-dialog-title",
13080
13081
  cancel: '[class*="MuiDialogContent-root"]',
13081
- children: /* @__PURE__ */ i(Da, { ref: a, ...t })
13082
+ children: /* @__PURE__ */ i(Da, { ref: s, ...t })
13082
13083
  }
13083
13084
  );
13084
13085
  }, "PaperComponent2")), wb = { cursor: "move" }, Sb = /* @__PURE__ */ n((e) => {
@@ -13086,8 +13087,8 @@ const Ty = {
13086
13087
  isOpen: t = !1,
13087
13088
  isLoading: o,
13088
13089
  title: r,
13089
- cancel: a = "ra.action.cancel",
13090
- ConfirmIcon: s = vl,
13090
+ cancel: s = "ra.action.cancel",
13091
+ ConfirmIcon: a = vl,
13091
13092
  CancelIcon: c = Ml,
13092
13093
  onClose: l,
13093
13094
  onConfirm: d,
@@ -13184,7 +13185,7 @@ const Ty = {
13184
13185
  /* @__PURE__ */ R(mi, { children: [
13185
13186
  /* @__PURE__ */ R(yt, { disabled: o || k, onClick: l, children: [
13186
13187
  /* @__PURE__ */ i(c, { sx: { paddingRight: "0.5em" } }),
13187
- P(a, { _: a })
13188
+ P(s, { _: s })
13188
13189
  ] }),
13189
13190
  /* @__PURE__ */ R(
13190
13191
  yt,
@@ -13193,7 +13194,7 @@ const Ty = {
13193
13194
  onClick: /* @__PURE__ */ n((q) => W(q, "yes"), "onClick"),
13194
13195
  autoFocus: !0,
13195
13196
  children: [
13196
- /* @__PURE__ */ i(s, { sx: { paddingRight: "0.5em" } }),
13197
+ /* @__PURE__ */ i(a, { sx: { paddingRight: "0.5em" } }),
13197
13198
  P("ra.action.confirm")
13198
13199
  ]
13199
13200
  }
@@ -13228,7 +13229,7 @@ const Ty = {
13228
13229
  egresadosdosmeses: "E",
13229
13230
  todos: "T"
13230
13231
  }, Ey = /* @__PURE__ */ n((e) => {
13231
- const { source: t, onChange: o, fullWidth: r = !1 } = e, [a, s] = te(!1), [c, l] = te(null), [d, p] = te(""), u = gn(), m = Nt(), h = fn(), f = Bo(), g = he(), C = Ge(), { estado: x, fichaProps: b = {} } = Re(), P = _e(!1), {
13232
+ const { source: t, onChange: o, fullWidth: r = !1 } = e, [s, a] = te(!1), [c, l] = te(null), [d, p] = te(""), u = gn(), m = Nt(), h = fn(), f = Bo(), g = he(), C = Ge(), { estado: x, fichaProps: b = {} } = Re(), P = _e(!1), {
13232
13233
  hidden: S,
13233
13234
  propsContenido: {
13234
13235
  readOnly: y,
@@ -13370,7 +13371,7 @@ const Ty = {
13370
13371
  },
13371
13372
  [C, q, t]
13372
13373
  ), pe = ne(() => {
13373
- s(!1);
13374
+ a(!1);
13374
13375
  }, []), re = ne(
13375
13376
  (N, B) => {
13376
13377
  const z = X(B);
@@ -13379,7 +13380,7 @@ const Ty = {
13379
13380
  [X, C, t, Ue]
13380
13381
  ), ke = ne(
13381
13382
  (N, B, z = {}) => {
13382
- s(!1), re(N, {
13383
+ a(!1), re(N, {
13383
13384
  seleccion: (z.selectedFuncods || []).join(","),
13384
13385
  all: !1,
13385
13386
  none: !1
@@ -13642,7 +13643,7 @@ const Ty = {
13642
13643
  lt,
13643
13644
  {
13644
13645
  onClick: /* @__PURE__ */ n(() => {
13645
- u?.enabled || s(!0);
13646
+ u?.enabled || a(!0);
13646
13647
  }, "onClick"),
13647
13648
  disabled: y,
13648
13649
  "aria-label": g("pos.selection"),
@@ -13714,7 +13715,7 @@ const Ty = {
13714
13715
  u?.enabled ? null : /* @__PURE__ */ i(
13715
13716
  Sb,
13716
13717
  {
13717
- isOpen: a,
13718
+ isOpen: s,
13718
13719
  title: g("pos.selection_of", { label: M }),
13719
13720
  onConfirm: ke,
13720
13721
  onClose: pe,