bonsaif-ui 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as o, Fragment as Ce } from "react/jsx-runtime";
3
- import { HiMagnifyingGlass as Ge, HiXMark as ye, HiInformationCircle as Ht, HiExclamationCircle as Ir, HiExclamationTriangle as $t, HiCheckCircle as jr, HiChevronLeft as qe, HiChevronDown as Ye, HiChevronRight as Ie, HiCalendarDays as kt, HiCheck as Qe, HiClipboardDocument as Pr, HiLink as Rr, HiChevronUp as _r, HiChevronUpDown as Hr, HiEllipsisVertical as Wr, HiInbox as sr, HiLockClosed as Fr, HiBars3 as Ur, HiHome as lt, HiArrowRightOnRectangle as qr, HiShieldCheck as vt, HiListBullet as Wt, HiBriefcase as Yr, HiCog6Tooth as Ft, HiUsers as Ut, HiDocumentText as Gr, HiBell as Kr, HiUser as Vr, HiClipboardDocumentList as Xr, HiBuildingOffice2 as Zr, HiRectangleGroup as Jr, HiTicket as Qr, HiChartBar as en } from "react-icons/hi2";
4
- import ke, { useRef as J, useState as T, useEffect as H, createContext as tn, useLayoutEffect as rn, useContext as nn, isValidElement as Et, Children as an, useMemo as je, useCallback as ve, cloneElement as on, forwardRef as sn, useSyncExternalStore as ln } from "react";
3
+ import { HiMagnifyingGlass as Ve, HiXMark as ye, HiInformationCircle as Ht, HiExclamationCircle as Ir, HiExclamationTriangle as $t, HiCheckCircle as jr, HiChevronLeft as qe, HiChevronDown as Ye, HiChevronRight as Ie, HiCalendarDays as kt, HiCheck as Qe, HiClipboardDocument as Pr, HiLink as Rr, HiChevronUp as _r, HiChevronUpDown as Hr, HiEllipsisVertical as Wr, HiInbox as sr, HiLockClosed as Fr, HiBars3 as Ur, HiHome as lt, HiArrowRightOnRectangle as qr, HiShieldCheck as vt, HiListBullet as Wt, HiBriefcase as Yr, HiCog6Tooth as Ft, HiUsers as Ut, HiDocumentText as Vr, HiBell as Gr, HiUser as Kr, HiClipboardDocumentList as Xr, HiBuildingOffice2 as Zr, HiRectangleGroup as Jr, HiTicket as Qr, HiChartBar as en } from "react-icons/hi2";
4
+ import ke, { useRef as J, useState as A, useEffect as H, createContext as tn, useLayoutEffect as rn, useContext as nn, isValidElement as Et, Children as an, useMemo as je, useCallback as ve, cloneElement as on, forwardRef as sn, useSyncExternalStore as ln } from "react";
5
5
  import { createPortal as Pe } from "react-dom";
6
6
  import { OverlayScrollbars as qt } from "overlayscrollbars";
7
7
  import { MdDragIndicator as cn } from "react-icons/md";
@@ -41,7 +41,7 @@ function hn({
41
41
  size: s = "default",
42
42
  inputTabIndex: f
43
43
  }) {
44
- const p = J(null), [k, N] = T(!1), y = c || k || e.trim().length > 0, v = s === "sm" ? "h-9 rounded-md" : "h-10 rounded-lg", u = a || "w-48 sm:w-64 lg:w-72";
44
+ const p = J(null), [k, N] = A(!1), y = c || k || e.trim().length > 0, v = s === "sm" ? "h-9 rounded-md" : "h-10 rounded-lg", u = a || "w-48 sm:w-64 lg:w-72";
45
45
  H(() => {
46
46
  var h;
47
47
  i && ((h = p.current) == null || h.focus());
@@ -59,7 +59,7 @@ function hn({
59
59
  },
60
60
  children: [
61
61
  /* @__PURE__ */ t(
62
- Ge,
62
+ Ve,
63
63
  {
64
64
  className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 pointer-events-none transition-colors duration-200",
65
65
  style: { color: "var(--text-muted)" }
@@ -128,7 +128,7 @@ function Mt({
128
128
  style: i,
129
129
  as: c = "div"
130
130
  }) {
131
- const d = J(null), s = J(null), [f, p] = T(null), [k, N] = T("");
131
+ const d = J(null), s = J(null), [f, p] = A(null), [k, N] = A("");
132
132
  H(() => {
133
133
  const u = d.current;
134
134
  u && (u.querySelectorAll("[title]").forEach((b) => {
@@ -208,7 +208,7 @@ function Mt({
208
208
  ) : null
209
209
  ] });
210
210
  }
211
- function Gt(e) {
211
+ function Vt(e) {
212
212
  if (e !== void 0)
213
213
  return typeof e == "number" ? `${e}px` : e;
214
214
  }
@@ -256,12 +256,12 @@ function pe({
256
256
  style: N,
257
257
  ...y
258
258
  }) {
259
- const v = nn(lr), u = c ?? v.iconOnly ?? e === "icon", b = v.compact ?? !1, h = v.headerAction ?? !1, C = b && !h && r === "md" ? "xs" : r, _ = e === "icon" || u, I = h && _, B = St(f), w = i ?? y.title ?? y["aria-label"] ?? (u ? B : void 0), $ = w ? void 0 : y.title, A = y["aria-label"] ?? (typeof w == "string" ? w : B || void 0), j = n ? null : a ?? (u ? kn(f) : null), M = /* @__PURE__ */ o(
259
+ const v = nn(lr), u = c ?? v.iconOnly ?? e === "icon", b = v.compact ?? !1, h = v.headerAction ?? !1, C = b && !h && r === "md" ? "xs" : r, _ = e === "icon" || u, I = h && _, B = St(f), w = i ?? y.title ?? y["aria-label"] ?? (u ? B : void 0), $ = w ? void 0 : y.title, T = y["aria-label"] ?? (typeof w == "string" ? w : B || void 0), j = n ? null : a ?? (u ? kn(f) : null), M = /* @__PURE__ */ o(
260
260
  "button",
261
261
  {
262
262
  ...y,
263
263
  title: $,
264
- "aria-label": A,
264
+ "aria-label": T,
265
265
  "data-variant": e,
266
266
  "data-size": C,
267
267
  "data-icon": _ ? "true" : void 0,
@@ -269,8 +269,8 @@ function pe({
269
269
  className: `${xn} ${I ? gn : vn[e]} ${_ ? wn[C] : yn[C]} ${b && !_ ? "px-2.5" : ""} ${p}`,
270
270
  style: {
271
271
  ...Nn[e],
272
- height: Gt(d),
273
- padding: Gt(s),
272
+ height: Vt(d),
273
+ padding: Vt(s),
274
274
  ...N,
275
275
  ...I ? {
276
276
  width: "40px",
@@ -392,7 +392,7 @@ function dr(e) {
392
392
  const r = e.split("/").filter(Boolean);
393
393
  return (r[r.length - 1] ?? e).replace(/^lv_/, "").split(/[-_]/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ");
394
394
  }
395
- function Kt(e) {
395
+ function Gt(e) {
396
396
  return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim();
397
397
  }
398
398
  function En(e) {
@@ -437,7 +437,7 @@ function Ja({
437
437
  tabsSearchThreshold: B = 6,
438
438
  tabsSearchPlaceholder: w = "Buscar modulo...",
439
439
  tabsSearchValue: $,
440
- onTabsSearchChange: A,
440
+ onTabsSearchChange: T,
441
441
  emptySearchState: j,
442
442
  showTabCount: M = !0,
443
443
  className: E = "",
@@ -451,23 +451,23 @@ function Ja({
451
451
  (L) => !L.hidden && ((N == null ? void 0 : N(L, i)) ?? !0)
452
452
  ),
453
453
  [N, i, c]
454
- ), V = (Me = F.find(
454
+ ), Z = (Me = F.find(
455
455
  (L) => !L.disabled
456
- )) == null ? void 0 : Me.service, [ne, m] = T(
457
- p ?? V ?? ""
458
- ), [D, q] = T({}), [X, Z] = T({}), [ae, de] = T(""), [x, G] = T(!1), he = J(X), te = J(0), Q = $ ?? ae, O = Kt(Q), K = I === !0 || I === "auto" && F.length >= B, ee = K && Q.trim().length > 0, se = je(() => O ? F.filter(
459
- (L) => Kt(En(L)).includes(O)
456
+ )) == null ? void 0 : Me.service, [ne, m] = A(
457
+ p ?? Z ?? ""
458
+ ), [D, q] = A({}), [K, X] = A({}), [oe, de] = A(""), [x, V] = A(!1), he = J(K), te = J(0), Q = $ ?? oe, O = Gt(Q), G = I === !0 || I === "auto" && F.length >= B, ee = G && Q.trim().length > 0, se = je(() => O ? F.filter(
459
+ (L) => Gt(En(L)).includes(O)
460
460
  ) : F, [O, F]), be = f ?? ne, Y = F.find((L) => L.service === be) ?? F.find((L) => !L.disabled);
461
461
  H(() => {
462
- !Y && V && m(V);
463
- }, [V, Y]), H(() => {
464
- he.current = X;
465
- }, [X]);
462
+ !Y && Z && m(Z);
463
+ }, [Z, Y]), H(() => {
464
+ he.current = K;
465
+ }, [K]);
466
466
  const $e = (L) => {
467
467
  L.disabled || (f || m(L.service), k == null || k(L.service, L));
468
468
  }, Be = (L) => {
469
- $ === void 0 && de(L), A == null || A(L);
470
- }, Ke = (L, le) => {
469
+ $ === void 0 && de(L), T == null || T(L);
470
+ }, Ge = (L, le) => {
471
471
  const ue = se.filter((me) => !me.disabled), xe = ue.findIndex(
472
472
  (me) => me.service === le.service
473
473
  );
@@ -480,7 +480,7 @@ function Ja({
480
480
  if (le != null && le.loading || le != null && le.component && y) return;
481
481
  const ue = (d == null ? void 0 : d[L]) ?? s;
482
482
  if (!ue) {
483
- Z((me) => ({
483
+ X((me) => ({
484
484
  ...me,
485
485
  [L]: {
486
486
  loading: !1,
@@ -490,26 +490,26 @@ function Ja({
490
490
  return;
491
491
  }
492
492
  const xe = ++te.current;
493
- Z((me) => ({
493
+ X((me) => ({
494
494
  ...me,
495
495
  [L]: { ...me[L], loading: !0, error: void 0 }
496
496
  })), ue(Y, i).then((me) => {
497
497
  if (xe !== te.current && !y) return;
498
498
  const Xe = Mn(me);
499
- Z((We) => ({
499
+ X((We) => ({
500
500
  ...We,
501
501
  [L]: { component: Xe, loading: !1 }
502
502
  }));
503
503
  }).catch((me) => {
504
504
  const Xe = me instanceof Error ? me : new Error(String(me));
505
- Z((We) => ({
505
+ X((We) => ({
506
506
  ...We,
507
507
  [L]: { ...We[L], loading: !1, error: Xe }
508
508
  }));
509
509
  });
510
510
  }, [i, y, s, d, Y]);
511
511
  H(Re, [Re]);
512
- const Ve = Y ? D[Y.service] ?? null : null, oe = Y ? X[Y.service] : void 0, _e = oe == null ? void 0 : oe.component, et = (L) => {
512
+ const Ke = Y ? D[Y.service] ?? null : null, ie = Y ? K[Y.service] : void 0, _e = ie == null ? void 0 : ie.component, et = (L) => {
513
513
  Y && q((le) => ({
514
514
  ...le,
515
515
  [Y.service]: L
@@ -527,7 +527,7 @@ function Ja({
527
527
  filteredLinks: se,
528
528
  selectedLink: Y,
529
529
  selectedService: Y == null ? void 0 : Y.service,
530
- activeItemId: Ve,
530
+ activeItemId: Ke,
531
531
  tabsSearch: Q,
532
532
  onSelectService: $e,
533
533
  onOpenDetail: et,
@@ -550,18 +550,18 @@ function Ja({
550
550
  {
551
551
  className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${z}`,
552
552
  children: [
553
- (v || u || K || M) && /* @__PURE__ */ t("div", { className: "relative border-b border-[var(--border)] px-4 py-3", children: /* @__PURE__ */ o("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [
553
+ (v || u || G || M) && /* @__PURE__ */ t("div", { className: "relative border-b border-[var(--border)] px-4 py-3", children: /* @__PURE__ */ o("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [
554
554
  /* @__PURE__ */ o("div", { className: "min-w-0", children: [
555
555
  v && /* @__PURE__ */ t("h2", { className: "truncate text-sm font-semibold text-[var(--text-main)]", children: v }),
556
556
  u && /* @__PURE__ */ t("p", { className: "mt-1 line-clamp-2 text-xs text-[var(--text-muted)]", children: u })
557
557
  ] }),
558
- (K || M) && /* @__PURE__ */ o("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
558
+ (G || M) && /* @__PURE__ */ o("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
559
559
  M && /* @__PURE__ */ o("span", { className: "hidden text-xs font-semibold text-[var(--text-muted)] transition-opacity duration-200 sm:inline", children: [
560
560
  se.length,
561
561
  " / ",
562
562
  F.length
563
563
  ] }),
564
- K && /* @__PURE__ */ o(Ce, { children: [
564
+ G && /* @__PURE__ */ o(Ce, { children: [
565
565
  /* @__PURE__ */ t(
566
566
  "div",
567
567
  {
@@ -576,7 +576,7 @@ function Ja({
576
576
  className: "w-full",
577
577
  autoFocus: x,
578
578
  forceExpanded: !0,
579
- onEscape: () => G(!1),
579
+ onEscape: () => V(!1),
580
580
  size: "sm",
581
581
  inputTabIndex: x ? 0 : -1
582
582
  }
@@ -590,10 +590,10 @@ function Ja({
590
590
  "aria-label": x ? "Cerrar busqueda" : "Buscar tabs",
591
591
  "aria-expanded": x,
592
592
  onClick: () => {
593
- x && Q && Be(""), G((L) => !L);
593
+ x && Q && Be(""), V((L) => !L);
594
594
  },
595
595
  className: `inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border transition-all duration-200 hover:scale-[1.03] active:scale-95 ${x || ee ? "border-[var(--primary)] bg-[var(--bg-input)] text-[var(--text-main)] shadow-sm" : "border-[var(--border)] text-[var(--text-muted)] hover:bg-[var(--bg-input)] hover:text-[var(--text-main)]"}`,
596
- children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: x || ee ? /* @__PURE__ */ t(ye, { className: "h-4 w-4" }) : /* @__PURE__ */ t(Ge, { className: "h-4 w-4" }) })
596
+ children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: x || ee ? /* @__PURE__ */ t(ye, { className: "h-4 w-4" }) : /* @__PURE__ */ t(Ve, { className: "h-4 w-4" }) })
597
597
  }
598
598
  )
599
599
  ] })
@@ -615,7 +615,7 @@ function Ja({
615
615
  "aria-selected": le,
616
616
  disabled: L.disabled,
617
617
  onClick: () => $e(L),
618
- onKeyDown: (ue) => Ke(ue, L),
618
+ onKeyDown: (ue) => Ge(ue, L),
619
619
  className: `inline-flex h-9 min-w-max items-center gap-2 rounded-md border px-3 text-xs font-semibold transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50 ${le ? "border-[var(--primary)] bg-[var(--bg-card)] text-[var(--text-main)] shadow-sm" : "border-transparent text-[var(--text-muted)] hover:bg-[var(--bg-card)] hover:text-[var(--text-main)]"}`,
620
620
  children: _ ? _(L, le) : /* @__PURE__ */ o(Ce, { children: [
621
621
  L.icon,
@@ -631,15 +631,15 @@ function Ja({
631
631
  (Y == null ? void 0 : Y.description) && /* @__PURE__ */ t("div", { className: "border-b border-[var(--border)] px-4 py-2 text-xs text-[var(--text-muted)]", children: Y.description }),
632
632
  /* @__PURE__ */ o("div", { className: "min-h-[420px] p-4", children: [
633
633
  !Y && (b ?? /* @__PURE__ */ t("div", { className: "flex min-h-[220px] items-center justify-center rounded-lg border border-dashed border-[var(--border)] text-sm text-[var(--text-muted)]", children: "No hay modulos disponibles." })),
634
- Y && (oe == null ? void 0 : oe.loading) && (h ?? /* @__PURE__ */ t(Sn, { title: "Cargando modulo..." })),
635
- Y && (oe == null ? void 0 : oe.error) && C(oe.error, Re),
636
- Y && _e && !(oe != null && oe.loading) && !(oe != null && oe.error) && /* @__PURE__ */ t(
634
+ Y && (ie == null ? void 0 : ie.loading) && (h ?? /* @__PURE__ */ t(Sn, { title: "Cargando modulo..." })),
635
+ Y && (ie == null ? void 0 : ie.error) && C(ie.error, Re),
636
+ Y && _e && !(ie != null && ie.loading) && !(ie != null && ie.error) && /* @__PURE__ */ t(
637
637
  _e,
638
638
  {
639
639
  context: i,
640
640
  parent: a,
641
641
  link: Y,
642
- activeItemId: Ve,
642
+ activeItemId: Ke,
643
643
  onOpenDetail: et,
644
644
  onBackToList: He
645
645
  }
@@ -751,11 +751,11 @@ const ur = [
751
751
  "Oct",
752
752
  "Nov",
753
753
  "Dic"
754
- ], An = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], gt = 6;
754
+ ], Tn = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], gt = 6;
755
755
  function Ct(e, r, n) {
756
756
  return `${e}-${String(r).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
757
757
  }
758
- function Tn() {
758
+ function An() {
759
759
  const e = /* @__PURE__ */ new Date();
760
760
  return Ct(e.getFullYear(), e.getMonth() + 1, e.getDate());
761
761
  }
@@ -774,15 +774,15 @@ function eo({
774
774
  minDate: n,
775
775
  displayMode: a = "inline"
776
776
  }) {
777
- const i = Tn(), d = mr(e || i), s = a === "popover", [f, p] = T(!1), k = J(null), [N, y] = T({
777
+ const i = An(), d = mr(e || i), s = a === "popover", [f, p] = A(!1), k = J(null), [N, y] = A({
778
778
  horizontal: "left",
779
779
  vertical: "bottom"
780
- }), [v, u] = T(d.year), [b, h] = T(d.month), [C, _] = T("days"), I = 16, [B, w] = T(0), $ = v - 7 + B, A = Array.from({ length: I }, (m, D) => $ + D);
780
+ }), [v, u] = A(d.year), [b, h] = A(d.month), [C, _] = A("days"), I = 16, [B, w] = A(0), $ = v - 7 + B, T = Array.from({ length: I }, (m, D) => $ + D);
781
781
  H(() => {
782
782
  if (!s || !f || !k.current) return;
783
- const m = k.current.getBoundingClientRect(), D = 8, q = 280, X = 340, Z = m.left + q > window.innerWidth - D, ae = m.right - q >= D, de = m.bottom + 8 + X > window.innerHeight - D, x = m.top - 8 - X >= D;
783
+ const m = k.current.getBoundingClientRect(), D = 8, q = 280, K = 340, X = m.left + q > window.innerWidth - D, oe = m.right - q >= D, de = m.bottom + 8 + K > window.innerHeight - D, x = m.top - 8 - K >= D;
784
784
  y({
785
- horizontal: Z && ae ? "right" : "left",
785
+ horizontal: X && oe ? "right" : "left",
786
786
  vertical: de && x ? "top" : "bottom"
787
787
  });
788
788
  }, [s, f]), H(() => {
@@ -813,7 +813,7 @@ function eo({
813
813
  const D = Ct(v, b, m);
814
814
  n && D < n || (r(D), s && p(!1));
815
815
  }
816
- const V = {
816
+ const Z = {
817
817
  background: "none",
818
818
  border: "none",
819
819
  cursor: "pointer",
@@ -850,7 +850,7 @@ function eo({
850
850
  {
851
851
  type: "button",
852
852
  onClick: j,
853
- style: V,
853
+ style: Z,
854
854
  title: "Mes anterior",
855
855
  children: /* @__PURE__ */ t(qe, { size: 16 })
856
856
  }
@@ -888,7 +888,7 @@ function eo({
888
888
  {
889
889
  type: "button",
890
890
  onClick: M,
891
- style: V,
891
+ style: Z,
892
892
  title: "Mes siguiente",
893
893
  children: /* @__PURE__ */ t(Ie, { size: 16 })
894
894
  }
@@ -899,7 +899,7 @@ function eo({
899
899
  {
900
900
  type: "button",
901
901
  onClick: () => w((m) => m - I),
902
- style: V,
902
+ style: Z,
903
903
  children: /* @__PURE__ */ t(qe, { size: 16 })
904
904
  }
905
905
  ),
@@ -919,9 +919,9 @@ function eo({
919
919
  padding: "2px 6px"
920
920
  },
921
921
  children: [
922
- A[0],
922
+ T[0],
923
923
  " – ",
924
- A[A.length - 1]
924
+ T[T.length - 1]
925
925
  ]
926
926
  }
927
927
  ),
@@ -930,7 +930,7 @@ function eo({
930
930
  {
931
931
  type: "button",
932
932
  onClick: () => w((m) => m + I),
933
- style: V,
933
+ style: Z,
934
934
  children: /* @__PURE__ */ t(Ie, { size: 16 })
935
935
  }
936
936
  )
@@ -985,7 +985,7 @@ function eo({
985
985
  gridTemplateColumns: "repeat(4,1fr)",
986
986
  gap: 3
987
987
  },
988
- children: A.map((m) => {
988
+ children: T.map((m) => {
989
989
  const D = m === v;
990
990
  return /* @__PURE__ */ t(
991
991
  "button",
@@ -1023,7 +1023,7 @@ function eo({
1023
1023
  gridTemplateColumns: "repeat(7,1fr)",
1024
1024
  padding: "6px 8px 0"
1025
1025
  },
1026
- children: An.map((m) => /* @__PURE__ */ t(
1026
+ children: Tn.map((m) => /* @__PURE__ */ t(
1027
1027
  "div",
1028
1028
  {
1029
1029
  style: {
@@ -1053,24 +1053,24 @@ function eo({
1053
1053
  children: W.map((m, D) => {
1054
1054
  if (m === null)
1055
1055
  return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } }, D);
1056
- const q = Ct(v, b, m), X = q === e, Z = q === i, ae = !!(n && q < n);
1056
+ const q = Ct(v, b, m), K = q === e, X = q === i, oe = !!(n && q < n);
1057
1057
  return /* @__PURE__ */ t(
1058
1058
  "button",
1059
1059
  {
1060
1060
  type: "button",
1061
- onClick: () => !ae && F(m),
1061
+ onClick: () => !oe && F(m),
1062
1062
  style: {
1063
1063
  width: "100%",
1064
1064
  aspectRatio: "1",
1065
1065
  borderRadius: 6,
1066
1066
  border: "none",
1067
- cursor: ae ? "not-allowed" : "pointer",
1067
+ cursor: oe ? "not-allowed" : "pointer",
1068
1068
  fontSize: 12,
1069
- fontWeight: X || Z ? 700 : 400,
1070
- background: X ? "var(--primary)" : "transparent",
1071
- color: X ? "var(--primary-fg, #ffffff)" : ae ? "var(--text-muted)" : "var(--text-main)",
1072
- opacity: ae ? 0.4 : 1,
1073
- outline: Z && !X ? "2px solid var(--primary)" : "none",
1069
+ fontWeight: K || X ? 700 : 400,
1070
+ background: K ? "var(--primary)" : "transparent",
1071
+ color: K ? "var(--primary-fg, #ffffff)" : oe ? "var(--text-muted)" : "var(--text-main)",
1072
+ opacity: oe ? 0.4 : 1,
1073
+ outline: X && !K ? "2px solid var(--primary)" : "none",
1074
1074
  outlineOffset: "-2px"
1075
1075
  },
1076
1076
  children: m
@@ -1198,7 +1198,7 @@ function pr({
1198
1198
  type: u = "button",
1199
1199
  ...b
1200
1200
  }) {
1201
- const [h, C] = T(!1), _ = J(null);
1201
+ const [h, C] = A(!1), _ = J(null);
1202
1202
  H(() => () => {
1203
1203
  _.current && window.clearTimeout(_.current);
1204
1204
  }, []);
@@ -1208,7 +1208,7 @@ function pr({
1208
1208
  }, r);
1209
1209
  }
1210
1210
  async function B(w) {
1211
- var A;
1211
+ var T;
1212
1212
  if (s && w.stopPropagation(), v == null || v(w), w.defaultPrevented) return;
1213
1213
  const $ = jn(e);
1214
1214
  if ($)
@@ -1221,7 +1221,7 @@ function pr({
1221
1221
  p == null || p(M, $);
1222
1222
  return;
1223
1223
  }
1224
- (A = navigator.clipboard) != null && A.writeText || p == null || p(j, $);
1224
+ (T = navigator.clipboard) != null && T.writeText || p == null || p(j, $);
1225
1225
  }
1226
1226
  }
1227
1227
  return /* @__PURE__ */ o(
@@ -1326,7 +1326,7 @@ function ro({
1326
1326
  }
1327
1327
  );
1328
1328
  }
1329
- function Vt(e) {
1329
+ function Kt(e) {
1330
1330
  if (e !== void 0)
1331
1331
  return typeof e == "number" ? `${e}px` : e;
1332
1332
  }
@@ -1344,7 +1344,7 @@ function hr({
1344
1344
  searchable: k = !0,
1345
1345
  minOptionsForSearch: N = 6
1346
1346
  }) {
1347
- const [y, v] = T(!1), [u, b] = T(""), [h, C] = T(-1), [_, I] = T(!1), [B, w] = T({}), $ = J(null), A = J(null), j = J(null), M = J(null), E = k && n.length >= N, P = n.find((m) => m.value === e) ?? null, z = E && u.trim() ? n.filter(
1347
+ const [y, v] = A(!1), [u, b] = A(""), [h, C] = A(-1), [_, I] = A(!1), [B, w] = A({}), $ = J(null), T = J(null), j = J(null), M = J(null), E = k && n.length >= N, P = n.find((m) => m.value === e) ?? null, z = E && u.trim() ? n.filter(
1348
1348
  (m) => {
1349
1349
  var D;
1350
1350
  return m.label.toLowerCase().includes(u.toLowerCase()) || ((D = m.sublabel) == null ? void 0 : D.toLowerCase().includes(u.toLowerCase()));
@@ -1352,12 +1352,12 @@ function hr({
1352
1352
  ) : n, W = ve(() => {
1353
1353
  const m = $.current;
1354
1354
  if (!m) return;
1355
- const D = m.getBoundingClientRect(), q = E ? 272 : 212, X = window.innerHeight - D.bottom, Z = X < q && D.top > X;
1355
+ const D = m.getBoundingClientRect(), q = E ? 272 : 212, K = window.innerHeight - D.bottom, X = K < q && D.top > K;
1356
1356
  w({
1357
1357
  position: "fixed",
1358
1358
  left: D.left,
1359
- top: Z ? void 0 : D.bottom + 4,
1360
- bottom: Z ? window.innerHeight - D.top + 4 : void 0,
1359
+ top: X ? void 0 : D.bottom + 4,
1360
+ bottom: X ? window.innerHeight - D.top + 4 : void 0,
1361
1361
  width: D.width,
1362
1362
  zIndex: 9999
1363
1363
  });
@@ -1365,9 +1365,9 @@ function hr({
1365
1365
  H(() => I(!0), []), H(() => {
1366
1366
  if (!y) return;
1367
1367
  function m(D) {
1368
- var X, Z;
1368
+ var K, X;
1369
1369
  const q = D.target;
1370
- !((X = $.current) != null && X.contains(q)) && !((Z = A.current) != null && Z.contains(q)) && (v(!1), b(""));
1370
+ !((K = $.current) != null && K.contains(q)) && !((X = T.current) != null && X.contains(q)) && (v(!1), b(""));
1371
1371
  }
1372
1372
  return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
1373
1373
  }, [y]), H(() => {
@@ -1391,7 +1391,7 @@ function hr({
1391
1391
  },
1392
1392
  [r]
1393
1393
  );
1394
- function V(m) {
1394
+ function Z(m) {
1395
1395
  if (!y) {
1396
1396
  (m.key === "Enter" || m.key === " " || m.key === "ArrowDown") && (m.preventDefault(), v(!0));
1397
1397
  return;
@@ -1401,7 +1401,7 @@ function hr({
1401
1401
  const ne = /* @__PURE__ */ o(
1402
1402
  "div",
1403
1403
  {
1404
- ref: A,
1404
+ ref: T,
1405
1405
  className: "rounded-xl shadow-xl overflow-hidden",
1406
1406
  style: {
1407
1407
  ...B,
@@ -1416,7 +1416,7 @@ function hr({
1416
1416
  style: { borderBottom: "1px solid var(--border)" },
1417
1417
  children: [
1418
1418
  /* @__PURE__ */ t(
1419
- Ge,
1419
+ Ve,
1420
1420
  {
1421
1421
  className: "w-3.5 h-3.5 flex-shrink-0",
1422
1422
  style: { color: "var(--text-muted)" }
@@ -1486,22 +1486,22 @@ function hr({
1486
1486
  }
1487
1487
  ),
1488
1488
  z.map((m, D) => {
1489
- const X = D === h, Z = m.value === e;
1489
+ const K = D === h, X = m.value === e;
1490
1490
  return /* @__PURE__ */ o(
1491
1491
  "li",
1492
1492
  {
1493
1493
  role: "option",
1494
- "aria-selected": Z,
1495
- onMouseDown: (ae) => {
1496
- ae.preventDefault(), m.disabled || F(m.value);
1494
+ "aria-selected": X,
1495
+ onMouseDown: (oe) => {
1496
+ oe.preventDefault(), m.disabled || F(m.value);
1497
1497
  },
1498
1498
  onMouseEnter: () => !m.disabled && C(D),
1499
1499
  className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
1500
1500
  style: {
1501
- background: X ? "var(--bg-hover)" : Z ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
1501
+ background: K ? "var(--bg-hover)" : X ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
1502
1502
  color: m.disabled ? "var(--text-muted)" : "var(--text-main)",
1503
1503
  cursor: m.disabled ? "not-allowed" : "pointer",
1504
- boxShadow: Z ? "inset 2px 0 0 var(--primary)" : void 0
1504
+ boxShadow: X ? "inset 2px 0 0 var(--primary)" : void 0
1505
1505
  },
1506
1506
  children: [
1507
1507
  m.color && /* @__PURE__ */ t(
@@ -1555,7 +1555,7 @@ function hr({
1555
1555
  ref: $,
1556
1556
  className: `relative ${d || "w-full"}`,
1557
1557
  style: s,
1558
- onKeyDown: V,
1558
+ onKeyDown: Z,
1559
1559
  children: [
1560
1560
  /* @__PURE__ */ o(
1561
1561
  "button",
@@ -1565,8 +1565,8 @@ function hr({
1565
1565
  onClick: () => !c && v((m) => !m),
1566
1566
  className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
1567
1567
  style: {
1568
- height: Vt(f),
1569
- padding: Vt(p),
1568
+ height: Kt(f),
1569
+ padding: Kt(p),
1570
1570
  background: "var(--bg-input)",
1571
1571
  color: P ? "var(--text-main)" : "var(--text-muted)",
1572
1572
  border: y ? "1px solid var(--primary)" : "1px solid var(--border)",
@@ -1639,7 +1639,7 @@ function no({
1639
1639
  }) {
1640
1640
  return /* @__PURE__ */ o("div", { className: `relative ${a}`, children: [
1641
1641
  /* @__PURE__ */ t(
1642
- Ge,
1642
+ Ve,
1643
1643
  {
1644
1644
  className: "absolute top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)] pointer-events-none",
1645
1645
  style: { left: st(d) }
@@ -1730,7 +1730,7 @@ function Rn({
1730
1730
  ariaLabel: I,
1731
1731
  frameless: B = !1
1732
1732
  }) {
1733
- const [w, $] = T(!1), [A, j] = T(!1), M = J(null);
1733
+ const [w, $] = A(!1), [T, j] = A(!1), M = J(null);
1734
1734
  if (H(() => (e ? (M.current && clearTimeout(M.current), $(!0), requestAnimationFrame(() => requestAnimationFrame(() => j(!0)))) : (j(!1), M.current = setTimeout(
1735
1735
  () => $(!1),
1736
1736
  it + 40
@@ -1743,12 +1743,12 @@ function Rn({
1743
1743
  };
1744
1744
  }, [e]), H(() => {
1745
1745
  if (!e || !y) return;
1746
- const V = (ne) => {
1746
+ const Z = (ne) => {
1747
1747
  ne.key === "Escape" && r();
1748
1748
  };
1749
- return window.addEventListener("keydown", V), () => window.removeEventListener("keydown", V);
1749
+ return window.addEventListener("keydown", Z), () => window.removeEventListener("keydown", Z);
1750
1750
  }, [y, r, e]), !w) return null;
1751
- const E = n || a || i || c || v, P = p ?? Pn[f], z = u === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", W = u === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", F = A ? "translateY(0) scale(1)" : u === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
1751
+ const E = n || a || i || c || v, P = p ?? Pn[f], z = u === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", W = u === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", F = T ? "translateY(0) scale(1)" : u === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
1752
1752
  return Pe(
1753
1753
  /* @__PURE__ */ o(
1754
1754
  "div",
@@ -1765,7 +1765,7 @@ function Rn({
1765
1765
  className: `absolute inset-0 ${C}`,
1766
1766
  onClick: N ? r : void 0,
1767
1767
  style: {
1768
- opacity: A ? 1 : 0,
1768
+ opacity: T ? 1 : 0,
1769
1769
  transition: `opacity ${it}ms ease`
1770
1770
  }
1771
1771
  }
@@ -1778,11 +1778,11 @@ function Rn({
1778
1778
  maxWidth: P,
1779
1779
  background: B ? "transparent" : "var(--bg-card)",
1780
1780
  border: B ? "none" : "1px solid var(--border)",
1781
- opacity: A ? 1 : 0,
1781
+ opacity: T ? 1 : 0,
1782
1782
  transform: F,
1783
1783
  transition: `opacity ${it}ms ease, transform ${it}ms ease`
1784
1784
  },
1785
- onClick: (V) => V.stopPropagation(),
1785
+ onClick: (Z) => Z.stopPropagation(),
1786
1786
  children: [
1787
1787
  E && /* @__PURE__ */ o(
1788
1788
  "div",
@@ -2046,7 +2046,7 @@ function so({
2046
2046
  pageSizeSelectPadding: B = "0 7px",
2047
2047
  totalRows: w,
2048
2048
  page: $,
2049
- onPageChange: A,
2049
+ onPageChange: T,
2050
2050
  onPageSizeChange: j,
2051
2051
  storageKey: M,
2052
2052
  stickyFirstColumn: E = !1,
@@ -2054,29 +2054,29 @@ function so({
2054
2054
  compact: z = !0,
2055
2055
  restrictHeight: W = !0,
2056
2056
  minTableWidth: F,
2057
- enableColumnVisibility: V = !0,
2057
+ enableColumnVisibility: Z = !0,
2058
2058
  hiddenColumnKeys: ne,
2059
2059
  defaultHiddenColumnKeys: m = Fn,
2060
2060
  onHiddenColumnKeysChange: D,
2061
2061
  columnVisibilityLabel: q = "Columnas"
2062
2062
  }) {
2063
- const X = e.map((l) => l.key).join(","), [Z, ae] = T(!M), de = J(null), x = J(!M), G = ne !== void 0, [he, te] = T(() => ze(m, e)), Q = ze(
2064
- G ? ne : he,
2063
+ const K = e.map((l) => l.key).join(","), [X, oe] = A(!M), de = J(null), x = J(!M), V = ne !== void 0, [he, te] = A(() => ze(m, e)), Q = ze(
2064
+ V ? ne : he,
2065
2065
  e
2066
- ), [O, K] = T(!1), [ee, se] = T(
2066
+ ), [O, G] = A(!1), [ee, se] = A(
2067
2067
  null
2068
- ), [be, Y] = T(
2068
+ ), [be, Y] = A(
2069
2069
  {}
2070
- ), $e = J(null), Be = J(null), [Ke, Re] = T(
2070
+ ), $e = J(null), Be = J(null), [Ge, Re] = A(
2071
2071
  r.length > 0 || a || s === !1
2072
- ), Ve = (l, g) => 50 + (l * 17 + g * 13 + 7) % 40, oe = J(null), [_e, et] = T(
2072
+ ), Ke = (l, g) => 50 + (l * 17 + g * 13 + 7) % 40, ie = J(null), [_e, et] = A(
2073
2073
  void 0
2074
- ), [He, tt] = T(!1);
2074
+ ), [He, tt] = A(!1);
2075
2075
  H(() => {
2076
2076
  const g = h !== !1 ? 32 : 0, S = 12;
2077
2077
  function R() {
2078
- if (tt(window.innerWidth < 640), !oe.current) return;
2079
- const U = oe.current.getBoundingClientRect().top;
2078
+ if (tt(window.innerWidth < 640), !ie.current) return;
2079
+ const U = ie.current.getBoundingClientRect().top;
2080
2080
  et(
2081
2081
  Math.max(
2082
2082
  120,
@@ -2090,15 +2090,15 @@ function so({
2090
2090
  Re(!0);
2091
2091
  return;
2092
2092
  }
2093
- if (Ke) return;
2093
+ if (Ge) return;
2094
2094
  const l = window.setTimeout(() => {
2095
2095
  Re(!0);
2096
2096
  }, s);
2097
2097
  return () => window.clearTimeout(l);
2098
- }, [r.length, s, Ke, a]);
2099
- const [Ee, Me] = T(
2098
+ }, [r.length, s, Ge, a]);
2099
+ const [Ee, Me] = A(
2100
2100
  () => e.map((l) => l.key)
2101
- ), [L, le] = T(
2101
+ ), [L, le] = A(
2102
2102
  () => Object.fromEntries(
2103
2103
  e.map((l) => [l.key, Oe(l, Ze(l.width))])
2104
2104
  )
@@ -2106,30 +2106,30 @@ function so({
2106
2106
  H(() => {
2107
2107
  const l = e.map((S) => S.key);
2108
2108
  if (!M) {
2109
- Me(l), G || te(
2109
+ Me(l), V || te(
2110
2110
  ze(m, e)
2111
- ), x.current = !1, ae(!0);
2111
+ ), x.current = !1, oe(!0);
2112
2112
  return;
2113
2113
  }
2114
2114
  let g = !1;
2115
- return x.current = !1, ae(!1), fetch(
2115
+ return x.current = !1, oe(!1), fetch(
2116
2116
  `/api/user/preferences/datatables?key=${encodeURIComponent(M)}`,
2117
2117
  { cache: "no-store" }
2118
2118
  ).then((S) => S.ok ? S.json() : null).then((S) => {
2119
2119
  var ot, Rt, _t;
2120
2120
  if (g) return;
2121
- const R = (ot = S == null ? void 0 : S.settings) == null ? void 0 : ot.columnOrder, U = Array.isArray(R) ? R.filter((ge) => l.includes(ge)) : [], ie = l.filter((ge) => !U.includes(ge)), ce = U.length > 0 ? [...U, ...ie] : l, Te = Object.fromEntries(
2121
+ const R = (ot = S == null ? void 0 : S.settings) == null ? void 0 : ot.columnOrder, U = Array.isArray(R) ? R.filter((ge) => l.includes(ge)) : [], ae = l.filter((ge) => !U.includes(ge)), ce = U.length > 0 ? [...U, ...ae] : l, Ae = Object.fromEntries(
2122
2122
  e.map((ge) => [ge.key, Oe(ge, Ze(ge.width))])
2123
2123
  ), re = ((Rt = S == null ? void 0 : S.settings) == null ? void 0 : Rt.columnWidths) ?? {}, fe = Object.fromEntries(
2124
2124
  e.map((ge) => [
2125
2125
  ge.key,
2126
- Oe(ge, re[ge.key] ?? Te[ge.key])
2126
+ Oe(ge, re[ge.key] ?? Ae[ge.key])
2127
2127
  ])
2128
2128
  ), at = ze(
2129
2129
  ((_t = S == null ? void 0 : S.settings) == null ? void 0 : _t.hiddenColumnKeys) ?? m,
2130
2130
  e
2131
2131
  );
2132
- Me(ce), le(fe), G || te(at), de.current = JSON.stringify({
2132
+ Me(ce), le(fe), V || te(at), de.current = JSON.stringify({
2133
2133
  columnOrder: ce,
2134
2134
  columnWidths: fe,
2135
2135
  hiddenColumnKeys: at
@@ -2148,25 +2148,25 @@ function so({
2148
2148
  m,
2149
2149
  e
2150
2150
  );
2151
- G || te(R), de.current = JSON.stringify({
2151
+ V || te(R), de.current = JSON.stringify({
2152
2152
  columnOrder: l,
2153
2153
  columnWidths: S,
2154
2154
  hiddenColumnKeys: R
2155
2155
  }), x.current = !0;
2156
2156
  }
2157
2157
  }).finally(() => {
2158
- g || ae(!0);
2158
+ g || oe(!0);
2159
2159
  }), () => {
2160
2160
  g = !0;
2161
2161
  };
2162
2162
  }, [
2163
2163
  M,
2164
- X,
2164
+ K,
2165
2165
  e,
2166
2166
  m,
2167
- G
2167
+ V
2168
2168
  ]), H(() => {
2169
- if (!M || !Z || !x.current) return;
2169
+ if (!M || !X || !x.current) return;
2170
2170
  const l = {
2171
2171
  columnOrder: Ee,
2172
2172
  columnWidths: L,
@@ -2184,18 +2184,18 @@ function so({
2184
2184
  });
2185
2185
  }, 300);
2186
2186
  return () => window.clearTimeout(S);
2187
- }, [Ee, L, Q, M, Z]), H(() => {
2187
+ }, [Ee, L, Q, M, X]), H(() => {
2188
2188
  Me((l) => {
2189
2189
  const g = e.map((U) => U.key), S = l.filter((U) => g.includes(U)), R = g.filter((U) => !S.includes(U));
2190
2190
  return [...S, ...R];
2191
2191
  });
2192
- }, [X, e]);
2192
+ }, [K, e]);
2193
2193
  const ue = Ee.map((l) => e.find((g) => g.key === l)).filter((l) => !!l), xe = ue.filter(
2194
2194
  (l) => !Q.includes(l.key)
2195
2195
  );
2196
2196
  function me(l) {
2197
2197
  const g = ze(l, e);
2198
- G || te(g), D == null || D(g);
2198
+ V || te(g), D == null || D(g);
2199
2199
  }
2200
2200
  function Xe(l) {
2201
2201
  me(
@@ -2211,12 +2211,12 @@ function so({
2211
2211
  const g = l.getBoundingClientRect(), S = 256, R = Math.min(
2212
2212
  Math.max(8, g.right - S),
2213
2213
  window.innerWidth - S - 8
2214
- ), U = window.innerHeight - g.bottom, ie = U < 288 && g.top > U ? void 0 : g.bottom + 6, ce = ie === void 0 ? window.innerHeight - g.top + 6 : void 0;
2214
+ ), U = window.innerHeight - g.bottom, ae = U < 288 && g.top > U ? void 0 : g.bottom + 6, ce = ae === void 0 ? window.innerHeight - g.top + 6 : void 0;
2215
2215
  Y({
2216
2216
  position: "fixed",
2217
2217
  zIndex: 9999,
2218
2218
  left: R,
2219
- top: ie,
2219
+ top: ae,
2220
2220
  bottom: ce,
2221
2221
  width: S
2222
2222
  });
@@ -2227,10 +2227,10 @@ function so({
2227
2227
  l.preventDefault(), l.stopPropagation();
2228
2228
  const S = Be.current === l.currentTarget && ee === g;
2229
2229
  if (O && S) {
2230
- K(!1), se(null);
2230
+ G(!1), se(null);
2231
2231
  return;
2232
2232
  }
2233
- Be.current = l.currentTarget, se(g), ut(l.currentTarget), K(!0);
2233
+ Be.current = l.currentTarget, se(g), ut(l.currentTarget), G(!0);
2234
2234
  }
2235
2235
  H(() => {
2236
2236
  le((l) => {
@@ -2244,18 +2244,18 @@ function so({
2244
2244
  ])
2245
2245
  );
2246
2246
  });
2247
- }, [X, e]), H(() => {
2248
- G || te(
2247
+ }, [K, e]), H(() => {
2248
+ V || te(
2249
2249
  (l) => ze(l, e)
2250
2250
  );
2251
- }, [X, e, G]), H(() => {
2251
+ }, [K, e, V]), H(() => {
2252
2252
  function l(R) {
2253
- var ie, ce;
2253
+ var ae, ce;
2254
2254
  const U = R.target;
2255
- !((ie = $e.current) != null && ie.contains(U)) && !((ce = Be.current) != null && ce.contains(U)) && (K(!1), se(null));
2255
+ !((ae = $e.current) != null && ae.contains(U)) && !((ce = Be.current) != null && ce.contains(U)) && (G(!1), se(null));
2256
2256
  }
2257
2257
  function g(R) {
2258
- R.key === "Escape" && (K(!1), se(null));
2258
+ R.key === "Escape" && (G(!1), se(null));
2259
2259
  }
2260
2260
  function S() {
2261
2261
  ut();
@@ -2269,10 +2269,10 @@ function so({
2269
2269
  function l(S) {
2270
2270
  const R = rt.current;
2271
2271
  if (!R) return;
2272
- const U = S.clientX - R.startX, ie = e.find((ce) => ce.key === R.colKey);
2273
- ie && le((ce) => ({
2272
+ const U = S.clientX - R.startX, ae = e.find((ce) => ce.key === R.colKey);
2273
+ ae && le((ce) => ({
2274
2274
  ...ce,
2275
- [R.colKey]: Oe(ie, R.startWidth + U)
2275
+ [R.colKey]: Oe(ae, R.startWidth + U)
2276
2276
  }));
2277
2277
  }
2278
2278
  function g() {
@@ -2282,7 +2282,7 @@ function so({
2282
2282
  document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", g);
2283
2283
  };
2284
2284
  }, [e]);
2285
- const nt = J(null), [Dt, mt] = T(null);
2285
+ const nt = J(null), [Dt, mt] = A(null);
2286
2286
  function wr(l, g) {
2287
2287
  nt.current = Ee.indexOf(l), g.dataTransfer.effectAllowed = "move";
2288
2288
  }
@@ -2295,45 +2295,45 @@ function so({
2295
2295
  g.preventDefault();
2296
2296
  const S = nt.current, R = Ee.indexOf(l);
2297
2297
  S !== null && S !== R && Me((U) => {
2298
- const ie = [...U], [ce] = ie.splice(S, 1);
2299
- return ie.splice(R, 0, ce), ie;
2298
+ const ae = [...U], [ce] = ae.splice(S, 1);
2299
+ return ae.splice(R, 0, ce), ae;
2300
2300
  }), nt.current = null, mt(null);
2301
2301
  }
2302
2302
  function Sr() {
2303
2303
  nt.current = null, mt(null);
2304
2304
  }
2305
- const [we, Lt] = T(null);
2305
+ const [we, Lt] = A(null);
2306
2306
  function Cr(l) {
2307
2307
  l.sortKey && Lt(
2308
2308
  (g) => (g == null ? void 0 : g.key) === l.key ? { key: l.key, dir: g.dir === "asc" ? "desc" : "asc" } : { key: l.key, dir: "asc" }
2309
2309
  );
2310
2310
  }
2311
- const [$r, ft] = T(1), [Bt, Er] = T(
2311
+ const [$r, ft] = A(1), [Bt, Er] = A(
2312
2312
  h === !1 ? 0 : h
2313
2313
  );
2314
2314
  H(() => {
2315
2315
  ft(1);
2316
2316
  }, [r]);
2317
- const Fe = !!(A && j), Ae = h !== !1, Ne = Fe ? $ ?? 1 : $r, De = Fe || Ae ? Bt : r.length, Se = !!p && !!k && !!N, pt = Se ? 40 : 0, Mr = Se && r.length > 0 && p.size === r.length, Dr = Se && p.size > 0 && p.size < r.length, ht = ke.useMemo(() => {
2317
+ const Fe = !!(T && j), Te = h !== !1, Ne = Fe ? $ ?? 1 : $r, De = Fe || Te ? Bt : r.length, Se = !!p && !!k && !!N, pt = Se ? 40 : 0, Mr = Se && r.length > 0 && p.size === r.length, Dr = Se && p.size > 0 && p.size < r.length, ht = ke.useMemo(() => {
2318
2318
  if (!we) return r;
2319
2319
  const l = e.find((g) => g.key === we.key && g.sortKey);
2320
2320
  return l != null && l.sortKey ? [...r].sort((g, S) => {
2321
- const R = g[l.sortKey], U = S[l.sortKey], ie = R === U ? 0 : R == null ? 1 : U == null || R < U ? -1 : 1;
2322
- return we.dir === "asc" ? ie : -ie;
2321
+ const R = g[l.sortKey], U = S[l.sortKey], ae = R === U ? 0 : R == null ? 1 : U == null || R < U ? -1 : 1;
2322
+ return we.dir === "asc" ? ae : -ae;
2323
2323
  }) : r;
2324
- }, [r, we, e]), At = ke.useMemo(() => {
2325
- if (Fe || !Ae) return ht;
2324
+ }, [r, we, e]), Tt = ke.useMemo(() => {
2325
+ if (Fe || !Te) return ht;
2326
2326
  const l = (Ne - 1) * De;
2327
2327
  return ht.slice(l, l + De);
2328
- }, [ht, Fe, Ae, Ne, De]), Ue = w ?? r.length, bt = Ae ? Math.max(1, Math.ceil(Ue / De)) : 1, Lr = Ae && Ue > De, Br = Ae ? (Ne - 1) * De + 1 : 1, Ar = Ae ? Math.min(Ne * De, Ue) : Ue;
2328
+ }, [ht, Fe, Te, Ne, De]), Ue = w ?? r.length, bt = Te ? Math.max(1, Math.ceil(Ue / De)) : 1, Lr = Te && Ue > De, Br = Te ? (Ne - 1) * De + 1 : 1, Tr = Te ? Math.min(Ne * De, Ue) : Ue;
2329
2329
  function xt(l) {
2330
2330
  const g = Math.max(1, Math.min(l, bt));
2331
- Fe ? A(g) : ft(g);
2331
+ Fe ? T(g) : ft(g);
2332
2332
  }
2333
- function Tr(l) {
2334
- Er(l), Fe ? (j(l), A(1)) : ft(1), j && j(l);
2333
+ function Ar(l) {
2334
+ Er(l), Fe ? (j(l), T(1)) : ft(1), j && j(l);
2335
2335
  }
2336
- const Tt = (l) => l === "center" ? "text-center" : l === "right" ? "text-right" : "text-left", Or = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", zr = xe.length + (Se ? 1 : 0);
2336
+ const At = (l) => l === "center" ? "text-center" : l === "right" ? "text-right" : "text-left", Or = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", zr = xe.length + (Se ? 1 : 0);
2337
2337
  H(() => {
2338
2338
  we && Q.includes(we.key) && Lt(null);
2339
2339
  }, [Q, we]);
@@ -2379,11 +2379,11 @@ function so({
2379
2379
  }
2380
2380
  ),
2381
2381
  xe.map((l, g) => {
2382
- const S = (we == null ? void 0 : we.key) === l.key, R = !!l.sortKey, U = E && !He && g === 0, ie = Dt === g, Te = (L[l.key] ?? Ze(l.width)) < 120;
2382
+ const S = (we == null ? void 0 : we.key) === l.key, R = !!l.sortKey, U = E && !He && g === 0, ae = Dt === g, Ae = (L[l.key] ?? Ze(l.width)) < 120;
2383
2383
  return /* @__PURE__ */ o(
2384
2384
  "th",
2385
2385
  {
2386
- className: `group select-none ${Te ? "text-left" : Tt(l.align)}`,
2386
+ className: `group select-none ${Ae ? "text-left" : At(l.align)}`,
2387
2387
  style: {
2388
2388
  ...U ? {
2389
2389
  position: "sticky",
@@ -2402,10 +2402,9 @@ function so({
2402
2402
  color: S ? "var(--primary)" : "var(--text-muted)",
2403
2403
  whiteSpace: "nowrap",
2404
2404
  transition: "color 0.15s",
2405
- borderLeft: ie ? "2px solid var(--primary)" : "2px solid transparent",
2405
+ borderLeft: ae ? "2px solid var(--primary)" : "2px solid transparent",
2406
2406
  cursor: R ? "pointer" : "default",
2407
- // Padding: room for grip icon left, column menu and resize handle right.
2408
- padding: V ? z ? "5px 48px 5px 6px" : "7px 52px 7px 6px" : z ? "5px 24px 5px 6px" : "7px 28px 7px 6px"
2407
+ padding: z ? "5px 20px 5px 12px" : "7px 24px 7px 12px"
2409
2408
  },
2410
2409
  onDragOver: (re) => Nr(l.key, re),
2411
2410
  onDrop: (re) => kr(l.key, re),
@@ -2423,11 +2422,13 @@ function so({
2423
2422
  },
2424
2423
  onClick: (re) => re.stopPropagation(),
2425
2424
  title: "Arrastrar para reordenar",
2426
- className: "inline-flex items-center mr-1 opacity-0 group-hover:opacity-40 transition-opacity",
2425
+ className: `absolute left-2 top-1/2 inline-flex h-6 w-5 -translate-x-1/2 -translate-y-1/2 scale-90 items-center justify-center rounded-md border opacity-0 shadow-sm transition-[opacity,transform,background-color,border-color] duration-150 group-hover:scale-100 group-hover:opacity-100 ${ae ? "scale-100 opacity-100" : ""}`,
2427
2426
  style: {
2428
2427
  cursor: "grab",
2429
- color: "var(--text-muted)",
2430
- verticalAlign: "middle"
2428
+ color: ae ? "var(--primary)" : "var(--text-muted)",
2429
+ background: "var(--bg-card)",
2430
+ borderColor: ae ? "var(--primary)" : "var(--border)",
2431
+ zIndex: 5
2431
2432
  },
2432
2433
  children: /* @__PURE__ */ t(cn, { size: 15 })
2433
2434
  }
@@ -2437,8 +2438,8 @@ function so({
2437
2438
  {
2438
2439
  className: "inline-block max-w-full align-middle",
2439
2440
  style: {
2440
- width: V ? "calc(100% - 42px)" : "calc(100% - 22px)",
2441
- textAlign: Te ? "left" : l.align === "center" ? "center" : l.align === "right" ? "right" : "left"
2441
+ width: "100%",
2442
+ textAlign: Ae ? "left" : l.align === "center" ? "center" : l.align === "right" ? "right" : "left"
2442
2443
  },
2443
2444
  children: /* @__PURE__ */ o(
2444
2445
  "span",
@@ -2452,7 +2453,7 @@ function so({
2452
2453
  )
2453
2454
  }
2454
2455
  ),
2455
- V && /* @__PURE__ */ t(
2456
+ Z && /* @__PURE__ */ t(
2456
2457
  "button",
2457
2458
  {
2458
2459
  type: "button",
@@ -2461,8 +2462,13 @@ function so({
2461
2462
  "aria-label": q,
2462
2463
  title: q,
2463
2464
  onClick: (re) => yr(re, l.key),
2464
- className: `absolute top-1/2 right-3 inline-flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded-md opacity-0 transition-colors transition-opacity hover:bg-[var(--bg-card)] group-hover:opacity-100 focus:opacity-100 ${O && ee === l.key ? "opacity-100" : ""}`,
2465
- style: { color: "var(--text-muted)", zIndex: 4 },
2465
+ className: `absolute right-3 top-1/2 inline-flex h-6 w-6 -translate-y-1/2 scale-95 items-center justify-center rounded-md border opacity-0 shadow-sm transition-[opacity,transform,background-color,border-color] duration-150 hover:bg-[var(--bg-card)] group-hover:scale-100 group-hover:opacity-100 focus:scale-100 focus:opacity-100 ${O && ee === l.key ? "scale-100 opacity-100" : ""}`,
2466
+ style: {
2467
+ color: "var(--text-muted)",
2468
+ background: "var(--bg-card)",
2469
+ borderColor: "var(--border)",
2470
+ zIndex: 4
2471
+ },
2466
2472
  children: /* @__PURE__ */ t(Wr, { className: "h-4 w-4" })
2467
2473
  }
2468
2474
  ),
@@ -2480,8 +2486,8 @@ function so({
2480
2486
  }, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
2481
2487
  },
2482
2488
  onClick: (re) => re.stopPropagation(),
2483
- className: "absolute right-0 top-0 h-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",
2484
- style: { width: 12, cursor: "col-resize", zIndex: 3 },
2489
+ className: "absolute top-0 flex h-full items-center justify-center opacity-0 transition-opacity group-hover:opacity-100",
2490
+ style: { right: -6, width: 12, cursor: "col-resize", zIndex: 6 },
2485
2491
  children: /* @__PURE__ */ t(
2486
2492
  "span",
2487
2493
  {
@@ -2504,7 +2510,7 @@ function so({
2504
2510
  ]
2505
2511
  }
2506
2512
  ), It = () => {
2507
- if (!V || !O || typeof document > "u")
2513
+ if (!Z || !O || typeof document > "u")
2508
2514
  return null;
2509
2515
  const l = Q.length;
2510
2516
  return Pe(
@@ -2579,14 +2585,14 @@ function so({
2579
2585
  style: { borderColor: "var(--border)", background: "var(--bg-input)" },
2580
2586
  children: [
2581
2587
  /* @__PURE__ */ o("div", { className: "flex min-w-0 items-center gap-2", children: [
2582
- /* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Ue === 0 ? "0 filas" : `${Br}–${Ar} de ${Ue}` }),
2588
+ /* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Ue === 0 ? "0 filas" : `${Br}–${Tr} de ${Ue}` }),
2583
2589
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
2584
2590
  /* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: "Filas:" }),
2585
2591
  /* @__PURE__ */ t(
2586
2592
  hr,
2587
2593
  {
2588
2594
  value: String(De),
2589
- onChange: (g) => Tr(Number(g)),
2595
+ onChange: (g) => Ar(Number(g)),
2590
2596
  options: C.map((g) => ({
2591
2597
  value: String(g),
2592
2598
  label: String(g)
@@ -2658,7 +2664,7 @@ function so({
2658
2664
  children: /* @__PURE__ */ o(
2659
2665
  "div",
2660
2666
  {
2661
- ref: oe,
2667
+ ref: ie,
2662
2668
  className: "min-w-0 max-w-full",
2663
2669
  style: {
2664
2670
  maxHeight: W ? _e : void 0,
@@ -2693,7 +2699,7 @@ function so({
2693
2699
  className: "h-3.5 animate-pulse rounded-full",
2694
2700
  style: {
2695
2701
  background: "var(--border)",
2696
- width: `${Ve(g, R)}%`,
2702
+ width: `${Ke(g, R)}%`,
2697
2703
  minWidth: 32
2698
2704
  }
2699
2705
  },
@@ -2708,7 +2714,7 @@ function so({
2708
2714
  )
2709
2715
  }
2710
2716
  );
2711
- return M && !Z || !a && r.length === 0 && !Ke ? Pt() : a && r.length === 0 ? /* @__PURE__ */ o(
2717
+ return M && !X || !a && r.length === 0 && !Ge ? Pt() : a && r.length === 0 ? /* @__PURE__ */ o(
2712
2718
  "div",
2713
2719
  {
2714
2720
  className: "w-full min-w-0 max-w-full flex flex-col rounded-xl overflow-visible",
@@ -2718,7 +2724,7 @@ function so({
2718
2724
  /* @__PURE__ */ t(
2719
2725
  "div",
2720
2726
  {
2721
- ref: oe,
2727
+ ref: ie,
2722
2728
  className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
2723
2729
  children: /* @__PURE__ */ t(
2724
2730
  Yt,
@@ -2799,7 +2805,7 @@ function so({
2799
2805
  className: "h-3.5 rounded-full animate-pulse",
2800
2806
  style: {
2801
2807
  background: "var(--border)",
2802
- width: `${Ve(g, R)}%`,
2808
+ width: `${Ke(g, R)}%`,
2803
2809
  minWidth: 32
2804
2810
  }
2805
2811
  }
@@ -2836,7 +2842,7 @@ function so({
2836
2842
  background: "color-mix(in srgb, var(--primary) 8%, var(--bg-card))",
2837
2843
  color: "var(--primary)"
2838
2844
  },
2839
- children: c ?? /* @__PURE__ */ t(Ge, { className: "h-5 w-5" })
2845
+ children: c ?? /* @__PURE__ */ t(Ve, { className: "h-5 w-5" })
2840
2846
  }
2841
2847
  ),
2842
2848
  /* @__PURE__ */ t(
@@ -2860,7 +2866,7 @@ function so({
2860
2866
  /* @__PURE__ */ t(
2861
2867
  "div",
2862
2868
  {
2863
- ref: oe,
2869
+ ref: ie,
2864
2870
  className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
2865
2871
  children: /* @__PURE__ */ t(
2866
2872
  Yt,
@@ -2907,12 +2913,12 @@ function so({
2907
2913
  children: zt()
2908
2914
  }
2909
2915
  ),
2910
- /* @__PURE__ */ t("tbody", { children: At.map((l, g) => {
2916
+ /* @__PURE__ */ t("tbody", { children: Tt.map((l, g) => {
2911
2917
  const S = n(l), R = Ot(u == null ? void 0 : u(l)), U = g > 0 ? Ot(
2912
- u == null ? void 0 : u(At[g - 1])
2913
- ) : null, ie = R && R.key !== (U == null ? void 0 : U.key), ce = Se && p.has(S), Te = !!f, re = ce && y ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : g % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 50%, var(--bg-card))" : "var(--bg-card)";
2918
+ u == null ? void 0 : u(Tt[g - 1])
2919
+ ) : null, ae = R && R.key !== (U == null ? void 0 : U.key), ce = Se && p.has(S), Ae = !!f, re = ce && y ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : g % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 50%, var(--bg-card))" : "var(--bg-card)";
2914
2920
  return /* @__PURE__ */ o(ke.Fragment, { children: [
2915
- ie && /* @__PURE__ */ t("tr", { className: R.className ?? "", children: /* @__PURE__ */ t(
2921
+ ae && /* @__PURE__ */ t("tr", { className: R.className ?? "", children: /* @__PURE__ */ t(
2916
2922
  "td",
2917
2923
  {
2918
2924
  colSpan: zr,
@@ -2931,8 +2937,8 @@ function so({
2931
2937
  /* @__PURE__ */ o(
2932
2938
  "tr",
2933
2939
  {
2934
- onClick: Te ? () => f(l) : void 0,
2935
- className: `transition-colors ${Te ? "cursor-pointer" : ""} ${v ? v(l) : ""}`,
2940
+ onClick: Ae ? () => f(l) : void 0,
2941
+ className: `transition-colors ${Ae ? "cursor-pointer" : ""} ${v ? v(l) : ""}`,
2936
2942
  style: {
2937
2943
  "--dt-row-bg": re,
2938
2944
  "--dt-sticky-bg": re,
@@ -2988,7 +2994,7 @@ function so({
2988
2994
  return /* @__PURE__ */ t(
2989
2995
  "td",
2990
2996
  {
2991
- className: `${z ? "px-2 py-1.5" : "px-3 py-2"} ${Wn} ${Tt(fe.align)} ${fe.className ?? ""}`,
2997
+ className: `${z ? "px-2 py-1.5" : "px-3 py-2"} ${Wn} ${At(fe.align)} ${fe.className ?? ""}`,
2992
2998
  style: {
2993
2999
  overflow: "hidden",
2994
3000
  whiteSpace: "nowrap",
@@ -3118,7 +3124,7 @@ function lo({
3118
3124
  const p = {
3119
3125
  from: Je(e),
3120
3126
  to: Je(r)
3121
- }, k = Je(a), [N, y] = T(
3127
+ }, k = Je(a), [N, y] = A(
3122
3128
  Je(i || e)
3123
3129
  );
3124
3130
  return H(() => {
@@ -3291,7 +3297,7 @@ function lo({
3291
3297
  )
3292
3298
  ] });
3293
3299
  }
3294
- function Gn(e) {
3300
+ function Vn(e) {
3295
3301
  if (e !== void 0)
3296
3302
  return typeof e == "number" ? `${e}px` : e;
3297
3303
  }
@@ -3305,7 +3311,7 @@ function co({
3305
3311
  menuClassName: d = "",
3306
3312
  onOpenChange: s
3307
3313
  }) {
3308
- const [f, p] = T(!1), [k, N] = T(!1), [y, v] = T({}), u = J(null), b = J(null), h = ve(
3314
+ const [f, p] = A(!1), [k, N] = A(!1), [y, v] = A({}), u = J(null), b = J(null), h = ve(
3309
3315
  (w) => {
3310
3316
  p(w), s == null || s(w);
3311
3317
  },
@@ -3313,25 +3319,25 @@ function co({
3313
3319
  ), C = ve(() => {
3314
3320
  const w = u.current;
3315
3321
  if (!w) return;
3316
- const $ = w.getBoundingClientRect(), A = typeof a == "number" ? a : $.width, j = typeof a == "number" ? a : Math.max($.width, 180), M = n === "end" ? Math.max(8, $.right - j) : Math.min($.left, window.innerWidth - j - 8), E = window.innerHeight - $.bottom, P = E < 240 && $.top > E ? void 0 : $.bottom + 6, z = P === void 0 ? window.innerHeight - $.top + 6 : void 0;
3322
+ const $ = w.getBoundingClientRect(), T = typeof a == "number" ? a : $.width, j = typeof a == "number" ? a : Math.max($.width, 180), M = n === "end" ? Math.max(8, $.right - j) : Math.min($.left, window.innerWidth - j - 8), E = window.innerHeight - $.bottom, P = E < 240 && $.top > E ? void 0 : $.bottom + 6, z = P === void 0 ? window.innerHeight - $.top + 6 : void 0;
3317
3323
  v({
3318
3324
  position: "fixed",
3319
3325
  zIndex: 9999,
3320
3326
  left: M,
3321
3327
  top: P,
3322
3328
  bottom: z,
3323
- width: Gn(typeof a == "number" ? A : a)
3329
+ width: Vn(typeof a == "number" ? T : a)
3324
3330
  });
3325
3331
  }, [n, a]);
3326
3332
  H(() => N(!0), []), H(() => {
3327
3333
  if (!f) return;
3328
3334
  C();
3329
- const w = (A) => {
3335
+ const w = (T) => {
3330
3336
  var M, E;
3331
- const j = A.target;
3337
+ const j = T.target;
3332
3338
  !((M = u.current) != null && M.contains(j)) && !((E = b.current) != null && E.contains(j)) && h(!1);
3333
- }, $ = (A) => {
3334
- A.key === "Escape" && h(!1);
3339
+ }, $ = (T) => {
3340
+ T.key === "Escape" && h(!1);
3335
3341
  };
3336
3342
  return document.addEventListener("mousedown", w), window.addEventListener("keydown", $), window.addEventListener("resize", C), window.addEventListener("scroll", C, !0), () => {
3337
3343
  document.removeEventListener("mousedown", w), window.removeEventListener("keydown", $), window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
@@ -3393,7 +3399,7 @@ function co({
3393
3399
  }
3394
3400
  );
3395
3401
  }
3396
- const Kn = 180;
3402
+ const Gn = 180;
3397
3403
  function uo({
3398
3404
  open: e,
3399
3405
  onClose: r,
@@ -3415,14 +3421,14 @@ function uo({
3415
3421
  onDiscardChanges: C,
3416
3422
  children: _
3417
3423
  }) {
3418
- const [I, B] = T(!1), [w, $] = T(!1), [A, j] = T(!1), M = ve(() => {
3424
+ const [I, B] = A(!1), [w, $] = A(!1), [T, j] = A(!1), M = ve(() => {
3419
3425
  $(!0), requestAnimationFrame(() => {
3420
3426
  requestAnimationFrame(() => j(!0));
3421
3427
  });
3422
3428
  }, []), E = ve(() => {
3423
3429
  j(!1), window.setTimeout(
3424
3430
  () => $(!1),
3425
- Kn
3431
+ Gn
3426
3432
  );
3427
3433
  }, []), P = ve(() => {
3428
3434
  if (y) {
@@ -3546,14 +3552,14 @@ function uo({
3546
3552
  /* @__PURE__ */ t(
3547
3553
  "div",
3548
3554
  {
3549
- className: `absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-200 ease-out ${A ? "opacity-100" : "opacity-0"}`,
3555
+ className: `absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-200 ease-out ${T ? "opacity-100" : "opacity-0"}`,
3550
3556
  onClick: E
3551
3557
  }
3552
3558
  ),
3553
3559
  /* @__PURE__ */ o(
3554
3560
  "div",
3555
3561
  {
3556
- className: `relative z-10 w-full max-w-sm rounded-2xl border p-6 shadow-2xl transition-[opacity,transform] duration-200 ease-out ${A ? "translate-y-0 scale-100 opacity-100" : "translate-y-2 scale-[0.96] opacity-0"}`,
3562
+ className: `relative z-10 w-full max-w-sm rounded-2xl border p-6 shadow-2xl transition-[opacity,transform] duration-200 ease-out ${T ? "translate-y-0 scale-100 opacity-100" : "translate-y-2 scale-[0.96] opacity-0"}`,
3557
3563
  style: {
3558
3564
  background: "var(--bg-card, #ffffff)",
3559
3565
  borderColor: "var(--border, #d8e1dc)"
@@ -3643,7 +3649,7 @@ function uo({
3643
3649
  document.body
3644
3650
  ) : null;
3645
3651
  }
3646
- const Vn = {
3652
+ const Kn = {
3647
3653
  sm: "min-h-[160px] p-4",
3648
3654
  md: "min-h-[220px] p-6",
3649
3655
  lg: "min-h-[300px] p-8"
@@ -3660,7 +3666,7 @@ function mo({
3660
3666
  return /* @__PURE__ */ t(
3661
3667
  "div",
3662
3668
  {
3663
- className: `flex items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] text-center ${Vn[c]} ${d}`,
3669
+ className: `flex items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] text-center ${Kn[c]} ${d}`,
3664
3670
  children: /* @__PURE__ */ o("div", { className: "flex max-w-sm flex-col items-center gap-3", children: [
3665
3671
  n && /* @__PURE__ */ t("div", { className: "flex h-10 w-10 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-input)] text-[var(--text-muted)]", children: n }),
3666
3672
  /* @__PURE__ */ o("div", { className: "space-y-1", children: [
@@ -3830,18 +3836,18 @@ function fo({
3830
3836
  required: f,
3831
3837
  ...p
3832
3838
  }) {
3833
- const [k, N] = T(() => !!p.autoFocus), [y, v] = T(!1), u = p.type === "password" && d, b = u && y ? "text" : p.type, h = p.value !== void 0 ? String(p.value).length > 0 : p.defaultValue !== void 0 && String(p.defaultValue).length > 0, C = k || h, _ = {
3839
+ const [k, N] = A(() => !!p.autoFocus), [y, v] = A(!1), u = p.type === "password" && d, b = u && y ? "text" : p.type, h = p.value !== void 0 ? String(p.value).length > 0 : p.defaultValue !== void 0 && String(p.defaultValue).length > 0, C = k || h, _ = {
3834
3840
  top: C ? 7 : 12,
3835
3841
  color: k ? "var(--primary)" : "var(--text-muted)",
3836
3842
  fontSize: C ? 10 : 13,
3837
3843
  fontWeight: C ? 600 : 400,
3838
3844
  textTransform: C ? "uppercase" : "none"
3839
3845
  }, I = ($) => {
3840
- var A;
3841
- N(!0), (A = p.onFocus) == null || A.call(p, $);
3846
+ var T;
3847
+ N(!0), (T = p.onFocus) == null || T.call(p, $);
3842
3848
  }, B = ($) => {
3843
- var A;
3844
- N(!1), (A = p.onBlur) == null || A.call(p, $);
3849
+ var T;
3850
+ N(!1), (T = p.onBlur) == null || T.call(p, $);
3845
3851
  }, w = u ? /* @__PURE__ */ o(
3846
3852
  "button",
3847
3853
  {
@@ -3964,27 +3970,27 @@ function po({
3964
3970
  emptyText: y = "Sin resultados",
3965
3971
  clearLabel: v = "Limpiar seleccion"
3966
3972
  }) {
3967
- const [u, b] = T(!1), [h, C] = T(""), [_, I] = T(0), [B, w] = T(!1), [$, A] = T({}), j = J(null), M = J(null), E = J(null), P = J(null), z = p && n.length >= k, W = je(() => new Set(e), [e]), F = je(
3973
+ const [u, b] = A(!1), [h, C] = A(""), [_, I] = A(0), [B, w] = A(!1), [$, T] = A({}), j = J(null), M = J(null), E = J(null), P = J(null), z = p && n.length >= k, W = je(() => new Set(e), [e]), F = je(
3968
3974
  () => n.filter((x) => W.has(x.value)),
3969
3975
  [n, W]
3970
- ), V = F.slice(0, N), ne = Math.max(
3976
+ ), Z = F.slice(0, N), ne = Math.max(
3971
3977
  0,
3972
- F.length - V.length
3978
+ F.length - Z.length
3973
3979
  ), m = z && h.trim() ? n.filter(
3974
3980
  (x) => {
3975
- var G;
3976
- return x.label.toLowerCase().includes(h.toLowerCase()) || ((G = x.sublabel) == null ? void 0 : G.toLowerCase().includes(h.toLowerCase()));
3981
+ var V;
3982
+ return x.label.toLowerCase().includes(h.toLowerCase()) || ((V = x.sublabel) == null ? void 0 : V.toLowerCase().includes(h.toLowerCase()));
3977
3983
  }
3978
3984
  ) : n, D = ve(() => {
3979
3985
  const x = j.current;
3980
3986
  if (!x) return;
3981
- const G = x.getBoundingClientRect(), he = z ? 304 : 244, te = window.innerHeight - G.bottom, Q = te < he && G.top > te;
3982
- A({
3987
+ const V = x.getBoundingClientRect(), he = z ? 304 : 244, te = window.innerHeight - V.bottom, Q = te < he && V.top > te;
3988
+ T({
3983
3989
  position: "fixed",
3984
- left: G.left,
3985
- top: Q ? void 0 : G.bottom + 4,
3986
- bottom: Q ? window.innerHeight - G.top + 4 : void 0,
3987
- width: G.width,
3990
+ left: V.left,
3991
+ top: Q ? void 0 : V.bottom + 4,
3992
+ bottom: Q ? window.innerHeight - V.top + 4 : void 0,
3993
+ width: V.width,
3988
3994
  zIndex: 9999
3989
3995
  });
3990
3996
  }, [z]), q = ve(
@@ -3992,20 +3998,20 @@ function po({
3992
3998
  ia(e, x) || r(x);
3993
3999
  },
3994
4000
  [r, e]
3995
- ), X = ve(
4001
+ ), K = ve(
3996
4002
  (x) => {
3997
- const G = n.find((te) => te.value === x);
3998
- if (G != null && G.disabled) return;
4003
+ const V = n.find((te) => te.value === x);
4004
+ if (V != null && V.disabled) return;
3999
4005
  const he = W.has(x) ? e.filter((te) => te !== x) : [...e, x];
4000
4006
  q(he);
4001
4007
  },
4002
4008
  [q, n, e, W]
4003
- ), Z = ve(() => q([]), [q]);
4009
+ ), X = ve(() => q([]), [q]);
4004
4010
  H(() => w(!0), []), H(() => {
4005
4011
  if (!u) return;
4006
- function x(G) {
4012
+ function x(V) {
4007
4013
  var te, Q;
4008
- const he = G.target;
4014
+ const he = V.target;
4009
4015
  !((te = j.current) != null && te.contains(he)) && !((Q = M.current) != null && Q.contains(he)) && (b(!1), C(""));
4010
4016
  }
4011
4017
  return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
@@ -4024,12 +4030,12 @@ function po({
4024
4030
  const x = P.current.children[_];
4025
4031
  x == null || x.scrollIntoView({ block: "nearest" });
4026
4032
  }, [_]);
4027
- function ae(x) {
4033
+ function oe(x) {
4028
4034
  if (!u) {
4029
4035
  (x.key === "Enter" || x.key === " " || x.key === "ArrowDown") && (x.preventDefault(), b(!0));
4030
4036
  return;
4031
4037
  }
4032
- x.key === "Escape" && (x.preventDefault(), b(!1), C("")), x.key === "ArrowDown" && (x.preventDefault(), I((G) => Math.min(G + 1, m.length - 1))), x.key === "ArrowUp" && (x.preventDefault(), I((G) => Math.max(G - 1, 0))), x.key === "Enter" && m[_] && (x.preventDefault(), X(m[_].value)), x.key === "Backspace" && !h && e.length && (x.preventDefault(), q(e.slice(0, -1)));
4038
+ x.key === "Escape" && (x.preventDefault(), b(!1), C("")), x.key === "ArrowDown" && (x.preventDefault(), I((V) => Math.min(V + 1, m.length - 1))), x.key === "ArrowUp" && (x.preventDefault(), I((V) => Math.max(V - 1, 0))), x.key === "Enter" && m[_] && (x.preventDefault(), K(m[_].value)), x.key === "Backspace" && !h && e.length && (x.preventDefault(), q(e.slice(0, -1)));
4033
4039
  }
4034
4040
  const de = /* @__PURE__ */ o(
4035
4041
  "div",
@@ -4049,7 +4055,7 @@ function po({
4049
4055
  style: { borderBottom: "1px solid var(--border)" },
4050
4056
  children: [
4051
4057
  /* @__PURE__ */ t(
4052
- Ge,
4058
+ Ve,
4053
4059
  {
4054
4060
  className: "h-3.5 w-3.5 flex-shrink-0",
4055
4061
  style: { color: "var(--text-muted)" }
@@ -4105,7 +4111,7 @@ function po({
4105
4111
  {
4106
4112
  type: "button",
4107
4113
  onMouseDown: (x) => {
4108
- x.preventDefault(), Z();
4114
+ x.preventDefault(), X();
4109
4115
  },
4110
4116
  className: "font-semibold transition-colors hover:text-[var(--primary)]",
4111
4117
  children: v
@@ -4128,17 +4134,17 @@ function po({
4128
4134
  overscrollBehavior: "contain"
4129
4135
  },
4130
4136
  children: [
4131
- m.map((x, G) => {
4132
- const he = G === _, te = W.has(x.value);
4137
+ m.map((x, V) => {
4138
+ const he = V === _, te = W.has(x.value);
4133
4139
  return /* @__PURE__ */ o(
4134
4140
  "li",
4135
4141
  {
4136
4142
  role: "option",
4137
4143
  "aria-selected": te,
4138
4144
  onMouseDown: (Q) => {
4139
- Q.preventDefault(), X(x.value);
4145
+ Q.preventDefault(), K(x.value);
4140
4146
  },
4141
- onMouseEnter: () => !x.disabled && I(G),
4147
+ onMouseEnter: () => !x.disabled && I(V),
4142
4148
  className: "flex cursor-pointer items-center gap-2 px-3 py-2 text-sm transition-colors",
4143
4149
  style: {
4144
4150
  background: he ? "var(--bg-hover)" : te ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
@@ -4210,7 +4216,7 @@ function po({
4210
4216
  ref: j,
4211
4217
  className: `relative ${c || "w-full"}`,
4212
4218
  style: d,
4213
- onKeyDown: ae,
4219
+ onKeyDown: oe,
4214
4220
  children: [
4215
4221
  /* @__PURE__ */ o(
4216
4222
  "button",
@@ -4231,8 +4237,8 @@ function po({
4231
4237
  "aria-haspopup": "listbox",
4232
4238
  "aria-expanded": u,
4233
4239
  children: [
4234
- /* @__PURE__ */ t("span", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1.5 overflow-hidden", children: V.length ? /* @__PURE__ */ o(Ce, { children: [
4235
- V.map((x) => /* @__PURE__ */ o(
4240
+ /* @__PURE__ */ t("span", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1.5 overflow-hidden", children: Z.length ? /* @__PURE__ */ o(Ce, { children: [
4241
+ Z.map((x) => /* @__PURE__ */ o(
4236
4242
  "span",
4237
4243
  {
4238
4244
  className: "inline-flex max-w-[160px] items-center gap-1 rounded-md border px-1.5 py-0.5 text-xs font-semibold",
@@ -4276,7 +4282,7 @@ function po({
4276
4282
  tabIndex: -1,
4277
4283
  "aria-label": v,
4278
4284
  onMouseDown: (x) => {
4279
- x.preventDefault(), x.stopPropagation(), Z();
4285
+ x.preventDefault(), x.stopPropagation(), X();
4280
4286
  },
4281
4287
  className: "flex-shrink-0 rounded-full p-0.5 transition-colors hover:bg-black/10",
4282
4288
  style: { color: "var(--text-muted)" },
@@ -4632,61 +4638,61 @@ function yo({
4632
4638
  footerClassName: h = ""
4633
4639
  }) {
4634
4640
  var Q;
4635
- const C = ((Q = e[0]) == null ? void 0 : Q.id) ?? "", [_, I] = T(
4641
+ const C = ((Q = e[0]) == null ? void 0 : Q.id) ?? "", [_, I] = A(
4636
4642
  n ?? C
4637
- ), [B, w] = T(
4643
+ ), [B, w] = A(
4638
4644
  i
4639
- ), $ = r ?? _, A = a ?? B, j = je(
4640
- () => new Set(A),
4641
- [A]
4645
+ ), $ = r ?? _, T = a ?? B, j = je(
4646
+ () => new Set(T),
4647
+ [T]
4642
4648
  ), M = Math.max(
4643
4649
  0,
4644
4650
  e.findIndex((O) => O.id === $)
4645
4651
  ), E = e[M] ?? e[0], P = e.length <= 1 ? 100 : M / (e.length - 1) * 100, z = (O) => {
4646
4652
  a || w(O), d == null || d(O);
4647
4653
  }, W = (O) => {
4648
- const K = e.find((ee) => ee.id === O);
4649
- K && (r || I(O), c == null || c(O, K));
4650
- }, F = (O) => j.has(O), V = (O) => e.slice(0, O).find((K) => !K.optional && !j.has(K.id)), ne = (O) => {
4651
- const K = e[O];
4652
- return !K || K.disabled ? !1 : O === M || f && O < M ? !0 : !V(O);
4654
+ const G = e.find((ee) => ee.id === O);
4655
+ G && (r || I(O), c == null || c(O, G));
4656
+ }, F = (O) => j.has(O), Z = (O) => e.slice(0, O).find((G) => !G.optional && !j.has(G.id)), ne = (O) => {
4657
+ const G = e[O];
4658
+ return !G || G.disabled ? !1 : O === M || f && O < M ? !0 : !Z(O);
4653
4659
  }, m = (O) => {
4654
- const K = e.findIndex((ee) => ee.id === O);
4655
- return K >= 0 && ne(K);
4660
+ const G = e.findIndex((ee) => ee.id === O);
4661
+ return G >= 0 && ne(G);
4656
4662
  }, D = (O) => {
4657
- const K = e.findIndex((ee) => ee.id === O);
4658
- if (K < 0) return !1;
4659
- if (!ne(K)) {
4660
- const ee = V(K);
4661
- return ee && (s == null || s(e[K], ee)), !1;
4663
+ const G = e.findIndex((ee) => ee.id === O);
4664
+ if (G < 0) return !1;
4665
+ if (!ne(G)) {
4666
+ const ee = Z(G);
4667
+ return ee && (s == null || s(e[G], ee)), !1;
4662
4668
  }
4663
4669
  return W(O), !0;
4664
4670
  }, q = (O = E == null ? void 0 : E.id) => {
4665
- !O || j.has(O) || z([...A, O]);
4666
- }, X = (O = E == null ? void 0 : E.id) => {
4671
+ !O || j.has(O) || z([...T, O]);
4672
+ }, K = (O = E == null ? void 0 : E.id) => {
4667
4673
  if (!O) return;
4668
- const K = e.findIndex((se) => se.id === O), ee = A.filter((se) => {
4674
+ const G = e.findIndex((se) => se.id === O), ee = T.filter((se) => {
4669
4675
  const be = e.findIndex((Y) => Y.id === se);
4670
- return be >= 0 && be < K;
4676
+ return be >= 0 && be < G;
4671
4677
  });
4672
- z(ee), K >= 0 && M > K && W(O);
4673
- }, Z = () => M <= 0 ? !1 : D(e[M - 1].id), ae = () => {
4678
+ z(ee), G >= 0 && M > G && W(O);
4679
+ }, X = () => M <= 0 ? !1 : D(e[M - 1].id), oe = () => {
4674
4680
  const O = e[M + 1];
4675
4681
  return O ? D(O.id) : !1;
4676
4682
  }, de = {
4677
4683
  activeStep: E,
4678
4684
  activeIndex: M,
4679
- completedStepIds: A,
4685
+ completedStepIds: T,
4680
4686
  isCompleted: F,
4681
4687
  isUnlocked: m,
4682
4688
  completeStep: q,
4683
- uncompleteStep: X,
4689
+ uncompleteStep: K,
4684
4690
  goToStep: D,
4685
- goNext: ae,
4686
- goPrevious: Z
4691
+ goNext: oe,
4692
+ goPrevious: X
4687
4693
  };
4688
4694
  if (!E) return null;
4689
- const x = e[M + 1], G = M > 0, he = x ? m(x.id) : !1, te = typeof E.content == "function" ? E.content(de) : E.content;
4695
+ const x = e[M + 1], V = M > 0, he = x ? m(x.id) : !1, te = typeof E.content == "function" ? E.content(de) : E.content;
4690
4696
  return /* @__PURE__ */ o(
4691
4697
  "section",
4692
4698
  {
@@ -4717,8 +4723,8 @@ function yo({
4717
4723
  style: {
4718
4724
  gridTemplateColumns: `repeat(${e.length}, minmax(0, 1fr))`
4719
4725
  },
4720
- children: e.map((O, K) => {
4721
- const ee = O.id === E.id, se = F(O.id), be = ne(K), Y = V(K);
4726
+ children: e.map((O, G) => {
4727
+ const ee = O.id === E.id, se = F(O.id), be = ne(G), Y = Z(G);
4722
4728
  return /* @__PURE__ */ o(
4723
4729
  "button",
4724
4730
  {
@@ -4756,7 +4762,7 @@ function yo({
4756
4762
  !se && !ee && be && "border-[var(--border)] text-[var(--text-muted)]",
4757
4763
  !be && "border-[var(--border)] text-[var(--text-muted)]"
4758
4764
  ),
4759
- children: se ? /* @__PURE__ */ t(Qe, { className: "h-4 w-4" }) : be ? K + 1 : /* @__PURE__ */ t(Fr, { className: "h-3.5 w-3.5" })
4765
+ children: se ? /* @__PURE__ */ t(Qe, { className: "h-4 w-4" }) : be ? G + 1 : /* @__PURE__ */ t(Fr, { className: "h-3.5 w-3.5" })
4760
4766
  }
4761
4767
  ),
4762
4768
  /* @__PURE__ */ o("span", { className: "min-w-0 flex-1", children: [
@@ -4768,7 +4774,7 @@ function yo({
4768
4774
  ee ? "text-[var(--text-main)]" : "text-[var(--text-secondary)]"
4769
4775
  ),
4770
4776
  children: [
4771
- K + 1,
4777
+ G + 1,
4772
4778
  ". ",
4773
4779
  O.title
4774
4780
  ]
@@ -4814,8 +4820,8 @@ function yo({
4814
4820
  height: 38,
4815
4821
  padding: "0 14px",
4816
4822
  icon: /* @__PURE__ */ t(qe, {}),
4817
- disabled: !G,
4818
- onClick: Z,
4823
+ disabled: !V,
4824
+ onClick: X,
4819
4825
  children: k
4820
4826
  }
4821
4827
  ),
@@ -4828,7 +4834,7 @@ function yo({
4828
4834
  ] }),
4829
4835
  /* @__PURE__ */ t("span", { className: "h-1 w-1 rounded-full bg-[var(--border)]" }),
4830
4836
  /* @__PURE__ */ o("span", { children: [
4831
- A.length,
4837
+ T.length,
4832
4838
  " completados"
4833
4839
  ] })
4834
4840
  ] }),
@@ -4839,7 +4845,7 @@ function yo({
4839
4845
  padding: "0 14px",
4840
4846
  icon: /* @__PURE__ */ t(Ie, {}),
4841
4847
  disabled: !x || !he,
4842
- onClick: ae,
4848
+ onClick: oe,
4843
4849
  children: x && !he ? y : N
4844
4850
  }
4845
4851
  )
@@ -4893,7 +4899,7 @@ const pa = sn(
4893
4899
  onInput: C,
4894
4900
  ..._
4895
4901
  }, I) {
4896
- const B = J(null), w = fa(u, b), $ = p ?? h, A = !!(N || y || f), j = k === "error" ? "var(--danger)" : k === "success" ? "#16a34a" : "var(--border)", M = {
4902
+ const B = J(null), w = fa(u, b), $ = p ?? h, T = !!(N || y || f), j = k === "error" ? "var(--danger)" : k === "success" ? "#16a34a" : "var(--border)", M = {
4897
4903
  ...v ?? {},
4898
4904
  ...d ? { minHeight: `${d * 24 + 18}px` } : null,
4899
4905
  ...s ? { maxHeight: `${s * 24 + 18}px` } : null
@@ -4920,7 +4926,7 @@ const pa = sn(
4920
4926
  className: `w-full rounded-lg border bg-[var(--bg-input)] text-[var(--text-main)] outline-none placeholder:text-[var(--text-muted)] transition-colors focus:border-[var(--primary)] disabled:cursor-not-allowed disabled:opacity-60 ${da[a]} ${ua[c ? "none" : i]} ${N ? "pl-8" : ""} ${y ? "pr-10" : ""} ${r}`
4921
4927
  }
4922
4928
  );
4923
- return A ? /* @__PURE__ */ o("span", { className: `relative block ${n}`, children: [
4929
+ return T ? /* @__PURE__ */ o("span", { className: `relative block ${n}`, children: [
4924
4930
  N && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2.5 top-2.5 flex h-4 w-4 items-center justify-center text-[var(--text-muted)]", children: N }),
4925
4931
  P,
4926
4932
  y && /* @__PURE__ */ t("span", { className: "absolute right-2 top-2 flex items-center justify-center", children: y }),
@@ -5137,11 +5143,11 @@ function $a({
5137
5143
  style: v
5138
5144
  }) {
5139
5145
  var F;
5140
- const [u, b] = T(!1), h = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
5146
+ const [u, b] = A(!1), h = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
5141
5147
  H(() => {
5142
5148
  b(!1);
5143
5149
  }, [h, N]);
5144
- const { wh: C, text: _ } = va[a], I = ar(n) || ar(r) || s, B = I.trim()[0] || "?", w = typeof process < "u" && ((F = process.env) == null ? void 0 : F.NEXT_PUBLIC_BASE_PATH) || "", $ = Sa(r, n), A = Ca(w, "/favicon.svg"), j = h ? `${w}/api/user/avatar/${h}${N ? `?v=${N}` : ""}` : "", E = {
5150
+ const { wh: C, text: _ } = va[a], I = ar(n) || ar(r) || s, B = I.trim()[0] || "?", w = typeof process < "u" && ((F = process.env) == null ? void 0 : F.NEXT_PUBLIC_BASE_PATH) || "", $ = Sa(r, n), T = Ca(w, "/favicon.svg"), j = h ? `${w}/api/user/avatar/${h}${N ? `?v=${N}` : ""}` : "", E = {
5145
5151
  xs: 20,
5146
5152
  sm: 28,
5147
5153
  md: 36,
@@ -5155,7 +5161,7 @@ function $a({
5155
5161
  children: /* @__PURE__ */ t(
5156
5162
  "img",
5157
5163
  {
5158
- src: A,
5164
+ src: T,
5159
5165
  alt: I,
5160
5166
  width: E,
5161
5167
  height: E,
@@ -5234,7 +5240,7 @@ function Da({
5234
5240
  onLogout: f,
5235
5241
  LinkComponent: p = Ea
5236
5242
  }) {
5237
- const [k, N] = T(!1), y = Ma(r);
5243
+ const [k, N] = A(!1), y = Ma(r);
5238
5244
  return /* @__PURE__ */ o("div", { className: "min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]", children: [
5239
5245
  /* @__PURE__ */ t(xa, {}),
5240
5246
  /* @__PURE__ */ t(
@@ -5370,10 +5376,10 @@ const La = {
5370
5376
  projects: /* @__PURE__ */ t(Jr, { className: "h-5 w-5" }),
5371
5377
  clients: /* @__PURE__ */ t(Zr, { className: "h-5 w-5" }),
5372
5378
  surveys: /* @__PURE__ */ t(Xr, { className: "h-5 w-5" }),
5373
- profile: /* @__PURE__ */ t(Vr, { className: "h-5 w-5" }),
5379
+ profile: /* @__PURE__ */ t(Kr, { className: "h-5 w-5" }),
5374
5380
  settings: /* @__PURE__ */ t(Ft, { className: "h-5 w-5" }),
5375
- notifications: /* @__PURE__ */ t(Kr, { className: "h-5 w-5" }),
5376
- changelog: /* @__PURE__ */ t(Gr, { className: "h-5 w-5" }),
5381
+ notifications: /* @__PURE__ */ t(Gr, { className: "h-5 w-5" }),
5382
+ changelog: /* @__PURE__ */ t(Vr, { className: "h-5 w-5" }),
5377
5383
  admin: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
5378
5384
  users: /* @__PURE__ */ t(Ut, { className: "h-5 w-5" }),
5379
5385
  roles: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
@@ -5394,17 +5400,17 @@ function Ba({
5394
5400
  }) {
5395
5401
  return /* @__PURE__ */ t("a", { href: e, className: r, style: n, children: a });
5396
5402
  }
5397
- function Aa(e) {
5403
+ function Ta(e) {
5398
5404
  return e.split("-").map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join(" ");
5399
5405
  }
5400
- function Ta(e) {
5406
+ function Aa(e) {
5401
5407
  return /^\d+$/.test(e) || /^[a-f0-9]{8,}$/i.test(e);
5402
5408
  }
5403
5409
  function Oa(e) {
5404
5410
  const r = e.split("/").filter(Boolean);
5405
5411
  if (r.length === 0 || r.length === 1 && r[0] === "dashboard")
5406
5412
  return [];
5407
- const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, i = Ta(n) && a ? a : n, c = La[i] ?? Aa(i);
5413
+ const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, i = Aa(n) && a ? a : n, c = La[i] ?? Ta(i);
5408
5414
  return [{ label: "Inicio", href: "/" }, { label: c }];
5409
5415
  }
5410
5416
  function Nt(e) {
@@ -5433,14 +5439,14 @@ function ko({
5433
5439
  contained: k = !1,
5434
5440
  LinkComponent: N = Ba
5435
5441
  }) {
5436
- const y = J(null), [v, u] = T(!1), [b, h] = T(null), C = s ?? Oa(f), _ = i ?? za(f), I = p && C.length > 1;
5442
+ const y = J(null), [v, u] = A(!1), [b, h] = A(null), C = s ?? Oa(f), _ = i ?? za(f), I = p && C.length > 1;
5437
5443
  return H(() => {
5438
5444
  if (k) {
5439
5445
  u(!1);
5440
5446
  return;
5441
5447
  }
5442
5448
  let B = null, w = 0, $ = 0;
5443
- const A = () => {
5449
+ const T = () => {
5444
5450
  const E = y.current, P = document.querySelector(
5445
5451
  "[data-app-scroll='true']"
5446
5452
  );
@@ -5451,7 +5457,7 @@ function ko({
5451
5457
  const E = B && B !== window ? B.scrollTop : window.scrollY;
5452
5458
  u((P) => P ? E > 24 : E > 72);
5453
5459
  }, M = () => {
5454
- B == null || B.removeEventListener("scroll", j), B = A(), B.addEventListener("scroll", j, { passive: !0 }), j();
5460
+ B == null || B.removeEventListener("scroll", j), B = T(), B.addEventListener("scroll", j, { passive: !0 }), j();
5455
5461
  };
5456
5462
  return M(), w = window.requestAnimationFrame(M), $ = window.setTimeout(M, 120), () => {
5457
5463
  window.cancelAnimationFrame(w), window.clearTimeout($), B == null || B.removeEventListener("scroll", j);
@@ -5463,31 +5469,31 @@ function ko({
5463
5469
  }
5464
5470
  let B = 0;
5465
5471
  const w = [], $ = () => {
5466
- const W = y.current, F = W == null ? void 0 : W.parentElement, V = document.querySelector(
5472
+ const W = y.current, F = W == null ? void 0 : W.parentElement, Z = document.querySelector(
5467
5473
  "[data-app-scroll='true']"
5468
- ), ne = Nt(V) ?? V;
5474
+ ), ne = Nt(Z) ?? Z;
5469
5475
  if (!W || !F || !ne) {
5470
5476
  h(null);
5471
5477
  return;
5472
5478
  }
5473
- const m = F.getBoundingClientRect(), D = window.getComputedStyle(F), q = ne.getBoundingClientRect(), X = ne instanceof HTMLElement && ne.clientWidth > 0 ? ne.clientWidth : q.width, Z = m.left + parseFloat(D.paddingLeft || "0"), ae = {
5474
- marginLeft: Math.round(q.left - Z),
5475
- width: Math.round(X)
5479
+ const m = F.getBoundingClientRect(), D = window.getComputedStyle(F), q = ne.getBoundingClientRect(), K = ne instanceof HTMLElement && ne.clientWidth > 0 ? ne.clientWidth : q.width, X = m.left + parseFloat(D.paddingLeft || "0"), oe = {
5480
+ marginLeft: Math.round(q.left - X),
5481
+ width: Math.round(K)
5476
5482
  };
5477
5483
  h(
5478
- (de) => de && de.marginLeft === ae.marginLeft && de.width === ae.width ? de : ae
5484
+ (de) => de && de.marginLeft === oe.marginLeft && de.width === oe.width ? de : oe
5479
5485
  );
5480
- }, A = () => {
5486
+ }, T = () => {
5481
5487
  window.cancelAnimationFrame(B), B = window.requestAnimationFrame($);
5482
5488
  };
5483
- A(), window.addEventListener("resize", A);
5484
- const j = new ResizeObserver(A), M = y.current, E = M == null ? void 0 : M.parentElement, P = document.querySelector(
5489
+ T(), window.addEventListener("resize", T);
5490
+ const j = new ResizeObserver(T), M = y.current, E = M == null ? void 0 : M.parentElement, P = document.querySelector(
5485
5491
  "[data-app-scroll='true']"
5486
5492
  ), z = Nt(P) ?? P;
5487
5493
  return [E, P, z].forEach((W) => {
5488
5494
  W && j.observe(W);
5489
- }), w.push(window.setTimeout(A, 120)), w.push(window.setTimeout(A, 280)), () => {
5490
- window.cancelAnimationFrame(B), window.removeEventListener("resize", A), j.disconnect(), w.forEach((W) => window.clearTimeout(W));
5495
+ }), w.push(window.setTimeout(T, 120)), w.push(window.setTimeout(T, 280)), () => {
5496
+ window.cancelAnimationFrame(B), window.removeEventListener("resize", T), j.disconnect(), w.forEach((W) => window.clearTimeout(W));
5491
5497
  };
5492
5498
  }, [k]), /* @__PURE__ */ t(
5493
5499
  "div",
@@ -5672,7 +5678,7 @@ function Co({
5672
5678
  src: r,
5673
5679
  projectKey: n
5674
5680
  }) {
5675
- const [a, i] = T(
5681
+ const [a, i] = A(
5676
5682
  () => or()
5677
5683
  ), c = J(null);
5678
5684
  H(() => {
@@ -5737,7 +5743,7 @@ function Co({
5737
5743
  ) });
5738
5744
  }
5739
5745
  function $o() {
5740
- const [e, r] = T(""), [n, a] = T(!1), [i, c] = T({ width: 96, height: 96 });
5746
+ const [e, r] = A(""), [n, a] = A(!1), [i, c] = A({ width: 96, height: 96 });
5741
5747
  return H(() => {
5742
5748
  let d = !1;
5743
5749
  return fetch("/api/microservices/prime-suite/chat-url", { cache: "no-store" }).then((s) => s.ok ? s.json() : null).then((s) => {