@starasia/admin 3.11.0 → 3.13.0

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
@@ -3,14 +3,14 @@ import { Badges as Ee } from "@starasia/badges";
3
3
  export * from "@starasia/badges";
4
4
  import { Box as u } from "@starasia/box";
5
5
  export * from "@starasia/box";
6
- import { Button as R } from "@starasia/button";
6
+ import { Button as B } from "@starasia/button";
7
7
  export * from "@starasia/button";
8
8
  export * from "@starasia/card";
9
- import { StarasiaDate as It } from "@starasia/date";
9
+ import { StarasiaDate as Tt } from "@starasia/date";
10
10
  export * from "@starasia/date";
11
- import { Dialog as Ve, DialogTitle as Se, DialogBody as Ie, DialogFooter as qe } from "@starasia/dialog";
11
+ import { Dialog as ze, DialogTitle as Se, DialogBody as Ie, DialogFooter as qe } from "@starasia/dialog";
12
12
  export * from "@starasia/dialog";
13
- import { Drawer as Tt } from "@starasia/drawer";
13
+ import { Drawer as Ot } from "@starasia/drawer";
14
14
  export * from "@starasia/drawer";
15
15
  import { Dropdown as lt } from "@starasia/dropdown";
16
16
  export * from "@starasia/dropdown";
@@ -20,17 +20,17 @@ import { searchParamsToObject as Je } from "@starasia/http";
20
20
  export * from "@starasia/http";
21
21
  import { Input as ot } from "@starasia/input";
22
22
  export * from "@starasia/input";
23
- import { Menu as Dt, MenuButton as _e, MenuLists as bt, MenuHeading as Ot, MenuBody as vt, MenuFooter as Nt } from "@starasia/menu";
23
+ import { Menu as Dt, MenuButton as Ue, MenuLists as bt, MenuHeading as Nt, MenuBody as vt, MenuFooter as Zt } from "@starasia/menu";
24
24
  export * from "@starasia/menu";
25
- import { Pagination as Zt } from "@starasia/pagination";
25
+ import { Pagination as jt } from "@starasia/pagination";
26
26
  export * from "@starasia/pagination";
27
27
  export * from "@starasia/storage";
28
- import { Tr as He, Td as we, Table as wt, Thead as jt, Th as dt, Tbody as $t } from "@starasia/table";
28
+ import { Tr as He, Td as we, Table as wt, Thead as $t, Th as dt, Tbody as _t } from "@starasia/table";
29
29
  export * from "@starasia/table";
30
30
  export * from "@starasia/tabs";
31
31
  import { Textarea as Ut } from "@starasia/textarea";
32
32
  export * from "@starasia/textarea";
33
- import { useTheme as _t, ThemeProvider as ht, useRadius as Pt, useColor as qt } from "@starasia/theme";
33
+ import { useTheme as Pt, ThemeProvider as ht, useRadius as qt, useColor as Jt } from "@starasia/theme";
34
34
  export * from "@starasia/theme";
35
35
  export * from "@starasia/toast";
36
36
  import { Toggle as kt } from "@starasia/toggle";
@@ -39,7 +39,7 @@ import { Tooltip as ue } from "@starasia/tooltip";
39
39
  export * from "@starasia/tooltip";
40
40
  import { Checkbox as tt } from "@starasia/checkbox";
41
41
  export * from "@starasia/checkbox";
42
- import { Radio as Jt } from "@starasia/radio";
42
+ import { Radio as Gt } from "@starasia/radio";
43
43
  export * from "@starasia/radio";
44
44
  import { Text as C } from "@starasia/text";
45
45
  export * from "@starasia/text";
@@ -55,8 +55,8 @@ import { Skeleton as Re } from "@starasia/skeleton";
55
55
  export * from "@starasia/skeleton";
56
56
  export * from "@starasia/progress-stepper";
57
57
  import { jsx as e, jsxs as d, Fragment as X } from "react/jsx-runtime";
58
- import Gt, { createContext as Ft, useState as B, useContext as St, useCallback as ze, useMemo as De, memo as te, useEffect as _, useRef as le, useLayoutEffect as rt, isValidElement as it, forwardRef as Et, Children as Qt, useImperativeHandle as Yt } from "react";
59
- import { useSearchParams as Ge, useNavigate as ct, useLocation as Te, Outlet as ut, Link as Xt, useParams as Mt } from "react-router";
58
+ import Ft, { createContext as St, useState as A, useContext as Et, useCallback as Ve, useMemo as De, memo as te, useEffect as U, useRef as le, useLayoutEffect as rt, isValidElement as it, forwardRef as Mt, Children as Qt, useImperativeHandle as Yt } from "react";
59
+ import { useSearchParams as Ge, useNavigate as ct, useLocation as Te, Outlet as ut, Link as Xt, useParams as Lt } from "react-router";
60
60
  import Kt from "react-easy-crop";
61
61
  const er = {
62
62
  menus: [],
@@ -66,15 +66,15 @@ const er = {
66
66
  userData: null,
67
67
  setUserData: () => {
68
68
  }
69
- }, Lt = Ft(er), Wt = () => St(Lt), tr = (t) => {
70
- const [r, n] = B(
69
+ }, Wt = St(er), Bt = () => Et(Wt), tr = (t) => {
70
+ const [r, n] = A(
71
71
  (t == null ? void 0 : t.initialUserData) || null
72
72
  );
73
73
  return {
74
74
  userData: r,
75
75
  setUserData: n
76
76
  };
77
- }, Bt = Ft({
77
+ }, At = St({
78
78
  badges: {},
79
79
  setBadge: () => {
80
80
  },
@@ -83,33 +83,33 @@ const er = {
83
83
  clearBadge: () => {
84
84
  }
85
85
  }), rr = ({ children: t }) => {
86
- const [r, n] = B({}), l = ze(
87
- (s) => {
86
+ const [r, n] = A({}), l = Ve(
87
+ (a) => {
88
88
  n(
89
- (h) => typeof s == "function" ? s(h) : s
89
+ (h) => typeof a == "function" ? a(h) : a
90
90
  );
91
91
  },
92
92
  []
93
- ), i = ze(
94
- (s, h) => {
93
+ ), i = Ve(
94
+ (a, h) => {
95
95
  n((f) => {
96
- const g = typeof h == "function" ? h(f[s]) : h;
97
- return { ...f, [s]: g };
96
+ const g = typeof h == "function" ? h(f[a]) : h;
97
+ return { ...f, [a]: g };
98
98
  });
99
99
  },
100
100
  []
101
- ), o = ze((s) => {
101
+ ), o = Ve((a) => {
102
102
  n((h) => {
103
- if (!(s in h)) return h;
103
+ if (!(a in h)) return h;
104
104
  const f = { ...h };
105
- return delete f[s], f;
105
+ return delete f[a], f;
106
106
  });
107
- }, []), a = De(
107
+ }, []), s = De(
108
108
  () => ({ badges: r, setBadge: i, setBadges: l, clearBadge: o }),
109
109
  [r, i, l, o]
110
110
  );
111
- return /* @__PURE__ */ e(Bt.Provider, { value: a, children: t });
112
- }, ir = () => St(Bt), Xe = (t, r) => {
111
+ return /* @__PURE__ */ e(At.Provider, { value: s, children: t });
112
+ }, ir = () => Et(At), Xe = (t, r) => {
113
113
  const n = r !== void 0 ? r : t;
114
114
  return n == null ? null : typeof n == "string" || typeof n == "number" ? { value: n } : n;
115
115
  }, nr = ({
@@ -119,21 +119,21 @@ const er = {
119
119
  logo: l,
120
120
  appName: i = "Workspace",
121
121
  initialUserData: o,
122
- theme: a
122
+ theme: s
123
123
  }) => {
124
- const s = tr({ initialUserData: o }), { theme: h } = _t();
124
+ const a = tr({ initialUserData: o }), { theme: h } = Pt();
125
125
  return /* @__PURE__ */ e(
126
- Lt.Provider,
126
+ Wt.Provider,
127
127
  {
128
128
  value: {
129
129
  logo: l,
130
130
  appName: i,
131
131
  menus: r,
132
- userData: s.userData,
133
- setUserData: s.setUserData,
132
+ userData: a.userData,
133
+ setUserData: a.setUserData,
134
134
  menuBottom: n
135
135
  },
136
- children: /* @__PURE__ */ e(rr, { children: a ? /* @__PURE__ */ e(ht, { value: a, children: t }) : h ? /* @__PURE__ */ e(ht, { value: h, children: t }) : t })
136
+ children: /* @__PURE__ */ e(rr, { children: s ? /* @__PURE__ */ e(ht, { value: s, children: t }) : h ? /* @__PURE__ */ e(ht, { value: h, children: t }) : t })
137
137
  }
138
138
  );
139
139
  }, rn = te(nr);
@@ -182,17 +182,17 @@ function ft() {
182
182
  const r = Number(t);
183
183
  return Number.isFinite(r) ? r : null;
184
184
  }
185
- function At(t) {
185
+ function Rt(t) {
186
186
  typeof window > "u" || (t === null ? window.localStorage.removeItem(Pe) : window.localStorage.setItem(Pe, String(t)), window.dispatchEvent(new CustomEvent(nt, { detail: t })));
187
187
  }
188
188
  function nn() {
189
- At(null);
189
+ Rt(null);
190
190
  }
191
- function Rt() {
192
- const [t, r] = B(
191
+ function Ht() {
192
+ const [t, r] = A(
193
193
  () => ft()
194
194
  );
195
- return _(() => {
195
+ return U(() => {
196
196
  const l = () => {
197
197
  r(ft());
198
198
  }, i = (o) => {
@@ -202,10 +202,10 @@ function Rt() {
202
202
  window.removeEventListener(nt, l), window.removeEventListener("storage", i);
203
203
  };
204
204
  }, []), { selectedGroupId: t, setSelectedGroupId: (l) => {
205
- At(l), r(l);
205
+ Rt(l), r(l);
206
206
  } };
207
207
  }
208
- let Ue = 0, ve = !1;
208
+ let _e = 0, ve = !1;
209
209
  const gt = () => /* @__PURE__ */ d(
210
210
  "svg",
211
211
  {
@@ -247,27 +247,27 @@ function ln({
247
247
  isLoadingProfile: l,
248
248
  onLogout: i,
249
249
  isLoggingOut: o,
250
- loadingComponent: a,
251
- sidebarHeaderContent: s,
250
+ loadingComponent: s,
251
+ sidebarHeaderContent: a,
252
252
  headerActions: h,
253
253
  profileRole: f,
254
254
  profileMenuButtons: g,
255
- profileMenuItems: p,
256
- logoutButton: y
255
+ profileMenuItems: y,
256
+ logoutButton: p
257
257
  }) {
258
258
  var ke, je;
259
- const [b] = Ge(), H = b.get("embed") === "true", D = Wt(), { badges: I } = ir(), Z = ct(), j = Te(), M = !ee("md"), [fe, G] = B(!1), [z, K] = B(!1), [oe, ce] = B(!1), [U, ae] = B(!1), [se, re] = B(/* @__PURE__ */ new Set()), [Q, q] = B(null), { selectedGroupId: O, setSelectedGroupId: V } = Rt(), Y = le(null), de = le(null);
260
- _(() => {
259
+ const [b] = Ge(), H = b.get("embed") === "true", D = Bt(), { badges: I } = ir(), Z = ct(), j = Te(), M = !ee("md"), [fe, G] = A(!1), [V, K] = A(!1), [oe, ce] = A(!1), [_, ae] = A(!1), [se, re] = A(/* @__PURE__ */ new Set()), [Q, q] = A(null), { selectedGroupId: O, setSelectedGroupId: z } = Ht(), Y = le(null), de = le(null);
260
+ U(() => {
261
261
  const m = Y.current;
262
262
  if (!m) return;
263
263
  const F = () => {
264
- ve || (Ue = m.scrollTop);
264
+ ve || (_e = m.scrollTop);
265
265
  };
266
266
  return m.addEventListener("scroll", F), () => m.removeEventListener("scroll", F);
267
267
  }, []);
268
268
  const he = () => {
269
269
  const m = Y.current;
270
- m && Ue > 0 && (ve = !0, m.scrollTop = Ue, requestAnimationFrame(() => {
270
+ m && _e > 0 && (ve = !0, m.scrollTop = _e, requestAnimationFrame(() => {
271
271
  ve = !1;
272
272
  }));
273
273
  };
@@ -278,14 +278,14 @@ function ln({
278
278
  }, 300);
279
279
  return () => clearTimeout(m);
280
280
  }, []), rt(() => {
281
- D.menus.length > 0 && (Ue > 0 ? he() : requestAnimationFrame(() => {
281
+ D.menus.length > 0 && (_e > 0 ? he() : requestAnimationFrame(() => {
282
282
  var F;
283
283
  const m = (F = Y.current) == null ? void 0 : F.querySelector(
284
284
  "[data-menu-active='true']"
285
285
  );
286
286
  m && m.scrollIntoView({ block: "center", behavior: "instant" });
287
287
  }));
288
- }, [D.menus]), _(() => {
288
+ }, [D.menus]), U(() => {
289
289
  ve = !0, he();
290
290
  const m = setTimeout(he, 0), F = setTimeout(he, 50), S = setTimeout(he, 100), x = setTimeout(he, 200), w = setTimeout(() => {
291
291
  ve = !1;
@@ -293,11 +293,11 @@ function ln({
293
293
  return () => {
294
294
  clearTimeout(m), clearTimeout(F), clearTimeout(S), clearTimeout(x), clearTimeout(w);
295
295
  };
296
- }, [j.pathname]), _(() => {
296
+ }, [j.pathname]), U(() => {
297
297
  de.current && (de.current.scrollTop = 0);
298
- }, [j.pathname]), _(() => {
298
+ }, [j.pathname]), U(() => {
299
299
  M && ce(!1);
300
- }, [j.pathname, M]), _(() => {
300
+ }, [j.pathname, M]), U(() => {
301
301
  M && K(!0);
302
302
  }, [M]);
303
303
  const Me = () => {
@@ -317,7 +317,7 @@ function ln({
317
317
  const F = Le.filter((S) => j.pathname.startsWith(S)).sort((S, x) => x.length - S.length)[0];
318
318
  return m === F;
319
319
  };
320
- _(() => {
320
+ U(() => {
321
321
  var F;
322
322
  const m = (S) => {
323
323
  var x;
@@ -336,9 +336,9 @@ function ln({
336
336
  return S.has(m) ? S.delete(m) : S.add(m), S;
337
337
  });
338
338
  };
339
- _(() => {
340
- D.menus.length !== 0 && O !== null && !D.menus.some((m) => m.id === O) && V(null);
341
- }, [D.menus, O, V]);
339
+ U(() => {
340
+ D.menus.length !== 0 && O !== null && !D.menus.some((m) => m.id === O) && z(null);
341
+ }, [D.menus, O, z]);
342
342
  const We = De(() => {
343
343
  if (O !== null)
344
344
  return D.menus.filter(
@@ -353,19 +353,19 @@ function ln({
353
353
  if (H)
354
354
  return /* @__PURE__ */ e("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)" }, children: t || /* @__PURE__ */ e(ut, {}) });
355
355
  const Be = (m) => {
356
- const F = m.children && m.children.length > 0, S = se.has(m.id), x = F ? m.children.some((L) => ie(L.to)) : ie(m.to), w = Xe(m.badge, I[m.id]), v = !!w && z && !M;
356
+ const F = m.children && m.children.length > 0, S = se.has(m.id), x = F ? m.children.some((L) => ie(L.to)) : ie(m.to), w = Xe(m.badge, I[m.id]), v = !!w && V && !M;
357
357
  return /* @__PURE__ */ d("div", { "data-menu-active": x || void 0, children: [
358
358
  /* @__PURE__ */ d(
359
359
  "button",
360
360
  {
361
361
  onClick: (L) => {
362
362
  if (F)
363
- if (z && !M) {
364
- const A = L.currentTarget.getBoundingClientRect();
363
+ if (V && !M) {
364
+ const R = L.currentTarget.getBoundingClientRect();
365
365
  q({
366
366
  item: m,
367
- top: A.top,
368
- left: A.right + 8
367
+ top: R.top,
368
+ left: R.right + 8
369
369
  });
370
370
  } else
371
371
  Ze(m.id);
@@ -376,10 +376,10 @@ function ln({
376
376
  width: "100%",
377
377
  display: "flex",
378
378
  alignItems: "center",
379
- justifyContent: z && !M ? "center" : void 0,
379
+ justifyContent: V && !M ? "center" : void 0,
380
380
  gap: "0.5rem",
381
- paddingLeft: z && !M ? "0" : "0.5rem",
382
- paddingRight: z && !M ? "0" : "0.5rem",
381
+ paddingLeft: V && !M ? "0" : "0.5rem",
382
+ paddingRight: V && !M ? "0" : "0.5rem",
383
383
  paddingTop: "0.25rem",
384
384
  paddingBottom: "0.25rem",
385
385
  height: "2rem",
@@ -390,7 +390,7 @@ function ln({
390
390
  color: "var(--sa-text-primary, #292a2e)",
391
391
  cursor: "pointer"
392
392
  },
393
- title: z && !M ? m.title : void 0,
393
+ title: V && !M ? m.title : void 0,
394
394
  onMouseEnter: (L) => {
395
395
  x || (L.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
396
396
  },
@@ -427,7 +427,7 @@ function ln({
427
427
  ]
428
428
  }
429
429
  ),
430
- (!z || M) && /* @__PURE__ */ d(X, { children: [
430
+ (!V || M) && /* @__PURE__ */ d(X, { children: [
431
431
  /* @__PURE__ */ e(
432
432
  "span",
433
433
  {
@@ -481,9 +481,9 @@ function ln({
481
481
  ]
482
482
  }
483
483
  ),
484
- F && (!z || M) && (() => {
484
+ F && (!V || M) && (() => {
485
485
  const L = m.children.findIndex(
486
- (A) => ie(A.to)
486
+ (R) => ie(R.to)
487
487
  );
488
488
  return /* @__PURE__ */ d(
489
489
  "div",
@@ -531,15 +531,15 @@ function ln({
531
531
  }
532
532
  }
533
533
  ),
534
- m.children.map((A) => {
534
+ m.children.map((R) => {
535
535
  const ne = Xe(
536
- A.badge,
537
- I[A.id]
536
+ R.badge,
537
+ I[R.id]
538
538
  );
539
539
  return /* @__PURE__ */ d(
540
540
  "button",
541
541
  {
542
- onClick: () => Z(A.to),
542
+ onClick: () => Z(R.to),
543
543
  style: {
544
544
  width: "100%",
545
545
  display: "flex",
@@ -550,24 +550,24 @@ function ln({
550
550
  paddingTop: "0.25rem",
551
551
  paddingBottom: "0.25rem",
552
552
  height: "2rem",
553
- borderRadius: ie(A.to) ? "var(--sa-radii-sm, 0.375rem)" : "var(--sa-radii-md, 0.5rem)",
553
+ borderRadius: ie(R.to) ? "var(--sa-radii-sm, 0.375rem)" : "var(--sa-radii-md, 0.5rem)",
554
554
  textAlign: "left",
555
- backgroundColor: ie(A.to) ? "var(--sa-background-primary, #ffffff)" : "transparent",
556
- color: ie(A.to) ? "var(--sa-text-primary, #292a2e)" : "var(--sa-text-subtle, #505258)",
555
+ backgroundColor: ie(R.to) ? "var(--sa-background-primary, #ffffff)" : "transparent",
556
+ color: ie(R.to) ? "var(--sa-text-primary, #292a2e)" : "var(--sa-text-subtle, #505258)",
557
557
  cursor: "pointer",
558
- border: ie(A.to) ? "1px solid var(--sa-border-subtle, #0b120e24)" : "1px solid transparent"
558
+ border: ie(R.to) ? "1px solid var(--sa-border-subtle, #0b120e24)" : "1px solid transparent"
559
559
  },
560
- onMouseEnter: (pe) => {
561
- ie(A.to) || (pe.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
560
+ onMouseEnter: (ye) => {
561
+ ie(R.to) || (ye.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
562
562
  },
563
- onMouseLeave: (pe) => {
564
- ie(A.to) || (pe.currentTarget.style.backgroundColor = "transparent");
563
+ onMouseLeave: (ye) => {
564
+ ie(R.to) || (ye.currentTarget.style.backgroundColor = "transparent");
565
565
  },
566
566
  children: [
567
567
  /* @__PURE__ */ e(
568
568
  k,
569
569
  {
570
- name: A.icon,
570
+ name: R.icon,
571
571
  size: "sm",
572
572
  style: { flexShrink: 0 }
573
573
  }
@@ -584,7 +584,7 @@ function ln({
584
584
  overflow: "hidden",
585
585
  textOverflow: "ellipsis"
586
586
  },
587
- children: A.title
587
+ children: R.title
588
588
  }
589
589
  ),
590
590
  ne && /* @__PURE__ */ e(
@@ -598,7 +598,7 @@ function ln({
598
598
  )
599
599
  ]
600
600
  },
601
- A.id
601
+ R.id
602
602
  );
603
603
  })
604
604
  ]
@@ -616,7 +616,7 @@ function ln({
616
616
  height: "100vh",
617
617
  // backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
618
618
  position: "relative",
619
- "--app-sidebar-width": M ? "0px" : z ? "4.375rem" : "16.375rem",
619
+ "--app-sidebar-width": M ? "0px" : V ? "4.375rem" : "16.375rem",
620
620
  "--app-footer-zindex": M && oe ? "40" : "999"
621
621
  },
622
622
  children: [
@@ -639,7 +639,7 @@ function ln({
639
639
  "aside",
640
640
  {
641
641
  style: {
642
- width: M ? "16.375rem" : z ? "4.375rem" : "16.375rem",
642
+ width: M ? "16.375rem" : V ? "4.375rem" : "16.375rem",
643
643
  position: M ? "fixed" : "relative",
644
644
  ...M && {
645
645
  inset: 0,
@@ -670,7 +670,7 @@ function ln({
670
670
  position: "relative"
671
671
  },
672
672
  children: (() => {
673
- const m = !M && z && !oe, F = m && U;
673
+ const m = !M && V && !oe, F = m && _;
674
674
  return /* @__PURE__ */ d(X, { children: [
675
675
  /* @__PURE__ */ d(
676
676
  "div",
@@ -698,7 +698,7 @@ function ln({
698
698
  }
699
699
  }
700
700
  ),
701
- (!z || oe) && /* @__PURE__ */ e(
701
+ (!V || oe) && /* @__PURE__ */ e(
702
702
  "span",
703
703
  {
704
704
  style: {
@@ -713,7 +713,7 @@ function ln({
713
713
  ]
714
714
  }
715
715
  ),
716
- !M && !z && /* @__PURE__ */ e(
716
+ !M && !V && /* @__PURE__ */ e(
717
717
  "button",
718
718
  {
719
719
  type: "button",
@@ -811,11 +811,11 @@ function ln({
811
811
  })()
812
812
  }
813
813
  ),
814
- s && /* @__PURE__ */ e(
814
+ a && /* @__PURE__ */ e(
815
815
  lr,
816
816
  {
817
- collapsed: M ? !1 : z,
818
- children: s
817
+ collapsed: M ? !1 : V,
818
+ children: a
819
819
  }
820
820
  ),
821
821
  /* @__PURE__ */ e(
@@ -829,7 +829,7 @@ function ln({
829
829
  paddingBottom: "1rem"
830
830
  },
831
831
  children: We.map((m) => /* @__PURE__ */ d("div", { style: { marginBottom: "1rem" }, children: [
832
- !z || M ? m.name && /* @__PURE__ */ e(
832
+ !V || M ? m.name && /* @__PURE__ */ e(
833
833
  "div",
834
834
  {
835
835
  style: {
@@ -951,7 +951,7 @@ function ln({
951
951
  /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
952
952
  h,
953
953
  /* @__PURE__ */ d(Dt, { position: "bottom-right", children: [
954
- /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ d(
954
+ /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ d(
955
955
  "div",
956
956
  {
957
957
  style: {
@@ -1034,7 +1034,7 @@ function ln({
1034
1034
  marginTop: "16px"
1035
1035
  },
1036
1036
  children: [
1037
- /* @__PURE__ */ e(Ot, { children: /* @__PURE__ */ d(
1037
+ /* @__PURE__ */ e(Nt, { children: /* @__PURE__ */ d(
1038
1038
  "div",
1039
1039
  {
1040
1040
  style: {
@@ -1114,8 +1114,8 @@ function ln({
1114
1114
  ]
1115
1115
  }
1116
1116
  ) }),
1117
- (g && g.length > 0 || p) && /* @__PURE__ */ d(vt, { children: [
1118
- g == null ? void 0 : g.map((m, F) => /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ d(
1117
+ (g && g.length > 0 || y) && /* @__PURE__ */ d(vt, { children: [
1118
+ g == null ? void 0 : g.map((m, F) => /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ d(
1119
1119
  "button",
1120
1120
  {
1121
1121
  type: "button",
@@ -1133,9 +1133,9 @@ function ln({
1133
1133
  ]
1134
1134
  }
1135
1135
  ) }, `${m.label}-${F}`)),
1136
- p
1136
+ y
1137
1137
  ] }),
1138
- y ?? /* @__PURE__ */ e(Nt, { children: /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ d(
1138
+ p ?? /* @__PURE__ */ e(Zt, { children: /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ d(
1139
1139
  "button",
1140
1140
  {
1141
1141
  type: "button",
@@ -1189,7 +1189,7 @@ function ln({
1189
1189
  ]
1190
1190
  }
1191
1191
  ),
1192
- o && a && /* @__PURE__ */ e(
1192
+ o && s && /* @__PURE__ */ e(
1193
1193
  "div",
1194
1194
  {
1195
1195
  style: {
@@ -1201,15 +1201,15 @@ function ln({
1201
1201
  justifyContent: "center",
1202
1202
  zIndex: 9999
1203
1203
  },
1204
- children: a
1204
+ children: s
1205
1205
  }
1206
1206
  ),
1207
- /* @__PURE__ */ d(Ve, { isShow: fe, onHide: Oe, children: [
1207
+ /* @__PURE__ */ d(ze, { isShow: fe, onHide: Oe, children: [
1208
1208
  /* @__PURE__ */ e(Se, { children: "Confirmation Logout" }),
1209
1209
  /* @__PURE__ */ e(Ie, { children: "Are you sure you want to end the session and exit the page?" }),
1210
1210
  /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ e(u, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ d($, { direction: "row", gap: "sm", align: "center", children: [
1211
- /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(R, { secondary: !0, onClick: Oe, children: "Cancel" }) }),
1212
- /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(R, { primary: !0, onClick: Qe, children: "Yes, Sure" }) })
1211
+ /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(B, { secondary: !0, onClick: Oe, children: "Cancel" }) }),
1212
+ /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(B, { primary: !0, onClick: Qe, children: "Yes, Sure" }) })
1213
1213
  ] }) }) })
1214
1214
  ] }),
1215
1215
  Q && /* @__PURE__ */ d(X, { children: [
@@ -1330,11 +1330,11 @@ function or({
1330
1330
  selectedGroupId: l,
1331
1331
  onSelect: i
1332
1332
  }) {
1333
- const o = (a) => {
1334
- i(a), r();
1333
+ const o = (s) => {
1334
+ i(s), r();
1335
1335
  };
1336
1336
  return /* @__PURE__ */ e(
1337
- Ve,
1337
+ ze,
1338
1338
  {
1339
1339
  isShow: t,
1340
1340
  onHide: r,
@@ -1405,13 +1405,13 @@ function or({
1405
1405
  ]
1406
1406
  }
1407
1407
  ),
1408
- n.map((a) => {
1408
+ n.map((s) => {
1409
1409
  var f;
1410
- const s = l === a.id, h = ((f = a.items[0]) == null ? void 0 : f.icon) ?? "Grid";
1410
+ const a = l === s.id, h = ((f = s.items[0]) == null ? void 0 : f.icon) ?? "Grid";
1411
1411
  return /* @__PURE__ */ d(
1412
1412
  "button",
1413
1413
  {
1414
- onClick: () => o(a.id),
1414
+ onClick: () => o(s.id),
1415
1415
  style: {
1416
1416
  display: "flex",
1417
1417
  flexDirection: "column",
@@ -1433,8 +1433,8 @@ function or({
1433
1433
  width: "64px",
1434
1434
  height: "64px",
1435
1435
  borderRadius: "12px",
1436
- border: s ? "2px solid var(--sa-background-brand, #04254f)" : "1px solid var(--sa-border-subtle, #0b120e24)",
1437
- backgroundColor: s ? "var(--sa-color-brand-50, #e6edf6)" : "var(--sa-color-white-alpha-a90, #e5e9f66b)",
1436
+ border: a ? "2px solid var(--sa-background-brand, #04254f)" : "1px solid var(--sa-border-subtle, #0b120e24)",
1437
+ backgroundColor: a ? "var(--sa-color-brand-50, #e6edf6)" : "var(--sa-color-white-alpha-a90, #e5e9f66b)",
1438
1438
  transition: "all 0.15s",
1439
1439
  backdropFilter: "blur(4px)"
1440
1440
  },
@@ -1454,12 +1454,12 @@ function or({
1454
1454
  lineHeight: "1.3",
1455
1455
  maxWidth: "80px"
1456
1456
  },
1457
- children: a.name
1457
+ children: s.name
1458
1458
  }
1459
1459
  )
1460
1460
  ]
1461
1461
  },
1462
- a.id
1462
+ s.id
1463
1463
  );
1464
1464
  })
1465
1465
  ]
@@ -1472,11 +1472,11 @@ function on({
1472
1472
  onSelect: t,
1473
1473
  "aria-label": r = "Pilih module"
1474
1474
  } = {}) {
1475
- const n = Wt(), l = ct(), { selectedGroupId: i, setSelectedGroupId: o } = Rt(), [a, s] = B(!1), h = (f) => {
1475
+ const n = Bt(), l = ct(), { selectedGroupId: i, setSelectedGroupId: o } = Ht(), [s, a] = A(!1), h = (f) => {
1476
1476
  var g;
1477
1477
  if (o(f), f !== null) {
1478
- const p = n.menus.find((b) => b.id === f), y = (g = p == null ? void 0 : p.items[0]) == null ? void 0 : g.to;
1479
- y && l(y);
1478
+ const y = n.menus.find((b) => b.id === f), p = (g = y == null ? void 0 : y.items[0]) == null ? void 0 : g.to;
1479
+ p && l(p);
1480
1480
  }
1481
1481
  t == null || t(f);
1482
1482
  };
@@ -1485,7 +1485,7 @@ function on({
1485
1485
  /* @__PURE__ */ e(
1486
1486
  "button",
1487
1487
  {
1488
- onClick: () => s(!0),
1488
+ onClick: () => a(!0),
1489
1489
  style: {
1490
1490
  display: "inline-flex",
1491
1491
  alignItems: "center",
@@ -1527,8 +1527,8 @@ function on({
1527
1527
  /* @__PURE__ */ e(
1528
1528
  or,
1529
1529
  {
1530
- isShow: a,
1531
- onHide: () => s(!1),
1530
+ isShow: s,
1531
+ onHide: () => a(!1),
1532
1532
  menus: n.menus.filter((f) => f.parentGroupId === void 0),
1533
1533
  selectedGroupId: i,
1534
1534
  onSelect: h
@@ -1538,7 +1538,7 @@ function on({
1538
1538
  }
1539
1539
  const cn = te(
1540
1540
  ({ children: t, coverImage: r, logo: n }) => {
1541
- const l = ee("md"), i = Pt();
1541
+ const l = ee("md"), i = qt();
1542
1542
  return /* @__PURE__ */ d(
1543
1543
  u,
1544
1544
  {
@@ -1642,14 +1642,14 @@ const cn = te(
1642
1642
  lastIndex: i,
1643
1643
  labelAlign: o = "top"
1644
1644
  }) => {
1645
- const a = De(
1645
+ const s = De(
1646
1646
  () => ({
1647
1647
  padding: 0,
1648
1648
  paddingBottom: i ? 0 : 12,
1649
1649
  verticalAlign: o
1650
1650
  }),
1651
1651
  [i, o]
1652
- ), s = De(
1652
+ ), a = De(
1653
1653
  () => ({
1654
1654
  padding: 0,
1655
1655
  paddingRight: 12,
@@ -1660,9 +1660,9 @@ const cn = te(
1660
1660
  [i, o]
1661
1661
  ), h = () => typeof r == "string" ? /* @__PURE__ */ e(C, { fontWeight: "medium", color: "text-muted", children: r }) : r, f = () => typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ e(C, { color: "text", fontWeight: "medium", children: t }) : t, g = () => typeof n == "string" || typeof n == "number" ? /* @__PURE__ */ e(C, { fontWeight: "medium", color: "text-muted", children: n }) : n;
1662
1662
  return /* @__PURE__ */ d(He, { children: [
1663
- /* @__PURE__ */ e(we, { style: a, width: l, children: h() }),
1664
- n ? /* @__PURE__ */ e(we, { style: s, width: 24, children: g() }) : null,
1665
- /* @__PURE__ */ e(we, { style: a, children: f() })
1663
+ /* @__PURE__ */ e(we, { style: s, width: l, children: h() }),
1664
+ n ? /* @__PURE__ */ e(we, { style: a, width: 24, children: g() }) : null,
1665
+ /* @__PURE__ */ e(we, { style: s, children: f() })
1666
1666
  ] });
1667
1667
  }
1668
1668
  ), sr = te(({ fields: t, separator: r, labelWidth: n }) => /* @__PURE__ */ e(wt, { children: t.map((l, i) => /* @__PURE__ */ e(
@@ -1683,10 +1683,10 @@ const cn = te(
1683
1683
  labelWidth: i = 150,
1684
1684
  bordered: o = !1
1685
1685
  }) => {
1686
- const a = De(
1686
+ const s = De(
1687
1687
  () => cr(l, t),
1688
1688
  [l, t]
1689
- ), s = a.length > 2, h = () => {
1689
+ ), a = s.length > 2, h = () => {
1690
1690
  switch (r) {
1691
1691
  case 1:
1692
1692
  return "width-full";
@@ -1703,22 +1703,22 @@ const cn = te(
1703
1703
  return /* @__PURE__ */ e(
1704
1704
  u,
1705
1705
  {
1706
- gap: s ? void 0 : "lg",
1706
+ gap: a ? void 0 : "lg",
1707
1707
  direction: "row",
1708
1708
  flexWrap: "wrap",
1709
1709
  borderRadius: "rounded-sm",
1710
1710
  padding: "lg",
1711
- paddingBottom: s ? "xs" : "lg",
1711
+ paddingBottom: a ? "xs" : "lg",
1712
1712
  bg: "accent-dark-tertiary",
1713
1713
  borderWidth: o ? "border" : void 0,
1714
1714
  borderStyle: o ? "border-solid" : void 0,
1715
1715
  borderColor: o ? "border-subtle" : void 0,
1716
- children: a.map((f, g) => /* @__PURE__ */ e(
1716
+ children: s.map((f, g) => /* @__PURE__ */ e(
1717
1717
  u,
1718
1718
  {
1719
- flex: s ? void 0 : "1",
1720
- width: s ? h() : void 0,
1721
- marginBottom: s ? "lg" : void 0,
1719
+ flex: a ? void 0 : "1",
1720
+ width: a ? h() : void 0,
1721
+ marginBottom: a ? "lg" : void 0,
1722
1722
  children: /* @__PURE__ */ e(
1723
1723
  sr,
1724
1724
  {
@@ -1740,10 +1740,10 @@ const cn = te(
1740
1740
  onSuccess: l,
1741
1741
  isShow: i,
1742
1742
  successButtonTitle: o = "Konfirmasi",
1743
- theme: a
1743
+ theme: s
1744
1744
  }) => {
1745
- const s = () => {
1746
- switch (a) {
1745
+ const a = () => {
1746
+ switch (s) {
1747
1747
  case "info":
1748
1748
  return /* @__PURE__ */ e(Se, { info: !0, children: t });
1749
1749
  case "danger":
@@ -1754,22 +1754,22 @@ const cn = te(
1754
1754
  return /* @__PURE__ */ e(Se, { success: !0, children: t });
1755
1755
  }
1756
1756
  }, h = () => {
1757
- switch (a) {
1757
+ switch (s) {
1758
1758
  case "info":
1759
- return /* @__PURE__ */ e(R, { primary: !0, onClick: l, children: o });
1759
+ return /* @__PURE__ */ e(B, { primary: !0, onClick: l, children: o });
1760
1760
  case "danger":
1761
- return /* @__PURE__ */ e(R, { danger: !0, onClick: l, children: o });
1761
+ return /* @__PURE__ */ e(B, { danger: !0, onClick: l, children: o });
1762
1762
  case "success":
1763
- return /* @__PURE__ */ e(R, { success: !0, onClick: l, children: o });
1763
+ return /* @__PURE__ */ e(B, { success: !0, onClick: l, children: o });
1764
1764
  default:
1765
- return /* @__PURE__ */ e(R, { primary: !0, onClick: l, children: o });
1765
+ return /* @__PURE__ */ e(B, { primary: !0, onClick: l, children: o });
1766
1766
  }
1767
1767
  };
1768
- return /* @__PURE__ */ d(Ve, { isShow: i, onHide: n, children: [
1769
- s(),
1768
+ return /* @__PURE__ */ d(ze, { isShow: i, onHide: n, children: [
1769
+ a(),
1770
1770
  /* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(C, { children: r }) }),
1771
1771
  /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ d(u, { justify: "flex-end", direction: "row", gap: "sm", children: [
1772
- /* @__PURE__ */ e(R, { secondary: !0, onClick: n, children: "Cancel" }),
1772
+ /* @__PURE__ */ e(B, { secondary: !0, onClick: n, children: "Cancel" }),
1773
1773
  h()
1774
1774
  ] }) })
1775
1775
  ] });
@@ -1784,8 +1784,8 @@ const cn = te(
1784
1784
  ...r,
1785
1785
  children: t
1786
1786
  }
1787
- ), Ht = te(dr), hr = ({ backButton: t }) => {
1788
- const [r, n] = B(!1), l = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", i = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", o = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)", a = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
1787
+ ), Vt = te(dr), hr = ({ backButton: t }) => {
1788
+ const [r, n] = A(!1), l = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", i = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", o = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)", s = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
1789
1789
  return /* @__PURE__ */ d(
1790
1790
  u,
1791
1791
  {
@@ -1812,7 +1812,7 @@ const cn = te(
1812
1812
  {
1813
1813
  variant: "sub-h3",
1814
1814
  style: {
1815
- color: r ? a : i,
1815
+ color: r ? s : i,
1816
1816
  textDecoration: r ? "underline" : "none",
1817
1817
  transition: "color 0.15s ease"
1818
1818
  },
@@ -1829,11 +1829,11 @@ const cn = te(
1829
1829
  children: l,
1830
1830
  header: i = !0,
1831
1831
  action: o,
1832
- titleTagProps: a,
1833
- containerProps: s,
1832
+ titleTagProps: s,
1833
+ containerProps: a,
1834
1834
  headerProps: h
1835
1835
  }) => {
1836
- const f = ee("lg"), g = ct(), p = Te(), y = t == null ? void 0 : t.show, b = () => {
1836
+ const f = ee("lg"), g = ct(), y = Te(), p = t == null ? void 0 : t.show, b = () => {
1837
1837
  if (typeof (t == null ? void 0 : t.onClick) == "function") {
1838
1838
  t.onClick();
1839
1839
  return;
@@ -1841,7 +1841,7 @@ const cn = te(
1841
1841
  g(-1, { replace: !0 });
1842
1842
  }, H = () => o ? it(o) ? o : /* @__PURE__ */ e(u, { direction: "row", gap: "lg", children: o.map(
1843
1843
  ({ title: j, icon: J, buttonProps: M, onClick: fe }, G) => !j && !J ? null : /* @__PURE__ */ e(
1844
- R,
1844
+ B,
1845
1845
  {
1846
1846
  fullWidth: !f,
1847
1847
  iconLeft: J ? /* @__PURE__ */ e(k, { name: J, size: "md" }) : void 0,
@@ -1861,10 +1861,10 @@ const cn = te(
1861
1861
  style: { textDecoration: "none" },
1862
1862
  children: j
1863
1863
  }
1864
- ) }) : /* @__PURE__ */ e(u, { direction: "row", children: /* @__PURE__ */ e(Ht, { onClick: b, children: j }) });
1864
+ ) }) : /* @__PURE__ */ e(u, { direction: "row", children: /* @__PURE__ */ e(Vt, { onClick: b, children: j }) });
1865
1865
  }, I = () => {
1866
1866
  const j = !!r, J = it(o) ? !0 : Array.isArray(o) && o.length > 0;
1867
- return !j && !J && !y ? null : /* @__PURE__ */ d(
1867
+ return !j && !J && !p ? null : /* @__PURE__ */ d(
1868
1868
  u,
1869
1869
  {
1870
1870
  gap: "xs",
@@ -1872,7 +1872,7 @@ const cn = te(
1872
1872
  paddingInline: h == null ? void 0 : h.paddingInline,
1873
1873
  ...h,
1874
1874
  children: [
1875
- y && D(),
1875
+ p && D(),
1876
1876
  (j || J) && /* @__PURE__ */ d(
1877
1877
  u,
1878
1878
  {
@@ -1883,7 +1883,7 @@ const cn = te(
1883
1883
  children: [
1884
1884
  j ? typeof r == "string" ? /* @__PURE__ */ d(u, { direction: "row", gap: "lg", align: "center", children: [
1885
1885
  /* @__PURE__ */ e(C, { variant: "h2", fontWeight: "semibold", fontFamily: "Poppins", children: r }),
1886
- n && /* @__PURE__ */ e(Ee, { border: !0, size: "lg", text: n, ...a })
1886
+ n && /* @__PURE__ */ e(Ee, { border: !0, size: "lg", text: n, ...s })
1887
1887
  ] }) : r : null,
1888
1888
  H()
1889
1889
  ]
@@ -1898,10 +1898,10 @@ const cn = te(
1898
1898
  {
1899
1899
  gap: "md",
1900
1900
  variant: "main",
1901
- ...s,
1901
+ ...a,
1902
1902
  padding: "md",
1903
1903
  style: {
1904
- ...(s == null ? void 0 : s.style) ?? {},
1904
+ ...(a == null ? void 0 : a.style) ?? {},
1905
1905
  animation: "pageLayoutEnter 320ms cubic-bezier(0.16, 1, 0.3, 1) backwards"
1906
1906
  },
1907
1907
  children: [
@@ -1909,12 +1909,12 @@ const cn = te(
1909
1909
  Z()
1910
1910
  ]
1911
1911
  },
1912
- p.pathname
1912
+ y.pathname
1913
1913
  );
1914
1914
  }, dn = te(ur), fr = {
1915
1915
  icon: "Cross",
1916
1916
  title: ""
1917
- }, gr = "calc(100vw - 16px)", pt = (t) => t == null ? void 0 : `min(${typeof t == "number" ? `${t}px` : t}, ${gr})`, mr = Et(
1917
+ }, gr = "calc(100vw - 16px)", yt = (t) => t == null ? void 0 : `min(${typeof t == "number" ? `${t}px` : t}, ${gr})`, mr = Mt(
1918
1918
  ({
1919
1919
  onHide: t,
1920
1920
  show: r,
@@ -1922,13 +1922,13 @@ const cn = te(
1922
1922
  style: l,
1923
1923
  children: i,
1924
1924
  closeButton: o = fr,
1925
- width: a,
1926
- minWidth: s = "357px",
1925
+ width: s,
1926
+ minWidth: a = "357px",
1927
1927
  maxWidth: h = "357px"
1928
1928
  }, f) => {
1929
- const g = pt(a ?? s), p = pt(a ?? h);
1929
+ const g = yt(s ?? a), y = yt(s ?? h);
1930
1930
  return /* @__PURE__ */ e(
1931
- Tt,
1931
+ Ot,
1932
1932
  {
1933
1933
  blur: n,
1934
1934
  isShow: r,
@@ -1937,7 +1937,7 @@ const cn = te(
1937
1937
  ref: f,
1938
1938
  style: {
1939
1939
  minWidth: g,
1940
- maxWidth: p,
1940
+ maxWidth: y,
1941
1941
  ...l
1942
1942
  },
1943
1943
  children: /* @__PURE__ */ d(u, { padding: "lg", children: [
@@ -1985,7 +1985,7 @@ const cn = te(
1985
1985
  }
1986
1986
  );
1987
1987
  }
1988
- ), Vt = te(
1988
+ ), It = te(
1989
1989
  ({ children: t, borderTop: r = !0, padding: n = !0 }) => {
1990
1990
  const l = ee("lg");
1991
1991
  return /* @__PURE__ */ e(
@@ -2001,7 +2001,7 @@ const cn = te(
2001
2001
  }
2002
2002
  );
2003
2003
  }
2004
- ), pr = te(
2004
+ ), yr = te(
2005
2005
  ({ children: t, ...r }) => /* @__PURE__ */ e(
2006
2006
  u,
2007
2007
  {
@@ -2021,16 +2021,16 @@ const cn = te(
2021
2021
  action: l,
2022
2022
  header: i,
2023
2023
  footer: o,
2024
- actionContainer: a,
2025
- containerProps: s,
2024
+ actionContainer: s,
2025
+ containerProps: a,
2026
2026
  bodyProps: h,
2027
2027
  headerProps: f = { borderBottom: !0 },
2028
2028
  footerProps: g = { borderTop: !0 },
2029
- variantTag: p = "info"
2029
+ variantTag: y = "info"
2030
2030
  }) => {
2031
- const y = ee("lg"), b = () => n ? /* @__PURE__ */ d(u, { direction: "row", gap: "sm", align: "center", children: [
2031
+ const p = ee("lg"), b = () => n ? /* @__PURE__ */ d(u, { direction: "row", gap: "sm", align: "center", children: [
2032
2032
  /* @__PURE__ */ e(C, { fontWeight: "medium", children: r }),
2033
- /* @__PURE__ */ e(Ee, { border: !0, text: n, variant: p })
2033
+ /* @__PURE__ */ e(Ee, { border: !0, text: n, variant: y })
2034
2034
  ] }) : /* @__PURE__ */ e(C, { fontWeight: "medium", children: r }), H = () => i || /* @__PURE__ */ d(
2035
2035
  u,
2036
2036
  {
@@ -2043,8 +2043,8 @@ const cn = te(
2043
2043
  /* @__PURE__ */ e(
2044
2044
  u,
2045
2045
  {
2046
- style: y ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
2047
- ...a,
2046
+ style: p ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
2047
+ ...s,
2048
2048
  children: l ?? null
2049
2049
  }
2050
2050
  )
@@ -2060,23 +2060,23 @@ const cn = te(
2060
2060
  borderWidth: "border",
2061
2061
  borderStyle: "border-solid",
2062
2062
  borderColor: "border-base",
2063
- ...s,
2063
+ ...a,
2064
2064
  style: {
2065
2065
  backgroundColor: "var(--sa-background-primary, #ffffff)",
2066
- ...(s == null ? void 0 : s.style) ?? {}
2066
+ ...(a == null ? void 0 : a.style) ?? {}
2067
2067
  },
2068
2068
  children: [
2069
2069
  i !== null && D ? /* @__PURE__ */ e(zt, { ...f, children: H() }) : null,
2070
- /* @__PURE__ */ e(pr, { ...h, children: t }),
2071
- o ? /* @__PURE__ */ e(Vt, { ...g, children: o }) : null
2070
+ /* @__PURE__ */ e(yr, { ...h, children: t }),
2071
+ o ? /* @__PURE__ */ e(It, { ...g, children: o }) : null
2072
2072
  ]
2073
2073
  }
2074
2074
  );
2075
2075
  }
2076
- ), yr = "var(--sa-color-secondary-50, #e6e9fb)", xr = ({ children: t, onClick: r }) => {
2077
- const [n, l] = B("");
2076
+ ), pr = "var(--sa-color-secondary-50, #e6e9fb)", xr = ({ children: t, onClick: r }) => {
2077
+ const [n, l] = A("");
2078
2078
  return /* @__PURE__ */ e(
2079
- Ht,
2079
+ Vt,
2080
2080
  {
2081
2081
  fullWidth: !0,
2082
2082
  height: "height-8",
@@ -2088,7 +2088,7 @@ const cn = te(
2088
2088
  gap: "spacing-1",
2089
2089
  cursor: "pointer",
2090
2090
  onClick: r,
2091
- onMouseEnter: () => l(yr),
2091
+ onMouseEnter: () => l(pr),
2092
2092
  borderRadius: "rounded-md",
2093
2093
  onMouseLeave: () => l(""),
2094
2094
  style: { backgroundColor: n },
@@ -2102,8 +2102,8 @@ const cn = te(
2102
2102
  triggerStyle: l,
2103
2103
  containerStyle: i,
2104
2104
  position: o = "bottom-right",
2105
- buttonProps: a,
2106
- iconProps: s,
2105
+ buttonProps: s,
2106
+ iconProps: a,
2107
2107
  variant: h = "default"
2108
2108
  }) => {
2109
2109
  const f = De(
@@ -2115,9 +2115,9 @@ const cn = te(
2115
2115
  [i]
2116
2116
  );
2117
2117
  return /* @__PURE__ */ d(Dt, { position: o, style: n, children: [
2118
- /* @__PURE__ */ e(_e, { style: l, children: /* @__PURE__ */ e(R, { size: "sm", secondary: !0, ...a, children: /* @__PURE__ */ e(k, { name: t, ...s }) }) }),
2119
- /* @__PURE__ */ e(bt, { style: f, children: r.map((g, p) => h === "outline-button" ? /* @__PURE__ */ e(vt, { children: /* @__PURE__ */ d(
2120
- R,
2118
+ /* @__PURE__ */ e(Ue, { style: l, children: /* @__PURE__ */ e(B, { size: "sm", secondary: !0, ...s, children: /* @__PURE__ */ e(k, { name: t, ...a }) }) }),
2119
+ /* @__PURE__ */ e(bt, { style: f, children: r.map((g, y) => h === "outline-button" ? /* @__PURE__ */ e(vt, { children: /* @__PURE__ */ d(
2120
+ B,
2121
2121
  {
2122
2122
  size: "sm",
2123
2123
  secondary: !0,
@@ -2129,7 +2129,7 @@ const cn = te(
2129
2129
  /* @__PURE__ */ e(C, { fontSize: "sm", color: "text", ...g.textProps, children: g.label })
2130
2130
  ]
2131
2131
  }
2132
- ) }, g.id || p) : /* @__PURE__ */ d(
2132
+ ) }, g.id || y) : /* @__PURE__ */ d(
2133
2133
  Cr,
2134
2134
  {
2135
2135
  onClick: g.onClick,
@@ -2139,7 +2139,7 @@ const cn = te(
2139
2139
  /* @__PURE__ */ e(C, { fontSize: "sm", color: "text", ...g.textProps, children: g.label })
2140
2140
  ]
2141
2141
  },
2142
- g.id || p
2142
+ g.id || y
2143
2143
  )) })
2144
2144
  ] });
2145
2145
  }, un = te(Dr), br = (t) => /* @__PURE__ */ e(C, { variant: "h1", children: t.children, ...t.props }), vr = (t) => /* @__PURE__ */ e(C, { variant: "h2", children: t.children, ...t.props }), wr = (t) => /* @__PURE__ */ e(C, { variant: "h3", children: t.children, ...t.props }), kr = (t) => /* @__PURE__ */ e(C, { variant: "h4", children: t.children, ...t.props }), Fr = (t) => /* @__PURE__ */ e(C, { variant: "h5", children: t.children, ...t.props }), Sr = (t) => /* @__PURE__ */ e(C, { variant: "h6", children: t.children, ...t.props }), Er = (t) => /* @__PURE__ */ e(C, { variant: "sub-h1", children: t.children, ...t.props }), Mr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h2", children: t.children, ...t.props }), Lr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h3", children: t.children, ...t.props }), Wr = (t) => /* @__PURE__ */ e(C, { variant: "body-1", children: t.children, ...t.props }), Br = (t) => /* @__PURE__ */ e(C, { variant: "body-2", children: t.children, ...t.props }), Ar = (t) => /* @__PURE__ */ e(C, { variant: "body-3", children: t.children, ...t.props }), me = {
@@ -2156,13 +2156,13 @@ const cn = te(
2156
2156
  Body2: Br,
2157
2157
  Body3: Ar
2158
2158
  }, at = () => {
2159
- const [t, r] = Ge(), n = Je(t.toString()), l = Mt(), i = Te(), o = l.id;
2159
+ const [t, r] = Ge(), n = Je(t.toString()), l = Lt(), i = Te(), o = l.id;
2160
2160
  return {
2161
2161
  // query params
2162
2162
  setSearchParams: r,
2163
2163
  searchParams: t,
2164
2164
  searchQueries: n,
2165
- isHasQuery: (g, p) => t.has(g) && t.get(g) === p,
2165
+ isHasQuery: (g, y) => t.has(g) && t.get(g) === y,
2166
2166
  getQueryParam: (g) => t.get(g),
2167
2167
  // route params
2168
2168
  getRouteParam: (g) => l[g],
@@ -2173,15 +2173,15 @@ const cn = te(
2173
2173
  id: o,
2174
2174
  hasId: !!o
2175
2175
  };
2176
- }, Rr = (t) => JSON.stringify(t), Hr = (t) => JSON.stringify(t), zr = (t) => JSON.stringify(t), Vr = (t) => JSON.stringify(t), Ir = (t) => t, Tr = (t) => JSON.stringify(t), yt = ({
2176
+ }, Rr = (t) => JSON.stringify(t), Hr = (t) => JSON.stringify(t), Vr = (t) => JSON.stringify(t), zr = (t) => JSON.stringify(t), Ir = (t) => t, Tr = (t) => JSON.stringify(t), pt = ({
2177
2177
  value: t,
2178
2178
  name: r,
2179
2179
  type: n,
2180
2180
  withSearchParam: l = !0,
2181
2181
  setSearchParams: i,
2182
2182
  searchQueries: o,
2183
- dropdownSearchKey: a,
2184
- filterKey: s = "filter",
2183
+ dropdownSearchKey: s,
2184
+ filterKey: a = "filter",
2185
2185
  pageKey: h = "page"
2186
2186
  }) => {
2187
2187
  if (l) {
@@ -2198,27 +2198,27 @@ const cn = te(
2198
2198
  f = Hr(t);
2199
2199
  break;
2200
2200
  case "date-range":
2201
- f = zr(t);
2201
+ f = Vr(t);
2202
2202
  break;
2203
2203
  case "advanced-date-range":
2204
2204
  f = Tr(t);
2205
2205
  break;
2206
2206
  case "date":
2207
- f = Vr(t);
2207
+ f = zr(t);
2208
2208
  break;
2209
2209
  default:
2210
2210
  f = t;
2211
2211
  break;
2212
2212
  }
2213
2213
  if (typeof f < "u") {
2214
- const p = {
2215
- ...o[s] && typeof o[s] == "string" ? JSON.parse(o[s]) : void 0,
2214
+ const y = {
2215
+ ...o[a] && typeof o[a] == "string" ? JSON.parse(o[a]) : void 0,
2216
2216
  [r]: f
2217
- }, y = { ...o };
2218
- a && typeof a == "string" && delete y[a], delete y[h];
2217
+ }, p = { ...o };
2218
+ s && typeof s == "string" && delete p[s], delete p[h];
2219
2219
  const b = {
2220
- ...y,
2221
- [s]: JSON.stringify(p)
2220
+ ...p,
2221
+ [a]: JSON.stringify(y)
2222
2222
  }, H = new URLSearchParams(o).toString(), D = new URLSearchParams(
2223
2223
  b
2224
2224
  ).toString();
@@ -2233,24 +2233,24 @@ const cn = te(
2233
2233
  searchParams: n,
2234
2234
  get: l
2235
2235
  }) => {
2236
- const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, a = o ? o[t] : void 0;
2237
- return l === "label" && a ? JSON.parse(a)[0].label : l === "value" && a ? JSON.parse(a)[0].value : a;
2236
+ const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, s = o ? o[t] : void 0;
2237
+ return l === "label" && s ? JSON.parse(s)[0].label : l === "value" && s ? JSON.parse(s)[0].value : s;
2238
2238
  }, fn = ({
2239
2239
  name: t,
2240
2240
  filterKey: r = "filter",
2241
2241
  searchParams: n,
2242
2242
  get: l
2243
2243
  }) => {
2244
- const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, a = o ? o[t] : void 0;
2245
- return l === "label" && a ? JSON.parse(a).map((s) => s.label) : l === "value" && a ? JSON.parse(a).map((s) => s.value) : l === "array" && a ? JSON.parse(a) : a;
2244
+ const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, s = o ? o[t] : void 0;
2245
+ return l === "label" && s ? JSON.parse(s).map((a) => a.label) : l === "value" && s ? JSON.parse(s).map((a) => a.value) : l === "array" && s ? JSON.parse(s) : s;
2246
2246
  }, gn = ({
2247
2247
  name: t,
2248
2248
  filterKey: r = "filter",
2249
2249
  searchParams: n,
2250
2250
  get: l
2251
2251
  }) => {
2252
- const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, a = o ? o[t] : void 0;
2253
- return l === "id" && a ? JSON.parse(a).id : l === "label" && a ? JSON.parse(a).label : l === "value" && a ? JSON.parse(a).value : a;
2252
+ const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, s = o ? o[t] : void 0;
2253
+ return l === "id" && s ? JSON.parse(s).id : l === "label" && s ? JSON.parse(s).label : l === "value" && s ? JSON.parse(s).value : s;
2254
2254
  }, Or = (t, r, n) => {
2255
2255
  const l = r.get(n || "filter") || void 0, i = l && typeof l == "string" ? JSON.parse(l) : void 0;
2256
2256
  return i ? i[t] : void 0;
@@ -2264,20 +2264,20 @@ const cn = te(
2264
2264
  start: o ? JSON.parse(o).from : void 0,
2265
2265
  end: o ? JSON.parse(o).to : void 0
2266
2266
  };
2267
- }, pn = ({
2267
+ }, yn = ({
2268
2268
  name: t,
2269
2269
  filterKey: r = "filter",
2270
2270
  searchParams: n
2271
2271
  }) => {
2272
2272
  const l = n.get(r || "filter") || void 0, i = l && typeof l == "string" ? JSON.parse(l) : void 0, o = i ? i[t] : void 0;
2273
2273
  return o ? JSON.parse(o) : void 0;
2274
- }, yn = (t, {
2274
+ }, pn = (t, {
2275
2275
  filterKey: r = "filter",
2276
2276
  perPageKey: n = "perPage",
2277
2277
  pageKey: l = "page"
2278
2278
  }) => {
2279
- const i = t.get(r) || void 0, o = t.get(n) || void 0, a = t.get(l) || void 0;
2280
- return !!i || !!o || !!a;
2279
+ const i = t.get(r) || void 0, o = t.get(n) || void 0, s = t.get(l) || void 0;
2280
+ return !!i || !!o || !!s;
2281
2281
  }, Nr = ({
2282
2282
  isOpen: t,
2283
2283
  onClose: r,
@@ -2285,25 +2285,25 @@ const cn = te(
2285
2285
  pageKey: l,
2286
2286
  filters: i
2287
2287
  }) => {
2288
- const { searchParams: o, setSearchParams: a, searchQueries: s } = at(), [h, f] = B({}), g = () => {
2289
- o.delete(n || "filter"), a(o);
2290
- }, p = (y, b) => {
2291
- switch (y.type) {
2288
+ const { searchParams: o, setSearchParams: s, searchQueries: a } = at(), [h, f] = A({}), g = () => {
2289
+ o.delete(n || "filter"), s(o);
2290
+ }, y = (p, b) => {
2291
+ switch (p.type) {
2292
2292
  case "radio": {
2293
- const { show: H = !0 } = y;
2294
- return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: y.title }) }, b);
2293
+ const { show: H = !0 } = p;
2294
+ return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: p.title }) }, b);
2295
2295
  }
2296
2296
  case "dropdown": {
2297
- const { show: H = !0 } = y;
2298
- return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: y.title }) }, b);
2297
+ const { show: H = !0 } = p;
2298
+ return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: p.title }) }, b);
2299
2299
  }
2300
2300
  case "date-range":
2301
- return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: y.title }) }, b);
2301
+ return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: p.title }) }, b);
2302
2302
  case "date":
2303
- return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: y.title }) }, b);
2303
+ return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: p.title }) }, b);
2304
2304
  case "dropdown-multiple": {
2305
- const { show: H = !0 } = y;
2306
- return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: y.title }) }, b);
2305
+ const { show: H = !0 } = p;
2306
+ return H && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(u, { children: p.title }) }, b);
2307
2307
  }
2308
2308
  default:
2309
2309
  return null;
@@ -2321,7 +2321,7 @@ const cn = te(
2321
2321
  }
2322
2322
  )
2323
2323
  ] }),
2324
- i == null ? void 0 : i.map((y, b) => p(y, b))
2324
+ i == null ? void 0 : i.map((p, b) => y(p, b))
2325
2325
  ] }) });
2326
2326
  }, Zr = ({
2327
2327
  searchKey: t = "q",
@@ -2330,55 +2330,55 @@ const cn = te(
2330
2330
  searchHighlightPlaceholder: l,
2331
2331
  extendedFilter: i,
2332
2332
  showSearchFilter: o = !0,
2333
- showStatusFilter: a = !0,
2334
- filterKey: s = "filter",
2333
+ showStatusFilter: s = !0,
2334
+ filterKey: a = "filter",
2335
2335
  pageKey: h = "page",
2336
2336
  customWidthSearch: f,
2337
2337
  handleOnReset: g,
2338
- filterConfigs: p,
2339
- buttonToggleProps: y,
2338
+ filterConfigs: y,
2339
+ buttonToggleProps: p,
2340
2340
  position: b = "right",
2341
2341
  titleSearchLabel: H = "Work Order",
2342
2342
  withTitleLabels: D = !1
2343
2343
  }) => {
2344
- const Z = (y == null ? void 0 : y.isShowLabel) ?? !0, [j, J] = B(!1), [M, fe] = B(0), G = () => {
2345
- fe((V) => V + 1);
2346
- }, { searchParams: z, setSearchParams: K, getQueryParam: oe } = at(), ce = Je(z.toString()), U = Or(t, z, s) || "", [ae, se] = B(U), re = oe(s), q = !!(re && !(() => {
2344
+ const Z = (p == null ? void 0 : p.isShowLabel) ?? !0, [j, J] = A(!1), [M, fe] = A(0), G = () => {
2345
+ fe((z) => z + 1);
2346
+ }, { searchParams: V, setSearchParams: K, getQueryParam: oe } = at(), ce = Je(V.toString()), _ = Or(t, V, a) || "", [ae, se] = A(_), re = oe(a), q = !!(re && !(() => {
2347
2347
  if (re)
2348
2348
  try {
2349
- const V = JSON.parse(re);
2350
- return Object.keys(V).length === 1 && V[t] === "";
2351
- } catch (V) {
2352
- console.error("Filter parameter is not a valid JSON:", V);
2349
+ const z = JSON.parse(re);
2350
+ return Object.keys(z).length === 1 && z[t] === "";
2351
+ } catch (z) {
2352
+ console.error("Filter parameter is not a valid JSON:", z);
2353
2353
  }
2354
2354
  return !1;
2355
2355
  })()), O = ee("md");
2356
- return _(() => {
2357
- se(U);
2358
- }, [U]), _(() => {
2359
- if (ae === U)
2356
+ return U(() => {
2357
+ se(_);
2358
+ }, [_]), U(() => {
2359
+ if (ae === _)
2360
2360
  return;
2361
- const V = window.setTimeout(() => {
2362
- yt({
2361
+ const z = window.setTimeout(() => {
2362
+ pt({
2363
2363
  value: ae,
2364
2364
  name: t,
2365
2365
  type: "search",
2366
2366
  searchQueries: ce,
2367
2367
  setSearchParams: K,
2368
- filterKey: s,
2368
+ filterKey: a,
2369
2369
  pageKey: h
2370
2370
  });
2371
2371
  }, 350);
2372
2372
  return () => {
2373
- window.clearTimeout(V);
2373
+ window.clearTimeout(z);
2374
2374
  };
2375
2375
  }, [
2376
2376
  ae,
2377
- U,
2377
+ _,
2378
2378
  t,
2379
2379
  ce,
2380
2380
  K,
2381
- s,
2381
+ a,
2382
2382
  h
2383
2383
  ]), /* @__PURE__ */ d(
2384
2384
  $,
@@ -2390,23 +2390,24 @@ const cn = te(
2390
2390
  align: "flex-end",
2391
2391
  children: [
2392
2392
  q && /* @__PURE__ */ e(u, { justify: "flex-end", children: /* @__PURE__ */ e(
2393
- R,
2393
+ B,
2394
2394
  {
2395
2395
  onClick: () => {
2396
- const V = new URLSearchParams(z);
2397
- V.delete(s), K(V), se(""), G(), g && g();
2396
+ const z = new URLSearchParams(V);
2397
+ z.delete(a), K(z), se(""), G(), g && g();
2398
2398
  },
2399
- secondary: !0,
2399
+ variant: "outline",
2400
+ tone: "neutral",
2400
2401
  children: /* @__PURE__ */ e(C, { color: "error", fontWeight: "semibold", children: "Reset" })
2401
2402
  }
2402
2403
  ) }),
2403
- i == null ? void 0 : i.map(({ minWidth: V, content: Y, title: de, onClickContainer: he }, Me) => /* @__PURE__ */ d(
2404
+ i == null ? void 0 : i.map(({ minWidth: z, content: Y, title: de, onClickContainer: he }, Me) => /* @__PURE__ */ d(
2404
2405
  u,
2405
2406
  {
2406
2407
  gap: "sm",
2407
2408
  onClick: he,
2408
2409
  style: {
2409
- minWidth: V
2410
+ minWidth: z
2410
2411
  },
2411
2412
  children: [
2412
2413
  de && /* @__PURE__ */ e(me.SubH3, { children: de }),
@@ -2415,8 +2416,8 @@ const cn = te(
2415
2416
  },
2416
2417
  `extended-filter-${Me}-${M}`
2417
2418
  )),
2418
- !!(p != null && p.length) && /* @__PURE__ */ e(
2419
- R,
2419
+ !!(y != null && y.length) && /* @__PURE__ */ e(
2420
+ B,
2420
2421
  {
2421
2422
  primary: q,
2422
2423
  secondary: !q,
@@ -2424,7 +2425,7 @@ const cn = te(
2424
2425
  k,
2425
2426
  {
2426
2427
  size: "sm",
2427
- name: (y == null ? void 0 : y.icon) || "FilterHorizontal",
2428
+ name: (p == null ? void 0 : p.icon) || "FilterHorizontal",
2428
2429
  style: {
2429
2430
  color: re ? "var(--sa-background-brand, #04254f)" : "var(--sa-text-primary, #292a2e)"
2430
2431
  }
@@ -2435,7 +2436,7 @@ const cn = te(
2435
2436
  children: Z ? "Filter" : void 0
2436
2437
  }
2437
2438
  ),
2438
- a && /* @__PURE__ */ d(
2439
+ s && /* @__PURE__ */ d(
2439
2440
  u,
2440
2441
  {
2441
2442
  gap: "sm",
@@ -2460,31 +2461,31 @@ const cn = te(
2460
2461
  defaultValue: Ke({
2461
2462
  get: "value",
2462
2463
  name: r,
2463
- searchParams: z,
2464
- filterKey: s
2464
+ searchParams: V,
2465
+ filterKey: a
2465
2466
  }) ? [
2466
2467
  {
2467
2468
  label: Ke({
2468
2469
  get: "value",
2469
2470
  name: r,
2470
- searchParams: z,
2471
- filterKey: s
2471
+ searchParams: V,
2472
+ filterKey: a
2472
2473
  }) === "active" ? "Active" : "InActive",
2473
2474
  value: Ke({
2474
2475
  get: "value",
2475
2476
  name: r,
2476
- searchParams: z,
2477
- filterKey: s
2477
+ searchParams: V,
2478
+ filterKey: a
2478
2479
  })
2479
2480
  }
2480
2481
  ] : [],
2481
- onChange: (V) => yt({
2482
- value: V,
2482
+ onChange: (z) => pt({
2483
+ value: z,
2483
2484
  name: r,
2484
2485
  type: "dropdown",
2485
2486
  searchQueries: ce,
2486
2487
  setSearchParams: K,
2487
- filterKey: s
2488
+ filterKey: a
2488
2489
  }),
2489
2490
  placeholder: D ? "All" : "All Status"
2490
2491
  },
@@ -2510,11 +2511,11 @@ const cn = te(
2510
2511
  {
2511
2512
  placeholder: n,
2512
2513
  leftIcon: /* @__PURE__ */ e(k, { name: "Search", width: 20, height: 20 }),
2513
- onChange: (V) => se(V.target.value),
2514
+ onChange: (z) => se(z.target.value),
2514
2515
  value: ae,
2515
2516
  fullWidth: !0
2516
2517
  },
2517
- M + 1 + s
2518
+ M + 1 + a
2518
2519
  )
2519
2520
  ]
2520
2521
  }
@@ -2524,8 +2525,8 @@ const cn = te(
2524
2525
  {
2525
2526
  isOpen: j,
2526
2527
  onClose: () => J(!1),
2527
- filterKey: s,
2528
- filters: p,
2528
+ filterKey: a,
2529
+ filters: y,
2529
2530
  pageKey: h
2530
2531
  }
2531
2532
  )
@@ -2533,16 +2534,16 @@ const cn = te(
2533
2534
  }
2534
2535
  );
2535
2536
  }, jr = ({ children: t, borderRadius: r, height: n }) => {
2536
- const l = le(null), [i, o] = B("100vh");
2537
- return _(() => {
2537
+ const l = le(null), [i, o] = A("100vh");
2538
+ return U(() => {
2538
2539
  if (n) return;
2539
- const a = () => {
2540
+ const s = () => {
2540
2541
  if (l.current) {
2541
- const s = l.current.getBoundingClientRect().top;
2542
- o(`calc(100vh - ${s}px)`);
2542
+ const a = l.current.getBoundingClientRect().top;
2543
+ o(`calc(100vh - ${a}px)`);
2543
2544
  }
2544
2545
  };
2545
- return a(), window.addEventListener("resize", a), () => window.removeEventListener("resize", a);
2546
+ return s(), window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
2546
2547
  }, [n]), /* @__PURE__ */ e(
2547
2548
  u,
2548
2549
  {
@@ -2576,13 +2577,13 @@ const cn = te(
2576
2577
  textWrap: "nowrap"
2577
2578
  },
2578
2579
  children: t.map(
2579
- ({ title: o, icon: a, buttonProps: s, onClick: h }, f) => !o && !a ? null : /* @__PURE__ */ e(
2580
- R,
2580
+ ({ title: o, icon: s, buttonProps: a, onClick: h }, f) => !o && !s ? null : /* @__PURE__ */ e(
2581
+ B,
2581
2582
  {
2582
2583
  fullWidth: !l,
2583
- iconLeft: a ? /* @__PURE__ */ e(k, { name: a }) : void 0,
2584
+ iconLeft: s ? /* @__PURE__ */ e(k, { name: s }) : void 0,
2584
2585
  onClick: h,
2585
- ...s,
2586
+ ...a,
2586
2587
  children: o
2587
2588
  },
2588
2589
  `action-${f}`
@@ -2616,7 +2617,7 @@ const cn = te(
2616
2617
  ]
2617
2618
  }
2618
2619
  );
2619
- }, Ur = ({
2620
+ }, _r = ({
2620
2621
  totalData: t,
2621
2622
  withMarginBottom: r = !0,
2622
2623
  withMarginTop: n = !0
@@ -2647,7 +2648,7 @@ const cn = te(
2647
2648
  /* @__PURE__ */ e(me.Body1, { children: t || 0 })
2648
2649
  ]
2649
2650
  }
2650
- ), _r = ({
2651
+ ), Ur = ({
2651
2652
  pagination: t,
2652
2653
  pageKey: r = "page",
2653
2654
  perPageKey: n = "perPage",
@@ -2655,15 +2656,15 @@ const cn = te(
2655
2656
  showPagination: i = !0,
2656
2657
  totalData: o
2657
2658
  }) => {
2658
- const { searchQueries: a, setSearchParams: s, searchParams: h } = at(), f = h.get(n), g = (H) => {
2659
- s({ ...a, [r]: String(H) });
2660
- }, p = (H) => {
2661
- s({
2662
- ...a,
2659
+ const { searchQueries: s, setSearchParams: a, searchParams: h } = at(), f = h.get(n), g = (H) => {
2660
+ a({ ...s, [r]: String(H) });
2661
+ }, y = (H) => {
2662
+ a({
2663
+ ...s,
2663
2664
  [n]: H,
2664
2665
  [r]: "1"
2665
2666
  });
2666
- }, y = (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), b = (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));
2667
+ }, 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), b = (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));
2667
2668
  return /* @__PURE__ */ e(
2668
2669
  u,
2669
2670
  {
@@ -2694,15 +2695,15 @@ const cn = te(
2694
2695
  { label: "100", value: "100" }
2695
2696
  ],
2696
2697
  onChange: (H) => {
2697
- p(H[0].value);
2698
+ y(H[0].value);
2698
2699
  },
2699
2700
  defaultValue: f ? [{ label: `${f} per row`, value: f }] : [{ label: `${l} per row`, value: `${l}` }]
2700
2701
  }
2701
2702
  ),
2702
- /* @__PURE__ */ e(C, { children: `${y}-${b} of ${(t == null ? void 0 : t.totalData) || 0}` })
2703
+ /* @__PURE__ */ e(C, { children: `${p}-${b} of ${(t == null ? void 0 : t.totalData) || 0}` })
2703
2704
  ] }),
2704
2705
  /* @__PURE__ */ e(
2705
- Zt,
2706
+ jt,
2706
2707
  {
2707
2708
  currentPage: t != null && t.currentPage ? Number(t == null ? void 0 : t.currentPage) : 1,
2708
2709
  totalCount: t != null && t.totalPage ? Number(t == null ? void 0 : t.totalPage) : 1,
@@ -2710,7 +2711,7 @@ const cn = te(
2710
2711
  }
2711
2712
  )
2712
2713
  ] }) : /* @__PURE__ */ e(
2713
- Ur,
2714
+ _r,
2714
2715
  {
2715
2716
  totalData: o,
2716
2717
  withMarginBottom: !1,
@@ -2720,29 +2721,29 @@ const cn = te(
2720
2721
  }
2721
2722
  );
2722
2723
  }, Pr = ({ filter: t, columnTitle: r }) => {
2723
- const [n, l] = B(!1), i = le(null), o = le(null), a = le(null), [s, h] = B(""), [f, g] = B({ top: 0, left: 0 }), p = t.selectedValues, y = De(() => s ? t.options.filter(
2724
- (D) => D.label.toLowerCase().includes(s.toLowerCase())
2725
- ) : t.options, [t.options, s]);
2726
- _(() => {
2724
+ const [n, l] = A(!1), i = le(null), o = le(null), s = le(null), [a, h] = A(""), [f, g] = A({ top: 0, left: 0 }), y = t.selectedValues, p = De(() => a ? t.options.filter(
2725
+ (D) => D.label.toLowerCase().includes(a.toLowerCase())
2726
+ ) : t.options, [t.options, a]);
2727
+ U(() => {
2727
2728
  if (n && o.current) {
2728
2729
  const D = o.current.getBoundingClientRect(), I = 280, Z = {
2729
2730
  top: D.bottom + 8
2730
2731
  };
2731
2732
  t.position === "left" || D.left + I > window.innerWidth ? Z.right = window.innerWidth - D.right : Z.left = D.left, g(Z);
2732
2733
  }
2733
- }, [n, t.position]), _(() => {
2734
- n && a.current ? setTimeout(() => {
2734
+ }, [n, t.position]), U(() => {
2735
+ n && s.current ? setTimeout(() => {
2735
2736
  var D;
2736
- return (D = a.current) == null ? void 0 : D.focus();
2737
+ return (D = s.current) == null ? void 0 : D.focus();
2737
2738
  }, 50) : h("");
2738
- }, [n]), _(() => {
2739
+ }, [n]), U(() => {
2739
2740
  const D = (I) => {
2740
2741
  i.current && !i.current.contains(I.target) && o.current && !o.current.contains(I.target) && l(!1);
2741
2742
  };
2742
2743
  return n && document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
2743
2744
  }, [n]);
2744
2745
  const b = (D) => {
2745
- const I = p.includes(D) ? p.filter((Z) => Z !== D) : [...p, D];
2746
+ const I = y.includes(D) ? y.filter((Z) => Z !== D) : [...y, D];
2746
2747
  t.onFilterChange(I);
2747
2748
  }, H = () => t.onFilterChange([]);
2748
2749
  return /* @__PURE__ */ d(u, { style: { position: "relative" }, children: [
@@ -2766,7 +2767,7 @@ const cn = te(
2766
2767
  name: n ? "ChevronUp" : "ChevronDown",
2767
2768
  size: "sm",
2768
2769
  style: {
2769
- color: p.length > 0 ? "var(--sa-color-brand-500, #1a4fa0)" : "var(--sa-text-subtle, #8c8f97)"
2770
+ color: y.length > 0 ? "var(--sa-color-brand-500, #1a4fa0)" : "var(--sa-text-subtle, #8c8f97)"
2770
2771
  }
2771
2772
  }
2772
2773
  )
@@ -2810,7 +2811,7 @@ const cn = te(
2810
2811
  "Filter ",
2811
2812
  r
2812
2813
  ] }),
2813
- p.length > 0 && /* @__PURE__ */ e(u, { style: { cursor: "pointer" }, children: /* @__PURE__ */ e(
2814
+ y.length > 0 && /* @__PURE__ */ e(u, { style: { cursor: "pointer" }, children: /* @__PURE__ */ e(
2814
2815
  C,
2815
2816
  {
2816
2817
  fontSize: "xs",
@@ -2837,10 +2838,10 @@ const cn = te(
2837
2838
  children: /* @__PURE__ */ e(
2838
2839
  ot,
2839
2840
  {
2840
- ref: a,
2841
+ ref: s,
2841
2842
  placeholder: `Search ${r.toLowerCase()}...`,
2842
2843
  leftIcon: /* @__PURE__ */ e(k, { name: "Search", size: "sm" }),
2843
- value: s,
2844
+ value: a,
2844
2845
  onChange: (D) => h(D.target.value),
2845
2846
  style: { fontSize: "14px" }
2846
2847
  }
@@ -2891,7 +2892,7 @@ const cn = te(
2891
2892
  )
2892
2893
  ]
2893
2894
  }
2894
- ) : y.length > 0 ? /* @__PURE__ */ e(u, { style: { gap: "2px", paddingTop: "4px", paddingBottom: "4px" }, children: y.map((D) => /* @__PURE__ */ d(
2895
+ ) : p.length > 0 ? /* @__PURE__ */ e(u, { style: { gap: "2px", paddingTop: "4px", paddingBottom: "4px" }, children: p.map((D) => /* @__PURE__ */ d(
2895
2896
  u,
2896
2897
  {
2897
2898
  style: {
@@ -2906,22 +2907,22 @@ const cn = te(
2906
2907
  cursor: "pointer",
2907
2908
  borderRadius: "8px",
2908
2909
  transition: "all 0.2s ease",
2909
- backgroundColor: p.includes(D.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent"
2910
+ backgroundColor: y.includes(D.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent"
2910
2911
  },
2911
2912
  onClick: (I) => {
2912
2913
  I.stopPropagation(), b(D.value);
2913
2914
  },
2914
2915
  onMouseEnter: (I) => {
2915
- p.includes(D.value) || (I.currentTarget.style.backgroundColor = "var(--sa-background-primary, #ffffff)"), I.currentTarget.style.transform = "translateX(2px)";
2916
+ y.includes(D.value) || (I.currentTarget.style.backgroundColor = "var(--sa-background-primary, #ffffff)"), I.currentTarget.style.transform = "translateX(2px)";
2916
2917
  },
2917
2918
  onMouseLeave: (I) => {
2918
- I.currentTarget.style.backgroundColor = p.includes(D.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent", I.currentTarget.style.transform = "translateX(0)";
2919
+ I.currentTarget.style.backgroundColor = y.includes(D.value) ? "var(--sa-color-brand-50, #e6edf6)" : "transparent", I.currentTarget.style.transform = "translateX(0)";
2919
2920
  },
2920
2921
  children: [
2921
2922
  /* @__PURE__ */ e(
2922
2923
  tt,
2923
2924
  {
2924
- checked: p.includes(D.value),
2925
+ checked: y.includes(D.value),
2925
2926
  onChange: () => {
2926
2927
  }
2927
2928
  }
@@ -2930,8 +2931,8 @@ const cn = te(
2930
2931
  C,
2931
2932
  {
2932
2933
  fontSize: "sm",
2933
- fontWeight: p.includes(D.value) ? "medium" : "normal",
2934
- color: p.includes(D.value) ? "primary" : "gray-700",
2934
+ fontWeight: y.includes(D.value) ? "medium" : "normal",
2935
+ color: y.includes(D.value) ? "primary" : "gray-700",
2935
2936
  children: D.label
2936
2937
  }
2937
2938
  )
@@ -2972,7 +2973,7 @@ const cn = te(
2972
2973
  )
2973
2974
  }
2974
2975
  ),
2975
- p.length > 0 && /* @__PURE__ */ e(
2976
+ y.length > 0 && /* @__PURE__ */ e(
2976
2977
  u,
2977
2978
  {
2978
2979
  style: {
@@ -2996,12 +2997,12 @@ const cn = te(
2996
2997
  fontWeight: 600,
2997
2998
  color: "white"
2998
2999
  },
2999
- children: p.length
3000
+ children: y.length
3000
3001
  }
3001
3002
  ),
3002
3003
  /* @__PURE__ */ d(C, { fontSize: "xs", color: "primary", fontWeight: "medium", children: [
3003
3004
  "item",
3004
- p.length > 1 ? "s" : "",
3005
+ y.length > 1 ? "s" : "",
3005
3006
  " selected"
3006
3007
  ] })
3007
3008
  ] })
@@ -3074,13 +3075,13 @@ const cn = te(
3074
3075
  handleUpdate: l,
3075
3076
  handleDelete: i,
3076
3077
  isLoading: o,
3077
- visibleHandleDelete: a,
3078
- visibleHandleUpdate: s,
3078
+ visibleHandleDelete: s,
3079
+ visibleHandleUpdate: a,
3079
3080
  visibleHandleDetail: h,
3080
3081
  showHeadBorder: f = !1,
3081
3082
  scrollParentRef: g,
3082
- frozenCount: p = 0,
3083
- onFrozenCountChange: y,
3083
+ frozenCount: y = 0,
3084
+ onFrozenCountChange: p,
3084
3085
  customActions: b,
3085
3086
  actionsOrder: H = ["detail", "update", "delete", "custom"],
3086
3087
  customEmptyState: D,
@@ -3091,33 +3092,33 @@ const cn = te(
3091
3092
  sort: M,
3092
3093
  defaultSort: fe,
3093
3094
  onSortChange: G,
3094
- showActionDivider: z = !1
3095
+ showActionDivider: V = !1
3095
3096
  }) => {
3096
- const K = M !== void 0, [oe, ce] = B(
3097
+ const K = M !== void 0, [oe, ce] = A(
3097
3098
  fe ?? null
3098
- ), U = K ? M ?? null : oe, ae = (x) => {
3099
+ ), _ = K ? M ?? null : oe, ae = (x) => {
3099
3100
  if (x.sortKey) return x.sortKey;
3100
3101
  if (typeof x.accessor == "string") return x.accessor;
3101
3102
  }, se = (x) => {
3102
3103
  const w = ae(x);
3103
3104
  if (!w) return;
3104
3105
  let v;
3105
- !U || U.key !== w ? v = { key: w, direction: "asc" } : U.direction === "asc" ? v = { key: w, direction: "desc" } : v = null, K || ce(v), G == null || G(v);
3106
- }, Q = [n, l, i].filter((x) => x !== void 0).length, q = !!b, O = !!n || !!l || !!i || q, V = "var(--sa-border-subtle, #0b120e24)", Y = `1px solid ${V}`, de = `inset 1px 0 0 ${V}`, he = `inset -1px 0 0 ${V}`, Me = Q === 3 ? q ? "178px" : "140px" : Q === 2 ? q ? "140px" : "102px" : Q === 1 ? q ? "112px" : "74px" : q ? "74px" : "", Oe = (x, w) => {
3106
+ !_ || _.key !== w ? v = { key: w, direction: "asc" } : _.direction === "asc" ? v = { key: w, direction: "desc" } : v = null, K || ce(v), G == null || G(v);
3107
+ }, Q = [n, l, i].filter((x) => x !== void 0).length, q = !!b, O = !!n || !!l || !!i || q, z = "var(--sa-border-subtle, #0b120e24)", Y = `1px solid ${z}`, de = `inset 1px 0 0 ${z}`, he = `inset -1px 0 0 ${z}`, Me = Q === 3 ? q ? "178px" : "140px" : Q === 2 ? q ? "140px" : "102px" : Q === 1 ? q ? "112px" : "74px" : q ? "74px" : "", Oe = (x, w) => {
3107
3108
  if (!w) return x;
3108
3109
  if (typeof w == "function") return w(x);
3109
3110
  if (typeof w == "string") return x[w];
3110
- }, [Qe, Ne] = B(!1);
3111
- _(() => {
3111
+ }, [Qe, Ne] = A(!1);
3112
+ U(() => {
3112
3113
  if (!(g != null && g.current)) return;
3113
3114
  const x = g.current;
3114
3115
  Ne(x.scrollHeight > x.clientHeight);
3115
3116
  }, [r, g]);
3116
- const Le = le(null), [ie, Ze] = B([]), [We, Be] = B(
3117
+ const Le = le(null), [ie, Ze] = A([]), [We, Be] = A(
3117
3118
  () => Z ?? {}
3118
3119
  ), ke = le(null);
3119
3120
  rt(() => {
3120
- if (!p || !Le.current) {
3121
+ if (!y || !Le.current) {
3121
3122
  Ze([]);
3122
3123
  return;
3123
3124
  }
@@ -3125,12 +3126,12 @@ const cn = te(
3125
3126
  Le.current.querySelectorAll("thead tr th")
3126
3127
  ), w = [];
3127
3128
  let v = 0;
3128
- x.forEach((L, A) => {
3129
- w[A] = v, A < p && (v += L.offsetWidth);
3129
+ x.forEach((L, R) => {
3130
+ w[R] = v, R < y && (v += L.offsetWidth);
3130
3131
  }), Ze(w);
3131
- }, [p, t, r, We]);
3132
+ }, [y, t, r, We]);
3132
3133
  const je = (x) => {
3133
- y && y(x < p ? x : x + 1);
3134
+ p && p(x < y ? x : x + 1);
3134
3135
  }, m = (x, w) => {
3135
3136
  const v = We[x];
3136
3137
  if (v !== void 0) {
@@ -3144,24 +3145,24 @@ const cn = te(
3144
3145
  if (!v) return;
3145
3146
  const L = Math.round(v.getBoundingClientRect().width);
3146
3147
  ke.current = { colIndex: w, startX: x.clientX, startWidth: L };
3147
- const A = document.body.style.userSelect, ne = document.body.style.cursor;
3148
+ const R = document.body.style.userSelect, ne = document.body.style.cursor;
3148
3149
  document.body.style.userSelect = "none", document.body.style.cursor = "col-resize";
3149
- const pe = (xe) => {
3150
+ const ye = (xe) => {
3150
3151
  var Fe;
3151
- const ye = ke.current;
3152
- if (!ye) return;
3153
- const $e = ((Fe = t[ye.colIndex]) == null ? void 0 : Fe.minWidth) ?? J, Ae = Math.max($e, ye.startWidth + (xe.clientX - ye.startX));
3152
+ const pe = ke.current;
3153
+ if (!pe) return;
3154
+ const $e = ((Fe = t[pe.colIndex]) == null ? void 0 : Fe.minWidth) ?? J, Ae = Math.max($e, pe.startWidth + (xe.clientX - pe.startX));
3154
3155
  Be(
3155
- (Ye) => Ye[ye.colIndex] === Ae ? Ye : { ...Ye, [ye.colIndex]: Ae }
3156
+ (Ye) => Ye[pe.colIndex] === Ae ? Ye : { ...Ye, [pe.colIndex]: Ae }
3156
3157
  );
3157
3158
  }, be = () => {
3158
- document.removeEventListener("mousemove", pe), document.removeEventListener("mouseup", be), document.body.style.userSelect = A, document.body.style.cursor = ne, ke.current = null, j && Be((xe) => (j(xe), xe));
3159
+ document.removeEventListener("mousemove", ye), document.removeEventListener("mouseup", be), document.body.style.userSelect = R, document.body.style.cursor = ne, ke.current = null, j && Be((xe) => (j(xe), xe));
3159
3160
  };
3160
- document.addEventListener("mousemove", pe), document.addEventListener("mouseup", be);
3161
+ document.addEventListener("mousemove", ye), document.addEventListener("mouseup", be);
3161
3162
  };
3162
3163
  return /* @__PURE__ */ e("div", { ref: Le, children: /* @__PURE__ */ d(wt, { fullWidth: !0, children: [
3163
3164
  /* @__PURE__ */ e(
3164
- jt,
3165
+ $t,
3165
3166
  {
3166
3167
  style: {
3167
3168
  height: "40px",
@@ -3170,7 +3171,7 @@ const cn = te(
3170
3171
  children: /* @__PURE__ */ d(He, { children: [
3171
3172
  t.map((x, w) => {
3172
3173
  var $e, Ae;
3173
- const v = p > 0 && w < p, L = ie[w] ?? 0, A = F(x), pe = w === t.length - 1 && O && z, be = ae(x), xe = !!x.sortable && !!be, ye = xe && (U == null ? void 0 : U.key) === be ? U.direction : null;
3174
+ const v = y > 0 && w < y, L = ie[w] ?? 0, R = F(x), ye = w === t.length - 1 && O && V, be = ae(x), xe = !!x.sortable && !!be, pe = xe && (_ == null ? void 0 : _.key) === be ? _.direction : null;
3174
3175
  return /* @__PURE__ */ d(
3175
3176
  dt,
3176
3177
  {
@@ -3180,7 +3181,7 @@ const cn = te(
3180
3181
  left: v ? L : void 0,
3181
3182
  zIndex: v ? 4 : 2,
3182
3183
  paddingLeft: w === 0 ? "12px" : "",
3183
- borderRight: f && !pe && !v ? Y : void 0,
3184
+ borderRight: f && !ye && !v ? Y : void 0,
3184
3185
  borderBottom: f ? Y : void 0,
3185
3186
  boxShadow: f && v ? he : void 0,
3186
3187
  backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
@@ -3204,7 +3205,7 @@ const cn = te(
3204
3205
  {
3205
3206
  type: "button",
3206
3207
  onClick: () => se(x),
3207
- title: ye === "asc" ? "Sorted ascending — click to sort descending" : ye === "desc" ? "Sorted descending — click to clear" : "Click to sort ascending",
3208
+ title: pe === "asc" ? "Sorted ascending — click to sort descending" : pe === "desc" ? "Sorted descending — click to clear" : "Click to sort ascending",
3208
3209
  style: {
3209
3210
  flex: 1,
3210
3211
  minWidth: 0,
@@ -3234,7 +3235,7 @@ const cn = te(
3234
3235
  children: x.title || (($e = x.accessor) == null ? void 0 : $e.toString())
3235
3236
  }
3236
3237
  ),
3237
- /* @__PURE__ */ e(qr, { direction: ye })
3238
+ /* @__PURE__ */ e(qr, { direction: pe })
3238
3239
  ]
3239
3240
  }
3240
3241
  ) : /* @__PURE__ */ e(
@@ -3257,7 +3258,7 @@ const cn = te(
3257
3258
  columnTitle: x.title
3258
3259
  }
3259
3260
  ),
3260
- y && /* @__PURE__ */ e(
3261
+ p && /* @__PURE__ */ e(
3261
3262
  "button",
3262
3263
  {
3263
3264
  onClick: () => je(w),
@@ -3280,7 +3281,7 @@ const cn = te(
3280
3281
  ]
3281
3282
  }
3282
3283
  ),
3283
- A && /* @__PURE__ */ e(
3284
+ R && /* @__PURE__ */ e(
3284
3285
  "div",
3285
3286
  {
3286
3287
  onMouseDown: (Fe) => S(Fe, w),
@@ -3316,14 +3317,14 @@ const cn = te(
3316
3317
  right: 0,
3317
3318
  zIndex: 3,
3318
3319
  borderBottom: f ? Y : void 0,
3319
- boxShadow: f && z ? de : void 0
3320
+ boxShadow: f && V ? de : void 0
3320
3321
  }
3321
3322
  }
3322
3323
  ) : null
3323
3324
  ] })
3324
3325
  }
3325
3326
  ),
3326
- /* @__PURE__ */ e($t, { children: o ? /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(we, { colSpan: t.length + 1, children: /* @__PURE__ */ d(u, { style: { gap: "16px" }, children: [
3327
+ /* @__PURE__ */ e(_t, { children: o ? /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(we, { colSpan: t.length + 1, children: /* @__PURE__ */ d(u, { style: { gap: "16px" }, children: [
3327
3328
  /* @__PURE__ */ e(Re, { variant: "list" }),
3328
3329
  /* @__PURE__ */ e(Re, { variant: "list" }),
3329
3330
  /* @__PURE__ */ e(Re, { variant: "list" }),
@@ -3339,25 +3340,25 @@ const cn = te(
3339
3340
  },
3340
3341
  onMouseEnter: (v) => {
3341
3342
  const L = v.currentTarget;
3342
- L.style.backgroundColor = xt, Array.from(L.querySelectorAll("td")).forEach((A) => {
3343
- A.style.position === "sticky" && (A.style.backgroundColor = xt);
3343
+ L.style.backgroundColor = xt, Array.from(L.querySelectorAll("td")).forEach((R) => {
3344
+ R.style.position === "sticky" && (R.style.backgroundColor = xt);
3344
3345
  });
3345
3346
  },
3346
3347
  onMouseLeave: (v) => {
3347
3348
  const L = v.currentTarget;
3348
- L.style.backgroundColor = "", Array.from(L.querySelectorAll("td")).forEach((A) => {
3349
- A.style.position === "sticky" && (A.style.backgroundColor = et);
3349
+ L.style.backgroundColor = "", Array.from(L.querySelectorAll("td")).forEach((R) => {
3350
+ R.style.position === "sticky" && (R.style.backgroundColor = et);
3350
3351
  });
3351
3352
  },
3352
3353
  children: [
3353
3354
  t.map((v, L) => {
3354
- const A = v.render ? v.render(x, w, r) : Oe(x, v.accessor), ne = p > 0 && L < p, pe = ie[L] ?? 0, be = We[L] !== void 0, xe = ne && L === p - 1;
3355
+ const R = v.render ? v.render(x, w, r) : Oe(x, v.accessor), ne = y > 0 && L < y, ye = ie[L] ?? 0, be = We[L] !== void 0, xe = ne && L === y - 1;
3355
3356
  return /* @__PURE__ */ e(
3356
3357
  we,
3357
3358
  {
3358
3359
  style: {
3359
3360
  position: ne ? "sticky" : void 0,
3360
- left: ne ? pe : void 0,
3361
+ left: ne ? ye : void 0,
3361
3362
  zIndex: ne ? 1 : void 0,
3362
3363
  backgroundColor: ne ? et : void 0,
3363
3364
  transition: ne ? "background-color 0.3s ease" : void 0,
@@ -3370,7 +3371,7 @@ const cn = te(
3370
3371
  textAlign: v.textAlign === "text-right" ? "right" : v.textAlign === "text-center" ? "center" : "left",
3371
3372
  ...m(L, v.width)
3372
3373
  },
3373
- children: typeof A == "string" ? /* @__PURE__ */ e(
3374
+ children: typeof R == "string" ? /* @__PURE__ */ e(
3374
3375
  C,
3375
3376
  {
3376
3377
  style: {
@@ -3379,9 +3380,9 @@ const cn = te(
3379
3380
  textOverflow: "ellipsis",
3380
3381
  textAlign: v.textAlign === "text-right" ? "right" : v.textAlign === "text-center" ? "center" : "left"
3381
3382
  },
3382
- children: A
3383
+ children: R
3383
3384
  }
3384
- ) : A
3385
+ ) : R
3385
3386
  },
3386
3387
  `row-${w}-col-${L}`
3387
3388
  );
@@ -3392,12 +3393,12 @@ const cn = te(
3392
3393
  right: 0,
3393
3394
  zIndex: 1,
3394
3395
  backgroundColor: et,
3395
- boxShadow: z ? de : void 0,
3396
+ boxShadow: V ? de : void 0,
3396
3397
  transition: "background-color 0.3s ease"
3397
3398
  }, children: /* @__PURE__ */ e($, { direction: "row", align: "center", justify: "center", gap: "sm", children: H.map((v) => {
3398
3399
  const L = w === r.length - 1 ? "top" : "bottom";
3399
3400
  return v === "detail" && n && (h == null ? void 0 : h(x)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Detail", position: L, children: /* @__PURE__ */ e(
3400
- R,
3401
+ B,
3401
3402
  {
3402
3403
  size: "xs",
3403
3404
  variant: "outline",
@@ -3405,8 +3406,8 @@ const cn = te(
3405
3406
  onClick: () => n(x.id, x),
3406
3407
  iconLeft: /* @__PURE__ */ e(k, { name: "DocumentClean", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
3407
3408
  }
3408
- ) }, "detail") : v === "update" && l && (s == null ? void 0 : s(x)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Update", position: L, children: /* @__PURE__ */ e(
3409
- R,
3409
+ ) }, "detail") : v === "update" && l && (a == null ? void 0 : a(x)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Update", position: L, children: /* @__PURE__ */ e(
3410
+ B,
3410
3411
  {
3411
3412
  size: "xs",
3412
3413
  variant: "outline",
@@ -3414,8 +3415,8 @@ const cn = te(
3414
3415
  onClick: () => l(x),
3415
3416
  iconLeft: /* @__PURE__ */ e(k, { name: "Edit1", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
3416
3417
  }
3417
- ) }, "update") : v === "delete" && i && (a == null ? void 0 : a(x)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Delete", position: L, children: /* @__PURE__ */ e(
3418
- R,
3418
+ ) }, "update") : v === "delete" && i && (s == null ? void 0 : s(x)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Delete", position: L, children: /* @__PURE__ */ e(
3419
+ B,
3419
3420
  {
3420
3421
  size: "xs",
3421
3422
  variant: "outline",
@@ -3423,7 +3424,7 @@ const cn = te(
3423
3424
  onClick: () => i(x.id, x),
3424
3425
  iconLeft: /* @__PURE__ */ e(k, { name: "Trash1", size: "sm", style: { color: "var(--sa-color-error-600, #c9184a)" } })
3425
3426
  }
3426
- ) }, "delete") : v === "custom" ? /* @__PURE__ */ e(Gt.Fragment, { children: b == null ? void 0 : b(x) }, "custom") : null;
3427
+ ) }, "delete") : v === "custom" ? /* @__PURE__ */ e(Ft.Fragment, { children: b == null ? void 0 : b(x) }, "custom") : null;
3427
3428
  }) }) }) : null
3428
3429
  ]
3429
3430
  },
@@ -3436,14 +3437,14 @@ const cn = te(
3436
3437
  headerProps: n,
3437
3438
  footerProps: l
3438
3439
  }) => {
3439
- var p;
3440
- const i = le(null), [o, a] = B(
3440
+ var y;
3441
+ const i = le(null), [o, s] = A(
3441
3442
  (r == null ? void 0 : r.defaultFrozenCount) ?? 0
3442
- ), s = (n == null ? void 0 : n.show) ?? !0, h = le(null), f = (p = r == null ? void 0 : r.pagination) == null ? void 0 : p.totalData;
3443
+ ), a = (n == null ? void 0 : n.show) ?? !0, h = le(null), f = (y = r == null ? void 0 : r.pagination) == null ? void 0 : y.totalData;
3443
3444
  typeof f == "number" && (h.current = f);
3444
3445
  const g = (l == null ? void 0 : l.showFooter) ?? (f === void 0 ? h.current !== 0 : f !== 0);
3445
3446
  return /* @__PURE__ */ d(jr, { ...t, children: [
3446
- s && /* @__PURE__ */ e($r, { ...n }),
3447
+ a && /* @__PURE__ */ e($r, { ...n }),
3447
3448
  /* @__PURE__ */ e(
3448
3449
  u,
3449
3450
  {
@@ -3459,13 +3460,13 @@ const cn = te(
3459
3460
  ...r,
3460
3461
  scrollParentRef: i,
3461
3462
  frozenCount: r != null && r.enableFreezeColumns ? o : 0,
3462
- onFrozenCountChange: r != null && r.enableFreezeColumns ? a : void 0
3463
+ onFrozenCountChange: r != null && r.enableFreezeColumns ? s : void 0
3463
3464
  }
3464
3465
  ) : null
3465
3466
  }
3466
3467
  ),
3467
3468
  g && /* @__PURE__ */ e(
3468
- _r,
3469
+ Ur,
3469
3470
  {
3470
3471
  pagination: r == null ? void 0 : r.pagination,
3471
3472
  pageKey: r == null ? void 0 : r.pageKey,
@@ -3508,8 +3509,8 @@ const xn = Yr(Qr), st = ({
3508
3509
  fullWidth: l = !1,
3509
3510
  ...i
3510
3511
  }) => {
3511
- var s, h, f;
3512
- const o = i.hideMessageError || !1, a = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
3512
+ var a, h, f;
3513
+ const o = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
3513
3514
  return /* @__PURE__ */ d(
3514
3515
  u,
3515
3516
  {
@@ -3525,7 +3526,7 @@ const xn = Yr(Qr), st = ({
3525
3526
  u,
3526
3527
  {
3527
3528
  direction: "column",
3528
- customMaxWidth: a,
3529
+ customMaxWidth: s,
3529
3530
  fullWidth: l,
3530
3531
  children: [
3531
3532
  /* @__PURE__ */ e(N, { children: i.title }),
@@ -3537,13 +3538,13 @@ const xn = Yr(Qr), st = ({
3537
3538
  u,
3538
3539
  {
3539
3540
  direction: "column",
3540
- customMaxWidth: a,
3541
+ customMaxWidth: s,
3541
3542
  fullWidth: l,
3542
3543
  children: [
3543
3544
  /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
3544
3545
  /* @__PURE__ */ e(N, { fontSize: t, children: i.title }),
3545
3546
  /* @__PURE__ */ e(N, { color: "error", fontSize: t, children: n }),
3546
- /* @__PURE__ */ e(T, { condition: !!((s = i.tooltip) != null && s.label), children: /* @__PURE__ */ e(
3547
+ /* @__PURE__ */ e(T, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
3547
3548
  ue,
3548
3549
  {
3549
3550
  label: (h = i.tooltip) == null ? void 0 : h.label,
@@ -3593,8 +3594,8 @@ const xn = Yr(Qr), st = ({
3593
3594
  fullWidth: l = !1,
3594
3595
  ...i
3595
3596
  }) => {
3596
- var s, h, f;
3597
- const o = i.hideMessageError || !1, a = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
3597
+ var a, h, f;
3598
+ const o = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
3598
3599
  return /* @__PURE__ */ d(
3599
3600
  u,
3600
3601
  {
@@ -3610,7 +3611,7 @@ const xn = Yr(Qr), st = ({
3610
3611
  u,
3611
3612
  {
3612
3613
  direction: "column",
3613
- customMaxWidth: a,
3614
+ customMaxWidth: s,
3614
3615
  fullWidth: l,
3615
3616
  children: [
3616
3617
  /* @__PURE__ */ e(N, { children: i.title }),
@@ -3622,13 +3623,13 @@ const xn = Yr(Qr), st = ({
3622
3623
  u,
3623
3624
  {
3624
3625
  direction: "column",
3625
- customMaxWidth: a,
3626
+ customMaxWidth: s,
3626
3627
  fullWidth: l,
3627
3628
  children: [
3628
3629
  /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
3629
3630
  /* @__PURE__ */ e(N, { fontSize: t, children: i.title }),
3630
3631
  /* @__PURE__ */ e(N, { color: "error", fontSize: t, children: n }),
3631
- /* @__PURE__ */ e(T, { condition: !!((s = i.tooltip) != null && s.label), children: /* @__PURE__ */ e(
3632
+ /* @__PURE__ */ e(T, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
3632
3633
  ue,
3633
3634
  {
3634
3635
  label: (h = i.tooltip) == null ? void 0 : h.label,
@@ -3678,14 +3679,14 @@ const xn = Yr(Qr), st = ({
3678
3679
  }
3679
3680
  );
3680
3681
  }, ei = (t, r) => typeof t == "string" && t || r === "error" ? "var(--sa-text-error, #a4133c)" : "var(--sa-text-disable, #181a198f)", ti = (t) => {
3681
- var s;
3682
- const [r, n] = B(!1), l = (h) => {
3682
+ var a;
3683
+ const [r, n] = A(!1), l = (h) => {
3683
3684
  h.preventDefault(), h.stopPropagation();
3684
3685
  }, i = (h) => {
3685
3686
  h.preventDefault(), h.stopPropagation(), h.dataTransfer && t.handleOnFileChange(h.dataTransfer.files.item(0));
3686
3687
  }, o = (h) => {
3687
3688
  h.preventDefault(), n(!0);
3688
- }, a = (h) => {
3689
+ }, s = (h) => {
3689
3690
  h.preventDefault(), n(!1);
3690
3691
  };
3691
3692
  return /* @__PURE__ */ d(
@@ -3700,7 +3701,7 @@ const xn = Yr(Qr), st = ({
3700
3701
  onDragOver: l,
3701
3702
  onDrop: i,
3702
3703
  onDragEnter: o,
3703
- onDragLeave: a,
3704
+ onDragLeave: s,
3704
3705
  paddingBlock: "md",
3705
3706
  borderRadius: "rounded-md",
3706
3707
  style: {
@@ -3740,7 +3741,7 @@ const xn = Yr(Qr), st = ({
3740
3741
  }
3741
3742
  )
3742
3743
  ] }),
3743
- /* @__PURE__ */ e(C, { fontSize: "sm", color: "gray-500", children: (s = t.fileSupports) == null ? void 0 : s.map((h) => h.toLocaleUpperCase()).join(", ") })
3744
+ /* @__PURE__ */ e(C, { fontSize: "sm", color: "gray-500", children: (a = t.fileSupports) == null ? void 0 : a.map((h) => h.toLocaleUpperCase()).join(", ") })
3744
3745
  ] })
3745
3746
  ]
3746
3747
  }
@@ -3876,7 +3877,7 @@ const Wn = (t) => {
3876
3877
  function Hn(t) {
3877
3878
  return !(li.test(t) || oi.test(t));
3878
3879
  }
3879
- const zn = (t) => {
3880
+ const Vn = (t) => {
3880
3881
  const r = [
3881
3882
  "ArrowLeft",
3882
3883
  "ArrowRight",
@@ -3893,7 +3894,7 @@ const zn = (t) => {
3893
3894
  return;
3894
3895
  const n = t.currentTarget.value;
3895
3896
  /^[0-9]$/.test(t.key) || t.key === "." && !n.includes(".") || t.key === "-" && n.length === 0 && !n.includes("-") || r.includes(t.key) || t.preventDefault();
3896
- }, Vn = (t) => {
3897
+ }, zn = (t) => {
3897
3898
  const r = document.getElementById(t);
3898
3899
  if (r) {
3899
3900
  const n = r.getBoundingClientRect(), l = window.scrollY + n.top - 80;
@@ -3984,7 +3985,7 @@ const si = (t) => {
3984
3985
  ] })
3985
3986
  ] }),
3986
3987
  /* @__PURE__ */ e(
3987
- R,
3988
+ B,
3988
3989
  {
3989
3990
  size: "xs",
3990
3991
  secondary: !0,
@@ -4022,11 +4023,11 @@ const si = (t) => {
4022
4023
  type: "file",
4023
4024
  style: { display: "none" },
4024
4025
  ref: n,
4025
- onChange: (a) => {
4026
- var s;
4027
- return r.handleOnChangeFile(((s = a.target.files) == null ? void 0 : s.item(0)) || null);
4026
+ onChange: (s) => {
4027
+ var a;
4028
+ return r.handleOnChangeFile(((a = s.target.files) == null ? void 0 : a.item(0)) || null);
4028
4029
  },
4029
- accept: (o = r.fileSupportOption) == null ? void 0 : o.map((a) => "." + (a == null ? void 0 : a.toLowerCase())).join(", ")
4030
+ accept: (o = r.fileSupportOption) == null ? void 0 : o.map((s) => "." + (s == null ? void 0 : s.toLowerCase())).join(", ")
4030
4031
  }
4031
4032
  ),
4032
4033
  /* @__PURE__ */ d(
@@ -4075,8 +4076,8 @@ const si = (t) => {
4075
4076
  fullWidth: l = !1,
4076
4077
  ...i
4077
4078
  }) => {
4078
- var s, h, f;
4079
- const o = i.hideMessageError || !1, a = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4079
+ var a, h, f;
4080
+ const o = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4080
4081
  return /* @__PURE__ */ d(
4081
4082
  u,
4082
4083
  {
@@ -4092,7 +4093,7 @@ const si = (t) => {
4092
4093
  u,
4093
4094
  {
4094
4095
  direction: "column",
4095
- customMaxWidth: a,
4096
+ customMaxWidth: s,
4096
4097
  fullWidth: l,
4097
4098
  children: [
4098
4099
  /* @__PURE__ */ e(N, { children: i.title }),
@@ -4104,13 +4105,13 @@ const si = (t) => {
4104
4105
  u,
4105
4106
  {
4106
4107
  direction: "column",
4107
- customMaxWidth: a,
4108
+ customMaxWidth: s,
4108
4109
  fullWidth: l,
4109
4110
  children: [
4110
4111
  /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
4111
4112
  /* @__PURE__ */ e(N, { fontSize: t, children: i.title }),
4112
4113
  /* @__PURE__ */ e(N, { color: "error", fontSize: t, children: n }),
4113
- /* @__PURE__ */ e(T, { condition: !!((s = i.tooltip) != null && s.label), children: /* @__PURE__ */ e(
4114
+ /* @__PURE__ */ e(T, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4114
4115
  ue,
4115
4116
  {
4116
4117
  label: (h = i.tooltip) == null ? void 0 : h.label,
@@ -4157,8 +4158,8 @@ const si = (t) => {
4157
4158
  required: i = !1,
4158
4159
  ...o
4159
4160
  }) => {
4160
- var h, f, g, p;
4161
- const a = o.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4161
+ var h, f, g, y;
4162
+ const s = o.hideMessageError || !1, a = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4162
4163
  return /* @__PURE__ */ d(
4163
4164
  u,
4164
4165
  {
@@ -4174,7 +4175,7 @@ const si = (t) => {
4174
4175
  u,
4175
4176
  {
4176
4177
  direction: "column",
4177
- customMaxWidth: s,
4178
+ customMaxWidth: a,
4178
4179
  fullWidth: l,
4179
4180
  children: [
4180
4181
  /* @__PURE__ */ e(N, { children: o.title }),
@@ -4186,7 +4187,7 @@ const si = (t) => {
4186
4187
  u,
4187
4188
  {
4188
4189
  direction: "column",
4189
- customMaxWidth: s,
4190
+ customMaxWidth: a,
4190
4191
  fullWidth: l,
4191
4192
  children: [
4192
4193
  /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
@@ -4227,11 +4228,11 @@ const si = (t) => {
4227
4228
  children: /* @__PURE__ */ e(
4228
4229
  st,
4229
4230
  {
4230
- of: (p = o.checkBoxesList) == null ? void 0 : p.map((y) => ({
4231
- ...y,
4232
- isChecked: o.checkBoxesAreChecked.includes(y.id)
4231
+ of: (y = o.checkBoxesList) == null ? void 0 : y.map((p) => ({
4232
+ ...p,
4233
+ isChecked: o.checkBoxesAreChecked.includes(p.id)
4233
4234
  })),
4234
- render: (y) => y.renderBadge ? /* @__PURE__ */ d(
4235
+ render: (p) => p.renderBadge ? /* @__PURE__ */ d(
4235
4236
  u,
4236
4237
  {
4237
4238
  direction: "row",
@@ -4242,33 +4243,33 @@ const si = (t) => {
4242
4243
  /* @__PURE__ */ e(
4243
4244
  tt,
4244
4245
  {
4245
- name: y.name,
4246
- value: y.id,
4247
- checked: y.isChecked,
4248
- onChange: (b) => o.onChecked(b.target.value, y),
4249
- label: y.name,
4250
- description: y.description
4246
+ name: p.name,
4247
+ value: p.id,
4248
+ checked: p.isChecked,
4249
+ onChange: (b) => o.onChecked(b.target.value, p),
4250
+ label: p.name,
4251
+ description: p.description
4251
4252
  }
4252
4253
  ),
4253
- y.renderBadge
4254
+ p.renderBadge
4254
4255
  ]
4255
4256
  }
4256
4257
  ) : /* @__PURE__ */ e(
4257
4258
  tt,
4258
4259
  {
4259
- name: y.name,
4260
- value: y.id,
4261
- checked: y.isChecked,
4262
- onChange: (b) => o.onChecked(b.target.value, y),
4263
- label: y.name,
4264
- description: y.description
4260
+ name: p.name,
4261
+ value: p.id,
4262
+ checked: p.isChecked,
4263
+ onChange: (b) => o.onChecked(b.target.value, p),
4264
+ label: p.name,
4265
+ description: p.description
4265
4266
  }
4266
4267
  )
4267
4268
  }
4268
4269
  )
4269
4270
  }
4270
4271
  ),
4271
- !a && o.errorMessage && /* @__PURE__ */ e(Ce, { message: o.errorMessage })
4272
+ !s && o.errorMessage && /* @__PURE__ */ e(Ce, { message: o.errorMessage })
4272
4273
  ]
4273
4274
  }
4274
4275
  );
@@ -4308,36 +4309,36 @@ const si = (t) => {
4308
4309
  children: /* @__PURE__ */ e(
4309
4310
  st,
4310
4311
  {
4311
- of: (o = l.radioList) == null ? void 0 : o.map((a) => ({
4312
- ...a,
4313
- isChecked: l.radioIsChecked === a.id
4312
+ of: (o = l.radioList) == null ? void 0 : o.map((s) => ({
4313
+ ...s,
4314
+ isChecked: l.radioIsChecked === s.id
4314
4315
  })),
4315
- render: ({ value: a, id: s, isChecked: h, subInput: f, label: g, description: p }) => /* @__PURE__ */ d(u, { gap: "xs", customMaxWidth: i, children: [
4316
+ render: ({ value: s, id: a, isChecked: h, subInput: f, label: g, description: y }) => /* @__PURE__ */ d(u, { gap: "xs", customMaxWidth: i, children: [
4316
4317
  /* @__PURE__ */ e(
4317
- Jt,
4318
+ Gt,
4318
4319
  {
4319
- id: `${s.toString()}-${a}`,
4320
+ id: `${a.toString()}-${s}`,
4320
4321
  name: l.groupName || g,
4321
4322
  label: g,
4322
- value: a,
4323
+ value: s,
4323
4324
  checked: h,
4324
- onChange: (y) => l.onChecked({
4325
- id: s,
4326
- label: y.target.name,
4327
- value: y.target.value
4325
+ onChange: (p) => l.onChecked({
4326
+ id: a,
4327
+ label: p.target.name,
4328
+ value: p.target.value
4328
4329
  }),
4329
4330
  disabled: l.disableAll
4330
4331
  },
4331
- s
4332
+ a
4332
4333
  ),
4333
- p && /* @__PURE__ */ e(
4334
+ y && /* @__PURE__ */ e(
4334
4335
  C,
4335
4336
  {
4336
4337
  color: "gray-500",
4337
4338
  style: {
4338
4339
  marginLeft: 28
4339
4340
  },
4340
- children: p
4341
+ children: y
4341
4342
  }
4342
4343
  ),
4343
4344
  f
@@ -4357,8 +4358,8 @@ const si = (t) => {
4357
4358
  fullWidth: l = !1,
4358
4359
  ...i
4359
4360
  }) => {
4360
- var s, h, f;
4361
- const o = i.hideMessageError || !1, a = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4361
+ var a, h, f;
4362
+ const o = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4362
4363
  return /* @__PURE__ */ d(
4363
4364
  u,
4364
4365
  {
@@ -4374,7 +4375,7 @@ const si = (t) => {
4374
4375
  u,
4375
4376
  {
4376
4377
  direction: "column",
4377
- customMaxWidth: a,
4378
+ customMaxWidth: s,
4378
4379
  fullWidth: l,
4379
4380
  children: [
4380
4381
  /* @__PURE__ */ e(N, { children: i.title }),
@@ -4386,13 +4387,13 @@ const si = (t) => {
4386
4387
  u,
4387
4388
  {
4388
4389
  direction: "column",
4389
- customMaxWidth: a,
4390
+ customMaxWidth: s,
4390
4391
  fullWidth: l,
4391
4392
  children: [
4392
4393
  /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
4393
4394
  /* @__PURE__ */ e(N, { fontSize: t, children: i.title }),
4394
4395
  /* @__PURE__ */ e(N, { color: "error", fontSize: t, children: n }),
4395
- /* @__PURE__ */ e(T, { condition: !!((s = i.tooltip) != null && s.label), children: /* @__PURE__ */ e(
4396
+ /* @__PURE__ */ e(T, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4396
4397
  ue,
4397
4398
  {
4398
4399
  label: (h = i.tooltip) == null ? void 0 : h.label,
@@ -4441,8 +4442,8 @@ const si = (t) => {
4441
4442
  fullWidth: i = !1,
4442
4443
  ...o
4443
4444
  }) => {
4444
- var s, h, f;
4445
- const a = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4445
+ var a, h, f;
4446
+ const s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4446
4447
  return /* @__PURE__ */ d(
4447
4448
  u,
4448
4449
  {
@@ -4458,7 +4459,7 @@ const si = (t) => {
4458
4459
  u,
4459
4460
  {
4460
4461
  direction: "column",
4461
- customMaxWidth: a,
4462
+ customMaxWidth: s,
4462
4463
  fullWidth: i,
4463
4464
  children: [
4464
4465
  /* @__PURE__ */ e(N, { children: o.title }),
@@ -4470,13 +4471,13 @@ const si = (t) => {
4470
4471
  u,
4471
4472
  {
4472
4473
  direction: "column",
4473
- customMaxWidth: a,
4474
+ customMaxWidth: s,
4474
4475
  fullWidth: i,
4475
4476
  children: [
4476
4477
  /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
4477
4478
  /* @__PURE__ */ e(N, { fontSize: t, children: o.title }),
4478
4479
  /* @__PURE__ */ e(N, { color: "error", fontSize: t, children: n }),
4479
- /* @__PURE__ */ e(T, { condition: !!((s = o.tooltip) != null && s.label), children: /* @__PURE__ */ e(
4480
+ /* @__PURE__ */ e(T, { condition: !!((a = o.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4480
4481
  ue,
4481
4482
  {
4482
4483
  label: (h = o.tooltip) == null ? void 0 : h.label,
@@ -4515,37 +4516,37 @@ const si = (t) => {
4515
4516
  ]
4516
4517
  }
4517
4518
  );
4518
- }, pi = ({
4519
+ }, yi = ({
4519
4520
  variant: t = "primary",
4520
4521
  size: r = "md",
4521
4522
  ...n
4522
4523
  }) => {
4523
- const l = qt(), i = (a) => {
4524
- var h, f, g, p, y, b;
4525
- if (!a) return;
4526
- const s = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (f = (h = l == null ? void 0 : l.computed) == null ? void 0 : h.red) == null ? void 0 : f[600] : t === "secondary-primary" ? (p = (g = l == null ? void 0 : l.computed) == null ? void 0 : g.blue) == null ? void 0 : p[700] : (b = (y = l == null ? void 0 : l.computed) == null ? void 0 : y.gray) == null ? void 0 : b[50];
4527
- return /* @__PURE__ */ e(k, { name: a, size: r, style: { color: s } });
4524
+ const l = Jt(), i = (s) => {
4525
+ var h, f, g, y, p, b;
4526
+ if (!s) return;
4527
+ const a = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (f = (h = l == null ? void 0 : l.computed) == null ? void 0 : h.red) == null ? void 0 : f[600] : t === "secondary-primary" ? (y = (g = l == null ? void 0 : l.computed) == null ? void 0 : g.blue) == null ? void 0 : y[700] : (b = (p = l == null ? void 0 : l.computed) == null ? void 0 : p.gray) == null ? void 0 : b[50];
4528
+ return /* @__PURE__ */ e(k, { name: s, size: r, style: { color: a } });
4528
4529
  }, o = () => {
4529
- var s, h, f, g;
4530
+ var a, h, f, g;
4530
4531
  if (t !== "secondary-danger" && t !== "secondary-primary")
4531
4532
  return n.title;
4532
- const a = {
4533
- color: n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary-danger" ? (h = (s = l == null ? void 0 : l.computed) == null ? void 0 : s.red) == null ? void 0 : h[600] : (g = (f = l == null ? void 0 : l.computed) == null ? void 0 : f.blue) == null ? void 0 : g[700]
4533
+ const s = {
4534
+ color: n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary-danger" ? (h = (a = l == null ? void 0 : l.computed) == null ? void 0 : a.red) == null ? void 0 : h[600] : (g = (f = l == null ? void 0 : l.computed) == null ? void 0 : f.blue) == null ? void 0 : g[700]
4534
4535
  };
4535
4536
  switch (r) {
4536
4537
  case "xs":
4537
- return /* @__PURE__ */ e(me.Body2, { props: { style: a }, children: n.title });
4538
+ return /* @__PURE__ */ e(me.Body2, { props: { style: s }, children: n.title });
4538
4539
  case "sm":
4539
4540
  case "md":
4540
- return /* @__PURE__ */ e(me.SubH3, { props: { style: a }, children: n.title });
4541
+ return /* @__PURE__ */ e(me.SubH3, { props: { style: s }, children: n.title });
4541
4542
  case "lg":
4542
- return /* @__PURE__ */ e(me.SubH2, { props: { style: a }, children: n.title });
4543
+ return /* @__PURE__ */ e(me.SubH2, { props: { style: s }, children: n.title });
4543
4544
  default:
4544
4545
  return n.title;
4545
4546
  }
4546
4547
  };
4547
4548
  return /* @__PURE__ */ e(
4548
- R,
4549
+ B,
4549
4550
  {
4550
4551
  fullWidth: !0,
4551
4552
  disabled: n.disabled,
@@ -4560,7 +4561,7 @@ const si = (t) => {
4560
4561
  children: o()
4561
4562
  }
4562
4563
  );
4563
- }, yi = (t) => /* @__PURE__ */ e(
4564
+ }, pi = (t) => /* @__PURE__ */ e(
4564
4565
  me.H5,
4565
4566
  {
4566
4567
  props: {
@@ -4575,8 +4576,8 @@ const si = (t) => {
4575
4576
  fullWidth: l = !1,
4576
4577
  ...i
4577
4578
  }) => {
4578
- var s, h, f;
4579
- const o = i.hideMessageError || !1, a = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4579
+ var a, h, f;
4580
+ const o = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4580
4581
  return /* @__PURE__ */ d(
4581
4582
  u,
4582
4583
  {
@@ -4592,7 +4593,7 @@ const si = (t) => {
4592
4593
  u,
4593
4594
  {
4594
4595
  direction: "column",
4595
- customMaxWidth: a,
4596
+ customMaxWidth: s,
4596
4597
  fullWidth: l,
4597
4598
  children: [
4598
4599
  /* @__PURE__ */ e(N, { children: i.title }),
@@ -4604,13 +4605,13 @@ const si = (t) => {
4604
4605
  u,
4605
4606
  {
4606
4607
  direction: "column",
4607
- customMaxWidth: a,
4608
+ customMaxWidth: s,
4608
4609
  fullWidth: l,
4609
4610
  children: [
4610
4611
  /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
4611
4612
  /* @__PURE__ */ e(N, { fontSize: t, children: i.title }),
4612
4613
  /* @__PURE__ */ e(N, { color: "error", fontSize: t, children: n }),
4613
- /* @__PURE__ */ e(T, { condition: !!((s = i.tooltip) != null && s.label), children: /* @__PURE__ */ e(
4614
+ /* @__PURE__ */ e(T, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
4614
4615
  ue,
4615
4616
  {
4616
4617
  label: (h = i.tooltip) == null ? void 0 : h.label,
@@ -4644,7 +4645,7 @@ const si = (t) => {
4644
4645
  width: r === "horizontal" && i.customWidth ? i.customWidth : r === "horizontal" ? "343px" : ""
4645
4646
  },
4646
4647
  children: /* @__PURE__ */ e(
4647
- It,
4648
+ Tt,
4648
4649
  {
4649
4650
  size: t,
4650
4651
  ...i.inputProps,
@@ -4661,8 +4662,8 @@ const si = (t) => {
4661
4662
  };
4662
4663
  async function Ci(t, r) {
4663
4664
  const n = new Image();
4664
- n.src = t, await new Promise((o, a) => {
4665
- n.onload = o, n.onerror = a;
4665
+ n.src = t, await new Promise((o, s) => {
4666
+ n.onload = o, n.onerror = s;
4666
4667
  });
4667
4668
  const l = document.createElement("canvas");
4668
4669
  l.width = r.width, l.height = r.height;
@@ -4678,10 +4679,10 @@ async function Ci(t, r) {
4678
4679
  0,
4679
4680
  r.width,
4680
4681
  r.height
4681
- ), new Promise((o, a) => {
4682
- l.toBlob((s) => {
4683
- if (!s) return a("Canvas is empty");
4684
- const h = new File([s], "cropped.png", { type: "image/png" });
4682
+ ), new Promise((o, s) => {
4683
+ l.toBlob((a) => {
4684
+ if (!a) return s("Canvas is empty");
4685
+ const h = new File([a], "cropped.png", { type: "image/png" });
4685
4686
  o(h);
4686
4687
  }, "image/png");
4687
4688
  });
@@ -4695,7 +4696,7 @@ const Ct = {
4695
4696
  "2:3": 2 / 3,
4696
4697
  "3:2": 3 / 2,
4697
4698
  "32:9": 32 / 9
4698
- }, Di = Et(
4699
+ }, Di = Mt(
4699
4700
  ({
4700
4701
  handleUpload: t,
4701
4702
  urlImage: r,
@@ -4703,28 +4704,28 @@ const Ct = {
4703
4704
  croppedImage: l,
4704
4705
  setCroppedImage: i,
4705
4706
  size: o = "96",
4706
- aspect: a = "1:1",
4707
- containerProps: s,
4707
+ aspect: s = "1:1",
4708
+ containerProps: a,
4708
4709
  maxFileSize: h = 2,
4709
4710
  onError: f
4710
4711
  }, g) => {
4711
- const p = ee("md"), [y, b] = B(!1), [H, D] = B(null), [I, Z] = B(!1), [j, J] = B({ x: 0, y: 0 }), [M, fe] = B(1), [G, z] = B(null);
4712
- _(() => {
4712
+ const y = ee("md"), [p, b] = A(!1), [H, D] = A(null), [I, Z] = A(!1), [j, J] = A({ x: 0, y: 0 }), [M, fe] = A(1), [G, V] = A(null);
4713
+ U(() => {
4713
4714
  r === null && i(null);
4714
4715
  }, [r]);
4715
- const K = ze(
4716
- (O, V) => {
4717
- z(V);
4716
+ const K = Ve(
4717
+ (O, z) => {
4718
+ V(z);
4718
4719
  },
4719
4720
  []
4720
4721
  ), oe = (O) => {
4721
4722
  var de;
4722
- const V = (de = O.target.files) == null ? void 0 : de[0];
4723
- if (!V) return;
4723
+ const z = (de = O.target.files) == null ? void 0 : de[0];
4724
+ if (!z) return;
4724
4725
  const Y = new FileReader();
4725
4726
  Y.onload = () => {
4726
4727
  D(Y.result), Z(!0);
4727
- }, Y.readAsDataURL(V);
4728
+ }, Y.readAsDataURL(z);
4728
4729
  }, ce = async () => {
4729
4730
  if (!(!H || !G))
4730
4731
  try {
@@ -4734,38 +4735,38 @@ const Ct = {
4734
4735
  return;
4735
4736
  }
4736
4737
  t == null || t(O);
4737
- const V = URL.createObjectURL(O);
4738
- i(V, O), Z(!1);
4738
+ const z = URL.createObjectURL(O);
4739
+ i(z, O), Z(!1);
4739
4740
  } catch {
4740
4741
  f == null || f("Gagal memproses gambar");
4741
4742
  }
4742
- }, U = le(null), ae = () => {
4743
- U.current && U.current.click();
4743
+ }, _ = le(null), ae = () => {
4744
+ _.current && _.current.click();
4744
4745
  };
4745
4746
  Yt(g, () => ({
4746
4747
  openFileDialog: () => {
4747
4748
  var O;
4748
- (O = U.current) == null || O.click();
4749
+ (O = _.current) == null || O.click();
4749
4750
  }
4750
4751
  }));
4751
- const se = parseInt(o, 10), re = Ct[a];
4752
+ const se = parseInt(o, 10), re = Ct[s];
4752
4753
  let Q, q;
4753
4754
  return re >= 1 ? (q = se, Q = se * re) : (Q = se, q = se / re), /* @__PURE__ */ d(
4754
4755
  u,
4755
4756
  {
4756
4757
  display: "flex",
4757
4758
  position: "relative",
4758
- bg: (s == null ? void 0 : s.bg) || "gray-200",
4759
- borderStyle: (s == null ? void 0 : s.borderStyle) || "border-none",
4760
- borderColor: (s == null ? void 0 : s.borderColor) || "gray-200",
4761
- borderWidth: (s == null ? void 0 : s.borderWidth) || "border-2",
4762
- borderRadius: (s == null ? void 0 : s.borderRadius) || "rounded-md",
4759
+ bg: (a == null ? void 0 : a.bg) || "gray-200",
4760
+ borderStyle: (a == null ? void 0 : a.borderStyle) || "border-none",
4761
+ borderColor: (a == null ? void 0 : a.borderColor) || "gray-200",
4762
+ borderWidth: (a == null ? void 0 : a.borderWidth) || "border-2",
4763
+ borderRadius: (a == null ? void 0 : a.borderRadius) || "rounded-md",
4763
4764
  overflow: "overflow-hidden",
4764
4765
  align: "center",
4765
4766
  justify: "center",
4766
4767
  style: {
4767
- width: s != null && s.fullWidth ? "100%" : `${Q}px`,
4768
- height: s != null && s.fullWidth ? "auto" : `${q}px`,
4768
+ width: a != null && a.fullWidth ? "100%" : `${Q}px`,
4769
+ height: a != null && a.fullWidth ? "auto" : `${q}px`,
4769
4770
  aspectRatio: re,
4770
4771
  flexShrink: 0
4771
4772
  },
@@ -4815,7 +4816,7 @@ const Ct = {
4815
4816
  style: {
4816
4817
  inset: 0,
4817
4818
  backgroundColor: "var(--sa-color-black-alpha-a30, #080f214a)",
4818
- opacity: y ? 1 : 0,
4819
+ opacity: p ? 1 : 0,
4819
4820
  transition: "opacity 0.3s ease-in-out"
4820
4821
  },
4821
4822
  onClick: ae,
@@ -4823,7 +4824,7 @@ const Ct = {
4823
4824
  /* @__PURE__ */ e(
4824
4825
  "input",
4825
4826
  {
4826
- ref: U,
4827
+ ref: _,
4827
4828
  type: "file",
4828
4829
  accept: "image/*",
4829
4830
  onChange: oe,
@@ -4880,12 +4881,12 @@ const Ct = {
4880
4881
  }
4881
4882
  ),
4882
4883
  /* @__PURE__ */ d(
4883
- Ve,
4884
+ ze,
4884
4885
  {
4885
4886
  isShow: I,
4886
4887
  onHide: () => Z(!1),
4887
4888
  style: {
4888
- minWidth: p ? a === "1:1" ? "20rem" : Q * 2 : "100%"
4889
+ minWidth: y ? s === "1:1" ? "20rem" : Q * 2 : "100%"
4889
4890
  },
4890
4891
  children: [
4891
4892
  /* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(
@@ -4903,7 +4904,7 @@ const Ct = {
4903
4904
  image: H,
4904
4905
  crop: j,
4905
4906
  zoom: M,
4906
- aspect: a ? Ct[a] : void 0,
4907
+ aspect: s ? Ct[s] : void 0,
4907
4908
  onCropChange: J,
4908
4909
  onZoomChange: fe,
4909
4910
  onCropComplete: K,
@@ -4915,8 +4916,8 @@ const Ct = {
4915
4916
  }
4916
4917
  ) }),
4917
4918
  /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ d(u, { justify: "flex-end", direction: "row", gap: "sm", children: [
4918
- /* @__PURE__ */ e(R, { size: "sm", secondary: !0, onClick: () => Z(!1), children: "Cancel" }),
4919
- /* @__PURE__ */ e(R, { size: "sm", primary: !0, onClick: ce, children: "Crop" })
4919
+ /* @__PURE__ */ e(B, { size: "sm", secondary: !0, onClick: () => Z(!1), children: "Cancel" }),
4920
+ /* @__PURE__ */ e(B, { size: "sm", primary: !0, onClick: ce, children: "Crop" })
4920
4921
  ] }) })
4921
4922
  ]
4922
4923
  }
@@ -4934,7 +4935,7 @@ const Ct = {
4934
4935
  ...o
4935
4936
  }) => {
4936
4937
  var h, f, g;
4937
- const a = o.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4938
+ const s = o.hideMessageError || !1, a = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
4938
4939
  return /* @__PURE__ */ d(
4939
4940
  u,
4940
4941
  {
@@ -4950,7 +4951,7 @@ const Ct = {
4950
4951
  u,
4951
4952
  {
4952
4953
  direction: "column",
4953
- customMaxWidth: s,
4954
+ customMaxWidth: a,
4954
4955
  fullWidth: l,
4955
4956
  children: [
4956
4957
  /* @__PURE__ */ e(N, { children: o.title }),
@@ -4962,7 +4963,7 @@ const Ct = {
4962
4963
  u,
4963
4964
  {
4964
4965
  direction: "column",
4965
- customMaxWidth: s,
4966
+ customMaxWidth: a,
4966
4967
  fullWidth: l,
4967
4968
  children: [
4968
4969
  /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
@@ -4996,7 +4997,7 @@ const Ct = {
4996
4997
  ),
4997
4998
  /* @__PURE__ */ d($, { gap: "xs", children: [
4998
4999
  /* @__PURE__ */ e(Di, { ...o.inputProps }),
4999
- !a && o.errorMessage && /* @__PURE__ */ e(Ce, { message: o.errorMessage })
5000
+ !s && o.errorMessage && /* @__PURE__ */ e(Ce, { message: o.errorMessage })
5000
5001
  ] })
5001
5002
  ]
5002
5003
  }
@@ -5008,7 +5009,7 @@ const Ct = {
5008
5009
  fullWidth: l = !1,
5009
5010
  ...i
5010
5011
  }) => {
5011
- var a, s, h;
5012
+ var s, a, h;
5012
5013
  const o = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
5013
5014
  return /* @__PURE__ */ d(
5014
5015
  u,
@@ -5043,10 +5044,10 @@ const Ct = {
5043
5044
  /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
5044
5045
  /* @__PURE__ */ e(N, { fontSize: t, children: i.title }),
5045
5046
  /* @__PURE__ */ e(N, { color: "error", fontSize: t, children: n }),
5046
- /* @__PURE__ */ e(T, { condition: !!((a = i.tooltip) != null && a.label), children: /* @__PURE__ */ e(
5047
+ /* @__PURE__ */ e(T, { condition: !!((s = i.tooltip) != null && s.label), children: /* @__PURE__ */ e(
5047
5048
  ue,
5048
5049
  {
5049
- label: (s = i.tooltip) == null ? void 0 : s.label,
5050
+ label: (a = i.tooltip) == null ? void 0 : a.label,
5050
5051
  arrowPosition: (h = i.tooltip) == null ? void 0 : h.arrowPosition,
5051
5052
  ...i.tooltip,
5052
5053
  children: /* @__PURE__ */ e(
@@ -5082,13 +5083,13 @@ const Ct = {
5082
5083
  disabled: o = !1
5083
5084
  }) => {
5084
5085
  var g;
5085
- const [a, s] = B([]);
5086
- _(() => {
5087
- t && s([...t.map((p) => ({ id: p.id, isActive: p.isActive }))]);
5086
+ const [s, a] = A([]);
5087
+ U(() => {
5088
+ t && a([...t.map((y) => ({ id: y.id, isActive: y.isActive }))]);
5088
5089
  }, [t]);
5089
- const h = (g = a.find((p) => p.id === r)) == null ? void 0 : g.isActive, f = ze(() => {
5090
- s(
5091
- (p) => p.map((y) => y.id === r ? { ...y, isActive: !y.isActive } : y)
5090
+ const h = (g = s.find((y) => y.id === r)) == null ? void 0 : g.isActive, f = Ve(() => {
5091
+ a(
5092
+ (y) => y.map((p) => p.id === r ? { ...p, isActive: !p.isActive } : p)
5092
5093
  ), n && n(!h);
5093
5094
  }, [r, n, h]);
5094
5095
  return /* @__PURE__ */ e(
@@ -5118,18 +5119,18 @@ const Ct = {
5118
5119
  RadioOptions: fi,
5119
5120
  InputTextArea: gi,
5120
5121
  ToggleForm: mi,
5121
- ActionButton: pi,
5122
- FormTitle: yi,
5122
+ ActionButton: yi,
5123
+ FormTitle: pi,
5123
5124
  InputDate: xi,
5124
5125
  InputImgFile: bi,
5125
5126
  Custom: vi
5126
5127
  }, wi = ({ customBottom: t }) => {
5127
- const [r, n] = B(!1), l = () => {
5128
+ const [r, n] = A(!1), l = () => {
5128
5129
  window.scrollY > window.screenY ? n(!0) : n(!1);
5129
5130
  }, i = () => {
5130
5131
  window.scrollTo({ top: 0, behavior: "smooth" });
5131
5132
  };
5132
- return _(() => (window.addEventListener("scroll", l), () => {
5133
+ return U(() => (window.addEventListener("scroll", l), () => {
5133
5134
  window.removeEventListener("scroll", l);
5134
5135
  }), []), /* @__PURE__ */ e(
5135
5136
  u,
@@ -5150,7 +5151,7 @@ const Ct = {
5150
5151
  transition: "transform 0.2s ease-in-out"
5151
5152
  },
5152
5153
  children: /* @__PURE__ */ e(
5153
- R,
5154
+ B,
5154
5155
  {
5155
5156
  secondary: !0,
5156
5157
  size: "xs",
@@ -5414,17 +5415,17 @@ const jn = ({
5414
5415
  variant: l = "primary",
5415
5416
  variantTitle: i,
5416
5417
  leftIcon: o,
5417
- showButton: a = !0,
5418
- customHeight: s,
5418
+ showButton: s = !0,
5419
+ customHeight: a,
5419
5420
  childrenButton: h,
5420
5421
  customIcon: f
5421
5422
  }) => {
5422
5423
  const g = () => {
5423
5424
  switch (l) {
5424
5425
  case "primary":
5425
- return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(R, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(R, { primary: !0, onClick: n, children: h || t }) });
5426
+ return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(B, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(B, { primary: !0, onClick: n, children: h || t }) });
5426
5427
  case "secondary":
5427
- return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(R, { secondary: !0, iconLeft: o, onClick: n, children: i ? /* @__PURE__ */ e(
5428
+ return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(B, { secondary: !0, iconLeft: o, onClick: n, children: i ? /* @__PURE__ */ e(
5428
5429
  C,
5429
5430
  {
5430
5431
  fontFamily: "Poppins",
@@ -5433,11 +5434,11 @@ const jn = ({
5433
5434
  style: { color: "var(--sa-background-success, #28ac6e)" },
5434
5435
  children: h || t
5435
5436
  }
5436
- ) : t }) : /* @__PURE__ */ e(R, { secondary: !0, onClick: n, children: h || t }) });
5437
+ ) : t }) : /* @__PURE__ */ e(B, { secondary: !0, onClick: n, children: h || t }) });
5437
5438
  case "success":
5438
- return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(R, { success: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(R, { success: !0, onClick: n, children: h || t }) });
5439
+ return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(B, { success: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(B, { success: !0, onClick: n, children: h || t }) });
5439
5440
  default:
5440
- return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(R, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(R, { primary: !0, onClick: n, children: h || t }) });
5441
+ return /* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(B, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(B, { primary: !0, onClick: n, children: h || t }) });
5441
5442
  }
5442
5443
  };
5443
5444
  return /* @__PURE__ */ d(
@@ -5450,21 +5451,21 @@ const jn = ({
5450
5451
  justify: "center",
5451
5452
  align: "center",
5452
5453
  marginBlock: "auto",
5453
- customHeight: s,
5454
+ customHeight: a,
5454
5455
  children: [
5455
5456
  f || /* @__PURE__ */ e(Fi, {}),
5456
- /* @__PURE__ */ e(u, { children: r.map((p, y) => /* @__PURE__ */ e(
5457
+ /* @__PURE__ */ e(u, { children: r.map((y, p) => /* @__PURE__ */ e(
5457
5458
  me.Body1,
5458
5459
  {
5459
5460
  props: {
5460
5461
  align: "center",
5461
5462
  textAlign: "center"
5462
5463
  },
5463
- children: y > 2 ? null : p
5464
+ children: p > 2 ? null : y
5464
5465
  },
5465
- y
5466
+ p
5466
5467
  )) }),
5467
- a ? g() : null
5468
+ s ? g() : null
5468
5469
  ]
5469
5470
  }
5470
5471
  );
@@ -5712,7 +5713,7 @@ function $n({ onClick: t }) {
5712
5713
  children: "Sorry, we couldn't find the page you are looking for"
5713
5714
  }
5714
5715
  ),
5715
- t && /* @__PURE__ */ e(R, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
5716
+ t && /* @__PURE__ */ e(B, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
5716
5717
  ]
5717
5718
  }
5718
5719
  );
@@ -5953,7 +5954,7 @@ function Ei({ width: t, height: r }) {
5953
5954
  }
5954
5955
  ) });
5955
5956
  }
5956
- function Un({ onClick: t }) {
5957
+ function _n({ onClick: t }) {
5957
5958
  const r = ee("md");
5958
5959
  return /* @__PURE__ */ d(
5959
5960
  u,
@@ -5967,7 +5968,7 @@ function Un({ onClick: t }) {
5967
5968
  children: [
5968
5969
  /* @__PURE__ */ e(Ei, { width: r ? 600 : 300 }),
5969
5970
  /* @__PURE__ */ e(C, { fontWeight: "bold", fontSize: r ? "3xl" : "2xl", children: "We Are Sorry ..." }),
5970
- t && /* @__PURE__ */ e(R, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
5971
+ t && /* @__PURE__ */ e(B, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
5971
5972
  ]
5972
5973
  }
5973
5974
  );
@@ -6661,7 +6662,7 @@ function Mi({ width: t, height: r }) {
6661
6662
  }
6662
6663
  ) });
6663
6664
  }
6664
- function _n({ onClick: t }) {
6665
+ function Un({ onClick: t }) {
6665
6666
  const r = ee("md");
6666
6667
  return /* @__PURE__ */ d(
6667
6668
  u,
@@ -6693,16 +6694,16 @@ function _n({ onClick: t }) {
6693
6694
  children: "we are trying to fix the problem"
6694
6695
  }
6695
6696
  ),
6696
- t && /* @__PURE__ */ e(R, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
6697
+ t && /* @__PURE__ */ e(B, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
6697
6698
  ]
6698
6699
  }
6699
6700
  );
6700
6701
  }
6701
6702
  const Pn = (t) => {
6702
- var n, l, i, o, a;
6703
+ var n, l, i, o, s;
6703
6704
  const r = ee("md");
6704
6705
  return /* @__PURE__ */ d(
6705
- Ve,
6706
+ ze,
6706
6707
  {
6707
6708
  isShow: t.isShow,
6708
6709
  onHide: t.onHide,
@@ -6729,10 +6730,10 @@ const Pn = (t) => {
6729
6730
  display: "flex",
6730
6731
  direction: ((i = t.wrapperConfirmBtnProps) == null ? void 0 : i.direction) || "row",
6731
6732
  justify: ((o = t.wrapperConfirmBtnProps) == null ? void 0 : o.justify) || "flex-end",
6732
- gap: ((a = t.wrapperConfirmBtnProps) == null ? void 0 : a.gap) || "sm",
6733
+ gap: ((s = t.wrapperConfirmBtnProps) == null ? void 0 : s.gap) || "sm",
6733
6734
  ...t.wrapperConfirmBtnProps,
6734
6735
  children: [
6735
- t.onCancel && /* @__PURE__ */ e(R, { secondary: !0, onClick: t.onCancel, size: "md", fullWidth: !0, children: t.titleCancelBtn || "Cancel" }),
6736
+ t.onCancel && /* @__PURE__ */ e(B, { secondary: !0, onClick: t.onCancel, size: "md", fullWidth: !0, children: t.titleCancelBtn || "Cancel" }),
6736
6737
  /* @__PURE__ */ e(
6737
6738
  u,
6738
6739
  {
@@ -6741,7 +6742,7 @@ const Pn = (t) => {
6741
6742
  textWrap: "nowrap"
6742
6743
  },
6743
6744
  children: /* @__PURE__ */ e(
6744
- R,
6745
+ B,
6745
6746
  {
6746
6747
  ...t.buttonConfirmProps,
6747
6748
  onClick: t.onConfirm,
@@ -6769,32 +6770,32 @@ const Pn = (t) => {
6769
6770
  customHeight: l,
6770
6771
  paddingInline: i = "spacing-0",
6771
6772
  paddingBlock: o = "spacing-0",
6772
- header: a,
6773
- footer: s,
6773
+ header: s,
6774
+ footer: a,
6774
6775
  title: h,
6775
6776
  titleTag: f,
6776
6777
  action: g,
6777
- actionContainer: p,
6778
- containerProps: y,
6778
+ actionContainer: y,
6779
+ containerProps: p,
6779
6780
  bodyProps: b,
6780
6781
  headerProps: H = { borderBottom: !0 },
6781
6782
  footerProps: D = { borderTop: !0 },
6782
6783
  variantTag: I = "info"
6783
6784
  }) => {
6784
- const Z = le(null), [j, J] = B("100vh");
6785
- _(() => {
6786
- const z = () => {
6785
+ const Z = le(null), [j, J] = A("100vh");
6786
+ U(() => {
6787
+ const V = () => {
6787
6788
  if (Z.current) {
6788
6789
  const K = Z.current.getBoundingClientRect().top;
6789
6790
  J(`calc(100vh - ${K}px)`);
6790
6791
  }
6791
6792
  };
6792
- return z(), window.addEventListener("resize", z), () => window.removeEventListener("resize", z);
6793
+ return V(), window.addEventListener("resize", V), () => window.removeEventListener("resize", V);
6793
6794
  }, []);
6794
6795
  const M = () => f ? /* @__PURE__ */ d(u, { direction: "row", gap: "sm", align: "center", children: [
6795
6796
  /* @__PURE__ */ e(C, { fontWeight: "medium", children: h }),
6796
6797
  /* @__PURE__ */ e(Ee, { border: !0, text: f, variant: I })
6797
- ] }) : /* @__PURE__ */ e(C, { fontWeight: "medium", children: h }), fe = () => a || /* @__PURE__ */ d(
6798
+ ] }) : /* @__PURE__ */ e(C, { fontWeight: "medium", children: h }), fe = () => s || /* @__PURE__ */ d(
6798
6799
  u,
6799
6800
  {
6800
6801
  direction: "row",
@@ -6803,10 +6804,10 @@ const Pn = (t) => {
6803
6804
  gap: "md",
6804
6805
  children: [
6805
6806
  /* @__PURE__ */ e(u, { children: h ? M() : null }),
6806
- /* @__PURE__ */ e(u, { ...p, children: g ?? null })
6807
+ /* @__PURE__ */ e(u, { ...y, children: g ?? null })
6807
6808
  ]
6808
6809
  }
6809
- ), G = !!(a || h || g);
6810
+ ), G = !!(s || h || g);
6810
6811
  return /* @__PURE__ */ d(
6811
6812
  u,
6812
6813
  {
@@ -6818,15 +6819,15 @@ const Pn = (t) => {
6818
6819
  paddingInline: i,
6819
6820
  bg: "white",
6820
6821
  direction: "column",
6821
- ...y,
6822
+ ...p,
6822
6823
  style: {
6823
6824
  backgroundColor: "var(--sa-background-primary, #ffffff)",
6824
6825
  display: "flex",
6825
6826
  minHeight: j,
6826
- ...(y == null ? void 0 : y.style) ?? {}
6827
+ ...(p == null ? void 0 : p.style) ?? {}
6827
6828
  },
6828
6829
  children: [
6829
- a !== null && G ? /* @__PURE__ */ e(zt, { ...H, children: fe() }) : null,
6830
+ s !== null && G ? /* @__PURE__ */ e(zt, { ...H, children: fe() }) : null,
6830
6831
  /* @__PURE__ */ e(
6831
6832
  u,
6832
6833
  {
@@ -6840,12 +6841,29 @@ const Pn = (t) => {
6840
6841
  children: t
6841
6842
  }
6842
6843
  ),
6843
- s ? /* @__PURE__ */ e(Vt, { ...D, children: s }) : null
6844
+ a ? /* @__PURE__ */ e(It, { ...D, children: a }) : null
6844
6845
  ]
6845
6846
  }
6846
6847
  );
6847
6848
  }
6848
- ), Jn = (t) => {
6849
+ ), Jn = Ft.memo(
6850
+ ({ value: t, options: r = [], onChange: n, multiple: l }) => {
6851
+ const i = (t == null ? void 0 : t.map((a) => a.value)) || [], o = (r == null ? void 0 : r.filter((a) => i.includes(a.value))) || [], s = (a) => {
6852
+ const h = [...o];
6853
+ let f = [];
6854
+ l ? f = i.includes(a.value) ? h.filter((g) => g.value !== a.value) : [...h, a] : f = [a], n == null || n(f);
6855
+ };
6856
+ return /* @__PURE__ */ e(u, { direction: "row", gap: "sm", flexWrap: "wrap", children: r == null ? void 0 : r.map((a, h) => /* @__PURE__ */ e(
6857
+ B,
6858
+ {
6859
+ ...i.includes(a.value) ? { primary: !0 } : { secondary: !0 },
6860
+ onClick: () => s(a),
6861
+ children: a.label
6862
+ },
6863
+ h
6864
+ )) });
6865
+ }
6866
+ ), Gn = (t) => {
6849
6867
  const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, [l, i] = Ge(), o = Je(l.toString());
6850
6868
  return {
6851
6869
  activeTab: o[n] ? parseInt(o[n]) : r,
@@ -6858,13 +6876,13 @@ const Pn = (t) => {
6858
6876
  searchQueries: o
6859
6877
  };
6860
6878
  };
6861
- function Gn({
6879
+ function Qn({
6862
6880
  appName: t,
6863
6881
  menuConfig: r,
6864
6882
  formatTitle: n
6865
6883
  }) {
6866
6884
  const l = Te();
6867
- _(() => {
6885
+ U(() => {
6868
6886
  let i = null, o = null;
6869
6887
  for (const h of r) {
6870
6888
  const f = h.items.find((g) => g.to ? g.to === "/" ? l.pathname === "/" : !!(g.to === l.pathname || l.pathname.startsWith(g.to + "/")) : !1);
@@ -6873,20 +6891,20 @@ function Gn({
6873
6891
  break;
6874
6892
  }
6875
6893
  }
6876
- const a = [];
6877
- i != null && i.title && a.push(i.title), o != null && o.name && a.push(o.name.toTitleCase());
6878
- const s = (h, f) => h.length > 0 ? `${h.join(" - ")} | ${f}` : f;
6879
- document.title = (n || s)(a, t);
6894
+ const s = [];
6895
+ i != null && i.title && s.push(i.title), o != null && o.name && s.push(o.name.toTitleCase());
6896
+ const a = (h, f) => h.length > 0 ? `${h.join(" - ")} | ${f}` : f;
6897
+ document.title = (n || a)(s, t);
6880
6898
  }, [l.pathname]);
6881
6899
  }
6882
- const Qn = () => {
6883
- const [t, r] = Ge(), n = Je(t.toString()), l = Mt(), i = Te(), o = l.id;
6900
+ const Yn = () => {
6901
+ const [t, r] = Ge(), n = Je(t.toString()), l = Lt(), i = Te(), o = l.id;
6884
6902
  return {
6885
6903
  // query params
6886
6904
  setSearchParams: r,
6887
6905
  searchParams: t,
6888
6906
  searchQueries: n,
6889
- isHasQuery: (g, p) => t.has(g) && t.get(g) === p,
6907
+ isHasQuery: (g, y) => t.has(g) && t.get(g) === y,
6890
6908
  getQueryParam: (g) => t.get(g),
6891
6909
  // route params
6892
6910
  getRouteParam: (g) => l[g],
@@ -6898,26 +6916,26 @@ const Qn = () => {
6898
6916
  hasId: !!o
6899
6917
  };
6900
6918
  };
6901
- function Yn(t) {
6919
+ function Xn(t) {
6902
6920
  var l, i;
6903
6921
  const r = t.decodedAccessToken;
6904
6922
  return De(() => {
6905
6923
  var h, f;
6906
- const o = ((f = (h = r == null ? void 0 : r.access) == null ? void 0 : h.role) == null ? void 0 : f.code) ?? "", a = Object.keys(t.role).reduce(
6907
- (g, p) => {
6908
- const y = `is${p.toLowerCase().replace(/(^\w|_\w)/g, (b) => b.replace("_", "").toUpperCase())}`;
6909
- return { ...g, [y]: !1 };
6924
+ const o = ((f = (h = r == null ? void 0 : r.access) == null ? void 0 : h.role) == null ? void 0 : f.code) ?? "", s = Object.keys(t.role).reduce(
6925
+ (g, y) => {
6926
+ const p = `is${y.toLowerCase().replace(/(^\w|_\w)/g, (b) => b.replace("_", "").toUpperCase())}`;
6927
+ return { ...g, [p]: !1 };
6910
6928
  },
6911
6929
  {}
6912
6930
  );
6913
6931
  return {
6914
- ...Object.keys(t.role).reduce((g, p) => {
6915
- const y = `is${p.toLowerCase().replace(/(^\w|_\w)/g, (b) => b.replace("_", "").toUpperCase())}`;
6932
+ ...Object.keys(t.role).reduce((g, y) => {
6933
+ const p = `is${y.toLowerCase().replace(/(^\w|_\w)/g, (b) => b.replace("_", "").toUpperCase())}`;
6916
6934
  return {
6917
6935
  ...g,
6918
- [y]: o === t.role[p]
6936
+ [p]: o === t.role[y]
6919
6937
  };
6920
- }, a),
6938
+ }, s),
6921
6939
  hasRole: (g) => o === t.role[g],
6922
6940
  getRoleKey: () => o
6923
6941
  };
@@ -6928,7 +6946,7 @@ export {
6928
6946
  Zr as AdvanceFilterBar,
6929
6947
  rn as App,
6930
6948
  nr as AppComponent,
6931
- Lt as AppContext,
6949
+ Wt as AppContext,
6932
6950
  ln as AppLayout,
6933
6951
  On as AsideBar,
6934
6952
  cn as AuthLayout,
@@ -6940,7 +6958,7 @@ export {
6940
6958
  jn as EmptyStatePage,
6941
6959
  Nr as FilterDrawer,
6942
6960
  Nn as FloatingFooter,
6943
- Un as ForbiddenPage,
6961
+ _n as ForbiddenPage,
6944
6962
  Tn as Form,
6945
6963
  qn as FullSection,
6946
6964
  an as HorizontalField,
@@ -6951,16 +6969,17 @@ export {
6951
6969
  or as ModuleSwitcherModal,
6952
6970
  $n as NotFoundPage,
6953
6971
  dn as PageLayout,
6954
- Ht as Pressable,
6972
+ Vt as Pressable,
6955
6973
  mr as RightDrawer,
6956
6974
  wi as ScrollToTopButton,
6957
6975
  hn as Section,
6958
- Vt as SectionFooter,
6976
+ It as SectionFooter,
6959
6977
  zt as SectionHeader,
6960
- _n as ServerErrorPage,
6978
+ Jn as SelectButton,
6979
+ Un as ServerErrorPage,
6961
6980
  rr as SidebarBadgesProvider,
6962
6981
  lr as SidebarHeaderSlot,
6963
- _r as TableFooter,
6982
+ Ur as TableFooter,
6964
6983
  $r as TableHeader,
6965
6984
  xn as TableSection,
6966
6985
  jr as TableWrapper,
@@ -6974,39 +6993,39 @@ export {
6974
6993
  wn as formatDate,
6975
6994
  ri as formatDateToIndonesian,
6976
6995
  bn as formatRupiah,
6977
- pn as getDateFilterValue,
6996
+ yn as getDateFilterValue,
6978
6997
  mn as getDateRangeFilterValue,
6979
6998
  vn as getInitials,
6980
6999
  fn as getValueDropdownMultipleFilter,
6981
7000
  gn as getValueRadioFilter,
6982
7001
  Or as getValueSearch,
6983
7002
  Ke as getValuesFilter,
6984
- yt as handleChangeFilter,
6985
- Vn as handleOnScroll,
7003
+ pt as handleChangeFilter,
7004
+ zn as handleOnScroll,
6986
7005
  Rn as isEmail,
6987
- yn as isFilterActive,
7006
+ pn as isFilterActive,
6988
7007
  Ln as isOnlyLettersAndSpaces,
6989
7008
  Mn as isPhoneNumber,
6990
7009
  Hn as isSlug,
6991
7010
  Fn as oneDayInMs,
6992
7011
  Dn as parseIndonesianDateToDate,
6993
- zn as preventNonCoordinateInput,
7012
+ Vn as preventNonCoordinateInput,
6994
7013
  An as preventNonNumberAndDecimalInput,
6995
7014
  Wn as preventNonNumberInput,
6996
7015
  Bn as preventNumberInput,
6997
- zr as resolveDateRangeValueToString,
6998
- Vr as resolveDateValueToString,
7016
+ Vr as resolveDateRangeValueToString,
7017
+ zr as resolveDateValueToString,
6999
7018
  Rr as resolveDropdownValueToString,
7000
7019
  Hr as resolveRadioValueToString,
7001
7020
  Xe as resolveSidebarBadge,
7002
7021
  Sn as textWidth,
7003
- Wt as useApp,
7022
+ Bt as useApp,
7004
7023
  tr as useAppState,
7005
- Yn as useAuthRole,
7006
- Gn as useDynamicTitle,
7007
- Rt as useModuleSelection,
7024
+ Xn as useAuthRole,
7025
+ Qn as useDynamicTitle,
7026
+ Ht as useModuleSelection,
7008
7027
  at as useRouteInfo,
7009
- Qn as useRouteParams,
7028
+ Yn as useRouteParams,
7010
7029
  ir as useSidebarBadges,
7011
- Jn as useTabState
7030
+ Gn as useTabState
7012
7031
  };