unifyedx-storybook-new 0.2.76 → 0.2.78

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.
@@ -15,8 +15,8 @@ const wn = (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
  }, kn = (t) => {
18
- const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = wn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, u = 86 + (i >>> 24) % 8, h = `hsl(${l}, ${m}%, ${u}%)`, N = `hsl(${l}, ${m}%, ${o}%)`;
19
- return { bg: h, text: N };
18
+ const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = wn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, h = 86 + (i >>> 24) % 8, u = `hsl(${l}, ${m}%, ${h}%)`, N = `hsl(${l}, ${m}%, ${o}%)`;
19
+ return { bg: u, text: N };
20
20
  }, Cn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), we = ({
21
21
  src: t,
22
22
  name: a,
@@ -29,14 +29,14 @@ const wn = (t) => {
29
29
  className: m,
30
30
  ...o
31
31
  }) => {
32
- const [u, h] = B(!1), N = ae(() => kn(a), []), y = t && !u, r = !y && a, v = !y && !a, d = H(
32
+ const [h, u] = B(!1), N = ae(() => kn(a), []), y = t && !h, r = !y && a, v = !y && !a, d = H(
33
33
  "avatar-container",
34
34
  `avatar--size-${s}`,
35
35
  m
36
- ), p = y ? "transparent" : i || N.bg, z = l || N.text;
36
+ ), g = y ? "transparent" : i || N.bg, D = l || N.text;
37
37
  return /* @__PURE__ */ n("div", { className: d, style: {
38
- backgroundColor: p,
39
- color: z
38
+ backgroundColor: g,
39
+ color: D
40
40
  }, ...o, children: [
41
41
  y && /* @__PURE__ */ e(
42
42
  "img",
@@ -44,7 +44,7 @@ const wn = (t) => {
44
44
  src: t,
45
45
  alt: a || "User avatar",
46
46
  className: "avatar-image",
47
- onError: () => h(!0)
47
+ onError: () => u(!0)
48
48
  }
49
49
  ),
50
50
  r && /* @__PURE__ */ e("span", { className: "avatar-initials", "aria-label": a, children: Cn(a) }),
@@ -71,21 +71,21 @@ const wn = (t) => {
71
71
  onRemove: l,
72
72
  bgColor: m,
73
73
  textColor: o,
74
- className: u,
75
- ...h
74
+ className: h,
75
+ ...u
76
76
  }) => {
77
77
  const N = H(
78
78
  "badge",
79
79
  `badge--variant-${a}`,
80
80
  `badge--size-${s}`,
81
81
  { "badge--with-remove": !!l },
82
- u
82
+ h
83
83
  );
84
84
  return /* @__PURE__ */ n("span", { className: N, style: m && o ? {
85
85
  backgroundColor: m,
86
86
  color: o,
87
87
  borderColor: "#ff0000"
88
- } : {}, ...h, children: [
88
+ } : {}, ...u, children: [
89
89
  i && /* @__PURE__ */ e(i, { className: "badge-icon" }),
90
90
  /* @__PURE__ */ e("span", { className: "badge-label", children: t }),
91
91
  l && /* @__PURE__ */ e(
@@ -146,21 +146,21 @@ const Dn = {
146
146
  // ✅ Default is now empty
147
147
  loader: m = !1,
148
148
  category: o = "primary",
149
- icon: u,
149
+ icon: h,
150
150
  // Renamed for clarity, expecting a component type e.g., CheckCircle
151
- disabled: h = !1,
151
+ disabled: u = !1,
152
152
  size: N = "medium",
153
153
  label: y,
154
154
  children: r,
155
155
  // ✅ Add children to the props list
156
156
  iconWidth: v,
157
157
  iconHeight: d,
158
- iconColor: p,
159
- strokeWidth: z,
158
+ iconColor: g,
159
+ strokeWidth: D,
160
160
  onClick: F,
161
161
  ...E
162
162
  }) => {
163
- const I = h || m, P = u && !y, j = H(
163
+ const I = u || m, P = h && !y, _ = H(
164
164
  "btn-base",
165
165
  Dn[N],
166
166
  $n[o],
@@ -175,14 +175,14 @@ const Dn = {
175
175
  {
176
176
  "data-testid": t,
177
177
  type: s,
178
- className: j,
178
+ className: _,
179
179
  disabled: I,
180
180
  onClick: F,
181
181
  title: a || P && i || (typeof y == "string" ? y : void 0),
182
182
  "aria-label": i || P && a || (typeof y == "string" ? y : void 0),
183
183
  ...E,
184
184
  children: m ? /* @__PURE__ */ e(ja, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
185
- u && /* @__PURE__ */ e(u, { size: N === "large" ? 20 : 16, width: v || 16, height: d || 16, color: p || "#767676", strokeWidth: z || 2 }),
185
+ h && /* @__PURE__ */ e(h, { size: N === "large" ? 20 : 16, width: v || 16, height: d || 16, color: g || "#767676", strokeWidth: D || 2 }),
186
186
  y,
187
187
  r,
188
188
  " "
@@ -220,9 +220,9 @@ const Dn = {
220
220
  ref: l,
221
221
  checked: m,
222
222
  onChange: o,
223
- ...u
223
+ ...h
224
224
  }) => {
225
- const h = He(), N = a || h;
225
+ const u = He(), N = a || u;
226
226
  return /* @__PURE__ */ n("div", { className: `checkbox-container ${i || ""}`, children: [
227
227
  /* @__PURE__ */ n("label", { htmlFor: N, className: "checkbox-wrapper", children: [
228
228
  /* @__PURE__ */ e(
@@ -234,7 +234,7 @@ const Dn = {
234
234
  className: "checkbox-input",
235
235
  checked: m,
236
236
  onChange: o,
237
- ...u
237
+ ...h
238
238
  }
239
239
  ),
240
240
  /* @__PURE__ */ e(
@@ -260,9 +260,9 @@ const Dn = {
260
260
  label: l,
261
261
  error: m,
262
262
  disabled: o = !1,
263
- className: u,
264
- ...h
265
- }) => /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
263
+ className: h,
264
+ ...u
265
+ }) => /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", h), children: [
266
266
  l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "datepicker-input", children: l }),
267
267
  /* @__PURE__ */ e(
268
268
  ua,
@@ -288,8 +288,8 @@ const Dn = {
288
288
  label: l,
289
289
  error: m,
290
290
  disabled: o = !1,
291
- className: u,
292
- ...h
291
+ className: h,
292
+ ...u
293
293
  }) => {
294
294
  const N = t?.from, y = t?.to, r = (d) => {
295
295
  d.stopPropagation(), d.preventDefault(), s?.();
@@ -298,7 +298,7 @@ const Dn = {
298
298
  " - ",
299
299
  St(y, "MMM d, y")
300
300
  ] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: i });
301
- return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
301
+ return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", h), children: [
302
302
  l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
303
303
  /* @__PURE__ */ n(An, { children: [
304
304
  /* @__PURE__ */ e(Fn, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "datepicker-input-container", children: [
@@ -599,17 +599,17 @@ const Dn = {
599
599
  open: m,
600
600
  // --- Form and File State ---
601
601
  validFiles: o = [],
602
- rejectedFiles: u = [],
603
- handleRemoveValidFile: h,
602
+ rejectedFiles: h = [],
603
+ handleRemoveValidFile: u,
604
604
  handleRemoveRejectedFile: N,
605
605
  handleSubmit: y,
606
606
  isSubmitting: r,
607
607
  formErrors: v,
608
608
  // --- UI Text ---
609
609
  title: d = "Upload Files",
610
- subHeading: p = "Supports PNG, JPG, PDF. Max size: 50MB."
610
+ subHeading: g = "Supports PNG, JPG, PDF. Max size: 50MB."
611
611
  }) => {
612
- const z = o.length > 0 || u.length > 0;
612
+ const D = o.length > 0 || h.length > 0;
613
613
  return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(
614
614
  ye,
615
615
  {
@@ -669,7 +669,7 @@ const Dn = {
669
669
  children: [
670
670
  /* @__PURE__ */ e(Ga, { size: 48, className: "text-gray-400" }),
671
671
  /* @__PURE__ */ e("p", { children: "Drag and drop files here" }),
672
- /* @__PURE__ */ e("p", { className: "sub-heading", children: p }),
672
+ /* @__PURE__ */ e("p", { className: "sub-heading", children: g }),
673
673
  /* @__PURE__ */ e("hr", {}),
674
674
  /* @__PURE__ */ e("p", { children: "OR" }),
675
675
  /* @__PURE__ */ e(
@@ -685,7 +685,7 @@ const Dn = {
685
685
  }
686
686
  ),
687
687
  v.filesToUpload && /* @__PURE__ */ e("p", { className: "form-error-message", children: v.filesToUpload.message }),
688
- z && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
688
+ D && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
689
689
  /* @__PURE__ */ e("h3", { children: "Upload Queue" }),
690
690
  /* @__PURE__ */ n("ul", { className: "file-list", children: [
691
691
  o.map((F, E) => /* @__PURE__ */ n(
@@ -709,7 +709,7 @@ const Dn = {
709
709
  "button",
710
710
  {
711
711
  type: "button",
712
- onClick: () => h(E),
712
+ onClick: () => u(E),
713
713
  className: "remove-file-button",
714
714
  children: /* @__PURE__ */ e(Le, { size: 16 })
715
715
  }
@@ -718,7 +718,7 @@ const Dn = {
718
718
  },
719
719
  `${F.name}-${E}`
720
720
  )),
721
- u.map(({ file: F, message: E }, I) => /* @__PURE__ */ n(
721
+ h.map(({ file: F, message: E }, I) => /* @__PURE__ */ n(
722
722
  "li",
723
723
  {
724
724
  className: "file-item file-item--rejected",
@@ -829,10 +829,10 @@ const Dn = {
829
829
  filterConfig: l = [],
830
830
  initialFormikValues: m,
831
831
  customStyles: o = "",
832
- fetchCreatedOrUpdatedByUsers: u = async () => []
832
+ fetchCreatedOrUpdatedByUsers: h = async () => []
833
833
  // Mockable fetcher
834
834
  }) => {
835
- const [h, N] = B({
835
+ const [u, N] = B({
836
836
  createdBy: [],
837
837
  updatedBy: []
838
838
  }), [y, r] = B({
@@ -840,7 +840,7 @@ const Dn = {
840
840
  updatedBy: !1
841
841
  }), [v, d] = B({
842
842
  startDate: null
843
- }), [p, z] = B({
843
+ }), [g, D] = B({
844
844
  endDate: null
845
845
  }), F = qa({
846
846
  initialValues: JSON.parse(JSON.stringify(m)),
@@ -881,10 +881,10 @@ const Dn = {
881
881
  if (!b || !S) return !1;
882
882
  const O = b instanceof Date ? b : new Date(b), R = S instanceof Date ? S : new Date(S);
883
883
  return O > R;
884
- }), [l, F.values]), j = async ($, x) => {
884
+ }), [l, F.values]), _ = async ($, x) => {
885
885
  try {
886
886
  r((S) => ({ ...S, [$]: !0 }));
887
- const b = await u($, x);
887
+ const b = await h($, x);
888
888
  N((S) => ({ ...S, [$]: b }));
889
889
  } catch (b) {
890
890
  console.error(`Error fetching ${$} users:`, b);
@@ -893,7 +893,7 @@ const Dn = {
893
893
  }
894
894
  }, U = ($) => {
895
895
  const x = l[$].key, b = l[$].url;
896
- l[$].type === "multiselect-users" && h[x].length === 0 && !y[x] && j(x, b);
896
+ l[$].type === "multiselect-users" && u[x].length === 0 && !y[x] && _(x, b);
897
897
  }, Y = () => {
898
898
  F.resetForm(), N({ createdBy: [], updatedBy: [] }), i();
899
899
  }, q = ($) => {
@@ -965,7 +965,7 @@ const Dn = {
965
965
  ] })
966
966
  ] });
967
967
  case "multiselect-users":
968
- const O = h[$] || [], R = y[$];
968
+ const O = u[$] || [], R = y[$];
969
969
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
970
970
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
971
971
  /* @__PURE__ */ e("label", { className: "filter-label", children: "Operator:" }),
@@ -1038,9 +1038,9 @@ const Dn = {
1038
1038
  ] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
1039
1039
  ] });
1040
1040
  case "date":
1041
- const D = b.values || [], [f, g] = D, w = f && g, k = D[0] || null, T = D[1] || null, L = {
1042
- startDate: k instanceof Date ? k.toISOString().slice(0, 10) : null,
1043
- endDate: k instanceof Date ? k.toISOString().slice(0, 10) : null
1041
+ const z = b.values || [], [f, p] = z, k = f && p, w = z[0] || null, T = z[1] || null, L = {
1042
+ startDate: w instanceof Date ? w.toISOString().slice(0, 10) : null,
1043
+ endDate: w instanceof Date ? w.toISOString().slice(0, 10) : null
1044
1044
  }, C = {
1045
1045
  startDate: T instanceof Date ? T.toISOString().slice(0, 10) : null,
1046
1046
  endDate: T instanceof Date ? T.toISOString().slice(0, 10) : null
@@ -1052,7 +1052,7 @@ const Dn = {
1052
1052
  { key: "this_month", label: "This Month" },
1053
1053
  { key: "last_month", label: "Last Month" },
1054
1054
  { key: "custom", label: "Custom" }
1055
- ], _ = (A) => {
1055
+ ], V = (A) => {
1056
1056
  if (A === "anytime") {
1057
1057
  F.setFieldValue(`${$}.values`, []), F.setFieldValue(`${$}.range`, "anytime");
1058
1058
  return;
@@ -1076,7 +1076,7 @@ const Dn = {
1076
1076
  children: x.operators.map((A) => /* @__PURE__ */ e("option", { value: A, children: A === "in" ? "Is" : "Is not" }, A))
1077
1077
  }
1078
1078
  ),
1079
- w && /* @__PURE__ */ e(
1079
+ k && /* @__PURE__ */ e(
1080
1080
  "button",
1081
1081
  {
1082
1082
  type: "button",
@@ -1104,7 +1104,7 @@ const Dn = {
1104
1104
  type: "radio",
1105
1105
  name: `preset-${$}`,
1106
1106
  checked: G,
1107
- onChange: () => _(A.key),
1107
+ onChange: () => V(A.key),
1108
1108
  className: "h-4 w-4"
1109
1109
  }
1110
1110
  ),
@@ -1126,7 +1126,7 @@ const Dn = {
1126
1126
  useRange: !1,
1127
1127
  value: L,
1128
1128
  onChange: (A) => {
1129
- const G = A?.startDate ? Ve(new Date(A.startDate)) : null, W = D[1] || null;
1129
+ const G = A?.startDate ? Ve(new Date(A.startDate)) : null, W = z[1] || null;
1130
1130
  G && (F.setFieldValue(`${$}.values`, [G, W]), F.setFieldValue(`${$}.range`, "custom"));
1131
1131
  },
1132
1132
  inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
@@ -1150,7 +1150,7 @@ const Dn = {
1150
1150
  useRange: !1,
1151
1151
  value: C,
1152
1152
  onChange: (A) => {
1153
- const G = A?.startDate ? je(new Date(A.startDate)) : null, W = D[0] || null;
1153
+ const G = A?.startDate ? je(new Date(A.startDate)) : null, W = z[0] || null;
1154
1154
  G && (F.setFieldValue(`${$}.values`, [W, G]), F.setFieldValue(`${$}.range`, "custom"));
1155
1155
  },
1156
1156
  inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
@@ -1164,7 +1164,7 @@ const Dn = {
1164
1164
  }
1165
1165
  )
1166
1166
  ] }),
1167
- k && T && k > T && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
1167
+ w && T && w > T && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
1168
1168
  ] })
1169
1169
  ] });
1170
1170
  default:
@@ -1291,24 +1291,24 @@ const Dn = {
1291
1291
  className: m,
1292
1292
  ref: o,
1293
1293
  // ✅ 'ref' is now received directly as a prop
1294
- ...u
1294
+ ...h
1295
1295
  }) => {
1296
- const h = a || u.name;
1296
+ const u = a || h.name;
1297
1297
  return /* @__PURE__ */ n("div", { className: `input-wrapper ${m || ""}`, children: [
1298
- t && /* @__PURE__ */ e("label", { htmlFor: h, className: "input-label", children: t }),
1298
+ t && /* @__PURE__ */ e("label", { htmlFor: u, className: "input-label", children: t }),
1299
1299
  /* @__PURE__ */ n("div", { className: "input-field-container", children: [
1300
1300
  i && /* @__PURE__ */ e(i, { className: "input-icon", size: 20 }),
1301
1301
  /* @__PURE__ */ e(
1302
1302
  "input",
1303
1303
  {
1304
- id: h,
1304
+ id: u,
1305
1305
  type: s,
1306
1306
  ref: o,
1307
1307
  className: H("input-field", {
1308
1308
  "input-field--error": !!l,
1309
1309
  "input-field--with-icon": !!i
1310
1310
  }),
1311
- ...u
1311
+ ...h
1312
1312
  }
1313
1313
  )
1314
1314
  ] }),
@@ -1344,8 +1344,8 @@ const Dn = {
1344
1344
  // No default
1345
1345
  variant: o = "info",
1346
1346
  // 'info', 'warning', 'delete'
1347
- loading: u = !1,
1348
- buttonProps: h = {},
1347
+ loading: h = !1,
1348
+ buttonProps: u = {},
1349
1349
  size: N
1350
1350
  // Add size prop
1351
1351
  }) => {
@@ -1402,7 +1402,7 @@ const Dn = {
1402
1402
  type: "button",
1403
1403
  onClick: v,
1404
1404
  label: l,
1405
- ...h
1405
+ ...u
1406
1406
  }
1407
1407
  )
1408
1408
  ] })
@@ -1418,14 +1418,14 @@ const Dn = {
1418
1418
  onItemsPerPageChange: l,
1419
1419
  itemsPerPageOptions: m = [10, 15, 20]
1420
1420
  }) => {
1421
- const o = Math.ceil(a / s), [u, h] = B(t);
1421
+ const o = Math.ceil(a / s), [h, u] = B(t);
1422
1422
  Z(() => {
1423
- h(t);
1423
+ u(t);
1424
1424
  }, [t]);
1425
1425
  const N = Math.min((t - 1) * s + 1, a), y = Math.min(t * s, a), r = (v) => {
1426
1426
  v.preventDefault();
1427
- let d = parseInt(u, 10);
1428
- isNaN(d) || d < 1 ? d = 1 : d > o && (d = o), h(d), d !== t && i(d);
1427
+ let d = parseInt(h, 10);
1428
+ isNaN(d) || d < 1 ? d = 1 : d > o && (d = o), u(d), d !== t && i(d);
1429
1429
  };
1430
1430
  return /* @__PURE__ */ n("div", { className: "pagination-container", children: [
1431
1431
  /* @__PURE__ */ n("div", { className: "pagination-left", children: [
@@ -1475,8 +1475,8 @@ const Dn = {
1475
1475
  {
1476
1476
  type: "number",
1477
1477
  className: "page-input",
1478
- value: u,
1479
- onChange: (v) => h(v.target.value),
1478
+ value: h,
1479
+ onChange: (v) => u(v.target.value),
1480
1480
  onBlur: r,
1481
1481
  "aria-label": `Current page, Page ${t}`
1482
1482
  }
@@ -1527,12 +1527,12 @@ const Dn = {
1527
1527
  Ue.Option,
1528
1528
  {
1529
1529
  value: o.value,
1530
- className: ({ active: u, checked: h }) => H("radiogroup-option", {
1531
- "radiogroup-option--active": u,
1532
- "radiogroup-option--checked": h,
1530
+ className: ({ active: h, checked: u }) => H("radiogroup-option", {
1531
+ "radiogroup-option--active": h,
1532
+ "radiogroup-option--checked": u,
1533
1533
  "radiogroup-option--error": !!l
1534
1534
  }),
1535
- children: ({ checked: u }) => /* @__PURE__ */ n(te, { children: [
1535
+ children: ({ checked: h }) => /* @__PURE__ */ n(te, { children: [
1536
1536
  /* @__PURE__ */ n("div", { className: "radiogroup-option-content", children: [
1537
1537
  /* @__PURE__ */ e(Ue.Label, { as: "p", className: "option-label", children: o.label }),
1538
1538
  o.description && /* @__PURE__ */ e(
@@ -1544,7 +1544,7 @@ const Dn = {
1544
1544
  }
1545
1545
  )
1546
1546
  ] }),
1547
- u && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Ht, { size: 20 }) })
1547
+ h && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Ht, { size: 20 }) })
1548
1548
  ] })
1549
1549
  },
1550
1550
  o.value
@@ -1561,8 +1561,8 @@ const Dn = {
1561
1561
  // Added a default label for accessibility
1562
1562
  customClass: m = "",
1563
1563
  inputStyle: o = {},
1564
- placeholderClass: u = "",
1565
- searchIconSize: h = 16,
1564
+ placeholderClass: h = "",
1565
+ searchIconSize: u = 16,
1566
1566
  searchIconClass: N = "",
1567
1567
  ...y
1568
1568
  }) => {
@@ -1571,30 +1571,30 @@ const Dn = {
1571
1571
  v(t);
1572
1572
  }, [t]);
1573
1573
  const d = ee(
1574
- Zr((z) => {
1575
- a?.(z);
1574
+ Zr((D) => {
1575
+ a?.(D);
1576
1576
  }, s),
1577
1577
  [s, a]
1578
1578
  );
1579
1579
  Z(() => (r !== t && d(r), () => {
1580
1580
  d.cancel();
1581
1581
  }), [r, d, t]);
1582
- const p = (z) => {
1583
- v(z.target.value);
1582
+ const g = (D) => {
1583
+ v(D.target.value);
1584
1584
  };
1585
1585
  return /* @__PURE__ */ n("div", { className: `search-bar-wrapper ${m}`, children: [
1586
1586
  l && /* @__PURE__ */ e("label", { htmlFor: "search-field", className: "sr-only", children: l }),
1587
- /* @__PURE__ */ e("div", { className: "search-bar-icon-wrapper", children: /* @__PURE__ */ e(vt, { size: h || 16, className: `search-bar-icon ${N}`, "aria-hidden": "true" }) }),
1587
+ /* @__PURE__ */ e("div", { className: "search-bar-icon-wrapper", children: /* @__PURE__ */ e(vt, { size: u || 16, className: `search-bar-icon ${N}`, "aria-hidden": "true" }) }),
1588
1588
  /* @__PURE__ */ e(
1589
1589
  "input",
1590
1590
  {
1591
1591
  id: "search-field",
1592
- className: `search-bar-input ${u}`,
1592
+ className: `search-bar-input ${h}`,
1593
1593
  placeholder: i,
1594
1594
  type: "search",
1595
1595
  name: "search",
1596
1596
  value: r,
1597
- onChange: p,
1597
+ onChange: g,
1598
1598
  style: o,
1599
1599
  ...y
1600
1600
  }
@@ -1610,9 +1610,9 @@ const Dn = {
1610
1610
  placeholder: l = "Select an option...",
1611
1611
  disabled: m = !1,
1612
1612
  error: o,
1613
- ref: u,
1613
+ ref: h,
1614
1614
  // From RHF's <Controller>
1615
- showSearch: h = !0
1615
+ showSearch: u = !0
1616
1616
  }) => {
1617
1617
  const [N, y] = B("");
1618
1618
  console.log("Select component - value:", a, "type:", typeof a), console.log("Select component - options:", i);
@@ -1627,7 +1627,7 @@ const Dn = {
1627
1627
  }
1628
1628
  return d.id === a || d.value === a || d.label === a;
1629
1629
  });
1630
- return /* @__PURE__ */ e(K, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: u, children: [
1630
+ return /* @__PURE__ */ e(K, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: h, children: [
1631
1631
  t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
1632
1632
  /* @__PURE__ */ n("div", { className: "select-button-container", children: [
1633
1633
  /* @__PURE__ */ n(
@@ -1649,7 +1649,7 @@ const Dn = {
1649
1649
  leaveFrom: "opacity-100",
1650
1650
  leaveTo: "opacity-0",
1651
1651
  children: /* @__PURE__ */ n(Ur, { className: "select-options", children: [
1652
- h && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
1652
+ u && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
1653
1653
  ge,
1654
1654
  {
1655
1655
  onKeyDown: (d) => {
@@ -1663,20 +1663,20 @@ const Dn = {
1663
1663
  /* @__PURE__ */ e("div", { className: "select-options-list", children: r.length === 0 && N !== "" ? /* @__PURE__ */ e("div", { className: "no-results", children: "No results found." }) : r.map((d) => /* @__PURE__ */ e(
1664
1664
  Gr,
1665
1665
  {
1666
- className: ({ active: p }) => `select-option ${p ? "active" : ""}`,
1666
+ className: ({ active: g }) => `select-option ${g ? "active" : ""}`,
1667
1667
  value: d,
1668
- children: ({ selected: p }) => /* @__PURE__ */ n(te, { children: [
1668
+ children: ({ selected: g }) => /* @__PURE__ */ n(te, { children: [
1669
1669
  /* @__PURE__ */ n("div", { className: "option-content", children: [
1670
1670
  d.icon && /* @__PURE__ */ e(d.icon, { className: "option-icon" }),
1671
1671
  /* @__PURE__ */ e(
1672
1672
  "span",
1673
1673
  {
1674
- className: `option-label ${p ? "selected" : ""}`,
1674
+ className: `option-label ${g ? "selected" : ""}`,
1675
1675
  children: d.label
1676
1676
  }
1677
1677
  )
1678
1678
  ] }),
1679
- p ? /* @__PURE__ */ e(
1679
+ g ? /* @__PURE__ */ e(
1680
1680
  et,
1681
1681
  {
1682
1682
  className: "option-check-icon",
@@ -1709,11 +1709,11 @@ const Dn = {
1709
1709
  return s;
1710
1710
  return null;
1711
1711
  }, ga = ({ item: t, isCollapsed: a, level: s = 0 }) => {
1712
- const { pathname: i } = Bn(), l = t.href || t.url || t.path, [m, o] = B(!1), u = t.icon;
1712
+ const { pathname: i } = Bn(), l = t.href || t.url || t.path, [m, o] = B(!1), h = t.icon;
1713
1713
  Z(() => {
1714
1714
  yt([t], i) && o(!0);
1715
1715
  }, [t, i]);
1716
- const h = i === l, N = !h && !!yt([t], i), y = (r) => {
1716
+ const u = i === l, N = !u && !!yt([t], i), y = (r) => {
1717
1717
  r.preventDefault(), o(!m);
1718
1718
  };
1719
1719
  return /* @__PURE__ */ n(
@@ -1731,12 +1731,12 @@ const Dn = {
1731
1731
  target: t.target,
1732
1732
  rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
1733
1733
  className: H("nav-item", {
1734
- "nav-item--active": h,
1734
+ "nav-item--active": u,
1735
1735
  "nav-item--collapsed": a
1736
1736
  }),
1737
- "aria-current": h ? "page" : void 0,
1737
+ "aria-current": u ? "page" : void 0,
1738
1738
  children: [
1739
- u && /* @__PURE__ */ e(u, { className: "nav-icon", "aria-hidden": "true" }),
1739
+ h && /* @__PURE__ */ e(h, { className: "nav-icon", "aria-hidden": "true" }),
1740
1740
  /* @__PURE__ */ e("span", { className: "nav-label", children: t.label || t.name }),
1741
1741
  t.children && /* @__PURE__ */ e(
1742
1742
  "button",
@@ -1788,7 +1788,7 @@ const Dn = {
1788
1788
  onToggleMobile: l,
1789
1789
  logoSmall: m,
1790
1790
  logoLarge: o,
1791
- user: u = { name: "", email: "" }
1791
+ user: h = { name: "", email: "" }
1792
1792
  }) => /* @__PURE__ */ n(te, { children: [
1793
1793
  i && /* @__PURE__ */ e(
1794
1794
  "div",
@@ -1831,12 +1831,12 @@ const Dn = {
1831
1831
  }
1832
1832
  )
1833
1833
  ] }),
1834
- /* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((h) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(ga, { item: h, isCollapsed: a }) }, h.label || h.name)) }) }),
1834
+ /* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((u) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(ga, { item: u, isCollapsed: a }) }, u.label || u.name)) }) }),
1835
1835
  /* @__PURE__ */ n("div", { className: "sidebar-footer", children: [
1836
- /* @__PURE__ */ e(we, { src: u.avatar, name: u.name, size: "medium" }),
1836
+ /* @__PURE__ */ e(we, { src: h.avatar, name: h.name, size: "medium" }),
1837
1837
  /* @__PURE__ */ n("div", { className: "user-info", children: [
1838
- /* @__PURE__ */ e("span", { className: "user-name", children: u.name }),
1839
- /* @__PURE__ */ e("span", { className: "user-email", children: u.email })
1838
+ /* @__PURE__ */ e("span", { className: "user-name", children: h.name }),
1839
+ /* @__PURE__ */ e("span", { className: "user-email", children: h.email })
1840
1840
  ] }),
1841
1841
  /* @__PURE__ */ e(
1842
1842
  "button",
@@ -1897,16 +1897,16 @@ const Dn = {
1897
1897
  // ✅ New prop for max length
1898
1898
  showCharCount: o = !1,
1899
1899
  // ✅ New prop to control visibility
1900
- ...u
1900
+ ...h
1901
1901
  }) => {
1902
- const h = a || u.name, [N, y] = B(
1903
- u.value?.length || u.defaultValue?.length || 0
1902
+ const u = a || h.name, [N, y] = B(
1903
+ h.value?.length || h.defaultValue?.length || 0
1904
1904
  ), r = (d) => {
1905
- y(d.target.value.length), u.onChange && u.onChange(d);
1905
+ y(d.target.value.length), h.onChange && h.onChange(d);
1906
1906
  }, v = m - N;
1907
1907
  return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${i || ""}`, children: [
1908
1908
  /* @__PURE__ */ n("div", { className: "textarea-header", children: [
1909
- t && /* @__PURE__ */ e("label", { htmlFor: h, className: "textarea-label", children: t }),
1909
+ t && /* @__PURE__ */ e("label", { htmlFor: u, className: "textarea-label", children: t }),
1910
1910
  o && m && /* @__PURE__ */ n("span", { className: "char-counter", children: [
1911
1911
  v,
1912
1912
  " characters remaining"
@@ -1915,14 +1915,14 @@ const Dn = {
1915
1915
  /* @__PURE__ */ e(
1916
1916
  "textarea",
1917
1917
  {
1918
- id: h,
1918
+ id: u,
1919
1919
  ref: l,
1920
1920
  className: H("textarea-field", {
1921
1921
  "textarea-field--error": !!s
1922
1922
  }),
1923
1923
  maxLength: m,
1924
1924
  onChange: r,
1925
- ...u
1925
+ ...h
1926
1926
  }
1927
1927
  ),
1928
1928
  s && /* @__PURE__ */ e("p", { className: "textarea-error-message", children: s })
@@ -1967,13 +1967,13 @@ const Dn = {
1967
1967
  // For external styling of the tooltip itself
1968
1968
  ...o
1969
1969
  }) => {
1970
- const u = re.useId();
1970
+ const h = re.useId();
1971
1971
  return /* @__PURE__ */ n(te, { children: [
1972
- re.cloneElement(t, { "data-tooltip-id": u }),
1972
+ re.cloneElement(t, { "data-tooltip-id": h }),
1973
1973
  /* @__PURE__ */ e(
1974
1974
  Qa,
1975
1975
  {
1976
- id: u,
1976
+ id: h,
1977
1977
  content: a,
1978
1978
  place: l,
1979
1979
  variant: s,
@@ -2003,11 +2003,11 @@ const Dn = {
2003
2003
  direction: l = 1,
2004
2004
  stepProps: m = {},
2005
2005
  title: o,
2006
- description: u,
2007
- showProgress: h = !0,
2006
+ description: h,
2007
+ showProgress: u = !0,
2008
2008
  closeOnOverlayClick: N = !0
2009
2009
  }) => {
2010
- const y = s[i], r = Object.keys(s), v = r.indexOf(i), d = (v + 1) / r.length * 100, p = v > 0 && m.onBack;
2010
+ const y = s[i], r = Object.keys(s), v = r.indexOf(i), d = (v + 1) / r.length * 100, g = v > 0 && m.onBack;
2011
2011
  return /* @__PURE__ */ e(he, { show: t, as: Q, children: /* @__PURE__ */ n(
2012
2012
  ye,
2013
2013
  {
@@ -2042,7 +2042,7 @@ const Dn = {
2042
2042
  children: /* @__PURE__ */ n(Fe, { className: "wizard-panel", children: [
2043
2043
  /* @__PURE__ */ n("header", { className: "wizard-header", children: [
2044
2044
  /* @__PURE__ */ n("div", { className: "wizard-header-content", children: [
2045
- p && /* @__PURE__ */ e(
2045
+ g && /* @__PURE__ */ e(
2046
2046
  "button",
2047
2047
  {
2048
2048
  onClick: m.onBack,
@@ -2053,7 +2053,7 @@ const Dn = {
2053
2053
  ),
2054
2054
  /* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
2055
2055
  /* @__PURE__ */ e(ye.Title, { as: "h3", className: "wizard-title", children: o }),
2056
- u && /* @__PURE__ */ e(ye.Description, { className: "wizard-description", children: u })
2056
+ h && /* @__PURE__ */ e(ye.Description, { className: "wizard-description", children: h })
2057
2057
  ] })
2058
2058
  ] }),
2059
2059
  /* @__PURE__ */ e(
@@ -2066,7 +2066,7 @@ const Dn = {
2066
2066
  }
2067
2067
  )
2068
2068
  ] }),
2069
- h && /* @__PURE__ */ e("div", { className: "wizard-progress-container", children: /* @__PURE__ */ e(
2069
+ u && /* @__PURE__ */ e("div", { className: "wizard-progress-container", children: /* @__PURE__ */ e(
2070
2070
  "div",
2071
2071
  {
2072
2072
  className: "wizard-progress-bar",
@@ -2123,18 +2123,18 @@ const Dn = {
2123
2123
  category: m = "secondary",
2124
2124
  icon: o,
2125
2125
  // Renamed for clarity, expecting a component type e.g., CheckCircle
2126
- disabled: u = !1,
2127
- size: h = "small",
2126
+ disabled: h = !1,
2127
+ size: u = "small",
2128
2128
  label: N,
2129
2129
  children: y,
2130
2130
  // ✅ Add children to the props list
2131
2131
  onClick: r,
2132
2132
  ...v
2133
2133
  }) => {
2134
- const d = u, p = H(
2134
+ const d = h, g = H(
2135
2135
  "btn-base-icon",
2136
2136
  "btn-icon-only",
2137
- jn[h],
2137
+ jn[u],
2138
2138
  _n[m],
2139
2139
  l
2140
2140
  );
@@ -2143,13 +2143,13 @@ const Dn = {
2143
2143
  {
2144
2144
  "data-testid": t,
2145
2145
  type: s,
2146
- className: p,
2146
+ className: g,
2147
2147
  disabled: d,
2148
2148
  onClick: r,
2149
2149
  title: i,
2150
2150
  "aria-label": i,
2151
2151
  ...v,
2152
- children: o && /* @__PURE__ */ e(o, { size: h === "large" ? 20 : 16 })
2152
+ children: o && /* @__PURE__ */ e(o, { size: u === "large" ? 20 : 16 })
2153
2153
  }
2154
2154
  );
2155
2155
  }, jl = ({
@@ -2162,7 +2162,7 @@ const Dn = {
2162
2162
  // fullHeight = false,
2163
2163
  ...o
2164
2164
  }) => {
2165
- const u = H(
2165
+ const h = H(
2166
2166
  "page-layout",
2167
2167
  {
2168
2168
  "page-layout--with-footer": a
@@ -2170,7 +2170,7 @@ const Dn = {
2170
2170
  },
2171
2171
  o.className
2172
2172
  );
2173
- return /* @__PURE__ */ n("div", { className: u, ...o, children: [
2173
+ return /* @__PURE__ */ n("div", { className: h, ...o, children: [
2174
2174
  /* @__PURE__ */ e("div", { className: "page-layout-content", children: t }),
2175
2175
  a && /* @__PURE__ */ e("footer", { className: "page-layout-footer", children: s || /* @__PURE__ */ n("div", { className: "footer-actions", children: [
2176
2176
  m?.show && /* @__PURE__ */ e(
@@ -2425,13 +2425,13 @@ function Ot() {
2425
2425
  }
2426
2426
  function Zn(t) {
2427
2427
  if (t && t.isAxiosError) {
2428
- 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;
2428
+ const { response: a, config: s, message: i } = t, l = a?.status ?? null, m = a?.statusText ?? null, o = a?.data ?? null, h = typeof o == "string" && o || o?.message || o?.msg || o?.error || o?.errors?.[0]?.message || null;
2429
2429
  return {
2430
2430
  ok: !1,
2431
2431
  status: l,
2432
2432
  statusText: m,
2433
2433
  code: o?.code || null,
2434
- message: u || i || "Request failed",
2434
+ message: h || i || "Request failed",
2435
2435
  details: o || null,
2436
2436
  request: {
2437
2437
  url: s?.url || null,
@@ -2492,10 +2492,10 @@ function Kn({
2492
2492
  async function o(N, y = {}, r = !1, v = {}) {
2493
2493
  return s.post(N, y, i({ open: r, customHeader: v }));
2494
2494
  }
2495
- async function u(N, y = {}, r = !1, v = {}) {
2495
+ async function h(N, y = {}, r = !1, v = {}) {
2496
2496
  return s.put(N, y, i({ open: r, customHeader: v }));
2497
2497
  }
2498
- async function h(N, y = {}, r = !1, v = {}) {
2498
+ async function u(N, y = {}, r = !1, v = {}) {
2499
2499
  return s.patch(N, y, i({ open: r, customHeader: v }));
2500
2500
  }
2501
2501
  return {
@@ -2504,8 +2504,8 @@ function Kn({
2504
2504
  axiosGet: l,
2505
2505
  axiosDelete: m,
2506
2506
  axiosPost: o,
2507
- axiosPut: u,
2508
- axiosPatch: h
2507
+ axiosPut: h,
2508
+ axiosPatch: u
2509
2509
  };
2510
2510
  }
2511
2511
  const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl = Ee.axiosPut, Wl = Ee.axiosPatch, Jl = Ee.instance, es = async (t, a) => {
@@ -2615,9 +2615,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2615
2615
  }) => {
2616
2616
  const l = t.slice(0, 2), m = [];
2617
2617
  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);
2618
- const o = t.length + a.length + s.length, u = o - m.length;
2619
- let h = m.join(", ");
2620
- return u > 0 && (h += ` and ${u} others`), o === 0 ? /* @__PURE__ */ e(
2618
+ const o = t.length + a.length + s.length, h = o - m.length;
2619
+ let u = m.join(", ");
2620
+ return h > 0 && (u += ` and ${h} others`), o === 0 ? /* @__PURE__ */ e(
2621
2621
  "div",
2622
2622
  {
2623
2623
  className: "flex items-center justify-between p-3 border border-dashed border-gray-400 rounded-lg hover:bg-gray-50",
@@ -2640,7 +2640,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2640
2640
  },
2641
2641
  N.id || y
2642
2642
  )) }),
2643
- /* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: h })
2643
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: u })
2644
2644
  ] }),
2645
2645
  /* @__PURE__ */ e(xe, { size: 20 })
2646
2646
  ]
@@ -2664,9 +2664,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2664
2664
  showExistingShares: m = !1,
2665
2665
  onFinalSubmit: o = () => {
2666
2666
  },
2667
- isChanged: u = !1
2667
+ isChanged: h = !1
2668
2668
  }) => {
2669
- const [h, N] = B(Mt[0]), [y, r] = B(""), v = zt(y, 400), [d, p] = B([]), [z, F] = B(/* @__PURE__ */ new Set()), [E, I] = B(!1), [P, j] = B(Lt[0]), {
2669
+ const [u, N] = B(Mt[0]), [y, r] = B(""), v = zt(y, 400), [d, g] = B([]), [D, F] = B(/* @__PURE__ */ new Set()), [E, I] = B(!1), [P, _] = B(Lt[0]), {
2670
2670
  control: U,
2671
2671
  handleSubmit: Y,
2672
2672
  watch: q,
@@ -2677,26 +2677,26 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2677
2677
  }), { fields: b, append: S, remove: O, update: R } = sr({
2678
2678
  control: U,
2679
2679
  name: "pendingInvites"
2680
- }), D = q("pendingInvites");
2680
+ }), z = q("pendingInvites");
2681
2681
  Z(() => {
2682
- v.length > 1 ? (I(!0), es(h.name, v).then((C) => {
2683
- p(C);
2684
- }).catch((C) => console.error("Search failed:", C)).finally(() => I(!1))) : (p([]), F(/* @__PURE__ */ new Set()));
2685
- }, [v, h]);
2682
+ v.length > 1 ? (I(!0), es(u.name, v).then((C) => {
2683
+ g(C);
2684
+ }).catch((C) => console.error("Search failed:", C)).finally(() => I(!1))) : (g([]), F(/* @__PURE__ */ new Set()));
2685
+ }, [v, u]);
2686
2686
  const f = (C) => {
2687
2687
  F((M) => {
2688
- const _ = new Set(M);
2689
- return _.has(C) ? _.delete(C) : _.add(C), _;
2688
+ const V = new Set(M);
2689
+ return V.has(C) ? V.delete(C) : V.add(C), V;
2690
2690
  });
2691
- }, g = () => {
2692
- d.filter((C) => z.has(C.id)).forEach((C) => {
2691
+ }, p = () => {
2692
+ d.filter((C) => D.has(C.id)).forEach((C) => {
2693
2693
  b.find((M) => M.id === C.id) || S({ ...C, permission: P.name });
2694
2694
  }), F(/* @__PURE__ */ new Set()), r("");
2695
- }, w = (C) => {
2696
- j(C), b.forEach(
2697
- (M, _) => R(_, { ...b[_], permission: C.name })
2695
+ }, k = (C) => {
2696
+ _(C), b.forEach(
2697
+ (M, V) => R(V, { ...b[V], permission: C.name })
2698
2698
  );
2699
- }, k = async (C) => {
2699
+ }, w = async (C) => {
2700
2700
  try {
2701
2701
  if (l === ue.DRIVE) {
2702
2702
  const M = C.pendingInvites.map((A) => ({
@@ -2711,13 +2711,13 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2711
2711
  // Always send updated existing shares
2712
2712
  }, i);
2713
2713
  } else if (l === ue.INTEREST) {
2714
- const M = C.pendingInvites.map((_) => ({
2715
- identity: _.id,
2716
- type: _.type.toLowerCase(),
2714
+ const M = C.pendingInvites.map((V) => ({
2715
+ identity: V.id,
2716
+ type: V.type.toLowerCase(),
2717
2717
  opt: !0,
2718
2718
  lock: !1,
2719
2719
  moderator: !1,
2720
- userName: _.name,
2720
+ userName: V.name,
2721
2721
  interestId: t?.data?.id
2722
2722
  }));
2723
2723
  o(M, i);
@@ -2741,7 +2741,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2741
2741
  throw console.error("Failed to submit invites:", M), M;
2742
2742
  }
2743
2743
  }, T = (C) => {
2744
- const M = i[h.code].find((_) => _.name === C.name && _.permission !== "remove") || D.find((_) => _.name === C.name);
2744
+ const M = i[u.code].find((V) => V.name === C.name && V.permission !== "remove") || z.find((V) => V.name === C.name);
2745
2745
  return M ? `${M.permission}` : "";
2746
2746
  }, L = () => {
2747
2747
  switch (l) {
@@ -2755,9 +2755,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2755
2755
  return "Add User, Groups or Roles test";
2756
2756
  }
2757
2757
  };
2758
- return ae(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", D.length), D.length === 0 && !u), [D.length, u]), Z(() => {
2759
- typeof o == "function" && o({ pendingInvites: D }, i);
2760
- }, [D]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2758
+ return ae(() => (console.log("InviteFlow - isChanged:", h, "pendingInvites.length:", z.length), z.length === 0 && !h), [z.length, h]), Z(() => {
2759
+ typeof o == "function" && o({ pendingInvites: z }, i);
2760
+ }, [z]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2761
2761
  /* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
2762
2762
  /* @__PURE__ */ e(ye.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: L() }),
2763
2763
  /* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
@@ -2786,11 +2786,11 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2786
2786
  }
2787
2787
  ),
2788
2788
  /* @__PURE__ */ n("div", { className: "relative grid grid-cols-3 gap-2 items-start", children: [
2789
- /* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(K, { value: h, onChange: N, children: /* @__PURE__ */ n("div", { className: "relative", children: [
2789
+ /* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(K, { value: u, onChange: N, children: /* @__PURE__ */ n("div", { className: "relative", children: [
2790
2790
  /* @__PURE__ */ n(K.Button, { className: "relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
2791
2791
  /* @__PURE__ */ n("span", { className: "flex items-center", children: [
2792
- /* @__PURE__ */ e(h.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
2793
- /* @__PURE__ */ e("span", { className: "truncate", children: h.name })
2792
+ /* @__PURE__ */ e(u.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
2793
+ /* @__PURE__ */ e("span", { className: "truncate", children: u.name })
2794
2794
  ] }),
2795
2795
  /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(mt, { className: "h-5 w-5 text-gray-400" }) })
2796
2796
  ] }),
@@ -2833,7 +2833,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2833
2833
  /* @__PURE__ */ e("div", { className: "col-span-2", children: /* @__PURE__ */ e(
2834
2834
  ge,
2835
2835
  {
2836
- placeholder: `Search by ${h.name.toLowerCase()}...`,
2836
+ placeholder: `Search by ${u.name.toLowerCase()}...`,
2837
2837
  onDebouncedChange: (C) => r(C),
2838
2838
  value: y
2839
2839
  }
@@ -2859,7 +2859,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2859
2859
  "input",
2860
2860
  {
2861
2861
  type: "checkbox",
2862
- checked: z.has(C.id),
2862
+ checked: D.has(C.id),
2863
2863
  readOnly: !0,
2864
2864
  className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
2865
2865
  disabled: !!M
@@ -2868,7 +2868,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2868
2868
  /* @__PURE__ */ e(we, { src: C.avatarUrl, name: C.name, size: "small" }),
2869
2869
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
2870
2870
  /* @__PURE__ */ e("span", { className: "text-md font-medium text-gray-800 truncate", children: C.name }),
2871
- h.name === De.USER && /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: C.id })
2871
+ u.name === De.USER && /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: C.id })
2872
2872
  ] }),
2873
2873
  M ? /* @__PURE__ */ n(te, { children: [
2874
2874
  /* @__PURE__ */ e("span", { className: "text-sm px-3 py-0.5 border border-dashed rounded-xl bg-teal-100 text-teal-700", children: M }),
@@ -2892,7 +2892,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2892
2892
  /* @__PURE__ */ e(
2893
2893
  le,
2894
2894
  {
2895
- onClick: g,
2895
+ onClick: p,
2896
2896
  size: "small",
2897
2897
  label: "Add"
2898
2898
  }
@@ -2919,7 +2919,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2919
2919
  K,
2920
2920
  {
2921
2921
  value: P,
2922
- onChange: w,
2922
+ onChange: k,
2923
2923
  children: /* @__PURE__ */ n("div", { className: "relative", children: [
2924
2924
  /* @__PURE__ */ n(K.Button, { className: "relative w-full border border-gray-300 bg-white rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
2925
2925
  /* @__PURE__ */ n("span", { className: "flex items-center", children: [
@@ -2943,7 +2943,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2943
2943
  {
2944
2944
  value: C,
2945
2945
  className: ({ active: M }) => `${M ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2946
- children: ({ selected: M, active: _ }) => /* @__PURE__ */ n(te, { children: [
2946
+ children: ({ selected: M, active: V }) => /* @__PURE__ */ n(te, { children: [
2947
2947
  /* @__PURE__ */ n(
2948
2948
  "span",
2949
2949
  {
@@ -2952,7 +2952,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2952
2952
  /* @__PURE__ */ e(
2953
2953
  C.icon,
2954
2954
  {
2955
- className: `h-5 w-5 mr-2 ${_ ? "text-white" : "text-gray-400"}`
2955
+ className: `h-5 w-5 mr-2 ${V ? "text-white" : "text-gray-400"}`
2956
2956
  }
2957
2957
  ),
2958
2958
  "Can ",
@@ -3021,9 +3021,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3021
3021
  ] }),
3022
3022
  /* @__PURE__ */ e("footer", { className: "p-4 border-t border-gray-300 shrink-0", children: /* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
3023
3023
  /* @__PURE__ */ n("p", { className: "text-sm text-gray-600", children: [
3024
- D.length,
3024
+ z.length,
3025
3025
  " invitation",
3026
- D.length !== 1 ? "s" : "",
3026
+ z.length !== 1 ? "s" : "",
3027
3027
  " selected"
3028
3028
  ] }),
3029
3029
  /* @__PURE__ */ n("div", { className: "flex gap-2", children: [
@@ -3038,8 +3038,8 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3038
3038
  /* @__PURE__ */ e(
3039
3039
  le,
3040
3040
  {
3041
- onClick: () => Y(k)(),
3042
- disabled: x || D.length === 0 && !u,
3041
+ onClick: () => Y(w)(),
3042
+ disabled: x || z.length === 0 && !h,
3043
3043
  label: x ? "Inviting..." : l === ue.DRIVE ? "Send Invites" : "Add"
3044
3044
  }
3045
3045
  )
@@ -3051,21 +3051,21 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3051
3051
  { name: "Can manage", icon: ta, value: "edit" },
3052
3052
  { name: "Remove", icon: or, isDestructive: !0, value: "remove" }
3053
3053
  ], ss = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
3054
- const [i, l] = B(!1), { refs: m, floatingStyles: o, context: u } = ia({
3054
+ const [i, l] = B(!1), { refs: m, floatingStyles: o, context: h } = ia({
3055
3055
  open: i,
3056
3056
  onOpenChange: l,
3057
3057
  middleware: [oa(8), ca(), da({ padding: 8 })],
3058
3058
  whileElementsMounted: ma,
3059
3059
  placement: "bottom-end"
3060
- }), h = Kr(u), N = en(u), { getReferenceProps: y, getFloatingProps: r } = tn([
3061
- h,
3060
+ }), u = Kr(h), N = en(h), { getReferenceProps: y, getFloatingProps: r } = tn([
3061
+ u,
3062
3062
  N
3063
- ]), v = ot.find((p) => p.name === t.permission || p.value === t.permission) || ot[0];
3063
+ ]), v = ot.find((g) => g.name === t.permission || g.value === t.permission) || ot[0];
3064
3064
  return (
3065
3065
  // FIX: The <Listbox> component now wraps both the button and the portal.
3066
3066
  // This provides the necessary context for both children.
3067
- /* @__PURE__ */ n(K, { value: v, onChange: (p) => {
3068
- s(p), l(!1);
3067
+ /* @__PURE__ */ n(K, { value: v, onChange: (g) => {
3068
+ s(g), l(!1);
3069
3069
  }, children: [
3070
3070
  /* @__PURE__ */ n(
3071
3071
  K.Button,
@@ -3098,31 +3098,31 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3098
3098
  ...r(),
3099
3099
  static: !0,
3100
3100
  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",
3101
- children: ot.filter((p) => a.includes(p.value)).map((p) => /* @__PURE__ */ e(
3101
+ children: ot.filter((g) => a.includes(g.value)).map((g) => /* @__PURE__ */ e(
3102
3102
  K.Option,
3103
3103
  {
3104
3104
  className: ({
3105
- active: z
3105
+ active: D
3106
3106
  }) => `relative select-none py-2 pl-10 pr-4 hover:cursor-pointer
3107
- ${z ? "bg-blue-100 text-blue-900" : "text-gray-900"}
3108
- ${p.isDestructive && z ? "bg-red-100 text-red-900" : ""}
3109
- ${p.isDestructive && !z ? "text-red-600" : ""}`,
3110
- value: p,
3111
- children: ({ selected: z }) => /* @__PURE__ */ n(te, { children: [
3107
+ ${D ? "bg-blue-100 text-blue-900" : "text-gray-900"}
3108
+ ${g.isDestructive && D ? "bg-red-100 text-red-900" : ""}
3109
+ ${g.isDestructive && !D ? "text-red-600" : ""}`,
3110
+ value: g,
3111
+ children: ({ selected: D }) => /* @__PURE__ */ n(te, { children: [
3112
3112
  /* @__PURE__ */ n(
3113
3113
  "span",
3114
3114
  {
3115
- className: `flex items-center gap-2 truncate ${z ? "font-medium" : "font-normal"}`,
3115
+ className: `flex items-center gap-2 truncate ${D ? "font-medium" : "font-normal"}`,
3116
3116
  children: [
3117
- /* @__PURE__ */ e(p.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
3118
- p.name
3117
+ /* @__PURE__ */ e(g.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
3118
+ g.name
3119
3119
  ]
3120
3120
  }
3121
3121
  ),
3122
- z && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ut, { className: "h-5 w-5", "aria-hidden": "true" }) })
3122
+ D && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ut, { className: "h-5 w-5", "aria-hidden": "true" }) })
3123
3123
  ] })
3124
3124
  },
3125
- p.name
3125
+ g.name
3126
3126
  ))
3127
3127
  }
3128
3128
  )
@@ -3139,7 +3139,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3139
3139
  existingShares: l,
3140
3140
  allowedPermissions: m
3141
3141
  }) => {
3142
- const [o, u] = B(l), [h, N] = B(0), [y, r] = B(""), v = zt(y, 300), d = {
3142
+ const [o, h] = B(l), [u, N] = B(0), [y, r] = B(""), v = zt(y, 300), d = {
3143
3143
  users: o.users.filter(
3144
3144
  (I) => I.name.toLowerCase().includes(v.toLowerCase())
3145
3145
  ),
@@ -3149,15 +3149,15 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3149
3149
  roles: o.roles.filter(
3150
3150
  (I) => I.name.toLowerCase().includes(v.toLowerCase())
3151
3151
  )
3152
- }, p = async (I, P, j, U) => {
3152
+ }, g = async (I, P, _, U) => {
3153
3153
  const Y = P.value;
3154
- u((q) => ({
3154
+ h((q) => ({
3155
3155
  ...q,
3156
- [j]: q[j].map(
3156
+ [_]: q[_].map(
3157
3157
  ($) => $.id === I.id ? { ...$, permission: Y } : $
3158
3158
  )
3159
3159
  }));
3160
- }, z = () => {
3160
+ }, D = () => {
3161
3161
  const I = {
3162
3162
  users: o.users.filter((P) => P.permission !== "remove"),
3163
3163
  groups: o.groups.filter((P) => P.permission !== "remove"),
@@ -3191,7 +3191,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3191
3191
  )
3192
3192
  ] }),
3193
3193
  /* @__PURE__ */ n("div", { className: "flex flex-col flex-grow", children: [
3194
- /* @__PURE__ */ n(se.Group, { selectedIndex: h, onChange: N, children: [
3194
+ /* @__PURE__ */ n(se.Group, { selectedIndex: u, onChange: N, children: [
3195
3195
  /* @__PURE__ */ n("div", { className: "p-4 bg-white border-b border-gray-300", children: [
3196
3196
  /* @__PURE__ */ e(se.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: E.map((I) => /* @__PURE__ */ e(
3197
3197
  se,
@@ -3210,7 +3210,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3210
3210
  {
3211
3211
  onDebouncedChange: r,
3212
3212
  value: y,
3213
- placeholder: `Search in ${E[h]}...`
3213
+ placeholder: `Search in ${E[u]}...`
3214
3214
  }
3215
3215
  ) })
3216
3216
  ] }),
@@ -3268,9 +3268,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3268
3268
  {
3269
3269
  item: P,
3270
3270
  allowedPermissions: m,
3271
- onPermissionChange: (j) => p(
3271
+ onPermissionChange: (_) => g(
3272
3272
  P,
3273
- j,
3273
+ _,
3274
3274
  I
3275
3275
  )
3276
3276
  }
@@ -3290,10 +3290,10 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3290
3290
  /* @__PURE__ */ e(Kt, { className: "h-12 w-12 text-gray-400" }),
3291
3291
  /* @__PURE__ */ n("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: [
3292
3292
  "No ",
3293
- E[h],
3293
+ E[u],
3294
3294
  " Found"
3295
3295
  ] }),
3296
- /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: y ? `No results for "${y}"` : `There are no ${E[h].toLowerCase()} with access.` })
3296
+ /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: y ? `No results for "${y}"` : `There are no ${E[u].toLowerCase()} with access.` })
3297
3297
  ]
3298
3298
  }
3299
3299
  )
@@ -3302,13 +3302,13 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3302
3302
  I
3303
3303
  )) })
3304
3304
  },
3305
- h
3305
+ u
3306
3306
  ) }) })
3307
3307
  ] }),
3308
3308
  /* @__PURE__ */ e("div", { className: "p-4 bg-white border-t border-gray-300 flex justify-end", children: /* @__PURE__ */ e(
3309
3309
  "button",
3310
3310
  {
3311
- onClick: z,
3311
+ onClick: D,
3312
3312
  className: "px-4 py-2 bg-blue-600 text-white rounded-md shadow hover:bg-blue-700",
3313
3313
  children: "Update"
3314
3314
  }
@@ -3329,8 +3329,8 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3329
3329
  onClose: s,
3330
3330
  members: i
3331
3331
  }) => {
3332
- const [l, m] = B(!0), [o, u] = B(""), h = zt(o, 300), N = i.filter(
3333
- (d) => d.name.toLowerCase().includes(h.toLowerCase())
3332
+ const [l, m] = B(!0), [o, h] = B(""), u = zt(o, 300), N = i.filter(
3333
+ (d) => d.name.toLowerCase().includes(u.toLowerCase())
3334
3334
  ), y = {
3335
3335
  hidden: { opacity: 0 },
3336
3336
  visible: {
@@ -3345,7 +3345,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3345
3345
  exit: { opacity: 0, x: -20 }
3346
3346
  }, v = () => l ? (
3347
3347
  // Show 5 skeleton items while loading
3348
- /* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((d, p) => /* @__PURE__ */ e(is, {}, p)) })
3348
+ /* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((d, g) => /* @__PURE__ */ e(is, {}, g)) })
3349
3349
  ) : N.length === 0 ? /* @__PURE__ */ n(
3350
3350
  ie.div,
3351
3351
  {
@@ -3355,7 +3355,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3355
3355
  children: [
3356
3356
  /* @__PURE__ */ e(cr, { className: "h-12 w-12 text-gray-400" }),
3357
3357
  /* @__PURE__ */ e("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: "No Users Found" }),
3358
- /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: h ? `No one found matching "${h}"` : `There are no users in this ${t.type}.` })
3358
+ /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: u ? `No one found matching "${u}"` : `There are no users in this ${t.type}.` })
3359
3359
  ]
3360
3360
  }
3361
3361
  ) : /* @__PURE__ */ e(
@@ -3422,7 +3422,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3422
3422
  /* @__PURE__ */ e("div", { className: "p-4 border-b border-gray-200 flex-shrink-0", children: /* @__PURE__ */ e(
3423
3423
  ge,
3424
3424
  {
3425
- onDebouncedChange: u,
3425
+ onDebouncedChange: h,
3426
3426
  value: o,
3427
3427
  placeholder: "Search members..."
3428
3428
  }
@@ -3447,11 +3447,11 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3447
3447
  onClose: m = () => {
3448
3448
  },
3449
3449
  showExistingShares: o = !0,
3450
- allowedPermissions: u = [],
3451
- ...h
3450
+ allowedPermissions: h = [],
3451
+ ...u
3452
3452
  }) => {
3453
- const [N, y] = B(be.INVITE), [r, v] = B(t), [d, p] = B(null), [z, F] = B(!1), [E, I] = B([]), [P, j] = B(be.MANAGE), U = () => {
3454
- y(be.INVITE), p(null), m();
3453
+ const [N, y] = B(be.INVITE), [r, v] = B(t), [d, g] = B(null), [D, F] = B(!1), [E, I] = B([]), [P, _] = B(be.MANAGE), U = () => {
3454
+ y(be.INVITE), g(null), m();
3455
3455
  }, Y = () => {
3456
3456
  y(be.MANAGE);
3457
3457
  }, q = async ({ id: b, name: S, type: O }) => {
@@ -3463,10 +3463,10 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3463
3463
  }
3464
3464
  I(resp);
3465
3465
  }
3466
- p({ id: b, type: O, name: S }), j(N), y(be.MEMBERS);
3466
+ g({ id: b, type: O, name: S }), _(N), y(be.MEMBERS);
3467
3467
  }, $ = (b) => {
3468
3468
  console.log("changedExistingShares", b), v(b);
3469
- const S = it.mapValues(t, (D) => D.map((f) => ({ id: f.id, permission: f.permission })).sort((f, g) => f.id - g.id)), O = it.mapValues(b, (D) => D.map((f) => ({ id: f.id, permission: f.permission })).sort((f, g) => f.id - g.id));
3469
+ const S = it.mapValues(t, (z) => z.map((f) => ({ id: f.id, permission: f.permission })).sort((f, p) => f.id - p.id)), O = it.mapValues(b, (z) => z.map((f) => ({ id: f.id, permission: f.permission })).sort((f, p) => f.id - p.id));
3470
3470
  console.log("Existing data:", S), console.log("Changed data:", O);
3471
3471
  const R = !it.isEqual(S, O);
3472
3472
  console.log("hasPermissionChanged:", R), F(R), y(N === be.MEMBERS ? P : be.INVITE);
@@ -3493,7 +3493,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3493
3493
  onOpenMembers: q,
3494
3494
  existingShares: r,
3495
3495
  calledBy: l,
3496
- allowedPermissions: u
3496
+ allowedPermissions: h
3497
3497
  }
3498
3498
  )
3499
3499
  },
@@ -3543,7 +3543,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3543
3543
  onFinalSubmit: (b) => {
3544
3544
  s(b, r);
3545
3545
  },
3546
- isChanged: z
3546
+ isChanged: D
3547
3547
  }
3548
3548
  )
3549
3549
  },
@@ -3566,8 +3566,8 @@ function at({
3566
3566
  },
3567
3567
  placeholder: m = "Select options",
3568
3568
  error: o = null,
3569
- displayLimit: u = 3,
3570
- selectionLimit: h = -1,
3569
+ displayLimit: h = 3,
3570
+ selectionLimit: u = -1,
3571
3571
  // NEW: search behavior
3572
3572
  searchMode: N = "client",
3573
3573
  // "client" | "server"
@@ -3576,31 +3576,31 @@ function at({
3576
3576
  serverLoading: r = !1,
3577
3577
  minSearchChars: v = 2,
3578
3578
  // NEW: mappers (id/label keys)
3579
- getOptionId: d = (z) => String(z.id),
3580
- getOptionLabel: p = (z) => z.name
3579
+ getOptionId: d = (D) => String(D.id),
3580
+ getOptionLabel: g = (D) => D.name
3581
3581
  }) {
3582
- const z = He(), F = He(), [E, I] = B(""), P = fe(""), j = ae(() => {
3582
+ const D = He(), F = He(), [E, I] = B(""), P = fe(""), _ = ae(() => {
3583
3583
  const b = /* @__PURE__ */ new Map();
3584
3584
  for (const S of a) b.set(d(S), S);
3585
3585
  return b;
3586
- }, [a, d]), U = ae(() => Array.isArray(s) ? s.map((b) => b && typeof b == "object" ? j.get(d(b)) || null : j.get(String(b))).filter(Boolean) : [], [s, j, d]), Y = ae(() => {
3586
+ }, [a, d]), U = ae(() => Array.isArray(s) ? s.map((b) => b && typeof b == "object" ? _.get(d(b)) || null : _.get(String(b))).filter(Boolean) : [], [s, _, d]), Y = ae(() => {
3587
3587
  if (!E) return a;
3588
3588
  const b = E.toLowerCase();
3589
- return a.filter((S) => p(S).toLowerCase().includes(b));
3590
- }, [a, E, p]);
3589
+ return a.filter((S) => g(S).toLowerCase().includes(b));
3590
+ }, [a, E, g]);
3591
3591
  Z(() => {
3592
3592
  N === "server" && E.length >= v && E !== P.current && (P.current = E, y && y(E));
3593
3593
  }, [E, N, v, y]);
3594
3594
  const q = N === "client" ? Y : a, $ = () => {
3595
3595
  if (!U.length)
3596
3596
  return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
3597
- const b = U.slice(0, u), S = U.length - u;
3597
+ const b = U.slice(0, h), S = U.length - h;
3598
3598
  return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
3599
3599
  b.map((O) => /* @__PURE__ */ e(
3600
3600
  "span",
3601
3601
  {
3602
3602
  className: "px-2 py-1 text-xs font-medium text-white bg-gray-800 rounded-full",
3603
- children: p(O)
3603
+ children: g(O)
3604
3604
  },
3605
3605
  d(O)
3606
3606
  )),
@@ -3613,12 +3613,12 @@ function at({
3613
3613
  };
3614
3614
  return /* @__PURE__ */ e(K, { value: U, onChange: (b) => {
3615
3615
  const S = Array.from(new Set(b.map((O) => d(O))));
3616
- h !== -1 && S.length > h || i(S);
3616
+ u !== -1 && S.length > u || i(S);
3617
3617
  }, multiple: !0, by: "id", children: ({ open: b }) => /* @__PURE__ */ n("div", { children: [
3618
3618
  /* @__PURE__ */ e(
3619
3619
  K.Label,
3620
3620
  {
3621
- id: z,
3621
+ id: D,
3622
3622
  className: "block text-sm font-medium leading-6 text-gray-900",
3623
3623
  children: t
3624
3624
  }
@@ -3627,7 +3627,7 @@ function at({
3627
3627
  /* @__PURE__ */ n(
3628
3628
  K.Button,
3629
3629
  {
3630
- "aria-labelledby": z,
3630
+ "aria-labelledby": D,
3631
3631
  "aria-invalid": !!o,
3632
3632
  "aria-describedby": o ? F : void 0,
3633
3633
  onBlur: l,
@@ -3660,32 +3660,32 @@ function at({
3660
3660
  ) }),
3661
3661
  N === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
3662
3662
  q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: N === "server" ? E.length < v ? `Type at least ${v} characters to search.` : "No results." : "No options found." }) : q.map((S) => {
3663
- const O = d(S), R = p(S), D = U.some((g) => d(g) === O), f = h !== -1 && U.length >= h && !D;
3663
+ const O = d(S), R = g(S), z = U.some((p) => d(p) === O), f = u !== -1 && U.length >= u && !z;
3664
3664
  return /* @__PURE__ */ e(
3665
3665
  K.Option,
3666
3666
  {
3667
3667
  value: S,
3668
3668
  disabled: f,
3669
- className: ({ active: g }) => Ge(
3670
- f ? " text-gray-400 bg-white cursor-not-allowed" : g ? " bg-gray-200 text-gray-900" : " text-gray-900",
3669
+ className: ({ active: p }) => Ge(
3670
+ f ? " text-gray-400 bg-white cursor-not-allowed" : p ? " bg-gray-200 text-gray-900" : " text-gray-900",
3671
3671
  " relative cursor-default select-none py-2 pl-3 pr-9"
3672
3672
  ),
3673
- children: ({ selected: g, active: w }) => /* @__PURE__ */ n(te, { children: [
3673
+ children: ({ selected: p, active: k }) => /* @__PURE__ */ n(te, { children: [
3674
3674
  /* @__PURE__ */ e(
3675
3675
  "span",
3676
3676
  {
3677
3677
  className: Ge(
3678
- g ? "font-semibold" : "font-normal",
3678
+ p ? "font-semibold" : "font-normal",
3679
3679
  "block truncate"
3680
3680
  ),
3681
3681
  children: R
3682
3682
  }
3683
3683
  ),
3684
- g && /* @__PURE__ */ e(
3684
+ p && /* @__PURE__ */ e(
3685
3685
  "span",
3686
3686
  {
3687
3687
  className: Ge(
3688
- w ? " text-gray-900" : " text-gray-600",
3688
+ k ? " text-gray-900" : " text-gray-600",
3689
3689
  " absolute inset-y-0 right-0 flex items-center pr-4"
3690
3690
  ),
3691
3691
  children: /* @__PURE__ */ e(et, { className: "w-5 h-5", "aria-hidden": "true" })
@@ -3753,9 +3753,9 @@ const Xl = ({
3753
3753
  footer: l = { show: !0, customFooter: null },
3754
3754
  primaryAction: m = { onSubmit: null, label: "Save", loader: !1, disabled: !1 },
3755
3755
  secondaryAction: o = { onCancel: null, label: "Cancel" },
3756
- dialogPanelClass: u = ""
3756
+ dialogPanelClass: h = ""
3757
3757
  }) => {
3758
- const h = (y) => {
3758
+ const u = (y) => {
3759
3759
  y.target === y.currentTarget && a(!1);
3760
3760
  }, N = (y) => {
3761
3761
  y.stopPropagation();
@@ -3771,13 +3771,13 @@ const Xl = ({
3771
3771
  Qr,
3772
3772
  {
3773
3773
  className: "fixed inset-0 bg-black/30",
3774
- onClick: h
3774
+ onClick: u
3775
3775
  }
3776
3776
  ),
3777
3777
  /* @__PURE__ */ e("div", { className: "fixed inset-0 overflow-y-auto", children: /* @__PURE__ */ e("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ n(
3778
3778
  Fe,
3779
3779
  {
3780
- className: `${u} relative bg-white align-middle w-full lg:w-[36rem] mx-5 lg:mx-0 transform overflow-hidden rounded-2xl text-left shadow-xl lg:min-w-[36rem] md:min-w-96 transition-all`,
3780
+ className: `${h} relative bg-white align-middle w-full lg:w-[36rem] mx-5 lg:mx-0 transform overflow-hidden rounded-2xl text-left shadow-xl lg:min-w-[36rem] md:min-w-96 transition-all`,
3781
3781
  onClick: N,
3782
3782
  children: [
3783
3783
  /* @__PURE__ */ n("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
@@ -3850,14 +3850,14 @@ function ms({
3850
3850
  onSelect: l,
3851
3851
  onCreateChild: m,
3852
3852
  onRename: o,
3853
- onDelete: u,
3854
- renderActions: h,
3853
+ onDelete: h,
3854
+ renderActions: u,
3855
3855
  // optional override
3856
3856
  dragId: N,
3857
3857
  dropId: y,
3858
3858
  indent: r = 24
3859
3859
  }) {
3860
- const { setNodeRef: v, isOver: d } = dr({ id: y }), { attributes: p, listeners: z, setNodeRef: F, transform: E, isDragging: I } = mr({ id: N }), P = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [j, U] = B(!1), [Y, q] = B(t.name), $ = () => {
3860
+ const { setNodeRef: v, isOver: d } = dr({ id: y }), { attributes: g, listeners: D, setNodeRef: F, transform: E, isDragging: I } = mr({ id: N }), P = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [_, U] = B(!1), [Y, q] = B(t.name), $ = () => {
3861
3861
  const b = Y.trim();
3862
3862
  U(!1), b && b !== t.name ? o?.(t, b) : q(t.name);
3863
3863
  }, x = ae(() => /* @__PURE__ */ e(
@@ -3869,10 +3869,10 @@ function ms({
3869
3869
  { action: "delete", label: "Delete" }
3870
3870
  ],
3871
3871
  onSelect: (S) => {
3872
- S.action === "create" ? m?.(t) : S.action === "rename" ? U(!0) : S.action === "delete" && u?.(t);
3872
+ S.action === "create" ? m?.(t) : S.action === "rename" ? U(!0) : S.action === "delete" && h?.(t);
3873
3873
  }
3874
3874
  }
3875
- ), [t, m, u]);
3875
+ ), [t, m, h]);
3876
3876
  return /* @__PURE__ */ n(
3877
3877
  "div",
3878
3878
  {
@@ -3885,7 +3885,7 @@ function ms({
3885
3885
  children: [
3886
3886
  /* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(Nt, { size: 16 }) : /* @__PURE__ */ e(xe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
3887
3887
  /* @__PURE__ */ e(Be, { size: 16, className: "tv-folder-ic" }),
3888
- /* @__PURE__ */ e("div", { className: "tv-name", ref: F, children: j ? /* @__PURE__ */ e(
3888
+ /* @__PURE__ */ e("div", { className: "tv-name", ref: F, children: _ ? /* @__PURE__ */ e(
3889
3889
  "input",
3890
3890
  {
3891
3891
  className: "tv-input",
@@ -3898,11 +3898,11 @@ function ms({
3898
3898
  autoFocus: !0
3899
3899
  }
3900
3900
  ) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
3901
- /* @__PURE__ */ e(ds, { listeners: z, attributes: p }),
3902
- /* @__PURE__ */ e("div", { className: "tv-actions", children: h ? h(t, {
3901
+ /* @__PURE__ */ e(ds, { listeners: D, attributes: g }),
3902
+ /* @__PURE__ */ e("div", { className: "tv-actions", children: u ? u(t, {
3903
3903
  onCreateChild: () => m?.(t),
3904
3904
  onRename: () => U(!0),
3905
- onDelete: () => u?.(t)
3905
+ onDelete: () => h?.(t)
3906
3906
  }) : x })
3907
3907
  ]
3908
3908
  }
@@ -3911,35 +3911,35 @@ function ms({
3911
3911
  const us = (t) => String(t.id ?? t._id), hs = (t) => t.parent !== void 0 ? String(t.parent) : t.parentId != null ? String(t.parentId) : "root", ps = (t) => t.name ?? t.label ?? "", gs = (t) => Array.isArray(t) && t.some((a) => Array.isArray(a.children));
3912
3912
  function bs(t, { rootId: a, getId: s, getParent: i, getName: l }) {
3913
3913
  const m = /* @__PURE__ */ new Map();
3914
- t.forEach((u) => {
3915
- const h = s(u);
3916
- m.set(h, {
3917
- ...u,
3918
- id: h,
3919
- name: l(u),
3920
- parentId: i(u) || a,
3914
+ t.forEach((h) => {
3915
+ const u = s(h);
3916
+ m.set(u, {
3917
+ ...h,
3918
+ id: u,
3919
+ name: l(h),
3920
+ parentId: i(h) || a,
3921
3921
  children: []
3922
3922
  });
3923
3923
  });
3924
3924
  const o = [];
3925
- return m.forEach((u) => {
3926
- const h = u.parentId || a;
3927
- h !== a && m.has(h) ? m.get(h).children.push(u) : o.push(u);
3925
+ return m.forEach((h) => {
3926
+ const u = h.parentId || a;
3927
+ u !== a && m.has(u) ? m.get(u).children.push(h) : o.push(h);
3928
3928
  }), { roots: o, byId: m };
3929
3929
  }
3930
3930
  function fs(t, { rootId: a, getId: s, getName: i }) {
3931
3931
  const l = /* @__PURE__ */ new Map();
3932
- function m(u, h) {
3933
- const N = s(u), y = {
3934
- ...u,
3932
+ function m(h, u) {
3933
+ const N = s(h), y = {
3934
+ ...h,
3935
3935
  id: N,
3936
- name: i(u),
3937
- parentId: h || a,
3938
- children: (u.children || []).map((r) => m(r, N))
3936
+ name: i(h),
3937
+ parentId: u || a,
3938
+ children: (h.children || []).map((r) => m(r, N))
3939
3939
  };
3940
3940
  return l.set(N, y), y;
3941
3941
  }
3942
- return { roots: t.map((u) => m(u, null)), byId: l };
3942
+ return { roots: t.map((h) => m(h, null)), byId: l };
3943
3943
  }
3944
3944
  const Me = (t) => t.map((a) => ({ ...a, children: Me(a.children || []) }));
3945
3945
  function ys(t, a) {
@@ -3949,8 +3949,8 @@ function ys(t, a) {
3949
3949
  if (o.id === a)
3950
3950
  return s = o, null;
3951
3951
  if (o.children?.length) {
3952
- const u = i(o.children);
3953
- if (u !== o.children) return { ...o, children: u };
3952
+ const h = i(o.children);
3953
+ if (h !== o.children) return { ...o, children: h };
3954
3954
  }
3955
3955
  return o;
3956
3956
  }).filter(Boolean);
@@ -3989,52 +3989,52 @@ function Hl({
3989
3989
  getParent: l = hs,
3990
3990
  getName: m = ps,
3991
3991
  onSelect: o,
3992
- onCreateRoot: u,
3993
- onCreateChild: h,
3992
+ onCreateRoot: h,
3993
+ onCreateChild: u,
3994
3994
  onRename: N,
3995
3995
  onDelete: y,
3996
3996
  onMove: r,
3997
3997
  renderActions: v,
3998
3998
  disableMoveToRoot: d = !1,
3999
3999
  // ← allow root moves by default now
4000
- indentUnit: p = 24
4000
+ indentUnit: g = 24
4001
4001
  }) {
4002
- const { roots: z } = ae(() => gs(t) ? fs(t, { rootId: a, getId: i, getName: m }) : bs(
4002
+ const { roots: D } = ae(() => gs(t) ? fs(t, { rootId: a, getId: i, getName: m }) : bs(
4003
4003
  t.map((f) => ({ ...f })),
4004
4004
  { rootId: a, getId: i, getParent: l, getName: m }
4005
4005
  ), [t, a, i, l, m]), [F, E] = B({}), I = ee((f) => {
4006
- const g = {};
4007
- return (function w(k) {
4008
- k.forEach((T) => {
4009
- g[T.id] = !0, T.children?.length && w(T.children);
4006
+ const p = {};
4007
+ return (function k(w) {
4008
+ w.forEach((T) => {
4009
+ p[T.id] = !0, T.children?.length && k(T.children);
4010
4010
  });
4011
- })(f), g;
4011
+ })(f), p;
4012
4012
  }, []);
4013
4013
  re.useEffect(() => {
4014
- E(I(z));
4015
- }, [z, I]);
4014
+ E(I(D));
4015
+ }, [D, I]);
4016
4016
  const P = ee(
4017
- (f) => E((g) => ({ ...g, [f]: !g[f] })),
4017
+ (f) => E((p) => ({ ...p, [f]: !p[f] })),
4018
4018
  []
4019
- ), [j, U] = B(() => Me(z));
4020
- re.useEffect(() => U(Me(z)), [z]);
4019
+ ), [_, U] = B(() => Me(D));
4020
+ re.useEffect(() => U(Me(D)), [D]);
4021
4021
  const Y = ur(
4022
4022
  hr(fr, { activationConstraint: { delay: 250, tolerance: 5 } })
4023
4023
  ), q = fe(null), [$, x] = B(null), b = fe(0), S = () => {
4024
4024
  }, O = ({ delta: f }) => {
4025
4025
  b.current = f?.x ?? 0;
4026
4026
  }, R = ee(
4027
- ({ active: f, over: g }) => {
4028
- const w = b.current;
4029
- if (b.current = 0, x(null), !f || !g) return;
4030
- const k = String(f.id).replace(/^drag-/, ""), T = String(g.id).replace(/^drop-/, "");
4031
- if (!k || !T || k === T) return;
4027
+ ({ active: f, over: p }) => {
4028
+ const k = b.current;
4029
+ if (b.current = 0, x(null), !f || !p) return;
4030
+ const w = String(f.id).replace(/^drag-/, ""), T = String(p.id).replace(/^drop-/, "");
4031
+ if (!w || !T || w === T) return;
4032
4032
  let L = T;
4033
- const C = Math.max(0, Math.floor(-w / p));
4033
+ const C = Math.max(0, Math.floor(-k / g));
4034
4034
  if (C > 0) {
4035
4035
  let W = T;
4036
4036
  for (let pe = 0; pe < C; pe++) {
4037
- const Ne = Sa(j, W, null);
4037
+ const Ne = Sa(_, W, null);
4038
4038
  if (!Ne) break;
4039
4039
  if (!Ne.parentId) {
4040
4040
  L = a;
@@ -4044,59 +4044,59 @@ function Hl({
4044
4044
  }
4045
4045
  }
4046
4046
  if (d && L === a) {
4047
- U(Me(z));
4047
+ U(Me(D));
4048
4048
  return;
4049
4049
  }
4050
- const M = Me(j), { newRoots: _, removed: A } = ys(M, k);
4050
+ const M = Me(_), { newRoots: V, removed: A } = ys(M, w);
4051
4051
  if (!A) return;
4052
- const G = xs(_, L, A);
4053
- U(G), r?.({ sourceId: k, destParentId: L, newTree: G });
4052
+ const G = xs(V, L, A);
4053
+ U(G), r?.({ sourceId: w, destParentId: L, newTree: G });
4054
4054
  },
4055
- [j, z, a, d, p, r]
4056
- ), D = ee(
4057
- (f, g = 0) => f.map((w) => /* @__PURE__ */ n(re.Fragment, { children: [
4055
+ [_, D, a, d, g, r]
4056
+ ), z = ee(
4057
+ (f, p = 0) => f.map((k) => /* @__PURE__ */ n(re.Fragment, { children: [
4058
4058
  /* @__PURE__ */ e(
4059
4059
  ms,
4060
4060
  {
4061
- node: w,
4062
- depth: g,
4063
- expanded: !!F[w.id],
4064
- onToggle: () => P(w.id),
4061
+ node: k,
4062
+ depth: p,
4063
+ expanded: !!F[k.id],
4064
+ onToggle: () => P(k.id),
4065
4065
  onSelect: o,
4066
- onCreateChild: h,
4066
+ onCreateChild: u,
4067
4067
  onRename: N,
4068
4068
  onDelete: y,
4069
4069
  renderActions: v,
4070
- dragId: `drag-${w.id}`,
4071
- dropId: `drop-${w.id}`,
4072
- indent: p
4070
+ dragId: `drag-${k.id}`,
4071
+ dropId: `drop-${k.id}`,
4072
+ indent: g
4073
4073
  }
4074
4074
  ),
4075
- F[w.id] && w.children?.length > 0 ? D(w.children, g + 1) : null
4076
- ] }, w.id)),
4077
- [F, p, h, y, N, o, v, P]
4075
+ F[k.id] && k.children?.length > 0 ? z(k.children, p + 1) : null
4076
+ ] }, k.id)),
4077
+ [F, g, u, y, N, o, v, P]
4078
4078
  );
4079
4079
  return re.useMemo(() => {
4080
4080
  if (!$) return null;
4081
4081
  const f = String($).replace(/^drag-/, "");
4082
- function g(w) {
4083
- for (const k of w) {
4084
- if (k.id === f) return k;
4085
- const T = k.children?.length ? g(k.children) : null;
4082
+ function p(k) {
4083
+ for (const w of k) {
4084
+ if (w.id === f) return w;
4085
+ const T = w.children?.length ? p(w.children) : null;
4086
4086
  if (T) return T;
4087
4087
  }
4088
4088
  return null;
4089
4089
  }
4090
- return g(j);
4091
- }, [$, j]), /* @__PURE__ */ n("div", { className: "tv", children: [
4090
+ return p(_);
4091
+ }, [$, _]), /* @__PURE__ */ n("div", { className: "tv", children: [
4092
4092
  s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
4093
4093
  /* @__PURE__ */ e("div", { className: "tv-title", children: s }),
4094
- /* @__PURE__ */ e("button", { className: "tv-btn", onClick: u, children: "+ New folder" })
4094
+ /* @__PURE__ */ e("button", { className: "tv-btn", onClick: h, children: "+ New folder" })
4095
4095
  ] }),
4096
4096
  /* @__PURE__ */ n("div", { className: "tv-root-row", children: [
4097
4097
  /* @__PURE__ */ e(Be, { size: 16, className: "tv-folder-ic" }),
4098
4098
  /* @__PURE__ */ e("strong", { children: "ROOT" }),
4099
- /* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick: u, children: "+" })
4099
+ /* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick: h, children: "+" })
4100
4100
  ] }),
4101
4101
  /* @__PURE__ */ e(
4102
4102
  pr,
@@ -4107,7 +4107,7 @@ function Hl({
4107
4107
  onDragMove: O,
4108
4108
  onDragEnd: R,
4109
4109
  modifiers: [gr],
4110
- children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: D(j, 0) })
4110
+ children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: z(_, 0) })
4111
4111
  }
4112
4112
  )
4113
4113
  ] });
@@ -4123,17 +4123,17 @@ const Ql = ({
4123
4123
  listClassName: l = "",
4124
4124
  panelClassName: m = "",
4125
4125
  tabClassName: o,
4126
- ...u
4126
+ ...h
4127
4127
  // Pass remaining props to Tab.Group
4128
4128
  }) => {
4129
- const h = s === "vertical", N = (v) => ze(
4129
+ const u = s === "vertical", N = (v) => ze(
4130
4130
  "py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
4131
4131
  v ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
4132
4132
  ), y = (v) => ze(
4133
4133
  "text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
4134
4134
  v ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
4135
- ), r = ({ selected: v }) => o ? typeof o == "function" ? o(v) : o : h ? y(v) : N(v);
4136
- return /* @__PURE__ */ e(se.Group, { vertical: h, ...u, children: h ? /* @__PURE__ */ n("div", { className: ze("flex gap-4", i), children: [
4135
+ ), r = ({ selected: v }) => o ? typeof o == "function" ? o(v) : o : u ? y(v) : N(v);
4136
+ return /* @__PURE__ */ e(se.Group, { vertical: u, ...h, children: u ? /* @__PURE__ */ n("div", { className: ze("flex gap-4", i), children: [
4137
4137
  /* @__PURE__ */ e(se.List, { className: ze("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((v) => /* @__PURE__ */ e(se, { className: r, children: v.label }, v.key)) }),
4138
4138
  /* @__PURE__ */ e(se.Panels, { unmount: !a, className: ze("flex-1", m), children: t.map((v) => /* @__PURE__ */ e(se.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: v.content }) }, v.key)) })
4139
4139
  ] }) : (
@@ -4150,15 +4150,15 @@ function Zl(t, a = "YYYY-MM-DD HH:mm:ss") {
4150
4150
  c.string;
4151
4151
  function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4152
4152
  console.log(t);
4153
- const [l, m] = re.useState(t), [o, u] = re.useState(() => {
4153
+ const [l, m] = re.useState(t), [o, h] = re.useState(() => {
4154
4154
  const r = a && a[t.key] || {};
4155
4155
  return console.log("Initial Section data for", t.key, r), r;
4156
- }), h = fe(a);
4156
+ }), u = fe(a);
4157
4157
  Z(() => {
4158
- if (h.current !== a) {
4159
- h.current = a;
4158
+ if (u.current !== a) {
4159
+ u.current = a;
4160
4160
  const r = a && a[t.key] || {};
4161
- console.log("Updated Section data for", t.key, r), u(r);
4161
+ console.log("Updated Section data for", t.key, r), h(r);
4162
4162
  }
4163
4163
  }, [a, t.key]), console.log("Section data", o);
4164
4164
  const N = fe(o);
@@ -4167,24 +4167,24 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4167
4167
  }, [l.key, o, s]);
4168
4168
  const y = (r) => {
4169
4169
  if (!r.dependsOn) return !0;
4170
- const { field: v, value: d, operator: p = "equals" } = r.dependsOn, z = o[v];
4171
- switch (p) {
4170
+ const { field: v, value: d, operator: g = "equals" } = r.dependsOn, D = o[v];
4171
+ switch (g) {
4172
4172
  case "equals":
4173
- return z === d;
4173
+ return D === d;
4174
4174
  case "notEquals":
4175
- return z !== d;
4175
+ return D !== d;
4176
4176
  case "contains":
4177
- return Array.isArray(z) && z.includes(d);
4177
+ return Array.isArray(D) && D.includes(d);
4178
4178
  case "notContains":
4179
- return !Array.isArray(z) || !z.includes(d);
4179
+ return !Array.isArray(D) || !D.includes(d);
4180
4180
  case "greaterThan":
4181
- return Number(z) > Number(d);
4181
+ return Number(D) > Number(d);
4182
4182
  case "lessThan":
4183
- return Number(z) < Number(d);
4183
+ return Number(D) < Number(d);
4184
4184
  case "isEmpty":
4185
- return !z || Array.isArray(z) && z.length === 0;
4185
+ return !D || Array.isArray(D) && D.length === 0;
4186
4186
  case "isNotEmpty":
4187
- return z && (!Array.isArray(z) || z.length > 0);
4187
+ return D && (!Array.isArray(D) || D.length > 0);
4188
4188
  default:
4189
4189
  return !0;
4190
4190
  }
@@ -4210,8 +4210,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4210
4210
  name: r.key,
4211
4211
  checked: !!(o[r.key] || r.default),
4212
4212
  onChange: (d) => {
4213
- const p = d.target ? d.target.checked : d, z = { ...o, [r.key]: p };
4214
- u(z), s && s(l.key, z);
4213
+ const g = d.target ? d.target.checked : d, D = { ...o, [r.key]: g };
4214
+ h(D), s && s(l.key, D);
4215
4215
  },
4216
4216
  label: r.label,
4217
4217
  disabled: r.disabled ? r.disabled : !1
@@ -4265,8 +4265,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4265
4265
  placeholder: r.placeholder,
4266
4266
  value: o[r.key] || "",
4267
4267
  onChange: (d) => {
4268
- const p = { ...o, [r.key]: d.target.value };
4269
- u(p), s && s(l.key, p);
4268
+ const g = { ...o, [r.key]: d.target.value };
4269
+ h(g), s && s(l.key, g);
4270
4270
  },
4271
4271
  required: r.required,
4272
4272
  disabled: r.disabled ? r.disabled : !1,
@@ -4285,8 +4285,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4285
4285
  placeholder: r.placeholder,
4286
4286
  value: o[r.key] || "",
4287
4287
  onChange: (d) => {
4288
- const p = { ...o, [r.key]: d.target.value };
4289
- u(p), s && s(l.key, p);
4288
+ const g = { ...o, [r.key]: d.target.value };
4289
+ h(g), s && s(l.key, g);
4290
4290
  },
4291
4291
  rows: 3,
4292
4292
  required: r.required,
@@ -4310,14 +4310,14 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4310
4310
  max: r.max,
4311
4311
  step: r.step,
4312
4312
  onChange: (d) => {
4313
- const p = d.target.value, z = { ...o, [r.key]: p };
4314
- u(z), s && s(l.key, z);
4313
+ const g = d.target.value, D = { ...o, [r.key]: g };
4314
+ h(D), s && s(l.key, D);
4315
4315
  },
4316
4316
  onBlur: (d) => {
4317
- const p = d.target.value;
4318
- if (p !== "" && p !== null && p !== void 0) {
4319
- const z = Number(p);
4320
- isNaN(z) || (r.min !== void 0 && z < r.min ? (d.target.setCustomValidity(`${r.label} must be at least ${r.min}`), d.target.reportValidity()) : r.max !== void 0 && z > r.max ? (d.target.setCustomValidity(`${r.label} must not exceed ${r.max}`), d.target.reportValidity()) : d.target.setCustomValidity(""));
4317
+ const g = d.target.value;
4318
+ if (g !== "" && g !== null && g !== void 0) {
4319
+ const D = Number(g);
4320
+ isNaN(D) || (r.min !== void 0 && D < r.min ? (d.target.setCustomValidity(`${r.label} must be at least ${r.min}`), d.target.reportValidity()) : r.max !== void 0 && D > r.max ? (d.target.setCustomValidity(`${r.label} must not exceed ${r.max}`), d.target.reportValidity()) : d.target.setCustomValidity(""));
4321
4321
  }
4322
4322
  },
4323
4323
  required: r.required,
@@ -4342,8 +4342,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4342
4342
  name: r.key,
4343
4343
  checked: !!(o[r.key] || r.default),
4344
4344
  onChange: (d) => {
4345
- const p = d.target ? d.target.checked : d, z = { ...o, [r.key]: p };
4346
- u(z), s && s(l.key, z);
4345
+ const g = d.target ? d.target.checked : d, D = { ...o, [r.key]: g };
4346
+ h(D), s && s(l.key, D);
4347
4347
  },
4348
4348
  label: r.placeholder || r.label,
4349
4349
  disabled: r.disabled ? r.disabled : !1,
@@ -4360,8 +4360,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4360
4360
  defaultValue: r.default,
4361
4361
  value: o[r.key] || "",
4362
4362
  onChange: (d) => {
4363
- const p = { ...o, [r.key]: d };
4364
- u(p);
4363
+ const g = { ...o, [r.key]: d };
4364
+ h(g);
4365
4365
  },
4366
4366
  options: r.options || [],
4367
4367
  placeholder: r.placeholder || `Select ${r.label}`,
@@ -4382,8 +4382,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4382
4382
  placeholder: r.placeholder || "Enter email address",
4383
4383
  value: o[r.key] || "",
4384
4384
  onChange: (d) => {
4385
- const p = { ...o, [r.key]: d.target.value };
4386
- u(p), s && s(l.key, p);
4385
+ const g = { ...o, [r.key]: d.target.value };
4386
+ h(g), s && s(l.key, g);
4387
4387
  },
4388
4388
  required: r.required,
4389
4389
  disabled: r.disabled ? r.disabled : !1,
@@ -4402,8 +4402,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4402
4402
  placeholder: r.placeholder || "Enter URL",
4403
4403
  value: o[r.key] || "",
4404
4404
  onChange: (d) => {
4405
- const p = { ...o, [r.key]: d.target.value };
4406
- u(p), s && s(l.key, p);
4405
+ const g = { ...o, [r.key]: d.target.value };
4406
+ h(g), s && s(l.key, g);
4407
4407
  },
4408
4408
  required: r.required,
4409
4409
  disabled: r.disabled ? r.disabled : !1,
@@ -4422,8 +4422,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4422
4422
  placeholder: r.placeholder || "Enter password",
4423
4423
  value: o[r.key] || "",
4424
4424
  onChange: (d) => {
4425
- const p = { ...o, [r.key]: d.target.value };
4426
- u(p), s && s(l.key, p);
4425
+ const g = { ...o, [r.key]: d.target.value };
4426
+ h(g), s && s(l.key, g);
4427
4427
  },
4428
4428
  required: r.required,
4429
4429
  disabled: r.disabled ? r.disabled : !1,
@@ -4438,8 +4438,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4438
4438
  {
4439
4439
  selectedItems: o[r.key] || [],
4440
4440
  onSelectionChange: (d) => {
4441
- const p = { ...o, [r.key]: d };
4442
- u(p), s && s(l.key, p);
4441
+ const g = { ...o, [r.key]: d };
4442
+ h(g), s && s(l.key, g);
4443
4443
  },
4444
4444
  options: r.options || [],
4445
4445
  placeholder: r.placeholder || `Select ${r.label}`,
@@ -4456,8 +4456,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4456
4456
  checked: typeof o[r.key] == "boolean" ? o[r.key] : r.default,
4457
4457
  onChange: (d) => {
4458
4458
  console.log("Toggle changed:", r.key, d);
4459
- const p = { ...o, [r.key]: d };
4460
- u(p), s && s(l.key, p);
4459
+ const g = { ...o, [r.key]: d };
4460
+ h(g), s && s(l.key, g);
4461
4461
  },
4462
4462
  disabled: r.disabled ? r.disabled : !1
4463
4463
  }
@@ -4470,8 +4470,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4470
4470
  label: r.label,
4471
4471
  value: o[r.key] ? new Date(o[r.key]) : null,
4472
4472
  onChange: (d) => {
4473
- const p = { ...o, [r.key]: d ? d.toISOString().split("T")[0] : "" };
4474
- u(p), s && s(l.key, p);
4473
+ const g = { ...o, [r.key]: d ? d.toISOString().split("T")[0] : "" };
4474
+ h(g), s && s(l.key, g);
4475
4475
  },
4476
4476
  placeholder: r.placeholder || "Select date",
4477
4477
  disabled: r.disabled ? r.disabled : !1,
@@ -4485,8 +4485,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4485
4485
  label: r.label,
4486
4486
  value: o[r.key] || { from: null, to: null },
4487
4487
  onChange: (d) => {
4488
- const p = { ...o, [r.key]: d };
4489
- u(p), s && s(l.key, p);
4488
+ const g = { ...o, [r.key]: d };
4489
+ h(g), s && s(l.key, g);
4490
4490
  },
4491
4491
  placeholder: r.placeholder || "Select date range",
4492
4492
  disabled: r.disabled ? r.disabled : !1,
@@ -4500,8 +4500,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4500
4500
  {
4501
4501
  selectedValue: typeof o[r.key] < "u" ? o[r.key] : r.default || "",
4502
4502
  onValueChange: (d) => {
4503
- const p = { ...o, [r.key]: d };
4504
- u(p), s && s(l.key, p);
4503
+ const g = { ...o, [r.key]: d };
4504
+ h(g), s && s(l.key, g);
4505
4505
  },
4506
4506
  options: r.options || [],
4507
4507
  disabled: r.disabled ? r.disabled : !1,
@@ -4520,9 +4520,9 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4520
4520
  name: r.key,
4521
4521
  value: d.value,
4522
4522
  checked: o[r.key] === d.value,
4523
- onChange: (p) => {
4524
- const z = { ...o, [r.key]: p.target.value };
4525
- u(z), s && s(l.key, z);
4523
+ onChange: (g) => {
4524
+ const D = { ...o, [r.key]: g.target.value };
4525
+ h(D), s && s(l.key, D);
4526
4526
  },
4527
4527
  disabled: r.disabled
4528
4528
  }
@@ -4540,8 +4540,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4540
4540
  {
4541
4541
  value: o[r.key] || "",
4542
4542
  onChange: (d) => {
4543
- const p = { ...o, [r.key]: d };
4544
- u(p), s && s(l.key, p);
4543
+ const g = { ...o, [r.key]: d };
4544
+ h(g), s && s(l.key, g);
4545
4545
  },
4546
4546
  placeholder: r.placeholder || `Search ${r.label}`,
4547
4547
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4559,8 +4559,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4559
4559
  placeholder: r.placeholder || "Select date and time",
4560
4560
  value: o[r.key] || "",
4561
4561
  onChange: (d) => {
4562
- const p = { ...o, [r.key]: d.target.value };
4563
- u(p), s && s(l.key, p);
4562
+ const g = { ...o, [r.key]: d.target.value };
4563
+ h(g), s && s(l.key, g);
4564
4564
  },
4565
4565
  required: r.required,
4566
4566
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4578,8 +4578,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4578
4578
  placeholder: r.placeholder || "Select time",
4579
4579
  value: o[r.key] || "",
4580
4580
  onChange: (d) => {
4581
- const p = { ...o, [r.key]: d.target.value };
4582
- u(p), s && s(l.key, p);
4581
+ const g = { ...o, [r.key]: d.target.value };
4582
+ h(g), s && s(l.key, g);
4583
4583
  },
4584
4584
  required: r.required,
4585
4585
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4596,8 +4596,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4596
4596
  defaultValue: r.default || "#000000",
4597
4597
  value: o[r.key] || "#000000",
4598
4598
  onChange: (d) => {
4599
- const p = { ...o, [r.key]: d.target.value };
4600
- u(p), s && s(l.key, p);
4599
+ const g = { ...o, [r.key]: d.target.value };
4600
+ h(g), s && s(l.key, g);
4601
4601
  },
4602
4602
  className: `w-full h-10 ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4603
4603
  }
@@ -4613,8 +4613,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4613
4613
  defaultValue: r.default || r.min || 0,
4614
4614
  value: o[r.key] || r.min || 0,
4615
4615
  onChange: (d) => {
4616
- const p = { ...o, [r.key]: d.target.value };
4617
- u(p), s && s(l.key, p);
4616
+ const g = { ...o, [r.key]: d.target.value };
4617
+ h(g), s && s(l.key, g);
4618
4618
  },
4619
4619
  min: r.min || 0,
4620
4620
  max: r.max || 100,
@@ -4639,8 +4639,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4639
4639
  type: "file",
4640
4640
  name: r.key,
4641
4641
  onChange: (d) => {
4642
- const p = d.target.files[0], z = { ...o, [r.key]: p ? p.name : "" };
4643
- u(z), s && s(l.key, z);
4642
+ const g = d.target.files[0], D = { ...o, [r.key]: g ? g.name : "" };
4643
+ h(D), s && s(l.key, D);
4644
4644
  },
4645
4645
  accept: r.accept,
4646
4646
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4656,8 +4656,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4656
4656
  initialData: o[r.key] || r.initialData || [],
4657
4657
  className: r.className || "",
4658
4658
  onCollectionChange: (d) => {
4659
- const p = { ...o, [r.key]: d };
4660
- u(p), s && s(l.key, p);
4659
+ const g = { ...o, [r.key]: d };
4660
+ h(g), s && s(l.key, g);
4661
4661
  },
4662
4662
  showSearch: r.showSearch !== !1,
4663
4663
  allowAdd: r.allowAdd !== !1,
@@ -4685,7 +4685,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4685
4685
  const Ns = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
4686
4686
  function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4687
4687
  console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
4688
- const [l, m] = B(t), [o, u] = B(null), [h, N] = B(null);
4688
+ const [l, m] = B(t), [o, h] = B(null), [u, N] = B(null);
4689
4689
  console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
4690
4690
  const [y, r] = B(() => {
4691
4691
  const x = a && a[l.key] || [], b = x.length > 0 ? x : [{ id: 0 }];
@@ -4698,56 +4698,56 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4698
4698
  console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, b), r(b);
4699
4699
  }
4700
4700
  }, [a, l.key]);
4701
- const d = fe(y), p = fe(null);
4701
+ const d = fe(y), g = fe(null);
4702
4702
  Z(() => {
4703
- d.current !== y && s && typeof s == "function" && (d.current = y, p.current && clearTimeout(p.current), p.current = setTimeout(() => {
4703
+ d.current !== y && s && typeof s == "function" && (d.current = y, g.current && clearTimeout(g.current), g.current = setTimeout(() => {
4704
4704
  s(l.key, y);
4705
4705
  }, 300));
4706
4706
  }, [l.key, y, s]), Z(() => () => {
4707
- p.current && clearTimeout(p.current);
4707
+ g.current && clearTimeout(g.current);
4708
4708
  }, []);
4709
- const z = (x) => {
4710
- const b = (R, D) => {
4711
- console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: R, value: D, type: typeof D }), r((f) => {
4712
- const g = [...f];
4713
- return g[R][x.key] = D, g;
4709
+ const D = (x) => {
4710
+ const b = (R, z) => {
4711
+ console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: R, value: z, type: typeof z }), r((f) => {
4712
+ const p = [...f];
4713
+ return p[R][x.key] = z, p;
4714
4714
  });
4715
4715
  }, S = (R) => i[l.key]?.[R]?.[x.key], O = (R) => {
4716
- const D = S(R);
4717
- return D ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: D }) : null;
4716
+ const z = S(R);
4717
+ return z ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: z }) : null;
4718
4718
  };
4719
4719
  switch (x.fieldtype) {
4720
4720
  case "text":
4721
- return (R, D) => /* @__PURE__ */ n("div", { children: [
4721
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4722
4722
  /* @__PURE__ */ e(
4723
4723
  X,
4724
4724
  {
4725
4725
  value: R[x.key] || "",
4726
- onChange: (f) => b(D, f.target.value),
4726
+ onChange: (f) => b(z, f.target.value),
4727
4727
  placeholder: x.placeholder || `Enter ${x.label}`,
4728
4728
  required: x.required,
4729
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4729
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4730
4730
  }
4731
4731
  ),
4732
- O(D)
4732
+ O(z)
4733
4733
  ] });
4734
4734
  case "textarea":
4735
- return (R, D) => /* @__PURE__ */ n("div", { children: [
4735
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4736
4736
  /* @__PURE__ */ e(
4737
4737
  fa,
4738
4738
  {
4739
4739
  value: R[x.key] || "",
4740
- onChange: (f) => b(D, f.target.value),
4740
+ onChange: (f) => b(z, f.target.value),
4741
4741
  placeholder: x.placeholder || `Enter ${x.label}`,
4742
4742
  required: x.required,
4743
- className: `w-full ${S(D) ? "border-red-500" : ""}`,
4743
+ className: `w-full ${S(z) ? "border-red-500" : ""}`,
4744
4744
  rows: 3
4745
4745
  }
4746
4746
  ),
4747
- O(D)
4747
+ O(z)
4748
4748
  ] });
4749
4749
  case "number":
4750
- return (R, D) => /* @__PURE__ */ n("div", { children: [
4750
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4751
4751
  /* @__PURE__ */ e(
4752
4752
  X,
4753
4753
  {
@@ -4756,17 +4756,17 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4756
4756
  min: x.min,
4757
4757
  max: x.max,
4758
4758
  step: x.step,
4759
- onChange: (f) => b(D, f.target.value),
4759
+ onChange: (f) => b(z, f.target.value),
4760
4760
  onBlur: (f) => {
4761
- const g = f.target.value;
4762
- if (g !== "" && g !== null && g !== void 0) {
4763
- const w = Number(g);
4764
- isNaN(w) || (x.min !== void 0 && w < x.min ? (f.target.setCustomValidity(`${x.label} must be at least ${x.min}`), f.target.reportValidity()) : x.max !== void 0 && w > x.max ? (f.target.setCustomValidity(`${x.label} must not exceed ${x.max}`), f.target.reportValidity()) : f.target.setCustomValidity(""));
4761
+ const p = f.target.value;
4762
+ if (p !== "" && p !== null && p !== void 0) {
4763
+ const k = Number(p);
4764
+ isNaN(k) || (x.min !== void 0 && k < x.min ? (f.target.setCustomValidity(`${x.label} must be at least ${x.min}`), f.target.reportValidity()) : x.max !== void 0 && k > x.max ? (f.target.setCustomValidity(`${x.label} must not exceed ${x.max}`), f.target.reportValidity()) : f.target.setCustomValidity(""));
4765
4765
  }
4766
4766
  },
4767
4767
  placeholder: x.placeholder || `Enter ${x.label}`,
4768
4768
  required: x.required,
4769
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4769
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4770
4770
  }
4771
4771
  ),
4772
4772
  x.min !== void 0 && /* @__PURE__ */ n("div", { style: { color: "#6b7280", fontSize: "11px", marginTop: "2px" }, children: [
@@ -4777,79 +4777,79 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4777
4777
  "Max: ",
4778
4778
  x.max
4779
4779
  ] }),
4780
- O(D)
4780
+ O(z)
4781
4781
  ] });
4782
4782
  case "email":
4783
- return (R, D) => /* @__PURE__ */ n("div", { children: [
4783
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4784
4784
  /* @__PURE__ */ e(
4785
4785
  X,
4786
4786
  {
4787
4787
  type: "email",
4788
4788
  value: R[x.key] || "",
4789
- onChange: (f) => b(D, f.target.value),
4789
+ onChange: (f) => b(z, f.target.value),
4790
4790
  placeholder: x.placeholder || "Enter email address",
4791
4791
  required: x.required,
4792
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4792
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4793
4793
  }
4794
4794
  ),
4795
- O(D)
4795
+ O(z)
4796
4796
  ] });
4797
4797
  case "url":
4798
- return (R, D) => /* @__PURE__ */ n("div", { children: [
4798
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4799
4799
  /* @__PURE__ */ e(
4800
4800
  X,
4801
4801
  {
4802
4802
  type: "url",
4803
4803
  value: R[x.key] || "",
4804
- onChange: (f) => b(D, f.target.value),
4804
+ onChange: (f) => b(z, f.target.value),
4805
4805
  placeholder: x.placeholder || "Enter URL",
4806
4806
  required: x.required,
4807
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4807
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4808
4808
  }
4809
4809
  ),
4810
- O(D)
4810
+ O(z)
4811
4811
  ] });
4812
4812
  case "password":
4813
- return (R, D) => /* @__PURE__ */ n("div", { children: [
4813
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4814
4814
  /* @__PURE__ */ e(
4815
4815
  X,
4816
4816
  {
4817
4817
  type: "password",
4818
4818
  value: R[x.key] || "",
4819
- onChange: (f) => b(D, f.target.value),
4819
+ onChange: (f) => b(z, f.target.value),
4820
4820
  placeholder: x.placeholder || "Enter password",
4821
4821
  required: x.required,
4822
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4822
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4823
4823
  }
4824
4824
  ),
4825
- O(D)
4825
+ O(z)
4826
4826
  ] });
4827
4827
  case "select":
4828
4828
  case "dropdown":
4829
- return (R, D) => /* @__PURE__ */ n("div", { children: [
4829
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4830
4830
  /* @__PURE__ */ e(
4831
4831
  ft,
4832
4832
  {
4833
4833
  value: R[x.key] || "",
4834
- onChange: (f) => b(D, f),
4834
+ onChange: (f) => b(z, f),
4835
4835
  options: x.options || [],
4836
4836
  placeholder: x.placeholder || `Select ${x.label}`,
4837
4837
  required: x.required,
4838
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4838
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4839
4839
  }
4840
4840
  ),
4841
- O(D)
4841
+ O(z)
4842
4842
  ] });
4843
4843
  case "selectDynamic":
4844
- return (R, D) => {
4844
+ return (R, z) => {
4845
4845
  const f = () => {
4846
4846
  if (x.optionsFrom && a) {
4847
- const { config: g, valueField: w, labelField: k } = x.optionsFrom, T = a[g] || [];
4847
+ const { config: p, valueField: k, labelField: w } = x.optionsFrom, T = a[p] || [];
4848
4848
  if (Array.isArray(T))
4849
4849
  return T.map((L) => ({
4850
- id: L[w] || "",
4851
- value: L[w] || "",
4852
- label: L[k] || ""
4850
+ id: L[k] || "",
4851
+ value: L[k] || "",
4852
+ label: L[w] || ""
4853
4853
  }));
4854
4854
  }
4855
4855
  return x.options || [];
@@ -4858,27 +4858,27 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4858
4858
  /* @__PURE__ */ e(
4859
4859
  ft,
4860
4860
  {
4861
- index: D,
4861
+ index: z,
4862
4862
  value: R[x.key] || "",
4863
- onChange: (g) => b(D, g),
4863
+ onChange: (p) => b(z, p),
4864
4864
  options: f(),
4865
4865
  placeholder: x.placeholder || `Select ${x.label}`,
4866
4866
  required: x.required,
4867
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4867
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4868
4868
  },
4869
4869
  Math.random()
4870
4870
  ),
4871
- O(D)
4871
+ O(z)
4872
4872
  ] });
4873
4873
  };
4874
4874
  case "multiselect":
4875
- return (R, D) => {
4875
+ return (R, z) => {
4876
4876
  const f = R[x.key] || [];
4877
4877
  return /* @__PURE__ */ e(
4878
4878
  at,
4879
4879
  {
4880
4880
  selectedItems: f,
4881
- onSelectionChange: (g) => b(D, g),
4881
+ onSelectionChange: (p) => b(z, p),
4882
4882
  options: x.options || [],
4883
4883
  placeholder: x.placeholder || `Select ${x.label}`,
4884
4884
  className: "w-full"
@@ -4887,127 +4887,134 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4887
4887
  };
4888
4888
  case "checkbox":
4889
4889
  case "boolean":
4890
- return (R, D) => /* @__PURE__ */ e(
4890
+ return (R, z) => /* @__PURE__ */ e(
4891
4891
  pt,
4892
4892
  {
4893
4893
  checked: !!R[x.key],
4894
- onChange: (f) => b(D, f),
4894
+ onChange: (f) => b(z, f),
4895
4895
  label: x.placeholder || x.label,
4896
4896
  className: "w-full"
4897
4897
  }
4898
4898
  );
4899
4899
  case "toggle":
4900
4900
  case "switch":
4901
- return (R, D) => /* @__PURE__ */ e(
4901
+ return (R, z) => /* @__PURE__ */ e(
4902
4902
  ya,
4903
4903
  {
4904
4904
  isOn: !!R[x.key],
4905
- onToggle: (f) => b(D, f),
4905
+ onToggle: (f) => b(z, f),
4906
4906
  label: x.placeholder || x.label,
4907
4907
  className: "w-full"
4908
4908
  }
4909
4909
  );
4910
4910
  case "date":
4911
- return (R, D) => /* @__PURE__ */ e(
4911
+ return (R, z) => /* @__PURE__ */ e(
4912
4912
  ha,
4913
4913
  {
4914
4914
  selectedDate: R[x.key] ? new Date(R[x.key]) : null,
4915
- onDateChange: (f) => b(D, f ? f.toISOString().split("T")[0] : ""),
4915
+ onDateChange: (f) => b(z, f ? f.toISOString().split("T")[0] : ""),
4916
4916
  placeholder: x.placeholder || "Select date",
4917
4917
  className: "w-full"
4918
4918
  }
4919
4919
  );
4920
4920
  case "datetime":
4921
- return (R, D) => /* @__PURE__ */ e(
4921
+ return (R, z) => /* @__PURE__ */ e(
4922
4922
  X,
4923
4923
  {
4924
4924
  type: "datetime-local",
4925
4925
  value: R[x.key] || "",
4926
- onChange: (f) => b(D, f.target.value),
4926
+ onChange: (f) => b(z, f.target.value),
4927
4927
  placeholder: x.placeholder || "Select date and time",
4928
4928
  required: x.required,
4929
4929
  className: "w-full"
4930
4930
  }
4931
4931
  );
4932
4932
  case "time":
4933
- return (R, D) => /* @__PURE__ */ e(
4933
+ return (R, z) => /* @__PURE__ */ e(
4934
4934
  X,
4935
4935
  {
4936
4936
  type: "time",
4937
4937
  value: R[x.key] || "",
4938
- onChange: (f) => b(D, f.target.value),
4938
+ onChange: (f) => b(z, f.target.value),
4939
4939
  placeholder: x.placeholder || "Select time",
4940
4940
  required: x.required,
4941
4941
  className: "w-full"
4942
4942
  }
4943
4943
  );
4944
4944
  case "radio":
4945
- return (R, D) => /* @__PURE__ */ e(
4945
+ return (R, z) => /* @__PURE__ */ e(
4946
4946
  pa,
4947
4947
  {
4948
4948
  selectedValue: R[x.key] || "",
4949
- onValueChange: (f) => b(D, f),
4949
+ onValueChange: (f) => b(z, f),
4950
4950
  options: x.options || [],
4951
4951
  className: "w-full"
4952
4952
  }
4953
4953
  );
4954
4954
  case "search":
4955
- return (R, D) => /* @__PURE__ */ e(
4955
+ return (R, z) => /* @__PURE__ */ e(
4956
4956
  ge,
4957
4957
  {
4958
4958
  value: R[x.key] || "",
4959
- onChange: (f) => b(D, f),
4959
+ onChange: (f) => b(z, f),
4960
4960
  placeholder: x.placeholder || `Search ${x.label}`,
4961
4961
  className: "w-full"
4962
4962
  }
4963
4963
  );
4964
4964
  case "audience":
4965
- return (R, D) => {
4966
- const f = R[x.key] || { users: [], groups: [], roles: [] }, g = [
4965
+ return (R, z) => {
4966
+ const f = R[x.key] || { users: [], groups: [], roles: [] }, p = [
4967
4967
  ...f.users || [],
4968
4968
  ...f.groups || [],
4969
4969
  ...f.roles || []
4970
4970
  ];
4971
4971
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
4972
- /* @__PURE__ */ e(Ns, { children: g.length > 0 ? g.slice(0, 3).map((w, k) => /* @__PURE__ */ e(
4972
+ /* @__PURE__ */ e(Ns, { children: p.length > 0 ? p.slice(0, 3).map((k, w) => /* @__PURE__ */ e(
4973
4973
  we,
4974
4974
  {
4975
4975
  size: "small",
4976
- name: w.name || w.displayName || w.id,
4977
- src: w.avatarUrl
4976
+ name: k.name || k.displayName || k.id,
4977
+ src: k.avatarUrl
4978
4978
  },
4979
- k
4979
+ w
4980
4980
  )) : null }),
4981
4981
  /* @__PURE__ */ e(
4982
4982
  "button",
4983
4983
  {
4984
4984
  className: "text-blue-600 font-semibold hover:text-blue-800",
4985
4985
  onClick: () => {
4986
- N(x.key), u(D);
4986
+ console.log("[DataTableRenderer] Button clicked:", {
4987
+ fieldKey: x.key,
4988
+ rowIndex: z,
4989
+ buttonText: p.length > 0 ? "Edit" : "Assign",
4990
+ currentAudienceRowId: o,
4991
+ currentAudienceFieldName: u,
4992
+ allAudience: p
4993
+ }), N(x.key), h(z);
4987
4994
  },
4988
- children: g.length > 0 ? "Edit" : "Assign"
4995
+ children: p.length > 0 ? "Edit" : "Assign"
4989
4996
  }
4990
4997
  )
4991
4998
  ] });
4992
4999
  };
4993
5000
  case "color":
4994
- return (R, D) => /* @__PURE__ */ e(
5001
+ return (R, z) => /* @__PURE__ */ e(
4995
5002
  X,
4996
5003
  {
4997
5004
  type: "color",
4998
5005
  value: R[x.key] || "#000000",
4999
- onChange: (f) => b(D, f.target.value),
5006
+ onChange: (f) => b(z, f.target.value),
5000
5007
  className: "w-full h-10"
5001
5008
  }
5002
5009
  );
5003
5010
  case "range":
5004
- return (R, D) => /* @__PURE__ */ n("div", { className: "w-full", children: [
5011
+ return (R, z) => /* @__PURE__ */ n("div", { className: "w-full", children: [
5005
5012
  /* @__PURE__ */ e(
5006
5013
  X,
5007
5014
  {
5008
5015
  type: "range",
5009
5016
  value: R[x.key] || x.min || 0,
5010
- onChange: (f) => b(D, f.target.value),
5017
+ onChange: (f) => b(z, f.target.value),
5011
5018
  min: x.min || 0,
5012
5019
  max: x.max || 100,
5013
5020
  step: x.step || 1,
@@ -5017,41 +5024,41 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5017
5024
  /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: R[x.key] || x.min || 0 })
5018
5025
  ] });
5019
5026
  case "file":
5020
- return (R, D) => /* @__PURE__ */ e(
5027
+ return (R, z) => /* @__PURE__ */ e(
5021
5028
  X,
5022
5029
  {
5023
5030
  type: "file",
5024
5031
  onChange: (f) => {
5025
- const g = f.target.files[0];
5026
- b(D, g ? g.name : "");
5032
+ const p = f.target.files[0];
5033
+ b(z, p ? p.name : "");
5027
5034
  },
5028
5035
  accept: x.accept,
5029
5036
  className: "w-full"
5030
5037
  }
5031
5038
  );
5032
5039
  case "hidden":
5033
- return (R, D) => /* @__PURE__ */ e(
5040
+ return (R, z) => /* @__PURE__ */ e(
5034
5041
  X,
5035
5042
  {
5036
5043
  type: "hidden",
5037
5044
  value: R[x.key] || "",
5038
- onChange: (f) => b(D, f.target.value)
5045
+ onChange: (f) => b(z, f.target.value)
5039
5046
  }
5040
5047
  );
5041
5048
  // Default fallback for unknown field types
5042
5049
  default:
5043
- return (R, D) => /* @__PURE__ */ n("div", { children: [
5050
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
5044
5051
  /* @__PURE__ */ e(
5045
5052
  X,
5046
5053
  {
5047
5054
  value: R[x.key] || "",
5048
- onChange: (f) => b(D, f.target.value),
5055
+ onChange: (f) => b(z, f.target.value),
5049
5056
  placeholder: x.placeholder || `Enter ${x.label}`,
5050
5057
  required: x.required,
5051
- className: `w-full ${S(D) ? "border-red-500" : ""}`
5058
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
5052
5059
  }
5053
5060
  ),
5054
- O(D)
5061
+ O(z)
5055
5062
  ] });
5056
5063
  }
5057
5064
  }, F = ee(() => {
@@ -5074,7 +5081,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5074
5081
  const S = [...b];
5075
5082
  return S.splice(x, 1), S;
5076
5083
  });
5077
- }, []), [I, P] = B(null), j = ee((x, b) => {
5084
+ }, []), [I, P] = B(null), _ = ee((x, b) => {
5078
5085
  P(b), x.dataTransfer.effectAllowed = "move", x.dataTransfer.setData("text/html", "");
5079
5086
  }, []), U = ee((x) => {
5080
5087
  x.preventDefault(), x.dataTransfer.dropEffect = "move";
@@ -5086,27 +5093,41 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5086
5093
  }, [I]), q = ee(() => {
5087
5094
  P(null);
5088
5095
  }, []), $ = ee((x, b) => {
5089
- console.log("[DataTableRenderer] handleAddAudience called with:", { selectedEntities: x, existingShares: b }), r((S) => {
5090
- const O = [...S];
5091
- if (o !== null && h && O[o]) {
5092
- const R = x.pendingInvites || [];
5093
- if (R.length > 0) {
5094
- const D = R.filter((w) => w.type === "User"), f = R.filter((w) => w.type === "Group"), g = R.filter((w) => w.type === "Role");
5095
- O[o][h] = {
5096
- users: [...O[o][h]?.users || [], ...D],
5097
- groups: [...O[o][h]?.groups || [], ...f],
5098
- roles: [...O[o][h]?.roles || [], ...g]
5096
+ console.log("[DataTableRenderer] handleAddAudience called with:", { selectedEntities: x, existingShares: b });
5097
+ const S = x.pendingInvites || [], O = !b || !b.users?.length && !b.groups?.length && !b.roles?.length;
5098
+ if (S.length === 0 && O) {
5099
+ console.log("[DataTableRenderer] Ignoring empty initial call from InviteFlow useEffect");
5100
+ return;
5101
+ }
5102
+ if (S.length === 0 && !O && o !== null && u) {
5103
+ console.log("[DataTableRenderer] Edit mode - no pending invites, checking if this is initial call");
5104
+ const R = y[o] && y[o][u] ? y[o][u] : { users: [], groups: [], roles: [] }, z = (b.users || []).map((V) => V.id).sort(), f = (b.groups || []).map((V) => V.id).sort(), p = (b.roles || []).map((V) => V.id).sort(), k = (R.users || []).map((V) => V.id).sort(), w = (R.groups || []).map((V) => V.id).sort(), T = (R.roles || []).map((V) => V.id).sort(), L = JSON.stringify(z) === JSON.stringify(k), C = JSON.stringify(f) === JSON.stringify(w), M = JSON.stringify(p) === JSON.stringify(T);
5105
+ if (L && C && M) {
5106
+ console.log("[DataTableRenderer] Ignoring initial Edit call - existing shares match current data exactly");
5107
+ return;
5108
+ }
5109
+ console.log("[DataTableRenderer] Data has changed, processing update");
5110
+ }
5111
+ r((R) => {
5112
+ const z = [...R];
5113
+ if (o !== null && u && z[o]) {
5114
+ if (S.length > 0) {
5115
+ const f = S.filter((w) => w.type === "User"), p = S.filter((w) => w.type === "Group"), k = S.filter((w) => w.type === "Role");
5116
+ z[o][u] = {
5117
+ users: [...z[o][u]?.users || [], ...f],
5118
+ groups: [...z[o][u]?.groups || [], ...p],
5119
+ roles: [...z[o][u]?.roles || [], ...k]
5099
5120
  };
5100
- } else b && (O[o][h] = {
5121
+ } else b && !O && (z[o][u] = {
5101
5122
  users: b.users || [],
5102
5123
  groups: b.groups || [],
5103
5124
  roles: b.roles || []
5104
5125
  });
5105
- console.log("[DataTableRenderer] Updated audience data:", O[o][h]);
5126
+ console.log("[DataTableRenderer] Updated audience data:", z[o][u]);
5106
5127
  }
5107
- return O;
5108
- }), console.log("[DataTableRenderer] Closing modal after update"), u(null), N(null);
5109
- }, [o, h]);
5128
+ return z;
5129
+ }), console.log("[DataTableRenderer] Closing modal after update"), h(null), N(null);
5130
+ }, [o, u]);
5110
5131
  return /* @__PURE__ */ n("div", { children: [
5111
5132
  /* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
5112
5133
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
@@ -5140,13 +5161,13 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5140
5161
  {
5141
5162
  className: `hover:bg-gray-50 ${I === b ? "opacity-50" : ""}`,
5142
5163
  draggable: !0,
5143
- onDragStart: (S) => j(S, b),
5164
+ onDragStart: (S) => _(S, b),
5144
5165
  onDragOver: U,
5145
5166
  onDrop: (S) => Y(S, b),
5146
5167
  onDragEnd: q,
5147
5168
  children: [
5148
5169
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e("div", { className: "cursor-move text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ e(wt, { size: 16 }) }) }),
5149
- l.fields.map((S, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: z(S)(x, b) }, O)),
5170
+ l.fields.map((S, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: D(S)(x, b) }, O)),
5150
5171
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
5151
5172
  "button",
5152
5173
  {
@@ -5161,18 +5182,23 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5161
5182
  b
5162
5183
  )) })
5163
5184
  ] }) }),
5164
- o !== null && (() => {
5165
- const x = y[o] && y[o][h] ? {
5166
- users: y[o][h].users || [],
5167
- groups: y[o][h].groups || [],
5168
- roles: y[o][h].roles || []
5185
+ (() => {
5186
+ if (console.log("[DataTableRenderer] Modal condition check:", {
5187
+ audienceRowId: o,
5188
+ audienceFieldName: u,
5189
+ shouldRender: o !== null
5190
+ }), o === null) return null;
5191
+ const x = y[o] && y[o][u] ? {
5192
+ users: y[o][u].users || [],
5193
+ groups: y[o][u].groups || [],
5194
+ roles: y[o][u].roles || []
5169
5195
  } : { users: [], groups: [], roles: [] };
5170
- return console.log("[DataTableRenderer] Opening modal with existing data:", x), console.log("[DataTableRenderer] Row data:", y[o]), console.log("[DataTableRenderer] Field name:", h), /* @__PURE__ */ e(
5196
+ return console.log("[DataTableRenderer] Opening modal with existing data:", x), console.log("[DataTableRenderer] Row data:", y[o]), console.log("[DataTableRenderer] Field name:", u), /* @__PURE__ */ e(
5171
5197
  cs,
5172
5198
  {
5173
5199
  isOpen: !0,
5174
5200
  onClose: () => {
5175
- u(null), N(null);
5201
+ h(null), N(null);
5176
5202
  },
5177
5203
  onFinalSubmit: $,
5178
5204
  existingShares: x,
@@ -5204,9 +5230,9 @@ function Ss({
5204
5230
  onShowCancelModal: l,
5205
5231
  onCancel: m
5206
5232
  }) {
5207
- const [o, u] = re.useState(a), [h, N] = re.useState(null), [y, r] = re.useState(null), [v, d] = B(!1), [p, z] = B(!1), [F, E] = B({}), I = `${$e()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, P = I, [j, U] = B(1), Y = () => {
5208
- if (!y || !h)
5209
- return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: y, data: h }), !1;
5233
+ const [o, h] = re.useState(a), [u, N] = re.useState(null), [y, r] = re.useState(null), [v, d] = B(!1), [g, D] = B(!1), [F, E] = B({}), I = `${$e()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, P = I, [_, U] = B(1), Y = () => {
5234
+ if (!y || !u)
5235
+ return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: y, data: u }), !1;
5210
5236
  const f = (T) => {
5211
5237
  if (T == null || typeof T != "object") return T;
5212
5238
  if (Array.isArray(T)) return T.map(f);
@@ -5214,63 +5240,63 @@ function Ss({
5214
5240
  return Object.keys(T).sort().forEach((C) => {
5215
5241
  L[C] = f(T[C]);
5216
5242
  }), L;
5217
- }, g = f(y), w = f(h), k = JSON.stringify(g) !== JSON.stringify(w);
5218
- return console.log("[DynamicConfig] hasUnsavedChanges:", k, {
5219
- originalData: g,
5220
- currentData: w,
5243
+ }, p = f(y), k = f(u), w = JSON.stringify(p) !== JSON.stringify(k);
5244
+ return console.log("[DynamicConfig] hasUnsavedChanges:", w, {
5245
+ originalData: p,
5246
+ currentData: k,
5221
5247
  originalRaw: y,
5222
- currentRaw: h
5223
- }), k;
5248
+ currentRaw: u
5249
+ }), w;
5224
5250
  }, q = (f) => {
5225
5251
  if (!a || !a.configuration)
5226
5252
  return f;
5227
- const g = {}, w = f?.configuration || {};
5228
- return a.configuration.forEach((k) => {
5229
- if (k.key && k.type === "datatable") {
5230
- const L = (w[k.key] || []).map((C, M) => {
5231
- const _ = { id: C.id || 0 };
5232
- return k.fields && k.fields.forEach((A) => {
5253
+ const p = {}, k = f?.configuration || {};
5254
+ return a.configuration.forEach((w) => {
5255
+ if (w.key && w.type === "datatable") {
5256
+ const L = (k[w.key] || []).map((C, M) => {
5257
+ const V = { id: C.id || 0 };
5258
+ return w.fields && w.fields.forEach((A) => {
5233
5259
  if (A.fieldtype === "audience") {
5234
5260
  let G = { users: [], groups: [], roles: [] };
5235
5261
  C[A.key] && (Array.isArray(C[A.key]) ? G = { users: [], groups: [], roles: [] } : typeof C[A.key] == "object" && (G = {
5236
5262
  users: C[A.key].users || [],
5237
5263
  groups: C[A.key].groups || [],
5238
5264
  roles: C[A.key].roles || []
5239
- })), _[A.key] = G;
5240
- } else A.fieldtype === "select" ? _[A.key] = C[A.key] !== void 0 && C[A.key] !== "" ? C[A.key] : A.default || "" : _[A.key] = C[A.key] || A.default || "";
5241
- }), _;
5265
+ })), V[A.key] = G;
5266
+ } else A.fieldtype === "select" ? V[A.key] = C[A.key] !== void 0 && C[A.key] !== "" ? C[A.key] : A.default || "" : V[A.key] = C[A.key] || A.default || "";
5267
+ }), V;
5242
5268
  });
5243
5269
  if (L.length === 0) {
5244
5270
  const C = { id: 0 };
5245
- k.fields && k.fields.forEach((M) => {
5271
+ w.fields && w.fields.forEach((M) => {
5246
5272
  M.fieldtype === "audience" ? C[M.key] = { users: [], groups: [], roles: [] } : C[M.key] = M.default || "";
5247
5273
  }), L.push(C);
5248
5274
  }
5249
- g[k.key] = L;
5250
- } else if (k.key) {
5251
- const T = w[k.key] || {};
5252
- k.type === "section" && k.fields && k.fields.forEach((L) => {
5275
+ p[w.key] = L;
5276
+ } else if (w.key) {
5277
+ const T = k[w.key] || {};
5278
+ w.type === "section" && w.fields && w.fields.forEach((L) => {
5253
5279
  L.fieldtype === "managecollectionlist" && L.key && (!T[L.key] || !Array.isArray(T[L.key])) && (T[L.key] = L.initialData || []);
5254
- }), g[k.key] = T;
5280
+ }), p[w.key] = T;
5255
5281
  }
5256
- }), g;
5282
+ }), p;
5257
5283
  }, $ = () => {
5258
5284
  if (a && a.configuration) {
5259
5285
  const f = {};
5260
- a.configuration.forEach((g) => {
5261
- if (g.key)
5262
- if (g.type === "datatable") {
5263
- const w = { id: 0 };
5264
- g.fields && g.fields.forEach((k) => {
5265
- k.fieldtype === "audience" ? w[k.key] = { users: [], groups: [], roles: [] } : (k.fieldtype, w[k.key] = k.default || "");
5266
- }), f[g.key] = [w];
5267
- } else if (g.type === "section") {
5268
- const w = {};
5269
- g.fields && Array.isArray(g.fields) && g.fields.forEach((k) => {
5270
- k.key && (k.fieldtype === "managecollectionlist" ? w[k.key] = k.initialData || [] : w[k.key] = k.default || "");
5271
- }), f[g.key] = w;
5286
+ a.configuration.forEach((p) => {
5287
+ if (p.key)
5288
+ if (p.type === "datatable") {
5289
+ const k = { id: 0 };
5290
+ p.fields && p.fields.forEach((w) => {
5291
+ w.fieldtype === "audience" ? k[w.key] = { users: [], groups: [], roles: [] } : (w.fieldtype, k[w.key] = w.default || "");
5292
+ }), f[p.key] = [k];
5293
+ } else if (p.type === "section") {
5294
+ const k = {};
5295
+ p.fields && Array.isArray(p.fields) && p.fields.forEach((w) => {
5296
+ w.key && (w.fieldtype === "managecollectionlist" ? k[w.key] = w.initialData || [] : k[w.key] = w.default || "");
5297
+ }), f[p.key] = k;
5272
5298
  } else
5273
- f[g.key] = {};
5299
+ f[p.key] = {};
5274
5300
  }), N(f), r(f);
5275
5301
  }
5276
5302
  };
@@ -5282,121 +5308,121 @@ function Ss({
5282
5308
  const f = async () => {
5283
5309
  try {
5284
5310
  d(!0);
5285
- let g = await Ze(I);
5286
- if (g) {
5287
- const w = q(g);
5288
- N(w), r(w);
5311
+ let p = await Ze(I);
5312
+ if (p) {
5313
+ const k = q(p);
5314
+ N(k), r(k);
5289
5315
  } else
5290
5316
  $();
5291
- } catch (g) {
5292
- console.error("Error fetching configuration:", g);
5293
- let w = "Failed to load configuration";
5294
- if (g.response) {
5295
- const k = g.response.status, T = g.response.data?.message || g.response.data?.error;
5296
- k === 400 ? w = T || "Invalid request. Please check the application ID." : k === 401 ? w = "You are not authorized to access this configuration." : k === 403 ? w = "Access denied. You don't have permission to view this configuration." : k === 404 ? w = "Configuration not found. It may not exist yet or the application ID is incorrect." : k >= 500 ? w = T || "Server error. Please try again later." : w = T || `Failed to load configuration (Error ${k})`;
5297
- } else g.request ? w = "Network error. Please check your connection and try again." : w = g.message || "An unexpected error occurred while loading configuration.";
5298
- qe.error(w), $();
5317
+ } catch (p) {
5318
+ console.error("Error fetching configuration:", p);
5319
+ let k = "Failed to load configuration";
5320
+ if (p.response) {
5321
+ const w = p.response.status, T = p.response.data?.message || p.response.data?.error;
5322
+ w === 400 ? k = T || "Invalid request. Please check the application ID." : w === 401 ? k = "You are not authorized to access this configuration." : w === 403 ? k = "Access denied. You don't have permission to view this configuration." : w === 404 ? k = "Configuration not found. It may not exist yet or the application ID is incorrect." : w >= 500 ? k = T || "Server error. Please try again later." : k = T || `Failed to load configuration (Error ${w})`;
5323
+ } else p.request ? k = "Network error. Please check your connection and try again." : k = p.message || "An unexpected error occurred while loading configuration.";
5324
+ qe.error(k), $();
5299
5325
  } finally {
5300
5326
  d(!1);
5301
5327
  }
5302
5328
  };
5303
- a && (u(a), t ? f() : $());
5304
- }, [a, j, t, s]);
5305
- const x = (f, g) => {
5306
- console.log(`[DynamicConfig] handleSectionChange called for ${f}:`, g), N((w) => {
5307
- const k = {
5308
- ...w,
5309
- [f]: g
5329
+ a && (h(a), t ? f() : $());
5330
+ }, [a, _, t, s]);
5331
+ const x = (f, p) => {
5332
+ console.log(`[DynamicConfig] handleSectionChange called for ${f}:`, p), N((k) => {
5333
+ const w = {
5334
+ ...k,
5335
+ [f]: p
5310
5336
  };
5311
- return console.log("[DynamicConfig] Updated data state:", k), k;
5312
- }), E((w) => {
5313
- const k = { ...w };
5314
- return k[f] && delete k[f], k;
5337
+ return console.log("[DynamicConfig] Updated data state:", w), w;
5338
+ }), E((k) => {
5339
+ const w = { ...k };
5340
+ return w[f] && delete w[f], w;
5315
5341
  });
5316
5342
  }, b = () => {
5317
5343
  const f = {};
5318
- return !o || !h || o.configuration.forEach((g) => {
5319
- if (g.type === "section")
5320
- g.fields.forEach((w) => {
5321
- const k = h[g.key]?.[w.key];
5322
- if (w.required && (!k || typeof k == "string" && k.trim() === "")) {
5323
- f[g.key] || (f[g.key] = {}), f[g.key][w.key] = `${w.label} is required`;
5344
+ return !o || !u || o.configuration.forEach((p) => {
5345
+ if (p.type === "section")
5346
+ p.fields.forEach((k) => {
5347
+ const w = u[p.key]?.[k.key];
5348
+ if (k.required && (!w || typeof w == "string" && w.trim() === "")) {
5349
+ f[p.key] || (f[p.key] = {}), f[p.key][k.key] = `${k.label} is required`;
5324
5350
  return;
5325
5351
  }
5326
- if (w.fieldtype === "number" && k !== "" && k !== null && k !== void 0) {
5327
- const T = Number(k);
5328
- isNaN(T) ? (f[g.key] || (f[g.key] = {}), f[g.key][w.key] = `${w.label} must be a valid number`) : (w.min !== void 0 && T < w.min && (f[g.key] || (f[g.key] = {}), f[g.key][w.key] = `${w.label} must be at least ${w.min}`), w.max !== void 0 && T > w.max && (f[g.key] || (f[g.key] = {}), f[g.key][w.key] = `${w.label} must not exceed ${w.max}`));
5352
+ if (k.fieldtype === "number" && w !== "" && w !== null && w !== void 0) {
5353
+ const T = Number(w);
5354
+ isNaN(T) ? (f[p.key] || (f[p.key] = {}), f[p.key][k.key] = `${k.label} must be a valid number`) : (k.min !== void 0 && T < k.min && (f[p.key] || (f[p.key] = {}), f[p.key][k.key] = `${k.label} must be at least ${k.min}`), k.max !== void 0 && T > k.max && (f[p.key] || (f[p.key] = {}), f[p.key][k.key] = `${k.label} must not exceed ${k.max}`));
5329
5355
  }
5330
5356
  });
5331
- else if (g.type === "datatable") {
5332
- const w = h[g.key];
5333
- Array.isArray(w) && w.forEach((k, T) => {
5334
- g.fields.forEach((L) => {
5335
- const C = k[L.key];
5357
+ else if (p.type === "datatable") {
5358
+ const k = u[p.key];
5359
+ Array.isArray(k) && k.forEach((w, T) => {
5360
+ p.fields.forEach((L) => {
5361
+ const C = w[L.key];
5336
5362
  if (L.required && (!C || typeof C == "string" && C.trim() === "")) {
5337
- f[g.key] || (f[g.key] = {}), f[g.key][T] || (f[g.key][T] = {}), f[g.key][T][L.key] = `${L.label} is required`;
5363
+ f[p.key] || (f[p.key] = {}), f[p.key][T] || (f[p.key][T] = {}), f[p.key][T][L.key] = `${L.label} is required`;
5338
5364
  return;
5339
5365
  }
5340
5366
  if (L.fieldtype === "number" && C !== "" && C !== null && C !== void 0) {
5341
5367
  const M = Number(C);
5342
- isNaN(M) ? (f[g.key] || (f[g.key] = {}), f[g.key][T] || (f[g.key][T] = {}), f[g.key][T][L.key] = `${L.label} must be a valid number`) : (L.min !== void 0 && M < L.min && (f[g.key] || (f[g.key] = {}), f[g.key][T] || (f[g.key][T] = {}), f[g.key][T][L.key] = `${L.label} must be at least ${L.min}`), L.max !== void 0 && M > L.max && (f[g.key] || (f[g.key] = {}), f[g.key][T] || (f[g.key][T] = {}), f[g.key][T][L.key] = `${L.label} must not exceed ${L.max}`));
5368
+ isNaN(M) ? (f[p.key] || (f[p.key] = {}), f[p.key][T] || (f[p.key][T] = {}), f[p.key][T][L.key] = `${L.label} must be a valid number`) : (L.min !== void 0 && M < L.min && (f[p.key] || (f[p.key] = {}), f[p.key][T] || (f[p.key][T] = {}), f[p.key][T][L.key] = `${L.label} must be at least ${L.min}`), L.max !== void 0 && M > L.max && (f[p.key] || (f[p.key] = {}), f[p.key][T] || (f[p.key][T] = {}), f[p.key][T][L.key] = `${L.label} must not exceed ${L.max}`));
5343
5369
  }
5344
5370
  });
5345
5371
  });
5346
5372
  }
5347
5373
  }), f;
5348
5374
  }, S = (f) => Object.keys(f).length > 0, O = () => {
5349
- if (p) {
5375
+ if (g) {
5350
5376
  console.log("[handleSave] Already saving, ignoring duplicate call");
5351
5377
  return;
5352
5378
  }
5353
5379
  console.log("[handleSave] Starting save process");
5354
5380
  const f = b();
5355
5381
  if (E(f), S(f)) {
5356
- let w = [];
5357
- Object.keys(f).forEach((k) => {
5358
- typeof f[k] == "object" && Object.keys(f[k]).forEach((T) => {
5359
- typeof f[k][T] == "object" ? Object.keys(f[k][T]).forEach((L) => {
5360
- w.push(`${k} row ${parseInt(T) + 1}: ${f[k][T][L]}`);
5361
- }) : w.push(`${k}: ${f[k][T]}`);
5382
+ let k = [];
5383
+ Object.keys(f).forEach((w) => {
5384
+ typeof f[w] == "object" && Object.keys(f[w]).forEach((T) => {
5385
+ typeof f[w][T] == "object" ? Object.keys(f[w][T]).forEach((L) => {
5386
+ k.push(`${w} row ${parseInt(T) + 1}: ${f[w][T][L]}`);
5387
+ }) : k.push(`${w}: ${f[w][T]}`);
5362
5388
  });
5363
5389
  });
5364
5390
  return;
5365
5391
  }
5366
5392
  (async () => {
5367
5393
  try {
5368
- z(!0);
5369
- const w = {};
5370
- h && Object.keys(h).forEach((T) => {
5394
+ D(!0);
5395
+ const k = {};
5396
+ u && Object.keys(u).forEach((T) => {
5371
5397
  const L = a?.configuration?.find(
5372
5398
  (C) => C.key === T && C.type === "datatable"
5373
5399
  );
5374
- L && Array.isArray(h[T]) ? w[T] = h[T].map((C) => {
5400
+ L && Array.isArray(u[T]) ? k[T] = u[T].map((C) => {
5375
5401
  const M = { id: C.id || 0 };
5376
- return L.fields && L.fields.forEach((_) => {
5377
- if (_.fieldtype === "audience") {
5402
+ return L.fields && L.fields.forEach((V) => {
5403
+ if (V.fieldtype === "audience") {
5378
5404
  let A = { users: [], groups: [], roles: [] };
5379
- C[_.key] && typeof C[_.key] == "object" && !Array.isArray(C[_.key]) && (A = {
5380
- users: C[_.key].users || [],
5381
- groups: C[_.key].groups || [],
5382
- roles: C[_.key].roles || []
5383
- }), M[_.key] = A;
5405
+ C[V.key] && typeof C[V.key] == "object" && !Array.isArray(C[V.key]) && (A = {
5406
+ users: C[V.key].users || [],
5407
+ groups: C[V.key].groups || [],
5408
+ roles: C[V.key].roles || []
5409
+ }), M[V.key] = A;
5384
5410
  } else
5385
- M[_.key] = C[_.key] || "";
5411
+ M[V.key] = C[V.key] || "";
5386
5412
  }), M;
5387
- }) : w[T] = h[T];
5388
- }), (!w.appkey || w.appkey === "") && (w.appkey = t);
5389
- let k = await xt(P, w);
5390
- if (k && k.status != "fail") {
5391
- E({}), r(JSON.parse(JSON.stringify(h)));
5392
- const T = k.message || "Configuration has been saved successfully";
5393
- qe.success(T), i && typeof i == "function" && i(h);
5413
+ }) : k[T] = u[T];
5414
+ }), (!k.appkey || k.appkey === "") && (k.appkey = t);
5415
+ let w = await xt(P, k);
5416
+ if (w && w.status != "fail") {
5417
+ E({}), r(JSON.parse(JSON.stringify(u)));
5418
+ const T = w.message || "Configuration has been saved successfully";
5419
+ qe.success(T), i && typeof i == "function" && i(u);
5394
5420
  } else
5395
- throw qe.error(k?.message || "Failed to save configuration"), new Error("No response received from server");
5396
- } catch (w) {
5397
- console.error("Error saving configuration:", w), qe.error(w?.message || "Failed to save configuration");
5421
+ throw qe.error(w?.message || "Failed to save configuration"), new Error("No response received from server");
5422
+ } catch (k) {
5423
+ console.error("Error saving configuration:", k), qe.error(k?.message || "Failed to save configuration");
5398
5424
  } finally {
5399
- z(!1);
5425
+ D(!1);
5400
5426
  }
5401
5427
  })();
5402
5428
  }, R = () => {
@@ -5404,9 +5430,9 @@ function Ss({
5404
5430
  };
5405
5431
  if (!o?.configuration && !a?.configuration)
5406
5432
  return /* @__PURE__ */ e("div", { className: "min-h-screen flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "text-gray-500", children: "No configuration available" }) });
5407
- const D = a?.configuration || o?.configuration;
5433
+ const z = a?.configuration || o?.configuration;
5408
5434
  return Z(() => {
5409
- s && a ? (!h || Object.keys(h).length === 0) && $() : s && !a && $();
5435
+ s && a ? (!u || Object.keys(u).length === 0) && $() : s && !a && $();
5410
5436
  }, [s, a]), /* @__PURE__ */ n("div", { children: [
5411
5437
  /* @__PURE__ */ n(
5412
5438
  "div",
@@ -5415,18 +5441,18 @@ function Ss({
5415
5441
  style: { padding: "0px 20px 0px 0px" },
5416
5442
  children: [
5417
5443
  v && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(ba, { size: "large" }) }),
5418
- !v && D?.map((f, g) => {
5419
- const w = zs(f.type);
5420
- if (w && w !== "UnknownType")
5444
+ !v && z?.map((f, p) => {
5445
+ const k = zs(f.type);
5446
+ if (k && k !== "UnknownType")
5421
5447
  return /* @__PURE__ */ e(
5422
- w,
5448
+ k,
5423
5449
  {
5424
5450
  item: f,
5425
- data: h,
5451
+ data: u,
5426
5452
  updateHandler: x,
5427
5453
  validationErrors: F
5428
5454
  },
5429
- g
5455
+ p
5430
5456
  );
5431
5457
  })
5432
5458
  ]
@@ -5439,7 +5465,7 @@ function Ss({
5439
5465
  category: "secondary",
5440
5466
  onClick: R,
5441
5467
  label: "Cancel",
5442
- disabled: p,
5468
+ disabled: g,
5443
5469
  type: "button"
5444
5470
  }
5445
5471
  ),
@@ -5448,8 +5474,8 @@ function Ss({
5448
5474
  {
5449
5475
  category: "primary",
5450
5476
  onClick: O,
5451
- disabled: p,
5452
- label: p ? "Saving..." : "Save",
5477
+ disabled: g,
5478
+ label: g ? "Saving..." : "Save",
5453
5479
  type: "submit"
5454
5480
  }
5455
5481
  )
@@ -5462,8 +5488,8 @@ const Kl = ({
5462
5488
  disableApi: s = !1
5463
5489
  }) => {
5464
5490
  const [i, l] = B(0), [m, o] = B(!1), {
5465
- pageHeader: u = {},
5466
- appletHeader: h = {},
5491
+ pageHeader: h = {},
5492
+ appletHeader: u = {},
5467
5493
  breadcrumb: N = [],
5468
5494
  overview: y = {},
5469
5495
  configuration: r = []
@@ -5480,11 +5506,11 @@ const Kl = ({
5480
5506
  placeholder: a,
5481
5507
  disabled: !1
5482
5508
  }, S.some((f) => f.key === "displayname")) {
5483
- const f = S.findIndex((w) => w.key === "displayname"), g = S[f] || {};
5509
+ const f = S.findIndex((k) => k.key === "displayname"), p = S[f] || {};
5484
5510
  S[f] = {
5485
- ...g,
5486
- default: g.default || g.value || a,
5487
- placeholder: g.placeholder || "Enter display name"
5511
+ ...p,
5512
+ default: p.default || p.value || a,
5513
+ placeholder: p.placeholder || "Enter display name"
5488
5514
  };
5489
5515
  } else {
5490
5516
  const f = {
@@ -5510,11 +5536,11 @@ const Kl = ({
5510
5536
  subHeading: "View app details and customize configurations to align with institutional requirements.",
5511
5537
  isLeftArrow: !0,
5512
5538
  onBackClick: () => window.history.back(),
5513
- ...u
5514
- }, p = N.map((b) => ({
5539
+ ...h
5540
+ }, g = N.map((b) => ({
5515
5541
  label: b.text,
5516
5542
  href: b.href || "#"
5517
- })), z = ee(() => {
5543
+ })), D = ee(() => {
5518
5544
  o(!0);
5519
5545
  }, []), F = ee((b) => {
5520
5546
  o(!1), b.primary && window.history.back();
@@ -5523,12 +5549,12 @@ const Kl = ({
5523
5549
  }, []), I = ee(() => {
5524
5550
  window.history.back();
5525
5551
  }, []), P = (() => {
5526
- if (h.headingKey && Array.isArray(r)) {
5527
- const b = h.headingKey.split("."), S = b[0], O = b[1], R = r.find((D) => D && D.key === S);
5552
+ if (u.headingKey && Array.isArray(r)) {
5553
+ const b = u.headingKey.split("."), S = b[0], O = b[1], R = r.find((z) => z && z.key === S);
5528
5554
  if (R && R.fields) {
5529
- const D = R.fields.find((f) => f && f.key === O);
5530
- if (D)
5531
- return D.default ?? D.value ?? h.heading ?? a;
5555
+ const z = R.fields.find((f) => f && f.key === O);
5556
+ if (z)
5557
+ return z.default ?? z.value ?? u.heading ?? a;
5532
5558
  }
5533
5559
  }
5534
5560
  if (Array.isArray(r)) {
@@ -5538,11 +5564,11 @@ const Kl = ({
5538
5564
  if (S) return S.default ?? S.value ?? a;
5539
5565
  }
5540
5566
  }
5541
- return h.heading || a;
5542
- })(), j = {
5567
+ return u.heading || a;
5568
+ })(), _ = {
5543
5569
  subHeading: "Application configuration and details",
5544
5570
  tags: [],
5545
- ...h,
5571
+ ...u,
5546
5572
  heading: P
5547
5573
  // Use resolvedDisplayName only
5548
5574
  }, U = {
@@ -5567,8 +5593,8 @@ const Kl = ({
5567
5593
  configuration: v
5568
5594
  }), [v]), q = ae(() => [
5569
5595
  { label: "Overview", content: x(U) },
5570
- { label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: Y, disableApi: s, onSave: E, onShowCancelModal: z, onCancel: I }) }
5571
- ], [a, Y, s, E, z, I, U]);
5596
+ { label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: Y, disableApi: s, onSave: E, onShowCancelModal: D, onCancel: I }) }
5597
+ ], [a, Y, s, E, D, I, U]);
5572
5598
  function $(b) {
5573
5599
  return b ? b.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: b } }) : b : "📱";
5574
5600
  }
@@ -5611,18 +5637,18 @@ const Kl = ({
5611
5637
  Un,
5612
5638
  {
5613
5639
  heading: d.heading,
5614
- subHeading: p.length > 0 ? void 0 : d.subHeading,
5615
- breadcrumbItems: p,
5640
+ subHeading: g.length > 0 ? void 0 : d.subHeading,
5641
+ breadcrumbItems: g,
5616
5642
  isLeftArrow: d.isLeftArrow,
5617
5643
  onBackClick: d.onBackClick
5618
5644
  }
5619
5645
  ),
5620
5646
  /* @__PURE__ */ n("div", { className: "bg-[#ffffff] border border-[#eef2f6] rounded-[12px] px-6 py-5 flex gap-4 items-start mb-4 shadow-sm", children: [
5621
- /* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children: $(j.icon) }),
5647
+ /* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children: $(_.icon) }),
5622
5648
  /* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
5623
- /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: j.heading }),
5624
- /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: j.subHeading }),
5625
- /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: j.tags && j.tags.map((b, S) => /* @__PURE__ */ e(
5649
+ /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: _.heading }),
5650
+ /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: _.subHeading }),
5651
+ /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: _.tags && _.tags.map((b, S) => /* @__PURE__ */ e(
5626
5652
  "span",
5627
5653
  {
5628
5654
  className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
@@ -5665,70 +5691,70 @@ const Kl = ({
5665
5691
  allowEdit: l = !0,
5666
5692
  allowDelete: m = !0,
5667
5693
  allowReorder: o = !0,
5668
- initialData: u = null
5694
+ initialData: h = null
5669
5695
  }) => {
5670
- const [h, N] = B(null), [y, r] = B(""), [v, d] = B(() => Array.isArray(u) ? u : []), [p, z] = B(null), [F, E] = B(null), [I, P] = B("");
5696
+ const [u, N] = B(null), [y, r] = B(""), [v, d] = B(() => Array.isArray(h) ? h : []), [g, D] = B(null), [F, E] = B(null), [I, P] = B("");
5671
5697
  Z(() => {
5672
- Array.isArray(u) && d(u);
5673
- }, [u]);
5674
- const j = (g) => {
5675
- l && (N(g._id), r(g.categoryName || ""));
5698
+ Array.isArray(h) && d(h);
5699
+ }, [h]);
5700
+ const _ = (p) => {
5701
+ l && (N(p._id), r(p.categoryName || ""));
5676
5702
  }, U = () => {
5677
- if (!i || h !== null) return;
5678
- const w = (v.length > 0 ? Math.max(...v.map((k) => typeof k._id == "number" ? k._id : 0)) : 0) + 1;
5679
- d((k) => [
5680
- ...k,
5703
+ if (!i || u !== null) return;
5704
+ const k = (v.length > 0 ? Math.max(...v.map((w) => typeof w._id == "number" ? w._id : 0)) : 0) + 1;
5705
+ d((w) => [
5706
+ ...w,
5681
5707
  {
5682
- _id: w,
5708
+ _id: k,
5683
5709
  categoryName: "",
5684
5710
  links: [],
5685
- order: (k.at(-1)?.order ?? 0) + 1,
5711
+ order: (w.at(-1)?.order ?? 0) + 1,
5686
5712
  protected: !1,
5687
5713
  _class: "com.unifyed.model.Collection"
5688
5714
  }
5689
- ]), N(w), r("");
5715
+ ]), N(k), r("");
5690
5716
  }, Y = () => {
5691
- h != null && (d((g) => {
5692
- const k = !Array.isArray(u) || !u.some((T) => T._id === h) ? g.filter((T) => T._id !== h) : g;
5693
- return a?.(k), k;
5717
+ u != null && (d((p) => {
5718
+ const w = !Array.isArray(h) || !h.some((T) => T._id === u) ? p.filter((T) => T._id !== u) : p;
5719
+ return a?.(w), w;
5694
5720
  }), N(null), r(""));
5695
5721
  }, q = () => {
5696
- h == null || !y.trim() || (d((g) => {
5697
- const w = g.map((k) => k._id === h ? {
5698
- ...k,
5722
+ u == null || !y.trim() || (d((p) => {
5723
+ const k = p.map((w) => w._id === u ? {
5724
+ ...w,
5699
5725
  categoryName: y.trim()
5700
- } : k);
5701
- return a?.(w), w;
5702
- }), N(null), r(""));
5703
- }, $ = (g) => {
5704
- m && d((w) => {
5705
- const k = w.filter((T) => T._id !== g._id);
5726
+ } : w);
5706
5727
  return a?.(k), k;
5728
+ }), N(null), r(""));
5729
+ }, $ = (p) => {
5730
+ m && d((k) => {
5731
+ const w = k.filter((T) => T._id !== p._id);
5732
+ return a?.(w), w;
5707
5733
  });
5708
- }, x = (g, w, k) => {
5709
- const T = Number(w), L = Number(k);
5710
- if (!o || T === L) return g;
5711
- const C = g.findIndex((G) => Number(G._id) === T), M = g.findIndex((G) => Number(G._id) === L);
5712
- if (C === -1 || M === -1) return g;
5713
- const _ = [...g], [A] = _.splice(C, 1);
5714
- return _.splice(M, 0, A), _.map((G, W) => ({ ...G, order: W + 1 }));
5715
- }, b = (g, w) => {
5716
- o && (g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/plain", String(w)), z(Number(w)));
5717
- }, S = (g) => {
5718
- p && g !== F && E(g);
5719
- }, O = (g) => {
5720
- g.preventDefault();
5721
- }, R = (g, w) => {
5722
- g.preventDefault();
5723
- const k = g.dataTransfer.getData("text/plain"), T = k === "0" ? 0 : Number(k), L = w === "0" ? 0 : Number(w);
5734
+ }, x = (p, k, w) => {
5735
+ const T = Number(k), L = Number(w);
5736
+ if (!o || T === L) return p;
5737
+ const C = p.findIndex((G) => Number(G._id) === T), M = p.findIndex((G) => Number(G._id) === L);
5738
+ if (C === -1 || M === -1) return p;
5739
+ const V = [...p], [A] = V.splice(C, 1);
5740
+ return V.splice(M, 0, A), V.map((G, W) => ({ ...G, order: W + 1 }));
5741
+ }, b = (p, k) => {
5742
+ o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(k)), D(Number(k)));
5743
+ }, S = (p) => {
5744
+ g && p !== F && E(p);
5745
+ }, O = (p) => {
5746
+ p.preventDefault();
5747
+ }, R = (p, k) => {
5748
+ p.preventDefault();
5749
+ const w = p.dataTransfer.getData("text/plain"), T = w === "0" ? 0 : Number(w), L = k === "0" ? 0 : Number(k);
5724
5750
  T === void 0 || L === void 0 || (d((C) => {
5725
5751
  const M = x(C, T, L);
5726
5752
  return a?.(M), M;
5727
- }), z(null), E(null));
5728
- }, D = () => {
5729
- z(null), E(null);
5753
+ }), D(null), E(null));
5754
+ }, z = () => {
5755
+ D(null), E(null);
5730
5756
  }, f = Array.isArray(v) ? v.filter(
5731
- (g) => g.categoryName?.toLowerCase().includes(I.toLowerCase())
5757
+ (p) => p.categoryName?.toLowerCase().includes(I.toLowerCase())
5732
5758
  ) : [];
5733
5759
  return /* @__PURE__ */ n("div", { className: `manage-collection-list ${t}`, children: [
5734
5760
  /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
@@ -5746,37 +5772,37 @@ const Kl = ({
5746
5772
  {
5747
5773
  className: [
5748
5774
  "px-4 py-3 bg-black text-white rounded-2xl ml-4",
5749
- h !== null ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
5775
+ u !== null ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
5750
5776
  ].join(" "),
5751
5777
  onClick: U,
5752
- disabled: h !== null,
5778
+ disabled: u !== null,
5753
5779
  children: "Add a Collection"
5754
5780
  }
5755
5781
  )
5756
5782
  ] }) }),
5757
- /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: f.map((g) => {
5758
- const w = h === g._id, k = g?.links?.length ?? 0, T = p === g._id, L = F === g._id && p !== g._id;
5783
+ /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: f.map((p) => {
5784
+ const k = u === p._id, w = p?.links?.length ?? 0, T = g === p._id, L = F === p._id && g !== p._id;
5759
5785
  return /* @__PURE__ */ e(
5760
5786
  "div",
5761
5787
  {
5762
- onDragEnter: () => S(g._id),
5788
+ onDragEnter: () => S(p._id),
5763
5789
  onDragOver: O,
5764
- onDrop: (C) => R(C, g._id),
5765
- onDragEnd: D,
5790
+ onDrop: (C) => R(C, p._id),
5791
+ onDragEnd: z,
5766
5792
  className: [
5767
5793
  "flex items-center justify-between p-3 border rounded-2xl mb-3",
5768
5794
  "border-gray-300",
5769
5795
  L ? "ring-2 ring-gray-800/20" : "",
5770
5796
  T ? "opacity-60" : ""
5771
5797
  ].join(" "),
5772
- children: w ? /* @__PURE__ */ n(te, { children: [
5798
+ children: k ? /* @__PURE__ */ n(te, { children: [
5773
5799
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
5774
5800
  "input",
5775
5801
  {
5776
5802
  type: "text",
5777
5803
  className: "flex-1 h-10 px-3 max-w-[200px] border border-gray-300 rounded-2xl outline-none focus:ring-2 focus:ring-gray-800/20",
5778
5804
  value: y,
5779
- placeholder: !Array.isArray(u) || !u.some((C) => C._id === g._id) ? "New collection name" : "Edit collection name",
5805
+ placeholder: !Array.isArray(h) || !h.some((C) => C._id === p._id) ? "New collection name" : "Edit collection name",
5780
5806
  onChange: (C) => r(C.target.value),
5781
5807
  onKeyDown: (C) => {
5782
5808
  C.key === "Enter" && q(), C.key === "Escape" && Y();
@@ -5818,36 +5844,36 @@ const Kl = ({
5818
5844
  "aria-label": "Drag to reorder",
5819
5845
  className: "cursor-grab active:cursor-grabbing p-1 -m-1 rounded-md hover:bg-gray-50",
5820
5846
  draggable: !0,
5821
- onDragStart: (C) => b(C, g._id),
5847
+ onDragStart: (C) => b(C, p._id),
5822
5848
  children: /* @__PURE__ */ e(wt, {})
5823
5849
  }
5824
5850
  ),
5825
- /* @__PURE__ */ e("span", { children: g.categoryName })
5851
+ /* @__PURE__ */ e("span", { children: p.categoryName })
5826
5852
  ] }),
5827
5853
  /* @__PURE__ */ n("div", { className: "flex gap-2 items-center", children: [
5828
- g.protected ? /* @__PURE__ */ e("span", { className: "text-sm text-gray-600 cursor-default", children: g.qlAppName }) : /* @__PURE__ */ e("span", { className: "text-sm text-blue-600 cursor-default", children: `${k} ${k === 1 ? "link" : "links"}` }),
5854
+ p.protected ? /* @__PURE__ */ e("span", { className: "text-sm text-gray-600 cursor-default", children: p.qlAppName }) : /* @__PURE__ */ e("span", { className: "text-sm text-blue-600 cursor-default", children: `${w} ${w === 1 ? "link" : "links"}` }),
5829
5855
  l && /* @__PURE__ */ e(
5830
5856
  "button",
5831
5857
  {
5832
5858
  className: "cursor-pointer",
5833
- onClick: () => j(g),
5834
- "aria-label": `Edit ${g.categoryName}`,
5859
+ onClick: () => _(p),
5860
+ "aria-label": `Edit ${p.categoryName}`,
5835
5861
  children: /* @__PURE__ */ e(xr, { color: "#767676" })
5836
5862
  }
5837
5863
  ),
5838
5864
  m && /* @__PURE__ */ e(
5839
5865
  "span",
5840
5866
  {
5841
- className: k === 0 && !g.protected ? "cursor-pointer" : "cursor-not-allowed",
5842
- title: k === 0 && !g.protected ? "Delete" : "Cannot delete a collection with linked items",
5843
- onClick: k === 0 ? () => $(g) : null,
5844
- children: /* @__PURE__ */ e(Le, { color: k === 0 ? "#767676" : "#C2C2C2" })
5867
+ className: w === 0 && !p.protected ? "cursor-pointer" : "cursor-not-allowed",
5868
+ title: w === 0 && !p.protected ? "Delete" : "Cannot delete a collection with linked items",
5869
+ onClick: w === 0 ? () => $(p) : null,
5870
+ children: /* @__PURE__ */ e(Le, { color: w === 0 ? "#767676" : "#C2C2C2" })
5845
5871
  }
5846
5872
  )
5847
5873
  ] })
5848
5874
  ] })
5849
5875
  },
5850
- g._id
5876
+ p._id
5851
5877
  );
5852
5878
  }) })
5853
5879
  ] });
@@ -5932,23 +5958,23 @@ const Bt = () => {
5932
5958
  // preferred
5933
5959
  onAdd: m,
5934
5960
  onFilterOpen: o,
5935
- addBtnText: u = "Add",
5961
+ addBtnText: h = "Add",
5936
5962
  // Feature toggles
5937
- showSearch: h = !0,
5963
+ showSearch: u = !0,
5938
5964
  showDelete: N = !0,
5939
5965
  showColumnChooser: y = !0,
5940
5966
  showFilter: r = !1,
5941
5967
  showPrint: v = !1,
5942
5968
  showExcel: d = !1,
5943
- showPdf: p = !1,
5944
- showRefresh: z = !1,
5969
+ showPdf: g = !1,
5970
+ showRefresh: D = !1,
5945
5971
  showAdd: F = !1,
5946
5972
  iSelectedRecords: E = 0,
5947
5973
  // Additional props
5948
5974
  searchPlaceholder: I = "Search...",
5949
5975
  handleRefreshClick: P = () => {
5950
5976
  },
5951
- handleSearchChange: j = () => {
5977
+ handleSearchChange: _ = () => {
5952
5978
  },
5953
5979
  handleDeleteClick: U = () => {
5954
5980
  },
@@ -5959,7 +5985,7 @@ const Bt = () => {
5959
5985
  searchIconClass: x,
5960
5986
  inputStyle: b
5961
5987
  }) => {
5962
- const S = () => l?.current || i?.current, [O, R] = re.useState(""), D = (t || "export").toString().trim() || "export", f = `${Y || D}.xlsx`, g = `${q || D}.pdf`, w = (L, C, M) => Math.max(C, Math.min(L, M)), k = ee(
5988
+ const S = () => l?.current || i?.current, [O, R] = re.useState(""), z = (t || "export").toString().trim() || "export", f = `${Y || z}.xlsx`, p = `${q || z}.pdf`, k = (L, C, M) => Math.max(C, Math.min(L, M)), w = ee(
5963
5989
  (L) => {
5964
5990
  const C = S();
5965
5991
  if (C?.openColumnChooser) {
@@ -5968,10 +5994,10 @@ const Bt = () => {
5968
5994
  return;
5969
5995
  }
5970
5996
  try {
5971
- const M = L.currentTarget.getBoundingClientRect(), _ = M.left + window.scrollX, A = M.bottom + window.scrollY;
5972
- let G = _ - 120, W = A - 120;
5997
+ const M = L.currentTarget.getBoundingClientRect(), V = M.left + window.scrollX, A = M.bottom + window.scrollY;
5998
+ let G = V - 120, W = A - 120;
5973
5999
  const pe = window.innerWidth, Ne = window.innerHeight;
5974
- G = w(G, window.scrollX + 8, window.scrollX + pe - 340), W = w(W, window.scrollY, window.scrollY + Ne - 120), C.openColumnChooser(G, W);
6000
+ G = k(G, window.scrollX + 8, window.scrollX + pe - 340), W = k(W, window.scrollY, window.scrollY + Ne - 120), C.openColumnChooser(G, W);
5975
6001
  } catch (M) {
5976
6002
  console.log("coloumn choose error", M);
5977
6003
  }
@@ -5986,13 +6012,13 @@ const Bt = () => {
5986
6012
  switch (L) {
5987
6013
  case "Delete": {
5988
6014
  if (N) {
5989
- const _ = M.getSelectedRecords();
5990
- return U(_);
6015
+ const V = M.getSelectedRecords();
6016
+ return U(V);
5991
6017
  }
5992
6018
  break;
5993
6019
  }
5994
6020
  case "ColumnChooser":
5995
- y && (C ? k(C) : M.openColumnChooser?.());
6021
+ y && (C ? w(C) : M.openColumnChooser?.());
5996
6022
  break;
5997
6023
  case "Print":
5998
6024
  v && M.print?.();
@@ -6001,14 +6027,14 @@ const Bt = () => {
6001
6027
  d && M.excelExport?.({ fileName: f });
6002
6028
  break;
6003
6029
  case "Pdf":
6004
- p && M.pdfExport?.({ fileName: g });
6030
+ g && M.pdfExport?.({ fileName: p });
6005
6031
  break;
6006
6032
  case "Refresh":
6007
- z && P();
6033
+ D && P();
6008
6034
  break;
6009
6035
  }
6010
6036
  },
6011
- [y, v, d, p, z, f, g, P, k]
6037
+ [y, v, d, g, D, f, p, P, w]
6012
6038
  );
6013
6039
  return /* @__PURE__ */ n("div", { className: "flex items-center flex-wrap justify-between w-full px-4 py-2 bg-white border border-gray-200 rounded-t-2xl mb-0", children: [
6014
6040
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
@@ -6020,13 +6046,13 @@ const Bt = () => {
6020
6046
  a ? /* @__PURE__ */ e("div", { className: "text-sm text-gray-500", children: a }) : null
6021
6047
  ] }),
6022
6048
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
6023
- h && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
6049
+ u && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
6024
6050
  ge,
6025
6051
  {
6026
6052
  placeholder: I,
6027
6053
  value: O,
6028
6054
  onDebouncedChange: (L) => {
6029
- R(L), j(L);
6055
+ R(L), _(L);
6030
6056
  },
6031
6057
  searchIconSize: $ || 16,
6032
6058
  searchIconClass: x || "",
@@ -6076,7 +6102,7 @@ const Bt = () => {
6076
6102
  ariaLabel: "Excel Download"
6077
6103
  }
6078
6104
  ),
6079
- p && /* @__PURE__ */ e(
6105
+ g && /* @__PURE__ */ e(
6080
6106
  Ce,
6081
6107
  {
6082
6108
  icon: Cr,
@@ -6084,7 +6110,7 @@ const Bt = () => {
6084
6110
  ariaLabel: "PDF Download"
6085
6111
  }
6086
6112
  ),
6087
- z && /* @__PURE__ */ e(
6113
+ D && /* @__PURE__ */ e(
6088
6114
  Ce,
6089
6115
  {
6090
6116
  icon: zr,
@@ -6096,12 +6122,12 @@ const Bt = () => {
6096
6122
  F && m && /* @__PURE__ */ e(
6097
6123
  le,
6098
6124
  {
6099
- label: u,
6125
+ label: h,
6100
6126
  icon: Sr,
6101
6127
  onClick: m,
6102
6128
  size: "small",
6103
6129
  ariaLabel: "Add New",
6104
- title: u
6130
+ title: h
6105
6131
  }
6106
6132
  )
6107
6133
  ] })
@@ -6117,20 +6143,20 @@ function ai(t) {
6117
6143
  // 1-based
6118
6144
  pageSize: m = 20,
6119
6145
  allowPaging: o = !0,
6120
- allowSorting: u = !0,
6121
- allowFiltering: h = !1,
6146
+ allowSorting: h = !0,
6147
+ allowFiltering: u = !1,
6122
6148
  allowGrouping: N = !1,
6123
6149
  allowReordering: y = !0,
6124
6150
  allowResizing: r = !0,
6125
6151
  allowExcelExport: v = !1,
6126
6152
  allowPdfExport: d = !1,
6127
- showColumnChooser: p = !1,
6128
- enableSearchApi: z = !1,
6153
+ showColumnChooser: g = !1,
6154
+ enableSearchApi: D = !1,
6129
6155
  height: F = "600",
6130
6156
  selectionSettings: E,
6131
6157
  enableCheckbox: I = !1,
6132
6158
  columns: P = [],
6133
- onGridStateChange: j,
6159
+ onGridStateChange: _,
6134
6160
  onRowSelected: U,
6135
6161
  onRowDeselected: Y,
6136
6162
  onRowDoubleClick: q,
@@ -6140,78 +6166,78 @@ function ai(t) {
6140
6166
  pageSettings: S,
6141
6167
  sortSettings: O,
6142
6168
  ...R
6143
- } = x || {}, [D, f] = re.useState(S?.page || l), [g, w] = re.useState(S?.pageSize || m), [k, T] = re.useState(O?.sortKey || "updatedDate"), [L, C] = re.useState(O?.direction || "Descending"), M = ae(() => {
6144
- const V = E || {
6169
+ } = x || {}, [z, f] = re.useState(S?.page || l), [p, k] = re.useState(S?.pageSize || m), [w, T] = re.useState(O?.sortKey || "updatedDate"), [L, C] = re.useState(O?.direction || "Descending"), M = ae(() => {
6170
+ const j = E || {
6145
6171
  type: "Multiple",
6146
6172
  mode: "Row"
6147
6173
  };
6148
6174
  return I ? {
6149
- ...V,
6175
+ ...j,
6150
6176
  // These are important for checkbox selection
6151
6177
  enableToggle: !0,
6152
6178
  persistSelection: !0,
6153
6179
  // Enable checkbox specific settings
6154
6180
  checkboxOnly: !1,
6155
6181
  enableSimpleMultiRowSelection: !0
6156
- } : V;
6157
- }, [E, I]), _ = ae(() => {
6158
- const V = [ln];
6159
- return (I || E) && V.push(on), u && V.push(cn), h && V.push(dn), N && V.push(mn), z && V.push(un), v && V.push(hn), d && V.push(pn), p && V.push(gn), r && V.push(bn), y && V.push(fn), V.push(yn), V;
6182
+ } : j;
6183
+ }, [E, I]), V = ae(() => {
6184
+ const j = [ln];
6185
+ return (I || E) && j.push(on), h && j.push(cn), u && j.push(dn), N && j.push(mn), D && j.push(un), v && j.push(hn), d && j.push(pn), g && j.push(gn), r && j.push(bn), y && j.push(fn), j.push(yn), j;
6160
6186
  }, [
6161
- u,
6162
6187
  h,
6188
+ u,
6163
6189
  N,
6164
- z,
6190
+ D,
6165
6191
  v,
6166
6192
  d,
6167
- p,
6193
+ g,
6168
6194
  r,
6169
6195
  y,
6170
6196
  I,
6171
6197
  E
6172
6198
  ]), A = ae(() => {
6173
- const V = () => b.current, ne = (J, ce) => {
6199
+ const j = () => b.current, ne = (J, ce) => {
6174
6200
  !ce && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
6175
6201
  };
6176
6202
  return {
6177
- getInstance: () => V(),
6178
- refresh: () => V()?.refresh?.(),
6179
- getSelectedRecords: () => V()?.getSelectedRecords?.() ?? [],
6180
- clearSelection: () => V()?.clearSelection?.(),
6181
- selectRow: (J, ce = !1) => V()?.selectRow?.(J, ce),
6182
- selectRows: (J, ce = !1) => V()?.selectRows?.(J, ce),
6203
+ getInstance: () => j(),
6204
+ refresh: () => j()?.refresh?.(),
6205
+ getSelectedRecords: () => j()?.getSelectedRecords?.() ?? [],
6206
+ clearSelection: () => j()?.clearSelection?.(),
6207
+ selectRow: (J, ce = !1) => j()?.selectRow?.(J, ce),
6208
+ selectRows: (J, ce = !1) => j()?.selectRows?.(J, ce),
6183
6209
  search: (J) => {
6184
- ne("search()", z), V()?.search?.(J);
6210
+ ne("search()", D), j()?.search?.(J);
6185
6211
  },
6186
- print: () => V()?.print?.(),
6212
+ print: () => j()?.print?.(),
6187
6213
  excelExport: (J) => {
6188
- ne("excelExport()", v), V()?.excelExport?.(J);
6214
+ ne("excelExport()", v), j()?.excelExport?.(J);
6189
6215
  },
6190
6216
  pdfExport: (J) => {
6191
- ne("pdfExport()", d), V()?.pdfExport?.(J);
6217
+ ne("pdfExport()", d), j()?.pdfExport?.(J);
6192
6218
  },
6193
6219
  openColumnChooser: (J, ce) => {
6194
- ne("openColumnChooser()", p), V()?.columnChooserModule?.openColumnChooser?.(J, ce);
6220
+ ne("openColumnChooser()", g), j()?.columnChooserModule?.openColumnChooser?.(J, ce);
6195
6221
  },
6196
6222
  // Additional useful methods
6197
- getColumns: () => V()?.getColumns?.(),
6198
- getFilteredRecords: () => V()?.getFilteredRecords?.(),
6199
- autoFitColumns: (J) => V()?.autoFitColumns?.(J)
6223
+ getColumns: () => j()?.getColumns?.(),
6224
+ getFilteredRecords: () => j()?.getFilteredRecords?.(),
6225
+ autoFitColumns: (J) => j()?.autoFitColumns?.(J)
6200
6226
  };
6201
- }, [z, v, d, p]);
6227
+ }, [D, v, d, g]);
6202
6228
  Z(() => {
6203
6229
  $ && ($.current = A);
6204
6230
  }, [$, A]), Z(() => () => {
6205
6231
  $ && ($.current = null);
6206
6232
  }, [$]);
6207
- const G = (V) => {
6208
- const ne = String(V || "");
6233
+ const G = (j) => {
6234
+ const ne = String(j || "");
6209
6235
  return ne === "Ascending" || ne === "Descending" ? ne : ne.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6210
- }, W = (V) => {
6211
- const ne = b.current, J = V?.requestType, ce = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Re = V?.pageSize ?? ne?.pageSettings?.pageSize ?? g, _e = V?.currentPage ?? ne?.pageSettings?.currentPage ?? l, rt = V?.columnName && V?.direction ? [{ field: V.columnName, dir: G(V.direction) }] : (ne?.sortSettings?.columns || []).map((Ie) => ({
6236
+ }, W = (j) => {
6237
+ const ne = b.current, J = j?.requestType, ce = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Re = j?.pageSize ?? ne?.pageSettings?.pageSize ?? p, _e = j?.currentPage ?? ne?.pageSettings?.currentPage ?? l, rt = j?.columnName && j?.direction ? [{ field: j.columnName, dir: G(j.direction) }] : (ne?.sortSettings?.columns || []).map((Ie) => ({
6212
6238
  field: Ie.field,
6213
6239
  dir: G(Ie.direction ?? Ie.dir)
6214
- })), nt = V?.searchString ?? "", st = V?.columns ?? ne?.filterSettings?.columns ?? [];
6240
+ })), nt = j?.searchString ?? "", st = j?.columns ?? ne?.filterSettings?.columns ?? [];
6215
6241
  return {
6216
6242
  reason: ce,
6217
6243
  page: {
@@ -6223,17 +6249,17 @@ function ai(t) {
6223
6249
  sort: rt,
6224
6250
  search: nt,
6225
6251
  filters: st,
6226
- rawEvent: V
6252
+ rawEvent: j
6227
6253
  };
6228
- }, pe = (V) => {
6254
+ }, pe = (j) => {
6229
6255
  setTimeout(() => {
6230
6256
  b?.current?.hideSpinner();
6231
- }, 1e3), V.requestType === "paging" && (f(V.currentPage), w(V.pageSize)), V.requestType === "sorting" && (T(V.columnName || "updatedDate"), C(V.direction)), j?.(W(V), V);
6232
- }, Ne = (V) => {
6233
- q?.(V?.rowData, V);
6257
+ }, 1e3), j.requestType === "paging" && (f(j.currentPage), k(j.pageSize)), j.requestType === "sorting" && (T(j.columnName || "updatedDate"), C(j.direction)), _?.(W(j), j);
6258
+ }, Ne = (j) => {
6259
+ q?.(j?.rowData, j);
6234
6260
  }, Ta = () => {
6235
- const V = [];
6236
- return I && V.push(
6261
+ const j = [];
6262
+ return I && j.push(
6237
6263
  /* @__PURE__ */ e(
6238
6264
  $t,
6239
6265
  {
@@ -6265,7 +6291,7 @@ function ai(t) {
6265
6291
  customAttributes: Ba,
6266
6292
  ...Va
6267
6293
  } = ne || {};
6268
- V.push(
6294
+ j.push(
6269
6295
  /* @__PURE__ */ e(
6270
6296
  $t,
6271
6297
  {
@@ -6289,16 +6315,16 @@ function ai(t) {
6289
6315
  ce || `col-${J}`
6290
6316
  )
6291
6317
  );
6292
- }), V;
6318
+ }), j;
6293
6319
  }, Aa = ae(() => ({
6294
- currentPage: D,
6295
- pageSize: g,
6320
+ currentPage: z,
6321
+ pageSize: p,
6296
6322
  pageSizes: S?.pageSizes ?? [10, 20, 40, 60, 80, 100],
6297
6323
  totalCount: s
6298
- }), [D, g, S?.pageSizes, s]), Fa = ae(() => O ?? {
6299
- columns: [{ field: k, direction: G(L) }],
6324
+ }), [z, p, S?.pageSizes, s]), Fa = ae(() => O ?? {
6325
+ columns: [{ field: w, direction: G(L) }],
6300
6326
  allowUnsort: !1
6301
- }, [O, k, L]);
6327
+ }, [O, w, L]);
6302
6328
  return /* @__PURE__ */ n(
6303
6329
  xn,
6304
6330
  {
@@ -6310,12 +6336,12 @@ function ai(t) {
6310
6336
  },
6311
6337
  height: F,
6312
6338
  allowPaging: o,
6313
- allowSorting: u,
6314
- allowFiltering: h,
6339
+ allowSorting: h,
6340
+ allowFiltering: u,
6315
6341
  allowGrouping: N,
6316
6342
  allowReordering: y,
6317
6343
  allowResizing: r,
6318
- showColumnChooser: p,
6344
+ showColumnChooser: g,
6319
6345
  selectionSettings: M,
6320
6346
  pageSettings: Aa,
6321
6347
  sortSettings: Fa,
@@ -6327,7 +6353,7 @@ function ai(t) {
6327
6353
  ...R,
6328
6354
  children: [
6329
6355
  /* @__PURE__ */ e(vn, { children: Ta() }),
6330
- /* @__PURE__ */ e(Nn, { services: _ })
6356
+ /* @__PURE__ */ e(Nn, { services: V })
6331
6357
  ]
6332
6358
  }
6333
6359
  );
@@ -6364,14 +6390,14 @@ function oe({
6364
6390
  onSelect: l,
6365
6391
  identity: m = "_id",
6366
6392
  details: o = {},
6367
- ...u
6393
+ ...h
6368
6394
  }) {
6369
- const h = He(), N = $s(u, m), y = (v) => {
6395
+ const u = He(), N = $s(h, m), y = (v) => {
6370
6396
  l?.({
6371
6397
  key: N,
6372
6398
  checked: v.target.checked,
6373
6399
  details: o,
6374
- props: u
6400
+ props: h
6375
6401
  });
6376
6402
  }, r = i === "top-right" ? "top-3 right-3" : "top-3 left-3";
6377
6403
  return /* @__PURE__ */ n(
@@ -6383,7 +6409,7 @@ function oe({
6383
6409
  s && /* @__PURE__ */ e("div", { className: `absolute ${r} z-10`, children: /* @__PURE__ */ e(
6384
6410
  "input",
6385
6411
  {
6386
- id: h,
6412
+ id: u,
6387
6413
  type: "checkbox",
6388
6414
  className: "h-4 w-4 rounded border-zinc-300 focus:ring-[var(--primaryColor)]",
6389
6415
  onChange: y,
@@ -6411,38 +6437,38 @@ function Ts({
6411
6437
  // content
6412
6438
  title: m = "Activity",
6413
6439
  group: o = "Global",
6414
- moreGroupsLabel: u = "+ 5 more",
6415
- author: h = "Judith Black",
6440
+ moreGroupsLabel: h = "+ 5 more",
6441
+ author: u = "Judith Black",
6416
6442
  timeLabel: N = "Just now",
6417
6443
  imageUrl: y = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
6418
6444
  description: r = "Columbia University is a prestigious Ivy League institution located in the heart of New York City.",
6419
6445
  // spread remaining props (_id, instanceId, etc.)
6420
6446
  ...v
6421
6447
  }) {
6422
- const d = de(t), p = me[d];
6448
+ const d = de(t), g = me[d];
6423
6449
  return /* @__PURE__ */ n(
6424
6450
  oe,
6425
6451
  {
6426
- className: `flex flex-col ${p.card}`,
6452
+ className: `flex flex-col ${g.card}`,
6427
6453
  showCheckbox: a,
6428
6454
  checkboxPosition: s,
6429
6455
  onSelect: i,
6430
6456
  identity: l,
6431
- details: { type: "activity", title: m, group: o, author: h },
6457
+ details: { type: "activity", title: m, group: o, author: u },
6432
6458
  ...v,
6433
6459
  children: [
6434
- /* @__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 }) }),
6435
- /* @__PURE__ */ n("div", { className: `text-zinc-500 dark:text-zinc-400 ${p.meta}`, children: [
6460
+ /* @__PURE__ */ e("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${g.title} ml-3`, children: m }) }),
6461
+ /* @__PURE__ */ n("div", { className: `text-zinc-500 dark:text-zinc-400 ${g.meta}`, children: [
6436
6462
  "Posted in ",
6437
6463
  /* @__PURE__ */ e("span", { className: "font-medium", children: "Global" }),
6438
- u ? /* @__PURE__ */ n(te, { children: [
6464
+ h ? /* @__PURE__ */ n(te, { children: [
6439
6465
  ",",
6440
6466
  " ",
6441
6467
  /* @__PURE__ */ e(
6442
6468
  "span",
6443
6469
  {
6444
6470
  className: "font-medium text-indigo-700",
6445
- children: u
6471
+ children: h
6446
6472
  }
6447
6473
  )
6448
6474
  ] }) : null,
@@ -6452,8 +6478,8 @@ function Ts({
6452
6478
  /* @__PURE__ */ n("div", { className: "mt-2 flex items-center gap-3", children: [
6453
6479
  /* @__PURE__ */ e(we, { name: "John", size: "medium" }),
6454
6480
  /* @__PURE__ */ n("div", { className: "leading-tight", children: [
6455
- /* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100", children: h }),
6456
- /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${p.meta}`, children: N })
6481
+ /* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100", children: u }),
6482
+ /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${g.meta}`, children: N })
6457
6483
  ] })
6458
6484
  ] }),
6459
6485
  /* @__PURE__ */ n("p", { className: "mt-2 text-zinc-700 dark:text-zinc-300", children: [
@@ -6470,7 +6496,7 @@ function Ts({
6470
6496
  /* @__PURE__ */ e(
6471
6497
  "div",
6472
6498
  {
6473
- className: `mt-3 overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800 ${p.media}`,
6499
+ className: `mt-3 overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800 ${g.media}`,
6474
6500
  children: /* @__PURE__ */ e("img", { src: y, alt: "", className: "h-full w-full object-cover" })
6475
6501
  }
6476
6502
  ),
@@ -6534,9 +6560,9 @@ function Is({
6534
6560
  title: m = "Communities",
6535
6561
  activeTab: o = "joined",
6536
6562
  // "joined" | "suggested"
6537
- items: u = Es,
6563
+ items: h = Es,
6538
6564
  // spread for identity (_id/instanceId/etc)
6539
- ...h
6565
+ ...u
6540
6566
  }) {
6541
6567
  const N = de(t), y = me[N], r = Rs[N], v = (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"}`;
6542
6568
  return /* @__PURE__ */ n(
@@ -6547,8 +6573,8 @@ function Is({
6547
6573
  checkboxPosition: s,
6548
6574
  onSelect: i,
6549
6575
  identity: l,
6550
- details: { type: "communities", title: m, activeTab: o, count: u?.length ?? 0 },
6551
- ...h,
6576
+ details: { type: "communities", title: m, activeTab: o, count: h?.length ?? 0 },
6577
+ ...u,
6552
6578
  children: [
6553
6579
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
6554
6580
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: m }),
@@ -6577,7 +6603,7 @@ function Is({
6577
6603
  }
6578
6604
  )
6579
6605
  ] }),
6580
- /* @__PURE__ */ e("div", { className: "grid gap-4 md:gap-5", children: u.map((d) => /* @__PURE__ */ e(
6606
+ /* @__PURE__ */ e("div", { className: "grid gap-4 md:gap-5", children: h.map((d) => /* @__PURE__ */ e(
6581
6607
  "div",
6582
6608
  {
6583
6609
  className: "rounded-2xl border border-zinc-200 dark:border-zinc-800 p-3 md:p-4",
@@ -6720,9 +6746,9 @@ function Ms({
6720
6746
  title: m = "News",
6721
6747
  items: o = Os,
6722
6748
  // spread for identity fields: _id / id / instanceId etc.
6723
- ...u
6749
+ ...h
6724
6750
  }) {
6725
- const h = de(t), N = me[h], y = Ps[h];
6751
+ const u = de(t), N = me[u], y = Ps[u];
6726
6752
  return /* @__PURE__ */ n(
6727
6753
  oe,
6728
6754
  {
@@ -6732,13 +6758,13 @@ function Ms({
6732
6758
  onSelect: i,
6733
6759
  identity: l,
6734
6760
  details: { type: "news", title: m, count: o?.length ?? 0 },
6735
- ...u,
6761
+ ...h,
6736
6762
  children: [
6737
6763
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
6738
6764
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${N.title}`, children: m }),
6739
6765
  /* @__PURE__ */ e("span", { className: "text-sm text-indigo-700 cursor-default select-none", children: "View All" })
6740
6766
  ] }),
6741
- h === "lg" ? (
6767
+ u === "lg" ? (
6742
6768
  // Large: 3-up grid of image cards
6743
6769
  /* @__PURE__ */ e("div", { className: `mt-4 ${y.grid}`, children: o.slice(0, 3).map((r) => /* @__PURE__ */ n("article", { children: [
6744
6770
  /* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: y.cardImg }),
@@ -6835,8 +6861,8 @@ function _s({
6835
6861
  identity: l = "_id",
6836
6862
  title: m = "Campus Map",
6837
6863
  campusName: o = "Morningside Heights Campus",
6838
- filters: u = Ls,
6839
- activeFilter: h = "All",
6864
+ filters: h = Ls,
6865
+ activeFilter: u = "All",
6840
6866
  // NEW: iframe controls
6841
6867
  mapQuery: N = "Florida",
6842
6868
  zoom: y = 12,
@@ -6844,18 +6870,18 @@ function _s({
6844
6870
  // optional full embed URL override
6845
6871
  ...v
6846
6872
  }) {
6847
- const d = de(t), p = me[d], z = Bs[d], F = r || js(N, y);
6873
+ const d = de(t), g = me[d], D = Bs[d], F = r || js(N, y);
6848
6874
  return /* @__PURE__ */ e(
6849
6875
  oe,
6850
6876
  {
6851
- className: `flex flex-col ${p.card} ${z.wrap}`,
6877
+ className: `flex flex-col ${g.card} ${D.wrap}`,
6852
6878
  showCheckbox: a,
6853
6879
  checkboxPosition: s,
6854
6880
  onSelect: i,
6855
6881
  identity: l,
6856
- details: { type: "campus-map", title: m, campusName: o, activeFilter: h, mapQuery: N, zoom: y },
6882
+ details: { type: "campus-map", title: m, campusName: o, activeFilter: u, mapQuery: N, zoom: y },
6857
6883
  ...v,
6858
- children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${z.mapH}`, children: [
6884
+ children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${D.mapH}`, children: [
6859
6885
  /* @__PURE__ */ e(
6860
6886
  "iframe",
6861
6887
  {
@@ -6869,7 +6895,7 @@ function _s({
6869
6895
  }
6870
6896
  ),
6871
6897
  /* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
6872
- /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${z.campusPill}`, children: [
6898
+ /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${D.campusPill}`, children: [
6873
6899
  /* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: o }),
6874
6900
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
6875
6901
  ] }),
@@ -6878,8 +6904,8 @@ function _s({
6878
6904
  /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
6879
6905
  ] })
6880
6906
  ] }),
6881
- /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${z.chipGap} overflow-x-auto scrollbar-none`, children: u.map((E) => /* @__PURE__ */ e(Vs, { label: E, active: E === h, size: d }, E)) }) }),
6882
- /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${z.searchH}`, children: [
6907
+ /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${D.chipGap} overflow-x-auto scrollbar-none`, children: h.map((E) => /* @__PURE__ */ e(Vs, { label: E, active: E === u, size: d }, E)) }) }),
6908
+ /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${D.searchH}`, children: [
6883
6909
  /* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", "aria-hidden": "true", className: "opacity-60", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M15.5 14h-.79l-.28-.27a6.471 6.471 0 001.48-4.23C15.91 6.01 13.4 3.5 10.45 3.5S5 6.01 5 9.5 7.5 15.5 10.45 15.5c1.61 0 3.09-.59 4.23-1.48l.27.28v.79l4.25 4.25c.41.41 1.07.41 1.48 0s.41-1.07 0-1.48L15.5 14Zm-5.05 0C8.01 14 6 11.99 6 9.5S8.01 5 10.45 5s4.45 2.01 4.45 4.5-2.01 4.5-4.45 4.5Z" }) }),
6884
6910
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
6885
6911
  ] }) })
@@ -7047,10 +7073,10 @@ function Ws({
7047
7073
  identity: l = "_id",
7048
7074
  title: m = "Upcoming Events",
7049
7075
  events: o = Us,
7050
- selectedIndex: u = 0,
7051
- ...h
7076
+ selectedIndex: h = 0,
7077
+ ...u
7052
7078
  }) {
7053
- const [N, y] = B(u), r = de(t), v = me[r], d = Gs[r], p = o[N] || o[0], z = (E, I) => {
7079
+ const [N, y] = B(h), r = de(t), v = me[r], d = Gs[r], g = o[N] || o[0], D = (E, I) => {
7054
7080
  y(I), i?.(E);
7055
7081
  }, F = r === "lg";
7056
7082
  return /* @__PURE__ */ n(
@@ -7062,7 +7088,7 @@ function Ws({
7062
7088
  onSelect: i,
7063
7089
  identity: l,
7064
7090
  details: { type: "events", title: m, count: o?.length ?? 0 },
7065
- ...h,
7091
+ ...u,
7066
7092
  children: [
7067
7093
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-4", children: [
7068
7094
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }),
@@ -7077,11 +7103,11 @@ function Ws({
7077
7103
  ev: E,
7078
7104
  sizeMeta: d,
7079
7105
  isSelected: I === N,
7080
- onClick: (P) => z(P, I)
7106
+ onClick: (P) => D(P, I)
7081
7107
  },
7082
7108
  E._id || E.id || I
7083
7109
  )) }),
7084
- /* @__PURE__ */ e(Ys, { ev: p, sizeMeta: d })
7110
+ /* @__PURE__ */ e(Ys, { ev: g, sizeMeta: d })
7085
7111
  ] })
7086
7112
  ) : (
7087
7113
  // Small/Medium: Simple list only
@@ -7091,7 +7117,7 @@ function Ws({
7091
7117
  ev: E,
7092
7118
  sizeMeta: d,
7093
7119
  isSelected: I === N,
7094
- onClick: (P) => z(P, I)
7120
+ onClick: (P) => D(P, I)
7095
7121
  },
7096
7122
  E._id || E.id || I
7097
7123
  )) })
@@ -7206,10 +7232,10 @@ const Js = [
7206
7232
  }
7207
7233
  };
7208
7234
  function Hs({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin: m }) {
7209
- const o = (h) => {
7210
- h.stopPropagation(), l?.(t);
7211
- }, u = (h) => {
7212
- h.stopPropagation(), m?.(t);
7235
+ const o = (u) => {
7236
+ u.stopPropagation(), l?.(t);
7237
+ }, h = (u) => {
7238
+ u.stopPropagation(), m?.(t);
7213
7239
  };
7214
7240
  return /* @__PURE__ */ n(
7215
7241
  "div",
@@ -7229,7 +7255,7 @@ function Hs({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
7229
7255
  /* @__PURE__ */ e(
7230
7256
  "button",
7231
7257
  {
7232
- onClick: u,
7258
+ onClick: h,
7233
7259
  className: "p-1 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors duration-200",
7234
7260
  children: t.pinned ? /* @__PURE__ */ e(Ar, { className: "h-4 w-4 fill-blue-500 text-blue-500" }) : /* @__PURE__ */ e(Fr, { className: "h-4 w-4 text-zinc-400 group-hover:text-blue-500" })
7235
7261
  }
@@ -7262,24 +7288,24 @@ function Qs({
7262
7288
  identity: l = "_id",
7263
7289
  title: m = "0365 Mails",
7264
7290
  emails: o = Js,
7265
- selectedIndex: u = 0,
7266
- onStar: h,
7291
+ selectedIndex: h = 0,
7292
+ onStar: u,
7267
7293
  onPin: N,
7268
7294
  ...y
7269
7295
  }) {
7270
- const [r, v] = B(u), d = de(t), p = me[d], z = Xs[d], F = (P, j) => {
7271
- v(j), i?.(P);
7296
+ const [r, v] = B(h), d = de(t), g = me[d], D = Xs[d], F = (P, _) => {
7297
+ v(_), i?.(P);
7272
7298
  }, E = (P) => {
7273
- const j = { ...P, starred: !P.starred };
7274
- h?.(j);
7299
+ const _ = { ...P, starred: !P.starred };
7300
+ u?.(_);
7275
7301
  }, I = (P) => {
7276
- const j = { ...P, pinned: !P.pinned };
7277
- N?.(j);
7302
+ const _ = { ...P, pinned: !P.pinned };
7303
+ N?.(_);
7278
7304
  };
7279
7305
  return /* @__PURE__ */ n(
7280
7306
  oe,
7281
7307
  {
7282
- className: `flex flex-col ${p.card} ${z.wrap}`,
7308
+ className: `flex flex-col ${g.card} ${D.wrap}`,
7283
7309
  showCheckbox: a,
7284
7310
  checkboxPosition: s,
7285
7311
  onSelect: i,
@@ -7287,19 +7313,19 @@ function Qs({
7287
7313
  details: { type: "emails", title: m, count: o?.length ?? 0 },
7288
7314
  ...y,
7289
7315
  children: [
7290
- /* @__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 }) }),
7316
+ /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${g.title}`, children: m }) }),
7291
7317
  /* @__PURE__ */ e(ge, { placeholder: "Type to search..." }),
7292
- /* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((P, j) => /* @__PURE__ */ e(
7318
+ /* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((P, _) => /* @__PURE__ */ e(
7293
7319
  Hs,
7294
7320
  {
7295
7321
  email: P,
7296
- sizeMeta: z,
7297
- isSelected: j === r,
7298
- onClick: (U) => F(U, j),
7322
+ sizeMeta: D,
7323
+ isSelected: _ === r,
7324
+ onClick: (U) => F(U, _),
7299
7325
  onStar: E,
7300
7326
  onPin: I
7301
7327
  },
7302
- P._id || P.id || j
7328
+ P._id || P.id || _
7303
7329
  )) }),
7304
7330
  /* @__PURE__ */ e("div", { className: "mt-4 pt-3 border-t border-zinc-200 dark:border-zinc-800", children: /* @__PURE__ */ e("button", { className: "w-full text-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" }) })
7305
7331
  ]
@@ -7516,12 +7542,12 @@ function al({
7516
7542
  identity: l = "_id",
7517
7543
  title: m = "Directory",
7518
7544
  contacts: o = Zs,
7519
- selectedIndex: u = 0,
7520
- ...h
7545
+ selectedIndex: h = 0,
7546
+ ...u
7521
7547
  }) {
7522
- const [N, y] = B(u), r = de(t), v = me[r], d = Ks[r], p = (E, I) => {
7548
+ const [N, y] = B(h), r = de(t), v = me[r], d = Ks[r], g = (E, I) => {
7523
7549
  y(I), i?.(E);
7524
- }, z = o[N] || o[0], F = d.layout === "split";
7550
+ }, D = o[N] || o[0], F = d.layout === "split";
7525
7551
  return /* @__PURE__ */ n(
7526
7552
  oe,
7527
7553
  {
@@ -7531,7 +7557,7 @@ function al({
7531
7557
  onSelect: i,
7532
7558
  identity: l,
7533
7559
  details: { type: "directory", title: m, count: o?.length ?? 0 },
7534
- ...h,
7560
+ ...u,
7535
7561
  children: [
7536
7562
  /* @__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 ${v.title}`, children: m }) }),
7537
7563
  /* @__PURE__ */ e(tl, { sizeMeta: d }),
@@ -7542,14 +7568,14 @@ function al({
7542
7568
  contact: E,
7543
7569
  sizeMeta: d,
7544
7570
  isSelected: I === N,
7545
- onClick: (P) => p(P, I)
7571
+ onClick: (P) => g(P, I)
7546
7572
  },
7547
7573
  E._id || E.id || I
7548
7574
  )) }),
7549
7575
  /* @__PURE__ */ e(
7550
7576
  el,
7551
7577
  {
7552
- contact: z,
7578
+ contact: D,
7553
7579
  sizeMeta: d
7554
7580
  }
7555
7581
  )
@@ -7561,7 +7587,7 @@ function al({
7561
7587
  contact: E,
7562
7588
  sizeMeta: d,
7563
7589
  isSelected: I === N,
7564
- onClick: (P) => p(P, I)
7590
+ onClick: (P) => g(P, I)
7565
7591
  },
7566
7592
  E._id || E.id || I
7567
7593
  )) })
@@ -7650,8 +7676,8 @@ function sl({
7650
7676
  // content
7651
7677
  title: m = "Account Summary",
7652
7678
  termLabel: o = "Spring 2024",
7653
- balance: u = 3e3,
7654
- totalCharges: h = 4440,
7679
+ balance: h = 3e3,
7680
+ totalCharges: u = 4440,
7655
7681
  totalPayments: N = 1568,
7656
7682
  transactions: y = [
7657
7683
  {
@@ -7671,16 +7697,16 @@ function sl({
7671
7697
  ],
7672
7698
  ...r
7673
7699
  }) {
7674
- const v = de(t), d = me[v], p = nl[v];
7700
+ const v = de(t), d = me[v], g = nl[v];
7675
7701
  return /* @__PURE__ */ n(
7676
7702
  oe,
7677
7703
  {
7678
- className: `flex flex-col ${d.card} ${p.wrap}`,
7704
+ className: `flex flex-col ${d.card} ${g.wrap}`,
7679
7705
  showCheckbox: a,
7680
7706
  checkboxPosition: s,
7681
7707
  onSelect: i,
7682
7708
  identity: l,
7683
- details: { type: "account-summary", termLabel: o, balance: u, totalCharges: h, totalPayments: N },
7709
+ details: { type: "account-summary", termLabel: o, balance: h, totalCharges: u, totalPayments: N },
7684
7710
  ...r,
7685
7711
  children: [
7686
7712
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
@@ -7690,14 +7716,14 @@ function sl({
7690
7716
  /* @__PURE__ */ e(Nt, { className: "h-4 w-4 opacity-70" })
7691
7717
  ] })
7692
7718
  ] }),
7693
- /* @__PURE__ */ n("div", { className: p.topGrid || p.grid, children: [
7719
+ /* @__PURE__ */ n("div", { className: g.topGrid || g.grid, children: [
7694
7720
  /* @__PURE__ */ n("div", { className: "space-y-4", children: [
7695
7721
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Account Balance" }),
7696
- /* @__PURE__ */ e("div", { className: p.balance, children: Te(u) }),
7697
- !p.showTxns && /* @__PURE__ */ n("div", { className: p.totalsRow, children: [
7722
+ /* @__PURE__ */ e("div", { className: g.balance, children: Te(h) }),
7723
+ !g.showTxns && /* @__PURE__ */ n("div", { className: g.totalsRow, children: [
7698
7724
  /* @__PURE__ */ n("div", { children: [
7699
7725
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Charges" }),
7700
- /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: Te(h) })
7726
+ /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: Te(u) })
7701
7727
  ] }),
7702
7728
  /* @__PURE__ */ n("div", { children: [
7703
7729
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
@@ -7705,27 +7731,27 @@ function sl({
7705
7731
  ] })
7706
7732
  ] })
7707
7733
  ] }),
7708
- p.showTxns && /* @__PURE__ */ n("div", { className: "space-y-4", children: [
7709
- /* @__PURE__ */ n("div", { className: p.totalsRow, children: [
7734
+ g.showTxns && /* @__PURE__ */ n("div", { className: "space-y-4", children: [
7735
+ /* @__PURE__ */ n("div", { className: g.totalsRow, children: [
7710
7736
  /* @__PURE__ */ n("div", { children: [
7711
7737
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Charges" }),
7712
- /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: Te(h) })
7738
+ /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: Te(u) })
7713
7739
  ] }),
7714
7740
  /* @__PURE__ */ n("div", { children: [
7715
7741
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
7716
7742
  /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: Te(N) })
7717
7743
  ] })
7718
7744
  ] }),
7719
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((z, F) => /* @__PURE__ */ e(
7745
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((D, F) => /* @__PURE__ */ e(
7720
7746
  rl,
7721
7747
  {
7722
7748
  side: F === 0 ? "left" : "right",
7723
- date: z.date,
7724
- title: z.title,
7725
- amount: z.amount,
7726
- kind: z.kind
7749
+ date: D.date,
7750
+ title: D.title,
7751
+ amount: D.amount,
7752
+ kind: D.kind
7727
7753
  },
7728
- z.id || F
7754
+ D.id || F
7729
7755
  )) })
7730
7756
  ] })
7731
7757
  ] }),
@@ -7733,7 +7759,7 @@ function sl({
7733
7759
  "button",
7734
7760
  {
7735
7761
  type: "button",
7736
- className: `mt-4 w-full inline-flex items-center justify-center gap-2 rounded-xl border text-sm ${p.buttonPad}
7762
+ className: `mt-4 w-full inline-flex items-center justify-center gap-2 rounded-xl border text-sm ${g.buttonPad}
7737
7763
  border-orange-400 text-zinc-900 dark:text-zinc-100 bg-white dark:bg-zinc-900`,
7738
7764
  "aria-label": "View Transactions (mock)",
7739
7765
  children: [
@@ -7842,24 +7868,24 @@ function il({
7842
7868
  identity: l = "_id",
7843
7869
  title: m = "Pay Stub and Leave Balance",
7844
7870
  term: o = "Fall 2025",
7845
- ...u
7871
+ ...h
7846
7872
  }) {
7847
- const [h, N] = B("vacation"), [y, r] = B(!1), v = de(t), d = me[v], p = ll[v], z = Ye.find((F) => F.id === h) || Ye[0];
7873
+ const [u, N] = B("vacation"), [y, r] = B(!1), v = de(t), d = me[v], g = ll[v], D = Ye.find((F) => F.id === u) || Ye[0];
7848
7874
  return /* @__PURE__ */ n(
7849
7875
  oe,
7850
7876
  {
7851
- className: `flex flex-col ${d.card} ${p.wrap}`,
7877
+ className: `flex flex-col ${d.card} ${g.wrap}`,
7852
7878
  showCheckbox: a,
7853
7879
  checkboxPosition: s,
7854
7880
  onSelect: i,
7855
7881
  identity: l,
7856
7882
  details: { type: "leave-balance", title: m },
7857
- ...u,
7883
+ ...h,
7858
7884
  children: [
7859
7885
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
7860
7886
  /* @__PURE__ */ n("div", { children: [
7861
- /* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${p.title} mb-1`, children: m }),
7862
- /* @__PURE__ */ n("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.term} flex items-center gap-2`, children: [
7887
+ /* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${g.title} mb-1`, children: m }),
7888
+ /* @__PURE__ */ n("div", { className: `text-zinc-600 dark:text-zinc-400 ${g.term} flex items-center gap-2`, children: [
7863
7889
  /* @__PURE__ */ e(Wt, { className: "h-4 w-4" }),
7864
7890
  "Term - ",
7865
7891
  o
@@ -7880,28 +7906,28 @@ function il({
7880
7906
  ] })
7881
7907
  ] })
7882
7908
  ] }),
7883
- p.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: Ye.map((F) => /* @__PURE__ */ e(
7909
+ g.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: Ye.map((F) => /* @__PURE__ */ e(
7884
7910
  "button",
7885
7911
  {
7886
- className: `flex-1 py-2 px-4 text-center ${p.tab} font-medium border-b-2 transition-colors duration-200 ${h === F.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"}`,
7912
+ className: `flex-1 py-2 px-4 text-center ${g.tab} font-medium border-b-2 transition-colors duration-200 ${u === F.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"}`,
7887
7913
  onClick: () => N(F.id),
7888
7914
  children: F.name.split(" ")[0]
7889
7915
  },
7890
7916
  F.id
7891
7917
  )) }),
7892
- /* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: p.showAllLeave ? (
7918
+ /* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: g.showAllLeave ? (
7893
7919
  // LG: Show all leave types
7894
- Ye.map((F) => /* @__PURE__ */ e(Gt, { leave: F, sizeMeta: p }, F.id))
7895
- ) : p.showSingleLeave ? (
7920
+ Ye.map((F) => /* @__PURE__ */ e(Gt, { leave: F, sizeMeta: g }, F.id))
7921
+ ) : g.showSingleLeave ? (
7896
7922
  // MD: Show active tab leave type
7897
- /* @__PURE__ */ e(Gt, { leave: z, sizeMeta: p })
7923
+ /* @__PURE__ */ e(Gt, { leave: D, sizeMeta: g })
7898
7924
  ) : (
7899
7925
  // SM: Show only available hours
7900
7926
  /* @__PURE__ */ e("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-4", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3 mb-3", children: [
7901
7927
  /* @__PURE__ */ e(Ae, { className: "h-5 w-5 text-blue-600 dark:text-blue-400" }),
7902
7928
  /* @__PURE__ */ n("div", { children: [
7903
- /* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${p.table}`, children: "Available Leave" }),
7904
- /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.table}`, children: z.available })
7929
+ /* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${g.table}`, children: "Available Leave" }),
7930
+ /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${g.table}`, children: D.available })
7905
7931
  ] })
7906
7932
  ] }) })
7907
7933
  ) }),
@@ -8033,9 +8059,9 @@ function ml({
8033
8059
  identity: l = "_id",
8034
8060
  title: m = "Drive",
8035
8061
  subtitle: o = "Drive Shared",
8036
- ...u
8062
+ ...h
8037
8063
  }) {
8038
- const [h, N] = B(!1), y = de(t), r = me[y], v = dl[y];
8064
+ const [u, N] = B(!1), y = de(t), r = me[y], v = dl[y];
8039
8065
  return /* @__PURE__ */ n(
8040
8066
  oe,
8041
8067
  {
@@ -8045,7 +8071,7 @@ function ml({
8045
8071
  onSelect: i,
8046
8072
  identity: l,
8047
8073
  details: { type: "drive", title: m },
8048
- ...u,
8074
+ ...h,
8049
8075
  children: [
8050
8076
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
8051
8077
  /* @__PURE__ */ n("div", { children: [
@@ -8057,11 +8083,11 @@ function ml({
8057
8083
  "button",
8058
8084
  {
8059
8085
  className: "flex items-center gap-1 p-2 text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors duration-200",
8060
- onClick: () => N(!h),
8086
+ onClick: () => N(!u),
8061
8087
  children: /* @__PURE__ */ e(Zt, { className: "h-4 w-4" })
8062
8088
  }
8063
8089
  ),
8064
- h && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
8090
+ u && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
8065
8091
  /* @__PURE__ */ n("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left flex items-center gap-2", children: [
8066
8092
  /* @__PURE__ */ e(sa, { className: "h-4 w-4" }),
8067
8093
  "Download All"
@@ -8227,7 +8253,7 @@ const ul = [
8227
8253
  }
8228
8254
  };
8229
8255
  function gl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8230
- const [l, m] = B(!1), o = $a(t.type), u = pl(t.type);
8256
+ const [l, m] = B(!1), o = $a(t.type), h = pl(t.type);
8231
8257
  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: [
8232
8258
  /* @__PURE__ */ e(
8233
8259
  "button",
@@ -8237,7 +8263,7 @@ function gl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8237
8263
  }
8238
8264
  ),
8239
8265
  /* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
8240
- /* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${o.icon}` }) }),
8266
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(h, { className: `h-4 w-4 ${o.icon}` }) }),
8241
8267
  /* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
8242
8268
  /* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children: Yt(t.title, a.maxTitleWords) }),
8243
8269
  a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children: Yt(t.message, a.maxMessageWords) }),
@@ -8278,12 +8304,12 @@ function fl({
8278
8304
  identity: l = "_id",
8279
8305
  title: m = "Alerts",
8280
8306
  alerts: o = ul,
8281
- showBanner: u = !0,
8282
- ...h
8307
+ showBanner: h = !0,
8308
+ ...u
8283
8309
  }) {
8284
- const [N, y] = B(o), r = de(t), v = me[r], d = hl[r], p = (E) => {
8310
+ const [N, y] = B(o), r = de(t), v = me[r], d = hl[r], g = (E) => {
8285
8311
  y((I) => I.filter((P) => P.id !== E.id));
8286
- }, z = N.find((E) => E.type === "banner"), F = N.filter((E) => E.type !== "banner");
8312
+ }, D = N.find((E) => E.type === "banner"), F = N.filter((E) => E.type !== "banner");
8287
8313
  return /* @__PURE__ */ n(
8288
8314
  oe,
8289
8315
  {
@@ -8293,14 +8319,14 @@ function fl({
8293
8319
  onSelect: i,
8294
8320
  identity: l,
8295
8321
  details: { type: "alerts", title: m, count: N.length },
8296
- ...h,
8322
+ ...u,
8297
8323
  children: [
8298
8324
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }) }),
8299
- u && z && t !== "sm" && /* @__PURE__ */ e(
8325
+ h && D && t !== "sm" && /* @__PURE__ */ e(
8300
8326
  bl,
8301
8327
  {
8302
- alert: z,
8303
- onDismiss: p
8328
+ alert: D,
8329
+ onDismiss: g
8304
8330
  }
8305
8331
  ),
8306
8332
  /* @__PURE__ */ e("div", { className: "space-y-0.5", children: F.slice(0, 3).map((E) => /* @__PURE__ */ e(
@@ -8308,7 +8334,7 @@ function fl({
8308
8334
  {
8309
8335
  alert: E,
8310
8336
  sizeMeta: d,
8311
- onDismiss: p
8337
+ onDismiss: g
8312
8338
  },
8313
8339
  E.id
8314
8340
  )) }),
@@ -8455,9 +8481,9 @@ function Nl({
8455
8481
  identity: l = "_id",
8456
8482
  title: m = "Videos",
8457
8483
  videos: o = yl,
8458
- ...u
8484
+ ...h
8459
8485
  }) {
8460
- const [h, N] = B(!1), y = de(t), r = me[y], v = xl[y];
8486
+ const [u, N] = B(!1), y = de(t), r = me[y], v = xl[y];
8461
8487
  return /* @__PURE__ */ n(
8462
8488
  oe,
8463
8489
  {
@@ -8467,7 +8493,7 @@ function Nl({
8467
8493
  onSelect: i,
8468
8494
  identity: l,
8469
8495
  details: { type: "videos", title: m, count: o.length },
8470
- ...u,
8496
+ ...h,
8471
8497
  children: [
8472
8498
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between ", children: [
8473
8499
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${r.title}`, children: m }),
@@ -8476,14 +8502,14 @@ function Nl({
8476
8502
  "button",
8477
8503
  {
8478
8504
  className: "flex items-center gap-1 px-3 py-1.5 text-sm text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 border border-zinc-300 dark:border-zinc-600 rounded-md transition-colors duration-200",
8479
- onClick: () => N(!h),
8505
+ onClick: () => N(!u),
8480
8506
  children: [
8481
8507
  "Filter",
8482
8508
  /* @__PURE__ */ e(xe, { className: "h-4 w-4 transform rotate-90" })
8483
8509
  ]
8484
8510
  }
8485
8511
  ),
8486
- h && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
8512
+ u && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
8487
8513
  /* @__PURE__ */ e("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left", children: "All Videos" }),
8488
8514
  /* @__PURE__ */ e("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left", children: "Campus Life" }),
8489
8515
  /* @__PURE__ */ e("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left", children: "Academic" }),