unifyedx-storybook-new 0.2.70 → 0.2.72

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,8 +1,8 @@
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";
@@ -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);
@@ -2006,7 +2006,7 @@ const Dn = {
2006
2006
  }) => {
2007
2007
  const y = s[i], r = Object.keys(s), v = r.indexOf(i), d = (v + 1) / r.length * 100, g = v > 0 && m.onBack;
2008
2008
  return /* @__PURE__ */ e(he, { show: t, as: Q, children: /* @__PURE__ */ n(
2009
- fe,
2009
+ ye,
2010
2010
  {
2011
2011
  as: "div",
2012
2012
  className: "wizard-dialog",
@@ -2014,7 +2014,7 @@ const Dn = {
2014
2014
  },
2015
2015
  children: [
2016
2016
  /* @__PURE__ */ e(
2017
- we,
2017
+ ke,
2018
2018
  {
2019
2019
  as: Q,
2020
2020
  enter: "ease-out duration-300",
@@ -2027,7 +2027,7 @@ const Dn = {
2027
2027
  }
2028
2028
  ),
2029
2029
  /* @__PURE__ */ e("div", { className: "wizard-container", children: /* @__PURE__ */ e("div", { className: "wizard-positioner", children: /* @__PURE__ */ e(
2030
- we,
2030
+ ke,
2031
2031
  {
2032
2032
  as: Q,
2033
2033
  enter: "transform transition ease-in-out duration-500",
@@ -2049,8 +2049,8 @@ const Dn = {
2049
2049
  }
2050
2050
  ),
2051
2051
  /* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
2052
- /* @__PURE__ */ e(fe.Title, { as: "h3", className: "wizard-title", children: o }),
2053
- 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 })
2054
2054
  ] })
2055
2055
  ] }),
2056
2056
  /* @__PURE__ */ e(
@@ -2059,7 +2059,7 @@ const Dn = {
2059
2059
  onClick: a,
2060
2060
  className: "wizard-close-button",
2061
2061
  "aria-label": "Close modal",
2062
- children: /* @__PURE__ */ e(xe, { size: 24 })
2062
+ children: /* @__PURE__ */ e(ve, { size: 24 })
2063
2063
  }
2064
2064
  )
2065
2065
  ] }),
@@ -2071,7 +2071,7 @@ const Dn = {
2071
2071
  }
2072
2072
  ) }),
2073
2073
  /* @__PURE__ */ e("div", { className: "wizard-body", children: /* @__PURE__ */ e(
2074
- ze,
2074
+ Se,
2075
2075
  {
2076
2076
  initial: !1,
2077
2077
  custom: l,
@@ -2110,7 +2110,7 @@ const Dn = {
2110
2110
  }, _n = {
2111
2111
  primary: "btn-primary",
2112
2112
  secondary: "btn-secondary-icon"
2113
- }, ke = ({
2113
+ }, Ce = ({
2114
2114
  dataTestId: t,
2115
2115
  title: a,
2116
2116
  type: s = "button",
@@ -2359,17 +2359,17 @@ function Jn() {
2359
2359
  return "";
2360
2360
  }
2361
2361
  }
2362
- function De() {
2362
+ function $e() {
2363
2363
  return `${kt()}${Jn()}`;
2364
2364
  }
2365
2365
  function Na() {
2366
- 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`;
2367
2367
  }
2368
2368
  function wa() {
2369
- 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`;
2370
2370
  }
2371
2371
  function ka() {
2372
- return `${De()}/unifyedusergroupprovisioning/api`;
2372
+ return `${$e()}/unifyedusergroupprovisioning/api`;
2373
2373
  }
2374
2374
  function Ca() {
2375
2375
  return `${ka()}/v2/roles`;
@@ -2378,7 +2378,7 @@ function za() {
2378
2378
  return `${Ca()}/search`;
2379
2379
  }
2380
2380
  function Ct() {
2381
- return `${De()}/unifyed-mydrive/v2`;
2381
+ return `${$e()}/unifyed-mydrive/v2`;
2382
2382
  }
2383
2383
  function Xn() {
2384
2384
  return `${Ct()}/directory/permissions`;
@@ -2389,7 +2389,7 @@ function Hn() {
2389
2389
  function Gl() {
2390
2390
  return Object.freeze({
2391
2391
  REACT_APP_BASE_URL: kt(),
2392
- GATEWAY_BASE: De(),
2392
+ GATEWAY_BASE: $e(),
2393
2393
  USER_SEARCH_BASE: Na(),
2394
2394
  AD_GROUPS_LIST_SEARCH_API: wa(),
2395
2395
  PROVISIONING_BASE: ka(),
@@ -2508,15 +2508,15 @@ function Kn({
2508
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) => {
2509
2509
  try {
2510
2510
  switch (t) {
2511
- case Se.USER: {
2511
+ case De.USER: {
2512
2512
  const s = {
2513
2513
  q: a
2514
2514
  };
2515
2515
  return Je.userSearch(s);
2516
2516
  }
2517
- case Se.GROUP:
2517
+ case De.GROUP:
2518
2518
  return Je.getAdGroups(a);
2519
- case Se.ROLE:
2519
+ case De.ROLE:
2520
2520
  return Je.searchRoles(a);
2521
2521
  default:
2522
2522
  break;
@@ -2578,7 +2578,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2578
2578
  }));
2579
2579
  },
2580
2580
  getMembersForGroup: async (t) => {
2581
- 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);
2582
2582
  let i = [];
2583
2583
  if (Array.isArray(s))
2584
2584
  i = s;
@@ -2591,7 +2591,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2591
2591
  return ts(i);
2592
2592
  }
2593
2593
  }, zt = (t, a) => {
2594
- const [s, i] = L(t);
2594
+ const [s, i] = B(t);
2595
2595
  return te(
2596
2596
  () => {
2597
2597
  const l = rn(() => {
@@ -2639,14 +2639,14 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2639
2639
  )) }),
2640
2640
  /* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: h })
2641
2641
  ] }),
2642
- /* @__PURE__ */ e(ye, { size: 20 })
2642
+ /* @__PURE__ */ e(xe, { size: 20 })
2643
2643
  ]
2644
2644
  }
2645
2645
  );
2646
2646
  }, Mt = [
2647
- { id: 1, name: Se.USER, icon: ar, code: "users" },
2648
- { id: 2, name: Se.GROUP, icon: Kt, code: "groups" },
2649
- { 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" }
2650
2650
  ], Lt = [
2651
2651
  { id: 1, name: Tt.View, icon: ea },
2652
2652
  { id: 2, name: Tt.Manage, icon: ta }
@@ -2663,7 +2663,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2663
2663
  },
2664
2664
  isChanged: u = !1
2665
2665
  }) => {
2666
- 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]), {
2667
2667
  control: U,
2668
2668
  handleSubmit: Y,
2669
2669
  watch: q,
@@ -2671,44 +2671,44 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2671
2671
  } = nr({
2672
2672
  defaultValues: { pendingInvites: [] },
2673
2673
  resolver: ir(rs)
2674
- }), { fields: f, append: C, remove: O, update: I } = sr({
2674
+ }), { fields: f, append: z, remove: O, update: I } = sr({
2675
2675
  control: U,
2676
2676
  name: "pendingInvites"
2677
2677
  }), D = q("pendingInvites");
2678
2678
  te(() => {
2679
- v.length > 1 ? (R(!0), es(h.name, v).then((S) => {
2680
- g(S);
2681
- }).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()));
2682
2682
  }, [v, h]);
2683
- const b = (S) => {
2684
- A((B) => {
2685
- const _ = new Set(B);
2686
- 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), _;
2687
2687
  });
2688
2688
  }, p = () => {
2689
- d.filter((S) => z.has(S.id)).forEach((S) => {
2690
- 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 });
2691
2691
  }), A(/* @__PURE__ */ new Set()), r("");
2692
- }, k = (S) => {
2693
- j(S), f.forEach(
2694
- (B, _) => I(_, { ...f[_], permission: S.name })
2692
+ }, w = (C) => {
2693
+ j(C), f.forEach(
2694
+ (M, _) => I(_, { ...f[_], permission: C.name })
2695
2695
  );
2696
- }, w = async (S) => {
2696
+ }, k = async (C) => {
2697
2697
  try {
2698
2698
  if (l === ue.DRIVE) {
2699
- const B = S.pendingInvites.map((E) => ({
2699
+ const M = C.pendingInvites.map((E) => ({
2700
2700
  id: E.id,
2701
2701
  permission: E.permission,
2702
2702
  type: E.type.toLowerCase()
2703
2703
  }));
2704
2704
  o({
2705
2705
  entity: t,
2706
- userGroupRolesObj: B,
2706
+ userGroupRolesObj: M,
2707
2707
  existingShares: i
2708
2708
  // Always send updated existing shares
2709
2709
  }, i);
2710
2710
  } else if (l === ue.INTEREST) {
2711
- const B = S.pendingInvites.map((_) => ({
2711
+ const M = C.pendingInvites.map((_) => ({
2712
2712
  identity: _.id,
2713
2713
  type: _.type.toLowerCase(),
2714
2714
  opt: !0,
@@ -2717,30 +2717,30 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2717
2717
  userName: _.name,
2718
2718
  interestId: t?.data?.id
2719
2719
  }));
2720
- o(B, i);
2720
+ o(M, i);
2721
2721
  } else if (l === ue.ARTICLE) {
2722
- const B = S.pendingInvites.map((E) => ({
2722
+ const M = C.pendingInvites.map((E) => ({
2723
2723
  id: E.id,
2724
2724
  permission: E.permission,
2725
2725
  type: E.type.toLowerCase()
2726
2726
  }));
2727
2727
  o({
2728
2728
  entity: t,
2729
- userGroupRolesObj: B,
2729
+ userGroupRolesObj: M,
2730
2730
  existingShares: i
2731
2731
  }, i);
2732
2732
  } else
2733
- o(S, i);
2733
+ o(C, i);
2734
2734
  setTimeout(() => {
2735
2735
  s();
2736
2736
  }, 1e3);
2737
- } catch (B) {
2738
- throw console.error("Failed to submit invites:", B), B;
2737
+ } catch (M) {
2738
+ throw console.error("Failed to submit invites:", M), M;
2739
2739
  }
2740
- }, T = (S) => {
2741
- const B = i[h.code].find((_) => _.name === S.name && _.permission !== "remove") || D.find((_) => _.name === S.name);
2742
- return B ? `${B.permission}` : "";
2743
- }, 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 = () => {
2744
2744
  switch (l) {
2745
2745
  case ue.DRIVE:
2746
2746
  return "Share with others";
@@ -2754,7 +2754,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2754
2754
  };
2755
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: [
2756
2756
  /* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
2757
- /* @__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() }),
2758
2758
  /* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
2759
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: [
2760
2760
  /* @__PURE__ */ e(lr, { className: "h-5 w-5" }),
@@ -2774,9 +2774,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2774
2774
  (l === ue.DRIVE || m) && /* @__PURE__ */ e(
2775
2775
  as,
2776
2776
  {
2777
- users: i.users.filter((S) => S.permission !== "remove"),
2778
- groups: i.groups.filter((S) => S.permission !== "remove"),
2779
- 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"),
2780
2780
  onClick: a
2781
2781
  }
2782
2782
  ),
@@ -2796,44 +2796,44 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2796
2796
  leave: "transition ease-in duration-100",
2797
2797
  leaveFrom: "opacity-100",
2798
2798
  leaveTo: "opacity-0",
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((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(
2800
2800
  Z.Option,
2801
2801
  {
2802
- value: S,
2803
- className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2804
- 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: [
2805
2805
  /* @__PURE__ */ n(
2806
2806
  "span",
2807
2807
  {
2808
- className: `${B ? "font-medium" : "font-normal"} flex items-center`,
2808
+ className: `${M ? "font-medium" : "font-normal"} flex items-center`,
2809
2809
  children: [
2810
2810
  /* @__PURE__ */ e(
2811
- S.icon,
2811
+ C.icon,
2812
2812
  {
2813
- 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"}`
2814
2814
  }
2815
2815
  ),
2816
- S.name
2816
+ C.name
2817
2817
  ]
2818
2818
  }
2819
2819
  ),
2820
- 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" }) })
2821
2821
  ] })
2822
2822
  },
2823
- S.id
2823
+ C.id
2824
2824
  )) })
2825
2825
  }
2826
2826
  )
2827
2827
  ] }) }) }),
2828
2828
  /* @__PURE__ */ e("div", { className: "col-span-2", children: /* @__PURE__ */ e(
2829
- pe,
2829
+ ge,
2830
2830
  {
2831
2831
  placeholder: `Search by ${h.name.toLowerCase()}...`,
2832
- onDebouncedChange: (S) => r(S),
2832
+ onDebouncedChange: (C) => r(C),
2833
2833
  value: y
2834
2834
  }
2835
2835
  ) }),
2836
- /* @__PURE__ */ e(ze, { children: (d?.length > 0 || F) && /* @__PURE__ */ e(
2836
+ /* @__PURE__ */ e(Se, { children: (d?.length > 0 || F) && /* @__PURE__ */ e(
2837
2837
  ie.div,
2838
2838
  {
2839
2839
  initial: { opacity: 0, y: -10 },
@@ -2842,36 +2842,36 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2842
2842
  transition: { duration: 0.2 },
2843
2843
  className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
2844
2844
  children: F ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(ee, { children: [
2845
- /* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((S) => {
2846
- 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);
2847
2847
  return /* @__PURE__ */ n(
2848
2848
  "div",
2849
2849
  {
2850
- onClick: () => B ? null : b(S.id),
2851
- 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"}`,
2852
2852
  children: [
2853
2853
  /* @__PURE__ */ e(
2854
2854
  "input",
2855
2855
  {
2856
2856
  type: "checkbox",
2857
- checked: z.has(S.id),
2857
+ checked: S.has(C.id),
2858
2858
  readOnly: !0,
2859
2859
  className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
2860
- disabled: !!B
2860
+ disabled: !!M
2861
2861
  }
2862
2862
  ),
2863
- /* @__PURE__ */ e(Ne, { src: S.avatarUrl, name: S.name, size: "small" }),
2863
+ /* @__PURE__ */ e(we, { src: C.avatarUrl, name: C.name, size: "small" }),
2864
2864
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
2865
- /* @__PURE__ */ e("span", { className: "text-md font-medium text-gray-800 truncate", children: S.name }),
2866
- 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 })
2867
2867
  ] }),
2868
- B ? /* @__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: 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 }),
2870
2870
  /* @__PURE__ */ e("span", { className: "text-sm text-gray-400", children: "Already added" })
2871
2871
  ] }) : ""
2872
2872
  ]
2873
2873
  },
2874
- S.id
2874
+ C.id
2875
2875
  );
2876
2876
  }) }),
2877
2877
  /* @__PURE__ */ n("div", { className: "flex justify-end gap-2 p-2 border-t border-gray-300", children: [
@@ -2897,7 +2897,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2897
2897
  }
2898
2898
  ) })
2899
2899
  ] }),
2900
- /* @__PURE__ */ e(ze, { children: f.length > 0 && /* @__PURE__ */ n(
2900
+ /* @__PURE__ */ e(Se, { children: f.length > 0 && /* @__PURE__ */ n(
2901
2901
  ie.div,
2902
2902
  {
2903
2903
  initial: { opacity: 0, y: 20 },
@@ -2914,7 +2914,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2914
2914
  Z,
2915
2915
  {
2916
2916
  value: P,
2917
- onChange: k,
2917
+ onChange: w,
2918
2918
  children: /* @__PURE__ */ n("div", { className: "relative", children: [
2919
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: [
2920
2920
  /* @__PURE__ */ n("span", { className: "flex items-center", children: [
@@ -2933,29 +2933,29 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2933
2933
  leave: "transition ease-in duration-100",
2934
2934
  leaveFrom: "opacity-100",
2935
2935
  leaveTo: "opacity-0",
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((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(
2937
2937
  Z.Option,
2938
2938
  {
2939
- value: S,
2940
- className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2941
- 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: [
2942
2942
  /* @__PURE__ */ n(
2943
2943
  "span",
2944
2944
  {
2945
- className: `${B ? "font-medium" : "font-normal"} flex items-center`,
2945
+ className: `${M ? "font-medium" : "font-normal"} flex items-center`,
2946
2946
  children: [
2947
2947
  /* @__PURE__ */ e(
2948
- S.icon,
2948
+ C.icon,
2949
2949
  {
2950
2950
  className: `h-5 w-5 mr-2 ${_ ? "text-white" : "text-gray-400"}`
2951
2951
  }
2952
2952
  ),
2953
2953
  "Can ",
2954
- S.name
2954
+ C.name
2955
2955
  ]
2956
2956
  }
2957
2957
  ),
2958
- 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(
2959
2959
  ut,
2960
2960
  {
2961
2961
  className: "h-5 w-5",
@@ -2964,7 +2964,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2964
2964
  ) })
2965
2965
  ] })
2966
2966
  },
2967
- S.id
2967
+ C.id
2968
2968
  )) })
2969
2969
  }
2970
2970
  )
@@ -2972,7 +2972,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2972
2972
  }
2973
2973
  )
2974
2974
  ] }),
2975
- /* @__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(
2976
2976
  ie.div,
2977
2977
  {
2978
2978
  layout: !0,
@@ -2986,21 +2986,21 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2986
2986
  /* @__PURE__ */ e(
2987
2987
  "img",
2988
2988
  {
2989
- 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)}`,
2990
2990
  className: "w-8 h-8 rounded-full shrink-0"
2991
2991
  }
2992
2992
  ),
2993
- /* @__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 })
2994
2994
  ] }),
2995
2995
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
2996
2996
  l === ue.DRIVE && /* @__PURE__ */ n("span", { className: "text-sm text-gray-500", children: [
2997
2997
  "can ",
2998
- S.permission
2998
+ C.permission
2999
2999
  ] }),
3000
3000
  /* @__PURE__ */ e(
3001
3001
  "button",
3002
3002
  {
3003
- onClick: () => O(B),
3003
+ onClick: () => O(M),
3004
3004
  className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
3005
3005
  children: /* @__PURE__ */ e(Qe, { className: "h-5 w-5" })
3006
3006
  }
@@ -3008,7 +3008,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3008
3008
  ] })
3009
3009
  ]
3010
3010
  },
3011
- S.id
3011
+ C.id
3012
3012
  )) }) })
3013
3013
  ]
3014
3014
  }
@@ -3033,7 +3033,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3033
3033
  /* @__PURE__ */ e(
3034
3034
  le,
3035
3035
  {
3036
- onClick: () => Y(w)(),
3036
+ onClick: () => Y(k)(),
3037
3037
  disabled: x || D.length === 0 && !u,
3038
3038
  label: x ? "Inviting..." : l === ue.DRIVE ? "Send Invites" : "Add"
3039
3039
  }
@@ -3046,7 +3046,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3046
3046
  { name: "Can manage", icon: ta, value: "edit" },
3047
3047
  { name: "Remove", icon: or, isDestructive: !0, value: "remove" }
3048
3048
  ], ss = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
3049
- 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({
3050
3050
  open: i,
3051
3051
  onOpenChange: l,
3052
3052
  middleware: [oa(8), ca(), da({ padding: 8 })],
@@ -3097,24 +3097,24 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3097
3097
  Z.Option,
3098
3098
  {
3099
3099
  className: ({
3100
- active: z
3100
+ active: S
3101
3101
  }) => `relative select-none py-2 pl-10 pr-4 hover:cursor-pointer
3102
- ${z ? "bg-blue-100 text-blue-900" : "text-gray-900"}
3103
- ${g.isDestructive && z ? "bg-red-100 text-red-900" : ""}
3104
- ${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" : ""}`,
3105
3105
  value: g,
3106
- children: ({ selected: z }) => /* @__PURE__ */ n(ee, { children: [
3106
+ children: ({ selected: S }) => /* @__PURE__ */ n(ee, { children: [
3107
3107
  /* @__PURE__ */ n(
3108
3108
  "span",
3109
3109
  {
3110
- 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"}`,
3111
3111
  children: [
3112
3112
  /* @__PURE__ */ e(g.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
3113
3113
  g.name
3114
3114
  ]
3115
3115
  }
3116
3116
  ),
3117
- 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" }) })
3118
3118
  ] })
3119
3119
  },
3120
3120
  g.name
@@ -3134,7 +3134,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3134
3134
  existingShares: l,
3135
3135
  allowedPermissions: m
3136
3136
  }) => {
3137
- 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 = {
3138
3138
  users: o.users.filter(
3139
3139
  (R) => R.name.toLowerCase().includes(v.toLowerCase())
3140
3140
  ),
@@ -3152,7 +3152,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3152
3152
  ($) => $.id === R.id ? { ...$, permission: Y } : $
3153
3153
  )
3154
3154
  }));
3155
- }, z = () => {
3155
+ }, S = () => {
3156
3156
  const R = {
3157
3157
  users: o.users.filter((P) => P.permission !== "remove"),
3158
3158
  groups: o.groups.filter((P) => P.permission !== "remove"),
@@ -3201,7 +3201,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3201
3201
  R
3202
3202
  )) }),
3203
3203
  /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ e(
3204
- pe,
3204
+ ge,
3205
3205
  {
3206
3206
  onDebouncedChange: r,
3207
3207
  value: y,
@@ -3209,7 +3209,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3209
3209
  }
3210
3210
  ) })
3211
3211
  ] }),
3212
- /* @__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(
3213
3213
  ie.div,
3214
3214
  {
3215
3215
  initial: { y: 10, opacity: 0 },
@@ -3220,7 +3220,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3220
3220
  se.Panel,
3221
3221
  {
3222
3222
  className: "space-y-3 focus:outline-none",
3223
- 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(
3224
3224
  ie.div,
3225
3225
  {
3226
3226
  layout: !0,
@@ -3303,7 +3303,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3303
3303
  /* @__PURE__ */ e("div", { className: "p-4 bg-white border-t border-gray-300 flex justify-end", children: /* @__PURE__ */ e(
3304
3304
  "button",
3305
3305
  {
3306
- onClick: z,
3306
+ onClick: S,
3307
3307
  className: "px-4 py-2 bg-blue-600 text-white rounded-md shadow hover:bg-blue-700",
3308
3308
  children: "Update"
3309
3309
  }
@@ -3324,7 +3324,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3324
3324
  onClose: s,
3325
3325
  members: i
3326
3326
  }) => {
3327
- 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(
3328
3328
  (d) => d.name.toLowerCase().includes(h.toLowerCase())
3329
3329
  ), y = {
3330
3330
  hidden: { opacity: 0 },
@@ -3360,7 +3360,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3360
3360
  initial: "hidden",
3361
3361
  animate: "visible",
3362
3362
  className: "divide-y divide-gray-200",
3363
- children: /* @__PURE__ */ e(ze, { children: N.map((d) => /* @__PURE__ */ n(
3363
+ children: /* @__PURE__ */ e(Se, { children: N.map((d) => /* @__PURE__ */ n(
3364
3364
  ie.li,
3365
3365
  {
3366
3366
  layout: !0,
@@ -3415,7 +3415,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3415
3415
  )
3416
3416
  ] }),
3417
3417
  /* @__PURE__ */ e("div", { className: "p-4 border-b border-gray-200 flex-shrink-0", children: /* @__PURE__ */ e(
3418
- pe,
3418
+ ge,
3419
3419
  {
3420
3420
  onDebouncedChange: u,
3421
3421
  value: o,
@@ -3424,7 +3424,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3424
3424
  ) }),
3425
3425
  /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto", children: v() })
3426
3426
  ] });
3427
- }, ge = {
3427
+ }, be = {
3428
3428
  INVITE: "invite",
3429
3429
  MANAGE: "manage",
3430
3430
  MEMBERS: "members"
@@ -3445,32 +3445,32 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3445
3445
  allowedPermissions: u = [],
3446
3446
  ...h
3447
3447
  }) => {
3448
- 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 = () => {
3449
- 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();
3450
3450
  }, Y = () => {
3451
- y(ge.MANAGE);
3452
- }, q = async ({ id: f, name: C, type: O }) => {
3451
+ y(be.MANAGE);
3452
+ }, q = async ({ id: f, name: z, type: O }) => {
3453
3453
  if (O === "groups") {
3454
3454
  try {
3455
- const I = await Ze(`${Je.getMembersForGroup(C)}`);
3455
+ const I = await Ze(`${Je.getMembersForGroup(z)}`);
3456
3456
  } catch (I) {
3457
3457
  console.log("Error searching entities:", I);
3458
3458
  }
3459
3459
  R(resp);
3460
3460
  }
3461
- 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);
3462
3462
  }, $ = (f) => {
3463
3463
  console.log("changedExistingShares", f), v(f);
3464
- 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));
3465
- console.log("Existing data:", C), console.log("Changed data:", O);
3466
- const I = !it.isEqual(C, O);
3467
- 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);
3468
3468
  };
3469
- 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: [
3470
3470
  /* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
3471
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: (() => {
3472
3472
  switch (N) {
3473
- case ge.MANAGE:
3473
+ case be.MANAGE:
3474
3474
  return /* @__PURE__ */ e(
3475
3475
  ie.div,
3476
3476
  {
@@ -3494,7 +3494,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3494
3494
  },
3495
3495
  "manage"
3496
3496
  );
3497
- case ge.MEMBERS:
3497
+ case be.MEMBERS:
3498
3498
  return /* @__PURE__ */ e(
3499
3499
  ie.div,
3500
3500
  {
@@ -3538,7 +3538,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3538
3538
  onFinalSubmit: (f) => {
3539
3539
  s(f, r);
3540
3540
  },
3541
- isChanged: z
3541
+ isChanged: S
3542
3542
  }
3543
3543
  )
3544
3544
  },
@@ -3571,17 +3571,17 @@ function at({
3571
3571
  serverLoading: r = !1,
3572
3572
  minSearchChars: v = 2,
3573
3573
  // NEW: mappers (id/label keys)
3574
- getOptionId: d = (z) => String(z.id),
3575
- getOptionLabel: g = (z) => z.name
3574
+ getOptionId: d = (S) => String(S.id),
3575
+ getOptionLabel: g = (S) => S.name
3576
3576
  }) {
3577
- 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(() => {
3578
3578
  const f = /* @__PURE__ */ new Map();
3579
- for (const C of a) f.set(d(C), C);
3579
+ for (const z of a) f.set(d(z), z);
3580
3580
  return f;
3581
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(() => {
3582
3582
  if (!F) return a;
3583
3583
  const f = F.toLowerCase();
3584
- return a.filter((C) => g(C).toLowerCase().includes(f));
3584
+ return a.filter((z) => g(z).toLowerCase().includes(f));
3585
3585
  }, [a, F, g]);
3586
3586
  te(() => {
3587
3587
  N === "server" && F.length >= v && F !== P.current && (P.current = F, y && y(F));
@@ -3589,7 +3589,7 @@ function at({
3589
3589
  const q = N === "client" ? Y : a, $ = () => {
3590
3590
  if (!U.length)
3591
3591
  return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
3592
- const f = U.slice(0, u), C = U.length - u;
3592
+ const f = U.slice(0, u), z = U.length - u;
3593
3593
  return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
3594
3594
  f.map((O) => /* @__PURE__ */ e(
3595
3595
  "span",
@@ -3599,21 +3599,21 @@ function at({
3599
3599
  },
3600
3600
  d(O)
3601
3601
  )),
3602
- 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: [
3603
3603
  "+",
3604
- C,
3604
+ z,
3605
3605
  " more"
3606
3606
  ] })
3607
3607
  ] });
3608
3608
  };
3609
3609
  return /* @__PURE__ */ e(Z, { value: U, onChange: (f) => {
3610
- const C = Array.from(new Set(f.map((O) => d(O))));
3611
- 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);
3612
3612
  }, multiple: !0, by: "id", children: ({ open: f }) => /* @__PURE__ */ n("div", { children: [
3613
3613
  /* @__PURE__ */ e(
3614
3614
  Z.Label,
3615
3615
  {
3616
- id: z,
3616
+ id: S,
3617
3617
  className: "block text-sm font-medium leading-6 text-gray-900",
3618
3618
  children: t
3619
3619
  }
@@ -3622,7 +3622,7 @@ function at({
3622
3622
  /* @__PURE__ */ n(
3623
3623
  Z.Button,
3624
3624
  {
3625
- "aria-labelledby": z,
3625
+ "aria-labelledby": S,
3626
3626
  "aria-invalid": !!o,
3627
3627
  "aria-describedby": o ? A : void 0,
3628
3628
  onBlur: l,
@@ -3646,7 +3646,7 @@ function at({
3646
3646
  leaveTo: "opacity-0",
3647
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: [
3648
3648
  /* @__PURE__ */ e("div", { className: "p-2 sticky top-0 bg-white z-20 shadow-sm", children: /* @__PURE__ */ e(
3649
- pe,
3649
+ ge,
3650
3650
  {
3651
3651
  value: F,
3652
3652
  onDebouncedChange: R,
@@ -3654,18 +3654,18 @@ function at({
3654
3654
  }
3655
3655
  ) }),
3656
3656
  N === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
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((C) => {
3658
- 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;
3659
3659
  return /* @__PURE__ */ e(
3660
3660
  Z.Option,
3661
3661
  {
3662
- value: C,
3662
+ value: z,
3663
3663
  disabled: b,
3664
3664
  className: ({ active: p }) => Ge(
3665
3665
  b ? " text-gray-400 bg-white cursor-not-allowed" : p ? " bg-gray-200 text-gray-900" : " text-gray-900",
3666
3666
  " relative cursor-default select-none py-2 pl-3 pr-9"
3667
3667
  ),
3668
- children: ({ selected: p, active: k }) => /* @__PURE__ */ n(ee, { children: [
3668
+ children: ({ selected: p, active: w }) => /* @__PURE__ */ n(ee, { children: [
3669
3669
  /* @__PURE__ */ e(
3670
3670
  "span",
3671
3671
  {
@@ -3680,7 +3680,7 @@ function at({
3680
3680
  "span",
3681
3681
  {
3682
3682
  className: Ge(
3683
- k ? " text-gray-900" : " text-gray-600",
3683
+ w ? " text-gray-900" : " text-gray-600",
3684
3684
  " absolute inset-y-0 right-0 flex items-center pr-4"
3685
3685
  ),
3686
3686
  children: /* @__PURE__ */ e(et, { className: "w-5 h-5", "aria-hidden": "true" })
@@ -3756,7 +3756,7 @@ const Xl = ({
3756
3756
  y.stopPropagation();
3757
3757
  };
3758
3758
  return /* @__PURE__ */ n(
3759
- fe,
3759
+ ye,
3760
3760
  {
3761
3761
  open: t,
3762
3762
  onClose: () => a(!1),
@@ -3778,7 +3778,7 @@ const Xl = ({
3778
3778
  /* @__PURE__ */ n("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
3779
3779
  i?.customHeader && i.customHeader,
3780
3780
  i?.title && !i?.customHeader && /* @__PURE__ */ e(tt, { className: "text-lg font-bold", children: i?.title }),
3781
- 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" }) })
3782
3782
  ] }),
3783
3783
  /* @__PURE__ */ e(
3784
3784
  "div",
@@ -3852,7 +3852,7 @@ function ms({
3852
3852
  dropId: y,
3853
3853
  indent: r = 24
3854
3854
  }) {
3855
- 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), $ = () => {
3856
3856
  const f = Y.trim();
3857
3857
  U(!1), f && f !== t.name ? o?.(t, f) : q(t.name);
3858
3858
  }, x = ae(() => /* @__PURE__ */ e(
@@ -3863,8 +3863,8 @@ function ms({
3863
3863
  { action: "rename", label: "Rename" },
3864
3864
  { action: "delete", label: "Delete" }
3865
3865
  ],
3866
- onSelect: (C) => {
3867
- 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);
3868
3868
  }
3869
3869
  }
3870
3870
  ), [t, m, u]);
@@ -3878,7 +3878,7 @@ function ms({
3878
3878
  f.target.closest(".tv-toggle") || f.target.tagName === "INPUT" || l?.(t);
3879
3879
  },
3880
3880
  children: [
3881
- /* @__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" }) }),
3882
3882
  /* @__PURE__ */ e(Be, { size: 16, className: "tv-folder-ic" }),
3883
3883
  /* @__PURE__ */ e("div", { className: "tv-name", ref: A, children: j ? /* @__PURE__ */ e(
3884
3884
  "input",
@@ -3893,7 +3893,7 @@ function ms({
3893
3893
  autoFocus: !0
3894
3894
  }
3895
3895
  ) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
3896
- /* @__PURE__ */ e(ds, { listeners: z, attributes: g }),
3896
+ /* @__PURE__ */ e(ds, { listeners: S, attributes: g }),
3897
3897
  /* @__PURE__ */ e("div", { className: "tv-actions", children: h ? h(t, {
3898
3898
  onCreateChild: () => m?.(t),
3899
3899
  onRename: () => U(!0),
@@ -3994,90 +3994,90 @@ function Hl({
3994
3994
  // ← allow root moves by default now
3995
3995
  indentUnit: g = 24
3996
3996
  }) {
3997
- 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(
3998
3998
  t.map((b) => ({ ...b })),
3999
3999
  { rootId: a, getId: i, getParent: l, getName: m }
4000
- ), [t, a, i, l, m]), [A, F] = L({}), R = K((b) => {
4000
+ ), [t, a, i, l, m]), [A, F] = B({}), R = K((b) => {
4001
4001
  const p = {};
4002
- return (function k(w) {
4003
- w.forEach((T) => {
4004
- 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);
4005
4005
  });
4006
4006
  })(b), p;
4007
4007
  }, []);
4008
4008
  re.useEffect(() => {
4009
- F(R(z));
4010
- }, [z, R]);
4009
+ F(R(S));
4010
+ }, [S, R]);
4011
4011
  const P = K(
4012
4012
  (b) => F((p) => ({ ...p, [b]: !p[b] })),
4013
4013
  []
4014
- ), [j, U] = L(() => Me(z));
4015
- re.useEffect(() => U(Me(z)), [z]);
4014
+ ), [j, U] = B(() => Me(S));
4015
+ re.useEffect(() => U(Me(S)), [S]);
4016
4016
  const Y = ur(
4017
4017
  hr(fr, { activationConstraint: { delay: 250, tolerance: 5 } })
4018
- ), q = be(null), [$, x] = L(null), f = be(0), C = () => {
4018
+ ), q = fe(null), [$, x] = B(null), f = fe(0), z = () => {
4019
4019
  }, O = ({ delta: b }) => {
4020
4020
  f.current = b?.x ?? 0;
4021
4021
  }, I = K(
4022
4022
  ({ active: b, over: p }) => {
4023
- const k = f.current;
4023
+ const w = f.current;
4024
4024
  if (f.current = 0, x(null), !b || !p) return;
4025
- const w = String(b.id).replace(/^drag-/, ""), T = String(p.id).replace(/^drop-/, "");
4026
- if (!w || !T || w === T) return;
4027
- let M = T;
4028
- const S = Math.max(0, Math.floor(-k / g));
4029
- if (S > 0) {
4030
- let J = T;
4031
- for (let ve = 0; ve < S; ve++) {
4032
- const $e = Sa(j, J, null);
4033
- if (!$e) break;
4034
- if (!$e.parentId) {
4035
- 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;
4036
4036
  break;
4037
4037
  }
4038
- M = $e.parentId, J = $e.parentId;
4038
+ L = Ne.parentId, W = Ne.parentId;
4039
4039
  }
4040
4040
  }
4041
- if (d && M === a) {
4042
- U(Me(z));
4041
+ if (d && L === a) {
4042
+ U(Me(S));
4043
4043
  return;
4044
4044
  }
4045
- const B = Me(j), { newRoots: _, removed: E } = ys(B, w);
4045
+ const M = Me(j), { newRoots: _, removed: E } = ys(M, k);
4046
4046
  if (!E) return;
4047
- const G = xs(_, M, E);
4048
- 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 });
4049
4049
  },
4050
- [j, z, a, d, g, r]
4050
+ [j, S, a, d, g, r]
4051
4051
  ), D = K(
4052
- (b, p = 0) => b.map((k) => /* @__PURE__ */ n(re.Fragment, { children: [
4052
+ (b, p = 0) => b.map((w) => /* @__PURE__ */ n(re.Fragment, { children: [
4053
4053
  /* @__PURE__ */ e(
4054
4054
  ms,
4055
4055
  {
4056
- node: k,
4056
+ node: w,
4057
4057
  depth: p,
4058
- expanded: !!A[k.id],
4059
- onToggle: () => P(k.id),
4058
+ expanded: !!A[w.id],
4059
+ onToggle: () => P(w.id),
4060
4060
  onSelect: o,
4061
4061
  onCreateChild: h,
4062
4062
  onRename: N,
4063
4063
  onDelete: y,
4064
4064
  renderActions: v,
4065
- dragId: `drag-${k.id}`,
4066
- dropId: `drop-${k.id}`,
4065
+ dragId: `drag-${w.id}`,
4066
+ dropId: `drop-${w.id}`,
4067
4067
  indent: g
4068
4068
  }
4069
4069
  ),
4070
- A[k.id] && k.children?.length > 0 ? D(k.children, p + 1) : null
4071
- ] }, k.id)),
4070
+ A[w.id] && w.children?.length > 0 ? D(w.children, p + 1) : null
4071
+ ] }, w.id)),
4072
4072
  [A, g, h, y, N, o, v, P]
4073
4073
  );
4074
4074
  return re.useMemo(() => {
4075
4075
  if (!$) return null;
4076
4076
  const b = String($).replace(/^drag-/, "");
4077
- function p(k) {
4078
- for (const w of k) {
4079
- if (w.id === b) return w;
4080
- 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;
4081
4081
  if (T) return T;
4082
4082
  }
4083
4083
  return null;
@@ -4098,7 +4098,7 @@ function Hl({
4098
4098
  {
4099
4099
  collisionDetection: br,
4100
4100
  sensors: Y,
4101
- onDragStart: C,
4101
+ onDragStart: z,
4102
4102
  onDragMove: O,
4103
4103
  onDragEnd: I,
4104
4104
  modifiers: [gr],
@@ -4107,7 +4107,7 @@ function Hl({
4107
4107
  )
4108
4108
  ] });
4109
4109
  }
4110
- function Ce(...t) {
4110
+ function ze(...t) {
4111
4111
  return t.filter(Boolean).join(" ");
4112
4112
  }
4113
4113
  const Ql = ({
@@ -4121,21 +4121,21 @@ const Ql = ({
4121
4121
  ...u
4122
4122
  // Pass remaining props to Tab.Group
4123
4123
  }) => {
4124
- const h = s === "vertical", N = (v) => Ce(
4124
+ const h = s === "vertical", N = (v) => ze(
4125
4125
  "py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
4126
4126
  v ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
4127
- ), y = (v) => Ce(
4127
+ ), y = (v) => ze(
4128
4128
  "text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
4129
4129
  v ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
4130
4130
  ), r = ({ selected: v }) => o ? typeof o == "function" ? o(v) : o : h ? y(v) : N(v);
4131
- return /* @__PURE__ */ e(se.Group, { vertical: h, ...u, children: h ? /* @__PURE__ */ n("div", { className: Ce("flex gap-4", i), children: [
4132
- /* @__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)) }),
4133
- /* @__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)) })
4134
4134
  ] }) : (
4135
4135
  // mostly this part is used : horizontal
4136
4136
  /* @__PURE__ */ n(ee, { children: [
4137
- /* @__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)) }),
4138
- /* @__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)) })
4139
4139
  ] })
4140
4140
  ) });
4141
4141
  };
@@ -4148,7 +4148,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4148
4148
  const [l, m] = re.useState(t), [o, u] = re.useState(() => {
4149
4149
  const r = a && a[t.key] || {};
4150
4150
  return console.log("Initial Section data for", t.key, r), r;
4151
- }), h = be(a);
4151
+ }), h = fe(a);
4152
4152
  te(() => {
4153
4153
  if (h.current !== a) {
4154
4154
  h.current = a;
@@ -4156,30 +4156,30 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4156
4156
  console.log("Updated Section data for", t.key, r), u(r);
4157
4157
  }
4158
4158
  }, [a, t.key]), console.log("Section data", o);
4159
- const N = be(o);
4159
+ const N = fe(o);
4160
4160
  te(() => {
4161
4161
  N.current !== o && s && typeof s == "function" && (N.current = o, s(l.key, o));
4162
4162
  }, [l.key, o, s]);
4163
4163
  const y = (r) => {
4164
4164
  if (!r.dependsOn) return !0;
4165
- 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];
4166
4166
  switch (g) {
4167
4167
  case "equals":
4168
- return z === d;
4168
+ return S === d;
4169
4169
  case "notEquals":
4170
- return z !== d;
4170
+ return S !== d;
4171
4171
  case "contains":
4172
- return Array.isArray(z) && z.includes(d);
4172
+ return Array.isArray(S) && S.includes(d);
4173
4173
  case "notContains":
4174
- return !Array.isArray(z) || !z.includes(d);
4174
+ return !Array.isArray(S) || !S.includes(d);
4175
4175
  case "greaterThan":
4176
- return Number(z) > Number(d);
4176
+ return Number(S) > Number(d);
4177
4177
  case "lessThan":
4178
- return Number(z) < Number(d);
4178
+ return Number(S) < Number(d);
4179
4179
  case "isEmpty":
4180
- return !z || Array.isArray(z) && z.length === 0;
4180
+ return !S || Array.isArray(S) && S.length === 0;
4181
4181
  case "isNotEmpty":
4182
- return z && (!Array.isArray(z) || z.length > 0);
4182
+ return S && (!Array.isArray(S) || S.length > 0);
4183
4183
  default:
4184
4184
  return !0;
4185
4185
  }
@@ -4205,8 +4205,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4205
4205
  name: r.key,
4206
4206
  checked: !!(o[r.key] || r.default),
4207
4207
  onChange: (d) => {
4208
- const g = d.target ? d.target.checked : d, z = { ...o, [r.key]: g };
4209
- 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);
4210
4210
  },
4211
4211
  label: r.label,
4212
4212
  disabled: r.disabled ? r.disabled : !1
@@ -4305,14 +4305,14 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4305
4305
  max: r.max,
4306
4306
  step: r.step,
4307
4307
  onChange: (d) => {
4308
- const g = d.target.value, z = { ...o, [r.key]: g };
4309
- 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);
4310
4310
  },
4311
4311
  onBlur: (d) => {
4312
4312
  const g = d.target.value;
4313
4313
  if (g !== "" && g !== null && g !== void 0) {
4314
- const z = Number(g);
4315
- 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(""));
4316
4316
  }
4317
4317
  },
4318
4318
  required: r.required,
@@ -4337,8 +4337,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4337
4337
  name: r.key,
4338
4338
  checked: !!(o[r.key] || r.default),
4339
4339
  onChange: (d) => {
4340
- const g = d.target ? d.target.checked : d, z = { ...o, [r.key]: g };
4341
- 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);
4342
4342
  },
4343
4343
  label: r.placeholder || r.label,
4344
4344
  disabled: r.disabled ? r.disabled : !1,
@@ -4516,8 +4516,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4516
4516
  value: d.value,
4517
4517
  checked: o[r.key] === d.value,
4518
4518
  onChange: (g) => {
4519
- const z = { ...o, [r.key]: g.target.value };
4520
- u(z), s && s(l.key, z);
4519
+ const S = { ...o, [r.key]: g.target.value };
4520
+ u(S), s && s(l.key, S);
4521
4521
  },
4522
4522
  disabled: r.disabled
4523
4523
  }
@@ -4531,7 +4531,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4531
4531
  ] }),
4532
4532
  r.fieldtype === "search" && /* @__PURE__ */ n("div", { children: [
4533
4533
  /* @__PURE__ */ e(
4534
- pe,
4534
+ ge,
4535
4535
  {
4536
4536
  value: o[r.key] || "",
4537
4537
  onChange: (d) => {
@@ -4634,8 +4634,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4634
4634
  type: "file",
4635
4635
  name: r.key,
4636
4636
  onChange: (d) => {
4637
- const g = d.target.files[0], z = { ...o, [r.key]: g ? g.name : "" };
4638
- 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);
4639
4639
  },
4640
4640
  accept: r.accept,
4641
4641
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4680,12 +4680,12 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4680
4680
  const Ns = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
4681
4681
  function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4682
4682
  console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
4683
- 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);
4684
4684
  console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
4685
- const [y, r] = L(() => {
4685
+ const [y, r] = B(() => {
4686
4686
  const x = a && a[l.key] || [], f = x.length > 0 ? x : [{ id: 0 }];
4687
4687
  return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, f), f;
4688
- }), v = be(a);
4688
+ }), v = fe(a);
4689
4689
  te(() => {
4690
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) {
4691
4691
  v.current = a;
@@ -4693,7 +4693,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4693
4693
  console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, f), r(f);
4694
4694
  }
4695
4695
  }, [a, l.key]);
4696
- const d = be(y), g = be(null);
4696
+ const d = fe(y), g = fe(null);
4697
4697
  te(() => {
4698
4698
  d.current !== y && s && typeof s == "function" && (d.current = y, g.current && clearTimeout(g.current), g.current = setTimeout(() => {
4699
4699
  s(l.key, y);
@@ -4701,14 +4701,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4701
4701
  }, [l.key, y, s]), te(() => () => {
4702
4702
  g.current && clearTimeout(g.current);
4703
4703
  }, []);
4704
- const z = (x) => {
4704
+ const S = (x) => {
4705
4705
  const f = (I, D) => {
4706
4706
  console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: I, value: D, type: typeof D }), r((b) => {
4707
4707
  const p = [...b];
4708
4708
  return p[I][x.key] = D, p;
4709
4709
  });
4710
- }, C = (I) => i[l.key]?.[I]?.[x.key], O = (I) => {
4711
- const D = C(I);
4710
+ }, z = (I) => i[l.key]?.[I]?.[x.key], O = (I) => {
4711
+ const D = z(I);
4712
4712
  return D ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: D }) : null;
4713
4713
  };
4714
4714
  switch (x.fieldtype) {
@@ -4721,7 +4721,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4721
4721
  onChange: (b) => f(D, b.target.value),
4722
4722
  placeholder: x.placeholder || `Enter ${x.label}`,
4723
4723
  required: x.required,
4724
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4724
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4725
4725
  }
4726
4726
  ),
4727
4727
  O(D)
@@ -4735,7 +4735,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4735
4735
  onChange: (b) => f(D, b.target.value),
4736
4736
  placeholder: x.placeholder || `Enter ${x.label}`,
4737
4737
  required: x.required,
4738
- className: `w-full ${C(D) ? "border-red-500" : ""}`,
4738
+ className: `w-full ${z(D) ? "border-red-500" : ""}`,
4739
4739
  rows: 3
4740
4740
  }
4741
4741
  ),
@@ -4755,13 +4755,13 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4755
4755
  onBlur: (b) => {
4756
4756
  const p = b.target.value;
4757
4757
  if (p !== "" && p !== null && p !== void 0) {
4758
- const k = Number(p);
4759
- 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(""));
4760
4760
  }
4761
4761
  },
4762
4762
  placeholder: x.placeholder || `Enter ${x.label}`,
4763
4763
  required: x.required,
4764
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4764
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4765
4765
  }
4766
4766
  ),
4767
4767
  x.min !== void 0 && /* @__PURE__ */ n("div", { style: { color: "#6b7280", fontSize: "11px", marginTop: "2px" }, children: [
@@ -4784,7 +4784,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4784
4784
  onChange: (b) => f(D, b.target.value),
4785
4785
  placeholder: x.placeholder || "Enter email address",
4786
4786
  required: x.required,
4787
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4787
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4788
4788
  }
4789
4789
  ),
4790
4790
  O(D)
@@ -4799,7 +4799,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4799
4799
  onChange: (b) => f(D, b.target.value),
4800
4800
  placeholder: x.placeholder || "Enter URL",
4801
4801
  required: x.required,
4802
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4802
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4803
4803
  }
4804
4804
  ),
4805
4805
  O(D)
@@ -4814,7 +4814,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4814
4814
  onChange: (b) => f(D, b.target.value),
4815
4815
  placeholder: x.placeholder || "Enter password",
4816
4816
  required: x.required,
4817
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4817
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4818
4818
  }
4819
4819
  ),
4820
4820
  O(D)
@@ -4830,7 +4830,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4830
4830
  options: x.options || [],
4831
4831
  placeholder: x.placeholder || `Select ${x.label}`,
4832
4832
  required: x.required,
4833
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4833
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4834
4834
  }
4835
4835
  ),
4836
4836
  O(D)
@@ -4839,12 +4839,12 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4839
4839
  return (I, D) => {
4840
4840
  const b = () => {
4841
4841
  if (x.optionsFrom && a) {
4842
- 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] || [];
4843
4843
  if (Array.isArray(T))
4844
- return T.map((M) => ({
4845
- id: M[k] || "",
4846
- value: M[k] || "",
4847
- label: M[w] || ""
4844
+ return T.map((L) => ({
4845
+ id: L[w] || "",
4846
+ value: L[w] || "",
4847
+ label: L[k] || ""
4848
4848
  }));
4849
4849
  }
4850
4850
  return x.options || [];
@@ -4859,7 +4859,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4859
4859
  options: b(),
4860
4860
  placeholder: x.placeholder || `Select ${x.label}`,
4861
4861
  required: x.required,
4862
- className: `w-full ${C(D) ? "border-red-500" : ""}`
4862
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
4863
4863
  },
4864
4864
  Math.random()
4865
4865
  ),
@@ -4948,7 +4948,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4948
4948
  );
4949
4949
  case "search":
4950
4950
  return (I, D) => /* @__PURE__ */ e(
4951
- pe,
4951
+ ge,
4952
4952
  {
4953
4953
  value: I[x.key] || "",
4954
4954
  onChange: (b) => f(D, b),
@@ -4964,14 +4964,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4964
4964
  ...b.roles || []
4965
4965
  ];
4966
4966
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
4967
- /* @__PURE__ */ e(Ns, { children: p.length > 0 ? p.slice(0, 3).map((k, w) => /* @__PURE__ */ e(
4968
- Ne,
4967
+ /* @__PURE__ */ e(Ns, { children: p.length > 0 ? p.slice(0, 3).map((w, k) => /* @__PURE__ */ e(
4968
+ we,
4969
4969
  {
4970
4970
  size: "small",
4971
- name: k.name || k.displayName || k.id,
4972
- src: k.avatarUrl
4971
+ name: w.name || w.displayName || w.id,
4972
+ src: w.avatarUrl
4973
4973
  },
4974
- w
4974
+ k
4975
4975
  )) : null }),
4976
4976
  /* @__PURE__ */ e(
4977
4977
  "button",
@@ -5043,7 +5043,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5043
5043
  onChange: (b) => f(D, b.target.value),
5044
5044
  placeholder: x.placeholder || `Enter ${x.label}`,
5045
5045
  required: x.required,
5046
- className: `w-full ${C(D) ? "border-red-500" : ""}`
5046
+ className: `w-full ${z(D) ? "border-red-500" : ""}`
5047
5047
  }
5048
5048
  ),
5049
5049
  O(D)
@@ -5059,39 +5059,39 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5059
5059
  l.fields.forEach((O) => {
5060
5060
  O.fieldtype === "audience" ? f[O.key] = { users: [], groups: [], roles: [] } : f[O.key] = O.default || "";
5061
5061
  }), console.log("[DataTableRenderer] New blank row:", f);
5062
- const C = [...x, f];
5063
- return console.log("[DataTableRenderer] Updated data:", C), C;
5062
+ const z = [...x, f];
5063
+ return console.log("[DataTableRenderer] Updated data:", z), z;
5064
5064
  });
5065
5065
  }, [l.fields]), F = K((x) => {
5066
5066
  r((f) => {
5067
5067
  if (f.length <= 1)
5068
5068
  return f;
5069
- const C = [...f];
5070
- return C.splice(x, 1), C;
5069
+ const z = [...f];
5070
+ return z.splice(x, 1), z;
5071
5071
  });
5072
- }, []), [R, P] = L(null), j = K((x, f) => {
5072
+ }, []), [R, P] = B(null), j = K((x, f) => {
5073
5073
  P(f), x.dataTransfer.effectAllowed = "move", x.dataTransfer.setData("text/html", "");
5074
5074
  }, []), U = K((x) => {
5075
5075
  x.preventDefault(), x.dataTransfer.dropEffect = "move";
5076
5076
  }, []), Y = K((x, f) => {
5077
- x.preventDefault(), !(R === null || R === f) && (r((C) => {
5078
- const O = [...C], I = O[R];
5077
+ x.preventDefault(), !(R === null || R === f) && (r((z) => {
5078
+ const O = [...z], I = O[R];
5079
5079
  return O.splice(R, 1), O.splice(f, 0, I), O;
5080
5080
  }), P(null));
5081
5081
  }, [R]), q = K(() => {
5082
5082
  P(null);
5083
5083
  }, []), $ = K((x) => {
5084
5084
  console.log("[DataTableRenderer] handleAddAudience called with:", x), r((f) => {
5085
- const C = [...f];
5086
- if (o !== null && h && C[o]) {
5085
+ const z = [...f];
5086
+ if (o !== null && h && z[o]) {
5087
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");
5088
- C[o][h] = {
5089
- users: [...C[o][h]?.users || [], ...I],
5090
- groups: [...C[o][h]?.groups || [], ...D],
5091
- roles: [...C[o][h]?.roles || [], ...b]
5092
- }, 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]);
5093
5093
  }
5094
- return C;
5094
+ return z;
5095
5095
  }), u(null), N(null);
5096
5096
  }, [o, h]);
5097
5097
  return /* @__PURE__ */ n("div", { children: [
@@ -5127,13 +5127,13 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5127
5127
  {
5128
5128
  className: `hover:bg-gray-50 ${R === f ? "opacity-50" : ""}`,
5129
5129
  draggable: !0,
5130
- onDragStart: (C) => j(C, f),
5130
+ onDragStart: (z) => j(z, f),
5131
5131
  onDragOver: U,
5132
- onDrop: (C) => Y(C, f),
5132
+ onDrop: (z) => Y(z, f),
5133
5133
  onDragEnd: q,
5134
5134
  children: [
5135
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 }) }) }),
5136
- 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)),
5137
5137
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
5138
5138
  "button",
5139
5139
  {
@@ -5191,55 +5191,55 @@ function Ss({
5191
5191
  onShowCancelModal: l,
5192
5192
  onCancel: m
5193
5193
  }) {
5194
- 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 = () => {
5195
5195
  if (!y || !h)
5196
5196
  return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: y, data: h }), !1;
5197
5197
  const b = (T) => {
5198
5198
  if (T == null || typeof T != "object") return T;
5199
5199
  if (Array.isArray(T)) return T.map(b);
5200
- const M = {};
5201
- return Object.keys(T).sort().forEach((S) => {
5202
- M[S] = b(T[S]);
5203
- }), M;
5204
- }, p = b(y), k = b(h), w = JSON.stringify(p) !== JSON.stringify(k);
5205
- 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, {
5206
5206
  originalData: p,
5207
- currentData: k,
5207
+ currentData: w,
5208
5208
  originalRaw: y,
5209
5209
  currentRaw: h
5210
- }), w;
5210
+ }), k;
5211
5211
  }, q = (b) => {
5212
5212
  if (!a || !a.configuration)
5213
5213
  return b;
5214
- const p = {}, k = b?.configuration || {};
5215
- return a.configuration.forEach((w) => {
5216
- if (w.key && w.type === "datatable") {
5217
- const M = (k[w.key] || []).map((S, B) => {
5218
- const _ = { id: S.id || 0 };
5219
- 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) => {
5220
5220
  if (E.fieldtype === "audience") {
5221
5221
  let G = { users: [], groups: [], roles: [] };
5222
- S[E.key] && (Array.isArray(S[E.key]) ? G = { users: [], groups: [], roles: [] } : typeof S[E.key] == "object" && (G = {
5223
- users: S[E.key].users || [],
5224
- groups: S[E.key].groups || [],
5225
- 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 || []
5226
5226
  })), _[E.key] = G;
5227
5227
  } else
5228
- _[E.key] = S[E.key] || E.default || "";
5228
+ _[E.key] = C[E.key] || E.default || "";
5229
5229
  }), _;
5230
5230
  });
5231
- if (M.length === 0) {
5232
- const S = { id: 0 };
5233
- w.fields && w.fields.forEach((B) => {
5234
- B.fieldtype === "audience" ? S[B.key] = { users: [], groups: [], roles: [] } : S[B.key] = B.default || "";
5235
- }), 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);
5236
5236
  }
5237
- p[w.key] = M;
5238
- } else if (w.key) {
5239
- const T = k[w.key] || {};
5240
- w.type === "section" && w.fields && w.fields.forEach((M) => {
5241
- M.fieldtype === "managecollectionlist" && M.key && (!T[M.key] || !Array.isArray(T[M.key])) && (T[M.key] = M.initialData || []);
5242
- }), 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;
5243
5243
  }
5244
5244
  }), p;
5245
5245
  }, $ = () => {
@@ -5248,15 +5248,15 @@ function Ss({
5248
5248
  a.configuration.forEach((p) => {
5249
5249
  if (p.key)
5250
5250
  if (p.type === "datatable") {
5251
- const k = { id: 0 };
5252
- p.fields && p.fields.forEach((w) => {
5253
- w.fieldtype === "audience" ? k[w.key] = { users: [], groups: [], roles: [] } : k[w.key] = w.default || "";
5254
- }), 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];
5255
5255
  } else if (p.type === "section") {
5256
- const k = {};
5257
- p.fields && Array.isArray(p.fields) && p.fields.forEach((w) => {
5258
- w.key && (w.fieldtype === "managecollectionlist" ? k[w.key] = w.initialData || [] : k[w.key] = w.default || "");
5259
- }), 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;
5260
5260
  } else
5261
5261
  b[p.key] = {};
5262
5262
  }), N(b), r(b);
@@ -5272,18 +5272,18 @@ function Ss({
5272
5272
  d(!0);
5273
5273
  let p = await Ze(R);
5274
5274
  if (p) {
5275
- const k = q(p);
5276
- N(k), r(k);
5275
+ const w = q(p);
5276
+ N(w), r(w);
5277
5277
  } else
5278
5278
  $();
5279
5279
  } catch (p) {
5280
5280
  console.error("Error fetching configuration:", p);
5281
- let k = "Failed to load configuration";
5281
+ let w = "Failed to load configuration";
5282
5282
  if (p.response) {
5283
- const w = p.response.status, T = p.response.data?.message || p.response.data?.error;
5284
- 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})`;
5285
- } else p.request ? k = "Network error. Please check your connection and try again." : k = p.message || "An unexpected error occurred while loading configuration.";
5286
- 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), $();
5287
5287
  } finally {
5288
5288
  d(!1);
5289
5289
  }
@@ -5291,100 +5291,100 @@ function Ss({
5291
5291
  a && (u(a), t ? b() : $());
5292
5292
  }, [a, j, t, s]);
5293
5293
  const x = (b, p) => {
5294
- console.log(`[DynamicConfig] handleSectionChange called for ${b}:`, p), N((k) => {
5295
- const w = {
5296
- ...k,
5294
+ console.log(`[DynamicConfig] handleSectionChange called for ${b}:`, p), N((w) => {
5295
+ const k = {
5296
+ ...w,
5297
5297
  [b]: p
5298
5298
  };
5299
- return console.log("[DynamicConfig] Updated data state:", w), w;
5300
- }), F((k) => {
5301
- const w = { ...k };
5302
- 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;
5303
5303
  });
5304
5304
  }, f = () => {
5305
5305
  const b = {};
5306
5306
  return !o || !h || o.configuration.forEach((p) => {
5307
5307
  if (p.type === "section")
5308
- p.fields.forEach((k) => {
5309
- const w = h[p.key]?.[k.key];
5310
- if (k.required && (!w || typeof w == "string" && w.trim() === "")) {
5311
- 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`;
5312
5312
  return;
5313
5313
  }
5314
- if (k.fieldtype === "number" && w !== "" && w !== null && w !== void 0) {
5315
- const T = Number(w);
5316
- 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}`));
5317
5317
  }
5318
5318
  });
5319
5319
  else if (p.type === "datatable") {
5320
- const k = h[p.key];
5321
- Array.isArray(k) && k.forEach((w, T) => {
5322
- p.fields.forEach((M) => {
5323
- const S = w[M.key];
5324
- if (M.required && (!S || typeof S == "string" && S.trim() === "")) {
5325
- 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`;
5326
5326
  return;
5327
5327
  }
5328
- if (M.fieldtype === "number" && S !== "" && S !== null && S !== void 0) {
5329
- const B = Number(S);
5330
- 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}`));
5331
5331
  }
5332
5332
  });
5333
5333
  });
5334
5334
  }
5335
5335
  }), b;
5336
- }, C = (b) => Object.keys(b).length > 0, O = () => {
5336
+ }, z = (b) => Object.keys(b).length > 0, O = () => {
5337
5337
  if (g) {
5338
5338
  console.log("[handleSave] Already saving, ignoring duplicate call");
5339
5339
  return;
5340
5340
  }
5341
5341
  console.log("[handleSave] Starting save process");
5342
5342
  const b = f();
5343
- if (F(b), C(b)) {
5344
- let k = [];
5345
- Object.keys(b).forEach((w) => {
5346
- typeof b[w] == "object" && Object.keys(b[w]).forEach((T) => {
5347
- typeof b[w][T] == "object" ? Object.keys(b[w][T]).forEach((M) => {
5348
- k.push(`${w} row ${parseInt(T) + 1}: ${b[w][T][M]}`);
5349
- }) : 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]}`);
5350
5350
  });
5351
5351
  });
5352
5352
  return;
5353
5353
  }
5354
5354
  (async () => {
5355
5355
  try {
5356
- z(!0);
5357
- const k = {};
5356
+ S(!0);
5357
+ const w = {};
5358
5358
  h && Object.keys(h).forEach((T) => {
5359
- const M = a?.configuration?.find(
5360
- (S) => S.key === T && S.type === "datatable"
5359
+ const L = a?.configuration?.find(
5360
+ (C) => C.key === T && C.type === "datatable"
5361
5361
  );
5362
- M && Array.isArray(h[T]) ? k[T] = h[T].map((S) => {
5363
- const B = { id: S.id || 0 };
5364
- 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((_) => {
5365
5365
  if (_.fieldtype === "audience") {
5366
5366
  let E = { users: [], groups: [], roles: [] };
5367
- S[_.key] && typeof S[_.key] == "object" && !Array.isArray(S[_.key]) && (E = {
5368
- users: S[_.key].users || [],
5369
- groups: S[_.key].groups || [],
5370
- roles: S[_.key].roles || []
5371
- }), 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;
5372
5372
  } else
5373
- B[_.key] = S[_.key] || "";
5374
- }), B;
5375
- }) : k[T] = h[T];
5376
- }), (!k.appkey || k.appkey === "") && (k.appkey = t);
5377
- let w = await xt(P, k);
5378
- 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") {
5379
5379
  F({}), r(JSON.parse(JSON.stringify(h)));
5380
- const T = w.message || "Configuration has been saved successfully";
5380
+ const T = k.message || "Configuration has been saved successfully";
5381
5381
  qe.success(T), i && typeof i == "function" && i(h);
5382
5382
  } else
5383
- throw qe.error(w?.message || "Failed to save configuration"), new Error("No response received from server");
5384
- } catch (k) {
5385
- 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");
5386
5386
  } finally {
5387
- z(!1);
5387
+ S(!1);
5388
5388
  }
5389
5389
  })();
5390
5390
  }, I = () => {
@@ -5404,10 +5404,10 @@ function Ss({
5404
5404
  children: [
5405
5405
  v && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(ba, { size: "large" }) }),
5406
5406
  !v && D?.map((b, p) => {
5407
- const k = zs(b.type);
5408
- if (k && k !== "UnknownType")
5407
+ const w = zs(b.type);
5408
+ if (w && w !== "UnknownType")
5409
5409
  return /* @__PURE__ */ e(
5410
- k,
5410
+ w,
5411
5411
  {
5412
5412
  item: b,
5413
5413
  data: h,
@@ -5449,7 +5449,7 @@ const Kl = ({
5449
5449
  appid: a = "Configuration-Page",
5450
5450
  disableApi: s = !1
5451
5451
  }) => {
5452
- const [i, l] = L(0), [m, o] = L(!1), {
5452
+ const [i, l] = B(0), [m, o] = B(!1), {
5453
5453
  pageHeader: u = {},
5454
5454
  appletHeader: h = {},
5455
5455
  breadcrumb: N = [],
@@ -5457,19 +5457,19 @@ const Kl = ({
5457
5457
  configuration: r = []
5458
5458
  } = t, v = ae(() => r.map((f) => {
5459
5459
  if (f.type === "section" && f.fields) {
5460
- 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");
5461
5461
  if (O !== -1) {
5462
- const I = C[O];
5463
- if (C[O] = {
5462
+ const I = z[O];
5463
+ if (z[O] = {
5464
5464
  ...I,
5465
5465
  default: a,
5466
5466
  value: a,
5467
5467
  readonly: !0,
5468
5468
  placeholder: a,
5469
5469
  disabled: !1
5470
- }, C.some((b) => b.key === "displayname")) {
5471
- const b = C.findIndex((k) => k.key === "displayname"), p = C[b] || {};
5472
- C[b] = {
5470
+ }, z.some((b) => b.key === "displayname")) {
5471
+ const b = z.findIndex((w) => w.key === "displayname"), p = z[b] || {};
5472
+ z[b] = {
5473
5473
  ...p,
5474
5474
  default: p.default || p.value || a,
5475
5475
  placeholder: p.placeholder || "Enter display name"
@@ -5484,12 +5484,12 @@ const Kl = ({
5484
5484
  placeholder: "Enter display name",
5485
5485
  required: !1
5486
5486
  };
5487
- C.splice(O + 1, 0, b);
5487
+ z.splice(O + 1, 0, b);
5488
5488
  }
5489
5489
  }
5490
5490
  return {
5491
5491
  ...f,
5492
- fields: C
5492
+ fields: z
5493
5493
  };
5494
5494
  }
5495
5495
  return f;
@@ -5502,7 +5502,7 @@ const Kl = ({
5502
5502
  }, g = N.map((f) => ({
5503
5503
  label: f.text,
5504
5504
  href: f.href || "#"
5505
- })), z = K(() => {
5505
+ })), S = K(() => {
5506
5506
  o(!0);
5507
5507
  }, []), A = K((f) => {
5508
5508
  o(!1), f.primary && window.history.back();
@@ -5512,7 +5512,7 @@ const Kl = ({
5512
5512
  window.history.back();
5513
5513
  }, []), P = (() => {
5514
5514
  if (h.headingKey && Array.isArray(r)) {
5515
- 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);
5516
5516
  if (I && I.fields) {
5517
5517
  const D = I.fields.find((b) => b && b.key === O);
5518
5518
  if (D)
@@ -5522,8 +5522,8 @@ const Kl = ({
5522
5522
  if (Array.isArray(r)) {
5523
5523
  for (const f of r)
5524
5524
  if (f && f.fields) {
5525
- const C = f.fields.find((O) => O && O.key === "displayname");
5526
- 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;
5527
5527
  }
5528
5528
  }
5529
5529
  return h.heading || a;
@@ -5555,8 +5555,8 @@ const Kl = ({
5555
5555
  configuration: v
5556
5556
  }), [v]), q = ae(() => [
5557
5557
  { label: "Overview", content: x(U) },
5558
- { label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: Y, disableApi: s, onSave: F, onShowCancelModal: z, onCancel: R }) }
5559
- ], [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]);
5560
5560
  function $(f) {
5561
5561
  return f ? f.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: f } }) : f : "📱";
5562
5562
  }
@@ -5586,10 +5586,10 @@ const Kl = ({
5586
5586
  ] }),
5587
5587
  /* @__PURE__ */ n("section", { children: [
5588
5588
  /* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
5589
- /* @__PURE__ */ e("ul", { className: "space-y-3", children: f.features.map((C, O) => /* @__PURE__ */ n("li", { children: [
5590
- /* @__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 }),
5591
5591
  /* @__PURE__ */ e("br", {}),
5592
- /* @__PURE__ */ e("span", { className: "text-gray-700", children: C.description })
5592
+ /* @__PURE__ */ e("span", { className: "text-gray-700", children: z.description })
5593
5593
  ] }, O)) })
5594
5594
  ] })
5595
5595
  ] });
@@ -5610,25 +5610,25 @@ const Kl = ({
5610
5610
  /* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
5611
5611
  /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: j.heading }),
5612
5612
  /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: j.subHeading }),
5613
- /* @__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(
5614
5614
  "span",
5615
5615
  {
5616
5616
  className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
5617
5617
  children: f
5618
5618
  },
5619
- C
5619
+ z
5620
5620
  )) })
5621
5621
  ] })
5622
5622
  ] }),
5623
5623
  /* @__PURE__ */ n("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
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, 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(
5625
5625
  "button",
5626
5626
  {
5627
- onClick: () => l(C),
5628
- 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`,
5629
5629
  children: f.label
5630
5630
  },
5631
- C
5631
+ z
5632
5632
  )) }) }),
5633
5633
  /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: q[i].content })
5634
5634
  ] }),
@@ -5655,7 +5655,7 @@ const Kl = ({
5655
5655
  allowReorder: o = !0,
5656
5656
  initialData: u = null
5657
5657
  }) => {
5658
- 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("");
5659
5659
  te(() => {
5660
5660
  Array.isArray(u) && d(u);
5661
5661
  }, [u]);
@@ -5663,65 +5663,65 @@ const Kl = ({
5663
5663
  l && (N(p._id), r(p.categoryName || ""));
5664
5664
  }, U = () => {
5665
5665
  if (!i || h !== null) return;
5666
- const k = (v.length > 0 ? Math.max(...v.map((w) => typeof w._id == "number" ? w._id : 0)) : 0) + 1;
5667
- d((w) => [
5668
- ...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,
5669
5669
  {
5670
- _id: k,
5670
+ _id: w,
5671
5671
  categoryName: "",
5672
5672
  links: [],
5673
- order: (w.at(-1)?.order ?? 0) + 1,
5673
+ order: (k.at(-1)?.order ?? 0) + 1,
5674
5674
  protected: !1,
5675
5675
  _class: "com.unifyed.model.Collection"
5676
5676
  }
5677
- ]), N(k), r("");
5677
+ ]), N(w), r("");
5678
5678
  }, Y = () => {
5679
5679
  h != null && (d((p) => {
5680
- const w = !Array.isArray(u) || !u.some((T) => T._id === h) ? p.filter((T) => T._id !== h) : p;
5681
- 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;
5682
5682
  }), N(null), r(""));
5683
5683
  }, q = () => {
5684
5684
  h == null || !y.trim() || (d((p) => {
5685
- const k = p.map((w) => w._id === h ? {
5686
- ...w,
5685
+ const w = p.map((k) => k._id === h ? {
5686
+ ...k,
5687
5687
  categoryName: y.trim()
5688
- } : w);
5689
- return a?.(k), k;
5688
+ } : k);
5689
+ return a?.(w), w;
5690
5690
  }), N(null), r(""));
5691
5691
  }, $ = (p) => {
5692
- m && d((k) => {
5693
- const w = k.filter((T) => T._id !== p._id);
5694
- return a?.(w), w;
5692
+ m && d((w) => {
5693
+ const k = w.filter((T) => T._id !== p._id);
5694
+ return a?.(k), k;
5695
5695
  });
5696
- }, x = (p, k, w) => {
5697
- const T = Number(k), M = Number(w);
5698
- if (!o || T === M) return p;
5699
- const S = p.findIndex((G) => Number(G._id) === T), B = p.findIndex((G) => Number(G._id) === M);
5700
- if (S === -1 || B === -1) return p;
5701
- const _ = [...p], [E] = _.splice(S, 1);
5702
- return _.splice(B, 0, E), _.map((G, J) => ({ ...G, order: J + 1 }));
5703
- }, f = (p, k) => {
5704
- o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(k)), z(Number(k)));
5705
- }, 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) => {
5706
5706
  g && p !== A && F(p);
5707
5707
  }, O = (p) => {
5708
5708
  p.preventDefault();
5709
- }, I = (p, k) => {
5709
+ }, I = (p, w) => {
5710
5710
  p.preventDefault();
5711
- const w = p.dataTransfer.getData("text/plain"), T = w === "0" ? 0 : Number(w), M = k === "0" ? 0 : Number(k);
5712
- T === void 0 || M === void 0 || (d((S) => {
5713
- const B = x(S, T, M);
5714
- return a?.(B), B;
5715
- }), 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));
5716
5716
  }, D = () => {
5717
- z(null), F(null);
5717
+ S(null), F(null);
5718
5718
  }, b = Array.isArray(v) ? v.filter(
5719
5719
  (p) => p.categoryName?.toLowerCase().includes(R.toLowerCase())
5720
5720
  ) : [];
5721
5721
  return /* @__PURE__ */ n("div", { className: `manage-collection-list ${t}`, children: [
5722
5722
  /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
5723
5723
  s && /* @__PURE__ */ e(
5724
- pe,
5724
+ ge,
5725
5725
  {
5726
5726
  value: R,
5727
5727
  onDebouncedChange: P,
@@ -5743,31 +5743,31 @@ const Kl = ({
5743
5743
  )
5744
5744
  ] }) }),
5745
5745
  /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: b.map((p) => {
5746
- 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;
5747
5747
  return /* @__PURE__ */ e(
5748
5748
  "div",
5749
5749
  {
5750
- onDragEnter: () => C(p._id),
5750
+ onDragEnter: () => z(p._id),
5751
5751
  onDragOver: O,
5752
- onDrop: (S) => I(S, p._id),
5752
+ onDrop: (C) => I(C, p._id),
5753
5753
  onDragEnd: D,
5754
5754
  className: [
5755
5755
  "flex items-center justify-between p-3 border rounded-2xl mb-3",
5756
5756
  "border-gray-300",
5757
- M ? "ring-2 ring-gray-800/20" : "",
5757
+ L ? "ring-2 ring-gray-800/20" : "",
5758
5758
  T ? "opacity-60" : ""
5759
5759
  ].join(" "),
5760
- children: k ? /* @__PURE__ */ n(ee, { children: [
5760
+ children: w ? /* @__PURE__ */ n(ee, { children: [
5761
5761
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
5762
5762
  "input",
5763
5763
  {
5764
5764
  type: "text",
5765
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",
5766
5766
  value: y,
5767
- placeholder: !Array.isArray(u) || !u.some((S) => S._id === p._id) ? "New collection name" : "Edit collection name",
5768
- onChange: (S) => r(S.target.value),
5769
- onKeyDown: (S) => {
5770
- 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();
5771
5771
  },
5772
5772
  autoFocus: !0
5773
5773
  }
@@ -5779,7 +5779,7 @@ const Kl = ({
5779
5779
  className: "cursor-pointer border border-gray-300 p-2 rounded-2xl",
5780
5780
  onClick: Y,
5781
5781
  "aria-label": "Cancel edit",
5782
- children: /* @__PURE__ */ e(xe, { color: "#767676" })
5782
+ children: /* @__PURE__ */ e(ve, { color: "#767676" })
5783
5783
  }
5784
5784
  ),
5785
5785
  /* @__PURE__ */ e(
@@ -5806,14 +5806,14 @@ const Kl = ({
5806
5806
  "aria-label": "Drag to reorder",
5807
5807
  className: "cursor-grab active:cursor-grabbing p-1 -m-1 rounded-md hover:bg-gray-50",
5808
5808
  draggable: !0,
5809
- onDragStart: (S) => f(S, p._id),
5809
+ onDragStart: (C) => f(C, p._id),
5810
5810
  children: /* @__PURE__ */ e(wt, {})
5811
5811
  }
5812
5812
  ),
5813
5813
  /* @__PURE__ */ e("span", { children: p.categoryName })
5814
5814
  ] }),
5815
5815
  /* @__PURE__ */ n("div", { className: "flex gap-2 items-center", children: [
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: `${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"}` }),
5817
5817
  l && /* @__PURE__ */ e(
5818
5818
  "button",
5819
5819
  {
@@ -5826,10 +5826,10 @@ const Kl = ({
5826
5826
  m && /* @__PURE__ */ e(
5827
5827
  "span",
5828
5828
  {
5829
- className: w === 0 && !p.protected ? "cursor-pointer" : "cursor-not-allowed",
5830
- title: w === 0 && !p.protected ? "Delete" : "Cannot delete a collection with linked items",
5831
- onClick: w === 0 ? () => $(p) : null,
5832
- 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" })
5833
5833
  }
5834
5834
  )
5835
5835
  ] })
@@ -5929,34 +5929,37 @@ const Bt = () => {
5929
5929
  showPrint: v = !1,
5930
5930
  showExcel: d = !1,
5931
5931
  showPdf: g = !1,
5932
- showRefresh: z = !1,
5932
+ showRefresh: S = !1,
5933
5933
  showAdd: A = !1,
5934
+ iSelectedRecords: F = 0,
5934
5935
  // Additional props
5935
- searchPlaceholder: F = "Search...",
5936
- handleRefreshClick: R = () => {
5936
+ searchPlaceholder: R = "Search...",
5937
+ handleRefreshClick: P = () => {
5938
+ },
5939
+ handleSearchChange: j = () => {
5937
5940
  },
5938
- handleSearchChange: P = () => {
5941
+ handleDeleteClick: U = () => {
5939
5942
  },
5940
5943
  // Optional: override export file names
5941
- excelFileName: j,
5942
- pdfFileName: U,
5943
- searchIconSize: Y,
5944
- searchIconClass: q,
5945
- inputStyle: $
5944
+ excelFileName: Y,
5945
+ pdfFileName: q,
5946
+ searchIconSize: $,
5947
+ searchIconClass: x,
5948
+ inputStyle: f
5946
5949
  }) => {
5947
- 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(
5948
- (w) => {
5949
- const T = x();
5950
- if (T?.openColumnChooser) {
5951
- if (typeof window > "u" || !w?.currentTarget) {
5952
- 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();
5953
5956
  return;
5954
5957
  }
5955
5958
  try {
5956
- const M = w.currentTarget.getBoundingClientRect(), S = M.left + window.scrollX, B = M.bottom + window.scrollY;
5957
- let _ = S - 120, E = B - 120;
5958
- const G = window.innerWidth, J = window.innerHeight;
5959
- _ = 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);
5960
5963
  } catch (M) {
5961
5964
  console.log("coloumn choose error", M);
5962
5965
  }
@@ -5964,34 +5967,36 @@ const Bt = () => {
5964
5967
  },
5965
5968
  []
5966
5969
  // no external deps; reads ref at call time
5967
- ), k = K(
5968
- (w, T) => {
5969
- const M = x();
5970
+ ), T = K(
5971
+ (L, C) => {
5972
+ const M = z();
5970
5973
  if (M)
5971
- switch (w) {
5974
+ switch (L) {
5972
5975
  case "Delete": {
5973
- const S = M.getSelectedRecords();
5974
- console.log("delete action is clicked", S), N && M.getSelectedRecords?.();
5976
+ if (N) {
5977
+ const _ = M.getSelectedRecords();
5978
+ return U(_);
5979
+ }
5975
5980
  break;
5976
5981
  }
5977
5982
  case "ColumnChooser":
5978
- y && (T ? p(T) : M.openColumnChooser?.());
5983
+ y && (C ? k(C) : M.openColumnChooser?.());
5979
5984
  break;
5980
5985
  case "Print":
5981
5986
  v && M.print?.();
5982
5987
  break;
5983
5988
  case "Excel":
5984
- d && M.excelExport?.({ fileName: I });
5989
+ d && M.excelExport?.({ fileName: b });
5985
5990
  break;
5986
5991
  case "Pdf":
5987
- g && M.pdfExport?.({ fileName: D });
5992
+ g && M.pdfExport?.({ fileName: p });
5988
5993
  break;
5989
5994
  case "Refresh":
5990
- z && R();
5995
+ S && P();
5991
5996
  break;
5992
5997
  }
5993
5998
  },
5994
- [y, v, d, g, z, I, D, R, p]
5999
+ [y, v, d, g, S, b, p, P, k]
5995
6000
  );
5996
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: [
5997
6002
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
@@ -6004,38 +6009,39 @@ const Bt = () => {
6004
6009
  ] }),
6005
6010
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
6006
6011
  h && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
6007
- pe,
6012
+ ge,
6008
6013
  {
6009
- placeholder: F,
6010
- value: f,
6011
- onDebouncedChange: (w) => {
6012
- C(w), P(w);
6014
+ placeholder: R,
6015
+ value: O,
6016
+ onDebouncedChange: (L) => {
6017
+ I(L), j(L);
6013
6018
  },
6014
- searchIconSize: Y || 16,
6015
- searchIconClass: q || "",
6016
- inputStyle: $ || { paddingTop: "4px", paddingBottom: "4px" }
6019
+ searchIconSize: $ || 16,
6020
+ searchIconClass: x || "",
6021
+ inputStyle: f || { paddingTop: "4px", paddingBottom: "4px" }
6017
6022
  }
6018
6023
  ) }),
6019
6024
  /* @__PURE__ */ n("div", { className: "flex gap-3", children: [
6020
6025
  /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
6021
6026
  N && /* @__PURE__ */ e(
6022
- ke,
6027
+ Ce,
6023
6028
  {
6024
6029
  icon: Le,
6025
- onClick: () => k("Delete"),
6026
- ariaLabel: "Delete"
6030
+ onClick: () => T("Delete"),
6031
+ ariaLabel: "Delete",
6032
+ disabled: F === 0
6027
6033
  }
6028
6034
  ),
6029
6035
  y && /* @__PURE__ */ e(
6030
- ke,
6036
+ Ce,
6031
6037
  {
6032
6038
  icon: vr,
6033
- onClick: (w) => k("ColumnChooser", w),
6039
+ onClick: (L) => T("ColumnChooser", L),
6034
6040
  ariaLabel: "Column Chooser"
6035
6041
  }
6036
6042
  ),
6037
6043
  r && /* @__PURE__ */ e(
6038
- ke,
6044
+ Ce,
6039
6045
  {
6040
6046
  icon: Nr,
6041
6047
  onClick: o,
@@ -6043,34 +6049,34 @@ const Bt = () => {
6043
6049
  }
6044
6050
  ),
6045
6051
  v && /* @__PURE__ */ e(
6046
- ke,
6052
+ Ce,
6047
6053
  {
6048
6054
  icon: wr,
6049
- onClick: () => k("Print"),
6055
+ onClick: () => T("Print"),
6050
6056
  ariaLabel: "Print"
6051
6057
  }
6052
6058
  ),
6053
6059
  d && /* @__PURE__ */ e(
6054
- ke,
6060
+ Ce,
6055
6061
  {
6056
6062
  icon: kr,
6057
- onClick: () => k("Excel"),
6063
+ onClick: () => T("Excel"),
6058
6064
  ariaLabel: "Excel Download"
6059
6065
  }
6060
6066
  ),
6061
6067
  g && /* @__PURE__ */ e(
6062
- ke,
6068
+ Ce,
6063
6069
  {
6064
6070
  icon: Cr,
6065
- onClick: () => k("Pdf"),
6071
+ onClick: () => T("Pdf"),
6066
6072
  ariaLabel: "PDF Download"
6067
6073
  }
6068
6074
  ),
6069
- z && /* @__PURE__ */ e(
6070
- ke,
6075
+ S && /* @__PURE__ */ e(
6076
+ Ce,
6071
6077
  {
6072
6078
  icon: zr,
6073
- onClick: () => k("Refresh"),
6079
+ onClick: () => T("Refresh"),
6074
6080
  ariaLabel: "Refresh"
6075
6081
  }
6076
6082
  )
@@ -6091,7 +6097,6 @@ const Bt = () => {
6091
6097
  ] });
6092
6098
  };
6093
6099
  function ai(t) {
6094
- console.log("consoling from CustomDataGrid****");
6095
6100
  const {
6096
6101
  data: a = [],
6097
6102
  totalCount: s = 0,
@@ -6108,7 +6113,7 @@ function ai(t) {
6108
6113
  allowExcelExport: v = !1,
6109
6114
  allowPdfExport: d = !1,
6110
6115
  showColumnChooser: g = !1,
6111
- enableSearchApi: z = !1,
6116
+ enableSearchApi: S = !1,
6112
6117
  height: A = "600",
6113
6118
  selectionSettings: F,
6114
6119
  enableCheckbox: R = !1,
@@ -6119,11 +6124,11 @@ function ai(t) {
6119
6124
  onRowDoubleClick: q,
6120
6125
  apiRef: $,
6121
6126
  gridProps: x = {}
6122
- } = t, f = be(null), {
6123
- pageSettings: C,
6127
+ } = t, f = fe(null), {
6128
+ pageSettings: z,
6124
6129
  sortSettings: O,
6125
6130
  ...I
6126
- } = 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(() => {
6131
+ } = 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(() => {
6127
6132
  const V = F || {
6128
6133
  type: "Multiple",
6129
6134
  mode: "Row"
@@ -6139,12 +6144,12 @@ function ai(t) {
6139
6144
  } : V;
6140
6145
  }, [F, R]), _ = ae(() => {
6141
6146
  const V = [ln];
6142
- 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;
6147
+ 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;
6143
6148
  }, [
6144
6149
  u,
6145
6150
  h,
6146
6151
  N,
6147
- z,
6152
+ S,
6148
6153
  v,
6149
6154
  d,
6150
6155
  g,
@@ -6153,35 +6158,35 @@ function ai(t) {
6153
6158
  R,
6154
6159
  F
6155
6160
  ]), E = ae(() => {
6156
- const V = () => f.current, ne = (W, ce) => {
6157
- !ce && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
6161
+ const V = () => f.current, ne = (J, ce) => {
6162
+ !ce && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
6158
6163
  };
6159
6164
  return {
6160
6165
  getInstance: () => V(),
6161
6166
  refresh: () => V()?.refresh?.(),
6162
6167
  getSelectedRecords: () => V()?.getSelectedRecords?.() ?? [],
6163
6168
  clearSelection: () => V()?.clearSelection?.(),
6164
- selectRow: (W, ce = !1) => V()?.selectRow?.(W, ce),
6165
- selectRows: (W, ce = !1) => V()?.selectRows?.(W, ce),
6166
- search: (W) => {
6167
- ne("search()", z), V()?.search?.(W);
6169
+ selectRow: (J, ce = !1) => V()?.selectRow?.(J, ce),
6170
+ selectRows: (J, ce = !1) => V()?.selectRows?.(J, ce),
6171
+ search: (J) => {
6172
+ ne("search()", S), V()?.search?.(J);
6168
6173
  },
6169
6174
  print: () => V()?.print?.(),
6170
- excelExport: (W) => {
6171
- ne("excelExport()", v), V()?.excelExport?.(W);
6175
+ excelExport: (J) => {
6176
+ ne("excelExport()", v), V()?.excelExport?.(J);
6172
6177
  },
6173
- pdfExport: (W) => {
6174
- ne("pdfExport()", d), V()?.pdfExport?.(W);
6178
+ pdfExport: (J) => {
6179
+ ne("pdfExport()", d), V()?.pdfExport?.(J);
6175
6180
  },
6176
- openColumnChooser: (W, ce) => {
6177
- ne("openColumnChooser()", g), V()?.columnChooserModule?.openColumnChooser?.(W, ce);
6181
+ openColumnChooser: (J, ce) => {
6182
+ ne("openColumnChooser()", g), V()?.columnChooserModule?.openColumnChooser?.(J, ce);
6178
6183
  },
6179
6184
  // Additional useful methods
6180
6185
  getColumns: () => V()?.getColumns?.(),
6181
6186
  getFilteredRecords: () => V()?.getFilteredRecords?.(),
6182
- autoFitColumns: (W) => V()?.autoFitColumns?.(W)
6187
+ autoFitColumns: (J) => V()?.autoFitColumns?.(J)
6183
6188
  };
6184
- }, [z, v, d, g]);
6189
+ }, [S, v, d, g]);
6185
6190
  te(() => {
6186
6191
  $ && ($.current = E);
6187
6192
  }, [$, E]), te(() => () => {
@@ -6190,8 +6195,8 @@ function ai(t) {
6190
6195
  const G = (V) => {
6191
6196
  const ne = String(V || "");
6192
6197
  return ne === "Ascending" || ne === "Descending" ? ne : ne.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6193
- }, J = (V) => {
6194
- 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) => ({
6198
+ }, W = (V) => {
6199
+ 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) => ({
6195
6200
  field: Ie.field,
6196
6201
  dir: G(Ie.direction ?? Ie.dir)
6197
6202
  })), nt = V?.searchString ?? "", st = V?.columns ?? ne?.filterSettings?.columns ?? [];
@@ -6208,11 +6213,11 @@ function ai(t) {
6208
6213
  filters: st,
6209
6214
  rawEvent: V
6210
6215
  };
6211
- }, ve = (V) => {
6216
+ }, pe = (V) => {
6212
6217
  setTimeout(() => {
6213
6218
  f?.current?.hideSpinner();
6214
- }, 1e3), V.requestType === "paging" && (b(V.currentPage), k(V.pageSize)), V.requestType === "sorting" && (T(V.columnName || "updatedDate"), S(V.direction)), j?.(J(V), V);
6215
- }, $e = (V) => {
6219
+ }, 1e3), V.requestType === "paging" && (b(V.currentPage), w(V.pageSize)), V.requestType === "sorting" && (T(V.columnName || "updatedDate"), C(V.direction)), j?.(W(V), V);
6220
+ }, Ne = (V) => {
6216
6221
  q?.(V?.rowData, V);
6217
6222
  }, Ta = () => {
6218
6223
  const V = [];
@@ -6229,7 +6234,7 @@ function ai(t) {
6229
6234
  },
6230
6235
  "__checkbox__"
6231
6236
  )
6232
- ), P.forEach((ne, W) => {
6237
+ ), P.forEach((ne, J) => {
6233
6238
  const {
6234
6239
  field: ce,
6235
6240
  headerText: Re,
@@ -6269,21 +6274,19 @@ function ai(t) {
6269
6274
  customAttributes: Ba,
6270
6275
  ...Va
6271
6276
  },
6272
- ce || `col-${W}`
6277
+ ce || `col-${J}`
6273
6278
  )
6274
6279
  );
6275
6280
  }), V;
6276
- };
6277
- console.log();
6278
- const Aa = ae(() => ({
6281
+ }, Aa = ae(() => ({
6279
6282
  currentPage: D,
6280
6283
  pageSize: p,
6281
- pageSizes: C?.pageSizes ?? [10, 20, 40, 60, 80, 100],
6284
+ pageSizes: z?.pageSizes ?? [10, 20, 40, 60, 80, 100],
6282
6285
  totalCount: s
6283
- }), [D, p, C?.pageSizes, s]), Fa = ae(() => O ?? {
6284
- columns: [{ field: w, direction: G(M) }],
6286
+ }), [D, p, z?.pageSizes, s]), Fa = ae(() => O ?? {
6287
+ columns: [{ field: k, direction: G(L) }],
6285
6288
  allowUnsort: !1
6286
- }, [O, w, M]);
6289
+ }, [O, k, L]);
6287
6290
  return /* @__PURE__ */ n(
6288
6291
  xn,
6289
6292
  {
@@ -6301,13 +6304,13 @@ function ai(t) {
6301
6304
  allowReordering: y,
6302
6305
  allowResizing: r,
6303
6306
  showColumnChooser: g,
6304
- selectionSettings: B,
6307
+ selectionSettings: M,
6305
6308
  pageSettings: Aa,
6306
6309
  sortSettings: Fa,
6307
- actionBegin: ve,
6310
+ actionBegin: pe,
6308
6311
  rowSelected: U,
6309
6312
  rowDeselected: Y,
6310
- recordDoubleClick: $e,
6313
+ recordDoubleClick: Ne,
6311
6314
  cssClass: "custom-grid-padding",
6312
6315
  ...I,
6313
6316
  children: [
@@ -6435,7 +6438,7 @@ function Ts({
6435
6438
  /* @__PURE__ */ e("span", { children: N })
6436
6439
  ] }),
6437
6440
  /* @__PURE__ */ n("div", { className: "mt-2 flex items-center gap-3", children: [
6438
- /* @__PURE__ */ e(Ne, { name: "John", size: "medium" }),
6441
+ /* @__PURE__ */ e(we, { name: "John", size: "medium" }),
6439
6442
  /* @__PURE__ */ n("div", { className: "leading-tight", children: [
6440
6443
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100", children: h }),
6441
6444
  /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${g.meta}`, children: N })
@@ -6577,9 +6580,9 @@ function Is({
6577
6580
  ] }),
6578
6581
  /* @__PURE__ */ n("div", { className: "flex gap-1 justify-center items-center", children: [
6579
6582
  /* @__PURE__ */ n(zn, { children: [
6580
- /* @__PURE__ */ e(Ne, { size: "small", src: d.avatar, name: "John" }),
6581
- /* @__PURE__ */ e(Ne, { size: "small", src: d.avatar, name: "Omi" }),
6582
- /* @__PURE__ */ e(Ne, { size: "small", src: d.avatar, name: "Raj" })
6583
+ /* @__PURE__ */ e(we, { size: "small", src: d.avatar, name: "John" }),
6584
+ /* @__PURE__ */ e(we, { size: "small", src: d.avatar, name: "Omi" }),
6585
+ /* @__PURE__ */ e(we, { size: "small", src: d.avatar, name: "Raj" })
6583
6586
  ] }),
6584
6587
  /* @__PURE__ */ n("span", { className: "ml-2 text-slate-400", children: [
6585
6588
  "+ ",
@@ -6829,18 +6832,18 @@ function _s({
6829
6832
  // optional full embed URL override
6830
6833
  ...v
6831
6834
  }) {
6832
- const d = de(t), g = me[d], z = Bs[d], A = r || js(N, y);
6835
+ const d = de(t), g = me[d], S = Bs[d], A = r || js(N, y);
6833
6836
  return /* @__PURE__ */ e(
6834
6837
  oe,
6835
6838
  {
6836
- className: `flex flex-col ${g.card} ${z.wrap}`,
6839
+ className: `flex flex-col ${g.card} ${S.wrap}`,
6837
6840
  showCheckbox: a,
6838
6841
  checkboxPosition: s,
6839
6842
  onSelect: i,
6840
6843
  identity: l,
6841
6844
  details: { type: "campus-map", title: m, campusName: o, activeFilter: h, mapQuery: N, zoom: y },
6842
6845
  ...v,
6843
- children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${z.mapH}`, children: [
6846
+ children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${S.mapH}`, children: [
6844
6847
  /* @__PURE__ */ e(
6845
6848
  "iframe",
6846
6849
  {
@@ -6854,7 +6857,7 @@ function _s({
6854
6857
  }
6855
6858
  ),
6856
6859
  /* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
6857
- /* @__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: [
6860
+ /* @__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: [
6858
6861
  /* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: o }),
6859
6862
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
6860
6863
  ] }),
@@ -6863,8 +6866,8 @@ function _s({
6863
6866
  /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
6864
6867
  ] })
6865
6868
  ] }),
6866
- /* @__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)) }) }),
6867
- /* @__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: [
6869
+ /* @__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)) }) }),
6870
+ /* @__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: [
6868
6871
  /* @__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" }) }),
6869
6872
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
6870
6873
  ] }) })
@@ -7035,7 +7038,7 @@ function Ws({
7035
7038
  selectedIndex: u = 0,
7036
7039
  ...h
7037
7040
  }) {
7038
- const [N, y] = L(u), r = de(t), v = me[r], d = Gs[r], g = o[N] || o[0], z = (F, R) => {
7041
+ const [N, y] = B(u), r = de(t), v = me[r], d = Gs[r], g = o[N] || o[0], S = (F, R) => {
7039
7042
  y(R), i?.(F);
7040
7043
  }, A = r === "lg";
7041
7044
  return /* @__PURE__ */ n(
@@ -7062,7 +7065,7 @@ function Ws({
7062
7065
  ev: F,
7063
7066
  sizeMeta: d,
7064
7067
  isSelected: R === N,
7065
- onClick: (P) => z(P, R)
7068
+ onClick: (P) => S(P, R)
7066
7069
  },
7067
7070
  F._id || F.id || R
7068
7071
  )) }),
@@ -7076,7 +7079,7 @@ function Ws({
7076
7079
  ev: F,
7077
7080
  sizeMeta: d,
7078
7081
  isSelected: R === N,
7079
- onClick: (P) => z(P, R)
7082
+ onClick: (P) => S(P, R)
7080
7083
  },
7081
7084
  F._id || F.id || R
7082
7085
  )) })
@@ -7223,7 +7226,7 @@ function Hs({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
7223
7226
  /* @__PURE__ */ n("div", { className: "flex-grow min-w-0 space-y-1", children: [
7224
7227
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
7225
7228
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
7226
- /* @__PURE__ */ e(Ne, { name: t.sender, size: "small" }),
7229
+ /* @__PURE__ */ e(we, { name: t.sender, size: "small" }),
7227
7230
  /* @__PURE__ */ e("span", { className: `${a.sender} text-zinc-900 dark:text-zinc-100 ${t.unread ? "font-bold" : ""}`, children: t.sender })
7228
7231
  ] }),
7229
7232
  /* @__PURE__ */ n("div", { className: `flex items-center gap-1 ${a.time} text-zinc-500 dark:text-zinc-400`, children: [
@@ -7252,7 +7255,7 @@ function Qs({
7252
7255
  onPin: N,
7253
7256
  ...y
7254
7257
  }) {
7255
- const [r, v] = L(u), d = de(t), g = me[d], z = Xs[d], A = (P, j) => {
7258
+ const [r, v] = B(u), d = de(t), g = me[d], S = Xs[d], A = (P, j) => {
7256
7259
  v(j), i?.(P);
7257
7260
  }, F = (P) => {
7258
7261
  const j = { ...P, starred: !P.starred };
@@ -7264,7 +7267,7 @@ function Qs({
7264
7267
  return /* @__PURE__ */ n(
7265
7268
  oe,
7266
7269
  {
7267
- className: `flex flex-col ${g.card} ${z.wrap}`,
7270
+ className: `flex flex-col ${g.card} ${S.wrap}`,
7268
7271
  showCheckbox: a,
7269
7272
  checkboxPosition: s,
7270
7273
  onSelect: i,
@@ -7273,12 +7276,12 @@ function Qs({
7273
7276
  ...y,
7274
7277
  children: [
7275
7278
  /* @__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 }) }),
7276
- /* @__PURE__ */ e(pe, { placeholder: "Type to search..." }),
7279
+ /* @__PURE__ */ e(ge, { placeholder: "Type to search..." }),
7277
7280
  /* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((P, j) => /* @__PURE__ */ e(
7278
7281
  Hs,
7279
7282
  {
7280
7283
  email: P,
7281
- sizeMeta: z,
7284
+ sizeMeta: S,
7282
7285
  isSelected: j === r,
7283
7286
  onClick: (U) => A(U, j),
7284
7287
  onStar: F,
@@ -7421,7 +7424,7 @@ function Ut({ contact: t, sizeMeta: a, isSelected: s, onClick: i }) {
7421
7424
  /* @__PURE__ */ e("div", { className: `${a.department} text-zinc-500 dark:text-zinc-500 line-clamp-1`, children: t.department })
7422
7425
  ] })
7423
7426
  ] }),
7424
- /* @__PURE__ */ e(ye, { className: "h-4 w-4 text-zinc-400 group-hover:text-blue-500 transition-colors duration-200" })
7427
+ /* @__PURE__ */ e(xe, { className: "h-4 w-4 text-zinc-400 group-hover:text-blue-500 transition-colors duration-200" })
7425
7428
  ]
7426
7429
  }
7427
7430
  );
@@ -7504,9 +7507,9 @@ function al({
7504
7507
  selectedIndex: u = 0,
7505
7508
  ...h
7506
7509
  }) {
7507
- const [N, y] = L(u), r = de(t), v = me[r], d = Ks[r], g = (F, R) => {
7510
+ const [N, y] = B(u), r = de(t), v = me[r], d = Ks[r], g = (F, R) => {
7508
7511
  y(R), i?.(F);
7509
- }, z = o[N] || o[0], A = d.layout === "split";
7512
+ }, S = o[N] || o[0], A = d.layout === "split";
7510
7513
  return /* @__PURE__ */ n(
7511
7514
  oe,
7512
7515
  {
@@ -7534,7 +7537,7 @@ function al({
7534
7537
  /* @__PURE__ */ e(
7535
7538
  el,
7536
7539
  {
7537
- contact: z,
7540
+ contact: S,
7538
7541
  sizeMeta: d
7539
7542
  }
7540
7543
  )
@@ -7701,16 +7704,16 @@ function sl({
7701
7704
  /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: Te(N) })
7702
7705
  ] })
7703
7706
  ] }),
7704
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((z, A) => /* @__PURE__ */ e(
7707
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((S, A) => /* @__PURE__ */ e(
7705
7708
  rl,
7706
7709
  {
7707
7710
  side: A === 0 ? "left" : "right",
7708
- date: z.date,
7709
- title: z.title,
7710
- amount: z.amount,
7711
- kind: z.kind
7711
+ date: S.date,
7712
+ title: S.title,
7713
+ amount: S.amount,
7714
+ kind: S.kind
7712
7715
  },
7713
- z.id || A
7716
+ S.id || A
7714
7717
  )) })
7715
7718
  ] })
7716
7719
  ] }),
@@ -7829,7 +7832,7 @@ function il({
7829
7832
  term: o = "Fall 2025",
7830
7833
  ...u
7831
7834
  }) {
7832
- 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];
7835
+ 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];
7833
7836
  return /* @__PURE__ */ n(
7834
7837
  oe,
7835
7838
  {
@@ -7879,14 +7882,14 @@ function il({
7879
7882
  Ye.map((A) => /* @__PURE__ */ e(Gt, { leave: A, sizeMeta: g }, A.id))
7880
7883
  ) : g.showSingleLeave ? (
7881
7884
  // MD: Show active tab leave type
7882
- /* @__PURE__ */ e(Gt, { leave: z, sizeMeta: g })
7885
+ /* @__PURE__ */ e(Gt, { leave: S, sizeMeta: g })
7883
7886
  ) : (
7884
7887
  // SM: Show only available hours
7885
7888
  /* @__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: [
7886
7889
  /* @__PURE__ */ e(Ae, { className: "h-5 w-5 text-blue-600 dark:text-blue-400" }),
7887
7890
  /* @__PURE__ */ n("div", { children: [
7888
7891
  /* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${g.table}`, children: "Available Leave" }),
7889
- /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${g.table}`, children: z.available })
7892
+ /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${g.table}`, children: S.available })
7890
7893
  ] })
7891
7894
  ] }) })
7892
7895
  ) }),
@@ -8007,7 +8010,7 @@ function qt({ item: t, sizeMeta: a, showDate: s = !1 }) {
8007
8010
  /* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 truncate ${a.item}`, children: t.name }),
8008
8011
  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 })
8009
8012
  ] }),
8010
- /* @__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" })
8013
+ /* @__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" })
8011
8014
  ] });
8012
8015
  }
8013
8016
  function ml({
@@ -8020,7 +8023,7 @@ function ml({
8020
8023
  subtitle: o = "Drive Shared",
8021
8024
  ...u
8022
8025
  }) {
8023
- const [h, N] = L(!1), y = de(t), r = me[y], v = dl[y];
8026
+ const [h, N] = B(!1), y = de(t), r = me[y], v = dl[y];
8024
8027
  return /* @__PURE__ */ n(
8025
8028
  oe,
8026
8029
  {
@@ -8080,7 +8083,7 @@ function ml({
8080
8083
  ] }),
8081
8084
  /* @__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: [
8082
8085
  "View All",
8083
- /* @__PURE__ */ e(ye, { className: "h-4 w-4" })
8086
+ /* @__PURE__ */ e(xe, { className: "h-4 w-4" })
8084
8087
  ] })
8085
8088
  ]
8086
8089
  }
@@ -8212,13 +8215,13 @@ const ul = [
8212
8215
  }
8213
8216
  };
8214
8217
  function gl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8215
- const [l, m] = L(!1), o = $a(t.type), u = pl(t.type);
8218
+ const [l, m] = B(!1), o = $a(t.type), u = pl(t.type);
8216
8219
  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: [
8217
8220
  /* @__PURE__ */ e(
8218
8221
  "button",
8219
8222
  {
8220
8223
  className: "absolute top-3 right-3 p-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors duration-200",
8221
- children: /* @__PURE__ */ e(xe, { className: "h-3 w-3 text-zinc-500 dark:text-zinc-400" })
8224
+ children: /* @__PURE__ */ e(ve, { className: "h-3 w-3 text-zinc-500 dark:text-zinc-400" })
8222
8225
  }
8223
8226
  ),
8224
8227
  /* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
@@ -8236,7 +8239,7 @@ function gl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8236
8239
  ] });
8237
8240
  }
8238
8241
  function bl({ alert: t, onDismiss: a }) {
8239
- const [s, i] = L(!1), l = $a("banner"), m = () => {
8242
+ const [s, i] = B(!1), l = $a("banner"), m = () => {
8240
8243
  i(!0), a?.(t);
8241
8244
  };
8242
8245
  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: [
@@ -8250,7 +8253,7 @@ function bl({ alert: t, onDismiss: a }) {
8250
8253
  {
8251
8254
  onClick: m,
8252
8255
  className: "flex-shrink-0 p-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors duration-200",
8253
- children: /* @__PURE__ */ e(xe, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400" })
8256
+ children: /* @__PURE__ */ e(ve, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400" })
8254
8257
  }
8255
8258
  )
8256
8259
  ] }) });
@@ -8266,9 +8269,9 @@ function fl({
8266
8269
  showBanner: u = !0,
8267
8270
  ...h
8268
8271
  }) {
8269
- const [N, y] = L(o), r = de(t), v = me[r], d = hl[r], g = (F) => {
8272
+ const [N, y] = B(o), r = de(t), v = me[r], d = hl[r], g = (F) => {
8270
8273
  y((R) => R.filter((P) => P.id !== F.id));
8271
- }, z = N.find((F) => F.type === "banner"), A = N.filter((F) => F.type !== "banner");
8274
+ }, S = N.find((F) => F.type === "banner"), A = N.filter((F) => F.type !== "banner");
8272
8275
  return /* @__PURE__ */ n(
8273
8276
  oe,
8274
8277
  {
@@ -8281,10 +8284,10 @@ function fl({
8281
8284
  ...h,
8282
8285
  children: [
8283
8286
  /* @__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 }) }),
8284
- u && z && t !== "sm" && /* @__PURE__ */ e(
8287
+ u && S && t !== "sm" && /* @__PURE__ */ e(
8285
8288
  bl,
8286
8289
  {
8287
- alert: z,
8290
+ alert: S,
8288
8291
  onDismiss: g
8289
8292
  }
8290
8293
  ),
@@ -8400,7 +8403,7 @@ const yl = [
8400
8403
  }
8401
8404
  };
8402
8405
  function vl({ video: t, sizeMeta: a }) {
8403
- const [s, i] = L(!1);
8406
+ const [s, i] = B(!1);
8404
8407
  return /* @__PURE__ */ n("div", { className: "group cursor-pointer", children: [
8405
8408
  /* @__PURE__ */ n("div", { className: `relative ${a.thumbnailHeight} rounded-lg overflow-hidden bg-zinc-200 dark:bg-zinc-800`, children: [
8406
8409
  /* @__PURE__ */ e(
@@ -8442,7 +8445,7 @@ function Nl({
8442
8445
  videos: o = yl,
8443
8446
  ...u
8444
8447
  }) {
8445
- const [h, N] = L(!1), y = de(t), r = me[y], v = xl[y];
8448
+ const [h, N] = B(!1), y = de(t), r = me[y], v = xl[y];
8446
8449
  return /* @__PURE__ */ n(
8447
8450
  oe,
8448
8451
  {
@@ -8464,7 +8467,7 @@ function Nl({
8464
8467
  onClick: () => N(!h),
8465
8468
  children: [
8466
8469
  "Filter",
8467
- /* @__PURE__ */ e(ye, { className: "h-4 w-4 transform rotate-90" })
8470
+ /* @__PURE__ */ e(xe, { className: "h-4 w-4 transform rotate-90" })
8468
8471
  ]
8469
8472
  }
8470
8473
  ),
@@ -8486,7 +8489,7 @@ function Nl({
8486
8489
  )) }),
8487
8490
  /* @__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: [
8488
8491
  "View All",
8489
- /* @__PURE__ */ e(ye, { className: "h-4 w-4" })
8492
+ /* @__PURE__ */ e(xe, { className: "h-4 w-4" })
8490
8493
  ] })
8491
8494
  ]
8492
8495
  }
@@ -8515,7 +8518,7 @@ export {
8515
8518
  Ts as ActivityMock,
8516
8519
  cs as AddUserGroupsRolesModal,
8517
8520
  fl as AlertsMock,
8518
- Ne as Avatar,
8521
+ we as Avatar,
8519
8522
  zn as AvatarGroup,
8520
8523
  Rl as Badge,
8521
8524
  Tn as Breadcrumbs,
@@ -8537,7 +8540,7 @@ export {
8537
8540
  Kl as FullConfigPage,
8538
8541
  Ll as FullScreenLoader,
8539
8542
  Ol as GenericFilter,
8540
- ke as IconButton,
8543
+ Ce as IconButton,
8541
8544
  X as Input,
8542
8545
  il as LeaveBalanceMock,
8543
8546
  Ds as ManageCollectionList,
@@ -8550,7 +8553,7 @@ export {
8550
8553
  jl as PageLayout,
8551
8554
  Pl as Pagination,
8552
8555
  pa as RadioGroup,
8553
- pe as SearchBar,
8556
+ ge as SearchBar,
8554
8557
  ft as Select,
8555
8558
  oe as SelectableCard,
8556
8559
  Ml as Sidebar,
@@ -8574,7 +8577,7 @@ export {
8574
8577
  Xn as directoryPermissionsApi,
8575
8578
  Hn as filePermissionsApi,
8576
8579
  Jn as gateWayUrl,
8577
- De as gatewayBase,
8580
+ $e as gatewayBase,
8578
8581
  kt as getBaseUrl,
8579
8582
  Gl as getSnapshot,
8580
8583
  Jl as http,