@starasia/admin 3.1.1 → 3.1.3

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
@@ -6,7 +6,7 @@ export * from "@starasia/box";
6
6
  import { Button as I } from "@starasia/button";
7
7
  export * from "@starasia/button";
8
8
  export * from "@starasia/card";
9
- import { StarasiaDate as mr } from "@starasia/date";
9
+ import { StarasiaDate as pr } from "@starasia/date";
10
10
  export * from "@starasia/date";
11
11
  import { Dialog as ke, DialogTitle as Ce, DialogBody as Fe, DialogFooter as Re } from "@starasia/dialog";
12
12
  export * from "@starasia/dialog";
@@ -20,20 +20,20 @@ import { searchParamsToObject as Ie } from "@starasia/http";
20
20
  export * from "@starasia/http";
21
21
  import { Input as Te } from "@starasia/input";
22
22
  export * from "@starasia/input";
23
- import { Menu as pr, MenuButton as Be, MenuLists as yr, MenuHeading as Nr, MenuBody as xr, MenuFooter as jr } from "@starasia/menu";
23
+ import { Menu as yr, MenuButton as Be, MenuLists as xr, MenuHeading as Nr, MenuBody as Cr, MenuFooter as jr } from "@starasia/menu";
24
24
  export * from "@starasia/menu";
25
25
  import { Pagination as Zr } from "@starasia/pagination";
26
26
  export * from "@starasia/pagination";
27
27
  export * from "@starasia/storage";
28
- import { Tr as we, Td as xe, Table as Cr, Thead as $r, Th as lr, Tbody as _r } from "@starasia/table";
28
+ import { Tr as we, Td as xe, Table as br, Thead as $r, Th as or, Tbody as _r } from "@starasia/table";
29
29
  export * from "@starasia/table";
30
30
  export * from "@starasia/tabs";
31
31
  import { Textarea as Pr } from "@starasia/textarea";
32
32
  export * from "@starasia/textarea";
33
- import { useTheme as Jr, ThemeProvider as or, useRadius as Ur, useColor as Ge } from "@starasia/theme";
33
+ import { useTheme as Jr, ThemeProvider as cr, useRadius as Ur, useColor as Qe } from "@starasia/theme";
34
34
  export * from "@starasia/theme";
35
35
  export * from "@starasia/toast";
36
- import { Toggle as br } from "@starasia/toggle";
36
+ import { Toggle as Dr } from "@starasia/toggle";
37
37
  export * from "@starasia/toggle";
38
38
  import { Tooltip as ce } from "@starasia/tooltip";
39
39
  export * from "@starasia/tooltip";
@@ -45,7 +45,7 @@ import { Text as x } from "@starasia/text";
45
45
  export * from "@starasia/text";
46
46
  import { Icon as E } from "@starasia/icon";
47
47
  export * from "@starasia/icon";
48
- import { Flex as U } from "@starasia/flex";
48
+ import { Flex as q } from "@starasia/flex";
49
49
  export * from "@starasia/flex";
50
50
  export * from "@starasia/progress";
51
51
  export * from "@starasia/stepper";
@@ -54,8 +54,8 @@ export * from "@starasia/story-record";
54
54
  import { Skeleton as De } from "@starasia/skeleton";
55
55
  export * from "@starasia/skeleton";
56
56
  import { jsx as e, jsxs as d, Fragment as X } from "react/jsx-runtime";
57
- import pe, { createContext as Dr, useState as V, useContext as wr, useCallback as ve, useMemo as ge, memo as ne, useEffect as q, useRef as oe, useLayoutEffect as Je, isValidElement as vr, forwardRef as Qe, Children as Gr, useImperativeHandle as Qr } from "react";
58
- import { useSearchParams as Oe, useNavigate as Ye, useLocation as Se, Outlet as cr, Link as Yr, useParams as kr } from "react-router";
57
+ import pe, { createContext as wr, useState as V, useContext as vr, useCallback as ve, useMemo as ge, memo as ne, useEffect as G, useRef as oe, useLayoutEffect as Je, isValidElement as Ue, forwardRef as Ye, Children as Gr, useImperativeHandle as Qr } from "react";
58
+ import { useSearchParams as Oe, useNavigate as Xe, useLocation as Se, Outlet as ar, Link as Yr, useParams as kr } from "react-router";
59
59
  import Xr from "react-easy-crop";
60
60
  const Kr = {
61
61
  menus: [],
@@ -65,7 +65,7 @@ const Kr = {
65
65
  userData: null,
66
66
  setUserData: () => {
67
67
  }
68
- }, Fr = Dr(Kr), Sr = () => wr(Fr), et = (r) => {
68
+ }, Fr = wr(Kr), Sr = () => vr(Fr), et = (r) => {
69
69
  const [t, l] = V(
70
70
  (r == null ? void 0 : r.initialUserData) || null
71
71
  );
@@ -73,7 +73,7 @@ const Kr = {
73
73
  userData: t,
74
74
  setUserData: l
75
75
  };
76
- }, Er = Dr({
76
+ }, Er = wr({
77
77
  badges: {},
78
78
  setBadge: () => {
79
79
  },
@@ -108,7 +108,7 @@ const Kr = {
108
108
  [t, i, n, o]
109
109
  );
110
110
  return /* @__PURE__ */ e(Er.Provider, { value: s, children: r });
111
- }, tt = () => wr(Er), $e = (r, t) => {
111
+ }, tt = () => vr(Er), $e = (r, t) => {
112
112
  const l = t !== void 0 ? t : r;
113
113
  return l == null ? null : typeof l == "string" || typeof l == "number" ? { value: l } : l;
114
114
  }, it = ({
@@ -132,7 +132,7 @@ const Kr = {
132
132
  setUserData: a.setUserData,
133
133
  menuBottom: l
134
134
  },
135
- children: /* @__PURE__ */ e(rt, { children: s ? /* @__PURE__ */ e(or, { value: s, children: r }) : h ? /* @__PURE__ */ e(or, { value: h, children: r }) : r })
135
+ children: /* @__PURE__ */ e(rt, { children: s ? /* @__PURE__ */ e(cr, { value: s, children: r }) : h ? /* @__PURE__ */ e(cr, { value: h, children: r }) : r })
136
136
  }
137
137
  );
138
138
  }, cn = ne(it);
@@ -173,8 +173,8 @@ function nt({
173
173
  }
174
174
  );
175
175
  }
176
- const He = "moduleSwitcherGroupId", Ue = "sa-module-switcher-change";
177
- function ar() {
176
+ const He = "moduleSwitcherGroupId", qe = "sa-module-switcher-change";
177
+ function sr() {
178
178
  if (typeof window > "u") return null;
179
179
  const r = window.localStorage.getItem(He);
180
180
  if (r === null) return null;
@@ -182,30 +182,30 @@ function ar() {
182
182
  return Number.isFinite(t) ? t : null;
183
183
  }
184
184
  function Mr(r) {
185
- typeof window > "u" || (r === null ? window.localStorage.removeItem(He) : window.localStorage.setItem(He, String(r)), window.dispatchEvent(new CustomEvent(Ue, { detail: r })));
185
+ typeof window > "u" || (r === null ? window.localStorage.removeItem(He) : window.localStorage.setItem(He, String(r)), window.dispatchEvent(new CustomEvent(qe, { detail: r })));
186
186
  }
187
187
  function an() {
188
188
  Mr(null);
189
189
  }
190
190
  function Lr() {
191
191
  const [r, t] = V(
192
- () => ar()
192
+ () => sr()
193
193
  );
194
- return q(() => {
194
+ return G(() => {
195
195
  const n = () => {
196
- t(ar());
196
+ t(sr());
197
197
  }, i = (o) => {
198
198
  o.key === He && n();
199
199
  };
200
- return window.addEventListener(Ue, n), window.addEventListener("storage", i), () => {
201
- window.removeEventListener(Ue, n), window.removeEventListener("storage", i);
200
+ return window.addEventListener(qe, n), window.addEventListener("storage", i), () => {
201
+ window.removeEventListener(qe, n), window.removeEventListener("storage", i);
202
202
  };
203
203
  }, []), { selectedGroupId: r, setSelectedGroupId: (n) => {
204
204
  Mr(n), t(n);
205
205
  } };
206
206
  }
207
207
  let Le = 0, ye = !1;
208
- const sr = () => /* @__PURE__ */ d(
208
+ const dr = () => /* @__PURE__ */ d(
209
209
  "svg",
210
210
  {
211
211
  width: "100%",
@@ -222,7 +222,7 @@ const sr = () => /* @__PURE__ */ d(
222
222
  /* @__PURE__ */ e("line", { x1: "6", y1: "1.667", x2: "6", y2: "14.333" })
223
223
  ]
224
224
  }
225
- ), dr = {
225
+ ), hr = {
226
226
  width: "100%",
227
227
  display: "flex",
228
228
  alignItems: "center",
@@ -254,9 +254,9 @@ function sn({
254
254
  profileMenuItems: p,
255
255
  logoutButton: g
256
256
  }) {
257
- var ir, nr;
258
- const [w] = Oe(), A = w.get("embed") === "true", C = Sr(), { badges: T } = tt(), O = Ye(), $ = Se(), v = !ie("md"), [D, J] = V(!1), [M, Q] = V(!1), [re, j] = V(!1), [k, z] = V(!1), [F, b] = V(/* @__PURE__ */ new Set()), [H, P] = V(null), { selectedGroupId: N, setSelectedGroupId: S } = Lr(), te = oe(null), le = oe(null);
259
- q(() => {
257
+ var nr, lr;
258
+ const [w] = Oe(), A = w.get("embed") === "true", C = Sr(), { badges: T } = tt(), O = Xe(), j = Se(), v = !ie("md"), [D, U] = V(!1), [M, Q] = V(!1), [re, Z] = V(!1), [k, z] = V(!1), [F, b] = V(/* @__PURE__ */ new Set()), [H, P] = V(null), { selectedGroupId: N, setSelectedGroupId: S } = Lr(), te = oe(null), le = oe(null);
259
+ G(() => {
260
260
  const y = te.current;
261
261
  if (!y) return;
262
262
  const W = () => {
@@ -284,7 +284,7 @@ function sn({
284
284
  );
285
285
  y && y.scrollIntoView({ block: "center", behavior: "instant" });
286
286
  }));
287
- }, [C.menus]), q(() => {
287
+ }, [C.menus]), G(() => {
288
288
  ye = !0, ae();
289
289
  const y = setTimeout(ae, 0), W = setTimeout(ae, 50), B = setTimeout(ae, 100), K = setTimeout(ae, 200), ue = setTimeout(() => {
290
290
  ye = !1;
@@ -292,35 +292,35 @@ function sn({
292
292
  return () => {
293
293
  clearTimeout(y), clearTimeout(W), clearTimeout(B), clearTimeout(K), clearTimeout(ue);
294
294
  };
295
- }, [$.pathname]), q(() => {
295
+ }, [j.pathname]), G(() => {
296
296
  le.current && (le.current.scrollTop = 0);
297
- }, [$.pathname]), q(() => {
298
- v && j(!1);
299
- }, [$.pathname, v]), q(() => {
297
+ }, [j.pathname]), G(() => {
298
+ v && Z(!1);
299
+ }, [j.pathname, v]), G(() => {
300
300
  v && Q(!0);
301
301
  }, [v]);
302
302
  const Ne = () => {
303
- J(!0);
304
- }, er = () => {
305
- J(!1);
303
+ U(!0);
304
+ }, rr = () => {
305
+ U(!1);
306
306
  }, Rr = () => {
307
- J(!1), i();
308
- }, rr = (y) => {
307
+ U(!1), i();
308
+ }, tr = (y) => {
309
309
  const W = [y.to];
310
310
  return y.children && W.push(...y.children.map((B) => B.to)), W;
311
311
  }, zr = [
312
- ...C.menus.flatMap((y) => y.items.flatMap(rr)),
313
- ...((ir = C.menuBottom) == null ? void 0 : ir.flatMap(rr)) ?? []
312
+ ...C.menus.flatMap((y) => y.items.flatMap(tr)),
313
+ ...((nr = C.menuBottom) == null ? void 0 : nr.flatMap(tr)) ?? []
314
314
  ], he = (y) => {
315
- if (!$.pathname.startsWith(y)) return !1;
316
- const W = zr.filter((B) => $.pathname.startsWith(B)).sort((B, K) => K.length - B.length)[0];
315
+ if (!j.pathname.startsWith(y)) return !1;
316
+ const W = zr.filter((B) => j.pathname.startsWith(B)).sort((B, K) => K.length - B.length)[0];
317
317
  return y === W;
318
318
  };
319
- q(() => {
319
+ G(() => {
320
320
  var W;
321
321
  const y = (B) => {
322
322
  var K;
323
- (K = B.children) != null && K.some((ue) => $.pathname.startsWith(ue.to)) && b((ue) => {
323
+ (K = B.children) != null && K.some((ue) => j.pathname.startsWith(ue.to)) && b((ue) => {
324
324
  const Me = new Set(ue);
325
325
  return Me.add(B.id), Me;
326
326
  });
@@ -328,14 +328,14 @@ function sn({
328
328
  C.menus.forEach((B) => {
329
329
  B.items.forEach(y);
330
330
  }), (W = C.menuBottom) == null || W.forEach(y);
331
- }, [$.pathname, C.menus, C.menuBottom]);
331
+ }, [j.pathname, C.menus, C.menuBottom]);
332
332
  const Ir = (y) => {
333
333
  b((W) => {
334
334
  const B = new Set(W);
335
335
  return B.has(y) ? B.delete(y) : B.add(y), B;
336
336
  });
337
337
  };
338
- q(() => {
338
+ G(() => {
339
339
  C.menus.length !== 0 && N !== null && !C.menus.some((y) => y.id === N) && S(null);
340
340
  }, [C.menus, N, S]);
341
341
  const Tr = ge(() => {
@@ -350,8 +350,8 @@ function sn({
350
350
  ];
351
351
  }, [C.menus, N]);
352
352
  if (A)
353
- return /* @__PURE__ */ e("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)" }, children: r || /* @__PURE__ */ e(cr, {}) });
354
- const tr = (y) => {
353
+ return /* @__PURE__ */ e("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)" }, children: r || /* @__PURE__ */ e(ar, {}) });
354
+ const ir = (y) => {
355
355
  const W = y.children && y.children.length > 0, B = F.has(y.id), K = W ? y.children.some((fe) => he(fe.to)) : he(y.to), ue = $e(y.badge, T[y.id]), Me = !!ue && M && !v;
356
356
  return /* @__PURE__ */ d("div", { "data-menu-active": K || void 0, children: [
357
357
  /* @__PURE__ */ d(
@@ -631,7 +631,7 @@ function sn({
631
631
  pointerEvents: re ? "auto" : "none",
632
632
  transition: "opacity 0.3s"
633
633
  },
634
- onClick: () => j(!1)
634
+ onClick: () => Z(!1)
635
635
  }
636
636
  ),
637
637
  /* @__PURE__ */ d(
@@ -731,7 +731,7 @@ function sn({
731
731
  cursor: "pointer",
732
732
  flexShrink: 0
733
733
  },
734
- children: /* @__PURE__ */ e(sr, {})
734
+ children: /* @__PURE__ */ e(dr, {})
735
735
  }
736
736
  ),
737
737
  y && /* @__PURE__ */ e(
@@ -768,7 +768,7 @@ function sn({
768
768
  height: "1rem",
769
769
  display: "inline-flex"
770
770
  },
771
- children: /* @__PURE__ */ e(sr, {})
771
+ children: /* @__PURE__ */ e(dr, {})
772
772
  }
773
773
  )
774
774
  }
@@ -776,7 +776,7 @@ function sn({
776
776
  v && /* @__PURE__ */ e(
777
777
  "button",
778
778
  {
779
- onClick: () => j(!1),
779
+ onClick: () => Z(!1),
780
780
  "aria-label": "Close menu",
781
781
  style: {
782
782
  padding: "0.375rem",
@@ -871,7 +871,7 @@ function sn({
871
871
  )
872
872
  }
873
873
  ),
874
- /* @__PURE__ */ e("div", { style: { paddingLeft: "1rem", paddingRight: "1rem", display: "flex", flexDirection: "column", gap: "var(--sa-spacing-xs, 0.25rem)" }, children: y.items.map((W) => tr(W)) })
874
+ /* @__PURE__ */ e("div", { style: { paddingLeft: "1rem", paddingRight: "1rem", display: "flex", flexDirection: "column", gap: "var(--sa-spacing-xs, 0.25rem)" }, children: y.items.map((W) => ir(W)) })
875
875
  ] }, y.id))
876
876
  }
877
877
  ),
@@ -890,7 +890,7 @@ function sn({
890
890
  gap: "var(--sa-spacing-xs, 0.25rem)",
891
891
  flexShrink: 0
892
892
  },
893
- children: C.menuBottom.map((y) => tr(y))
893
+ children: C.menuBottom.map((y) => ir(y))
894
894
  }
895
895
  )
896
896
  ]
@@ -916,7 +916,7 @@ function sn({
916
916
  v && /* @__PURE__ */ e(
917
917
  "button",
918
918
  {
919
- onClick: () => j(!0),
919
+ onClick: () => Z(!0),
920
920
  style: {
921
921
  padding: "0.375rem",
922
922
  borderRadius: "0.5rem",
@@ -949,7 +949,7 @@ function sn({
949
949
  ] }),
950
950
  /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
951
951
  h,
952
- /* @__PURE__ */ d(pr, { position: "bottom-right", children: [
952
+ /* @__PURE__ */ d(yr, { position: "bottom-right", children: [
953
953
  /* @__PURE__ */ e(Be, { children: /* @__PURE__ */ d(
954
954
  "div",
955
955
  {
@@ -1023,7 +1023,7 @@ function sn({
1023
1023
  }
1024
1024
  ) }),
1025
1025
  /* @__PURE__ */ d(
1026
- yr,
1026
+ xr,
1027
1027
  {
1028
1028
  style: {
1029
1029
  width: "280px",
@@ -1113,13 +1113,13 @@ function sn({
1113
1113
  ]
1114
1114
  }
1115
1115
  ) }),
1116
- (m && m.length > 0 || p) && /* @__PURE__ */ d(xr, { children: [
1116
+ (m && m.length > 0 || p) && /* @__PURE__ */ d(Cr, { children: [
1117
1117
  m == null ? void 0 : m.map((y, W) => /* @__PURE__ */ e(Be, { children: /* @__PURE__ */ d(
1118
1118
  "button",
1119
1119
  {
1120
1120
  type: "button",
1121
1121
  onClick: y.onClick,
1122
- style: dr,
1122
+ style: hr,
1123
1123
  onMouseEnter: (B) => {
1124
1124
  B.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)";
1125
1125
  },
@@ -1140,7 +1140,7 @@ function sn({
1140
1140
  type: "button",
1141
1141
  onClick: Ne,
1142
1142
  style: {
1143
- ...dr,
1143
+ ...hr,
1144
1144
  color: "var(--sa-background-error, #c9184a)",
1145
1145
  fontWeight: 500
1146
1146
  },
@@ -1181,7 +1181,7 @@ function sn({
1181
1181
  flex: 1,
1182
1182
  overflowY: "auto"
1183
1183
  },
1184
- children: r || /* @__PURE__ */ e(cr, {})
1184
+ children: r || /* @__PURE__ */ e(ar, {})
1185
1185
  }
1186
1186
  )
1187
1187
  ] })
@@ -1203,11 +1203,11 @@ function sn({
1203
1203
  children: s
1204
1204
  }
1205
1205
  ),
1206
- /* @__PURE__ */ d(ke, { isShow: D, onHide: er, children: [
1206
+ /* @__PURE__ */ d(ke, { isShow: D, onHide: rr, children: [
1207
1207
  /* @__PURE__ */ e(Ce, { children: "Confirmation Logout" }),
1208
1208
  /* @__PURE__ */ e(Fe, { children: "Are you sure you want to end the session and exit the page?" }),
1209
- /* @__PURE__ */ e(Re, { children: /* @__PURE__ */ e(u, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ d(U, { direction: "row", gap: "sm", align: "center", children: [
1210
- /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(I, { secondary: !0, onClick: er, children: "Cancel" }) }),
1209
+ /* @__PURE__ */ e(Re, { children: /* @__PURE__ */ e(u, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ d(q, { direction: "row", gap: "sm", align: "center", children: [
1210
+ /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(I, { secondary: !0, onClick: rr, children: "Cancel" }) }),
1211
1211
  /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(I, { primary: !0, onClick: Rr, children: "Yes, Sure" }) })
1212
1212
  ] }) }) })
1213
1213
  ] }),
@@ -1260,7 +1260,7 @@ function sn({
1260
1260
  children: H.item.title
1261
1261
  }
1262
1262
  ),
1263
- (nr = H.item.children) == null ? void 0 : nr.map((y) => {
1263
+ (lr = H.item.children) == null ? void 0 : lr.map((y) => {
1264
1264
  const W = he(y.to), B = $e(
1265
1265
  y.badge,
1266
1266
  T[y.id]
@@ -1471,7 +1471,7 @@ function dn({
1471
1471
  onSelect: r,
1472
1472
  "aria-label": t = "Pilih module"
1473
1473
  } = {}) {
1474
- const l = Sr(), n = Ye(), { selectedGroupId: i, setSelectedGroupId: o } = Lr(), [s, a] = V(!1), h = (f) => {
1474
+ const l = Sr(), n = Xe(), { selectedGroupId: i, setSelectedGroupId: o } = Lr(), [s, a] = V(!1), h = (f) => {
1475
1475
  var m;
1476
1476
  if (o(f), f !== null) {
1477
1477
  const p = l.menus.find((w) => w.id === f), g = (m = p == null ? void 0 : p.items[0]) == null ? void 0 : m.to;
@@ -1664,7 +1664,7 @@ const hn = ne(
1664
1664
  /* @__PURE__ */ e(xe, { style: s, children: f() })
1665
1665
  ] });
1666
1666
  }
1667
- ), at = ne(({ fields: r, separator: t, labelWidth: l }) => /* @__PURE__ */ e(Cr, { children: r.map((n, i) => /* @__PURE__ */ e(
1667
+ ), at = ne(({ fields: r, separator: t, labelWidth: l }) => /* @__PURE__ */ e(br, { children: r.map((n, i) => /* @__PURE__ */ e(
1668
1668
  ct,
1669
1669
  {
1670
1670
  separator: t,
@@ -1830,63 +1830,66 @@ const hn = ne(
1830
1830
  containerProps: a,
1831
1831
  headerProps: h
1832
1832
  }) => {
1833
- const f = ie("lg"), m = Ye(), p = Se(), g = r == null ? void 0 : r.show, w = () => {
1833
+ const f = ie("lg"), m = Xe(), p = Se(), g = r == null ? void 0 : r.show, w = () => {
1834
1834
  if (typeof (r == null ? void 0 : r.onClick) == "function") {
1835
1835
  r.onClick();
1836
1836
  return;
1837
1837
  }
1838
1838
  m(-1, { replace: !0 });
1839
- }, A = () => o ? vr(o) ? o : /* @__PURE__ */ e(u, { direction: "row", gap: "lg", children: o.map(
1840
- ({ title: $, icon: G, buttonProps: v, onClick: D }, J) => !$ && !G ? null : /* @__PURE__ */ e(
1839
+ }, A = () => o ? Ue(o) ? o : /* @__PURE__ */ e(u, { direction: "row", gap: "lg", children: o.map(
1840
+ ({ title: j, icon: J, buttonProps: v, onClick: D }, U) => !j && !J ? null : /* @__PURE__ */ e(
1841
1841
  I,
1842
1842
  {
1843
1843
  fullWidth: !f,
1844
- iconLeft: G ? /* @__PURE__ */ e(E, { name: G, size: "md" }) : void 0,
1844
+ iconLeft: J ? /* @__PURE__ */ e(E, { name: J, size: "md" }) : void 0,
1845
1845
  onClick: D,
1846
1846
  ...v,
1847
- children: $
1847
+ children: j
1848
1848
  },
1849
- `action-${J}`
1849
+ `action-${U}`
1850
1850
  )
1851
1851
  ) }) : null, C = () => {
1852
- const $ = /* @__PURE__ */ e(dt, { backButton: r });
1852
+ const j = /* @__PURE__ */ e(dt, { backButton: r });
1853
1853
  return r != null && r.navigateTo ? /* @__PURE__ */ e(u, { direction: "row", children: /* @__PURE__ */ e(
1854
1854
  Yr,
1855
1855
  {
1856
1856
  to: r.navigateTo,
1857
1857
  replace: !0,
1858
1858
  style: { textDecoration: "none" },
1859
- children: $
1859
+ children: j
1860
1860
  }
1861
- ) }) : /* @__PURE__ */ e(u, { direction: "row", children: /* @__PURE__ */ e(Ee, { onClick: w, children: $ }) });
1862
- }, T = () => /* @__PURE__ */ d(
1863
- u,
1864
- {
1865
- gap: "xs",
1866
- paddingTop: h == null ? void 0 : h.paddingTop,
1867
- paddingInline: h == null ? void 0 : h.paddingInline,
1868
- ...h,
1869
- children: [
1870
- g && C(),
1871
- /* @__PURE__ */ d(
1872
- u,
1873
- {
1874
- direction: f ? "row" : "column",
1875
- gap: "lg",
1876
- justify: "space-between",
1877
- align: "center",
1878
- children: [
1879
- typeof t == "string" ? /* @__PURE__ */ d(u, { direction: "row", gap: "lg", align: "center", children: [
1880
- /* @__PURE__ */ e(x, { variant: "h2", fontWeight: "semibold", fontFamily: "Poppins", children: t }),
1881
- l && /* @__PURE__ */ e(be, { border: !0, size: "lg", text: l, ...s })
1882
- ] }) : t,
1883
- A()
1884
- ]
1885
- }
1886
- )
1887
- ]
1888
- }
1889
- ), O = () => n;
1861
+ ) }) : /* @__PURE__ */ e(u, { direction: "row", children: /* @__PURE__ */ e(Ee, { onClick: w, children: j }) });
1862
+ }, T = () => {
1863
+ const j = !!t, J = Ue(o) ? !0 : Array.isArray(o) && o.length > 0;
1864
+ return !j && !J && !g ? null : /* @__PURE__ */ d(
1865
+ u,
1866
+ {
1867
+ gap: "xs",
1868
+ paddingTop: h == null ? void 0 : h.paddingTop,
1869
+ paddingInline: h == null ? void 0 : h.paddingInline,
1870
+ ...h,
1871
+ children: [
1872
+ g && C(),
1873
+ (j || J) && /* @__PURE__ */ d(
1874
+ u,
1875
+ {
1876
+ direction: f ? "row" : "column",
1877
+ gap: "lg",
1878
+ justify: "space-between",
1879
+ align: "center",
1880
+ children: [
1881
+ j ? typeof t == "string" ? /* @__PURE__ */ d(u, { direction: "row", gap: "lg", align: "center", children: [
1882
+ /* @__PURE__ */ e(x, { variant: "h2", fontWeight: "semibold", fontFamily: "Poppins", children: t }),
1883
+ l && /* @__PURE__ */ e(be, { border: !0, size: "lg", text: l, ...s })
1884
+ ] }) : t : null,
1885
+ A()
1886
+ ]
1887
+ }
1888
+ )
1889
+ ]
1890
+ }
1891
+ );
1892
+ }, O = () => n;
1890
1893
  return /* @__PURE__ */ d(
1891
1894
  u,
1892
1895
  {
@@ -1908,7 +1911,7 @@ const hn = ne(
1908
1911
  }, gn = ne(ht), ut = {
1909
1912
  icon: "Cross",
1910
1913
  title: ""
1911
- }, Wr = Qe(
1914
+ }, Wr = Ye(
1912
1915
  ({
1913
1916
  onHide: r,
1914
1917
  show: t,
@@ -2118,9 +2121,9 @@ const hn = ne(
2118
2121
  }),
2119
2122
  [i]
2120
2123
  );
2121
- return /* @__PURE__ */ d(pr, { position: o, style: l, children: [
2124
+ return /* @__PURE__ */ d(yr, { position: o, style: l, children: [
2122
2125
  /* @__PURE__ */ e(Be, { style: n, children: /* @__PURE__ */ e(I, { size: "sm", secondary: !0, ...s, children: /* @__PURE__ */ e(E, { name: r, ...a }) }) }),
2123
- /* @__PURE__ */ e(yr, { style: f, children: t.map((m, p) => h === "outline-button" ? /* @__PURE__ */ e(xr, { children: /* @__PURE__ */ d(
2126
+ /* @__PURE__ */ e(xr, { style: f, children: t.map((m, p) => h === "outline-button" ? /* @__PURE__ */ e(Cr, { children: /* @__PURE__ */ d(
2124
2127
  I,
2125
2128
  {
2126
2129
  size: "sm",
@@ -2148,7 +2151,7 @@ const hn = ne(
2148
2151
  ] });
2149
2152
  }, pn = ne(yt), Vr = pe.memo(({ text: r, onClose: t }) => {
2150
2153
  var n, i;
2151
- const l = Ge();
2154
+ const l = Qe();
2152
2155
  return /* @__PURE__ */ d(
2153
2156
  u,
2154
2157
  {
@@ -2196,10 +2199,10 @@ const hn = ne(
2196
2199
  style: { minWidth: "max-content" },
2197
2200
  children: r == null ? void 0 : r.map((l, n) => l.valueText ? /* @__PURE__ */ e(Vr, { text: l.valueText, onClose: () => t == null ? void 0 : t(l) }, n) : null)
2198
2201
  }
2199
- )), hr = (r) => JSON.stringify(r), Ct = (r) => {
2202
+ )), ur = (r) => JSON.stringify(r), Ct = (r) => {
2200
2203
  const t = r;
2201
2204
  return t.hasOwnProperty("from") && t.hasOwnProperty("to") ? !t.from || !t.to ? void 0 : JSON.stringify(r) : r.toISOString();
2202
- }, ur = (r, t) => [], bt = (r, t) => {
2205
+ }, fr = (r, t) => [], bt = (r, t) => {
2203
2206
  if (!r)
2204
2207
  return t ? { from: /* @__PURE__ */ new Date(), to: /* @__PURE__ */ new Date() } : void 0;
2205
2208
  if (t)
@@ -2238,7 +2241,7 @@ const hn = ne(
2238
2241
  )) });
2239
2242
  }
2240
2243
  ), Hr = pe.memo(
2241
- Qe(
2244
+ Ye(
2242
2245
  ({
2243
2246
  label: r,
2244
2247
  type: t,
@@ -2259,11 +2262,11 @@ const hn = ne(
2259
2262
  rangedDate: C,
2260
2263
  disabled: T,
2261
2264
  inputTextType: O = "text",
2262
- min: $,
2263
- max: G
2265
+ min: j,
2266
+ max: J
2264
2267
  }, v) => {
2265
2268
  const D = i == null ? void 0 : i.length;
2266
- let J;
2269
+ let U;
2267
2270
  const M = () => {
2268
2271
  switch (t) {
2269
2272
  case "dropdown":
@@ -2274,19 +2277,19 @@ const hn = ne(
2274
2277
  multiSelect: h,
2275
2278
  searchAble: f,
2276
2279
  placeholder: o,
2277
- onChange: (j) => n == null ? void 0 : n({ value: j, name: a, type: t }),
2280
+ onChange: (Z) => n == null ? void 0 : n({ value: Z, name: a, type: t }),
2278
2281
  dropdownLists: l || [],
2279
- defaultValue: p || ur()
2282
+ defaultValue: p || fr()
2280
2283
  }
2281
2284
  );
2282
2285
  case "date":
2283
2286
  return /* @__PURE__ */ e(
2284
- mr,
2287
+ pr,
2285
2288
  {
2286
2289
  input: w,
2287
2290
  filter: g,
2288
- value: bt(p || J, C),
2289
- onChange: (j) => n == null ? void 0 : n({ value: j, name: a, type: t }),
2291
+ value: bt(p || U, C),
2292
+ onChange: (Z) => n == null ? void 0 : n({ value: Z, name: a, type: t }),
2290
2293
  rangedDate: C,
2291
2294
  ref: v
2292
2295
  }
@@ -2296,8 +2299,8 @@ const hn = ne(
2296
2299
  wt,
2297
2300
  {
2298
2301
  multiple: h,
2299
- value: p || ur(),
2300
- onChange: (j) => n == null ? void 0 : n({ value: j, name: a, type: t }),
2302
+ value: p || fr(),
2303
+ onChange: (Z) => n == null ? void 0 : n({ value: Z, name: a, type: t }),
2301
2304
  options: l
2302
2305
  }
2303
2306
  );
@@ -2305,46 +2308,46 @@ const hn = ne(
2305
2308
  return /* @__PURE__ */ e(
2306
2309
  Te,
2307
2310
  {
2308
- onChange: ({ target: { value: j } }) => n == null ? void 0 : n({ value: j, name: a, type: t }),
2309
- value: p || J,
2311
+ onChange: ({ target: { value: Z } }) => n == null ? void 0 : n({ value: Z, name: a, type: t }),
2312
+ value: p || U,
2310
2313
  placeholder: o,
2311
2314
  disabled: T,
2312
2315
  type: O,
2313
2316
  name: a,
2314
- ...O === "number" && { min: $, max: G },
2317
+ ...O === "number" && { min: j, max: J },
2315
2318
  ...(!O || O === "text") && {
2316
- minLength: $,
2317
- maxLength: G
2319
+ minLength: j,
2320
+ maxLength: J
2318
2321
  }
2319
2322
  }
2320
2323
  );
2321
2324
  case "checkbox":
2322
- return /* @__PURE__ */ e(u, { children: l == null ? void 0 : l.map((j) => {
2323
- const k = Array.isArray(p) && p.includes(j.value);
2325
+ return /* @__PURE__ */ e(u, { children: l == null ? void 0 : l.map((Z) => {
2326
+ const k = Array.isArray(p) && p.includes(Z.value);
2324
2327
  return /* @__PURE__ */ e(
2325
2328
  Ve,
2326
2329
  {
2327
- label: j.label,
2330
+ label: Z.label,
2328
2331
  checked: k,
2329
2332
  sizes: "sm",
2330
2333
  onChange: (z) => {
2331
- const F = Array.isArray(p) ? p : [], b = z.target.checked ? [...F, j.value] : F.filter((H) => H !== j.value);
2334
+ const F = Array.isArray(p) ? p : [], b = z.target.checked ? [...F, Z.value] : F.filter((H) => H !== Z.value);
2332
2335
  n == null || n({ value: b, name: a, type: t });
2333
2336
  }
2334
2337
  },
2335
- j.value
2338
+ Z.value
2336
2339
  );
2337
2340
  }) });
2338
2341
  default:
2339
2342
  return null;
2340
2343
  }
2341
2344
  };
2342
- return D ? /* @__PURE__ */ e(u, { marginBottom: "lg", children: i == null ? void 0 : i.map((j, k) => /* @__PURE__ */ e(
2345
+ return D ? /* @__PURE__ */ e(u, { marginBottom: "lg", children: i == null ? void 0 : i.map((Z, k) => /* @__PURE__ */ e(
2343
2346
  Hr,
2344
2347
  {
2345
2348
  ref: v,
2346
2349
  onChange: n,
2347
- ...j,
2350
+ ...Z,
2348
2351
  withSearchParam: A
2349
2352
  },
2350
2353
  k
@@ -2372,16 +2375,16 @@ const hn = ne(
2372
2375
  Ct(g);
2373
2376
  break;
2374
2377
  case "dropdown":
2375
- hr(g);
2378
+ ur(g);
2376
2379
  break;
2377
2380
  case "select-button":
2378
- hr(g);
2381
+ ur(g);
2379
2382
  break;
2380
2383
  }
2381
2384
  }, p = () => {
2382
2385
  h(!0), i == null || i(!0);
2383
2386
  };
2384
- return q(() => {
2387
+ return G(() => {
2385
2388
  (a || s) && (h(!1), i == null || i(!1));
2386
2389
  }, [a, s]), /* @__PURE__ */ e(X, { children: /* @__PURE__ */ d(
2387
2390
  Wr,
@@ -2411,7 +2414,7 @@ const hn = ne(
2411
2414
  }
2412
2415
  ), kt = pe.memo(({ active: r, onClick: t }) => {
2413
2416
  var n, i;
2414
- const l = Ge();
2417
+ const l = Qe();
2415
2418
  return /* @__PURE__ */ e(
2416
2419
  Ee,
2417
2420
  {
@@ -2609,29 +2612,29 @@ const Vn = (r) => {
2609
2612
  t[l] = r[l];
2610
2613
  }
2611
2614
  }), t;
2612
- }, qe = (r, t) => {
2615
+ }, Ge = (r, t) => {
2613
2616
  let l;
2614
2617
  return t == null || t.forEach((n) => {
2615
2618
  var i;
2616
2619
  if ((i = n == null ? void 0 : n.fields) != null && i.length) {
2617
- const o = qe(r, n == null ? void 0 : n.fields);
2620
+ const o = Ge(r, n == null ? void 0 : n.fields);
2618
2621
  o && (l = o);
2619
2622
  } else (n == null ? void 0 : n.name) === r && (l = n);
2620
2623
  }), l;
2621
2624
  }, Rn = (r) => {
2622
- var G;
2625
+ var J;
2623
2626
  const t = ge(() => ({ ...Lt, ...r }), [r]), [l, n] = V(!1), [i, o] = V(!1), [s] = V(void 0), a = () => o(!0), h = () => o(!1), f = i ? h : a, m = () => {
2624
2627
  n(!0);
2625
2628
  }, p = (v) => {
2626
2629
  n(v);
2627
- }, g = s ? Wt(s) : void 0, w = !!(g && ((G = Object.values(g)) == null ? void 0 : G.length) > 0), A = () => g ? Object.keys(g).map((v) => {
2628
- var j, k, z;
2629
- const D = qe(v, t.fields), J = [];
2630
+ }, g = s ? Wt(s) : void 0, w = !!(g && ((J = Object.values(g)) == null ? void 0 : J.length) > 0), A = () => g ? Object.keys(g).map((v) => {
2631
+ var Z, k, z;
2632
+ const D = Ge(v, t.fields), U = [];
2630
2633
  let M = "";
2631
- const Q = (j = D == null ? void 0 : D.childrenKey) == null ? void 0 : j.length, re = D == null ? void 0 : D.parentKey;
2634
+ const Q = (Z = D == null ? void 0 : D.childrenKey) == null ? void 0 : Z.length, re = D == null ? void 0 : D.parentKey;
2632
2635
  switch (Q && ((k = D == null ? void 0 : D.childrenKey) == null || k.forEach((F) => {
2633
- const b = qe(F, t.fields);
2634
- b && J.push({
2636
+ const b = Ge(F, t.fields);
2637
+ b && U.push({
2635
2638
  name: b == null ? void 0 : b.name,
2636
2639
  label: b == null ? void 0 : b.label,
2637
2640
  value: g[b == null ? void 0 : b.name]
@@ -2664,8 +2667,8 @@ const Vn = (r) => {
2664
2667
  M = `${D == null ? void 0 : D.label}: ${g[v]}`;
2665
2668
  break;
2666
2669
  }
2667
- if (Q && J.length > 0) {
2668
- let F = J.map((b) => {
2670
+ if (Q && U.length > 0) {
2671
+ let F = U.map((b) => {
2669
2672
  var H, P;
2670
2673
  return b != null && b.value && typeof b.value != "string" ? (P = (H = b == null ? void 0 : b.value) == null ? void 0 : H.map((N) => N == null ? void 0 : N.label)) == null ? void 0 : P.join(",") : b.value;
2671
2674
  });
@@ -2678,7 +2681,7 @@ const Vn = (r) => {
2678
2681
  label: D == null ? void 0 : D.label,
2679
2682
  value: g[v],
2680
2683
  valueText: M,
2681
- children: J
2684
+ children: U
2682
2685
  };
2683
2686
  }) : [], C = (v) => {
2684
2687
  v != null && v.name && n(!0);
@@ -2724,7 +2727,7 @@ const Vn = (r) => {
2724
2727
  Body1: Nt,
2725
2728
  Body2: jt,
2726
2729
  Body3: Zt
2727
- }, Xe = () => {
2730
+ }, Ke = () => {
2728
2731
  const [r, t] = Oe(), l = Ie(r.toString()), n = kr(), i = Se(), o = n.id;
2729
2732
  return {
2730
2733
  // query params
@@ -2742,7 +2745,7 @@ const Vn = (r) => {
2742
2745
  id: o,
2743
2746
  hasId: !!o
2744
2747
  };
2745
- }, $t = (r) => JSON.stringify(r), _t = (r) => JSON.stringify(r), Pt = (r) => JSON.stringify(r), Jt = (r) => JSON.stringify(r), Ut = (r) => r, qt = (r) => JSON.stringify(r), fr = ({
2748
+ }, $t = (r) => JSON.stringify(r), _t = (r) => JSON.stringify(r), Pt = (r) => JSON.stringify(r), Jt = (r) => JSON.stringify(r), Ut = (r) => r, qt = (r) => JSON.stringify(r), gr = ({
2746
2749
  value: r,
2747
2750
  name: t,
2748
2751
  type: l,
@@ -2854,7 +2857,7 @@ const Vn = (r) => {
2854
2857
  pageKey: n,
2855
2858
  filters: i
2856
2859
  }) => {
2857
- const { searchParams: o, setSearchParams: s, searchQueries: a } = Xe(), [h, f] = V({}), m = () => {
2860
+ const { searchParams: o, setSearchParams: s, searchQueries: a } = Ke(), [h, f] = V({}), m = () => {
2858
2861
  o.delete(l || "filter"), s(o);
2859
2862
  }, p = (g, w) => {
2860
2863
  switch (g.type) {
@@ -2879,7 +2882,7 @@ const Vn = (r) => {
2879
2882
  }
2880
2883
  };
2881
2884
  return /* @__PURE__ */ e(Wr, { onHide: t, show: r || !1, children: /* @__PURE__ */ d(u, { direction: "column", gap: "md", children: [
2882
- /* @__PURE__ */ d(U, { direction: "row", justify: "space-between", align: "center", children: [
2885
+ /* @__PURE__ */ d(q, { direction: "row", justify: "space-between", align: "center", children: [
2883
2886
  /* @__PURE__ */ e(u, { children: "Filter" }),
2884
2887
  /* @__PURE__ */ e(
2885
2888
  u,
@@ -2910,9 +2913,9 @@ const Vn = (r) => {
2910
2913
  titleSearchLabel: A = "Work Order",
2911
2914
  withTitleLabels: C = !1
2912
2915
  }) => {
2913
- const O = (g == null ? void 0 : g.isShowLabel) ?? !0, [$, G] = V(!1), [v, D] = V(0), J = () => {
2916
+ const O = (g == null ? void 0 : g.isShowLabel) ?? !0, [j, J] = V(!1), [v, D] = V(0), U = () => {
2914
2917
  D((S) => S + 1);
2915
- }, { searchParams: M, setSearchParams: Q, getQueryParam: re } = Xe(), j = Ie(M.toString()), k = Gt(r, M, a) || "", [z, F] = V(k), b = re(a), P = !!(b && !(() => {
2918
+ }, { searchParams: M, setSearchParams: Q, getQueryParam: re } = Ke(), Z = Ie(M.toString()), k = Gt(r, M, a) || "", [z, F] = V(k), b = re(a), P = !!(b && !(() => {
2916
2919
  if (b)
2917
2920
  try {
2918
2921
  const S = JSON.parse(b);
@@ -2922,17 +2925,17 @@ const Vn = (r) => {
2922
2925
  }
2923
2926
  return !1;
2924
2927
  })()), N = ie("md");
2925
- return q(() => {
2928
+ return G(() => {
2926
2929
  F(k);
2927
- }, [k]), q(() => {
2930
+ }, [k]), G(() => {
2928
2931
  if (z === k)
2929
2932
  return;
2930
2933
  const S = window.setTimeout(() => {
2931
- fr({
2934
+ gr({
2932
2935
  value: z,
2933
2936
  name: r,
2934
2937
  type: "search",
2935
- searchQueries: j,
2938
+ searchQueries: Z,
2936
2939
  setSearchParams: Q,
2937
2940
  filterKey: a,
2938
2941
  pageKey: h
@@ -2945,12 +2948,12 @@ const Vn = (r) => {
2945
2948
  z,
2946
2949
  k,
2947
2950
  r,
2948
- j,
2951
+ Z,
2949
2952
  Q,
2950
2953
  a,
2951
2954
  h
2952
2955
  ]), /* @__PURE__ */ d(
2953
- U,
2956
+ q,
2954
2957
  {
2955
2958
  gap: "md",
2956
2959
  style: {
@@ -2963,7 +2966,7 @@ const Vn = (r) => {
2963
2966
  {
2964
2967
  onClick: () => {
2965
2968
  const S = new URLSearchParams(M);
2966
- S.delete(a), Q(S), F(""), J(), m && m();
2969
+ S.delete(a), Q(S), F(""), U(), m && m();
2967
2970
  },
2968
2971
  secondary: !0,
2969
2972
  children: /* @__PURE__ */ e(x, { color: "error", fontWeight: "semibold", children: "Reset" })
@@ -3000,7 +3003,7 @@ const Vn = (r) => {
3000
3003
  }
3001
3004
  ),
3002
3005
  fullWidth: !N,
3003
- onClick: () => G(!0),
3006
+ onClick: () => J(!0),
3004
3007
  children: O ? "Filter" : void 0
3005
3008
  }
3006
3009
  ),
@@ -3047,11 +3050,11 @@ const Vn = (r) => {
3047
3050
  })
3048
3051
  }
3049
3052
  ] : [],
3050
- onChange: (S) => fr({
3053
+ onChange: (S) => gr({
3051
3054
  value: S,
3052
3055
  name: t,
3053
3056
  type: "dropdown",
3054
- searchQueries: j,
3057
+ searchQueries: Z,
3055
3058
  setSearchParams: Q,
3056
3059
  filterKey: a
3057
3060
  }),
@@ -3091,8 +3094,8 @@ const Vn = (r) => {
3091
3094
  /* @__PURE__ */ e(
3092
3095
  Qt,
3093
3096
  {
3094
- isOpen: $,
3095
- onClose: () => G(!1),
3097
+ isOpen: j,
3098
+ onClose: () => J(!1),
3096
3099
  filterKey: a,
3097
3100
  filters: p,
3098
3101
  pageKey: h
@@ -3103,7 +3106,7 @@ const Vn = (r) => {
3103
3106
  );
3104
3107
  }, Xt = ({ children: r, borderRadius: t }) => {
3105
3108
  const l = oe(null), [n, i] = V("100vh");
3106
- return q(() => {
3109
+ return G(() => {
3107
3110
  const o = () => {
3108
3111
  if (l.current) {
3109
3112
  const s = l.current.getBoundingClientRect().top;
@@ -3133,7 +3136,7 @@ const Vn = (r) => {
3133
3136
  advanceFilter: t,
3134
3137
  showFilter: l = !0
3135
3138
  }) => {
3136
- const n = ie("md"), i = () => r ? vr(r) ? r : /* @__PURE__ */ e(
3139
+ const n = ie("md"), i = () => r ? Ue(r) ? r : /* @__PURE__ */ e(
3137
3140
  u,
3138
3141
  {
3139
3142
  style: {
@@ -3223,7 +3226,7 @@ const Vn = (r) => {
3223
3226
  showPagination: i = !0,
3224
3227
  totalData: o
3225
3228
  }) => {
3226
- const { searchQueries: s, setSearchParams: a, searchParams: h } = Xe(), f = h.get(l), m = (A) => {
3229
+ const { searchQueries: s, setSearchParams: a, searchParams: h } = Ke(), f = h.get(l), m = (A) => {
3227
3230
  a({ ...s, [t]: String(A) });
3228
3231
  }, p = (A) => {
3229
3232
  a({
@@ -3291,19 +3294,19 @@ const Vn = (r) => {
3291
3294
  const [l, n] = V(!1), i = oe(null), o = oe(null), s = oe(null), [a, h] = V(""), [f, m] = V({ top: 0, left: 0 }), p = r.selectedValues, g = ge(() => a ? r.options.filter(
3292
3295
  (C) => C.label.toLowerCase().includes(a.toLowerCase())
3293
3296
  ) : r.options, [r.options, a]);
3294
- q(() => {
3297
+ G(() => {
3295
3298
  if (l && o.current) {
3296
3299
  const C = o.current.getBoundingClientRect(), T = 280, O = {
3297
3300
  top: C.bottom + 8
3298
3301
  };
3299
3302
  r.position === "left" || C.left + T > window.innerWidth ? O.right = window.innerWidth - C.right : O.left = C.left, m(O);
3300
3303
  }
3301
- }, [l, r.position]), q(() => {
3304
+ }, [l, r.position]), G(() => {
3302
3305
  l && s.current ? setTimeout(() => {
3303
3306
  var C;
3304
3307
  return (C = s.current) == null ? void 0 : C.focus();
3305
3308
  }, 50) : h("");
3306
- }, [l]), q(() => {
3309
+ }, [l]), G(() => {
3307
3310
  const C = (T) => {
3308
3311
  i.current && !i.current.contains(T.target) && o.current && !o.current.contains(T.target) && n(!1);
3309
3312
  };
@@ -3613,15 +3616,15 @@ const Vn = (r) => {
3613
3616
  actionsOrder: A = ["detail", "update", "delete", "custom"],
3614
3617
  customEmptyState: C
3615
3618
  }) => {
3616
- const O = [l, n, i].filter((k) => k !== void 0).length, $ = !!w, G = O === 3 ? $ ? "178px" : "140px" : O === 2 ? $ ? "140px" : "102px" : O === 1 ? $ ? "112px" : "74px" : $ ? "74px" : "", v = (k, z) => {
3619
+ const O = [l, n, i].filter((k) => k !== void 0).length, j = !!w, J = O === 3 ? j ? "178px" : "140px" : O === 2 ? j ? "140px" : "102px" : O === 1 ? j ? "112px" : "74px" : j ? "74px" : "", v = (k, z) => {
3617
3620
  if (!z) return k;
3618
3621
  if (typeof z == "function") return z(k);
3619
3622
  if (typeof z == "string") return k[z];
3620
- }, [D, J] = V(!1);
3621
- q(() => {
3623
+ }, [D, U] = V(!1);
3624
+ G(() => {
3622
3625
  if (!(m != null && m.current)) return;
3623
3626
  const k = m.current;
3624
- J(k.scrollHeight > k.clientHeight);
3627
+ U(k.scrollHeight > k.clientHeight);
3625
3628
  }, [t, m]);
3626
3629
  const M = oe(null), [Q, re] = V([]);
3627
3630
  Je(() => {
@@ -3637,10 +3640,10 @@ const Vn = (r) => {
3637
3640
  z[H] = F, H < p && (F += b.offsetWidth);
3638
3641
  }), re(z);
3639
3642
  }, [p, r, t]);
3640
- const j = (k) => {
3643
+ const Z = (k) => {
3641
3644
  g && g(k < p ? k : k + 1);
3642
3645
  };
3643
- return /* @__PURE__ */ e("div", { ref: M, children: /* @__PURE__ */ d(Cr, { fullWidth: !0, children: [
3646
+ return /* @__PURE__ */ e("div", { ref: M, children: /* @__PURE__ */ d(br, { fullWidth: !0, children: [
3644
3647
  /* @__PURE__ */ e(
3645
3648
  $r,
3646
3649
  {
@@ -3653,7 +3656,7 @@ const Vn = (r) => {
3653
3656
  var H;
3654
3657
  const F = p > 0 && z < p, b = Q[z] ?? 0;
3655
3658
  return /* @__PURE__ */ e(
3656
- lr,
3659
+ or,
3657
3660
  {
3658
3661
  style: {
3659
3662
  position: "sticky",
@@ -3689,7 +3692,7 @@ const Vn = (r) => {
3689
3692
  g && /* @__PURE__ */ e(
3690
3693
  "button",
3691
3694
  {
3692
- onClick: () => j(z),
3695
+ onClick: () => Z(z),
3693
3696
  title: F ? "Unfreeze column" : "Freeze column",
3694
3697
  style: {
3695
3698
  background: "none",
@@ -3714,7 +3717,7 @@ const Vn = (r) => {
3714
3717
  );
3715
3718
  }),
3716
3719
  l || n || i || w ? /* @__PURE__ */ e(
3717
- lr,
3720
+ or,
3718
3721
  {
3719
3722
  style: {
3720
3723
  backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
@@ -3793,12 +3796,12 @@ const Vn = (r) => {
3793
3796
  );
3794
3797
  }),
3795
3798
  l || n || i || w ? /* @__PURE__ */ e(xe, { style: {
3796
- width: G,
3799
+ width: J,
3797
3800
  position: "sticky",
3798
3801
  right: 0,
3799
3802
  zIndex: 1,
3800
3803
  backgroundColor: We
3801
- }, children: /* @__PURE__ */ e(U, { direction: "row", align: "center", justify: "center", gap: "sm", children: A.map((F) => {
3804
+ }, children: /* @__PURE__ */ e(q, { direction: "row", align: "center", justify: "center", gap: "sm", children: A.map((F) => {
3802
3805
  const b = z === t.length - 1 ? "top" : "bottom";
3803
3806
  return F === "detail" && l && (h == null ? void 0 : h(k)) !== !1 ? /* @__PURE__ */ e(ce, { label: "Detail", position: b, children: /* @__PURE__ */ e(
3804
3807
  I,
@@ -3883,10 +3886,10 @@ function oi(r) {
3883
3886
  r
3884
3887
  );
3885
3888
  }
3886
- const Zn = oi(li), Ke = ({
3889
+ const Zn = oi(li), er = ({
3887
3890
  of: r,
3888
3891
  render: t
3889
- }) => Gr.toArray(r == null ? void 0 : r.map((l, n, i) => t(l, n, i))), Z = ({
3892
+ }) => Gr.toArray(r == null ? void 0 : r.map((l, n, i) => t(l, n, i))), $ = ({
3890
3893
  condition: r,
3891
3894
  fallback: t,
3892
3895
  children: l,
@@ -3919,7 +3922,7 @@ const Zn = oi(li), Ke = ({
3919
3922
  ...i.containerProps,
3920
3923
  children: [
3921
3924
  i.title && /* @__PURE__ */ e(
3922
- Z,
3925
+ $,
3923
3926
  {
3924
3927
  condition: !!i.inputProps.required,
3925
3928
  fallback: /* @__PURE__ */ d(
@@ -3941,10 +3944,10 @@ const Zn = oi(li), Ke = ({
3941
3944
  customMaxWidth: s,
3942
3945
  fullWidth: n,
3943
3946
  children: [
3944
- /* @__PURE__ */ d(U, { direction: "row", gap: "xs", align: "center", children: [
3947
+ /* @__PURE__ */ d(q, { direction: "row", gap: "xs", align: "center", children: [
3945
3948
  /* @__PURE__ */ e(_, { fontSize: r, children: i.title }),
3946
3949
  /* @__PURE__ */ e(_, { color: "error", fontSize: r, children: l }),
3947
- /* @__PURE__ */ e(Z, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
3950
+ /* @__PURE__ */ e($, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
3948
3951
  ce,
3949
3952
  {
3950
3953
  label: (h = i.tooltip) == null ? void 0 : h.label,
@@ -3964,7 +3967,7 @@ const Zn = oi(li), Ke = ({
3964
3967
  }
3965
3968
  ) })
3966
3969
  ] }),
3967
- /* @__PURE__ */ e(Z, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
3970
+ /* @__PURE__ */ e($, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
3968
3971
  ]
3969
3972
  }
3970
3973
  )
@@ -4004,7 +4007,7 @@ const Zn = oi(li), Ke = ({
4004
4007
  onClick: i.onClickContainer,
4005
4008
  children: [
4006
4009
  i.title && /* @__PURE__ */ e(
4007
- Z,
4010
+ $,
4008
4011
  {
4009
4012
  condition: !!i.inputProps.required,
4010
4013
  fallback: /* @__PURE__ */ d(
@@ -4026,10 +4029,10 @@ const Zn = oi(li), Ke = ({
4026
4029
  customMaxWidth: s,
4027
4030
  fullWidth: n,
4028
4031
  children: [
4029
- /* @__PURE__ */ d(U, { direction: "row", gap: "xs", align: "center", children: [
4032
+ /* @__PURE__ */ d(q, { direction: "row", gap: "xs", align: "center", children: [
4030
4033
  /* @__PURE__ */ e(_, { fontSize: r, children: i.title }),
4031
4034
  /* @__PURE__ */ e(_, { color: "error", fontSize: r, children: l }),
4032
- /* @__PURE__ */ e(Z, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4035
+ /* @__PURE__ */ e($, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4033
4036
  ce,
4034
4037
  {
4035
4038
  label: (h = i.tooltip) == null ? void 0 : h.label,
@@ -4049,7 +4052,7 @@ const Zn = oi(li), Ke = ({
4049
4052
  }
4050
4053
  ) })
4051
4054
  ] }),
4052
- /* @__PURE__ */ e(Z, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
4055
+ /* @__PURE__ */ e($, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
4053
4056
  ]
4054
4057
  }
4055
4058
  )
@@ -4119,8 +4122,8 @@ const Zn = oi(li), Ke = ({
4119
4122
  }
4120
4123
  }
4121
4124
  ),
4122
- /* @__PURE__ */ d(U, { gap: "xs", children: [
4123
- /* @__PURE__ */ d(U, { direction: "row", gap: "xs", children: [
4125
+ /* @__PURE__ */ d(q, { gap: "xs", children: [
4126
+ /* @__PURE__ */ d(q, { direction: "row", gap: "xs", children: [
4124
4127
  /* @__PURE__ */ e(
4125
4128
  x,
4126
4129
  {
@@ -4181,7 +4184,7 @@ const fi = (r) => {
4181
4184
  cursor: "pointer"
4182
4185
  },
4183
4186
  children: [
4184
- /* @__PURE__ */ d(U, { direction: "row", align: "center", gap: "sm", children: [
4187
+ /* @__PURE__ */ d(q, { direction: "row", align: "center", gap: "sm", children: [
4185
4188
  /* @__PURE__ */ e(
4186
4189
  E,
4187
4190
  {
@@ -4194,7 +4197,7 @@ const fi = (r) => {
4194
4197
  }
4195
4198
  }
4196
4199
  ),
4197
- /* @__PURE__ */ d(U, { children: [
4200
+ /* @__PURE__ */ d(q, { children: [
4198
4201
  /* @__PURE__ */ e(
4199
4202
  x,
4200
4203
  {
@@ -4208,7 +4211,7 @@ const fi = (r) => {
4208
4211
  children: ui(r.defaultUrl || "") || ((t = r.fileSelected) == null ? void 0 : t.name)
4209
4212
  }
4210
4213
  ),
4211
- !r.defaultUrl && /* @__PURE__ */ d(U, { direction: "row", gap: "xs", align: "center", children: [
4214
+ !r.defaultUrl && /* @__PURE__ */ d(q, { direction: "row", gap: "xs", align: "center", children: [
4212
4215
  /* @__PURE__ */ e(x, { fontSize: "sm", fontWeight: "medium", children: `${hi(
4213
4216
  ((l = r.fileSelected) == null ? void 0 : l.size.toString()) || "100000"
4214
4217
  )}` }),
@@ -4329,7 +4332,7 @@ const fi = (r) => {
4329
4332
  ...i.containerProps,
4330
4333
  children: [
4331
4334
  i.title && /* @__PURE__ */ e(
4332
- Z,
4335
+ $,
4333
4336
  {
4334
4337
  condition: !!i.inputProps.required,
4335
4338
  fallback: /* @__PURE__ */ d(
@@ -4351,10 +4354,10 @@ const fi = (r) => {
4351
4354
  customMaxWidth: s,
4352
4355
  fullWidth: n,
4353
4356
  children: [
4354
- /* @__PURE__ */ d(U, { direction: "row", gap: "xs", align: "center", children: [
4357
+ /* @__PURE__ */ d(q, { direction: "row", gap: "xs", align: "center", children: [
4355
4358
  /* @__PURE__ */ e(_, { fontSize: r, children: i.title }),
4356
4359
  /* @__PURE__ */ e(_, { color: "error", fontSize: r, children: l }),
4357
- /* @__PURE__ */ e(Z, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4360
+ /* @__PURE__ */ e($, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4358
4361
  ce,
4359
4362
  {
4360
4363
  label: (h = i.tooltip) == null ? void 0 : h.label,
@@ -4374,13 +4377,13 @@ const fi = (r) => {
4374
4377
  }
4375
4378
  ) })
4376
4379
  ] }),
4377
- /* @__PURE__ */ e(Z, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
4380
+ /* @__PURE__ */ e($, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
4378
4381
  ]
4379
4382
  }
4380
4383
  )
4381
4384
  }
4382
4385
  ),
4383
- /* @__PURE__ */ d(U, { gap: "xs", children: [
4386
+ /* @__PURE__ */ d(q, { gap: "xs", children: [
4384
4387
  /* @__PURE__ */ e(
4385
4388
  gi,
4386
4389
  {
@@ -4411,7 +4414,7 @@ const fi = (r) => {
4411
4414
  ...o.containerProps,
4412
4415
  children: [
4413
4416
  o.title && /* @__PURE__ */ e(
4414
- Z,
4417
+ $,
4415
4418
  {
4416
4419
  condition: !!i,
4417
4420
  fallback: /* @__PURE__ */ d(
@@ -4433,10 +4436,10 @@ const fi = (r) => {
4433
4436
  customMaxWidth: a,
4434
4437
  fullWidth: n,
4435
4438
  children: [
4436
- /* @__PURE__ */ d(U, { direction: "row", gap: "xs", align: "center", children: [
4439
+ /* @__PURE__ */ d(q, { direction: "row", gap: "xs", align: "center", children: [
4437
4440
  /* @__PURE__ */ e(_, { fontSize: r, children: o.title }),
4438
4441
  /* @__PURE__ */ e(_, { color: "error", fontSize: r, children: l }),
4439
- /* @__PURE__ */ e(Z, { condition: !!((h = o.tooltip) != null && h.label), children: /* @__PURE__ */ e(
4442
+ /* @__PURE__ */ e($, { condition: !!((h = o.tooltip) != null && h.label), children: /* @__PURE__ */ e(
4440
4443
  ce,
4441
4444
  {
4442
4445
  label: (f = o.tooltip) == null ? void 0 : f.label,
@@ -4456,7 +4459,7 @@ const fi = (r) => {
4456
4459
  }
4457
4460
  ) })
4458
4461
  ] }),
4459
- /* @__PURE__ */ e(Z, { condition: !!o.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: o.description }) })
4462
+ /* @__PURE__ */ e($, { condition: !!o.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: o.description }) })
4460
4463
  ]
4461
4464
  }
4462
4465
  )
@@ -4469,7 +4472,7 @@ const fi = (r) => {
4469
4472
  direction: t === "horizontal-inline" ? "row" : "column",
4470
4473
  align: "flex-start",
4471
4474
  children: /* @__PURE__ */ e(
4472
- Ke,
4475
+ er,
4473
4476
  {
4474
4477
  of: (p = o.checkBoxesList) == null ? void 0 : p.map((g) => ({
4475
4478
  ...g,
@@ -4530,7 +4533,7 @@ const fi = (r) => {
4530
4533
  gap: r === "horizontal-inline" || r === "horizontal-block" ? "spacing-96" : "sm",
4531
4534
  direction: r === "horizontal-inline" || r === "horizontal-block" ? "row" : "column",
4532
4535
  children: [
4533
- /* @__PURE__ */ e(Z, { condition: !!n.description || !!n.title, children: /* @__PURE__ */ d(
4536
+ /* @__PURE__ */ e($, { condition: !!n.description || !!n.title, children: /* @__PURE__ */ d(
4534
4537
  u,
4535
4538
  {
4536
4539
  direction: "column",
@@ -4538,7 +4541,7 @@ const fi = (r) => {
4538
4541
  fullWidth: l,
4539
4542
  children: [
4540
4543
  n.title && /* @__PURE__ */ e(_, { children: n.title }),
4541
- /* @__PURE__ */ e(Z, { condition: !!n.description, children: /* @__PURE__ */ e(x, { color: "gray-500", children: n.description }) })
4544
+ /* @__PURE__ */ e($, { condition: !!n.description, children: /* @__PURE__ */ e(x, { color: "gray-500", children: n.description }) })
4542
4545
  ]
4543
4546
  }
4544
4547
  ) }),
@@ -4550,7 +4553,7 @@ const fi = (r) => {
4550
4553
  align: "flex-start",
4551
4554
  flexWrap: "wrap",
4552
4555
  children: /* @__PURE__ */ e(
4553
- Ke,
4556
+ er,
4554
4557
  {
4555
4558
  of: (o = n.radioList) == null ? void 0 : o.map((s) => ({
4556
4559
  ...s,
@@ -4611,7 +4614,7 @@ const fi = (r) => {
4611
4614
  ...i.containerProps,
4612
4615
  children: [
4613
4616
  i.title && /* @__PURE__ */ e(
4614
- Z,
4617
+ $,
4615
4618
  {
4616
4619
  condition: !!i.inputProps.required,
4617
4620
  fallback: /* @__PURE__ */ d(
@@ -4633,10 +4636,10 @@ const fi = (r) => {
4633
4636
  customMaxWidth: s,
4634
4637
  fullWidth: n,
4635
4638
  children: [
4636
- /* @__PURE__ */ d(U, { direction: "row", gap: "xs", align: "center", children: [
4639
+ /* @__PURE__ */ d(q, { direction: "row", gap: "xs", align: "center", children: [
4637
4640
  /* @__PURE__ */ e(_, { fontSize: r, children: i.title }),
4638
4641
  /* @__PURE__ */ e(_, { color: "error", fontSize: r, children: l }),
4639
- /* @__PURE__ */ e(Z, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4642
+ /* @__PURE__ */ e($, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4640
4643
  ce,
4641
4644
  {
4642
4645
  label: (h = i.tooltip) == null ? void 0 : h.label,
@@ -4656,13 +4659,13 @@ const fi = (r) => {
4656
4659
  }
4657
4660
  ) })
4658
4661
  ] }),
4659
- /* @__PURE__ */ e(Z, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
4662
+ /* @__PURE__ */ e($, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
4660
4663
  ]
4661
4664
  }
4662
4665
  )
4663
4666
  }
4664
4667
  ),
4665
- /* @__PURE__ */ d(U, { gap: "xs", children: [
4668
+ /* @__PURE__ */ d(q, { gap: "xs", children: [
4666
4669
  /* @__PURE__ */ e(
4667
4670
  Pr,
4668
4671
  {
@@ -4695,7 +4698,7 @@ const fi = (r) => {
4695
4698
  ...o.containerProps,
4696
4699
  children: [
4697
4700
  o.title && /* @__PURE__ */ e(
4698
- Z,
4701
+ $,
4699
4702
  {
4700
4703
  condition: n,
4701
4704
  fallback: /* @__PURE__ */ d(
@@ -4717,10 +4720,10 @@ const fi = (r) => {
4717
4720
  customMaxWidth: s,
4718
4721
  fullWidth: i,
4719
4722
  children: [
4720
- /* @__PURE__ */ d(U, { direction: "row", gap: "xs", align: "center", children: [
4723
+ /* @__PURE__ */ d(q, { direction: "row", gap: "xs", align: "center", children: [
4721
4724
  /* @__PURE__ */ e(_, { fontSize: r, children: o.title }),
4722
4725
  /* @__PURE__ */ e(_, { color: "error", fontSize: r, children: l }),
4723
- /* @__PURE__ */ e(Z, { condition: !!((a = o.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4726
+ /* @__PURE__ */ e($, { condition: !!((a = o.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4724
4727
  ce,
4725
4728
  {
4726
4729
  label: (h = o.tooltip) == null ? void 0 : h.label,
@@ -4740,14 +4743,14 @@ const fi = (r) => {
4740
4743
  }
4741
4744
  ) })
4742
4745
  ] }),
4743
- /* @__PURE__ */ e(Z, { condition: !!o.titleDescription, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: o.titleDescription }) })
4746
+ /* @__PURE__ */ e($, { condition: !!o.titleDescription, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: o.titleDescription }) })
4744
4747
  ]
4745
4748
  }
4746
4749
  )
4747
4750
  }
4748
4751
  ),
4749
4752
  /* @__PURE__ */ e(
4750
- br,
4753
+ Dr,
4751
4754
  {
4752
4755
  checked: o.checked,
4753
4756
  onChange: o.onChange,
@@ -4764,7 +4767,7 @@ const fi = (r) => {
4764
4767
  size: t = "md",
4765
4768
  ...l
4766
4769
  }) => {
4767
- const n = Ge(), i = (s) => {
4770
+ const n = Qe(), i = (s) => {
4768
4771
  var h, f, m, p, g, w;
4769
4772
  if (!s) return;
4770
4773
  const a = l.disabled ? "var(--sa-text-disable, #181a198f)" : r === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : r === "secondary-danger" ? (f = (h = n == null ? void 0 : n.computed) == null ? void 0 : h.red) == null ? void 0 : f[600] : r === "secondary-primary" ? (p = (m = n == null ? void 0 : n.computed) == null ? void 0 : m.blue) == null ? void 0 : p[700] : (w = (g = n == null ? void 0 : n.computed) == null ? void 0 : g.gray) == null ? void 0 : w[50];
@@ -4829,7 +4832,7 @@ const fi = (r) => {
4829
4832
  onClick: i.onClickContainer,
4830
4833
  children: [
4831
4834
  i.title && /* @__PURE__ */ e(
4832
- Z,
4835
+ $,
4833
4836
  {
4834
4837
  condition: !!i.inputProps.required,
4835
4838
  fallback: /* @__PURE__ */ d(
@@ -4851,10 +4854,10 @@ const fi = (r) => {
4851
4854
  customMaxWidth: s,
4852
4855
  fullWidth: n,
4853
4856
  children: [
4854
- /* @__PURE__ */ d(U, { direction: "row", gap: "xs", align: "center", children: [
4857
+ /* @__PURE__ */ d(q, { direction: "row", gap: "xs", align: "center", children: [
4855
4858
  /* @__PURE__ */ e(_, { fontSize: r, children: i.title }),
4856
4859
  /* @__PURE__ */ e(_, { color: "error", fontSize: r, children: l }),
4857
- /* @__PURE__ */ e(Z, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4860
+ /* @__PURE__ */ e($, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4858
4861
  ce,
4859
4862
  {
4860
4863
  label: (h = i.tooltip) == null ? void 0 : h.label,
@@ -4874,13 +4877,13 @@ const fi = (r) => {
4874
4877
  }
4875
4878
  ) })
4876
4879
  ] }),
4877
- /* @__PURE__ */ e(Z, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
4880
+ /* @__PURE__ */ e($, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
4878
4881
  ]
4879
4882
  }
4880
4883
  )
4881
4884
  }
4882
4885
  ),
4883
- /* @__PURE__ */ d(U, { gap: "xs", children: [
4886
+ /* @__PURE__ */ d(q, { gap: "xs", children: [
4884
4887
  /* @__PURE__ */ e(
4885
4888
  u,
4886
4889
  {
@@ -4888,7 +4891,7 @@ const fi = (r) => {
4888
4891
  width: t === "horizontal" && i.customWidth ? i.customWidth : t === "horizontal" ? "343px" : ""
4889
4892
  },
4890
4893
  children: /* @__PURE__ */ e(
4891
- mr,
4894
+ pr,
4892
4895
  {
4893
4896
  size: r,
4894
4897
  ...i.inputProps,
@@ -4930,7 +4933,7 @@ async function vi(r, t) {
4930
4933
  }, "image/png");
4931
4934
  });
4932
4935
  }
4933
- const gr = {
4936
+ const mr = {
4934
4937
  "1:1": 1,
4935
4938
  "4:3": 4 / 3,
4936
4939
  "16:9": 16 / 9,
@@ -4939,7 +4942,7 @@ const gr = {
4939
4942
  "2:3": 2 / 3,
4940
4943
  "3:2": 3 / 2,
4941
4944
  "32:9": 32 / 9
4942
- }, ki = Qe(
4945
+ }, ki = Ye(
4943
4946
  ({
4944
4947
  handleUpload: r,
4945
4948
  urlImage: t,
@@ -4952,8 +4955,8 @@ const gr = {
4952
4955
  maxFileSize: h = 2,
4953
4956
  onError: f
4954
4957
  }, m) => {
4955
- const p = ie("md"), [g, w] = V(!1), [A, C] = V(null), [T, O] = V(!1), [$, G] = V({ x: 0, y: 0 }), [v, D] = V(1), [J, M] = V(null);
4956
- q(() => {
4958
+ const p = ie("md"), [g, w] = V(!1), [A, C] = V(null), [T, O] = V(!1), [j, J] = V({ x: 0, y: 0 }), [v, D] = V(1), [U, M] = V(null);
4959
+ G(() => {
4957
4960
  t === null && i(null);
4958
4961
  }, [t]);
4959
4962
  const Q = ve(
@@ -4969,10 +4972,10 @@ const gr = {
4969
4972
  te.onload = () => {
4970
4973
  C(te.result), O(!0);
4971
4974
  }, te.readAsDataURL(S);
4972
- }, j = async () => {
4973
- if (!(!A || !J))
4975
+ }, Z = async () => {
4976
+ if (!(!A || !U))
4974
4977
  try {
4975
- const N = await vi(A, J);
4978
+ const N = await vi(A, U);
4976
4979
  if (h && N.size > h * 1024 * 1024) {
4977
4980
  f == null || f(`Ukuran file maksimal ${h}MB`);
4978
4981
  return;
@@ -4992,7 +4995,7 @@ const gr = {
4992
4995
  (N = k.current) == null || N.click();
4993
4996
  }
4994
4997
  }));
4995
- const F = parseInt(o, 10), b = gr[s];
4998
+ const F = parseInt(o, 10), b = mr[s];
4996
4999
  let H, P;
4997
5000
  return b >= 1 ? (P = F, H = F * b) : (H = F, P = F / b), /* @__PURE__ */ d(
4998
5001
  u,
@@ -5083,7 +5086,7 @@ const gr = {
5083
5086
  style: { color: "var(--sa-background-primary, #ffffff)" }
5084
5087
  }
5085
5088
  ),
5086
- /* @__PURE__ */ e(Z, { condition: o.toNumber() > 80, children: /* @__PURE__ */ e(
5089
+ /* @__PURE__ */ e($, { condition: o.toNumber() > 80, children: /* @__PURE__ */ e(
5087
5090
  x,
5088
5091
  {
5089
5092
  color: "gray-50",
@@ -5145,10 +5148,10 @@ const gr = {
5145
5148
  Xr,
5146
5149
  {
5147
5150
  image: A,
5148
- crop: $,
5151
+ crop: j,
5149
5152
  zoom: v,
5150
- aspect: s ? gr[s] : void 0,
5151
- onCropChange: G,
5153
+ aspect: s ? mr[s] : void 0,
5154
+ onCropChange: J,
5152
5155
  onZoomChange: D,
5153
5156
  onCropComplete: Q,
5154
5157
  objectFit: "contain",
@@ -5160,7 +5163,7 @@ const gr = {
5160
5163
  ) }),
5161
5164
  /* @__PURE__ */ e(Re, { children: /* @__PURE__ */ d(u, { justify: "flex-end", direction: "row", gap: "sm", children: [
5162
5165
  /* @__PURE__ */ e(I, { size: "xs", secondary: !0, onClick: () => O(!1), children: "Cancel" }),
5163
- /* @__PURE__ */ e(I, { size: "xs", primary: !0, onClick: j, children: "Crop" })
5166
+ /* @__PURE__ */ e(I, { size: "xs", primary: !0, onClick: Z, children: "Crop" })
5164
5167
  ] }) })
5165
5168
  ]
5166
5169
  }
@@ -5187,7 +5190,7 @@ const gr = {
5187
5190
  ...o.containerProps,
5188
5191
  children: [
5189
5192
  o.title && /* @__PURE__ */ e(
5190
- Z,
5193
+ $,
5191
5194
  {
5192
5195
  condition: !!i,
5193
5196
  fallback: /* @__PURE__ */ d(
@@ -5209,10 +5212,10 @@ const gr = {
5209
5212
  customMaxWidth: a,
5210
5213
  fullWidth: n,
5211
5214
  children: [
5212
- /* @__PURE__ */ d(U, { direction: "row", gap: "xs", align: "center", children: [
5215
+ /* @__PURE__ */ d(q, { direction: "row", gap: "xs", align: "center", children: [
5213
5216
  /* @__PURE__ */ e(_, { fontSize: r, children: o.title }),
5214
5217
  /* @__PURE__ */ e(_, { color: "error", fontSize: r, children: l }),
5215
- /* @__PURE__ */ e(Z, { condition: !!((h = o.tooltip) != null && h.label), children: /* @__PURE__ */ e(
5218
+ /* @__PURE__ */ e($, { condition: !!((h = o.tooltip) != null && h.label), children: /* @__PURE__ */ e(
5216
5219
  ce,
5217
5220
  {
5218
5221
  label: (f = o.tooltip) == null ? void 0 : f.label,
@@ -5232,13 +5235,13 @@ const gr = {
5232
5235
  }
5233
5236
  ) })
5234
5237
  ] }),
5235
- /* @__PURE__ */ e(Z, { condition: !!o.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: o.description }) })
5238
+ /* @__PURE__ */ e($, { condition: !!o.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: o.description }) })
5236
5239
  ]
5237
5240
  }
5238
5241
  )
5239
5242
  }
5240
5243
  ),
5241
- /* @__PURE__ */ d(U, { gap: "xs", children: [
5244
+ /* @__PURE__ */ d(q, { gap: "xs", children: [
5242
5245
  /* @__PURE__ */ e(ki, { ...o.inputProps }),
5243
5246
  !s && o.errorMessage && /* @__PURE__ */ e(me, { message: o.errorMessage })
5244
5247
  ] })
@@ -5262,7 +5265,7 @@ const gr = {
5262
5265
  ...i.containerProps,
5263
5266
  children: [
5264
5267
  i.title && /* @__PURE__ */ e(
5265
- Z,
5268
+ $,
5266
5269
  {
5267
5270
  condition: !!i.inputProps.required,
5268
5271
  fallback: /* @__PURE__ */ d(
@@ -5284,10 +5287,10 @@ const gr = {
5284
5287
  customMaxWidth: o,
5285
5288
  fullWidth: n,
5286
5289
  children: [
5287
- /* @__PURE__ */ d(U, { direction: "row", gap: "xs", align: "center", children: [
5290
+ /* @__PURE__ */ d(q, { direction: "row", gap: "xs", align: "center", children: [
5288
5291
  /* @__PURE__ */ e(_, { fontSize: r, children: i.title }),
5289
5292
  /* @__PURE__ */ e(_, { color: "error", fontSize: r, children: l }),
5290
- /* @__PURE__ */ e(Z, { condition: !!((s = i.tooltip) != null && s.label), children: /* @__PURE__ */ e(
5293
+ /* @__PURE__ */ e($, { condition: !!((s = i.tooltip) != null && s.label), children: /* @__PURE__ */ e(
5291
5294
  ce,
5292
5295
  {
5293
5296
  label: (a = i.tooltip) == null ? void 0 : a.label,
@@ -5307,7 +5310,7 @@ const gr = {
5307
5310
  }
5308
5311
  ) })
5309
5312
  ] }),
5310
- /* @__PURE__ */ e(Z, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
5313
+ /* @__PURE__ */ e($, { condition: !!i.description, children: /* @__PURE__ */ e(x, { fontSize: r, color: "gray-500", children: i.description }) })
5311
5314
  ]
5312
5315
  }
5313
5316
  )
@@ -5327,7 +5330,7 @@ const gr = {
5327
5330
  }) => {
5328
5331
  var m;
5329
5332
  const [s, a] = V([]);
5330
- q(() => {
5333
+ G(() => {
5331
5334
  r && a([...r.map((p) => ({ id: p.id, isActive: p.isActive }))]);
5332
5335
  }, [r]);
5333
5336
  const h = (m = s.find((p) => p.id === t)) == null ? void 0 : m.isActive, f = ve(() => {
@@ -5344,7 +5347,7 @@ const gr = {
5344
5347
  width: n
5345
5348
  },
5346
5349
  children: i && /* @__PURE__ */ e(
5347
- br,
5350
+ Dr,
5348
5351
  {
5349
5352
  disabled: o,
5350
5353
  checked: h,
@@ -5373,7 +5376,7 @@ const gr = {
5373
5376
  }, i = () => {
5374
5377
  window.scrollTo({ top: 0, behavior: "smooth" });
5375
5378
  };
5376
- return q(() => (window.addEventListener("scroll", n), () => {
5379
+ return G(() => (window.addEventListener("scroll", n), () => {
5377
5380
  window.removeEventListener("scroll", n);
5378
5381
  }), []), /* @__PURE__ */ e(
5379
5382
  u,
@@ -5493,7 +5496,7 @@ const gr = {
5493
5496
  ]
5494
5497
  }
5495
5498
  ) }), Un = ({ fields: r }) => /* @__PURE__ */ e(u, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ e(
5496
- Ke,
5499
+ er,
5497
5500
  {
5498
5501
  of: r,
5499
5502
  render: (t, l) => /* @__PURE__ */ e(Mi, { ...t }, l)
@@ -7025,12 +7028,12 @@ const Xn = (r) => {
7025
7028
  footerProps: C = { borderTop: !0 },
7026
7029
  variantTag: T = "info"
7027
7030
  }) => {
7028
- const O = oe(null), [$, G] = V("100vh");
7029
- q(() => {
7031
+ const O = oe(null), [j, J] = V("100vh");
7032
+ G(() => {
7030
7033
  const M = () => {
7031
7034
  if (O.current) {
7032
7035
  const Q = O.current.getBoundingClientRect().top;
7033
- G(`calc(100vh - ${Q}px)`);
7036
+ J(`calc(100vh - ${Q}px)`);
7034
7037
  }
7035
7038
  };
7036
7039
  return M(), window.addEventListener("resize", M), () => window.removeEventListener("resize", M);
@@ -7050,7 +7053,7 @@ const Xn = (r) => {
7050
7053
  /* @__PURE__ */ e(u, { ...p, children: m ?? null })
7051
7054
  ]
7052
7055
  }
7053
- ), J = !!(s || h || m);
7056
+ ), U = !!(s || h || m);
7054
7057
  return /* @__PURE__ */ d(
7055
7058
  u,
7056
7059
  {
@@ -7066,11 +7069,11 @@ const Xn = (r) => {
7066
7069
  style: {
7067
7070
  backgroundColor: "var(--sa-background-primary, #ffffff)",
7068
7071
  display: "flex",
7069
- minHeight: $,
7072
+ minHeight: j,
7070
7073
  ...(g == null ? void 0 : g.style) ?? {}
7071
7074
  },
7072
7075
  children: [
7073
- s !== null && J ? /* @__PURE__ */ e(Br, { ...A, children: D() }) : null,
7076
+ s !== null && U ? /* @__PURE__ */ e(Br, { ...A, children: D() }) : null,
7074
7077
  /* @__PURE__ */ e(
7075
7078
  u,
7076
7079
  {
@@ -7108,7 +7111,7 @@ function rl({
7108
7111
  formatTitle: l
7109
7112
  }) {
7110
7113
  const n = Se();
7111
- q(() => {
7114
+ G(() => {
7112
7115
  let i = null, o = null;
7113
7116
  for (const h of t) {
7114
7117
  const f = h.items.find((m) => m.to ? m.to === "/" ? n.pathname === "/" : !!(m.to === n.pathname || n.pathname.startsWith(m.to + "/")) : !1);
@@ -7180,8 +7183,8 @@ export {
7180
7183
  ti as ColumnFilterDropdown,
7181
7184
  Xn as ConfirmationDialog,
7182
7185
  ni as DataTable,
7183
- Z as DecisionWrapper,
7184
- Ke as EachUtils,
7186
+ $ as DecisionWrapper,
7187
+ er as EachUtils,
7185
7188
  qn as EmptyStatePage,
7186
7189
  Qt as FilterDrawer,
7187
7190
  Jn as FloatingFooter,
@@ -7226,7 +7229,7 @@ export {
7226
7229
  Tn as getValueRadioFilter,
7227
7230
  Gt as getValueSearch,
7228
7231
  _e as getValuesFilter,
7229
- fr as handleChangeFilter,
7232
+ gr as handleChangeFilter,
7230
7233
  Hn as handleOnScroll,
7231
7234
  Bn as isEmail,
7232
7235
  jn as isFilterActive,
@@ -7251,7 +7254,7 @@ export {
7251
7254
  il as useAuthRole,
7252
7255
  rl as useDynamicTitle,
7253
7256
  Lr as useModuleSelection,
7254
- Xe as useRouteInfo,
7257
+ Ke as useRouteInfo,
7255
7258
  tl as useRouteParams,
7256
7259
  tt as useSidebarBadges,
7257
7260
  el as useTabState