unifyedx-storybook-new 0.2.37 → 0.2.39

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,10 +1,10 @@
1
1
  import { jsxs as n, jsx as e, Fragment as te } from "react/jsx-runtime";
2
- import se, { useState as L, useMemo as me, useId as Qe, Fragment as Q, useEffect as Z, useCallback as ae, useRef as ge } from "react";
3
- import { a as H, U as dt, X as ye, P as c, L as ja, C as fe, b as et, D as mt, f as Ct, d as Gt, F as Va, e as _a, h as Ua, T as Ze, u as qa, I as Yt, i as Wt, j as Ga, k as Ya, l as Wa, m as Jt, S as xt, n as Xt, M as Ja, o as Xa, p as vt, q as Ha, A as Qa, E as Ht, r as Za, s as Ka, t as er, v as tr, w as Qt, x as ar, y as Zt, z as Kt, B as rr, G as nr, H as sr, J as Ke, K as ut, N as ht, O as lr, Q as or, R as ea, V as ir, W as Nt, Y as cr, Z as dr, _ as Be, $ as mr, a0 as ur, a1 as hr, a2 as pr, a3 as gr, a4 as br, a5 as zt, a6 as fr, a7 as yr, a8 as xr, a9 as vr, aa as Nr, ab as wr, ac as kr, ad as Cr, ae as zr, af as Ae, ag as ta, ah as Sr, ai as Dr, aj as $r, ak as Tr, al as Ar, am as aa, an as Fr, ao as Er, ap as ra, aq as Rr, ar as pt, as as na, at as Or } from "./vendor-DoYRzmYd.js";
4
- import { Popover as Pr, PopoverButton as Ir, PopoverPanel as Mr, Transition as ue, Dialog as be, TransitionChild as Ne, DialogPanel as Fe, DialogTitle as tt, TabGroup as Lr, TabList as Br, Tab as ne, TabPanels as jr, RadioGroup as qe, Listbox as K, ListboxButton as Vr, ListboxOptions as _r, ListboxOption as Ur, SwitchGroup as qr, Switch as ot, Menu as Gr, MenuButton as Yr, Portal as Wr, MenuItems as Jr, MenuItem as Xr, DialogBackdrop as Hr } from "@headlessui/react";
2
+ import se, { useState as L, useMemo as me, useId as Xe, Fragment as Q, useEffect as Z, useCallback as ae, useRef as ge } from "react";
3
+ import { a as H, U as dt, X as ye, P as c, L as ja, C as fe, b as Ke, D as mt, f as Ct, d as qt, F as Va, e as _a, h as Ua, T as He, u as Ga, I as Yt, i as Wt, j as qa, k as Ya, l as Wa, m as Jt, S as xt, n as Xt, M as Ja, o as Xa, p as vt, q as Ha, A as Qa, E as Ht, r as Za, s as Ka, t as er, v as tr, w as Qt, x as ar, y as Zt, z as Kt, B as rr, G as nr, H as sr, J as Qe, K as ut, N as ht, O as lr, Q as ir, R as ea, V as or, W as Nt, Y as cr, Z as dr, _ as Le, $ as mr, a0 as ur, a1 as hr, a2 as pr, a3 as gr, a4 as br, a5 as zt, a6 as fr, a7 as yr, a8 as xr, a9 as vr, aa as Nr, ab as wr, ac as kr, ad as Cr, ae as zr, af as Ae, ag as ta, ah as Sr, ai as Dr, aj as $r, ak as Tr, al as Ar, am as aa, an as Fr, ao as Er, ap as ra, aq as Rr, ar as pt, as as na, at as Or } from "./vendor-DoYRzmYd.js";
4
+ import { Popover as Pr, PopoverButton as Ir, PopoverPanel as Mr, Transition as ue, Dialog as be, TransitionChild as Ne, DialogPanel as Fe, DialogTitle as et, TabGroup as Lr, TabList as Br, Tab as ne, TabPanels as jr, RadioGroup as Ue, Listbox as K, ListboxButton as Vr, ListboxOptions as _r, ListboxOption as Ur, SwitchGroup as Gr, Switch as lt, Menu as qr, MenuButton as Yr, Portal as Wr, MenuItems as Jr, MenuItem as Xr, DialogBackdrop as Hr } from "@headlessui/react";
5
5
  import { motion as le, AnimatePresence as ke } from "framer-motion";
6
6
  import { d as Qr } from "./vendor-lodash-DUMS_goM.js";
7
- import { useFloating as sa, offset as la, flip as oa, shift as ia, autoUpdate as ca, useClick as Zr, useDismiss as Kr, useInteractions as en, FloatingPortal as tn } from "@floating-ui/react";
7
+ import { useFloating as sa, offset as la, flip as ia, shift as oa, autoUpdate as ca, useClick as Zr, useDismiss as Kr, useInteractions as en, FloatingPortal as tn } from "@floating-ui/react";
8
8
  import it, { debounce as an } from "lodash";
9
9
  import { toast as Se, ToastContainer as rn, Slide as nn } from "react-toastify";
10
10
  import "react-toastify/dist/ReactToastify.css";
@@ -15,29 +15,29 @@ const vn = (t) => {
15
15
  a ^= t.charCodeAt(s), a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);
16
16
  return a >>> 0;
17
17
  }, Nn = (t) => {
18
- const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, o = vn(a), l = (o % 360 + 37 * s) % 360, m = 55 + (o >>> 8) % 20, i = 30 + (o >>> 16) % 10, u = 86 + (o >>> 24) % 8, g = `hsl(${l}, ${m}%, ${u}%)`, f = `hsl(${l}, ${m}%, ${i}%)`;
18
+ const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = vn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, u = 86 + (i >>> 24) % 8, g = `hsl(${l}, ${m}%, ${u}%)`, f = `hsl(${l}, ${m}%, ${o}%)`;
19
19
  return { bg: g, text: f };
20
20
  }, wn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), Ce = ({
21
21
  src: t,
22
22
  name: a,
23
23
  size: s = "medium",
24
24
  // 'small', 'medium', 'large', 'xlarge'
25
- bgColor: o,
25
+ bgColor: i,
26
26
  // ✅ New prop for background color
27
27
  textColor: l,
28
28
  // ✅ New prop for text/icon color
29
29
  className: m,
30
- ...i
30
+ ...o
31
31
  }) => {
32
32
  const [u, g] = L(!1), f = me(() => Nn(a), []), x = t && !u, r = !x && a, N = !x && !a, d = H(
33
33
  "avatar-container",
34
34
  `avatar--size-${s}`,
35
35
  m
36
- ), p = x ? "transparent" : o || f.bg, $ = l || f.text;
36
+ ), p = x ? "transparent" : i || f.bg, $ = l || f.text;
37
37
  return /* @__PURE__ */ n("div", { className: d, style: {
38
38
  backgroundColor: p,
39
39
  color: $
40
- }, ...i, children: [
40
+ }, ...o, children: [
41
41
  x && /* @__PURE__ */ e(
42
42
  "img",
43
43
  {
@@ -50,13 +50,13 @@ const vn = (t) => {
50
50
  r && /* @__PURE__ */ e("span", { className: "avatar-initials", "aria-label": a, children: wn(a) }),
51
51
  N && /* @__PURE__ */ e("span", { className: "avatar-icon", children: /* @__PURE__ */ e(dt, {}) })
52
52
  ] });
53
- }, kn = ({ children: t, max: a = 4, truncatedMessage: s = "Members", ...o }) => {
54
- const l = se.Children.toArray(t), m = l.slice(0, a), i = l.length - a;
55
- return /* @__PURE__ */ n("div", { className: "avatar-group-container", ...o, children: [
53
+ }, kn = ({ children: t, max: a = 4, truncatedMessage: s = "Members", ...i }) => {
54
+ const l = se.Children.toArray(t), m = l.slice(0, a), o = l.length - a;
55
+ return /* @__PURE__ */ n("div", { className: "avatar-group-container", ...i, children: [
56
56
  m,
57
- i > 0 && /* @__PURE__ */ n("div", { className: "avatar-container avatar--size-medium avatar-excess", children: [
57
+ o > 0 && /* @__PURE__ */ n("div", { className: "avatar-container avatar--size-medium avatar-excess", children: [
58
58
  "+",
59
- i,
59
+ o,
60
60
  " ",
61
61
  s
62
62
  ] })
@@ -67,10 +67,10 @@ const vn = (t) => {
67
67
  // 'default', 'primary', 'success', 'warning', 'danger'
68
68
  size: s = "medium",
69
69
  // 'small', 'medium', 'large'
70
- icon: o,
70
+ icon: i,
71
71
  onRemove: l,
72
72
  bgColor: m,
73
- textColor: i,
73
+ textColor: o,
74
74
  className: u,
75
75
  ...g
76
76
  }) => {
@@ -81,12 +81,12 @@ const vn = (t) => {
81
81
  { "badge--with-remove": !!l },
82
82
  u
83
83
  );
84
- return /* @__PURE__ */ n("span", { className: f, style: m && i ? {
84
+ return /* @__PURE__ */ n("span", { className: f, style: m && o ? {
85
85
  backgroundColor: m,
86
- color: i,
86
+ color: o,
87
87
  borderColor: "#ff0000"
88
88
  } : {}, ...g, children: [
89
- o && /* @__PURE__ */ e(o, { className: "badge-icon" }),
89
+ i && /* @__PURE__ */ e(i, { className: "badge-icon" }),
90
90
  /* @__PURE__ */ e("span", { className: "badge-label", children: t }),
91
91
  l && /* @__PURE__ */ e(
92
92
  "button",
@@ -103,7 +103,7 @@ const vn = (t) => {
103
103
  primary: t = !1,
104
104
  backgroundColor: a = null,
105
105
  size: s = "medium",
106
- label: o,
106
+ label: i,
107
107
  ...l
108
108
  }) => {
109
109
  const m = t ? "storybook-button--primary" : "storybook-button--secondary";
@@ -114,7 +114,7 @@ const vn = (t) => {
114
114
  className: ["storybook-button", `storybook-button--${s}`, m].join(" "),
115
115
  style: a && { backgroundColor: a },
116
116
  ...l,
117
- children: o
117
+ children: i
118
118
  }
119
119
  );
120
120
  };
@@ -141,11 +141,11 @@ const zn = {
141
141
  dataTestId: t,
142
142
  title: a,
143
143
  type: s = "button",
144
- ariaLabel: o,
144
+ ariaLabel: i,
145
145
  className: l = "",
146
146
  // ✅ Default is now empty
147
147
  loader: m = !1,
148
- category: i = "primary",
148
+ category: o = "primary",
149
149
  icon: u,
150
150
  // Renamed for clarity, expecting a component type e.g., CheckCircle
151
151
  disabled: g = !1,
@@ -159,7 +159,7 @@ const zn = {
159
159
  const p = g || m, $ = u && !x, A = H(
160
160
  "btn-base",
161
161
  zn[f],
162
- Sn[i],
162
+ Sn[o],
163
163
  {
164
164
  "is-loading": m,
165
165
  "btn-icon-only": $
@@ -174,8 +174,8 @@ const zn = {
174
174
  className: A,
175
175
  disabled: p,
176
176
  onClick: N,
177
- title: a || $ && o || (typeof x == "string" ? x : void 0),
178
- "aria-label": o || $ && a || (typeof x == "string" ? x : void 0),
177
+ title: a || $ && i || (typeof x == "string" ? x : void 0),
178
+ "aria-label": i || $ && a || (typeof x == "string" ? x : void 0),
179
179
  ...d,
180
180
  children: m ? /* @__PURE__ */ e(ja, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
181
181
  u && /* @__PURE__ */ e(u, { size: f === "large" ? 20 : 16 }),
@@ -185,8 +185,8 @@ const zn = {
185
185
  ] })
186
186
  }
187
187
  );
188
- }, Dn = ({ crumbs: t = [], ...a }) => /* @__PURE__ */ e("nav", { "aria-label": "Breadcrumb", className: "breadcrumbs-nav", ...a, children: /* @__PURE__ */ e("ol", { className: "breadcrumbs-list", children: t.map((s, o) => {
189
- const l = o === t.length - 1;
188
+ }, Dn = ({ crumbs: t = [], ...a }) => /* @__PURE__ */ e("nav", { "aria-label": "Breadcrumb", className: "breadcrumbs-nav", ...a, children: /* @__PURE__ */ e("ol", { className: "breadcrumbs-list", children: t.map((s, i) => {
189
+ const l = i === t.length - 1;
190
190
  return /* @__PURE__ */ n("li", { className: "breadcrumb-item", children: [
191
191
  /* @__PURE__ */ n(
192
192
  "a",
@@ -207,19 +207,19 @@ const zn = {
207
207
  "aria-hidden": "true"
208
208
  }
209
209
  )
210
- ] }, o);
210
+ ] }, i);
211
211
  }) }) }), da = ({
212
212
  label: t,
213
213
  id: a,
214
214
  error: s,
215
- className: o,
215
+ className: i,
216
216
  ref: l,
217
217
  checked: m,
218
- onChange: i,
218
+ onChange: o,
219
219
  ...u
220
220
  }) => {
221
- const g = Qe(), f = a || g;
222
- return /* @__PURE__ */ n("div", { className: `checkbox-container ${o || ""}`, children: [
221
+ const g = Xe(), f = a || g;
222
+ return /* @__PURE__ */ n("div", { className: `checkbox-container ${i || ""}`, children: [
223
223
  /* @__PURE__ */ n("label", { htmlFor: f, className: "checkbox-wrapper", children: [
224
224
  /* @__PURE__ */ e(
225
225
  "input",
@@ -229,7 +229,7 @@ const zn = {
229
229
  ref: l,
230
230
  className: "checkbox-input",
231
231
  checked: m,
232
- onChange: i,
232
+ onChange: o,
233
233
  ...u
234
234
  }
235
235
  ),
@@ -241,7 +241,7 @@ const zn = {
241
241
  "checkbox-box--error": !!s
242
242
  }),
243
243
  "aria-hidden": "true",
244
- children: m && /* @__PURE__ */ e(et, { className: "checkbox-check-icon" })
244
+ children: m && /* @__PURE__ */ e(Ke, { className: "checkbox-check-icon" })
245
245
  }
246
246
  ),
247
247
  t && /* @__PURE__ */ e("span", { className: "checkbox-label-text", children: t })
@@ -252,10 +252,10 @@ const zn = {
252
252
  value: t,
253
253
  onChange: a,
254
254
  onClear: s,
255
- placeholder: o = "Select a date",
255
+ placeholder: i = "Select a date",
256
256
  label: l,
257
257
  error: m,
258
- disabled: i = !1,
258
+ disabled: o = !1,
259
259
  className: u,
260
260
  ...g
261
261
  }) => /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
@@ -280,10 +280,10 @@ const zn = {
280
280
  value: t,
281
281
  onChange: a,
282
282
  onClear: s,
283
- placeholder: o = "Select a date range",
283
+ placeholder: i = "Select a date range",
284
284
  label: l,
285
285
  error: m,
286
- disabled: i = !1,
286
+ disabled: o = !1,
287
287
  className: u,
288
288
  ...g
289
289
  }) => {
@@ -293,7 +293,7 @@ const zn = {
293
293
  Ct(f, "MMM d, y"),
294
294
  " - ",
295
295
  Ct(x, "MMM d, y")
296
- ] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: o });
296
+ ] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: i });
297
297
  return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
298
298
  l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
299
299
  /* @__PURE__ */ n($n, { children: [
@@ -305,17 +305,17 @@ const zn = {
305
305
  type: "button",
306
306
  className: H("datepicker-trigger", {
307
307
  "datepicker-trigger--error": !!m,
308
- "datepicker-trigger--disabled": i
308
+ "datepicker-trigger--disabled": o
309
309
  }),
310
- disabled: i,
311
- "aria-label": f && x ? `Selected range is ${N}` : o,
310
+ disabled: o,
311
+ "aria-label": f && x ? `Selected range is ${N}` : i,
312
312
  children: [
313
- /* @__PURE__ */ e(Gt, { className: "datepicker-icon" }),
313
+ /* @__PURE__ */ e(qt, { className: "datepicker-icon" }),
314
314
  /* @__PURE__ */ e("span", { className: "datepicker-value", children: N })
315
315
  ]
316
316
  }
317
317
  ),
318
- f && s && !i && /* @__PURE__ */ e(
318
+ f && s && !o && /* @__PURE__ */ e(
319
319
  "button",
320
320
  {
321
321
  type: "button",
@@ -549,7 +549,7 @@ const zn = {
549
549
  USER: "User",
550
550
  GROUP: "Group",
551
551
  ROLE: "Role"
552
- }, Je = (t) => `https://ui-avatars.com/api/?rounded=true&background=random&name=${encodeURIComponent(
552
+ }, Ye = (t) => `https://ui-avatars.com/api/?rounded=true&background=random&name=${encodeURIComponent(
553
553
  t
554
554
  )}`, de = {
555
555
  DRIVE: "drive",
@@ -559,12 +559,12 @@ const zn = {
559
559
  View: "view",
560
560
  Manage: "edit"
561
561
  }, $t = ({ extension: t, size: a = 36 }) => {
562
- const s = (t || "").toLowerCase(), o = En[s];
563
- return o ? /* @__PURE__ */ e("div", { style: { width: a }, className: "flex-shrink-0", children: /* @__PURE__ */ e(
562
+ const s = (t || "").toLowerCase(), i = En[s];
563
+ return i ? /* @__PURE__ */ e("div", { style: { width: a }, className: "flex-shrink-0", children: /* @__PURE__ */ e(
564
564
  Va,
565
565
  {
566
566
  extension: s,
567
- ...o,
567
+ ...i,
568
568
  radius: 2,
569
569
  fold: !0,
570
570
  foldColor: "#E5E7EB",
@@ -582,19 +582,19 @@ const zn = {
582
582
  );
583
583
  }, Rn = (t) => /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: t.width || 24, height: t.height || 24, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ e("path", { d: "M20 12H4M4 12L10 18M4 12L10 6", stroke: "#767676", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), Tt = (t, a = 2) => {
584
584
  if (!+t) return "0 Bytes";
585
- const s = 1024, o = a < 0 ? 0 : a, l = ["Bytes", "KB", "MB", "GB", "TB"], m = Math.floor(Math.log(t) / Math.log(s));
586
- return `${parseFloat((t / Math.pow(s, m)).toFixed(o))} ${l[m]}`;
585
+ const s = 1024, i = a < 0 ? 0 : a, l = ["Bytes", "KB", "MB", "GB", "TB"], m = Math.floor(Math.log(t) / Math.log(s));
586
+ return `${parseFloat((t / Math.pow(s, m)).toFixed(i))} ${l[m]}`;
587
587
  }, El = ({
588
588
  // --- Modal Control ---
589
589
  isOpen: t,
590
590
  onClose: a,
591
591
  // --- Dropzone Props ---
592
592
  getRootProps: s,
593
- getInputProps: o,
593
+ getInputProps: i,
594
594
  isDragActive: l,
595
595
  open: m,
596
596
  // --- Form and File State ---
597
- validFiles: i = [],
597
+ validFiles: o = [],
598
598
  rejectedFiles: u = [],
599
599
  handleRemoveValidFile: g,
600
600
  handleRemoveRejectedFile: f,
@@ -605,7 +605,7 @@ const zn = {
605
605
  title: d = "Upload Files",
606
606
  subHeading: p = "Supports PNG, JPG, PDF. Max size: 50MB."
607
607
  }) => {
608
- const $ = i.length > 0 || u.length > 0;
608
+ const $ = o.length > 0 || u.length > 0;
609
609
  return /* @__PURE__ */ e(ue, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(
610
610
  be,
611
611
  {
@@ -643,10 +643,10 @@ const zn = {
643
643
  className: "dialog-panel",
644
644
  onClick: (A) => A.stopPropagation(),
645
645
  children: [
646
- /* @__PURE__ */ e("input", { ...o() }),
646
+ /* @__PURE__ */ e("input", { ...i() }),
647
647
  /* @__PURE__ */ n("form", { onSubmit: x, className: "form-wrapper", children: [
648
648
  /* @__PURE__ */ n("div", { className: "dialog-header", children: [
649
- /* @__PURE__ */ e(tt, { as: "h3", className: "dialog-title-text", children: d }),
649
+ /* @__PURE__ */ e(et, { as: "h3", className: "dialog-title-text", children: d }),
650
650
  /* @__PURE__ */ e(
651
651
  "button",
652
652
  {
@@ -684,7 +684,7 @@ const zn = {
684
684
  $ && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
685
685
  /* @__PURE__ */ e("h3", { children: "Upload Queue" }),
686
686
  /* @__PURE__ */ n("ul", { className: "file-list", children: [
687
- i.map((A, E) => /* @__PURE__ */ n(
687
+ o.map((A, E) => /* @__PURE__ */ n(
688
688
  "li",
689
689
  {
690
690
  className: "file-item",
@@ -707,7 +707,7 @@ const zn = {
707
707
  type: "button",
708
708
  onClick: () => g(E),
709
709
  className: "remove-file-button",
710
- children: /* @__PURE__ */ e(Ze, { size: 16 })
710
+ children: /* @__PURE__ */ e(He, { size: 16 })
711
711
  }
712
712
  )
713
713
  ]
@@ -738,7 +738,7 @@ const zn = {
738
738
  type: "button",
739
739
  onClick: () => f(R),
740
740
  className: "remove-file-button",
741
- children: /* @__PURE__ */ e(Ze, { size: 16 })
741
+ children: /* @__PURE__ */ e(He, { size: 16 })
742
742
  }
743
743
  )
744
744
  ]
@@ -764,7 +764,7 @@ const zn = {
764
764
  type: "submit",
765
765
  label: r ? "Uploading..." : "Upload Files",
766
766
  loader: r,
767
- disabled: i.length === 0 || r
767
+ disabled: o.length === 0 || r
768
768
  }
769
769
  )
770
770
  ] })
@@ -777,42 +777,42 @@ const zn = {
777
777
  ]
778
778
  }
779
779
  ) });
780
- }, je = (t) => {
780
+ }, Be = (t) => {
781
781
  const a = new Date(t);
782
782
  return a.setHours(0, 0, 0, 0), a;
783
- }, Ve = (t) => {
783
+ }, je = (t) => {
784
784
  const a = new Date(t);
785
785
  return a.setHours(23, 59, 59, 999), a;
786
786
  }, gt = (t, a) => {
787
787
  const s = new Date(t);
788
788
  return s.setDate(s.getDate() + a), s;
789
789
  }, bt = (t) => {
790
- const a = new Date(t), s = a.getDay(), o = a.getDate() - s;
791
- return je(new Date(a.setDate(o)));
792
- }, On = (t) => Ve(gt(bt(t), 6)), At = (t) => {
790
+ const a = new Date(t), s = a.getDay(), i = a.getDate() - s;
791
+ return Be(new Date(a.setDate(i)));
792
+ }, On = (t) => je(gt(bt(t), 6)), At = (t) => {
793
793
  const a = new Date(t);
794
- return je(new Date(a.getFullYear(), a.getMonth(), 1));
794
+ return Be(new Date(a.getFullYear(), a.getMonth(), 1));
795
795
  }, Ft = (t) => {
796
796
  const a = new Date(t);
797
- return Ve(new Date(a.getFullYear(), a.getMonth() + 1, 0));
797
+ return je(new Date(a.getFullYear(), a.getMonth() + 1, 0));
798
798
  }, Pn = (t) => {
799
799
  const a = /* @__PURE__ */ new Date();
800
800
  switch (t) {
801
801
  case "anytime":
802
802
  return [null, null];
803
803
  case "today":
804
- return [je(a), Ve(a)];
804
+ return [Be(a), je(a)];
805
805
  case "this_week":
806
806
  return [bt(a), On(a)];
807
807
  case "last_week": {
808
808
  const s = gt(bt(a), -7);
809
- return [je(s), Ve(gt(s, 6))];
809
+ return [Be(s), je(gt(s, 6))];
810
810
  }
811
811
  case "this_month":
812
812
  return [At(a), Ft(a)];
813
813
  case "last_month": {
814
- const s = /* @__PURE__ */ new Date(), o = new Date(s.getFullYear(), s.getMonth() - 1, 1);
815
- return [At(o), Ft(o)];
814
+ const s = /* @__PURE__ */ new Date(), i = new Date(s.getFullYear(), s.getMonth() - 1, 1);
815
+ return [At(i), Ft(i)];
816
816
  }
817
817
  default:
818
818
  return [null, null];
@@ -821,10 +821,10 @@ const zn = {
821
821
  isOpen: t,
822
822
  onClose: a,
823
823
  onApplyFilters: s,
824
- resetFilters: o,
824
+ resetFilters: i,
825
825
  filterConfig: l = [],
826
826
  initialFormikValues: m,
827
- customStyles: i = "",
827
+ customStyles: o = "",
828
828
  fetchCreatedOrUpdatedByUsers: u = async () => []
829
829
  // Mockable fetcher
830
830
  }) => {
@@ -838,7 +838,7 @@ const zn = {
838
838
  startDate: null
839
839
  }), [p, $] = L({
840
840
  endDate: null
841
- }), A = qa({
841
+ }), A = Ga({
842
842
  initialValues: JSON.parse(JSON.stringify(m)),
843
843
  // Deep copy
844
844
  onSubmit: (C) => {
@@ -891,8 +891,8 @@ const zn = {
891
891
  const h = l[C].key, w = l[C].url;
892
892
  l[C].type === "multiselect-users" && g[h].length === 0 && !x[h] && V(h, w);
893
893
  }, Y = () => {
894
- A.resetForm(), f({ createdBy: [], updatedBy: [] }), o();
895
- }, q = (C) => {
894
+ A.resetForm(), f({ createdBy: [], updatedBy: [] }), i();
895
+ }, G = (C) => {
896
896
  const h = l.find((k) => k.key === C);
897
897
  if (!h) return null;
898
898
  const w = A.values[C] || m[C], T = Array.isArray(w.values) ? w.values : [];
@@ -921,8 +921,8 @@ const zn = {
921
921
  className: "filter-checkbox-input",
922
922
  checked: h.options.length > 0 && T.length === h.options.length,
923
923
  onChange: (I) => {
924
- const G = I.target.checked ? h.options.map((X) => X.value) : [];
925
- A.setFieldValue(`${C}.values`, G);
924
+ const q = I.target.checked ? h.options.map((X) => X.value) : [];
925
+ A.setFieldValue(`${C}.values`, q);
926
926
  }
927
927
  }
928
928
  ),
@@ -943,8 +943,8 @@ const zn = {
943
943
  id: `${C}-${I.value}`,
944
944
  className: "filter-checkbox-input",
945
945
  checked: T.includes(I.value),
946
- onChange: (G) => {
947
- const X = G.target.checked ? [...T, I.value] : T.filter((xe) => xe !== I.value);
946
+ onChange: (q) => {
947
+ const X = q.target.checked ? [...T, I.value] : T.filter((xe) => xe !== I.value);
948
948
  A.setFieldValue(`${C}.values`, X);
949
949
  }
950
950
  }
@@ -985,10 +985,10 @@ const zn = {
985
985
  className: "filter-checkbox-input",
986
986
  checked: k.length > 0 && T.length === k.length,
987
987
  onChange: (I) => {
988
- const G = I.target.checked ? k.map((X) => X.email) : [];
988
+ const q = I.target.checked ? k.map((X) => X.email) : [];
989
989
  A.setFieldValue(
990
990
  `${C}.values`,
991
- G
991
+ q
992
992
  );
993
993
  }
994
994
  }
@@ -1010,8 +1010,8 @@ const zn = {
1010
1010
  id: `${C}-${I.email}`,
1011
1011
  className: "filter-checkbox-input",
1012
1012
  checked: T.includes(I.email),
1013
- onChange: (G) => {
1014
- const X = G.target.checked ? [...T, I.email] : T.filter((xe) => xe !== I.email);
1013
+ onChange: (q) => {
1014
+ const X = q.target.checked ? [...T, I.email] : T.filter((xe) => xe !== I.email);
1015
1015
  A.setFieldValue(
1016
1016
  `${C}.values`,
1017
1017
  X
@@ -1057,8 +1057,8 @@ const zn = {
1057
1057
  A.setFieldValue(`${C}.range`, "custom");
1058
1058
  return;
1059
1059
  }
1060
- const [G, X] = Pn(I);
1061
- A.setFieldValue(`${C}.values`, G && X ? [G, X] : []), A.setFieldValue(`${C}.range`, I);
1060
+ const [q, X] = Pn(I);
1061
+ A.setFieldValue(`${C}.values`, q && X ? [q, X] : []), A.setFieldValue(`${C}.range`, I);
1062
1062
  };
1063
1063
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
1064
1064
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
@@ -1088,7 +1088,7 @@ const zn = {
1088
1088
  )
1089
1089
  ] }),
1090
1090
  /* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: B.map((I) => {
1091
- const G = w.range === I.key || I.key === "anytime" && (!Array.isArray(w.values) || w.values.length === 0);
1091
+ const q = w.range === I.key || I.key === "anytime" && (!Array.isArray(w.values) || w.values.length === 0);
1092
1092
  return /* @__PURE__ */ n(
1093
1093
  "label",
1094
1094
  {
@@ -1099,13 +1099,13 @@ const zn = {
1099
1099
  {
1100
1100
  type: "radio",
1101
1101
  name: `preset-${C}`,
1102
- checked: G,
1102
+ checked: q,
1103
1103
  onChange: () => _(I.key),
1104
1104
  className: "h-4 w-4"
1105
1105
  }
1106
1106
  ),
1107
1107
  /* @__PURE__ */ e("span", { className: "text-sm text-[#222]", children: I.label }),
1108
- I.key === "anytime" && G && /* @__PURE__ */ e("span", { className: "ml-2 text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded", children: "Default" })
1108
+ I.key === "anytime" && q && /* @__PURE__ */ e("span", { className: "ml-2 text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded", children: "Default" })
1109
1109
  ]
1110
1110
  },
1111
1111
  I.key
@@ -1122,8 +1122,8 @@ const zn = {
1122
1122
  useRange: !1,
1123
1123
  value: F,
1124
1124
  onChange: (I) => {
1125
- const G = I?.startDate ? je(new Date(I.startDate)) : null, X = b[1] || null;
1126
- G && (A.setFieldValue(`${C}.values`, [G, X]), A.setFieldValue(`${C}.range`, "custom"));
1125
+ const q = I?.startDate ? Be(new Date(I.startDate)) : null, X = b[1] || null;
1126
+ q && (A.setFieldValue(`${C}.values`, [q, X]), A.setFieldValue(`${C}.range`, "custom"));
1127
1127
  },
1128
1128
  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",
1129
1129
  primaryColor: "violet",
@@ -1146,8 +1146,8 @@ const zn = {
1146
1146
  useRange: !1,
1147
1147
  value: S,
1148
1148
  onChange: (I) => {
1149
- const G = I?.startDate ? Ve(new Date(I.startDate)) : null, X = b[0] || null;
1150
- G && (A.setFieldValue(`${C}.values`, [X, G]), A.setFieldValue(`${C}.range`, "custom"));
1149
+ const q = I?.startDate ? je(new Date(I.startDate)) : null, X = b[0] || null;
1150
+ q && (A.setFieldValue(`${C}.values`, [X, q]), A.setFieldValue(`${C}.range`, "custom"));
1151
1151
  },
1152
1152
  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",
1153
1153
  primaryColor: "violet",
@@ -1191,9 +1191,9 @@ const zn = {
1191
1191
  leave: "ease-in duration-200",
1192
1192
  leaveFrom: "opacity-100 translate-x-0",
1193
1193
  leaveTo: "opacity-0 translate-x-full",
1194
- children: /* @__PURE__ */ n(Fe, { className: `filter-modal-panel ${i}`, children: [
1194
+ children: /* @__PURE__ */ n(Fe, { className: `filter-modal-panel ${o}`, children: [
1195
1195
  /* @__PURE__ */ n("div", { className: "filter-header", children: [
1196
- /* @__PURE__ */ e(tt, { as: "h3", className: "filter-title", children: "Filters" }),
1196
+ /* @__PURE__ */ e(et, { as: "h3", className: "filter-title", children: "Filters" }),
1197
1197
  /* @__PURE__ */ e(
1198
1198
  "button",
1199
1199
  {
@@ -1239,7 +1239,7 @@ const zn = {
1239
1239
  animate: { opacity: 1, x: 0 },
1240
1240
  transition: { duration: 0.3 },
1241
1241
  className: "h-full",
1242
- children: q(C.key)
1242
+ children: G(C.key)
1243
1243
  },
1244
1244
  C.key
1245
1245
  )
@@ -1282,10 +1282,10 @@ const zn = {
1282
1282
  label: t,
1283
1283
  id: a,
1284
1284
  type: s = "text",
1285
- icon: o,
1285
+ icon: i,
1286
1286
  error: l,
1287
1287
  className: m,
1288
- ref: i,
1288
+ ref: o,
1289
1289
  // ✅ 'ref' is now received directly as a prop
1290
1290
  ...u
1291
1291
  }) => {
@@ -1293,16 +1293,16 @@ const zn = {
1293
1293
  return /* @__PURE__ */ n("div", { className: `input-wrapper ${m || ""}`, children: [
1294
1294
  t && /* @__PURE__ */ e("label", { htmlFor: g, className: "input-label", children: t }),
1295
1295
  /* @__PURE__ */ n("div", { className: "input-field-container", children: [
1296
- o && /* @__PURE__ */ e(o, { className: "input-icon", size: 20 }),
1296
+ i && /* @__PURE__ */ e(i, { className: "input-icon", size: 20 }),
1297
1297
  /* @__PURE__ */ e(
1298
1298
  "input",
1299
1299
  {
1300
1300
  id: g,
1301
1301
  type: s,
1302
- ref: i,
1302
+ ref: o,
1303
1303
  className: H("input-field", {
1304
1304
  "input-field--error": !!l,
1305
- "input-field--with-icon": !!o
1305
+ "input-field--with-icon": !!i
1306
1306
  }),
1307
1307
  ...u
1308
1308
  }
@@ -1312,7 +1312,7 @@ const zn = {
1312
1312
  ] });
1313
1313
  }, Et = {
1314
1314
  delete: {
1315
- icon: Ze,
1315
+ icon: He,
1316
1316
  iconClass: "icon--delete",
1317
1317
  primaryButtonCategory: "danger"
1318
1318
  // Assuming you add a 'danger' category to your Button
@@ -1332,20 +1332,20 @@ const zn = {
1332
1332
  isOpen: t,
1333
1333
  onClose: a,
1334
1334
  title: s,
1335
- children: o,
1335
+ children: i,
1336
1336
  // For the description/body content
1337
1337
  primaryButtonText: l,
1338
1338
  // No default
1339
1339
  secondaryButtonText: m,
1340
1340
  // No default
1341
- variant: i = "info",
1341
+ variant: o = "info",
1342
1342
  // 'info', 'warning', 'delete'
1343
1343
  loading: u = !1,
1344
1344
  buttonProps: g = {},
1345
1345
  size: f
1346
1346
  // Add size prop
1347
1347
  }) => {
1348
- const x = Et[i] || Et.info, r = x.icon, N = () => {
1348
+ const x = Et[o] || Et.info, r = x.icon, N = () => {
1349
1349
  a({ primary: !0, secondary: !1 });
1350
1350
  }, d = () => {
1351
1351
  a({ primary: !1, secondary: !0 });
@@ -1378,8 +1378,8 @@ const zn = {
1378
1378
  /* @__PURE__ */ n("div", { className: "modal-content-wrapper", children: [
1379
1379
  /* @__PURE__ */ e("div", { className: `modal-icon-container ${x.iconClass}`, children: /* @__PURE__ */ e(r, { size: 24, "aria-hidden": "true" }) }),
1380
1380
  /* @__PURE__ */ n("div", { className: "modal-text-content", children: [
1381
- /* @__PURE__ */ e(tt, { as: "h3", className: "modal-title", children: s }),
1382
- /* @__PURE__ */ e("div", { className: "modal-description", children: o })
1381
+ /* @__PURE__ */ e(et, { as: "h3", className: "modal-title", children: s }),
1382
+ /* @__PURE__ */ e("div", { className: "modal-description", children: i })
1383
1383
  ] })
1384
1384
  ] }),
1385
1385
  (l || m) && /* @__PURE__ */ n("div", { className: "modal-footer", children: [
@@ -1408,18 +1408,18 @@ const zn = {
1408
1408
  currentPage: t,
1409
1409
  totalItems: a,
1410
1410
  itemsPerPage: s,
1411
- onPageChange: o,
1411
+ onPageChange: i,
1412
1412
  onItemsPerPageChange: l,
1413
1413
  itemsPerPageOptions: m = [10, 15, 20]
1414
1414
  }) => {
1415
- const i = Math.ceil(a / s), [u, g] = L(t);
1415
+ const o = Math.ceil(a / s), [u, g] = L(t);
1416
1416
  Z(() => {
1417
1417
  g(t);
1418
1418
  }, [t]);
1419
1419
  const f = Math.min((t - 1) * s + 1, a), x = Math.min(t * s, a), r = (N) => {
1420
1420
  N.preventDefault();
1421
1421
  let d = parseInt(u, 10);
1422
- isNaN(d) || d < 1 ? d = 1 : d > i && (d = i), g(d), d !== t && o(d);
1422
+ isNaN(d) || d < 1 ? d = 1 : d > o && (d = o), g(d), d !== t && i(d);
1423
1423
  };
1424
1424
  return /* @__PURE__ */ n("div", { className: "pagination-container", children: [
1425
1425
  /* @__PURE__ */ n("div", { className: "pagination-left", children: [
@@ -1448,16 +1448,16 @@ const zn = {
1448
1448
  "button",
1449
1449
  {
1450
1450
  className: "pagination-button",
1451
- onClick: () => o(1),
1451
+ onClick: () => i(1),
1452
1452
  disabled: t === 1,
1453
- children: /* @__PURE__ */ e(Ga, { size: 16 })
1453
+ children: /* @__PURE__ */ e(qa, { size: 16 })
1454
1454
  }
1455
1455
  ),
1456
1456
  /* @__PURE__ */ e(
1457
1457
  "button",
1458
1458
  {
1459
1459
  className: "pagination-button",
1460
- onClick: () => o(t - 1),
1460
+ onClick: () => i(t - 1),
1461
1461
  disabled: t === 1,
1462
1462
  children: /* @__PURE__ */ e(Ya, { size: 16 })
1463
1463
  }
@@ -1477,15 +1477,15 @@ const zn = {
1477
1477
  ),
1478
1478
  /* @__PURE__ */ n("span", { className: "page-input-total", children: [
1479
1479
  "of ",
1480
- i
1480
+ o
1481
1481
  ] })
1482
1482
  ] }),
1483
1483
  /* @__PURE__ */ e(
1484
1484
  "button",
1485
1485
  {
1486
1486
  className: "pagination-button",
1487
- onClick: () => o(t + 1),
1488
- disabled: t === i,
1487
+ onClick: () => i(t + 1),
1488
+ disabled: t === o,
1489
1489
  children: /* @__PURE__ */ e(fe, { size: 16 })
1490
1490
  }
1491
1491
  ),
@@ -1493,8 +1493,8 @@ const zn = {
1493
1493
  "button",
1494
1494
  {
1495
1495
  className: "pagination-button",
1496
- onClick: () => o(i),
1497
- disabled: t === i,
1496
+ onClick: () => i(o),
1497
+ disabled: t === o,
1498
1498
  children: /* @__PURE__ */ e(Wa, { size: 16 })
1499
1499
  }
1500
1500
  )
@@ -1505,22 +1505,22 @@ const zn = {
1505
1505
  value: a,
1506
1506
  // The currently selected option's value (e.g., 'work')
1507
1507
  onChange: s,
1508
- options: o = [],
1508
+ options: i = [],
1509
1509
  error: l,
1510
1510
  ...m
1511
1511
  }) => /* @__PURE__ */ n("div", { className: "radiogroup-wrapper", children: [
1512
1512
  t && /* @__PURE__ */ e("label", { className: "radiogroup-label", children: t }),
1513
1513
  /* @__PURE__ */ e(
1514
- qe,
1514
+ Ue,
1515
1515
  {
1516
1516
  value: a,
1517
1517
  onChange: s,
1518
1518
  className: "radiogroup-container",
1519
1519
  ...m,
1520
- children: o.map((i) => /* @__PURE__ */ e(
1521
- qe.Option,
1520
+ children: i.map((o) => /* @__PURE__ */ e(
1521
+ Ue.Option,
1522
1522
  {
1523
- value: i.value,
1523
+ value: o.value,
1524
1524
  className: ({ active: u, checked: g }) => H("radiogroup-option", {
1525
1525
  "radiogroup-option--active": u,
1526
1526
  "radiogroup-option--checked": g,
@@ -1528,20 +1528,20 @@ const zn = {
1528
1528
  }),
1529
1529
  children: ({ checked: u }) => /* @__PURE__ */ n(te, { children: [
1530
1530
  /* @__PURE__ */ n("div", { className: "radiogroup-option-content", children: [
1531
- /* @__PURE__ */ e(qe.Label, { as: "p", className: "option-label", children: i.label }),
1532
- i.description && /* @__PURE__ */ e(
1533
- qe.Description,
1531
+ /* @__PURE__ */ e(Ue.Label, { as: "p", className: "option-label", children: o.label }),
1532
+ o.description && /* @__PURE__ */ e(
1533
+ Ue.Description,
1534
1534
  {
1535
1535
  as: "span",
1536
1536
  className: "option-description",
1537
- children: i.description
1537
+ children: o.description
1538
1538
  }
1539
1539
  )
1540
1540
  ] }),
1541
1541
  u && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Jt, { size: 20 }) })
1542
1542
  ] })
1543
1543
  },
1544
- i.value
1544
+ o.value
1545
1545
  ))
1546
1546
  }
1547
1547
  ),
@@ -1550,11 +1550,11 @@ const zn = {
1550
1550
  value: t = "",
1551
1551
  onDebouncedChange: a,
1552
1552
  debounceDelay: s = 400,
1553
- placeholder: o = "Enter text...",
1553
+ placeholder: i = "Enter text...",
1554
1554
  label: l = "Search",
1555
1555
  // Added a default label for accessibility
1556
1556
  customClass: m = "",
1557
- ...i
1557
+ ...o
1558
1558
  }) => {
1559
1559
  const [u, g] = L(t);
1560
1560
  Z(() => {
@@ -1580,12 +1580,12 @@ const zn = {
1580
1580
  {
1581
1581
  id: "search-field",
1582
1582
  className: "search-bar-input",
1583
- placeholder: o,
1583
+ placeholder: i,
1584
1584
  type: "search",
1585
1585
  name: "search",
1586
1586
  value: u,
1587
1587
  onChange: x,
1588
- ...i
1588
+ ...o
1589
1589
  }
1590
1590
  )
1591
1591
  ] });
@@ -1595,17 +1595,17 @@ const zn = {
1595
1595
  // From RHF's <Controller>
1596
1596
  onChange: s,
1597
1597
  // From RHF's <Controller>
1598
- options: o = [],
1598
+ options: i = [],
1599
1599
  placeholder: l = "Select an option...",
1600
1600
  disabled: m = !1,
1601
- error: i,
1601
+ error: o,
1602
1602
  ref: u,
1603
1603
  // From RHF's <Controller>
1604
1604
  showSearch: g = !0
1605
1605
  }) => {
1606
- const [f, x] = L(""), r = f === "" ? o : o.filter(
1606
+ const [f, x] = L(""), r = f === "" ? i : i.filter(
1607
1607
  (d) => d.label.toLowerCase().includes(f.toLowerCase())
1608
- ), N = o.find((d) => a?.id ? d.id === a.id : d.id === a || d.value === a);
1608
+ ), N = i.find((d) => a?.id ? d.id === a.id : d.id === a || d.value === a);
1609
1609
  return /* @__PURE__ */ e(K, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: u, children: [
1610
1610
  t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
1611
1611
  /* @__PURE__ */ n("div", { className: "select-button-container", children: [
@@ -1613,7 +1613,7 @@ const zn = {
1613
1613
  Vr,
1614
1614
  {
1615
1615
  className: H("select-button", {
1616
- "select-button--error": !!i
1616
+ "select-button--error": !!o
1617
1617
  }),
1618
1618
  children: [
1619
1619
  /* @__PURE__ */ e("span", { className: "select-value-display", children: N ? N.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
@@ -1653,7 +1653,7 @@ const zn = {
1653
1653
  )
1654
1654
  ] }),
1655
1655
  p ? /* @__PURE__ */ e(
1656
- et,
1656
+ Ke,
1657
1657
  {
1658
1658
  className: "option-check-icon",
1659
1659
  "aria-hidden": "true"
@@ -1667,7 +1667,7 @@ const zn = {
1667
1667
  }
1668
1668
  )
1669
1669
  ] }),
1670
- i && /* @__PURE__ */ e("p", { className: "select-error-message", children: i })
1670
+ o && /* @__PURE__ */ e("p", { className: "select-error-message", children: o })
1671
1671
  ] }) });
1672
1672
  }, Mn = () => {
1673
1673
  const [t, a] = L(window.location.pathname);
@@ -1685,12 +1685,12 @@ const zn = {
1685
1685
  return s;
1686
1686
  return null;
1687
1687
  }, pa = ({ item: t, isCollapsed: a, level: s = 0 }) => {
1688
- const { pathname: o } = Mn(), l = t.href || t.url || t.path, [m, i] = L(!1), u = t.icon;
1688
+ const { pathname: i } = Mn(), l = t.href || t.url || t.path, [m, o] = L(!1), u = t.icon;
1689
1689
  Z(() => {
1690
- yt([t], o) && i(!0);
1691
- }, [t, o]);
1692
- const g = o === l, f = !g && !!yt([t], o), x = (r) => {
1693
- r.preventDefault(), i(!m);
1690
+ yt([t], i) && o(!0);
1691
+ }, [t, i]);
1692
+ const g = i === l, f = !g && !!yt([t], i), x = (r) => {
1693
+ r.preventDefault(), o(!m);
1694
1694
  };
1695
1695
  return /* @__PURE__ */ n(
1696
1696
  "div",
@@ -1760,13 +1760,13 @@ const zn = {
1760
1760
  navItems: t = [],
1761
1761
  isCollapsed: a = !1,
1762
1762
  onToggleCollapse: s,
1763
- isMobileOpen: o = !1,
1763
+ isMobileOpen: i = !1,
1764
1764
  onToggleMobile: l,
1765
1765
  logoSmall: m,
1766
- logoLarge: i,
1766
+ logoLarge: o,
1767
1767
  user: u = { name: "", email: "" }
1768
1768
  }) => /* @__PURE__ */ n(te, { children: [
1769
- o && /* @__PURE__ */ e(
1769
+ i && /* @__PURE__ */ e(
1770
1770
  "div",
1771
1771
  {
1772
1772
  className: "sidebar-overlay",
@@ -1779,12 +1779,12 @@ const zn = {
1779
1779
  {
1780
1780
  className: H("sidebar", {
1781
1781
  "sidebar--collapsed": a,
1782
- "sidebar--mobile-open": o
1782
+ "sidebar--mobile-open": i
1783
1783
  }),
1784
1784
  "aria-label": "Main navigation",
1785
1785
  children: [
1786
1786
  /* @__PURE__ */ n("div", { className: "sidebar-header", children: [
1787
- /* @__PURE__ */ e("div", { className: "sidebar-logo", children: a ? m : i }),
1787
+ /* @__PURE__ */ e("div", { className: "sidebar-logo", children: a ? m : o }),
1788
1788
  !a && /* @__PURE__ */ n("div", { className: "sidebar-search-container", children: [
1789
1789
  /* @__PURE__ */ e(xt, { className: "sidebar-search-icon" }),
1790
1790
  /* @__PURE__ */ e(
@@ -1833,7 +1833,7 @@ const zn = {
1833
1833
  color: a = "primary",
1834
1834
  // 'primary', 'white'
1835
1835
  className: s,
1836
- ...o
1836
+ ...i
1837
1837
  }) => {
1838
1838
  const l = H(
1839
1839
  "spinner",
@@ -1845,7 +1845,7 @@ const zn = {
1845
1845
  "div",
1846
1846
  {
1847
1847
  className: l,
1848
- ...o,
1848
+ ...i,
1849
1849
  role: "status",
1850
1850
  "aria-label": "Loading...",
1851
1851
  children: [
@@ -1867,11 +1867,11 @@ const zn = {
1867
1867
  label: t,
1868
1868
  id: a,
1869
1869
  error: s,
1870
- className: o,
1870
+ className: i,
1871
1871
  ref: l,
1872
1872
  maxLength: m,
1873
1873
  // ✅ New prop for max length
1874
- showCharCount: i = !1,
1874
+ showCharCount: o = !1,
1875
1875
  // ✅ New prop to control visibility
1876
1876
  ...u
1877
1877
  }) => {
@@ -1880,10 +1880,10 @@ const zn = {
1880
1880
  ), r = (d) => {
1881
1881
  x(d.target.value.length), u.onChange && u.onChange(d);
1882
1882
  }, N = m - f;
1883
- return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${o || ""}`, children: [
1883
+ return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${i || ""}`, children: [
1884
1884
  /* @__PURE__ */ n("div", { className: "textarea-header", children: [
1885
1885
  t && /* @__PURE__ */ e("label", { htmlFor: g, className: "textarea-label", children: t }),
1886
- i && m && /* @__PURE__ */ n("span", { className: "char-counter", children: [
1886
+ o && m && /* @__PURE__ */ n("span", { className: "char-counter", children: [
1887
1887
  N,
1888
1888
  " characters remaining"
1889
1889
  ] })
@@ -1907,14 +1907,14 @@ const zn = {
1907
1907
  label: t,
1908
1908
  checked: a,
1909
1909
  onChange: s,
1910
- labelPosition: o = "right",
1910
+ labelPosition: i = "right",
1911
1911
  error: l,
1912
1912
  ...m
1913
1913
  }) => /* @__PURE__ */ n("div", { className: "switch-container", children: [
1914
- /* @__PURE__ */ n(qr, { as: "div", className: "switch-group", children: [
1915
- t && o === "left" && /* @__PURE__ */ e(ot.Label, { className: "switch-label", passive: !0, children: t }),
1914
+ /* @__PURE__ */ n(Gr, { as: "div", className: "switch-group", children: [
1915
+ t && i === "left" && /* @__PURE__ */ e(lt.Label, { className: "switch-label", passive: !0, children: t }),
1916
1916
  /* @__PURE__ */ e(
1917
- ot,
1917
+ lt,
1918
1918
  {
1919
1919
  checked: a,
1920
1920
  onChange: s,
@@ -1926,7 +1926,7 @@ const zn = {
1926
1926
  children: /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "switch-thumb" })
1927
1927
  }
1928
1928
  ),
1929
- t && o === "right" && /* @__PURE__ */ e(ot.Label, { className: "switch-label", passive: !0, children: t })
1929
+ t && i === "right" && /* @__PURE__ */ e(lt.Label, { className: "switch-label", passive: !0, children: t })
1930
1930
  ] }),
1931
1931
  l && /* @__PURE__ */ e("p", { className: "switch-error-message", children: l })
1932
1932
  ] }), Ml = ({
@@ -1934,13 +1934,13 @@ const zn = {
1934
1934
  content: a,
1935
1935
  variant: s = "dark",
1936
1936
  // 'dark', 'light', 'info', 'success', 'error'
1937
- size: o = "medium",
1937
+ size: i = "medium",
1938
1938
  // 'small', 'medium'
1939
1939
  place: l = "top",
1940
1940
  // 'top', 'bottom', 'left', 'right'
1941
1941
  className: m,
1942
1942
  // For external styling of the tooltip itself
1943
- ...i
1943
+ ...o
1944
1944
  }) => {
1945
1945
  const u = se.useId();
1946
1946
  return /* @__PURE__ */ n(te, { children: [
@@ -1952,8 +1952,8 @@ const zn = {
1952
1952
  content: a,
1953
1953
  place: l,
1954
1954
  variant: s,
1955
- className: `custom-tooltip custom-tooltip--size-${o} ${m || ""}`,
1956
- ...i
1955
+ className: `custom-tooltip custom-tooltip--size-${i} ${m || ""}`,
1956
+ ...o
1957
1957
  }
1958
1958
  )
1959
1959
  ] });
@@ -1974,15 +1974,15 @@ const zn = {
1974
1974
  isOpen: t,
1975
1975
  onClose: a,
1976
1976
  steps: s = {},
1977
- currentStep: o,
1977
+ currentStep: i,
1978
1978
  direction: l = 1,
1979
1979
  stepProps: m = {},
1980
- title: i,
1980
+ title: o,
1981
1981
  description: u,
1982
1982
  showProgress: g = !0,
1983
1983
  closeOnOverlayClick: f = !0
1984
1984
  }) => {
1985
- const x = s[o], r = Object.keys(s), N = r.indexOf(o), d = (N + 1) / r.length * 100, p = N > 0 && m.onBack;
1985
+ const x = s[i], r = Object.keys(s), N = r.indexOf(i), d = (N + 1) / r.length * 100, p = N > 0 && m.onBack;
1986
1986
  return /* @__PURE__ */ e(ue, { show: t, as: Q, children: /* @__PURE__ */ n(
1987
1987
  be,
1988
1988
  {
@@ -2027,7 +2027,7 @@ const zn = {
2027
2027
  }
2028
2028
  ),
2029
2029
  /* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
2030
- /* @__PURE__ */ e(be.Title, { as: "h3", className: "wizard-title", children: i }),
2030
+ /* @__PURE__ */ e(be.Title, { as: "h3", className: "wizard-title", children: o }),
2031
2031
  u && /* @__PURE__ */ e(be.Description, { className: "wizard-description", children: u })
2032
2032
  ] })
2033
2033
  ] }),
@@ -2071,7 +2071,7 @@ const zn = {
2071
2071
  style: { overflowX: "hidden" },
2072
2072
  children: x && /* @__PURE__ */ e(x, { ...m })
2073
2073
  },
2074
- o
2074
+ i
2075
2075
  )
2076
2076
  }
2077
2077
  ) })
@@ -2092,11 +2092,11 @@ const zn = {
2092
2092
  dataTestId: t,
2093
2093
  title: a,
2094
2094
  type: s = "button",
2095
- ariaLabel: o,
2095
+ ariaLabel: i,
2096
2096
  className: l = "",
2097
2097
  // ✅ Default is now empty
2098
2098
  category: m = "secondary",
2099
- icon: i,
2099
+ icon: o,
2100
2100
  // Renamed for clarity, expecting a component type e.g., CheckCircle
2101
2101
  disabled: u = !1,
2102
2102
  size: g = "small",
@@ -2121,20 +2121,20 @@ const zn = {
2121
2121
  className: p,
2122
2122
  disabled: d,
2123
2123
  onClick: r,
2124
- title: o,
2125
- "aria-label": o,
2124
+ title: i,
2125
+ "aria-label": i,
2126
2126
  ...N,
2127
- children: i && /* @__PURE__ */ e(i, { size: g === "large" ? 20 : 16 })
2127
+ children: o && /* @__PURE__ */ e(o, { size: g === "large" ? 20 : 16 })
2128
2128
  }
2129
2129
  );
2130
2130
  }, jl = ({
2131
2131
  content: t,
2132
2132
  isFooter: a = !1,
2133
2133
  footerContent: s,
2134
- save: o,
2134
+ save: i,
2135
2135
  cancel: l,
2136
2136
  tertiary: m,
2137
- fullHeight: i = !1,
2137
+ fullHeight: o = !1,
2138
2138
  // A clearer prop name
2139
2139
  ...u
2140
2140
  }) => {
@@ -2142,7 +2142,7 @@ const zn = {
2142
2142
  "page-layout",
2143
2143
  {
2144
2144
  "page-layout--with-footer": a,
2145
- "page-layout--full-height": i
2145
+ "page-layout--full-height": o
2146
2146
  },
2147
2147
  u.className
2148
2148
  );
@@ -2165,12 +2165,12 @@ const zn = {
2165
2165
  ...l
2166
2166
  }
2167
2167
  ),
2168
- o?.show && /* @__PURE__ */ e(
2168
+ i?.show && /* @__PURE__ */ e(
2169
2169
  ee,
2170
2170
  {
2171
2171
  category: "primary",
2172
- label: o.label || "Save",
2173
- ...o
2172
+ label: i.label || "Save",
2173
+ ...i
2174
2174
  }
2175
2175
  )
2176
2176
  ] }) })
@@ -2180,12 +2180,12 @@ const zn = {
2180
2180
  subHeading: a,
2181
2181
  breadcrumbItems: s = [],
2182
2182
  // Expects the breadcrumb data as a prop
2183
- isLeftArrow: o = !1,
2183
+ isLeftArrow: i = !1,
2184
2184
  onBackClick: l,
2185
2185
  // Expects a handler for the back button
2186
2186
  ...m
2187
2187
  }) => /* @__PURE__ */ n("div", { className: "page-header-wrapper", ...m, children: [
2188
- o && l && /* @__PURE__ */ e(
2188
+ i && l && /* @__PURE__ */ e(
2189
2189
  "button",
2190
2190
  {
2191
2191
  className: "page-header-back-button",
@@ -2203,12 +2203,12 @@ const zn = {
2203
2203
  onSelect: a,
2204
2204
  triggerIcon: s = Ht
2205
2205
  }) => {
2206
- const { refs: o, floatingStyles: l } = sa({
2206
+ const { refs: i, floatingStyles: l } = sa({
2207
2207
  whileElementsMounted: ca,
2208
- middleware: [la(5), oa(), ia({ padding: 5 })]
2208
+ middleware: [la(5), ia(), oa({ padding: 5 })]
2209
2209
  });
2210
- return /* @__PURE__ */ n(Gr, { as: "div", className: "options-menu-wrapper", children: [
2211
- /* @__PURE__ */ e(Yr, { ref: o.setReference, className: "options-menu-trigger", children: /* @__PURE__ */ e(s, { size: 20 }) }),
2210
+ return /* @__PURE__ */ n(qr, { as: "div", className: "options-menu-wrapper", children: [
2211
+ /* @__PURE__ */ e(Yr, { ref: i.setReference, className: "options-menu-trigger", children: /* @__PURE__ */ e(s, { size: 20 }) }),
2212
2212
  /* @__PURE__ */ e(Wr, { children: /* @__PURE__ */ e(
2213
2213
  ue,
2214
2214
  {
@@ -2222,16 +2222,16 @@ const zn = {
2222
2222
  children: /* @__PURE__ */ e(
2223
2223
  Jr,
2224
2224
  {
2225
- ref: o.setFloating,
2225
+ ref: i.setFloating,
2226
2226
  style: l,
2227
2227
  className: "options-menu-panel",
2228
2228
  children: t.map((m) => /* @__PURE__ */ n("div", { className: "options-menu-item-wrapper", children: [
2229
2229
  m.dividerBefore && /* @__PURE__ */ e("div", { className: "menu-divider" }),
2230
- /* @__PURE__ */ e(Xr, { children: ({ active: i }) => /* @__PURE__ */ n(
2230
+ /* @__PURE__ */ e(Xr, { children: ({ active: o }) => /* @__PURE__ */ n(
2231
2231
  "button",
2232
2232
  {
2233
2233
  onClick: () => a(m),
2234
- className: `options-menu-item ${i ? "active bg-gray-200 text-gray-900" : ""}`,
2234
+ className: `options-menu-item ${o ? "active bg-gray-200 text-gray-900" : ""}`,
2235
2235
  disabled: m.disabled,
2236
2236
  children: [
2237
2237
  m.icon && /* @__PURE__ */ e("span", { className: "item-icon", children: m.icon }),
@@ -2253,7 +2253,7 @@ function Un(t) {
2253
2253
  return "";
2254
2254
  }
2255
2255
  }
2256
- function qn(t) {
2256
+ function Gn(t) {
2257
2257
  try {
2258
2258
  return JSON.parse(t);
2259
2259
  } catch {
@@ -2266,7 +2266,7 @@ function ya(t) {
2266
2266
  * Get an item (parsed if JSON).
2267
2267
  */
2268
2268
  get(a) {
2269
- return qn(t.getItem(a));
2269
+ return Gn(t.getItem(a));
2270
2270
  },
2271
2271
  /**
2272
2272
  * Set an item (string or object).
@@ -2292,33 +2292,33 @@ function ya(t) {
2292
2292
  all() {
2293
2293
  const a = {};
2294
2294
  for (let s = 0; s < t.length; s++) {
2295
- const o = t.key(s);
2296
- a[o] = this.get(o);
2295
+ const i = t.key(s);
2296
+ a[i] = this.get(i);
2297
2297
  }
2298
2298
  return a;
2299
2299
  }
2300
2300
  };
2301
2301
  }
2302
- const Gn = ya(localStorage), Vl = ya(sessionStorage), _l = {
2302
+ const qn = ya(localStorage), Vl = ya(sessionStorage), _l = {
2303
2303
  get(t) {
2304
2304
  const a = document.cookie.match(
2305
2305
  new RegExp("(^| )" + t + "=([^;]+)")
2306
2306
  );
2307
2307
  return a ? decodeURIComponent(a[2]) : null;
2308
2308
  },
2309
- set(t, a, s = 7, o = "/") {
2309
+ set(t, a, s = 7, i = "/") {
2310
2310
  const l = /* @__PURE__ */ new Date();
2311
2311
  l.setDate(l.getDate() + s), document.cookie = `${t}=${encodeURIComponent(
2312
2312
  a
2313
- )}; expires=${l.toUTCString()}; path=${o}`;
2313
+ )}; expires=${l.toUTCString()}; path=${i}`;
2314
2314
  },
2315
2315
  remove(t, a = "/") {
2316
2316
  document.cookie = `${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${a}`;
2317
2317
  },
2318
2318
  all() {
2319
2319
  return document.cookie.split(";").filter(Boolean).reduce((t, a) => {
2320
- const [s, o] = a.split("=").map((l) => l.trim());
2321
- return t[s] = decodeURIComponent(o), t;
2320
+ const [s, i] = a.split("=").map((l) => l.trim());
2321
+ return t[s] = decodeURIComponent(i), t;
2322
2322
  }, {});
2323
2323
  },
2324
2324
  clear() {
@@ -2326,20 +2326,20 @@ const Gn = ya(localStorage), Vl = ya(sessionStorage), _l = {
2326
2326
  Object.keys(t).forEach((a) => this.remove(a));
2327
2327
  }
2328
2328
  }, xa = () => typeof window < "u";
2329
- function at() {
2329
+ function tt() {
2330
2330
  return xa() ? window.location.hostname === "localhost" ? "https://dev.unifyed.com" : `${window.location.protocol}//${window.location.hostname}` : "https://dev.unifyed.com";
2331
2331
  }
2332
2332
  function va() {
2333
2333
  if (!xa()) return "";
2334
2334
  try {
2335
- const t = Gn.get("userProfile");
2335
+ const t = qn.get("userProfile");
2336
2336
  return !t && window.location.hostname === "localhost" ? "/unifyd-gateway/api" : (t && typeof t == "object" ? t : {})?.gatewaypath ?? "";
2337
2337
  } catch {
2338
2338
  return "";
2339
2339
  }
2340
2340
  }
2341
2341
  function ze() {
2342
- return `${at()}${va()}`;
2342
+ return `${tt()}${va()}`;
2343
2343
  }
2344
2344
  function Na() {
2345
2345
  return `${ze()}/unifyedstudioutility/commonutility/users/list?sortkey=firstName&sortorder=false&page=0&size=999&onlineusersonly=false`;
@@ -2367,7 +2367,7 @@ function Wn() {
2367
2367
  }
2368
2368
  function Ul() {
2369
2369
  return Object.freeze({
2370
- REACT_APP_BASE_URL: at(),
2370
+ REACT_APP_BASE_URL: tt(),
2371
2371
  GATEWAY_BASE: ze(),
2372
2372
  USER_SEARCH_BASE: Na(),
2373
2373
  AD_GROUPS_LIST_SEARCH_API: wa(),
@@ -2388,27 +2388,27 @@ function Jn(t) {
2388
2388
  }
2389
2389
  }
2390
2390
  function Rt() {
2391
- const t = Jn("userProfile") || {}, a = localStorage.getItem("access_token") || t.accessToken || "", s = localStorage.getItem("siteId") || t.siteId || "", o = t.tenant || "", l = t.tenantdomain || "", m = t.username || t.displayName || "", i = t.email || "";
2391
+ const t = Jn("userProfile") || {}, a = localStorage.getItem("access_token") || t.accessToken || "", s = localStorage.getItem("siteId") || t.siteId || "", i = t.tenant || "", l = t.tenantdomain || "", m = t.username || t.displayName || "", o = t.email || "";
2392
2392
  return {
2393
2393
  Authorization: a ? `Bearer ${a}` : void 0,
2394
- "x-tenant-id": o || void 0,
2394
+ "x-tenant-id": i || void 0,
2395
2395
  "x-tenant-domain": l || void 0,
2396
2396
  "site-id": s || void 0,
2397
2397
  "Content-Type": "application/json",
2398
2398
  "principal-user": m || void 0,
2399
- "x-user-email": i || void 0
2399
+ "x-user-email": o || void 0
2400
2400
  };
2401
2401
  }
2402
2402
  function Xn(t) {
2403
2403
  if (t && t.isAxiosError) {
2404
- const { response: a, config: s, message: o } = t, l = a?.status ?? null, m = a?.statusText ?? null, i = a?.data ?? null, u = typeof i == "string" && i || i?.message || i?.msg || i?.error || i?.errors?.[0]?.message || null;
2404
+ const { response: a, config: s, message: i } = t, l = a?.status ?? null, m = a?.statusText ?? null, o = a?.data ?? null, u = typeof o == "string" && o || o?.message || o?.msg || o?.error || o?.errors?.[0]?.message || null;
2405
2405
  return {
2406
2406
  ok: !1,
2407
2407
  status: l,
2408
2408
  statusText: m,
2409
- code: i?.code || null,
2410
- message: u || o || "Request failed",
2411
- details: i || null,
2409
+ code: o?.code || null,
2410
+ message: u || i || "Request failed",
2411
+ details: o || null,
2412
2412
  request: {
2413
2413
  url: s?.url || null,
2414
2414
  method: s?.method || null,
@@ -2432,7 +2432,7 @@ function Hn({
2432
2432
  defaultOpenHeaders: a = {}
2433
2433
  } = {}) {
2434
2434
  const s = Za.create({
2435
- baseURL: at()
2435
+ baseURL: tt()
2436
2436
  // ✅ base URL here
2437
2437
  // You can set general timeouts/etc. here
2438
2438
  // timeout: 20000,
@@ -2446,7 +2446,7 @@ function Hn({
2446
2446
  return t && (r === 401 || r === 403) && (window.location.href.includes("/login") || (window.historyPath = window.location.pathname, localStorage.clear(), sessionStorage.clear(), window.location.href = "/login")), Promise.reject(x);
2447
2447
  }
2448
2448
  );
2449
- function o({ open: f = !1, customHeader: x = {} } = {}) {
2449
+ function i({ open: f = !1, customHeader: x = {} } = {}) {
2450
2450
  if (f) {
2451
2451
  const { Authorization: r, ...N } = Rt();
2452
2452
  return {
@@ -2458,45 +2458,45 @@ function Hn({
2458
2458
  async function l(f, x, r = !1, N = {}) {
2459
2459
  return s.get(f, {
2460
2460
  params: x,
2461
- ...o({ open: r, customHeader: N })
2461
+ ...i({ open: r, customHeader: N })
2462
2462
  });
2463
2463
  }
2464
2464
  async function m(f, x, r = !1, N = {}) {
2465
- const d = { ...o({ open: r, customHeader: N }) };
2465
+ const d = { ...i({ open: r, customHeader: N }) };
2466
2466
  return x !== void 0 && (d.data = x), s.delete(f, d);
2467
2467
  }
2468
- async function i(f, x = {}, r = !1, N = {}) {
2469
- return s.post(f, x, o({ open: r, customHeader: N }));
2468
+ async function o(f, x = {}, r = !1, N = {}) {
2469
+ return s.post(f, x, i({ open: r, customHeader: N }));
2470
2470
  }
2471
2471
  async function u(f, x = {}, r = !1, N = {}) {
2472
- return s.put(f, x, o({ open: r, customHeader: N }));
2472
+ return s.put(f, x, i({ open: r, customHeader: N }));
2473
2473
  }
2474
2474
  async function g(f, x = {}, r = !1, N = {}) {
2475
- return s.patch(f, x, o({ open: r, customHeader: N }));
2475
+ return s.patch(f, x, i({ open: r, customHeader: N }));
2476
2476
  }
2477
2477
  return {
2478
2478
  instance: s,
2479
2479
  // exported in case you want advanced usage
2480
2480
  axiosGet: l,
2481
2481
  axiosDelete: m,
2482
- axiosPost: i,
2482
+ axiosPost: o,
2483
2483
  axiosPut: u,
2484
2484
  axiosPatch: g
2485
2485
  };
2486
2486
  }
2487
- const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn = Ee.axiosPut, Gl = Ee.axiosPatch, Yl = Ee.instance, Zn = async (t, a) => {
2487
+ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn = Ee.axiosPut, ql = Ee.axiosPatch, Yl = Ee.instance, Zn = async (t, a) => {
2488
2488
  try {
2489
2489
  switch (t) {
2490
2490
  case $e.USER: {
2491
2491
  const s = {
2492
2492
  q: a
2493
2493
  };
2494
- return Xe.userSearch(s);
2494
+ return We.userSearch(s);
2495
2495
  }
2496
2496
  case $e.GROUP:
2497
- return Xe.getAdGroups(a);
2497
+ return We.getAdGroups(a);
2498
2498
  case $e.ROLE:
2499
- return Xe.searchRoles(a);
2499
+ return We.searchRoles(a);
2500
2500
  default:
2501
2501
  break;
2502
2502
  }
@@ -2504,12 +2504,12 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2504
2504
  console.log("Error searching entities:", s);
2505
2505
  }
2506
2506
  }, Kn = (t) => t.filter((a) => !!a?.email).map((a) => {
2507
- const s = (a?.firstName ?? "").trim(), o = (a?.lastName ?? "").trim(), l = `${s} ${o}`.trim() || (a.email?.split("@")[0] ?? "Unknown");
2507
+ const s = (a?.firstName ?? "").trim(), i = (a?.lastName ?? "").trim(), l = `${s} ${i}`.trim() || (a.email?.split("@")[0] ?? "Unknown");
2508
2508
  return {
2509
2509
  id: a.email,
2510
2510
  name: l,
2511
2511
  type: "User",
2512
- avatarUrl: a?.profileImage || Je(l)
2512
+ avatarUrl: a?.profileImage || Ye(l)
2513
2513
  };
2514
2514
  }), Ot = (t) => {
2515
2515
  try {
@@ -2518,18 +2518,18 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2518
2518
  } catch {
2519
2519
  return [];
2520
2520
  }
2521
- }, Xe = {
2521
+ }, We = {
2522
2522
  userSearch: async (t) => {
2523
- const { data: a } = await _e(`${Na()}`, t);
2523
+ const { data: a } = await Ve(`${Na()}`, t);
2524
2524
  return console.log("User search response:", a), a.length ? a.map((s) => ({
2525
2525
  id: s.email,
2526
2526
  name: `${s?.firstName} ${s?.lastName}`.trim(),
2527
2527
  type: "User",
2528
- avatarUrl: s?.profileImage || Je(`${s?.firstName} ${s?.lastName}`.trim())
2528
+ avatarUrl: s?.profileImage || Ye(`${s?.firstName} ${s?.lastName}`.trim())
2529
2529
  })) : [];
2530
2530
  },
2531
2531
  getAdGroups: async (t) => {
2532
- const { data: a } = await Le(`${wa()}`, {
2532
+ const { data: a } = await Ze(`${wa()}`, {
2533
2533
  q: t
2534
2534
  });
2535
2535
  if (a.length)
@@ -2537,11 +2537,11 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2537
2537
  id: s.Name,
2538
2538
  name: s.Name,
2539
2539
  type: "Group",
2540
- avatarUrl: Je(s.Name)
2540
+ avatarUrl: Ye(s.Name)
2541
2541
  }));
2542
2542
  },
2543
2543
  searchRoles: async (t) => {
2544
- const { data: a } = await Le(`${za()}`, {
2544
+ const { data: a } = await Ze(`${za()}`, {
2545
2545
  page: 0,
2546
2546
  size: 20,
2547
2547
  q: t ?? "",
@@ -2553,28 +2553,28 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2553
2553
  id: s._id,
2554
2554
  name: s.name,
2555
2555
  type: "Role",
2556
- avatarUrl: Je(s.name)
2556
+ avatarUrl: Ye(s.name)
2557
2557
  }));
2558
2558
  },
2559
2559
  getMembersForGroup: async (t) => {
2560
- const a = `${ze()}/unifydidentity/open/usersforgroup?groupName=${encodeURIComponent(t)}&isGroupWithSpecChar=true&isPaging=true&page=0&size=999&deepSearch=`, { data: s } = await _e(a);
2561
- let o = [];
2560
+ const a = `${ze()}/unifydidentity/open/usersforgroup?groupName=${encodeURIComponent(t)}&isGroupWithSpecChar=true&isPaging=true&page=0&size=999&deepSearch=`, { data: s } = await Ve(a);
2561
+ let i = [];
2562
2562
  if (Array.isArray(s))
2563
- o = s;
2563
+ i = s;
2564
2564
  else if (typeof s == "string")
2565
- o = Ot(s.trim());
2565
+ i = Ot(s.trim());
2566
2566
  else if (s && typeof s == "object") {
2567
2567
  const l = s.data;
2568
- Array.isArray(l) ? o = l : typeof l == "string" && (o = Ot(l.trim()));
2568
+ Array.isArray(l) ? i = l : typeof l == "string" && (i = Ot(l.trim()));
2569
2569
  }
2570
- return Kn(o);
2570
+ return Kn(i);
2571
2571
  }
2572
2572
  }, kt = (t, a) => {
2573
- const [s, o] = L(t);
2573
+ const [s, i] = L(t);
2574
2574
  return Z(
2575
2575
  () => {
2576
2576
  const l = an(() => {
2577
- o(t);
2577
+ i(t);
2578
2578
  }, a);
2579
2579
  return l(), () => {
2580
2580
  l.cancel();
@@ -2587,13 +2587,13 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2587
2587
  users: t = [],
2588
2588
  groups: a = [],
2589
2589
  roles: s = [],
2590
- onClick: o
2590
+ onClick: i
2591
2591
  }) => {
2592
2592
  const l = t.slice(0, 2), m = [];
2593
2593
  t.length > 0 && m.push(t[0].name), a.length > 0 && m.push(a[0].name), s.length > 0 && m.length < 2 && m.push(s[0].name);
2594
- const i = t.length + a.length + s.length, u = i - m.length;
2594
+ const o = t.length + a.length + s.length, u = o - m.length;
2595
2595
  let g = m.join(", ");
2596
- return u > 0 && (g += ` and ${u} others`), i === 0 ? /* @__PURE__ */ e(
2596
+ return u > 0 && (g += ` and ${u} others`), o === 0 ? /* @__PURE__ */ e(
2597
2597
  "div",
2598
2598
  {
2599
2599
  className: "flex items-center justify-between p-3 border border-dashed border-gray-400 rounded-lg hover:bg-gray-50",
@@ -2602,7 +2602,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2602
2602
  ) : /* @__PURE__ */ n(
2603
2603
  "div",
2604
2604
  {
2605
- onClick: o,
2605
+ onClick: i,
2606
2606
  className: "flex items-center justify-between p-3 border border-gray-300 rounded-lg hover:bg-gray-50 hover:cursor-pointer transition-colors duration-150",
2607
2607
  children: [
2608
2608
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3 overflow-hidden", children: [
@@ -2635,17 +2635,17 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2635
2635
  entity: t,
2636
2636
  onManage: a,
2637
2637
  onClose: s,
2638
- existingShares: o = { users: [], groups: [], roles: [] },
2638
+ existingShares: i = { users: [], groups: [], roles: [] },
2639
2639
  calledBy: l,
2640
2640
  showExistingShares: m = !1,
2641
- onFinalSubmit: i = () => {
2641
+ onFinalSubmit: o = () => {
2642
2642
  },
2643
2643
  isChanged: u = !1
2644
2644
  }) => {
2645
2645
  const [g, f] = L(Pt[0]), [x, r] = L(""), N = kt(x, 400), [d, p] = L([]), [$, A] = L(/* @__PURE__ */ new Set()), [E, R] = L(!1), [O, V] = L(It[0]), {
2646
2646
  control: U,
2647
2647
  handleSubmit: Y,
2648
- watch: q,
2648
+ watch: G,
2649
2649
  formState: { errors: C, isSubmitting: h }
2650
2650
  } = rr({
2651
2651
  defaultValues: { pendingInvites: [] },
@@ -2653,7 +2653,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2653
2653
  }), { fields: w, append: T, remove: k, update: v } = nr({
2654
2654
  control: U,
2655
2655
  name: "pendingInvites"
2656
- }), b = q("pendingInvites");
2656
+ }), b = G("pendingInvites");
2657
2657
  Z(() => {
2658
2658
  N.length > 1 ? (R(!0), Zn(g.name, N).then((S) => {
2659
2659
  p(S);
@@ -2680,12 +2680,12 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2680
2680
  permission: I.permission,
2681
2681
  type: I.type.toLowerCase()
2682
2682
  }));
2683
- i({
2683
+ o({
2684
2684
  entity: t,
2685
2685
  userGroupRolesObj: B,
2686
- existingShares: o
2686
+ existingShares: i
2687
2687
  // Always send updated existing shares
2688
- }, o);
2688
+ }, i);
2689
2689
  } else if (l === de.INTEREST) {
2690
2690
  const B = S.pendingInvites.map((_) => ({
2691
2691
  identity: _.id,
@@ -2696,20 +2696,20 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2696
2696
  userName: _.name,
2697
2697
  interestId: t?.data?.id
2698
2698
  }));
2699
- i(B, o);
2699
+ o(B, i);
2700
2700
  } else if (l === de.ARTICLE) {
2701
2701
  const B = S.pendingInvites.map((I) => ({
2702
2702
  id: I.id,
2703
2703
  permission: I.permission,
2704
2704
  type: I.type.toLowerCase()
2705
2705
  }));
2706
- i({
2706
+ o({
2707
2707
  entity: t,
2708
2708
  userGroupRolesObj: B,
2709
- existingShares: o
2710
- }, o);
2709
+ existingShares: i
2710
+ }, i);
2711
2711
  } else
2712
- i(S, o);
2712
+ o(S, i);
2713
2713
  setTimeout(() => {
2714
2714
  s();
2715
2715
  }, 1e3);
@@ -2717,7 +2717,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2717
2717
  throw console.error("Failed to submit invites:", B), B;
2718
2718
  }
2719
2719
  }, P = (S) => {
2720
- const B = o[g.code].find((_) => _.name === S.name && _.permission !== "remove") || b.find((_) => _.name === S.name);
2720
+ const B = i[g.code].find((_) => _.name === S.name && _.permission !== "remove") || b.find((_) => _.name === S.name);
2721
2721
  return B ? `${B.permission}` : "";
2722
2722
  }, F = () => {
2723
2723
  switch (l) {
@@ -2744,7 +2744,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2744
2744
  {
2745
2745
  onClick: s,
2746
2746
  className: "text-gray-500 hover:text-gray-800 hover:cursor-pointer",
2747
- children: /* @__PURE__ */ e(Ke, { className: "h-6 w-6" })
2747
+ children: /* @__PURE__ */ e(Qe, { className: "h-6 w-6" })
2748
2748
  }
2749
2749
  )
2750
2750
  ] })
@@ -2753,9 +2753,9 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2753
2753
  (l === de.DRIVE || m) && /* @__PURE__ */ e(
2754
2754
  es,
2755
2755
  {
2756
- users: o.users.filter((S) => S.permission !== "remove"),
2757
- groups: o.groups.filter((S) => S.permission !== "remove"),
2758
- roles: o.roles.filter((S) => S.permission !== "remove"),
2756
+ users: i.users.filter((S) => S.permission !== "remove"),
2757
+ groups: i.groups.filter((S) => S.permission !== "remove"),
2758
+ roles: i.roles.filter((S) => S.permission !== "remove"),
2759
2759
  onClick: a
2760
2760
  }
2761
2761
  ),
@@ -2985,7 +2985,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
2985
2985
  {
2986
2986
  onClick: () => k(B),
2987
2987
  className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
2988
- children: /* @__PURE__ */ e(Ke, { className: "h-5 w-5" })
2988
+ children: /* @__PURE__ */ e(Qe, { className: "h-5 w-5" })
2989
2989
  }
2990
2990
  )
2991
2991
  ] })
@@ -3025,21 +3025,21 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3025
3025
  ] })
3026
3026
  ] }) })
3027
3027
  ] });
3028
- }, ct = [
3028
+ }, ot = [
3029
3029
  { name: "Can view", icon: Zt, value: "view" },
3030
3030
  { name: "Can manage", icon: Kt, value: "edit" },
3031
- { name: "Remove", icon: or, isDestructive: !0, value: "remove" }
3031
+ { name: "Remove", icon: ir, isDestructive: !0, value: "remove" }
3032
3032
  ], rs = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
3033
- const [o, l] = L(!1), { refs: m, floatingStyles: i, context: u } = sa({
3034
- open: o,
3033
+ const [i, l] = L(!1), { refs: m, floatingStyles: o, context: u } = sa({
3034
+ open: i,
3035
3035
  onOpenChange: l,
3036
- middleware: [la(8), oa(), ia({ padding: 8 })],
3036
+ middleware: [la(8), ia(), oa({ padding: 8 })],
3037
3037
  whileElementsMounted: ca,
3038
3038
  placement: "bottom-end"
3039
3039
  }), g = Zr(u), f = Kr(u), { getReferenceProps: x, getFloatingProps: r } = en([
3040
3040
  g,
3041
3041
  f
3042
- ]), N = ct.find((p) => p.name === t.permission || p.value === t.permission) || ct[0];
3042
+ ]), N = ot.find((p) => p.name === t.permission || p.value === t.permission) || ot[0];
3043
3043
  return (
3044
3044
  // FIX: The <Listbox> component now wraps both the button and the portal.
3045
3045
  // This provides the necessary context for both children.
@@ -3062,7 +3062,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3062
3062
  ue,
3063
3063
  {
3064
3064
  as: Q,
3065
- show: o,
3065
+ show: i,
3066
3066
  enter: "transition ease-out duration-100",
3067
3067
  enterFrom: "transform opacity-0 scale-95",
3068
3068
  enterTo: "transform opacity-100 scale-100",
@@ -3073,11 +3073,11 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3073
3073
  K.Options,
3074
3074
  {
3075
3075
  ref: m.setFloating,
3076
- style: i,
3076
+ style: o,
3077
3077
  ...r(),
3078
3078
  static: !0,
3079
3079
  className: "z-50 w-48 bg-white shadow-lg rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm",
3080
- children: ct.filter((p) => a.includes(p.value)).map((p) => /* @__PURE__ */ e(
3080
+ children: ot.filter((p) => a.includes(p.value)).map((p) => /* @__PURE__ */ e(
3081
3081
  K.Option,
3082
3082
  {
3083
3083
  className: ({
@@ -3114,33 +3114,33 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3114
3114
  //entire file or folder details
3115
3115
  onBack: a,
3116
3116
  onClose: s,
3117
- onOpenMembers: o,
3117
+ onOpenMembers: i,
3118
3118
  existingShares: l,
3119
3119
  allowedPermissions: m
3120
3120
  }) => {
3121
- const [i, u] = L(l), [g, f] = L(0), [x, r] = L(""), N = kt(x, 300), d = {
3122
- users: i.users.filter(
3121
+ const [o, u] = L(l), [g, f] = L(0), [x, r] = L(""), N = kt(x, 300), d = {
3122
+ users: o.users.filter(
3123
3123
  (R) => R.name.toLowerCase().includes(N.toLowerCase())
3124
3124
  ),
3125
- groups: i.groups.filter(
3125
+ groups: o.groups.filter(
3126
3126
  (R) => R.name.toLowerCase().includes(N.toLowerCase())
3127
3127
  ),
3128
- roles: i.roles.filter(
3128
+ roles: o.roles.filter(
3129
3129
  (R) => R.name.toLowerCase().includes(N.toLowerCase())
3130
3130
  )
3131
3131
  }, p = async (R, O, V, U) => {
3132
3132
  const Y = O.value;
3133
- u((q) => ({
3134
- ...q,
3135
- [V]: q[V].map(
3133
+ u((G) => ({
3134
+ ...G,
3135
+ [V]: G[V].map(
3136
3136
  (C) => C.id === R.id ? { ...C, permission: Y } : C
3137
3137
  )
3138
3138
  }));
3139
3139
  }, $ = () => {
3140
3140
  const R = {
3141
- users: i.users.filter((O) => O.permission !== "remove"),
3142
- groups: i.groups.filter((O) => O.permission !== "remove"),
3143
- roles: i.roles.filter((O) => O.permission !== "remove")
3141
+ users: o.users.filter((O) => O.permission !== "remove"),
3142
+ groups: o.groups.filter((O) => O.permission !== "remove"),
3143
+ roles: o.roles.filter((O) => O.permission !== "remove")
3144
3144
  };
3145
3145
  a(R);
3146
3146
  }, A = ["users", "groups", "roles"], E = ["Users", "Groups", "Roles"];
@@ -3151,7 +3151,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3151
3151
  /* @__PURE__ */ n(
3152
3152
  "button",
3153
3153
  {
3154
- onClick: () => a(i),
3154
+ onClick: () => a(o),
3155
3155
  className: "flex items-center gap-1 text-sm font-medium text-gray-600 hover:text-gray-900 hover:cursor-pointer p-2 rounded-md hover:bg-gray-100",
3156
3156
  children: [
3157
3157
  /* @__PURE__ */ e(ea, { className: "h-5 w-5" }),
@@ -3165,7 +3165,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3165
3165
  {
3166
3166
  onClick: s,
3167
3167
  className: "text-gray-500 hover:text-gray-800 p-2 rounded-full hover:bg-gray-100 hover:cursor-pointer",
3168
- children: /* @__PURE__ */ e(Ke, { className: "h-6 w-6" })
3168
+ children: /* @__PURE__ */ e(Qe, { className: "h-6 w-6" })
3169
3169
  }
3170
3170
  )
3171
3171
  ] }),
@@ -3231,7 +3231,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3231
3231
  R !== "users" && /* @__PURE__ */ e(
3232
3232
  "button",
3233
3233
  {
3234
- onClick: () => o({
3234
+ onClick: () => i({
3235
3235
  id: O.id,
3236
3236
  type: R,
3237
3237
  name: O.name
@@ -3306,9 +3306,9 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3306
3306
  // { id, name, type: "group" | "role" }
3307
3307
  onBack: a,
3308
3308
  onClose: s,
3309
- members: o
3309
+ members: i
3310
3310
  }) => {
3311
- const [l, m] = L(!0), [i, u] = L(""), g = kt(i, 300), f = o.filter(
3311
+ const [l, m] = L(!0), [o, u] = L(""), g = kt(o, 300), f = i.filter(
3312
3312
  (d) => d.name.toLowerCase().includes(g.toLowerCase())
3313
3313
  ), x = {
3314
3314
  hidden: { opacity: 0 },
@@ -3332,7 +3332,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3332
3332
  animate: { opacity: 1, scale: 1 },
3333
3333
  className: "flex flex-col items-center justify-center text-center p-8 mt-10",
3334
3334
  children: [
3335
- /* @__PURE__ */ e(ir, { className: "h-12 w-12 text-gray-400" }),
3335
+ /* @__PURE__ */ e(or, { className: "h-12 w-12 text-gray-400" }),
3336
3336
  /* @__PURE__ */ e("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: "No Users Found" }),
3337
3337
  /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: g ? `No one found matching "${g}"` : `There are no users in this ${t.type}.` })
3338
3338
  ]
@@ -3394,7 +3394,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3394
3394
  {
3395
3395
  onClick: s,
3396
3396
  className: "text-gray-500 hover:text-gray-800 p-2 rounded-full hover:bg-gray-100 hover:cursor-pointer",
3397
- children: /* @__PURE__ */ e(Ke, { className: "h-6 w-6" })
3397
+ children: /* @__PURE__ */ e(Qe, { className: "h-6 w-6" })
3398
3398
  }
3399
3399
  )
3400
3400
  ] }),
@@ -3402,7 +3402,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3402
3402
  he,
3403
3403
  {
3404
3404
  onDebouncedChange: u,
3405
- value: i,
3405
+ value: o,
3406
3406
  placeholder: "Search members..."
3407
3407
  }
3408
3408
  ) }),
@@ -3412,7 +3412,7 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3412
3412
  INVITE: "invite",
3413
3413
  MANAGE: "manage",
3414
3414
  MEMBERS: "members"
3415
- }, os = ({
3415
+ }, is = ({
3416
3416
  existingShares: t = {
3417
3417
  users: [],
3418
3418
  groups: [],
@@ -3421,11 +3421,11 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3421
3421
  isOpen: a,
3422
3422
  onFinalSubmit: s = () => {
3423
3423
  },
3424
- mainEntity: o,
3424
+ mainEntity: i,
3425
3425
  calledBy: l,
3426
3426
  onClose: m = () => {
3427
3427
  },
3428
- showExistingShares: i = !0,
3428
+ showExistingShares: o = !0,
3429
3429
  allowedPermissions: u = [],
3430
3430
  ...g
3431
3431
  }) => {
@@ -3433,10 +3433,10 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3433
3433
  x(pe.INVITE), p(null), m();
3434
3434
  }, Y = () => {
3435
3435
  x(pe.MANAGE);
3436
- }, q = async ({ id: w, name: T, type: k }) => {
3436
+ }, G = async ({ id: w, name: T, type: k }) => {
3437
3437
  if (k === "groups") {
3438
3438
  try {
3439
- const v = await _e(`${Xe.getMembersForGroup(T)}`);
3439
+ const v = await Ve(`${We.getMembersForGroup(T)}`);
3440
3440
  } catch (v) {
3441
3441
  console.log("Error searching entities:", v);
3442
3442
  }
@@ -3466,10 +3466,10 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3466
3466
  children: /* @__PURE__ */ e(
3467
3467
  ns,
3468
3468
  {
3469
- entity: o,
3469
+ entity: i,
3470
3470
  onBack: C,
3471
3471
  onClose: U,
3472
- onOpenMembers: q,
3472
+ onOpenMembers: G,
3473
3473
  existingShares: r,
3474
3474
  calledBy: l,
3475
3475
  allowedPermissions: u
@@ -3513,12 +3513,12 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3513
3513
  children: /* @__PURE__ */ e(
3514
3514
  as,
3515
3515
  {
3516
- entity: o,
3516
+ entity: i,
3517
3517
  onManage: Y,
3518
3518
  onClose: U,
3519
3519
  existingShares: r,
3520
3520
  calledBy: l,
3521
- showExistingShares: i,
3521
+ showExistingShares: o,
3522
3522
  onFinalSubmit: (w) => {
3523
3523
  s(w, r);
3524
3524
  },
@@ -3535,16 +3535,16 @@ const Ee = Hn(), _e = Ee.axiosGet, ql = Ee.axiosDelete, Le = Ee.axiosPost, Qn =
3535
3535
  function Ge(...t) {
3536
3536
  return t.filter(Boolean).join(" ");
3537
3537
  }
3538
- function rt({
3538
+ function at({
3539
3539
  label: t,
3540
3540
  options: a = [],
3541
3541
  selected: s = [],
3542
- onChange: o = () => {
3542
+ onChange: i = () => {
3543
3543
  },
3544
3544
  onBlur: l = () => {
3545
3545
  },
3546
3546
  placeholder: m = "Select options",
3547
- error: i = null,
3547
+ error: o = null,
3548
3548
  displayLimit: u = 3,
3549
3549
  selectionLimit: g = -1,
3550
3550
  // NEW: search behavior
@@ -3558,7 +3558,7 @@ function rt({
3558
3558
  getOptionId: d = ($) => String($.id),
3559
3559
  getOptionLabel: p = ($) => $.name
3560
3560
  }) {
3561
- const $ = Qe(), A = Qe(), [E, R] = L(""), O = ge(""), V = me(() => {
3561
+ const $ = Xe(), A = Xe(), [E, R] = L(""), O = ge(""), V = me(() => {
3562
3562
  const w = /* @__PURE__ */ new Map();
3563
3563
  for (const T of a) w.set(d(T), T);
3564
3564
  return w;
@@ -3570,7 +3570,7 @@ function rt({
3570
3570
  Z(() => {
3571
3571
  f === "server" && E.length >= N && E !== O.current && (O.current = E, x && x(E));
3572
3572
  }, [E, f, N, x]);
3573
- const q = f === "client" ? Y : a, C = () => {
3573
+ const G = f === "client" ? Y : a, C = () => {
3574
3574
  if (!U.length)
3575
3575
  return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
3576
3576
  const w = U.slice(0, u), T = U.length - u;
@@ -3592,7 +3592,7 @@ function rt({
3592
3592
  };
3593
3593
  return /* @__PURE__ */ e(K, { value: U, onChange: (w) => {
3594
3594
  const T = Array.from(new Set(w.map((k) => d(k))));
3595
- g !== -1 && T.length > g || o(T);
3595
+ g !== -1 && T.length > g || i(T);
3596
3596
  }, multiple: !0, by: "id", children: ({ open: w }) => /* @__PURE__ */ n("div", { children: [
3597
3597
  /* @__PURE__ */ e(
3598
3598
  K.Label,
@@ -3607,12 +3607,12 @@ function rt({
3607
3607
  K.Button,
3608
3608
  {
3609
3609
  "aria-labelledby": $,
3610
- "aria-invalid": !!i,
3611
- "aria-describedby": i ? A : void 0,
3610
+ "aria-invalid": !!o,
3611
+ "aria-describedby": o ? A : void 0,
3612
3612
  onBlur: l,
3613
3613
  className: Ge(
3614
3614
  "relative w-full min-h-[38px] cursor-default rounded-md bg-white py-1.5 pl-3 pr-10 text-left text-gray-900 shadow-sm ring-1 ring-inset focus:outline-none focus:ring-2 focus:ring-gray-600 sm:text-sm sm:leading-6",
3615
- i ? "ring-red-500" : "ring-gray-300"
3615
+ o ? "ring-red-500" : "ring-gray-300"
3616
3616
  ),
3617
3617
  children: [
3618
3618
  /* @__PURE__ */ e("span", { className: "block truncate", children: C() }),
@@ -3638,7 +3638,7 @@ function rt({
3638
3638
  }
3639
3639
  ) }),
3640
3640
  f === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
3641
- q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: f === "server" ? E.length < N ? `Type at least ${N} characters to search.` : "No results." : "No options found." }) : q.map((T) => {
3641
+ G.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: f === "server" ? E.length < N ? `Type at least ${N} characters to search.` : "No results." : "No options found." }) : G.map((T) => {
3642
3642
  const k = d(T), v = p(T), b = U.some((D) => d(D) === k), y = g !== -1 && U.length >= g && !b;
3643
3643
  return /* @__PURE__ */ e(
3644
3644
  K.Option,
@@ -3667,7 +3667,7 @@ function rt({
3667
3667
  M ? " text-gray-900" : " text-gray-600",
3668
3668
  " absolute inset-y-0 right-0 flex items-center pr-4"
3669
3669
  ),
3670
- children: /* @__PURE__ */ e(et, { className: "w-5 h-5", "aria-hidden": "true" })
3670
+ children: /* @__PURE__ */ e(Ke, { className: "w-5 h-5", "aria-hidden": "true" })
3671
3671
  }
3672
3672
  )
3673
3673
  ] })
@@ -3678,11 +3678,11 @@ function rt({
3678
3678
  ] })
3679
3679
  }
3680
3680
  ),
3681
- i && /* @__PURE__ */ e("p", { id: A, className: "mt-1 text-sm text-red-600", children: i })
3681
+ o && /* @__PURE__ */ e("p", { id: A, className: "mt-1 text-sm text-red-600", children: o })
3682
3682
  ] })
3683
3683
  ] }) });
3684
3684
  }
3685
- rt.propTypes = {
3685
+ at.propTypes = {
3686
3686
  label: c.string.isRequired,
3687
3687
  options: c.arrayOf(
3688
3688
  c.shape({
@@ -3706,7 +3706,7 @@ rt.propTypes = {
3706
3706
  getOptionId: c.func,
3707
3707
  getOptionLabel: c.func
3708
3708
  };
3709
- rt.defaultProps = {
3709
+ at.defaultProps = {
3710
3710
  options: [],
3711
3711
  selected: [],
3712
3712
  placeholder: "Select options",
@@ -3728,10 +3728,10 @@ const Wl = ({
3728
3728
  isOpen: t = !1,
3729
3729
  setIsOpen: a,
3730
3730
  content: s,
3731
- header: o = { title: "", customHeader: null, isCrossShow: !0 },
3731
+ header: i = { title: "", customHeader: null, isCrossShow: !0 },
3732
3732
  footer: l = { show: !0, customFooter: null },
3733
3733
  primaryAction: m = { onSubmit: null, label: "Save", loader: !1, disabled: !1 },
3734
- secondaryAction: i = { onCancel: null, label: "Cancel" },
3734
+ secondaryAction: o = { onCancel: null, label: "Cancel" },
3735
3735
  dialogPanelClass: u = ""
3736
3736
  }) => {
3737
3737
  const g = (x) => {
@@ -3760,9 +3760,9 @@ const Wl = ({
3760
3760
  onClick: f,
3761
3761
  children: [
3762
3762
  /* @__PURE__ */ n("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
3763
- o?.customHeader && o.customHeader,
3764
- o?.title && !o?.customHeader && /* @__PURE__ */ e(tt, { className: "text-lg font-bold", children: o?.title }),
3765
- o?.isCrossShow && /* @__PURE__ */ e("button", { onClick: () => a(!1), className: "p-2", children: /* @__PURE__ */ e(ye, { className: "w-5 h-5" }) })
3763
+ i?.customHeader && i.customHeader,
3764
+ i?.title && !i?.customHeader && /* @__PURE__ */ e(et, { className: "text-lg font-bold", children: i?.title }),
3765
+ i?.isCrossShow && /* @__PURE__ */ e("button", { onClick: () => a(!1), className: "p-2", children: /* @__PURE__ */ e(ye, { className: "w-5 h-5" }) })
3766
3766
  ] }),
3767
3767
  /* @__PURE__ */ e(
3768
3768
  "div",
@@ -3773,15 +3773,15 @@ const Wl = ({
3773
3773
  }
3774
3774
  ),
3775
3775
  l?.show && !l?.customFooter && /* @__PURE__ */ n("div", { className: "border-t flex justify-end border-gray-200 p-6 flex-shrink-0", children: [
3776
- i?.onCancel && /* @__PURE__ */ e(
3776
+ o?.onCancel && /* @__PURE__ */ e(
3777
3777
  ee,
3778
3778
  {
3779
3779
  "data-testid": "cancel-button",
3780
- label: i?.label,
3780
+ label: o?.label,
3781
3781
  loader: !1,
3782
3782
  ariaLabel: "Cancel Button",
3783
3783
  className: "p-3 mr-3 secondaryButton !w-[70px]",
3784
- onClick: () => i?.onCancel(),
3784
+ onClick: () => o?.onCancel(),
3785
3785
  category: "secondary"
3786
3786
  }
3787
3787
  ),
@@ -3807,7 +3807,7 @@ const Wl = ({
3807
3807
  }
3808
3808
  );
3809
3809
  };
3810
- function is({ listeners: t = {}, attributes: a = {} }) {
3810
+ function os({ listeners: t = {}, attributes: a = {} }) {
3811
3811
  return /* @__PURE__ */ e(
3812
3812
  "button",
3813
3813
  {
@@ -3825,10 +3825,10 @@ function cs({
3825
3825
  node: t,
3826
3826
  depth: a,
3827
3827
  expanded: s,
3828
- onToggle: o,
3828
+ onToggle: i,
3829
3829
  onSelect: l,
3830
3830
  onCreateChild: m,
3831
- onRename: i,
3831
+ onRename: o,
3832
3832
  onDelete: u,
3833
3833
  renderActions: g,
3834
3834
  // optional override
@@ -3836,9 +3836,9 @@ function cs({
3836
3836
  dropId: x,
3837
3837
  indent: r = 24
3838
3838
  }) {
3839
- const { setNodeRef: N, isOver: d } = cr({ id: x }), { attributes: p, listeners: $, setNodeRef: A, transform: E, isDragging: R } = dr({ id: f }), O = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [V, U] = L(!1), [Y, q] = L(t.name), C = () => {
3839
+ const { setNodeRef: N, isOver: d } = cr({ id: x }), { attributes: p, listeners: $, setNodeRef: A, transform: E, isDragging: R } = dr({ id: f }), O = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [V, U] = L(!1), [Y, G] = L(t.name), C = () => {
3840
3840
  const w = Y.trim();
3841
- U(!1), w && w !== t.name ? i?.(t, w) : q(t.name);
3841
+ U(!1), w && w !== t.name ? o?.(t, w) : G(t.name);
3842
3842
  }, h = me(() => /* @__PURE__ */ e(
3843
3843
  _n,
3844
3844
  {
@@ -3862,22 +3862,22 @@ function cs({
3862
3862
  w.target.closest(".tv-toggle") || w.target.tagName === "INPUT" || l?.(t);
3863
3863
  },
3864
3864
  children: [
3865
- /* @__PURE__ */ e("button", { className: "tv-toggle", onClick: o, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(vt, { size: 16 }) : /* @__PURE__ */ e(fe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
3866
- /* @__PURE__ */ e(Be, { size: 16, className: "tv-folder-ic" }),
3865
+ /* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(vt, { size: 16 }) : /* @__PURE__ */ e(fe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
3866
+ /* @__PURE__ */ e(Le, { size: 16, className: "tv-folder-ic" }),
3867
3867
  /* @__PURE__ */ e("div", { className: "tv-name", ref: A, children: V ? /* @__PURE__ */ e(
3868
3868
  "input",
3869
3869
  {
3870
3870
  className: "tv-input",
3871
3871
  value: Y,
3872
- onChange: (w) => q(w.target.value),
3872
+ onChange: (w) => G(w.target.value),
3873
3873
  onBlur: C,
3874
3874
  onKeyDown: (w) => {
3875
- w.key === "Enter" && C(), w.key === "Escape" && (U(!1), q(t.name));
3875
+ w.key === "Enter" && C(), w.key === "Escape" && (U(!1), G(t.name));
3876
3876
  },
3877
3877
  autoFocus: !0
3878
3878
  }
3879
3879
  ) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
3880
- /* @__PURE__ */ e(is, { listeners: $, attributes: p }),
3880
+ /* @__PURE__ */ e(os, { listeners: $, attributes: p }),
3881
3881
  /* @__PURE__ */ e("div", { className: "tv-actions", children: g ? g(t, {
3882
3882
  onCreateChild: () => m?.(t),
3883
3883
  onRename: () => U(!0),
@@ -3888,7 +3888,7 @@ function cs({
3888
3888
  );
3889
3889
  }
3890
3890
  const ds = (t) => String(t.id ?? t._id), ms = (t) => t.parent !== void 0 ? String(t.parent) : t.parentId != null ? String(t.parentId) : "root", us = (t) => t.name ?? t.label ?? "", hs = (t) => Array.isArray(t) && t.some((a) => Array.isArray(a.children));
3891
- function ps(t, { rootId: a, getId: s, getParent: o, getName: l }) {
3891
+ function ps(t, { rootId: a, getId: s, getParent: i, getName: l }) {
3892
3892
  const m = /* @__PURE__ */ new Map();
3893
3893
  t.forEach((u) => {
3894
3894
  const g = s(u);
@@ -3896,23 +3896,23 @@ function ps(t, { rootId: a, getId: s, getParent: o, getName: l }) {
3896
3896
  ...u,
3897
3897
  id: g,
3898
3898
  name: l(u),
3899
- parentId: o(u) || a,
3899
+ parentId: i(u) || a,
3900
3900
  children: []
3901
3901
  });
3902
3902
  });
3903
- const i = [];
3903
+ const o = [];
3904
3904
  return m.forEach((u) => {
3905
3905
  const g = u.parentId || a;
3906
- g !== a && m.has(g) ? m.get(g).children.push(u) : i.push(u);
3907
- }), { roots: i, byId: m };
3906
+ g !== a && m.has(g) ? m.get(g).children.push(u) : o.push(u);
3907
+ }), { roots: o, byId: m };
3908
3908
  }
3909
- function gs(t, { rootId: a, getId: s, getName: o }) {
3909
+ function gs(t, { rootId: a, getId: s, getName: i }) {
3910
3910
  const l = /* @__PURE__ */ new Map();
3911
3911
  function m(u, g) {
3912
3912
  const f = s(u), x = {
3913
3913
  ...u,
3914
3914
  id: f,
3915
- name: o(u),
3915
+ name: i(u),
3916
3916
  parentId: g || a,
3917
3917
  children: (u.children || []).map((r) => m(r, f))
3918
3918
  };
@@ -3923,38 +3923,38 @@ function gs(t, { rootId: a, getId: s, getName: o }) {
3923
3923
  const Me = (t) => t.map((a) => ({ ...a, children: Me(a.children || []) }));
3924
3924
  function bs(t, a) {
3925
3925
  let s = null;
3926
- function o(m) {
3927
- return m.map((i) => {
3928
- if (i.id === a)
3929
- return s = i, null;
3930
- if (i.children?.length) {
3931
- const u = o(i.children);
3932
- if (u !== i.children) return { ...i, children: u };
3926
+ function i(m) {
3927
+ return m.map((o) => {
3928
+ if (o.id === a)
3929
+ return s = o, null;
3930
+ if (o.children?.length) {
3931
+ const u = i(o.children);
3932
+ if (u !== o.children) return { ...o, children: u };
3933
3933
  }
3934
- return i;
3934
+ return o;
3935
3935
  }).filter(Boolean);
3936
3936
  }
3937
- return { newRoots: o(t), removed: s };
3937
+ return { newRoots: i(t), removed: s };
3938
3938
  }
3939
3939
  function fs(t, a, s) {
3940
- function o(l) {
3940
+ function i(l) {
3941
3941
  return l.map((m) => {
3942
3942
  if (m.id === a)
3943
3943
  return { ...m, children: [...m.children || [], { ...s, parentId: a }] };
3944
3944
  if (m.children?.length) {
3945
- const i = o(m.children);
3946
- if (i !== m.children) return { ...m, children: i };
3945
+ const o = i(m.children);
3946
+ if (o !== m.children) return { ...m, children: o };
3947
3947
  }
3948
3948
  return m;
3949
3949
  });
3950
3950
  }
3951
- return o(t);
3951
+ return i(t);
3952
3952
  }
3953
3953
  function Sa(t, a, s = null) {
3954
- for (const o of t) {
3955
- if (o.id === a) return { node: o, parentId: s };
3956
- if (o.children?.length) {
3957
- const l = Sa(o.children, a, o.id);
3954
+ for (const i of t) {
3955
+ if (i.id === a) return { node: i, parentId: s };
3956
+ if (i.children?.length) {
3957
+ const l = Sa(i.children, a, i.id);
3958
3958
  if (l) return l;
3959
3959
  }
3960
3960
  }
@@ -3964,10 +3964,10 @@ function Jl({
3964
3964
  data: t = [],
3965
3965
  rootId: a = "root",
3966
3966
  title: s = "Folders",
3967
- getId: o = ds,
3967
+ getId: i = ds,
3968
3968
  getParent: l = ms,
3969
3969
  getName: m = us,
3970
- onSelect: i,
3970
+ onSelect: o,
3971
3971
  onCreateRoot: u,
3972
3972
  onCreateChild: g,
3973
3973
  onRename: f,
@@ -3978,10 +3978,10 @@ function Jl({
3978
3978
  // ← allow root moves by default now
3979
3979
  indentUnit: p = 24
3980
3980
  }) {
3981
- const { roots: $ } = me(() => hs(t) ? gs(t, { rootId: a, getId: o, getName: m }) : ps(
3981
+ const { roots: $ } = me(() => hs(t) ? gs(t, { rootId: a, getId: i, getName: m }) : ps(
3982
3982
  t.map((y) => ({ ...y })),
3983
- { rootId: a, getId: o, getParent: l, getName: m }
3984
- ), [t, a, o, l, m]), [A, E] = L({}), R = ae((y) => {
3983
+ { rootId: a, getId: i, getParent: l, getName: m }
3984
+ ), [t, a, i, l, m]), [A, E] = L({}), R = ae((y) => {
3985
3985
  const D = {};
3986
3986
  return (function M(z) {
3987
3987
  z.forEach((P) => {
@@ -3999,7 +3999,7 @@ function Jl({
3999
3999
  se.useEffect(() => U(Me($)), [$]);
4000
4000
  const Y = mr(
4001
4001
  ur(br, { activationConstraint: { delay: 250, tolerance: 5 } })
4002
- ), q = ge(null), [C, h] = L(null), w = ge(0), T = () => {
4002
+ ), G = ge(null), [C, h] = L(null), w = ge(0), T = () => {
4003
4003
  }, k = ({ delta: y }) => {
4004
4004
  w.current = y?.x ?? 0;
4005
4005
  }, v = ae(
@@ -4028,8 +4028,8 @@ function Jl({
4028
4028
  }
4029
4029
  const B = Me(V), { newRoots: _, removed: I } = bs(B, z);
4030
4030
  if (!I) return;
4031
- const G = fs(_, F, I);
4032
- U(G), r?.({ sourceId: z, destParentId: F, newTree: G });
4031
+ const q = fs(_, F, I);
4032
+ U(q), r?.({ sourceId: z, destParentId: F, newTree: q });
4033
4033
  },
4034
4034
  [V, $, a, d, p, r]
4035
4035
  ), b = ae(
@@ -4041,7 +4041,7 @@ function Jl({
4041
4041
  depth: D,
4042
4042
  expanded: !!A[M.id],
4043
4043
  onToggle: () => O(M.id),
4044
- onSelect: i,
4044
+ onSelect: o,
4045
4045
  onCreateChild: g,
4046
4046
  onRename: f,
4047
4047
  onDelete: x,
@@ -4053,7 +4053,7 @@ function Jl({
4053
4053
  ),
4054
4054
  A[M.id] && M.children?.length > 0 ? b(M.children, D + 1) : null
4055
4055
  ] }, M.id)),
4056
- [A, p, g, x, f, i, N, O]
4056
+ [A, p, g, x, f, o, N, O]
4057
4057
  );
4058
4058
  return se.useMemo(() => {
4059
4059
  if (!C) return null;
@@ -4073,7 +4073,7 @@ function Jl({
4073
4073
  /* @__PURE__ */ e("button", { className: "tv-btn", onClick: u, children: "+ New folder" })
4074
4074
  ] }),
4075
4075
  /* @__PURE__ */ n("div", { className: "tv-root-row", children: [
4076
- /* @__PURE__ */ e(Be, { size: 16, className: "tv-folder-ic" }),
4076
+ /* @__PURE__ */ e(Le, { size: 16, className: "tv-folder-ic" }),
4077
4077
  /* @__PURE__ */ e("strong", { children: "ROOT" }),
4078
4078
  /* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick: u, children: "+" })
4079
4079
  ] }),
@@ -4086,7 +4086,7 @@ function Jl({
4086
4086
  onDragMove: k,
4087
4087
  onDragEnd: v,
4088
4088
  modifiers: [pr],
4089
- children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: b(V, 0) })
4089
+ children: /* @__PURE__ */ e("div", { ref: G, className: "tv-list", children: b(V, 0) })
4090
4090
  }
4091
4091
  )
4092
4092
  ] });
@@ -4098,10 +4098,10 @@ const Xl = ({
4098
4098
  tabs: t = [],
4099
4099
  keepMounted: a = !0,
4100
4100
  orientation: s = "horizontal",
4101
- containerClassName: o = "",
4101
+ containerClassName: i = "",
4102
4102
  listClassName: l = "",
4103
4103
  panelClassName: m = "",
4104
- tabClassName: i,
4104
+ tabClassName: o,
4105
4105
  ...u
4106
4106
  // Pass remaining props to Tab.Group
4107
4107
  }) => {
@@ -4111,8 +4111,8 @@ const Xl = ({
4111
4111
  ), x = (N) => we(
4112
4112
  "text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
4113
4113
  N ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
4114
- ), r = ({ selected: N }) => i ? typeof i == "function" ? i(N) : i : g ? x(N) : f(N);
4115
- return /* @__PURE__ */ e(ne.Group, { vertical: g, ...u, children: g ? /* @__PURE__ */ n("div", { className: we("flex gap-4", o), children: [
4114
+ ), r = ({ selected: N }) => o ? typeof o == "function" ? o(N) : o : g ? x(N) : f(N);
4115
+ return /* @__PURE__ */ e(ne.Group, { vertical: g, ...u, children: g ? /* @__PURE__ */ n("div", { className: we("flex gap-4", i), children: [
4116
4116
  /* @__PURE__ */ e(ne.List, { className: we("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((N) => /* @__PURE__ */ e(ne, { className: r, children: N.label }, N.key)) }),
4117
4117
  /* @__PURE__ */ e(ne.Panels, { unmount: !a, className: we("flex-1", m), children: t.map((N) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: N.content }) }, N.key)) })
4118
4118
  ] }) : (
@@ -4127,9 +4127,9 @@ function Hl(t, a = "YYYY-MM-DD HH:mm:ss") {
4127
4127
  return t ? (t.endsWith("Z") || /[+\-]\d{2}:?\d{2}$/.test(t) ? zt.parseZone(t) : zt.utc(t)).local().format(a) : null;
4128
4128
  }
4129
4129
  c.string;
4130
- function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4130
+ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4131
4131
  console.log(t);
4132
- const [l, m] = se.useState(t), [i, u] = se.useState(() => {
4132
+ const [l, m] = se.useState(t), [o, u] = se.useState(() => {
4133
4133
  const r = a && a[t.key] || {};
4134
4134
  return console.log("Initial Section data for", t.key, r), r;
4135
4135
  }), g = ge(a);
@@ -4139,14 +4139,14 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4139
4139
  const r = a && a[t.key] || {};
4140
4140
  console.log("Updated Section data for", t.key, r), u(r);
4141
4141
  }
4142
- }, [a, t.key]), console.log("Section data", i);
4143
- const f = ge(i);
4142
+ }, [a, t.key]), console.log("Section data", o);
4143
+ const f = ge(o);
4144
4144
  Z(() => {
4145
- f.current !== i && s && typeof s == "function" && (f.current = i, s(l.key, i));
4146
- }, [l.key, i, s]);
4145
+ f.current !== o && s && typeof s == "function" && (f.current = o, s(l.key, o));
4146
+ }, [l.key, o, s]);
4147
4147
  const x = (r) => {
4148
4148
  if (!r.dependsOn) return !0;
4149
- const { field: N, value: d, operator: p = "equals" } = r.dependsOn, $ = i[N];
4149
+ const { field: N, value: d, operator: p = "equals" } = r.dependsOn, $ = o[N];
4150
4150
  switch (p) {
4151
4151
  case "equals":
4152
4152
  return $ === d;
@@ -4205,17 +4205,17 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4205
4205
  name: r.key,
4206
4206
  defaultValue: r.default,
4207
4207
  placeholder: r.placeholder,
4208
- value: i[r.key] || "",
4208
+ value: o[r.key] || "",
4209
4209
  onChange: (d) => {
4210
- const p = { ...i, [r.key]: d.target.value };
4210
+ const p = { ...o, [r.key]: d.target.value };
4211
4211
  u(p), s && s(l.key, p);
4212
4212
  },
4213
4213
  required: r.required,
4214
4214
  disabled: r.disabled ? r.disabled : !1,
4215
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4215
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4216
4216
  }
4217
4217
  ),
4218
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4218
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4219
4219
  ] }),
4220
4220
  r.fieldtype === "textarea" && /* @__PURE__ */ n("div", { children: [
4221
4221
  /* @__PURE__ */ e(
@@ -4224,18 +4224,18 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4224
4224
  name: r.key,
4225
4225
  defaultValue: r.default,
4226
4226
  placeholder: r.placeholder,
4227
- value: i[r.key] || "",
4227
+ value: o[r.key] || "",
4228
4228
  onChange: (d) => {
4229
- const p = { ...i, [r.key]: d.target.value };
4229
+ const p = { ...o, [r.key]: d.target.value };
4230
4230
  u(p), s && s(l.key, p);
4231
4231
  },
4232
4232
  rows: 3,
4233
4233
  required: r.required,
4234
4234
  disabled: r.disabled ? r.disabled : !1,
4235
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4235
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4236
4236
  }
4237
4237
  ),
4238
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4238
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4239
4239
  ] }),
4240
4240
  r.fieldtype === "number" && /* @__PURE__ */ n("div", { children: [
4241
4241
  /* @__PURE__ */ e(
@@ -4245,12 +4245,12 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4245
4245
  name: r.key,
4246
4246
  defaultValue: r.default,
4247
4247
  placeholder: r.placeholder,
4248
- value: i[r.key] || "",
4248
+ value: o[r.key] || "",
4249
4249
  min: r.min,
4250
4250
  max: r.max,
4251
4251
  step: r.step,
4252
4252
  onChange: (d) => {
4253
- const p = d.target.value, $ = { ...i, [r.key]: p };
4253
+ const p = d.target.value, $ = { ...o, [r.key]: p };
4254
4254
  u($), s && s(l.key, $);
4255
4255
  },
4256
4256
  onBlur: (d) => {
@@ -4262,7 +4262,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4262
4262
  },
4263
4263
  required: r.required,
4264
4264
  disabled: r.disabled ? r.disabled : !1,
4265
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4265
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4266
4266
  }
4267
4267
  ),
4268
4268
  r.min !== void 0 && /* @__PURE__ */ n("div", { style: { color: "#6b7280", fontSize: "11px", marginTop: "2px" }, children: [
@@ -4273,16 +4273,16 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4273
4273
  "Maximum value: ",
4274
4274
  r.max
4275
4275
  ] }),
4276
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4276
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4277
4277
  ] }),
4278
4278
  r.fieldtype === "checkbox" && /* @__PURE__ */ n("div", { children: [
4279
4279
  /* @__PURE__ */ e(
4280
4280
  da,
4281
4281
  {
4282
4282
  name: r.key,
4283
- checked: !!(i[r.key] || r.default),
4283
+ checked: !!(o[r.key] || r.default),
4284
4284
  onChange: (d) => {
4285
- const p = { ...i, [r.key]: d };
4285
+ const p = { ...o, [r.key]: d };
4286
4286
  u(p), s && s(l.key, p);
4287
4287
  },
4288
4288
  label: r.placeholder || r.label,
@@ -4290,7 +4290,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4290
4290
  className: "w-full"
4291
4291
  }
4292
4292
  ),
4293
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4293
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4294
4294
  ] }),
4295
4295
  r.fieldtype === "select" && /* @__PURE__ */ n("div", { children: [
4296
4296
  /* @__PURE__ */ e(
@@ -4298,19 +4298,19 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4298
4298
  {
4299
4299
  name: r.key,
4300
4300
  defaultValue: r.default,
4301
- value: i[r.key] || "",
4301
+ value: o[r.key] || "",
4302
4302
  onChange: (d) => {
4303
- const p = { ...i, [r.key]: d };
4303
+ const p = { ...o, [r.key]: d };
4304
4304
  u(p);
4305
4305
  },
4306
4306
  options: r.options || [],
4307
4307
  placeholder: r.placeholder || `Select ${r.label}`,
4308
4308
  required: r.required,
4309
4309
  disabled: r.disabled ? r.disabled : !1,
4310
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4310
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4311
4311
  }
4312
4312
  ),
4313
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4313
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4314
4314
  ] }),
4315
4315
  r.fieldtype === "email" && /* @__PURE__ */ n("div", { children: [
4316
4316
  /* @__PURE__ */ e(
@@ -4320,17 +4320,17 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4320
4320
  name: r.key,
4321
4321
  defaultValue: r.default,
4322
4322
  placeholder: r.placeholder || "Enter email address",
4323
- value: i[r.key] || "",
4323
+ value: o[r.key] || "",
4324
4324
  onChange: (d) => {
4325
- const p = { ...i, [r.key]: d.target.value };
4325
+ const p = { ...o, [r.key]: d.target.value };
4326
4326
  u(p), s && s(l.key, p);
4327
4327
  },
4328
4328
  required: r.required,
4329
4329
  disabled: r.disabled ? r.disabled : !1,
4330
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4330
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4331
4331
  }
4332
4332
  ),
4333
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4333
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4334
4334
  ] }),
4335
4335
  r.fieldtype === "url" && /* @__PURE__ */ n("div", { children: [
4336
4336
  /* @__PURE__ */ e(
@@ -4340,17 +4340,17 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4340
4340
  name: r.key,
4341
4341
  defaultValue: r.default,
4342
4342
  placeholder: r.placeholder || "Enter URL",
4343
- value: i[r.key] || "",
4343
+ value: o[r.key] || "",
4344
4344
  onChange: (d) => {
4345
- const p = { ...i, [r.key]: d.target.value };
4345
+ const p = { ...o, [r.key]: d.target.value };
4346
4346
  u(p), s && s(l.key, p);
4347
4347
  },
4348
4348
  required: r.required,
4349
4349
  disabled: r.disabled ? r.disabled : !1,
4350
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4350
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4351
4351
  }
4352
4352
  ),
4353
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4353
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4354
4354
  ] }),
4355
4355
  r.fieldtype === "password" && /* @__PURE__ */ n("div", { children: [
4356
4356
  /* @__PURE__ */ e(
@@ -4360,62 +4360,62 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4360
4360
  name: r.key,
4361
4361
  defaultValue: r.default,
4362
4362
  placeholder: r.placeholder || "Enter password",
4363
- value: i[r.key] || "",
4363
+ value: o[r.key] || "",
4364
4364
  onChange: (d) => {
4365
- const p = { ...i, [r.key]: d.target.value };
4365
+ const p = { ...o, [r.key]: d.target.value };
4366
4366
  u(p), s && s(l.key, p);
4367
4367
  },
4368
4368
  required: r.required,
4369
4369
  disabled: r.disabled ? r.disabled : !1,
4370
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4370
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4371
4371
  }
4372
4372
  ),
4373
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4373
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4374
4374
  ] }),
4375
4375
  r.fieldtype === "multiselect" && /* @__PURE__ */ n("div", { children: [
4376
4376
  /* @__PURE__ */ e(
4377
- rt,
4377
+ at,
4378
4378
  {
4379
- selectedItems: i[r.key] || [],
4379
+ selectedItems: o[r.key] || [],
4380
4380
  onSelectionChange: (d) => {
4381
- const p = { ...i, [r.key]: d };
4381
+ const p = { ...o, [r.key]: d };
4382
4382
  u(p), s && s(l.key, p);
4383
4383
  },
4384
4384
  options: r.options || [],
4385
4385
  placeholder: r.placeholder || `Select ${r.label}`,
4386
4386
  disabled: r.disabled ? r.disabled : !1,
4387
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4387
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4388
4388
  }
4389
4389
  ),
4390
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4390
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4391
4391
  ] }),
4392
4392
  r.fieldtype === "toggle" && /* @__PURE__ */ n("div", { children: [
4393
4393
  /* @__PURE__ */ e(
4394
4394
  fa,
4395
4395
  {
4396
- checked: typeof i[r.key] == "boolean" ? i[r.key] : r.default,
4396
+ checked: typeof o[r.key] == "boolean" ? o[r.key] : r.default,
4397
4397
  onChange: (d) => {
4398
4398
  console.log("Toggle changed:", r.key, d);
4399
- const p = { ...i, [r.key]: d };
4399
+ const p = { ...o, [r.key]: d };
4400
4400
  u(p), s && s(l.key, p);
4401
4401
  },
4402
4402
  disabled: r.disabled ? r.disabled : !1
4403
4403
  }
4404
4404
  ),
4405
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4405
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4406
4406
  ] }),
4407
4407
  r.fieldtype === "date" && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
4408
4408
  ua,
4409
4409
  {
4410
4410
  label: r.label,
4411
- value: i[r.key] ? new Date(i[r.key]) : null,
4411
+ value: o[r.key] ? new Date(o[r.key]) : null,
4412
4412
  onChange: (d) => {
4413
- const p = { ...i, [r.key]: d ? d.toISOString().split("T")[0] : "" };
4413
+ const p = { ...o, [r.key]: d ? d.toISOString().split("T")[0] : "" };
4414
4414
  u(p), s && s(l.key, p);
4415
4415
  },
4416
4416
  placeholder: r.placeholder || "Select date",
4417
4417
  disabled: r.disabled ? r.disabled : !1,
4418
- error: o[l.key]?.[r.key],
4418
+ error: i[l.key]?.[r.key],
4419
4419
  className: "w-full"
4420
4420
  }
4421
4421
  ) }),
@@ -4423,14 +4423,14 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4423
4423
  Fn,
4424
4424
  {
4425
4425
  label: r.label,
4426
- value: i[r.key] || { from: null, to: null },
4426
+ value: o[r.key] || { from: null, to: null },
4427
4427
  onChange: (d) => {
4428
- const p = { ...i, [r.key]: d };
4428
+ const p = { ...o, [r.key]: d };
4429
4429
  u(p), s && s(l.key, p);
4430
4430
  },
4431
4431
  placeholder: r.placeholder || "Select date range",
4432
4432
  disabled: r.disabled ? r.disabled : !1,
4433
- error: o[l.key]?.[r.key],
4433
+ error: i[l.key]?.[r.key],
4434
4434
  className: "w-full"
4435
4435
  }
4436
4436
  ) }),
@@ -4438,9 +4438,9 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4438
4438
  /* @__PURE__ */ e(
4439
4439
  ha,
4440
4440
  {
4441
- selectedValue: typeof i[r.key] < "u" ? i[r.key] : r.default || "",
4441
+ selectedValue: typeof o[r.key] < "u" ? o[r.key] : r.default || "",
4442
4442
  onValueChange: (d) => {
4443
- const p = { ...i, [r.key]: d };
4443
+ const p = { ...o, [r.key]: d };
4444
4444
  u(p), s && s(l.key, p);
4445
4445
  },
4446
4446
  options: r.options || [],
@@ -4448,7 +4448,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4448
4448
  className: "w-full"
4449
4449
  }
4450
4450
  ),
4451
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4451
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4452
4452
  ] }),
4453
4453
  r.fieldtype === "native-radio" && /* @__PURE__ */ n("div", { className: "native-radiogroup-container", children: [
4454
4454
  (r.options || []).map((d) => /* @__PURE__ */ n("div", { className: "native-radio-option", children: [
@@ -4459,9 +4459,9 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4459
4459
  id: `${r.key}-${d.value}`,
4460
4460
  name: r.key,
4461
4461
  value: d.value,
4462
- checked: i[r.key] === d.value,
4462
+ checked: o[r.key] === d.value,
4463
4463
  onChange: (p) => {
4464
- const $ = { ...i, [r.key]: p.target.value };
4464
+ const $ = { ...o, [r.key]: p.target.value };
4465
4465
  u($), s && s(l.key, $);
4466
4466
  },
4467
4467
  disabled: r.disabled
@@ -4472,22 +4472,22 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4472
4472
  d.description && /* @__PURE__ */ e("span", { className: "native-radio-description", children: d.description })
4473
4473
  ] })
4474
4474
  ] }, d.value)),
4475
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4475
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4476
4476
  ] }),
4477
4477
  r.fieldtype === "search" && /* @__PURE__ */ n("div", { children: [
4478
4478
  /* @__PURE__ */ e(
4479
4479
  he,
4480
4480
  {
4481
- value: i[r.key] || "",
4481
+ value: o[r.key] || "",
4482
4482
  onChange: (d) => {
4483
- const p = { ...i, [r.key]: d };
4483
+ const p = { ...o, [r.key]: d };
4484
4484
  u(p), s && s(l.key, p);
4485
4485
  },
4486
4486
  placeholder: r.placeholder || `Search ${r.label}`,
4487
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4487
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4488
4488
  }
4489
4489
  ),
4490
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4490
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4491
4491
  ] }),
4492
4492
  (r.fieldtype === "datetime" || r.fieldtype === "datetime-local") && /* @__PURE__ */ n("div", { children: [
4493
4493
  /* @__PURE__ */ e(
@@ -4497,16 +4497,16 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4497
4497
  name: r.key,
4498
4498
  defaultValue: r.default,
4499
4499
  placeholder: r.placeholder || "Select date and time",
4500
- value: i[r.key] || "",
4500
+ value: o[r.key] || "",
4501
4501
  onChange: (d) => {
4502
- const p = { ...i, [r.key]: d.target.value };
4502
+ const p = { ...o, [r.key]: d.target.value };
4503
4503
  u(p), s && s(l.key, p);
4504
4504
  },
4505
4505
  required: r.required,
4506
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4506
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4507
4507
  }
4508
4508
  ),
4509
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4509
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4510
4510
  ] }),
4511
4511
  r.fieldtype === "time" && /* @__PURE__ */ n("div", { children: [
4512
4512
  /* @__PURE__ */ e(
@@ -4516,16 +4516,16 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4516
4516
  name: r.key,
4517
4517
  defaultValue: r.default,
4518
4518
  placeholder: r.placeholder || "Select time",
4519
- value: i[r.key] || "",
4519
+ value: o[r.key] || "",
4520
4520
  onChange: (d) => {
4521
- const p = { ...i, [r.key]: d.target.value };
4521
+ const p = { ...o, [r.key]: d.target.value };
4522
4522
  u(p), s && s(l.key, p);
4523
4523
  },
4524
4524
  required: r.required,
4525
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4525
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4526
4526
  }
4527
4527
  ),
4528
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4528
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4529
4529
  ] }),
4530
4530
  r.fieldtype === "color" && /* @__PURE__ */ n("div", { children: [
4531
4531
  /* @__PURE__ */ e(
@@ -4534,15 +4534,15 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4534
4534
  type: "color",
4535
4535
  name: r.key,
4536
4536
  defaultValue: r.default || "#000000",
4537
- value: i[r.key] || "#000000",
4537
+ value: o[r.key] || "#000000",
4538
4538
  onChange: (d) => {
4539
- const p = { ...i, [r.key]: d.target.value };
4539
+ const p = { ...o, [r.key]: d.target.value };
4540
4540
  u(p), s && s(l.key, p);
4541
4541
  },
4542
- className: `w-full h-10 ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4542
+ className: `w-full h-10 ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4543
4543
  }
4544
4544
  ),
4545
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4545
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4546
4546
  ] }),
4547
4547
  r.fieldtype === "range" && /* @__PURE__ */ n("div", { children: [
4548
4548
  /* @__PURE__ */ e(
@@ -4551,26 +4551,26 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4551
4551
  type: "range",
4552
4552
  name: r.key,
4553
4553
  defaultValue: r.default || r.min || 0,
4554
- value: i[r.key] || r.min || 0,
4554
+ value: o[r.key] || r.min || 0,
4555
4555
  onChange: (d) => {
4556
- const p = { ...i, [r.key]: d.target.value };
4556
+ const p = { ...o, [r.key]: d.target.value };
4557
4557
  u(p), s && s(l.key, p);
4558
4558
  },
4559
4559
  min: r.min || 0,
4560
4560
  max: r.max || 100,
4561
4561
  step: r.step || 1,
4562
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4562
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4563
4563
  }
4564
4564
  ),
4565
4565
  /* @__PURE__ */ n("div", { className: "flex justify-between text-sm text-gray-500 mt-1", children: [
4566
4566
  /* @__PURE__ */ e("span", { children: r.min || 0 }),
4567
4567
  /* @__PURE__ */ n("span", { children: [
4568
4568
  "Current: ",
4569
- i[r.key] || r.min || 0
4569
+ o[r.key] || r.min || 0
4570
4570
  ] }),
4571
4571
  /* @__PURE__ */ e("span", { children: r.max || 100 })
4572
4572
  ] }),
4573
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4573
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4574
4574
  ] }),
4575
4575
  r.fieldtype === "file" && /* @__PURE__ */ n("div", { children: [
4576
4576
  /* @__PURE__ */ e(
@@ -4579,24 +4579,24 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4579
4579
  type: "file",
4580
4580
  name: r.key,
4581
4581
  onChange: (d) => {
4582
- const p = d.target.files[0], $ = { ...i, [r.key]: p ? p.name : "" };
4582
+ const p = d.target.files[0], $ = { ...o, [r.key]: p ? p.name : "" };
4583
4583
  u($), s && s(l.key, $);
4584
4584
  },
4585
4585
  accept: r.accept,
4586
- className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
4586
+ className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4587
4587
  }
4588
4588
  ),
4589
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4589
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4590
4590
  ] }),
4591
4591
  r.fieldtype === "managecollectionlist" && /* @__PURE__ */ n("div", { children: [
4592
4592
  /* @__PURE__ */ e(
4593
4593
  Da,
4594
4594
  {
4595
4595
  endpoints: r.endpoints || {},
4596
- initialData: i[r.key] || r.initialData || [],
4596
+ initialData: o[r.key] || r.initialData || [],
4597
4597
  className: r.className || "",
4598
4598
  onCollectionChange: (d) => {
4599
- const p = { ...i, [r.key]: d };
4599
+ const p = { ...o, [r.key]: d };
4600
4600
  u(p), s && s(l.key, p);
4601
4601
  },
4602
4602
  showSearch: r.showSearch !== !1,
@@ -4606,7 +4606,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4606
4606
  allowReorder: r.allowReorder !== !1
4607
4607
  }
4608
4608
  ),
4609
- o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
4609
+ i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
4610
4610
  ] }),
4611
4611
  r.info && /* @__PURE__ */ e(
4612
4612
  "p",
@@ -4623,9 +4623,9 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4623
4623
  ] }) });
4624
4624
  }
4625
4625
  const xs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
4626
- function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4626
+ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4627
4627
  console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
4628
- const [l, m] = L(t), [i, u] = L(null), [g, f] = L(null);
4628
+ const [l, m] = L(t), [o, u] = L(null), [g, f] = L(null);
4629
4629
  console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
4630
4630
  const [x, r] = L(() => {
4631
4631
  const h = a && a[l.key] || [], w = h.length > 0 ? h : [{ id: 0 }];
@@ -4652,7 +4652,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4652
4652
  const D = [...y];
4653
4653
  return D[v][h.key] = b, D;
4654
4654
  });
4655
- }, T = (v) => o[l.key]?.[v]?.[h.key], k = (v) => {
4655
+ }, T = (v) => i[l.key]?.[v]?.[h.key], k = (v) => {
4656
4656
  const b = T(v);
4657
4657
  return b ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: b }) : null;
4658
4658
  };
@@ -4815,7 +4815,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4815
4815
  return (v, b) => {
4816
4816
  const y = v[h.key] || [];
4817
4817
  return /* @__PURE__ */ e(
4818
- rt,
4818
+ at,
4819
4819
  {
4820
4820
  selectedItems: y,
4821
4821
  onSelectionChange: (D) => w(b, D),
@@ -5023,22 +5023,22 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
5023
5023
  const k = [...T], v = k[R];
5024
5024
  return k.splice(R, 1), k.splice(w, 0, v), k;
5025
5025
  }), O(null));
5026
- }, [R]), q = ae(() => {
5026
+ }, [R]), G = ae(() => {
5027
5027
  O(null);
5028
5028
  }, []), C = ae((h) => {
5029
5029
  console.log("[DataTableRenderer] handleAddAudience called with:", h), r((w) => {
5030
5030
  const T = [...w];
5031
- if (i !== null && g && T[i]) {
5031
+ if (o !== null && g && T[o]) {
5032
5032
  const k = h.pendingInvites || [], v = k.filter((D) => D.type === "User"), b = k.filter((D) => D.type === "Group"), y = k.filter((D) => D.type === "Role");
5033
- T[i][g] = {
5034
- users: [...T[i][g]?.users || [], ...v],
5035
- groups: [...T[i][g]?.groups || [], ...b],
5036
- roles: [...T[i][g]?.roles || [], ...y]
5037
- }, console.log("[DataTableRenderer] Updated audience data:", T[i][g]);
5033
+ T[o][g] = {
5034
+ users: [...T[o][g]?.users || [], ...v],
5035
+ groups: [...T[o][g]?.groups || [], ...b],
5036
+ roles: [...T[o][g]?.roles || [], ...y]
5037
+ }, console.log("[DataTableRenderer] Updated audience data:", T[o][g]);
5038
5038
  }
5039
5039
  return T;
5040
5040
  }), u(null), f(null);
5041
- }, [i, g]);
5041
+ }, [o, g]);
5042
5042
  return /* @__PURE__ */ n("div", { children: [
5043
5043
  /* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
5044
5044
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
@@ -5075,7 +5075,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
5075
5075
  onDragStart: (T) => V(T, w),
5076
5076
  onDragOver: U,
5077
5077
  onDrop: (T) => Y(T, w),
5078
- onDragEnd: q,
5078
+ onDragEnd: G,
5079
5079
  children: [
5080
5080
  /* @__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(Nt, { size: 16 }) }) }),
5081
5081
  l.fields.map((T, k) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: $(T)(h, w) }, k)),
@@ -5093,14 +5093,14 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
5093
5093
  w
5094
5094
  )) })
5095
5095
  ] }) }),
5096
- i !== null && (() => {
5097
- const h = x[i] && x[i][g] ? {
5098
- users: x[i][g].users || [],
5099
- groups: x[i][g].groups || [],
5100
- roles: x[i][g].roles || []
5096
+ o !== null && (() => {
5097
+ const h = x[o] && x[o][g] ? {
5098
+ users: x[o][g].users || [],
5099
+ groups: x[o][g].groups || [],
5100
+ roles: x[o][g].roles || []
5101
5101
  } : { users: [], groups: [], roles: [] };
5102
- return console.log("[DataTableRenderer] Opening modal with existing data:", h), console.log("[DataTableRenderer] Row data:", x[i]), console.log("[DataTableRenderer] Field name:", g), /* @__PURE__ */ e(
5103
- os,
5102
+ return console.log("[DataTableRenderer] Opening modal with existing data:", h), console.log("[DataTableRenderer] Row data:", x[o]), console.log("[DataTableRenderer] Field name:", g), /* @__PURE__ */ e(
5103
+ is,
5104
5104
  {
5105
5105
  isOpen: !0,
5106
5106
  onClose: () => {
@@ -5122,11 +5122,11 @@ const Pe = {
5122
5122
  pauseOnFocusLoss: !1,
5123
5123
  closeOnClick: !0
5124
5124
  };
5125
- let He = 0;
5125
+ let Je = 0;
5126
5126
  const Mt = () => {
5127
- typeof document > "u" || (He += 1, document.body.classList.add("toast-backdrop"));
5127
+ typeof document > "u" || (Je += 1, document.body.classList.add("toast-backdrop"));
5128
5128
  }, Lt = () => {
5129
- typeof document > "u" || (He = Math.max(0, He - 1), He === 0 && document.body.classList.remove("toast-backdrop"));
5129
+ typeof document > "u" || (Je = Math.max(0, Je - 1), Je === 0 && document.body.classList.remove("toast-backdrop"));
5130
5130
  }, Ie = {
5131
5131
  success: (t, a) => Se.success(t, { ...Pe, ...a }),
5132
5132
  info: (t, a) => Se.info(t, { ...Pe, ...a }),
@@ -5158,32 +5158,31 @@ const Mt = () => {
5158
5158
  },
5159
5159
  { ...Pe, ...s }
5160
5160
  )
5161
- }, Ye = (t) => {
5161
+ }, ct = (t) => {
5162
5162
  try {
5163
- return `${at()}${va()}${t}`;
5163
+ return `${tt()}${va()}${t}`;
5164
5164
  } catch {
5165
5165
  return t;
5166
5166
  }
5167
5167
  }, Ns = {
5168
- collectionList: Ye("/unifyedxmanagedquicklinks/config/collection/list"),
5169
- collectionCreate: Ye("/unifyedxmanagedquicklinks/config/collection/create"),
5170
- collectionUpdate: Ye("/unifyedxmanagedquicklinks/config/collection"),
5171
- updateCollection: Ye("/unifyedxmanagedquicklinks/config/collection/updateOrder")
5168
+ collectionList: ct("/unifyedxmanagedquicklinks/config/collection/list"),
5169
+ collectionCreate: ct("/unifyedxmanagedquicklinks/config/collection/create"),
5170
+ collectionUpdate: ct("/unifyedxmanagedquicklinks/config/collection")
5172
5171
  }, Da = ({
5173
5172
  endpoints: t = Ns,
5174
5173
  className: a = "",
5175
5174
  onCollectionChange: s,
5176
- showSearch: o = !0,
5175
+ showSearch: i = !0,
5177
5176
  allowAdd: l = !0,
5178
5177
  allowEdit: m = !0,
5179
- allowDelete: i = !0,
5178
+ allowDelete: o = !0,
5180
5179
  allowReorder: u = !0,
5181
5180
  initialData: g = null
5182
5181
  // Add prop for initial demo data
5183
5182
  }) => {
5184
5183
  const [f, x] = L(null), [r, N] = L(""), [d, p] = L(() => Array.isArray(g) ? g : []), [$, A] = L(null), [E, R] = L(null), [O, V] = L(""), U = async () => {
5185
5184
  try {
5186
- const z = await _e(t.collectionList);
5185
+ const z = await Ve(t.collectionList);
5187
5186
  if (z) {
5188
5187
  const P = z.map((F, S) => ({
5189
5188
  ...F,
@@ -5202,7 +5201,7 @@ const Mt = () => {
5202
5201
  }, [g]);
5203
5202
  const Y = (z) => {
5204
5203
  m && (x(z.id), N(z.categoryName || ""));
5205
- }, q = () => {
5204
+ }, G = () => {
5206
5205
  if (!l || f !== null) return;
5207
5206
  const z = `temp-${Date.now()}`;
5208
5207
  p((P) => [
@@ -5246,16 +5245,16 @@ const Mt = () => {
5246
5245
  });
5247
5246
  x(null), N("");
5248
5247
  }, w = (z) => {
5249
- i && p((P) => {
5248
+ o && p((P) => {
5250
5249
  const F = P.filter((S) => S.id !== z.id);
5251
5250
  return s?.(F), F;
5252
5251
  });
5253
5252
  }, T = (z, P, F) => {
5254
5253
  if (!u || !P || !F || P === F) return z;
5255
- const S = z.findIndex((G) => G.id === P), B = z.findIndex((G) => G.id === F);
5254
+ const S = z.findIndex((q) => q.id === P), B = z.findIndex((q) => q.id === F);
5256
5255
  if (S === -1 || B === -1) return z;
5257
5256
  const _ = [...z], [I] = _.splice(S, 1);
5258
- return _.splice(B, 0, I), _.map((G, X) => ({ ...G, order: X + 1 }));
5257
+ return _.splice(B, 0, I), _.map((q, X) => ({ ...q, order: X + 1 }));
5259
5258
  }, k = (z, P) => {
5260
5259
  u && (z.dataTransfer.effectAllowed = "move", z.dataTransfer.setData("text/plain", String(P)), A(P));
5261
5260
  }, v = (z) => {
@@ -5278,7 +5277,7 @@ const Mt = () => {
5278
5277
  ) : [];
5279
5278
  return /* @__PURE__ */ n("div", { className: `manage-collection-list ${a}`, children: [
5280
5279
  /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
5281
- o && /* @__PURE__ */ e(
5280
+ i && /* @__PURE__ */ e(
5282
5281
  he,
5283
5282
  {
5284
5283
  value: O,
@@ -5294,7 +5293,7 @@ const Mt = () => {
5294
5293
  "px-4 py-3 bg-black text-white rounded-2xl ml-4",
5295
5294
  f !== null ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
5296
5295
  ].join(" "),
5297
- onClick: q,
5296
+ onClick: G,
5298
5297
  disabled: f !== null,
5299
5298
  children: "Add a Collection"
5300
5299
  }
@@ -5351,7 +5350,7 @@ const Mt = () => {
5351
5350
  "aria-label": "Save",
5352
5351
  disabled: !r.trim(),
5353
5352
  title: r.trim() ? "Save" : "Name required",
5354
- children: /* @__PURE__ */ e(et, { color: "#767676" })
5353
+ children: /* @__PURE__ */ e(Ke, { color: "#767676" })
5355
5354
  }
5356
5355
  )
5357
5356
  ] })
@@ -5381,13 +5380,13 @@ const Mt = () => {
5381
5380
  children: /* @__PURE__ */ e(yr, { color: "#767676" })
5382
5381
  }
5383
5382
  ),
5384
- i && /* @__PURE__ */ e(
5383
+ o && /* @__PURE__ */ e(
5385
5384
  "span",
5386
5385
  {
5387
5386
  className: F === 0 && !z.protected ? "cursor-pointer" : "cursor-not-allowed",
5388
5387
  title: F === 0 && !z.protected ? "Delete" : "Cannot delete this collection",
5389
5388
  onClick: F === 0 ? () => w(z) : null,
5390
- children: /* @__PURE__ */ e(Ze, { color: F === 0 ? "#767676" : "#C2C2C2" })
5389
+ children: /* @__PURE__ */ e(He, { color: F === 0 ? "#767676" : "#C2C2C2" })
5391
5390
  }
5392
5391
  )
5393
5392
  ] })
@@ -5399,20 +5398,20 @@ const Mt = () => {
5399
5398
  ] });
5400
5399
  }, $a = ({ item: t, data: a, updateHandler: s }) => {
5401
5400
  const {
5402
- label: o = "Manage Collections",
5401
+ label: i = "Manage Collections",
5403
5402
  description: l = "",
5404
5403
  endpoints: m = {},
5405
- initialData: i = null,
5404
+ initialData: o = null,
5406
5405
  showSearch: u = !0,
5407
5406
  allowAdd: g = !0,
5408
5407
  allowEdit: f = !0,
5409
5408
  allowDelete: x = !0,
5410
5409
  allowReorder: r = !0,
5411
5410
  className: N = ""
5412
- } = t, d = a?.[t.key] || i || [], p = Array.isArray(d) ? d : [];
5411
+ } = t, d = a?.[t.key] || o || [], p = Array.isArray(d) ? d : [];
5413
5412
  return /* @__PURE__ */ n("div", { className: "dynamic-config-manage-collection-list", children: [
5414
- (o || l) && /* @__PURE__ */ n("div", { className: "mb-4", children: [
5415
- o && /* @__PURE__ */ e("h3", { className: "text-lg font-medium text-gray-900 mb-1", children: o }),
5413
+ (i || l) && /* @__PURE__ */ n("div", { className: "mb-4", children: [
5414
+ i && /* @__PURE__ */ e("h3", { className: "text-lg font-medium text-gray-900 mb-1", children: i }),
5416
5415
  l && /* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: l })
5417
5416
  ] }),
5418
5417
  /* @__PURE__ */ e(
@@ -5452,10 +5451,10 @@ function zs({
5452
5451
  appid: t,
5453
5452
  configdata: a = null,
5454
5453
  disableApi: s = !1,
5455
- onCancel: o,
5454
+ onCancel: i,
5456
5455
  onSave: l
5457
5456
  }) {
5458
- const [m, i] = se.useState(a), [u, g] = se.useState(null), [f, x] = L(!1), [r, N] = L(!1), [d, p] = L({}), $ = `${ze()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, A = $, [E, R] = L(1), O = (k) => {
5457
+ const [m, o] = se.useState(a), [u, g] = se.useState(null), [f, x] = L(!1), [r, N] = L(!1), [d, p] = L({}), $ = `${ze()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, A = $, [E, R] = L(1), O = (k) => {
5459
5458
  if (!a || !a.configuration)
5460
5459
  return k;
5461
5460
  const v = {}, b = k?.configuration || {};
@@ -5512,7 +5511,7 @@ function zs({
5512
5511
  const k = async () => {
5513
5512
  try {
5514
5513
  x(!0);
5515
- let v = await _e($);
5514
+ let v = await Ve($);
5516
5515
  if (v) {
5517
5516
  const b = O(v);
5518
5517
  g(b);
@@ -5530,7 +5529,7 @@ function zs({
5530
5529
  x(!1);
5531
5530
  }
5532
5531
  };
5533
- a && (i(a), t ? k() : V());
5532
+ a && (o(a), t ? k() : V());
5534
5533
  }, [a, E, t, s]);
5535
5534
  const U = (k, v) => {
5536
5535
  g((b) => ({
@@ -5572,7 +5571,7 @@ function zs({
5572
5571
  });
5573
5572
  }
5574
5573
  }), k;
5575
- }, q = (k) => Object.keys(k).length > 0, C = async (k) => {
5574
+ }, G = (k) => Object.keys(k).length > 0, C = async (k) => {
5576
5575
  const v = a?.configuration?.filter(
5577
5576
  (b) => b.fields?.some((y) => y.fieldtype === "managecollectionlist")
5578
5577
  ) || [];
@@ -5587,7 +5586,7 @@ function zs({
5587
5586
  try {
5588
5587
  if (F._temp && F._isDraft) {
5589
5588
  console.log("Creating new collection:", F.categoryName);
5590
- const S = await Le(M.collectionCreate, {
5589
+ const S = await Ze(M.collectionCreate, {
5591
5590
  categoryName: F.categoryName,
5592
5591
  order: F.order
5593
5592
  });
@@ -5604,20 +5603,10 @@ function zs({
5604
5603
  const F = [];
5605
5604
  z > 0 && F.push(`${z} collection${z > 1 ? "s" : ""} created`), P > 0 && F.push(`${P} collection${P > 1 ? "s" : ""} updated`), console.log("ManageCollectionList operations completed:", F.join(", "));
5606
5605
  }
5607
- try {
5608
- const F = D.filter((S) => !S._temp).map((S) => ({
5609
- id: S.id,
5610
- order: S.order,
5611
- categoryName: S.categoryName
5612
- }));
5613
- F.length > 0 && (console.log("Updating collection order:", F), await Le(M.updateCollection, F), console.log("Collection order updated successfully"));
5614
- } catch (F) {
5615
- throw console.error("Failed to update collection order:", F), new Error(`Failed to update collection order: ${F.message}`);
5616
- }
5617
5606
  }
5618
5607
  }, h = () => {
5619
5608
  const k = Y();
5620
- if (p(k), q(k)) {
5609
+ if (p(k), G(k)) {
5621
5610
  let b = [];
5622
5611
  Object.keys(k).forEach((y) => {
5623
5612
  typeof k[y] == "object" && Object.keys(k[y]).forEach((D) => {
@@ -5651,7 +5640,7 @@ function zs({
5651
5640
  }), P;
5652
5641
  }) : b[D] = u[D];
5653
5642
  }));
5654
- let y = await Le(A, b);
5643
+ let y = await Ze(A, b);
5655
5644
  if (console.log(), y && y.status != "fail") {
5656
5645
  p({});
5657
5646
  const D = y.message || "Configuration has been saved successfully";
@@ -5665,8 +5654,8 @@ function zs({
5665
5654
  }
5666
5655
  })();
5667
5656
  }, w = () => {
5668
- if (o) {
5669
- o();
5657
+ if (i) {
5658
+ i();
5670
5659
  return;
5671
5660
  }
5672
5661
  d && Object.keys(d).length > 0 && !window.confirm(
@@ -5682,7 +5671,7 @@ function zs({
5682
5671
  /* @__PURE__ */ n(
5683
5672
  "div",
5684
5673
  {
5685
- className: "dynamic-config bg-white w-full h-[calc(100vh-350px)] overflow-y-auto",
5674
+ className: "dynamic-config bg-white w-full h-[calc(100vh-450px)] overflow-y-auto",
5686
5675
  style: { padding: "0px 20px 0px 0px" },
5687
5676
  children: [
5688
5677
  f && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(ga, { size: "large" }) }),
@@ -5731,7 +5720,7 @@ const Ql = ({
5731
5720
  appid: a = "Configuration-Page",
5732
5721
  disableApi: s = !1
5733
5722
  }) => {
5734
- const [o, l] = L(0), [m, i] = L(!1), {
5723
+ const [i, l] = L(0), [m, o] = L(!1), {
5735
5724
  pageHeader: u = {},
5736
5725
  appletHeader: g = {},
5737
5726
  breadcrumb: f = [],
@@ -5784,9 +5773,9 @@ const Ql = ({
5784
5773
  label: C.text,
5785
5774
  href: C.href || "#"
5786
5775
  })), $ = ae(() => {
5787
- console.log("handleCancelRequest called - showing modal"), i(!0);
5776
+ console.log("handleCancelRequest called - showing modal"), o(!0);
5788
5777
  }, []), A = ae((C) => {
5789
- i(!1), C.primary ? (console.log("User confirmed cancel - navigating back"), window.history.back()) : console.log("User cancelled the cancel action - modal closed, data preserved");
5778
+ o(!1), C.primary ? (console.log("User confirmed cancel - navigating back"), window.history.back()) : console.log("User cancelled the cancel action - modal closed, data preserved");
5790
5779
  }, []), E = ae((C) => {
5791
5780
  console.log("Configuration changed:", C);
5792
5781
  }, []), R = (() => {
@@ -5831,13 +5820,13 @@ const Ql = ({
5831
5820
  ],
5832
5821
  ...x
5833
5822
  }, U = [
5834
- { label: "Overview", content: q(V) },
5823
+ { label: "Overview", content: G(V) },
5835
5824
  { label: "Configuration", content: /* @__PURE__ */ e(zs, { appid: a, configdata: { configuration: N }, disableApi: s, onCancel: $, onSave: E }) }
5836
5825
  ];
5837
5826
  function Y(C) {
5838
5827
  return C ? C.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: C } }) : C : "📱";
5839
5828
  }
5840
- function q(C) {
5829
+ function G(C) {
5841
5830
  return /* @__PURE__ */ n("div", { className: "bg-white rounded-2xl p-1", children: [
5842
5831
  /* @__PURE__ */ n("section", { className: "mb-8", children: [
5843
5832
  /* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-2", children: "About" }),
@@ -5910,12 +5899,12 @@ const Ql = ({
5910
5899
  "button",
5911
5900
  {
5912
5901
  onClick: () => l(h),
5913
- className: `${o === h ? "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`,
5902
+ className: `${i === h ? "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`,
5914
5903
  children: C.label
5915
5904
  },
5916
5905
  h
5917
5906
  )) }) }),
5918
- /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: U[o].content })
5907
+ /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: U[i].content })
5919
5908
  ] }),
5920
5909
  /* @__PURE__ */ e(
5921
5910
  In,
@@ -5961,12 +5950,12 @@ const Kl = ({
5961
5950
  subheading: a = "",
5962
5951
  totalCount: s = 0,
5963
5952
  // Prefer "apiRef" naming for clarity (it's the wrapper API, not the raw grid instance)
5964
- gridRef: o,
5953
+ gridRef: i,
5965
5954
  // backward compat
5966
5955
  apiRef: l,
5967
5956
  // preferred
5968
5957
  onAdd: m,
5969
- onFilterOpen: i,
5958
+ onFilterOpen: o,
5970
5959
  addBtnText: u = "Add",
5971
5960
  // Feature toggles
5972
5961
  showSearch: g = !0,
@@ -5987,7 +5976,7 @@ const Kl = ({
5987
5976
  excelFileName: O,
5988
5977
  pdfFileName: V
5989
5978
  }) => {
5990
- const U = () => l?.current || o?.current, [Y, q] = se.useState(""), C = (t || "export").toString().trim() || "export", h = `${O || C}.xlsx`, w = `${V || C}.pdf`, T = (b, y, D) => Math.max(y, Math.min(b, D)), k = ae(
5979
+ const U = () => l?.current || i?.current, [Y, G] = se.useState(""), C = (t || "export").toString().trim() || "export", h = `${O || C}.xlsx`, w = `${V || C}.pdf`, T = (b, y, D) => Math.max(y, Math.min(b, D)), k = ae(
5991
5980
  (b) => {
5992
5981
  const y = U();
5993
5982
  if (console.log("openColumnChooserNear", y), !!y?.openColumnChooser) {
@@ -6047,7 +6036,7 @@ const Kl = ({
6047
6036
  placeholder: A,
6048
6037
  value: Y,
6049
6038
  onDebouncedChange: (b) => {
6050
- q(b), R(b);
6039
+ G(b), R(b);
6051
6040
  }
6052
6041
  }
6053
6042
  ) }),
@@ -6068,7 +6057,7 @@ const Kl = ({
6068
6057
  ee,
6069
6058
  {
6070
6059
  icon: vr,
6071
- onClick: i,
6060
+ onClick: o,
6072
6061
  size: "small",
6073
6062
  ariaLabel: "Filters",
6074
6063
  category: "secondary",
@@ -6135,16 +6124,16 @@ const Kl = ({
6135
6124
  ] })
6136
6125
  ] });
6137
6126
  };
6138
- function eo(t) {
6127
+ function ei(t) {
6139
6128
  const {
6140
6129
  data: a = [],
6141
6130
  totalCount: s = 0,
6142
- uniqueId: o = "grid",
6131
+ uniqueId: i = "grid",
6143
6132
  pageIndex: l = 1,
6144
6133
  // 1-based
6145
6134
  // pageSize = 10,
6146
6135
  allowPaging: m = !0,
6147
- allowSorting: i = !0,
6136
+ allowSorting: o = !0,
6148
6137
  allowFiltering: u = !1,
6149
6138
  allowGrouping: g = !1,
6150
6139
  allowReordering: f = !0,
@@ -6161,7 +6150,7 @@ function eo(t) {
6161
6150
  onRowSelected: V,
6162
6151
  onRowDeselected: U,
6163
6152
  onRowDoubleClick: Y,
6164
- apiRef: q,
6153
+ apiRef: G,
6165
6154
  gridProps: C = {}
6166
6155
  } = t, h = ge(null), {
6167
6156
  pageSettings: w,
@@ -6169,8 +6158,8 @@ function eo(t) {
6169
6158
  ...k
6170
6159
  } = C || {}, [v, b] = se.useState(w?.page || 1), [y, D] = se.useState(T?.pageSize || 20), [M, z] = se.useState(T?.sortKey || "updatedDate"), [P, F] = se.useState(T?.direction || "Descending"), S = me(() => {
6171
6160
  const j = [sn];
6172
- return i && j.push(ln), u && j.push(on), g && j.push(cn), p && j.push(dn), r && j.push(mn), N && j.push(un), d && j.push(hn), x && j.push(pn), f && j.push(gn), j.push(bn), j;
6173
- }, [i, u, g, p, r, N, d, x, f]), B = me(() => {
6161
+ return o && j.push(ln), u && j.push(on), g && j.push(cn), p && j.push(dn), r && j.push(mn), N && j.push(un), d && j.push(hn), x && j.push(pn), f && j.push(gn), j.push(bn), j;
6162
+ }, [o, u, g, p, r, N, d, x, f]), B = me(() => {
6174
6163
  const j = () => h.current, re = (W, ve) => {
6175
6164
  !ve && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
6176
6165
  };
@@ -6197,28 +6186,28 @@ function eo(t) {
6197
6186
  };
6198
6187
  }, []);
6199
6188
  Z(() => {
6200
- q && (q.current = B);
6201
- }, [q, B]), Z(() => () => {
6202
- q && (q.current = null);
6189
+ G && (G.current = B);
6190
+ }, [G, B]), Z(() => () => {
6191
+ G && (G.current = null);
6203
6192
  }, []);
6204
6193
  const _ = (j) => {
6205
6194
  const re = String(j || "");
6206
6195
  return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6207
6196
  }, I = (j) => {
6208
- const re = h.current, W = j?.requestType, ve = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", Re = j?.pageSize ?? re?.pageSettings?.pageSize ?? y, Ue = j?.currentPage ?? re?.pageSettings?.currentPage ?? l, nt = j?.columnName && j?.direction ? [{ field: j.columnName, dir: _(j.direction) }] : (re?.sortSettings?.columns || []).map((Oe) => ({
6197
+ const re = h.current, W = j?.requestType, ve = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", Re = j?.pageSize ?? re?.pageSettings?.pageSize ?? y, _e = j?.currentPage ?? re?.pageSettings?.currentPage ?? l, rt = j?.columnName && j?.direction ? [{ field: j.columnName, dir: _(j.direction) }] : (re?.sortSettings?.columns || []).map((Oe) => ({
6209
6198
  field: Oe.field,
6210
6199
  dir: _(Oe.direction ?? Oe.dir)
6211
- })), st = j?.searchString ?? "", lt = j?.columns ?? re?.filterSettings?.columns ?? [];
6200
+ })), nt = j?.searchString ?? "", st = j?.columns ?? re?.filterSettings?.columns ?? [];
6212
6201
  return {
6213
6202
  reason: ve,
6214
- page: { index: Ue, size: Re, skip: (Ue - 1) * Re, take: Re },
6215
- sort: nt,
6203
+ page: { index: _e, size: Re, skip: (_e - 1) * Re, take: Re },
6204
+ sort: rt,
6216
6205
  // [{ field, dir: 'Ascending'|'Descending' }]
6217
- search: st,
6218
- filters: lt,
6206
+ search: nt,
6207
+ filters: st,
6219
6208
  rawEvent: j
6220
6209
  };
6221
- }, G = (j) => {
6210
+ }, q = (j) => {
6222
6211
  setTimeout(() => {
6223
6212
  h?.current?.hideSpinner();
6224
6213
  }, 1e3), j.requestType === "paging" && (b(j.currentPage), D(j.pageSize)), j.requestType === "sorting" && (z(j.columnName || "updatedDate"), F(j.direction === "Ascending" ? "ASC" : "DESC")), O && O(I(j), j);
@@ -6230,10 +6219,10 @@ function eo(t) {
6230
6219
  const {
6231
6220
  field: ve,
6232
6221
  headerText: Re,
6233
- width: Ue,
6234
- textAlign: nt = "Left",
6235
- template: st,
6236
- isPrimaryKey: lt,
6222
+ width: _e,
6223
+ textAlign: rt = "Left",
6224
+ template: nt,
6225
+ isPrimaryKey: st,
6237
6226
  showInColumnChooser: Oe = !0,
6238
6227
  allowFiltering: Fa = !0,
6239
6228
  allowSorting: Ea = !0,
@@ -6251,10 +6240,10 @@ function eo(t) {
6251
6240
  {
6252
6241
  field: ve,
6253
6242
  headerText: Re,
6254
- width: Ue,
6255
- textAlign: nt,
6256
- template: st,
6257
- isPrimaryKey: lt,
6243
+ width: _e,
6244
+ textAlign: rt,
6245
+ template: nt,
6246
+ isPrimaryKey: st,
6258
6247
  showInColumnChooser: Oe,
6259
6248
  allowFiltering: Fa,
6260
6249
  allowSorting: Ea,
@@ -6274,7 +6263,7 @@ function eo(t) {
6274
6263
  return /* @__PURE__ */ n(
6275
6264
  fn,
6276
6265
  {
6277
- id: o,
6266
+ id: i,
6278
6267
  ref: h,
6279
6268
  dataSource: {
6280
6269
  result: a,
@@ -6282,7 +6271,7 @@ function eo(t) {
6282
6271
  },
6283
6272
  height: $,
6284
6273
  allowPaging: m,
6285
- allowSorting: i,
6274
+ allowSorting: o,
6286
6275
  allowFiltering: u,
6287
6276
  allowGrouping: g,
6288
6277
  allowReordering: f,
@@ -6294,7 +6283,7 @@ function eo(t) {
6294
6283
  columns: [{ field: M, direction: _(P) }],
6295
6284
  allowUnsort: !1
6296
6285
  },
6297
- actionBegin: G,
6286
+ actionBegin: q,
6298
6287
  rowSelected: V,
6299
6288
  rowDeselected: U,
6300
6289
  recordDoubleClick: X,
@@ -6306,7 +6295,7 @@ function eo(t) {
6306
6295
  }
6307
6296
  );
6308
6297
  }
6309
- const ie = (t) => {
6298
+ const oe = (t) => {
6310
6299
  const a = String(t || "md").toLowerCase();
6311
6300
  return a === "xs" ? "sm" : a === "2lg" || a === "xlg" || a === "xl" ? "lg" : ["sm", "md", "lg"].includes(a) ? a : "md";
6312
6301
  }, ce = {
@@ -6329,25 +6318,25 @@ const ie = (t) => {
6329
6318
  meta: "text-sm"
6330
6319
  }
6331
6320
  }, Ss = (t, a) => typeof a == "function" ? a(t) : typeof a == "string" && t?.[a] != null ? t[a] : t?._id ?? t?.id ?? t?.instanceId ?? t?.legacyId ?? t?.key ?? null;
6332
- function oe({
6321
+ function ie({
6333
6322
  children: t,
6334
6323
  className: a = "",
6335
6324
  showCheckbox: s = !1,
6336
- checkboxPosition: o = "top-left",
6325
+ checkboxPosition: i = "top-left",
6337
6326
  // "top-left" | "top-right"
6338
6327
  onSelect: l,
6339
6328
  identity: m = "_id",
6340
- details: i = {},
6329
+ details: o = {},
6341
6330
  ...u
6342
6331
  }) {
6343
- const g = Qe(), f = Ss(u, m), x = (N) => {
6332
+ const g = Xe(), f = Ss(u, m), x = (N) => {
6344
6333
  l?.({
6345
6334
  key: f,
6346
6335
  checked: N.target.checked,
6347
- details: i,
6336
+ details: o,
6348
6337
  props: u
6349
6338
  });
6350
- }, r = o === "top-right" ? "top-3 right-3" : "top-3 left-3";
6339
+ }, r = i === "top-right" ? "top-3 right-3" : "top-3 left-3";
6351
6340
  return /* @__PURE__ */ n(
6352
6341
  "div",
6353
6342
  {
@@ -6369,7 +6358,7 @@ function oe({
6369
6358
  }
6370
6359
  );
6371
6360
  }
6372
- oe.propTypes = {
6361
+ ie.propTypes = {
6373
6362
  showCheckbox: c.bool,
6374
6363
  checkboxPosition: c.oneOf(["top-left", "top-right"]),
6375
6364
  onSelect: c.func,
@@ -6380,11 +6369,11 @@ function Ds({
6380
6369
  size: t = "md",
6381
6370
  showCheckbox: a = !1,
6382
6371
  checkboxPosition: s = "top-left",
6383
- onSelect: o,
6372
+ onSelect: i,
6384
6373
  identity: l = "_id",
6385
6374
  // content
6386
6375
  title: m = "Activity",
6387
- group: i = "Global",
6376
+ group: o = "Global",
6388
6377
  moreGroupsLabel: u = "+ 5 more",
6389
6378
  author: g = "Judith Black",
6390
6379
  timeLabel: f = "Just now",
@@ -6393,16 +6382,16 @@ function Ds({
6393
6382
  // spread remaining props (_id, instanceId, etc.)
6394
6383
  ...N
6395
6384
  }) {
6396
- const d = ie(t), p = ce[d];
6385
+ const d = oe(t), p = ce[d];
6397
6386
  return /* @__PURE__ */ n(
6398
- oe,
6387
+ ie,
6399
6388
  {
6400
6389
  className: `flex flex-col ${p.card}`,
6401
6390
  showCheckbox: a,
6402
6391
  checkboxPosition: s,
6403
- onSelect: o,
6392
+ onSelect: i,
6404
6393
  identity: l,
6405
- details: { type: "activity", title: m, group: i, author: g },
6394
+ details: { type: "activity", title: m, group: o, author: g },
6406
6395
  ...N,
6407
6396
  children: [
6408
6397
  /* @__PURE__ */ e("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${p.title} ml-3`, children: m }) }),
@@ -6503,25 +6492,25 @@ function Es({
6503
6492
  size: t = "md",
6504
6493
  showCheckbox: a = !1,
6505
6494
  checkboxPosition: s = "top-left",
6506
- onSelect: o,
6495
+ onSelect: i,
6507
6496
  identity: l = "_id",
6508
6497
  title: m = "Communities",
6509
- activeTab: i = "joined",
6498
+ activeTab: o = "joined",
6510
6499
  // "joined" | "suggested"
6511
6500
  items: u = As,
6512
6501
  // spread for identity (_id/instanceId/etc)
6513
6502
  ...g
6514
6503
  }) {
6515
- const f = ie(t), x = ce[f], r = Fs[f], N = (d) => `px-1 pb-2 text-sm font-medium ${d === i ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
6504
+ const f = oe(t), x = ce[f], r = Fs[f], N = (d) => `px-1 pb-2 text-sm font-medium ${d === o ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
6516
6505
  return /* @__PURE__ */ n(
6517
- oe,
6506
+ ie,
6518
6507
  {
6519
6508
  className: `flex flex-col ${x.card} ${r.wrap}`,
6520
6509
  showCheckbox: a,
6521
6510
  checkboxPosition: s,
6522
- onSelect: o,
6511
+ onSelect: i,
6523
6512
  identity: l,
6524
- details: { type: "communities", title: m, activeTab: i, count: u?.length ?? 0 },
6513
+ details: { type: "communities", title: m, activeTab: o, count: u?.length ?? 0 },
6525
6514
  ...g,
6526
6515
  children: [
6527
6516
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
@@ -6539,14 +6528,14 @@ function Es({
6539
6528
  /* @__PURE__ */ e(
6540
6529
  "span",
6541
6530
  {
6542
- className: `${N("joined")} ${i === "joined" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6531
+ className: `${N("joined")} ${o === "joined" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6543
6532
  children: "Joined"
6544
6533
  }
6545
6534
  ),
6546
6535
  /* @__PURE__ */ e(
6547
6536
  "span",
6548
6537
  {
6549
- className: `${N("suggested")} ${i === "suggested" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6538
+ className: `${N("suggested")} ${o === "suggested" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6550
6539
  children: "Suggested"
6551
6540
  }
6552
6541
  )
@@ -6689,23 +6678,23 @@ function Ps({
6689
6678
  size: t = "md",
6690
6679
  showCheckbox: a = !1,
6691
6680
  checkboxPosition: s = "top-left",
6692
- onSelect: o,
6681
+ onSelect: i,
6693
6682
  identity: l = "_id",
6694
6683
  title: m = "News",
6695
- items: i = Rs,
6684
+ items: o = Rs,
6696
6685
  // spread for identity fields: _id / id / instanceId etc.
6697
6686
  ...u
6698
6687
  }) {
6699
- const g = ie(t), f = ce[g], x = Os[g];
6688
+ const g = oe(t), f = ce[g], x = Os[g];
6700
6689
  return /* @__PURE__ */ n(
6701
- oe,
6690
+ ie,
6702
6691
  {
6703
6692
  className: `flex flex-col ${f.card} ${x.wrap || ""}`,
6704
6693
  showCheckbox: a,
6705
6694
  checkboxPosition: s,
6706
- onSelect: o,
6695
+ onSelect: i,
6707
6696
  identity: l,
6708
- details: { type: "news", title: m, count: i?.length ?? 0 },
6697
+ details: { type: "news", title: m, count: o?.length ?? 0 },
6709
6698
  ...u,
6710
6699
  children: [
6711
6700
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
@@ -6714,7 +6703,7 @@ function Ps({
6714
6703
  ] }),
6715
6704
  g === "lg" ? (
6716
6705
  // Large: 3-up grid of image cards
6717
- /* @__PURE__ */ e("div", { className: `mt-4 ${x.grid}`, children: i.slice(0, 3).map((r) => /* @__PURE__ */ n("article", { children: [
6706
+ /* @__PURE__ */ e("div", { className: `mt-4 ${x.grid}`, children: o.slice(0, 3).map((r) => /* @__PURE__ */ n("article", { children: [
6718
6707
  /* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: x.cardImg }),
6719
6708
  /* @__PURE__ */ e("h4", { className: `mt-3 ${x.title} text-zinc-900 dark:text-zinc-100`, children: r.title }),
6720
6709
  /* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${x.date}`, children: r.date }),
@@ -6727,7 +6716,7 @@ function Ps({
6727
6716
  ] }, r._id || r.id || r.instanceId)) })
6728
6717
  ) : (
6729
6718
  // Small/Medium: list rows with thumb left
6730
- /* @__PURE__ */ e("ul", { className: "mt-4 grid gap-3", children: i.slice(0, 3).map((r) => /* @__PURE__ */ n(
6719
+ /* @__PURE__ */ e("ul", { className: "mt-4 grid gap-3", children: o.slice(0, 3).map((r) => /* @__PURE__ */ n(
6731
6720
  "li",
6732
6721
  {
6733
6722
  className: "flex items-start gap-3 rounded-xl border border-zinc-200 dark:border-zinc-800 p-2",
@@ -6793,22 +6782,22 @@ const Is = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Ms = {
6793
6782
  searchH: "h-11 text-base",
6794
6783
  chipGap: "gap-3.5"
6795
6784
  }
6796
- }, Ls = ({ label: t, active: a = !1, size: s = "md", className: o = "" }) => {
6785
+ }, Ls = ({ label: t, active: a = !1, size: s = "md", className: i = "" }) => {
6797
6786
  const l = "inline-flex items-center justify-center whitespace-nowrap rounded-full border transition-colors duration-150 shadow-[0_0.5px_0_rgba(0,0,0,0.04)]", m = {
6798
6787
  sm: "h-8 px-3 text-[11px] font-semibold",
6799
6788
  md: "h-9 px-3.5 text-[13px] font-semibold",
6800
6789
  lg: "h-10 px-4 text-sm font-semibold"
6801
- }, i = a ? "bg-indigo-700 border-indigo-700 text-white" : "bg-white/95 dark:bg-zinc-900/90 border-zinc-300 dark:border-zinc-700 text-zinc-700 dark:text-zinc-200";
6802
- return /* @__PURE__ */ e("span", { className: `${l} ${m[s] ?? m.md} ${i} ${o}`, children: t });
6790
+ }, o = a ? "bg-indigo-700 border-indigo-700 text-white" : "bg-white/95 dark:bg-zinc-900/90 border-zinc-300 dark:border-zinc-700 text-zinc-700 dark:text-zinc-200";
6791
+ return /* @__PURE__ */ e("span", { className: `${l} ${m[s] ?? m.md} ${o} ${i}`, children: t });
6803
6792
  }, Bs = (t, a = 12) => `https://www.google.com/maps?q=${encodeURIComponent(t)}&z=${a}&output=embed`;
6804
6793
  function js({
6805
6794
  size: t = "md",
6806
6795
  showCheckbox: a = !1,
6807
6796
  checkboxPosition: s = "top-left",
6808
- onSelect: o,
6797
+ onSelect: i,
6809
6798
  identity: l = "_id",
6810
6799
  title: m = "Campus Map",
6811
- campusName: i = "Morningside Heights Campus",
6800
+ campusName: o = "Morningside Heights Campus",
6812
6801
  filters: u = Is,
6813
6802
  activeFilter: g = "All",
6814
6803
  // NEW: iframe controls
@@ -6818,16 +6807,16 @@ function js({
6818
6807
  // optional full embed URL override
6819
6808
  ...N
6820
6809
  }) {
6821
- const d = ie(t), p = ce[d], $ = Ms[d], A = r || Bs(f, x);
6810
+ const d = oe(t), p = ce[d], $ = Ms[d], A = r || Bs(f, x);
6822
6811
  return /* @__PURE__ */ e(
6823
- oe,
6812
+ ie,
6824
6813
  {
6825
6814
  className: `flex flex-col ${p.card} ${$.wrap}`,
6826
6815
  showCheckbox: a,
6827
6816
  checkboxPosition: s,
6828
- onSelect: o,
6817
+ onSelect: i,
6829
6818
  identity: l,
6830
- details: { type: "campus-map", title: m, campusName: i, activeFilter: g, mapQuery: f, zoom: x },
6819
+ details: { type: "campus-map", title: m, campusName: o, activeFilter: g, mapQuery: f, zoom: x },
6831
6820
  ...N,
6832
6821
  children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${$.mapH}`, children: [
6833
6822
  /* @__PURE__ */ e(
@@ -6844,7 +6833,7 @@ function js({
6844
6833
  ),
6845
6834
  /* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
6846
6835
  /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${$.campusPill}`, children: [
6847
- /* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: i }),
6836
+ /* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: o }),
6848
6837
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
6849
6838
  ] }),
6850
6839
  /* @__PURE__ */ n("div", { className: "hidden md:flex items-center gap-2", "aria-hidden": "true", children: [
@@ -6953,13 +6942,13 @@ const Vs = [
6953
6942
  time: a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })
6954
6943
  };
6955
6944
  };
6956
- function jt({ ev: t, sizeMeta: a, isSelected: s, onClick: o }) {
6957
- const { day: l, month: m, time: i } = Ta(t.date);
6945
+ function jt({ ev: t, sizeMeta: a, isSelected: s, onClick: i }) {
6946
+ const { day: l, month: m, time: o } = Ta(t.date);
6958
6947
  return /* @__PURE__ */ n(
6959
6948
  "div",
6960
6949
  {
6961
6950
  className: `flex items-start gap-4 py-3 cursor-pointer group ${s ? "bg-blue-50 dark:bg-blue-900/20 rounded-lg -mx-2 px-2" : ""}`,
6962
- onClick: () => o(t),
6951
+ onClick: () => i(t),
6963
6952
  children: [
6964
6953
  /* @__PURE__ */ e("div", { className: "flex-shrink-0 min-w-12", children: /* @__PURE__ */ n("div", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${a.dateSize}`, children: [
6965
6954
  l,
@@ -6970,21 +6959,21 @@ function jt({ ev: t, sizeMeta: a, isSelected: s, onClick: o }) {
6970
6959
  /* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 line-clamp-2 group-hover:text-blue-600 dark:group-hover:text-blue-400`, children: t.title }),
6971
6960
  /* @__PURE__ */ n("div", { className: `flex items-center gap-1.5 mt-1 text-zinc-500 dark:text-zinc-400 ${a.meta}`, children: [
6972
6961
  /* @__PURE__ */ e(Ae, { className: "h-3 w-3" }),
6973
- t.allDayNote ? t.allDayNote : i
6962
+ t.allDayNote ? t.allDayNote : o
6974
6963
  ] })
6975
6964
  ] })
6976
6965
  ]
6977
6966
  }
6978
6967
  );
6979
6968
  }
6980
- function qs({ ev: t, sizeMeta: a }) {
6969
+ function Gs({ ev: t, sizeMeta: a }) {
6981
6970
  if (!t) return null;
6982
- const { day: s, month: o, time: l } = Ta(t.date);
6971
+ const { day: s, month: i, time: l } = Ta(t.date);
6983
6972
  return /* @__PURE__ */ n("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-6", children: [
6984
6973
  /* @__PURE__ */ n("div", { className: "flex items-start gap-4 mb-4", children: [
6985
6974
  /* @__PURE__ */ n("div", { className: "flex-shrink-0", children: [
6986
6975
  /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-zinc-900 dark:text-zinc-100", children: s }),
6987
- /* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wide", children: o })
6976
+ /* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wide", children: i })
6988
6977
  ] }),
6989
6978
  /* @__PURE__ */ n("div", { className: "flex-grow", children: [
6990
6979
  /* @__PURE__ */ e("h3", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-2`, children: t.title }),
@@ -7013,29 +7002,29 @@ function qs({ ev: t, sizeMeta: a }) {
7013
7002
  a.showDescription && t.description && /* @__PURE__ */ e("div", { className: "mt-4 pt-4 border-t border-zinc-200 dark:border-zinc-800", children: /* @__PURE__ */ e("p", { className: "text-sm text-zinc-700 dark:text-zinc-300 leading-relaxed", children: t.description }) })
7014
7003
  ] });
7015
7004
  }
7016
- function Gs({
7005
+ function qs({
7017
7006
  size: t = "md",
7018
7007
  showCheckbox: a = !1,
7019
7008
  checkboxPosition: s = "top-left",
7020
- onSelect: o,
7009
+ onSelect: i,
7021
7010
  identity: l = "_id",
7022
7011
  title: m = "Upcoming Events",
7023
- events: i = Vs,
7012
+ events: o = Vs,
7024
7013
  selectedIndex: u = 0,
7025
7014
  ...g
7026
7015
  }) {
7027
- const [f, x] = L(u), r = ie(t), N = ce[r], d = _s[r], p = i[f] || i[0], $ = (E, R) => {
7028
- x(R), o?.(E);
7016
+ const [f, x] = L(u), r = oe(t), N = ce[r], d = _s[r], p = o[f] || o[0], $ = (E, R) => {
7017
+ x(R), i?.(E);
7029
7018
  }, A = r === "lg";
7030
7019
  return /* @__PURE__ */ n(
7031
- oe,
7020
+ ie,
7032
7021
  {
7033
7022
  className: `flex flex-col ${N.card} ${d.wrap}`,
7034
7023
  showCheckbox: a,
7035
7024
  checkboxPosition: s,
7036
- onSelect: o,
7025
+ onSelect: i,
7037
7026
  identity: l,
7038
- details: { type: "events", title: m, count: i?.length ?? 0 },
7027
+ details: { type: "events", title: m, count: o?.length ?? 0 },
7039
7028
  ...g,
7040
7029
  children: [
7041
7030
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-4", children: [
@@ -7045,7 +7034,7 @@ function Gs({
7045
7034
  A ? (
7046
7035
  // Large: Two-column layout
7047
7036
  /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
7048
- /* @__PURE__ */ e("div", { className: "space-y-1", children: i.map((E, R) => /* @__PURE__ */ e(
7037
+ /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, R) => /* @__PURE__ */ e(
7049
7038
  jt,
7050
7039
  {
7051
7040
  ev: E,
@@ -7055,11 +7044,11 @@ function Gs({
7055
7044
  },
7056
7045
  E._id || E.id || R
7057
7046
  )) }),
7058
- /* @__PURE__ */ e(qs, { ev: p, sizeMeta: d })
7047
+ /* @__PURE__ */ e(Gs, { ev: p, sizeMeta: d })
7059
7048
  ] })
7060
7049
  ) : (
7061
7050
  // Small/Medium: Simple list only
7062
- /* @__PURE__ */ e("div", { className: "space-y-1", children: i.map((E, R) => /* @__PURE__ */ e(
7051
+ /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, R) => /* @__PURE__ */ e(
7063
7052
  jt,
7064
7053
  {
7065
7054
  ev: E,
@@ -7075,7 +7064,7 @@ function Gs({
7075
7064
  }
7076
7065
  );
7077
7066
  }
7078
- Gs.propTypes = {
7067
+ qs.propTypes = {
7079
7068
  size: c.string,
7080
7069
  showCheckbox: c.bool,
7081
7070
  checkboxPosition: c.oneOf(["top-left", "top-right"]),
@@ -7179,8 +7168,8 @@ const Ys = [
7179
7168
  searchHeight: "h-10"
7180
7169
  }
7181
7170
  };
7182
- function Js({ email: t, sizeMeta: a, isSelected: s, onClick: o, onStar: l, onPin: m }) {
7183
- const i = (g) => {
7171
+ function Js({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin: m }) {
7172
+ const o = (g) => {
7184
7173
  g.stopPropagation(), l?.(t);
7185
7174
  }, u = (g) => {
7186
7175
  g.stopPropagation(), m?.(t);
@@ -7189,13 +7178,13 @@ function Js({ email: t, sizeMeta: a, isSelected: s, onClick: o, onStar: l, onPin
7189
7178
  "div",
7190
7179
  {
7191
7180
  className: `flex items-start gap-3 p-3 cursor-pointer border-b border-zinc-200 dark:border-zinc-800 last:border-b-0 group ${s ? "bg-blue-50 dark:bg-blue-900/20 border-l-4 border-l-blue-500 -ml-1 pl-4" : "hover:bg-zinc-50 dark:hover:bg-zinc-800/50 border-l-4 border-l-transparent"} ${t.unread ? "bg-blue-25 dark:bg-blue-900/10" : ""}`,
7192
- onClick: () => o(t),
7181
+ onClick: () => i(t),
7193
7182
  children: [
7194
7183
  /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1 pt-0.5", children: [
7195
7184
  /* @__PURE__ */ e(
7196
7185
  "button",
7197
7186
  {
7198
- onClick: i,
7187
+ onClick: o,
7199
7188
  className: "p-1 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors duration-200",
7200
7189
  children: t.starred ? /* @__PURE__ */ e(Dr, { className: "h-4 w-4 fill-yellow-400 text-yellow-400" }) : /* @__PURE__ */ e($r, { className: "h-4 w-4 text-zinc-400 group-hover:text-yellow-400" })
7201
7190
  }
@@ -7232,17 +7221,17 @@ function Xs({
7232
7221
  size: t = "md",
7233
7222
  showCheckbox: a = !1,
7234
7223
  checkboxPosition: s = "top-left",
7235
- onSelect: o,
7224
+ onSelect: i,
7236
7225
  identity: l = "_id",
7237
7226
  title: m = "0365 Mails",
7238
- emails: i = Ys,
7227
+ emails: o = Ys,
7239
7228
  selectedIndex: u = 0,
7240
7229
  onStar: g,
7241
7230
  onPin: f,
7242
7231
  ...x
7243
7232
  }) {
7244
- const [r, N] = L(u), d = ie(t), p = ce[d], $ = Ws[d], A = (O, V) => {
7245
- N(V), o?.(O);
7233
+ const [r, N] = L(u), d = oe(t), p = ce[d], $ = Ws[d], A = (O, V) => {
7234
+ N(V), i?.(O);
7246
7235
  }, E = (O) => {
7247
7236
  const V = { ...O, starred: !O.starred };
7248
7237
  g?.(V);
@@ -7251,19 +7240,19 @@ function Xs({
7251
7240
  f?.(V);
7252
7241
  };
7253
7242
  return /* @__PURE__ */ n(
7254
- oe,
7243
+ ie,
7255
7244
  {
7256
7245
  className: `flex flex-col ${p.card} ${$.wrap}`,
7257
7246
  showCheckbox: a,
7258
7247
  checkboxPosition: s,
7259
- onSelect: o,
7248
+ onSelect: i,
7260
7249
  identity: l,
7261
- details: { type: "emails", title: m, count: i?.length ?? 0 },
7250
+ details: { type: "emails", title: m, count: o?.length ?? 0 },
7262
7251
  ...x,
7263
7252
  children: [
7264
7253
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${p.title}`, children: m }) }),
7265
7254
  /* @__PURE__ */ e(he, { placeholder: "Type to search..." }),
7266
- /* @__PURE__ */ e("div", { className: "space-y-0", children: i.map((O, V) => /* @__PURE__ */ e(
7255
+ /* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((O, V) => /* @__PURE__ */ e(
7267
7256
  Js,
7268
7257
  {
7269
7258
  email: O,
@@ -7392,12 +7381,12 @@ const Hs = [
7392
7381
  // two columns for large screens
7393
7382
  }
7394
7383
  };
7395
- function Vt({ contact: t, sizeMeta: a, isSelected: s, onClick: o }) {
7384
+ function Vt({ contact: t, sizeMeta: a, isSelected: s, onClick: i }) {
7396
7385
  return /* @__PURE__ */ n(
7397
7386
  "div",
7398
7387
  {
7399
7388
  className: `flex items-center gap-4 p-4 cursor-pointer rounded-lg border transition-all duration-200 group ${s ? "bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800 shadow-sm" : "border-zinc-200 dark:border-zinc-800 hover:bg-zinc-50 dark:hover:bg-zinc-800/50 hover:border-zinc-300 dark:hover:border-zinc-700"}`,
7400
- onClick: () => o(t),
7389
+ onClick: () => i(t),
7401
7390
  children: [
7402
7391
  /* @__PURE__ */ e("div", { className: `${a.avatarSize} flex-shrink-0 flex items-center justify-center bg-gradient-to-br from-blue-500 to-blue-600 rounded-full text-white font-semibold ${a.avatarText} shadow-sm`, children: t.initials }),
7403
7392
  /* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
@@ -7486,31 +7475,31 @@ function el({
7486
7475
  size: t = "md",
7487
7476
  showCheckbox: a = !1,
7488
7477
  checkboxPosition: s = "top-left",
7489
- onSelect: o,
7478
+ onSelect: i,
7490
7479
  identity: l = "_id",
7491
7480
  title: m = "Directory",
7492
- contacts: i = Hs,
7481
+ contacts: o = Hs,
7493
7482
  selectedIndex: u = 0,
7494
7483
  ...g
7495
7484
  }) {
7496
- const [f, x] = L(u), r = ie(t), N = ce[r], d = Qs[r], p = (E, R) => {
7497
- x(R), o?.(E);
7498
- }, $ = i[f] || i[0], A = d.layout === "split";
7485
+ const [f, x] = L(u), r = oe(t), N = ce[r], d = Qs[r], p = (E, R) => {
7486
+ x(R), i?.(E);
7487
+ }, $ = o[f] || o[0], A = d.layout === "split";
7499
7488
  return /* @__PURE__ */ n(
7500
- oe,
7489
+ ie,
7501
7490
  {
7502
7491
  className: `flex flex-col ${N.card} ${d.wrap}`,
7503
7492
  showCheckbox: a,
7504
7493
  checkboxPosition: s,
7505
- onSelect: o,
7494
+ onSelect: i,
7506
7495
  identity: l,
7507
- details: { type: "directory", title: m, count: i?.length ?? 0 },
7496
+ details: { type: "directory", title: m, count: o?.length ?? 0 },
7508
7497
  ...g,
7509
7498
  children: [
7510
7499
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between mb-4", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${N.title}`, children: m }) }),
7511
7500
  /* @__PURE__ */ e(Ks, { sizeMeta: d }),
7512
7501
  A ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
7513
- /* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((E, R) => /* @__PURE__ */ e(
7502
+ /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, R) => /* @__PURE__ */ e(
7514
7503
  Vt,
7515
7504
  {
7516
7505
  contact: E,
@@ -7529,7 +7518,7 @@ function el({
7529
7518
  )
7530
7519
  ] }) : (
7531
7520
  // Single column layout for small screens
7532
- /* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((E, R) => /* @__PURE__ */ e(
7521
+ /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, R) => /* @__PURE__ */ e(
7533
7522
  Vt,
7534
7523
  {
7535
7524
  contact: E,
@@ -7567,12 +7556,12 @@ el.propTypes = {
7567
7556
  selectedIndex: c.number
7568
7557
  };
7569
7558
  const De = (t) => new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(Number(t || 0));
7570
- function tl({ side: t = "left", date: a, title: s, amount: o, kind: l = "payment" }) {
7559
+ function tl({ side: t = "left", date: a, title: s, amount: i, kind: l = "payment" }) {
7571
7560
  return /* @__PURE__ */ n("div", { className: `rounded-xl border border-zinc-200 dark:border-zinc-800 p-3 ${l === "payment" ? "border-l-4 border-green-500" : "border-l-4 border-rose-500"}`, children: [
7572
7561
  /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: a }),
7573
7562
  /* @__PURE__ */ e("div", { className: "mt-1 text-sm text-zinc-700 dark:text-zinc-200", children: s }),
7574
7563
  /* @__PURE__ */ n("div", { className: "mt-2 flex items-center justify-between", children: [
7575
- /* @__PURE__ */ e("div", { className: "text-sm font-semibold", children: De(o) }),
7564
+ /* @__PURE__ */ e("div", { className: "text-sm font-semibold", children: De(i) }),
7576
7565
  /* @__PURE__ */ e(
7577
7566
  "div",
7578
7567
  {
@@ -7619,11 +7608,11 @@ function rl({
7619
7608
  size: t = "md",
7620
7609
  showCheckbox: a = !1,
7621
7610
  checkboxPosition: s = "top-left",
7622
- onSelect: o,
7611
+ onSelect: i,
7623
7612
  identity: l = "_id",
7624
7613
  // content
7625
7614
  title: m = "Account Summary",
7626
- termLabel: i = "Spring 2024",
7615
+ termLabel: o = "Spring 2024",
7627
7616
  balance: u = 3e3,
7628
7617
  totalCharges: g = 4440,
7629
7618
  totalPayments: f = 1568,
@@ -7645,22 +7634,22 @@ function rl({
7645
7634
  ],
7646
7635
  ...r
7647
7636
  }) {
7648
- const N = ie(t), d = ce[N], p = al[N];
7637
+ const N = oe(t), d = ce[N], p = al[N];
7649
7638
  return /* @__PURE__ */ n(
7650
- oe,
7639
+ ie,
7651
7640
  {
7652
7641
  className: `flex flex-col ${d.card} ${p.wrap}`,
7653
7642
  showCheckbox: a,
7654
7643
  checkboxPosition: s,
7655
- onSelect: o,
7644
+ onSelect: i,
7656
7645
  identity: l,
7657
- details: { type: "account-summary", termLabel: i, balance: u, totalCharges: g, totalPayments: f },
7646
+ details: { type: "account-summary", termLabel: o, balance: u, totalCharges: g, totalPayments: f },
7658
7647
  ...r,
7659
7648
  children: [
7660
7649
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
7661
7650
  /* @__PURE__ */ e("div", { className: `font-semibold ${d.title}`, children: m }),
7662
7651
  /* @__PURE__ */ n("div", { className: "rounded-full border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-900 px-3 py-1 text-sm flex items-center gap-2", children: [
7663
- /* @__PURE__ */ e("span", { children: i }),
7652
+ /* @__PURE__ */ e("span", { children: o }),
7664
7653
  /* @__PURE__ */ e(vt, { className: "h-4 w-4 opacity-70" })
7665
7654
  ] })
7666
7655
  ] }),
@@ -7772,7 +7761,7 @@ const nl = {
7772
7761
  showTabs: !0,
7773
7762
  showAllLeave: !0
7774
7763
  }
7775
- }, We = [
7764
+ }, qe = [
7776
7765
  {
7777
7766
  id: "vacation",
7778
7767
  name: "Vacation Time",
@@ -7802,30 +7791,30 @@ function _t({ leave: t, sizeMeta: a }) {
7802
7791
  /* @__PURE__ */ e("span", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${a.table}`, children: t.name }),
7803
7792
  /* @__PURE__ */ e("span", { className: `text-zinc-600 dark:text-zinc-400 ${a.table}`, children: t.available })
7804
7793
  ] }) }),
7805
- /* @__PURE__ */ e("div", { className: "divide-y divide-zinc-200 dark:divide-zinc-800", children: t.breakdown.map((s, o) => /* @__PURE__ */ n("div", { className: "flex justify-between items-center px-4 py-3", children: [
7794
+ /* @__PURE__ */ e("div", { className: "divide-y divide-zinc-200 dark:divide-zinc-800", children: t.breakdown.map((s, i) => /* @__PURE__ */ n("div", { className: "flex justify-between items-center px-4 py-3", children: [
7806
7795
  /* @__PURE__ */ e("span", { className: `text-zinc-700 dark:text-zinc-300 ${a.table}`, children: s.label }),
7807
7796
  /* @__PURE__ */ e("span", { className: `font-medium ${s.change === "positive" ? "text-green-600 dark:text-green-400" : s.change === "negative" ? "text-red-600 dark:text-red-400" : "text-zinc-900 dark:text-zinc-100"} ${a.table}`, children: s.value })
7808
- ] }, o)) })
7797
+ ] }, i)) })
7809
7798
  ] });
7810
7799
  }
7811
7800
  function sl({
7812
7801
  size: t = "md",
7813
7802
  showCheckbox: a = !1,
7814
7803
  checkboxPosition: s = "top-left",
7815
- onSelect: o,
7804
+ onSelect: i,
7816
7805
  identity: l = "_id",
7817
7806
  title: m = "Pay Stub and Leave Balance",
7818
- term: i = "Fall 2025",
7807
+ term: o = "Fall 2025",
7819
7808
  ...u
7820
7809
  }) {
7821
- const [g, f] = L("vacation"), [x, r] = L(!1), N = ie(t), d = ce[N], p = nl[N], $ = We.find((A) => A.id === g) || We[0];
7810
+ const [g, f] = L("vacation"), [x, r] = L(!1), N = oe(t), d = ce[N], p = nl[N], $ = qe.find((A) => A.id === g) || qe[0];
7822
7811
  return /* @__PURE__ */ n(
7823
- oe,
7812
+ ie,
7824
7813
  {
7825
7814
  className: `flex flex-col ${d.card} ${p.wrap}`,
7826
7815
  showCheckbox: a,
7827
7816
  checkboxPosition: s,
7828
- onSelect: o,
7817
+ onSelect: i,
7829
7818
  identity: l,
7830
7819
  details: { type: "leave-balance", title: m },
7831
7820
  ...u,
@@ -7834,9 +7823,9 @@ function sl({
7834
7823
  /* @__PURE__ */ n("div", { children: [
7835
7824
  /* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${p.title} mb-1`, children: m }),
7836
7825
  /* @__PURE__ */ n("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.term} flex items-center gap-2`, children: [
7837
- /* @__PURE__ */ e(Gt, { className: "h-4 w-4" }),
7826
+ /* @__PURE__ */ e(qt, { className: "h-4 w-4" }),
7838
7827
  "Term - ",
7839
- i
7828
+ o
7840
7829
  ] })
7841
7830
  ] }),
7842
7831
  /* @__PURE__ */ n("div", { className: "relative", children: [
@@ -7854,7 +7843,7 @@ function sl({
7854
7843
  ] })
7855
7844
  ] })
7856
7845
  ] }),
7857
- p.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: We.map((A) => /* @__PURE__ */ e(
7846
+ p.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: qe.map((A) => /* @__PURE__ */ e(
7858
7847
  "button",
7859
7848
  {
7860
7849
  className: `flex-1 py-2 px-4 text-center ${p.tab} font-medium border-b-2 transition-colors duration-200 ${g === A.id ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100"}`,
@@ -7865,7 +7854,7 @@ function sl({
7865
7854
  )) }),
7866
7855
  /* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: p.showAllLeave ? (
7867
7856
  // LG: Show all leave types
7868
- We.map((A) => /* @__PURE__ */ e(_t, { leave: A, sizeMeta: p }, A.id))
7857
+ qe.map((A) => /* @__PURE__ */ e(_t, { leave: A, sizeMeta: p }, A.id))
7869
7858
  ) : p.showSingleLeave ? (
7870
7859
  // MD: Show active tab leave type
7871
7860
  /* @__PURE__ */ e(_t, { leave: $, sizeMeta: p })
@@ -7899,7 +7888,7 @@ const ll = [
7899
7888
  name: "Admin Files",
7900
7889
  type: "folder",
7901
7890
  count: "200 files",
7902
- icon: Be,
7891
+ icon: Le,
7903
7892
  color: "text-blue-500"
7904
7893
  },
7905
7894
  {
@@ -7926,13 +7915,13 @@ const ll = [
7926
7915
  // icon: Video,
7927
7916
  // color: "text-purple-500"
7928
7917
  // }
7929
- ], ol = [
7918
+ ], il = [
7930
7919
  {
7931
7920
  id: "file-1",
7932
7921
  name: "2024 - Taurus",
7933
7922
  type: "folder",
7934
7923
  date: "March 06, 2025",
7935
- icon: Be,
7924
+ icon: Le,
7936
7925
  color: "text-blue-500"
7937
7926
  },
7938
7927
  {
@@ -7948,7 +7937,7 @@ const ll = [
7948
7937
  name: "Championship 2",
7949
7938
  type: "folder",
7950
7939
  date: "March 06, 2025",
7951
- icon: Be,
7940
+ icon: Le,
7952
7941
  color: "text-blue-500"
7953
7942
  },
7954
7943
  {
@@ -7959,7 +7948,7 @@ const ll = [
7959
7948
  icon: pt,
7960
7949
  color: "text-orange-500"
7961
7950
  }
7962
- ], il = {
7951
+ ], ol = {
7963
7952
  sm: {
7964
7953
  wrap: "max-w-xs w-full",
7965
7954
  title: "text-base font-semibold",
@@ -7989,9 +7978,9 @@ const ll = [
7989
7978
  }
7990
7979
  };
7991
7980
  function Ut({ item: t, sizeMeta: a, showDate: s = !1 }) {
7992
- const o = t.icon;
7981
+ const i = t.icon;
7993
7982
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-3 p-3 rounded-lg border border-zinc-200 dark:border-zinc-800 hover:bg-zinc-50 dark:hover:bg-zinc-800/50 cursor-pointer transition-colors duration-200 group", children: [
7994
- /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(o, { className: `h-6 w-6 ${t.color}` }) }),
7983
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(i, { className: `h-6 w-6 ${t.color}` }) }),
7995
7984
  /* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
7996
7985
  /* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 truncate ${a.item}`, children: t.name }),
7997
7986
  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 })
@@ -8003,20 +7992,20 @@ function cl({
8003
7992
  size: t = "md",
8004
7993
  showCheckbox: a = !1,
8005
7994
  checkboxPosition: s = "top-left",
8006
- onSelect: o,
7995
+ onSelect: i,
8007
7996
  identity: l = "_id",
8008
7997
  title: m = "Drive",
8009
- subtitle: i = "Drive Shared",
7998
+ subtitle: o = "Drive Shared",
8010
7999
  ...u
8011
8000
  }) {
8012
- const [g, f] = L(!1), x = ie(t), r = ce[x], N = il[x];
8001
+ const [g, f] = L(!1), x = oe(t), r = ce[x], N = ol[x];
8013
8002
  return /* @__PURE__ */ n(
8014
- oe,
8003
+ ie,
8015
8004
  {
8016
8005
  className: `flex flex-col ${r.card} ${N.wrap}`,
8017
8006
  showCheckbox: a,
8018
8007
  checkboxPosition: s,
8019
- onSelect: o,
8008
+ onSelect: i,
8020
8009
  identity: l,
8021
8010
  details: { type: "drive", title: m },
8022
8011
  ...u,
@@ -8024,7 +8013,7 @@ function cl({
8024
8013
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
8025
8014
  /* @__PURE__ */ n("div", { children: [
8026
8015
  /* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${N.title} mb-1`, children: m }),
8027
- /* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-sm", children: i })
8016
+ /* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-sm", children: o })
8028
8017
  ] }),
8029
8018
  /* @__PURE__ */ n("div", { className: "relative", children: [
8030
8019
  /* @__PURE__ */ e(
@@ -8057,7 +8046,7 @@ function cl({
8057
8046
  )) }),
8058
8047
  N.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
8059
8048
  /* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${N.item}`, children: "Recent Files" }),
8060
- /* @__PURE__ */ e("div", { className: "space-y-2", children: ol.map((d) => /* @__PURE__ */ e(
8049
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: il.map((d) => /* @__PURE__ */ e(
8061
8050
  Ut,
8062
8051
  {
8063
8052
  item: d,
@@ -8153,7 +8142,7 @@ const dl = [
8153
8142
  maxMessageWords: 25,
8154
8143
  showMessage: !0
8155
8144
  }
8156
- }, qt = (t, a) => {
8145
+ }, Gt = (t, a) => {
8157
8146
  if (!a || a === 0) return t;
8158
8147
  const s = t.split(" ");
8159
8148
  return s.length <= a ? t : s.slice(0, a).join(" ") + "...";
@@ -8200,9 +8189,9 @@ const dl = [
8200
8189
  };
8201
8190
  }
8202
8191
  };
8203
- function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: o }) {
8204
- const [l, m] = L(!1), i = Aa(t.type), u = ul(t.type);
8205
- return l ? null : /* @__PURE__ */ n("div", { className: `relative rounded-lg border-l-4 p-4 transition-all duration-200 ${i.bg} ${i.border} ${t.read ? "border-l-2 opacity-80" : "border-l-4"}`, style: { borderLeftColor: i.accent }, children: [
8192
+ function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8193
+ const [l, m] = L(!1), o = Aa(t.type), u = ul(t.type);
8194
+ 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: [
8206
8195
  /* @__PURE__ */ e(
8207
8196
  "button",
8208
8197
  {
@@ -8211,10 +8200,10 @@ function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: o }) {
8211
8200
  }
8212
8201
  ),
8213
8202
  /* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
8214
- /* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${i.icon}` }) }),
8203
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${o.icon}` }) }),
8215
8204
  /* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
8216
- /* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children: qt(t.title, a.maxTitleWords) }),
8217
- a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children: qt(t.message, a.maxMessageWords) }),
8205
+ /* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children: Gt(t.title, a.maxTitleWords) }),
8206
+ a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children: Gt(t.message, a.maxMessageWords) }),
8218
8207
  /* @__PURE__ */ n("div", { className: `flex items-center gap-1 ${a.time} text-zinc-500 dark:text-zinc-400`, children: [
8219
8208
  /* @__PURE__ */ e(Ae, { className: "h-3 w-3" }),
8220
8209
  t.time
@@ -8225,8 +8214,8 @@ function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: o }) {
8225
8214
  ] });
8226
8215
  }
8227
8216
  function pl({ alert: t, onDismiss: a }) {
8228
- const [s, o] = L(!1), l = Aa("banner"), m = () => {
8229
- o(!0), a?.(t);
8217
+ const [s, i] = L(!1), l = Aa("banner"), m = () => {
8218
+ i(!0), a?.(t);
8230
8219
  };
8231
8220
  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: [
8232
8221
  /* @__PURE__ */ e(na, { className: `h-5 w-5 mt-0.5 ${l.icon}` }),
@@ -8248,23 +8237,23 @@ function gl({
8248
8237
  size: t = "md",
8249
8238
  showCheckbox: a = !1,
8250
8239
  checkboxPosition: s = "top-left",
8251
- onSelect: o,
8240
+ onSelect: i,
8252
8241
  identity: l = "_id",
8253
8242
  title: m = "Alerts",
8254
- alerts: i = dl,
8243
+ alerts: o = dl,
8255
8244
  showBanner: u = !0,
8256
8245
  ...g
8257
8246
  }) {
8258
- const [f, x] = L(i), r = ie(t), N = ce[r], d = ml[r], p = (E) => {
8247
+ const [f, x] = L(o), r = oe(t), N = ce[r], d = ml[r], p = (E) => {
8259
8248
  x((R) => R.filter((O) => O.id !== E.id));
8260
8249
  }, $ = f.find((E) => E.type === "banner"), A = f.filter((E) => E.type !== "banner");
8261
8250
  return /* @__PURE__ */ n(
8262
- oe,
8251
+ ie,
8263
8252
  {
8264
8253
  className: `flex flex-col ${N.card} ${d.wrap}`,
8265
8254
  showCheckbox: a,
8266
8255
  checkboxPosition: s,
8267
- onSelect: o,
8256
+ onSelect: i,
8268
8257
  identity: l,
8269
8258
  details: { type: "alerts", title: m, count: f.length },
8270
8259
  ...g,
@@ -8389,7 +8378,7 @@ const bl = [
8389
8378
  }
8390
8379
  };
8391
8380
  function yl({ video: t, sizeMeta: a }) {
8392
- const [s, o] = L(!1);
8381
+ const [s, i] = L(!1);
8393
8382
  return /* @__PURE__ */ n("div", { className: "group cursor-pointer", children: [
8394
8383
  /* @__PURE__ */ n("div", { className: `relative ${a.thumbnailHeight} rounded-lg overflow-hidden bg-zinc-200 dark:bg-zinc-800`, children: [
8395
8384
  /* @__PURE__ */ e(
@@ -8425,22 +8414,22 @@ function xl({
8425
8414
  size: t = "md",
8426
8415
  showCheckbox: a = !1,
8427
8416
  checkboxPosition: s = "top-left",
8428
- onSelect: o,
8417
+ onSelect: i,
8429
8418
  identity: l = "_id",
8430
8419
  title: m = "Videos",
8431
- videos: i = bl,
8420
+ videos: o = bl,
8432
8421
  ...u
8433
8422
  }) {
8434
- const [g, f] = L(!1), x = ie(t), r = ce[x], N = fl[x];
8423
+ const [g, f] = L(!1), x = oe(t), r = ce[x], N = fl[x];
8435
8424
  return /* @__PURE__ */ n(
8436
- oe,
8425
+ ie,
8437
8426
  {
8438
8427
  className: `flex flex-col ${r.card} ${N.wrap}`,
8439
8428
  showCheckbox: a,
8440
8429
  checkboxPosition: s,
8441
- onSelect: o,
8430
+ onSelect: i,
8442
8431
  identity: l,
8443
- details: { type: "videos", title: m, count: i.length },
8432
+ details: { type: "videos", title: m, count: o.length },
8444
8433
  ...u,
8445
8434
  children: [
8446
8435
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between ", children: [
@@ -8465,7 +8454,7 @@ function xl({
8465
8454
  ] })
8466
8455
  ] })
8467
8456
  ] }),
8468
- /* @__PURE__ */ e("div", { className: `grid ${N.gridCols} gap-4 `, children: i.slice(0, N.gridCols === "grid-cols-3" ? 6 : 4).map((d) => /* @__PURE__ */ e(
8457
+ /* @__PURE__ */ e("div", { className: `grid ${N.gridCols} gap-4 `, children: o.slice(0, N.gridCols === "grid-cols-3" ? 6 : 4).map((d) => /* @__PURE__ */ e(
8469
8458
  yl,
8470
8459
  {
8471
8460
  video: d,
@@ -8502,7 +8491,7 @@ xl.propTypes = {
8502
8491
  export {
8503
8492
  rl as AccountSummaryMock,
8504
8493
  Ds as ActivityMock,
8505
- os as AddUserGroupsRolesModal,
8494
+ is as AddUserGroupsRolesModal,
8506
8495
  gl as AlertsMock,
8507
8496
  Ce as Avatar,
8508
8497
  kn as AvatarGroup,
@@ -8512,7 +8501,7 @@ export {
8512
8501
  js as CampusMapMock,
8513
8502
  da as Checkbox,
8514
8503
  Es as CommunitiesMock,
8515
- eo as CustomDataGrid,
8504
+ ei as CustomDataGrid,
8516
8505
  Wl as CustomDialog,
8517
8506
  Kl as CustomGridToolbar,
8518
8507
  Xl as CustomTab,
@@ -8521,7 +8510,7 @@ export {
8521
8510
  el as DirectoryMock,
8522
8511
  cl as DriveMock,
8523
8512
  zs as DynamicConfig,
8524
- Gs as EventsMock,
8513
+ qs as EventsMock,
8525
8514
  El as FileUploadModal,
8526
8515
  Ql as FullConfigPage,
8527
8516
  Il as FullScreenLoader,
@@ -8531,7 +8520,7 @@ export {
8531
8520
  sl as LeaveBalanceMock,
8532
8521
  Da as ManageCollectionList,
8533
8522
  In as Modal,
8534
- rt as MultiSelect,
8523
+ at as MultiSelect,
8535
8524
  Ps as NewsMock,
8536
8525
  Xs as O365MailsMock,
8537
8526
  _n as OptionsMenu,
@@ -8541,7 +8530,7 @@ export {
8541
8530
  ha as RadioGroup,
8542
8531
  he as SearchBar,
8543
8532
  ft as Select,
8544
- oe as SelectableCard,
8533
+ ie as SelectableCard,
8545
8534
  Pl as Sidebar,
8546
8535
  ga as Spinner,
8547
8536
  ba as Textarea,
@@ -8553,10 +8542,10 @@ export {
8553
8542
  xl as VideosMock,
8554
8543
  Ll as WizardModal,
8555
8544
  wa as adGroupsListSearchApi,
8556
- ql as axiosDelete,
8557
- _e as axiosGet,
8558
- Gl as axiosPatch,
8559
- Le as axiosPost,
8545
+ Gl as axiosDelete,
8546
+ Ve as axiosGet,
8547
+ ql as axiosPatch,
8548
+ Ze as axiosPost,
8560
8549
  Qn as axiosPut,
8561
8550
  _l as cookies,
8562
8551
  Hn as createHttpClient,
@@ -8564,12 +8553,12 @@ export {
8564
8553
  Wn as filePermissionsApi,
8565
8554
  va as gateWayUrl,
8566
8555
  ze as gatewayBase,
8567
- at as getBaseUrl,
8556
+ tt as getBaseUrl,
8568
8557
  Ul as getSnapshot,
8569
8558
  Yl as http,
8570
- Gn as localStore,
8559
+ qn as localStore,
8571
8560
  wt as myDriveGatewayBaseV2,
8572
- ie as normalizeSize,
8561
+ oe as normalizeSize,
8573
8562
  Ie as notify,
8574
8563
  ka as provisioningBase,
8575
8564
  Ca as rbacBase,