@starasia/admin 1.3.3 → 1.3.5

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,29 +3,29 @@ import { Badges as VA } from "@starasia/badges";
3
3
  export * from "@starasia/badges";
4
4
  import { Box as a } from "@starasia/box";
5
5
  export * from "@starasia/box";
6
- import { Button as O } from "@starasia/button";
6
+ import { Button as b } from "@starasia/button";
7
7
  export * from "@starasia/button";
8
8
  export * from "@starasia/card";
9
9
  import { StarasiaDate as XA } from "@starasia/date";
10
10
  export * from "@starasia/date";
11
- import { Dialog as dA, DialogBody as hA, DialogTitle as wA, DialogFooter as yA } from "@starasia/dialog";
11
+ import { Dialog as hA, DialogBody as DA, DialogTitle as wA, DialogFooter as fA } from "@starasia/dialog";
12
12
  export * from "@starasia/dialog";
13
13
  import { Drawer as ce } from "@starasia/drawer";
14
14
  export * from "@starasia/drawer";
15
- import { Dropdown as xA } from "@starasia/dropdown";
15
+ import { Dropdown as SA } from "@starasia/dropdown";
16
16
  export * from "@starasia/dropdown";
17
- import { useMediaQuery as X, useConfirmation as $A } from "@starasia/hooks";
17
+ import { useMediaQuery as $, useConfirmation as $A } from "@starasia/hooks";
18
18
  export * from "@starasia/hooks";
19
- import { searchParamsToObject as DA } from "@starasia/http";
19
+ import { searchParamsToObject as IA } from "@starasia/http";
20
20
  export * from "@starasia/http";
21
- import { Input as IA } from "@starasia/input";
21
+ import { Input as uA } from "@starasia/input";
22
22
  export * from "@starasia/input";
23
23
  import { Menu as ge, MenuButton as se, MenuLists as ae, MenuBody as Ce } from "@starasia/menu";
24
24
  export * from "@starasia/menu";
25
25
  import { Pagination as Be } from "@starasia/pagination";
26
26
  export * from "@starasia/pagination";
27
27
  export * from "@starasia/storage";
28
- import { Tr as QA, Td as CA, Table as _A, Thead as we, Th as qA, Tbody as Qe } from "@starasia/table";
28
+ import { Tr as dA, Td as CA, Table as _A, Thead as we, Th as qA, Tbody as Qe } from "@starasia/table";
29
29
  export * from "@starasia/table";
30
30
  export * from "@starasia/tabs";
31
31
  import { Textarea as de } from "@starasia/textarea";
@@ -35,9 +35,9 @@ export * from "@starasia/theme";
35
35
  export * from "@starasia/toast";
36
36
  import { Toggle as Ae } from "@starasia/toggle";
37
37
  export * from "@starasia/toggle";
38
- import { Tooltip as rA } from "@starasia/tooltip";
38
+ import { Tooltip as oA } from "@starasia/tooltip";
39
39
  export * from "@starasia/tooltip";
40
- import { Checkbox as NA } from "@starasia/checkbox";
40
+ import { Checkbox as xA } from "@starasia/checkbox";
41
41
  export * from "@starasia/checkbox";
42
42
  import { Radio as Ie } from "@starasia/radio";
43
43
  export * from "@starasia/radio";
@@ -51,12 +51,12 @@ export * from "@starasia/progress";
51
51
  export * from "@starasia/stepper";
52
52
  export * from "@starasia/accordion";
53
53
  export * from "@starasia/story-record";
54
- import { Skeleton as lA } from "@starasia/skeleton";
54
+ import { Skeleton as cA } from "@starasia/skeleton";
55
55
  export * from "@starasia/skeleton";
56
56
  import { jsx as A, jsxs as s, Fragment as U } from "react/jsx-runtime";
57
- import gA, { createContext as ue, useState as b, useContext as ke, memo as _, useRef as eA, useEffect as W, useLayoutEffect as FA, useMemo as cA, isValidElement as ee, forwardRef as ZA, useCallback as HA, Children as Ee, useImperativeHandle as Me } from "react";
57
+ import sA, { createContext as ue, useState as O, useContext as ke, memo as AA, useRef as iA, useEffect as W, useLayoutEffect as FA, useMemo as gA, isValidElement as ee, forwardRef as ZA, useCallback as HA, Children as Ee, useImperativeHandle as Me } from "react";
58
58
  import "@starasia/css/dist/style.css";
59
- import { useSearchParams as uA, useNavigate as ie, useLocation as fA, Outlet as UA, Link as me, useParams as te } from "react-router";
59
+ import { useSearchParams as kA, useNavigate as ie, useLocation as LA, Outlet as UA, Link as me, useParams as te } from "react-router";
60
60
  import ye from "react-easy-crop";
61
61
  const xe = {
62
62
  menus: [],
@@ -67,7 +67,7 @@ const xe = {
67
67
  setUserData: () => {
68
68
  }
69
69
  }, re = ue(xe), fe = () => ke(re), Se = (e) => {
70
- const [i, r] = b(
70
+ const [i, r] = O(
71
71
  (e == null ? void 0 : e.initialUserData) || null
72
72
  );
73
73
  return {
@@ -98,7 +98,7 @@ const xe = {
98
98
  children: l ? /* @__PURE__ */ A(TA, { value: l, children: e }) : g ? /* @__PURE__ */ A(TA, { value: g, children: e }) : e
99
99
  }
100
100
  );
101
- }, Nt = _(Le);
101
+ }, Nt = AA(Le);
102
102
  function Ge({
103
103
  collapsed: e = !1,
104
104
  children: i
@@ -131,7 +131,7 @@ function Ge({
131
131
  }
132
132
  ) : null;
133
133
  }
134
- function Oe({
134
+ function be({
135
135
  isShow: e,
136
136
  onHide: i,
137
137
  menus: r,
@@ -142,7 +142,7 @@ function Oe({
142
142
  t(l), i();
143
143
  };
144
144
  return /* @__PURE__ */ A(
145
- dA,
145
+ hA,
146
146
  {
147
147
  isShow: e,
148
148
  onHide: i,
@@ -152,7 +152,7 @@ function Oe({
152
152
  boxShadow: "none",
153
153
  border: "none"
154
154
  },
155
- children: /* @__PURE__ */ A(hA, { children: /* @__PURE__ */ s(
155
+ children: /* @__PURE__ */ A(DA, { children: /* @__PURE__ */ s(
156
156
  "div",
157
157
  {
158
158
  style: {
@@ -276,7 +276,7 @@ function Oe({
276
276
  }
277
277
  );
278
278
  }
279
- let EA = 0, aA = !1;
279
+ let MA = 0, aA = !1;
280
280
  function Ft({
281
281
  children: e,
282
282
  headerRight: i,
@@ -288,18 +288,18 @@ function Ft({
288
288
  sidebarHeaderContent: c,
289
289
  showModuleSwitcher: g = !0
290
290
  }) {
291
- const [C] = uA(), Q = C.get("embed") === "true", w = fe(), B = ie(), I = fA(), h = !X("md"), [j, p] = b(!1), [N, R] = b(!1), [x, u] = b(!1), [P, Z] = b(/* @__PURE__ */ new Set()), [V, AA] = b(!1), [H, k] = b(null), G = eA(null), E = eA(null);
291
+ const [C] = kA(), Q = C.get("embed") === "true", w = fe(), B = ie(), u = LA(), h = !$("md"), [j, p] = O(!1), [F, R] = O(!1), [f, I] = O(!1), [P, K] = O(/* @__PURE__ */ new Set()), [V, eA] = O(!1), [N, k] = O(null), S = iA(null), E = iA(null);
292
292
  W(() => {
293
- const m = G.current;
293
+ const m = S.current;
294
294
  if (!m) return;
295
- const y = () => {
296
- aA || (EA = m.scrollTop);
295
+ const x = () => {
296
+ aA || (MA = m.scrollTop);
297
297
  };
298
- return m.addEventListener("scroll", y), () => m.removeEventListener("scroll", y);
298
+ return m.addEventListener("scroll", x), () => m.removeEventListener("scroll", x);
299
299
  }, []);
300
300
  const D = () => {
301
- const m = G.current;
302
- m && EA > 0 && (aA = !0, m.scrollTop = EA, requestAnimationFrame(() => {
301
+ const m = S.current;
302
+ m && MA > 0 && (aA = !0, m.scrollTop = MA, requestAnimationFrame(() => {
303
303
  aA = !1;
304
304
  }));
305
305
  };
@@ -310,91 +310,91 @@ function Ft({
310
310
  }, 300);
311
311
  return () => clearTimeout(m);
312
312
  }, []), FA(() => {
313
- w.menus.length > 0 && (EA > 0 ? D() : requestAnimationFrame(() => {
314
- var y;
315
- const m = (y = G.current) == null ? void 0 : y.querySelector(
313
+ w.menus.length > 0 && (MA > 0 ? D() : requestAnimationFrame(() => {
314
+ var x;
315
+ const m = (x = S.current) == null ? void 0 : x.querySelector(
316
316
  "[data-menu-active='true']"
317
317
  );
318
318
  m && m.scrollIntoView({ block: "center", behavior: "instant" });
319
319
  }));
320
320
  }, [w.menus]), W(() => {
321
321
  aA = !0, D();
322
- const m = setTimeout(D, 0), y = setTimeout(D, 50), S = setTimeout(D, 100), v = setTimeout(D, 200), tA = setTimeout(() => {
322
+ const m = setTimeout(D, 0), x = setTimeout(D, 50), L = setTimeout(D, 100), v = setTimeout(D, 200), rA = setTimeout(() => {
323
323
  aA = !1;
324
324
  }, 300);
325
325
  return () => {
326
- clearTimeout(m), clearTimeout(y), clearTimeout(S), clearTimeout(v), clearTimeout(tA);
326
+ clearTimeout(m), clearTimeout(x), clearTimeout(L), clearTimeout(v), clearTimeout(rA);
327
327
  };
328
- }, [I.pathname]), W(() => {
328
+ }, [u.pathname]), W(() => {
329
329
  E.current && (E.current.scrollTop = 0);
330
- }, [I.pathname]), W(() => {
331
- h && u(!1);
332
- }, [I.pathname, h]), W(() => {
330
+ }, [u.pathname]), W(() => {
331
+ h && I(!1);
332
+ }, [u.pathname, h]), W(() => {
333
333
  h && R(!0);
334
334
  }, [h]);
335
- const F = () => {
335
+ const z = () => {
336
336
  p(!0);
337
- }, f = () => {
337
+ }, q = () => {
338
338
  p(!1);
339
- }, J = () => {
339
+ }, H = () => {
340
340
  p(!1), t();
341
- }, z = w.menus.flatMap(
342
- (m) => m.items.flatMap((y) => {
343
- const S = [y.to];
344
- return y.children && S.push(...y.children.map((v) => v.to)), S;
341
+ }, y = w.menus.flatMap(
342
+ (m) => m.items.flatMap((x) => {
343
+ const L = [x.to];
344
+ return x.children && L.push(...x.children.map((v) => v.to)), L;
345
345
  })
346
- ), iA = (m) => {
347
- if (!I.pathname.startsWith(m)) return !1;
348
- const y = z.filter((S) => I.pathname.startsWith(S)).sort((S, v) => v.length - S.length)[0];
349
- return m === y;
346
+ ), X = (m) => {
347
+ if (!u.pathname.startsWith(m)) return !1;
348
+ const x = y.filter((L) => u.pathname.startsWith(L)).sort((L, v) => v.length - L.length)[0];
349
+ return m === x;
350
350
  };
351
351
  W(() => {
352
352
  w.menus.forEach((m) => {
353
- m.items.forEach((y) => {
354
- var S;
355
- (S = y.children) != null && S.some((v) => I.pathname.startsWith(v.to)) && Z((v) => {
356
- const tA = new Set(v);
357
- return tA.add(y.id), tA;
353
+ m.items.forEach((x) => {
354
+ var L;
355
+ (L = x.children) != null && L.some((v) => u.pathname.startsWith(v.to)) && K((v) => {
356
+ const rA = new Set(v);
357
+ return rA.add(x.id), rA;
358
358
  });
359
359
  });
360
360
  });
361
- }, [I.pathname, w.menus]);
362
- const sA = (m) => {
363
- Z((y) => {
364
- const S = new Set(y);
365
- return S.has(m) ? S.delete(m) : S.add(m), S;
361
+ }, [u.pathname, w.menus]);
362
+ const tA = (m) => {
363
+ K((x) => {
364
+ const L = new Set(x);
365
+ return L.has(m) ? L.delete(m) : L.add(m), L;
366
366
  });
367
367
  };
368
368
  W(() => {
369
369
  if (w.menus.length === 0) return;
370
370
  const m = localStorage.getItem("moduleSwitcherGroupId");
371
371
  if (m !== null) {
372
- const y = Number(m), S = w.menus.some((v) => v.id === y);
373
- k(S ? y : null);
372
+ const x = Number(m), L = w.menus.some((v) => v.id === x);
373
+ k(L ? x : null);
374
374
  }
375
375
  }, [w.menus]);
376
- const LA = (m) => {
377
- var y;
376
+ const QA = (m) => {
377
+ var x;
378
378
  if (k(m), m === null)
379
379
  localStorage.removeItem("moduleSwitcherGroupId");
380
380
  else {
381
381
  localStorage.setItem("moduleSwitcherGroupId", String(m));
382
- const S = w.menus.find((tA) => tA.id === m), v = (y = S == null ? void 0 : S.items[0]) == null ? void 0 : y.to;
382
+ const L = w.menus.find((rA) => rA.id === m), v = (x = L == null ? void 0 : L.items[0]) == null ? void 0 : x.to;
383
383
  v && B(v);
384
384
  }
385
- }, GA = cA(() => {
386
- if (H !== null)
385
+ }, bA = gA(() => {
386
+ if (N !== null)
387
387
  return w.menus.filter(
388
- (S) => S.id === H || S.parentGroupId === H
388
+ (L) => L.id === N || L.parentGroupId === N
389
389
  );
390
- const m = w.menus.filter((S) => S.parentGroupId === void 0), y = w.menus.filter((S) => S.parentGroupId !== void 0).flatMap((S) => S.items);
391
- return y.length === 0 ? m : [
390
+ const m = w.menus.filter((L) => L.parentGroupId === void 0), x = w.menus.filter((L) => L.parentGroupId !== void 0).flatMap((L) => L.items);
391
+ return x.length === 0 ? m : [
392
392
  ...m,
393
- { id: 18, name: "Pengaturan", items: y, parentGroupId: void 0 }
393
+ { id: 18, name: "Pengaturan", items: x, parentGroupId: void 0 }
394
394
  ];
395
- }, [w.menus, H]);
395
+ }, [w.menus, N]);
396
396
  return W(() => {
397
- g || AA(!1);
397
+ g || eA(!1);
398
398
  }, [g]), Q ? /* @__PURE__ */ A("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "#f9fafb" }, children: e || /* @__PURE__ */ A(UA, {}) }) : /* @__PURE__ */ s(U, { children: [
399
399
  /* @__PURE__ */ s(
400
400
  "div",
@@ -404,8 +404,8 @@ function Ft({
404
404
  height: "100vh",
405
405
  // backgroundColor: "#f9fafb",
406
406
  position: "relative",
407
- "--app-sidebar-width": h ? "0px" : N ? "4rem" : "16rem",
408
- "--app-footer-zindex": h && x ? "40" : "999"
407
+ "--app-sidebar-width": h ? "0px" : F ? "4rem" : "16rem",
408
+ "--app-footer-zindex": h && f ? "40" : "999"
409
409
  },
410
410
  children: [
411
411
  h && /* @__PURE__ */ A(
@@ -416,23 +416,23 @@ function Ft({
416
416
  inset: 0,
417
417
  backgroundColor: "rgba(0, 0, 0, 0.5)",
418
418
  zIndex: 40,
419
- opacity: x ? 0.5 : 0,
420
- pointerEvents: x ? "auto" : "none",
419
+ opacity: f ? 0.5 : 0,
420
+ pointerEvents: f ? "auto" : "none",
421
421
  transition: "opacity 0.3s"
422
422
  },
423
- onClick: () => u(!1)
423
+ onClick: () => I(!1)
424
424
  }
425
425
  ),
426
426
  /* @__PURE__ */ s(
427
427
  "aside",
428
428
  {
429
429
  style: {
430
- width: h ? "16rem" : N ? "4rem" : "16rem",
430
+ width: h ? "16rem" : F ? "4rem" : "16rem",
431
431
  position: h ? "fixed" : "relative",
432
432
  ...h && {
433
433
  inset: 0,
434
434
  zIndex: 50,
435
- transform: x ? "translateX(0)" : "translateX(-100%)"
435
+ transform: f ? "translateX(0)" : "translateX(-100%)"
436
436
  },
437
437
  backgroundColor: "white",
438
438
  borderRight: "1px solid #e5e7eb",
@@ -476,7 +476,7 @@ function Ft({
476
476
  }
477
477
  }
478
478
  ),
479
- (!N || x) && /* @__PURE__ */ A(
479
+ (!F || f) && /* @__PURE__ */ A(
480
480
  "span",
481
481
  {
482
482
  style: {
@@ -494,7 +494,7 @@ function Ft({
494
494
  h && /* @__PURE__ */ A(
495
495
  "button",
496
496
  {
497
- onClick: () => u(!1),
497
+ onClick: () => I(!1),
498
498
  style: {
499
499
  padding: "0.375rem",
500
500
  borderRadius: "0.5rem",
@@ -530,7 +530,7 @@ function Ft({
530
530
  !h && /* @__PURE__ */ A(
531
531
  "button",
532
532
  {
533
- onClick: () => R(!N),
533
+ onClick: () => R(!F),
534
534
  style: {
535
535
  position: "absolute",
536
536
  top: "1.5rem",
@@ -560,7 +560,7 @@ function Ft({
560
560
  stroke: "currentColor",
561
561
  viewBox: "0 0 24 24",
562
562
  strokeWidth: "2",
563
- children: N ? (
563
+ children: F ? (
564
564
  // Icon when collapsed (closed) - sidebar with arrow right
565
565
  /* @__PURE__ */ s(U, { children: [
566
566
  /* @__PURE__ */ A(
@@ -608,22 +608,22 @@ function Ft({
608
608
  c && /* @__PURE__ */ A(
609
609
  Ge,
610
610
  {
611
- collapsed: h ? !1 : N,
611
+ collapsed: h ? !1 : F,
612
612
  children: c
613
613
  }
614
614
  ),
615
615
  /* @__PURE__ */ A(
616
616
  "div",
617
617
  {
618
- ref: G,
618
+ ref: S,
619
619
  style: {
620
620
  flex: 1,
621
621
  overflowY: "auto",
622
622
  paddingTop: "0.5rem",
623
623
  paddingBottom: "0.5rem"
624
624
  },
625
- children: GA.map((m) => /* @__PURE__ */ s("div", { style: { marginBottom: "1rem" }, children: [
626
- (!N || h) && /* @__PURE__ */ A(
625
+ children: bA.map((m) => /* @__PURE__ */ s("div", { style: { marginBottom: "1rem" }, children: [
626
+ (!F || h) && /* @__PURE__ */ A(
627
627
  "div",
628
628
  {
629
629
  style: {
@@ -641,43 +641,43 @@ function Ft({
641
641
  children: m.name
642
642
  }
643
643
  ),
644
- /* @__PURE__ */ A("div", { style: { paddingLeft: "0.5rem", paddingRight: "0.5rem", display: "flex", flexDirection: "column", gap: "var(--starasia-ui-spacing-xs)" }, children: m.items.map((y) => {
645
- const S = y.children && y.children.length > 0, v = P.has(y.id), tA = S ? y.children.some(($) => iA($.to)) : iA(y.to);
646
- return /* @__PURE__ */ s("div", { "data-menu-active": tA || void 0, children: [
644
+ /* @__PURE__ */ A("div", { style: { paddingLeft: "0.5rem", paddingRight: "0.5rem", display: "flex", flexDirection: "column", gap: "var(--starasia-ui-spacing-xs)" }, children: m.items.map((x) => {
645
+ const L = x.children && x.children.length > 0, v = P.has(x.id), rA = L ? x.children.some((_) => X(_.to)) : X(x.to);
646
+ return /* @__PURE__ */ s("div", { "data-menu-active": rA || void 0, children: [
647
647
  /* @__PURE__ */ s(
648
648
  "button",
649
649
  {
650
650
  onClick: () => {
651
- S ? sA(y.id) : B(y.to);
651
+ L ? tA(x.id) : B(x.to);
652
652
  },
653
653
  style: {
654
654
  width: "100%",
655
655
  display: "flex",
656
656
  alignItems: "center",
657
- justifyContent: N && !h ? "center" : void 0,
657
+ justifyContent: F && !h ? "center" : void 0,
658
658
  gap: "0.75rem",
659
- paddingLeft: N && !h ? "0" : "0.75rem",
660
- paddingRight: N && !h ? "0" : "0.75rem",
659
+ paddingLeft: F && !h ? "0" : "0.75rem",
660
+ paddingRight: F && !h ? "0" : "0.75rem",
661
661
  paddingTop: "0.5rem",
662
662
  paddingBottom: "0.5rem",
663
663
  borderRadius: "var(--starasia-ui-radii-md)",
664
664
  textAlign: "left",
665
665
  border: "none",
666
- backgroundColor: tA ? "var(--starasia-ui-brand-primary-tertiary)" : "transparent",
667
- color: tA ? "var(--starasia-ui-brand-primary-default)" : "#374151",
666
+ backgroundColor: rA ? "var(--starasia-ui-brand-primary-tertiary)" : "transparent",
667
+ color: rA ? "var(--starasia-ui-brand-primary-default)" : "#374151",
668
668
  transition: "all 0.2s",
669
669
  cursor: "pointer"
670
670
  },
671
- title: N && !h ? y.title : void 0,
672
- onMouseEnter: ($) => {
673
- tA || ($.currentTarget.style.backgroundColor = "#f3f4f6");
671
+ title: F && !h ? x.title : void 0,
672
+ onMouseEnter: (_) => {
673
+ rA || (_.currentTarget.style.backgroundColor = "#f3f4f6");
674
674
  },
675
- onMouseLeave: ($) => {
676
- tA || ($.currentTarget.style.backgroundColor = "transparent");
675
+ onMouseLeave: (_) => {
676
+ rA || (_.currentTarget.style.backgroundColor = "transparent");
677
677
  },
678
678
  children: [
679
- /* @__PURE__ */ A(M, { name: y.icon, size: "sm", style: { flexShrink: 0 } }),
680
- (!N || h) && /* @__PURE__ */ s(U, { children: [
679
+ /* @__PURE__ */ A(M, { name: x.icon, size: "sm", style: { flexShrink: 0 } }),
680
+ (!F || h) && /* @__PURE__ */ s(U, { children: [
681
681
  /* @__PURE__ */ A(
682
682
  "span",
683
683
  {
@@ -688,10 +688,10 @@ function Ft({
688
688
  transition: "opacity 0.3s",
689
689
  flex: 1
690
690
  },
691
- children: y.title
691
+ children: x.title
692
692
  }
693
693
  ),
694
- S && /* @__PURE__ */ A(
694
+ L && /* @__PURE__ */ A(
695
695
  "svg",
696
696
  {
697
697
  style: {
@@ -719,7 +719,7 @@ function Ft({
719
719
  ]
720
720
  }
721
721
  ),
722
- S && (!N || h) && /* @__PURE__ */ A(
722
+ L && (!F || h) && /* @__PURE__ */ A(
723
723
  "div",
724
724
  {
725
725
  style: {
@@ -728,14 +728,14 @@ function Ft({
728
728
  borderLeft: "1px solid #e5e7eb",
729
729
  overflow: "hidden",
730
730
  transition: "all 0.3s ease-in-out",
731
- maxHeight: v ? `${y.children.length * 44}px` : "0px",
731
+ maxHeight: v ? `${x.children.length * 44}px` : "0px",
732
732
  opacity: v ? 1 : 0,
733
733
  marginTop: v ? "0.25rem" : "0px"
734
734
  },
735
- children: y.children.map(($) => /* @__PURE__ */ s(
735
+ children: x.children.map((_) => /* @__PURE__ */ s(
736
736
  "button",
737
737
  {
738
- onClick: () => B($.to),
738
+ onClick: () => B(_.to),
739
739
  style: {
740
740
  width: "100%",
741
741
  display: "flex",
@@ -748,22 +748,22 @@ function Ft({
748
748
  borderRadius: "var(--starasia-ui-radii-md)",
749
749
  textAlign: "left",
750
750
  border: "none",
751
- backgroundColor: iA($.to) ? "var(--starasia-ui-brand-primary-tertiary)" : "transparent",
752
- color: iA($.to) ? "var(--starasia-ui-brand-primary-default)" : "#4b5563",
751
+ backgroundColor: X(_.to) ? "var(--starasia-ui-brand-primary-tertiary)" : "transparent",
752
+ color: X(_.to) ? "var(--starasia-ui-brand-primary-default)" : "#4b5563",
753
753
  transition: "all 0.2s",
754
754
  cursor: "pointer"
755
755
  },
756
756
  onMouseEnter: (OA) => {
757
- iA($.to) || (OA.currentTarget.style.backgroundColor = "#f3f4f6");
757
+ X(_.to) || (OA.currentTarget.style.backgroundColor = "#f3f4f6");
758
758
  },
759
759
  onMouseLeave: (OA) => {
760
- iA($.to) || (OA.currentTarget.style.backgroundColor = "transparent");
760
+ X(_.to) || (OA.currentTarget.style.backgroundColor = "transparent");
761
761
  },
762
762
  children: [
763
763
  /* @__PURE__ */ A(
764
764
  M,
765
765
  {
766
- name: $.icon,
766
+ name: _.icon,
767
767
  size: "sm",
768
768
  style: { flexShrink: 0 }
769
769
  }
@@ -776,16 +776,16 @@ function Ft({
776
776
  fontWeight: "500",
777
777
  whiteSpace: "nowrap"
778
778
  },
779
- children: $.title
779
+ children: _.title
780
780
  }
781
781
  )
782
782
  ]
783
783
  },
784
- $.id
784
+ _.id
785
785
  ))
786
786
  }
787
787
  )
788
- ] }, y.id);
788
+ ] }, x.id);
789
789
  }) })
790
790
  ] }, m.id))
791
791
  }
@@ -813,7 +813,7 @@ function Ft({
813
813
  h && /* @__PURE__ */ A(
814
814
  "button",
815
815
  {
816
- onClick: () => u(!0),
816
+ onClick: () => I(!0),
817
817
  style: {
818
818
  padding: "0.375rem",
819
819
  borderRadius: "0.5rem",
@@ -849,7 +849,7 @@ function Ft({
849
849
  /* @__PURE__ */ A(
850
850
  "button",
851
851
  {
852
- onClick: () => AA(!0),
852
+ onClick: () => eA(!0),
853
853
  style: {
854
854
  display: "inline-flex",
855
855
  alignItems: "center",
@@ -872,7 +872,7 @@ function Ft({
872
872
  children: /* @__PURE__ */ A(M, { name: "GridApplication", size: "sm" })
873
873
  }
874
874
  ),
875
- H !== null && /* @__PURE__ */ A(
875
+ N !== null && /* @__PURE__ */ A(
876
876
  "span",
877
877
  {
878
878
  style: {
@@ -897,7 +897,7 @@ function Ft({
897
897
  gap: "0.75rem",
898
898
  cursor: "pointer"
899
899
  },
900
- onClick: F,
900
+ onClick: z,
901
901
  children: [
902
902
  /* @__PURE__ */ s("div", { style: { textAlign: "right", maxWidth: "12.5rem" }, children: [
903
903
  /* @__PURE__ */ A(
@@ -986,28 +986,28 @@ function Ft({
986
986
  }
987
987
  ),
988
988
  g && /* @__PURE__ */ A(
989
- Oe,
989
+ be,
990
990
  {
991
991
  isShow: V,
992
- onHide: () => AA(!1),
992
+ onHide: () => eA(!1),
993
993
  menus: w.menus.filter((m) => m.parentGroupId === void 0),
994
- selectedGroupId: H,
995
- onSelect: LA
994
+ selectedGroupId: N,
995
+ onSelect: QA
996
996
  }
997
997
  ),
998
- /* @__PURE__ */ s(dA, { isShow: j, onHide: f, children: [
998
+ /* @__PURE__ */ s(hA, { isShow: j, onHide: q, children: [
999
999
  /* @__PURE__ */ A(wA, { children: "Confirmation Logout" }),
1000
- /* @__PURE__ */ A(hA, { children: "Are you sure you want to end the session and exit the page?" }),
1001
- /* @__PURE__ */ A(yA, { children: /* @__PURE__ */ A(a, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ s(T, { direction: "row", gap: "sm", align: "center", children: [
1002
- /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(O, { secondary: !0, onClick: f, children: "Cancel" }) }),
1003
- /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(O, { primary: !0, onClick: J, children: "Yes, Sure" }) })
1000
+ /* @__PURE__ */ A(DA, { children: "Are you sure you want to end the session and exit the page?" }),
1001
+ /* @__PURE__ */ A(fA, { children: /* @__PURE__ */ A(a, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ s(T, { direction: "row", gap: "sm", align: "center", children: [
1002
+ /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(b, { secondary: !0, onClick: q, children: "Cancel" }) }),
1003
+ /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(b, { primary: !0, onClick: H, children: "Yes, Sure" }) })
1004
1004
  ] }) }) })
1005
1005
  ] })
1006
1006
  ] });
1007
1007
  }
1008
- const zt = _(
1008
+ const zt = AA(
1009
1009
  ({ children: e, coverImage: i, logo: r }) => {
1010
- const o = X("md"), t = De();
1010
+ const o = $("md"), t = De();
1011
1011
  return /* @__PURE__ */ s(
1012
1012
  a,
1013
1013
  {
@@ -1093,7 +1093,7 @@ const zt = _(
1093
1093
  }
1094
1094
  );
1095
1095
  }
1096
- ), be = (e, i) => {
1096
+ ), Oe = (e, i) => {
1097
1097
  const r = [];
1098
1098
  if (i === 0)
1099
1099
  return r.push(e), r;
@@ -1102,7 +1102,7 @@ const zt = _(
1102
1102
  r.push(t);
1103
1103
  }
1104
1104
  return r;
1105
- }, Ye = _(
1105
+ }, Ye = AA(
1106
1106
  ({
1107
1107
  value: e,
1108
1108
  label: i,
@@ -1111,14 +1111,14 @@ const zt = _(
1111
1111
  lastIndex: t,
1112
1112
  labelAlign: n = "top"
1113
1113
  }) => {
1114
- const l = cA(
1114
+ const l = gA(
1115
1115
  () => ({
1116
1116
  padding: 0,
1117
1117
  paddingBottom: t ? 0 : 8,
1118
1118
  verticalAlign: n
1119
1119
  }),
1120
1120
  [t]
1121
- ), c = cA(
1121
+ ), c = gA(
1122
1122
  () => ({
1123
1123
  padding: 0,
1124
1124
  paddingRight: 8,
@@ -1128,13 +1128,13 @@ const zt = _(
1128
1128
  }),
1129
1129
  [t]
1130
1130
  ), g = () => typeof i == "string" ? /* @__PURE__ */ A(d, { fontWeight: "medium", color: "gray-500", children: i }) : i, C = () => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ A(d, { color: "text", fontWeight: "medium", children: e }) : e;
1131
- return /* @__PURE__ */ s(QA, { children: [
1131
+ return /* @__PURE__ */ s(dA, { children: [
1132
1132
  /* @__PURE__ */ A(CA, { style: l, width: o, children: g() }),
1133
1133
  r ? /* @__PURE__ */ A(CA, { style: c, width: 24, children: /* @__PURE__ */ A(d, { fontWeight: "medium", color: "gray-500", children: ":" }) }) : null,
1134
1134
  /* @__PURE__ */ A(CA, { style: l, children: C() })
1135
1135
  ] });
1136
1136
  }
1137
- ), pe = _(({ fields: e, separator: i, labelWidth: r }) => /* @__PURE__ */ A(_A, { children: e.map((o, t) => /* @__PURE__ */ A(
1137
+ ), pe = AA(({ fields: e, separator: i, labelWidth: r }) => /* @__PURE__ */ A(_A, { children: e.map((o, t) => /* @__PURE__ */ A(
1138
1138
  Ye,
1139
1139
  {
1140
1140
  separator: i,
@@ -1143,7 +1143,7 @@ const zt = _(
1143
1143
  ...o
1144
1144
  },
1145
1145
  `field-group-field-${t}`
1146
- )) })), Kt = _(
1146
+ )) })), Kt = AA(
1147
1147
  ({
1148
1148
  maxRow: e = 0,
1149
1149
  maxColumn: i = 2,
@@ -1151,8 +1151,8 @@ const zt = _(
1151
1151
  fields: o = [],
1152
1152
  labelWidth: t = 150
1153
1153
  }) => {
1154
- const n = cA(
1155
- () => be(o, e),
1154
+ const n = gA(
1155
+ () => Oe(o, e),
1156
1156
  [o, e]
1157
1157
  ), l = n.length > 2, c = () => {
1158
1158
  switch (i) {
@@ -1223,20 +1223,20 @@ const zt = _(
1223
1223
  }, g = () => {
1224
1224
  switch (l) {
1225
1225
  case "info":
1226
- return /* @__PURE__ */ A(O, { primary: !0, onClick: o, children: n });
1226
+ return /* @__PURE__ */ A(b, { primary: !0, onClick: o, children: n });
1227
1227
  case "danger":
1228
- return /* @__PURE__ */ A(O, { danger: !0, onClick: o, children: n });
1228
+ return /* @__PURE__ */ A(b, { danger: !0, onClick: o, children: n });
1229
1229
  case "success":
1230
- return /* @__PURE__ */ A(O, { success: !0, onClick: o, children: n });
1230
+ return /* @__PURE__ */ A(b, { success: !0, onClick: o, children: n });
1231
1231
  default:
1232
- return /* @__PURE__ */ A(O, { primary: !0, onClick: o, children: n });
1232
+ return /* @__PURE__ */ A(b, { primary: !0, onClick: o, children: n });
1233
1233
  }
1234
1234
  };
1235
- return /* @__PURE__ */ s(dA, { isShow: t, onHide: r, children: [
1235
+ return /* @__PURE__ */ s(hA, { isShow: t, onHide: r, children: [
1236
1236
  c(),
1237
- /* @__PURE__ */ A(hA, { children: /* @__PURE__ */ A(d, { children: i }) }),
1238
- /* @__PURE__ */ A(yA, { children: /* @__PURE__ */ s(a, { justify: "flex-end", direction: "row", gap: "sm", children: [
1239
- /* @__PURE__ */ A(O, { secondary: !0, onClick: r, children: "Cancel" }),
1237
+ /* @__PURE__ */ A(DA, { children: /* @__PURE__ */ A(d, { children: i }) }),
1238
+ /* @__PURE__ */ A(fA, { children: /* @__PURE__ */ s(a, { justify: "flex-end", direction: "row", gap: "sm", children: [
1239
+ /* @__PURE__ */ A(b, { secondary: !0, onClick: r, children: "Cancel" }),
1240
1240
  g()
1241
1241
  ] }) })
1242
1242
  ] });
@@ -1251,7 +1251,7 @@ const zt = _(
1251
1251
  ...i,
1252
1252
  children: e
1253
1253
  }
1254
- ), BA = _(je), Ne = ({
1254
+ ), BA = AA(je), Ne = ({
1255
1255
  backButton: e,
1256
1256
  title: i,
1257
1257
  titleTag: r,
@@ -1262,25 +1262,25 @@ const zt = _(
1262
1262
  containerProps: c,
1263
1263
  headerProps: g
1264
1264
  }) => {
1265
- const C = X("lg"), Q = ie(), w = e == null ? void 0 : e.show, B = () => {
1265
+ const C = $("lg"), Q = ie(), w = e == null ? void 0 : e.show, B = () => {
1266
1266
  if (typeof (e == null ? void 0 : e.onClick) == "function") {
1267
1267
  e.onClick();
1268
1268
  return;
1269
1269
  }
1270
1270
  Q(-1, { replace: !0 });
1271
- }, I = () => n ? ee(n) ? n : /* @__PURE__ */ A(a, { direction: "row", gap: "lg", children: n.map(
1272
- ({ title: p, icon: N, buttonProps: R, onClick: x }, u) => !p && !N ? null : /* @__PURE__ */ A(
1273
- O,
1271
+ }, u = () => n ? ee(n) ? n : /* @__PURE__ */ A(a, { direction: "row", gap: "lg", children: n.map(
1272
+ ({ title: p, icon: F, buttonProps: R, onClick: f }, I) => !p && !F ? null : /* @__PURE__ */ A(
1273
+ b,
1274
1274
  {
1275
1275
  fullWidth: !C,
1276
- iconLeft: N ? /* @__PURE__ */ A(M, { name: N, size: "md" }) : void 0,
1277
- onClick: x,
1276
+ iconLeft: F ? /* @__PURE__ */ A(M, { name: F, size: "md" }) : void 0,
1277
+ onClick: f,
1278
1278
  ...R,
1279
1279
  children: p
1280
1280
  },
1281
- `action-${u}`
1281
+ `action-${I}`
1282
1282
  )
1283
- ) }) : null, L = () => e != null && e.navigateTo ? /* @__PURE__ */ A(a, { direction: "row", children: /* @__PURE__ */ A(
1283
+ ) }) : null, G = () => e != null && e.navigateTo ? /* @__PURE__ */ A(a, { direction: "row", children: /* @__PURE__ */ A(
1284
1284
  me,
1285
1285
  {
1286
1286
  to: e.navigateTo,
@@ -1342,7 +1342,7 @@ const zt = _(
1342
1342
  paddingInline: (g == null ? void 0 : g.paddingInline) || "xl",
1343
1343
  ...g,
1344
1344
  children: [
1345
- w && L(),
1345
+ w && G(),
1346
1346
  /* @__PURE__ */ s(
1347
1347
  a,
1348
1348
  {
@@ -1355,7 +1355,7 @@ const zt = _(
1355
1355
  /* @__PURE__ */ A(d, { variant: "h2", fontWeight: "semibold", fontFamily: "Poppins", children: i }),
1356
1356
  r && /* @__PURE__ */ A(VA, { border: !0, size: "lg", text: r, ...l })
1357
1357
  ] }) : i,
1358
- I()
1358
+ u()
1359
1359
  ]
1360
1360
  }
1361
1361
  )
@@ -1366,10 +1366,10 @@ const zt = _(
1366
1366
  t && h(),
1367
1367
  j()
1368
1368
  ] });
1369
- }, Ht = _(Ne), Fe = {
1369
+ }, Ht = AA(Ne), Fe = {
1370
1370
  icon: "Cross",
1371
1371
  title: ""
1372
- }, SA = ZA(
1372
+ }, GA = ZA(
1373
1373
  ({
1374
1374
  onHide: e,
1375
1375
  show: i,
@@ -1435,9 +1435,9 @@ const zt = _(
1435
1435
  ] })
1436
1436
  }
1437
1437
  ) })
1438
- ), ze = _(
1438
+ ), ze = AA(
1439
1439
  ({ children: e, borderBottom: i = !0, padding: r = !0 }) => {
1440
- const o = X("lg");
1440
+ const o = $("lg");
1441
1441
  return /* @__PURE__ */ A(
1442
1442
  a,
1443
1443
  {
@@ -1452,8 +1452,8 @@ const zt = _(
1452
1452
  }
1453
1453
  );
1454
1454
  }
1455
- ), Ke = _(({ children: e }) => {
1456
- const i = X("lg");
1455
+ ), Ke = AA(({ children: e }) => {
1456
+ const i = $("lg");
1457
1457
  return /* @__PURE__ */ A(
1458
1458
  a,
1459
1459
  {
@@ -1463,7 +1463,7 @@ const zt = _(
1463
1463
  children: e
1464
1464
  }
1465
1465
  );
1466
- }), Jt = _(
1466
+ }), Jt = AA(
1467
1467
  ({
1468
1468
  children: e,
1469
1469
  title: i,
@@ -1478,27 +1478,27 @@ const zt = _(
1478
1478
  searchHighlightPlaceholder: Q = "CTRL + K",
1479
1479
  filterContainer: w,
1480
1480
  actionContainer: B,
1481
- headerProps: I = { borderBottom: !0 },
1482
- variantTag: L = "info"
1481
+ headerProps: u = { borderBottom: !0 },
1482
+ variantTag: G = "info"
1483
1483
  }) => {
1484
- const h = X("lg"), [j, p] = uA(), N = j.get(g), R = DA(j.toString()), x = HA(
1484
+ const h = $("lg"), [j, p] = kA(), F = j.get(g), R = IA(j.toString()), f = HA(
1485
1485
  ({ target: { value: V } }) => {
1486
1486
  c && c(V), g && p({ ...R, [g]: V });
1487
1487
  },
1488
1488
  [g, c, p, R]
1489
- ), u = () => /* @__PURE__ */ A(
1490
- IA,
1489
+ ), I = () => /* @__PURE__ */ A(
1490
+ uA,
1491
1491
  {
1492
1492
  placeholder: C,
1493
1493
  highlightPlaceholder: Q,
1494
1494
  leftIcon: /* @__PURE__ */ A(M, { name: "Search", width: 20, height: 20 }),
1495
- onChange: x,
1495
+ onChange: f,
1496
1496
  style: { width: "100%" },
1497
- value: N || ""
1497
+ value: F || ""
1498
1498
  }
1499
1499
  ), P = () => r ? /* @__PURE__ */ s(a, { direction: "row", gap: "sm", align: "center", children: [
1500
1500
  /* @__PURE__ */ A(d, { fontWeight: "medium", children: i }),
1501
- /* @__PURE__ */ A(VA, { border: !0, text: r, variant: L })
1501
+ /* @__PURE__ */ A(VA, { border: !0, text: r, variant: G })
1502
1502
  ] }) : /* @__PURE__ */ A(d, { fontWeight: "medium", children: i });
1503
1503
  return /* @__PURE__ */ s(
1504
1504
  a,
@@ -1507,7 +1507,7 @@ const zt = _(
1507
1507
  borderRadius: "rounded-md",
1508
1508
  variant: "section",
1509
1509
  children: [
1510
- l !== null ? /* @__PURE__ */ A(ze, { ...I, children: l || /* @__PURE__ */ s(
1510
+ l !== null ? /* @__PURE__ */ A(ze, { ...u, children: l || /* @__PURE__ */ s(
1511
1511
  a,
1512
1512
  {
1513
1513
  direction: "row",
@@ -1521,7 +1521,7 @@ const zt = _(
1521
1521
  {
1522
1522
  style: h ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
1523
1523
  ...B,
1524
- children: o || (n ? u() : null)
1524
+ children: o || (n ? I() : null)
1525
1525
  }
1526
1526
  )
1527
1527
  ]
@@ -1533,7 +1533,7 @@ const zt = _(
1533
1533
  );
1534
1534
  }
1535
1535
  ), Ze = "#E6E9FB", He = ({ children: e, onClick: i }) => {
1536
- const [r, o] = b("");
1536
+ const [r, o] = O("");
1537
1537
  return /* @__PURE__ */ A(
1538
1538
  BA,
1539
1539
  {
@@ -1554,7 +1554,7 @@ const zt = _(
1554
1554
  children: e
1555
1555
  }
1556
1556
  );
1557
- }, Je = _(He), qe = ({
1557
+ }, Je = AA(He), qe = ({
1558
1558
  icon: e,
1559
1559
  items: i = [],
1560
1560
  style: r,
@@ -1565,7 +1565,7 @@ const zt = _(
1565
1565
  iconProps: c,
1566
1566
  variant: g = "default"
1567
1567
  }) => {
1568
- const C = cA(
1568
+ const C = gA(
1569
1569
  () => ({
1570
1570
  zIndex: 10,
1571
1571
  width: "150px",
@@ -1574,9 +1574,9 @@ const zt = _(
1574
1574
  [t]
1575
1575
  );
1576
1576
  return /* @__PURE__ */ s(ge, { position: n, style: r, children: [
1577
- /* @__PURE__ */ A(se, { style: o, children: /* @__PURE__ */ A(O, { size: "sm", secondary: !0, ...l, children: /* @__PURE__ */ A(M, { name: e, ...c }) }) }),
1577
+ /* @__PURE__ */ A(se, { style: o, children: /* @__PURE__ */ A(b, { size: "sm", secondary: !0, ...l, children: /* @__PURE__ */ A(M, { name: e, ...c }) }) }),
1578
1578
  /* @__PURE__ */ A(ae, { style: C, children: i.map((Q, w) => g === "outline-button" ? /* @__PURE__ */ A(Ce, { children: /* @__PURE__ */ s(
1579
- O,
1579
+ b,
1580
1580
  {
1581
1581
  size: "sm",
1582
1582
  secondary: !0,
@@ -1601,7 +1601,7 @@ const zt = _(
1601
1601
  Q.id || w
1602
1602
  )) })
1603
1603
  ] });
1604
- }, qt = _(qe), oe = gA.memo(({ text: e, onClose: i }) => {
1604
+ }, qt = AA(qe), oe = sA.memo(({ text: e, onClose: i }) => {
1605
1605
  var o, t;
1606
1606
  const r = KA();
1607
1607
  return /* @__PURE__ */ s(
@@ -1642,7 +1642,7 @@ const zt = _(
1642
1642
  ]
1643
1643
  }
1644
1644
  );
1645
- }), Te = gA.memo(({ items: e = [], onClose: i }) => /* @__PURE__ */ A(
1645
+ }), Te = sA.memo(({ items: e = [], onClose: i }) => /* @__PURE__ */ A(
1646
1646
  a,
1647
1647
  {
1648
1648
  direction: "row",
@@ -1672,10 +1672,10 @@ const zt = _(
1672
1672
  }
1673
1673
  let r = new Date(e);
1674
1674
  return r = typeof e != "object" ? void 0 : r, r;
1675
- }, Re = gA.memo(({ title: e, resetButton: i }) => /* @__PURE__ */ s(a, { direction: "row", justify: "space-between", marginBottom: "md", children: [
1675
+ }, Re = sA.memo(({ title: e, resetButton: i }) => /* @__PURE__ */ s(a, { direction: "row", justify: "space-between", marginBottom: "md", children: [
1676
1676
  /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(d, { fontWeight: "bold", children: e }) }),
1677
1677
  /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(BA, { onClick: i == null ? void 0 : i.onClick, children: /* @__PURE__ */ A(d, { fontWeight: "bold", color: "error", children: (i == null ? void 0 : i.label) || "Reset" }) }) })
1678
- ] })), ve = gA.memo(
1678
+ ] })), ve = sA.memo(
1679
1679
  ({ value: e, options: i = [], onChange: r, multiple: o }) => {
1680
1680
  const t = (e == null ? void 0 : e.map((c) => c.value)) || [], n = (i == null ? void 0 : i.filter((c) => t.includes(c.value))) || [], l = (c) => {
1681
1681
  const g = [...n];
@@ -1683,7 +1683,7 @@ const zt = _(
1683
1683
  o ? C = t.includes(c.value) ? g.filter((Q) => Q.value !== c.value) : [...g, c] : C = [c], r == null || r(C);
1684
1684
  };
1685
1685
  return /* @__PURE__ */ A(a, { direction: "row", gap: "sm", flexWrap: "wrap", children: i == null ? void 0 : i.map((c, g) => /* @__PURE__ */ A(
1686
- O,
1686
+ b,
1687
1687
  {
1688
1688
  ...t.includes(c.value) ? { primary: !0 } : { secondary: !0 },
1689
1689
  onClick: () => l(c),
@@ -1692,7 +1692,7 @@ const zt = _(
1692
1692
  g
1693
1693
  )) });
1694
1694
  }
1695
- ), ne = gA.memo(
1695
+ ), ne = sA.memo(
1696
1696
  ZA(
1697
1697
  ({
1698
1698
  label: e,
@@ -1708,28 +1708,28 @@ const zt = _(
1708
1708
  onSearch: Q,
1709
1709
  value: w,
1710
1710
  dateFilter: B,
1711
- enableInputDate: I,
1712
- withSearchParam: L,
1711
+ enableInputDate: u,
1712
+ withSearchParam: G,
1713
1713
  // disabled,
1714
1714
  rangedDate: h,
1715
1715
  disabled: j,
1716
1716
  inputTextType: p = "text",
1717
- min: N,
1717
+ min: F,
1718
1718
  max: R
1719
- }, x) => {
1720
- const u = t == null ? void 0 : t.length;
1719
+ }, f) => {
1720
+ const I = t == null ? void 0 : t.length;
1721
1721
  let P;
1722
- const Z = () => {
1722
+ const K = () => {
1723
1723
  switch (i) {
1724
1724
  case "dropdown":
1725
1725
  return /* @__PURE__ */ A(
1726
- xA,
1726
+ SA,
1727
1727
  {
1728
1728
  onSearch: Q,
1729
1729
  multiSelect: g,
1730
1730
  searchAble: C,
1731
1731
  placeholder: n,
1732
- onChange: (H) => o == null ? void 0 : o({ value: H, name: c, type: i }),
1732
+ onChange: (N) => o == null ? void 0 : o({ value: N, name: c, type: i }),
1733
1733
  dropdownLists: r || [],
1734
1734
  defaultValue: w || RA()
1735
1735
  }
@@ -1738,12 +1738,12 @@ const zt = _(
1738
1738
  return /* @__PURE__ */ A(
1739
1739
  XA,
1740
1740
  {
1741
- input: I,
1741
+ input: u,
1742
1742
  filter: B,
1743
1743
  value: We(w || P, h),
1744
- onChange: (H) => o == null ? void 0 : o({ value: H, name: c, type: i }),
1744
+ onChange: (N) => o == null ? void 0 : o({ value: N, name: c, type: i }),
1745
1745
  rangedDate: h,
1746
- ref: x
1746
+ ref: f
1747
1747
  }
1748
1748
  );
1749
1749
  case "select-button":
@@ -1752,48 +1752,65 @@ const zt = _(
1752
1752
  {
1753
1753
  multiple: g,
1754
1754
  value: w || RA(),
1755
- onChange: (H) => o == null ? void 0 : o({ value: H, name: c, type: i }),
1755
+ onChange: (N) => o == null ? void 0 : o({ value: N, name: c, type: i }),
1756
1756
  options: r
1757
1757
  }
1758
1758
  );
1759
1759
  case "text":
1760
1760
  return /* @__PURE__ */ A(
1761
- IA,
1761
+ uA,
1762
1762
  {
1763
- onChange: ({ target: { value: H } }) => o == null ? void 0 : o({ value: H, name: c, type: i }),
1763
+ onChange: ({ target: { value: N } }) => o == null ? void 0 : o({ value: N, name: c, type: i }),
1764
1764
  value: w || P,
1765
1765
  placeholder: n,
1766
1766
  disabled: j,
1767
1767
  type: p,
1768
1768
  name: c,
1769
- ...p === "number" && { min: N, max: R },
1769
+ ...p === "number" && { min: F, max: R },
1770
1770
  ...(!p || p === "text") && {
1771
- minLength: N,
1771
+ minLength: F,
1772
1772
  maxLength: R
1773
1773
  }
1774
1774
  }
1775
1775
  );
1776
+ case "checkbox":
1777
+ return /* @__PURE__ */ A(a, { children: r == null ? void 0 : r.map((N) => {
1778
+ const k = Array.isArray(w) && w.includes(N.value);
1779
+ return /* @__PURE__ */ A(
1780
+ xA,
1781
+ {
1782
+ label: N.label,
1783
+ checked: k,
1784
+ sizes: "sm",
1785
+ onChange: (S) => {
1786
+ const E = Array.isArray(w) ? w : [], D = S.target.checked ? [...E, N.value] : E.filter((z) => z !== N.value);
1787
+ o == null || o({ value: D, name: c, type: i });
1788
+ }
1789
+ },
1790
+ N.value
1791
+ );
1792
+ }) });
1776
1793
  default:
1777
1794
  return null;
1778
1795
  }
1779
1796
  };
1780
- return u ? /* @__PURE__ */ A(a, { marginBottom: "lg", children: t == null ? void 0 : t.map((H, k) => /* @__PURE__ */ A(
1797
+ return I ? /* @__PURE__ */ A(a, { marginBottom: "lg", children: t == null ? void 0 : t.map((N, k) => /* @__PURE__ */ A(
1781
1798
  ne,
1782
1799
  {
1783
- ref: x,
1800
+ ref: f,
1784
1801
  onChange: o,
1785
- ...H,
1786
- withSearchParam: L
1802
+ ...N,
1803
+ withSearchParam: G
1787
1804
  },
1788
1805
  k
1789
1806
  )) }) : /* @__PURE__ */ s(a, { marginBottom: "sm", children: [
1790
1807
  l ? /* @__PURE__ */ A(d, { color: "text-muted", marginBottom: "sm", fontWeight: "medium", children: l }) : null,
1791
1808
  e ? /* @__PURE__ */ A(d, { marginBottom: "sm", fontWeight: "medium", children: e }) : null,
1792
- /* @__PURE__ */ A(a, { children: Z() })
1809
+ /* @__PURE__ */ A(a, { children: K() })
1793
1810
  ] });
1794
1811
  }
1795
1812
  )
1796
- ), Pe = gA.memo(
1813
+ ), Pe = sA.memo(
1797
1814
  ({
1798
1815
  show: e,
1799
1816
  title: i,
@@ -1803,9 +1820,9 @@ const zt = _(
1803
1820
  onHide: n,
1804
1821
  resetting: l
1805
1822
  }) => {
1806
- const [c, g] = b(!1), C = eA(null), Q = ({ value: B, name: I, type: L }) => {
1823
+ const [c, g] = O(!1), C = iA(null), Q = ({ value: B, name: u, type: G }) => {
1807
1824
  if (o)
1808
- switch (L) {
1825
+ switch (G) {
1809
1826
  case "date":
1810
1827
  Ue(B);
1811
1828
  break;
@@ -1822,7 +1839,7 @@ const zt = _(
1822
1839
  return W(() => {
1823
1840
  (c || l) && (g(!1), t == null || t(!1));
1824
1841
  }, [c, l]), /* @__PURE__ */ A(U, { children: /* @__PURE__ */ s(
1825
- SA,
1842
+ GA,
1826
1843
  {
1827
1844
  withBlur: !1,
1828
1845
  paddingHorizontal: !1,
@@ -1832,22 +1849,22 @@ const zt = _(
1832
1849
  ref: C,
1833
1850
  children: [
1834
1851
  /* @__PURE__ */ A(Re, { title: i, resetButton: { onClick: w } }),
1835
- c || l ? null : /* @__PURE__ */ A(a, { children: r == null ? void 0 : r.map((B, I) => /* @__PURE__ */ A(
1852
+ c || l ? null : /* @__PURE__ */ A(a, { children: r == null ? void 0 : r.map((B, u) => /* @__PURE__ */ A(
1836
1853
  ne,
1837
1854
  {
1838
- borderBottom: I !== r.length - 1,
1855
+ borderBottom: u !== r.length - 1,
1839
1856
  onChange: Q,
1840
1857
  withSearchParam: o,
1841
1858
  ...B,
1842
1859
  ref: C
1843
1860
  },
1844
- I
1861
+ u
1845
1862
  )) })
1846
1863
  ]
1847
1864
  }
1848
1865
  ) });
1849
1866
  }
1850
- ), Ve = gA.memo(({ active: e, onClick: i }) => {
1867
+ ), Ve = sA.memo(({ active: e, onClick: i }) => {
1851
1868
  var o, t;
1852
1869
  const r = KA();
1853
1870
  return /* @__PURE__ */ A(
@@ -1882,7 +1899,7 @@ const zt = _(
1882
1899
  function Tt(e) {
1883
1900
  return e.split(" ").map((i) => i[0]).join("").slice(0, 2).toUpperCase();
1884
1901
  }
1885
- const mA = (e) => {
1902
+ const yA = (e) => {
1886
1903
  const i = {
1887
1904
  day: "2-digit",
1888
1905
  month: "short",
@@ -1936,23 +1953,23 @@ function vt(e) {
1936
1953
  const r = i.getFullYear(), o = String(i.getMonth() + 1).padStart(2, "0"), t = String(i.getDate()).padStart(2, "0");
1937
1954
  return `${r}-${o}-${t}`;
1938
1955
  }
1939
- const Xe = "starasia-admin", oA = (e) => `var(--${Xe}-${e})`, Pt = {
1956
+ const Xe = "starasia-admin", nA = (e) => `var(--${Xe}-${e})`, Pt = {
1940
1957
  base: {
1941
- borderColor: oA("base-border-color"),
1942
- textColor: oA("base-text-color"),
1943
- iconColor: oA("base-icon-color"),
1944
- placeholderColor: oA("base-placeholder-color")
1958
+ borderColor: nA("base-border-color"),
1959
+ textColor: nA("base-text-color"),
1960
+ iconColor: nA("base-icon-color"),
1961
+ placeholderColor: nA("base-placeholder-color")
1945
1962
  },
1946
1963
  document: {
1947
- bgColor: oA("document-bg-color")
1964
+ bgColor: nA("document-bg-color")
1948
1965
  },
1949
1966
  sidebar: {
1950
- bgColor: oA("sidebar-bg-color"),
1951
- borderColor: oA("sidebar-border-color"),
1952
- maxWidth: oA("sidebar-max-width"),
1953
- width: oA("sidebar-width"),
1954
- collapseWidth: oA("sidebar-collapse-width"),
1955
- collapseV2Width: oA("sidebar-v2-collapse-width")
1967
+ bgColor: nA("sidebar-bg-color"),
1968
+ borderColor: nA("sidebar-border-color"),
1969
+ maxWidth: nA("sidebar-max-width"),
1970
+ width: nA("sidebar-width"),
1971
+ collapseWidth: nA("sidebar-collapse-width"),
1972
+ collapseV2Width: nA("sidebar-v2-collapse-width")
1956
1973
  }
1957
1974
  }, Vt = 24 * 60 * 60 * 1e3, Xt = (e) => {
1958
1975
  const i = "14px poppins", o = document.createElement("canvas").getContext("2d");
@@ -2058,60 +2075,69 @@ const nr = (e) => {
2058
2075
  }), r;
2059
2076
  }, cr = (e) => {
2060
2077
  var R;
2061
- const i = cA(() => ({ ...ei, ...e }), [e]), [r, o] = b(!1), [t, n] = b(!1), [l] = b(void 0), c = () => n(!0), g = () => n(!1), C = t ? g : c, Q = () => {
2078
+ const i = gA(() => ({ ...ei, ...e }), [e]), [r, o] = O(!1), [t, n] = O(!1), [l] = O(void 0), c = () => n(!0), g = () => n(!1), C = t ? g : c, Q = () => {
2062
2079
  o(!0);
2063
- }, w = (x) => {
2064
- o(x);
2065
- }, B = l ? ii(l) : void 0, I = !!(B && ((R = Object.values(B)) == null ? void 0 : R.length) > 0), L = () => B ? Object.keys(B).map((x) => {
2066
- var H, k, G;
2067
- const u = zA(x, i.fields), P = [];
2068
- let Z = "";
2069
- const V = (H = u == null ? void 0 : u.childrenKey) == null ? void 0 : H.length, AA = u == null ? void 0 : u.parentKey;
2070
- switch (V && ((k = u == null ? void 0 : u.childrenKey) == null || k.forEach((E) => {
2080
+ }, w = (f) => {
2081
+ o(f);
2082
+ }, B = l ? ii(l) : void 0, u = !!(B && ((R = Object.values(B)) == null ? void 0 : R.length) > 0), G = () => B ? Object.keys(B).map((f) => {
2083
+ var N, k, S;
2084
+ const I = zA(f, i.fields), P = [];
2085
+ let K = "";
2086
+ const V = (N = I == null ? void 0 : I.childrenKey) == null ? void 0 : N.length, eA = I == null ? void 0 : I.parentKey;
2087
+ switch (V && ((k = I == null ? void 0 : I.childrenKey) == null || k.forEach((E) => {
2071
2088
  const D = zA(E, i.fields);
2072
2089
  D && P.push({
2073
2090
  name: D == null ? void 0 : D.name,
2074
2091
  label: D == null ? void 0 : D.label,
2075
2092
  value: B[D == null ? void 0 : D.name]
2076
2093
  });
2077
- })), u == null ? void 0 : u.type) {
2094
+ })), I == null ? void 0 : I.type) {
2078
2095
  case "dropdown":
2079
2096
  case "select-button":
2080
- const E = B[x] && typeof B[x] != "string" ? B[x] : [], D = (E == null ? void 0 : E.length) > 0 ? (G = E.map((f) => f.label)) == null ? void 0 : G.join(",") : B[x];
2081
- Z = `${u == null ? void 0 : u.label}: ${D}`;
2097
+ const E = B[f] && typeof B[f] != "string" ? B[f] : [], D = (E == null ? void 0 : E.length) > 0 ? (S = E.map((y) => y.label)) == null ? void 0 : S.join(",") : B[f];
2098
+ K = `${I == null ? void 0 : I.label}: ${D}`;
2099
+ break;
2100
+ case "checkbox":
2101
+ const q = (Array.isArray(B[f]) ? B[f] : []).map(
2102
+ (y) => {
2103
+ var X, tA;
2104
+ return ((tA = (X = I == null ? void 0 : I.options) == null ? void 0 : X.find((QA) => QA.value === y)) == null ? void 0 : tA.label) || y;
2105
+ }
2106
+ ).join(", ");
2107
+ K = `${I == null ? void 0 : I.label}: ${q}`;
2082
2108
  break;
2083
2109
  case "date":
2084
- if (u.rangedDate) {
2085
- const f = B[x], J = (u == null ? void 0 : u.dateValueFormatText) === "indonesian" ? mA(new Date(f == null ? void 0 : f.from)) : f == null ? void 0 : f.from, z = (u == null ? void 0 : u.dateValueFormatText) === "indonesian" ? mA(new Date(f == null ? void 0 : f.to)) : f == null ? void 0 : f.to;
2086
- Z = `${u == null ? void 0 : u.label}: ${J || ""} ~ ${z || ""}`;
2110
+ if (I.rangedDate) {
2111
+ const y = B[f], X = (I == null ? void 0 : I.dateValueFormatText) === "indonesian" ? yA(new Date(y == null ? void 0 : y.from)) : y == null ? void 0 : y.from, tA = (I == null ? void 0 : I.dateValueFormatText) === "indonesian" ? yA(new Date(y == null ? void 0 : y.to)) : y == null ? void 0 : y.to;
2112
+ K = `${I == null ? void 0 : I.label}: ${X || ""} ~ ${tA || ""}`;
2087
2113
  break;
2088
2114
  }
2089
- const F = (u == null ? void 0 : u.dateValueFormatText) === "indonesian" ? mA(new Date(B[x])) : B[x];
2090
- Z = `${u == null ? void 0 : u.label}: ${F || ""}`;
2115
+ const H = (I == null ? void 0 : I.dateValueFormatText) === "indonesian" ? yA(new Date(B[f])) : B[f];
2116
+ K = `${I == null ? void 0 : I.label}: ${H || ""}`;
2091
2117
  break;
2092
2118
  default:
2093
- Z = `${u == null ? void 0 : u.label}: ${B[x]}`;
2119
+ K = `${I == null ? void 0 : I.label}: ${B[f]}`;
2094
2120
  break;
2095
2121
  }
2096
2122
  if (V && P.length > 0) {
2097
2123
  let E = P.map((D) => {
2098
- var F, f;
2099
- return D != null && D.value && typeof D.value != "string" ? (f = (F = D == null ? void 0 : D.value) == null ? void 0 : F.map((J) => J == null ? void 0 : J.label)) == null ? void 0 : f.join(",") : D.value;
2124
+ var z, q;
2125
+ return D != null && D.value && typeof D.value != "string" ? (q = (z = D == null ? void 0 : D.value) == null ? void 0 : z.map((H) => H == null ? void 0 : H.label)) == null ? void 0 : q.join(",") : D.value;
2100
2126
  });
2101
2127
  E = E.filter(
2102
2128
  (D) => typeof D < "u" && D !== "" && D !== null
2103
- ), E && E.length > 0 && (Z = `${Z} ${u.relationLabelChip || "by"} ${E}`);
2129
+ ), E && E.length > 0 && (K = `${K} ${I.relationLabelChip || "by"} ${E}`);
2104
2130
  }
2105
- return AA && (Z = ""), {
2106
- name: u == null ? void 0 : u.name,
2107
- label: u == null ? void 0 : u.label,
2108
- value: B[x],
2109
- valueText: Z,
2131
+ return eA && (K = ""), {
2132
+ name: I == null ? void 0 : I.name,
2133
+ label: I == null ? void 0 : I.label,
2134
+ value: B[f],
2135
+ valueText: K,
2110
2136
  children: P
2111
2137
  };
2112
- }) : [], h = (x) => {
2113
- x != null && x.name && o(!0);
2114
- }, j = L();
2138
+ }) : [], h = (f) => {
2139
+ f != null && f.name && o(!0);
2140
+ }, j = G();
2115
2141
  return {
2116
2142
  value: B,
2117
2143
  open: c,
@@ -2120,7 +2146,7 @@ const nr = (e) => {
2120
2146
  reset: Q,
2121
2147
  chips: j,
2122
2148
  toggleConfig: {
2123
- active: I,
2149
+ active: u,
2124
2150
  onClick: C
2125
2151
  },
2126
2152
  chipsConfig: {
@@ -2140,7 +2166,7 @@ const nr = (e) => {
2140
2166
  Toggle: Ve,
2141
2167
  Chips: Te,
2142
2168
  Chip: oe
2143
- }, ti = (e) => /* @__PURE__ */ A(d, { variant: "h1", children: e.children, ...e.props }), ri = (e) => /* @__PURE__ */ A(d, { variant: "h2", children: e.children, ...e.props }), oi = (e) => /* @__PURE__ */ A(d, { variant: "h3", children: e.children, ...e.props }), ni = (e) => /* @__PURE__ */ A(d, { variant: "h4", children: e.children, ...e.props }), li = (e) => /* @__PURE__ */ A(d, { variant: "h5", children: e.children, ...e.props }), ci = (e) => /* @__PURE__ */ A(d, { variant: "h6", children: e.children, ...e.props }), gi = (e) => /* @__PURE__ */ A(d, { variant: "sub-h1", children: e.children, ...e.props }), si = (e) => /* @__PURE__ */ A(d, { variant: "sub-h2", children: e.children, ...e.props }), ai = (e) => /* @__PURE__ */ A(d, { variant: "sub-h3", children: e.children, ...e.props }), Ci = (e) => /* @__PURE__ */ A(d, { variant: "body-1", children: e.children, ...e.props }), Bi = (e) => /* @__PURE__ */ A(d, { variant: "body-2", children: e.children, ...e.props }), wi = (e) => /* @__PURE__ */ A(d, { variant: "body-3", children: e.children, ...e.props }), q = {
2169
+ }, ti = (e) => /* @__PURE__ */ A(d, { variant: "h1", children: e.children, ...e.props }), ri = (e) => /* @__PURE__ */ A(d, { variant: "h2", children: e.children, ...e.props }), oi = (e) => /* @__PURE__ */ A(d, { variant: "h3", children: e.children, ...e.props }), ni = (e) => /* @__PURE__ */ A(d, { variant: "h4", children: e.children, ...e.props }), li = (e) => /* @__PURE__ */ A(d, { variant: "h5", children: e.children, ...e.props }), ci = (e) => /* @__PURE__ */ A(d, { variant: "h6", children: e.children, ...e.props }), gi = (e) => /* @__PURE__ */ A(d, { variant: "sub-h1", children: e.children, ...e.props }), si = (e) => /* @__PURE__ */ A(d, { variant: "sub-h2", children: e.children, ...e.props }), ai = (e) => /* @__PURE__ */ A(d, { variant: "sub-h3", children: e.children, ...e.props }), Ci = (e) => /* @__PURE__ */ A(d, { variant: "body-1", children: e.children, ...e.props }), Bi = (e) => /* @__PURE__ */ A(d, { variant: "body-2", children: e.children, ...e.props }), wi = (e) => /* @__PURE__ */ A(d, { variant: "body-3", children: e.children, ...e.props }), J = {
2144
2170
  H1: ti,
2145
2171
  H2: ri,
2146
2172
  H3: oi,
@@ -2154,7 +2180,7 @@ const nr = (e) => {
2154
2180
  Body2: Bi,
2155
2181
  Body3: wi
2156
2182
  }, JA = () => {
2157
- const [e, i] = uA(), r = DA(e.toString()), o = te(), t = fA(), n = o.id;
2183
+ const [e, i] = kA(), r = IA(e.toString()), o = te(), t = LA(), n = o.id;
2158
2184
  return {
2159
2185
  // query params
2160
2186
  setSearchParams: i,
@@ -2214,18 +2240,18 @@ const nr = (e) => {
2214
2240
  [i]: C
2215
2241
  }, B = { ...n };
2216
2242
  l && typeof l == "string" && delete B[l], delete B[g];
2217
- const I = {
2243
+ const u = {
2218
2244
  ...B,
2219
2245
  [c]: JSON.stringify(w)
2220
- }, L = new URLSearchParams(n).toString(), h = new URLSearchParams(
2221
- I
2246
+ }, G = new URLSearchParams(n).toString(), h = new URLSearchParams(
2247
+ u
2222
2248
  ).toString();
2223
- if (L === h)
2249
+ if (G === h)
2224
2250
  return;
2225
- t(I);
2251
+ t(u);
2226
2252
  }
2227
2253
  }
2228
- }, bA = ({
2254
+ }, YA = ({
2229
2255
  name: e,
2230
2256
  filterKey: i = "filter",
2231
2257
  searchParams: r,
@@ -2283,31 +2309,31 @@ const nr = (e) => {
2283
2309
  pageKey: o,
2284
2310
  filters: t
2285
2311
  }) => {
2286
- const { searchParams: n, setSearchParams: l, searchQueries: c } = JA(), [g, C] = b({}), Q = () => {
2312
+ const { searchParams: n, setSearchParams: l, searchQueries: c } = JA(), [g, C] = O({}), Q = () => {
2287
2313
  n.delete(r || "filter"), l(n);
2288
- }, w = (B, I) => {
2314
+ }, w = (B, u) => {
2289
2315
  switch (B.type) {
2290
2316
  case "radio": {
2291
- const { show: L = !0 } = B;
2292
- return L && /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, I);
2317
+ const { show: G = !0 } = B;
2318
+ return G && /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, u);
2293
2319
  }
2294
2320
  case "dropdown": {
2295
- const { show: L = !0 } = B;
2296
- return L && /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, I);
2321
+ const { show: G = !0 } = B;
2322
+ return G && /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, u);
2297
2323
  }
2298
2324
  case "date-range":
2299
- return /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, I);
2325
+ return /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, u);
2300
2326
  case "date":
2301
- return /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, I);
2327
+ return /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, u);
2302
2328
  case "dropdown-multiple": {
2303
- const { show: L = !0 } = B;
2304
- return L && /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, I);
2329
+ const { show: G = !0 } = B;
2330
+ return G && /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(a, { children: B.title }) }, u);
2305
2331
  }
2306
2332
  default:
2307
2333
  return null;
2308
2334
  }
2309
2335
  };
2310
- return /* @__PURE__ */ A(SA, { onHide: i, show: e || !1, children: /* @__PURE__ */ s(a, { direction: "column", gap: "md", children: [
2336
+ return /* @__PURE__ */ A(GA, { onHide: i, show: e || !1, children: /* @__PURE__ */ s(a, { direction: "column", gap: "md", children: [
2311
2337
  /* @__PURE__ */ s(T, { direction: "row", justify: "space-between", align: "center", children: [
2312
2338
  /* @__PURE__ */ A(a, { children: "Filter" }),
2313
2339
  /* @__PURE__ */ A(
@@ -2319,7 +2345,7 @@ const nr = (e) => {
2319
2345
  }
2320
2346
  )
2321
2347
  ] }),
2322
- t == null ? void 0 : t.map((B, I) => w(B, I))
2348
+ t == null ? void 0 : t.map((B, u) => w(B, u))
2323
2349
  ] }) });
2324
2350
  }, Mi = ({
2325
2351
  searchKey: e = "q",
@@ -2335,46 +2361,46 @@ const nr = (e) => {
2335
2361
  handleOnReset: Q,
2336
2362
  filterConfigs: w,
2337
2363
  buttonToggleProps: B,
2338
- position: I = "right",
2339
- titleSearchLabel: L = "Work Order",
2364
+ position: u = "right",
2365
+ titleSearchLabel: G = "Work Order",
2340
2366
  withTitleLabels: h = !1
2341
2367
  }) => {
2342
- const p = (B == null ? void 0 : B.isShowLabel) ?? !0, [N, R] = b(!1), [x, u] = b(0), P = () => {
2343
- u((z) => z + 1);
2344
- }, { searchParams: Z, setSearchParams: V, getQueryParam: AA } = JA(), H = DA(Z.toString()), k = ki(e, Z, c) || "", [G, E] = b(k), D = AA(c), f = !!(D && !(() => {
2368
+ const p = (B == null ? void 0 : B.isShowLabel) ?? !0, [F, R] = O(!1), [f, I] = O(0), P = () => {
2369
+ I((y) => y + 1);
2370
+ }, { searchParams: K, setSearchParams: V, getQueryParam: eA } = JA(), N = IA(K.toString()), k = ki(e, K, c) || "", [S, E] = O(k), D = eA(c), q = !!(D && !(() => {
2345
2371
  if (D)
2346
2372
  try {
2347
- const z = JSON.parse(D);
2348
- return Object.keys(z).length === 1 && z[e] === "";
2349
- } catch (z) {
2350
- console.error("Filter parameter is not a valid JSON:", z);
2373
+ const y = JSON.parse(D);
2374
+ return Object.keys(y).length === 1 && y[e] === "";
2375
+ } catch (y) {
2376
+ console.error("Filter parameter is not a valid JSON:", y);
2351
2377
  }
2352
2378
  return !1;
2353
- })()), J = X("md");
2379
+ })()), H = $("md");
2354
2380
  return W(() => {
2355
2381
  E(k);
2356
2382
  }, [k]), W(() => {
2357
- if (G === k)
2383
+ if (S === k)
2358
2384
  return;
2359
- const z = window.setTimeout(() => {
2385
+ const y = window.setTimeout(() => {
2360
2386
  vA({
2361
- value: G,
2387
+ value: S,
2362
2388
  name: e,
2363
2389
  type: "search",
2364
- searchQueries: H,
2390
+ searchQueries: N,
2365
2391
  setSearchParams: V,
2366
2392
  filterKey: c,
2367
2393
  pageKey: g
2368
2394
  });
2369
2395
  }, 350);
2370
2396
  return () => {
2371
- window.clearTimeout(z);
2397
+ window.clearTimeout(y);
2372
2398
  };
2373
2399
  }, [
2374
- G,
2400
+ S,
2375
2401
  k,
2376
2402
  e,
2377
- H,
2403
+ N,
2378
2404
  V,
2379
2405
  c,
2380
2406
  g
@@ -2383,41 +2409,41 @@ const nr = (e) => {
2383
2409
  {
2384
2410
  gap: "md",
2385
2411
  style: {
2386
- flexDirection: J && I === "left" ? "row" : J && I === "right" ? "row-reverse" : "column"
2412
+ flexDirection: H && u === "left" ? "row" : H && u === "right" ? "row-reverse" : "column"
2387
2413
  },
2388
2414
  align: "flex-end",
2389
2415
  children: [
2390
- f && /* @__PURE__ */ A(a, { justify: "flex-end", children: /* @__PURE__ */ A(
2391
- O,
2416
+ q && /* @__PURE__ */ A(a, { justify: "flex-end", children: /* @__PURE__ */ A(
2417
+ b,
2392
2418
  {
2393
2419
  onClick: () => {
2394
- const z = new URLSearchParams(Z);
2395
- z.delete(c), V(z), E(""), P(), Q && Q();
2420
+ const y = new URLSearchParams(K);
2421
+ y.delete(c), V(y), E(""), P(), Q && Q();
2396
2422
  },
2397
2423
  secondary: !0,
2398
2424
  children: /* @__PURE__ */ A(d, { color: "error", fontWeight: "semibold", children: "Reset" })
2399
2425
  }
2400
2426
  ) }),
2401
- t == null ? void 0 : t.map(({ minWidth: z, content: iA, title: sA, onClickContainer: LA }, GA) => /* @__PURE__ */ s(
2427
+ t == null ? void 0 : t.map(({ minWidth: y, content: X, title: tA, onClickContainer: QA }, bA) => /* @__PURE__ */ s(
2402
2428
  a,
2403
2429
  {
2404
2430
  gap: "sm",
2405
- onClick: LA,
2431
+ onClick: QA,
2406
2432
  style: {
2407
- minWidth: z
2433
+ minWidth: y
2408
2434
  },
2409
2435
  children: [
2410
- sA && /* @__PURE__ */ A(q.SubH3, { children: sA }),
2411
- iA
2436
+ tA && /* @__PURE__ */ A(J.SubH3, { children: tA }),
2437
+ X
2412
2438
  ]
2413
2439
  },
2414
- `extended-filter-${GA}-${x}`
2440
+ `extended-filter-${bA}-${f}`
2415
2441
  )),
2416
2442
  !!(w != null && w.length) && /* @__PURE__ */ A(
2417
- O,
2443
+ b,
2418
2444
  {
2419
- primary: f,
2420
- secondary: !f,
2445
+ primary: q,
2446
+ secondary: !q,
2421
2447
  iconLeft: /* @__PURE__ */ A(
2422
2448
  M,
2423
2449
  {
@@ -2428,7 +2454,7 @@ const nr = (e) => {
2428
2454
  }
2429
2455
  }
2430
2456
  ),
2431
- fullWidth: !J,
2457
+ fullWidth: !H,
2432
2458
  onClick: () => R(!0),
2433
2459
  children: p ? "Filter" : void 0
2434
2460
  }
@@ -2441,9 +2467,9 @@ const nr = (e) => {
2441
2467
  minWidth: "126px"
2442
2468
  },
2443
2469
  children: [
2444
- h && /* @__PURE__ */ A(q.SubH3, { children: "Status" }),
2470
+ h && /* @__PURE__ */ A(J.SubH3, { children: "Status" }),
2445
2471
  /* @__PURE__ */ A(
2446
- xA,
2472
+ SA,
2447
2473
  {
2448
2474
  dropdownLists: [
2449
2475
  {
@@ -2455,38 +2481,38 @@ const nr = (e) => {
2455
2481
  value: "inactive"
2456
2482
  }
2457
2483
  ],
2458
- defaultValue: bA({
2484
+ defaultValue: YA({
2459
2485
  get: "value",
2460
2486
  name: i,
2461
- searchParams: Z,
2487
+ searchParams: K,
2462
2488
  filterKey: c
2463
2489
  }) ? [
2464
2490
  {
2465
- label: bA({
2491
+ label: YA({
2466
2492
  get: "value",
2467
2493
  name: i,
2468
- searchParams: Z,
2494
+ searchParams: K,
2469
2495
  filterKey: c
2470
2496
  }) === "active" ? "Active" : "InActive",
2471
- value: bA({
2497
+ value: YA({
2472
2498
  get: "value",
2473
2499
  name: i,
2474
- searchParams: Z,
2500
+ searchParams: K,
2475
2501
  filterKey: c
2476
2502
  })
2477
2503
  }
2478
2504
  ] : [],
2479
- onChange: (z) => vA({
2480
- value: z,
2505
+ onChange: (y) => vA({
2506
+ value: y,
2481
2507
  name: i,
2482
2508
  type: "dropdown",
2483
- searchQueries: H,
2509
+ searchQueries: N,
2484
2510
  setSearchParams: V,
2485
2511
  filterKey: c
2486
2512
  }),
2487
2513
  placeholder: h ? "All" : "All Status"
2488
2514
  },
2489
- x
2515
+ f
2490
2516
  )
2491
2517
  ]
2492
2518
  }
@@ -2496,23 +2522,23 @@ const nr = (e) => {
2496
2522
  {
2497
2523
  gap: "sm",
2498
2524
  style: {
2499
- width: C && J ? C : J ? "310px" : ""
2525
+ width: C && H ? C : H ? "310px" : ""
2500
2526
  },
2501
2527
  children: [
2502
- h && /* @__PURE__ */ s(q.SubH3, { children: [
2528
+ h && /* @__PURE__ */ s(J.SubH3, { children: [
2503
2529
  "Search for ",
2504
- L
2530
+ G
2505
2531
  ] }),
2506
2532
  /* @__PURE__ */ A(
2507
- IA,
2533
+ uA,
2508
2534
  {
2509
2535
  placeholder: r,
2510
2536
  leftIcon: /* @__PURE__ */ A(M, { name: "Search", width: 20, height: 20 }),
2511
- onChange: (z) => E(z.target.value),
2512
- value: G,
2537
+ onChange: (y) => E(y.target.value),
2538
+ value: S,
2513
2539
  fullWidth: !0
2514
2540
  },
2515
- x + 1 + c
2541
+ f + 1 + c
2516
2542
  )
2517
2543
  ]
2518
2544
  }
@@ -2520,7 +2546,7 @@ const nr = (e) => {
2520
2546
  /* @__PURE__ */ A(
2521
2547
  Ei,
2522
2548
  {
2523
- isOpen: N,
2549
+ isOpen: F,
2524
2550
  onClose: () => R(!1),
2525
2551
  filterKey: c,
2526
2552
  filters: w,
@@ -2531,7 +2557,7 @@ const nr = (e) => {
2531
2557
  }
2532
2558
  );
2533
2559
  }, mi = ({ children: e, borderRadius: i }) => {
2534
- const r = eA(null), [o, t] = b("100vh");
2560
+ const r = iA(null), [o, t] = O("100vh");
2535
2561
  return W(() => {
2536
2562
  const n = () => {
2537
2563
  if (r.current) {
@@ -2562,7 +2588,7 @@ const nr = (e) => {
2562
2588
  advanceFilter: i,
2563
2589
  showFilter: r = !0
2564
2590
  }) => {
2565
- const o = X("md"), t = () => e ? ee(e) ? e : /* @__PURE__ */ A(
2591
+ const o = $("md"), t = () => e ? ee(e) ? e : /* @__PURE__ */ A(
2566
2592
  a,
2567
2593
  {
2568
2594
  style: {
@@ -2574,7 +2600,7 @@ const nr = (e) => {
2574
2600
  },
2575
2601
  children: e.map(
2576
2602
  ({ title: n, icon: l, buttonProps: c, onClick: g }, C) => !n && !l ? null : /* @__PURE__ */ A(
2577
- O,
2603
+ b,
2578
2604
  {
2579
2605
  fullWidth: !o,
2580
2606
  iconLeft: l ? /* @__PURE__ */ A(M, { name: l, size: "md" }) : void 0,
@@ -2630,7 +2656,7 @@ const nr = (e) => {
2630
2656
  },
2631
2657
  children: [
2632
2658
  /* @__PURE__ */ s(
2633
- q.Body1,
2659
+ J.Body1,
2634
2660
  {
2635
2661
  props: {
2636
2662
  color: "gray-500"
@@ -2641,7 +2667,7 @@ const nr = (e) => {
2641
2667
  ]
2642
2668
  }
2643
2669
  ),
2644
- /* @__PURE__ */ A(q.Body1, { children: e || 0 })
2670
+ /* @__PURE__ */ A(J.Body1, { children: e || 0 })
2645
2671
  ]
2646
2672
  }
2647
2673
  ), fi = ({
@@ -2652,15 +2678,15 @@ const nr = (e) => {
2652
2678
  showPagination: t = !0,
2653
2679
  totalData: n
2654
2680
  }) => {
2655
- const { searchQueries: l, setSearchParams: c, searchParams: g } = JA(), C = g.get(r), Q = (L) => {
2656
- c({ ...l, [i]: String(L) });
2657
- }, w = (L) => {
2681
+ const { searchQueries: l, setSearchParams: c, searchParams: g } = JA(), C = g.get(r), Q = (G) => {
2682
+ c({ ...l, [i]: String(G) });
2683
+ }, w = (G) => {
2658
2684
  c({
2659
2685
  ...l,
2660
- [r]: L,
2686
+ [r]: G,
2661
2687
  [i]: "1"
2662
2688
  });
2663
- }, B = (e == null ? void 0 : e.rangeStart) ?? (((e == null ? void 0 : e.currentPage) || 0) > 1 ? (((e == null ? void 0 : e.currentPage) || 0) - 1) * ((e == null ? void 0 : e.perPage) || 0) + 1 : 1), I = (e == null ? void 0 : e.rangeEnd) ?? ((e == null ? void 0 : e.totalCurrentPage) !== (e == null ? void 0 : e.perPage) ? e == null ? void 0 : e.totalData : ((e == null ? void 0 : e.currentPage) || 1) * ((e == null ? void 0 : e.totalCurrentPage) || 0));
2689
+ }, B = (e == null ? void 0 : e.rangeStart) ?? (((e == null ? void 0 : e.currentPage) || 0) > 1 ? (((e == null ? void 0 : e.currentPage) || 0) - 1) * ((e == null ? void 0 : e.perPage) || 0) + 1 : 1), u = (e == null ? void 0 : e.rangeEnd) ?? ((e == null ? void 0 : e.totalCurrentPage) !== (e == null ? void 0 : e.perPage) ? e == null ? void 0 : e.totalData : ((e == null ? void 0 : e.currentPage) || 1) * ((e == null ? void 0 : e.totalCurrentPage) || 0));
2664
2690
  return /* @__PURE__ */ A(
2665
2691
  a,
2666
2692
  {
@@ -2681,7 +2707,7 @@ const nr = (e) => {
2681
2707
  /* @__PURE__ */ s(a, { style: { display: "flex", flexDirection: "row", gap: "8px", alignItems: "center" }, children: [
2682
2708
  /* @__PURE__ */ A(d, { children: "Rows Per Page: " }),
2683
2709
  /* @__PURE__ */ A(
2684
- xA,
2710
+ SA,
2685
2711
  {
2686
2712
  dropdownLists: [
2687
2713
  { label: "5", value: "5" },
@@ -2690,13 +2716,13 @@ const nr = (e) => {
2690
2716
  { label: "50", value: "50" },
2691
2717
  { label: "100", value: "100" }
2692
2718
  ],
2693
- onChange: (L) => {
2694
- w(L[0].value);
2719
+ onChange: (G) => {
2720
+ w(G[0].value);
2695
2721
  },
2696
2722
  defaultValue: C ? [{ label: `${C} per row`, value: C }] : [{ label: `${o} per row`, value: `${o}` }]
2697
2723
  }
2698
2724
  ),
2699
- /* @__PURE__ */ A(d, { children: `${B}-${I} of ${(e == null ? void 0 : e.totalData) || 0}` })
2725
+ /* @__PURE__ */ A(d, { children: `${B}-${u} of ${(e == null ? void 0 : e.totalData) || 0}` })
2700
2726
  ] }),
2701
2727
  /* @__PURE__ */ A(
2702
2728
  Be,
@@ -2717,7 +2743,7 @@ const nr = (e) => {
2717
2743
  }
2718
2744
  );
2719
2745
  }, Si = ({ filter: e, columnTitle: i }) => {
2720
- const [r, o] = b(!1), t = eA(null), n = eA(null), l = eA(null), [c, g] = b(""), [C, Q] = b({ top: 0, left: 0 }), w = e.selectedValues, B = cA(() => c ? e.options.filter(
2746
+ const [r, o] = O(!1), t = iA(null), n = iA(null), l = iA(null), [c, g] = O(""), [C, Q] = O({ top: 0, left: 0 }), w = e.selectedValues, B = gA(() => c ? e.options.filter(
2721
2747
  (h) => h.label.toLowerCase().includes(c.toLowerCase())
2722
2748
  ) : e.options, [e.options, c]);
2723
2749
  W(() => {
@@ -2738,10 +2764,10 @@ const nr = (e) => {
2738
2764
  };
2739
2765
  return r && document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
2740
2766
  }, [r]);
2741
- const I = (h) => {
2767
+ const u = (h) => {
2742
2768
  const j = w.includes(h) ? w.filter((p) => p !== h) : [...w, h];
2743
2769
  e.onFilterChange(j);
2744
- }, L = () => e.onFilterChange([]);
2770
+ }, G = () => e.onFilterChange([]);
2745
2771
  return /* @__PURE__ */ s(a, { style: { position: "relative" }, children: [
2746
2772
  /* @__PURE__ */ A(
2747
2773
  a,
@@ -2814,7 +2840,7 @@ const nr = (e) => {
2814
2840
  color: "primary",
2815
2841
  fontWeight: "semibold",
2816
2842
  onClick: (h) => {
2817
- h.stopPropagation(), L();
2843
+ h.stopPropagation(), G();
2818
2844
  },
2819
2845
  children: "CLEAR"
2820
2846
  }
@@ -2832,7 +2858,7 @@ const nr = (e) => {
2832
2858
  paddingBottom: "8px"
2833
2859
  },
2834
2860
  children: /* @__PURE__ */ A(
2835
- IA,
2861
+ uA,
2836
2862
  {
2837
2863
  ref: l,
2838
2864
  placeholder: `Search ${i.toLowerCase()}...`,
@@ -2906,7 +2932,7 @@ const nr = (e) => {
2906
2932
  backgroundColor: w.includes(h.value) ? "rgb(var(--starasia-ui-raw-color-blue-50))" : "transparent"
2907
2933
  },
2908
2934
  onClick: (j) => {
2909
- j.stopPropagation(), I(h.value);
2935
+ j.stopPropagation(), u(h.value);
2910
2936
  },
2911
2937
  onMouseEnter: (j) => {
2912
2938
  w.includes(h.value) || (j.currentTarget.style.backgroundColor = "rgb(var(--starasia-ui-raw-color-gray-50))"), j.currentTarget.style.transform = "translateX(2px)";
@@ -2916,7 +2942,7 @@ const nr = (e) => {
2916
2942
  },
2917
2943
  children: [
2918
2944
  /* @__PURE__ */ A(
2919
- NA,
2945
+ xA,
2920
2946
  {
2921
2947
  checked: w.includes(h.value),
2922
2948
  onChange: () => {
@@ -3024,7 +3050,7 @@ const nr = (e) => {
3024
3050
  /* @__PURE__ */ A("path", { d: e ? "M7 11V7a5 5 0 0 1 10 0v4" : "M7 11V7a5 5 0 0 1 9.9-1" })
3025
3051
  ]
3026
3052
  }
3027
- ), MA = "var(--starasia-ui-table-bg-default, #ffffff)", YA = "var(--starasia-ui-color-gray-100)", Gi = ({
3053
+ ), mA = "var(--starasia-ui-table-bg-default, #ffffff)", pA = "var(--starasia-ui-color-gray-100)", Gi = ({
3028
3054
  columns: e,
3029
3055
  records: i,
3030
3056
  handleDetail: r,
@@ -3038,38 +3064,38 @@ const nr = (e) => {
3038
3064
  scrollParentRef: Q,
3039
3065
  frozenCount: w = 0,
3040
3066
  onFrozenCountChange: B,
3041
- customActions: I,
3042
- actionsOrder: L = ["detail", "update", "delete", "custom"],
3067
+ customActions: u,
3068
+ actionsOrder: G = ["detail", "update", "delete", "custom"],
3043
3069
  customEmptyState: h
3044
3070
  }) => {
3045
- const p = [r, o, t].filter((k) => k !== void 0).length, N = !!I, R = p === 3 ? N ? "178px" : "140px" : p === 2 ? N ? "140px" : "102px" : p === 1 ? N ? "112px" : "74px" : N ? "74px" : "", x = (k, G) => {
3046
- if (!G) return k;
3047
- if (typeof G == "function") return G(k);
3048
- if (typeof G == "string") return k[G];
3049
- }, [u, P] = b(!1);
3071
+ const p = [r, o, t].filter((k) => k !== void 0).length, F = !!u, R = p === 3 ? F ? "178px" : "140px" : p === 2 ? F ? "140px" : "102px" : p === 1 ? F ? "112px" : "74px" : F ? "74px" : "", f = (k, S) => {
3072
+ if (!S) return k;
3073
+ if (typeof S == "function") return S(k);
3074
+ if (typeof S == "string") return k[S];
3075
+ }, [I, P] = O(!1);
3050
3076
  W(() => {
3051
3077
  if (!(Q != null && Q.current)) return;
3052
3078
  const k = Q.current;
3053
3079
  P(k.scrollHeight > k.clientHeight);
3054
3080
  }, [i, Q]);
3055
- const Z = eA(null), [V, AA] = b([]);
3081
+ const K = iA(null), [V, eA] = O([]);
3056
3082
  FA(() => {
3057
- if (!w || !Z.current) {
3058
- AA([]);
3083
+ if (!w || !K.current) {
3084
+ eA([]);
3059
3085
  return;
3060
3086
  }
3061
3087
  const k = Array.from(
3062
- Z.current.querySelectorAll("thead tr th")
3063
- ), G = [];
3088
+ K.current.querySelectorAll("thead tr th")
3089
+ ), S = [];
3064
3090
  let E = 0;
3065
- k.forEach((D, F) => {
3066
- G[F] = E, F < w && (E += D.offsetWidth);
3067
- }), AA(G);
3091
+ k.forEach((D, z) => {
3092
+ S[z] = E, z < w && (E += D.offsetWidth);
3093
+ }), eA(S);
3068
3094
  }, [w, e, i]);
3069
- const H = (k) => {
3095
+ const N = (k) => {
3070
3096
  B && B(k < w ? k : k + 1);
3071
3097
  };
3072
- return /* @__PURE__ */ A("div", { ref: Z, children: /* @__PURE__ */ s(_A, { fullWidth: !0, children: [
3098
+ return /* @__PURE__ */ A("div", { ref: K, children: /* @__PURE__ */ s(_A, { fullWidth: !0, children: [
3073
3099
  /* @__PURE__ */ A(
3074
3100
  we,
3075
3101
  {
@@ -3077,10 +3103,10 @@ const nr = (e) => {
3077
3103
  height: "40px",
3078
3104
  whiteSpace: "nowrap"
3079
3105
  },
3080
- children: /* @__PURE__ */ s(QA, { children: [
3081
- e.map((k, G) => {
3082
- var F;
3083
- const E = w > 0 && G < w, D = V[G] ?? 0;
3106
+ children: /* @__PURE__ */ s(dA, { children: [
3107
+ e.map((k, S) => {
3108
+ var z;
3109
+ const E = w > 0 && S < w, D = V[S] ?? 0;
3084
3110
  return /* @__PURE__ */ A(
3085
3111
  qA,
3086
3112
  {
@@ -3089,7 +3115,7 @@ const nr = (e) => {
3089
3115
  top: 0,
3090
3116
  left: E ? D : void 0,
3091
3117
  zIndex: E ? 4 : 2,
3092
- paddingLeft: G === 0 ? "12px" : "",
3118
+ paddingLeft: S === 0 ? "12px" : "",
3093
3119
  borderRight: C ? "1px solid var(--starasia-ui-utility-fill-default)" : void 0,
3094
3120
  borderBottom: C ? "1px solid var(--starasia-ui-utility-fill-default)" : void 0,
3095
3121
  width: k.width,
@@ -3107,7 +3133,7 @@ const nr = (e) => {
3107
3133
  minWidth: 0
3108
3134
  },
3109
3135
  children: [
3110
- /* @__PURE__ */ A("span", { style: { flex: 1, minWidth: 0 }, children: k.title || ((F = k.accessor) == null ? void 0 : F.toString()) }),
3136
+ /* @__PURE__ */ A("span", { style: { flex: 1, minWidth: 0 }, children: k.title || ((z = k.accessor) == null ? void 0 : z.toString()) }),
3111
3137
  k.filter && /* @__PURE__ */ A(
3112
3138
  Si,
3113
3139
  {
@@ -3118,7 +3144,7 @@ const nr = (e) => {
3118
3144
  B && /* @__PURE__ */ A(
3119
3145
  "button",
3120
3146
  {
3121
- onClick: () => H(G),
3147
+ onClick: () => N(S),
3122
3148
  title: E ? "Unfreeze column" : "Freeze column",
3123
3149
  style: {
3124
3150
  background: "none",
@@ -3139,10 +3165,10 @@ const nr = (e) => {
3139
3165
  }
3140
3166
  )
3141
3167
  },
3142
- `table-head-${G}`
3168
+ `table-head-${S}`
3143
3169
  );
3144
3170
  }),
3145
- r || o || t || I ? /* @__PURE__ */ A(
3171
+ r || o || t || u ? /* @__PURE__ */ A(
3146
3172
  qA,
3147
3173
  {
3148
3174
  style: {
@@ -3158,54 +3184,54 @@ const nr = (e) => {
3158
3184
  ] })
3159
3185
  }
3160
3186
  ),
3161
- /* @__PURE__ */ A(Qe, { children: n ? /* @__PURE__ */ A(QA, { children: /* @__PURE__ */ A(CA, { colSpan: e.length + 1, children: /* @__PURE__ */ s(a, { style: { gap: "16px" }, children: [
3162
- /* @__PURE__ */ A(lA, { variant: "list" }),
3163
- /* @__PURE__ */ A(lA, { variant: "list" }),
3164
- /* @__PURE__ */ A(lA, { variant: "list" }),
3165
- /* @__PURE__ */ A(lA, { variant: "list" }),
3166
- /* @__PURE__ */ A(lA, { variant: "list" })
3167
- ] }) }) }) : !(i != null && i.length) && h ? /* @__PURE__ */ A(QA, { children: /* @__PURE__ */ A(CA, { colSpan: e.length + 1, children: h }) }) : i == null ? void 0 : i.map((k, G) => /* @__PURE__ */ s(
3168
- QA,
3187
+ /* @__PURE__ */ A(Qe, { children: n ? /* @__PURE__ */ A(dA, { children: /* @__PURE__ */ A(CA, { colSpan: e.length + 1, children: /* @__PURE__ */ s(a, { style: { gap: "16px" }, children: [
3188
+ /* @__PURE__ */ A(cA, { variant: "list" }),
3189
+ /* @__PURE__ */ A(cA, { variant: "list" }),
3190
+ /* @__PURE__ */ A(cA, { variant: "list" }),
3191
+ /* @__PURE__ */ A(cA, { variant: "list" }),
3192
+ /* @__PURE__ */ A(cA, { variant: "list" })
3193
+ ] }) }) }) : !(i != null && i.length) && h ? /* @__PURE__ */ A(dA, { children: /* @__PURE__ */ A(CA, { colSpan: e.length + 1, children: h }) }) : i == null ? void 0 : i.map((k, S) => /* @__PURE__ */ s(
3194
+ dA,
3169
3195
  {
3170
3196
  style: {
3171
3197
  transition: "background-color 0.3s ease",
3172
3198
  padding: 0,
3173
- borderBottom: G === i.length - 1 && u ? void 0 : "1px solid var(--starasia-ui-utility-fill-default)"
3199
+ borderBottom: S === i.length - 1 && I ? void 0 : "1px solid var(--starasia-ui-utility-fill-default)"
3174
3200
  },
3175
3201
  onMouseOver: (E) => {
3176
3202
  const D = E.currentTarget;
3177
- D.style.backgroundColor = YA, D.style.position = "relative", D.style.zIndex = "2", w > 0 && Array.from(D.querySelectorAll("td")).slice(0, w).forEach((f) => {
3178
- f.style.backgroundColor = YA;
3203
+ D.style.backgroundColor = pA, D.style.position = "relative", D.style.zIndex = "2", w > 0 && Array.from(D.querySelectorAll("td")).slice(0, w).forEach((q) => {
3204
+ q.style.backgroundColor = pA;
3179
3205
  });
3180
- const F = Array.from(D.querySelectorAll("td")).at(-1);
3181
- F && F.style.position === "sticky" && (F.style.backgroundColor = YA);
3206
+ const z = Array.from(D.querySelectorAll("td")).at(-1);
3207
+ z && z.style.position === "sticky" && (z.style.backgroundColor = pA);
3182
3208
  },
3183
3209
  onMouseOut: (E) => {
3184
3210
  const D = E.currentTarget;
3185
- D.style.backgroundColor = "", D.style.position = "", D.style.zIndex = "", w > 0 && Array.from(D.querySelectorAll("td")).slice(0, w).forEach((f) => {
3186
- f.style.backgroundColor = MA;
3211
+ D.style.backgroundColor = "", D.style.position = "", D.style.zIndex = "", w > 0 && Array.from(D.querySelectorAll("td")).slice(0, w).forEach((q) => {
3212
+ q.style.backgroundColor = mA;
3187
3213
  });
3188
- const F = Array.from(D.querySelectorAll("td")).at(-1);
3189
- F && F.style.position === "sticky" && (F.style.backgroundColor = MA);
3214
+ const z = Array.from(D.querySelectorAll("td")).at(-1);
3215
+ z && z.style.position === "sticky" && (z.style.backgroundColor = mA);
3190
3216
  },
3191
3217
  children: [
3192
3218
  e.map((E, D) => {
3193
- const F = E.render ? E.render(k, G, i) : x(k, E.accessor), f = w > 0 && D < w, J = V[D] ?? 0;
3219
+ const z = E.render ? E.render(k, S, i) : f(k, E.accessor), q = w > 0 && D < w, H = V[D] ?? 0;
3194
3220
  return /* @__PURE__ */ A(
3195
3221
  CA,
3196
3222
  {
3197
3223
  style: {
3198
- position: f ? "sticky" : void 0,
3199
- left: f ? J : void 0,
3200
- zIndex: f ? 1 : void 0,
3201
- backgroundColor: f ? MA : void 0,
3224
+ position: q ? "sticky" : void 0,
3225
+ left: q ? H : void 0,
3226
+ zIndex: q ? 1 : void 0,
3227
+ backgroundColor: q ? mA : void 0,
3202
3228
  paddingLeft: D === 0 ? "12px" : "",
3203
3229
  whiteSpace: "nowrap",
3204
3230
  borderLeft: E.showBorderLeft ? "1px solid var(--starasia-ui-utility-fill-default)" : void 0,
3205
3231
  borderRight: E.showBorderRight ? "1px solid var(--starasia-ui-utility-fill-default)" : void 0,
3206
3232
  textAlign: E.textAlign === "text-right" ? "right" : E.textAlign === "text-center" ? "center" : "left"
3207
3233
  },
3208
- children: typeof F == "string" ? /* @__PURE__ */ A(
3234
+ children: typeof z == "string" ? /* @__PURE__ */ A(
3209
3235
  d,
3210
3236
  {
3211
3237
  style: {
@@ -3214,62 +3240,62 @@ const nr = (e) => {
3214
3240
  textOverflow: "ellipsis",
3215
3241
  textAlign: E.textAlign === "text-right" ? "right" : E.textAlign === "text-center" ? "center" : "left"
3216
3242
  },
3217
- children: F
3243
+ children: z
3218
3244
  }
3219
- ) : F
3245
+ ) : z
3220
3246
  },
3221
- `row-${G}-col-${D}`
3247
+ `row-${S}-col-${D}`
3222
3248
  );
3223
3249
  }),
3224
- r || o || t || I ? /* @__PURE__ */ A(CA, { style: {
3250
+ r || o || t || u ? /* @__PURE__ */ A(CA, { style: {
3225
3251
  width: R,
3226
3252
  position: "sticky",
3227
3253
  right: 0,
3228
3254
  zIndex: 1,
3229
- backgroundColor: MA
3230
- }, children: /* @__PURE__ */ A(T, { direction: "row", align: "center", justify: "center", gap: "sm", children: L.map((E) => {
3231
- const D = G === i.length - 1 ? "top" : "bottom";
3232
- return E === "detail" && r && (g == null ? void 0 : g(k)) !== !1 ? /* @__PURE__ */ A(rA, { label: "Detail", position: D, children: /* @__PURE__ */ A(
3233
- O,
3255
+ backgroundColor: mA
3256
+ }, children: /* @__PURE__ */ A(T, { direction: "row", align: "center", justify: "center", gap: "sm", children: G.map((E) => {
3257
+ const D = S === i.length - 1 ? "top" : "bottom";
3258
+ return E === "detail" && r && (g == null ? void 0 : g(k)) !== !1 ? /* @__PURE__ */ A(oA, { label: "Detail", position: D, children: /* @__PURE__ */ A(
3259
+ b,
3234
3260
  {
3235
3261
  size: "xs",
3236
3262
  secondary: !0,
3237
3263
  onClick: () => r(k.id, k),
3238
3264
  iconLeft: /* @__PURE__ */ A(M, { name: "DocumentClean", size: "sm", style: { color: "rgb(var(--starasia-ui-raw-color-gray-600))" } })
3239
3265
  }
3240
- ) }, "detail") : E === "update" && o && (c == null ? void 0 : c(k)) !== !1 ? /* @__PURE__ */ A(rA, { label: "Update", position: D, children: /* @__PURE__ */ A(
3241
- O,
3266
+ ) }, "detail") : E === "update" && o && (c == null ? void 0 : c(k)) !== !1 ? /* @__PURE__ */ A(oA, { label: "Update", position: D, children: /* @__PURE__ */ A(
3267
+ b,
3242
3268
  {
3243
3269
  size: "xs",
3244
3270
  secondary: !0,
3245
3271
  onClick: () => o(k),
3246
3272
  iconLeft: /* @__PURE__ */ A(M, { name: "Edit1", size: "sm", style: { color: "rgb(var(--starasia-ui-raw-color-gray-600))" } })
3247
3273
  }
3248
- ) }, "update") : E === "delete" && t && (l == null ? void 0 : l(k)) !== !1 ? /* @__PURE__ */ A(rA, { label: "Delete", position: D, children: /* @__PURE__ */ A(
3249
- O,
3274
+ ) }, "update") : E === "delete" && t && (l == null ? void 0 : l(k)) !== !1 ? /* @__PURE__ */ A(oA, { label: "Delete", position: D, children: /* @__PURE__ */ A(
3275
+ b,
3250
3276
  {
3251
3277
  size: "xs",
3252
3278
  secondary: !0,
3253
3279
  onClick: () => t(k.id, k),
3254
3280
  iconLeft: /* @__PURE__ */ A(M, { name: "Trash1", size: "sm", style: { color: "rgb(var(--starasia-ui-raw-color-red-600))" } })
3255
3281
  }
3256
- ) }, "delete") : E === "custom" ? /* @__PURE__ */ A(gA.Fragment, { children: I == null ? void 0 : I(k) }, "custom") : null;
3282
+ ) }, "delete") : E === "custom" ? /* @__PURE__ */ A(sA.Fragment, { children: u == null ? void 0 : u(k) }, "custom") : null;
3257
3283
  }) }) }) : null
3258
3284
  ]
3259
3285
  },
3260
- `${k}${G}`
3286
+ `${k}${S}`
3261
3287
  )) })
3262
3288
  ] }) });
3263
- }, Oi = ({
3289
+ }, bi = ({
3264
3290
  wrapperProps: e,
3265
3291
  dataTableProps: i,
3266
3292
  headerProps: r,
3267
3293
  footerProps: o
3268
3294
  }) => {
3269
3295
  var w;
3270
- const t = eA(null), [n, l] = b(
3296
+ const t = iA(null), [n, l] = O(
3271
3297
  (i == null ? void 0 : i.defaultFrozenCount) ?? 0
3272
- ), c = (r == null ? void 0 : r.show) ?? !0, g = eA(null), C = (w = i == null ? void 0 : i.pagination) == null ? void 0 : w.totalData;
3298
+ ), c = (r == null ? void 0 : r.show) ?? !0, g = iA(null), C = (w = i == null ? void 0 : i.pagination) == null ? void 0 : w.totalData;
3273
3299
  typeof C == "number" && (g.current = C);
3274
3300
  const Q = (o == null ? void 0 : o.showFooter) ?? (C === void 0 ? g.current !== 0 : C !== 0);
3275
3301
  return /* @__PURE__ */ s(mi, { ...e, children: [
@@ -3307,12 +3333,12 @@ const nr = (e) => {
3307
3333
  )
3308
3334
  ] });
3309
3335
  };
3310
- function bi(e) {
3311
- return _(
3336
+ function Oi(e) {
3337
+ return AA(
3312
3338
  e
3313
3339
  );
3314
3340
  }
3315
- const Qr = bi(Oi), kA = ({
3341
+ const Qr = Oi(bi), EA = ({
3316
3342
  of: e,
3317
3343
  render: i
3318
3344
  }) => Ee.toArray(e == null ? void 0 : e.map((r, o, t) => i(r, o, t))), Y = ({
@@ -3370,11 +3396,11 @@ const Qr = bi(Oi), kA = ({
3370
3396
  Y,
3371
3397
  {
3372
3398
  condition: !!e.role && !e.isTenant || t,
3373
- fallback: /* @__PURE__ */ A(q.Body1, { children: e.name }),
3399
+ fallback: /* @__PURE__ */ A(J.Body1, { children: e.name }),
3374
3400
  children: /* @__PURE__ */ s(a, { direction: "column", gap: "sm", children: [
3375
- /* @__PURE__ */ A(q.Body1, { children: e.name }),
3401
+ /* @__PURE__ */ A(J.Body1, { children: e.name }),
3376
3402
  /* @__PURE__ */ A(
3377
- q.Body3,
3403
+ J.Body3,
3378
3404
  {
3379
3405
  props: {
3380
3406
  color: "tertiary"
@@ -3389,7 +3415,7 @@ const Qr = bi(Oi), kA = ({
3389
3415
  ]
3390
3416
  }
3391
3417
  );
3392
- }, pA = ({
3418
+ }, jA = ({
3393
3419
  dataApps: e,
3394
3420
  handleSwitch: i,
3395
3421
  title: r,
@@ -3400,9 +3426,9 @@ const Qr = bi(Oi), kA = ({
3400
3426
  isOnOrgSelect: c,
3401
3427
  setSelectedApp: g
3402
3428
  }) => t && e && e.length > 0 && /* @__PURE__ */ s(a, { marginTop: "lg", children: [
3403
- r && /* @__PURE__ */ A(q.H5, { children: r }),
3429
+ r && /* @__PURE__ */ A(J.H5, { children: r }),
3404
3430
  /* @__PURE__ */ A(
3405
- kA,
3431
+ EA,
3406
3432
  {
3407
3433
  of: e,
3408
3434
  render: (C) => /* @__PURE__ */ A(
@@ -3432,7 +3458,7 @@ const Qr = bi(Oi), kA = ({
3432
3458
  }) => {
3433
3459
  var Q;
3434
3460
  const C = $A();
3435
- return /* @__PURE__ */ s(SA, { onHide: e, show: i, closeButton: !1, children: [
3461
+ return /* @__PURE__ */ s(GA, { onHide: e, show: i, closeButton: !1, children: [
3436
3462
  /* @__PURE__ */ s(
3437
3463
  BA,
3438
3464
  {
@@ -3443,7 +3469,7 @@ const Qr = bi(Oi), kA = ({
3443
3469
  children: [
3444
3470
  C.show ? /* @__PURE__ */ A(M, { name: "ChevronLeft" }) : /* @__PURE__ */ A(M, { name: "Cross" }),
3445
3471
  /* @__PURE__ */ A(
3446
- q.SubH3,
3472
+ J.SubH3,
3447
3473
  {
3448
3474
  props: {
3449
3475
  color: "gray-500"
@@ -3455,9 +3481,9 @@ const Qr = bi(Oi), kA = ({
3455
3481
  }
3456
3482
  ),
3457
3483
  C.show ? /* @__PURE__ */ s(U, { children: [
3458
- /* @__PURE__ */ A(q.H4, { children: (Q = C.data) == null ? void 0 : Q.name }),
3484
+ /* @__PURE__ */ A(J.H4, { children: (Q = C.data) == null ? void 0 : Q.name }),
3459
3485
  /* @__PURE__ */ A(
3460
- q.SubH3,
3486
+ J.SubH3,
3461
3487
  {
3462
3488
  props: {
3463
3489
  color: "gray-500"
@@ -3471,12 +3497,12 @@ const Qr = bi(Oi), kA = ({
3471
3497
  condition: !!(o != null && o.length),
3472
3498
  isLoading: c,
3473
3499
  loading: /* @__PURE__ */ s(a, { marginTop: "sm", gap: "md", children: [
3474
- /* @__PURE__ */ A(lA, { variant: "list" }),
3475
- /* @__PURE__ */ A(lA, { variant: "list" }),
3476
- /* @__PURE__ */ A(lA, { variant: "list" })
3500
+ /* @__PURE__ */ A(cA, { variant: "list" }),
3501
+ /* @__PURE__ */ A(cA, { variant: "list" }),
3502
+ /* @__PURE__ */ A(cA, { variant: "list" })
3477
3503
  ] }),
3478
3504
  children: /* @__PURE__ */ A(
3479
- pA,
3505
+ jA,
3480
3506
  {
3481
3507
  dataApps: o == null ? void 0 : o.map((w) => {
3482
3508
  var B;
@@ -3498,9 +3524,9 @@ const Qr = bi(Oi), kA = ({
3498
3524
  )
3499
3525
  ] }) : /* @__PURE__ */ s(U, { children: [
3500
3526
  /* @__PURE__ */ s(T, { direction: "row", align: "center", gap: "sm", children: [
3501
- /* @__PURE__ */ A(q.H4, { children: "Switch Apps" }),
3527
+ /* @__PURE__ */ A(J.H4, { children: "Switch Apps" }),
3502
3528
  /* @__PURE__ */ s(
3503
- q.SubH3,
3529
+ J.SubH3,
3504
3530
  {
3505
3531
  props: {
3506
3532
  color: "gray-500"
@@ -3513,7 +3539,7 @@ const Qr = bi(Oi), kA = ({
3513
3539
  )
3514
3540
  ] }),
3515
3541
  /* @__PURE__ */ A(
3516
- pA,
3542
+ jA,
3517
3543
  {
3518
3544
  title: "Organization Apps",
3519
3545
  show: r == null ? void 0 : r.some((w) => w.isTenant),
@@ -3526,7 +3552,7 @@ const Qr = bi(Oi), kA = ({
3526
3552
  }
3527
3553
  ),
3528
3554
  /* @__PURE__ */ A(
3529
- pA,
3555
+ jA,
3530
3556
  {
3531
3557
  title: "Single Apps",
3532
3558
  show: r == null ? void 0 : r.some((w) => !w.isTenant),
@@ -3537,7 +3563,7 @@ const Qr = bi(Oi), kA = ({
3537
3563
  )
3538
3564
  ] })
3539
3565
  ] });
3540
- }, jA = ({
3566
+ }, NA = ({
3541
3567
  dataApps: e,
3542
3568
  handleSwitch: i,
3543
3569
  title: r,
@@ -3548,9 +3574,9 @@ const Qr = bi(Oi), kA = ({
3548
3574
  isOnOrgSelect: c,
3549
3575
  setSelectedApp: g
3550
3576
  }) => t && e && (e == null ? void 0 : e.length) > 0 && /* @__PURE__ */ s(a, { marginTop: "lg", children: [
3551
- r && /* @__PURE__ */ A(q.H5, { children: r }),
3577
+ r && /* @__PURE__ */ A(J.H5, { children: r }),
3552
3578
  /* @__PURE__ */ A(
3553
- kA,
3579
+ EA,
3554
3580
  {
3555
3581
  of: e,
3556
3582
  render: (C) => /* @__PURE__ */ A(
@@ -3577,7 +3603,7 @@ const Qr = bi(Oi), kA = ({
3577
3603
  }) => {
3578
3604
  var c, g, C, Q, w;
3579
3605
  const l = $A();
3580
- return /* @__PURE__ */ s(SA, { onHide: e, show: i, closeButton: !1, children: [
3606
+ return /* @__PURE__ */ s(GA, { onHide: e, show: i, closeButton: !1, children: [
3581
3607
  /* @__PURE__ */ s(
3582
3608
  BA,
3583
3609
  {
@@ -3588,7 +3614,7 @@ const Qr = bi(Oi), kA = ({
3588
3614
  children: [
3589
3615
  l.show ? /* @__PURE__ */ A(M, { name: "ChevronLeft" }) : /* @__PURE__ */ A(M, { name: "Cross" }),
3590
3616
  /* @__PURE__ */ A(
3591
- q.SubH3,
3617
+ J.SubH3,
3592
3618
  {
3593
3619
  props: {
3594
3620
  color: "gray-500"
@@ -3600,9 +3626,9 @@ const Qr = bi(Oi), kA = ({
3600
3626
  }
3601
3627
  ),
3602
3628
  l.show ? /* @__PURE__ */ s(U, { children: [
3603
- /* @__PURE__ */ A(q.H4, { children: (c = l.data) == null ? void 0 : c.name }),
3629
+ /* @__PURE__ */ A(J.H4, { children: (c = l.data) == null ? void 0 : c.name }),
3604
3630
  /* @__PURE__ */ A(
3605
- q.SubH3,
3631
+ J.SubH3,
3606
3632
  {
3607
3633
  props: {
3608
3634
  color: "tertiary"
@@ -3615,15 +3641,15 @@ const Qr = bi(Oi), kA = ({
3615
3641
  {
3616
3642
  condition: !!((C = (g = l.data) == null ? void 0 : g.organizations) != null && C.length),
3617
3643
  children: /* @__PURE__ */ A(
3618
- jA,
3644
+ NA,
3619
3645
  {
3620
3646
  dataApps: (w = (Q = l.data) == null ? void 0 : Q.organizations) == null ? void 0 : w.map((B) => {
3621
- var I;
3647
+ var u;
3622
3648
  return {
3623
3649
  ...B,
3624
3650
  id: B.id,
3625
3651
  isTenant: !0,
3626
- applicationKey: ((I = l.data) == null ? void 0 : I.applicationKey) || ""
3652
+ applicationKey: ((u = l.data) == null ? void 0 : u.applicationKey) || ""
3627
3653
  };
3628
3654
  }),
3629
3655
  handleSwitch: o,
@@ -3637,9 +3663,9 @@ const Qr = bi(Oi), kA = ({
3637
3663
  )
3638
3664
  ] }) : /* @__PURE__ */ s(U, { children: [
3639
3665
  /* @__PURE__ */ s(T, { direction: "row", align: "center", gap: "sm", children: [
3640
- /* @__PURE__ */ A(q.H4, { children: "Switch Apps" }),
3666
+ /* @__PURE__ */ A(J.H4, { children: "Switch Apps" }),
3641
3667
  /* @__PURE__ */ s(
3642
- q.SubH3,
3668
+ J.SubH3,
3643
3669
  {
3644
3670
  props: {
3645
3671
  color: "gray-500"
@@ -3652,7 +3678,7 @@ const Qr = bi(Oi), kA = ({
3652
3678
  )
3653
3679
  ] }),
3654
3680
  /* @__PURE__ */ A(
3655
- jA,
3681
+ NA,
3656
3682
  {
3657
3683
  title: "Organization Apps",
3658
3684
  show: r == null ? void 0 : r.some((B) => B.isTenant),
@@ -3665,7 +3691,7 @@ const Qr = bi(Oi), kA = ({
3665
3691
  }
3666
3692
  ),
3667
3693
  /* @__PURE__ */ A(
3668
- jA,
3694
+ NA,
3669
3695
  {
3670
3696
  title: "Single Apps",
3671
3697
  show: r == null ? void 0 : r.some((B) => !B.isTenant),
@@ -3686,7 +3712,7 @@ const Qr = bi(Oi), kA = ({
3686
3712
  variant: l = "single-api",
3687
3713
  isLoading: c
3688
3714
  }) => {
3689
- const [g, C] = b(!1), [Q, w] = b("");
3715
+ const [g, C] = O(!1), [Q, w] = O("");
3690
3716
  return /* @__PURE__ */ s(U, { children: [
3691
3717
  /* @__PURE__ */ s(
3692
3718
  a,
@@ -3816,7 +3842,7 @@ const Qr = bi(Oi), kA = ({
3816
3842
  }
3817
3843
  )
3818
3844
  ] });
3819
- }, K = (e) => /* @__PURE__ */ A(
3845
+ }, Z = (e) => /* @__PURE__ */ A(
3820
3846
  d,
3821
3847
  {
3822
3848
  ...e,
@@ -3826,7 +3852,7 @@ const Qr = bi(Oi), kA = ({
3826
3852
  color: e.color || "gray-700",
3827
3853
  children: e.children
3828
3854
  }
3829
- ), nA = (e) => /* @__PURE__ */ A(d, { color: "red-600", fontSize: "sm", children: e.message }), Ni = ({
3855
+ ), lA = (e) => /* @__PURE__ */ A(d, { color: "red-600", fontSize: "sm", children: e.message }), Ni = ({
3830
3856
  size: e = "md",
3831
3857
  direction: i = "vertical",
3832
3858
  requiredTitle: r = "(Required)",
@@ -3853,7 +3879,7 @@ const Qr = bi(Oi), kA = ({
3853
3879
  customMaxWidth: l,
3854
3880
  fullWidth: o,
3855
3881
  children: [
3856
- /* @__PURE__ */ A(K, { children: t.title }),
3882
+ /* @__PURE__ */ A(Z, { children: t.title }),
3857
3883
  /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description })
3858
3884
  ]
3859
3885
  }
@@ -3866,10 +3892,10 @@ const Qr = bi(Oi), kA = ({
3866
3892
  fullWidth: o,
3867
3893
  children: [
3868
3894
  /* @__PURE__ */ s(T, { direction: "row", gap: "xs", align: "center", children: [
3869
- /* @__PURE__ */ A(K, { fontSize: e, children: t.title }),
3870
- /* @__PURE__ */ A(K, { color: "error", fontSize: e, children: r }),
3895
+ /* @__PURE__ */ A(Z, { fontSize: e, children: t.title }),
3896
+ /* @__PURE__ */ A(Z, { color: "error", fontSize: e, children: r }),
3871
3897
  /* @__PURE__ */ A(Y, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
3872
- rA,
3898
+ oA,
3873
3899
  {
3874
3900
  label: (g = t.tooltip) == null ? void 0 : g.label,
3875
3901
  arrowPosition: (C = t.tooltip) == null ? void 0 : C.arrowPosition,
@@ -3896,7 +3922,7 @@ const Qr = bi(Oi), kA = ({
3896
3922
  ),
3897
3923
  /* @__PURE__ */ s(a, { gap: "xs", fullWidth: t.inputProps.fullWidth || !1, children: [
3898
3924
  /* @__PURE__ */ A(
3899
- IA,
3925
+ uA,
3900
3926
  {
3901
3927
  ref: t.inputRef,
3902
3928
  size: e,
@@ -3905,7 +3931,7 @@ const Qr = bi(Oi), kA = ({
3905
3931
  fullWidth: !0
3906
3932
  }
3907
3933
  ),
3908
- !n && t.errorMessage && /* @__PURE__ */ A(nA, { message: t.errorMessage }),
3934
+ !n && t.errorMessage && /* @__PURE__ */ A(lA, { message: t.errorMessage }),
3909
3935
  t.inputProps.extended && t.inputProps.extended
3910
3936
  ] })
3911
3937
  ]
@@ -3938,7 +3964,7 @@ const Qr = bi(Oi), kA = ({
3938
3964
  customMaxWidth: l,
3939
3965
  fullWidth: o,
3940
3966
  children: [
3941
- /* @__PURE__ */ A(K, { children: t.title }),
3967
+ /* @__PURE__ */ A(Z, { children: t.title }),
3942
3968
  /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description })
3943
3969
  ]
3944
3970
  }
@@ -3951,10 +3977,10 @@ const Qr = bi(Oi), kA = ({
3951
3977
  fullWidth: o,
3952
3978
  children: [
3953
3979
  /* @__PURE__ */ s(T, { direction: "row", gap: "xs", align: "center", children: [
3954
- /* @__PURE__ */ A(K, { fontSize: e, children: t.title }),
3955
- /* @__PURE__ */ A(K, { color: "error", fontSize: e, children: r }),
3980
+ /* @__PURE__ */ A(Z, { fontSize: e, children: t.title }),
3981
+ /* @__PURE__ */ A(Z, { color: "error", fontSize: e, children: r }),
3956
3982
  /* @__PURE__ */ A(Y, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
3957
- rA,
3983
+ oA,
3958
3984
  {
3959
3985
  label: (g = t.tooltip) == null ? void 0 : g.label,
3960
3986
  arrowPosition: (C = t.tooltip) == null ? void 0 : C.arrowPosition,
@@ -3987,7 +4013,7 @@ const Qr = bi(Oi), kA = ({
3987
4013
  width: t.inputProps.fullWidth ? "100%" : i === "horizontal" && t.customWidth ? t.customWidth : i === "horizontal" ? "343px" : ""
3988
4014
  },
3989
4015
  children: /* @__PURE__ */ A(
3990
- xA,
4016
+ SA,
3991
4017
  {
3992
4018
  size: e,
3993
4019
  ...t.inputProps,
@@ -3996,7 +4022,7 @@ const Qr = bi(Oi), kA = ({
3996
4022
  )
3997
4023
  }
3998
4024
  ),
3999
- !n && t.errorMessage && /* @__PURE__ */ A(nA, { message: t.errorMessage }),
4025
+ !n && t.errorMessage && /* @__PURE__ */ A(lA, { message: t.errorMessage }),
4000
4026
  t.inputProps.extended && t.inputProps.extended
4001
4027
  ] })
4002
4028
  ]
@@ -4004,7 +4030,7 @@ const Qr = bi(Oi), kA = ({
4004
4030
  );
4005
4031
  }, zi = (e, i) => typeof e == "string" && e || i === "error" ? "var(--starasia-ui-color-error)" : "var(--starasia-ui-text-disable)", Ki = (e) => {
4006
4032
  var c;
4007
- const [i, r] = b(!1), o = (g) => {
4033
+ const [i, r] = O(!1), o = (g) => {
4008
4034
  g.preventDefault(), g.stopPropagation();
4009
4035
  }, t = (g) => {
4010
4036
  g.preventDefault(), g.stopPropagation(), g.dataTransfer && e.handleOnFileChange(g.dataTransfer.files.item(0));
@@ -4145,14 +4171,14 @@ const Ji = (e) => {
4145
4171
  style: {
4146
4172
  textWrap: "nowrap"
4147
4173
  },
4148
- children: e.fileDate ? e.fileDate : mA(/* @__PURE__ */ new Date())
4174
+ children: e.fileDate ? e.fileDate : yA(/* @__PURE__ */ new Date())
4149
4175
  }
4150
4176
  )
4151
4177
  ] })
4152
4178
  ] })
4153
4179
  ] }),
4154
4180
  /* @__PURE__ */ A(
4155
- O,
4181
+ b,
4156
4182
  {
4157
4183
  size: "xs",
4158
4184
  secondary: !0,
@@ -4176,13 +4202,13 @@ const Ji = (e) => {
4176
4202
  );
4177
4203
  }, qi = ({ status: e = "default", ...i }) => {
4178
4204
  var n;
4179
- const r = eA(null), o = () => {
4205
+ const r = iA(null), o = () => {
4180
4206
  if (i.defaultUrl) {
4181
4207
  window.open(i.defaultUrl);
4182
4208
  return;
4183
4209
  }
4184
4210
  r.current && r.current.click();
4185
- }, t = X("md");
4211
+ }, t = $("md");
4186
4212
  return /* @__PURE__ */ s(U, { children: [
4187
4213
  /* @__PURE__ */ A(
4188
4214
  "input",
@@ -4263,7 +4289,7 @@ const Ji = (e) => {
4263
4289
  customMaxWidth: l,
4264
4290
  fullWidth: o,
4265
4291
  children: [
4266
- /* @__PURE__ */ A(K, { children: t.title }),
4292
+ /* @__PURE__ */ A(Z, { children: t.title }),
4267
4293
  /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description })
4268
4294
  ]
4269
4295
  }
@@ -4276,10 +4302,10 @@ const Ji = (e) => {
4276
4302
  fullWidth: o,
4277
4303
  children: [
4278
4304
  /* @__PURE__ */ s(T, { direction: "row", gap: "xs", align: "center", children: [
4279
- /* @__PURE__ */ A(K, { fontSize: e, children: t.title }),
4280
- /* @__PURE__ */ A(K, { color: "error", fontSize: e, children: r }),
4305
+ /* @__PURE__ */ A(Z, { fontSize: e, children: t.title }),
4306
+ /* @__PURE__ */ A(Z, { color: "error", fontSize: e, children: r }),
4281
4307
  /* @__PURE__ */ A(Y, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4282
- rA,
4308
+ oA,
4283
4309
  {
4284
4310
  label: (g = t.tooltip) == null ? void 0 : g.label,
4285
4311
  arrowPosition: (C = t.tooltip) == null ? void 0 : C.arrowPosition,
@@ -4312,7 +4338,7 @@ const Ji = (e) => {
4312
4338
  status: t.errorMessage ? "error" : "default"
4313
4339
  }
4314
4340
  ),
4315
- !n && t.errorMessage && /* @__PURE__ */ A(nA, { message: t.errorMessage })
4341
+ !n && t.errorMessage && /* @__PURE__ */ A(lA, { message: t.errorMessage })
4316
4342
  ] })
4317
4343
  ]
4318
4344
  }
@@ -4345,8 +4371,8 @@ const Ji = (e) => {
4345
4371
  customMaxWidth: c,
4346
4372
  fullWidth: o,
4347
4373
  children: [
4348
- /* @__PURE__ */ A(K, { children: n.title }),
4349
- /* @__PURE__ */ A(q.Body3, { props: { color: "gray-500" }, children: n.description })
4374
+ /* @__PURE__ */ A(Z, { children: n.title }),
4375
+ /* @__PURE__ */ A(J.Body3, { props: { color: "gray-500" }, children: n.description })
4350
4376
  ]
4351
4377
  }
4352
4378
  ),
@@ -4358,10 +4384,10 @@ const Ji = (e) => {
4358
4384
  fullWidth: o,
4359
4385
  children: [
4360
4386
  /* @__PURE__ */ s(T, { direction: "row", gap: "xs", align: "center", children: [
4361
- /* @__PURE__ */ A(K, { fontSize: e, children: n.title }),
4362
- /* @__PURE__ */ A(K, { color: "error", fontSize: e, children: r }),
4387
+ /* @__PURE__ */ A(Z, { fontSize: e, children: n.title }),
4388
+ /* @__PURE__ */ A(Z, { color: "error", fontSize: e, children: r }),
4363
4389
  /* @__PURE__ */ A(Y, { condition: !!((g = n.tooltip) != null && g.label), children: /* @__PURE__ */ A(
4364
- rA,
4390
+ oA,
4365
4391
  {
4366
4392
  label: (C = n.tooltip) == null ? void 0 : C.label,
4367
4393
  arrowPosition: (Q = n.tooltip) == null ? void 0 : Q.arrowPosition,
@@ -4393,7 +4419,7 @@ const Ji = (e) => {
4393
4419
  direction: i === "horizontal-inline" ? "row" : "column",
4394
4420
  align: "flex-start",
4395
4421
  children: /* @__PURE__ */ A(
4396
- kA,
4422
+ EA,
4397
4423
  {
4398
4424
  of: (w = n.checkBoxesList) == null ? void 0 : w.map((B) => ({
4399
4425
  ...B,
@@ -4408,12 +4434,12 @@ const Ji = (e) => {
4408
4434
  ...n.badgeContainerProps,
4409
4435
  children: [
4410
4436
  /* @__PURE__ */ A(
4411
- NA,
4437
+ xA,
4412
4438
  {
4413
4439
  name: B.name,
4414
4440
  value: B.id,
4415
4441
  checked: B.isChecked,
4416
- onChange: (I) => n.onChecked(I.target.value, B),
4442
+ onChange: (u) => n.onChecked(u.target.value, B),
4417
4443
  label: B.name,
4418
4444
  description: B.description
4419
4445
  }
@@ -4422,12 +4448,12 @@ const Ji = (e) => {
4422
4448
  ]
4423
4449
  }
4424
4450
  ) : /* @__PURE__ */ A(
4425
- NA,
4451
+ xA,
4426
4452
  {
4427
4453
  name: B.name,
4428
4454
  value: B.id,
4429
4455
  checked: B.isChecked,
4430
- onChange: (I) => n.onChecked(I.target.value, B),
4456
+ onChange: (u) => n.onChecked(u.target.value, B),
4431
4457
  label: B.name,
4432
4458
  description: B.description
4433
4459
  }
@@ -4436,7 +4462,7 @@ const Ji = (e) => {
4436
4462
  )
4437
4463
  }
4438
4464
  ),
4439
- !l && n.errorMessage && /* @__PURE__ */ A(nA, { message: n.errorMessage })
4465
+ !l && n.errorMessage && /* @__PURE__ */ A(lA, { message: n.errorMessage })
4440
4466
  ]
4441
4467
  }
4442
4468
  );
@@ -4461,7 +4487,7 @@ const Ji = (e) => {
4461
4487
  customMaxWidth: t,
4462
4488
  fullWidth: r,
4463
4489
  children: [
4464
- o.title && /* @__PURE__ */ A(K, { children: o.title }),
4490
+ o.title && /* @__PURE__ */ A(Z, { children: o.title }),
4465
4491
  /* @__PURE__ */ A(Y, { condition: !!o.description, children: /* @__PURE__ */ A(d, { color: "gray-500", children: o.description }) })
4466
4492
  ]
4467
4493
  }
@@ -4474,7 +4500,7 @@ const Ji = (e) => {
4474
4500
  align: "flex-start",
4475
4501
  flexWrap: "wrap",
4476
4502
  children: /* @__PURE__ */ A(
4477
- kA,
4503
+ EA,
4478
4504
  {
4479
4505
  of: (n = o.radioList) == null ? void 0 : n.map((l) => ({
4480
4506
  ...l,
@@ -4514,7 +4540,7 @@ const Ji = (e) => {
4514
4540
  )
4515
4541
  }
4516
4542
  ),
4517
- o.errorMessage && /* @__PURE__ */ A(nA, { message: o.errorMessage })
4543
+ o.errorMessage && /* @__PURE__ */ A(lA, { message: o.errorMessage })
4518
4544
  ]
4519
4545
  }
4520
4546
  );
@@ -4545,7 +4571,7 @@ const Ji = (e) => {
4545
4571
  customMaxWidth: l,
4546
4572
  fullWidth: o,
4547
4573
  children: [
4548
- /* @__PURE__ */ A(K, { children: t.title }),
4574
+ /* @__PURE__ */ A(Z, { children: t.title }),
4549
4575
  /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description })
4550
4576
  ]
4551
4577
  }
@@ -4558,10 +4584,10 @@ const Ji = (e) => {
4558
4584
  fullWidth: o,
4559
4585
  children: [
4560
4586
  /* @__PURE__ */ s(T, { direction: "row", gap: "xs", align: "center", children: [
4561
- /* @__PURE__ */ A(K, { fontSize: e, children: t.title }),
4562
- /* @__PURE__ */ A(K, { color: "error", fontSize: e, children: r }),
4587
+ /* @__PURE__ */ A(Z, { fontSize: e, children: t.title }),
4588
+ /* @__PURE__ */ A(Z, { color: "error", fontSize: e, children: r }),
4563
4589
  /* @__PURE__ */ A(Y, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4564
- rA,
4590
+ oA,
4565
4591
  {
4566
4592
  label: (g = t.tooltip) == null ? void 0 : g.label,
4567
4593
  arrowPosition: (C = t.tooltip) == null ? void 0 : C.arrowPosition,
@@ -4596,7 +4622,7 @@ const Ji = (e) => {
4596
4622
  status: t.errorMessage ? "error" : "default"
4597
4623
  }
4598
4624
  ),
4599
- !n && t.errorMessage && /* @__PURE__ */ A(nA, { message: t.errorMessage })
4625
+ !n && t.errorMessage && /* @__PURE__ */ A(lA, { message: t.errorMessage })
4600
4626
  ] })
4601
4627
  ]
4602
4628
  }
@@ -4629,7 +4655,7 @@ const Ji = (e) => {
4629
4655
  customMaxWidth: l,
4630
4656
  fullWidth: t,
4631
4657
  children: [
4632
- /* @__PURE__ */ A(K, { children: n.title }),
4658
+ /* @__PURE__ */ A(Z, { children: n.title }),
4633
4659
  /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: n.titleDescription })
4634
4660
  ]
4635
4661
  }
@@ -4642,10 +4668,10 @@ const Ji = (e) => {
4642
4668
  fullWidth: t,
4643
4669
  children: [
4644
4670
  /* @__PURE__ */ s(T, { direction: "row", gap: "xs", align: "center", children: [
4645
- /* @__PURE__ */ A(K, { fontSize: e, children: n.title }),
4646
- /* @__PURE__ */ A(K, { color: "error", fontSize: e, children: r }),
4671
+ /* @__PURE__ */ A(Z, { fontSize: e, children: n.title }),
4672
+ /* @__PURE__ */ A(Z, { color: "error", fontSize: e, children: r }),
4647
4673
  /* @__PURE__ */ A(Y, { condition: !!((c = n.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4648
- rA,
4674
+ oA,
4649
4675
  {
4650
4676
  label: (g = n.tooltip) == null ? void 0 : g.label,
4651
4677
  arrowPosition: (C = n.tooltip) == null ? void 0 : C.arrowPosition,
@@ -4679,7 +4705,7 @@ const Ji = (e) => {
4679
4705
  description: n.description
4680
4706
  }
4681
4707
  ),
4682
- n.errorMessage && /* @__PURE__ */ A(nA, { message: n.errorMessage })
4708
+ n.errorMessage && /* @__PURE__ */ A(lA, { message: n.errorMessage })
4683
4709
  ]
4684
4710
  }
4685
4711
  );
@@ -4689,9 +4715,9 @@ const Ji = (e) => {
4689
4715
  ...r
4690
4716
  }) => {
4691
4717
  const o = KA(), t = (l) => {
4692
- var g, C, Q, w, B, I;
4718
+ var g, C, Q, w, B, u;
4693
4719
  if (!l) return;
4694
- const c = r.disabled ? "var(--starasia-ui-text-color-primary-disable)" : e === "secondary" ? "var(--starasia-ui-text-color-secondary)" : e === "secondary-danger" ? (C = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.red) == null ? void 0 : C[600] : e === "secondary-primary" ? (w = (Q = o == null ? void 0 : o.computed) == null ? void 0 : Q.blue) == null ? void 0 : w[700] : (I = (B = o == null ? void 0 : o.computed) == null ? void 0 : B.gray) == null ? void 0 : I[50];
4720
+ const c = r.disabled ? "var(--starasia-ui-text-color-primary-disable)" : e === "secondary" ? "var(--starasia-ui-text-color-secondary)" : e === "secondary-danger" ? (C = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.red) == null ? void 0 : C[600] : e === "secondary-primary" ? (w = (Q = o == null ? void 0 : o.computed) == null ? void 0 : Q.blue) == null ? void 0 : w[700] : (u = (B = o == null ? void 0 : o.computed) == null ? void 0 : B.gray) == null ? void 0 : u[50];
4695
4721
  return /* @__PURE__ */ A(M, { name: l, size: i, style: { color: c } });
4696
4722
  }, n = () => {
4697
4723
  var c, g, C, Q;
@@ -4702,18 +4728,18 @@ const Ji = (e) => {
4702
4728
  };
4703
4729
  switch (i) {
4704
4730
  case "xs":
4705
- return /* @__PURE__ */ A(q.Body2, { props: { style: l }, children: r.title });
4731
+ return /* @__PURE__ */ A(J.Body2, { props: { style: l }, children: r.title });
4706
4732
  case "sm":
4707
4733
  case "md":
4708
- return /* @__PURE__ */ A(q.SubH3, { props: { style: l }, children: r.title });
4734
+ return /* @__PURE__ */ A(J.SubH3, { props: { style: l }, children: r.title });
4709
4735
  case "lg":
4710
- return /* @__PURE__ */ A(q.SubH2, { props: { style: l }, children: r.title });
4736
+ return /* @__PURE__ */ A(J.SubH2, { props: { style: l }, children: r.title });
4711
4737
  default:
4712
4738
  return r.title;
4713
4739
  }
4714
4740
  };
4715
4741
  return /* @__PURE__ */ A(
4716
- O,
4742
+ b,
4717
4743
  {
4718
4744
  fullWidth: !0,
4719
4745
  disabled: r.disabled,
@@ -4729,7 +4755,7 @@ const Ji = (e) => {
4729
4755
  }
4730
4756
  );
4731
4757
  }, Vi = (e) => /* @__PURE__ */ A(
4732
- q.H5,
4758
+ J.H5,
4733
4759
  {
4734
4760
  props: {
4735
4761
  ...e
@@ -4763,7 +4789,7 @@ const Ji = (e) => {
4763
4789
  customMaxWidth: l,
4764
4790
  fullWidth: o,
4765
4791
  children: [
4766
- /* @__PURE__ */ A(K, { children: t.title }),
4792
+ /* @__PURE__ */ A(Z, { children: t.title }),
4767
4793
  /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description })
4768
4794
  ]
4769
4795
  }
@@ -4776,10 +4802,10 @@ const Ji = (e) => {
4776
4802
  fullWidth: o,
4777
4803
  children: [
4778
4804
  /* @__PURE__ */ s(T, { direction: "row", gap: "xs", align: "center", children: [
4779
- /* @__PURE__ */ A(K, { fontSize: e, children: t.title }),
4780
- /* @__PURE__ */ A(K, { color: "error", fontSize: e, children: r }),
4805
+ /* @__PURE__ */ A(Z, { fontSize: e, children: t.title }),
4806
+ /* @__PURE__ */ A(Z, { color: "error", fontSize: e, children: r }),
4781
4807
  /* @__PURE__ */ A(Y, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4782
- rA,
4808
+ oA,
4783
4809
  {
4784
4810
  label: (g = t.tooltip) == null ? void 0 : g.label,
4785
4811
  arrowPosition: (C = t.tooltip) == null ? void 0 : C.arrowPosition,
@@ -4821,7 +4847,7 @@ const Ji = (e) => {
4821
4847
  )
4822
4848
  }
4823
4849
  ),
4824
- !n && t.errorMessage && /* @__PURE__ */ A(nA, { message: t.errorMessage })
4850
+ !n && t.errorMessage && /* @__PURE__ */ A(lA, { message: t.errorMessage })
4825
4851
  ] })
4826
4852
  ]
4827
4853
  }
@@ -4876,49 +4902,49 @@ const PA = {
4876
4902
  maxFileSize: g = 2,
4877
4903
  onError: C
4878
4904
  }, Q) => {
4879
- const w = X("md"), [B, I] = b(!1), [L, h] = b(null), [j, p] = b(!1), [N, R] = b({ x: 0, y: 0 }), [x, u] = b(1), [P, Z] = b(null);
4905
+ const w = $("md"), [B, u] = O(!1), [G, h] = O(null), [j, p] = O(!1), [F, R] = O({ x: 0, y: 0 }), [f, I] = O(1), [P, K] = O(null);
4880
4906
  W(() => {
4881
4907
  i === null && t(null);
4882
4908
  }, [i]);
4883
4909
  const V = HA(
4884
- (J, z) => {
4885
- Z(z);
4910
+ (H, y) => {
4911
+ K(y);
4886
4912
  },
4887
4913
  []
4888
- ), AA = (J) => {
4889
- var sA;
4890
- const z = (sA = J.target.files) == null ? void 0 : sA[0];
4891
- if (!z) return;
4892
- const iA = new FileReader();
4893
- iA.onload = () => {
4894
- h(iA.result), p(!0);
4895
- }, iA.readAsDataURL(z);
4896
- }, H = async () => {
4897
- if (!(!L || !P))
4914
+ ), eA = (H) => {
4915
+ var tA;
4916
+ const y = (tA = H.target.files) == null ? void 0 : tA[0];
4917
+ if (!y) return;
4918
+ const X = new FileReader();
4919
+ X.onload = () => {
4920
+ h(X.result), p(!0);
4921
+ }, X.readAsDataURL(y);
4922
+ }, N = async () => {
4923
+ if (!(!G || !P))
4898
4924
  try {
4899
- const J = await $i(L, P);
4900
- if (g && J.size > g * 1024 * 1024) {
4925
+ const H = await $i(G, P);
4926
+ if (g && H.size > g * 1024 * 1024) {
4901
4927
  C == null || C(`Ukuran file maksimal ${g}MB`);
4902
4928
  return;
4903
4929
  }
4904
- e == null || e(J);
4905
- const z = URL.createObjectURL(J);
4906
- t(z, J), p(!1);
4930
+ e == null || e(H);
4931
+ const y = URL.createObjectURL(H);
4932
+ t(y, H), p(!1);
4907
4933
  } catch {
4908
4934
  C == null || C("Gagal memproses gambar");
4909
4935
  }
4910
- }, k = eA(null), G = () => {
4936
+ }, k = iA(null), S = () => {
4911
4937
  k.current && k.current.click();
4912
4938
  };
4913
4939
  Me(Q, () => ({
4914
4940
  openFileDialog: () => {
4915
- var J;
4916
- (J = k.current) == null || J.click();
4941
+ var H;
4942
+ (H = k.current) == null || H.click();
4917
4943
  }
4918
4944
  }));
4919
4945
  const E = parseInt(n, 10), D = PA[l];
4920
- let F, f;
4921
- return D >= 1 ? (f = E, F = E * D) : (F = E, f = E / D), /* @__PURE__ */ s(
4946
+ let z, q;
4947
+ return D >= 1 ? (q = E, z = E * D) : (z = E, q = E / D), /* @__PURE__ */ s(
4922
4948
  a,
4923
4949
  {
4924
4950
  display: "flex",
@@ -4932,13 +4958,13 @@ const PA = {
4932
4958
  align: "center",
4933
4959
  justify: "center",
4934
4960
  style: {
4935
- width: c != null && c.fullWidth ? "100%" : `${F}px`,
4936
- height: c != null && c.fullWidth ? "auto" : `${f}px`,
4961
+ width: c != null && c.fullWidth ? "100%" : `${z}px`,
4962
+ height: c != null && c.fullWidth ? "auto" : `${q}px`,
4937
4963
  aspectRatio: D,
4938
4964
  flexShrink: 0
4939
4965
  },
4940
- onMouseEnter: () => I(!0),
4941
- onMouseLeave: () => I(!1),
4966
+ onMouseEnter: () => u(!0),
4967
+ onMouseLeave: () => u(!1),
4942
4968
  children: [
4943
4969
  o || i ? /* @__PURE__ */ A(
4944
4970
  "img",
@@ -4986,7 +5012,7 @@ const PA = {
4986
5012
  opacity: B ? 1 : 0,
4987
5013
  transition: "opacity 0.3s ease-in-out"
4988
5014
  },
4989
- onClick: G,
5015
+ onClick: S,
4990
5016
  children: [
4991
5017
  /* @__PURE__ */ A(
4992
5018
  "input",
@@ -4994,7 +5020,7 @@ const PA = {
4994
5020
  ref: k,
4995
5021
  type: "file",
4996
5022
  accept: "image/*",
4997
- onChange: AA,
5023
+ onChange: eA,
4998
5024
  disabled: r,
4999
5025
  style: { display: "none" }
5000
5026
  }
@@ -5048,15 +5074,15 @@ const PA = {
5048
5074
  }
5049
5075
  ),
5050
5076
  /* @__PURE__ */ s(
5051
- dA,
5077
+ hA,
5052
5078
  {
5053
5079
  isShow: j,
5054
5080
  onHide: () => p(!1),
5055
5081
  style: {
5056
- minWidth: w ? l === "1:1" ? "20rem" : F * 2 : "100%"
5082
+ minWidth: w ? l === "1:1" ? "20rem" : z * 2 : "100%"
5057
5083
  },
5058
5084
  children: [
5059
- /* @__PURE__ */ A(hA, { children: /* @__PURE__ */ A(
5085
+ /* @__PURE__ */ A(DA, { children: /* @__PURE__ */ A(
5060
5086
  a,
5061
5087
  {
5062
5088
  position: "relative",
@@ -5065,15 +5091,15 @@ const PA = {
5065
5091
  height: "20rem",
5066
5092
  backgroundColor: "gray-100"
5067
5093
  },
5068
- children: L && /* @__PURE__ */ A(
5094
+ children: G && /* @__PURE__ */ A(
5069
5095
  ye,
5070
5096
  {
5071
- image: L,
5072
- crop: N,
5073
- zoom: x,
5097
+ image: G,
5098
+ crop: F,
5099
+ zoom: f,
5074
5100
  aspect: l ? PA[l] : void 0,
5075
5101
  onCropChange: R,
5076
- onZoomChange: u,
5102
+ onZoomChange: I,
5077
5103
  onCropComplete: V,
5078
5104
  objectFit: "contain",
5079
5105
  minZoom: 0.5,
@@ -5082,9 +5108,9 @@ const PA = {
5082
5108
  )
5083
5109
  }
5084
5110
  ) }),
5085
- /* @__PURE__ */ A(yA, { children: /* @__PURE__ */ s(a, { justify: "flex-end", direction: "row", gap: "sm", children: [
5086
- /* @__PURE__ */ A(O, { size: "xs", secondary: !0, onClick: () => p(!1), children: "Cancel" }),
5087
- /* @__PURE__ */ A(O, { size: "xs", primary: !0, onClick: H, children: "Crop" })
5111
+ /* @__PURE__ */ A(fA, { children: /* @__PURE__ */ s(a, { justify: "flex-end", direction: "row", gap: "sm", children: [
5112
+ /* @__PURE__ */ A(b, { size: "xs", secondary: !0, onClick: () => p(!1), children: "Cancel" }),
5113
+ /* @__PURE__ */ A(b, { size: "xs", primary: !0, onClick: N, children: "Crop" })
5088
5114
  ] }) })
5089
5115
  ]
5090
5116
  }
@@ -5121,7 +5147,7 @@ const PA = {
5121
5147
  customMaxWidth: c,
5122
5148
  fullWidth: o,
5123
5149
  children: [
5124
- /* @__PURE__ */ A(K, { children: n.title }),
5150
+ /* @__PURE__ */ A(Z, { children: n.title }),
5125
5151
  /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: n.description })
5126
5152
  ]
5127
5153
  }
@@ -5134,10 +5160,10 @@ const PA = {
5134
5160
  fullWidth: o,
5135
5161
  children: [
5136
5162
  /* @__PURE__ */ s(T, { direction: "row", gap: "xs", align: "center", children: [
5137
- /* @__PURE__ */ A(K, { fontSize: e, children: n.title }),
5138
- /* @__PURE__ */ A(K, { color: "error", fontSize: e, children: r }),
5163
+ /* @__PURE__ */ A(Z, { fontSize: e, children: n.title }),
5164
+ /* @__PURE__ */ A(Z, { color: "error", fontSize: e, children: r }),
5139
5165
  /* @__PURE__ */ A(Y, { condition: !!((g = n.tooltip) != null && g.label), children: /* @__PURE__ */ A(
5140
- rA,
5166
+ oA,
5141
5167
  {
5142
5168
  label: (C = n.tooltip) == null ? void 0 : C.label,
5143
5169
  arrowPosition: (Q = n.tooltip) == null ? void 0 : Q.arrowPosition,
@@ -5164,7 +5190,7 @@ const PA = {
5164
5190
  ),
5165
5191
  /* @__PURE__ */ s(T, { gap: "xs", children: [
5166
5192
  /* @__PURE__ */ A(_i, { ...n.inputProps }),
5167
- !l && n.errorMessage && /* @__PURE__ */ A(nA, { message: n.errorMessage })
5193
+ !l && n.errorMessage && /* @__PURE__ */ A(lA, { message: n.errorMessage })
5168
5194
  ] })
5169
5195
  ]
5170
5196
  }
@@ -5196,7 +5222,7 @@ const PA = {
5196
5222
  customMaxWidth: n,
5197
5223
  fullWidth: o,
5198
5224
  children: [
5199
- /* @__PURE__ */ A(K, { children: t.title }),
5225
+ /* @__PURE__ */ A(Z, { children: t.title }),
5200
5226
  /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description })
5201
5227
  ]
5202
5228
  }
@@ -5209,10 +5235,10 @@ const PA = {
5209
5235
  fullWidth: o,
5210
5236
  children: [
5211
5237
  /* @__PURE__ */ s(T, { direction: "row", gap: "xs", align: "center", children: [
5212
- /* @__PURE__ */ A(K, { fontSize: e, children: t.title }),
5213
- /* @__PURE__ */ A(K, { color: "error", fontSize: e, children: r }),
5238
+ /* @__PURE__ */ A(Z, { fontSize: e, children: t.title }),
5239
+ /* @__PURE__ */ A(Z, { color: "error", fontSize: e, children: r }),
5214
5240
  /* @__PURE__ */ A(Y, { condition: !!((l = t.tooltip) != null && l.label), children: /* @__PURE__ */ A(
5215
- rA,
5241
+ oA,
5216
5242
  {
5217
5243
  label: (c = t.tooltip) == null ? void 0 : c.label,
5218
5244
  arrowPosition: (g = t.tooltip) == null ? void 0 : g.arrowPosition,
@@ -5250,7 +5276,7 @@ const PA = {
5250
5276
  disabled: n = !1
5251
5277
  }) => {
5252
5278
  var Q;
5253
- const [l, c] = b([]);
5279
+ const [l, c] = O([]);
5254
5280
  W(() => {
5255
5281
  e && c([...e.map((w) => ({ id: w.id, isActive: w.isActive }))]);
5256
5282
  }, [e]);
@@ -5292,7 +5318,7 @@ const PA = {
5292
5318
  InputImgFile: At,
5293
5319
  Custom: et
5294
5320
  }, it = ({ customBottom: e }) => {
5295
- const [i, r] = b(!1), o = () => {
5321
+ const [i, r] = O(!1), o = () => {
5296
5322
  window.scrollY > window.screenY ? r(!0) : r(!1);
5297
5323
  }, t = () => {
5298
5324
  window.scrollTo({ top: 0, behavior: "smooth" });
@@ -5318,7 +5344,7 @@ const PA = {
5318
5344
  transition: "transform 0.2s ease-in-out"
5319
5345
  },
5320
5346
  children: /* @__PURE__ */ A(
5321
- O,
5347
+ b,
5322
5348
  {
5323
5349
  secondary: !0,
5324
5350
  size: "xs",
@@ -5342,7 +5368,7 @@ const PA = {
5342
5368
  }
5343
5369
  );
5344
5370
  }, Ir = ({ pageLayout: e, children: i }) => {
5345
- const r = X("lg");
5371
+ const r = $("lg");
5346
5372
  return /* @__PURE__ */ s(
5347
5373
  a,
5348
5374
  {
@@ -5417,7 +5443,7 @@ const PA = {
5417
5443
  ]
5418
5444
  }
5419
5445
  ) }), kr = ({ fields: e }) => /* @__PURE__ */ A(a, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ A(
5420
- kA,
5446
+ EA,
5421
5447
  {
5422
5448
  of: e,
5423
5449
  render: (i, r) => /* @__PURE__ */ A(tt, { ...i }, r)
@@ -5587,9 +5613,9 @@ const Er = ({
5587
5613
  const Q = () => {
5588
5614
  switch (o) {
5589
5615
  case "primary":
5590
- return /* @__PURE__ */ A(U, { children: n ? /* @__PURE__ */ A(O, { primary: !0, iconLeft: n, onClick: r, children: g || e }) : /* @__PURE__ */ A(O, { primary: !0, onClick: r, children: g || e }) });
5616
+ return /* @__PURE__ */ A(U, { children: n ? /* @__PURE__ */ A(b, { primary: !0, iconLeft: n, onClick: r, children: g || e }) : /* @__PURE__ */ A(b, { primary: !0, onClick: r, children: g || e }) });
5591
5617
  case "secondary":
5592
- return /* @__PURE__ */ A(U, { children: n ? /* @__PURE__ */ A(O, { secondary: !0, iconLeft: n, onClick: r, children: t ? /* @__PURE__ */ A(
5618
+ return /* @__PURE__ */ A(U, { children: n ? /* @__PURE__ */ A(b, { secondary: !0, iconLeft: n, onClick: r, children: t ? /* @__PURE__ */ A(
5593
5619
  d,
5594
5620
  {
5595
5621
  fontFamily: "Poppins",
@@ -5598,11 +5624,11 @@ const Er = ({
5598
5624
  style: { color: "var(--starasia-ui-utility-success-default)" },
5599
5625
  children: g || e
5600
5626
  }
5601
- ) : e }) : /* @__PURE__ */ A(O, { secondary: !0, onClick: r, children: g || e }) });
5627
+ ) : e }) : /* @__PURE__ */ A(b, { secondary: !0, onClick: r, children: g || e }) });
5602
5628
  case "success":
5603
- return /* @__PURE__ */ A(U, { children: n ? /* @__PURE__ */ A(O, { success: !0, iconLeft: n, onClick: r, children: g || e }) : /* @__PURE__ */ A(O, { success: !0, onClick: r, children: g || e }) });
5629
+ return /* @__PURE__ */ A(U, { children: n ? /* @__PURE__ */ A(b, { success: !0, iconLeft: n, onClick: r, children: g || e }) : /* @__PURE__ */ A(b, { success: !0, onClick: r, children: g || e }) });
5604
5630
  default:
5605
- return /* @__PURE__ */ A(U, { children: n ? /* @__PURE__ */ A(O, { primary: !0, iconLeft: n, onClick: r, children: g || e }) : /* @__PURE__ */ A(O, { primary: !0, onClick: r, children: g || e }) });
5631
+ return /* @__PURE__ */ A(U, { children: n ? /* @__PURE__ */ A(b, { primary: !0, iconLeft: n, onClick: r, children: g || e }) : /* @__PURE__ */ A(b, { primary: !0, onClick: r, children: g || e }) });
5606
5632
  }
5607
5633
  };
5608
5634
  return /* @__PURE__ */ s(
@@ -5619,7 +5645,7 @@ const Er = ({
5619
5645
  children: [
5620
5646
  C || /* @__PURE__ */ A(rt, {}),
5621
5647
  /* @__PURE__ */ A(a, { children: i.map((w, B) => /* @__PURE__ */ A(
5622
- q.Body1,
5648
+ J.Body1,
5623
5649
  {
5624
5650
  props: {
5625
5651
  align: "center",
@@ -5838,7 +5864,7 @@ function ot({ width: e, height: i }) {
5838
5864
  ) });
5839
5865
  }
5840
5866
  function Mr({ onClick: e }) {
5841
- const i = X("md");
5867
+ const i = $("md");
5842
5868
  return /* @__PURE__ */ s(
5843
5869
  a,
5844
5870
  {
@@ -5868,7 +5894,7 @@ function Mr({ onClick: e }) {
5868
5894
  children: "Sorry, we couldn't find the page you are looking for"
5869
5895
  }
5870
5896
  ),
5871
- e && /* @__PURE__ */ A(O, { size: i ? "md" : "xs", onClick: e, children: "Go Back" })
5897
+ e && /* @__PURE__ */ A(b, { size: i ? "md" : "xs", onClick: e, children: "Go Back" })
5872
5898
  ]
5873
5899
  }
5874
5900
  );
@@ -6089,7 +6115,7 @@ function nt({ width: e, height: i }) {
6089
6115
  ) });
6090
6116
  }
6091
6117
  function mr({ onClick: e }) {
6092
- const i = X("md");
6118
+ const i = $("md");
6093
6119
  return /* @__PURE__ */ s(
6094
6120
  a,
6095
6121
  {
@@ -6102,7 +6128,7 @@ function mr({ onClick: e }) {
6102
6128
  children: [
6103
6129
  /* @__PURE__ */ A(nt, { width: i ? 600 : 300 }),
6104
6130
  /* @__PURE__ */ A(d, { fontWeight: "bold", fontSize: i ? "3xl" : "2xl", children: "We Are Sorry ..." }),
6105
- e && /* @__PURE__ */ A(O, { size: i ? "md" : "xs", onClick: e, children: "Go Back" })
6131
+ e && /* @__PURE__ */ A(b, { size: i ? "md" : "xs", onClick: e, children: "Go Back" })
6106
6132
  ]
6107
6133
  }
6108
6134
  );
@@ -6780,7 +6806,7 @@ function lt({ width: e, height: i }) {
6780
6806
  ) });
6781
6807
  }
6782
6808
  function yr({ onClick: e }) {
6783
- const i = X("md");
6809
+ const i = $("md");
6784
6810
  return /* @__PURE__ */ s(
6785
6811
  a,
6786
6812
  {
@@ -6811,16 +6837,16 @@ function yr({ onClick: e }) {
6811
6837
  children: "we are trying to fix the problem"
6812
6838
  }
6813
6839
  ),
6814
- e && /* @__PURE__ */ A(O, { size: i ? "md" : "xs", onClick: e, children: "Go Back" })
6840
+ e && /* @__PURE__ */ A(b, { size: i ? "md" : "xs", onClick: e, children: "Go Back" })
6815
6841
  ]
6816
6842
  }
6817
6843
  );
6818
6844
  }
6819
6845
  const xr = (e) => {
6820
6846
  var r, o, t, n, l;
6821
- const i = X("md");
6847
+ const i = $("md");
6822
6848
  return /* @__PURE__ */ s(
6823
- dA,
6849
+ hA,
6824
6850
  {
6825
6851
  isShow: e.isShow,
6826
6852
  onHide: e.onHide,
@@ -6833,8 +6859,8 @@ const xr = (e) => {
6833
6859
  },
6834
6860
  children: [
6835
6861
  /* @__PURE__ */ A(wA, { ...e.dialogTitleProps, children: typeof e.title == "string" ? /* @__PURE__ */ A(d, { fontSize: "lg", fontWeight: "medium", children: e.title }) : e.title }),
6836
- /* @__PURE__ */ A(hA, { children: typeof e.description == "string" ? /* @__PURE__ */ A(d, { fontSize: "md", lineHeight: "leading-6", color: "tertiary", children: e.description }) : e.description }),
6837
- /* @__PURE__ */ A(yA, { children: /* @__PURE__ */ A(
6862
+ /* @__PURE__ */ A(DA, { children: typeof e.description == "string" ? /* @__PURE__ */ A(d, { fontSize: "md", lineHeight: "leading-6", color: "tertiary", children: e.description }) : e.description }),
6863
+ /* @__PURE__ */ A(fA, { children: /* @__PURE__ */ A(
6838
6864
  a,
6839
6865
  {
6840
6866
  display: "flex",
@@ -6850,7 +6876,7 @@ const xr = (e) => {
6850
6876
  gap: ((l = e.wrapperConfirmBtnProps) == null ? void 0 : l.gap) || "sm",
6851
6877
  ...e.wrapperConfirmBtnProps,
6852
6878
  children: [
6853
- e.onCancel && /* @__PURE__ */ A(O, { secondary: !0, onClick: e.onCancel, size: "md", fullWidth: !0, children: e.titleCancelBtn || "Cancel" }),
6879
+ e.onCancel && /* @__PURE__ */ A(b, { secondary: !0, onClick: e.onCancel, size: "md", fullWidth: !0, children: e.titleCancelBtn || "Cancel" }),
6854
6880
  /* @__PURE__ */ A(
6855
6881
  a,
6856
6882
  {
@@ -6859,7 +6885,7 @@ const xr = (e) => {
6859
6885
  textWrap: "nowrap"
6860
6886
  },
6861
6887
  children: /* @__PURE__ */ A(
6862
- O,
6888
+ b,
6863
6889
  {
6864
6890
  ...e.buttonConfirmProps,
6865
6891
  onClick: e.onConfirm,
@@ -6879,7 +6905,7 @@ const xr = (e) => {
6879
6905
  },
6880
6906
  e.key
6881
6907
  );
6882
- }, fr = _(
6908
+ }, fr = AA(
6883
6909
  ({
6884
6910
  children: e,
6885
6911
  height: i,
@@ -6887,7 +6913,7 @@ const xr = (e) => {
6887
6913
  customHeight: o,
6888
6914
  paddingInline: t = "spacing-24"
6889
6915
  }) => {
6890
- const n = eA(null), [l, c] = b("100vh");
6916
+ const n = iA(null), [l, c] = O("100vh");
6891
6917
  return W(() => {
6892
6918
  const g = () => {
6893
6919
  if (n.current) {
@@ -6914,7 +6940,7 @@ const xr = (e) => {
6914
6940
  );
6915
6941
  }
6916
6942
  ), Sr = (e) => {
6917
- const { defaultTab: i = 0, paramKey: r = "tab" } = e || {}, [o, t] = uA(), n = DA(o.toString());
6943
+ const { defaultTab: i = 0, paramKey: r = "tab" } = e || {}, [o, t] = kA(), n = IA(o.toString());
6918
6944
  return {
6919
6945
  activeTab: n[r] ? parseInt(n[r]) : i,
6920
6946
  handleTabChange: (g) => {
@@ -6931,7 +6957,7 @@ function Lr({
6931
6957
  menuConfig: i,
6932
6958
  formatTitle: r
6933
6959
  }) {
6934
- const o = fA();
6960
+ const o = LA();
6935
6961
  W(() => {
6936
6962
  let t = null, n = null;
6937
6963
  for (const g of i) {
@@ -6948,7 +6974,7 @@ function Lr({
6948
6974
  }, [o.pathname]);
6949
6975
  }
6950
6976
  const Gr = () => {
6951
- const [e, i] = uA(), r = DA(e.toString()), o = te(), t = fA(), n = o.id;
6977
+ const [e, i] = kA(), r = IA(e.toString()), o = te(), t = LA(), n = o.id;
6952
6978
  return {
6953
6979
  // query params
6954
6980
  setSearchParams: i,
@@ -6966,21 +6992,21 @@ const Gr = () => {
6966
6992
  hasId: !!n
6967
6993
  };
6968
6994
  };
6969
- function Or(e) {
6995
+ function br(e) {
6970
6996
  var o, t;
6971
6997
  const i = e.decodedAccessToken;
6972
- return cA(() => {
6998
+ return gA(() => {
6973
6999
  var g, C;
6974
7000
  const n = ((C = (g = i == null ? void 0 : i.access) == null ? void 0 : g.role) == null ? void 0 : C.code) ?? "", l = Object.keys(e.role).reduce(
6975
7001
  (Q, w) => {
6976
- const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (I) => I.replace("_", "").toUpperCase())}`;
7002
+ const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (u) => u.replace("_", "").toUpperCase())}`;
6977
7003
  return { ...Q, [B]: !1 };
6978
7004
  },
6979
7005
  {}
6980
7006
  );
6981
7007
  return {
6982
7008
  ...Object.keys(e.role).reduce((Q, w) => {
6983
- const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (I) => I.replace("_", "").toUpperCase())}`;
7009
+ const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (u) => u.replace("_", "").toUpperCase())}`;
6984
7010
  return {
6985
7011
  ...Q,
6986
7012
  [B]: n === e.role[w]
@@ -7005,7 +7031,7 @@ export {
7005
7031
  xr as ConfirmationDialog,
7006
7032
  Gi as DataTable,
7007
7033
  Y as DecisionWrapper,
7008
- kA as EachUtils,
7034
+ EA as EachUtils,
7009
7035
  Er as EmptyStatePage,
7010
7036
  Ei as FilterDrawer,
7011
7037
  ur as FloatingFooter,
@@ -7016,11 +7042,11 @@ export {
7016
7042
  qi as InputFile,
7017
7043
  _i as InputImage,
7018
7044
  Zt as ModalDialog,
7019
- Oe as ModuleSwitcherModal,
7045
+ be as ModuleSwitcherModal,
7020
7046
  Mr as NotFoundPage,
7021
7047
  Ht as PageLayout,
7022
7048
  BA as Pressable,
7023
- SA as RightDrawer,
7049
+ GA as RightDrawer,
7024
7050
  it as ScrollToTopButton,
7025
7051
  Jt as Section,
7026
7052
  yr as ServerErrorPage,
@@ -7031,13 +7057,13 @@ export {
7031
7057
  Qr as TableSection,
7032
7058
  mi as TableWrapper,
7033
7059
  hr as ToggleStatus,
7034
- q as Typography,
7060
+ J as Typography,
7035
7061
  kr as VerticalField,
7036
7062
  Tt as createInitialFromUserName,
7037
7063
  Pt as cssVars,
7038
7064
  $t as formHasChanged,
7039
7065
  vt as formatDate,
7040
- mA as formatDateToIndonesian,
7066
+ yA as formatDateToIndonesian,
7041
7067
  Wt as formatRupiah,
7042
7068
  Br as getDateFilterValue,
7043
7069
  Cr as getDateRangeFilterValue,
@@ -7045,7 +7071,7 @@ export {
7045
7071
  sr as getValueDropdownMultipleFilter,
7046
7072
  ar as getValueRadioFilter,
7047
7073
  ki as getValueSearch,
7048
- bA as getValuesFilter,
7074
+ YA as getValuesFilter,
7049
7075
  vA as handleChangeFilter,
7050
7076
  lr as handleOnScroll,
7051
7077
  rr as isEmail,
@@ -7067,7 +7093,7 @@ export {
7067
7093
  cr as useAdvanceFilter,
7068
7094
  fe as useApp,
7069
7095
  Se as useAppState,
7070
- Or as useAuthRole,
7096
+ br as useAuthRole,
7071
7097
  Lr as useDynamicTitle,
7072
7098
  JA as useRouteInfo,
7073
7099
  Gr as useRouteParams,