@starasia/admin 8.4.0 → 8.4.2

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.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from "@starasia/alert";
2
2
  import { Badges as ft, Badge as Sn } from "@starasia/badges";
3
3
  export * from "@starasia/badges";
4
- import { Box as m } from "@starasia/box";
4
+ import { Box as f } from "@starasia/box";
5
5
  export * from "@starasia/box";
6
6
  import { Breadcrumb as Fn, BreadcrumbItem as Fr, BreadcrumbLink as En } from "@starasia/breadcrumb";
7
7
  export * from "@starasia/breadcrumb";
@@ -59,7 +59,7 @@ import { Skeleton as ut } from "@starasia/skeleton";
59
59
  export * from "@starasia/skeleton";
60
60
  export * from "@starasia/progress-stepper";
61
61
  import { jsx as e, Fragment as ie, jsxs as u } from "react/jsx-runtime";
62
- import tt, { createContext as It, useState as R, useContext as at, useCallback as Q, useMemo as fe, memo as qe, useEffect as U, useRef as se, useLayoutEffect as it, forwardRef as ur, isValidElement as nr, Children as Rn, useImperativeHandle as Vn } from "react";
62
+ import tt, { createContext as It, useState as R, useContext as at, useCallback as Q, useMemo as fe, memo as qe, useEffect as U, useRef as ce, useLayoutEffect as it, forwardRef as ur, isValidElement as nr, Children as Rn, useImperativeHandle as Vn } from "react";
63
63
  import { useSearchParams as Rt, useNavigate as hr, useLocation as gt, Outlet as Lr, Link as Et, useParams as tn } from "react-router";
64
64
  import On, { createPortal as rn } from "react-dom";
65
65
  import Hn from "react-easy-crop";
@@ -91,23 +91,23 @@ const Tn = {
91
91
  const [r, n] = R({}), o = Q(
92
92
  (c) => {
93
93
  n(
94
- (a) => typeof c == "function" ? c(a) : c
94
+ (d) => typeof c == "function" ? c(d) : c
95
95
  );
96
96
  },
97
97
  []
98
98
  ), i = Q(
99
- (c, a) => {
100
- n((d) => {
101
- const f = typeof a == "function" ? a(d[c]) : a;
102
- return { ...d, [c]: f };
99
+ (c, d) => {
100
+ n((a) => {
101
+ const m = typeof d == "function" ? d(a[c]) : d;
102
+ return { ...a, [c]: m };
103
103
  });
104
104
  },
105
105
  []
106
106
  ), l = Q((c) => {
107
- n((a) => {
108
- if (!(c in a)) return a;
109
- const d = { ...a };
110
- return delete d[c], d;
107
+ n((d) => {
108
+ if (!(c in d)) return d;
109
+ const a = { ...d };
110
+ return delete a[c], a;
111
111
  });
112
112
  }, []), s = fe(
113
113
  () => ({ badges: r, setBadge: i, setBadges: o, clearBadge: l }),
@@ -126,7 +126,7 @@ const Tn = {
126
126
  initialUserData: l,
127
127
  theme: s
128
128
  }) => {
129
- const c = Nn({ initialUserData: l }), { theme: a } = zn();
129
+ const c = Nn({ initialUserData: l }), { theme: d } = zn();
130
130
  return /* @__PURE__ */ e(
131
131
  nn.Provider,
132
132
  {
@@ -138,7 +138,7 @@ const Tn = {
138
138
  setUserData: c.setUserData,
139
139
  menuBottom: n
140
140
  },
141
- children: /* @__PURE__ */ e($n, { children: s ? /* @__PURE__ */ e(Er, { value: s, children: t }) : a ? /* @__PURE__ */ e(Er, { value: a, children: t }) : t })
141
+ children: /* @__PURE__ */ e($n, { children: s ? /* @__PURE__ */ e(Er, { value: s, children: t }) : d ? /* @__PURE__ */ e(Er, { value: d, children: t }) : t })
142
142
  }
143
143
  );
144
144
  }, Hl = qe(Pn);
@@ -181,7 +181,7 @@ function _n({
181
181
  }
182
182
  const fr = It(null);
183
183
  function Zn({ children: t }) {
184
- const [r, n] = R(null), [o, i] = R(null), [l, s] = R(null), [c, a] = R(0), d = Q(() => (a((f) => f + 1), () => a((f) => f - 1)), []);
184
+ const [r, n] = R(null), [o, i] = R(null), [l, s] = R(null), [c, d] = R(0), a = Q(() => (d((m) => m + 1), () => d((m) => m - 1)), []);
185
185
  return /* @__PURE__ */ e(
186
186
  fr.Provider,
187
187
  {
@@ -193,7 +193,7 @@ function Zn({ children: t }) {
193
193
  setAppendNode: i,
194
194
  setReplaceNode: s,
195
195
  replaceCount: c,
196
- registerReplace: d
196
+ registerReplace: a
197
197
  },
198
198
  children: t
199
199
  }
@@ -224,11 +224,11 @@ function Tl({
224
224
  }
225
225
  const mr = It(null);
226
226
  function qn({ children: t }) {
227
- const [r, n] = R({}), [o, i] = R({}), l = Q((a, d) => {
228
- n((f) => f[a] === d ? f : { ...f, [a]: d });
229
- }, []), s = Q((a) => (i((d) => ({ ...d, [a]: (d[a] ?? 0) + 1 })), () => i((d) => ({
230
- ...d,
231
- [a]: Math.max(0, (d[a] ?? 0) - 1)
227
+ const [r, n] = R({}), [o, i] = R({}), l = Q((d, a) => {
228
+ n((m) => m[d] === a ? m : { ...m, [d]: a });
229
+ }, []), s = Q((d) => (i((a) => ({ ...a, [d]: (a[d] ?? 0) + 1 })), () => i((a) => ({
230
+ ...a,
231
+ [d]: Math.max(0, (a[d] ?? 0) - 1)
232
232
  }))), []), c = fe(
233
233
  () => ({ outletNodes: r, setOutletNode: l, slotCounts: o, registerSlot: s }),
234
234
  [r, l, o, s]
@@ -236,7 +236,7 @@ function qn({ children: t }) {
236
236
  return /* @__PURE__ */ e(mr.Provider, { value: c, children: t });
237
237
  }
238
238
  function Un({ slotKey: t, fallback: r }) {
239
- const n = at(mr), o = n ? (n.slotCounts[t] ?? 0) > 0 : !1, i = se(n == null ? void 0 : n.setOutletNode);
239
+ const n = at(mr), o = n ? (n.slotCounts[t] ?? 0) > 0 : !1, i = ce(n == null ? void 0 : n.setOutletNode);
240
240
  i.current = n == null ? void 0 : n.setOutletNode;
241
241
  const l = Q(
242
242
  (s) => {
@@ -249,7 +249,7 @@ function Un({ slotKey: t, fallback: r }) {
249
249
  return /* @__PURE__ */ e(ie, { children: o ? /* @__PURE__ */ e("div", { ref: l, style: { display: "contents" } }) : r });
250
250
  }
251
251
  function Nl({ slotKey: t, children: r }) {
252
- const n = at(mr), o = se(n == null ? void 0 : n.registerSlot);
252
+ const n = at(mr), o = ce(n == null ? void 0 : n.registerSlot);
253
253
  if (o.current = n == null ? void 0 : n.registerSlot, U(() => {
254
254
  var l;
255
255
  return (l = o.current) == null ? void 0 : l.call(o, t);
@@ -335,11 +335,11 @@ function jl({
335
335
  isLoggingOut: l,
336
336
  loadingComponent: s,
337
337
  sidebarHeaderContent: c,
338
- headerActions: a,
339
- profileRole: d,
340
- profileMenuButtons: f,
341
- profileMenuItems: g,
342
- logoutButton: p
338
+ headerActions: d,
339
+ profileRole: a,
340
+ profileMenuButtons: m,
341
+ profileMenuItems: p,
342
+ logoutButton: g
343
343
  }) {
344
344
  var Ke, ot;
345
345
  const [x] = Rt(), W = x.get("embed") === "true", y = on(), { badges: k } = jn(), E = hr(), w = gt(), v = !ke("md"), [A, z] = R(!1), [C, B] = R(!1), [j, G] = R(!1), [_, X] = R(!1), [te, me] = R(
@@ -348,7 +348,7 @@ function jl({
348
348
  U(() => {
349
349
  Wr = te;
350
350
  }, [te]);
351
- const ne = se(null), ye = se(null);
351
+ const ne = ce(null), ye = ce(null);
352
352
  U(() => {
353
353
  const S = ne.current;
354
354
  if (!S) return;
@@ -1053,7 +1053,7 @@ function jl({
1053
1053
  /* @__PURE__ */ e(Gn, { children: r })
1054
1054
  ] }),
1055
1055
  /* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
1056
- a,
1056
+ d,
1057
1057
  /* @__PURE__ */ u(We, { position: "bottom-right", children: [
1058
1058
  /* @__PURE__ */ e(De, { children: /* @__PURE__ */ u(
1059
1059
  "div",
@@ -1200,7 +1200,7 @@ function jl({
1200
1200
  children: (n == null ? void 0 : n.email) || "unknown"
1201
1201
  }
1202
1202
  ),
1203
- d && /* @__PURE__ */ e(
1203
+ a && /* @__PURE__ */ e(
1204
1204
  "p",
1205
1205
  {
1206
1206
  style: {
@@ -1212,14 +1212,14 @@ function jl({
1212
1212
  overflow: "hidden",
1213
1213
  textOverflow: "ellipsis"
1214
1214
  },
1215
- children: d
1215
+ children: a
1216
1216
  }
1217
1217
  )
1218
1218
  ]
1219
1219
  }
1220
1220
  ) }),
1221
- (f && f.length > 0 || g) && /* @__PURE__ */ u(ze, { children: [
1222
- f == null ? void 0 : f.map((S, $) => /* @__PURE__ */ e(De, { children: /* @__PURE__ */ u(
1221
+ (m && m.length > 0 || p) && /* @__PURE__ */ u(ze, { children: [
1222
+ m == null ? void 0 : m.map((S, $) => /* @__PURE__ */ e(De, { children: /* @__PURE__ */ u(
1223
1223
  "button",
1224
1224
  {
1225
1225
  type: "button",
@@ -1237,9 +1237,9 @@ function jl({
1237
1237
  ]
1238
1238
  }
1239
1239
  ) }, `${S.label}-${$}`)),
1240
- g
1240
+ p
1241
1241
  ] }),
1242
- p ?? /* @__PURE__ */ e(sr, { children: /* @__PURE__ */ e(De, { children: /* @__PURE__ */ u(
1242
+ g ?? /* @__PURE__ */ e(sr, { children: /* @__PURE__ */ e(De, { children: /* @__PURE__ */ u(
1243
1243
  "button",
1244
1244
  {
1245
1245
  type: "button",
@@ -1311,9 +1311,9 @@ function jl({
1311
1311
  /* @__PURE__ */ u(lr, { isShow: A, onHide: Ee, children: [
1312
1312
  /* @__PURE__ */ e(Qr, { children: "Confirmation Logout" }),
1313
1313
  /* @__PURE__ */ e(cr, { children: "Are you sure you want to end the session and exit the page?" }),
1314
- /* @__PURE__ */ e(Yr, { children: /* @__PURE__ */ e(m, { direction: "column", display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ u(le, { direction: "row", gap: "sm", align: "center", children: [
1315
- /* @__PURE__ */ e(m, { direction: "column", children: /* @__PURE__ */ e(T, { secondary: !0, onClick: Ee, children: "Cancel" }) }),
1316
- /* @__PURE__ */ e(m, { direction: "column", children: /* @__PURE__ */ e(T, { primary: !0, onClick: Ne, children: "Yes, Sure" }) })
1314
+ /* @__PURE__ */ e(Yr, { children: /* @__PURE__ */ e(f, { direction: "column", display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ u(le, { direction: "row", gap: "sm", align: "center", children: [
1315
+ /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(T, { secondary: !0, onClick: Ee, children: "Cancel" }) }),
1316
+ /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(T, { primary: !0, onClick: Ne, children: "Yes, Sure" }) })
1317
1317
  ] }) }) })
1318
1318
  ] }),
1319
1319
  ae && /* @__PURE__ */ u(ie, { children: [
@@ -1429,7 +1429,7 @@ function jl({
1429
1429
  }
1430
1430
  const gr = ur(
1431
1431
  ({ children: t, ...r }, n) => /* @__PURE__ */ e(
1432
- m,
1432
+ f,
1433
1433
  {
1434
1434
  ref: n,
1435
1435
  role: "button",
@@ -1451,7 +1451,7 @@ const gr = ur(
1451
1451
  }) => {
1452
1452
  const [s, c] = R(!1);
1453
1453
  return /* @__PURE__ */ u(
1454
- m,
1454
+ f,
1455
1455
  {
1456
1456
  direction: "row",
1457
1457
  gap: "xs",
@@ -1492,22 +1492,22 @@ const gr = ur(
1492
1492
  iconColor: o,
1493
1493
  hoverIconColor: i
1494
1494
  }) => {
1495
- const [l, s] = R(!1), c = o ?? "var(--sa-text-subtle, #8c8f97)", a = i ?? "var(--sa-text-subtle, #8c8f97)", d = t.length > 1 ? t[0] : void 0, f = !!(d != null && d.to || d != null && d.onClick), g = /* @__PURE__ */ e(
1495
+ const [l, s] = R(!1), c = o ?? "var(--sa-text-subtle, #8c8f97)", d = i ?? "var(--sa-text-subtle, #8c8f97)", a = t.length > 1 ? t[0] : void 0, m = !!(a != null && a.to || a != null && a.onClick), p = /* @__PURE__ */ e(
1496
1496
  F,
1497
1497
  {
1498
1498
  name: n || "ChevronLeft",
1499
1499
  size: "xs",
1500
- onMouseEnter: f ? () => s(!0) : void 0,
1501
- onMouseLeave: f ? () => s(!1) : void 0,
1500
+ onMouseEnter: m ? () => s(!0) : void 0,
1501
+ onMouseLeave: m ? () => s(!1) : void 0,
1502
1502
  style: {
1503
- color: f && l ? a : c,
1503
+ color: m && l ? d : c,
1504
1504
  transition: "color 0.15s ease",
1505
- cursor: f ? "pointer" : void 0
1505
+ cursor: m ? "pointer" : void 0
1506
1506
  }
1507
1507
  }
1508
- ), p = d != null && d.to ? /* @__PURE__ */ e(Et, { to: d.to, replace: !0, style: { textDecoration: "none" }, children: g }) : d != null && d.onClick ? /* @__PURE__ */ e(gr, { onClick: d.onClick, children: g }) : g;
1509
- return /* @__PURE__ */ u(m, { direction: "row", gap: "xs", align: "center", children: [
1510
- p,
1508
+ ), g = a != null && a.to ? /* @__PURE__ */ e(Et, { to: a.to, replace: !0, style: { textDecoration: "none" }, children: p }) : a != null && a.onClick ? /* @__PURE__ */ e(gr, { onClick: a.onClick, children: p }) : p;
1509
+ return /* @__PURE__ */ u(f, { direction: "row", gap: "xs", align: "center", children: [
1510
+ g,
1511
1511
  /* @__PURE__ */ e(Fn, { separator: r, size: "md", children: t.map((x, W) => {
1512
1512
  const y = W === t.length - 1;
1513
1513
  return x.to && !y ? /* @__PURE__ */ e(Fr, { children: /* @__PURE__ */ e(Et, { to: x.to, children: x.label }) }, W) : /* @__PURE__ */ e(Fr, { currentPage: y, children: /* @__PURE__ */ e(En, { onClick: y ? void 0 : x.onClick, children: x.label }) }, W);
@@ -1524,7 +1524,7 @@ const gr = ur(
1524
1524
  iconColor: l.iconColor,
1525
1525
  hoverIconColor: l.hoverIconColor
1526
1526
  }
1527
- ) : i ? /* @__PURE__ */ e(m, { direction: "row", children: /* @__PURE__ */ e(Et, { to: i, replace: !0, style: { textDecoration: "none" }, children: /* @__PURE__ */ e(Ar, { ...l }) }) }) : /* @__PURE__ */ e(m, { direction: "row", children: /* @__PURE__ */ e(gr, { onClick: o, children: /* @__PURE__ */ e(Ar, { ...l }) }) });
1527
+ ) : i ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(Et, { to: i, replace: !0, style: { textDecoration: "none" }, children: /* @__PURE__ */ e(Ar, { ...l }) }) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(gr, { onClick: o, children: /* @__PURE__ */ e(Ar, { ...l }) }) });
1528
1528
  }, Gt = [
1529
1529
  // brand (blue)
1530
1530
  {
@@ -1611,9 +1611,9 @@ function Qn({
1611
1611
  selectedGroupId: o,
1612
1612
  onSelect: i
1613
1613
  }) {
1614
- const [l, s] = R(void 0), c = (d) => {
1615
- i(d), r();
1616
- }, a = Gt[0];
1614
+ const [l, s] = R(void 0), c = (a) => {
1615
+ i(a), r();
1616
+ }, d = Gt[0];
1617
1617
  return /* @__PURE__ */ e(
1618
1618
  lr,
1619
1619
  {
@@ -1642,27 +1642,27 @@ function Qn({
1642
1642
  onMouseLeave: () => s(void 0),
1643
1643
  style: Vr,
1644
1644
  children: [
1645
- /* @__PURE__ */ e("div", { style: Ir(o === null, l === "all", a), children: /* @__PURE__ */ e("div", { style: { color: a.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(F, { name: "Grid", size: "lg", style: { width: 32, height: 32 } }) }) }),
1645
+ /* @__PURE__ */ e("div", { style: Ir(o === null, l === "all", d), children: /* @__PURE__ */ e("div", { style: { color: d.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(F, { name: "Grid", size: "lg", style: { width: 32, height: 32 } }) }) }),
1646
1646
  /* @__PURE__ */ e("span", { style: Rr, children: "Semua" })
1647
1647
  ]
1648
1648
  }
1649
1649
  ),
1650
- n.map((d, f) => {
1650
+ n.map((a, m) => {
1651
1651
  var y;
1652
- const g = o === d.id, p = l === d.id, x = ((y = d.items[0]) == null ? void 0 : y.icon) ?? "Grid", W = Gt[(f + 1) % Gt.length];
1652
+ const p = o === a.id, g = l === a.id, x = ((y = a.items[0]) == null ? void 0 : y.icon) ?? "Grid", W = Gt[(m + 1) % Gt.length];
1653
1653
  return /* @__PURE__ */ u(
1654
1654
  "button",
1655
1655
  {
1656
- onClick: () => c(d.id),
1657
- onMouseEnter: () => s(d.id),
1656
+ onClick: () => c(a.id),
1657
+ onMouseEnter: () => s(a.id),
1658
1658
  onMouseLeave: () => s(void 0),
1659
1659
  style: Vr,
1660
1660
  children: [
1661
- /* @__PURE__ */ e("div", { style: Ir(g, p, W), children: /* @__PURE__ */ e("div", { style: { color: W.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(F, { name: x, size: "lg", style: { width: 32, height: 32 } }) }) }),
1662
- /* @__PURE__ */ e("span", { style: Rr, children: d.name })
1661
+ /* @__PURE__ */ e("div", { style: Ir(p, g, W), children: /* @__PURE__ */ e("div", { style: { color: W.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(F, { name: x, size: "lg", style: { width: 32, height: 32 } }) }) }),
1662
+ /* @__PURE__ */ e("span", { style: Rr, children: a.name })
1663
1663
  ]
1664
1664
  },
1665
- d.id
1665
+ a.id
1666
1666
  );
1667
1667
  })
1668
1668
  ]
@@ -1675,13 +1675,13 @@ function _l({
1675
1675
  onSelect: t,
1676
1676
  "aria-label": r = "Pilih module"
1677
1677
  } = {}) {
1678
- const n = on(), o = hr(), { selectedGroupId: i, setSelectedGroupId: l } = sn(), [s, c] = R(!1), a = (d) => {
1679
- var f;
1680
- if (l(d), d !== null) {
1681
- const g = n.menus.find((x) => x.id === d), p = (f = g == null ? void 0 : g.items[0]) == null ? void 0 : f.to;
1682
- p && o(p);
1678
+ const n = on(), o = hr(), { selectedGroupId: i, setSelectedGroupId: l } = sn(), [s, c] = R(!1), d = (a) => {
1679
+ var m;
1680
+ if (l(a), a !== null) {
1681
+ const p = n.menus.find((x) => x.id === a), g = (m = p == null ? void 0 : p.items[0]) == null ? void 0 : m.to;
1682
+ g && o(g);
1683
1683
  }
1684
- t == null || t(d);
1684
+ t == null || t(a);
1685
1685
  };
1686
1686
  return /* @__PURE__ */ u(ie, { children: [
1687
1687
  /* @__PURE__ */ u("div", { style: { position: "relative" }, children: [
@@ -1702,11 +1702,11 @@ function _l({
1702
1702
  cursor: "pointer"
1703
1703
  },
1704
1704
  "aria-label": r,
1705
- onMouseEnter: (d) => {
1706
- d.currentTarget.style.backgroundColor = "var(--sa-background-primary-inverse, #f8f8f8)";
1705
+ onMouseEnter: (a) => {
1706
+ a.currentTarget.style.backgroundColor = "var(--sa-background-primary-inverse, #f8f8f8)";
1707
1707
  },
1708
- onMouseLeave: (d) => {
1709
- d.currentTarget.style.backgroundColor = "transparent";
1708
+ onMouseLeave: (a) => {
1709
+ a.currentTarget.style.backgroundColor = "transparent";
1710
1710
  },
1711
1711
  children: /* @__PURE__ */ e(F, { name: "GridApplication", size: "sm" })
1712
1712
  }
@@ -1732,9 +1732,9 @@ function _l({
1732
1732
  {
1733
1733
  isShow: s,
1734
1734
  onHide: () => c(!1),
1735
- menus: n.menus.filter((d) => d.parentGroupId === void 0),
1735
+ menus: n.menus.filter((a) => a.parentGroupId === void 0),
1736
1736
  selectedGroupId: i,
1737
- onSelect: a
1737
+ onSelect: d
1738
1738
  }
1739
1739
  )
1740
1740
  ] });
@@ -1773,11 +1773,11 @@ const Yn = (t, r) => {
1773
1773
  verticalAlign: l
1774
1774
  }),
1775
1775
  [i, l]
1776
- ), a = () => typeof r == "string" ? /* @__PURE__ */ e(D, { fontWeight: "medium", color: "subtlest", children: r }) : r, d = () => typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ e(D, { color: "primary", fontWeight: "medium", children: t }) : t, f = () => typeof n == "string" || typeof n == "number" ? /* @__PURE__ */ e(D, { fontWeight: "medium", color: "subtlest", children: n }) : n;
1776
+ ), d = () => typeof r == "string" ? /* @__PURE__ */ e(D, { fontWeight: "medium", color: "subtlest", children: r }) : r, a = () => typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ e(D, { color: "primary", fontWeight: "medium", children: t }) : t, m = () => typeof n == "string" || typeof n == "number" ? /* @__PURE__ */ e(D, { fontWeight: "medium", color: "subtlest", children: n }) : n;
1777
1777
  return /* @__PURE__ */ u(He, { children: [
1778
- /* @__PURE__ */ e(Te, { style: s, width: o, children: a() }),
1779
- n ? /* @__PURE__ */ e(Te, { style: c, width: 24, children: f() }) : null,
1780
- /* @__PURE__ */ e(Te, { style: s, children: d() })
1778
+ /* @__PURE__ */ e(Te, { style: s, width: o, children: d() }),
1779
+ n ? /* @__PURE__ */ e(Te, { style: c, width: 24, children: m() }) : null,
1780
+ /* @__PURE__ */ e(Te, { style: s, children: a() })
1781
1781
  ] });
1782
1782
  }
1783
1783
  ), Kn = qe(({ fields: t, separator: r, labelWidth: n }) => /* @__PURE__ */ e(dr, { children: t.map((o, i) => /* @__PURE__ */ e(
@@ -1801,7 +1801,7 @@ const Yn = (t, r) => {
1801
1801
  const s = fe(
1802
1802
  () => Yn(o, t),
1803
1803
  [o, t]
1804
- ), c = s.length > 2, a = () => {
1804
+ ), c = s.length > 2, d = () => {
1805
1805
  switch (r) {
1806
1806
  case 1:
1807
1807
  return "width-full";
@@ -1816,7 +1816,7 @@ const Yn = (t, r) => {
1816
1816
  }
1817
1817
  };
1818
1818
  return /* @__PURE__ */ e(
1819
- m,
1819
+ f,
1820
1820
  {
1821
1821
  gap: c ? void 0 : "lg",
1822
1822
  direction: "row",
@@ -1828,23 +1828,23 @@ const Yn = (t, r) => {
1828
1828
  borderWidth: l ? "border" : void 0,
1829
1829
  borderStyle: l ? "border-solid" : void 0,
1830
1830
  borderColor: l ? "border-subtle" : void 0,
1831
- children: s.map((d, f) => /* @__PURE__ */ e(
1832
- m,
1831
+ children: s.map((a, m) => /* @__PURE__ */ e(
1832
+ f,
1833
1833
  {
1834
1834
  direction: "column",
1835
1835
  flex: c ? void 0 : "1",
1836
- width: c ? a() : void 0,
1836
+ width: c ? d() : void 0,
1837
1837
  marginBottom: c ? "lg" : void 0,
1838
1838
  children: /* @__PURE__ */ e(
1839
1839
  Kn,
1840
1840
  {
1841
1841
  labelWidth: i,
1842
- fields: d,
1842
+ fields: a,
1843
1843
  separator: n
1844
1844
  }
1845
1845
  )
1846
1846
  },
1847
- f
1847
+ m
1848
1848
  ))
1849
1849
  }
1850
1850
  );
@@ -1852,7 +1852,7 @@ const Yn = (t, r) => {
1852
1852
  ), ei = ({ backButton: t }) => {
1853
1853
  const [r, n] = R(!1), o = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", i = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", l = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)", s = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
1854
1854
  return /* @__PURE__ */ u(
1855
- m,
1855
+ f,
1856
1856
  {
1857
1857
  direction: "row",
1858
1858
  gap: "xs",
@@ -1896,24 +1896,24 @@ const Yn = (t, r) => {
1896
1896
  header: l = !0,
1897
1897
  headerBorder: s = !1,
1898
1898
  subHeaders: c,
1899
- action: a,
1900
- titleTagProps: d,
1901
- containerProps: f,
1902
- headerProps: g
1899
+ action: d,
1900
+ titleTagProps: a,
1901
+ containerProps: m,
1902
+ headerProps: p
1903
1903
  }) => {
1904
- const p = ke("md"), x = hr(), W = gt(), y = t == null ? void 0 : t.show, k = () => {
1904
+ const g = ke("md"), x = hr(), W = gt(), y = t == null ? void 0 : t.show, k = () => {
1905
1905
  if (typeof (t == null ? void 0 : t.onClick) == "function") {
1906
1906
  t.onClick();
1907
1907
  return;
1908
1908
  }
1909
1909
  x(-1, { replace: !0 });
1910
1910
  }, E = () => {
1911
- if (!a) return null;
1912
- if (nr(a)) return a;
1913
- const C = a.filter(
1911
+ if (!d) return null;
1912
+ if (nr(d)) return d;
1913
+ const C = d.filter(
1914
1914
  (B) => B && (B.title || B.icon)
1915
1915
  );
1916
- return C.length === 0 ? null : p ? /* @__PURE__ */ e(m, { direction: "row", gap: "md", children: C.map(({ title: B, icon: j, buttonProps: G, onClick: _ }, X) => /* @__PURE__ */ e(
1916
+ return C.length === 0 ? null : g ? /* @__PURE__ */ e(f, { direction: "row", gap: "md", children: C.map(({ title: B, icon: j, buttonProps: G, onClick: _ }, X) => /* @__PURE__ */ e(
1917
1917
  T,
1918
1918
  {
1919
1919
  iconLeft: j ? /* @__PURE__ */ e(F, { name: j, size: "md" }) : void 0,
@@ -1954,7 +1954,7 @@ const Yn = (t, r) => {
1954
1954
  ] });
1955
1955
  }, w = () => {
1956
1956
  const C = /* @__PURE__ */ e(ei, { backButton: t });
1957
- return t != null && t.navigateTo ? /* @__PURE__ */ e(m, { direction: "row", children: /* @__PURE__ */ e(
1957
+ return t != null && t.navigateTo ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(
1958
1958
  Et,
1959
1959
  {
1960
1960
  to: t.navigateTo,
@@ -1962,35 +1962,35 @@ const Yn = (t, r) => {
1962
1962
  style: { textDecoration: "none" },
1963
1963
  children: C
1964
1964
  }
1965
- ) }) : /* @__PURE__ */ e(m, { direction: "row", children: /* @__PURE__ */ e(gr, { onClick: k, children: C }) });
1965
+ ) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(gr, { onClick: k, children: C }) });
1966
1966
  }, V = () => {
1967
- const C = !!r, B = Array.isArray(a) && a.length > 0, j = nr(a) ? !0 : B;
1967
+ const C = !!r, B = Array.isArray(d) && d.length > 0, j = nr(d) ? !0 : B;
1968
1968
  if (!C && !j && !y) return null;
1969
- const _ = p || !p && B;
1969
+ const _ = g || !g && B;
1970
1970
  return /* @__PURE__ */ u(
1971
- m,
1971
+ f,
1972
1972
  {
1973
1973
  direction: "column",
1974
1974
  gap: "xs",
1975
- paddingBlock: (g == null ? void 0 : g.paddingBlock) ?? "sm",
1976
- paddingInline: (g == null ? void 0 : g.paddingInline) ?? "md",
1977
- ...g,
1975
+ paddingBlock: (p == null ? void 0 : p.paddingBlock) ?? "sm",
1976
+ paddingInline: (p == null ? void 0 : p.paddingInline) ?? "md",
1977
+ ...p,
1978
1978
  style: {
1979
1979
  ...s ? { borderBottom: "1px solid var(--sa-border-subtle, #0b120e24)" } : {},
1980
- ...g == null ? void 0 : g.style
1980
+ ...p == null ? void 0 : p.style
1981
1981
  },
1982
1982
  children: [
1983
1983
  y && w(),
1984
1984
  (C || j) && /* @__PURE__ */ u(
1985
- m,
1985
+ f,
1986
1986
  {
1987
1987
  direction: _ ? "row" : "column",
1988
1988
  gap: "sm",
1989
1989
  justify: "space-between",
1990
1990
  align: _ ? "center" : "flex-start",
1991
1991
  children: [
1992
- C ? typeof r == "string" ? /* @__PURE__ */ u(m, { direction: "row", gap: "lg", align: "center", children: [
1993
- /* @__PURE__ */ u(m, { direction: "row", gap: "sm", align: "center", children: [
1992
+ C ? typeof r == "string" ? /* @__PURE__ */ u(f, { direction: "row", gap: "lg", align: "center", children: [
1993
+ /* @__PURE__ */ u(f, { direction: "row", gap: "sm", align: "center", children: [
1994
1994
  n && /* @__PURE__ */ e(F, { name: n, size: "md", color: "primary" }),
1995
1995
  /* @__PURE__ */ e(
1996
1996
  D,
@@ -2002,7 +2002,7 @@ const Yn = (t, r) => {
2002
2002
  }
2003
2003
  )
2004
2004
  ] }),
2005
- o && /* @__PURE__ */ e(Sn, { border: !0, size: "lg", text: o, ...d })
2005
+ o && /* @__PURE__ */ e(Sn, { border: !0, size: "lg", text: o, ...a })
2006
2006
  ] }) : r : null,
2007
2007
  E()
2008
2008
  ]
@@ -2018,7 +2018,7 @@ const Yn = (t, r) => {
2018
2018
  const _ = j.order ?? 0;
2019
2019
  _ >= B && (B = _, C = G);
2020
2020
  }), c.map(({ content: j, order: G, borderBottom: _ = !0 }, X) => /* @__PURE__ */ e(
2021
- m,
2021
+ f,
2022
2022
  {
2023
2023
  direction: "column",
2024
2024
  paddingTop: "sm",
@@ -2037,7 +2037,7 @@ const Yn = (t, r) => {
2037
2037
  }, A = () => {
2038
2038
  const C = l ? V() : null, B = v();
2039
2039
  return !C && !B ? null : /* @__PURE__ */ u(
2040
- m,
2040
+ f,
2041
2041
  {
2042
2042
  direction: "column",
2043
2043
  style: {
@@ -2055,13 +2055,13 @@ const Yn = (t, r) => {
2055
2055
  );
2056
2056
  }, z = () => i;
2057
2057
  return /* @__PURE__ */ u(
2058
- m,
2058
+ f,
2059
2059
  {
2060
2060
  direction: "column",
2061
2061
  as: "main",
2062
- ...f,
2062
+ ...m,
2063
2063
  style: {
2064
- ...(f == null ? void 0 : f.style) ?? {},
2064
+ ...(m == null ? void 0 : m.style) ?? {},
2065
2065
  animation: "pageLayoutEnter 320ms cubic-bezier(0.16, 1, 0.3, 1) backwards"
2066
2066
  },
2067
2067
  children: [
@@ -2084,9 +2084,9 @@ const Yn = (t, r) => {
2084
2084
  closeButton: l = ri,
2085
2085
  width: s,
2086
2086
  minWidth: c = "357px",
2087
- maxWidth: a = "357px"
2088
- }, d) => {
2089
- const f = Or(s ?? c), g = Or(s ?? a);
2087
+ maxWidth: d = "357px"
2088
+ }, a) => {
2089
+ const m = Or(s ?? c), p = Or(s ?? d);
2090
2090
  return /* @__PURE__ */ e(
2091
2091
  Xr,
2092
2092
  {
@@ -2094,15 +2094,15 @@ const Yn = (t, r) => {
2094
2094
  isShow: r,
2095
2095
  position: "right",
2096
2096
  onHide: t,
2097
- ref: d,
2097
+ ref: a,
2098
2098
  style: {
2099
- minWidth: f,
2100
- maxWidth: g,
2099
+ minWidth: m,
2100
+ maxWidth: p,
2101
2101
  ...o
2102
2102
  },
2103
- children: /* @__PURE__ */ u(m, { direction: "column", padding: "lg", children: [
2103
+ children: /* @__PURE__ */ u(f, { direction: "column", padding: "lg", children: [
2104
2104
  l ? /* @__PURE__ */ u(
2105
- m,
2105
+ f,
2106
2106
  {
2107
2107
  direction: "row",
2108
2108
  align: "center",
@@ -2133,7 +2133,7 @@ const Yn = (t, r) => {
2133
2133
  ({ children: t, borderBottom: r = !0, padding: n = !0 }) => {
2134
2134
  const o = ke("lg");
2135
2135
  return /* @__PURE__ */ e(
2136
- m,
2136
+ f,
2137
2137
  {
2138
2138
  direction: "column",
2139
2139
  padding: n ? "md" : "spacing-0",
@@ -2150,7 +2150,7 @@ const Yn = (t, r) => {
2150
2150
  ({ children: t, borderTop: r = !0, padding: n = !0 }) => {
2151
2151
  const o = ke("lg");
2152
2152
  return /* @__PURE__ */ e(
2153
- m,
2153
+ f,
2154
2154
  {
2155
2155
  direction: "column",
2156
2156
  padding: n ? "md" : "spacing-0",
@@ -2165,7 +2165,7 @@ const Yn = (t, r) => {
2165
2165
  }
2166
2166
  ), oi = qe(
2167
2167
  ({ children: t, ...r }) => /* @__PURE__ */ e(
2168
- m,
2168
+ f,
2169
2169
  {
2170
2170
  direction: "column",
2171
2171
  padding: "md",
@@ -2186,28 +2186,28 @@ const Yn = (t, r) => {
2186
2186
  footer: l,
2187
2187
  actionContainer: s,
2188
2188
  containerProps: c,
2189
- bodyProps: a,
2190
- headerProps: d = { borderBottom: !0 },
2191
- footerProps: f = { borderTop: !0 },
2192
- variantTag: g = "info"
2189
+ bodyProps: d,
2190
+ headerProps: a = { borderBottom: !0 },
2191
+ footerProps: m = { borderTop: !0 },
2192
+ variantTag: p = "info"
2193
2193
  }) => {
2194
- const p = ke("lg"), x = () => n ? /* @__PURE__ */ u(m, { direction: "row", gap: "sm", align: "center", children: [
2194
+ const g = ke("lg"), x = () => n ? /* @__PURE__ */ u(f, { direction: "row", gap: "sm", align: "center", children: [
2195
2195
  /* @__PURE__ */ e(D, { fontWeight: "medium", children: r }),
2196
- /* @__PURE__ */ e(ft, { border: !0, text: n, variant: g })
2196
+ /* @__PURE__ */ e(ft, { border: !0, text: n, variant: p })
2197
2197
  ] }) : /* @__PURE__ */ e(D, { fontWeight: "medium", children: r }), W = () => i || /* @__PURE__ */ u(
2198
- m,
2198
+ f,
2199
2199
  {
2200
2200
  direction: "row",
2201
2201
  justify: "space-between",
2202
2202
  align: "flex-start",
2203
2203
  gap: "md",
2204
2204
  children: [
2205
- /* @__PURE__ */ e(m, { direction: "column", children: r ? x() : null }),
2205
+ /* @__PURE__ */ e(f, { direction: "column", children: r ? x() : null }),
2206
2206
  /* @__PURE__ */ e(
2207
- m,
2207
+ f,
2208
2208
  {
2209
2209
  direction: "column",
2210
- style: p ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
2210
+ style: g ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
2211
2211
  ...s,
2212
2212
  children: o ?? null
2213
2213
  }
@@ -2216,7 +2216,7 @@ const Yn = (t, r) => {
2216
2216
  }
2217
2217
  ), y = !!(i || r || o);
2218
2218
  return /* @__PURE__ */ u(
2219
- m,
2219
+ f,
2220
2220
  {
2221
2221
  direction: "column",
2222
2222
  bg: "white",
@@ -2231,9 +2231,9 @@ const Yn = (t, r) => {
2231
2231
  ...(c == null ? void 0 : c.style) ?? {}
2232
2232
  },
2233
2233
  children: [
2234
- i !== null && y ? /* @__PURE__ */ e(an, { ...d, children: W() }) : null,
2235
- /* @__PURE__ */ e(oi, { ...a, children: t }),
2236
- l ? /* @__PURE__ */ e(dn, { ...f, children: l }) : null
2234
+ i !== null && y ? /* @__PURE__ */ e(an, { ...a, children: W() }) : null,
2235
+ /* @__PURE__ */ e(oi, { ...d, children: t }),
2236
+ l ? /* @__PURE__ */ e(dn, { ...m, children: l }) : null
2237
2237
  ]
2238
2238
  }
2239
2239
  );
@@ -2258,10 +2258,10 @@ const Yn = (t, r) => {
2258
2258
  setSearchParams: r,
2259
2259
  searchParams: t,
2260
2260
  searchQueries: n,
2261
- isHasQuery: (f, g) => t.has(f) && t.get(f) === g,
2262
- getQueryParam: (f) => t.get(f),
2261
+ isHasQuery: (m, p) => t.has(m) && t.get(m) === p,
2262
+ getQueryParam: (m) => t.get(m),
2263
2263
  // route params
2264
- getRouteParam: (f) => o[f],
2264
+ getRouteParam: (m) => o[m],
2265
2265
  params: o,
2266
2266
  // location info
2267
2267
  location: i,
@@ -2278,43 +2278,43 @@ const Yn = (t, r) => {
2278
2278
  searchQueries: l,
2279
2279
  dropdownSearchKey: s,
2280
2280
  filterKey: c = "filter",
2281
- pageKey: a = "page"
2281
+ pageKey: d = "page"
2282
2282
  }) => {
2283
2283
  if (o) {
2284
- let d;
2284
+ let a;
2285
2285
  switch (n) {
2286
2286
  case "search":
2287
- d = wi(t);
2287
+ a = wi(t);
2288
2288
  break;
2289
2289
  case "dropdown":
2290
2290
  case "dropdown-multiple":
2291
- d = xi(t);
2291
+ a = xi(t);
2292
2292
  break;
2293
2293
  case "radio":
2294
- d = bi(t);
2294
+ a = bi(t);
2295
2295
  break;
2296
2296
  case "date-range":
2297
- d = vi(t);
2297
+ a = vi(t);
2298
2298
  break;
2299
2299
  case "advanced-date-range":
2300
- d = Di(t);
2300
+ a = Di(t);
2301
2301
  break;
2302
2302
  case "date":
2303
- d = Ci(t);
2303
+ a = Ci(t);
2304
2304
  break;
2305
2305
  default:
2306
- d = t;
2306
+ a = t;
2307
2307
  break;
2308
2308
  }
2309
- if (typeof d < "u") {
2310
- const g = {
2309
+ if (typeof a < "u") {
2310
+ const p = {
2311
2311
  ...l[c] && typeof l[c] == "string" ? JSON.parse(l[c]) : void 0,
2312
- [r]: d
2313
- }, p = { ...l };
2314
- s && typeof s == "string" && delete p[s], delete p[a];
2312
+ [r]: a
2313
+ }, g = { ...l };
2314
+ s && typeof s == "string" && delete g[s], delete g[d];
2315
2315
  const x = {
2316
- ...p,
2317
- [c]: JSON.stringify(g)
2316
+ ...g,
2317
+ [c]: JSON.stringify(p)
2318
2318
  }, W = new URLSearchParams(l).toString(), y = new URLSearchParams(
2319
2319
  x
2320
2320
  ).toString();
@@ -2381,44 +2381,44 @@ const Yn = (t, r) => {
2381
2381
  pageKey: o,
2382
2382
  filters: i
2383
2383
  }) => {
2384
- const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(), [a, d] = R({}), f = () => {
2384
+ const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(), [d, a] = R({}), m = () => {
2385
2385
  l.delete(n || "filter"), s(l);
2386
- }, g = (p, x) => {
2387
- switch (p.type) {
2386
+ }, p = (g, x) => {
2387
+ switch (g.type) {
2388
2388
  case "radio": {
2389
- const { show: W = !0 } = p;
2390
- return W && /* @__PURE__ */ e(m, { direction: "column", children: /* @__PURE__ */ e(m, { direction: "column", children: p.title }) }, x);
2389
+ const { show: W = !0 } = g;
2390
+ return W && /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(f, { direction: "column", children: g.title }) }, x);
2391
2391
  }
2392
2392
  case "dropdown": {
2393
- const { show: W = !0 } = p;
2394
- return W && /* @__PURE__ */ e(m, { direction: "column", children: /* @__PURE__ */ e(m, { direction: "column", children: p.title }) }, x);
2393
+ const { show: W = !0 } = g;
2394
+ return W && /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(f, { direction: "column", children: g.title }) }, x);
2395
2395
  }
2396
2396
  case "date-range":
2397
- return /* @__PURE__ */ e(m, { direction: "column", children: /* @__PURE__ */ e(m, { direction: "column", children: p.title }) }, x);
2397
+ return /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(f, { direction: "column", children: g.title }) }, x);
2398
2398
  case "date":
2399
- return /* @__PURE__ */ e(m, { direction: "column", children: /* @__PURE__ */ e(m, { direction: "column", children: p.title }) }, x);
2399
+ return /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(f, { direction: "column", children: g.title }) }, x);
2400
2400
  case "dropdown-multiple": {
2401
- const { show: W = !0 } = p;
2402
- return W && /* @__PURE__ */ e(m, { direction: "column", children: /* @__PURE__ */ e(m, { direction: "column", children: p.title }) }, x);
2401
+ const { show: W = !0 } = g;
2402
+ return W && /* @__PURE__ */ e(f, { direction: "column", children: /* @__PURE__ */ e(f, { direction: "column", children: g.title }) }, x);
2403
2403
  }
2404
2404
  default:
2405
2405
  return null;
2406
2406
  }
2407
2407
  };
2408
- return /* @__PURE__ */ e(ii, { onHide: r, show: t || !1, children: /* @__PURE__ */ u(m, { direction: "column", gap: "md", children: [
2408
+ return /* @__PURE__ */ e(ii, { onHide: r, show: t || !1, children: /* @__PURE__ */ u(f, { direction: "column", gap: "md", children: [
2409
2409
  /* @__PURE__ */ u(le, { direction: "row", justify: "space-between", align: "center", children: [
2410
- /* @__PURE__ */ e(m, { direction: "column", children: "Filter" }),
2410
+ /* @__PURE__ */ e(f, { direction: "column", children: "Filter" }),
2411
2411
  /* @__PURE__ */ e(
2412
- m,
2412
+ f,
2413
2413
  {
2414
2414
  direction: "column",
2415
2415
  style: { cursor: "pointer" },
2416
- onClick: f,
2416
+ onClick: m,
2417
2417
  children: "Reset"
2418
2418
  }
2419
2419
  )
2420
2420
  ] }),
2421
- i == null ? void 0 : i.map((p, x) => g(p, x))
2421
+ i == null ? void 0 : i.map((g, x) => p(g, x))
2422
2422
  ] }) });
2423
2423
  }, Ei = ({
2424
2424
  searchKey: t = "q",
@@ -2429,16 +2429,16 @@ const Yn = (t, r) => {
2429
2429
  showSearchFilter: l = !0,
2430
2430
  showStatusFilter: s = !0,
2431
2431
  filterKey: c = "filter",
2432
- pageKey: a = "page",
2433
- customWidthSearch: d,
2434
- handleOnReset: f,
2435
- filterConfigs: g,
2436
- buttonToggleProps: p,
2432
+ pageKey: d = "page",
2433
+ customWidthSearch: a,
2434
+ handleOnReset: m,
2435
+ filterConfigs: p,
2436
+ buttonToggleProps: g,
2437
2437
  position: x = "right",
2438
2438
  titleSearchLabel: W = "Work Order",
2439
2439
  withTitleLabels: y = !1
2440
2440
  }) => {
2441
- const E = (p == null ? void 0 : p.isShowLabel) ?? !0, [w, V] = R(!1), [v, A] = R(0), z = () => {
2441
+ const E = (g == null ? void 0 : g.isShowLabel) ?? !0, [w, V] = R(!1), [v, A] = R(0), z = () => {
2442
2442
  A((O) => O + 1);
2443
2443
  }, { searchParams: C, setSearchParams: B, getQueryParam: j } = Ie(), G = zt(C.toString()), _ = pr(t, C, c) || "", [X, te] = R(_), me = j(c), de = !!(me && !(() => {
2444
2444
  if (me)
@@ -2463,7 +2463,7 @@ const Yn = (t, r) => {
2463
2463
  searchQueries: G,
2464
2464
  setSearchParams: B,
2465
2465
  filterKey: c,
2466
- pageKey: a
2466
+ pageKey: d
2467
2467
  });
2468
2468
  }, 350);
2469
2469
  return () => {
@@ -2476,7 +2476,7 @@ const Yn = (t, r) => {
2476
2476
  G,
2477
2477
  B,
2478
2478
  c,
2479
- a
2479
+ d
2480
2480
  ]), /* @__PURE__ */ u(
2481
2481
  le,
2482
2482
  {
@@ -2486,12 +2486,12 @@ const Yn = (t, r) => {
2486
2486
  },
2487
2487
  align: "flex-end",
2488
2488
  children: [
2489
- de && /* @__PURE__ */ e(m, { direction: "column", justify: "flex-end", children: /* @__PURE__ */ e(
2489
+ de && /* @__PURE__ */ e(f, { direction: "column", justify: "flex-end", children: /* @__PURE__ */ e(
2490
2490
  T,
2491
2491
  {
2492
2492
  onClick: () => {
2493
2493
  const O = new URLSearchParams(C);
2494
- O.delete(c), B(O), te(""), z(), f && f();
2494
+ O.delete(c), B(O), te(""), z(), m && m();
2495
2495
  },
2496
2496
  variant: "outline",
2497
2497
  tone: "neutral",
@@ -2499,7 +2499,7 @@ const Yn = (t, r) => {
2499
2499
  }
2500
2500
  ) }),
2501
2501
  i == null ? void 0 : i.map(({ minWidth: O, content: ne, title: ye, onClickContainer: ge }, pe) => /* @__PURE__ */ u(
2502
- m,
2502
+ f,
2503
2503
  {
2504
2504
  direction: "column",
2505
2505
  gap: "sm",
@@ -2514,7 +2514,7 @@ const Yn = (t, r) => {
2514
2514
  },
2515
2515
  `extended-filter-${pe}-${v}`
2516
2516
  )),
2517
- !!(g != null && g.length) && /* @__PURE__ */ e(
2517
+ !!(p != null && p.length) && /* @__PURE__ */ e(
2518
2518
  T,
2519
2519
  {
2520
2520
  primary: de,
@@ -2523,7 +2523,7 @@ const Yn = (t, r) => {
2523
2523
  F,
2524
2524
  {
2525
2525
  size: "sm",
2526
- name: (p == null ? void 0 : p.icon) || "FilterHorizontal",
2526
+ name: (g == null ? void 0 : g.icon) || "FilterHorizontal",
2527
2527
  style: {
2528
2528
  color: me ? "var(--sa-background-brand, #04254f)" : "var(--sa-text-primary, #292a2e)"
2529
2529
  }
@@ -2535,7 +2535,7 @@ const Yn = (t, r) => {
2535
2535
  }
2536
2536
  ),
2537
2537
  s && /* @__PURE__ */ u(
2538
- m,
2538
+ f,
2539
2539
  {
2540
2540
  direction: "column",
2541
2541
  gap: "sm",
@@ -2594,12 +2594,12 @@ const Yn = (t, r) => {
2594
2594
  }
2595
2595
  ),
2596
2596
  l && /* @__PURE__ */ u(
2597
- m,
2597
+ f,
2598
2598
  {
2599
2599
  direction: "column",
2600
2600
  gap: "sm",
2601
2601
  style: {
2602
- width: d && ee ? d : ee ? "310px" : ""
2602
+ width: a && ee ? a : ee ? "310px" : ""
2603
2603
  },
2604
2604
  children: [
2605
2605
  y && /* @__PURE__ */ u(Ge.SubH3, { children: [
@@ -2626,8 +2626,8 @@ const Yn = (t, r) => {
2626
2626
  isOpen: w,
2627
2627
  onClose: () => V(!1),
2628
2628
  filterKey: c,
2629
- filters: g,
2630
- pageKey: a
2629
+ filters: p,
2630
+ pageKey: d
2631
2631
  }
2632
2632
  )
2633
2633
  ]
@@ -2641,10 +2641,10 @@ function yr({
2641
2641
  pageKey: o = "page",
2642
2642
  searchKey: i = "q"
2643
2643
  }) {
2644
- const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(), a = fe(
2644
+ const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(), d = fe(
2645
2645
  () => Object.fromEntries(t.map((v) => [v.key, v])),
2646
2646
  [t]
2647
- ), d = fe(() => {
2647
+ ), a = fe(() => {
2648
2648
  const v = (l.get(n) || "").split(",").map((z) => z.trim()).filter(Boolean);
2649
2649
  let A = [];
2650
2650
  try {
@@ -2653,10 +2653,10 @@ function yr({
2653
2653
  } catch {
2654
2654
  }
2655
2655
  return t.map((z) => z.key).filter((z) => {
2656
- const C = a[z];
2656
+ const C = d[z];
2657
2657
  return (C == null ? void 0 : C.locked) || v.includes(z) || A.includes(z);
2658
2658
  });
2659
- }, [l, n, r, i, t, a]), f = Q(
2659
+ }, [l, n, r, i, t, d]), m = Q(
2660
2660
  (v) => {
2661
2661
  try {
2662
2662
  return v[r] ? JSON.parse(v[r]) : {};
@@ -2665,39 +2665,39 @@ function yr({
2665
2665
  }
2666
2666
  },
2667
2667
  [r]
2668
- ), g = Q(
2668
+ ), p = Q(
2669
2669
  (v) => {
2670
2670
  const A = { ...c };
2671
2671
  v.length ? A[n] = v.join(",") : delete A[n], s(A);
2672
2672
  },
2673
2673
  [c, n, s]
2674
- ), p = Q(
2674
+ ), g = Q(
2675
2675
  (v) => {
2676
- d.includes(v) || g([...d, v]);
2676
+ a.includes(v) || p([...a, v]);
2677
2677
  },
2678
- [d, g]
2678
+ [a, p]
2679
2679
  ), x = Q(
2680
2680
  (v) => {
2681
2681
  var B;
2682
- if ((B = a[v]) != null && B.locked) return;
2683
- const A = { ...c }, z = d.filter((j) => j !== v);
2682
+ if ((B = d[v]) != null && B.locked) return;
2683
+ const A = { ...c }, z = a.filter((j) => j !== v);
2684
2684
  z.length ? A[n] = z.join(",") : delete A[n];
2685
- const C = f(A);
2685
+ const C = m(A);
2686
2686
  v in C && (delete C[v], Object.keys(C).length ? A[r] = JSON.stringify(C) : delete A[r]), delete A[o], s(A);
2687
2687
  },
2688
2688
  [
2689
2689
  c,
2690
- d,
2690
+ a,
2691
2691
  n,
2692
2692
  r,
2693
2693
  o,
2694
- f,
2694
+ m,
2695
2695
  s,
2696
- a
2696
+ d
2697
2697
  ]
2698
2698
  ), W = Q(
2699
- (v) => d.includes(v) ? x(v) : p(v),
2700
- [d, p, x]
2699
+ (v) => a.includes(v) ? x(v) : g(v),
2700
+ [a, g, x]
2701
2701
  ), y = Q(
2702
2702
  (v) => {
2703
2703
  switch (v.type) {
@@ -2720,18 +2720,18 @@ function yr({
2720
2720
  return A ? new Date(A) : void 0;
2721
2721
  }
2722
2722
  case "date-compact": {
2723
- const z = f(Object.fromEntries(l.entries()))[v.key];
2723
+ const z = m(Object.fromEntries(l.entries()))[v.key];
2724
2724
  return z && typeof z == "object" ? z : void 0;
2725
2725
  }
2726
2726
  default:
2727
2727
  return;
2728
2728
  }
2729
2729
  },
2730
- [l, r, f]
2730
+ [l, r, m]
2731
2731
  ), k = Q(
2732
2732
  (v, A) => {
2733
2733
  if (v.type === "date-compact") {
2734
- const z = { ...c }, C = f(z);
2734
+ const z = { ...c }, C = m(z);
2735
2735
  A == null ? delete C[v.key] : C[v.key] = A, Object.keys(C).length ? z[r] = JSON.stringify(C) : delete z[r], delete z[o], s(z);
2736
2736
  return;
2737
2737
  }
@@ -2745,22 +2745,22 @@ function yr({
2745
2745
  pageKey: o
2746
2746
  });
2747
2747
  },
2748
- [c, s, r, o, f]
2748
+ [c, s, r, o, m]
2749
2749
  ), E = Q(
2750
2750
  (v) => {
2751
- const A = { ...c }, z = f(A);
2751
+ const A = { ...c }, z = m(A);
2752
2752
  v in z && (delete z[v], Object.keys(z).length ? A[r] = JSON.stringify(z) : delete A[r]), delete A[o], s(A);
2753
2753
  },
2754
- [c, r, o, f, s]
2754
+ [c, r, o, m, s]
2755
2755
  ), w = Q(() => {
2756
2756
  const v = { ...c };
2757
2757
  delete v[r], delete v[n], delete v[o], s(v);
2758
- }, [c, r, n, o, s]), V = d.length > 0;
2758
+ }, [c, r, n, o, s]), V = a.length > 0;
2759
2759
  return {
2760
- activeKeys: d,
2761
- configByKey: a,
2760
+ activeKeys: a,
2761
+ configByKey: d,
2762
2762
  hasActiveFilter: V,
2763
- addFilter: p,
2763
+ addFilter: g,
2764
2764
  removeFilter: x,
2765
2765
  toggleFilter: W,
2766
2766
  getValue: y,
@@ -2801,7 +2801,7 @@ function Mi({
2801
2801
  const l = fe(
2802
2802
  () => ({ order: t.map((C) => C.key), hidden: [] }),
2803
2803
  [t]
2804
- ), s = r ? pt.columns(r) : void 0, c = (C, B) => Ct({ order: C.order ?? B, hidden: C.hidden ?? [] }, t), [a, d] = R(() => {
2804
+ ), s = r ? pt.columns(r) : void 0, c = (C, B) => Ct({ order: C.order ?? B, hidden: C.hidden ?? [] }, t), [d, a] = R(() => {
2805
2805
  if (i && (i.order || i.hidden))
2806
2806
  return c(i, t.map((C) => C.key));
2807
2807
  if (s) {
@@ -2809,56 +2809,56 @@ function Mi({
2809
2809
  if (C && Array.isArray(C.order)) return Ct(C, t);
2810
2810
  }
2811
2811
  return l;
2812
- }), f = t.map((C) => C.key).join("|");
2813
- U(() => d((C) => Ct(C, t)), [f]);
2814
- const g = se(a);
2815
- g.current = a;
2816
- const p = i ? `${(i.order ?? []).join("|")}~${(i.hidden ?? []).join("|")}` : null, x = se(p);
2812
+ }), m = t.map((C) => C.key).join("|");
2813
+ U(() => a((C) => Ct(C, t)), [m]);
2814
+ const p = ce(d);
2815
+ p.current = d;
2816
+ const g = i ? `${(i.order ?? []).join("|")}~${(i.hidden ?? []).join("|")}` : null, x = ce(g);
2817
2817
  U(() => {
2818
- if (p == null || x.current === p) return;
2819
- x.current = p;
2820
- const C = g.current, B = c(i, C.order);
2821
- B.order.join("|") === C.order.join("|") && B.hidden.join("|") === C.hidden.join("|") || (d(B), s && n.set(s, B));
2822
- }, [p, f]);
2823
- const W = se(!1);
2818
+ if (g == null || x.current === g) return;
2819
+ x.current = g;
2820
+ const C = p.current, B = c(i, C.order);
2821
+ B.order.join("|") === C.order.join("|") && B.hidden.join("|") === C.hidden.join("|") || (a(B), s && n.set(s, B));
2822
+ }, [g, m]);
2823
+ const W = ce(!1);
2824
2824
  U(() => {
2825
- W.current || (W.current = !0, o == null || o(a));
2825
+ W.current || (W.current = !0, o == null || o(d));
2826
2826
  }, []);
2827
2827
  const y = Q(
2828
2828
  (C) => {
2829
- d(C), s && n.set(s, C), o == null || o(C);
2829
+ a(C), s && n.set(s, C), o == null || o(C);
2830
2830
  },
2831
2831
  [s, n, o]
2832
2832
  ), k = fe(() => {
2833
2833
  const C = new Map(t.map((B) => [B.key, B]));
2834
- return a.order.filter((B) => C.has(B)).map((B) => ({ ...C.get(B), visible: !a.hidden.includes(B) }));
2835
- }, [a, t]), E = Q(
2834
+ return d.order.filter((B) => C.has(B)).map((B) => ({ ...C.get(B), visible: !d.hidden.includes(B) }));
2835
+ }, [d, t]), E = Q(
2836
2836
  (C) => {
2837
- const B = a.hidden.includes(C) ? a.hidden.filter((j) => j !== C) : [...a.hidden, C];
2838
- y({ ...a, hidden: B });
2837
+ const B = d.hidden.includes(C) ? d.hidden.filter((j) => j !== C) : [...d.hidden, C];
2838
+ y({ ...d, hidden: B });
2839
2839
  },
2840
- [a, y]
2840
+ [d, y]
2841
2841
  ), w = Q(
2842
2842
  (C, B) => {
2843
2843
  if (C === B) return;
2844
- const j = [...a.order], [G] = j.splice(C, 1);
2845
- j.splice(B, 0, G), y({ ...a, order: j });
2844
+ const j = [...d.order], [G] = j.splice(C, 1);
2845
+ j.splice(B, 0, G), y({ ...d, order: j });
2846
2846
  },
2847
- [a, y]
2847
+ [d, y]
2848
2848
  ), V = Q(
2849
2849
  (C) => {
2850
2850
  y({
2851
- ...a,
2851
+ ...d,
2852
2852
  hidden: C ? t.filter((B) => !B.locked).map((B) => B.key) : []
2853
2853
  });
2854
2854
  },
2855
- [a, t, y]
2855
+ [d, t, y]
2856
2856
  ), v = Q(() => y(l), [y, l]), A = Q(
2857
2857
  (C) => y(Ct(C, t)),
2858
2858
  [y, t]
2859
- ), z = a.hidden.length === 0;
2859
+ ), z = d.hidden.length === 0;
2860
2860
  return {
2861
- state: a,
2861
+ state: d,
2862
2862
  orderedColumns: k,
2863
2863
  allVisible: z,
2864
2864
  toggleVisibility: E,
@@ -2876,15 +2876,15 @@ function Wi({
2876
2876
  getColumns: i,
2877
2877
  applyColumns: l
2878
2878
  }) {
2879
- const { searchParams: s, setSearchParams: c } = Ie(), a = t ? pt.savedViews(t) : void 0, [d, f] = R(
2880
- () => a ? r.get(a) || [] : []
2881
- ), g = Q(
2879
+ const { searchParams: s, setSearchParams: c } = Ie(), d = t ? pt.savedViews(t) : void 0, [a, m] = R(
2880
+ () => d ? r.get(d) || [] : []
2881
+ ), p = Q(
2882
2882
  (y) => {
2883
- f(y), a && r.set(a, y);
2883
+ m(y), d && r.set(d, y);
2884
2884
  },
2885
- [a]
2885
+ [d]
2886
2886
  // storage identity is stable (module singleton / caller-provided)
2887
- ), p = Q(
2887
+ ), g = Q(
2888
2888
  (y) => {
2889
2889
  const k = y.trim();
2890
2890
  if (!k) return;
@@ -2900,12 +2900,12 @@ function Wi({
2900
2900
  columns: i == null ? void 0 : i(),
2901
2901
  createdAt: Date.now()
2902
2902
  };
2903
- g([...d, w]);
2903
+ p([...a, w]);
2904
2904
  },
2905
- [n, s, i, g, d]
2905
+ [n, s, i, p, a]
2906
2906
  ), x = Q(
2907
- (y) => g(d.filter((k) => k.id !== y)),
2908
- [g, d]
2907
+ (y) => p(a.filter((k) => k.id !== y)),
2908
+ [p, a]
2909
2909
  ), W = Q(
2910
2910
  (y) => {
2911
2911
  const k = Object.fromEntries(s.entries());
@@ -2914,9 +2914,9 @@ function Wi({
2914
2914
  [s, n, o, c, l]
2915
2915
  );
2916
2916
  return {
2917
- enabled: !!a,
2918
- views: d,
2919
- saveView: p,
2917
+ enabled: !!d,
2918
+ views: a,
2919
+ saveView: g,
2920
2920
  deleteView: x,
2921
2921
  applyView: W
2922
2922
  };
@@ -2927,26 +2927,33 @@ function Bi({
2927
2927
  snapshotKeys: n,
2928
2928
  enabled: o = !0
2929
2929
  }) {
2930
- const { searchParams: i } = Ie(), l = t && o ? pt.lastState(t) : void 0;
2930
+ const { searchParams: i } = Ie(), l = t && o ? pt.lastState(t) : void 0, s = ce(l);
2931
2931
  U(() => {
2932
- if (!l) return;
2932
+ if (!l) {
2933
+ s.current = l;
2934
+ return;
2935
+ }
2936
+ if (s.current !== l) {
2937
+ s.current = l;
2938
+ return;
2939
+ }
2933
2940
  const a = {};
2934
- n.forEach((d) => {
2935
- const f = i.get(d);
2936
- f != null && (a[d] = f);
2941
+ n.forEach((m) => {
2942
+ const p = i.get(m);
2943
+ p != null && (a[m] = p);
2937
2944
  }), Object.keys(a).length !== 0 && r.set(l, a);
2938
2945
  }, [i, l, n, r]);
2939
- const s = Q(() => {
2946
+ const c = Q(() => {
2940
2947
  if (!l) return null;
2941
2948
  const a = r.get(l);
2942
2949
  return a && Object.keys(a).length > 0 ? a : null;
2943
- }, [l, r]), c = Q(() => {
2950
+ }, [l, r]), d = Q(() => {
2944
2951
  l && r.remove(l);
2945
2952
  }, [l, r]);
2946
2953
  return {
2947
2954
  enabled: !!l,
2948
- read: s,
2949
- clear: c
2955
+ read: c,
2956
+ clear: d
2950
2957
  };
2951
2958
  }
2952
2959
  function zi({
@@ -2956,27 +2963,34 @@ function zi({
2956
2963
  pageSizeOptions: o,
2957
2964
  enabled: i = !0
2958
2965
  }) {
2959
- const { searchParams: l } = Ie(), s = t && i ? pt.perPage(t) : void 0, c = l.toString();
2966
+ const { searchParams: l } = Ie(), s = t && i ? pt.perPage(t) : void 0, c = l.toString(), d = ce(s);
2960
2967
  U(() => {
2961
- if (!s) return;
2962
- const f = l.get(n);
2963
- if (!f) return;
2964
- const g = Number(f);
2968
+ if (!s) {
2969
+ d.current = s;
2970
+ return;
2971
+ }
2972
+ if (d.current !== s) {
2973
+ d.current = s;
2974
+ return;
2975
+ }
2976
+ const p = l.get(n);
2977
+ if (!p) return;
2978
+ const g = Number(p);
2965
2979
  !Number.isFinite(g) || g <= 0 || r.set(s, g);
2966
2980
  }, [c, s, n, r]);
2967
2981
  const a = Q(() => {
2968
2982
  if (!s) return null;
2969
- const f = r.get(s);
2970
- if (f == null) return null;
2971
- const g = Number(f);
2983
+ const p = r.get(s);
2984
+ if (p == null) return null;
2985
+ const g = Number(p);
2972
2986
  return !Number.isFinite(g) || g <= 0 || o && !o.includes(g) ? null : String(g);
2973
- }, [s, r, o]), d = Q(() => {
2987
+ }, [s, r, o]), m = Q(() => {
2974
2988
  s && r.remove(s);
2975
2989
  }, [s, r]);
2976
2990
  return {
2977
2991
  enabled: !!s,
2978
2992
  read: a,
2979
- clear: d
2993
+ clear: m
2980
2994
  };
2981
2995
  }
2982
2996
  let Ut = {}, Jt = !1, Qt = null;
@@ -2996,20 +3010,20 @@ function Ii({
2996
3010
  readSnapshot: o,
2997
3011
  readPerPage: i
2998
3012
  }) {
2999
- const { searchParams: l, setSearchParams: s, location: c } = Ie(), a = se(null);
3013
+ const { searchParams: l, setSearchParams: s, location: c } = Ie(), d = ce(null);
3000
3014
  U(() => {
3001
- if (!t || a.current === c.pathname) return;
3002
- a.current = c.pathname;
3003
- const d = {};
3015
+ if (!t || d.current === c.pathname) return;
3016
+ d.current = c.pathname;
3017
+ const a = {};
3004
3018
  if (!l.has(n)) {
3005
- const f = i();
3006
- f && (d[n] = f);
3019
+ const m = i();
3020
+ m && (a[n] = m);
3007
3021
  }
3008
- if (!r.some((f) => l.has(f))) {
3009
- const f = o();
3010
- f && Object.assign(d, f);
3022
+ if (!r.some((m) => l.has(m))) {
3023
+ const m = o();
3024
+ m && Object.assign(a, m);
3011
3025
  }
3012
- Object.keys(d).length !== 0 && Ai(d, s);
3026
+ Object.keys(a).length !== 0 && Ai(a, s);
3013
3027
  }, [c.pathname, t]);
3014
3028
  }
3015
3029
  const Ri = ({
@@ -3034,7 +3048,7 @@ const Ri = ({
3034
3048
  {
3035
3049
  style: { minWidth: 260 },
3036
3050
  title: /* @__PURE__ */ u(
3037
- m,
3051
+ f,
3038
3052
  {
3039
3053
  display: "flex",
3040
3054
  direction: "row",
@@ -3197,7 +3211,7 @@ const Ri = ({
3197
3211
  {
3198
3212
  style: { width: 260 },
3199
3213
  title: /* @__PURE__ */ u(
3200
- m,
3214
+ f,
3201
3215
  {
3202
3216
  display: "flex",
3203
3217
  direction: "row",
@@ -3218,7 +3232,7 @@ const Ri = ({
3218
3232
  clearable: !0,
3219
3233
  filter: t.mode,
3220
3234
  value: r,
3221
- onChange: (a) => a == null ? o() : n(a),
3235
+ onChange: (d) => d == null ? o() : n(d),
3222
3236
  withPadding: !1
3223
3237
  }
3224
3238
  )
@@ -3255,22 +3269,22 @@ const Ri = ({
3255
3269
  onClear: o,
3256
3270
  onRemove: i
3257
3271
  }) => {
3258
- const l = (r == null ? void 0 : r.op) ?? "is", s = r ? ji(r) : null, c = !!s, a = c ? /* @__PURE__ */ u(ie, { children: [
3272
+ const l = (r == null ? void 0 : r.op) ?? "is", s = r ? ji(r) : null, c = !!s, d = c ? /* @__PURE__ */ u(ie, { children: [
3259
3273
  /* @__PURE__ */ u("span", { style: { fontWeight: 500 }, children: [
3260
3274
  t.label,
3261
3275
  ":"
3262
3276
  ] }),
3263
3277
  " ",
3264
3278
  /* @__PURE__ */ e("span", { style: { fontWeight: 400 }, children: fn(s) })
3265
- ] }) : t.label, d = (f) => {
3266
- if (f !== l) {
3267
- if (f === "is-empty" || f === "is-not-empty") {
3268
- n({ op: f });
3279
+ ] }) : t.label, a = (m) => {
3280
+ if (m !== l) {
3281
+ if (m === "is-empty" || m === "is-not-empty") {
3282
+ n({ op: m });
3269
3283
  return;
3270
3284
  }
3271
- if (f === "is-relative-to-today") {
3285
+ if (m === "is-relative-to-today") {
3272
3286
  n({
3273
- op: f,
3287
+ op: m,
3274
3288
  relative: (r == null ? void 0 : r.relative) ?? {
3275
3289
  direction: "past",
3276
3290
  count: 1,
@@ -3279,11 +3293,11 @@ const Ri = ({
3279
3293
  });
3280
3294
  return;
3281
3295
  }
3282
- if (f === "is-between") {
3283
- n({ op: f, from: r == null ? void 0 : r.from, to: r == null ? void 0 : r.to });
3296
+ if (m === "is-between") {
3297
+ n({ op: m, from: r == null ? void 0 : r.from, to: r == null ? void 0 : r.to });
3284
3298
  return;
3285
3299
  }
3286
- n({ op: f, date: r == null ? void 0 : r.date });
3300
+ n({ op: m, date: r == null ? void 0 : r.date });
3287
3301
  }
3288
3302
  };
3289
3303
  return /* @__PURE__ */ u(We, { position: "bottom-left", children: [
@@ -3295,7 +3309,7 @@ const Ri = ({
3295
3309
  size: "sm",
3296
3310
  iconLeft: c ? /* @__PURE__ */ e(F, { name: "Calendar", size: "sm" }) : void 0,
3297
3311
  iconRight: /* @__PURE__ */ e(F, { name: "ChevronSmallDown" }),
3298
- children: a
3312
+ children: d
3299
3313
  }
3300
3314
  ) }),
3301
3315
  /* @__PURE__ */ u(Be, { children: [
@@ -3304,7 +3318,7 @@ const Ri = ({
3304
3318
  {
3305
3319
  style: { width: 320 },
3306
3320
  title: /* @__PURE__ */ u(
3307
- m,
3321
+ f,
3308
3322
  {
3309
3323
  display: "flex",
3310
3324
  direction: "row",
@@ -3314,7 +3328,7 @@ const Ri = ({
3314
3328
  fullWidth: !0,
3315
3329
  children: [
3316
3330
  /* @__PURE__ */ u(
3317
- m,
3331
+ f,
3318
3332
  {
3319
3333
  display: "flex",
3320
3334
  direction: "row",
@@ -3323,7 +3337,7 @@ const Ri = ({
3323
3337
  style: { minWidth: 0 },
3324
3338
  children: [
3325
3339
  /* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", color: "subtlest", children: t.label }),
3326
- /* @__PURE__ */ e(_i, { op: l, onChange: d })
3340
+ /* @__PURE__ */ e(_i, { op: l, onChange: a })
3327
3341
  ]
3328
3342
  }
3329
3343
  ),
@@ -3360,7 +3374,7 @@ const Ri = ({
3360
3374
  )) }) })
3361
3375
  ] }), Zi = ({ value: t, op: r, onChange: n }) => {
3362
3376
  if (r === "is-empty" || r === "is-not-empty")
3363
- return /* @__PURE__ */ e(m, { paddingBlock: "sm", paddingInline: "sm", children: /* @__PURE__ */ e(D, { fontSize: "xs", color: "subtlest", children: "No further input required." }) });
3377
+ return /* @__PURE__ */ e(f, { paddingBlock: "sm", paddingInline: "sm", children: /* @__PURE__ */ e(D, { fontSize: "xs", color: "subtlest", children: "No further input required." }) });
3364
3378
  if (r === "is-between") {
3365
3379
  const o = t != null && t.from || t != null && t.to ? {
3366
3380
  from: t != null && t.from ? new Date(t.from) : null,
@@ -3428,8 +3442,8 @@ const Ri = ({
3428
3442
  );
3429
3443
  }, Gi = ({ value: t, onChange: r }) => {
3430
3444
  const n = (t == null ? void 0 : t.direction) ?? "past", o = (t == null ? void 0 : t.count) ?? 1, i = (t == null ? void 0 : t.period) ?? "week", l = n !== "this", s = hn({ direction: n, count: o, period: i });
3431
- return /* @__PURE__ */ u(m, { direction: "column", display: "flex", gap: "sm", children: [
3432
- /* @__PURE__ */ u(m, { direction: "row", display: "flex", align: "center", gap: "xs", children: [
3445
+ return /* @__PURE__ */ u(f, { direction: "column", display: "flex", gap: "sm", children: [
3446
+ /* @__PURE__ */ u(f, { direction: "row", display: "flex", align: "center", gap: "xs", children: [
3433
3447
  /* @__PURE__ */ u(We, { position: "bottom-left", children: [
3434
3448
  /* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
3435
3449
  T,
@@ -3463,10 +3477,10 @@ const Ri = ({
3463
3477
  clearable: !1,
3464
3478
  value: o,
3465
3479
  onChange: (c) => {
3466
- const a = Number(c.target.value);
3480
+ const d = Number(c.target.value);
3467
3481
  r({
3468
3482
  direction: n,
3469
- count: Number.isFinite(a) && a > 0 ? a : 1,
3483
+ count: Number.isFinite(d) && d > 0 ? d : 1,
3470
3484
  period: i
3471
3485
  });
3472
3486
  },
@@ -3520,21 +3534,21 @@ const Ri = ({
3520
3534
  onClear: o,
3521
3535
  onRemove: i
3522
3536
  }) => {
3523
- const l = t.type === "dropdown-multiple", s = r.length, [c, a] = R(""), d = t.options, f = typeof t.onSearch == "function", g = (() => {
3524
- if (f) return d;
3537
+ const l = t.type === "dropdown-multiple", s = r.length, [c, d] = R(""), a = t.options, m = typeof t.onSearch == "function", p = (() => {
3538
+ if (m) return a;
3525
3539
  const k = c.trim().toLowerCase();
3526
- return k ? d.filter((E) => E.label.toLowerCase().includes(k)) : d;
3527
- })(), p = (k) => r.some((E) => E.value === k.value), x = (k) => {
3540
+ return k ? a.filter((E) => E.label.toLowerCase().includes(k)) : a;
3541
+ })(), g = (k) => r.some((E) => E.value === k.value), x = (k) => {
3528
3542
  if (!l) {
3529
- n([{ label: k.label, value: k.value }]), a("");
3543
+ n([{ label: k.label, value: k.value }]), d("");
3530
3544
  return;
3531
3545
  }
3532
3546
  n(
3533
- p(k) ? r.filter((E) => E.value !== k.value) : [...r, { label: k.label, value: k.value }]
3547
+ g(k) ? r.filter((E) => E.value !== k.value) : [...r, { label: k.label, value: k.value }]
3534
3548
  );
3535
3549
  }, W = (k) => {
3536
3550
  var E;
3537
- a(k), (E = t.onSearch) == null || E.call(t, k);
3551
+ d(k), (E = t.onSearch) == null || E.call(t, k);
3538
3552
  }, y = s === 0 ? t.label : /* @__PURE__ */ u(ie, { children: [
3539
3553
  /* @__PURE__ */ u("span", { style: { fontWeight: 500 }, children: [
3540
3554
  t.label,
@@ -3560,7 +3574,7 @@ const Ri = ({
3560
3574
  {
3561
3575
  style: { width: 260 },
3562
3576
  title: /* @__PURE__ */ u(
3563
- m,
3577
+ f,
3564
3578
  {
3565
3579
  display: "flex",
3566
3580
  direction: "row",
@@ -3573,7 +3587,7 @@ const Ri = ({
3573
3587
  ]
3574
3588
  }
3575
3589
  ),
3576
- children: /* @__PURE__ */ u(m, { direction: "column", gap: "sm", children: [
3590
+ children: /* @__PURE__ */ u(f, { direction: "column", gap: "sm", children: [
3577
3591
  /* @__PURE__ */ e(
3578
3592
  Bt,
3579
3593
  {
@@ -3592,18 +3606,18 @@ const Ri = ({
3592
3606
  }
3593
3607
  ),
3594
3608
  /* @__PURE__ */ e(
3595
- m,
3609
+ f,
3596
3610
  {
3597
3611
  direction: "column",
3598
3612
  overflow: "overflow-y-auto",
3599
3613
  customMaxHeight: "240px",
3600
- children: t.isLoading ? /* @__PURE__ */ e(m, { paddingBlock: "sm", paddingInline: "sm", children: /* @__PURE__ */ e(D, { fontSize: "xs", color: "subtlest", children: "Loading…" }) }) : g.length === 0 ? /* @__PURE__ */ e(m, { paddingBlock: "sm", paddingInline: "sm", children: /* @__PURE__ */ e(D, { fontSize: "xs", color: "subtlest", children: "No results" }) }) : g.map((k) => /* @__PURE__ */ e(
3614
+ children: t.isLoading ? /* @__PURE__ */ e(f, { paddingBlock: "sm", paddingInline: "sm", children: /* @__PURE__ */ e(D, { fontSize: "xs", color: "subtlest", children: "Loading…" }) }) : p.length === 0 ? /* @__PURE__ */ e(f, { paddingBlock: "sm", paddingInline: "sm", children: /* @__PURE__ */ e(D, { fontSize: "xs", color: "subtlest", children: "No results" }) }) : p.map((k) => /* @__PURE__ */ e(
3601
3615
  Ve,
3602
3616
  {
3603
3617
  closeOnSelect: !l,
3604
- selected: p(k),
3618
+ selected: g(k),
3605
3619
  startIcon: k.avatar,
3606
- endIcon: p(k) ? /* @__PURE__ */ e(F, { name: "Check" }) : void 0,
3620
+ endIcon: g(k) ? /* @__PURE__ */ e(F, { name: "Check" }) : void 0,
3607
3621
  description: k.description,
3608
3622
  onClick: () => x(k),
3609
3623
  children: k.label
@@ -3633,15 +3647,15 @@ const Ri = ({
3633
3647
  onClear: o,
3634
3648
  onRemove: i
3635
3649
  }) => {
3636
- const l = new Set(r.map((p) => p.value)), s = r.length, c = t.options.length > 0 && t.options.every((p) => l.has(p.value)), a = s > 0 && !c, d = (p) => {
3650
+ const l = new Set(r.map((g) => g.value)), s = r.length, c = t.options.length > 0 && t.options.every((g) => l.has(g.value)), d = s > 0 && !c, a = (g) => {
3637
3651
  n(
3638
- l.has(p.value) ? r.filter((x) => x.value !== p.value) : [...r, { label: p.label, value: p.value }]
3652
+ l.has(g.value) ? r.filter((x) => x.value !== g.value) : [...r, { label: g.label, value: g.value }]
3639
3653
  );
3640
- }, f = () => {
3654
+ }, m = () => {
3641
3655
  n(
3642
- c ? [] : t.options.map((p) => ({ label: p.label, value: p.value }))
3656
+ c ? [] : t.options.map((g) => ({ label: g.label, value: g.value }))
3643
3657
  );
3644
- }, g = s === 0 ? t.label : /* @__PURE__ */ u(ie, { children: [
3658
+ }, p = s === 0 ? t.label : /* @__PURE__ */ u(ie, { children: [
3645
3659
  /* @__PURE__ */ u(D, { as: "span", fontWeight: "semibold", children: [
3646
3660
  t.label,
3647
3661
  ":"
@@ -3658,7 +3672,7 @@ const Ri = ({
3658
3672
  size: "sm",
3659
3673
  iconLeft: s > 0 ? /* @__PURE__ */ e(F, { name: "Tag", size: "sm" }) : void 0,
3660
3674
  iconRight: /* @__PURE__ */ e(F, { name: "ChevronSmallDown" }),
3661
- children: g
3675
+ children: p
3662
3676
  }
3663
3677
  ) }),
3664
3678
  /* @__PURE__ */ e(Be, { children: /* @__PURE__ */ u(
@@ -3666,7 +3680,7 @@ const Ri = ({
3666
3680
  {
3667
3681
  style: { width: 240 },
3668
3682
  title: /* @__PURE__ */ u(
3669
- m,
3683
+ f,
3670
3684
  {
3671
3685
  display: "flex",
3672
3686
  direction: "row",
@@ -3685,27 +3699,27 @@ const Ri = ({
3685
3699
  {
3686
3700
  closeOnSelect: !1,
3687
3701
  selected: c,
3688
- onClick: f,
3702
+ onClick: m,
3689
3703
  startIcon: /* @__PURE__ */ e(
3690
3704
  jr,
3691
3705
  {
3692
- checked: c || a,
3693
- indeterminate: a
3706
+ checked: c || d,
3707
+ indeterminate: d
3694
3708
  }
3695
3709
  ),
3696
3710
  children: "Select All"
3697
3711
  }
3698
3712
  ),
3699
- t.options.map((p) => /* @__PURE__ */ e(
3713
+ t.options.map((g) => /* @__PURE__ */ e(
3700
3714
  Ve,
3701
3715
  {
3702
3716
  closeOnSelect: !1,
3703
- selected: l.has(p.value),
3704
- onClick: () => d(p),
3705
- startIcon: /* @__PURE__ */ e(jr, { checked: l.has(p.value) }),
3706
- children: p.label
3717
+ selected: l.has(g.value),
3718
+ onClick: () => a(g),
3719
+ startIcon: /* @__PURE__ */ e(jr, { checked: l.has(g.value) }),
3720
+ children: g.label
3707
3721
  },
3708
- p.value
3722
+ g.value
3709
3723
  ))
3710
3724
  ]
3711
3725
  }
@@ -3721,35 +3735,35 @@ const Ri = ({
3721
3735
  }) => /* @__PURE__ */ e(ie, { children: t.map((s) => {
3722
3736
  const c = r[s];
3723
3737
  if (!c) return null;
3724
- const a = n(c), d = c.locked ? void 0 : () => l(s);
3738
+ const d = n(c), a = c.locked ? void 0 : () => l(s);
3725
3739
  return c.type === "date" || c.type === "date-compact" ? /* @__PURE__ */ e(
3726
3740
  Ni,
3727
3741
  {
3728
3742
  field: c,
3729
- value: a,
3730
- onChange: (f) => o(c, f),
3743
+ value: d,
3744
+ onChange: (m) => o(c, m),
3731
3745
  onClear: () => i(s),
3732
- onRemove: d
3746
+ onRemove: a
3733
3747
  },
3734
3748
  s
3735
3749
  ) : c.type === "checkbox-multiple" ? /* @__PURE__ */ e(
3736
3750
  Qi,
3737
3751
  {
3738
3752
  field: c,
3739
- value: a || [],
3740
- onChange: (f) => o(c, f),
3753
+ value: d || [],
3754
+ onChange: (m) => o(c, m),
3741
3755
  onClear: () => i(s),
3742
- onRemove: d
3756
+ onRemove: a
3743
3757
  },
3744
3758
  s
3745
3759
  ) : /* @__PURE__ */ e(
3746
3760
  Ui,
3747
3761
  {
3748
3762
  field: c,
3749
- value: a || [],
3750
- onChange: (f) => o(c, f),
3763
+ value: d || [],
3764
+ onChange: (m) => o(c, m),
3751
3765
  onClear: () => i(s),
3752
- onRemove: d
3766
+ onRemove: a
3753
3767
  },
3754
3768
  s
3755
3769
  );
@@ -3764,11 +3778,11 @@ const Ri = ({
3764
3778
  showPagination: c = !0
3765
3779
  }) => {
3766
3780
  var E;
3767
- const { searchQueries: a, setSearchParams: d, searchParams: f } = Ie(), g = f.get(n), p = g ? Number(g) : i, x = (w) => {
3768
- d({ ...a, [r]: String(w) });
3781
+ const { searchQueries: d, setSearchParams: a, searchParams: m } = Ie(), p = m.get(n), g = p ? Number(p) : i, x = (w) => {
3782
+ a({ ...d, [r]: String(w) });
3769
3783
  }, W = (w) => {
3770
- d({
3771
- ...a,
3784
+ a({
3785
+ ...d,
3772
3786
  [n]: w,
3773
3787
  [r]: "1"
3774
3788
  // reset to first page when page size changes
@@ -3785,21 +3799,21 @@ const Ri = ({
3785
3799
  size: "xs",
3786
3800
  iconRight: /* @__PURE__ */ e(F, { name: "ChevronSmallDown" }),
3787
3801
  "aria-label": "Rows per page",
3788
- children: Pr(p)
3802
+ children: Pr(g)
3789
3803
  }
3790
3804
  ) }),
3791
3805
  /* @__PURE__ */ e(Be, { children: /* @__PURE__ */ e(ze, { children: o.map((w) => /* @__PURE__ */ e(
3792
3806
  Ve,
3793
3807
  {
3794
- selected: w === p,
3808
+ selected: w === g,
3795
3809
  onClick: () => W(String(w)),
3796
3810
  children: Pr(w)
3797
3811
  },
3798
3812
  w
3799
3813
  )) }) })
3800
3814
  ] }),
3801
- c && !!(t != null && t.totalPage) && /* @__PURE__ */ e(
3802
- m,
3815
+ c && ((t == null ? void 0 : t.totalPage) ?? 0) > 1 && /* @__PURE__ */ e(
3816
+ f,
3803
3817
  {
3804
3818
  direction: "column",
3805
3819
  display: "flex",
@@ -3816,7 +3830,7 @@ const Ri = ({
3816
3830
  variant: "neutral",
3817
3831
  siblingCount: 0,
3818
3832
  currentPage: t != null && t.currentPage ? Number(t.currentPage) : 1,
3819
- totalPages: Number(t.totalPage),
3833
+ totalPages: Number(t == null ? void 0 : t.totalPage),
3820
3834
  onPageChange: x
3821
3835
  }
3822
3836
  )
@@ -3843,13 +3857,13 @@ const Ki = 240, gn = ({
3843
3857
  placeholder: o = "Search",
3844
3858
  shortcut: i = "/"
3845
3859
  }) => {
3846
- const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(), a = pr(t, l, r) || "", [d, f] = R(!!a), [g, p] = R(!a), [x, W] = R(a), y = Ln(x, 350), k = se(null);
3860
+ const { searchParams: l, setSearchParams: s, searchQueries: c } = Ie(), d = pr(t, l, r) || "", [a, m] = R(!!d), [p, g] = R(!d), [x, W] = R(d), y = Ln(x, 350), k = ce(null);
3847
3861
  U(() => {
3848
- W(a), a && f(!0);
3849
- }, [a]), U(() => {
3850
- d && p(!1);
3862
+ W(d), d && m(!0);
3851
3863
  }, [d]), U(() => {
3852
- y !== a && Mt({
3864
+ a && g(!1);
3865
+ }, [a]), U(() => {
3866
+ y !== d && Mt({
3853
3867
  value: y,
3854
3868
  name: t,
3855
3869
  type: "search",
@@ -3860,15 +3874,15 @@ const Ki = 240, gn = ({
3860
3874
  });
3861
3875
  }, [y]);
3862
3876
  const E = Q(() => {
3863
- f(!0), requestAnimationFrame(() => {
3877
+ m(!0), requestAnimationFrame(() => {
3864
3878
  var A;
3865
3879
  return (A = k.current) == null ? void 0 : A.focus();
3866
3880
  });
3867
3881
  }, []);
3868
3882
  return Xi(i, E), // No internal gap: the trigger and the animated input are never visible at
3869
3883
  // the same time, so spacing to neighbours is handled by the parent cluster.
3870
- /* @__PURE__ */ u(m, { display: "flex", direction: "row", align: "center", gap: "spacing-0", children: [
3871
- g && /* @__PURE__ */ e(
3884
+ /* @__PURE__ */ u(f, { display: "flex", direction: "row", align: "center", gap: "spacing-0", children: [
3885
+ p && /* @__PURE__ */ e(
3872
3886
  T,
3873
3887
  {
3874
3888
  variant: "outline",
@@ -3881,14 +3895,14 @@ const Ki = 240, gn = ({
3881
3895
  }
3882
3896
  ),
3883
3897
  /* @__PURE__ */ u(
3884
- m,
3898
+ f,
3885
3899
  {
3886
3900
  onTransitionEnd: () => {
3887
- d || p(!0);
3901
+ a || g(!0);
3888
3902
  },
3889
3903
  style: {
3890
3904
  position: "relative",
3891
- width: d ? Ki : 0,
3905
+ width: a ? Ki : 0,
3892
3906
  overflow: "hidden",
3893
3907
  transition: "width 220ms ease"
3894
3908
  },
@@ -3905,16 +3919,16 @@ const Ki = 240, gn = ({
3905
3919
  onChange: (A) => W(A.target.value),
3906
3920
  onKeyDown: (A) => {
3907
3921
  var z;
3908
- A.key === "Escape" && !x && (f(!1), (z = k.current) == null || z.blur());
3922
+ A.key === "Escape" && !x && (m(!1), (z = k.current) == null || z.blur());
3909
3923
  },
3910
3924
  onBlur: () => {
3911
- x || f(!1);
3925
+ x || m(!1);
3912
3926
  },
3913
- tabIndex: d ? 0 : -1
3927
+ tabIndex: a ? 0 : -1
3914
3928
  }
3915
3929
  ),
3916
- d && !x && /* @__PURE__ */ e(
3917
- m,
3930
+ a && !x && /* @__PURE__ */ e(
3931
+ f,
3918
3932
  {
3919
3933
  align: "center",
3920
3934
  justify: "center",
@@ -3948,11 +3962,11 @@ const Ki = 240, gn = ({
3948
3962
  onReorder: o,
3949
3963
  onSetAllHidden: i
3950
3964
  }) => {
3951
- const [l, s] = R(null), [c, a] = R(null), d = () => {
3952
- l !== null && c !== null && l !== c && o(l, c), s(null), a(null);
3953
- }, f = (g, p) => {
3954
- const x = g + p;
3955
- x < 0 || x >= t.length || o(g, x);
3965
+ const [l, s] = R(null), [c, d] = R(null), a = () => {
3966
+ l !== null && c !== null && l !== c && o(l, c), s(null), d(null);
3967
+ }, m = (p, g) => {
3968
+ const x = p + g;
3969
+ x < 0 || x >= t.length || o(p, x);
3956
3970
  };
3957
3971
  return /* @__PURE__ */ u(We, { position: "bottom-right", children: [
3958
3972
  /* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
@@ -3966,7 +3980,7 @@ const Ki = 240, gn = ({
3966
3980
  }
3967
3981
  ) }),
3968
3982
  /* @__PURE__ */ e(Be, { children: /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ u(
3969
- m,
3983
+ f,
3970
3984
  {
3971
3985
  padding: "sm",
3972
3986
  direction: "column",
@@ -3976,7 +3990,7 @@ const Ki = 240, gn = ({
3976
3990
  children: [
3977
3991
  /* @__PURE__ */ e(D, { fontWeight: "semibold", color: "primary", children: "Customize Column Table" }),
3978
3992
  /* @__PURE__ */ u(
3979
- m,
3993
+ f,
3980
3994
  {
3981
3995
  direction: "row",
3982
3996
  display: "flex",
@@ -3998,10 +4012,10 @@ const Ki = 240, gn = ({
3998
4012
  ]
3999
4013
  }
4000
4014
  ),
4001
- /* @__PURE__ */ e(m, { direction: "column", overflow: "overflow-y-auto", children: t.map((g, p) => {
4002
- const x = !g.locked;
4015
+ /* @__PURE__ */ e(f, { direction: "column", overflow: "overflow-y-auto", children: t.map((p, g) => {
4016
+ const x = !p.locked;
4003
4017
  return /* @__PURE__ */ u(
4004
- m,
4018
+ f,
4005
4019
  {
4006
4020
  direction: "row",
4007
4021
  display: "flex",
@@ -4009,19 +4023,19 @@ const Ki = 240, gn = ({
4009
4023
  gap: "sm",
4010
4024
  paddingBlock: "xs",
4011
4025
  draggable: x,
4012
- onDragStart: () => x && s(p),
4026
+ onDragStart: () => x && s(g),
4013
4027
  onDragOver: (y) => {
4014
- y.preventDefault(), a(p);
4028
+ y.preventDefault(), d(g);
4015
4029
  },
4016
- onDrop: d,
4017
- onDragEnd: d,
4030
+ onDrop: a,
4031
+ onDragEnd: a,
4018
4032
  style: {
4019
4033
  minHeight: 32,
4020
- boxShadow: c === p && l !== null && l !== p ? "inset 0 2px 0 0 var(--sa-background-brand, #04254f)" : void 0
4034
+ boxShadow: c === g && l !== null && l !== g ? "inset 0 2px 0 0 var(--sa-background-brand, #04254f)" : void 0
4021
4035
  },
4022
4036
  children: [
4023
4037
  /* @__PURE__ */ e(
4024
- m,
4038
+ f,
4025
4039
  {
4026
4040
  direction: "column",
4027
4041
  as: "div",
@@ -4029,11 +4043,11 @@ const Ki = 240, gn = ({
4029
4043
  justify: "center",
4030
4044
  role: "button",
4031
4045
  tabIndex: x ? 0 : -1,
4032
- "aria-label": `Reorder ${g.title}`,
4046
+ "aria-label": `Reorder ${p.title}`,
4033
4047
  "aria-disabled": !x || void 0,
4034
4048
  color: "icon-subtlest",
4035
4049
  onKeyDown: (y) => {
4036
- x && (y.key === "ArrowUp" ? (y.preventDefault(), f(p, -1)) : y.key === "ArrowDown" && (y.preventDefault(), f(p, 1)));
4050
+ x && (y.key === "ArrowUp" ? (y.preventDefault(), m(g, -1)) : y.key === "ArrowDown" && (y.preventDefault(), m(g, 1)));
4037
4051
  },
4038
4052
  style: {
4039
4053
  display: "inline-flex",
@@ -4043,7 +4057,7 @@ const Ki = 240, gn = ({
4043
4057
  children: /* @__PURE__ */ e(F, { name: "DragVertical", width: 16, height: 16 })
4044
4058
  }
4045
4059
  ),
4046
- g.icon && /* @__PURE__ */ e(m, { direction: "column", align: "center", color: "icon-subtle", style: { display: "inline-flex" }, children: g.icon }),
4060
+ p.icon && /* @__PURE__ */ e(f, { direction: "column", align: "center", color: "icon-subtle", style: { display: "inline-flex" }, children: p.icon }),
4047
4061
  /* @__PURE__ */ e(
4048
4062
  D,
4049
4063
  {
@@ -4051,22 +4065,22 @@ const Ki = 240, gn = ({
4051
4065
  fontWeight: "medium",
4052
4066
  color: "primary",
4053
4067
  truncate: !0,
4054
- children: g.title
4068
+ children: p.title
4055
4069
  }
4056
4070
  ),
4057
- /* @__PURE__ */ e(m, { direction: "column", style: { marginLeft: "auto" }, children: /* @__PURE__ */ e(
4071
+ /* @__PURE__ */ e(f, { direction: "column", style: { marginLeft: "auto" }, children: /* @__PURE__ */ e(
4058
4072
  At,
4059
4073
  {
4060
4074
  size: "sm",
4061
- checked: g.visible,
4062
- disabled: g.locked,
4063
- onChange: () => n(g.key),
4064
- "aria-label": `Toggle ${g.title} column`
4075
+ checked: p.visible,
4076
+ disabled: p.locked,
4077
+ onChange: () => n(p.key),
4078
+ "aria-label": `Toggle ${p.title} column`
4065
4079
  }
4066
4080
  ) })
4067
4081
  ]
4068
4082
  },
4069
- g.key
4083
+ p.key
4070
4084
  );
4071
4085
  }) })
4072
4086
  ]
@@ -4101,14 +4115,14 @@ const Ki = 240, gn = ({
4101
4115
  width: "260px"
4102
4116
  },
4103
4117
  children: [
4104
- /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ u(m, { direction: "column", padding: "xs", gap: "sm", children: [
4118
+ /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ u(f, { direction: "column", padding: "xs", gap: "sm", children: [
4105
4119
  /* @__PURE__ */ e(D, { fontWeight: "semibold", color: "primary", children: "Saved Views" }),
4106
4120
  /* @__PURE__ */ e(
4107
- m,
4121
+ f,
4108
4122
  {
4109
4123
  direction: "column",
4110
4124
  overflow: "overflow-y-auto",
4111
- children: t.length === 0 ? /* @__PURE__ */ e(m, { direction: "column", paddingBlock: "sm", children: /* @__PURE__ */ e(D, { fontSize: "sm", color: "subtlest", children: "No saved views yet" }) }) : t.map((c) => /* @__PURE__ */ e(
4125
+ children: t.length === 0 ? /* @__PURE__ */ e(f, { direction: "column", paddingBlock: "sm", children: /* @__PURE__ */ e(D, { fontSize: "sm", color: "subtlest", children: "No saved views yet" }) }) : t.map((c) => /* @__PURE__ */ e(
4112
4126
  Ve,
4113
4127
  {
4114
4128
  startIcon: /* @__PURE__ */ e(F, { name: "Bookmark" }),
@@ -4121,8 +4135,8 @@ const Ki = 240, gn = ({
4121
4135
  size: "sm",
4122
4136
  iconLeft: /* @__PURE__ */ e(F, { name: "Trash2" }),
4123
4137
  "aria-label": `Delete ${c.name}`,
4124
- onClick: (a) => {
4125
- a.stopPropagation(), n(c.id);
4138
+ onClick: (d) => {
4139
+ d.stopPropagation(), n(c.id);
4126
4140
  }
4127
4141
  }
4128
4142
  ),
@@ -4136,8 +4150,8 @@ const Ki = 240, gn = ({
4136
4150
  /* @__PURE__ */ e(
4137
4151
  sr,
4138
4152
  {
4139
- children: /* @__PURE__ */ u(m, { direction: "row", gap: "xs", children: [
4140
- /* @__PURE__ */ e(m, { direction: "column", style: { flex: "1 0 0", minWidth: 0 }, children: /* @__PURE__ */ e(
4153
+ children: /* @__PURE__ */ u(f, { direction: "row", gap: "xs", children: [
4154
+ /* @__PURE__ */ e(f, { direction: "column", style: { flex: "1 0 0", minWidth: 0 }, children: /* @__PURE__ */ e(
4141
4155
  st,
4142
4156
  {
4143
4157
  size: "sm",
@@ -4177,21 +4191,21 @@ const Ki = 240, gn = ({
4177
4191
  hasActiveFilter: l,
4178
4192
  onToggle: s,
4179
4193
  onReset: c,
4180
- getValue: a,
4181
- setValue: d,
4182
- clearValue: f,
4183
- removeFilter: g
4194
+ getValue: d,
4195
+ setValue: a,
4196
+ clearValue: m,
4197
+ removeFilter: p
4184
4198
  }) => {
4185
- const p = o.length;
4199
+ const g = o.length;
4186
4200
  return /* @__PURE__ */ e(Xr, { position: "bottom", isShow: t, onHide: r, children: /* @__PURE__ */ u(
4187
- m,
4201
+ f,
4188
4202
  {
4189
4203
  direction: "column",
4190
4204
  customMaxHeight: "85vh",
4191
4205
  style: { minHeight: 280 },
4192
4206
  children: [
4193
4207
  /* @__PURE__ */ u(
4194
- m,
4208
+ f,
4195
4209
  {
4196
4210
  direction: "row",
4197
4211
  display: "flex",
@@ -4203,11 +4217,11 @@ const Ki = 240, gn = ({
4203
4217
  borderBottom: "1px solid var(--sa-border-subtle, rgba(11, 18, 14, 0.14))"
4204
4218
  },
4205
4219
  children: [
4206
- /* @__PURE__ */ u(m, { direction: "row", display: "flex", align: "center", gap: "xs", children: [
4220
+ /* @__PURE__ */ u(f, { direction: "row", display: "flex", align: "center", gap: "xs", children: [
4207
4221
  /* @__PURE__ */ e(D, { fontWeight: "semibold", color: "primary", children: "Filter" }),
4208
- p > 0 && /* @__PURE__ */ u(D, { fontSize: "sm", color: "subtle", children: [
4222
+ g > 0 && /* @__PURE__ */ u(D, { fontSize: "sm", color: "subtle", children: [
4209
4223
  "(",
4210
- p,
4224
+ g,
4211
4225
  ")"
4212
4226
  ] })
4213
4227
  ] }),
@@ -4226,7 +4240,7 @@ const Ki = 240, gn = ({
4226
4240
  }
4227
4241
  ),
4228
4242
  /* @__PURE__ */ u(
4229
- m,
4243
+ f,
4230
4244
  {
4231
4245
  direction: "column",
4232
4246
  gap: "lg",
@@ -4234,10 +4248,10 @@ const Ki = 240, gn = ({
4234
4248
  overflow: "overflow-y-auto",
4235
4249
  style: { flex: "1 1 auto", minHeight: 0 },
4236
4250
  children: [
4237
- p > 0 && /* @__PURE__ */ u(m, { direction: "column", gap: "sm", children: [
4251
+ g > 0 && /* @__PURE__ */ u(f, { direction: "column", gap: "sm", children: [
4238
4252
  /* @__PURE__ */ e(D, { fontSize: "xs", fontWeight: "medium", color: "subtlest", children: "Filter aktif" }),
4239
4253
  /* @__PURE__ */ e(
4240
- m,
4254
+ f,
4241
4255
  {
4242
4256
  direction: "row",
4243
4257
  display: "flex",
@@ -4249,21 +4263,21 @@ const Ki = 240, gn = ({
4249
4263
  {
4250
4264
  activeKeys: o,
4251
4265
  configByKey: i,
4252
- getValue: a,
4253
- setValue: d,
4254
- clearValue: f,
4255
- removeFilter: g
4266
+ getValue: d,
4267
+ setValue: a,
4268
+ clearValue: m,
4269
+ removeFilter: p
4256
4270
  }
4257
4271
  )
4258
4272
  }
4259
4273
  )
4260
4274
  ] }),
4261
- n.length > 0 && /* @__PURE__ */ u(m, { direction: "column", gap: "sm", children: [
4275
+ n.length > 0 && /* @__PURE__ */ u(f, { direction: "column", gap: "sm", children: [
4262
4276
  /* @__PURE__ */ e(D, { fontSize: "xs", fontWeight: "medium", color: "subtlest", children: "Tambah filter" }),
4263
- /* @__PURE__ */ e(m, { direction: "column", children: n.map((x) => {
4277
+ /* @__PURE__ */ e(f, { direction: "column", children: n.map((x) => {
4264
4278
  const W = o.includes(x.key), y = !!x.locked;
4265
4279
  return /* @__PURE__ */ u(
4266
- m,
4280
+ f,
4267
4281
  {
4268
4282
  direction: "row",
4269
4283
  display: "flex",
@@ -4277,7 +4291,7 @@ const Ki = 240, gn = ({
4277
4291
  },
4278
4292
  children: [
4279
4293
  /* @__PURE__ */ u(
4280
- m,
4294
+ f,
4281
4295
  {
4282
4296
  direction: "row",
4283
4297
  display: "flex",
@@ -4286,7 +4300,7 @@ const Ki = 240, gn = ({
4286
4300
  style: { minWidth: 0 },
4287
4301
  children: [
4288
4302
  x.icon && /* @__PURE__ */ e(
4289
- m,
4303
+ f,
4290
4304
  {
4291
4305
  direction: "column",
4292
4306
  align: "center",
@@ -4319,7 +4333,7 @@ const Ki = 240, gn = ({
4319
4333
  }
4320
4334
  ),
4321
4335
  /* @__PURE__ */ u(
4322
- m,
4336
+ f,
4323
4337
  {
4324
4338
  direction: "row",
4325
4339
  display: "flex",
@@ -4330,7 +4344,7 @@ const Ki = 240, gn = ({
4330
4344
  borderTop: "1px solid var(--sa-border-subtle, rgba(11, 18, 14, 0.14))"
4331
4345
  },
4332
4346
  children: [
4333
- /* @__PURE__ */ e(m, { direction: "column", style: { flex: "1 1 0" }, children: /* @__PURE__ */ e(
4347
+ /* @__PURE__ */ e(f, { direction: "column", style: { flex: "1 1 0" }, children: /* @__PURE__ */ e(
4334
4348
  T,
4335
4349
  {
4336
4350
  variant: "outline",
@@ -4342,7 +4356,7 @@ const Ki = 240, gn = ({
4342
4356
  children: "Reset"
4343
4357
  }
4344
4358
  ) }),
4345
- /* @__PURE__ */ e(m, { direction: "column", style: { flex: "1 1 0" }, children: /* @__PURE__ */ e(
4359
+ /* @__PURE__ */ e(f, { direction: "column", style: { flex: "1 1 0" }, children: /* @__PURE__ */ e(
4346
4360
  T,
4347
4361
  {
4348
4362
  variant: "primary",
@@ -4366,10 +4380,10 @@ const Ki = 240, gn = ({
4366
4380
  defaultPerPage: o = 10,
4367
4381
  showPageSize: i
4368
4382
  }) => {
4369
- const { searchQueries: l, setSearchParams: s, searchParams: c } = Ie(), a = c.get(t), d = a ? Number(a) : o, f = (g) => {
4383
+ const { searchQueries: l, setSearchParams: s, searchParams: c } = Ie(), d = c.get(t), a = d ? Number(d) : o, m = (p) => {
4370
4384
  s({
4371
4385
  ...l,
4372
- [t]: g,
4386
+ [t]: p,
4373
4387
  [r]: "1"
4374
4388
  });
4375
4389
  };
@@ -4385,16 +4399,16 @@ const Ki = 240, gn = ({
4385
4399
  }
4386
4400
  ) }),
4387
4401
  /* @__PURE__ */ e(Be, { children: /* @__PURE__ */ u(ze, { style: { minWidth: 200 }, children: [
4388
- /* @__PURE__ */ e(m, { paddingInline: "sm", paddingBlock: "xs", children: /* @__PURE__ */ e(D, { fontSize: "xs", fontWeight: "medium", color: "subtlest", children: "Rows per page" }) }),
4389
- n.map((g) => /* @__PURE__ */ e(
4402
+ /* @__PURE__ */ e(f, { paddingInline: "sm", paddingBlock: "xs", children: /* @__PURE__ */ e(D, { fontSize: "xs", fontWeight: "medium", color: "subtlest", children: "Rows per page" }) }),
4403
+ n.map((p) => /* @__PURE__ */ e(
4390
4404
  Ve,
4391
4405
  {
4392
- selected: g === d,
4393
- endIcon: g === d ? /* @__PURE__ */ e(F, { name: "Check" }) : void 0,
4394
- onClick: () => f(String(g)),
4395
- children: to(g)
4406
+ selected: p === a,
4407
+ endIcon: p === a ? /* @__PURE__ */ e(F, { name: "Check" }) : void 0,
4408
+ onClick: () => m(String(p)),
4409
+ children: to(p)
4396
4410
  },
4397
- g
4411
+ p
4398
4412
  ))
4399
4413
  ] }) })
4400
4414
  ] }) : null;
@@ -4408,11 +4422,11 @@ const Ki = 240, gn = ({
4408
4422
  hasActiveFilter: l,
4409
4423
  toggleFilter: s,
4410
4424
  removeFilter: c,
4411
- getValue: a,
4412
- setValue: d,
4413
- clearValue: f,
4414
- onReset: g,
4415
- searchable: p,
4425
+ getValue: d,
4426
+ setValue: a,
4427
+ clearValue: m,
4428
+ onReset: p,
4429
+ searchable: g,
4416
4430
  searchKey: x,
4417
4431
  filterKey: W,
4418
4432
  pageKey: y,
@@ -4439,10 +4453,10 @@ const Ki = 240, gn = ({
4439
4453
  } = t, [ye, ge] = R(!1), { searchQueries: pe, setSearchParams: Ee } = Ie(), Ne = (w == null ? void 0 : w.rangeStart) ?? (((w == null ? void 0 : w.currentPage) || 0) > 1 ? (((w == null ? void 0 : w.currentPage) || 0) - 1) * ((w == null ? void 0 : w.perPage) || 0) + 1 : 1), Ue = (w == null ? void 0 : w.rangeEnd) ?? ((w == null ? void 0 : w.totalCurrentPage) !== (w == null ? void 0 : w.perPage) ? w == null ? void 0 : w.totalData : ((w == null ? void 0 : w.currentPage) || 1) * ((w == null ? void 0 : w.totalCurrentPage) || 0)), Je = ($e) => {
4440
4454
  Ee({ ...pe, [y]: String($e) });
4441
4455
  }, Ce = C || z && !!(w != null && w.totalPage), we = () => {
4442
- g(), ge(!1);
4456
+ p(), ge(!1);
4443
4457
  };
4444
4458
  return /* @__PURE__ */ u(
4445
- m,
4459
+ f,
4446
4460
  {
4447
4461
  direction: "column",
4448
4462
  gap: "sm",
@@ -4455,7 +4469,7 @@ const Ki = 240, gn = ({
4455
4469
  "aria-label": "Filter bar",
4456
4470
  children: [
4457
4471
  /* @__PURE__ */ u(
4458
- m,
4472
+ f,
4459
4473
  {
4460
4474
  direction: "row",
4461
4475
  display: "flex",
@@ -4465,7 +4479,7 @@ const Ki = 240, gn = ({
4465
4479
  fullWidth: !0,
4466
4480
  overflow: "overflow-auto",
4467
4481
  children: [
4468
- p && /* @__PURE__ */ e(
4482
+ g && /* @__PURE__ */ e(
4469
4483
  gn,
4470
4484
  {
4471
4485
  searchKey: x,
@@ -4488,7 +4502,7 @@ const Ki = 240, gn = ({
4488
4502
  }
4489
4503
  ),
4490
4504
  /* @__PURE__ */ u(
4491
- m,
4505
+ f,
4492
4506
  {
4493
4507
  direction: "row",
4494
4508
  display: "flex",
@@ -4532,7 +4546,7 @@ const Ki = 240, gn = ({
4532
4546
  }
4533
4547
  ),
4534
4548
  Ce && /* @__PURE__ */ u(
4535
- m,
4549
+ f,
4536
4550
  {
4537
4551
  direction: "row",
4538
4552
  display: "flex",
@@ -4541,7 +4555,7 @@ const Ki = 240, gn = ({
4541
4555
  gap: "sm",
4542
4556
  fullWidth: !0,
4543
4557
  children: [
4544
- C ? /* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", color: "primary", truncate: !0, children: `${Ne}-${Ue} of ${((Ae = w == null ? void 0 : w.totalData) == null ? void 0 : Ae.toLocaleString()) || 0}` }) : /* @__PURE__ */ e(m, { direction: "column" }),
4558
+ C ? /* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", color: "primary", truncate: !0, children: `${Ne}-${Ue} of ${((Ae = w == null ? void 0 : w.totalData) == null ? void 0 : Ae.toLocaleString()) || 0}` }) : /* @__PURE__ */ e(f, { direction: "column" }),
4545
4559
  z && !!(w != null && w.totalPage) && /* @__PURE__ */ e(
4546
4560
  ar,
4547
4561
  {
@@ -4567,9 +4581,9 @@ const Ki = 240, gn = ({
4567
4581
  hasActiveFilter: l,
4568
4582
  onToggle: s,
4569
4583
  onReset: we,
4570
- getValue: a,
4571
- setValue: d,
4572
- clearValue: f,
4584
+ getValue: d,
4585
+ setValue: a,
4586
+ clearValue: m,
4573
4587
  removeFilter: c
4574
4588
  }
4575
4589
  )
@@ -4585,11 +4599,11 @@ const Ki = 240, gn = ({
4585
4599
  perPageKey: l = "perPage",
4586
4600
  pageSizeOptions: s = [25, 50, 100],
4587
4601
  defaultPerPage: c,
4588
- showPagination: a = !0,
4589
- showResultCount: d = !0,
4590
- showPageSize: f = !0,
4591
- searchable: g = !1,
4592
- searchKey: p = "q",
4602
+ showPagination: d = !0,
4603
+ showResultCount: a = !0,
4604
+ showPageSize: m = !0,
4605
+ searchable: p = !1,
4606
+ searchKey: g = "q",
4593
4607
  searchPlaceholder: x = "Search",
4594
4608
  searchShortcut: W = "/",
4595
4609
  pagination: y,
@@ -4617,7 +4631,7 @@ const Ki = 240, gn = ({
4617
4631
  filterKey: n,
4618
4632
  activeFilterKey: o,
4619
4633
  pageKey: i,
4620
- searchKey: p
4634
+ searchKey: g
4621
4635
  }), O = Mi({
4622
4636
  columns: k,
4623
4637
  scopeId: B,
@@ -4654,7 +4668,7 @@ const Ki = 240, gn = ({
4654
4668
  ee(), ye.clear(), C == null || C();
4655
4669
  };
4656
4670
  return ke("md") ? /* @__PURE__ */ u(
4657
- m,
4671
+ f,
4658
4672
  {
4659
4673
  display: "flex",
4660
4674
  direction: "row",
@@ -4670,7 +4684,7 @@ const Ki = 240, gn = ({
4670
4684
  "aria-label": "Filter bar",
4671
4685
  children: [
4672
4686
  /* @__PURE__ */ u(
4673
- m,
4687
+ f,
4674
4688
  {
4675
4689
  direction: "row",
4676
4690
  display: "flex",
@@ -4689,7 +4703,7 @@ const Ki = 240, gn = ({
4689
4703
  }
4690
4704
  ),
4691
4705
  /* @__PURE__ */ u(
4692
- m,
4706
+ f,
4693
4707
  {
4694
4708
  direction: "row",
4695
4709
  display: "flex",
@@ -4725,7 +4739,7 @@ const Ki = 240, gn = ({
4725
4739
  ]
4726
4740
  }
4727
4741
  ),
4728
- /* @__PURE__ */ u(m, { direction: "row", display: "flex", align: "center", gap: "sm", children: [
4742
+ /* @__PURE__ */ u(f, { direction: "row", display: "flex", align: "center", gap: "sm", children: [
4729
4743
  /* @__PURE__ */ e(
4730
4744
  Yi,
4731
4745
  {
@@ -4734,15 +4748,15 @@ const Ki = 240, gn = ({
4734
4748
  perPageKey: l,
4735
4749
  pageSizeOptions: s,
4736
4750
  defaultPerPage: pe,
4737
- showPagination: a,
4738
- showResultCount: d,
4739
- showPageSize: f
4751
+ showPagination: d,
4752
+ showResultCount: a,
4753
+ showPageSize: m
4740
4754
  }
4741
4755
  ),
4742
- g && /* @__PURE__ */ e(
4756
+ p && /* @__PURE__ */ e(
4743
4757
  gn,
4744
4758
  {
4745
- searchKey: p,
4759
+ searchKey: g,
4746
4760
  filterKey: n,
4747
4761
  pageKey: i,
4748
4762
  placeholder: x,
@@ -4785,8 +4799,8 @@ const Ki = 240, gn = ({
4785
4799
  setValue: ae,
4786
4800
  clearValue: de,
4787
4801
  onReset: Ne,
4788
- searchable: g,
4789
- searchKey: p,
4802
+ searchable: p,
4803
+ searchKey: g,
4790
4804
  filterKey: n,
4791
4805
  pageKey: i,
4792
4806
  searchPlaceholder: x,
@@ -4795,9 +4809,9 @@ const Ki = 240, gn = ({
4795
4809
  perPageKey: l,
4796
4810
  pageSizeOptions: s,
4797
4811
  defaultPerPage: pe,
4798
- showPagination: a,
4799
- showResultCount: d,
4800
- showPageSize: f,
4812
+ showPagination: d,
4813
+ showResultCount: a,
4814
+ showPageSize: m,
4801
4815
  hasColumns: k.length > 0,
4802
4816
  orderedColumns: O.orderedColumns,
4803
4817
  allVisible: O.allVisible,
@@ -4847,10 +4861,10 @@ const Ki = 240, gn = ({
4847
4861
  perPageKey: l = "perPage",
4848
4862
  searchKey: s = "q",
4849
4863
  defaultPage: c = 1,
4850
- defaultPerPage: a = 10,
4851
- paramKeys: d,
4852
- serialize: f
4853
- } = t, { activeKeys: g, configByKey: p, hasActiveFilter: x, getValue: W } = yr({
4864
+ defaultPerPage: d = 10,
4865
+ paramKeys: a,
4866
+ serialize: m
4867
+ } = t, { activeKeys: p, configByKey: g, hasActiveFilter: x, getValue: W } = yr({
4854
4868
  configs: r,
4855
4869
  filterKey: n,
4856
4870
  activeFilterKey: o,
@@ -4858,20 +4872,20 @@ const Ki = 240, gn = ({
4858
4872
  searchKey: s
4859
4873
  }), { searchParams: y } = Ie(), k = y.toString();
4860
4874
  return fe(() => {
4861
- const w = {}, V = {}, v = _r(y.get(i), c), A = _r(y.get(l), a);
4862
- w[(d == null ? void 0 : d.page) ?? "page"] = v, w[(d == null ? void 0 : d.perPage) ?? "perPage"] = A;
4875
+ const w = {}, V = {}, v = _r(y.get(i), c), A = _r(y.get(l), d);
4876
+ w[(a == null ? void 0 : a.page) ?? "page"] = v, w[(a == null ? void 0 : a.perPage) ?? "perPage"] = A;
4863
4877
  const z = pr(s, y, n) || "";
4864
- z && (w[(d == null ? void 0 : d.search) ?? "search"] = z);
4878
+ z && (w[(a == null ? void 0 : a.search) ?? "search"] = z);
4865
4879
  let C = !1;
4866
- for (const B of g) {
4867
- const j = p[B];
4880
+ for (const B of p) {
4881
+ const j = g[B];
4868
4882
  if (!j) continue;
4869
4883
  const G = W(j);
4870
4884
  V[B] = G;
4871
- const _ = f == null ? void 0 : f[B], X = _ ? _(G) : lo(j, G);
4885
+ const _ = m == null ? void 0 : m[B], X = _ ? _(G) : lo(j, G);
4872
4886
  if (X == null || Array.isArray(X) && X.length === 0)
4873
4887
  continue;
4874
- const te = (d == null ? void 0 : d[B]) ?? B;
4888
+ const te = (a == null ? void 0 : a[B]) ?? B;
4875
4889
  w[te] = X, C = !0;
4876
4890
  }
4877
4891
  return {
@@ -4881,17 +4895,17 @@ const Ki = 240, gn = ({
4881
4895
  };
4882
4896
  }, [
4883
4897
  k,
4884
- g.join("|"),
4898
+ p.join("|"),
4885
4899
  n,
4886
4900
  o,
4887
4901
  i,
4888
4902
  l,
4889
4903
  s,
4890
4904
  c,
4891
- a,
4892
4905
  d,
4893
- f,
4894
- p
4906
+ a,
4907
+ m,
4908
+ g
4895
4909
  ]);
4896
4910
  }, co = [
4897
4911
  "dropdown",
@@ -4905,17 +4919,17 @@ const Ki = 240, gn = ({
4905
4919
  pageKey: o,
4906
4920
  searchKey: i
4907
4921
  }) => {
4908
- const { configByKey: l, getValue: s, setValue: c, removeFilter: a, clearAll: d, hasActiveFilter: f } = yr({
4922
+ const { configByKey: l, getValue: s, setValue: c, removeFilter: d, clearAll: a, hasActiveFilter: m } = yr({
4909
4923
  configs: t,
4910
4924
  filterKey: r,
4911
4925
  activeFilterKey: n,
4912
4926
  pageKey: o,
4913
4927
  searchKey: i
4914
- }), g = (E, w) => {
4928
+ }), p = (E, w) => {
4915
4929
  var v;
4916
4930
  const V = E.options;
4917
4931
  return ((v = V == null ? void 0 : V.find((A) => A.value === w)) == null ? void 0 : v.label) ?? w;
4918
- }, p = Q(
4932
+ }, g = Q(
4919
4933
  (E) => {
4920
4934
  const w = l[E];
4921
4935
  if (!w) return [];
@@ -4929,26 +4943,26 @@ const Ki = 240, gn = ({
4929
4943
  if (!V || !co.includes(V.type)) return;
4930
4944
  const v = Array.isArray(w) ? w : [w];
4931
4945
  if (v.length === 0) {
4932
- a(E);
4946
+ d(E);
4933
4947
  return;
4934
4948
  }
4935
4949
  c(
4936
4950
  V,
4937
- v.map((A) => ({ label: g(V, A), value: A }))
4951
+ v.map((A) => ({ label: p(V, A), value: A }))
4938
4952
  );
4939
4953
  },
4940
- [l, c, a]
4954
+ [l, c, d]
4941
4955
  ), W = Q(
4942
4956
  (E, w) => {
4943
- const V = p(E);
4957
+ const V = g(E);
4944
4958
  x(E, V.includes(w) ? V.filter((v) => v !== w) : [...V, w]);
4945
4959
  },
4946
- [p, x]
4960
+ [g, x]
4947
4961
  ), y = Q(
4948
- (E, w) => p(E).includes(w),
4949
- [p]
4950
- ), k = Q((E) => a(E), [a]);
4951
- return { set: x, toggle: W, clear: k, clearAll: d, isActive: y, values: p, hasActiveFilter: f };
4962
+ (E, w) => g(E).includes(w),
4963
+ [g]
4964
+ ), k = Q((E) => d(E), [d]);
4965
+ return { set: x, toggle: W, clear: k, clearAll: a, isActive: y, values: g, hasActiveFilter: m };
4952
4966
  }, ec = (t, r) => {
4953
4967
  if (!t) return {};
4954
4968
  const { fromKey: n, toKey: o, opKey: i } = r, l = {};
@@ -4973,7 +4987,7 @@ const Ki = 240, gn = ({
4973
4987
  return l;
4974
4988
  }
4975
4989
  }, so = ({ children: t, borderRadius: r, height: n }) => {
4976
- const o = se(null), [i, l] = R("100vh");
4990
+ const o = ce(null), [i, l] = R("100vh");
4977
4991
  return U(() => {
4978
4992
  if (n) return;
4979
4993
  const s = () => {
@@ -4984,7 +4998,7 @@ const Ki = 240, gn = ({
4984
4998
  };
4985
4999
  return s(), window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
4986
5000
  }, [n]), /* @__PURE__ */ e(
4987
- m,
5001
+ f,
4988
5002
  {
4989
5003
  ref: o,
4990
5004
  fullWidth: !0,
@@ -5010,7 +5024,7 @@ const Ki = 240, gn = ({
5010
5024
  }) => {
5011
5025
  const s = ke("md"), c = l ? /* @__PURE__ */ e(Ei, { ...i }) : null;
5012
5026
  return /* @__PURE__ */ e(
5013
- m,
5027
+ f,
5014
5028
  {
5015
5029
  style: {
5016
5030
  display: "flex",
@@ -5029,14 +5043,14 @@ const Ki = 240, gn = ({
5029
5043
  gap: "16px"
5030
5044
  },
5031
5045
  children: o ? o({ filter: c }) : /* @__PURE__ */ u(ie, { children: [
5032
- /* @__PURE__ */ u(m, { style: { display: "flex", gap: "8px", flexDirection: "row", alignItems: "center", flex: 1, minWidth: 0 }, children: [
5046
+ /* @__PURE__ */ u(f, { style: { display: "flex", gap: "8px", flexDirection: "row", alignItems: "center", flex: 1, minWidth: 0 }, children: [
5033
5047
  c,
5034
5048
  n
5035
5049
  ] }),
5036
- /* @__PURE__ */ u(m, { style: { display: "flex", gap: "8px", flexDirection: "row", alignItems: "center", flexShrink: 0 }, children: [
5050
+ /* @__PURE__ */ u(f, { style: { display: "flex", gap: "8px", flexDirection: "row", alignItems: "center", flexShrink: 0 }, children: [
5037
5051
  r,
5038
5052
  t ? nr(t) ? t : /* @__PURE__ */ e(
5039
- m,
5053
+ f,
5040
5054
  {
5041
5055
  style: {
5042
5056
  display: "flex",
@@ -5046,14 +5060,14 @@ const Ki = 240, gn = ({
5046
5060
  textWrap: "nowrap"
5047
5061
  },
5048
5062
  children: t.map(
5049
- ({ title: d, icon: f, buttonProps: g, onClick: p }, x) => !d && !f ? null : /* @__PURE__ */ e(
5063
+ ({ title: a, icon: m, buttonProps: p, onClick: g }, x) => !a && !m ? null : /* @__PURE__ */ e(
5050
5064
  T,
5051
5065
  {
5052
5066
  fullWidth: !s,
5053
- iconLeft: f ? /* @__PURE__ */ e(F, { name: f }) : void 0,
5054
- onClick: p,
5055
- ...g,
5056
- children: d
5067
+ iconLeft: m ? /* @__PURE__ */ e(F, { name: m }) : void 0,
5068
+ onClick: g,
5069
+ ...p,
5070
+ children: a
5057
5071
  },
5058
5072
  `action-${x}`
5059
5073
  )
@@ -5069,7 +5083,7 @@ const Ki = 240, gn = ({
5069
5083
  withMarginBottom: r = !0,
5070
5084
  withMarginTop: n = !0
5071
5085
  }) => /* @__PURE__ */ u(
5072
- m,
5086
+ f,
5073
5087
  {
5074
5088
  style: {
5075
5089
  display: "flex",
@@ -5103,17 +5117,17 @@ const Ki = 240, gn = ({
5103
5117
  showPagination: i = !0,
5104
5118
  totalData: l
5105
5119
  }) => {
5106
- const { searchQueries: s, setSearchParams: c, searchParams: a } = Ie(), d = a.get(n), f = (W) => {
5120
+ const { searchQueries: s, setSearchParams: c, searchParams: d } = Ie(), a = d.get(n), m = (W) => {
5107
5121
  c({ ...s, [r]: String(W) });
5108
- }, g = (W) => {
5122
+ }, p = (W) => {
5109
5123
  c({
5110
5124
  ...s,
5111
5125
  [n]: W,
5112
5126
  [r]: "1"
5113
5127
  });
5114
- }, p = (t == null ? void 0 : t.rangeStart) ?? (((t == null ? void 0 : t.currentPage) || 0) > 1 ? (((t == null ? void 0 : t.currentPage) || 0) - 1) * ((t == null ? void 0 : t.perPage) || 0) + 1 : 1), x = (t == null ? void 0 : t.rangeEnd) ?? ((t == null ? void 0 : t.totalCurrentPage) !== (t == null ? void 0 : t.perPage) ? t == null ? void 0 : t.totalData : ((t == null ? void 0 : t.currentPage) || 1) * ((t == null ? void 0 : t.totalCurrentPage) || 0));
5128
+ }, g = (t == null ? void 0 : t.rangeStart) ?? (((t == null ? void 0 : t.currentPage) || 0) > 1 ? (((t == null ? void 0 : t.currentPage) || 0) - 1) * ((t == null ? void 0 : t.perPage) || 0) + 1 : 1), x = (t == null ? void 0 : t.rangeEnd) ?? ((t == null ? void 0 : t.totalCurrentPage) !== (t == null ? void 0 : t.perPage) ? t == null ? void 0 : t.totalData : ((t == null ? void 0 : t.currentPage) || 1) * ((t == null ? void 0 : t.totalCurrentPage) || 0));
5115
5129
  return /* @__PURE__ */ e(
5116
- m,
5130
+ f,
5117
5131
  {
5118
5132
  style: {
5119
5133
  display: "flex",
@@ -5129,7 +5143,7 @@ const Ki = 240, gn = ({
5129
5143
  flexShrink: 0
5130
5144
  },
5131
5145
  children: i ? /* @__PURE__ */ u(ie, { children: [
5132
- /* @__PURE__ */ u(m, { style: { display: "flex", flexDirection: "row", gap: "8px", alignItems: "center", textWrap: "nowrap" }, children: [
5146
+ /* @__PURE__ */ u(f, { style: { display: "flex", flexDirection: "row", gap: "8px", alignItems: "center", textWrap: "nowrap" }, children: [
5133
5147
  /* @__PURE__ */ e(D, { children: "Rows Per Page: " }),
5134
5148
  /* @__PURE__ */ e(
5135
5149
  Bt,
@@ -5142,20 +5156,20 @@ const Ki = 240, gn = ({
5142
5156
  { label: "100", value: "100" }
5143
5157
  ],
5144
5158
  onChange: (W) => {
5145
- g(W[0].value);
5159
+ p(W[0].value);
5146
5160
  },
5147
- value: d ? [{ label: `${d} per row`, value: d }] : [{ label: `${o} per row`, value: `${o}` }],
5148
- defaultValue: d ? [{ label: `${d} per row`, value: d }] : [{ label: `${o} per row`, value: `${o}` }]
5161
+ value: a ? [{ label: `${a} per row`, value: a }] : [{ label: `${o} per row`, value: `${o}` }],
5162
+ defaultValue: a ? [{ label: `${a} per row`, value: a }] : [{ label: `${o} per row`, value: `${o}` }]
5149
5163
  }
5150
5164
  ),
5151
- /* @__PURE__ */ e(D, { children: `${p}-${x} of ${(t == null ? void 0 : t.totalData) || 0}` })
5165
+ /* @__PURE__ */ e(D, { children: `${g}-${x} of ${(t == null ? void 0 : t.totalData) || 0}` })
5152
5166
  ] }),
5153
5167
  /* @__PURE__ */ e(
5154
5168
  ar,
5155
5169
  {
5156
5170
  currentPage: t != null && t.currentPage ? Number(t == null ? void 0 : t.currentPage) : 1,
5157
5171
  totalPages: t != null && t.totalPage ? Number(t == null ? void 0 : t.totalPage) : 1,
5158
- onPageChange: f
5172
+ onPageChange: m
5159
5173
  }
5160
5174
  )
5161
5175
  ] }) : /* @__PURE__ */ e(
@@ -5169,7 +5183,7 @@ const Ki = 240, gn = ({
5169
5183
  }
5170
5184
  );
5171
5185
  }, fo = ({ filter: t, columnTitle: r }) => {
5172
- const [n, o] = R(!1), i = se(null), l = se(null), s = se(null), [c, a] = R(""), [d, f] = R({ top: 0, left: 0 }), g = t.selectedValues, p = fe(() => c ? t.options.filter(
5186
+ const [n, o] = R(!1), i = ce(null), l = ce(null), s = ce(null), [c, d] = R(""), [a, m] = R({ top: 0, left: 0 }), p = t.selectedValues, g = fe(() => c ? t.options.filter(
5173
5187
  (y) => y.label.toLowerCase().includes(c.toLowerCase())
5174
5188
  ) : t.options, [t.options, c]);
5175
5189
  U(() => {
@@ -5177,13 +5191,13 @@ const Ki = 240, gn = ({
5177
5191
  const y = l.current.getBoundingClientRect(), k = 280, E = {
5178
5192
  top: y.bottom + 8
5179
5193
  };
5180
- t.position === "left" || y.left + k > window.innerWidth ? E.right = window.innerWidth - y.right : E.left = y.left, f(E);
5194
+ t.position === "left" || y.left + k > window.innerWidth ? E.right = window.innerWidth - y.right : E.left = y.left, m(E);
5181
5195
  }
5182
5196
  }, [n, t.position]), U(() => {
5183
5197
  n && s.current ? setTimeout(() => {
5184
5198
  var y;
5185
5199
  return (y = s.current) == null ? void 0 : y.focus();
5186
- }, 50) : a("");
5200
+ }, 50) : d("");
5187
5201
  }, [n]), U(() => {
5188
5202
  const y = (k) => {
5189
5203
  i.current && !i.current.contains(k.target) && l.current && !l.current.contains(k.target) && o(!1);
@@ -5191,12 +5205,12 @@ const Ki = 240, gn = ({
5191
5205
  return n && document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
5192
5206
  }, [n]);
5193
5207
  const x = (y) => {
5194
- const k = g.includes(y) ? g.filter((E) => E !== y) : [...g, y];
5208
+ const k = p.includes(y) ? p.filter((E) => E !== y) : [...p, y];
5195
5209
  t.onFilterChange(k);
5196
5210
  }, W = () => t.onFilterChange([]);
5197
- return /* @__PURE__ */ u(m, { direction: "column", style: { position: "relative" }, children: [
5211
+ return /* @__PURE__ */ u(f, { direction: "column", style: { position: "relative" }, children: [
5198
5212
  /* @__PURE__ */ e(
5199
- m,
5213
+ f,
5200
5214
  {
5201
5215
  ref: l,
5202
5216
  style: {
@@ -5215,20 +5229,20 @@ const Ki = 240, gn = ({
5215
5229
  name: n ? "ChevronUp" : "ChevronDown",
5216
5230
  size: "sm",
5217
5231
  style: {
5218
- color: g.length > 0 ? "var(--sa-color-brand-500, #1a4fa0)" : "var(--sa-text-subtle, #8c8f97)"
5232
+ color: p.length > 0 ? "var(--sa-color-brand-500, #1a4fa0)" : "var(--sa-text-subtle, #8c8f97)"
5219
5233
  }
5220
5234
  }
5221
5235
  )
5222
5236
  }
5223
5237
  ),
5224
5238
  n && /* @__PURE__ */ u(
5225
- m,
5239
+ f,
5226
5240
  {
5227
5241
  ref: i,
5228
5242
  style: {
5229
5243
  position: "fixed",
5230
- top: `${d.top}px`,
5231
- ...d.left !== void 0 ? { left: `${d.left}px` } : { right: `${d.right}px` },
5244
+ top: `${a.top}px`,
5245
+ ...a.left !== void 0 ? { left: `${a.left}px` } : { right: `${a.right}px` },
5232
5246
  backgroundColor: "white",
5233
5247
  borderRadius: "4px",
5234
5248
  minWidth: "280px",
@@ -5241,7 +5255,7 @@ const Ki = 240, gn = ({
5241
5255
  },
5242
5256
  children: [
5243
5257
  /* @__PURE__ */ u(
5244
- m,
5258
+ f,
5245
5259
  {
5246
5260
  style: {
5247
5261
  display: "flex",
@@ -5259,7 +5273,7 @@ const Ki = 240, gn = ({
5259
5273
  "Filter ",
5260
5274
  r
5261
5275
  ] }),
5262
- g.length > 0 && /* @__PURE__ */ e(m, { direction: "column", style: { cursor: "pointer" }, children: /* @__PURE__ */ e(
5276
+ p.length > 0 && /* @__PURE__ */ e(f, { direction: "column", style: { cursor: "pointer" }, children: /* @__PURE__ */ e(
5263
5277
  D,
5264
5278
  {
5265
5279
  fontSize: "xs",
@@ -5275,7 +5289,7 @@ const Ki = 240, gn = ({
5275
5289
  }
5276
5290
  ),
5277
5291
  !t.hideSearch && /* @__PURE__ */ e(
5278
- m,
5292
+ f,
5279
5293
  {
5280
5294
  direction: "column",
5281
5295
  style: {
@@ -5291,14 +5305,14 @@ const Ki = 240, gn = ({
5291
5305
  placeholder: `Search ${r.toLowerCase()}...`,
5292
5306
  leftIcon: /* @__PURE__ */ e(F, { name: "Search", size: "sm" }),
5293
5307
  value: c,
5294
- onChange: (y) => a(y.target.value),
5308
+ onChange: (y) => d(y.target.value),
5295
5309
  style: { fontSize: "14px" }
5296
5310
  }
5297
5311
  )
5298
5312
  }
5299
5313
  ),
5300
5314
  /* @__PURE__ */ e(
5301
- m,
5315
+ f,
5302
5316
  {
5303
5317
  direction: "column",
5304
5318
  className: "ts-filter-dropdown-options",
@@ -5309,7 +5323,7 @@ const Ki = 240, gn = ({
5309
5323
  paddingRight: "8px"
5310
5324
  },
5311
5325
  children: t.isLoadingOptions ? /* @__PURE__ */ u(
5312
- m,
5326
+ f,
5313
5327
  {
5314
5328
  style: {
5315
5329
  paddingTop: "40px",
@@ -5342,8 +5356,8 @@ const Ki = 240, gn = ({
5342
5356
  )
5343
5357
  ]
5344
5358
  }
5345
- ) : p.length > 0 ? /* @__PURE__ */ e(m, { direction: "column", style: { gap: "2px", paddingTop: "4px", paddingBottom: "4px" }, children: p.map((y) => /* @__PURE__ */ u(
5346
- m,
5359
+ ) : g.length > 0 ? /* @__PURE__ */ e(f, { direction: "column", style: { gap: "2px", paddingTop: "4px", paddingBottom: "4px" }, children: g.map((y) => /* @__PURE__ */ u(
5360
+ f,
5347
5361
  {
5348
5362
  style: {
5349
5363
  display: "flex",
@@ -5357,22 +5371,22 @@ const Ki = 240, gn = ({
5357
5371
  cursor: "pointer",
5358
5372
  borderRadius: "8px",
5359
5373
  transition: "all 0.2s ease",
5360
- backgroundColor: g.includes(y.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent"
5374
+ backgroundColor: p.includes(y.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent"
5361
5375
  },
5362
5376
  onClick: (k) => {
5363
5377
  k.stopPropagation(), x(y.value);
5364
5378
  },
5365
5379
  onMouseEnter: (k) => {
5366
- g.includes(y.value) || (k.currentTarget.style.backgroundColor = "var(--sa-background-primary, #ffffff)"), k.currentTarget.style.transform = "translateX(2px)";
5380
+ p.includes(y.value) || (k.currentTarget.style.backgroundColor = "var(--sa-background-primary, #ffffff)"), k.currentTarget.style.transform = "translateX(2px)";
5367
5381
  },
5368
5382
  onMouseLeave: (k) => {
5369
- k.currentTarget.style.backgroundColor = g.includes(y.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent", k.currentTarget.style.transform = "translateX(0)";
5383
+ k.currentTarget.style.backgroundColor = p.includes(y.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent", k.currentTarget.style.transform = "translateX(0)";
5370
5384
  },
5371
5385
  children: [
5372
5386
  /* @__PURE__ */ e(
5373
5387
  Ft,
5374
5388
  {
5375
- checked: g.includes(y.value),
5389
+ checked: p.includes(y.value),
5376
5390
  onChange: () => {
5377
5391
  }
5378
5392
  }
@@ -5381,8 +5395,8 @@ const Ki = 240, gn = ({
5381
5395
  D,
5382
5396
  {
5383
5397
  fontSize: "sm",
5384
- fontWeight: g.includes(y.value) ? "medium" : "normal",
5385
- color: g.includes(y.value) ? "primary" : "gray-700",
5398
+ fontWeight: p.includes(y.value) ? "medium" : "normal",
5399
+ color: p.includes(y.value) ? "primary" : "gray-700",
5386
5400
  children: y.label
5387
5401
  }
5388
5402
  )
@@ -5390,7 +5404,7 @@ const Ki = 240, gn = ({
5390
5404
  },
5391
5405
  y.value
5392
5406
  )) }) : /* @__PURE__ */ u(
5393
- m,
5407
+ f,
5394
5408
  {
5395
5409
  style: {
5396
5410
  paddingTop: "40px",
@@ -5423,8 +5437,8 @@ const Ki = 240, gn = ({
5423
5437
  )
5424
5438
  }
5425
5439
  ),
5426
- g.length > 0 && /* @__PURE__ */ e(
5427
- m,
5440
+ p.length > 0 && /* @__PURE__ */ e(
5441
+ f,
5428
5442
  {
5429
5443
  direction: "column",
5430
5444
  style: {
@@ -5436,9 +5450,9 @@ const Ki = 240, gn = ({
5436
5450
  backgroundColor: "var(--sa-color-brand-50, #e6edf6)",
5437
5451
  marginTop: "auto"
5438
5452
  },
5439
- children: /* @__PURE__ */ u(m, { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "4px" }, children: [
5453
+ children: /* @__PURE__ */ u(f, { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "4px" }, children: [
5440
5454
  /* @__PURE__ */ e(
5441
- m,
5455
+ f,
5442
5456
  {
5443
5457
  direction: "column",
5444
5458
  style: {
@@ -5449,12 +5463,12 @@ const Ki = 240, gn = ({
5449
5463
  fontWeight: 600,
5450
5464
  color: "white"
5451
5465
  },
5452
- children: g.length
5466
+ children: p.length
5453
5467
  }
5454
5468
  ),
5455
5469
  /* @__PURE__ */ u(D, { fontSize: "xs", color: "primary", fontWeight: "medium", children: [
5456
5470
  "item",
5457
- g.length > 1 ? "s" : "",
5471
+ p.length > 1 ? "s" : "",
5458
5472
  " selected"
5459
5473
  ] })
5460
5474
  ] })
@@ -5529,11 +5543,11 @@ const Ki = 240, gn = ({
5529
5543
  isLoading: l,
5530
5544
  visibleHandleDelete: s,
5531
5545
  visibleHandleUpdate: c,
5532
- visibleHandleDetail: a,
5533
- showHeadBorder: d = !1,
5534
- scrollParentRef: f,
5535
- frozenCount: g = 0,
5536
- onFrozenCountChange: p,
5546
+ visibleHandleDetail: d,
5547
+ showHeadBorder: a = !1,
5548
+ scrollParentRef: m,
5549
+ frozenCount: p = 0,
5550
+ onFrozenCountChange: g,
5537
5551
  customActions: x,
5538
5552
  actionsOrder: W = ["detail", "update", "delete", "custom"],
5539
5553
  customEmptyState: y,
@@ -5562,15 +5576,15 @@ const Ki = 240, gn = ({
5562
5576
  if (typeof Z == "string") return L[Z];
5563
5577
  }, [Ne, Ue] = R(!1);
5564
5578
  U(() => {
5565
- if (!(f != null && f.current)) return;
5566
- const L = f.current;
5579
+ if (!(m != null && m.current)) return;
5580
+ const L = m.current;
5567
5581
  Ue(L.scrollHeight > L.clientHeight);
5568
- }, [r, f]);
5569
- const Je = se(null), [Ce, we] = R([]), [Ae, $e] = R(
5582
+ }, [r, m]);
5583
+ const Je = ce(null), [Ce, we] = R([]), [Ae, $e] = R(
5570
5584
  () => E ?? {}
5571
- ), Ke = se(null);
5585
+ ), Ke = ce(null);
5572
5586
  it(() => {
5573
- if (!g || !Je.current) {
5587
+ if (!p || !Je.current) {
5574
5588
  we([]);
5575
5589
  return;
5576
5590
  }
@@ -5579,11 +5593,11 @@ const Ki = 240, gn = ({
5579
5593
  ), Z = [];
5580
5594
  let N = 0;
5581
5595
  L.forEach((P, J) => {
5582
- Z[J] = N, J < g && (N += P.offsetWidth);
5596
+ Z[J] = N, J < p && (N += P.offsetWidth);
5583
5597
  }), we(Z);
5584
- }, [g, t, r, Ae]);
5598
+ }, [p, t, r, Ae]);
5585
5599
  const ot = (L) => {
5586
- p && p(L < g ? L : L + 1);
5600
+ g && g(L < p ? L : L + 1);
5587
5601
  }, S = (L, Z) => {
5588
5602
  const N = Ae[L];
5589
5603
  if (N !== void 0) {
@@ -5623,7 +5637,7 @@ const Ki = 240, gn = ({
5623
5637
  children: /* @__PURE__ */ u(He, { children: [
5624
5638
  t.map((L, Z) => {
5625
5639
  var yt, xt;
5626
- const N = g > 0 && Z < g, P = Ce[Z] ?? 0, J = $(L), Se = Z === t.length - 1 && ee && C, je = X(L), Re = !!L.sortable && !!je, Oe = Re && (_ == null ? void 0 : _.key) === je ? _.direction : null, dt = L.title || ((yt = L.accessor) == null ? void 0 : yt.toString()) || "", Pe = (xt = L.headerTooltip) != null && xt.showIcon ? /* @__PURE__ */ e(
5640
+ const N = p > 0 && Z < p, P = Ce[Z] ?? 0, J = $(L), Se = Z === t.length - 1 && ee && C, je = X(L), Re = !!L.sortable && !!je, Oe = Re && (_ == null ? void 0 : _.key) === je ? _.direction : null, dt = L.title || ((yt = L.accessor) == null ? void 0 : yt.toString()) || "", Pe = (xt = L.headerTooltip) != null && xt.showIcon ? /* @__PURE__ */ e(
5627
5641
  F,
5628
5642
  {
5629
5643
  name: "InfoCircle",
@@ -5670,9 +5684,9 @@ const Ki = 240, gn = ({
5670
5684
  left: N ? P : void 0,
5671
5685
  zIndex: N ? 4 : 2,
5672
5686
  paddingLeft: Z === 0 ? "12px" : "",
5673
- borderRight: d && !Se && !N ? ne : void 0,
5674
- borderBottom: d ? ne : void 0,
5675
- boxShadow: d && N ? ge : void 0,
5687
+ borderRight: a && !Se && !N ? ne : void 0,
5688
+ borderBottom: a ? ne : void 0,
5689
+ boxShadow: a && N ? ge : void 0,
5676
5690
  backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
5677
5691
  textAlign: L.textAlign === "text-right" ? "right" : L.textAlign === "text-center" ? "center" : "left",
5678
5692
  ...S(Z, L.width)
@@ -5697,7 +5711,7 @@ const Ki = 240, gn = ({
5697
5711
  columnTitle: L.title
5698
5712
  }
5699
5713
  ),
5700
- p && /* @__PURE__ */ e(
5714
+ g && /* @__PURE__ */ e(
5701
5715
  "button",
5702
5716
  {
5703
5717
  onClick: () => ot(Z),
@@ -5755,15 +5769,15 @@ const Ki = 240, gn = ({
5755
5769
  top: 0,
5756
5770
  right: 0,
5757
5771
  zIndex: 3,
5758
- borderBottom: d ? ne : void 0,
5759
- boxShadow: d && C ? ye : void 0
5772
+ borderBottom: a ? ne : void 0,
5773
+ boxShadow: a && C ? ye : void 0
5760
5774
  }
5761
5775
  }
5762
5776
  ) : null
5763
5777
  ] })
5764
5778
  }
5765
5779
  ),
5766
- /* @__PURE__ */ e(en, { children: l ? /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { colSpan: t.length + 1, children: /* @__PURE__ */ u(m, { direction: "column", style: { gap: "16px" }, children: [
5780
+ /* @__PURE__ */ e(en, { children: l ? /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(Te, { colSpan: t.length + 1, children: /* @__PURE__ */ u(f, { direction: "column", style: { gap: "16px" }, children: [
5767
5781
  /* @__PURE__ */ e(ut, { variant: "list" }),
5768
5782
  /* @__PURE__ */ e(ut, { variant: "list" }),
5769
5783
  /* @__PURE__ */ e(ut, { variant: "list" }),
@@ -5791,7 +5805,7 @@ const Ki = 240, gn = ({
5791
5805
  },
5792
5806
  children: [
5793
5807
  t.map((N, P) => {
5794
- const J = N.render ? N.render(L, Z, r) : Ee(L, N.accessor), xe = g > 0 && P < g, Se = Ce[P] ?? 0, je = Ae[P] !== void 0, Re = xe && P === g - 1;
5808
+ const J = N.render ? N.render(L, Z, r) : Ee(L, N.accessor), xe = p > 0 && P < p, Se = Ce[P] ?? 0, je = Ae[P] !== void 0, Re = xe && P === p - 1;
5795
5809
  return /* @__PURE__ */ e(
5796
5810
  Te,
5797
5811
  {
@@ -5836,7 +5850,7 @@ const Ki = 240, gn = ({
5836
5850
  transition: "background-color 0.3s ease"
5837
5851
  }, children: /* @__PURE__ */ e(le, { direction: "row", align: "center", justify: "center", gap: "sm", children: W.map((N) => {
5838
5852
  const P = Z === r.length - 1 ? "top" : "bottom";
5839
- return N === "detail" && n && (a == null ? void 0 : a(L)) !== !1 ? /* @__PURE__ */ e(Me, { label: "Detail", position: P, children: /* @__PURE__ */ e(
5853
+ return N === "detail" && n && (d == null ? void 0 : d(L)) !== !1 ? /* @__PURE__ */ e(Me, { label: "Detail", position: P, children: /* @__PURE__ */ e(
5840
5854
  T,
5841
5855
  {
5842
5856
  size: "xs",
@@ -5876,16 +5890,16 @@ const Ki = 240, gn = ({
5876
5890
  headerProps: n,
5877
5891
  footerProps: o
5878
5892
  }) => {
5879
- var g;
5880
- const i = se(null), [l, s] = R(
5893
+ var p;
5894
+ const i = ce(null), [l, s] = R(
5881
5895
  (r == null ? void 0 : r.defaultFrozenCount) ?? 0
5882
- ), c = (n == null ? void 0 : n.show) ?? !0, a = se(null), d = (g = r == null ? void 0 : r.pagination) == null ? void 0 : g.totalData;
5883
- typeof d == "number" && (a.current = d);
5884
- const f = (o == null ? void 0 : o.showFooter) ?? (d === void 0 ? a.current !== 0 : d !== 0);
5896
+ ), c = (n == null ? void 0 : n.show) ?? !0, d = ce(null), a = (p = r == null ? void 0 : r.pagination) == null ? void 0 : p.totalData;
5897
+ typeof a == "number" && (d.current = a);
5898
+ const m = (o == null ? void 0 : o.showFooter) ?? (a === void 0 ? d.current !== 0 : a !== 0);
5885
5899
  return /* @__PURE__ */ u(so, { ...t, children: [
5886
5900
  c && /* @__PURE__ */ e(ao, { ...n }),
5887
5901
  /* @__PURE__ */ e(
5888
- m,
5902
+ f,
5889
5903
  {
5890
5904
  direction: "column",
5891
5905
  ref: i,
@@ -5905,7 +5919,7 @@ const Ki = 240, gn = ({
5905
5919
  ) : null
5906
5920
  }
5907
5921
  ),
5908
- f && /* @__PURE__ */ e(
5922
+ m && /* @__PURE__ */ e(
5909
5923
  ho,
5910
5924
  {
5911
5925
  pagination: r == null ? void 0 : r.pagination,
@@ -5926,7 +5940,7 @@ function xo(t) {
5926
5940
  const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)", bo = ({
5927
5941
  sortDir: t,
5928
5942
  frozen: r
5929
- }) => t === "asc" ? /* @__PURE__ */ e(F, { name: "ArrowUp", width: 14, height: 14 }) : t === "desc" ? /* @__PURE__ */ e(F, { name: "ArrowDown", width: 14, height: 14 }) : r ? /* @__PURE__ */ e(F, { name: "Pin1", width: 14, height: 14 }) : /* @__PURE__ */ e(F, { name: "FilterVertical", width: 14, height: 14 }), wt = ({ icon: t, label: r, active: n, danger: o, onClick: i }) => {
5943
+ }) => t === "asc" ? /* @__PURE__ */ e(F, { name: "ChevronSmallUp" }) : t === "desc" ? /* @__PURE__ */ e(F, { name: "ChevronSmallDown" }) : r ? /* @__PURE__ */ e(F, { name: "LockOn", size: "xs" }) : /* @__PURE__ */ e(F, { name: "Filter", size: "xs" }), wt = ({ icon: t, label: r, active: n, danger: o, onClick: i }) => {
5930
5944
  const l = o ? "var(--sa-color-error-600, #c9184a)" : "var(--sa-text-primary, #292a2e)";
5931
5945
  return /* @__PURE__ */ u(
5932
5946
  "button",
@@ -5967,39 +5981,39 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
5967
5981
  onSort: l,
5968
5982
  onClearSort: s,
5969
5983
  onToggleFreeze: c,
5970
- onHide: a
5984
+ onHide: d
5971
5985
  }) => {
5972
- const [d, f] = R(!1), g = se(null), p = se(null), [x, W] = R(
5986
+ const [a, m] = R(!1), p = ce(null), g = ce(null), [x, W] = R(
5973
5987
  { top: 0, left: 0 }
5974
5988
  );
5975
5989
  U(() => {
5976
- if (d && g.current) {
5977
- const k = g.current.getBoundingClientRect(), E = k.left + Gr > window.innerWidth;
5990
+ if (a && p.current) {
5991
+ const k = p.current.getBoundingClientRect(), E = k.left + Gr > window.innerWidth;
5978
5992
  W({
5979
5993
  top: k.bottom + 6,
5980
5994
  ...E ? { right: window.innerWidth - k.right } : { left: k.left }
5981
5995
  });
5982
5996
  }
5983
- }, [d]), U(() => {
5984
- if (!d) return;
5997
+ }, [a]), U(() => {
5998
+ if (!a) return;
5985
5999
  const k = (E) => {
5986
- p.current && !p.current.contains(E.target) && g.current && !g.current.contains(E.target) && f(!1);
6000
+ g.current && !g.current.contains(E.target) && p.current && !p.current.contains(E.target) && m(!1);
5987
6001
  };
5988
6002
  return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
5989
- }, [d]);
6003
+ }, [a]);
5990
6004
  const y = (k) => {
5991
- k(), f(!1);
6005
+ k(), m(!1);
5992
6006
  };
5993
6007
  return /* @__PURE__ */ u(ie, { children: [
5994
6008
  /* @__PURE__ */ e(
5995
6009
  "button",
5996
6010
  {
5997
- ref: g,
6011
+ ref: p,
5998
6012
  type: "button",
5999
6013
  className: "sa-tl-menu-trigger",
6000
- "data-active": t || d ? "true" : "false",
6014
+ "data-active": t || a ? "true" : "false",
6001
6015
  onClick: (k) => {
6002
- k.stopPropagation(), f((E) => !E);
6016
+ k.stopPropagation(), m((E) => !E);
6003
6017
  },
6004
6018
  title: "Column options",
6005
6019
  style: {
@@ -6018,10 +6032,10 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6018
6032
  children: /* @__PURE__ */ e(bo, { sortDir: o, frozen: i })
6019
6033
  }
6020
6034
  ),
6021
- d && /* @__PURE__ */ u(
6022
- m,
6035
+ a && /* @__PURE__ */ u(
6036
+ f,
6023
6037
  {
6024
- ref: p,
6038
+ ref: g,
6025
6039
  onClick: (k) => k.stopPropagation(),
6026
6040
  style: {
6027
6041
  position: "fixed",
@@ -6033,8 +6047,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6033
6047
  borderRadius: "var(--sa-radii-sm, 6px)",
6034
6048
  boxShadow: "0 6px 24px rgba(0,0,0,0.12)",
6035
6049
  zIndex: 9999,
6036
- paddingTop: 4,
6037
- paddingBottom: 4,
6050
+ padding: "4px",
6038
6051
  display: "flex",
6039
6052
  flexDirection: "column"
6040
6053
  },
@@ -6043,7 +6056,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6043
6056
  /* @__PURE__ */ e(
6044
6057
  wt,
6045
6058
  {
6046
- icon: "ArrowUp",
6059
+ icon: "ChevronUp",
6047
6060
  label: "Ascending",
6048
6061
  active: o === "asc",
6049
6062
  onClick: () => y(() => o === "asc" ? s() : l("asc"))
@@ -6052,7 +6065,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6052
6065
  /* @__PURE__ */ e(
6053
6066
  wt,
6054
6067
  {
6055
- icon: "ArrowDown",
6068
+ icon: "ChevronDown",
6056
6069
  label: "Descending",
6057
6070
  active: o === "desc",
6058
6071
  onClick: () => y(() => o === "desc" ? s() : l("desc"))
@@ -6075,7 +6088,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6075
6088
  icon: "EyeClosed",
6076
6089
  label: "Hide column",
6077
6090
  danger: !0,
6078
- onClick: () => y(a)
6091
+ onClick: () => y(d)
6079
6092
  }
6080
6093
  )
6081
6094
  ]
@@ -6145,11 +6158,11 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6145
6158
  widthStorageKey: l,
6146
6159
  columnState: s,
6147
6160
  onColumnStateChange: c,
6148
- columnMenu: a = !1,
6149
- sort: d,
6150
- defaultSort: f,
6151
- onSortChange: g,
6152
- height: p,
6161
+ columnMenu: d = !1,
6162
+ sort: a,
6163
+ defaultSort: m,
6164
+ onSortChange: p,
6165
+ height: g,
6153
6166
  mobileLayout: x = "cards",
6154
6167
  mobileBreakpoint: W = "md",
6155
6168
  groupSeparator: y,
@@ -6170,10 +6183,10 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6170
6183
  () => /* @__PURE__ */ new Set()
6171
6184
  ), G = s !== void 0, [_, X] = R({}), te = s ?? _, me = (b) => {
6172
6185
  c == null || c(b), G || X(b);
6173
- }, ae = d !== void 0, [de, ee] = R(
6174
- f ?? null
6175
- ), O = ae ? d ?? null : de, ne = !g, ye = (b) => {
6176
- g == null || g(b), ae || ee(b);
6186
+ }, ae = a !== void 0, [de, ee] = R(
6187
+ m ?? null
6188
+ ), O = ae ? a ?? null : de, ne = !p, ye = (b) => {
6189
+ p == null || p(b), ae || ee(b);
6177
6190
  }, { headerGroups: ge, leafColumns: pe, hasGroups: Ee } = fe(() => {
6178
6191
  var be;
6179
6192
  const b = new Set(te.hidden ?? []), M = (K, he) => K.key ?? (typeof K.accessor == "string" ? K.accessor : `col-${he}`), I = t.map((K, he) => {
@@ -6212,7 +6225,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6212
6225
  return [...r].sort(
6213
6226
  (I, Y) => ko(Je(b.col, I), Je(b.col, Y)) * M
6214
6227
  );
6215
- }, [r, ne, O, pe]), Ae = !Ee, $e = !!l && Ae, [Ke, ot] = Wn(l ?? ""), S = $e ? Ke : void 0, $ = se(null), [H, L] = R();
6228
+ }, [r, ne, O, pe]), Ae = !Ee, $e = !!l && Ae, [Ke, ot] = Wn(l ?? ""), S = $e ? Ke : void 0, $ = ce(null), [H, L] = R();
6216
6229
  it(() => {
6217
6230
  L(void 0);
6218
6231
  }, [Ue]), it(() => {
@@ -6235,9 +6248,9 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6235
6248
  let M = 0;
6236
6249
  for (let I = 0; I < b; I++) M += H[I] ?? 0;
6237
6250
  return M;
6238
- }, Re = se(null), [Oe, dt] = R("100vh");
6251
+ }, Re = ce(null), [Oe, dt] = R("100vh");
6239
6252
  it(() => {
6240
- if (p !== void 0) return;
6253
+ if (g !== void 0) return;
6241
6254
  const b = () => {
6242
6255
  if (Re.current) {
6243
6256
  const M = Re.current.getBoundingClientRect().top;
@@ -6245,7 +6258,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6245
6258
  }
6246
6259
  };
6247
6260
  return b(), window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
6248
- }, [p]);
6261
+ }, [g]);
6249
6262
  const Pe = (b, M) => n ? n(b, M) : M, Ye = (b, M, I) => b.render ? b.render(M, I, we) : Do(M, b.accessor), Qe = pe.length + (A ? 1 : 0), yt = (b, M) => {
6250
6263
  M || me({
6251
6264
  ...te,
@@ -6321,7 +6334,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6321
6334
  const I = et(b);
6322
6335
  return I.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 4, paddingRight: 8, flexShrink: 0 }, children: I.map((Y) => /* @__PURE__ */ e(tt.Fragment, { children: bt(Y, b, M, { showLabel: !1 }) }, Y.key)) }) : null;
6323
6336
  }, Ht = (b, M) => {
6324
- const { col: I, key: Y } = b, ue = Ne.get(Y) ?? 0, be = Se(ue), K = be && ue === xe, he = (O == null ? void 0 : O.key) === Y ? O.direction : null, Le = a && !I.disableMenu ? /* @__PURE__ */ e(
6337
+ const { col: I, key: Y } = b, ue = Ne.get(Y) ?? 0, be = Se(ue), K = be && ue === xe, he = (O == null ? void 0 : O.key) === Y ? O.direction : null, Le = d && !I.disableMenu ? /* @__PURE__ */ e(
6325
6338
  vo,
6326
6339
  {
6327
6340
  active: !!he || be,
@@ -6445,7 +6458,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6445
6458
  }), Sr = (b, M) => {
6446
6459
  const I = Nt ? Ye(Nt.col, b, M) : null;
6447
6460
  return typeof I == "string" || typeof I == "number" ? /* @__PURE__ */ e(D, { as: "span", style: Dt, children: I }) : /* @__PURE__ */ e("span", { style: Dt, children: I });
6448
- }, Dn = we.length === 0 ? /* @__PURE__ */ e(m, { style: { padding: 16, textAlign: "center" }, children: E }) : x === "expand" ? /* @__PURE__ */ e(m, { style: { display: "flex", flexDirection: "column" }, children: we.map((b, M) => {
6461
+ }, Dn = we.length === 0 ? /* @__PURE__ */ e(f, { style: { padding: 16, textAlign: "center" }, children: E }) : x === "expand" ? /* @__PURE__ */ e(f, { style: { display: "flex", flexDirection: "column" }, children: we.map((b, M) => {
6449
6462
  const I = Pe(b, M), Y = B.has(I);
6450
6463
  return /* @__PURE__ */ u("div", { style: { borderBottom: Kt }, children: [
6451
6464
  /* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center" }, children: [
@@ -6498,11 +6511,11 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6498
6511
  )
6499
6512
  ] }, I);
6500
6513
  }) }) : /* @__PURE__ */ e(
6501
- m,
6514
+ f,
6502
6515
  {
6503
6516
  style: { display: "flex", flexDirection: "column", gap: 8, padding: 8 },
6504
6517
  children: we.map((b, M) => /* @__PURE__ */ u(
6505
- m,
6518
+ f,
6506
6519
  {
6507
6520
  style: {
6508
6521
  border: Kt,
@@ -6658,13 +6671,13 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6658
6671
  ), $t = z ? we.findIndex((b, M) => Pe(b, M) === z.rowKey) : -1, jt = $t >= 0 ? we[$t] : null;
6659
6672
  return /* @__PURE__ */ u(ie, { children: [
6660
6673
  /* @__PURE__ */ e(
6661
- m,
6674
+ f,
6662
6675
  {
6663
6676
  ref: Re,
6664
6677
  fullWidth: !0,
6665
6678
  style: {
6666
6679
  overflow: "auto",
6667
- height: p ?? Oe
6680
+ height: g ?? Oe
6668
6681
  },
6669
6682
  children: v ? Dn : kn
6670
6683
  }
@@ -6688,35 +6701,35 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6688
6701
  paramKeys: l,
6689
6702
  scopeId: s,
6690
6703
  storage: c = un
6691
- } = t, { searchParams: a, setSearchParams: d, searchQueries: f } = Ie(), g = a.toString(), p = s ? pt.tableSort(s) : void 0, x = se(!1);
6704
+ } = t, { searchParams: d, setSearchParams: a, searchQueries: m } = Ie(), p = d.toString(), g = s ? pt.tableSort(s) : void 0, x = ce(!1);
6692
6705
  U(() => {
6693
- if (x.current || (x.current = !0, !p) || a.has(r) || a.has(n))
6706
+ if (x.current || (x.current = !0, !g) || d.has(r) || d.has(n))
6694
6707
  return;
6695
- const V = c.get(p);
6696
- !(V != null && V.key) || !tr(V.direction) || d({
6697
- ...Object.fromEntries(a.entries()),
6708
+ const V = c.get(g);
6709
+ !(V != null && V.key) || !tr(V.direction) || a({
6710
+ ...Object.fromEntries(d.entries()),
6698
6711
  [r]: V.key,
6699
6712
  [n]: V.direction
6700
6713
  });
6701
6714
  }, []);
6702
6715
  const W = fe(() => {
6703
- const V = a.get(r), v = a.get(n);
6716
+ const V = d.get(r), v = d.get(n);
6704
6717
  return V && tr(v) ? { key: V, direction: v } : i;
6705
- }, [g, r, n, i]);
6718
+ }, [p, r, n, i]);
6706
6719
  U(() => {
6707
- if (!p) return;
6708
- const V = a.get(r), v = a.get(n);
6709
- V && tr(v) ? c.set(p, { key: V, direction: v }) : c.remove(p);
6710
- }, [g, p, r, n, c]);
6720
+ if (!g) return;
6721
+ const V = d.get(r), v = d.get(n);
6722
+ V && tr(v) ? c.set(g, { key: V, direction: v }) : c.remove(g);
6723
+ }, [p, g, r, n, c]);
6711
6724
  const y = (l == null ? void 0 : l.sortBy) ?? "sortBy", k = (l == null ? void 0 : l.sortOrder) ?? "sortOrder", E = fe(() => W ? {
6712
6725
  [y]: W.key,
6713
6726
  [k]: W.direction
6714
6727
  } : {}, [W, y, k]), w = Q(
6715
6728
  (V) => {
6716
- const v = { ...f };
6717
- V ? (v[r] = V.key, v[n] = V.direction) : (delete v[r], delete v[n]), delete v[o], d(v);
6729
+ const v = { ...m };
6730
+ V ? (v[r] = V.key, v[n] = V.direction) : (delete v[r], delete v[n]), delete v[o], a(v);
6718
6731
  },
6719
- [f, r, n, o, d]
6732
+ [m, r, n, o, a]
6720
6733
  );
6721
6734
  return { sort: W, setSort: w, params: E };
6722
6735
  }, xr = ({
@@ -6728,7 +6741,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6728
6741
  children: n,
6729
6742
  loading: o,
6730
6743
  isLoading: i
6731
- }) => /* @__PURE__ */ e(ie, { children: i ? o : t ? n : r }), ce = (t) => /* @__PURE__ */ e(
6744
+ }) => /* @__PURE__ */ e(ie, { children: i ? o : t ? n : r }), se = (t) => /* @__PURE__ */ e(
6732
6745
  D,
6733
6746
  {
6734
6747
  ...t,
@@ -6745,10 +6758,10 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6745
6758
  fullWidth: o = !1,
6746
6759
  ...i
6747
6760
  }) => {
6748
- var c, a, d;
6761
+ var c, d, a;
6749
6762
  const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
6750
6763
  return /* @__PURE__ */ u(
6751
- m,
6764
+ f,
6752
6765
  {
6753
6766
  gap: r === "horizontal" ? "spacing-96" : "sm",
6754
6767
  direction: r === "horizontal" ? "row" : "column",
@@ -6759,32 +6772,32 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6759
6772
  {
6760
6773
  condition: !!i.inputProps.required,
6761
6774
  fallback: /* @__PURE__ */ u(
6762
- m,
6775
+ f,
6763
6776
  {
6764
6777
  direction: "column",
6765
6778
  customMaxWidth: s,
6766
6779
  fullWidth: o,
6767
6780
  children: [
6768
- /* @__PURE__ */ e(ce, { children: i.title }),
6781
+ /* @__PURE__ */ e(se, { children: i.title }),
6769
6782
  /* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
6770
6783
  ]
6771
6784
  }
6772
6785
  ),
6773
6786
  children: /* @__PURE__ */ u(
6774
- m,
6787
+ f,
6775
6788
  {
6776
6789
  direction: "column",
6777
6790
  customMaxWidth: s,
6778
6791
  fullWidth: o,
6779
6792
  children: [
6780
6793
  /* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
6781
- /* @__PURE__ */ e(ce, { fontSize: t, children: i.title }),
6782
- /* @__PURE__ */ e(ce, { color: "error", fontSize: t, children: n }),
6794
+ /* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
6795
+ /* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
6783
6796
  /* @__PURE__ */ e(oe, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
6784
6797
  Me,
6785
6798
  {
6786
- label: (a = i.tooltip) == null ? void 0 : a.label,
6787
- arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
6799
+ label: (d = i.tooltip) == null ? void 0 : d.label,
6800
+ arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
6788
6801
  ...i.tooltip,
6789
6802
  children: /* @__PURE__ */ e(
6790
6803
  F,
@@ -6806,7 +6819,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6806
6819
  )
6807
6820
  }
6808
6821
  ),
6809
- /* @__PURE__ */ u(m, { direction: "column", gap: "xs", fullWidth: i.inputProps.fullWidth || !1, children: [
6822
+ /* @__PURE__ */ u(f, { direction: "column", gap: "xs", fullWidth: i.inputProps.fullWidth || !1, children: [
6810
6823
  /* @__PURE__ */ e(
6811
6824
  st,
6812
6825
  {
@@ -6830,10 +6843,10 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6830
6843
  fullWidth: o = !1,
6831
6844
  ...i
6832
6845
  }) => {
6833
- var c, a, d;
6846
+ var c, d, a;
6834
6847
  const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
6835
6848
  return /* @__PURE__ */ u(
6836
- m,
6849
+ f,
6837
6850
  {
6838
6851
  gap: r === "horizontal" ? "spacing-96" : "sm",
6839
6852
  direction: r === "horizontal" ? "row" : "column",
@@ -6844,32 +6857,32 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6844
6857
  {
6845
6858
  condition: !!i.inputProps.required,
6846
6859
  fallback: /* @__PURE__ */ u(
6847
- m,
6860
+ f,
6848
6861
  {
6849
6862
  direction: "column",
6850
6863
  customMaxWidth: s,
6851
6864
  fullWidth: o,
6852
6865
  children: [
6853
- /* @__PURE__ */ e(ce, { children: i.title }),
6866
+ /* @__PURE__ */ e(se, { children: i.title }),
6854
6867
  /* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
6855
6868
  ]
6856
6869
  }
6857
6870
  ),
6858
6871
  children: /* @__PURE__ */ u(
6859
- m,
6872
+ f,
6860
6873
  {
6861
6874
  direction: "column",
6862
6875
  customMaxWidth: s,
6863
6876
  fullWidth: o,
6864
6877
  children: [
6865
6878
  /* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
6866
- /* @__PURE__ */ e(ce, { fontSize: t, children: i.title }),
6867
- /* @__PURE__ */ e(ce, { color: "error", fontSize: t, children: n }),
6879
+ /* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
6880
+ /* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
6868
6881
  /* @__PURE__ */ e(oe, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
6869
6882
  Me,
6870
6883
  {
6871
- label: (a = i.tooltip) == null ? void 0 : a.label,
6872
- arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
6884
+ label: (d = i.tooltip) == null ? void 0 : d.label,
6885
+ arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
6873
6886
  ...i.tooltip,
6874
6887
  children: /* @__PURE__ */ e(
6875
6888
  F,
@@ -6891,9 +6904,9 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6891
6904
  )
6892
6905
  }
6893
6906
  ),
6894
- /* @__PURE__ */ u(m, { direction: "column", gap: "xs", fullWidth: i.inputProps.fullWidth || !1, children: [
6907
+ /* @__PURE__ */ u(f, { direction: "column", gap: "xs", fullWidth: i.inputProps.fullWidth || !1, children: [
6895
6908
  /* @__PURE__ */ e(
6896
- m,
6909
+ f,
6897
6910
  {
6898
6911
  direction: "column",
6899
6912
  style: {
@@ -6917,17 +6930,17 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6917
6930
  );
6918
6931
  }, Eo = (t, r) => typeof t == "string" && t || r === "error" ? "var(--sa-border-danger)" : "var(--sa-border-subtle)", Lo = (t) => {
6919
6932
  var c;
6920
- const [r, n] = R(!1), o = (a) => {
6921
- a.preventDefault(), a.stopPropagation();
6922
- }, i = (a) => {
6923
- a.preventDefault(), a.stopPropagation(), a.dataTransfer && t.handleOnFileChange(a.dataTransfer.files.item(0));
6924
- }, l = (a) => {
6925
- a.preventDefault(), n(!0);
6926
- }, s = (a) => {
6927
- a.preventDefault(), n(!1);
6933
+ const [r, n] = R(!1), o = (d) => {
6934
+ d.preventDefault(), d.stopPropagation();
6935
+ }, i = (d) => {
6936
+ d.preventDefault(), d.stopPropagation(), d.dataTransfer && t.handleOnFileChange(d.dataTransfer.files.item(0));
6937
+ }, l = (d) => {
6938
+ d.preventDefault(), n(!0);
6939
+ }, s = (d) => {
6940
+ d.preventDefault(), n(!1);
6928
6941
  };
6929
6942
  return /* @__PURE__ */ u(
6930
- m,
6943
+ f,
6931
6944
  {
6932
6945
  width: "width-full",
6933
6946
  paddingInline: "md",
@@ -6978,7 +6991,7 @@ const tc = xo(yo), Gr = 200, Xt = "1px solid var(--sa-border-subtle, #0b120e24)"
6978
6991
  }
6979
6992
  )
6980
6993
  ] }),
6981
- /* @__PURE__ */ e(D, { fontSize: "sm", color: "gray-500", children: (c = t.fileSupports) == null ? void 0 : c.map((a) => a.toLocaleUpperCase()).join(", ") })
6994
+ /* @__PURE__ */ e(D, { fontSize: "sm", color: "gray-500", children: (c = t.fileSupports) == null ? void 0 : c.map((d) => d.toLocaleUpperCase()).join(", ") })
6982
6995
  ] })
6983
6996
  ]
6984
6997
  }
@@ -7157,7 +7170,7 @@ function Ro(t) {
7157
7170
  const Vo = (t) => {
7158
7171
  var r, n;
7159
7172
  return /* @__PURE__ */ u(
7160
- m,
7173
+ f,
7161
7174
  {
7162
7175
  width: "width-full",
7163
7176
  paddingInline: "md",
@@ -7234,8 +7247,8 @@ const Vo = (t) => {
7234
7247
  labelPosition: r = "outside-top",
7235
7248
  ...n
7236
7249
  }) => {
7237
- var p;
7238
- const o = se(null), i = () => {
7250
+ var g;
7251
+ const o = ce(null), i = () => {
7239
7252
  if (n.defaultFile) {
7240
7253
  window.open(n.defaultFile.url);
7241
7254
  return;
@@ -7256,11 +7269,11 @@ const Vo = (t) => {
7256
7269
  alignItems: "center"
7257
7270
  }, children: "Optional" }),
7258
7271
  n.required && /* @__PURE__ */ e("span", { style: { fontSize: "14px", fontWeight: 500, color: "var(--sa-text-error)" }, children: "*" })
7259
- ] }) : null, a = n.description ? /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-subtlest, #6b6e76)", lineHeight: "18px" }, children: n.description }) : null, d = /* @__PURE__ */ u(ie, { children: [
7272
+ ] }) : null, d = n.description ? /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-subtlest, #6b6e76)", lineHeight: "18px" }, children: n.description }) : null, a = /* @__PURE__ */ u(ie, { children: [
7260
7273
  n.helperText && /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-subtlest, #6b6e76)", lineHeight: "18px" }, children: n.helperText }),
7261
7274
  n.errorText && t === "error" && /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-error, #a4133c)", lineHeight: "18px" }, children: n.errorText }),
7262
7275
  n.errorMessage && !n.errorText && /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-error, #a4133c)", lineHeight: "18px" }, children: n.errorMessage })
7263
- ] }), f = /* @__PURE__ */ e(
7276
+ ] }), m = /* @__PURE__ */ e(
7264
7277
  "input",
7265
7278
  {
7266
7279
  type: "file",
@@ -7270,10 +7283,10 @@ const Vo = (t) => {
7270
7283
  var W;
7271
7284
  return n.handleOnChangeFile(((W = x.target.files) == null ? void 0 : W.item(0)) || null);
7272
7285
  },
7273
- accept: (p = n.fileSupportOption) == null ? void 0 : p.map((x) => "." + (x == null ? void 0 : x.toLowerCase())).join(", ")
7286
+ accept: (g = n.fileSupportOption) == null ? void 0 : g.map((x) => "." + (x == null ? void 0 : x.toLowerCase())).join(", ")
7274
7287
  }
7275
- ), g = /* @__PURE__ */ u(
7276
- m,
7288
+ ), p = /* @__PURE__ */ u(
7289
+ f,
7277
7290
  {
7278
7291
  direction: "column",
7279
7292
  fullWidth: !0,
@@ -7286,7 +7299,7 @@ const Vo = (t) => {
7286
7299
  gap: "md",
7287
7300
  ...n.containerProps,
7288
7301
  children: [
7289
- f,
7302
+ m,
7290
7303
  (n.fileSelected || n.defaultFile) && /* @__PURE__ */ e(
7291
7304
  Vo,
7292
7305
  {
@@ -7313,17 +7326,17 @@ const Vo = (t) => {
7313
7326
  return r === "outside-left" ? /* @__PURE__ */ u(le, { direction: "row", align: "flex-start", gap: "sm", style: { width: "100%" }, children: [
7314
7327
  /* @__PURE__ */ u(le, { direction: "column", gap: "xs", style: { width: "40%", minWidth: "120px", paddingTop: "10px" }, children: [
7315
7328
  c,
7316
- a
7329
+ d
7317
7330
  ] }),
7318
7331
  /* @__PURE__ */ u(le, { direction: "column", gap: "sm", style: { flex: 1, minWidth: 0 }, children: [
7319
- g,
7320
- d
7332
+ p,
7333
+ a
7321
7334
  ] })
7322
7335
  ] }) : /* @__PURE__ */ u(le, { direction: "column", gap: "sm", style: { width: "100%" }, children: [
7323
7336
  c,
7324
- a,
7325
- g,
7326
- d
7337
+ d,
7338
+ p,
7339
+ a
7327
7340
  ] });
7328
7341
  }, Ho = ({
7329
7342
  size: t = "md",
@@ -7332,10 +7345,10 @@ const Vo = (t) => {
7332
7345
  fullWidth: o = !1,
7333
7346
  ...i
7334
7347
  }) => {
7335
- var c, a, d;
7348
+ var c, d, a;
7336
7349
  const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
7337
7350
  return /* @__PURE__ */ u(
7338
- m,
7351
+ f,
7339
7352
  {
7340
7353
  gap: r === "horizontal" ? "spacing-96" : "sm",
7341
7354
  direction: r === "horizontal" ? "row" : "column",
@@ -7346,32 +7359,32 @@ const Vo = (t) => {
7346
7359
  {
7347
7360
  condition: !!i.inputProps.required,
7348
7361
  fallback: /* @__PURE__ */ u(
7349
- m,
7362
+ f,
7350
7363
  {
7351
7364
  direction: "column",
7352
7365
  customMaxWidth: s,
7353
7366
  fullWidth: o,
7354
7367
  children: [
7355
- /* @__PURE__ */ e(ce, { children: i.title }),
7368
+ /* @__PURE__ */ e(se, { children: i.title }),
7356
7369
  /* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
7357
7370
  ]
7358
7371
  }
7359
7372
  ),
7360
7373
  children: /* @__PURE__ */ u(
7361
- m,
7374
+ f,
7362
7375
  {
7363
7376
  direction: "column",
7364
7377
  customMaxWidth: s,
7365
7378
  fullWidth: o,
7366
7379
  children: [
7367
7380
  /* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
7368
- /* @__PURE__ */ e(ce, { fontSize: t, children: i.title }),
7369
- /* @__PURE__ */ e(ce, { color: "error", fontSize: t, children: n }),
7381
+ /* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
7382
+ /* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
7370
7383
  /* @__PURE__ */ e(oe, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
7371
7384
  Me,
7372
7385
  {
7373
- label: (a = i.tooltip) == null ? void 0 : a.label,
7374
- arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
7386
+ label: (d = i.tooltip) == null ? void 0 : d.label,
7387
+ arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
7375
7388
  ...i.tooltip,
7376
7389
  children: /* @__PURE__ */ e(
7377
7390
  F,
@@ -7414,10 +7427,10 @@ const Vo = (t) => {
7414
7427
  required: i = !1,
7415
7428
  ...l
7416
7429
  }) => {
7417
- var a, d, f, g;
7430
+ var d, a, m, p;
7418
7431
  const s = l.hideMessageError || !1, c = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
7419
7432
  return /* @__PURE__ */ u(
7420
- m,
7433
+ f,
7421
7434
  {
7422
7435
  gap: r === "horizontal" || r === "horizontal-inline" ? "spacing-96" : "sm",
7423
7436
  direction: r === "horizontal" || r === "horizontal-inline" ? "row" : "column",
@@ -7428,32 +7441,32 @@ const Vo = (t) => {
7428
7441
  {
7429
7442
  condition: !!i,
7430
7443
  fallback: /* @__PURE__ */ u(
7431
- m,
7444
+ f,
7432
7445
  {
7433
7446
  direction: "column",
7434
7447
  customMaxWidth: c,
7435
7448
  fullWidth: o,
7436
7449
  children: [
7437
- /* @__PURE__ */ e(ce, { children: l.title }),
7450
+ /* @__PURE__ */ e(se, { children: l.title }),
7438
7451
  /* @__PURE__ */ e(Ge.Body3, { props: { color: "gray-500" }, children: l.description })
7439
7452
  ]
7440
7453
  }
7441
7454
  ),
7442
7455
  children: /* @__PURE__ */ u(
7443
- m,
7456
+ f,
7444
7457
  {
7445
7458
  direction: "column",
7446
7459
  customMaxWidth: c,
7447
7460
  fullWidth: o,
7448
7461
  children: [
7449
7462
  /* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
7450
- /* @__PURE__ */ e(ce, { fontSize: t, children: l.title }),
7451
- /* @__PURE__ */ e(ce, { color: "error", fontSize: t, children: n }),
7452
- /* @__PURE__ */ e(oe, { condition: !!((a = l.tooltip) != null && a.label), children: /* @__PURE__ */ e(
7463
+ /* @__PURE__ */ e(se, { fontSize: t, children: l.title }),
7464
+ /* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
7465
+ /* @__PURE__ */ e(oe, { condition: !!((d = l.tooltip) != null && d.label), children: /* @__PURE__ */ e(
7453
7466
  Me,
7454
7467
  {
7455
- label: (d = l.tooltip) == null ? void 0 : d.label,
7456
- arrowPosition: (f = l.tooltip) == null ? void 0 : f.arrowPosition,
7468
+ label: (a = l.tooltip) == null ? void 0 : a.label,
7469
+ arrowPosition: (m = l.tooltip) == null ? void 0 : m.arrowPosition,
7457
7470
  ...l.tooltip,
7458
7471
  children: /* @__PURE__ */ e(
7459
7472
  F,
@@ -7476,7 +7489,7 @@ const Vo = (t) => {
7476
7489
  }
7477
7490
  ),
7478
7491
  /* @__PURE__ */ e(
7479
- m,
7492
+ f,
7480
7493
  {
7481
7494
  gap: r === "horizontal-inline" ? "xl" : "md",
7482
7495
  direction: r === "horizontal-inline" ? "row" : "column",
@@ -7484,12 +7497,12 @@ const Vo = (t) => {
7484
7497
  children: /* @__PURE__ */ e(
7485
7498
  xr,
7486
7499
  {
7487
- of: (g = l.checkBoxesList) == null ? void 0 : g.map((p) => ({
7488
- ...p,
7489
- isChecked: l.checkBoxesAreChecked.includes(p.id)
7500
+ of: (p = l.checkBoxesList) == null ? void 0 : p.map((g) => ({
7501
+ ...g,
7502
+ isChecked: l.checkBoxesAreChecked.includes(g.id)
7490
7503
  })),
7491
- render: (p) => p.renderBadge ? /* @__PURE__ */ u(
7492
- m,
7504
+ render: (g) => g.renderBadge ? /* @__PURE__ */ u(
7505
+ f,
7493
7506
  {
7494
7507
  direction: "row",
7495
7508
  justify: "space-between",
@@ -7499,26 +7512,26 @@ const Vo = (t) => {
7499
7512
  /* @__PURE__ */ e(
7500
7513
  Ft,
7501
7514
  {
7502
- name: p.name,
7503
- value: p.id,
7504
- checked: p.isChecked,
7505
- onChange: (x) => l.onChecked(x.target.value, p),
7506
- label: p.name,
7507
- description: p.description
7515
+ name: g.name,
7516
+ value: g.id,
7517
+ checked: g.isChecked,
7518
+ onChange: (x) => l.onChecked(x.target.value, g),
7519
+ label: g.name,
7520
+ description: g.description
7508
7521
  }
7509
7522
  ),
7510
- p.renderBadge
7523
+ g.renderBadge
7511
7524
  ]
7512
7525
  }
7513
7526
  ) : /* @__PURE__ */ e(
7514
7527
  Ft,
7515
7528
  {
7516
- name: p.name,
7517
- value: p.id,
7518
- checked: p.isChecked,
7519
- onChange: (x) => l.onChecked(x.target.value, p),
7520
- label: p.name,
7521
- description: p.description
7529
+ name: g.name,
7530
+ value: g.id,
7531
+ checked: g.isChecked,
7532
+ onChange: (x) => l.onChecked(x.target.value, g),
7533
+ label: g.name,
7534
+ description: g.description
7522
7535
  }
7523
7536
  )
7524
7537
  }
@@ -7538,25 +7551,25 @@ const Vo = (t) => {
7538
7551
  var l;
7539
7552
  const i = t === "horizontal-inline" || t === "horizontal-block" ? r === "sm" ? 342 : r === "lg" ? 400 : 342 : void 0;
7540
7553
  return /* @__PURE__ */ u(
7541
- m,
7554
+ f,
7542
7555
  {
7543
7556
  gap: t === "horizontal-inline" || t === "horizontal-block" ? "spacing-96" : "sm",
7544
7557
  direction: t === "horizontal-inline" || t === "horizontal-block" ? "row" : "column",
7545
7558
  children: [
7546
7559
  /* @__PURE__ */ e(oe, { condition: !!o.description || !!o.title, children: /* @__PURE__ */ u(
7547
- m,
7560
+ f,
7548
7561
  {
7549
7562
  direction: "column",
7550
7563
  customMaxWidth: i,
7551
7564
  fullWidth: n,
7552
7565
  children: [
7553
- o.title && /* @__PURE__ */ e(ce, { children: o.title }),
7566
+ o.title && /* @__PURE__ */ e(se, { children: o.title }),
7554
7567
  /* @__PURE__ */ e(oe, { condition: !!o.description, children: /* @__PURE__ */ e(D, { color: "gray-500", children: o.description }) })
7555
7568
  ]
7556
7569
  }
7557
7570
  ) }),
7558
7571
  /* @__PURE__ */ e(
7559
- m,
7572
+ f,
7560
7573
  {
7561
7574
  gap: "sm",
7562
7575
  direction: t === "horizontal" || t === "horizontal-inline" ? "row" : "column",
@@ -7569,35 +7582,35 @@ const Vo = (t) => {
7569
7582
  ...s,
7570
7583
  isChecked: o.radioIsChecked === s.id
7571
7584
  })),
7572
- render: ({ value: s, id: c, isChecked: a, subInput: d, label: f, description: g }) => /* @__PURE__ */ u(m, { direction: "column", gap: "xs", customMaxWidth: i, children: [
7585
+ render: ({ value: s, id: c, isChecked: d, subInput: a, label: m, description: p }) => /* @__PURE__ */ u(f, { direction: "column", gap: "xs", customMaxWidth: i, children: [
7573
7586
  /* @__PURE__ */ e(
7574
7587
  In,
7575
7588
  {
7576
7589
  id: `${c.toString()}-${s}`,
7577
- name: o.groupName || f,
7578
- label: f,
7590
+ name: o.groupName || m,
7591
+ label: m,
7579
7592
  value: s,
7580
- checked: a,
7581
- onChange: (p) => o.onChecked({
7593
+ checked: d,
7594
+ onChange: (g) => o.onChecked({
7582
7595
  id: c,
7583
- label: p.target.name,
7584
- value: p.target.value
7596
+ label: g.target.name,
7597
+ value: g.target.value
7585
7598
  }),
7586
7599
  disabled: o.disableAll
7587
7600
  },
7588
7601
  c
7589
7602
  ),
7590
- g && /* @__PURE__ */ e(
7603
+ p && /* @__PURE__ */ e(
7591
7604
  D,
7592
7605
  {
7593
7606
  color: "gray-500",
7594
7607
  style: {
7595
7608
  marginLeft: 28
7596
7609
  },
7597
- children: g
7610
+ children: p
7598
7611
  }
7599
7612
  ),
7600
- d
7613
+ a
7601
7614
  ] })
7602
7615
  }
7603
7616
  )
@@ -7614,10 +7627,10 @@ const Vo = (t) => {
7614
7627
  fullWidth: o = !1,
7615
7628
  ...i
7616
7629
  }) => {
7617
- var c, a, d;
7630
+ var c, d, a;
7618
7631
  const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
7619
7632
  return /* @__PURE__ */ u(
7620
- m,
7633
+ f,
7621
7634
  {
7622
7635
  gap: r === "horizontal" ? "spacing-96" : "sm",
7623
7636
  direction: r === "horizontal" ? "row" : "column",
@@ -7628,32 +7641,32 @@ const Vo = (t) => {
7628
7641
  {
7629
7642
  condition: !!i.inputProps.required,
7630
7643
  fallback: /* @__PURE__ */ u(
7631
- m,
7644
+ f,
7632
7645
  {
7633
7646
  direction: "column",
7634
7647
  customMaxWidth: s,
7635
7648
  fullWidth: o,
7636
7649
  children: [
7637
- /* @__PURE__ */ e(ce, { children: i.title }),
7650
+ /* @__PURE__ */ e(se, { children: i.title }),
7638
7651
  /* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
7639
7652
  ]
7640
7653
  }
7641
7654
  ),
7642
7655
  children: /* @__PURE__ */ u(
7643
- m,
7656
+ f,
7644
7657
  {
7645
7658
  direction: "column",
7646
7659
  customMaxWidth: s,
7647
7660
  fullWidth: o,
7648
7661
  children: [
7649
7662
  /* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
7650
- /* @__PURE__ */ e(ce, { fontSize: t, children: i.title }),
7651
- /* @__PURE__ */ e(ce, { color: "error", fontSize: t, children: n }),
7663
+ /* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
7664
+ /* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
7652
7665
  /* @__PURE__ */ e(oe, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
7653
7666
  Me,
7654
7667
  {
7655
- label: (a = i.tooltip) == null ? void 0 : a.label,
7656
- arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
7668
+ label: (d = i.tooltip) == null ? void 0 : d.label,
7669
+ arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
7657
7670
  ...i.tooltip,
7658
7671
  children: /* @__PURE__ */ e(
7659
7672
  F,
@@ -7698,10 +7711,10 @@ const Vo = (t) => {
7698
7711
  fullWidth: i = !1,
7699
7712
  ...l
7700
7713
  }) => {
7701
- var c, a, d;
7714
+ var c, d, a;
7702
7715
  const s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
7703
7716
  return /* @__PURE__ */ u(
7704
- m,
7717
+ f,
7705
7718
  {
7706
7719
  gap: r === "horizontal" ? "spacing-96" : "sm",
7707
7720
  direction: r === "horizontal" ? "row" : "column",
@@ -7712,32 +7725,32 @@ const Vo = (t) => {
7712
7725
  {
7713
7726
  condition: o,
7714
7727
  fallback: /* @__PURE__ */ u(
7715
- m,
7728
+ f,
7716
7729
  {
7717
7730
  direction: "column",
7718
7731
  customMaxWidth: s,
7719
7732
  fullWidth: i,
7720
7733
  children: [
7721
- /* @__PURE__ */ e(ce, { children: l.title }),
7734
+ /* @__PURE__ */ e(se, { children: l.title }),
7722
7735
  /* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: l.titleDescription })
7723
7736
  ]
7724
7737
  }
7725
7738
  ),
7726
7739
  children: /* @__PURE__ */ u(
7727
- m,
7740
+ f,
7728
7741
  {
7729
7742
  direction: "column",
7730
7743
  customMaxWidth: s,
7731
7744
  fullWidth: i,
7732
7745
  children: [
7733
7746
  /* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
7734
- /* @__PURE__ */ e(ce, { fontSize: t, children: l.title }),
7735
- /* @__PURE__ */ e(ce, { color: "error", fontSize: t, children: n }),
7747
+ /* @__PURE__ */ e(se, { fontSize: t, children: l.title }),
7748
+ /* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
7736
7749
  /* @__PURE__ */ e(oe, { condition: !!((c = l.tooltip) != null && c.label), children: /* @__PURE__ */ e(
7737
7750
  Me,
7738
7751
  {
7739
- label: (a = l.tooltip) == null ? void 0 : a.label,
7740
- arrowPosition: (d = l.tooltip) == null ? void 0 : d.arrowPosition,
7752
+ label: (d = l.tooltip) == null ? void 0 : d.label,
7753
+ arrowPosition: (a = l.tooltip) == null ? void 0 : a.arrowPosition,
7741
7754
  ...l.tooltip,
7742
7755
  children: /* @__PURE__ */ e(
7743
7756
  F,
@@ -7778,16 +7791,16 @@ const Vo = (t) => {
7778
7791
  ...n
7779
7792
  }) => {
7780
7793
  const o = An(), i = (s) => {
7781
- var a, d, f, g, p, x;
7794
+ var d, a, m, p, g, x;
7782
7795
  if (!s) return;
7783
- const c = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (d = (a = o == null ? void 0 : o.computed) == null ? void 0 : a.red) == null ? void 0 : d[600] : t === "secondary-primary" ? (g = (f = o == null ? void 0 : o.computed) == null ? void 0 : f.blue) == null ? void 0 : g[700] : (x = (p = o == null ? void 0 : o.computed) == null ? void 0 : p.gray) == null ? void 0 : x[50];
7796
+ const c = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (a = (d = o == null ? void 0 : o.computed) == null ? void 0 : d.red) == null ? void 0 : a[600] : t === "secondary-primary" ? (p = (m = o == null ? void 0 : o.computed) == null ? void 0 : m.blue) == null ? void 0 : p[700] : (x = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.gray) == null ? void 0 : x[50];
7784
7797
  return /* @__PURE__ */ e(F, { name: s, size: r, style: { color: c } });
7785
7798
  }, l = () => {
7786
- var c, a, d, f;
7799
+ var c, d, a, m;
7787
7800
  if (t !== "secondary-danger" && t !== "secondary-primary")
7788
7801
  return n.title;
7789
7802
  const s = {
7790
- color: n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary-danger" ? (a = (c = o == null ? void 0 : o.computed) == null ? void 0 : c.red) == null ? void 0 : a[600] : (f = (d = o == null ? void 0 : o.computed) == null ? void 0 : d.blue) == null ? void 0 : f[700]
7803
+ color: n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary-danger" ? (d = (c = o == null ? void 0 : o.computed) == null ? void 0 : c.red) == null ? void 0 : d[600] : (m = (a = o == null ? void 0 : o.computed) == null ? void 0 : a.blue) == null ? void 0 : m[700]
7791
7804
  };
7792
7805
  switch (r) {
7793
7806
  case "xs":
@@ -7832,10 +7845,10 @@ const Vo = (t) => {
7832
7845
  fullWidth: o = !1,
7833
7846
  ...i
7834
7847
  }) => {
7835
- var c, a, d;
7848
+ var c, d, a;
7836
7849
  const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
7837
7850
  return /* @__PURE__ */ u(
7838
- m,
7851
+ f,
7839
7852
  {
7840
7853
  gap: r === "horizontal" ? "spacing-96" : "sm",
7841
7854
  direction: r === "horizontal" ? "row" : "column",
@@ -7846,32 +7859,32 @@ const Vo = (t) => {
7846
7859
  {
7847
7860
  condition: !!i.inputProps.required,
7848
7861
  fallback: /* @__PURE__ */ u(
7849
- m,
7862
+ f,
7850
7863
  {
7851
7864
  direction: "column",
7852
7865
  customMaxWidth: s,
7853
7866
  fullWidth: o,
7854
7867
  children: [
7855
- /* @__PURE__ */ e(ce, { children: i.title }),
7868
+ /* @__PURE__ */ e(se, { children: i.title }),
7856
7869
  /* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
7857
7870
  ]
7858
7871
  }
7859
7872
  ),
7860
7873
  children: /* @__PURE__ */ u(
7861
- m,
7874
+ f,
7862
7875
  {
7863
7876
  direction: "column",
7864
7877
  customMaxWidth: s,
7865
7878
  fullWidth: o,
7866
7879
  children: [
7867
7880
  /* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
7868
- /* @__PURE__ */ e(ce, { fontSize: t, children: i.title }),
7869
- /* @__PURE__ */ e(ce, { color: "error", fontSize: t, children: n }),
7881
+ /* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
7882
+ /* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
7870
7883
  /* @__PURE__ */ e(oe, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
7871
7884
  Me,
7872
7885
  {
7873
- label: (a = i.tooltip) == null ? void 0 : a.label,
7874
- arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
7886
+ label: (d = i.tooltip) == null ? void 0 : d.label,
7887
+ arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
7875
7888
  ...i.tooltip,
7876
7889
  children: /* @__PURE__ */ e(
7877
7890
  F,
@@ -7895,7 +7908,7 @@ const Vo = (t) => {
7895
7908
  ),
7896
7909
  /* @__PURE__ */ u(le, { direction: "column", gap: "xs", children: [
7897
7910
  /* @__PURE__ */ e(
7898
- m,
7911
+ f,
7899
7912
  {
7900
7913
  direction: "column",
7901
7914
  style: {
@@ -7939,8 +7952,8 @@ async function Go(t, r) {
7939
7952
  ), new Promise((l, s) => {
7940
7953
  o.toBlob((c) => {
7941
7954
  if (!c) return s("Canvas is empty");
7942
- const a = new File([c], "cropped.png", { type: "image/png" });
7943
- l(a);
7955
+ const d = new File([c], "cropped.png", { type: "image/png" });
7956
+ l(d);
7944
7957
  }, "image/png");
7945
7958
  });
7946
7959
  }
@@ -7963,10 +7976,10 @@ const Jr = {
7963
7976
  size: l = "96",
7964
7977
  aspect: s = "1:1",
7965
7978
  containerProps: c,
7966
- maxFileSize: a = 2,
7967
- onError: d
7968
- }, f) => {
7969
- const g = ke("md"), [p, x] = R(!1), [W, y] = R(null), [k, E] = R(!1), [w, V] = R({ x: 0, y: 0 }), [v, A] = R(1), [z, C] = R(null);
7979
+ maxFileSize: d = 2,
7980
+ onError: a
7981
+ }, m) => {
7982
+ const p = ke("md"), [g, x] = R(!1), [W, y] = R(null), [k, E] = R(!1), [w, V] = R({ x: 0, y: 0 }), [v, A] = R(1), [z, C] = R(null);
7970
7983
  U(() => {
7971
7984
  r === null && i(null);
7972
7985
  }, [r]);
@@ -7987,20 +8000,20 @@ const Jr = {
7987
8000
  if (!(!W || !z))
7988
8001
  try {
7989
8002
  const ee = await Go(W, z);
7990
- if (a && ee.size > a * 1024 * 1024) {
7991
- d == null || d(`Ukuran file maksimal ${a}MB`);
8003
+ if (d && ee.size > d * 1024 * 1024) {
8004
+ a == null || a(`Ukuran file maksimal ${d}MB`);
7992
8005
  return;
7993
8006
  }
7994
8007
  t == null || t(ee);
7995
8008
  const O = URL.createObjectURL(ee);
7996
8009
  i(O, ee), E(!1);
7997
8010
  } catch {
7998
- d == null || d("Gagal memproses gambar");
8011
+ a == null || a("Gagal memproses gambar");
7999
8012
  }
8000
- }, _ = se(null), X = () => {
8013
+ }, _ = ce(null), X = () => {
8001
8014
  _.current && _.current.click();
8002
8015
  };
8003
- Vn(f, () => ({
8016
+ Vn(m, () => ({
8004
8017
  openFileDialog: () => {
8005
8018
  var ee;
8006
8019
  (ee = _.current) == null || ee.click();
@@ -8009,7 +8022,7 @@ const Jr = {
8009
8022
  const te = parseInt(l, 10), me = Jr[s];
8010
8023
  let ae, de;
8011
8024
  return me >= 1 ? (de = te, ae = te * me) : (ae = te, de = te / me), /* @__PURE__ */ u(
8012
- m,
8025
+ f,
8013
8026
  {
8014
8027
  direction: "column",
8015
8028
  display: "flex",
@@ -8043,7 +8056,7 @@ const Jr = {
8043
8056
  }
8044
8057
  }
8045
8058
  ) : /* @__PURE__ */ e(
8046
- m,
8059
+ f,
8047
8060
  {
8048
8061
  display: "flex",
8049
8062
  direction: "column",
@@ -8064,7 +8077,7 @@ const Jr = {
8064
8077
  }
8065
8078
  ),
8066
8079
  /* @__PURE__ */ u(
8067
- m,
8080
+ f,
8068
8081
  {
8069
8082
  direction: "column",
8070
8083
  position: "absolute",
@@ -8075,7 +8088,7 @@ const Jr = {
8075
8088
  style: {
8076
8089
  inset: 0,
8077
8090
  backgroundColor: "var(--sa-color-black-alpha-a30, #080f214a)",
8078
- opacity: p ? 1 : 0,
8091
+ opacity: g ? 1 : 0,
8079
8092
  transition: "opacity 0.3s ease-in-out"
8080
8093
  },
8081
8094
  onClick: X,
@@ -8091,7 +8104,7 @@ const Jr = {
8091
8104
  style: { display: "none" }
8092
8105
  }
8093
8106
  ),
8094
- /* @__PURE__ */ u(m, { display: "flex", align: "center", gap: "spacing-2", direction: "row", children: [
8107
+ /* @__PURE__ */ u(f, { display: "flex", align: "center", gap: "spacing-2", direction: "row", children: [
8095
8108
  /* @__PURE__ */ e(
8096
8109
  F,
8097
8110
  {
@@ -8113,7 +8126,7 @@ const Jr = {
8113
8126
  }
8114
8127
  ),
8115
8128
  n && /* @__PURE__ */ e(
8116
- m,
8129
+ f,
8117
8130
  {
8118
8131
  direction: "column",
8119
8132
  position: "absolute",
@@ -8126,7 +8139,7 @@ const Jr = {
8126
8139
  backgroundColor: "var(--sa-color-white-alpha-a80, #e5e9f640)"
8127
8140
  },
8128
8141
  children: /* @__PURE__ */ e(
8129
- m,
8142
+ f,
8130
8143
  {
8131
8144
  direction: "column",
8132
8145
  borderRadius: "rounded-full",
@@ -8163,7 +8176,7 @@ const Jr = {
8163
8176
  borderRadius: "var(--sa-radii-md)",
8164
8177
  boxShadow: "0 20px 60px rgba(0,0,0,0.3)",
8165
8178
  overflow: "hidden",
8166
- width: g ? s === "1:1" ? "min(90vw, 480px)" : `min(90vw, ${ae * 2}px)` : "calc(100vw - 2rem)",
8179
+ width: p ? s === "1:1" ? "min(90vw, 480px)" : `min(90vw, ${ae * 2}px)` : "calc(100vw - 2rem)",
8167
8180
  display: "flex",
8168
8181
  flexDirection: "column"
8169
8182
  },
@@ -8230,10 +8243,10 @@ const Jr = {
8230
8243
  required: i = !1,
8231
8244
  ...l
8232
8245
  }) => {
8233
- var a, d, f;
8246
+ var d, a, m;
8234
8247
  const s = l.hideMessageError || !1, c = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
8235
8248
  return /* @__PURE__ */ u(
8236
- m,
8249
+ f,
8237
8250
  {
8238
8251
  gap: r === "horizontal" ? "spacing-96" : "sm",
8239
8252
  direction: r === "horizontal" ? "row" : "column",
@@ -8244,32 +8257,32 @@ const Jr = {
8244
8257
  {
8245
8258
  condition: !!i,
8246
8259
  fallback: /* @__PURE__ */ u(
8247
- m,
8260
+ f,
8248
8261
  {
8249
8262
  direction: "column",
8250
8263
  customMaxWidth: c,
8251
8264
  fullWidth: o,
8252
8265
  children: [
8253
- /* @__PURE__ */ e(ce, { children: l.title }),
8266
+ /* @__PURE__ */ e(se, { children: l.title }),
8254
8267
  /* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: l.description })
8255
8268
  ]
8256
8269
  }
8257
8270
  ),
8258
8271
  children: /* @__PURE__ */ u(
8259
- m,
8272
+ f,
8260
8273
  {
8261
8274
  direction: "column",
8262
8275
  customMaxWidth: c,
8263
8276
  fullWidth: o,
8264
8277
  children: [
8265
8278
  /* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
8266
- /* @__PURE__ */ e(ce, { fontSize: t, children: l.title }),
8267
- /* @__PURE__ */ e(ce, { color: "error", fontSize: t, children: n }),
8268
- /* @__PURE__ */ e(oe, { condition: !!((a = l.tooltip) != null && a.label), children: /* @__PURE__ */ e(
8279
+ /* @__PURE__ */ e(se, { fontSize: t, children: l.title }),
8280
+ /* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
8281
+ /* @__PURE__ */ e(oe, { condition: !!((d = l.tooltip) != null && d.label), children: /* @__PURE__ */ e(
8269
8282
  Me,
8270
8283
  {
8271
- label: (d = l.tooltip) == null ? void 0 : d.label,
8272
- arrowPosition: (f = l.tooltip) == null ? void 0 : f.arrowPosition,
8284
+ label: (a = l.tooltip) == null ? void 0 : a.label,
8285
+ arrowPosition: (m = l.tooltip) == null ? void 0 : m.arrowPosition,
8273
8286
  ...l.tooltip,
8274
8287
  children: /* @__PURE__ */ e(
8275
8288
  F,
@@ -8305,10 +8318,10 @@ const Jr = {
8305
8318
  fullWidth: o = !1,
8306
8319
  ...i
8307
8320
  }) => {
8308
- var s, c, a;
8321
+ var s, c, d;
8309
8322
  const l = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
8310
8323
  return /* @__PURE__ */ u(
8311
- m,
8324
+ f,
8312
8325
  {
8313
8326
  gap: r === "horizontal" ? "spacing-96" : "sm",
8314
8327
  direction: r === "horizontal" ? "row" : "column",
@@ -8319,32 +8332,32 @@ const Jr = {
8319
8332
  {
8320
8333
  condition: !!i.inputProps.required,
8321
8334
  fallback: /* @__PURE__ */ u(
8322
- m,
8335
+ f,
8323
8336
  {
8324
8337
  direction: "column",
8325
8338
  customMaxWidth: l,
8326
8339
  fullWidth: o,
8327
8340
  children: [
8328
- /* @__PURE__ */ e(ce, { children: i.title }),
8341
+ /* @__PURE__ */ e(se, { children: i.title }),
8329
8342
  /* @__PURE__ */ e(D, { fontSize: t, color: "gray-500", children: i.description })
8330
8343
  ]
8331
8344
  }
8332
8345
  ),
8333
8346
  children: /* @__PURE__ */ u(
8334
- m,
8347
+ f,
8335
8348
  {
8336
8349
  direction: "column",
8337
8350
  customMaxWidth: l,
8338
8351
  fullWidth: o,
8339
8352
  children: [
8340
8353
  /* @__PURE__ */ u(le, { direction: "row", gap: "xs", align: "center", children: [
8341
- /* @__PURE__ */ e(ce, { fontSize: t, children: i.title }),
8342
- /* @__PURE__ */ e(ce, { color: "error", fontSize: t, children: n }),
8354
+ /* @__PURE__ */ e(se, { fontSize: t, children: i.title }),
8355
+ /* @__PURE__ */ e(se, { color: "error", fontSize: t, children: n }),
8343
8356
  /* @__PURE__ */ e(oe, { condition: !!((s = i.tooltip) != null && s.label), children: /* @__PURE__ */ e(
8344
8357
  Me,
8345
8358
  {
8346
8359
  label: (c = i.tooltip) == null ? void 0 : c.label,
8347
- arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
8360
+ arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
8348
8361
  ...i.tooltip,
8349
8362
  children: /* @__PURE__ */ e(
8350
8363
  F,
@@ -8378,18 +8391,18 @@ const Jr = {
8378
8391
  toggleShow: i = !0,
8379
8392
  disabled: l = !1
8380
8393
  }) => {
8381
- var f;
8394
+ var m;
8382
8395
  const [s, c] = R([]);
8383
8396
  U(() => {
8384
- t && c([...t.map((g) => ({ id: g.id, isActive: g.isActive }))]);
8397
+ t && c([...t.map((p) => ({ id: p.id, isActive: p.isActive }))]);
8385
8398
  }, [t]);
8386
- const a = (f = s.find((g) => g.id === r)) == null ? void 0 : f.isActive, d = Q(() => {
8399
+ const d = (m = s.find((p) => p.id === r)) == null ? void 0 : m.isActive, a = Q(() => {
8387
8400
  c(
8388
- (g) => g.map((p) => p.id === r ? { ...p, isActive: !p.isActive } : p)
8389
- ), n && n(!a);
8390
- }, [r, n, a]);
8401
+ (p) => p.map((g) => g.id === r ? { ...g, isActive: !g.isActive } : g)
8402
+ ), n && n(!d);
8403
+ }, [r, n, d]);
8391
8404
  return /* @__PURE__ */ e(
8392
- m,
8405
+ f,
8393
8406
  {
8394
8407
  direction: "row",
8395
8408
  gap: "md",
@@ -8400,9 +8413,9 @@ const Jr = {
8400
8413
  At,
8401
8414
  {
8402
8415
  disabled: l,
8403
- checked: a,
8404
- onChange: d,
8405
- label: a ? "Active" : "Inactive"
8416
+ checked: d,
8417
+ onChange: a,
8418
+ label: d ? "Active" : "Inactive"
8406
8419
  }
8407
8420
  )
8408
8421
  }
@@ -8429,7 +8442,7 @@ const Jr = {
8429
8442
  return U(() => (window.addEventListener("scroll", o), () => {
8430
8443
  window.removeEventListener("scroll", o);
8431
8444
  }), []), /* @__PURE__ */ e(
8432
- m,
8445
+ f,
8433
8446
  {
8434
8447
  direction: "column",
8435
8448
  style: {
@@ -8438,7 +8451,7 @@ const Jr = {
8438
8451
  right: 0
8439
8452
  },
8440
8453
  children: /* @__PURE__ */ e(
8441
- m,
8454
+ f,
8442
8455
  {
8443
8456
  direction: "column",
8444
8457
  position: "absolute",
@@ -8475,7 +8488,7 @@ const Jr = {
8475
8488
  }, kc = ({ pageLayout: t, children: r, wrapperProps: n, containerProps: o }) => {
8476
8489
  const i = ke("md"), l = (o == null ? void 0 : o.customWidth) ?? 264;
8477
8490
  return /* @__PURE__ */ u(
8478
- m,
8491
+ f,
8479
8492
  {
8480
8493
  display: "block",
8481
8494
  direction: "row",
@@ -8487,7 +8500,7 @@ const Jr = {
8487
8500
  children: [
8488
8501
  t,
8489
8502
  /* @__PURE__ */ e(
8490
- m,
8503
+ f,
8491
8504
  {
8492
8505
  direction: "column",
8493
8506
  show: "desktop",
@@ -8517,8 +8530,8 @@ const Jr = {
8517
8530
  withScrollToTopButton: r = !1,
8518
8531
  scrollToTopButtonProps: n,
8519
8532
  containerProps: o
8520
- }) => /* @__PURE__ */ e(m, { direction: "column", position: "absolute", width: "width-full", style: { zIndex: "var(--app-footer-zindex, 999)" }, children: /* @__PURE__ */ u(
8521
- m,
8533
+ }) => /* @__PURE__ */ e(f, { direction: "column", position: "absolute", width: "width-full", style: { zIndex: "var(--app-footer-zindex, 999)" }, children: /* @__PURE__ */ u(
8534
+ f,
8522
8535
  {
8523
8536
  position: "fixed",
8524
8537
  bottom: "bottom-0",
@@ -8548,14 +8561,14 @@ const Jr = {
8548
8561
  t
8549
8562
  ]
8550
8563
  }
8551
- ) }), Fc = ({ fields: t }) => /* @__PURE__ */ e(m, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ e(
8564
+ ) }), Fc = ({ fields: t }) => /* @__PURE__ */ e(f, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ e(
8552
8565
  xr,
8553
8566
  {
8554
8567
  of: t,
8555
8568
  render: (r, n) => /* @__PURE__ */ e(Yo, { ...r }, n)
8556
8569
  }
8557
- ) }), Yo = ({ title: t, value: r, icon: n }) => /* @__PURE__ */ u(m, { display: "flex", direction: "column", gap: "sm", children: [
8558
- n ? /* @__PURE__ */ u(m, { display: "flex", direction: "row", align: "center", gap: "xs", children: [
8570
+ ) }), Yo = ({ title: t, value: r, icon: n }) => /* @__PURE__ */ u(f, { display: "flex", direction: "column", gap: "sm", children: [
8571
+ n ? /* @__PURE__ */ u(f, { display: "flex", direction: "row", align: "center", gap: "xs", children: [
8559
8572
  /* @__PURE__ */ e(F, { name: n, color: "subtle" }),
8560
8573
  /* @__PURE__ */ e(D, { color: "gray-500", variant: "sub-h3", children: t })
8561
8574
  ] }) : /* @__PURE__ */ e(D, { color: "gray-500", variant: "sub-h3", children: t }),
@@ -8716,13 +8729,13 @@ const Ec = ({
8716
8729
  leftIcon: l,
8717
8730
  showButton: s = !0,
8718
8731
  customHeight: c,
8719
- childrenButton: a,
8720
- customIcon: d
8732
+ childrenButton: d,
8733
+ customIcon: a
8721
8734
  }) => {
8722
- const f = () => {
8735
+ const m = () => {
8723
8736
  switch (o) {
8724
8737
  case "primary":
8725
- return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children: a || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: n, children: a || t }) });
8738
+ return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: n, children: d || t }) });
8726
8739
  case "secondary":
8727
8740
  return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { secondary: !0, iconLeft: l, onClick: n, children: i ? /* @__PURE__ */ e(
8728
8741
  D,
@@ -8731,17 +8744,17 @@ const Ec = ({
8731
8744
  fontSize: "md",
8732
8745
  fontWeight: "medium",
8733
8746
  style: { color: "var(--sa-background-success, #28ac6e)" },
8734
- children: a || t
8747
+ children: d || t
8735
8748
  }
8736
- ) : t }) : /* @__PURE__ */ e(T, { secondary: !0, onClick: n, children: a || t }) });
8749
+ ) : t }) : /* @__PURE__ */ e(T, { secondary: !0, onClick: n, children: d || t }) });
8737
8750
  case "success":
8738
- return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { success: !0, iconLeft: l, onClick: n, children: a || t }) : /* @__PURE__ */ e(T, { success: !0, onClick: n, children: a || t }) });
8751
+ return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { success: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(T, { success: !0, onClick: n, children: d || t }) });
8739
8752
  default:
8740
- return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children: a || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: n, children: a || t }) });
8753
+ return /* @__PURE__ */ e(ie, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: n, children: d || t }) });
8741
8754
  }
8742
8755
  };
8743
8756
  return /* @__PURE__ */ u(
8744
- m,
8757
+ f,
8745
8758
  {
8746
8759
  height: "height-full",
8747
8760
  display: "flex",
@@ -8752,19 +8765,19 @@ const Ec = ({
8752
8765
  marginBlock: "auto",
8753
8766
  customHeight: c,
8754
8767
  children: [
8755
- d || /* @__PURE__ */ e(Xo, {}),
8756
- /* @__PURE__ */ e(m, { direction: "column", children: r.map((g, p) => /* @__PURE__ */ e(
8768
+ a || /* @__PURE__ */ e(Xo, {}),
8769
+ /* @__PURE__ */ e(f, { direction: "column", children: r.map((p, g) => /* @__PURE__ */ e(
8757
8770
  Ge.Body1,
8758
8771
  {
8759
8772
  props: {
8760
8773
  align: "center",
8761
8774
  textAlign: "center"
8762
8775
  },
8763
- children: p > 2 ? null : g
8776
+ children: g > 2 ? null : p
8764
8777
  },
8765
- p
8778
+ g
8766
8779
  )) }),
8767
- s ? f() : null
8780
+ s ? m() : null
8768
8781
  ]
8769
8782
  }
8770
8783
  );
@@ -8984,7 +8997,7 @@ function Ko({ width: t, height: r }) {
8984
8997
  function Lc({ onClick: t }) {
8985
8998
  const r = ke("md");
8986
8999
  return /* @__PURE__ */ u(
8987
- m,
9000
+ f,
8988
9001
  {
8989
9002
  direction: "column",
8990
9003
  height: "height-screen",
@@ -9257,7 +9270,7 @@ function el({ width: t, height: r }) {
9257
9270
  function Mc({ onClick: t }) {
9258
9271
  const r = ke("md");
9259
9272
  return /* @__PURE__ */ u(
9260
- m,
9273
+ f,
9261
9274
  {
9262
9275
  direction: "column",
9263
9276
  height: "height-screen",
@@ -9966,7 +9979,7 @@ function tl({ width: t, height: r }) {
9966
9979
  function Wc({ onClick: t }) {
9967
9980
  const r = ke("md");
9968
9981
  return /* @__PURE__ */ u(
9969
- m,
9982
+ f,
9970
9983
  {
9971
9984
  direction: "column",
9972
9985
  height: "height-screen",
@@ -10020,14 +10033,14 @@ const Bc = (t) => {
10020
10033
  /* @__PURE__ */ e(Qr, { ...t.dialogTitleProps, children: typeof t.title == "string" ? /* @__PURE__ */ e(D, { fontSize: "lg", fontWeight: "medium", children: t.title }) : t.title }),
10021
10034
  /* @__PURE__ */ e(cr, { children: typeof t.description == "string" ? /* @__PURE__ */ e(D, { fontSize: "md", lineHeight: "leading-6", color: "brand", children: t.description }) : t.description }),
10022
10035
  /* @__PURE__ */ e(Yr, { children: /* @__PURE__ */ e(
10023
- m,
10036
+ f,
10024
10037
  {
10025
10038
  display: "flex",
10026
10039
  direction: ((n = t.containerConfirmBtnProps) == null ? void 0 : n.direction) || "row",
10027
10040
  justify: ((o = t.containerConfirmBtnProps) == null ? void 0 : o.justify) || "flex-end",
10028
10041
  ...t.containerConfirmBtnProps,
10029
10042
  children: /* @__PURE__ */ u(
10030
- m,
10043
+ f,
10031
10044
  {
10032
10045
  display: "flex",
10033
10046
  direction: ((i = t.wrapperConfirmBtnProps) == null ? void 0 : i.direction) || "row",
@@ -10037,7 +10050,7 @@ const Bc = (t) => {
10037
10050
  children: [
10038
10051
  t.onCancel && /* @__PURE__ */ e(T, { secondary: !0, onClick: t.onCancel, size: "md", fullWidth: !0, children: t.titleCancelBtn || "Cancel" }),
10039
10052
  /* @__PURE__ */ e(
10040
- m,
10053
+ f,
10041
10054
  {
10042
10055
  direction: "column",
10043
10056
  fullWidth: !0,
@@ -10075,17 +10088,17 @@ const Bc = (t) => {
10075
10088
  paddingBlock: l = "spacing-0",
10076
10089
  header: s,
10077
10090
  footer: c,
10078
- title: a,
10079
- titleTag: d,
10080
- action: f,
10081
- actionContainer: g,
10082
- containerProps: p,
10091
+ title: d,
10092
+ titleTag: a,
10093
+ action: m,
10094
+ actionContainer: p,
10095
+ containerProps: g,
10083
10096
  bodyProps: x,
10084
10097
  headerProps: W = { borderBottom: !0 },
10085
10098
  footerProps: y = { borderTop: !0 },
10086
10099
  variantTag: k = "info"
10087
10100
  }) => {
10088
- const E = se(null), [w, V] = R("100vh");
10101
+ const E = ce(null), [w, V] = R("100vh");
10089
10102
  U(() => {
10090
10103
  const C = () => {
10091
10104
  if (E.current) {
@@ -10095,24 +10108,24 @@ const Bc = (t) => {
10095
10108
  };
10096
10109
  return C(), window.addEventListener("resize", C), () => window.removeEventListener("resize", C);
10097
10110
  }, []);
10098
- const v = () => d ? /* @__PURE__ */ u(m, { direction: "row", gap: "sm", align: "center", children: [
10099
- /* @__PURE__ */ e(D, { fontWeight: "medium", children: a }),
10100
- /* @__PURE__ */ e(ft, { border: !0, text: d, variant: k })
10101
- ] }) : /* @__PURE__ */ e(D, { fontWeight: "medium", children: a }), A = () => s || /* @__PURE__ */ u(
10102
- m,
10111
+ const v = () => a ? /* @__PURE__ */ u(f, { direction: "row", gap: "sm", align: "center", children: [
10112
+ /* @__PURE__ */ e(D, { fontWeight: "medium", children: d }),
10113
+ /* @__PURE__ */ e(ft, { border: !0, text: a, variant: k })
10114
+ ] }) : /* @__PURE__ */ e(D, { fontWeight: "medium", children: d }), A = () => s || /* @__PURE__ */ u(
10115
+ f,
10103
10116
  {
10104
10117
  direction: "row",
10105
10118
  justify: "space-between",
10106
10119
  align: "flex-start",
10107
10120
  gap: "md",
10108
10121
  children: [
10109
- /* @__PURE__ */ e(m, { direction: "column", children: a ? v() : null }),
10110
- /* @__PURE__ */ e(m, { direction: "column", ...g, children: f ?? null })
10122
+ /* @__PURE__ */ e(f, { direction: "column", children: d ? v() : null }),
10123
+ /* @__PURE__ */ e(f, { direction: "column", ...p, children: m ?? null })
10111
10124
  ]
10112
10125
  }
10113
- ), z = !!(s || a || f);
10126
+ ), z = !!(s || d || m);
10114
10127
  return /* @__PURE__ */ u(
10115
- m,
10128
+ f,
10116
10129
  {
10117
10130
  ref: E,
10118
10131
  height: r,
@@ -10122,17 +10135,17 @@ const Bc = (t) => {
10122
10135
  paddingInline: i,
10123
10136
  bg: "white",
10124
10137
  direction: "column",
10125
- ...p,
10138
+ ...g,
10126
10139
  style: {
10127
10140
  backgroundColor: "var(--sa-background-primary, #ffffff)",
10128
10141
  display: "flex",
10129
10142
  minHeight: w,
10130
- ...(p == null ? void 0 : p.style) ?? {}
10143
+ ...(g == null ? void 0 : g.style) ?? {}
10131
10144
  },
10132
10145
  children: [
10133
10146
  s !== null && z ? /* @__PURE__ */ e(an, { ...W, children: A() }) : null,
10134
10147
  /* @__PURE__ */ e(
10135
- m,
10148
+ f,
10136
10149
  {
10137
10150
  direction: "column",
10138
10151
  padding: "spacing-0",
@@ -10153,18 +10166,18 @@ const Bc = (t) => {
10153
10166
  ), Ac = tt.memo(
10154
10167
  ({ value: t, options: r = [], onChange: n, multiple: o }) => {
10155
10168
  const i = (t == null ? void 0 : t.map((c) => c.value)) || [], l = (r == null ? void 0 : r.filter((c) => i.includes(c.value))) || [], s = (c) => {
10156
- const a = [...l];
10157
- let d = [];
10158
- o ? d = i.includes(c.value) ? a.filter((f) => f.value !== c.value) : [...a, c] : d = [c], n == null || n(d);
10169
+ const d = [...l];
10170
+ let a = [];
10171
+ o ? a = i.includes(c.value) ? d.filter((m) => m.value !== c.value) : [...d, c] : a = [c], n == null || n(a);
10159
10172
  };
10160
- return /* @__PURE__ */ e(m, { direction: "row", gap: "sm", flexWrap: "wrap", children: r == null ? void 0 : r.map((c, a) => /* @__PURE__ */ e(
10173
+ return /* @__PURE__ */ e(f, { direction: "row", gap: "sm", flexWrap: "wrap", children: r == null ? void 0 : r.map((c, d) => /* @__PURE__ */ e(
10161
10174
  T,
10162
10175
  {
10163
10176
  ...i.includes(c.value) ? { primary: !0 } : { secondary: !0 },
10164
10177
  onClick: () => s(c),
10165
10178
  children: c.label
10166
10179
  },
10167
- a
10180
+ d
10168
10181
  )) });
10169
10182
  }
10170
10183
  );
@@ -10278,30 +10291,30 @@ function ll(t) {
10278
10291
  onViewModeChange: l,
10279
10292
  showViewModeToggle: s = !0,
10280
10293
  showCloseButton: c = !0,
10281
- size: a,
10282
- asideWidth: d,
10283
- disableEscapeClose: f = !1,
10284
- disableBackdropClose: g = !1,
10285
- lockBodyScroll: p = !0,
10294
+ size: d,
10295
+ asideWidth: a,
10296
+ disableEscapeClose: m = !1,
10297
+ disableBackdropClose: p = !1,
10298
+ lockBodyScroll: g = !0,
10286
10299
  children: x
10287
10300
  } = t, [W, y] = R(i), k = o ?? W, w = ke("md") ? k : "fullscreen", V = Q(
10288
10301
  (X) => {
10289
10302
  o === void 0 && y(X), l == null || l(X);
10290
10303
  },
10291
10304
  [o, l]
10292
- ), v = se(null);
10305
+ ), v = ce(null);
10293
10306
  U(() => {
10294
- if (!(!r || !p))
10307
+ if (!(!r || !g))
10295
10308
  return v.current = document.body.style.overflow, document.body.style.overflow = "hidden", () => {
10296
10309
  document.body.style.overflow = v.current ?? "";
10297
10310
  };
10298
- }, [r, p]), U(() => {
10299
- if (!r || f) return;
10311
+ }, [r, g]), U(() => {
10312
+ if (!r || m) return;
10300
10313
  const X = (te) => {
10301
10314
  te.key === "Escape" && n();
10302
10315
  };
10303
10316
  return window.addEventListener("keydown", X), () => window.removeEventListener("keydown", X);
10304
- }, [r, f, n]);
10317
+ }, [r, m, n]);
10305
10318
  const A = fe(
10306
10319
  () => kt(x, br),
10307
10320
  [x]
@@ -10322,10 +10335,10 @@ function ll(t) {
10322
10335
  w === "fullscreen" && Fe["lyd-fullscreen"],
10323
10336
  w === "sidebar" && Fe["lyd-sidebar"]
10324
10337
  ].filter(Boolean).join(" "), G = {
10325
- "--lyd-max-w": ol(a),
10326
- ...d !== void 0 && { "--lyd-aside-w": d }
10338
+ "--lyd-max-w": ol(d),
10339
+ ...a !== void 0 && { "--lyd-aside-w": a }
10327
10340
  }, _ = () => {
10328
- g || n();
10341
+ p || n();
10329
10342
  };
10330
10343
  return /* @__PURE__ */ u(
10331
10344
  "div",
@@ -10477,10 +10490,10 @@ const Rc = (t) => {
10477
10490
  const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, [o, i] = Rt(), l = zt(o.toString());
10478
10491
  return {
10479
10492
  activeTab: l[n] ? parseInt(l[n]) : r,
10480
- handleTabChange: (a) => {
10493
+ handleTabChange: (d) => {
10481
10494
  i({
10482
10495
  ...l,
10483
- [n]: a.toString()
10496
+ [n]: d.toString()
10484
10497
  });
10485
10498
  },
10486
10499
  searchQueries: l
@@ -10494,16 +10507,16 @@ function Vc({
10494
10507
  const o = gt();
10495
10508
  U(() => {
10496
10509
  let i = null, l = null;
10497
- for (const a of r) {
10498
- const d = a.items.find((f) => f.to ? f.to === "/" ? o.pathname === "/" : !!(f.to === o.pathname || o.pathname.startsWith(f.to + "/")) : !1);
10499
- if (d) {
10500
- i = d, l = a;
10510
+ for (const d of r) {
10511
+ const a = d.items.find((m) => m.to ? m.to === "/" ? o.pathname === "/" : !!(m.to === o.pathname || o.pathname.startsWith(m.to + "/")) : !1);
10512
+ if (a) {
10513
+ i = a, l = d;
10501
10514
  break;
10502
10515
  }
10503
10516
  }
10504
10517
  const s = [];
10505
10518
  i != null && i.title && s.push(i.title), l != null && l.name && s.push(l.name.toTitleCase());
10506
- const c = (a, d) => a.length > 0 ? `${a.join(" - ")} | ${d}` : d;
10519
+ const c = (d, a) => d.length > 0 ? `${d.join(" - ")} | ${a}` : a;
10507
10520
  document.title = (n || c)(s, t);
10508
10521
  }, [o.pathname]);
10509
10522
  }
@@ -10514,10 +10527,10 @@ const Oc = () => {
10514
10527
  setSearchParams: r,
10515
10528
  searchParams: t,
10516
10529
  searchQueries: n,
10517
- isHasQuery: (f, g) => t.has(f) && t.get(f) === g,
10518
- getQueryParam: (f) => t.get(f),
10530
+ isHasQuery: (m, p) => t.has(m) && t.get(m) === p,
10531
+ getQueryParam: (m) => t.get(m),
10519
10532
  // route params
10520
- getRouteParam: (f) => o[f],
10533
+ getRouteParam: (m) => o[m],
10521
10534
  params: o,
10522
10535
  // location info
10523
10536
  location: i,
@@ -10530,23 +10543,23 @@ function Hc(t) {
10530
10543
  var o, i;
10531
10544
  const r = t.decodedAccessToken;
10532
10545
  return fe(() => {
10533
- var a, d;
10534
- const l = ((d = (a = r == null ? void 0 : r.access) == null ? void 0 : a.role) == null ? void 0 : d.code) ?? "", s = Object.keys(t.role).reduce(
10535
- (f, g) => {
10536
- const p = `is${g.toLowerCase().replace(/(^\w|_\w)/g, (x) => x.replace("_", "").toUpperCase())}`;
10537
- return { ...f, [p]: !1 };
10546
+ var d, a;
10547
+ const l = ((a = (d = r == null ? void 0 : r.access) == null ? void 0 : d.role) == null ? void 0 : a.code) ?? "", s = Object.keys(t.role).reduce(
10548
+ (m, p) => {
10549
+ const g = `is${p.toLowerCase().replace(/(^\w|_\w)/g, (x) => x.replace("_", "").toUpperCase())}`;
10550
+ return { ...m, [g]: !1 };
10538
10551
  },
10539
10552
  {}
10540
10553
  );
10541
10554
  return {
10542
- ...Object.keys(t.role).reduce((f, g) => {
10543
- const p = `is${g.toLowerCase().replace(/(^\w|_\w)/g, (x) => x.replace("_", "").toUpperCase())}`;
10555
+ ...Object.keys(t.role).reduce((m, p) => {
10556
+ const g = `is${p.toLowerCase().replace(/(^\w|_\w)/g, (x) => x.replace("_", "").toUpperCase())}`;
10544
10557
  return {
10545
- ...f,
10546
- [p]: l === t.role[g]
10558
+ ...m,
10559
+ [g]: l === t.role[p]
10547
10560
  };
10548
10561
  }, s),
10549
- hasRole: (f) => l === t.role[f],
10562
+ hasRole: (m) => l === t.role[m],
10550
10563
  getRoleKey: () => l
10551
10564
  };
10552
10565
  }, [(i = (o = r == null ? void 0 : r.access) == null ? void 0 : o.role) == null ? void 0 : i.code, t]);