unifyedx-storybook-new 0.2.69 → 0.2.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  import { jsxs as n, jsx as e, Fragment as ee } from "react/jsx-runtime";
2
- import re, { useState as L, useMemo as ae, useId as He, Fragment as Q, useEffect as te, useCallback as K, useRef as be } from "react";
3
- import { a as H, U as ct, X as xe, P as c, L as ja, C as ye, b as et, D as dt, f as St, d as Wt, F as _a, e as Ua, h as Ga, T as Le, u as qa, I as Jt, i as Xt, j as Ya, k as Wa, l as Ja, m as Ht, S as vt, n as Qt, M as Xa, o as Ha, p as Nt, q as Qa, A as Za, E as Zt, r as Ka, s as er, t as tr, v as ar, w as Kt, x as rr, y as ea, z as ta, B as nr, G as sr, H as lr, J as Qe, K as mt, N as ut, O as ir, Q as or, R as aa, V as cr, W as wt, Y as dr, Z as mr, _ as Be, $ as ur, a0 as hr, a1 as pr, a2 as gr, a3 as br, a4 as fr, a5 as Dt, a6 as yr, a7 as xr, a8 as vr, a9 as Nr, aa as wr, ab as kr, ac as Cr, ad as zr, ae as Sr, af as Ae, ag as ra, ah as Dr, ai as $r, aj as Tr, ak as Ar, al as Fr, am as na, an as Er, ao as Rr, ap as sa, aq as Ir, ar as ht, as as la, at as Or } from "./vendor-yf0QH1Io.js";
4
- import { Popover as Pr, PopoverButton as Mr, PopoverPanel as Lr, Transition as he, Dialog as fe, TransitionChild as we, DialogPanel as Fe, DialogTitle as tt, TabGroup as Br, TabList as Vr, Tab as se, TabPanels as jr, RadioGroup as Ue, Listbox as Z, ListboxButton as _r, ListboxOptions as Ur, ListboxOption as Gr, SwitchGroup as qr, Switch as lt, Menu as Yr, MenuButton as Wr, Portal as Jr, MenuItems as Xr, MenuItem as Hr, DialogBackdrop as Qr } from "@headlessui/react";
5
- import { motion as ie, AnimatePresence as ze } from "framer-motion";
2
+ import re, { useState as B, useMemo as ae, useId as He, Fragment as Q, useEffect as te, useCallback as K, useRef as fe } from "react";
3
+ import { a as H, U as ct, X as ve, P as c, L as ja, C as xe, b as et, D as dt, f as St, d as Wt, F as _a, e as Ua, h as Ga, T as Le, u as qa, I as Jt, i as Xt, j as Ya, k as Wa, l as Ja, m as Ht, S as vt, n as Qt, M as Xa, o as Ha, p as Nt, q as Qa, A as Za, E as Zt, r as Ka, s as er, t as tr, v as ar, w as Kt, x as rr, y as ea, z as ta, B as nr, G as sr, H as lr, J as Qe, K as mt, N as ut, O as ir, Q as or, R as aa, V as cr, W as wt, Y as dr, Z as mr, _ as Be, $ as ur, a0 as hr, a1 as pr, a2 as gr, a3 as br, a4 as fr, a5 as Dt, a6 as yr, a7 as xr, a8 as vr, a9 as Nr, aa as wr, ab as kr, ac as Cr, ad as zr, ae as Sr, af as Ae, ag as ra, ah as Dr, ai as $r, aj as Tr, ak as Ar, al as Fr, am as na, an as Er, ao as Rr, ap as sa, aq as Ir, ar as ht, as as la, at as Or } from "./vendor-yf0QH1Io.js";
4
+ import { Popover as Pr, PopoverButton as Mr, PopoverPanel as Lr, Transition as he, Dialog as ye, TransitionChild as ke, DialogPanel as Fe, DialogTitle as tt, TabGroup as Br, TabList as Vr, Tab as se, TabPanels as jr, RadioGroup as Ue, Listbox as Z, ListboxButton as _r, ListboxOptions as Ur, ListboxOption as Gr, SwitchGroup as qr, Switch as lt, Menu as Yr, MenuButton as Wr, Portal as Jr, MenuItems as Xr, MenuItem as Hr, DialogBackdrop as Qr } from "@headlessui/react";
5
+ import { motion as ie, AnimatePresence as Se } from "framer-motion";
6
6
  import { d as Zr } from "./vendor-lodash-Dkzj2D3U.js";
7
7
  import { useFloating as ia, offset as oa, flip as ca, shift as da, autoUpdate as ma, useClick as Kr, useDismiss as en, useInteractions as tn, FloatingPortal as an } from "@floating-ui/react";
8
8
  import it, { debounce as rn } from "lodash";
9
9
  import { ToastContainer as nn, Slide as sn, toast as Oe } from "react-toastify";
10
10
  import "react-toastify/dist/ReactToastify.css";
11
- import { P as ln, S as on, a as cn, F as dn, G as mn, b as un, E as hn, c as pn, C as gn, R as bn, d as fn, e as yn, f as xn, g as vn, I as Nn, h as $t } from "./vendor-syncfusion-CEwtS66o.js";
11
+ import { P as ln, S as on, a as cn, F as dn, G as mn, b as un, E as hn, c as pn, C as gn, R as bn, d as fn, e as yn, f as xn, g as vn, I as Nn, h as $t } from "./vendor-syncfusion-Ep1PWSou.js";
12
12
  const wn = (t) => {
13
13
  let a = 2166136261;
14
14
  for (let s = 0; s < t.length; s++)
@@ -17,7 +17,7 @@ const wn = (t) => {
17
17
  }, kn = (t) => {
18
18
  const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = wn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, u = 86 + (i >>> 24) % 8, h = `hsl(${l}, ${m}%, ${u}%)`, N = `hsl(${l}, ${m}%, ${o}%)`;
19
19
  return { bg: h, text: N };
20
- }, Cn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), Ne = ({
20
+ }, Cn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), we = ({
21
21
  src: t,
22
22
  name: a,
23
23
  size: s = "medium",
@@ -29,14 +29,14 @@ const wn = (t) => {
29
29
  className: m,
30
30
  ...o
31
31
  }) => {
32
- const [u, h] = L(!1), N = ae(() => kn(a), []), y = t && !u, r = !y && a, v = !y && !a, d = H(
32
+ const [u, h] = B(!1), N = ae(() => kn(a), []), y = t && !u, r = !y && a, v = !y && !a, d = H(
33
33
  "avatar-container",
34
34
  `avatar--size-${s}`,
35
35
  m
36
- ), g = y ? "transparent" : i || N.bg, z = l || N.text;
36
+ ), g = y ? "transparent" : i || N.bg, S = l || N.text;
37
37
  return /* @__PURE__ */ n("div", { className: d, style: {
38
38
  backgroundColor: g,
39
- color: z
39
+ color: S
40
40
  }, ...o, children: [
41
41
  y && /* @__PURE__ */ e(
42
42
  "img",
@@ -95,7 +95,7 @@ const wn = (t) => {
95
95
  className: "badge-remove-button",
96
96
  onClick: l,
97
97
  "aria-label": `Remove ${t}`,
98
- children: /* @__PURE__ */ e(xe, { className: "badge-remove-icon" })
98
+ children: /* @__PURE__ */ e(ve, { className: "badge-remove-icon" })
99
99
  }
100
100
  )
101
101
  ] });
@@ -156,7 +156,7 @@ const Dn = {
156
156
  iconWidth: v,
157
157
  iconHeight: d,
158
158
  iconColor: g,
159
- strokeWidth: z,
159
+ strokeWidth: S,
160
160
  onClick: A,
161
161
  ...F
162
162
  }) => {
@@ -182,7 +182,7 @@ const Dn = {
182
182
  "aria-label": i || P && a || (typeof y == "string" ? y : void 0),
183
183
  ...F,
184
184
  children: m ? /* @__PURE__ */ e(ja, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(ee, { children: [
185
- u && /* @__PURE__ */ e(u, { size: N === "large" ? 20 : 16, width: v || 16, height: d || 16, color: g || "#767676", strokeWidth: z || 2 }),
185
+ u && /* @__PURE__ */ e(u, { size: N === "large" ? 20 : 16, width: v || 16, height: d || 16, color: g || "#767676", strokeWidth: S || 2 }),
186
186
  y,
187
187
  r,
188
188
  " "
@@ -205,7 +205,7 @@ const Dn = {
205
205
  }
206
206
  ),
207
207
  !l && /* @__PURE__ */ e(
208
- ye,
208
+ xe,
209
209
  {
210
210
  className: "breadcrumb-separator",
211
211
  "aria-hidden": "true"
@@ -326,7 +326,7 @@ const Dn = {
326
326
  onClick: r,
327
327
  className: "datepicker-clear-button",
328
328
  "aria-label": "Clear selected date range",
329
- children: /* @__PURE__ */ e(xe, { size: 16 })
329
+ children: /* @__PURE__ */ e(ve, { size: 16 })
330
330
  }
331
331
  )
332
332
  ] }) }),
@@ -549,7 +549,7 @@ const Dn = {
549
549
  labelColor: "#FFEDD5",
550
550
  labelTextColor: "#7C2D12"
551
551
  }
552
- }, Se = {
552
+ }, De = {
553
553
  USER: "User",
554
554
  GROUP: "Group",
555
555
  ROLE: "Role"
@@ -609,9 +609,9 @@ const Dn = {
609
609
  title: d = "Upload Files",
610
610
  subHeading: g = "Supports PNG, JPG, PDF. Max size: 50MB."
611
611
  }) => {
612
- const z = o.length > 0 || u.length > 0;
612
+ const S = o.length > 0 || u.length > 0;
613
613
  return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(
614
- fe,
614
+ ye,
615
615
  {
616
616
  as: "div",
617
617
  className: "file-upload-dialog",
@@ -619,7 +619,7 @@ const Dn = {
619
619
  ...s(),
620
620
  children: [
621
621
  /* @__PURE__ */ e(
622
- we,
622
+ ke,
623
623
  {
624
624
  as: Q,
625
625
  enter: "ease-out duration-300",
@@ -632,7 +632,7 @@ const Dn = {
632
632
  }
633
633
  ),
634
634
  /* @__PURE__ */ e("div", { className: "dialog-positioner", children: /* @__PURE__ */ e(
635
- we,
635
+ ke,
636
636
  {
637
637
  as: Q,
638
638
  enter: "ease-out duration-300",
@@ -657,7 +657,7 @@ const Dn = {
657
657
  type: "button",
658
658
  onClick: a,
659
659
  className: "close-button",
660
- children: /* @__PURE__ */ e(xe, { size: 20 })
660
+ children: /* @__PURE__ */ e(ve, { size: 20 })
661
661
  }
662
662
  )
663
663
  ] }),
@@ -685,7 +685,7 @@ const Dn = {
685
685
  }
686
686
  ),
687
687
  v.filesToUpload && /* @__PURE__ */ e("p", { className: "form-error-message", children: v.filesToUpload.message }),
688
- z && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
688
+ S && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
689
689
  /* @__PURE__ */ e("h3", { children: "Upload Queue" }),
690
690
  /* @__PURE__ */ n("ul", { className: "file-list", children: [
691
691
  o.map((A, F) => /* @__PURE__ */ n(
@@ -832,15 +832,15 @@ const Dn = {
832
832
  fetchCreatedOrUpdatedByUsers: u = async () => []
833
833
  // Mockable fetcher
834
834
  }) => {
835
- const [h, N] = L({
835
+ const [h, N] = B({
836
836
  createdBy: [],
837
837
  updatedBy: []
838
- }), [y, r] = L({
838
+ }), [y, r] = B({
839
839
  createdBy: !1,
840
840
  updatedBy: !1
841
- }), [v, d] = L({
841
+ }), [v, d] = B({
842
842
  startDate: null
843
- }), [g, z] = L({
843
+ }), [g, S] = B({
844
844
  endDate: null
845
845
  }), A = qa({
846
846
  initialValues: JSON.parse(JSON.stringify(m)),
@@ -860,16 +860,16 @@ const Dn = {
860
860
  },
861
861
  enableReinitialize: !0
862
862
  }), F = ae(() => l.reduce(($, x) => {
863
- const f = x.key, C = A.values[f];
863
+ const f = x.key, z = A.values[f];
864
864
  let O = !1;
865
- if (C)
865
+ if (z)
866
866
  switch (x.type) {
867
867
  case "multiselect":
868
868
  case "multiselect-users":
869
- O = Array.isArray(C.values) && C.values.length > 0;
869
+ O = Array.isArray(z.values) && z.values.length > 0;
870
870
  break;
871
871
  case "date":
872
- (C.range && C.range !== "" || Array.isArray(C.values) && C.values.length > 0) && (O = !0);
872
+ (z.range && z.range !== "" || Array.isArray(z.values) && z.values.length > 0) && (O = !0);
873
873
  break;
874
874
  }
875
875
  return $[f] = O, $;
@@ -877,15 +877,15 @@ const Dn = {
877
877
  if ($.type !== "date") return !1;
878
878
  const x = A.values?.[$.key]?.values;
879
879
  if (!Array.isArray(x) || x.length < 2) return !1;
880
- const [f, C] = x;
881
- if (!f || !C) return !1;
882
- const O = f instanceof Date ? f : new Date(f), I = C instanceof Date ? C : new Date(C);
880
+ const [f, z] = x;
881
+ if (!f || !z) return !1;
882
+ const O = f instanceof Date ? f : new Date(f), I = z instanceof Date ? z : new Date(z);
883
883
  return O > I;
884
884
  }), [l, A.values]), j = async ($, x) => {
885
885
  try {
886
- r((C) => ({ ...C, [$]: !0 }));
886
+ r((z) => ({ ...z, [$]: !0 }));
887
887
  const f = await u($, x);
888
- N((C) => ({ ...C, [$]: f }));
888
+ N((z) => ({ ...z, [$]: f }));
889
889
  } catch (f) {
890
890
  console.error(`Error fetching ${$} users:`, f);
891
891
  } finally {
@@ -899,7 +899,7 @@ const Dn = {
899
899
  }, q = ($) => {
900
900
  const x = l.find((O) => O.key === $);
901
901
  if (!x) return null;
902
- const f = A.values[$] || m[$], C = Array.isArray(f.values) ? f.values : [];
902
+ const f = A.values[$] || m[$], z = Array.isArray(f.values) ? f.values : [];
903
903
  switch (x.type) {
904
904
  case "multiselect":
905
905
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
@@ -923,9 +923,9 @@ const Dn = {
923
923
  type: "checkbox",
924
924
  id: `select-all-${$}`,
925
925
  className: "filter-checkbox-input",
926
- checked: x.options.length > 0 && C.length === x.options.length,
926
+ checked: x.options.length > 0 && z.length === x.options.length,
927
927
  onChange: (E) => {
928
- const G = E.target.checked ? x.options.map((J) => J.value) : [];
928
+ const G = E.target.checked ? x.options.map((W) => W.value) : [];
929
929
  A.setFieldValue(`${$}.values`, G);
930
930
  }
931
931
  }
@@ -946,10 +946,10 @@ const Dn = {
946
946
  type: "checkbox",
947
947
  id: `${$}-${E.value}`,
948
948
  className: "filter-checkbox-input",
949
- checked: C.includes(E.value),
949
+ checked: z.includes(E.value),
950
950
  onChange: (G) => {
951
- const J = G.target.checked ? [...C, E.value] : C.filter((ve) => ve !== E.value);
952
- A.setFieldValue(`${$}.values`, J);
951
+ const W = G.target.checked ? [...z, E.value] : z.filter((pe) => pe !== E.value);
952
+ A.setFieldValue(`${$}.values`, W);
953
953
  }
954
954
  }
955
955
  ),
@@ -987,9 +987,9 @@ const Dn = {
987
987
  type: "checkbox",
988
988
  id: `select-all-users-${$}`,
989
989
  className: "filter-checkbox-input",
990
- checked: O.length > 0 && C.length === O.length,
990
+ checked: O.length > 0 && z.length === O.length,
991
991
  onChange: (E) => {
992
- const G = E.target.checked ? O.map((J) => J.email) : [];
992
+ const G = E.target.checked ? O.map((W) => W.email) : [];
993
993
  A.setFieldValue(
994
994
  `${$}.values`,
995
995
  G
@@ -1013,12 +1013,12 @@ const Dn = {
1013
1013
  type: "checkbox",
1014
1014
  id: `${$}-${E.email}`,
1015
1015
  className: "filter-checkbox-input",
1016
- checked: C.includes(E.email),
1016
+ checked: z.includes(E.email),
1017
1017
  onChange: (G) => {
1018
- const J = G.target.checked ? [...C, E.email] : C.filter((ve) => ve !== E.email);
1018
+ const W = G.target.checked ? [...z, E.email] : z.filter((pe) => pe !== E.email);
1019
1019
  A.setFieldValue(
1020
1020
  `${$}.values`,
1021
- J
1021
+ W
1022
1022
  );
1023
1023
  }
1024
1024
  }
@@ -1038,13 +1038,13 @@ const Dn = {
1038
1038
  ] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
1039
1039
  ] });
1040
1040
  case "date":
1041
- const D = f.values || [], [b, p] = D, k = b && p, w = D[0] || null, T = D[1] || null, M = {
1042
- startDate: w instanceof Date ? w.toISOString().slice(0, 10) : null,
1043
- endDate: w instanceof Date ? w.toISOString().slice(0, 10) : null
1044
- }, S = {
1041
+ const D = f.values || [], [b, p] = D, w = b && p, k = D[0] || null, T = D[1] || null, L = {
1042
+ startDate: k instanceof Date ? k.toISOString().slice(0, 10) : null,
1043
+ endDate: k instanceof Date ? k.toISOString().slice(0, 10) : null
1044
+ }, C = {
1045
1045
  startDate: T instanceof Date ? T.toISOString().slice(0, 10) : null,
1046
1046
  endDate: T instanceof Date ? T.toISOString().slice(0, 10) : null
1047
- }, B = [
1047
+ }, M = [
1048
1048
  { key: "anytime", label: "Anytime" },
1049
1049
  { key: "today", label: "Today" },
1050
1050
  { key: "this_week", label: "This Week" },
@@ -1061,8 +1061,8 @@ const Dn = {
1061
1061
  A.setFieldValue(`${$}.range`, "custom");
1062
1062
  return;
1063
1063
  }
1064
- const [G, J] = Mn(E);
1065
- A.setFieldValue(`${$}.values`, G && J ? [G, J] : []), A.setFieldValue(`${$}.range`, E);
1064
+ const [G, W] = Mn(E);
1065
+ A.setFieldValue(`${$}.values`, G && W ? [G, W] : []), A.setFieldValue(`${$}.range`, E);
1066
1066
  };
1067
1067
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
1068
1068
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
@@ -1076,7 +1076,7 @@ const Dn = {
1076
1076
  children: x.operators.map((E) => /* @__PURE__ */ e("option", { value: E, children: E === "in" ? "Is" : "Is not" }, E))
1077
1077
  }
1078
1078
  ),
1079
- k && /* @__PURE__ */ e(
1079
+ w && /* @__PURE__ */ e(
1080
1080
  "button",
1081
1081
  {
1082
1082
  type: "button",
@@ -1091,7 +1091,7 @@ const Dn = {
1091
1091
  }
1092
1092
  )
1093
1093
  ] }),
1094
- /* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: B.map((E) => {
1094
+ /* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: M.map((E) => {
1095
1095
  const G = f.range === E.key || E.key === "anytime" && (!Array.isArray(f.values) || f.values.length === 0);
1096
1096
  return /* @__PURE__ */ n(
1097
1097
  "label",
@@ -1124,10 +1124,10 @@ const Dn = {
1124
1124
  {
1125
1125
  asSingle: !0,
1126
1126
  useRange: !1,
1127
- value: M,
1127
+ value: L,
1128
1128
  onChange: (E) => {
1129
- const G = E?.startDate ? Ve(new Date(E.startDate)) : null, J = D[1] || null;
1130
- G && (A.setFieldValue(`${$}.values`, [G, J]), A.setFieldValue(`${$}.range`, "custom"));
1129
+ const G = E?.startDate ? Ve(new Date(E.startDate)) : null, W = D[1] || null;
1130
+ G && (A.setFieldValue(`${$}.values`, [G, W]), A.setFieldValue(`${$}.range`, "custom"));
1131
1131
  },
1132
1132
  inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
1133
1133
  primaryColor: "violet",
@@ -1148,10 +1148,10 @@ const Dn = {
1148
1148
  {
1149
1149
  asSingle: !0,
1150
1150
  useRange: !1,
1151
- value: S,
1151
+ value: C,
1152
1152
  onChange: (E) => {
1153
- const G = E?.startDate ? je(new Date(E.startDate)) : null, J = D[0] || null;
1154
- G && (A.setFieldValue(`${$}.values`, [J, G]), A.setFieldValue(`${$}.range`, "custom"));
1153
+ const G = E?.startDate ? je(new Date(E.startDate)) : null, W = D[0] || null;
1154
+ G && (A.setFieldValue(`${$}.values`, [W, G]), A.setFieldValue(`${$}.range`, "custom"));
1155
1155
  },
1156
1156
  inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
1157
1157
  primaryColor: "violet",
@@ -1164,16 +1164,16 @@ const Dn = {
1164
1164
  }
1165
1165
  )
1166
1166
  ] }),
1167
- w && T && w > T && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
1167
+ k && T && k > T && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
1168
1168
  ] })
1169
1169
  ] });
1170
1170
  default:
1171
1171
  return null;
1172
1172
  }
1173
1173
  };
1174
- return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(fe, { as: "div", className: "relative z-50", onClose: a, children: [
1174
+ return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: a, children: [
1175
1175
  /* @__PURE__ */ e(
1176
- we,
1176
+ ke,
1177
1177
  {
1178
1178
  as: Q,
1179
1179
  enter: "ease-out duration-300",
@@ -1186,7 +1186,7 @@ const Dn = {
1186
1186
  }
1187
1187
  ),
1188
1188
  /* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(
1189
- we,
1189
+ ke,
1190
1190
  {
1191
1191
  as: Q,
1192
1192
  enter: "ease-out duration-300",
@@ -1354,9 +1354,9 @@ const Dn = {
1354
1354
  }, d = () => {
1355
1355
  a({ primary: !1, secondary: !0 });
1356
1356
  };
1357
- return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(fe, { as: "div", className: "modal-dialog", onClose: () => a({}), children: [
1357
+ return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "modal-dialog", onClose: () => a({}), children: [
1358
1358
  /* @__PURE__ */ e(
1359
- we,
1359
+ ke,
1360
1360
  {
1361
1361
  as: Q,
1362
1362
  enter: "ease-out duration-300",
@@ -1369,7 +1369,7 @@ const Dn = {
1369
1369
  }
1370
1370
  ),
1371
1371
  /* @__PURE__ */ e("div", { className: "modal-positioner", children: /* @__PURE__ */ e(
1372
- we,
1372
+ ke,
1373
1373
  {
1374
1374
  as: Q,
1375
1375
  enter: "ease-out duration-300",
@@ -1418,7 +1418,7 @@ const Dn = {
1418
1418
  onItemsPerPageChange: l,
1419
1419
  itemsPerPageOptions: m = [10, 15, 20]
1420
1420
  }) => {
1421
- const o = Math.ceil(a / s), [u, h] = L(t);
1421
+ const o = Math.ceil(a / s), [u, h] = B(t);
1422
1422
  te(() => {
1423
1423
  h(t);
1424
1424
  }, [t]);
@@ -1492,7 +1492,7 @@ const Dn = {
1492
1492
  className: "pagination-button",
1493
1493
  onClick: () => i(t + 1),
1494
1494
  disabled: t === o,
1495
- children: /* @__PURE__ */ e(ye, { size: 16 })
1495
+ children: /* @__PURE__ */ e(xe, { size: 16 })
1496
1496
  }
1497
1497
  ),
1498
1498
  /* @__PURE__ */ e(
@@ -1552,7 +1552,7 @@ const Dn = {
1552
1552
  }
1553
1553
  ),
1554
1554
  l && /* @__PURE__ */ e("p", { className: "radiogroup-error-message", children: l })
1555
- ] }), pe = ({
1555
+ ] }), ge = ({
1556
1556
  value: t = "",
1557
1557
  onDebouncedChange: a,
1558
1558
  debounceDelay: s = 400,
@@ -1566,21 +1566,21 @@ const Dn = {
1566
1566
  searchIconClass: N = "",
1567
1567
  ...y
1568
1568
  }) => {
1569
- const [r, v] = L(t);
1569
+ const [r, v] = B(t);
1570
1570
  te(() => {
1571
1571
  v(t);
1572
1572
  }, [t]);
1573
1573
  const d = K(
1574
- Zr((z) => {
1575
- a?.(z);
1574
+ Zr((S) => {
1575
+ a?.(S);
1576
1576
  }, s),
1577
1577
  [s, a]
1578
1578
  );
1579
1579
  te(() => (r !== t && d(r), () => {
1580
1580
  d.cancel();
1581
1581
  }), [r, d, t]);
1582
- const g = (z) => {
1583
- v(z.target.value);
1582
+ const g = (S) => {
1583
+ v(S.target.value);
1584
1584
  };
1585
1585
  return /* @__PURE__ */ n("div", { className: `search-bar-wrapper ${m}`, children: [
1586
1586
  l && /* @__PURE__ */ e("label", { htmlFor: "search-field", className: "sr-only", children: l }),
@@ -1614,7 +1614,7 @@ const Dn = {
1614
1614
  // From RHF's <Controller>
1615
1615
  showSearch: h = !0
1616
1616
  }) => {
1617
- const [N, y] = L("");
1617
+ const [N, y] = B("");
1618
1618
  console.log("Select component - value:", a, "type:", typeof a), console.log("Select component - options:", i);
1619
1619
  const r = N === "" ? i : i.filter(
1620
1620
  (d) => d.label.toLowerCase().includes(N.toLowerCase())
@@ -1650,7 +1650,7 @@ const Dn = {
1650
1650
  leaveTo: "opacity-0",
1651
1651
  children: /* @__PURE__ */ n(Ur, { className: "select-options", children: [
1652
1652
  h && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
1653
- pe,
1653
+ ge,
1654
1654
  {
1655
1655
  value: N,
1656
1656
  onDebouncedChange: y,
@@ -1691,7 +1691,7 @@ const Dn = {
1691
1691
  o && /* @__PURE__ */ e("p", { className: "select-error-message", children: o })
1692
1692
  ] }) });
1693
1693
  }, Bn = () => {
1694
- const [t, a] = L(window.location.pathname);
1694
+ const [t, a] = B(window.location.pathname);
1695
1695
  return te(() => {
1696
1696
  const s = () => {
1697
1697
  a(window.location.pathname);
@@ -1706,7 +1706,7 @@ const Dn = {
1706
1706
  return s;
1707
1707
  return null;
1708
1708
  }, ga = ({ item: t, isCollapsed: a, level: s = 0 }) => {
1709
- const { pathname: i } = Bn(), l = t.href || t.url || t.path, [m, o] = L(!1), u = t.icon;
1709
+ const { pathname: i } = Bn(), l = t.href || t.url || t.path, [m, o] = B(!1), u = t.icon;
1710
1710
  te(() => {
1711
1711
  yt([t], i) && o(!0);
1712
1712
  }, [t, i]);
@@ -1824,13 +1824,13 @@ const Dn = {
1824
1824
  onClick: s,
1825
1825
  className: "collapse-button desktop-only",
1826
1826
  "aria-label": a ? "Expand sidebar" : "Collapse sidebar",
1827
- children: a ? /* @__PURE__ */ e(Xa, {}) : /* @__PURE__ */ e(xe, {})
1827
+ children: a ? /* @__PURE__ */ e(Xa, {}) : /* @__PURE__ */ e(ve, {})
1828
1828
  }
1829
1829
  )
1830
1830
  ] }),
1831
1831
  /* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((h) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(ga, { item: h, isCollapsed: a }) }, h.label || h.name)) }) }),
1832
1832
  /* @__PURE__ */ n("div", { className: "sidebar-footer", children: [
1833
- /* @__PURE__ */ e(Ne, { src: u.avatar, name: u.name, size: "medium" }),
1833
+ /* @__PURE__ */ e(we, { src: u.avatar, name: u.name, size: "medium" }),
1834
1834
  /* @__PURE__ */ n("div", { className: "user-info", children: [
1835
1835
  /* @__PURE__ */ e("span", { className: "user-name", children: u.name }),
1836
1836
  /* @__PURE__ */ e("span", { className: "user-email", children: u.email })
@@ -1896,7 +1896,7 @@ const Dn = {
1896
1896
  // ✅ New prop to control visibility
1897
1897
  ...u
1898
1898
  }) => {
1899
- const h = a || u.name, [N, y] = L(
1899
+ const h = a || u.name, [N, y] = B(
1900
1900
  u.value?.length || u.defaultValue?.length || 0
1901
1901
  ), r = (d) => {
1902
1902
  y(d.target.value.length), u.onChange && u.onChange(d);
@@ -1930,7 +1930,8 @@ const Dn = {
1930
1930
  onChange: s,
1931
1931
  labelPosition: i = "right",
1932
1932
  error: l,
1933
- ...m
1933
+ labelStyle: m = "",
1934
+ ...o
1934
1935
  }) => /* @__PURE__ */ n("div", { className: "switch-container", children: [
1935
1936
  /* @__PURE__ */ n(qr, { as: "div", className: "switch-group", children: [
1936
1937
  t && i === "left" && /* @__PURE__ */ e(lt.Label, { className: "switch-label", passive: !0, children: t }),
@@ -1943,11 +1944,11 @@ const Dn = {
1943
1944
  // Renamed from switch-wrapper
1944
1945
  "switch-element--error": !!l
1945
1946
  }),
1946
- ...m,
1947
+ ...o,
1947
1948
  children: /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "switch-thumb" })
1948
1949
  }
1949
1950
  ),
1950
- t && i === "right" && /* @__PURE__ */ e(lt.Label, { className: "switch-label", passive: !0, children: t })
1951
+ t && i === "right" && /* @__PURE__ */ e(lt.Label, { className: `switch-label ${m}`, passive: !0, children: t })
1951
1952
  ] }),
1952
1953
  l && /* @__PURE__ */ e("p", { className: "switch-error-message", children: l })
1953
1954
  ] }), Bl = ({
@@ -2005,7 +2006,7 @@ const Dn = {
2005
2006
  }) => {
2006
2007
  const y = s[i], r = Object.keys(s), v = r.indexOf(i), d = (v + 1) / r.length * 100, g = v > 0 && m.onBack;
2007
2008
  return /* @__PURE__ */ e(he, { show: t, as: Q, children: /* @__PURE__ */ n(
2008
- fe,
2009
+ ye,
2009
2010
  {
2010
2011
  as: "div",
2011
2012
  className: "wizard-dialog",
@@ -2013,7 +2014,7 @@ const Dn = {
2013
2014
  },
2014
2015
  children: [
2015
2016
  /* @__PURE__ */ e(
2016
- we,
2017
+ ke,
2017
2018
  {
2018
2019
  as: Q,
2019
2020
  enter: "ease-out duration-300",
@@ -2026,7 +2027,7 @@ const Dn = {
2026
2027
  }
2027
2028
  ),
2028
2029
  /* @__PURE__ */ e("div", { className: "wizard-container", children: /* @__PURE__ */ e("div", { className: "wizard-positioner", children: /* @__PURE__ */ e(
2029
- we,
2030
+ ke,
2030
2031
  {
2031
2032
  as: Q,
2032
2033
  enter: "transform transition ease-in-out duration-500",
@@ -2048,8 +2049,8 @@ const Dn = {
2048
2049
  }
2049
2050
  ),
2050
2051
  /* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
2051
- /* @__PURE__ */ e(fe.Title, { as: "h3", className: "wizard-title", children: o }),
2052
- u && /* @__PURE__ */ e(fe.Description, { className: "wizard-description", children: u })
2052
+ /* @__PURE__ */ e(ye.Title, { as: "h3", className: "wizard-title", children: o }),
2053
+ u && /* @__PURE__ */ e(ye.Description, { className: "wizard-description", children: u })
2053
2054
  ] })
2054
2055
  ] }),
2055
2056
  /* @__PURE__ */ e(
@@ -2058,7 +2059,7 @@ const Dn = {
2058
2059
  onClick: a,
2059
2060
  className: "wizard-close-button",
2060
2061
  "aria-label": "Close modal",
2061
- children: /* @__PURE__ */ e(xe, { size: 24 })
2062
+ children: /* @__PURE__ */ e(ve, { size: 24 })
2062
2063
  }
2063
2064
  )
2064
2065
  ] }),
@@ -2070,7 +2071,7 @@ const Dn = {
2070
2071
  }
2071
2072
  ) }),
2072
2073
  /* @__PURE__ */ e("div", { className: "wizard-body", children: /* @__PURE__ */ e(
2073
- ze,
2074
+ Se,
2074
2075
  {
2075
2076
  initial: !1,
2076
2077
  custom: l,
@@ -2109,7 +2110,7 @@ const Dn = {
2109
2110
  }, _n = {
2110
2111
  primary: "btn-primary",
2111
2112
  secondary: "btn-secondary-icon"
2112
- }, ke = ({
2113
+ }, Ce = ({
2113
2114
  dataTestId: t,
2114
2115
  title: a,
2115
2116
  type: s = "button",
@@ -2358,17 +2359,17 @@ function Jn() {
2358
2359
  return "";
2359
2360
  }
2360
2361
  }
2361
- function De() {
2362
+ function $e() {
2362
2363
  return `${kt()}${Jn()}`;
2363
2364
  }
2364
2365
  function Na() {
2365
- return `${De()}/unifyedstudioutility/commonutility/users/list?sortkey=firstName&sortorder=false&page=0&size=999&onlineusersonly=false`;
2366
+ return `${$e()}/unifyedstudioutility/commonutility/users/list?sortkey=firstName&sortorder=false&page=0&size=999&onlineusersonly=false`;
2366
2367
  }
2367
2368
  function wa() {
2368
- return `${De()}/unifyedstudioutility/commonutility/groupusers/list?type=All&page=0&size=20&sortkey=name&sorder=1&createdbyme=false`;
2369
+ return `${$e()}/unifyedstudioutility/commonutility/groupusers/list?type=All&page=0&size=20&sortkey=name&sorder=1&createdbyme=false`;
2369
2370
  }
2370
2371
  function ka() {
2371
- return `${De()}/unifyedusergroupprovisioning/api`;
2372
+ return `${$e()}/unifyedusergroupprovisioning/api`;
2372
2373
  }
2373
2374
  function Ca() {
2374
2375
  return `${ka()}/v2/roles`;
@@ -2377,7 +2378,7 @@ function za() {
2377
2378
  return `${Ca()}/search`;
2378
2379
  }
2379
2380
  function Ct() {
2380
- return `${De()}/unifyed-mydrive/v2`;
2381
+ return `${$e()}/unifyed-mydrive/v2`;
2381
2382
  }
2382
2383
  function Xn() {
2383
2384
  return `${Ct()}/directory/permissions`;
@@ -2388,7 +2389,7 @@ function Hn() {
2388
2389
  function Gl() {
2389
2390
  return Object.freeze({
2390
2391
  REACT_APP_BASE_URL: kt(),
2391
- GATEWAY_BASE: De(),
2392
+ GATEWAY_BASE: $e(),
2392
2393
  USER_SEARCH_BASE: Na(),
2393
2394
  AD_GROUPS_LIST_SEARCH_API: wa(),
2394
2395
  PROVISIONING_BASE: ka(),
@@ -2507,15 +2508,15 @@ function Kn({
2507
2508
  const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl = Ee.axiosPut, Wl = Ee.axiosPatch, Jl = Ee.instance, es = async (t, a) => {
2508
2509
  try {
2509
2510
  switch (t) {
2510
- case Se.USER: {
2511
+ case De.USER: {
2511
2512
  const s = {
2512
2513
  q: a
2513
2514
  };
2514
2515
  return Je.userSearch(s);
2515
2516
  }
2516
- case Se.GROUP:
2517
+ case De.GROUP:
2517
2518
  return Je.getAdGroups(a);
2518
- case Se.ROLE:
2519
+ case De.ROLE:
2519
2520
  return Je.searchRoles(a);
2520
2521
  default:
2521
2522
  break;
@@ -2577,7 +2578,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2577
2578
  }));
2578
2579
  },
2579
2580
  getMembersForGroup: async (t) => {
2580
- const a = `${De()}/unifydidentity/open/usersforgroup?groupName=${encodeURIComponent(t)}&isGroupWithSpecChar=true&isPaging=true&page=0&size=999&deepSearch=`, { data: s } = await Ze(a);
2581
+ const a = `${$e()}/unifydidentity/open/usersforgroup?groupName=${encodeURIComponent(t)}&isGroupWithSpecChar=true&isPaging=true&page=0&size=999&deepSearch=`, { data: s } = await Ze(a);
2581
2582
  let i = [];
2582
2583
  if (Array.isArray(s))
2583
2584
  i = s;
@@ -2590,7 +2591,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2590
2591
  return ts(i);
2591
2592
  }
2592
2593
  }, zt = (t, a) => {
2593
- const [s, i] = L(t);
2594
+ const [s, i] = B(t);
2594
2595
  return te(
2595
2596
  () => {
2596
2597
  const l = rn(() => {
@@ -2638,14 +2639,14 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2638
2639
  )) }),
2639
2640
  /* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: h })
2640
2641
  ] }),
2641
- /* @__PURE__ */ e(ye, { size: 20 })
2642
+ /* @__PURE__ */ e(xe, { size: 20 })
2642
2643
  ]
2643
2644
  }
2644
2645
  );
2645
2646
  }, Mt = [
2646
- { id: 1, name: Se.USER, icon: ar, code: "users" },
2647
- { id: 2, name: Se.GROUP, icon: Kt, code: "groups" },
2648
- { id: 3, name: Se.ROLE, icon: rr, code: "roles" }
2647
+ { id: 1, name: De.USER, icon: ar, code: "users" },
2648
+ { id: 2, name: De.GROUP, icon: Kt, code: "groups" },
2649
+ { id: 3, name: De.ROLE, icon: rr, code: "roles" }
2649
2650
  ], Lt = [
2650
2651
  { id: 1, name: Tt.View, icon: ea },
2651
2652
  { id: 2, name: Tt.Manage, icon: ta }
@@ -2662,7 +2663,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2662
2663
  },
2663
2664
  isChanged: u = !1
2664
2665
  }) => {
2665
- const [h, N] = L(Mt[0]), [y, r] = L(""), v = zt(y, 400), [d, g] = L([]), [z, A] = L(/* @__PURE__ */ new Set()), [F, R] = L(!1), [P, j] = L(Lt[0]), {
2666
+ const [h, N] = B(Mt[0]), [y, r] = B(""), v = zt(y, 400), [d, g] = B([]), [S, A] = B(/* @__PURE__ */ new Set()), [F, R] = B(!1), [P, j] = B(Lt[0]), {
2666
2667
  control: U,
2667
2668
  handleSubmit: Y,
2668
2669
  watch: q,
@@ -2670,44 +2671,44 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2670
2671
  } = nr({
2671
2672
  defaultValues: { pendingInvites: [] },
2672
2673
  resolver: ir(rs)
2673
- }), { fields: f, append: C, remove: O, update: I } = sr({
2674
+ }), { fields: f, append: z, remove: O, update: I } = sr({
2674
2675
  control: U,
2675
2676
  name: "pendingInvites"
2676
2677
  }), D = q("pendingInvites");
2677
2678
  te(() => {
2678
- v.length > 1 ? (R(!0), es(h.name, v).then((S) => {
2679
- g(S);
2680
- }).catch((S) => console.error("Search failed:", S)).finally(() => R(!1))) : (g([]), A(/* @__PURE__ */ new Set()));
2679
+ v.length > 1 ? (R(!0), es(h.name, v).then((C) => {
2680
+ g(C);
2681
+ }).catch((C) => console.error("Search failed:", C)).finally(() => R(!1))) : (g([]), A(/* @__PURE__ */ new Set()));
2681
2682
  }, [v, h]);
2682
- const b = (S) => {
2683
- A((B) => {
2684
- const _ = new Set(B);
2685
- return _.has(S) ? _.delete(S) : _.add(S), _;
2683
+ const b = (C) => {
2684
+ A((M) => {
2685
+ const _ = new Set(M);
2686
+ return _.has(C) ? _.delete(C) : _.add(C), _;
2686
2687
  });
2687
2688
  }, p = () => {
2688
- d.filter((S) => z.has(S.id)).forEach((S) => {
2689
- f.find((B) => B.id === S.id) || C({ ...S, permission: P.name });
2689
+ d.filter((C) => S.has(C.id)).forEach((C) => {
2690
+ f.find((M) => M.id === C.id) || z({ ...C, permission: P.name });
2690
2691
  }), A(/* @__PURE__ */ new Set()), r("");
2691
- }, k = (S) => {
2692
- j(S), f.forEach(
2693
- (B, _) => I(_, { ...f[_], permission: S.name })
2692
+ }, w = (C) => {
2693
+ j(C), f.forEach(
2694
+ (M, _) => I(_, { ...f[_], permission: C.name })
2694
2695
  );
2695
- }, w = async (S) => {
2696
+ }, k = async (C) => {
2696
2697
  try {
2697
2698
  if (l === ue.DRIVE) {
2698
- const B = S.pendingInvites.map((E) => ({
2699
+ const M = C.pendingInvites.map((E) => ({
2699
2700
  id: E.id,
2700
2701
  permission: E.permission,
2701
2702
  type: E.type.toLowerCase()
2702
2703
  }));
2703
2704
  o({
2704
2705
  entity: t,
2705
- userGroupRolesObj: B,
2706
+ userGroupRolesObj: M,
2706
2707
  existingShares: i
2707
2708
  // Always send updated existing shares
2708
2709
  }, i);
2709
2710
  } else if (l === ue.INTEREST) {
2710
- const B = S.pendingInvites.map((_) => ({
2711
+ const M = C.pendingInvites.map((_) => ({
2711
2712
  identity: _.id,
2712
2713
  type: _.type.toLowerCase(),
2713
2714
  opt: !0,
@@ -2716,30 +2717,30 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2716
2717
  userName: _.name,
2717
2718
  interestId: t?.data?.id
2718
2719
  }));
2719
- o(B, i);
2720
+ o(M, i);
2720
2721
  } else if (l === ue.ARTICLE) {
2721
- const B = S.pendingInvites.map((E) => ({
2722
+ const M = C.pendingInvites.map((E) => ({
2722
2723
  id: E.id,
2723
2724
  permission: E.permission,
2724
2725
  type: E.type.toLowerCase()
2725
2726
  }));
2726
2727
  o({
2727
2728
  entity: t,
2728
- userGroupRolesObj: B,
2729
+ userGroupRolesObj: M,
2729
2730
  existingShares: i
2730
2731
  }, i);
2731
2732
  } else
2732
- o(S, i);
2733
+ o(C, i);
2733
2734
  setTimeout(() => {
2734
2735
  s();
2735
2736
  }, 1e3);
2736
- } catch (B) {
2737
- throw console.error("Failed to submit invites:", B), B;
2737
+ } catch (M) {
2738
+ throw console.error("Failed to submit invites:", M), M;
2738
2739
  }
2739
- }, T = (S) => {
2740
- const B = i[h.code].find((_) => _.name === S.name && _.permission !== "remove") || D.find((_) => _.name === S.name);
2741
- return B ? `${B.permission}` : "";
2742
- }, M = () => {
2740
+ }, T = (C) => {
2741
+ const M = i[h.code].find((_) => _.name === C.name && _.permission !== "remove") || D.find((_) => _.name === C.name);
2742
+ return M ? `${M.permission}` : "";
2743
+ }, L = () => {
2743
2744
  switch (l) {
2744
2745
  case ue.DRIVE:
2745
2746
  return "Share with others";
@@ -2753,7 +2754,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2753
2754
  };
2754
2755
  return ae(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", D.length), D.length === 0 && !u), [D.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2755
2756
  /* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
2756
- /* @__PURE__ */ e(fe.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: M() }),
2757
+ /* @__PURE__ */ e(ye.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: L() }),
2757
2758
  /* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
2758
2759
  l === ue.DRIVE && /* @__PURE__ */ n("button", { className: "flex items-center gap-2 text-sm text-blue-600 hover:text-blue-800 font-semibold hover:cursor-pointer", children: [
2759
2760
  /* @__PURE__ */ e(lr, { className: "h-5 w-5" }),
@@ -2773,9 +2774,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2773
2774
  (l === ue.DRIVE || m) && /* @__PURE__ */ e(
2774
2775
  as,
2775
2776
  {
2776
- users: i.users.filter((S) => S.permission !== "remove"),
2777
- groups: i.groups.filter((S) => S.permission !== "remove"),
2778
- roles: i.roles.filter((S) => S.permission !== "remove"),
2777
+ users: i.users.filter((C) => C.permission !== "remove"),
2778
+ groups: i.groups.filter((C) => C.permission !== "remove"),
2779
+ roles: i.roles.filter((C) => C.permission !== "remove"),
2779
2780
  onClick: a
2780
2781
  }
2781
2782
  ),
@@ -2795,44 +2796,44 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2795
2796
  leave: "transition ease-in duration-100",
2796
2797
  leaveFrom: "opacity-100",
2797
2798
  leaveTo: "opacity-0",
2798
- children: /* @__PURE__ */ e(Z.Options, { className: "absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: Mt.map((S) => /* @__PURE__ */ e(
2799
+ children: /* @__PURE__ */ e(Z.Options, { className: "absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: Mt.map((C) => /* @__PURE__ */ e(
2799
2800
  Z.Option,
2800
2801
  {
2801
- value: S,
2802
- className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2803
- children: ({ selected: B }) => /* @__PURE__ */ n(ee, { children: [
2802
+ value: C,
2803
+ className: ({ active: M }) => `${M ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2804
+ children: ({ selected: M }) => /* @__PURE__ */ n(ee, { children: [
2804
2805
  /* @__PURE__ */ n(
2805
2806
  "span",
2806
2807
  {
2807
- className: `${B ? "font-medium" : "font-normal"} flex items-center`,
2808
+ className: `${M ? "font-medium" : "font-normal"} flex items-center`,
2808
2809
  children: [
2809
2810
  /* @__PURE__ */ e(
2810
- S.icon,
2811
+ C.icon,
2811
2812
  {
2812
- className: `h-5 w-5 mr-2 ${B ? "text-white" : "text-gray-400"}`
2813
+ className: `h-5 w-5 mr-2 ${M ? "text-white" : "text-gray-400"}`
2813
2814
  }
2814
2815
  ),
2815
- S.name
2816
+ C.name
2816
2817
  ]
2817
2818
  }
2818
2819
  ),
2819
- B && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-white", children: /* @__PURE__ */ e(ut, { className: "h-5 w-5" }) })
2820
+ M && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-white", children: /* @__PURE__ */ e(ut, { className: "h-5 w-5" }) })
2820
2821
  ] })
2821
2822
  },
2822
- S.id
2823
+ C.id
2823
2824
  )) })
2824
2825
  }
2825
2826
  )
2826
2827
  ] }) }) }),
2827
2828
  /* @__PURE__ */ e("div", { className: "col-span-2", children: /* @__PURE__ */ e(
2828
- pe,
2829
+ ge,
2829
2830
  {
2830
2831
  placeholder: `Search by ${h.name.toLowerCase()}...`,
2831
- onDebouncedChange: (S) => r(S),
2832
+ onDebouncedChange: (C) => r(C),
2832
2833
  value: y
2833
2834
  }
2834
2835
  ) }),
2835
- /* @__PURE__ */ e(ze, { children: (d?.length > 0 || F) && /* @__PURE__ */ e(
2836
+ /* @__PURE__ */ e(Se, { children: (d?.length > 0 || F) && /* @__PURE__ */ e(
2836
2837
  ie.div,
2837
2838
  {
2838
2839
  initial: { opacity: 0, y: -10 },
@@ -2841,36 +2842,36 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2841
2842
  transition: { duration: 0.2 },
2842
2843
  className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
2843
2844
  children: F ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(ee, { children: [
2844
- /* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((S) => {
2845
- const B = T(S);
2845
+ /* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((C) => {
2846
+ const M = T(C);
2846
2847
  return /* @__PURE__ */ n(
2847
2848
  "div",
2848
2849
  {
2849
- onClick: () => B ? null : b(S.id),
2850
- className: `flex items-center gap-3 p-2 rounded-md hover:bg-blue-50 ${B ? " hover:cursor-not-allowed" : "hover:cursor-pointer"}`,
2850
+ onClick: () => M ? null : b(C.id),
2851
+ className: `flex items-center gap-3 p-2 rounded-md hover:bg-blue-50 ${M ? " hover:cursor-not-allowed" : "hover:cursor-pointer"}`,
2851
2852
  children: [
2852
2853
  /* @__PURE__ */ e(
2853
2854
  "input",
2854
2855
  {
2855
2856
  type: "checkbox",
2856
- checked: z.has(S.id),
2857
+ checked: S.has(C.id),
2857
2858
  readOnly: !0,
2858
2859
  className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
2859
- disabled: !!B
2860
+ disabled: !!M
2860
2861
  }
2861
2862
  ),
2862
- /* @__PURE__ */ e(Ne, { src: S.avatarUrl, name: S.name, size: "small" }),
2863
+ /* @__PURE__ */ e(we, { src: C.avatarUrl, name: C.name, size: "small" }),
2863
2864
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
2864
- /* @__PURE__ */ e("span", { className: "text-md font-medium text-gray-800 truncate", children: S.name }),
2865
- h.name === Se.USER && /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: S.id })
2865
+ /* @__PURE__ */ e("span", { className: "text-md font-medium text-gray-800 truncate", children: C.name }),
2866
+ h.name === De.USER && /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: C.id })
2866
2867
  ] }),
2867
- B ? /* @__PURE__ */ n(ee, { children: [
2868
- /* @__PURE__ */ e("span", { className: "text-sm px-3 py-0.5 border border-dashed rounded-xl bg-teal-100 text-teal-700", children: B }),
2868
+ M ? /* @__PURE__ */ n(ee, { children: [
2869
+ /* @__PURE__ */ e("span", { className: "text-sm px-3 py-0.5 border border-dashed rounded-xl bg-teal-100 text-teal-700", children: M }),
2869
2870
  /* @__PURE__ */ e("span", { className: "text-sm text-gray-400", children: "Already added" })
2870
2871
  ] }) : ""
2871
2872
  ]
2872
2873
  },
2873
- S.id
2874
+ C.id
2874
2875
  );
2875
2876
  }) }),
2876
2877
  /* @__PURE__ */ n("div", { className: "flex justify-end gap-2 p-2 border-t border-gray-300", children: [
@@ -2896,7 +2897,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2896
2897
  }
2897
2898
  ) })
2898
2899
  ] }),
2899
- /* @__PURE__ */ e(ze, { children: f.length > 0 && /* @__PURE__ */ n(
2900
+ /* @__PURE__ */ e(Se, { children: f.length > 0 && /* @__PURE__ */ n(
2900
2901
  ie.div,
2901
2902
  {
2902
2903
  initial: { opacity: 0, y: 20 },
@@ -2913,7 +2914,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2913
2914
  Z,
2914
2915
  {
2915
2916
  value: P,
2916
- onChange: k,
2917
+ onChange: w,
2917
2918
  children: /* @__PURE__ */ n("div", { className: "relative", children: [
2918
2919
  /* @__PURE__ */ n(Z.Button, { className: "relative w-full border border-gray-300 bg-white rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
2919
2920
  /* @__PURE__ */ n("span", { className: "flex items-center", children: [
@@ -2932,29 +2933,29 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2932
2933
  leave: "transition ease-in duration-100",
2933
2934
  leaveFrom: "opacity-100",
2934
2935
  leaveTo: "opacity-0",
2935
- children: /* @__PURE__ */ e(Z.Options, { className: "absolute z-10 mt-1 w-auto min-w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: Lt.map((S) => /* @__PURE__ */ e(
2936
+ children: /* @__PURE__ */ e(Z.Options, { className: "absolute z-10 mt-1 w-auto min-w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: Lt.map((C) => /* @__PURE__ */ e(
2936
2937
  Z.Option,
2937
2938
  {
2938
- value: S,
2939
- className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2940
- children: ({ selected: B, active: _ }) => /* @__PURE__ */ n(ee, { children: [
2939
+ value: C,
2940
+ className: ({ active: M }) => `${M ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2941
+ children: ({ selected: M, active: _ }) => /* @__PURE__ */ n(ee, { children: [
2941
2942
  /* @__PURE__ */ n(
2942
2943
  "span",
2943
2944
  {
2944
- className: `${B ? "font-medium" : "font-normal"} flex items-center`,
2945
+ className: `${M ? "font-medium" : "font-normal"} flex items-center`,
2945
2946
  children: [
2946
2947
  /* @__PURE__ */ e(
2947
- S.icon,
2948
+ C.icon,
2948
2949
  {
2949
2950
  className: `h-5 w-5 mr-2 ${_ ? "text-white" : "text-gray-400"}`
2950
2951
  }
2951
2952
  ),
2952
2953
  "Can ",
2953
- S.name
2954
+ C.name
2954
2955
  ]
2955
2956
  }
2956
2957
  ),
2957
- B && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(
2958
+ M && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(
2958
2959
  ut,
2959
2960
  {
2960
2961
  className: "h-5 w-5",
@@ -2963,7 +2964,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2963
2964
  ) })
2964
2965
  ] })
2965
2966
  },
2966
- S.id
2967
+ C.id
2967
2968
  )) })
2968
2969
  }
2969
2970
  )
@@ -2971,7 +2972,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2971
2972
  }
2972
2973
  )
2973
2974
  ] }),
2974
- /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(ze, { children: f.map((S, B) => /* @__PURE__ */ n(
2975
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Se, { children: f.map((C, M) => /* @__PURE__ */ n(
2975
2976
  ie.div,
2976
2977
  {
2977
2978
  layout: !0,
@@ -2985,21 +2986,21 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2985
2986
  /* @__PURE__ */ e(
2986
2987
  "img",
2987
2988
  {
2988
- src: S.avatarUrl || `https://avatar.vercel.sh/${S.name}.svg?text=${S.name.charAt(0)}`,
2989
+ src: C.avatarUrl || `https://avatar.vercel.sh/${C.name}.svg?text=${C.name.charAt(0)}`,
2989
2990
  className: "w-8 h-8 rounded-full shrink-0"
2990
2991
  }
2991
2992
  ),
2992
- /* @__PURE__ */ e("span", { className: "font-medium text-sm text-gray-800 truncate", children: S.name })
2993
+ /* @__PURE__ */ e("span", { className: "font-medium text-sm text-gray-800 truncate", children: C.name })
2993
2994
  ] }),
2994
2995
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
2995
2996
  l === ue.DRIVE && /* @__PURE__ */ n("span", { className: "text-sm text-gray-500", children: [
2996
2997
  "can ",
2997
- S.permission
2998
+ C.permission
2998
2999
  ] }),
2999
3000
  /* @__PURE__ */ e(
3000
3001
  "button",
3001
3002
  {
3002
- onClick: () => O(B),
3003
+ onClick: () => O(M),
3003
3004
  className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
3004
3005
  children: /* @__PURE__ */ e(Qe, { className: "h-5 w-5" })
3005
3006
  }
@@ -3007,7 +3008,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3007
3008
  ] })
3008
3009
  ]
3009
3010
  },
3010
- S.id
3011
+ C.id
3011
3012
  )) }) })
3012
3013
  ]
3013
3014
  }
@@ -3032,7 +3033,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3032
3033
  /* @__PURE__ */ e(
3033
3034
  le,
3034
3035
  {
3035
- onClick: () => Y(w)(),
3036
+ onClick: () => Y(k)(),
3036
3037
  disabled: x || D.length === 0 && !u,
3037
3038
  label: x ? "Inviting..." : l === ue.DRIVE ? "Send Invites" : "Add"
3038
3039
  }
@@ -3045,7 +3046,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3045
3046
  { name: "Can manage", icon: ta, value: "edit" },
3046
3047
  { name: "Remove", icon: or, isDestructive: !0, value: "remove" }
3047
3048
  ], ss = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
3048
- const [i, l] = L(!1), { refs: m, floatingStyles: o, context: u } = ia({
3049
+ const [i, l] = B(!1), { refs: m, floatingStyles: o, context: u } = ia({
3049
3050
  open: i,
3050
3051
  onOpenChange: l,
3051
3052
  middleware: [oa(8), ca(), da({ padding: 8 })],
@@ -3096,24 +3097,24 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3096
3097
  Z.Option,
3097
3098
  {
3098
3099
  className: ({
3099
- active: z
3100
+ active: S
3100
3101
  }) => `relative select-none py-2 pl-10 pr-4 hover:cursor-pointer
3101
- ${z ? "bg-blue-100 text-blue-900" : "text-gray-900"}
3102
- ${g.isDestructive && z ? "bg-red-100 text-red-900" : ""}
3103
- ${g.isDestructive && !z ? "text-red-600" : ""}`,
3102
+ ${S ? "bg-blue-100 text-blue-900" : "text-gray-900"}
3103
+ ${g.isDestructive && S ? "bg-red-100 text-red-900" : ""}
3104
+ ${g.isDestructive && !S ? "text-red-600" : ""}`,
3104
3105
  value: g,
3105
- children: ({ selected: z }) => /* @__PURE__ */ n(ee, { children: [
3106
+ children: ({ selected: S }) => /* @__PURE__ */ n(ee, { children: [
3106
3107
  /* @__PURE__ */ n(
3107
3108
  "span",
3108
3109
  {
3109
- className: `flex items-center gap-2 truncate ${z ? "font-medium" : "font-normal"}`,
3110
+ className: `flex items-center gap-2 truncate ${S ? "font-medium" : "font-normal"}`,
3110
3111
  children: [
3111
3112
  /* @__PURE__ */ e(g.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
3112
3113
  g.name
3113
3114
  ]
3114
3115
  }
3115
3116
  ),
3116
- z && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ut, { className: "h-5 w-5", "aria-hidden": "true" }) })
3117
+ S && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ut, { className: "h-5 w-5", "aria-hidden": "true" }) })
3117
3118
  ] })
3118
3119
  },
3119
3120
  g.name
@@ -3133,7 +3134,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3133
3134
  existingShares: l,
3134
3135
  allowedPermissions: m
3135
3136
  }) => {
3136
- const [o, u] = L(l), [h, N] = L(0), [y, r] = L(""), v = zt(y, 300), d = {
3137
+ const [o, u] = B(l), [h, N] = B(0), [y, r] = B(""), v = zt(y, 300), d = {
3137
3138
  users: o.users.filter(
3138
3139
  (R) => R.name.toLowerCase().includes(v.toLowerCase())
3139
3140
  ),
@@ -3151,7 +3152,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3151
3152
  ($) => $.id === R.id ? { ...$, permission: Y } : $
3152
3153
  )
3153
3154
  }));
3154
- }, z = () => {
3155
+ }, S = () => {
3155
3156
  const R = {
3156
3157
  users: o.users.filter((P) => P.permission !== "remove"),
3157
3158
  groups: o.groups.filter((P) => P.permission !== "remove"),
@@ -3200,7 +3201,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3200
3201
  R
3201
3202
  )) }),
3202
3203
  /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ e(
3203
- pe,
3204
+ ge,
3204
3205
  {
3205
3206
  onDebouncedChange: r,
3206
3207
  value: y,
@@ -3208,7 +3209,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3208
3209
  }
3209
3210
  ) })
3210
3211
  ] }),
3211
- /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto p-4 h-[calc(100vh-330px)]", children: /* @__PURE__ */ e(ze, { mode: "wait", children: /* @__PURE__ */ e(
3212
+ /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto p-4 h-[calc(100vh-330px)]", children: /* @__PURE__ */ e(Se, { mode: "wait", children: /* @__PURE__ */ e(
3212
3213
  ie.div,
3213
3214
  {
3214
3215
  initial: { y: 10, opacity: 0 },
@@ -3219,7 +3220,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3219
3220
  se.Panel,
3220
3221
  {
3221
3222
  className: "space-y-3 focus:outline-none",
3222
- children: /* @__PURE__ */ e(ze, { children: d[R].length > 0 ? d[R].map((P) => /* @__PURE__ */ n(
3223
+ children: /* @__PURE__ */ e(Se, { children: d[R].length > 0 ? d[R].map((P) => /* @__PURE__ */ n(
3223
3224
  ie.div,
3224
3225
  {
3225
3226
  layout: !0,
@@ -3302,7 +3303,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3302
3303
  /* @__PURE__ */ e("div", { className: "p-4 bg-white border-t border-gray-300 flex justify-end", children: /* @__PURE__ */ e(
3303
3304
  "button",
3304
3305
  {
3305
- onClick: z,
3306
+ onClick: S,
3306
3307
  className: "px-4 py-2 bg-blue-600 text-white rounded-md shadow hover:bg-blue-700",
3307
3308
  children: "Update"
3308
3309
  }
@@ -3323,7 +3324,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3323
3324
  onClose: s,
3324
3325
  members: i
3325
3326
  }) => {
3326
- const [l, m] = L(!0), [o, u] = L(""), h = zt(o, 300), N = i.filter(
3327
+ const [l, m] = B(!0), [o, u] = B(""), h = zt(o, 300), N = i.filter(
3327
3328
  (d) => d.name.toLowerCase().includes(h.toLowerCase())
3328
3329
  ), y = {
3329
3330
  hidden: { opacity: 0 },
@@ -3359,7 +3360,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3359
3360
  initial: "hidden",
3360
3361
  animate: "visible",
3361
3362
  className: "divide-y divide-gray-200",
3362
- children: /* @__PURE__ */ e(ze, { children: N.map((d) => /* @__PURE__ */ n(
3363
+ children: /* @__PURE__ */ e(Se, { children: N.map((d) => /* @__PURE__ */ n(
3363
3364
  ie.li,
3364
3365
  {
3365
3366
  layout: !0,
@@ -3414,7 +3415,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3414
3415
  )
3415
3416
  ] }),
3416
3417
  /* @__PURE__ */ e("div", { className: "p-4 border-b border-gray-200 flex-shrink-0", children: /* @__PURE__ */ e(
3417
- pe,
3418
+ ge,
3418
3419
  {
3419
3420
  onDebouncedChange: u,
3420
3421
  value: o,
@@ -3423,7 +3424,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3423
3424
  ) }),
3424
3425
  /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto", children: v() })
3425
3426
  ] });
3426
- }, ge = {
3427
+ }, be = {
3427
3428
  INVITE: "invite",
3428
3429
  MANAGE: "manage",
3429
3430
  MEMBERS: "members"
@@ -3444,32 +3445,32 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3444
3445
  allowedPermissions: u = [],
3445
3446
  ...h
3446
3447
  }) => {
3447
- const [N, y] = L(ge.INVITE), [r, v] = L(t), [d, g] = L(null), [z, A] = L(!1), [F, R] = L([]), [P, j] = L(ge.MANAGE), U = () => {
3448
- y(ge.INVITE), g(null), m();
3448
+ const [N, y] = B(be.INVITE), [r, v] = B(t), [d, g] = B(null), [S, A] = B(!1), [F, R] = B([]), [P, j] = B(be.MANAGE), U = () => {
3449
+ y(be.INVITE), g(null), m();
3449
3450
  }, Y = () => {
3450
- y(ge.MANAGE);
3451
- }, q = async ({ id: f, name: C, type: O }) => {
3451
+ y(be.MANAGE);
3452
+ }, q = async ({ id: f, name: z, type: O }) => {
3452
3453
  if (O === "groups") {
3453
3454
  try {
3454
- const I = await Ze(`${Je.getMembersForGroup(C)}`);
3455
+ const I = await Ze(`${Je.getMembersForGroup(z)}`);
3455
3456
  } catch (I) {
3456
3457
  console.log("Error searching entities:", I);
3457
3458
  }
3458
3459
  R(resp);
3459
3460
  }
3460
- g({ id: f, type: O, name: C }), j(N), y(ge.MEMBERS);
3461
+ g({ id: f, type: O, name: z }), j(N), y(be.MEMBERS);
3461
3462
  }, $ = (f) => {
3462
3463
  console.log("changedExistingShares", f), v(f);
3463
- const C = it.mapValues(t, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id)), O = it.mapValues(f, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id));
3464
- console.log("Existing data:", C), console.log("Changed data:", O);
3465
- const I = !it.isEqual(C, O);
3466
- console.log("hasPermissionChanged:", I), A(I), y(N === ge.MEMBERS ? P : ge.INVITE);
3464
+ const z = it.mapValues(t, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id)), O = it.mapValues(f, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id));
3465
+ console.log("Existing data:", z), console.log("Changed data:", O);
3466
+ const I = !it.isEqual(z, O);
3467
+ console.log("hasPermissionChanged:", I), A(I), y(N === be.MEMBERS ? P : be.INVITE);
3467
3468
  };
3468
- return /* @__PURE__ */ e(he, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(fe, { as: "div", className: "relative z-50", onClose: U, children: [
3469
+ return /* @__PURE__ */ e(he, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: U, children: [
3469
3470
  /* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
3470
3471
  /* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(Fe, { className: "filter-modal-panel", style: { background: "white" }, children: (() => {
3471
3472
  switch (N) {
3472
- case ge.MANAGE:
3473
+ case be.MANAGE:
3473
3474
  return /* @__PURE__ */ e(
3474
3475
  ie.div,
3475
3476
  {
@@ -3493,7 +3494,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3493
3494
  },
3494
3495
  "manage"
3495
3496
  );
3496
- case ge.MEMBERS:
3497
+ case be.MEMBERS:
3497
3498
  return /* @__PURE__ */ e(
3498
3499
  ie.div,
3499
3500
  {
@@ -3537,7 +3538,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3537
3538
  onFinalSubmit: (f) => {
3538
3539
  s(f, r);
3539
3540
  },
3540
- isChanged: z
3541
+ isChanged: S
3541
3542
  }
3542
3543
  )
3543
3544
  },
@@ -3570,17 +3571,17 @@ function at({
3570
3571
  serverLoading: r = !1,
3571
3572
  minSearchChars: v = 2,
3572
3573
  // NEW: mappers (id/label keys)
3573
- getOptionId: d = (z) => String(z.id),
3574
- getOptionLabel: g = (z) => z.name
3574
+ getOptionId: d = (S) => String(S.id),
3575
+ getOptionLabel: g = (S) => S.name
3575
3576
  }) {
3576
- const z = He(), A = He(), [F, R] = L(""), P = be(""), j = ae(() => {
3577
+ const S = He(), A = He(), [F, R] = B(""), P = fe(""), j = ae(() => {
3577
3578
  const f = /* @__PURE__ */ new Map();
3578
- for (const C of a) f.set(d(C), C);
3579
+ for (const z of a) f.set(d(z), z);
3579
3580
  return f;
3580
3581
  }, [a, d]), U = ae(() => Array.isArray(s) ? s.map((f) => f && typeof f == "object" ? j.get(d(f)) || null : j.get(String(f))).filter(Boolean) : [], [s, j, d]), Y = ae(() => {
3581
3582
  if (!F) return a;
3582
3583
  const f = F.toLowerCase();
3583
- return a.filter((C) => g(C).toLowerCase().includes(f));
3584
+ return a.filter((z) => g(z).toLowerCase().includes(f));
3584
3585
  }, [a, F, g]);
3585
3586
  te(() => {
3586
3587
  N === "server" && F.length >= v && F !== P.current && (P.current = F, y && y(F));
@@ -3588,7 +3589,7 @@ function at({
3588
3589
  const q = N === "client" ? Y : a, $ = () => {
3589
3590
  if (!U.length)
3590
3591
  return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
3591
- const f = U.slice(0, u), C = U.length - u;
3592
+ const f = U.slice(0, u), z = U.length - u;
3592
3593
  return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
3593
3594
  f.map((O) => /* @__PURE__ */ e(
3594
3595
  "span",
@@ -3598,21 +3599,21 @@ function at({
3598
3599
  },
3599
3600
  d(O)
3600
3601
  )),
3601
- C > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
3602
+ z > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
3602
3603
  "+",
3603
- C,
3604
+ z,
3604
3605
  " more"
3605
3606
  ] })
3606
3607
  ] });
3607
3608
  };
3608
3609
  return /* @__PURE__ */ e(Z, { value: U, onChange: (f) => {
3609
- const C = Array.from(new Set(f.map((O) => d(O))));
3610
- h !== -1 && C.length > h || i(C);
3610
+ const z = Array.from(new Set(f.map((O) => d(O))));
3611
+ h !== -1 && z.length > h || i(z);
3611
3612
  }, multiple: !0, by: "id", children: ({ open: f }) => /* @__PURE__ */ n("div", { children: [
3612
3613
  /* @__PURE__ */ e(
3613
3614
  Z.Label,
3614
3615
  {
3615
- id: z,
3616
+ id: S,
3616
3617
  className: "block text-sm font-medium leading-6 text-gray-900",
3617
3618
  children: t
3618
3619
  }
@@ -3621,7 +3622,7 @@ function at({
3621
3622
  /* @__PURE__ */ n(
3622
3623
  Z.Button,
3623
3624
  {
3624
- "aria-labelledby": z,
3625
+ "aria-labelledby": S,
3625
3626
  "aria-invalid": !!o,
3626
3627
  "aria-describedby": o ? A : void 0,
3627
3628
  onBlur: l,
@@ -3645,7 +3646,7 @@ function at({
3645
3646
  leaveTo: "opacity-0",
3646
3647
  children: /* @__PURE__ */ n(Z.Options, { className: "absolute z-10 w-full py-1 mt-1 overflow-auto text-base bg-white rounded-md shadow-lg max-h-60 ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: [
3647
3648
  /* @__PURE__ */ e("div", { className: "p-2 sticky top-0 bg-white z-20 shadow-sm", children: /* @__PURE__ */ e(
3648
- pe,
3649
+ ge,
3649
3650
  {
3650
3651
  value: F,
3651
3652
  onDebouncedChange: R,
@@ -3653,18 +3654,18 @@ function at({
3653
3654
  }
3654
3655
  ) }),
3655
3656
  N === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
3656
- q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: N === "server" ? F.length < v ? `Type at least ${v} characters to search.` : "No results." : "No options found." }) : q.map((C) => {
3657
- const O = d(C), I = g(C), D = U.some((p) => d(p) === O), b = h !== -1 && U.length >= h && !D;
3657
+ q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: N === "server" ? F.length < v ? `Type at least ${v} characters to search.` : "No results." : "No options found." }) : q.map((z) => {
3658
+ const O = d(z), I = g(z), D = U.some((p) => d(p) === O), b = h !== -1 && U.length >= h && !D;
3658
3659
  return /* @__PURE__ */ e(
3659
3660
  Z.Option,
3660
3661
  {
3661
- value: C,
3662
+ value: z,
3662
3663
  disabled: b,
3663
3664
  className: ({ active: p }) => Ge(
3664
3665
  b ? " text-gray-400 bg-white cursor-not-allowed" : p ? " bg-gray-200 text-gray-900" : " text-gray-900",
3665
3666
  " relative cursor-default select-none py-2 pl-3 pr-9"
3666
3667
  ),
3667
- children: ({ selected: p, active: k }) => /* @__PURE__ */ n(ee, { children: [
3668
+ children: ({ selected: p, active: w }) => /* @__PURE__ */ n(ee, { children: [
3668
3669
  /* @__PURE__ */ e(
3669
3670
  "span",
3670
3671
  {
@@ -3679,7 +3680,7 @@ function at({
3679
3680
  "span",
3680
3681
  {
3681
3682
  className: Ge(
3682
- k ? " text-gray-900" : " text-gray-600",
3683
+ w ? " text-gray-900" : " text-gray-600",
3683
3684
  " absolute inset-y-0 right-0 flex items-center pr-4"
3684
3685
  ),
3685
3686
  children: /* @__PURE__ */ e(et, { className: "w-5 h-5", "aria-hidden": "true" })
@@ -3755,7 +3756,7 @@ const Xl = ({
3755
3756
  y.stopPropagation();
3756
3757
  };
3757
3758
  return /* @__PURE__ */ n(
3758
- fe,
3759
+ ye,
3759
3760
  {
3760
3761
  open: t,
3761
3762
  onClose: () => a(!1),
@@ -3777,7 +3778,7 @@ const Xl = ({
3777
3778
  /* @__PURE__ */ n("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
3778
3779
  i?.customHeader && i.customHeader,
3779
3780
  i?.title && !i?.customHeader && /* @__PURE__ */ e(tt, { className: "text-lg font-bold", children: i?.title }),
3780
- i?.isCrossShow && /* @__PURE__ */ e("button", { onClick: () => a(!1), className: "p-2", children: /* @__PURE__ */ e(xe, { className: "w-5 h-5" }) })
3781
+ i?.isCrossShow && /* @__PURE__ */ e("button", { onClick: () => a(!1), className: "p-2", children: /* @__PURE__ */ e(ve, { className: "w-5 h-5" }) })
3781
3782
  ] }),
3782
3783
  /* @__PURE__ */ e(
3783
3784
  "div",
@@ -3851,7 +3852,7 @@ function ms({
3851
3852
  dropId: y,
3852
3853
  indent: r = 24
3853
3854
  }) {
3854
- const { setNodeRef: v, isOver: d } = dr({ id: y }), { attributes: g, listeners: z, setNodeRef: A, transform: F, isDragging: R } = mr({ id: N }), P = F ? { transform: `translate3d(${Math.round(F.x)}px, ${Math.round(F.y)}px, 0)` } : void 0, [j, U] = L(!1), [Y, q] = L(t.name), $ = () => {
3855
+ const { setNodeRef: v, isOver: d } = dr({ id: y }), { attributes: g, listeners: S, setNodeRef: A, transform: F, isDragging: R } = mr({ id: N }), P = F ? { transform: `translate3d(${Math.round(F.x)}px, ${Math.round(F.y)}px, 0)` } : void 0, [j, U] = B(!1), [Y, q] = B(t.name), $ = () => {
3855
3856
  const f = Y.trim();
3856
3857
  U(!1), f && f !== t.name ? o?.(t, f) : q(t.name);
3857
3858
  }, x = ae(() => /* @__PURE__ */ e(
@@ -3862,8 +3863,8 @@ function ms({
3862
3863
  { action: "rename", label: "Rename" },
3863
3864
  { action: "delete", label: "Delete" }
3864
3865
  ],
3865
- onSelect: (C) => {
3866
- C.action === "create" ? m?.(t) : C.action === "rename" ? U(!0) : C.action === "delete" && u?.(t);
3866
+ onSelect: (z) => {
3867
+ z.action === "create" ? m?.(t) : z.action === "rename" ? U(!0) : z.action === "delete" && u?.(t);
3867
3868
  }
3868
3869
  }
3869
3870
  ), [t, m, u]);
@@ -3877,7 +3878,7 @@ function ms({
3877
3878
  f.target.closest(".tv-toggle") || f.target.tagName === "INPUT" || l?.(t);
3878
3879
  },
3879
3880
  children: [
3880
- /* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(Nt, { size: 16 }) : /* @__PURE__ */ e(ye, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
3881
+ /* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(Nt, { size: 16 }) : /* @__PURE__ */ e(xe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
3881
3882
  /* @__PURE__ */ e(Be, { size: 16, className: "tv-folder-ic" }),
3882
3883
  /* @__PURE__ */ e("div", { className: "tv-name", ref: A, children: j ? /* @__PURE__ */ e(
3883
3884
  "input",
@@ -3892,7 +3893,7 @@ function ms({
3892
3893
  autoFocus: !0
3893
3894
  }
3894
3895
  ) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
3895
- /* @__PURE__ */ e(ds, { listeners: z, attributes: g }),
3896
+ /* @__PURE__ */ e(ds, { listeners: S, attributes: g }),
3896
3897
  /* @__PURE__ */ e("div", { className: "tv-actions", children: h ? h(t, {
3897
3898
  onCreateChild: () => m?.(t),
3898
3899
  onRename: () => U(!0),
@@ -3993,90 +3994,90 @@ function Hl({
3993
3994
  // ← allow root moves by default now
3994
3995
  indentUnit: g = 24
3995
3996
  }) {
3996
- const { roots: z } = ae(() => gs(t) ? fs(t, { rootId: a, getId: i, getName: m }) : bs(
3997
+ const { roots: S } = ae(() => gs(t) ? fs(t, { rootId: a, getId: i, getName: m }) : bs(
3997
3998
  t.map((b) => ({ ...b })),
3998
3999
  { rootId: a, getId: i, getParent: l, getName: m }
3999
- ), [t, a, i, l, m]), [A, F] = L({}), R = K((b) => {
4000
+ ), [t, a, i, l, m]), [A, F] = B({}), R = K((b) => {
4000
4001
  const p = {};
4001
- return (function k(w) {
4002
- w.forEach((T) => {
4003
- p[T.id] = !0, T.children?.length && k(T.children);
4002
+ return (function w(k) {
4003
+ k.forEach((T) => {
4004
+ p[T.id] = !0, T.children?.length && w(T.children);
4004
4005
  });
4005
4006
  })(b), p;
4006
4007
  }, []);
4007
4008
  re.useEffect(() => {
4008
- F(R(z));
4009
- }, [z, R]);
4009
+ F(R(S));
4010
+ }, [S, R]);
4010
4011
  const P = K(
4011
4012
  (b) => F((p) => ({ ...p, [b]: !p[b] })),
4012
4013
  []
4013
- ), [j, U] = L(() => Me(z));
4014
- re.useEffect(() => U(Me(z)), [z]);
4014
+ ), [j, U] = B(() => Me(S));
4015
+ re.useEffect(() => U(Me(S)), [S]);
4015
4016
  const Y = ur(
4016
4017
  hr(fr, { activationConstraint: { delay: 250, tolerance: 5 } })
4017
- ), q = be(null), [$, x] = L(null), f = be(0), C = () => {
4018
+ ), q = fe(null), [$, x] = B(null), f = fe(0), z = () => {
4018
4019
  }, O = ({ delta: b }) => {
4019
4020
  f.current = b?.x ?? 0;
4020
4021
  }, I = K(
4021
4022
  ({ active: b, over: p }) => {
4022
- const k = f.current;
4023
+ const w = f.current;
4023
4024
  if (f.current = 0, x(null), !b || !p) return;
4024
- const w = String(b.id).replace(/^drag-/, ""), T = String(p.id).replace(/^drop-/, "");
4025
- if (!w || !T || w === T) return;
4026
- let M = T;
4027
- const S = Math.max(0, Math.floor(-k / g));
4028
- if (S > 0) {
4029
- let J = T;
4030
- for (let ve = 0; ve < S; ve++) {
4031
- const $e = Sa(j, J, null);
4032
- if (!$e) break;
4033
- if (!$e.parentId) {
4034
- M = a;
4025
+ const k = String(b.id).replace(/^drag-/, ""), T = String(p.id).replace(/^drop-/, "");
4026
+ if (!k || !T || k === T) return;
4027
+ let L = T;
4028
+ const C = Math.max(0, Math.floor(-w / g));
4029
+ if (C > 0) {
4030
+ let W = T;
4031
+ for (let pe = 0; pe < C; pe++) {
4032
+ const Ne = Sa(j, W, null);
4033
+ if (!Ne) break;
4034
+ if (!Ne.parentId) {
4035
+ L = a;
4035
4036
  break;
4036
4037
  }
4037
- M = $e.parentId, J = $e.parentId;
4038
+ L = Ne.parentId, W = Ne.parentId;
4038
4039
  }
4039
4040
  }
4040
- if (d && M === a) {
4041
- U(Me(z));
4041
+ if (d && L === a) {
4042
+ U(Me(S));
4042
4043
  return;
4043
4044
  }
4044
- const B = Me(j), { newRoots: _, removed: E } = ys(B, w);
4045
+ const M = Me(j), { newRoots: _, removed: E } = ys(M, k);
4045
4046
  if (!E) return;
4046
- const G = xs(_, M, E);
4047
- U(G), r?.({ sourceId: w, destParentId: M, newTree: G });
4047
+ const G = xs(_, L, E);
4048
+ U(G), r?.({ sourceId: k, destParentId: L, newTree: G });
4048
4049
  },
4049
- [j, z, a, d, g, r]
4050
+ [j, S, a, d, g, r]
4050
4051
  ), D = K(
4051
- (b, p = 0) => b.map((k) => /* @__PURE__ */ n(re.Fragment, { children: [
4052
+ (b, p = 0) => b.map((w) => /* @__PURE__ */ n(re.Fragment, { children: [
4052
4053
  /* @__PURE__ */ e(
4053
4054
  ms,
4054
4055
  {
4055
- node: k,
4056
+ node: w,
4056
4057
  depth: p,
4057
- expanded: !!A[k.id],
4058
- onToggle: () => P(k.id),
4058
+ expanded: !!A[w.id],
4059
+ onToggle: () => P(w.id),
4059
4060
  onSelect: o,
4060
4061
  onCreateChild: h,
4061
4062
  onRename: N,
4062
4063
  onDelete: y,
4063
4064
  renderActions: v,
4064
- dragId: `drag-${k.id}`,
4065
- dropId: `drop-${k.id}`,
4065
+ dragId: `drag-${w.id}`,
4066
+ dropId: `drop-${w.id}`,
4066
4067
  indent: g
4067
4068
  }
4068
4069
  ),
4069
- A[k.id] && k.children?.length > 0 ? D(k.children, p + 1) : null
4070
- ] }, k.id)),
4070
+ A[w.id] && w.children?.length > 0 ? D(w.children, p + 1) : null
4071
+ ] }, w.id)),
4071
4072
  [A, g, h, y, N, o, v, P]
4072
4073
  );
4073
4074
  return re.useMemo(() => {
4074
4075
  if (!$) return null;
4075
4076
  const b = String($).replace(/^drag-/, "");
4076
- function p(k) {
4077
- for (const w of k) {
4078
- if (w.id === b) return w;
4079
- const T = w.children?.length ? p(w.children) : null;
4077
+ function p(w) {
4078
+ for (const k of w) {
4079
+ if (k.id === b) return k;
4080
+ const T = k.children?.length ? p(k.children) : null;
4080
4081
  if (T) return T;
4081
4082
  }
4082
4083
  return null;
@@ -4097,7 +4098,7 @@ function Hl({
4097
4098
  {
4098
4099
  collisionDetection: br,
4099
4100
  sensors: Y,
4100
- onDragStart: C,
4101
+ onDragStart: z,
4101
4102
  onDragMove: O,
4102
4103
  onDragEnd: I,
4103
4104
  modifiers: [gr],
@@ -4106,7 +4107,7 @@ function Hl({
4106
4107
  )
4107
4108
  ] });
4108
4109
  }
4109
- function Ce(...t) {
4110
+ function ze(...t) {
4110
4111
  return t.filter(Boolean).join(" ");
4111
4112
  }
4112
4113
  const Ql = ({
@@ -4120,21 +4121,21 @@ const Ql = ({
4120
4121
  ...u
4121
4122
  // Pass remaining props to Tab.Group
4122
4123
  }) => {
4123
- const h = s === "vertical", N = (v) => Ce(
4124
+ const h = s === "vertical", N = (v) => ze(
4124
4125
  "py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
4125
4126
  v ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
4126
- ), y = (v) => Ce(
4127
+ ), y = (v) => ze(
4127
4128
  "text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
4128
4129
  v ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
4129
4130
  ), r = ({ selected: v }) => o ? typeof o == "function" ? o(v) : o : h ? y(v) : N(v);
4130
- return /* @__PURE__ */ e(se.Group, { vertical: h, ...u, children: h ? /* @__PURE__ */ n("div", { className: Ce("flex gap-4", i), children: [
4131
- /* @__PURE__ */ e(se.List, { className: Ce("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((v) => /* @__PURE__ */ e(se, { className: r, children: v.label }, v.key)) }),
4132
- /* @__PURE__ */ e(se.Panels, { unmount: !a, className: Ce("flex-1", m), children: t.map((v) => /* @__PURE__ */ e(se.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: v.content }) }, v.key)) })
4131
+ return /* @__PURE__ */ e(se.Group, { vertical: h, ...u, children: h ? /* @__PURE__ */ n("div", { className: ze("flex gap-4", i), children: [
4132
+ /* @__PURE__ */ e(se.List, { className: ze("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((v) => /* @__PURE__ */ e(se, { className: r, children: v.label }, v.key)) }),
4133
+ /* @__PURE__ */ e(se.Panels, { unmount: !a, className: ze("flex-1", m), children: t.map((v) => /* @__PURE__ */ e(se.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: v.content }) }, v.key)) })
4133
4134
  ] }) : (
4134
4135
  // mostly this part is used : horizontal
4135
4136
  /* @__PURE__ */ n(ee, { children: [
4136
- /* @__PURE__ */ e(se.List, { className: Ce("flex gap-6 border rounded-t-2xl px-1.5 border-gray-300 mb-3 ", l), children: t.map((v) => /* @__PURE__ */ e(se, { className: r, children: v.label }, v.key)) }),
4137
- /* @__PURE__ */ e(se.Panels, { unmount: !a, className: Ce("mt-2", m), children: t.map((v) => /* @__PURE__ */ e(se.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: v.content }) }, v.key)) })
4137
+ /* @__PURE__ */ e(se.List, { className: ze("flex gap-6 border rounded-t-2xl px-1.5 border-gray-300 mb-3 ", l), children: t.map((v) => /* @__PURE__ */ e(se, { className: r, children: v.label }, v.key)) }),
4138
+ /* @__PURE__ */ e(se.Panels, { unmount: !a, className: ze("mt-2", m), children: t.map((v) => /* @__PURE__ */ e(se.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: v.content }) }, v.key)) })
4138
4139
  ] })
4139
4140
  ) });
4140
4141
  };
@@ -4147,7 +4148,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4147
4148
  const [l, m] = re.useState(t), [o, u] = re.useState(() => {
4148
4149
  const r = a && a[t.key] || {};
4149
4150
  return console.log("Initial Section data for", t.key, r), r;
4150
- }), h = be(a);
4151
+ }), h = fe(a);
4151
4152
  te(() => {
4152
4153
  if (h.current !== a) {
4153
4154
  h.current = a;
@@ -4155,30 +4156,30 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4155
4156
  console.log("Updated Section data for", t.key, r), u(r);
4156
4157
  }
4157
4158
  }, [a, t.key]), console.log("Section data", o);
4158
- const N = be(o);
4159
+ const N = fe(o);
4159
4160
  te(() => {
4160
4161
  N.current !== o && s && typeof s == "function" && (N.current = o, s(l.key, o));
4161
4162
  }, [l.key, o, s]);
4162
4163
  const y = (r) => {
4163
4164
  if (!r.dependsOn) return !0;
4164
- const { field: v, value: d, operator: g = "equals" } = r.dependsOn, z = o[v];
4165
+ const { field: v, value: d, operator: g = "equals" } = r.dependsOn, S = o[v];
4165
4166
  switch (g) {
4166
4167
  case "equals":
4167
- return z === d;
4168
+ return S === d;
4168
4169
  case "notEquals":
4169
- return z !== d;
4170
+ return S !== d;
4170
4171
  case "contains":
4171
- return Array.isArray(z) && z.includes(d);
4172
+ return Array.isArray(S) && S.includes(d);
4172
4173
  case "notContains":
4173
- return !Array.isArray(z) || !z.includes(d);
4174
+ return !Array.isArray(S) || !S.includes(d);
4174
4175
  case "greaterThan":
4175
- return Number(z) > Number(d);
4176
+ return Number(S) > Number(d);
4176
4177
  case "lessThan":
4177
- return Number(z) < Number(d);
4178
+ return Number(S) < Number(d);
4178
4179
  case "isEmpty":
4179
- return !z || Array.isArray(z) && z.length === 0;
4180
+ return !S || Array.isArray(S) && S.length === 0;
4180
4181
  case "isNotEmpty":
4181
- return z && (!Array.isArray(z) || z.length > 0);
4182
+ return S && (!Array.isArray(S) || S.length > 0);
4182
4183
  default:
4183
4184
  return !0;
4184
4185
  }
@@ -4204,8 +4205,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4204
4205
  name: r.key,
4205
4206
  checked: !!(o[r.key] || r.default),
4206
4207
  onChange: (d) => {
4207
- const g = d.target ? d.target.checked : d, z = { ...o, [r.key]: g };
4208
- u(z), s && s(l.key, z);
4208
+ const g = d.target ? d.target.checked : d, S = { ...o, [r.key]: g };
4209
+ u(S), s && s(l.key, S);
4209
4210
  },
4210
4211
  label: r.label,
4211
4212
  disabled: r.disabled ? r.disabled : !1
@@ -4304,14 +4305,14 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4304
4305
  max: r.max,
4305
4306
  step: r.step,
4306
4307
  onChange: (d) => {
4307
- const g = d.target.value, z = { ...o, [r.key]: g };
4308
- u(z), s && s(l.key, z);
4308
+ const g = d.target.value, S = { ...o, [r.key]: g };
4309
+ u(S), s && s(l.key, S);
4309
4310
  },
4310
4311
  onBlur: (d) => {
4311
4312
  const g = d.target.value;
4312
4313
  if (g !== "" && g !== null && g !== void 0) {
4313
- const z = Number(g);
4314
- isNaN(z) || (r.min !== void 0 && z < r.min ? (d.target.setCustomValidity(`${r.label} must be at least ${r.min}`), d.target.reportValidity()) : r.max !== void 0 && z > r.max ? (d.target.setCustomValidity(`${r.label} must not exceed ${r.max}`), d.target.reportValidity()) : d.target.setCustomValidity(""));
4314
+ const S = Number(g);
4315
+ isNaN(S) || (r.min !== void 0 && S < r.min ? (d.target.setCustomValidity(`${r.label} must be at least ${r.min}`), d.target.reportValidity()) : r.max !== void 0 && S > r.max ? (d.target.setCustomValidity(`${r.label} must not exceed ${r.max}`), d.target.reportValidity()) : d.target.setCustomValidity(""));
4315
4316
  }
4316
4317
  },
4317
4318
  required: r.required,
@@ -4336,8 +4337,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4336
4337
  name: r.key,
4337
4338
  checked: !!(o[r.key] || r.default),
4338
4339
  onChange: (d) => {
4339
- const g = d.target ? d.target.checked : d, z = { ...o, [r.key]: g };
4340
- u(z), s && s(l.key, z);
4340
+ const g = d.target ? d.target.checked : d, S = { ...o, [r.key]: g };
4341
+ u(S), s && s(l.key, S);
4341
4342
  },
4342
4343
  label: r.placeholder || r.label,
4343
4344
  disabled: r.disabled ? r.disabled : !1,
@@ -4515,8 +4516,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4515
4516
  value: d.value,
4516
4517
  checked: o[r.key] === d.value,
4517
4518
  onChange: (g) => {
4518
- const z = { ...o, [r.key]: g.target.value };
4519
- u(z), s && s(l.key, z);
4519
+ const S = { ...o, [r.key]: g.target.value };
4520
+ u(S), s && s(l.key, S);
4520
4521
  },
4521
4522
  disabled: r.disabled
4522
4523
  }
@@ -4530,7 +4531,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4530
4531
  ] }),
4531
4532
  r.fieldtype === "search" && /* @__PURE__ */ n("div", { children: [
4532
4533
  /* @__PURE__ */ e(
4533
- pe,
4534
+ ge,
4534
4535
  {
4535
4536
  value: o[r.key] || "",
4536
4537
  onChange: (d) => {
@@ -4633,8 +4634,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4633
4634
  type: "file",
4634
4635
  name: r.key,
4635
4636
  onChange: (d) => {
4636
- const g = d.target.files[0], z = { ...o, [r.key]: g ? g.name : "" };
4637
- u(z), s && s(l.key, z);
4637
+ const g = d.target.files[0], S = { ...o, [r.key]: g ? g.name : "" };
4638
+ u(S), s && s(l.key, S);
4638
4639
  },
4639
4640
  accept: r.accept,
4640
4641
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4679,12 +4680,12 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4679
4680
  const Ns = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
4680
4681
  function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4681
4682
  console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
4682
- const [l, m] = L(t), [o, u] = L(null), [h, N] = L(null);
4683
+ const [l, m] = B(t), [o, u] = B(null), [h, N] = B(null);
4683
4684
  console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
4684
- const [y, r] = L(() => {
4685
+ const [y, r] = B(() => {
4685
4686
  const x = a && a[l.key] || [], f = x.length > 0 ? x : [{ id: 0 }];
4686
4687
  return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, f), f;
4687
- }), v = be(a);
4688
+ }), v = fe(a);
4688
4689
  te(() => {
4689
4690
  if (console.log(`[DataTableRenderer] ${l.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${l.key} - Previous:`, v.current), console.log(`[DataTableRenderer] ${l.key} - Current:`, a), v.current !== a) {
4690
4691
  v.current = a;
@@ -4692,7 +4693,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4692
4693
  console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, f), r(f);
4693
4694
  }
4694
4695
  }, [a, l.key]);
4695
- const d = be(y), g = be(null);
4696
+ const d = fe(y), g = fe(null);
4696
4697
  te(() => {
4697
4698
  d.current !== y && s && typeof s == "function" && (d.current = y, g.current && clearTimeout(g.current), g.current = setTimeout(() => {
4698
4699
  s(l.key, y);
@@ -4700,14 +4701,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4700
4701
  }, [l.key, y, s]), te(() => () => {
4701
4702
  g.current && clearTimeout(g.current);
4702
4703
  }, []);
4703
- const z = (x) => {
4704
+ const S = (x) => {
4704
4705
  const f = (I, D) => {
4705
4706
  console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: I, value: D, type: typeof D }), r((b) => {
4706
4707
  const p = [...b];
4707
4708
  return p[I][x.key] = D, p;
4708
4709
  });
4709
- }, C = (I) => i[l.key]?.[I]?.[x.key], O = (I) => {
4710
- const D = C(I);
4710
+ }, z = (I) => i[l.key]?.[I]?.[x.key], O = (I) => {
4711
+ const D = z(I);
4711
4712
  return D ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: D }) : null;
4712
4713
  };
4713
4714
  switch (x.fieldtype) {
@@ -4720,7 +4721,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4720
4721
  onChange: (b) => f(D, b.target.value),
4721
4722
  placeholder: x.placeholder || `Enter ${x.label}`,
4722
4723
  required: x.required,
4723
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4724
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4724
4725
  }
4725
4726
  ),
4726
4727
  O(D)
@@ -4734,7 +4735,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4734
4735
  onChange: (b) => f(D, b.target.value),
4735
4736
  placeholder: x.placeholder || `Enter ${x.label}`,
4736
4737
  required: x.required,
4737
- className: `w-full ${C(D) ? "border-red-500" : ""}`,
4738
+ className: `w-full ${z(D) ? "border-red-500" : ""}`,
4738
4739
  rows: 3
4739
4740
  }
4740
4741
  ),
@@ -4754,13 +4755,13 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4754
4755
  onBlur: (b) => {
4755
4756
  const p = b.target.value;
4756
4757
  if (p !== "" && p !== null && p !== void 0) {
4757
- const k = Number(p);
4758
- isNaN(k) || (x.min !== void 0 && k < x.min ? (b.target.setCustomValidity(`${x.label} must be at least ${x.min}`), b.target.reportValidity()) : x.max !== void 0 && k > x.max ? (b.target.setCustomValidity(`${x.label} must not exceed ${x.max}`), b.target.reportValidity()) : b.target.setCustomValidity(""));
4758
+ const w = Number(p);
4759
+ isNaN(w) || (x.min !== void 0 && w < x.min ? (b.target.setCustomValidity(`${x.label} must be at least ${x.min}`), b.target.reportValidity()) : x.max !== void 0 && w > x.max ? (b.target.setCustomValidity(`${x.label} must not exceed ${x.max}`), b.target.reportValidity()) : b.target.setCustomValidity(""));
4759
4760
  }
4760
4761
  },
4761
4762
  placeholder: x.placeholder || `Enter ${x.label}`,
4762
4763
  required: x.required,
4763
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4764
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4764
4765
  }
4765
4766
  ),
4766
4767
  x.min !== void 0 && /* @__PURE__ */ n("div", { style: { color: "#6b7280", fontSize: "11px", marginTop: "2px" }, children: [
@@ -4783,7 +4784,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4783
4784
  onChange: (b) => f(D, b.target.value),
4784
4785
  placeholder: x.placeholder || "Enter email address",
4785
4786
  required: x.required,
4786
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4787
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4787
4788
  }
4788
4789
  ),
4789
4790
  O(D)
@@ -4798,7 +4799,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4798
4799
  onChange: (b) => f(D, b.target.value),
4799
4800
  placeholder: x.placeholder || "Enter URL",
4800
4801
  required: x.required,
4801
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4802
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4802
4803
  }
4803
4804
  ),
4804
4805
  O(D)
@@ -4813,7 +4814,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4813
4814
  onChange: (b) => f(D, b.target.value),
4814
4815
  placeholder: x.placeholder || "Enter password",
4815
4816
  required: x.required,
4816
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4817
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4817
4818
  }
4818
4819
  ),
4819
4820
  O(D)
@@ -4829,7 +4830,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4829
4830
  options: x.options || [],
4830
4831
  placeholder: x.placeholder || `Select ${x.label}`,
4831
4832
  required: x.required,
4832
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4833
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4833
4834
  }
4834
4835
  ),
4835
4836
  O(D)
@@ -4838,12 +4839,12 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4838
4839
  return (I, D) => {
4839
4840
  const b = () => {
4840
4841
  if (x.optionsFrom && a) {
4841
- const { config: p, valueField: k, labelField: w } = x.optionsFrom, T = a[p] || [];
4842
+ const { config: p, valueField: w, labelField: k } = x.optionsFrom, T = a[p] || [];
4842
4843
  if (Array.isArray(T))
4843
- return T.map((M) => ({
4844
- id: M[k] || "",
4845
- value: M[k] || "",
4846
- label: M[w] || ""
4844
+ return T.map((L) => ({
4845
+ id: L[w] || "",
4846
+ value: L[w] || "",
4847
+ label: L[k] || ""
4847
4848
  }));
4848
4849
  }
4849
4850
  return x.options || [];
@@ -4858,7 +4859,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4858
4859
  options: b(),
4859
4860
  placeholder: x.placeholder || `Select ${x.label}`,
4860
4861
  required: x.required,
4861
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4862
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4862
4863
  },
4863
4864
  Math.random()
4864
4865
  ),
@@ -4947,7 +4948,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4947
4948
  );
4948
4949
  case "search":
4949
4950
  return (I, D) => /* @__PURE__ */ e(
4950
- pe,
4951
+ ge,
4951
4952
  {
4952
4953
  value: I[x.key] || "",
4953
4954
  onChange: (b) => f(D, b),
@@ -4963,14 +4964,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4963
4964
  ...b.roles || []
4964
4965
  ];
4965
4966
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
4966
- /* @__PURE__ */ e(Ns, { children: p.length > 0 ? p.slice(0, 3).map((k, w) => /* @__PURE__ */ e(
4967
- Ne,
4967
+ /* @__PURE__ */ e(Ns, { children: p.length > 0 ? p.slice(0, 3).map((w, k) => /* @__PURE__ */ e(
4968
+ we,
4968
4969
  {
4969
4970
  size: "small",
4970
- name: k.name || k.displayName || k.id,
4971
- src: k.avatarUrl
4971
+ name: w.name || w.displayName || w.id,
4972
+ src: w.avatarUrl
4972
4973
  },
4973
- w
4974
+ k
4974
4975
  )) : null }),
4975
4976
  /* @__PURE__ */ e(
4976
4977
  "button",
@@ -5042,7 +5043,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5042
5043
  onChange: (b) => f(D, b.target.value),
5043
5044
  placeholder: x.placeholder || `Enter ${x.label}`,
5044
5045
  required: x.required,
5045
- className: `w-full ${C(D) ? "border-red-500" : ""}`
5046
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
5046
5047
  }
5047
5048
  ),
5048
5049
  O(D)
@@ -5058,39 +5059,39 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5058
5059
  l.fields.forEach((O) => {
5059
5060
  O.fieldtype === "audience" ? f[O.key] = { users: [], groups: [], roles: [] } : f[O.key] = O.default || "";
5060
5061
  }), console.log("[DataTableRenderer] New blank row:", f);
5061
- const C = [...x, f];
5062
- return console.log("[DataTableRenderer] Updated data:", C), C;
5062
+ const z = [...x, f];
5063
+ return console.log("[DataTableRenderer] Updated data:", z), z;
5063
5064
  });
5064
5065
  }, [l.fields]), F = K((x) => {
5065
5066
  r((f) => {
5066
5067
  if (f.length <= 1)
5067
5068
  return f;
5068
- const C = [...f];
5069
- return C.splice(x, 1), C;
5069
+ const z = [...f];
5070
+ return z.splice(x, 1), z;
5070
5071
  });
5071
- }, []), [R, P] = L(null), j = K((x, f) => {
5072
+ }, []), [R, P] = B(null), j = K((x, f) => {
5072
5073
  P(f), x.dataTransfer.effectAllowed = "move", x.dataTransfer.setData("text/html", "");
5073
5074
  }, []), U = K((x) => {
5074
5075
  x.preventDefault(), x.dataTransfer.dropEffect = "move";
5075
5076
  }, []), Y = K((x, f) => {
5076
- x.preventDefault(), !(R === null || R === f) && (r((C) => {
5077
- const O = [...C], I = O[R];
5077
+ x.preventDefault(), !(R === null || R === f) && (r((z) => {
5078
+ const O = [...z], I = O[R];
5078
5079
  return O.splice(R, 1), O.splice(f, 0, I), O;
5079
5080
  }), P(null));
5080
5081
  }, [R]), q = K(() => {
5081
5082
  P(null);
5082
5083
  }, []), $ = K((x) => {
5083
5084
  console.log("[DataTableRenderer] handleAddAudience called with:", x), r((f) => {
5084
- const C = [...f];
5085
- if (o !== null && h && C[o]) {
5085
+ const z = [...f];
5086
+ if (o !== null && h && z[o]) {
5086
5087
  const O = x.pendingInvites || [], I = O.filter((p) => p.type === "User"), D = O.filter((p) => p.type === "Group"), b = O.filter((p) => p.type === "Role");
5087
- C[o][h] = {
5088
- users: [...C[o][h]?.users || [], ...I],
5089
- groups: [...C[o][h]?.groups || [], ...D],
5090
- roles: [...C[o][h]?.roles || [], ...b]
5091
- }, console.log("[DataTableRenderer] Updated audience data:", C[o][h]);
5088
+ z[o][h] = {
5089
+ users: [...z[o][h]?.users || [], ...I],
5090
+ groups: [...z[o][h]?.groups || [], ...D],
5091
+ roles: [...z[o][h]?.roles || [], ...b]
5092
+ }, console.log("[DataTableRenderer] Updated audience data:", z[o][h]);
5092
5093
  }
5093
- return C;
5094
+ return z;
5094
5095
  }), u(null), N(null);
5095
5096
  }, [o, h]);
5096
5097
  return /* @__PURE__ */ n("div", { children: [
@@ -5126,13 +5127,13 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5126
5127
  {
5127
5128
  className: `hover:bg-gray-50 ${R === f ? "opacity-50" : ""}`,
5128
5129
  draggable: !0,
5129
- onDragStart: (C) => j(C, f),
5130
+ onDragStart: (z) => j(z, f),
5130
5131
  onDragOver: U,
5131
- onDrop: (C) => Y(C, f),
5132
+ onDrop: (z) => Y(z, f),
5132
5133
  onDragEnd: q,
5133
5134
  children: [
5134
5135
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e("div", { className: "cursor-move text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ e(wt, { size: 16 }) }) }),
5135
- l.fields.map((C, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: z(C)(x, f) }, O)),
5136
+ l.fields.map((z, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: S(z)(x, f) }, O)),
5136
5137
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
5137
5138
  "button",
5138
5139
  {
@@ -5190,55 +5191,55 @@ function Ss({
5190
5191
  onShowCancelModal: l,
5191
5192
  onCancel: m
5192
5193
  }) {
5193
- const [o, u] = re.useState(a), [h, N] = re.useState(null), [y, r] = re.useState(null), [v, d] = L(!1), [g, z] = L(!1), [A, F] = L({}), R = `${De()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, P = R, [j, U] = L(1), Y = () => {
5194
+ const [o, u] = re.useState(a), [h, N] = re.useState(null), [y, r] = re.useState(null), [v, d] = B(!1), [g, S] = B(!1), [A, F] = B({}), R = `${$e()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, P = R, [j, U] = B(1), Y = () => {
5194
5195
  if (!y || !h)
5195
5196
  return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: y, data: h }), !1;
5196
5197
  const b = (T) => {
5197
5198
  if (T == null || typeof T != "object") return T;
5198
5199
  if (Array.isArray(T)) return T.map(b);
5199
- const M = {};
5200
- return Object.keys(T).sort().forEach((S) => {
5201
- M[S] = b(T[S]);
5202
- }), M;
5203
- }, p = b(y), k = b(h), w = JSON.stringify(p) !== JSON.stringify(k);
5204
- return console.log("[DynamicConfig] hasUnsavedChanges:", w, {
5200
+ const L = {};
5201
+ return Object.keys(T).sort().forEach((C) => {
5202
+ L[C] = b(T[C]);
5203
+ }), L;
5204
+ }, p = b(y), w = b(h), k = JSON.stringify(p) !== JSON.stringify(w);
5205
+ return console.log("[DynamicConfig] hasUnsavedChanges:", k, {
5205
5206
  originalData: p,
5206
- currentData: k,
5207
+ currentData: w,
5207
5208
  originalRaw: y,
5208
5209
  currentRaw: h
5209
- }), w;
5210
+ }), k;
5210
5211
  }, q = (b) => {
5211
5212
  if (!a || !a.configuration)
5212
5213
  return b;
5213
- const p = {}, k = b?.configuration || {};
5214
- return a.configuration.forEach((w) => {
5215
- if (w.key && w.type === "datatable") {
5216
- const M = (k[w.key] || []).map((S, B) => {
5217
- const _ = { id: S.id || 0 };
5218
- return w.fields && w.fields.forEach((E) => {
5214
+ const p = {}, w = b?.configuration || {};
5215
+ return a.configuration.forEach((k) => {
5216
+ if (k.key && k.type === "datatable") {
5217
+ const L = (w[k.key] || []).map((C, M) => {
5218
+ const _ = { id: C.id || 0 };
5219
+ return k.fields && k.fields.forEach((E) => {
5219
5220
  if (E.fieldtype === "audience") {
5220
5221
  let G = { users: [], groups: [], roles: [] };
5221
- S[E.key] && (Array.isArray(S[E.key]) ? G = { users: [], groups: [], roles: [] } : typeof S[E.key] == "object" && (G = {
5222
- users: S[E.key].users || [],
5223
- groups: S[E.key].groups || [],
5224
- roles: S[E.key].roles || []
5222
+ C[E.key] && (Array.isArray(C[E.key]) ? G = { users: [], groups: [], roles: [] } : typeof C[E.key] == "object" && (G = {
5223
+ users: C[E.key].users || [],
5224
+ groups: C[E.key].groups || [],
5225
+ roles: C[E.key].roles || []
5225
5226
  })), _[E.key] = G;
5226
5227
  } else
5227
- _[E.key] = S[E.key] || E.default || "";
5228
+ _[E.key] = C[E.key] || E.default || "";
5228
5229
  }), _;
5229
5230
  });
5230
- if (M.length === 0) {
5231
- const S = { id: 0 };
5232
- w.fields && w.fields.forEach((B) => {
5233
- B.fieldtype === "audience" ? S[B.key] = { users: [], groups: [], roles: [] } : S[B.key] = B.default || "";
5234
- }), M.push(S);
5231
+ if (L.length === 0) {
5232
+ const C = { id: 0 };
5233
+ k.fields && k.fields.forEach((M) => {
5234
+ M.fieldtype === "audience" ? C[M.key] = { users: [], groups: [], roles: [] } : C[M.key] = M.default || "";
5235
+ }), L.push(C);
5235
5236
  }
5236
- p[w.key] = M;
5237
- } else if (w.key) {
5238
- const T = k[w.key] || {};
5239
- w.type === "section" && w.fields && w.fields.forEach((M) => {
5240
- M.fieldtype === "managecollectionlist" && M.key && (!T[M.key] || !Array.isArray(T[M.key])) && (T[M.key] = M.initialData || []);
5241
- }), p[w.key] = T;
5237
+ p[k.key] = L;
5238
+ } else if (k.key) {
5239
+ const T = w[k.key] || {};
5240
+ k.type === "section" && k.fields && k.fields.forEach((L) => {
5241
+ L.fieldtype === "managecollectionlist" && L.key && (!T[L.key] || !Array.isArray(T[L.key])) && (T[L.key] = L.initialData || []);
5242
+ }), p[k.key] = T;
5242
5243
  }
5243
5244
  }), p;
5244
5245
  }, $ = () => {
@@ -5247,15 +5248,15 @@ function Ss({
5247
5248
  a.configuration.forEach((p) => {
5248
5249
  if (p.key)
5249
5250
  if (p.type === "datatable") {
5250
- const k = { id: 0 };
5251
- p.fields && p.fields.forEach((w) => {
5252
- w.fieldtype === "audience" ? k[w.key] = { users: [], groups: [], roles: [] } : k[w.key] = w.default || "";
5253
- }), b[p.key] = [k];
5251
+ const w = { id: 0 };
5252
+ p.fields && p.fields.forEach((k) => {
5253
+ k.fieldtype === "audience" ? w[k.key] = { users: [], groups: [], roles: [] } : w[k.key] = k.default || "";
5254
+ }), b[p.key] = [w];
5254
5255
  } else if (p.type === "section") {
5255
- const k = {};
5256
- p.fields && Array.isArray(p.fields) && p.fields.forEach((w) => {
5257
- w.key && (w.fieldtype === "managecollectionlist" ? k[w.key] = w.initialData || [] : k[w.key] = w.default || "");
5258
- }), b[p.key] = k;
5256
+ const w = {};
5257
+ p.fields && Array.isArray(p.fields) && p.fields.forEach((k) => {
5258
+ k.key && (k.fieldtype === "managecollectionlist" ? w[k.key] = k.initialData || [] : w[k.key] = k.default || "");
5259
+ }), b[p.key] = w;
5259
5260
  } else
5260
5261
  b[p.key] = {};
5261
5262
  }), N(b), r(b);
@@ -5271,18 +5272,18 @@ function Ss({
5271
5272
  d(!0);
5272
5273
  let p = await Ze(R);
5273
5274
  if (p) {
5274
- const k = q(p);
5275
- N(k), r(k);
5275
+ const w = q(p);
5276
+ N(w), r(w);
5276
5277
  } else
5277
5278
  $();
5278
5279
  } catch (p) {
5279
5280
  console.error("Error fetching configuration:", p);
5280
- let k = "Failed to load configuration";
5281
+ let w = "Failed to load configuration";
5281
5282
  if (p.response) {
5282
- const w = p.response.status, T = p.response.data?.message || p.response.data?.error;
5283
- w === 400 ? k = T || "Invalid request. Please check the application ID." : w === 401 ? k = "You are not authorized to access this configuration." : w === 403 ? k = "Access denied. You don't have permission to view this configuration." : w === 404 ? k = "Configuration not found. It may not exist yet or the application ID is incorrect." : w >= 500 ? k = T || "Server error. Please try again later." : k = T || `Failed to load configuration (Error ${w})`;
5284
- } else p.request ? k = "Network error. Please check your connection and try again." : k = p.message || "An unexpected error occurred while loading configuration.";
5285
- qe.error(k), $();
5283
+ const k = p.response.status, T = p.response.data?.message || p.response.data?.error;
5284
+ k === 400 ? w = T || "Invalid request. Please check the application ID." : k === 401 ? w = "You are not authorized to access this configuration." : k === 403 ? w = "Access denied. You don't have permission to view this configuration." : k === 404 ? w = "Configuration not found. It may not exist yet or the application ID is incorrect." : k >= 500 ? w = T || "Server error. Please try again later." : w = T || `Failed to load configuration (Error ${k})`;
5285
+ } else p.request ? w = "Network error. Please check your connection and try again." : w = p.message || "An unexpected error occurred while loading configuration.";
5286
+ qe.error(w), $();
5286
5287
  } finally {
5287
5288
  d(!1);
5288
5289
  }
@@ -5290,100 +5291,100 @@ function Ss({
5290
5291
  a && (u(a), t ? b() : $());
5291
5292
  }, [a, j, t, s]);
5292
5293
  const x = (b, p) => {
5293
- console.log(`[DynamicConfig] handleSectionChange called for ${b}:`, p), N((k) => {
5294
- const w = {
5295
- ...k,
5294
+ console.log(`[DynamicConfig] handleSectionChange called for ${b}:`, p), N((w) => {
5295
+ const k = {
5296
+ ...w,
5296
5297
  [b]: p
5297
5298
  };
5298
- return console.log("[DynamicConfig] Updated data state:", w), w;
5299
- }), F((k) => {
5300
- const w = { ...k };
5301
- return w[b] && delete w[b], w;
5299
+ return console.log("[DynamicConfig] Updated data state:", k), k;
5300
+ }), F((w) => {
5301
+ const k = { ...w };
5302
+ return k[b] && delete k[b], k;
5302
5303
  });
5303
5304
  }, f = () => {
5304
5305
  const b = {};
5305
5306
  return !o || !h || o.configuration.forEach((p) => {
5306
5307
  if (p.type === "section")
5307
- p.fields.forEach((k) => {
5308
- const w = h[p.key]?.[k.key];
5309
- if (k.required && (!w || typeof w == "string" && w.trim() === "")) {
5310
- b[p.key] || (b[p.key] = {}), b[p.key][k.key] = `${k.label} is required`;
5308
+ p.fields.forEach((w) => {
5309
+ const k = h[p.key]?.[w.key];
5310
+ if (w.required && (!k || typeof k == "string" && k.trim() === "")) {
5311
+ b[p.key] || (b[p.key] = {}), b[p.key][w.key] = `${w.label} is required`;
5311
5312
  return;
5312
5313
  }
5313
- if (k.fieldtype === "number" && w !== "" && w !== null && w !== void 0) {
5314
- const T = Number(w);
5315
- isNaN(T) ? (b[p.key] || (b[p.key] = {}), b[p.key][k.key] = `${k.label} must be a valid number`) : (k.min !== void 0 && T < k.min && (b[p.key] || (b[p.key] = {}), b[p.key][k.key] = `${k.label} must be at least ${k.min}`), k.max !== void 0 && T > k.max && (b[p.key] || (b[p.key] = {}), b[p.key][k.key] = `${k.label} must not exceed ${k.max}`));
5314
+ if (w.fieldtype === "number" && k !== "" && k !== null && k !== void 0) {
5315
+ const T = Number(k);
5316
+ isNaN(T) ? (b[p.key] || (b[p.key] = {}), b[p.key][w.key] = `${w.label} must be a valid number`) : (w.min !== void 0 && T < w.min && (b[p.key] || (b[p.key] = {}), b[p.key][w.key] = `${w.label} must be at least ${w.min}`), w.max !== void 0 && T > w.max && (b[p.key] || (b[p.key] = {}), b[p.key][w.key] = `${w.label} must not exceed ${w.max}`));
5316
5317
  }
5317
5318
  });
5318
5319
  else if (p.type === "datatable") {
5319
- const k = h[p.key];
5320
- Array.isArray(k) && k.forEach((w, T) => {
5321
- p.fields.forEach((M) => {
5322
- const S = w[M.key];
5323
- if (M.required && (!S || typeof S == "string" && S.trim() === "")) {
5324
- b[p.key] || (b[p.key] = {}), b[p.key][T] || (b[p.key][T] = {}), b[p.key][T][M.key] = `${M.label} is required`;
5320
+ const w = h[p.key];
5321
+ Array.isArray(w) && w.forEach((k, T) => {
5322
+ p.fields.forEach((L) => {
5323
+ const C = k[L.key];
5324
+ if (L.required && (!C || typeof C == "string" && C.trim() === "")) {
5325
+ b[p.key] || (b[p.key] = {}), b[p.key][T] || (b[p.key][T] = {}), b[p.key][T][L.key] = `${L.label} is required`;
5325
5326
  return;
5326
5327
  }
5327
- if (M.fieldtype === "number" && S !== "" && S !== null && S !== void 0) {
5328
- const B = Number(S);
5329
- isNaN(B) ? (b[p.key] || (b[p.key] = {}), b[p.key][T] || (b[p.key][T] = {}), b[p.key][T][M.key] = `${M.label} must be a valid number`) : (M.min !== void 0 && B < M.min && (b[p.key] || (b[p.key] = {}), b[p.key][T] || (b[p.key][T] = {}), b[p.key][T][M.key] = `${M.label} must be at least ${M.min}`), M.max !== void 0 && B > M.max && (b[p.key] || (b[p.key] = {}), b[p.key][T] || (b[p.key][T] = {}), b[p.key][T][M.key] = `${M.label} must not exceed ${M.max}`));
5328
+ if (L.fieldtype === "number" && C !== "" && C !== null && C !== void 0) {
5329
+ const M = Number(C);
5330
+ isNaN(M) ? (b[p.key] || (b[p.key] = {}), b[p.key][T] || (b[p.key][T] = {}), b[p.key][T][L.key] = `${L.label} must be a valid number`) : (L.min !== void 0 && M < L.min && (b[p.key] || (b[p.key] = {}), b[p.key][T] || (b[p.key][T] = {}), b[p.key][T][L.key] = `${L.label} must be at least ${L.min}`), L.max !== void 0 && M > L.max && (b[p.key] || (b[p.key] = {}), b[p.key][T] || (b[p.key][T] = {}), b[p.key][T][L.key] = `${L.label} must not exceed ${L.max}`));
5330
5331
  }
5331
5332
  });
5332
5333
  });
5333
5334
  }
5334
5335
  }), b;
5335
- }, C = (b) => Object.keys(b).length > 0, O = () => {
5336
+ }, z = (b) => Object.keys(b).length > 0, O = () => {
5336
5337
  if (g) {
5337
5338
  console.log("[handleSave] Already saving, ignoring duplicate call");
5338
5339
  return;
5339
5340
  }
5340
5341
  console.log("[handleSave] Starting save process");
5341
5342
  const b = f();
5342
- if (F(b), C(b)) {
5343
- let k = [];
5344
- Object.keys(b).forEach((w) => {
5345
- typeof b[w] == "object" && Object.keys(b[w]).forEach((T) => {
5346
- typeof b[w][T] == "object" ? Object.keys(b[w][T]).forEach((M) => {
5347
- k.push(`${w} row ${parseInt(T) + 1}: ${b[w][T][M]}`);
5348
- }) : k.push(`${w}: ${b[w][T]}`);
5343
+ if (F(b), z(b)) {
5344
+ let w = [];
5345
+ Object.keys(b).forEach((k) => {
5346
+ typeof b[k] == "object" && Object.keys(b[k]).forEach((T) => {
5347
+ typeof b[k][T] == "object" ? Object.keys(b[k][T]).forEach((L) => {
5348
+ w.push(`${k} row ${parseInt(T) + 1}: ${b[k][T][L]}`);
5349
+ }) : w.push(`${k}: ${b[k][T]}`);
5349
5350
  });
5350
5351
  });
5351
5352
  return;
5352
5353
  }
5353
5354
  (async () => {
5354
5355
  try {
5355
- z(!0);
5356
- const k = {};
5356
+ S(!0);
5357
+ const w = {};
5357
5358
  h && Object.keys(h).forEach((T) => {
5358
- const M = a?.configuration?.find(
5359
- (S) => S.key === T && S.type === "datatable"
5359
+ const L = a?.configuration?.find(
5360
+ (C) => C.key === T && C.type === "datatable"
5360
5361
  );
5361
- M && Array.isArray(h[T]) ? k[T] = h[T].map((S) => {
5362
- const B = { id: S.id || 0 };
5363
- return M.fields && M.fields.forEach((_) => {
5362
+ L && Array.isArray(h[T]) ? w[T] = h[T].map((C) => {
5363
+ const M = { id: C.id || 0 };
5364
+ return L.fields && L.fields.forEach((_) => {
5364
5365
  if (_.fieldtype === "audience") {
5365
5366
  let E = { users: [], groups: [], roles: [] };
5366
- S[_.key] && typeof S[_.key] == "object" && !Array.isArray(S[_.key]) && (E = {
5367
- users: S[_.key].users || [],
5368
- groups: S[_.key].groups || [],
5369
- roles: S[_.key].roles || []
5370
- }), B[_.key] = E;
5367
+ C[_.key] && typeof C[_.key] == "object" && !Array.isArray(C[_.key]) && (E = {
5368
+ users: C[_.key].users || [],
5369
+ groups: C[_.key].groups || [],
5370
+ roles: C[_.key].roles || []
5371
+ }), M[_.key] = E;
5371
5372
  } else
5372
- B[_.key] = S[_.key] || "";
5373
- }), B;
5374
- }) : k[T] = h[T];
5375
- }), (!k.appkey || k.appkey === "") && (k.appkey = t);
5376
- let w = await xt(P, k);
5377
- if (w && w.status != "fail") {
5373
+ M[_.key] = C[_.key] || "";
5374
+ }), M;
5375
+ }) : w[T] = h[T];
5376
+ }), (!w.appkey || w.appkey === "") && (w.appkey = t);
5377
+ let k = await xt(P, w);
5378
+ if (k && k.status != "fail") {
5378
5379
  F({}), r(JSON.parse(JSON.stringify(h)));
5379
- const T = w.message || "Configuration has been saved successfully";
5380
+ const T = k.message || "Configuration has been saved successfully";
5380
5381
  qe.success(T), i && typeof i == "function" && i(h);
5381
5382
  } else
5382
- throw qe.error(w?.message || "Failed to save configuration"), new Error("No response received from server");
5383
- } catch (k) {
5384
- console.error("Error saving configuration:", k), qe.error(k?.message || "Failed to save configuration");
5383
+ throw qe.error(k?.message || "Failed to save configuration"), new Error("No response received from server");
5384
+ } catch (w) {
5385
+ console.error("Error saving configuration:", w), qe.error(w?.message || "Failed to save configuration");
5385
5386
  } finally {
5386
- z(!1);
5387
+ S(!1);
5387
5388
  }
5388
5389
  })();
5389
5390
  }, I = () => {
@@ -5403,10 +5404,10 @@ function Ss({
5403
5404
  children: [
5404
5405
  v && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(ba, { size: "large" }) }),
5405
5406
  !v && D?.map((b, p) => {
5406
- const k = zs(b.type);
5407
- if (k && k !== "UnknownType")
5407
+ const w = zs(b.type);
5408
+ if (w && w !== "UnknownType")
5408
5409
  return /* @__PURE__ */ e(
5409
- k,
5410
+ w,
5410
5411
  {
5411
5412
  item: b,
5412
5413
  data: h,
@@ -5448,7 +5449,7 @@ const Kl = ({
5448
5449
  appid: a = "Configuration-Page",
5449
5450
  disableApi: s = !1
5450
5451
  }) => {
5451
- const [i, l] = L(0), [m, o] = L(!1), {
5452
+ const [i, l] = B(0), [m, o] = B(!1), {
5452
5453
  pageHeader: u = {},
5453
5454
  appletHeader: h = {},
5454
5455
  breadcrumb: N = [],
@@ -5456,19 +5457,19 @@ const Kl = ({
5456
5457
  configuration: r = []
5457
5458
  } = t, v = ae(() => r.map((f) => {
5458
5459
  if (f.type === "section" && f.fields) {
5459
- const C = [...f.fields], O = C.findIndex((I) => I && I.key === "appkey");
5460
+ const z = [...f.fields], O = z.findIndex((I) => I && I.key === "appkey");
5460
5461
  if (O !== -1) {
5461
- const I = C[O];
5462
- if (C[O] = {
5462
+ const I = z[O];
5463
+ if (z[O] = {
5463
5464
  ...I,
5464
5465
  default: a,
5465
5466
  value: a,
5466
5467
  readonly: !0,
5467
5468
  placeholder: a,
5468
5469
  disabled: !1
5469
- }, C.some((b) => b.key === "displayname")) {
5470
- const b = C.findIndex((k) => k.key === "displayname"), p = C[b] || {};
5471
- C[b] = {
5470
+ }, z.some((b) => b.key === "displayname")) {
5471
+ const b = z.findIndex((w) => w.key === "displayname"), p = z[b] || {};
5472
+ z[b] = {
5472
5473
  ...p,
5473
5474
  default: p.default || p.value || a,
5474
5475
  placeholder: p.placeholder || "Enter display name"
@@ -5483,12 +5484,12 @@ const Kl = ({
5483
5484
  placeholder: "Enter display name",
5484
5485
  required: !1
5485
5486
  };
5486
- C.splice(O + 1, 0, b);
5487
+ z.splice(O + 1, 0, b);
5487
5488
  }
5488
5489
  }
5489
5490
  return {
5490
5491
  ...f,
5491
- fields: C
5492
+ fields: z
5492
5493
  };
5493
5494
  }
5494
5495
  return f;
@@ -5501,7 +5502,7 @@ const Kl = ({
5501
5502
  }, g = N.map((f) => ({
5502
5503
  label: f.text,
5503
5504
  href: f.href || "#"
5504
- })), z = K(() => {
5505
+ })), S = K(() => {
5505
5506
  o(!0);
5506
5507
  }, []), A = K((f) => {
5507
5508
  o(!1), f.primary && window.history.back();
@@ -5511,7 +5512,7 @@ const Kl = ({
5511
5512
  window.history.back();
5512
5513
  }, []), P = (() => {
5513
5514
  if (h.headingKey && Array.isArray(r)) {
5514
- const f = h.headingKey.split("."), C = f[0], O = f[1], I = r.find((D) => D && D.key === C);
5515
+ const f = h.headingKey.split("."), z = f[0], O = f[1], I = r.find((D) => D && D.key === z);
5515
5516
  if (I && I.fields) {
5516
5517
  const D = I.fields.find((b) => b && b.key === O);
5517
5518
  if (D)
@@ -5521,8 +5522,8 @@ const Kl = ({
5521
5522
  if (Array.isArray(r)) {
5522
5523
  for (const f of r)
5523
5524
  if (f && f.fields) {
5524
- const C = f.fields.find((O) => O && O.key === "displayname");
5525
- if (C) return C.default ?? C.value ?? a;
5525
+ const z = f.fields.find((O) => O && O.key === "displayname");
5526
+ if (z) return z.default ?? z.value ?? a;
5526
5527
  }
5527
5528
  }
5528
5529
  return h.heading || a;
@@ -5554,8 +5555,8 @@ const Kl = ({
5554
5555
  configuration: v
5555
5556
  }), [v]), q = ae(() => [
5556
5557
  { label: "Overview", content: x(U) },
5557
- { label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: Y, disableApi: s, onSave: F, onShowCancelModal: z, onCancel: R }) }
5558
- ], [a, Y, s, F, z, R, U]);
5558
+ { label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: Y, disableApi: s, onSave: F, onShowCancelModal: S, onCancel: R }) }
5559
+ ], [a, Y, s, F, S, R, U]);
5559
5560
  function $(f) {
5560
5561
  return f ? f.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: f } }) : f : "📱";
5561
5562
  }
@@ -5585,10 +5586,10 @@ const Kl = ({
5585
5586
  ] }),
5586
5587
  /* @__PURE__ */ n("section", { children: [
5587
5588
  /* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
5588
- /* @__PURE__ */ e("ul", { className: "space-y-3", children: f.features.map((C, O) => /* @__PURE__ */ n("li", { children: [
5589
- /* @__PURE__ */ e("span", { className: "font-semibold", children: C.title }),
5589
+ /* @__PURE__ */ e("ul", { className: "space-y-3", children: f.features.map((z, O) => /* @__PURE__ */ n("li", { children: [
5590
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: z.title }),
5590
5591
  /* @__PURE__ */ e("br", {}),
5591
- /* @__PURE__ */ e("span", { className: "text-gray-700", children: C.description })
5592
+ /* @__PURE__ */ e("span", { className: "text-gray-700", children: z.description })
5592
5593
  ] }, O)) })
5593
5594
  ] })
5594
5595
  ] });
@@ -5609,25 +5610,25 @@ const Kl = ({
5609
5610
  /* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
5610
5611
  /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: j.heading }),
5611
5612
  /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: j.subHeading }),
5612
- /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: j.tags && j.tags.map((f, C) => /* @__PURE__ */ e(
5613
+ /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: j.tags && j.tags.map((f, z) => /* @__PURE__ */ e(
5613
5614
  "span",
5614
5615
  {
5615
5616
  className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
5616
5617
  children: f
5617
5618
  },
5618
- C
5619
+ z
5619
5620
  )) })
5620
5621
  ] })
5621
5622
  ] }),
5622
5623
  /* @__PURE__ */ n("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
5623
- /* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: q.map((f, C) => /* @__PURE__ */ e(
5624
+ /* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: q.map((f, z) => /* @__PURE__ */ e(
5624
5625
  "button",
5625
5626
  {
5626
- onClick: () => l(C),
5627
- className: `${i === C ? "border-black text-black" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"} whitespace-nowrap py-3 px-6 border-b-2 font-medium text-sm transition-colors duration-200`,
5627
+ onClick: () => l(z),
5628
+ className: `${i === z ? "border-black text-black" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"} whitespace-nowrap py-3 px-6 border-b-2 font-medium text-sm transition-colors duration-200`,
5628
5629
  children: f.label
5629
5630
  },
5630
- C
5631
+ z
5631
5632
  )) }) }),
5632
5633
  /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: q[i].content })
5633
5634
  ] }),
@@ -5654,7 +5655,7 @@ const Kl = ({
5654
5655
  allowReorder: o = !0,
5655
5656
  initialData: u = null
5656
5657
  }) => {
5657
- const [h, N] = L(null), [y, r] = L(""), [v, d] = L(() => Array.isArray(u) ? u : []), [g, z] = L(null), [A, F] = L(null), [R, P] = L("");
5658
+ const [h, N] = B(null), [y, r] = B(""), [v, d] = B(() => Array.isArray(u) ? u : []), [g, S] = B(null), [A, F] = B(null), [R, P] = B("");
5658
5659
  te(() => {
5659
5660
  Array.isArray(u) && d(u);
5660
5661
  }, [u]);
@@ -5662,65 +5663,65 @@ const Kl = ({
5662
5663
  l && (N(p._id), r(p.categoryName || ""));
5663
5664
  }, U = () => {
5664
5665
  if (!i || h !== null) return;
5665
- const k = (v.length > 0 ? Math.max(...v.map((w) => typeof w._id == "number" ? w._id : 0)) : 0) + 1;
5666
- d((w) => [
5667
- ...w,
5666
+ const w = (v.length > 0 ? Math.max(...v.map((k) => typeof k._id == "number" ? k._id : 0)) : 0) + 1;
5667
+ d((k) => [
5668
+ ...k,
5668
5669
  {
5669
- _id: k,
5670
+ _id: w,
5670
5671
  categoryName: "",
5671
5672
  links: [],
5672
- order: (w.at(-1)?.order ?? 0) + 1,
5673
+ order: (k.at(-1)?.order ?? 0) + 1,
5673
5674
  protected: !1,
5674
5675
  _class: "com.unifyed.model.Collection"
5675
5676
  }
5676
- ]), N(k), r("");
5677
+ ]), N(w), r("");
5677
5678
  }, Y = () => {
5678
5679
  h != null && (d((p) => {
5679
- const w = !Array.isArray(u) || !u.some((T) => T._id === h) ? p.filter((T) => T._id !== h) : p;
5680
- return a?.(w), w;
5680
+ const k = !Array.isArray(u) || !u.some((T) => T._id === h) ? p.filter((T) => T._id !== h) : p;
5681
+ return a?.(k), k;
5681
5682
  }), N(null), r(""));
5682
5683
  }, q = () => {
5683
5684
  h == null || !y.trim() || (d((p) => {
5684
- const k = p.map((w) => w._id === h ? {
5685
- ...w,
5685
+ const w = p.map((k) => k._id === h ? {
5686
+ ...k,
5686
5687
  categoryName: y.trim()
5687
- } : w);
5688
- return a?.(k), k;
5688
+ } : k);
5689
+ return a?.(w), w;
5689
5690
  }), N(null), r(""));
5690
5691
  }, $ = (p) => {
5691
- m && d((k) => {
5692
- const w = k.filter((T) => T._id !== p._id);
5693
- return a?.(w), w;
5692
+ m && d((w) => {
5693
+ const k = w.filter((T) => T._id !== p._id);
5694
+ return a?.(k), k;
5694
5695
  });
5695
- }, x = (p, k, w) => {
5696
- const T = Number(k), M = Number(w);
5697
- if (!o || T === M) return p;
5698
- const S = p.findIndex((G) => Number(G._id) === T), B = p.findIndex((G) => Number(G._id) === M);
5699
- if (S === -1 || B === -1) return p;
5700
- const _ = [...p], [E] = _.splice(S, 1);
5701
- return _.splice(B, 0, E), _.map((G, J) => ({ ...G, order: J + 1 }));
5702
- }, f = (p, k) => {
5703
- o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(k)), z(Number(k)));
5704
- }, C = (p) => {
5696
+ }, x = (p, w, k) => {
5697
+ const T = Number(w), L = Number(k);
5698
+ if (!o || T === L) return p;
5699
+ const C = p.findIndex((G) => Number(G._id) === T), M = p.findIndex((G) => Number(G._id) === L);
5700
+ if (C === -1 || M === -1) return p;
5701
+ const _ = [...p], [E] = _.splice(C, 1);
5702
+ return _.splice(M, 0, E), _.map((G, W) => ({ ...G, order: W + 1 }));
5703
+ }, f = (p, w) => {
5704
+ o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(w)), S(Number(w)));
5705
+ }, z = (p) => {
5705
5706
  g && p !== A && F(p);
5706
5707
  }, O = (p) => {
5707
5708
  p.preventDefault();
5708
- }, I = (p, k) => {
5709
+ }, I = (p, w) => {
5709
5710
  p.preventDefault();
5710
- const w = p.dataTransfer.getData("text/plain"), T = w === "0" ? 0 : Number(w), M = k === "0" ? 0 : Number(k);
5711
- T === void 0 || M === void 0 || (d((S) => {
5712
- const B = x(S, T, M);
5713
- return a?.(B), B;
5714
- }), z(null), F(null));
5711
+ const k = p.dataTransfer.getData("text/plain"), T = k === "0" ? 0 : Number(k), L = w === "0" ? 0 : Number(w);
5712
+ T === void 0 || L === void 0 || (d((C) => {
5713
+ const M = x(C, T, L);
5714
+ return a?.(M), M;
5715
+ }), S(null), F(null));
5715
5716
  }, D = () => {
5716
- z(null), F(null);
5717
+ S(null), F(null);
5717
5718
  }, b = Array.isArray(v) ? v.filter(
5718
5719
  (p) => p.categoryName?.toLowerCase().includes(R.toLowerCase())
5719
5720
  ) : [];
5720
5721
  return /* @__PURE__ */ n("div", { className: `manage-collection-list ${t}`, children: [
5721
5722
  /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
5722
5723
  s && /* @__PURE__ */ e(
5723
- pe,
5724
+ ge,
5724
5725
  {
5725
5726
  value: R,
5726
5727
  onDebouncedChange: P,
@@ -5742,31 +5743,31 @@ const Kl = ({
5742
5743
  )
5743
5744
  ] }) }),
5744
5745
  /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: b.map((p) => {
5745
- const k = h === p._id, w = p?.links?.length ?? 0, T = g === p._id, M = A === p._id && g !== p._id;
5746
+ const w = h === p._id, k = p?.links?.length ?? 0, T = g === p._id, L = A === p._id && g !== p._id;
5746
5747
  return /* @__PURE__ */ e(
5747
5748
  "div",
5748
5749
  {
5749
- onDragEnter: () => C(p._id),
5750
+ onDragEnter: () => z(p._id),
5750
5751
  onDragOver: O,
5751
- onDrop: (S) => I(S, p._id),
5752
+ onDrop: (C) => I(C, p._id),
5752
5753
  onDragEnd: D,
5753
5754
  className: [
5754
5755
  "flex items-center justify-between p-3 border rounded-2xl mb-3",
5755
5756
  "border-gray-300",
5756
- M ? "ring-2 ring-gray-800/20" : "",
5757
+ L ? "ring-2 ring-gray-800/20" : "",
5757
5758
  T ? "opacity-60" : ""
5758
5759
  ].join(" "),
5759
- children: k ? /* @__PURE__ */ n(ee, { children: [
5760
+ children: w ? /* @__PURE__ */ n(ee, { children: [
5760
5761
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
5761
5762
  "input",
5762
5763
  {
5763
5764
  type: "text",
5764
5765
  className: "flex-1 h-10 px-3 max-w-[200px] border border-gray-300 rounded-2xl outline-none focus:ring-2 focus:ring-gray-800/20",
5765
5766
  value: y,
5766
- placeholder: !Array.isArray(u) || !u.some((S) => S._id === p._id) ? "New collection name" : "Edit collection name",
5767
- onChange: (S) => r(S.target.value),
5768
- onKeyDown: (S) => {
5769
- S.key === "Enter" && q(), S.key === "Escape" && Y();
5767
+ placeholder: !Array.isArray(u) || !u.some((C) => C._id === p._id) ? "New collection name" : "Edit collection name",
5768
+ onChange: (C) => r(C.target.value),
5769
+ onKeyDown: (C) => {
5770
+ C.key === "Enter" && q(), C.key === "Escape" && Y();
5770
5771
  },
5771
5772
  autoFocus: !0
5772
5773
  }
@@ -5778,7 +5779,7 @@ const Kl = ({
5778
5779
  className: "cursor-pointer border border-gray-300 p-2 rounded-2xl",
5779
5780
  onClick: Y,
5780
5781
  "aria-label": "Cancel edit",
5781
- children: /* @__PURE__ */ e(xe, { color: "#767676" })
5782
+ children: /* @__PURE__ */ e(ve, { color: "#767676" })
5782
5783
  }
5783
5784
  ),
5784
5785
  /* @__PURE__ */ e(
@@ -5805,14 +5806,14 @@ const Kl = ({
5805
5806
  "aria-label": "Drag to reorder",
5806
5807
  className: "cursor-grab active:cursor-grabbing p-1 -m-1 rounded-md hover:bg-gray-50",
5807
5808
  draggable: !0,
5808
- onDragStart: (S) => f(S, p._id),
5809
+ onDragStart: (C) => f(C, p._id),
5809
5810
  children: /* @__PURE__ */ e(wt, {})
5810
5811
  }
5811
5812
  ),
5812
5813
  /* @__PURE__ */ e("span", { children: p.categoryName })
5813
5814
  ] }),
5814
5815
  /* @__PURE__ */ n("div", { className: "flex gap-2 items-center", children: [
5815
- p.protected ? /* @__PURE__ */ e("span", { className: "text-sm text-gray-600 cursor-default", children: p.qlAppName }) : /* @__PURE__ */ e("span", { className: "text-sm text-blue-600 cursor-default", children: `${w} ${w === 1 ? "link" : "links"}` }),
5816
+ p.protected ? /* @__PURE__ */ e("span", { className: "text-sm text-gray-600 cursor-default", children: p.qlAppName }) : /* @__PURE__ */ e("span", { className: "text-sm text-blue-600 cursor-default", children: `${k} ${k === 1 ? "link" : "links"}` }),
5816
5817
  l && /* @__PURE__ */ e(
5817
5818
  "button",
5818
5819
  {
@@ -5825,10 +5826,10 @@ const Kl = ({
5825
5826
  m && /* @__PURE__ */ e(
5826
5827
  "span",
5827
5828
  {
5828
- className: w === 0 && !p.protected ? "cursor-pointer" : "cursor-not-allowed",
5829
- title: w === 0 && !p.protected ? "Delete" : "Cannot delete a collection with linked items",
5830
- onClick: w === 0 ? () => $(p) : null,
5831
- children: /* @__PURE__ */ e(Le, { color: w === 0 ? "#767676" : "#C2C2C2" })
5829
+ className: k === 0 && !p.protected ? "cursor-pointer" : "cursor-not-allowed",
5830
+ title: k === 0 && !p.protected ? "Delete" : "Cannot delete a collection with linked items",
5831
+ onClick: k === 0 ? () => $(p) : null,
5832
+ children: /* @__PURE__ */ e(Le, { color: k === 0 ? "#767676" : "#C2C2C2" })
5832
5833
  }
5833
5834
  )
5834
5835
  ] })
@@ -5928,34 +5929,37 @@ const Bt = () => {
5928
5929
  showPrint: v = !1,
5929
5930
  showExcel: d = !1,
5930
5931
  showPdf: g = !1,
5931
- showRefresh: z = !1,
5932
+ showRefresh: S = !1,
5932
5933
  showAdd: A = !1,
5934
+ iSelectedRecords: F = 0,
5933
5935
  // Additional props
5934
- searchPlaceholder: F = "Search...",
5935
- handleRefreshClick: R = () => {
5936
+ searchPlaceholder: R = "Search...",
5937
+ handleRefreshClick: P = () => {
5936
5938
  },
5937
- handleSearchChange: P = () => {
5939
+ handleSearchChange: j = () => {
5940
+ },
5941
+ handleDeleteClick: U = () => {
5938
5942
  },
5939
5943
  // Optional: override export file names
5940
- excelFileName: j,
5941
- pdfFileName: U,
5942
- searchIconSize: Y,
5943
- searchIconClass: q,
5944
- inputStyle: $
5944
+ excelFileName: Y,
5945
+ pdfFileName: q,
5946
+ searchIconSize: $,
5947
+ searchIconClass: x,
5948
+ inputStyle: f
5945
5949
  }) => {
5946
- const x = () => l?.current || i?.current, [f, C] = re.useState(""), O = (t || "export").toString().trim() || "export", I = `${j || O}.xlsx`, D = `${U || O}.pdf`, b = (w, T, M) => Math.max(T, Math.min(w, M)), p = K(
5947
- (w) => {
5948
- const T = x();
5949
- if (T?.openColumnChooser) {
5950
- if (typeof window > "u" || !w?.currentTarget) {
5951
- T.openColumnChooser();
5950
+ const z = () => l?.current || i?.current, [O, I] = re.useState(""), D = (t || "export").toString().trim() || "export", b = `${Y || D}.xlsx`, p = `${q || D}.pdf`, w = (L, C, M) => Math.max(C, Math.min(L, M)), k = K(
5951
+ (L) => {
5952
+ const C = z();
5953
+ if (C?.openColumnChooser) {
5954
+ if (typeof window > "u" || !L?.currentTarget) {
5955
+ C.openColumnChooser();
5952
5956
  return;
5953
5957
  }
5954
5958
  try {
5955
- const M = w.currentTarget.getBoundingClientRect(), S = M.left + window.scrollX, B = M.bottom + window.scrollY;
5956
- let _ = S - 120, E = B - 120;
5957
- const G = window.innerWidth, J = window.innerHeight;
5958
- _ = b(_, window.scrollX + 8, window.scrollX + G - 340), E = b(E, window.scrollY, window.scrollY + J - 120), T.openColumnChooser(_, E);
5959
+ const M = L.currentTarget.getBoundingClientRect(), _ = M.left + window.scrollX, E = M.bottom + window.scrollY;
5960
+ let G = _ - 120, W = E - 120;
5961
+ const pe = window.innerWidth, Ne = window.innerHeight;
5962
+ G = w(G, window.scrollX + 8, window.scrollX + pe - 340), W = w(W, window.scrollY, window.scrollY + Ne - 120), C.openColumnChooser(G, W);
5959
5963
  } catch (M) {
5960
5964
  console.log("coloumn choose error", M);
5961
5965
  }
@@ -5963,34 +5967,36 @@ const Bt = () => {
5963
5967
  },
5964
5968
  []
5965
5969
  // no external deps; reads ref at call time
5966
- ), k = K(
5967
- (w, T) => {
5968
- const M = x();
5970
+ ), T = K(
5971
+ (L, C) => {
5972
+ const M = z();
5969
5973
  if (M)
5970
- switch (w) {
5974
+ switch (L) {
5971
5975
  case "Delete": {
5972
- const S = M.getSelectedRecords();
5973
- console.log("delete action is clicked", S), N && M.getSelectedRecords?.();
5976
+ if (N) {
5977
+ const _ = M.getSelectedRecords();
5978
+ return U(_);
5979
+ }
5974
5980
  break;
5975
5981
  }
5976
5982
  case "ColumnChooser":
5977
- y && (T ? p(T) : M.openColumnChooser?.());
5983
+ y && (C ? k(C) : M.openColumnChooser?.());
5978
5984
  break;
5979
5985
  case "Print":
5980
5986
  v && M.print?.();
5981
5987
  break;
5982
5988
  case "Excel":
5983
- d && M.excelExport?.({ fileName: I });
5989
+ d && M.excelExport?.({ fileName: b });
5984
5990
  break;
5985
5991
  case "Pdf":
5986
- g && M.pdfExport?.({ fileName: D });
5992
+ g && M.pdfExport?.({ fileName: p });
5987
5993
  break;
5988
5994
  case "Refresh":
5989
- z && R();
5995
+ S && P();
5990
5996
  break;
5991
5997
  }
5992
5998
  },
5993
- [y, v, d, g, z, I, D, R, p]
5999
+ [y, v, d, g, S, b, p, P, k]
5994
6000
  );
5995
6001
  return /* @__PURE__ */ n("div", { className: "flex items-center flex-wrap justify-between w-full px-4 py-2 bg-white border border-gray-200 rounded-t-2xl mb-0", children: [
5996
6002
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
@@ -6003,38 +6009,40 @@ const Bt = () => {
6003
6009
  ] }),
6004
6010
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
6005
6011
  h && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
6006
- pe,
6012
+ ge,
6007
6013
  {
6008
- placeholder: F,
6009
- value: f,
6010
- onDebouncedChange: (w) => {
6011
- C(w), P(w);
6014
+ placeholder: R,
6015
+ value: O,
6016
+ onDebouncedChange: (L) => {
6017
+ I(L), j(L);
6012
6018
  },
6013
- searchIconSize: Y || 16,
6014
- searchIconClass: q || "",
6015
- inputStyle: $ || { paddingTop: "4px", paddingBottom: "4px" }
6019
+ searchIconSize: $ || 16,
6020
+ searchIconClass: x || "",
6021
+ inputStyle: f || { paddingTop: "4px", paddingBottom: "4px" }
6016
6022
  }
6017
6023
  ) }),
6018
6024
  /* @__PURE__ */ n("div", { className: "flex gap-3", children: [
6019
6025
  /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
6026
+ console.log("iSelectedRecords", F),
6020
6027
  N && /* @__PURE__ */ e(
6021
- ke,
6028
+ Ce,
6022
6029
  {
6023
6030
  icon: Le,
6024
- onClick: () => k("Delete"),
6025
- ariaLabel: "Delete"
6031
+ onClick: () => T("Delete"),
6032
+ ariaLabel: "Delete",
6033
+ disabled: F === 0
6026
6034
  }
6027
6035
  ),
6028
6036
  y && /* @__PURE__ */ e(
6029
- ke,
6037
+ Ce,
6030
6038
  {
6031
6039
  icon: vr,
6032
- onClick: (w) => k("ColumnChooser", w),
6040
+ onClick: (L) => T("ColumnChooser", L),
6033
6041
  ariaLabel: "Column Chooser"
6034
6042
  }
6035
6043
  ),
6036
6044
  r && /* @__PURE__ */ e(
6037
- ke,
6045
+ Ce,
6038
6046
  {
6039
6047
  icon: Nr,
6040
6048
  onClick: o,
@@ -6042,34 +6050,34 @@ const Bt = () => {
6042
6050
  }
6043
6051
  ),
6044
6052
  v && /* @__PURE__ */ e(
6045
- ke,
6053
+ Ce,
6046
6054
  {
6047
6055
  icon: wr,
6048
- onClick: () => k("Print"),
6056
+ onClick: () => T("Print"),
6049
6057
  ariaLabel: "Print"
6050
6058
  }
6051
6059
  ),
6052
6060
  d && /* @__PURE__ */ e(
6053
- ke,
6061
+ Ce,
6054
6062
  {
6055
6063
  icon: kr,
6056
- onClick: () => k("Excel"),
6064
+ onClick: () => T("Excel"),
6057
6065
  ariaLabel: "Excel Download"
6058
6066
  }
6059
6067
  ),
6060
6068
  g && /* @__PURE__ */ e(
6061
- ke,
6069
+ Ce,
6062
6070
  {
6063
6071
  icon: Cr,
6064
- onClick: () => k("Pdf"),
6072
+ onClick: () => T("Pdf"),
6065
6073
  ariaLabel: "PDF Download"
6066
6074
  }
6067
6075
  ),
6068
- z && /* @__PURE__ */ e(
6069
- ke,
6076
+ S && /* @__PURE__ */ e(
6077
+ Ce,
6070
6078
  {
6071
6079
  icon: zr,
6072
- onClick: () => k("Refresh"),
6080
+ onClick: () => T("Refresh"),
6073
6081
  ariaLabel: "Refresh"
6074
6082
  }
6075
6083
  )
@@ -6090,7 +6098,6 @@ const Bt = () => {
6090
6098
  ] });
6091
6099
  };
6092
6100
  function ai(t) {
6093
- console.log("consoling from CustomDataGrid****");
6094
6101
  const {
6095
6102
  data: a = [],
6096
6103
  totalCount: s = 0,
@@ -6107,7 +6114,7 @@ function ai(t) {
6107
6114
  allowExcelExport: v = !1,
6108
6115
  allowPdfExport: d = !1,
6109
6116
  showColumnChooser: g = !1,
6110
- enableSearchApi: z = !1,
6117
+ enableSearchApi: S = !1,
6111
6118
  height: A = "600",
6112
6119
  selectionSettings: F,
6113
6120
  enableCheckbox: R = !1,
@@ -6118,11 +6125,11 @@ function ai(t) {
6118
6125
  onRowDoubleClick: q,
6119
6126
  apiRef: $,
6120
6127
  gridProps: x = {}
6121
- } = t, f = be(null), {
6122
- pageSettings: C,
6128
+ } = t, f = fe(null), {
6129
+ pageSettings: z,
6123
6130
  sortSettings: O,
6124
6131
  ...I
6125
- } = x || {}, [D, b] = re.useState(C?.page || l), [p, k] = re.useState(C?.pageSize || m), [w, T] = re.useState(O?.sortKey || "updatedDate"), [M, S] = re.useState(O?.direction || "Descending"), B = ae(() => {
6132
+ } = x || {}, [D, b] = re.useState(z?.page || l), [p, w] = re.useState(z?.pageSize || m), [k, T] = re.useState(O?.sortKey || "updatedDate"), [L, C] = re.useState(O?.direction || "Descending"), M = ae(() => {
6126
6133
  const V = F || {
6127
6134
  type: "Multiple",
6128
6135
  mode: "Row"
@@ -6138,12 +6145,12 @@ function ai(t) {
6138
6145
  } : V;
6139
6146
  }, [F, R]), _ = ae(() => {
6140
6147
  const V = [ln];
6141
- return (R || F) && V.push(on), u && V.push(cn), h && V.push(dn), N && V.push(mn), z && V.push(un), v && V.push(hn), d && V.push(pn), g && V.push(gn), r && V.push(bn), y && V.push(fn), V.push(yn), V;
6148
+ return (R || F) && V.push(on), u && V.push(cn), h && V.push(dn), N && V.push(mn), S && V.push(un), v && V.push(hn), d && V.push(pn), g && V.push(gn), r && V.push(bn), y && V.push(fn), V.push(yn), V;
6142
6149
  }, [
6143
6150
  u,
6144
6151
  h,
6145
6152
  N,
6146
- z,
6153
+ S,
6147
6154
  v,
6148
6155
  d,
6149
6156
  g,
@@ -6152,35 +6159,35 @@ function ai(t) {
6152
6159
  R,
6153
6160
  F
6154
6161
  ]), E = ae(() => {
6155
- const V = () => f.current, ne = (W, ce) => {
6156
- !ce && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
6162
+ const V = () => f.current, ne = (J, ce) => {
6163
+ !ce && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
6157
6164
  };
6158
6165
  return {
6159
6166
  getInstance: () => V(),
6160
6167
  refresh: () => V()?.refresh?.(),
6161
6168
  getSelectedRecords: () => V()?.getSelectedRecords?.() ?? [],
6162
6169
  clearSelection: () => V()?.clearSelection?.(),
6163
- selectRow: (W, ce = !1) => V()?.selectRow?.(W, ce),
6164
- selectRows: (W, ce = !1) => V()?.selectRows?.(W, ce),
6165
- search: (W) => {
6166
- ne("search()", z), V()?.search?.(W);
6170
+ selectRow: (J, ce = !1) => V()?.selectRow?.(J, ce),
6171
+ selectRows: (J, ce = !1) => V()?.selectRows?.(J, ce),
6172
+ search: (J) => {
6173
+ ne("search()", S), V()?.search?.(J);
6167
6174
  },
6168
6175
  print: () => V()?.print?.(),
6169
- excelExport: (W) => {
6170
- ne("excelExport()", v), V()?.excelExport?.(W);
6176
+ excelExport: (J) => {
6177
+ ne("excelExport()", v), V()?.excelExport?.(J);
6171
6178
  },
6172
- pdfExport: (W) => {
6173
- ne("pdfExport()", d), V()?.pdfExport?.(W);
6179
+ pdfExport: (J) => {
6180
+ ne("pdfExport()", d), V()?.pdfExport?.(J);
6174
6181
  },
6175
- openColumnChooser: (W, ce) => {
6176
- ne("openColumnChooser()", g), V()?.columnChooserModule?.openColumnChooser?.(W, ce);
6182
+ openColumnChooser: (J, ce) => {
6183
+ ne("openColumnChooser()", g), V()?.columnChooserModule?.openColumnChooser?.(J, ce);
6177
6184
  },
6178
6185
  // Additional useful methods
6179
6186
  getColumns: () => V()?.getColumns?.(),
6180
6187
  getFilteredRecords: () => V()?.getFilteredRecords?.(),
6181
- autoFitColumns: (W) => V()?.autoFitColumns?.(W)
6188
+ autoFitColumns: (J) => V()?.autoFitColumns?.(J)
6182
6189
  };
6183
- }, [z, v, d, g]);
6190
+ }, [S, v, d, g]);
6184
6191
  te(() => {
6185
6192
  $ && ($.current = E);
6186
6193
  }, [$, E]), te(() => () => {
@@ -6189,8 +6196,8 @@ function ai(t) {
6189
6196
  const G = (V) => {
6190
6197
  const ne = String(V || "");
6191
6198
  return ne === "Ascending" || ne === "Descending" ? ne : ne.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6192
- }, J = (V) => {
6193
- const ne = f.current, W = V?.requestType, ce = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", Re = V?.pageSize ?? ne?.pageSettings?.pageSize ?? p, _e = V?.currentPage ?? ne?.pageSettings?.currentPage ?? l, rt = V?.columnName && V?.direction ? [{ field: V.columnName, dir: G(V.direction) }] : (ne?.sortSettings?.columns || []).map((Ie) => ({
6199
+ }, W = (V) => {
6200
+ const ne = f.current, J = V?.requestType, ce = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Re = V?.pageSize ?? ne?.pageSettings?.pageSize ?? p, _e = V?.currentPage ?? ne?.pageSettings?.currentPage ?? l, rt = V?.columnName && V?.direction ? [{ field: V.columnName, dir: G(V.direction) }] : (ne?.sortSettings?.columns || []).map((Ie) => ({
6194
6201
  field: Ie.field,
6195
6202
  dir: G(Ie.direction ?? Ie.dir)
6196
6203
  })), nt = V?.searchString ?? "", st = V?.columns ?? ne?.filterSettings?.columns ?? [];
@@ -6207,11 +6214,11 @@ function ai(t) {
6207
6214
  filters: st,
6208
6215
  rawEvent: V
6209
6216
  };
6210
- }, ve = (V) => {
6217
+ }, pe = (V) => {
6211
6218
  setTimeout(() => {
6212
6219
  f?.current?.hideSpinner();
6213
- }, 1e3), V.requestType === "paging" && (b(V.currentPage), k(V.pageSize)), V.requestType === "sorting" && (T(V.columnName || "updatedDate"), S(V.direction)), j?.(J(V), V);
6214
- }, $e = (V) => {
6220
+ }, 1e3), V.requestType === "paging" && (b(V.currentPage), w(V.pageSize)), V.requestType === "sorting" && (T(V.columnName || "updatedDate"), C(V.direction)), j?.(W(V), V);
6221
+ }, Ne = (V) => {
6215
6222
  q?.(V?.rowData, V);
6216
6223
  }, Ta = () => {
6217
6224
  const V = [];
@@ -6228,7 +6235,7 @@ function ai(t) {
6228
6235
  },
6229
6236
  "__checkbox__"
6230
6237
  )
6231
- ), P.forEach((ne, W) => {
6238
+ ), P.forEach((ne, J) => {
6232
6239
  const {
6233
6240
  field: ce,
6234
6241
  headerText: Re,
@@ -6268,7 +6275,7 @@ function ai(t) {
6268
6275
  customAttributes: Ba,
6269
6276
  ...Va
6270
6277
  },
6271
- ce || `col-${W}`
6278
+ ce || `col-${J}`
6272
6279
  )
6273
6280
  );
6274
6281
  }), V;
@@ -6277,12 +6284,12 @@ function ai(t) {
6277
6284
  const Aa = ae(() => ({
6278
6285
  currentPage: D,
6279
6286
  pageSize: p,
6280
- pageSizes: C?.pageSizes ?? [10, 20, 40, 60, 80, 100],
6287
+ pageSizes: z?.pageSizes ?? [10, 20, 40, 60, 80, 100],
6281
6288
  totalCount: s
6282
- }), [D, p, C?.pageSizes, s]), Fa = ae(() => O ?? {
6283
- columns: [{ field: w, direction: G(M) }],
6289
+ }), [D, p, z?.pageSizes, s]), Fa = ae(() => O ?? {
6290
+ columns: [{ field: k, direction: G(L) }],
6284
6291
  allowUnsort: !1
6285
- }, [O, w, M]);
6292
+ }, [O, k, L]);
6286
6293
  return /* @__PURE__ */ n(
6287
6294
  xn,
6288
6295
  {
@@ -6300,13 +6307,13 @@ function ai(t) {
6300
6307
  allowReordering: y,
6301
6308
  allowResizing: r,
6302
6309
  showColumnChooser: g,
6303
- selectionSettings: B,
6310
+ selectionSettings: M,
6304
6311
  pageSettings: Aa,
6305
6312
  sortSettings: Fa,
6306
- actionBegin: ve,
6313
+ actionBegin: pe,
6307
6314
  rowSelected: U,
6308
6315
  rowDeselected: Y,
6309
- recordDoubleClick: $e,
6316
+ recordDoubleClick: Ne,
6310
6317
  cssClass: "custom-grid-padding",
6311
6318
  ...I,
6312
6319
  children: [
@@ -6434,7 +6441,7 @@ function Ts({
6434
6441
  /* @__PURE__ */ e("span", { children: N })
6435
6442
  ] }),
6436
6443
  /* @__PURE__ */ n("div", { className: "mt-2 flex items-center gap-3", children: [
6437
- /* @__PURE__ */ e(Ne, { name: "John", size: "medium" }),
6444
+ /* @__PURE__ */ e(we, { name: "John", size: "medium" }),
6438
6445
  /* @__PURE__ */ n("div", { className: "leading-tight", children: [
6439
6446
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100", children: h }),
6440
6447
  /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${g.meta}`, children: N })
@@ -6576,9 +6583,9 @@ function Is({
6576
6583
  ] }),
6577
6584
  /* @__PURE__ */ n("div", { className: "flex gap-1 justify-center items-center", children: [
6578
6585
  /* @__PURE__ */ n(zn, { children: [
6579
- /* @__PURE__ */ e(Ne, { size: "small", src: d.avatar, name: "John" }),
6580
- /* @__PURE__ */ e(Ne, { size: "small", src: d.avatar, name: "Omi" }),
6581
- /* @__PURE__ */ e(Ne, { size: "small", src: d.avatar, name: "Raj" })
6586
+ /* @__PURE__ */ e(we, { size: "small", src: d.avatar, name: "John" }),
6587
+ /* @__PURE__ */ e(we, { size: "small", src: d.avatar, name: "Omi" }),
6588
+ /* @__PURE__ */ e(we, { size: "small", src: d.avatar, name: "Raj" })
6582
6589
  ] }),
6583
6590
  /* @__PURE__ */ n("span", { className: "ml-2 text-slate-400", children: [
6584
6591
  "+ ",
@@ -6828,18 +6835,18 @@ function _s({
6828
6835
  // optional full embed URL override
6829
6836
  ...v
6830
6837
  }) {
6831
- const d = de(t), g = me[d], z = Bs[d], A = r || js(N, y);
6838
+ const d = de(t), g = me[d], S = Bs[d], A = r || js(N, y);
6832
6839
  return /* @__PURE__ */ e(
6833
6840
  oe,
6834
6841
  {
6835
- className: `flex flex-col ${g.card} ${z.wrap}`,
6842
+ className: `flex flex-col ${g.card} ${S.wrap}`,
6836
6843
  showCheckbox: a,
6837
6844
  checkboxPosition: s,
6838
6845
  onSelect: i,
6839
6846
  identity: l,
6840
6847
  details: { type: "campus-map", title: m, campusName: o, activeFilter: h, mapQuery: N, zoom: y },
6841
6848
  ...v,
6842
- children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${z.mapH}`, children: [
6849
+ children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${S.mapH}`, children: [
6843
6850
  /* @__PURE__ */ e(
6844
6851
  "iframe",
6845
6852
  {
@@ -6853,7 +6860,7 @@ function _s({
6853
6860
  }
6854
6861
  ),
6855
6862
  /* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
6856
- /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${z.campusPill}`, children: [
6863
+ /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${S.campusPill}`, children: [
6857
6864
  /* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: o }),
6858
6865
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
6859
6866
  ] }),
@@ -6862,8 +6869,8 @@ function _s({
6862
6869
  /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
6863
6870
  ] })
6864
6871
  ] }),
6865
- /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${z.chipGap} overflow-x-auto scrollbar-none`, children: u.map((F) => /* @__PURE__ */ e(Vs, { label: F, active: F === h, size: d }, F)) }) }),
6866
- /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${z.searchH}`, children: [
6872
+ /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${S.chipGap} overflow-x-auto scrollbar-none`, children: u.map((F) => /* @__PURE__ */ e(Vs, { label: F, active: F === h, size: d }, F)) }) }),
6873
+ /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${S.searchH}`, children: [
6867
6874
  /* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", "aria-hidden": "true", className: "opacity-60", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M15.5 14h-.79l-.28-.27a6.471 6.471 0 001.48-4.23C15.91 6.01 13.4 3.5 10.45 3.5S5 6.01 5 9.5 7.5 15.5 10.45 15.5c1.61 0 3.09-.59 4.23-1.48l.27.28v.79l4.25 4.25c.41.41 1.07.41 1.48 0s.41-1.07 0-1.48L15.5 14Zm-5.05 0C8.01 14 6 11.99 6 9.5S8.01 5 10.45 5s4.45 2.01 4.45 4.5-2.01 4.5-4.45 4.5Z" }) }),
6868
6875
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
6869
6876
  ] }) })
@@ -7034,7 +7041,7 @@ function Ws({
7034
7041
  selectedIndex: u = 0,
7035
7042
  ...h
7036
7043
  }) {
7037
- const [N, y] = L(u), r = de(t), v = me[r], d = Gs[r], g = o[N] || o[0], z = (F, R) => {
7044
+ const [N, y] = B(u), r = de(t), v = me[r], d = Gs[r], g = o[N] || o[0], S = (F, R) => {
7038
7045
  y(R), i?.(F);
7039
7046
  }, A = r === "lg";
7040
7047
  return /* @__PURE__ */ n(
@@ -7061,7 +7068,7 @@ function Ws({
7061
7068
  ev: F,
7062
7069
  sizeMeta: d,
7063
7070
  isSelected: R === N,
7064
- onClick: (P) => z(P, R)
7071
+ onClick: (P) => S(P, R)
7065
7072
  },
7066
7073
  F._id || F.id || R
7067
7074
  )) }),
@@ -7075,7 +7082,7 @@ function Ws({
7075
7082
  ev: F,
7076
7083
  sizeMeta: d,
7077
7084
  isSelected: R === N,
7078
- onClick: (P) => z(P, R)
7085
+ onClick: (P) => S(P, R)
7079
7086
  },
7080
7087
  F._id || F.id || R
7081
7088
  )) })
@@ -7222,7 +7229,7 @@ function Hs({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
7222
7229
  /* @__PURE__ */ n("div", { className: "flex-grow min-w-0 space-y-1", children: [
7223
7230
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
7224
7231
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
7225
- /* @__PURE__ */ e(Ne, { name: t.sender, size: "small" }),
7232
+ /* @__PURE__ */ e(we, { name: t.sender, size: "small" }),
7226
7233
  /* @__PURE__ */ e("span", { className: `${a.sender} text-zinc-900 dark:text-zinc-100 ${t.unread ? "font-bold" : ""}`, children: t.sender })
7227
7234
  ] }),
7228
7235
  /* @__PURE__ */ n("div", { className: `flex items-center gap-1 ${a.time} text-zinc-500 dark:text-zinc-400`, children: [
@@ -7251,7 +7258,7 @@ function Qs({
7251
7258
  onPin: N,
7252
7259
  ...y
7253
7260
  }) {
7254
- const [r, v] = L(u), d = de(t), g = me[d], z = Xs[d], A = (P, j) => {
7261
+ const [r, v] = B(u), d = de(t), g = me[d], S = Xs[d], A = (P, j) => {
7255
7262
  v(j), i?.(P);
7256
7263
  }, F = (P) => {
7257
7264
  const j = { ...P, starred: !P.starred };
@@ -7263,7 +7270,7 @@ function Qs({
7263
7270
  return /* @__PURE__ */ n(
7264
7271
  oe,
7265
7272
  {
7266
- className: `flex flex-col ${g.card} ${z.wrap}`,
7273
+ className: `flex flex-col ${g.card} ${S.wrap}`,
7267
7274
  showCheckbox: a,
7268
7275
  checkboxPosition: s,
7269
7276
  onSelect: i,
@@ -7272,12 +7279,12 @@ function Qs({
7272
7279
  ...y,
7273
7280
  children: [
7274
7281
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${g.title}`, children: m }) }),
7275
- /* @__PURE__ */ e(pe, { placeholder: "Type to search..." }),
7282
+ /* @__PURE__ */ e(ge, { placeholder: "Type to search..." }),
7276
7283
  /* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((P, j) => /* @__PURE__ */ e(
7277
7284
  Hs,
7278
7285
  {
7279
7286
  email: P,
7280
- sizeMeta: z,
7287
+ sizeMeta: S,
7281
7288
  isSelected: j === r,
7282
7289
  onClick: (U) => A(U, j),
7283
7290
  onStar: F,
@@ -7420,7 +7427,7 @@ function Ut({ contact: t, sizeMeta: a, isSelected: s, onClick: i }) {
7420
7427
  /* @__PURE__ */ e("div", { className: `${a.department} text-zinc-500 dark:text-zinc-500 line-clamp-1`, children: t.department })
7421
7428
  ] })
7422
7429
  ] }),
7423
- /* @__PURE__ */ e(ye, { className: "h-4 w-4 text-zinc-400 group-hover:text-blue-500 transition-colors duration-200" })
7430
+ /* @__PURE__ */ e(xe, { className: "h-4 w-4 text-zinc-400 group-hover:text-blue-500 transition-colors duration-200" })
7424
7431
  ]
7425
7432
  }
7426
7433
  );
@@ -7503,9 +7510,9 @@ function al({
7503
7510
  selectedIndex: u = 0,
7504
7511
  ...h
7505
7512
  }) {
7506
- const [N, y] = L(u), r = de(t), v = me[r], d = Ks[r], g = (F, R) => {
7513
+ const [N, y] = B(u), r = de(t), v = me[r], d = Ks[r], g = (F, R) => {
7507
7514
  y(R), i?.(F);
7508
- }, z = o[N] || o[0], A = d.layout === "split";
7515
+ }, S = o[N] || o[0], A = d.layout === "split";
7509
7516
  return /* @__PURE__ */ n(
7510
7517
  oe,
7511
7518
  {
@@ -7533,7 +7540,7 @@ function al({
7533
7540
  /* @__PURE__ */ e(
7534
7541
  el,
7535
7542
  {
7536
- contact: z,
7543
+ contact: S,
7537
7544
  sizeMeta: d
7538
7545
  }
7539
7546
  )
@@ -7700,16 +7707,16 @@ function sl({
7700
7707
  /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: Te(N) })
7701
7708
  ] })
7702
7709
  ] }),
7703
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((z, A) => /* @__PURE__ */ e(
7710
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((S, A) => /* @__PURE__ */ e(
7704
7711
  rl,
7705
7712
  {
7706
7713
  side: A === 0 ? "left" : "right",
7707
- date: z.date,
7708
- title: z.title,
7709
- amount: z.amount,
7710
- kind: z.kind
7714
+ date: S.date,
7715
+ title: S.title,
7716
+ amount: S.amount,
7717
+ kind: S.kind
7711
7718
  },
7712
- z.id || A
7719
+ S.id || A
7713
7720
  )) })
7714
7721
  ] })
7715
7722
  ] }),
@@ -7828,7 +7835,7 @@ function il({
7828
7835
  term: o = "Fall 2025",
7829
7836
  ...u
7830
7837
  }) {
7831
- const [h, N] = L("vacation"), [y, r] = L(!1), v = de(t), d = me[v], g = ll[v], z = Ye.find((A) => A.id === h) || Ye[0];
7838
+ const [h, N] = B("vacation"), [y, r] = B(!1), v = de(t), d = me[v], g = ll[v], S = Ye.find((A) => A.id === h) || Ye[0];
7832
7839
  return /* @__PURE__ */ n(
7833
7840
  oe,
7834
7841
  {
@@ -7878,14 +7885,14 @@ function il({
7878
7885
  Ye.map((A) => /* @__PURE__ */ e(Gt, { leave: A, sizeMeta: g }, A.id))
7879
7886
  ) : g.showSingleLeave ? (
7880
7887
  // MD: Show active tab leave type
7881
- /* @__PURE__ */ e(Gt, { leave: z, sizeMeta: g })
7888
+ /* @__PURE__ */ e(Gt, { leave: S, sizeMeta: g })
7882
7889
  ) : (
7883
7890
  // SM: Show only available hours
7884
7891
  /* @__PURE__ */ e("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-4", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3 mb-3", children: [
7885
7892
  /* @__PURE__ */ e(Ae, { className: "h-5 w-5 text-blue-600 dark:text-blue-400" }),
7886
7893
  /* @__PURE__ */ n("div", { children: [
7887
7894
  /* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${g.table}`, children: "Available Leave" }),
7888
- /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${g.table}`, children: z.available })
7895
+ /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${g.table}`, children: S.available })
7889
7896
  ] })
7890
7897
  ] }) })
7891
7898
  ) }),
@@ -8006,7 +8013,7 @@ function qt({ item: t, sizeMeta: a, showDate: s = !1 }) {
8006
8013
  /* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 truncate ${a.item}`, children: t.name }),
8007
8014
  s ? /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${a.count}`, children: t.date }) : /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${a.count}`, children: t.count })
8008
8015
  ] }),
8009
- /* @__PURE__ */ e(ye, { className: "h-4 w-4 text-zinc-400 group-hover:text-zinc-600 dark:group-hover:text-zinc-300 transition-colors duration-200" })
8016
+ /* @__PURE__ */ e(xe, { className: "h-4 w-4 text-zinc-400 group-hover:text-zinc-600 dark:group-hover:text-zinc-300 transition-colors duration-200" })
8010
8017
  ] });
8011
8018
  }
8012
8019
  function ml({
@@ -8019,7 +8026,7 @@ function ml({
8019
8026
  subtitle: o = "Drive Shared",
8020
8027
  ...u
8021
8028
  }) {
8022
- const [h, N] = L(!1), y = de(t), r = me[y], v = dl[y];
8029
+ const [h, N] = B(!1), y = de(t), r = me[y], v = dl[y];
8023
8030
  return /* @__PURE__ */ n(
8024
8031
  oe,
8025
8032
  {
@@ -8079,7 +8086,7 @@ function ml({
8079
8086
  ] }),
8080
8087
  /* @__PURE__ */ n("button", { className: "w-full py-3 px-4 border border-zinc-300 dark:border-zinc-600 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 font-medium rounded-lg transition-colors duration-200 flex items-center justify-center gap-2", children: [
8081
8088
  "View All",
8082
- /* @__PURE__ */ e(ye, { className: "h-4 w-4" })
8089
+ /* @__PURE__ */ e(xe, { className: "h-4 w-4" })
8083
8090
  ] })
8084
8091
  ]
8085
8092
  }
@@ -8211,13 +8218,13 @@ const ul = [
8211
8218
  }
8212
8219
  };
8213
8220
  function gl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8214
- const [l, m] = L(!1), o = $a(t.type), u = pl(t.type);
8221
+ const [l, m] = B(!1), o = $a(t.type), u = pl(t.type);
8215
8222
  return l ? null : /* @__PURE__ */ n("div", { className: `relative rounded-lg border-l-4 p-4 transition-all duration-200 ${o.bg} ${o.border} ${t.read ? "border-l-2 opacity-80" : "border-l-4"}`, style: { borderLeftColor: o.accent }, children: [
8216
8223
  /* @__PURE__ */ e(
8217
8224
  "button",
8218
8225
  {
8219
8226
  className: "absolute top-3 right-3 p-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors duration-200",
8220
- children: /* @__PURE__ */ e(xe, { className: "h-3 w-3 text-zinc-500 dark:text-zinc-400" })
8227
+ children: /* @__PURE__ */ e(ve, { className: "h-3 w-3 text-zinc-500 dark:text-zinc-400" })
8221
8228
  }
8222
8229
  ),
8223
8230
  /* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
@@ -8235,7 +8242,7 @@ function gl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8235
8242
  ] });
8236
8243
  }
8237
8244
  function bl({ alert: t, onDismiss: a }) {
8238
- const [s, i] = L(!1), l = $a("banner"), m = () => {
8245
+ const [s, i] = B(!1), l = $a("banner"), m = () => {
8239
8246
  i(!0), a?.(t);
8240
8247
  };
8241
8248
  return s ? null : /* @__PURE__ */ e("div", { className: `rounded-lg border p-4 ${l.bg} ${l.border} relative`, children: /* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
@@ -8249,7 +8256,7 @@ function bl({ alert: t, onDismiss: a }) {
8249
8256
  {
8250
8257
  onClick: m,
8251
8258
  className: "flex-shrink-0 p-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors duration-200",
8252
- children: /* @__PURE__ */ e(xe, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400" })
8259
+ children: /* @__PURE__ */ e(ve, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400" })
8253
8260
  }
8254
8261
  )
8255
8262
  ] }) });
@@ -8265,9 +8272,9 @@ function fl({
8265
8272
  showBanner: u = !0,
8266
8273
  ...h
8267
8274
  }) {
8268
- const [N, y] = L(o), r = de(t), v = me[r], d = hl[r], g = (F) => {
8275
+ const [N, y] = B(o), r = de(t), v = me[r], d = hl[r], g = (F) => {
8269
8276
  y((R) => R.filter((P) => P.id !== F.id));
8270
- }, z = N.find((F) => F.type === "banner"), A = N.filter((F) => F.type !== "banner");
8277
+ }, S = N.find((F) => F.type === "banner"), A = N.filter((F) => F.type !== "banner");
8271
8278
  return /* @__PURE__ */ n(
8272
8279
  oe,
8273
8280
  {
@@ -8280,10 +8287,10 @@ function fl({
8280
8287
  ...h,
8281
8288
  children: [
8282
8289
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }) }),
8283
- u && z && t !== "sm" && /* @__PURE__ */ e(
8290
+ u && S && t !== "sm" && /* @__PURE__ */ e(
8284
8291
  bl,
8285
8292
  {
8286
- alert: z,
8293
+ alert: S,
8287
8294
  onDismiss: g
8288
8295
  }
8289
8296
  ),
@@ -8399,7 +8406,7 @@ const yl = [
8399
8406
  }
8400
8407
  };
8401
8408
  function vl({ video: t, sizeMeta: a }) {
8402
- const [s, i] = L(!1);
8409
+ const [s, i] = B(!1);
8403
8410
  return /* @__PURE__ */ n("div", { className: "group cursor-pointer", children: [
8404
8411
  /* @__PURE__ */ n("div", { className: `relative ${a.thumbnailHeight} rounded-lg overflow-hidden bg-zinc-200 dark:bg-zinc-800`, children: [
8405
8412
  /* @__PURE__ */ e(
@@ -8441,7 +8448,7 @@ function Nl({
8441
8448
  videos: o = yl,
8442
8449
  ...u
8443
8450
  }) {
8444
- const [h, N] = L(!1), y = de(t), r = me[y], v = xl[y];
8451
+ const [h, N] = B(!1), y = de(t), r = me[y], v = xl[y];
8445
8452
  return /* @__PURE__ */ n(
8446
8453
  oe,
8447
8454
  {
@@ -8463,7 +8470,7 @@ function Nl({
8463
8470
  onClick: () => N(!h),
8464
8471
  children: [
8465
8472
  "Filter",
8466
- /* @__PURE__ */ e(ye, { className: "h-4 w-4 transform rotate-90" })
8473
+ /* @__PURE__ */ e(xe, { className: "h-4 w-4 transform rotate-90" })
8467
8474
  ]
8468
8475
  }
8469
8476
  ),
@@ -8485,7 +8492,7 @@ function Nl({
8485
8492
  )) }),
8486
8493
  /* @__PURE__ */ n("button", { className: "w-full py-3 px-4 border border-zinc-300 dark:border-zinc-600 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 font-medium rounded-lg transition-colors duration-200 flex items-center justify-center gap-2", children: [
8487
8494
  "View All",
8488
- /* @__PURE__ */ e(ye, { className: "h-4 w-4" })
8495
+ /* @__PURE__ */ e(xe, { className: "h-4 w-4" })
8489
8496
  ] })
8490
8497
  ]
8491
8498
  }
@@ -8514,7 +8521,7 @@ export {
8514
8521
  Ts as ActivityMock,
8515
8522
  cs as AddUserGroupsRolesModal,
8516
8523
  fl as AlertsMock,
8517
- Ne as Avatar,
8524
+ we as Avatar,
8518
8525
  zn as AvatarGroup,
8519
8526
  Rl as Badge,
8520
8527
  Tn as Breadcrumbs,
@@ -8536,7 +8543,7 @@ export {
8536
8543
  Kl as FullConfigPage,
8537
8544
  Ll as FullScreenLoader,
8538
8545
  Ol as GenericFilter,
8539
- ke as IconButton,
8546
+ Ce as IconButton,
8540
8547
  X as Input,
8541
8548
  il as LeaveBalanceMock,
8542
8549
  Ds as ManageCollectionList,
@@ -8549,7 +8556,7 @@ export {
8549
8556
  jl as PageLayout,
8550
8557
  Pl as Pagination,
8551
8558
  pa as RadioGroup,
8552
- pe as SearchBar,
8559
+ ge as SearchBar,
8553
8560
  ft as Select,
8554
8561
  oe as SelectableCard,
8555
8562
  Ml as Sidebar,
@@ -8573,7 +8580,7 @@ export {
8573
8580
  Xn as directoryPermissionsApi,
8574
8581
  Hn as filePermissionsApi,
8575
8582
  Jn as gateWayUrl,
8576
- De as gatewayBase,
8583
+ $e as gatewayBase,
8577
8584
  kt as getBaseUrl,
8578
8585
  Gl as getSnapshot,
8579
8586
  Jl as http,