@opencxh/ui-kit 3.165.0 → 3.166.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { clsx as gt } from "clsx";
2
- import ce, { useState as H, useLayoutEffect as pt, useRef as re, useEffect as X, forwardRef as ve, useMemo as pe, useCallback as xe, createContext as et, useId as vt, useContext as yt, Component as Nt } from "react";
2
+ import oe, { useState as B, useLayoutEffect as pt, useRef as re, useEffect as J, forwardRef as ve, useMemo as pe, useCallback as xe, createContext as et, useId as vt, useContext as yt, Component as Nt } from "react";
3
3
  import { jsxs as c, jsx as e, Fragment as Ee } from "react/jsx-runtime";
4
4
  import * as wt from "lucide-react";
5
5
  import { VideoOff as kt, User as Ct, MicOff as St, Mic as Et, X as Se, ChevronDown as De, ExternalLink as zt, Calendar as Mt, ChevronLeft as ze, ChevronRight as Le, ChevronDownIcon as Tt, Loader2 as $t, Search as Ie, Check as Ue, ChevronUp as _t, Ellipsis as At, FileText as je, HardDrive as We, ArrowLeft as Dt, FolderPlus as Lt, Upload as It, Folder as Ke, Trash2 as Pt, Plus as Ot, Sparkles as jt, ImageOff as Ft, Pencil as Rt, ArrowUpRight as Bt } from "lucide-react";
@@ -16,7 +16,7 @@ function Xn(t) {
16
16
  return (r) => t[r] || "";
17
17
  }
18
18
  function Pe(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
19
- const [l, o] = H({});
19
+ const [l, o] = B({});
20
20
  return pt(() => {
21
21
  if (!t) return;
22
22
  const u = () => {
@@ -107,7 +107,7 @@ function ts({
107
107
  }
108
108
  function rs({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
109
109
  const a = re(null);
110
- return X(() => {
110
+ return J(() => {
111
111
  if (!r || !a.current) return;
112
112
  const l = t(a.current);
113
113
  return () => {
@@ -258,7 +258,7 @@ const Qt = {
258
258
  info: "text-info-fg",
259
259
  neutral: "text-text-subtle",
260
260
  current: "text-current"
261
- }, ee = ({
261
+ }, Q = ({
262
262
  icon: t,
263
263
  size: r = "md",
264
264
  color: n = "current",
@@ -311,8 +311,8 @@ const nt = ({
311
311
  disabled: o = !1,
312
312
  triggerLabel: u
313
313
  }) => {
314
- const [d, v] = H(!1), m = re(null), f = re(null), b = Pe(d, f, { placement: n });
315
- X(() => {
314
+ const [d, v] = B(!1), m = re(null), f = re(null), b = Pe(d, f, { placement: n });
315
+ J(() => {
316
316
  if (!d) return;
317
317
  const p = (C) => {
318
318
  m.current && !m.current.contains(C.target) && v(!1);
@@ -399,7 +399,7 @@ function sr({
399
399
  const N = l && !!v, p = s === "pill" ? "rounded-full" : "rounded-md", x = rr({ active: l, tone: n, shape: s, size: a, className: g }), C = /* @__PURE__ */ c(Ee, { children: [
400
400
  r,
401
401
  t,
402
- o && /* @__PURE__ */ e(ee, { icon: De, size: "xs" })
402
+ o && /* @__PURE__ */ e(Q, { icon: De, size: "xs" })
403
403
  ] }), S = nr({ shape: s, withClear: N }), I = N && /* @__PURE__ */ e(
404
404
  "button",
405
405
  {
@@ -407,7 +407,7 @@ function sr({
407
407
  "aria-label": m,
408
408
  onClick: v,
409
409
  className: i("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", p),
410
- children: /* @__PURE__ */ e(ee, { icon: Se, size: "xs" })
410
+ children: /* @__PURE__ */ e(Q, { icon: Se, size: "xs" })
411
411
  }
412
412
  );
413
413
  return u ? /* @__PURE__ */ c("span", { className: x, title: b, children: [
@@ -655,13 +655,13 @@ const mr = {
655
655
  id: d,
656
656
  ...v
657
657
  }, m) => {
658
- const f = ce.useId(), b = d || `checkbox-${f}`, g = !!n, N = ce.useRef(null), p = ce.useCallback(
658
+ const f = oe.useId(), b = d || `checkbox-${f}`, g = !!n, N = oe.useRef(null), p = oe.useCallback(
659
659
  (x) => {
660
660
  N.current = x, typeof m == "function" ? m(x) : m && typeof m == "object" && (m.current = x);
661
661
  },
662
662
  [m]
663
663
  );
664
- return ce.useEffect(() => {
664
+ return oe.useEffect(() => {
665
665
  N.current && (N.current.indeterminate = a);
666
666
  }, [a]), /* @__PURE__ */ c("div", { className: i("flex flex-col", l), children: [
667
667
  /* @__PURE__ */ c("div", { className: i("flex items-center gap-3", fr[s]), children: [
@@ -800,7 +800,7 @@ function ls({
800
800
  removeLabel: m = "Remove",
801
801
  tooLargeLabel: f = "That image is too large."
802
802
  }) {
803
- const b = re(null), [g, N] = H(null), p = async (x) => {
803
+ const b = re(null), [g, N] = B(null), p = async (x) => {
804
804
  if (!x) return;
805
805
  N(null);
806
806
  const C = await wr(x, s);
@@ -885,7 +885,7 @@ function wr(t, r) {
885
885
  }, a.onerror = s, a.readAsDataURL(t);
886
886
  });
887
887
  }
888
- const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current" }), Cr = () => /* @__PURE__ */ e(ee, { icon: ze, size: "md", color: "current" }), Sr = () => /* @__PURE__ */ e(ee, { icon: Le, size: "md", color: "current" }), Be = ve(({
888
+ const kr = () => /* @__PURE__ */ e(Q, { icon: Mt, size: "md", color: "current" }), Cr = () => /* @__PURE__ */ e(Q, { icon: ze, size: "md", color: "current" }), Sr = () => /* @__PURE__ */ e(Q, { icon: Le, size: "md", color: "current" }), Be = ve(({
889
889
  value: t,
890
890
  onChange: r,
891
891
  placeholder: n = "Select date",
@@ -898,8 +898,8 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
898
898
  format: v = "MM/dd/yyyy",
899
899
  withTime: m = !1
900
900
  }, f) => {
901
- const [b, g] = H(!1), [N, p] = H(() => t || /* @__PURE__ */ new Date()), x = re(null), C = re(null), S = Pe(b, C);
902
- X(() => {
901
+ const [b, g] = B(!1), [N, p] = B(() => t || /* @__PURE__ */ new Date()), x = re(null), C = re(null), S = Pe(b, C);
902
+ J(() => {
903
903
  const h = (z) => {
904
904
  x.current && !x.current.contains(z.target) && g(!1);
905
905
  };
@@ -919,9 +919,9 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
919
919
  }, W = () => {
920
920
  const h = N.getFullYear(), z = N.getMonth(), k = new Date(h, z, 1), _ = new Date(k);
921
921
  _.setDate(_.getDate() - k.getDay());
922
- const y = [], V = new Date(_);
922
+ const y = [], H = new Date(_);
923
923
  for (let ae = 0; ae < 42; ae++)
924
- y.push(new Date(V)), V.setDate(V.getDate() + 1);
924
+ y.push(new Date(H)), H.setDate(H.getDate() + 1);
925
925
  return y;
926
926
  }, D = (h) => {
927
927
  if (h.getMonth() === N.getMonth() && !(u && h < u) && !(d && h > d)) {
@@ -932,13 +932,13 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
932
932
  }
933
933
  r?.(h), g(!1);
934
934
  }
935
- }, U = () => {
935
+ }, q = () => {
936
936
  p(new Date(N.getFullYear(), N.getMonth() - 1, 1));
937
937
  }, ne = () => {
938
938
  p(new Date(N.getFullYear(), N.getMonth() + 1, 1));
939
- }, Z = () => {
939
+ }, Y = () => {
940
940
  r?.(null), g(!1);
941
- }, Q = i(
941
+ }, X = i(
942
942
  "w-full border border-border-strong rounded-tile transition-colors duration-fast",
943
943
  "bg-surface text-text",
944
944
  "placeholder:text-text-muted",
@@ -978,7 +978,7 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
978
978
  required: a,
979
979
  readOnly: !0,
980
980
  onClick: () => !s && g(!b),
981
- className: i(Q, "pr-10 cursor-pointer")
981
+ className: i(X, "pr-10 cursor-pointer")
982
982
  }
983
983
  ),
984
984
  /* @__PURE__ */ e(
@@ -997,7 +997,7 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
997
997
  /* @__PURE__ */ e(
998
998
  "button",
999
999
  {
1000
- onClick: U,
1000
+ onClick: q,
1001
1001
  className: "p-1 hover:bg-surface-hover rounded",
1002
1002
  children: /* @__PURE__ */ e(Cr, {})
1003
1003
  }
@@ -1018,19 +1018,19 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
1018
1018
  ] }),
1019
1019
  /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((h) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: h }, h)) }),
1020
1020
  /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: de.map((h, z) => {
1021
- const k = h.getMonth() === N.getMonth(), _ = t && h.toDateString() === t.toDateString(), y = h.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), V = !k || u && h < u || d && h > d;
1021
+ const k = h.getMonth() === N.getMonth(), _ = t && h.toDateString() === t.toDateString(), y = h.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), H = !k || u && h < u || d && h > d;
1022
1022
  return /* @__PURE__ */ e(
1023
1023
  "button",
1024
1024
  {
1025
- onClick: () => !V && D(h),
1026
- disabled: V,
1025
+ onClick: () => !H && D(h),
1026
+ disabled: H,
1027
1027
  className: i(
1028
1028
  "w-8 h-8 text-sm rounded transition-colors duration-fast",
1029
1029
  {
1030
- "text-text hover:bg-surface-hover": k && !_ && !V,
1030
+ "text-text hover:bg-surface-hover": k && !_ && !H,
1031
1031
  "bg-accent text-accent-fg": _,
1032
1032
  "bg-surface-hover text-text": y && !_,
1033
- "text-text-muted cursor-not-allowed": V
1033
+ "text-text-muted cursor-not-allowed": H
1034
1034
  }
1035
1035
  ),
1036
1036
  children: h.getDate()
@@ -1055,7 +1055,7 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
1055
1055
  /* @__PURE__ */ e(
1056
1056
  "button",
1057
1057
  {
1058
- onClick: Z,
1058
+ onClick: Y,
1059
1059
  className: "text-sm text-text-muted hover:text-text",
1060
1060
  children: "Clear"
1061
1061
  }
@@ -1098,51 +1098,51 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
1098
1098
  onCreateOption: C,
1099
1099
  ...S
1100
1100
  }, I) => {
1101
- const A = f || `select-${Math.random().toString(36).substr(2, 9)}`, K = !!n, [W, D] = ce.useState(!1), [U, ne] = ce.useState(""), Z = ce.useRef(null), Q = ce.useRef(null), de = Pe(W, Q, { matchWidth: !0 }), [w, h] = ce.useState(o);
1102
- ce.useImperativeHandle(I, () => Z.current), ce.useEffect(() => {
1103
- const T = (E) => {
1104
- Z.current && !Z.current.contains(E.target) && D(!1);
1101
+ const A = f || `select-${Math.random().toString(36).substr(2, 9)}`, K = !!n, [W, D] = oe.useState(!1), [q, ne] = oe.useState(""), Y = oe.useRef(null), X = oe.useRef(null), de = Pe(W, X, { matchWidth: !0 }), [w, h] = oe.useState(o);
1102
+ oe.useImperativeHandle(I, () => Y.current), oe.useEffect(() => {
1103
+ const M = (E) => {
1104
+ Y.current && !Y.current.contains(E.target) && D(!1);
1105
1105
  };
1106
- return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
1106
+ return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
1107
1107
  }, []);
1108
- const z = ce.useCallback(
1109
- (T, E) => T.some(
1108
+ const z = oe.useCallback(
1109
+ (M, E) => M.some(
1110
1110
  (P) => Me(P.value) === Me(E) || Me(P.label) === Me(E)
1111
1111
  ),
1112
1112
  []
1113
- ), k = ce.useCallback(
1114
- (T, E) => {
1115
- const P = [...T], j = (q) => {
1116
- const $ = _e(q).trim();
1117
- $ && (z(P, $) || P.push({ value: $, label: $ }));
1113
+ ), k = oe.useCallback(
1114
+ (M, E) => {
1115
+ const P = [...M], j = (V) => {
1116
+ const T = _e(V).trim();
1117
+ T && (z(P, T) || P.push({ value: T, label: T }));
1118
1118
  };
1119
1119
  return Array.isArray(E) ? E.forEach(j) : j(E), P;
1120
1120
  },
1121
1121
  [z]
1122
1122
  );
1123
- ce.useEffect(() => {
1124
- h((T) => {
1123
+ oe.useEffect(() => {
1124
+ h((M) => {
1125
1125
  const E = [...o];
1126
- return T.forEach((P) => {
1126
+ return M.forEach((P) => {
1127
1127
  !z(E, P.value) && !z(E, P.label) && E.push(P);
1128
1128
  }), k(E, N);
1129
1129
  });
1130
1130
  }, [o, N, k, z]);
1131
- const _ = ce.useMemo(
1131
+ const _ = oe.useMemo(
1132
1132
  () => Array.isArray(N) ? N.map(_e) : N == null ? void 0 : _e(N),
1133
1133
  [N]
1134
- ), y = (T) => {
1134
+ ), y = (M) => {
1135
1135
  if (g) {
1136
- const E = Array.isArray(_) ? _ : [], P = E.includes(T) ? E.filter((j) => j !== T) : [...E, T];
1136
+ const E = Array.isArray(_) ? _ : [], P = E.includes(M) ? E.filter((j) => j !== M) : [...E, M];
1137
1137
  p?.(P);
1138
1138
  } else
1139
- p?.(T), D(!1), ne("");
1140
- }, V = g ? null : w.find((T) => T.value === _), ae = g ? w.filter(
1141
- (T) => Array.isArray(_) && _.includes(T.value)
1142
- ) : [], ie = b && U ? w.filter(
1143
- (T) => T.label.toLowerCase().includes(U.toLowerCase())
1144
- ) : w, G = !!x && !!b && !!U.trim() && !z(w, U), O = (T) => {
1145
- const E = T.trim();
1139
+ p?.(M), D(!1), ne("");
1140
+ }, H = g ? null : w.find((M) => M.value === _), ae = g ? w.filter(
1141
+ (M) => Array.isArray(_) && _.includes(M.value)
1142
+ ) : [], ce = b && q ? w.filter(
1143
+ (M) => M.label.toLowerCase().includes(q.toLowerCase())
1144
+ ) : w, G = !!x && !!b && !!q.trim() && !z(w, q), O = (M) => {
1145
+ const E = M.trim();
1146
1146
  if (!E) return;
1147
1147
  const P = C?.(E) ?? {
1148
1148
  value: E,
@@ -1153,11 +1153,11 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
1153
1153
  return;
1154
1154
  }
1155
1155
  h((j) => [...j, P]), y(P.value), ne(""), g || D(!1);
1156
- }, F = () => g ? ae.length > 0 ? ae.map((T) => T.label).join(", ") : u || "Select options" : V?.label || u || "Select an option";
1156
+ }, F = () => g ? ae.length > 0 ? ae.map((M) => M.label).join(", ") : u || "Select options" : H?.label || u || "Select an option";
1157
1157
  return /* @__PURE__ */ c(
1158
1158
  "div",
1159
1159
  {
1160
- ref: Z,
1160
+ ref: Y,
1161
1161
  className: i(
1162
1162
  "relative flex flex-col",
1163
1163
  a && "w-full",
@@ -1182,7 +1182,7 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
1182
1182
  /* @__PURE__ */ c(
1183
1183
  "button",
1184
1184
  {
1185
- ref: Q,
1185
+ ref: X,
1186
1186
  type: "button",
1187
1187
  id: A,
1188
1188
  disabled: l,
@@ -1217,10 +1217,10 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
1217
1217
  {
1218
1218
  type: "text",
1219
1219
  placeholder: "Search...",
1220
- value: U,
1221
- onChange: (T) => ne(T.target.value),
1222
- onKeyDown: (T) => {
1223
- T.key === "Enter" && G && (T.preventDefault(), O(U));
1220
+ value: q,
1221
+ onChange: (M) => ne(M.target.value),
1222
+ onKeyDown: (M) => {
1223
+ M.key === "Enter" && G && (M.preventDefault(), O(q));
1224
1224
  },
1225
1225
  className: i(
1226
1226
  "w-full px-3 py-2 text-sm rounded-md border",
@@ -1235,10 +1235,10 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
1235
1235
  "cursor-pointer px-3 py-1.5 text-sm",
1236
1236
  "text-info-fg hover:bg-surface-hover"
1237
1237
  ),
1238
- onClick: () => O(U),
1238
+ onClick: () => O(q),
1239
1239
  children: [
1240
1240
  "+: “",
1241
- U.trim(),
1241
+ q.trim(),
1242
1242
  "”"
1243
1243
  ]
1244
1244
  }
@@ -1254,16 +1254,16 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
1254
1254
  children: u
1255
1255
  }
1256
1256
  ),
1257
- ie.map((T) => {
1258
- const E = g ? Array.isArray(_) && _.includes(T.value) : _ === T.value;
1257
+ ce.map((M) => {
1258
+ const E = g ? Array.isArray(_) && _.includes(M.value) : _ === M.value;
1259
1259
  return /* @__PURE__ */ e(
1260
1260
  "li",
1261
1261
  {
1262
- onClick: () => !T.disabled && y(T.value),
1262
+ onClick: () => !M.disabled && y(M.value),
1263
1263
  className: i(
1264
1264
  "cursor-pointer px-3 py-1.5 text-sm",
1265
1265
  "text-text",
1266
- T.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
1266
+ M.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
1267
1267
  E && "bg-accent-soft text-accent font-semibold"
1268
1268
  ),
1269
1269
  children: /* @__PURE__ */ c("div", { className: "flex items-center", children: [
@@ -1276,10 +1276,10 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
1276
1276
  className: "mr-3 h-4 w-4 rounded border-border [&:not(:checked)]:bg-surface-input text-accent "
1277
1277
  }
1278
1278
  ),
1279
- /* @__PURE__ */ e("span", { children: T.label })
1279
+ /* @__PURE__ */ e("span", { children: M.label })
1280
1280
  ] })
1281
1281
  },
1282
- T.value
1282
+ M.value
1283
1283
  );
1284
1284
  })
1285
1285
  ] })
@@ -1322,7 +1322,7 @@ const zr = {
1322
1322
  id: f,
1323
1323
  ...b
1324
1324
  }, g) => {
1325
- const N = ce.useId(), p = f || `textfield-${N}`, x = !!n, C = n || r ? `${p}-description` : void 0;
1325
+ const N = oe.useId(), p = f || `textfield-${N}`, x = !!n, C = n || r ? `${p}-description` : void 0;
1326
1326
  return /* @__PURE__ */ c("div", { className: i("flex flex-col", a && "w-full", d), children: [
1327
1327
  t && /* @__PURE__ */ e(
1328
1328
  "label",
@@ -1386,8 +1386,8 @@ function Mr({
1386
1386
  templatePlaceholder: o,
1387
1387
  showTemplate: u = !0
1388
1388
  }) {
1389
- const [d, v] = H([]);
1390
- X(() => {
1389
+ const [d, v] = B([]);
1390
+ J(() => {
1391
1391
  let f = !0;
1392
1392
  return Promise.resolve(n?.()).then((b) => {
1393
1393
  f && b && v(b.data ?? []);
@@ -1453,26 +1453,26 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
1453
1453
  onChange: C,
1454
1454
  ...S
1455
1455
  }, I) => {
1456
- const A = m || `searchfield-${Math.random().toString(36).substr(2, 9)}`, K = !!n, W = re(null), D = re(null), [U, ne] = H(x || ""), [Z, Q] = H(!1), [de, w] = H(!1), [h, z] = H(!1);
1457
- X(() => {
1456
+ const A = m || `searchfield-${Math.random().toString(36).substr(2, 9)}`, K = !!n, W = re(null), D = re(null), [q, ne] = B(x || ""), [Y, X] = B(!1), [de, w] = B(!1), [h, z] = B(!1);
1457
+ J(() => {
1458
1458
  x !== void 0 && ne(x);
1459
1459
  }, [x]);
1460
1460
  const k = pe(() => {
1461
- if (p && !h || !U) return f;
1462
- const O = String(U).toLowerCase();
1461
+ if (p && !h || !q) return f;
1462
+ const O = String(q).toLowerCase();
1463
1463
  return f.filter(
1464
1464
  (F) => String(F.label).toLowerCase().includes(O)
1465
1465
  );
1466
- }, [U, f, p, h]);
1467
- X(() => {
1468
- if (!b || !U) {
1466
+ }, [q, f, p, h]);
1467
+ J(() => {
1468
+ if (!b || !q) {
1469
1469
  w(!1);
1470
1470
  return;
1471
1471
  }
1472
1472
  const O = setTimeout(async () => {
1473
1473
  w(!0);
1474
1474
  try {
1475
- await b(String(U));
1475
+ await b(String(q));
1476
1476
  } catch (F) {
1477
1477
  console.error("Remote search failed:", F);
1478
1478
  } finally {
@@ -1482,20 +1482,20 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
1482
1482
  return () => {
1483
1483
  clearTimeout(O), w(!1);
1484
1484
  };
1485
- }, [U, N, b]), X(() => {
1485
+ }, [q, N, b]), J(() => {
1486
1486
  const O = (F) => {
1487
- W.current && !W.current.contains(F.target) && Q(!1);
1487
+ W.current && !W.current.contains(F.target) && X(!1);
1488
1488
  };
1489
1489
  return document.addEventListener("mousedown", O), () => document.removeEventListener("mousedown", O);
1490
1490
  }, []);
1491
1491
  const _ = (O) => {
1492
1492
  const F = O.target.value;
1493
- ne(F), Q(!0), z(!0), C && C(O);
1493
+ ne(F), X(!0), z(!0), C && C(O);
1494
1494
  }, y = (O) => {
1495
- ne(O.label), Q(!1), z(!1), g && g(O.value);
1496
- }, V = () => {
1497
- (f.length > 0 || b) && (Q(!0), z(!1));
1498
- }, ae = o || de, ie = Z && (k.length > 0 || ae), G = pe(() => I || D, [I]);
1495
+ ne(O.label), X(!1), z(!1), g && g(O.value);
1496
+ }, H = () => {
1497
+ (f.length > 0 || b) && (X(!0), z(!1));
1498
+ }, ae = o || de, ce = Y && (k.length > 0 || ae), G = pe(() => I || D, [I]);
1499
1499
  return /* @__PURE__ */ c(
1500
1500
  "div",
1501
1501
  {
@@ -1526,9 +1526,9 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
1526
1526
  {
1527
1527
  ref: G,
1528
1528
  id: A,
1529
- value: U,
1529
+ value: q,
1530
1530
  onChange: _,
1531
- onFocus: V,
1531
+ onFocus: H,
1532
1532
  className: Ne(
1533
1533
  // Base styles
1534
1534
  "block w-full rounded-tile border bg-surface-input transition-colors duration-fast ease-out",
@@ -1564,16 +1564,16 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
1564
1564
  className: Ne(
1565
1565
  "text-text-muted cursor-pointer transition-transform",
1566
1566
  Fe[s],
1567
- Z ? "rotate-180" : "rotate-0"
1567
+ Y ? "rotate-180" : "rotate-0"
1568
1568
  ),
1569
1569
  onClick: () => {
1570
- Q((O) => (O || z(!1), !O));
1570
+ X((O) => (O || z(!1), !O));
1571
1571
  }
1572
1572
  }
1573
1573
  )
1574
1574
  ) })
1575
1575
  ] }),
1576
- ie && /* @__PURE__ */ e(
1576
+ ce && /* @__PURE__ */ e(
1577
1577
  "ul",
1578
1578
  {
1579
1579
  className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
@@ -1584,7 +1584,7 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
1584
1584
  className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
1585
1585
  onClick: () => y(O),
1586
1586
  role: "option",
1587
- "aria-selected": U === O.label,
1587
+ "aria-selected": q === O.label,
1588
1588
  children: O.label
1589
1589
  },
1590
1590
  O.value
@@ -1603,7 +1603,7 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
1603
1603
  ),
1604
1604
  b && /* @__PURE__ */ c("p", { className: "mt-2 text-xs text-success-fg", children: [
1605
1605
  "Huidige zoekterm (niet-gedebounced): ",
1606
- String(U)
1606
+ String(q)
1607
1607
  ] })
1608
1608
  ]
1609
1609
  }
@@ -1636,7 +1636,7 @@ const ct = ve(
1636
1636
  l
1637
1637
  ),
1638
1638
  children: [
1639
- /* @__PURE__ */ e(ee, { icon: Ie, size: "md", color: "current", className: "shrink-0" }),
1639
+ /* @__PURE__ */ e(Q, { icon: Ie, size: "md", color: "current", className: "shrink-0" }),
1640
1640
  /* @__PURE__ */ e(
1641
1641
  "input",
1642
1642
  {
@@ -1668,7 +1668,7 @@ const ct = ve(
1668
1668
  "aria-label": a,
1669
1669
  onClick: () => r(""),
1670
1670
  className: "grid size-4 shrink-0 cursor-pointer place-items-center rounded-xs text-text-subtle transition-colors duration-fast ease-out hover:text-text focus-visible:outline-none focus-visible:focus-ring",
1671
- children: /* @__PURE__ */ e(ee, { icon: Se, size: "sm", color: "current" })
1671
+ children: /* @__PURE__ */ e(Q, { icon: Se, size: "sm", color: "current" })
1672
1672
  }
1673
1673
  ) : n && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: n })
1674
1674
  ]
@@ -1741,10 +1741,10 @@ const Lr = ({
1741
1741
  showCheck: u = !0,
1742
1742
  header: d
1743
1743
  }) => {
1744
- const [v, m] = H(!1), [f, b] = H(null), [g, N] = H({ top: 0, left: 0 }), p = re(null), x = re(null), C = re(null), S = re(null), I = Pe(v, x, { placement: a }), A = re(null), K = () => Array.from(
1744
+ const [v, m] = B(!1), [f, b] = B(null), [g, N] = B({ top: 0, left: 0 }), p = re(null), x = re(null), C = re(null), S = re(null), I = Pe(v, x, { placement: a }), A = re(null), K = () => Array.from(
1745
1745
  S.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
1746
1746
  );
1747
- X(() => {
1747
+ J(() => {
1748
1748
  v && K()[0]?.focus();
1749
1749
  }, [v]);
1750
1750
  const W = (h) => {
@@ -1755,21 +1755,21 @@ const Lr = ({
1755
1755
  const _ = k.indexOf(document.activeElement), y = h.key === "Home" ? 0 : h.key === "End" ? k.length - 1 : h.key === "ArrowDown" ? (_ + 1) % k.length : (_ - 1 + k.length) % k.length;
1756
1756
  k[y]?.focus();
1757
1757
  };
1758
- X(() => {
1758
+ J(() => {
1759
1759
  const h = (z) => {
1760
1760
  p.current && (!p.current.contains(z.target) || C.current && !C.current.contains(z.target)) && (m(!1), b(null), A.current && (clearTimeout(A.current), A.current = null));
1761
1761
  };
1762
1762
  return v && document.addEventListener("mousedown", h), () => {
1763
1763
  document.removeEventListener("mousedown", h);
1764
1764
  };
1765
- }, [v]), X(() => {
1765
+ }, [v]), J(() => {
1766
1766
  const h = (z) => {
1767
1767
  z.key === "Escape" && (m(!1), b(null), x.current?.focus(), A.current && (clearTimeout(A.current), A.current = null));
1768
1768
  };
1769
1769
  return v && document.addEventListener("keydown", h), () => {
1770
1770
  document.removeEventListener("keydown", h);
1771
1771
  };
1772
- }, [v]), X(() => {
1772
+ }, [v]), J(() => {
1773
1773
  if (f && p.current) {
1774
1774
  const h = p.current.querySelector(
1775
1775
  `[data-option-value="${f}"]`
@@ -1782,20 +1782,20 @@ const Lr = ({
1782
1782
  });
1783
1783
  }
1784
1784
  }
1785
- }, [f]), X(() => () => {
1785
+ }, [f]), J(() => () => {
1786
1786
  A.current && clearTimeout(A.current);
1787
1787
  }, []);
1788
1788
  const D = (h) => {
1789
1789
  h.stopPropagation(), !l && (m(!v), b(null), A.current && (clearTimeout(A.current), A.current = null));
1790
- }, U = (h, z, k) => {
1790
+ }, q = (h, z, k) => {
1791
1791
  h.stopPropagation(), !z.disabled && !z.divider && (!z.children || z.children.length === 0) && (s?.(z.value, k), m(!1), b(null));
1792
1792
  }, ne = (h) => {
1793
1793
  A.current && (clearTimeout(A.current), A.current = null), h.children && h.children.length > 0 ? b(h.value) : b(null);
1794
- }, Z = (h) => {
1794
+ }, Y = (h) => {
1795
1795
  h.children && h.children.length > 0 ? A.current = setTimeout(() => {
1796
1796
  b(null);
1797
1797
  }, 150) : b(null);
1798
- }, Q = (h, z, k) => {
1798
+ }, X = (h, z, k) => {
1799
1799
  h.stopPropagation(), !z.disabled && !z.divider && (s?.(z.value, k), m(!1), b(null));
1800
1800
  }, de = i(
1801
1801
  "fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
@@ -1846,9 +1846,9 @@ const Lr = ({
1846
1846
  "data-option-value": h.value,
1847
1847
  role: "menuitem",
1848
1848
  "aria-haspopup": k ? "menu" : void 0,
1849
- onClick: (y) => U(y, h),
1849
+ onClick: (y) => q(y, h),
1850
1850
  onMouseEnter: () => ne(h),
1851
- onMouseLeave: () => Z(h),
1851
+ onMouseLeave: () => Y(h),
1852
1852
  disabled: h.disabled,
1853
1853
  className: i(
1854
1854
  "flex w-full items-center justify-between rounded-md px-3 py-1.5 text-sm text-text transition-colors duration-fast ease-out hover:bg-surface-hover focus-visible:outline-none focus-visible:focus-ring",
@@ -1889,14 +1889,14 @@ const Lr = ({
1889
1889
  b(null);
1890
1890
  }, 150);
1891
1891
  },
1892
- children: /* @__PURE__ */ e("div", { className: "p-2", children: h.children.map((y, V) => {
1892
+ children: /* @__PURE__ */ e("div", { className: "p-2", children: h.children.map((y, H) => {
1893
1893
  if (y.divider)
1894
1894
  return /* @__PURE__ */ e(
1895
1895
  "div",
1896
1896
  {
1897
1897
  className: "border-t border-border my-2"
1898
1898
  },
1899
- `divider-${V}`
1899
+ `divider-${H}`
1900
1900
  );
1901
1901
  const ae = typeof n == "object" && n[h.value] && n[h.value].includes(
1902
1902
  y.value
@@ -1904,8 +1904,8 @@ const Lr = ({
1904
1904
  return /* @__PURE__ */ c(
1905
1905
  "button",
1906
1906
  {
1907
- onClick: (ie) => Q(
1908
- ie,
1907
+ onClick: (ce) => X(
1908
+ ce,
1909
1909
  y,
1910
1910
  h.value
1911
1911
  ),
@@ -1954,7 +1954,7 @@ const Lr = ({
1954
1954
  defaultVariant: r = "secondary",
1955
1955
  className: n
1956
1956
  }) => t.length === 0 ? null : /* @__PURE__ */ e("div", { className: i("flex flex-wrap items-center gap-2", n), children: t.map(
1957
- (s) => s.render ? /* @__PURE__ */ e(ce.Fragment, { children: s.render() }, s.id) : s.splitOptions && s.splitOptions.length > 0 ? /* @__PURE__ */ e(
1957
+ (s) => s.render ? /* @__PURE__ */ e(oe.Fragment, { children: s.render() }, s.id) : s.splitOptions && s.splitOptions.length > 0 ? /* @__PURE__ */ e(
1958
1958
  st,
1959
1959
  {
1960
1960
  label: s.label,
@@ -1997,7 +1997,7 @@ const Lr = ({
1997
1997
  variant: "secondary",
1998
1998
  onClick: r,
1999
1999
  "aria-label": n,
2000
- leftIcon: /* @__PURE__ */ e(ee, { icon: ze, size: "sm" }),
2000
+ leftIcon: /* @__PURE__ */ e(Q, { icon: ze, size: "sm" }),
2001
2001
  iconOnly: !0
2002
2002
  }
2003
2003
  ),
@@ -2097,99 +2097,92 @@ const Rr = (t) => {
2097
2097
  footerSummary: K,
2098
2098
  size: W = "md",
2099
2099
  hoverable: D = !0,
2100
- padding: U = "md",
2100
+ padding: q = "md",
2101
2101
  className: ne,
2102
- rowClassName: Z,
2103
- headerBackground: Q = !0
2102
+ rowClassName: Y,
2103
+ headerBackground: X = !0
2104
2104
  }) => {
2105
- const [de, w] = H(""), h = l !== void 0, z = h ? l : de, k = o ?? w, [_, y] = H({
2105
+ const [de, w] = B(""), h = l !== void 0, z = h ? l : de, k = o ?? w, [_, y] = B({
2106
2106
  column: null,
2107
2107
  direction: null
2108
- }), [V, ae] = H({
2108
+ }), [H, ae] = B({
2109
2109
  page: 0,
2110
2110
  pageSize: g
2111
- }), ie = re(null), G = pe(() => {
2112
- let M = t;
2111
+ }), ce = re(null), G = pe(() => {
2112
+ let $ = t;
2113
2113
  if (s && !h && z.trim()) {
2114
- const B = r.filter(
2115
- (le) => le.searchable !== !1
2116
- ), J = z.toLowerCase();
2117
- M = M.filter((le) => B.some((Y) => {
2118
- const R = typeof Y.accessor == "function" ? Y.accessor(le) : le[Y.accessor];
2119
- return String(R || "").toLowerCase().includes(J);
2114
+ const U = r.filter(
2115
+ (ie) => ie.searchable !== !1
2116
+ ), te = z.toLowerCase();
2117
+ $ = $.filter((ie) => U.some((Z) => {
2118
+ const R = typeof Z.accessor == "function" ? Z.accessor(ie) : ie[Z.accessor];
2119
+ return String(R || "").toLowerCase().includes(te);
2120
2120
  }));
2121
2121
  }
2122
- return u.forEach((B) => {
2123
- B.value && B.value !== "all" && (M = M.filter((J) => {
2124
- const le = r.find((R) => R.id === B.id);
2125
- if (!le) return !0;
2126
- const Y = typeof le.accessor == "function" ? le.accessor(J) : J[le.accessor];
2127
- return String(Y || "") === B.value;
2128
- }));
2129
- }), M;
2130
- }, [t, z, h, r, s, u]), O = pe(() => {
2122
+ return $;
2123
+ }, [t, z, h, r, s]), O = pe(() => {
2131
2124
  if (!_.column || !_.direction) return G;
2132
- const M = r.find((B) => B.id === _.column);
2133
- return M ? [...G].sort((B, J) => {
2134
- const le = typeof M.accessor == "function" ? M.accessor(B) : B[M.accessor], Y = typeof M.accessor == "function" ? M.accessor(J) : J[M.accessor];
2125
+ const $ = r.find((U) => U.id === _.column);
2126
+ return $ ? [...G].sort((U, te) => {
2127
+ const ie = typeof $.accessor == "function" ? $.accessor(U) : U[$.accessor], Z = typeof $.accessor == "function" ? $.accessor(te) : te[$.accessor];
2135
2128
  let R = 0;
2136
- return le < Y ? R = -1 : le > Y && (R = 1), _.direction === "desc" ? -R : R;
2129
+ return ie < Z ? R = -1 : ie > Z && (R = 1), _.direction === "desc" ? -R : R;
2137
2130
  }) : G;
2138
2131
  }, [G, _, r]), F = pe(() => {
2139
2132
  if (!b || m) return O;
2140
- const M = V.page * V.pageSize, B = M + V.pageSize;
2141
- return O.slice(M, B);
2142
- }, [O, V, b, m]), T = xe(
2143
- (M) => {
2144
- r.find((J) => J.id === M)?.sortable && y((J) => J.column !== M ? { column: M, direction: "asc" } : J.direction === "asc" ? { column: M, direction: "desc" } : { column: null, direction: null });
2133
+ const $ = H.page * H.pageSize, U = $ + H.pageSize;
2134
+ return O.slice($, U);
2135
+ }, [O, H, b, m]), M = xe(
2136
+ ($) => {
2137
+ r.find((te) => te.id === $)?.sortable && y((te) => te.column !== $ ? { column: $, direction: "asc" } : te.direction === "asc" ? { column: $, direction: "desc" } : { column: null, direction: null });
2145
2138
  },
2146
2139
  [r]
2147
- ), E = xe((M) => {
2148
- ae((B) => ({ ...B, page: M }));
2140
+ ), E = xe(($) => {
2141
+ ae((U) => ({ ...U, page: $ }));
2149
2142
  }, []), P = xe(
2150
- (M, B) => {
2143
+ ($, U) => {
2151
2144
  if (!S) return;
2152
- const J = I(M, 0);
2153
- S(B ? [...C, M] : C.filter(
2154
- (le, Y) => I(C[Y], Y) !== J
2145
+ const te = I($, 0);
2146
+ S(U ? [...C, $] : C.filter(
2147
+ (ie, Z) => I(C[Z], Z) !== te
2155
2148
  ));
2156
2149
  },
2157
2150
  [C, S, I]
2158
2151
  ), j = xe(
2159
- (M) => {
2160
- S && S(M ? [...F] : []);
2152
+ ($) => {
2153
+ S && S($ ? [...F] : []);
2161
2154
  },
2162
2155
  [F, S]
2163
2156
  );
2164
- X(() => {
2165
- ae((M) => ({ ...M, page: 0 }));
2166
- }, [z, _]), X(() => {
2167
- ae((M) => ({ ...M, page: 0 }));
2168
- }, [u.map((M) => M.value).join(",")]);
2169
- const q = O.length, $ = Math.ceil(q / V.pageSize), L = V.page * V.pageSize + 1, te = Math.min(L + V.pageSize - 1, q), oe = F.length > 0 && F.every((M) => {
2170
- const B = I(M, 0);
2157
+ J(() => {
2158
+ ae(($) => ({ ...$, page: 0 }));
2159
+ }, [z, _]), J(() => {
2160
+ ae(($) => ({ ...$, page: 0 }));
2161
+ }, [u.map(($) => $.value).join(",")]);
2162
+ const V = O.length, T = Math.ceil(V / H.pageSize), L = H.page * H.pageSize + 1, ee = Math.min(L + H.pageSize - 1, V), le = F.length > 0 && F.every(($) => {
2163
+ const U = I($, 0);
2171
2164
  return C.some(
2172
- (J, le) => I(J, le) === B
2165
+ (te, ie) => I(te, ie) === U
2173
2166
  );
2174
- }), be = F.some((M) => {
2175
- const B = I(M, 0);
2167
+ }), be = F.some(($) => {
2168
+ const U = I($, 0);
2176
2169
  return C.some(
2177
- (J, le) => I(J, le) === B
2170
+ (te, ie) => I(te, ie) === U
2178
2171
  );
2179
- }), ye = Pr[U], fe = Q ? "bg-surface-sunk" : "bg-surface", he = i("text-text", ye), Oe = s || u.length > 0 || d.length > 0 || !!v, ft = pe(() => {
2180
- const M = F.map((Y, R) => ({ row: Y, index: R }));
2181
- if (!m) return [{ group: null, rows: M }];
2182
- const B = /* @__PURE__ */ new Map();
2183
- for (const Y of M) {
2184
- const R = m(Y.row, Y.index), ge = B.get(R);
2185
- ge ? ge.push(Y) : B.set(R, [Y]);
2172
+ }), ye = Pr[q], fe = X ? "bg-surface-sunk" : "bg-surface", he = i("text-text", ye), Oe = s || u.length > 0 || d.length > 0 || !!v, ft = pe(() => {
2173
+ const $ = F.map((Z, R) => ({ row: Z, index: R }));
2174
+ if (!m) return [{ group: null, rows: $ }];
2175
+ const U = /* @__PURE__ */ new Map();
2176
+ for (const Z of $) {
2177
+ const R = m(Z.row, Z.index), ge = U.get(R);
2178
+ ge ? ge.push(Z) : U.set(R, [Z]);
2186
2179
  }
2187
- const J = f ?? [];
2180
+ const te = f ?? [];
2188
2181
  return [
2189
- ...J.filter((Y) => B.has(Y.id)),
2190
- ...[...B.keys()].filter((Y) => !J.some((R) => R.id === Y)).map((Y) => ({ id: Y }))
2191
- ].map((Y) => ({ group: Y, rows: B.get(Y.id) ?? [] }));
2192
- }, [F, m, f]), ht = r.length + (x ? 1 : 0) + (N.length > 0 ? 1 : 0), qe = b && q > 0, xt = qe || K !== void 0;
2182
+ ...te.filter((Z) => U.has(Z.id)),
2183
+ ...[...U.keys()].filter((Z) => !te.some((R) => R.id === Z)).map((Z) => ({ id: Z }))
2184
+ ].map((Z) => ({ group: Z, rows: U.get(Z.id) ?? [] }));
2185
+ }, [F, m, f]), ht = r.length + (x ? 1 : 0) + (N.length > 0 ? 1 : 0), qe = b && V > 0, xt = qe || K !== void 0;
2193
2186
  return /* @__PURE__ */ c("div", { className: i("flex min-w-0 flex-col", ne), children: [
2194
2187
  Oe && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
2195
2188
  s && /* @__PURE__ */ e(
@@ -2201,23 +2194,23 @@ const Rr = (t) => {
2201
2194
  containerClassName: "w-full sm:w-66"
2202
2195
  }
2203
2196
  ),
2204
- u.map((M) => /* @__PURE__ */ e(Rr, { ...M }, M.id)),
2197
+ u.map(($) => /* @__PURE__ */ e(Rr, { ...$ }, $.id)),
2205
2198
  v,
2206
2199
  d.length > 0 && /* @__PURE__ */ e(ke, { actions: d, className: "ml-auto" })
2207
2200
  ] }),
2208
- /* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ c("table", { ref: ie, className: "min-w-full border-collapse text-base text-text", children: [
2201
+ /* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ c("table", { ref: ce, className: "min-w-full border-collapse text-base text-text", children: [
2209
2202
  /* @__PURE__ */ e("thead", { className: i(fe, "h-control-lg"), children: /* @__PURE__ */ c("tr", { children: [
2210
2203
  x && /* @__PURE__ */ e("th", { className: i(he, "w-10"), children: /* @__PURE__ */ e(
2211
2204
  we,
2212
2205
  {
2213
2206
  size: "sm",
2214
- checked: oe,
2215
- indeterminate: be && !oe,
2216
- onChange: (M) => j(M.target.checked),
2207
+ checked: le,
2208
+ indeterminate: be && !le,
2209
+ onChange: ($) => j($.target.checked),
2217
2210
  "aria-label": "Select all rows"
2218
2211
  }
2219
2212
  ) }),
2220
- r.map((M) => /* @__PURE__ */ e(
2213
+ r.map(($) => /* @__PURE__ */ e(
2221
2214
  "th",
2222
2215
  {
2223
2216
  className: i(
@@ -2225,46 +2218,46 @@ const Rr = (t) => {
2225
2218
  "text-xs font-semibold uppercase tracking-label text-text-muted",
2226
2219
  "group",
2227
2220
  {
2228
- "text-left": M.align === "left" || !M.align,
2229
- "text-center": M.align === "center",
2230
- "text-right": M.align === "right",
2231
- "cursor-pointer select-none": M.sortable,
2232
- [`sticky left-0 ${fe}`]: M.sticky === "left",
2233
- [`sticky right-0 ${fe}`]: M.sticky === "right"
2221
+ "text-left": $.align === "left" || !$.align,
2222
+ "text-center": $.align === "center",
2223
+ "text-right": $.align === "right",
2224
+ "cursor-pointer select-none": $.sortable,
2225
+ [`sticky left-0 ${fe}`]: $.sticky === "left",
2226
+ [`sticky right-0 ${fe}`]: $.sticky === "right"
2234
2227
  }
2235
2228
  ),
2236
- style: { width: M.width },
2237
- onClick: () => M.sortable && T(M.id),
2229
+ style: { width: $.width },
2230
+ onClick: () => $.sortable && M($.id),
2238
2231
  children: /* @__PURE__ */ c("div", { className: "flex items-center gap-1.5", children: [
2239
- M.headerCell ? M.headerCell() : M.header,
2240
- M.sortable && /* @__PURE__ */ e(
2241
- ee,
2232
+ $.headerCell ? $.headerCell() : $.header,
2233
+ $.sortable && /* @__PURE__ */ e(
2234
+ Q,
2242
2235
  {
2243
- icon: _.column === M.id && _.direction === "desc" ? De : _t,
2236
+ icon: _.column === $.id && _.direction === "desc" ? De : _t,
2244
2237
  size: "xs",
2245
2238
  className: i(
2246
2239
  "transition-opacity duration-fast ease-out",
2247
- _.column === M.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
2240
+ _.column === $.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
2248
2241
  )
2249
2242
  }
2250
2243
  )
2251
2244
  ] })
2252
2245
  },
2253
- M.id
2246
+ $.id
2254
2247
  )),
2255
2248
  N.length > 0 && /* @__PURE__ */ e("th", { className: i(he, "w-10"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
2256
2249
  ] }) }),
2257
- /* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: jr }).map((M, B) => /* @__PURE__ */ c("tr", { className: "animate-pulse border-t border-border-subtle", "aria-hidden": !0, children: [
2250
+ /* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: jr }).map(($, U) => /* @__PURE__ */ c("tr", { className: "animate-pulse border-t border-border-subtle", "aria-hidden": !0, children: [
2258
2251
  x && /* @__PURE__ */ e("td", { className: i(he, "h-row-lg"), children: /* @__PURE__ */ e("span", { className: "block size-4 rounded-xs bg-surface-hover" }) }),
2259
- r.map((J, le) => /* @__PURE__ */ e("td", { className: i(he, "h-row-lg"), style: { width: J.width }, children: /* @__PURE__ */ e(
2252
+ r.map((te, ie) => /* @__PURE__ */ e("td", { className: i(he, "h-row-lg"), style: { width: te.width }, children: /* @__PURE__ */ e(
2260
2253
  "span",
2261
2254
  {
2262
2255
  className: "block h-3 rounded-xs bg-surface-hover",
2263
- style: { width: Je[(B + le) % Je.length] }
2256
+ style: { width: Je[(U + ie) % Je.length] }
2264
2257
  }
2265
- ) }, J.id)),
2258
+ ) }, te.id)),
2266
2259
  N.length > 0 && /* @__PURE__ */ e("td", { className: i(he, "h-row-lg") })
2267
- ] }, `skeleton-${B}`)) : F.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
2260
+ ] }, `skeleton-${U}`)) : F.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
2268
2261
  "td",
2269
2262
  {
2270
2263
  colSpan: r.length + (x ? 1 : 0) + (N.length > 0 ? 1 : 0),
@@ -2274,8 +2267,8 @@ const Rr = (t) => {
2274
2267
  ),
2275
2268
  children: A || "No data available"
2276
2269
  }
2277
- ) }) : ft.flatMap((M) => [
2278
- ...M.group ? [
2270
+ ) }) : ft.flatMap(($) => [
2271
+ ...$.group ? [
2279
2272
  /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
2280
2273
  "td",
2281
2274
  {
@@ -2284,18 +2277,18 @@ const Rr = (t) => {
2284
2277
  // A caption over its rows, not a second column strip:
2285
2278
  // same surface as the rows, no rules, count on the right.
2286
2279
  "border-t border-border-subtle bg-surface px-4 pb-1.5 pt-4 text-sm font-semibold",
2287
- M.group.tone === "danger" ? "text-danger-fg" : M.group.tone === "muted" ? "text-text-subtle" : "text-text"
2280
+ $.group.tone === "danger" ? "text-danger-fg" : $.group.tone === "muted" ? "text-text-subtle" : "text-text"
2288
2281
  ),
2289
2282
  children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2.5", children: [
2290
- M.group.title ?? M.group.id,
2291
- /* @__PURE__ */ e("span", { className: "rounded-full bg-surface-sunk px-1.5 py-0.5 text-xs font-medium text-text-muted tabular-nums", children: M.group.count ?? M.rows.length })
2283
+ $.group.title ?? $.group.id,
2284
+ /* @__PURE__ */ e("span", { className: "rounded-full bg-surface-sunk px-1.5 py-0.5 text-xs font-medium text-text-muted tabular-nums", children: $.group.count ?? $.rows.length })
2292
2285
  ] })
2293
2286
  }
2294
- ) }, `group-${M.group.id}`)
2287
+ ) }, `group-${$.group.id}`)
2295
2288
  ] : [],
2296
- ...M.rows.map(({ row: B, index: J }) => {
2297
- const le = I(B, J), Y = C.some(
2298
- (R, ge) => I(R, ge) === le
2289
+ ...$.rows.map(({ row: U, index: te }) => {
2290
+ const ie = I(U, te), Z = C.some(
2291
+ (R, ge) => I(R, ge) === ie
2299
2292
  );
2300
2293
  return /* @__PURE__ */ c(
2301
2294
  "tr",
@@ -2307,27 +2300,27 @@ const Rr = (t) => {
2307
2300
  "border-t border-border-subtle",
2308
2301
  D && "transition-colors duration-fast ease-out hover:bg-surface-hover",
2309
2302
  p && "cursor-pointer",
2310
- Y && "bg-accent-soft",
2311
- Z?.(B, J)
2303
+ Z && "bg-accent-soft",
2304
+ Y?.(U, te)
2312
2305
  ),
2313
2306
  onClick: (R) => {
2314
- R.stopPropagation(), p?.(B, J);
2307
+ R.stopPropagation(), p?.(U, te);
2315
2308
  },
2316
2309
  children: [
2317
2310
  x && /* @__PURE__ */ e("td", { className: he, children: /* @__PURE__ */ e(
2318
2311
  we,
2319
2312
  {
2320
2313
  size: "sm",
2321
- checked: Y,
2314
+ checked: Z,
2322
2315
  onClick: (R) => R.stopPropagation(),
2323
2316
  onChange: (R) => {
2324
- R.stopPropagation(), P(B, R.target.checked);
2317
+ R.stopPropagation(), P(U, R.target.checked);
2325
2318
  },
2326
2319
  "aria-label": "Select row"
2327
2320
  }
2328
2321
  ) }),
2329
2322
  r.map((R) => {
2330
- const ge = typeof R.accessor == "function" ? R.accessor(B) : B[R.accessor];
2323
+ const ge = typeof R.accessor == "function" ? R.accessor(U) : U[R.accessor];
2331
2324
  return /* @__PURE__ */ e(
2332
2325
  "td",
2333
2326
  {
@@ -2338,7 +2331,7 @@ const Rr = (t) => {
2338
2331
  "sticky left-0 bg-surface": R.sticky === "left",
2339
2332
  "sticky right-0 bg-surface": R.sticky === "right"
2340
2333
  }),
2341
- children: R.cell ? R.cell(ge, B, J) : String(ge || "")
2334
+ children: R.cell ? R.cell(ge, U, te) : String(ge || "")
2342
2335
  },
2343
2336
  R.id
2344
2337
  );
@@ -2347,31 +2340,31 @@ const Rr = (t) => {
2347
2340
  Lr,
2348
2341
  {
2349
2342
  className: "rounded-md",
2350
- trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(ee, { icon: At, size: "md", color: "current" }) }),
2343
+ trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(Q, { icon: At, size: "md", color: "current" }) }),
2351
2344
  options: N.map((R) => ({
2352
2345
  value: R.id,
2353
2346
  label: R.label,
2354
2347
  icon: R.icon,
2355
- disabled: R.disabled?.(B)
2348
+ disabled: R.disabled?.(U)
2356
2349
  })),
2357
2350
  onSelect: (R) => {
2358
2351
  const ge = N.find(
2359
2352
  (bt) => bt.id === R
2360
2353
  );
2361
- ge && ge.onClick(B, J);
2354
+ ge && ge.onClick(U, te);
2362
2355
  },
2363
2356
  placement: "bottom-end"
2364
2357
  }
2365
2358
  ) })
2366
2359
  ]
2367
2360
  },
2368
- le
2361
+ ie
2369
2362
  );
2370
2363
  })
2371
2364
  ]) })
2372
2365
  ] }) }),
2373
2366
  xt && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-3 px-1 pt-3 text-xs text-text-muted", children: [
2374
- /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: K ?? `Showing ${L}–${te} of ${q}` }),
2367
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: K ?? `Showing ${L}–${ee} of ${V}` }),
2375
2368
  qe && /* @__PURE__ */ c("div", { className: "flex items-center gap-0.5", children: [
2376
2369
  /* @__PURE__ */ e(
2377
2370
  se,
@@ -2380,27 +2373,27 @@ const Rr = (t) => {
2380
2373
  variant: "ghost",
2381
2374
  iconOnly: !0,
2382
2375
  "aria-label": "Previous page",
2383
- onClick: () => E(V.page - 1),
2384
- disabled: V.page === 0,
2385
- children: /* @__PURE__ */ e(ee, { icon: ze, size: "md", color: "current" })
2376
+ onClick: () => E(H.page - 1),
2377
+ disabled: H.page === 0,
2378
+ children: /* @__PURE__ */ e(Q, { icon: ze, size: "md", color: "current" })
2386
2379
  }
2387
2380
  ),
2388
- Fr(V.page, $).map(
2389
- (M, B) => M === "gap" ? /* @__PURE__ */ e("span", { className: "px-1 text-text-subtle", children: "…" }, `gap-${B}`) : /* @__PURE__ */ e(
2381
+ Fr(H.page, T).map(
2382
+ ($, U) => $ === "gap" ? /* @__PURE__ */ e("span", { className: "px-1 text-text-subtle", children: "…" }, `gap-${U}`) : /* @__PURE__ */ e(
2390
2383
  "button",
2391
2384
  {
2392
2385
  type: "button",
2393
- "aria-current": M === V.page ? "page" : void 0,
2394
- onClick: () => E(M),
2386
+ "aria-current": $ === H.page ? "page" : void 0,
2387
+ onClick: () => E($),
2395
2388
  className: i(
2396
2389
  "h-control-xs min-w-6 cursor-pointer rounded-sm px-1.5 tabular-nums",
2397
2390
  "transition-colors duration-fast ease-out",
2398
2391
  "focus-visible:outline-none focus-visible:focus-ring",
2399
- M === V.page ? "bg-surface-sunk font-semibold text-text" : "text-text-muted hover:bg-surface-hover hover:text-text"
2392
+ $ === H.page ? "bg-surface-sunk font-semibold text-text" : "text-text-muted hover:bg-surface-hover hover:text-text"
2400
2393
  ),
2401
- children: M + 1
2394
+ children: $ + 1
2402
2395
  },
2403
- M
2396
+ $
2404
2397
  )
2405
2398
  ),
2406
2399
  /* @__PURE__ */ e(
@@ -2410,9 +2403,9 @@ const Rr = (t) => {
2410
2403
  variant: "ghost",
2411
2404
  iconOnly: !0,
2412
2405
  "aria-label": "Next page",
2413
- onClick: () => E(V.page + 1),
2414
- disabled: V.page >= $ - 1,
2415
- children: /* @__PURE__ */ e(ee, { icon: Le, size: "md", color: "current" })
2406
+ onClick: () => E(H.page + 1),
2407
+ disabled: H.page >= T - 1,
2408
+ children: /* @__PURE__ */ e(Q, { icon: Le, size: "md", color: "current" })
2416
2409
  }
2417
2410
  )
2418
2411
  ] })
@@ -2424,7 +2417,7 @@ const Rr = (t) => {
2424
2417
  onTabChange: n,
2425
2418
  className: s
2426
2419
  }) => {
2427
- const [a, l] = H(t[0]?.id || ""), o = r || a, u = (d) => {
2420
+ const [a, l] = B(t[0]?.id || ""), o = r || a, u = (d) => {
2428
2421
  n ? n(d) : l(d);
2429
2422
  };
2430
2423
  return /* @__PURE__ */ e("div", { className: i("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((d) => /* @__PURE__ */ e(
@@ -2459,7 +2452,7 @@ const Rr = (t) => {
2459
2452
  size: l = "md",
2460
2453
  className: o
2461
2454
  }) => {
2462
- const [u, d] = H(
2455
+ const [u, d] = B(
2463
2456
  r || n || t[0]?.id || ""
2464
2457
  ), v = n || u, m = (p) => {
2465
2458
  s ? s(p) : d(p);
@@ -2550,13 +2543,13 @@ function it({
2550
2543
  showCloseButton: m = !0
2551
2544
  }) {
2552
2545
  const f = re(null), b = re(null);
2553
- X(() => {
2546
+ J(() => {
2554
2547
  if (!t || !l) return;
2555
2548
  const N = (p) => {
2556
2549
  p.key === "Escape" && r();
2557
2550
  };
2558
2551
  return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
2559
- }, [t, l, r]), X(() => (t ? (b.current = document.activeElement, f.current && f.current.focus(), document.body.style.overflow = "hidden") : (b.current && b.current.focus(), document.body.style.overflow = ""), () => {
2552
+ }, [t, l, r]), J(() => (t ? (b.current = document.activeElement, f.current && f.current.focus(), document.body.style.overflow = "hidden") : (b.current && b.current.focus(), document.body.style.overflow = ""), () => {
2560
2553
  document.body.style.overflow = "";
2561
2554
  }), [t]);
2562
2555
  const g = (N) => {
@@ -2603,7 +2596,7 @@ function it({
2603
2596
  onClick: r,
2604
2597
  className: "p-1 text-text-muted hover:text-text transition-colors",
2605
2598
  "aria-label": "Close modal",
2606
- children: /* @__PURE__ */ e(ee, { icon: Se, size: "lg", color: "current" })
2599
+ children: /* @__PURE__ */ e(Q, { icon: Se, size: "lg", color: "current" })
2607
2600
  }
2608
2601
  )
2609
2602
  ] }),
@@ -2629,21 +2622,21 @@ const qr = ({
2629
2622
  onDownloadFile: m,
2630
2623
  onRegisterFile: f
2631
2624
  }) => {
2632
- const [b, g] = H(!1), [N, p] = H([]), [x, C] = H(null), [S, I] = H("/"), [A, K] = H([]), [W, D] = H(!1), [U, ne] = H(""), [Z, Q] = H(
2625
+ const [b, g] = B(!1), [N, p] = B([]), [x, C] = B(null), [S, I] = B("/"), [A, K] = B([]), [W, D] = B(!1), [q, ne] = B(""), [Y, X] = B(
2633
2626
  typeof t == "object" ? t : null
2634
- ), [de, w] = H(!1), [h, z] = H(""), k = re(null);
2635
- X(() => {
2627
+ ), [de, w] = B(!1), [h, z] = B(""), k = re(null);
2628
+ J(() => {
2636
2629
  b && _();
2637
- }, [b]), X(() => {
2630
+ }, [b]), J(() => {
2638
2631
  b && x && y();
2639
- }, [b, x, S, U]);
2632
+ }, [b, x, S, q]);
2640
2633
  const _ = async () => {
2641
2634
  D(!0);
2642
2635
  try {
2643
- const $ = await d?.();
2644
- $?.data && p($.data);
2645
- } catch ($) {
2646
- console.error("Failed to load mounts", $);
2636
+ const T = await d?.();
2637
+ T?.data && p(T.data);
2638
+ } catch (T) {
2639
+ console.error("Failed to load mounts", T);
2647
2640
  } finally {
2648
2641
  D(!1);
2649
2642
  }
@@ -2651,20 +2644,20 @@ const qr = ({
2651
2644
  if (x) {
2652
2645
  D(!0);
2653
2646
  try {
2654
- const $ = await u?.({ mountId: x.id, name: U, path: S });
2655
- $?.data && K($.data);
2656
- } catch ($) {
2657
- console.error("Failed to load files", $);
2647
+ const T = await u?.({ mountId: x.id, name: q, path: S });
2648
+ T?.data && K(T.data);
2649
+ } catch (T) {
2650
+ console.error("Failed to load files", T);
2658
2651
  } finally {
2659
2652
  D(!1);
2660
2653
  }
2661
2654
  }
2662
- }, V = async ($) => {
2663
- const L = $.target.files?.[0];
2655
+ }, H = async (T) => {
2656
+ const L = T.target.files?.[0];
2664
2657
  if (L) {
2665
2658
  D(!0);
2666
2659
  try {
2667
- const te = await L.arrayBuffer(), oe = new Uint8Array(te), be = {
2660
+ const ee = await L.arrayBuffer(), le = new Uint8Array(ee), be = {
2668
2661
  id: `local-${Date.now()}`,
2669
2662
  name: L.name,
2670
2663
  type: "file",
@@ -2675,40 +2668,40 @@ const qr = ({
2675
2668
  providerKey: L.name,
2676
2669
  ownerId: "me"
2677
2670
  };
2678
- Q(be), r(be, oe), g(!1);
2679
- } catch (te) {
2680
- console.error("Local file selection failed", te);
2671
+ X(be), r(be, le), g(!1);
2672
+ } catch (ee) {
2673
+ console.error("Local file selection failed", ee);
2681
2674
  } finally {
2682
2675
  D(!1);
2683
2676
  }
2684
2677
  }
2685
- }, ae = async ($) => {
2686
- const L = $.target.files?.[0];
2678
+ }, ae = async (T) => {
2679
+ const L = T.target.files?.[0];
2687
2680
  if (!(!L || !x)) {
2688
2681
  D(!0);
2689
2682
  try {
2690
- const te = await L.arrayBuffer(), oe = await v?.({
2691
- file: new Uint8Array(te),
2683
+ const ee = await L.arrayBuffer(), le = await v?.({
2684
+ file: new Uint8Array(ee),
2692
2685
  filename: L.name,
2693
2686
  mimeType: L.type || "application/octet-stream",
2694
2687
  mountId: x.id,
2695
2688
  path: S
2696
2689
  });
2697
- if (oe?.data) {
2698
- const be = oe.data;
2699
- Q(be), r(be, new Uint8Array(te)), g(!1);
2690
+ if (le?.data) {
2691
+ const be = le.data;
2692
+ X(be), r(be, new Uint8Array(ee)), g(!1);
2700
2693
  }
2701
- } catch (te) {
2702
- console.error("Upload failed", te);
2694
+ } catch (ee) {
2695
+ console.error("Upload failed", ee);
2703
2696
  } finally {
2704
2697
  D(!1);
2705
2698
  }
2706
2699
  }
2707
- }, ie = async () => {
2700
+ }, ce = async () => {
2708
2701
  if (!(!h || !x)) {
2709
2702
  D(!0);
2710
2703
  try {
2711
- const $ = `${S}${h}/`;
2704
+ const T = `${S}${h}/`;
2712
2705
  f && (await f({
2713
2706
  name: h,
2714
2707
  type: "folder",
@@ -2716,109 +2709,109 @@ const qr = ({
2716
2709
  mimeType: "application/x-directory",
2717
2710
  size: 0,
2718
2711
  mountId: x.id,
2719
- providerKey: $,
2712
+ providerKey: T,
2720
2713
  ownerId: "me"
2721
2714
  }), await y()), w(!1), z("");
2722
- } catch ($) {
2723
- console.error("Failed to create folder", $);
2715
+ } catch (T) {
2716
+ console.error("Failed to create folder", T);
2724
2717
  } finally {
2725
2718
  D(!1);
2726
2719
  }
2727
2720
  }
2728
- }, G = async ($) => {
2721
+ }, G = async (T) => {
2729
2722
  D(!0);
2730
2723
  try {
2731
- const L = await m?.($.id);
2732
- Q($), r($, L), g(!1);
2724
+ const L = await m?.(T.id);
2725
+ X(T), r(T, L), g(!1);
2733
2726
  } catch (L) {
2734
2727
  console.error("Failed to download file", L);
2735
2728
  } finally {
2736
2729
  D(!1);
2737
2730
  }
2738
- }, O = ($) => {
2739
- $.stopPropagation(), Q(null), r(null);
2731
+ }, O = (T) => {
2732
+ T.stopPropagation(), X(null), r(null);
2740
2733
  }, F = pe(() => {
2741
- const $ = /* @__PURE__ */ new Set(), L = [];
2742
- return A.forEach((te) => {
2743
- if (te.type === "folder") {
2744
- te.path === S && $.add(te.name);
2734
+ const T = /* @__PURE__ */ new Set(), L = [];
2735
+ return A.forEach((ee) => {
2736
+ if (ee.type === "folder") {
2737
+ ee.path === S && T.add(ee.name);
2745
2738
  return;
2746
2739
  }
2747
- const oe = te.providerKey || te.name, ye = (S ? oe.substring(S.length) : oe).split("/").filter((fe) => fe !== "");
2748
- ye.length > 1 ? $.add(ye[0]) : ye.length === 1 && L.push(te);
2740
+ const le = ee.providerKey || ee.name, ye = (S ? le.substring(S.length) : le).split("/").filter((fe) => fe !== "");
2741
+ ye.length > 1 ? T.add(ye[0]) : ye.length === 1 && L.push(ee);
2749
2742
  }), {
2750
- folders: Array.from($).sort(),
2751
- files: L.sort((te, oe) => te.name.localeCompare(oe.name))
2743
+ folders: Array.from(T).sort(),
2744
+ files: L.sort((ee, le) => ee.name.localeCompare(le.name))
2752
2745
  };
2753
- }, [A, S]), T = ($) => {
2754
- I((L) => `${L}${$}/`);
2746
+ }, [A, S]), M = (T) => {
2747
+ I((L) => `${L}${T}/`);
2755
2748
  }, E = () => {
2756
- const $ = S.split("/").filter((L) => L !== "");
2757
- $.pop(), $.length === 0 ? I("/") : I(`${$.join("/")}/`);
2749
+ const T = S.split("/").filter((L) => L !== "");
2750
+ T.pop(), T.length === 0 ? I("/") : I(`${T.join("/")}/`);
2758
2751
  }, P = pe(() => {
2759
- const $ = F.folders.map((L) => ({
2752
+ const T = F.folders.map((L) => ({
2760
2753
  id: `folder-${L}`,
2761
2754
  name: L,
2762
2755
  type: "folder"
2763
2756
  }));
2764
2757
  return F.files.forEach((L) => {
2765
- $.push({
2758
+ T.push({
2766
2759
  ...L,
2767
2760
  type: "file"
2768
2761
  });
2769
- }), $;
2762
+ }), T;
2770
2763
  }, [F]), j = [
2771
2764
  {
2772
2765
  id: "name",
2773
2766
  header: "Name",
2774
2767
  accessor: "name",
2775
- cell: ($, L) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
2768
+ cell: (T, L) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
2776
2769
  /* @__PURE__ */ e(
2777
- ee,
2770
+ Q,
2778
2771
  {
2779
2772
  icon: L.type === "folder" ? Ke : je,
2780
2773
  size: "sm",
2781
2774
  color: L.type === "folder" ? "warning" : "secondary"
2782
2775
  }
2783
2776
  ),
2784
- /* @__PURE__ */ e("span", { className: i(L.type === "folder" && "font-medium"), children: $ })
2777
+ /* @__PURE__ */ e("span", { className: i(L.type === "folder" && "font-medium"), children: T })
2785
2778
  ] })
2786
2779
  },
2787
2780
  {
2788
2781
  id: "type",
2789
2782
  header: "Type",
2790
- accessor: ($) => $.type === "folder" ? "Folder" : $.mimeType
2783
+ accessor: (T) => T.type === "folder" ? "Folder" : T.mimeType
2791
2784
  },
2792
2785
  {
2793
2786
  id: "size",
2794
2787
  header: "Size",
2795
- accessor: ($) => $.type === "file" ? `${($.size / 1024).toFixed(1)} KB` : "-"
2788
+ accessor: (T) => T.type === "file" ? `${(T.size / 1024).toFixed(1)} KB` : "-"
2796
2789
  },
2797
2790
  {
2798
2791
  id: "actions",
2799
2792
  header: "",
2800
2793
  accessor: "id",
2801
2794
  align: "right",
2802
- cell: ($, L) => /* @__PURE__ */ e(
2795
+ cell: (T, L) => /* @__PURE__ */ e(
2803
2796
  se,
2804
2797
  {
2805
2798
  variant: "outline",
2806
- onClick: (te) => {
2807
- te.stopPropagation(), L.type === "folder" ? T(L.name) : G(L);
2799
+ onClick: (ee) => {
2800
+ ee.stopPropagation(), L.type === "folder" ? M(L.name) : G(L);
2808
2801
  },
2809
- loading: W && L.type === "file" && Z?.id === L.id,
2802
+ loading: W && L.type === "file" && Y?.id === L.id,
2810
2803
  children: L.type === "folder" ? "Open" : "Select"
2811
2804
  }
2812
2805
  )
2813
2806
  }
2814
- ], q = [
2807
+ ], V = [
2815
2808
  {
2816
2809
  id: "name",
2817
2810
  header: "Mount Name",
2818
2811
  accessor: "name",
2819
- cell: ($) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2 font-medium", children: [
2820
- /* @__PURE__ */ e(ee, { icon: We, size: "sm", color: "primary" }),
2821
- /* @__PURE__ */ e("span", { children: $ })
2812
+ cell: (T) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2 font-medium", children: [
2813
+ /* @__PURE__ */ e(Q, { icon: We, size: "sm", color: "primary" }),
2814
+ /* @__PURE__ */ e("span", { children: T })
2822
2815
  ] })
2823
2816
  },
2824
2817
  {
@@ -2826,7 +2819,7 @@ const qr = ({
2826
2819
  header: "",
2827
2820
  accessor: "id",
2828
2821
  align: "right",
2829
- cell: ($, L) => /* @__PURE__ */ e(se, { variant: "outline", onClick: () => C(L), children: "Open" })
2822
+ cell: (T, L) => /* @__PURE__ */ e(se, { variant: "outline", onClick: () => C(L), children: "Open" })
2830
2823
  }
2831
2824
  ];
2832
2825
  return /* @__PURE__ */ c("div", { className: "space-y-1", children: [
@@ -2842,14 +2835,14 @@ const qr = ({
2842
2835
  l && "opacity-50 cursor-not-allowed bg-surface-sunk"
2843
2836
  ),
2844
2837
  children: [
2845
- /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(ee, { icon: Z ? je : We, color: Z ? "primary" : "secondary" }) }),
2846
- /* @__PURE__ */ e("div", { className: "flex-grow truncate", children: Z ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: Z.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
2847
- Z && !l && /* @__PURE__ */ e(
2838
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Q, { icon: Y ? je : We, color: Y ? "primary" : "secondary" }) }),
2839
+ /* @__PURE__ */ e("div", { className: "flex-grow truncate", children: Y ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: Y.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
2840
+ Y && !l && /* @__PURE__ */ e(
2848
2841
  "button",
2849
2842
  {
2850
2843
  onClick: O,
2851
2844
  className: "p-1 hover:bg-surface-hover rounded",
2852
- children: /* @__PURE__ */ e(ee, { icon: Se, size: "xs" })
2845
+ children: /* @__PURE__ */ e(Q, { icon: Se, size: "xs" })
2853
2846
  }
2854
2847
  )
2855
2848
  ]
@@ -2882,7 +2875,7 @@ const qr = ({
2882
2875
  onClick: () => {
2883
2876
  S && S !== "/" ? E() : C(null);
2884
2877
  },
2885
- leftIcon: /* @__PURE__ */ e(ee, { icon: Dt, size: "xs" }),
2878
+ leftIcon: /* @__PURE__ */ e(Q, { icon: Dt, size: "xs" }),
2886
2879
  children: S ? "Back" : "Back to Mounts"
2887
2880
  }
2888
2881
  ),
@@ -2891,8 +2884,8 @@ const qr = ({
2891
2884
  Ce,
2892
2885
  {
2893
2886
  placeholder: "Search...",
2894
- value: U,
2895
- onChange: ($) => ne($.target.value),
2887
+ value: q,
2888
+ onChange: (T) => ne(T.target.value),
2896
2889
  startIcon: /* @__PURE__ */ e(Ie, { size: 14 }),
2897
2890
  fullWidth: !0
2898
2891
  }
@@ -2903,7 +2896,7 @@ const qr = ({
2903
2896
  {
2904
2897
  variant: "outline",
2905
2898
  onClick: () => w(!0),
2906
- leftIcon: /* @__PURE__ */ e(ee, { icon: Lt, size: "xs" }),
2899
+ leftIcon: /* @__PURE__ */ e(Q, { icon: Lt, size: "xs" }),
2907
2900
  children: "New Folder"
2908
2901
  }
2909
2902
  ),
@@ -2912,7 +2905,7 @@ const qr = ({
2912
2905
  {
2913
2906
  variant: "primary",
2914
2907
  onClick: () => k.current?.click(),
2915
- leftIcon: /* @__PURE__ */ e(ee, { icon: It, size: "xs" }),
2908
+ leftIcon: /* @__PURE__ */ e(Q, { icon: It, size: "xs" }),
2916
2909
  loading: W,
2917
2910
  children: "Upload"
2918
2911
  }
@@ -2930,17 +2923,17 @@ const qr = ({
2930
2923
  ] })
2931
2924
  ] }),
2932
2925
  de && /* @__PURE__ */ c("div", { className: "flex items-center gap-2 p-3 bg-surface-sunk rounded-lg border border-border", children: [
2933
- /* @__PURE__ */ e(ee, { icon: Ke, size: "sm", color: "warning" }),
2926
+ /* @__PURE__ */ e(Q, { icon: Ke, size: "sm", color: "warning" }),
2934
2927
  /* @__PURE__ */ e(
2935
2928
  Ce,
2936
2929
  {
2937
2930
  placeholder: "Folder name",
2938
2931
  value: h,
2939
- onChange: ($) => z($.target.value),
2932
+ onChange: (T) => z(T.target.value),
2940
2933
  autoFocus: !0
2941
2934
  }
2942
2935
  ),
2943
- /* @__PURE__ */ e(se, { onClick: ie, loading: W, children: "Create" }),
2936
+ /* @__PURE__ */ e(se, { onClick: ce, loading: W, children: "Create" }),
2944
2937
  /* @__PURE__ */ e(se, { variant: "ghost", onClick: () => w(!1), children: "Cancel" })
2945
2938
  ] }),
2946
2939
  /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
@@ -2950,17 +2943,17 @@ const qr = ({
2950
2943
  columns: j,
2951
2944
  loading: W,
2952
2945
  emptyContent: "This folder is empty",
2953
- onRowClick: ($) => $.type === "folder" ? T($.name) : G($)
2946
+ onRowClick: (T) => T.type === "folder" ? M(T.name) : G(T)
2954
2947
  }
2955
2948
  ) })
2956
2949
  ] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
2957
2950
  Ye,
2958
2951
  {
2959
2952
  data: N,
2960
- columns: q,
2953
+ columns: V,
2961
2954
  loading: W,
2962
2955
  emptyContent: "No storage mounts configured",
2963
- onRowClick: ($) => C($)
2956
+ onRowClick: (T) => C(T)
2964
2957
  }
2965
2958
  ) }) })
2966
2959
  },
@@ -2968,7 +2961,7 @@ const qr = ({
2968
2961
  id: "local",
2969
2962
  label: "Local File",
2970
2963
  content: /* @__PURE__ */ e("div", { className: "space-y-6", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 border-2 border-dashed border-border rounded-xl bg-surface-sunk/50", children: [
2971
- /* @__PURE__ */ e("div", { className: "p-4 bg-accent-soft rounded-full mb-4", children: /* @__PURE__ */ e(ee, { icon: je, size: "xl", color: "primary" }) }),
2964
+ /* @__PURE__ */ e("div", { className: "p-4 bg-accent-soft rounded-full mb-4", children: /* @__PURE__ */ e(Q, { icon: je, size: "xl", color: "primary" }) }),
2972
2965
  /* @__PURE__ */ e(ue, { variant: "label", size: "lg", weight: "semibold", children: "Select a file from your computer" }),
2973
2966
  /* @__PURE__ */ c(ue, { variant: "body", size: "sm", className: "text-text-muted mt-1 mb-6 text-center max-w-xs", children: [
2974
2967
  "This file will be used directly in the form and will ",
@@ -2982,7 +2975,7 @@ const qr = ({
2982
2975
  {
2983
2976
  type: "file",
2984
2977
  className: "hidden",
2985
- onChange: V,
2978
+ onChange: H,
2986
2979
  accept: o,
2987
2980
  disabled: W
2988
2981
  }
@@ -3016,7 +3009,7 @@ const qr = ({
3016
3009
  rows: m = 4,
3017
3010
  ...f
3018
3011
  }, b) => {
3019
- const g = ce.useId(), N = v || `textarea-${g}`, p = !!n, x = n || r ? `${N}-description` : void 0;
3012
+ const g = oe.useId(), N = v || `textarea-${g}`, p = !!n, x = n || r ? `${N}-description` : void 0;
3020
3013
  return /* @__PURE__ */ c("div", { className: i("flex flex-col", a && "w-full", o), children: [
3021
3014
  t && /* @__PURE__ */ e(
3022
3015
  "label",
@@ -3173,8 +3166,8 @@ const ms = ({
3173
3166
  ref: N,
3174
3167
  sdk: p
3175
3168
  }) => {
3176
- const [x, C] = H(r || {}), [S, I] = H({}), [A, K] = H({});
3177
- X(() => {
3169
+ const [x, C] = B(r || {}), [S, I] = B({}), [A, K] = B({});
3170
+ J(() => {
3178
3171
  r && C({ ...r });
3179
3172
  }, [r]);
3180
3173
  const W = xe(
@@ -3191,18 +3184,18 @@ const ms = ({
3191
3184
  if (Array.isArray(h) && k.arrayFields) {
3192
3185
  const _ = [];
3193
3186
  let y = !1;
3194
- if (h.forEach((V, ae) => {
3195
- const ie = {};
3187
+ if (h.forEach((H, ae) => {
3188
+ const ce = {};
3196
3189
  for (const G of k.arrayFields) {
3197
- const O = V?.[G.name];
3190
+ const O = H?.[G.name];
3198
3191
  if (G.required && (O == null || O === ""))
3199
- ie[G.name] = `${G.label} is required`, y = !0;
3192
+ ce[G.name] = `${G.label} is required`, y = !0;
3200
3193
  else if (G.validator) {
3201
- const F = G.validator(O, V);
3202
- F && (ie[G.name] = F, y = !0);
3194
+ const F = G.validator(O, H);
3195
+ F && (ce[G.name] = F, y = !0);
3203
3196
  }
3204
3197
  }
3205
- _[ae] = ie;
3198
+ _[ae] = ce;
3206
3199
  }), y)
3207
3200
  return JSON.stringify(_);
3208
3201
  }
@@ -3225,7 +3218,7 @@ const ms = ({
3225
3218
  })), a?.(z, w);
3226
3219
  },
3227
3220
  [x, t, W, a]
3228
- ), U = xe(
3221
+ ), q = xe(
3229
3222
  async (w) => {
3230
3223
  if (w.preventDefault(), b) return;
3231
3224
  const h = {}, z = t.flatMap((_) => _.items);
@@ -3424,48 +3417,48 @@ const ms = ({
3424
3417
  });
3425
3418
  case "array": {
3426
3419
  const y = h || [];
3427
- let V = [];
3420
+ let H = [];
3428
3421
  if (typeof z == "string" && z.startsWith("["))
3429
3422
  try {
3430
- V = JSON.parse(z);
3423
+ H = JSON.parse(z);
3431
3424
  } catch {
3432
3425
  }
3433
3426
  const ae = () => {
3434
3427
  D(w.name, [...y, {}]);
3435
- }, ie = (O) => {
3428
+ }, ce = (O) => {
3436
3429
  D(
3437
3430
  w.name,
3438
- y.filter((F, T) => T !== O)
3431
+ y.filter((F, M) => M !== O)
3439
3432
  );
3440
- }, G = (O, F, T) => {
3433
+ }, G = (O, F, M) => {
3441
3434
  const E = [...y];
3442
3435
  E[O] = {
3443
3436
  ...E[O],
3444
- [F]: T
3437
+ [F]: M
3445
3438
  }, D(w.name, E);
3446
3439
  };
3447
3440
  return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
3448
3441
  y.map((O, F) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
3449
- /* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: w.arrayFields?.map((T) => {
3450
- const E = V?.[F]?.[T.name];
3442
+ /* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: w.arrayFields?.map((M) => {
3443
+ const E = H?.[F]?.[M.name];
3451
3444
  return /* @__PURE__ */ c(
3452
3445
  "div",
3453
3446
  {
3454
3447
  className: "flex flex-col gap-1",
3455
3448
  children: [
3456
3449
  F === 0 && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
3457
- T.label,
3458
- T.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3450
+ M.label,
3451
+ M.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3459
3452
  ] }),
3460
3453
  (() => {
3461
3454
  const P = {
3462
- value: O?.[T.name] || "",
3455
+ value: O?.[M.name] || "",
3463
3456
  disabled: k,
3464
- required: T.required,
3465
- placeholder: T.placeholder,
3466
- ...T.fieldProps
3457
+ required: M.required,
3458
+ placeholder: M.placeholder,
3459
+ ...M.fieldProps
3467
3460
  };
3468
- switch (T.type) {
3461
+ switch (M.type) {
3469
3462
  case "text":
3470
3463
  case "email":
3471
3464
  case "password":
@@ -3478,11 +3471,11 @@ const ms = ({
3478
3471
  ...P,
3479
3472
  onChange: (j) => G(
3480
3473
  F,
3481
- T.name,
3474
+ M.name,
3482
3475
  j.target.value
3483
3476
  ),
3484
- type: T.textType || T.type,
3485
- ...Xe(T.autocomplete),
3477
+ type: M.textType || M.type,
3478
+ ...Xe(M.autocomplete),
3486
3479
  error: E,
3487
3480
  size: f
3488
3481
  }
@@ -3494,10 +3487,10 @@ const ms = ({
3494
3487
  ...P,
3495
3488
  onChange: (j) => G(
3496
3489
  F,
3497
- T.name,
3490
+ M.name,
3498
3491
  j.target.value
3499
3492
  ),
3500
- rows: T.rows ?? 4,
3493
+ rows: M.rows ?? 4,
3501
3494
  error: E,
3502
3495
  size: f
3503
3496
  }
@@ -3509,18 +3502,18 @@ const ms = ({
3509
3502
  ...P,
3510
3503
  onChange: (j) => G(
3511
3504
  F,
3512
- T.name,
3505
+ M.name,
3513
3506
  j
3514
3507
  ),
3515
- options: (T.options || []).map(
3508
+ options: (M.options || []).map(
3516
3509
  (j) => ({
3517
3510
  ...j,
3518
3511
  value: String(j.value)
3519
3512
  })
3520
3513
  ),
3521
- searchable: T.searchable,
3522
- multiple: T.multiple,
3523
- allowCreate: T.allowCreate,
3514
+ searchable: M.searchable,
3515
+ multiple: M.multiple,
3516
+ allowCreate: M.allowCreate,
3524
3517
  error: E,
3525
3518
  size: f
3526
3519
  }
@@ -3530,17 +3523,17 @@ const ms = ({
3530
3523
  we,
3531
3524
  {
3532
3525
  ...P,
3533
- checked: !!O?.[T.name],
3526
+ checked: !!O?.[M.name],
3534
3527
  onChange: (j) => G(
3535
3528
  F,
3536
- T.name,
3529
+ M.name,
3537
3530
  j.target.checked
3538
3531
  ),
3539
3532
  size: f
3540
3533
  }
3541
3534
  );
3542
3535
  case "radio":
3543
- return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: T.options?.map((j) => /* @__PURE__ */ c(
3536
+ return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: M.options?.map((j) => /* @__PURE__ */ c(
3544
3537
  "label",
3545
3538
  {
3546
3539
  className: "flex cursor-pointer items-center gap-2 text-base text-text",
@@ -3549,12 +3542,12 @@ const ms = ({
3549
3542
  "input",
3550
3543
  {
3551
3544
  type: "radio",
3552
- name: `${w.name}.${F}.${T.name}`,
3545
+ name: `${w.name}.${F}.${M.name}`,
3553
3546
  value: j.value,
3554
- checked: O?.[T.name] === j.value,
3547
+ checked: O?.[M.name] === j.value,
3555
3548
  onChange: () => G(
3556
3549
  F,
3557
- T.name,
3550
+ M.name,
3558
3551
  j.value
3559
3552
  ),
3560
3553
  disabled: k || j.disabled,
@@ -3567,27 +3560,27 @@ const ms = ({
3567
3560
  j.value
3568
3561
  )) });
3569
3562
  case "date": {
3570
- const j = O?.[T.name];
3563
+ const j = O?.[M.name];
3571
3564
  return /* @__PURE__ */ e(
3572
3565
  Be,
3573
3566
  {
3574
3567
  ...P,
3575
3568
  value: j ? new Date(j) : null,
3576
- onChange: (q) => G(
3569
+ onChange: (V) => G(
3577
3570
  F,
3578
- T.name,
3579
- q
3571
+ M.name,
3572
+ V
3580
3573
  ),
3581
3574
  size: f
3582
3575
  }
3583
3576
  );
3584
3577
  }
3585
3578
  case "custom":
3586
- return T.customComponent?.({
3587
- value: O?.[T.name],
3579
+ return M.customComponent?.({
3580
+ value: O?.[M.name],
3588
3581
  onChange: (j) => G(
3589
3582
  F,
3590
- T.name,
3583
+ M.name,
3591
3584
  j
3592
3585
  ),
3593
3586
  error: E,
@@ -3598,14 +3591,14 @@ const ms = ({
3598
3591
  return /* @__PURE__ */ c("p", { children: [
3599
3592
  "Unsupported field type in array:",
3600
3593
  " ",
3601
- T.type
3594
+ M.type
3602
3595
  ] });
3603
3596
  }
3604
3597
  })(),
3605
3598
  E && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: E })
3606
3599
  ]
3607
3600
  },
3608
- T.name
3601
+ M.name
3609
3602
  );
3610
3603
  }) }),
3611
3604
  /* @__PURE__ */ e(
@@ -3616,7 +3609,7 @@ const ms = ({
3616
3609
  variant: "ghost",
3617
3610
  size: "md",
3618
3611
  "aria-label": `${w.label} verwijderen`,
3619
- onClick: () => ie(F),
3612
+ onClick: () => ce(F),
3620
3613
  disabled: k,
3621
3614
  className: i("shrink-0", F === 0 && "mt-5"),
3622
3615
  children: /* @__PURE__ */ e(Pt, { className: "size-icon-md" })
@@ -3644,7 +3637,7 @@ const ms = ({
3644
3637
  }
3645
3638
  },
3646
3639
  [x, A, S, b, f, D]
3647
- ), Z = xe(
3640
+ ), Y = xe(
3648
3641
  (w) => {
3649
3642
  if (w.conditional && !w.conditional(x))
3650
3643
  return null;
@@ -3701,7 +3694,7 @@ const ms = ({
3701
3694
  );
3702
3695
  },
3703
3696
  [x, A, S, ne]
3704
- ), Q = i(
3697
+ ), X = i(
3705
3698
  {
3706
3699
  "max-w-settings": f === "sm",
3707
3700
  "max-w-form": f === "md",
@@ -3710,9 +3703,9 @@ const ms = ({
3710
3703
  },
3711
3704
  g
3712
3705
  ), de = f === "full" ? "md" : f;
3713
- return /* @__PURE__ */ c("form", { ref: N, onSubmit: U, className: Q, children: [
3706
+ return /* @__PURE__ */ c("form", { ref: N, onSubmit: q, className: X, children: [
3714
3707
  !v && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
3715
- /* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(Z) }),
3708
+ /* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(Y) }),
3716
3709
  v && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ c(Ee, { children: [
3717
3710
  /* @__PURE__ */ e("div", { className: "ml-auto" }),
3718
3711
  s && /* @__PURE__ */ e(
@@ -3842,7 +3835,7 @@ function Qr({
3842
3835
  onClick: l,
3843
3836
  className: "ml-1.5 flex-shrink-0 hover:opacity-70 transition-opacity",
3844
3837
  "aria-label": "Remove badge",
3845
- children: /* @__PURE__ */ e(ee, { icon: Se, size: "xs", color: "current" })
3838
+ children: /* @__PURE__ */ e(Q, { icon: Se, size: "xs", color: "current" })
3846
3839
  }
3847
3840
  )
3848
3841
  ]
@@ -4362,7 +4355,7 @@ function vn(t) {
4362
4355
  return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
4363
4356
  }
4364
4357
  const yn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a, title: l }) => {
4365
- const [o, u] = ce.useState(!1), d = i(
4358
+ const [o, u] = oe.useState(!1), d = i(
4366
4359
  // Its own token and not `surface-hover`: at 0.972 the plate was within a few
4367
4360
  // percent of every surface it sits on, so the monogram floated instead of
4368
4361
  // sitting in a disc.
@@ -4465,14 +4458,14 @@ const Cs = ({
4465
4458
  onError: b,
4466
4459
  ...g
4467
4460
  }) => {
4468
- const [N, p] = H(!0), [x, C] = H(!1), [S, I] = H(t), A = (Q) => {
4469
- p(!1), C(!1), f?.(Q);
4470
- }, K = (Q) => {
4461
+ const [N, p] = B(!0), [x, C] = B(!1), [S, I] = B(t), A = (X) => {
4462
+ p(!1), C(!1), f?.(X);
4463
+ }, K = (X) => {
4471
4464
  if (p(!1), C(!0), u && S !== u) {
4472
4465
  I(u), C(!1), p(!0);
4473
4466
  return;
4474
4467
  }
4475
- b?.(Q);
4468
+ b?.(X);
4476
4469
  }, W = i(
4477
4470
  "relative overflow-hidden bg-surface-hover",
4478
4471
  // Size variants
@@ -4507,11 +4500,11 @@ const Cs = ({
4507
4500
  "opacity-0": N || x,
4508
4501
  "opacity-100": !N && !x
4509
4502
  }
4510
- ), U = i(
4503
+ ), q = i(
4511
4504
  "absolute inset-0 flex items-center justify-center",
4512
4505
  "text-text-muted"
4513
- ), ne = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), Z = /* @__PURE__ */ c("div", { className: "text-center", children: [
4514
- /* @__PURE__ */ e(ee, { icon: Ft, size: "lg", className: "mx-auto mb-1" }),
4506
+ ), ne = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), Y = /* @__PURE__ */ c("div", { className: "text-center", children: [
4507
+ /* @__PURE__ */ e(Q, { icon: Ft, size: "lg", className: "mx-auto mb-1" }),
4515
4508
  /* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
4516
4509
  ] });
4517
4510
  return /* @__PURE__ */ c("div", { className: W, children: [
@@ -4526,8 +4519,8 @@ const Cs = ({
4526
4519
  onError: K
4527
4520
  }
4528
4521
  ),
4529
- N && l && /* @__PURE__ */ e("div", { className: U, children: d || ne }),
4530
- x && o && /* @__PURE__ */ e("div", { className: U, children: v || Z })
4522
+ N && l && /* @__PURE__ */ e("div", { className: q, children: d || ne }),
4523
+ x && o && /* @__PURE__ */ e("div", { className: q, children: v || Y })
4531
4524
  ] });
4532
4525
  };
4533
4526
  function Ss({
@@ -4578,30 +4571,30 @@ function Es({
4578
4571
  header: K,
4579
4572
  stickyHeader: W = !1,
4580
4573
  bordered: D = !1,
4581
- emptyContent: U,
4574
+ emptyContent: q,
4582
4575
  loading: ne = !1,
4583
- loadingRows: Z = 4,
4584
- className: Q,
4576
+ loadingRows: Y = 4,
4577
+ className: X,
4585
4578
  "aria-label": de
4586
4579
  }) {
4587
- const [w, h] = ce.useState(
4580
+ const [w, h] = oe.useState(
4588
4581
  () => Object.fromEntries(
4589
4582
  (b ?? []).filter((E) => E.defaultCollapsed).map((E) => [E.id, !0])
4590
4583
  )
4591
- ), z = ce.useRef(null), k = (E) => {
4584
+ ), z = oe.useRef(null), k = (E) => {
4592
4585
  if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(E.key)) return;
4593
4586
  const j = Array.from(
4594
4587
  z.current?.querySelectorAll("li[data-list-row]") ?? []
4595
4588
  );
4596
4589
  if (j.length === 0) return;
4597
4590
  E.preventDefault();
4598
- const q = j.indexOf(document.activeElement), $ = E.key === "Home" ? 0 : E.key === "End" ? j.length - 1 : E.key === "ArrowDown" ? (q + 1) % j.length : (q - 1 + j.length) % j.length;
4599
- j[$]?.focus();
4600
- }, _ = (E, P) => r ? r(E, P) : P, y = (E) => S.includes(E), V = (E, P) => {
4591
+ const V = j.indexOf(document.activeElement), T = E.key === "Home" ? 0 : E.key === "End" ? j.length - 1 : E.key === "ArrowDown" ? (V + 1) % j.length : (V - 1 + j.length) % j.length;
4592
+ j[T]?.focus();
4593
+ }, _ = (E, P) => r ? r(E, P) : P, y = (E) => S.includes(E), H = (E, P) => {
4601
4594
  I && I(
4602
4595
  P ? [...S, E] : S.filter((j) => j !== E)
4603
4596
  );
4604
- }, ae = (E) => I?.(E ? [...t] : []), ie = i(
4597
+ }, ae = (E) => I?.(E ? [...t] : []), ce = i(
4605
4598
  "flex flex-col",
4606
4599
  // With a selection open the list has a dock at its foot. Sticky can only
4607
4600
  // park at the bottom of its own box, so on a list shorter than the window
@@ -4611,10 +4604,10 @@ function Es({
4611
4604
  // keeps its natural height.
4612
4605
  C && S.length > 0 && "min-h-full",
4613
4606
  D && "overflow-hidden rounded-lg border border-border-subtle",
4614
- Q
4607
+ X
4615
4608
  );
4616
4609
  if (ne)
4617
- return /* @__PURE__ */ e("div", { className: ie, children: Array.from({ length: Z }).map((E, P) => /* @__PURE__ */ c(
4610
+ return /* @__PURE__ */ e("div", { className: ce, children: Array.from({ length: Y }).map((E, P) => /* @__PURE__ */ c(
4618
4611
  "div",
4619
4612
  {
4620
4613
  className: i(
@@ -4630,10 +4623,10 @@ function Es({
4630
4623
  },
4631
4624
  `skeleton-${P}`
4632
4625
  )) });
4633
- if (t.length === 0 && U)
4634
- return /* @__PURE__ */ e("div", { className: ie, children: U });
4626
+ if (t.length === 0 && q)
4627
+ return /* @__PURE__ */ e("div", { className: ce, children: q });
4635
4628
  const G = t.length > 0 && S.length === t.length, O = S.length > 0 && !G, F = (E, P, j) => {
4636
- const q = d?.(E, P) ?? !1, $ = v?.(E, P) ?? !1, L = m?.(E, P) ?? !1, te = C && y(E);
4629
+ const V = d?.(E, P) ?? !1, T = v?.(E, P) ?? !1, L = m?.(E, P) ?? !1, ee = C && y(E);
4637
4630
  return /* @__PURE__ */ c(
4638
4631
  "li",
4639
4632
  {
@@ -4641,11 +4634,11 @@ function Es({
4641
4634
  role: "button",
4642
4635
  tabIndex: 0,
4643
4636
  "data-list-row": "",
4644
- "aria-current": q || void 0,
4637
+ "aria-current": V || void 0,
4645
4638
  onClick: () => o(E, P),
4646
4639
  onFocus: () => u?.(P),
4647
- onKeyDown: (oe) => {
4648
- oe.key !== "Enter" && oe.key !== " " || (oe.preventDefault(), o(E, P));
4640
+ onKeyDown: (le) => {
4641
+ le.key !== "Enter" && le.key !== " " || (le.preventDefault(), o(E, P));
4649
4642
  }
4650
4643
  } : {},
4651
4644
  className: i(
@@ -4657,18 +4650,18 @@ function Es({
4657
4650
  // An unread row is tinted, not bolded: at five columns a bold row
4658
4651
  // shouts across all of them, while the tint marks the row and leaves
4659
4652
  // the consumer free to weight only the sender and the subject.
4660
- q || te ? "bg-accent-soft text-text" : $ ? i("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
4653
+ V || ee ? "bg-accent-soft text-text" : T ? i("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
4661
4654
  // Read rows stay at full opacity — fading them also fades the avatars
4662
4655
  // and team dots, which is exactly the identity you scan by. They read
4663
4656
  // as secondary through weight and text colour instead.
4664
4657
  L && "text-text-muted"
4665
4658
  ),
4666
4659
  children: [
4667
- C && /* @__PURE__ */ e("span", { onClick: (oe) => oe.stopPropagation(), children: /* @__PURE__ */ e(
4660
+ C && /* @__PURE__ */ e("span", { onClick: (le) => le.stopPropagation(), children: /* @__PURE__ */ e(
4668
4661
  we,
4669
4662
  {
4670
4663
  checked: y(E),
4671
- onChange: (oe) => V(E, oe.target.checked),
4664
+ onChange: (le) => H(E, le.target.checked),
4672
4665
  "aria-label": "Rij selecteren"
4673
4666
  }
4674
4667
  ) }),
@@ -4686,62 +4679,62 @@ function Es({
4686
4679
  },
4687
4680
  _(E, P)
4688
4681
  );
4689
- }, T = (() => {
4682
+ }, M = (() => {
4690
4683
  if (!f)
4691
- return t.map((q, $) => F(q, $, $ === 0));
4684
+ return t.map((V, T) => F(V, T, T === 0));
4692
4685
  const E = /* @__PURE__ */ new Map();
4693
- t.forEach((q, $) => {
4694
- const L = f(q, $);
4695
- E.has(L) || E.set(L, []), E.get(L).push({ item: q, index: $ });
4686
+ t.forEach((V, T) => {
4687
+ const L = f(V, T);
4688
+ E.has(L) || E.set(L, []), E.get(L).push({ item: V, index: T });
4696
4689
  });
4697
4690
  const P = b ?? [];
4698
4691
  return [
4699
- ...P.filter((q) => E.has(q.id)),
4700
- ...[...E.keys()].filter((q) => !P.some(($) => $.id === q)).map((q) => ({ id: q }))
4701
- ].flatMap((q, $) => {
4702
- const L = E.get(q.id) ?? [], te = p && w[q.id], oe = q.title ?? q.id, be = q.count ?? L.length, ye = /* @__PURE__ */ e(
4692
+ ...P.filter((V) => E.has(V.id)),
4693
+ ...[...E.keys()].filter((V) => !P.some((T) => T.id === V)).map((V) => ({ id: V }))
4694
+ ].flatMap((V, T) => {
4695
+ const L = E.get(V.id) ?? [], ee = p && w[V.id], le = V.title ?? V.id, be = V.count ?? L.length, ye = /* @__PURE__ */ e(
4703
4696
  "li",
4704
4697
  {
4705
- onClick: p ? () => h((fe) => ({ ...fe, [q.id]: !fe[q.id] })) : void 0,
4698
+ onClick: p ? () => h((fe) => ({ ...fe, [V.id]: !fe[V.id] })) : void 0,
4706
4699
  className: i(
4707
4700
  // A caption over its rows, not a band across the table: same
4708
4701
  // surface as the rows, no rules, and the count as a quiet pill.
4709
4702
  // The old grey uppercase strip read as a second column header.
4710
4703
  "flex items-center gap-2.5 bg-surface px-5 pb-1.5 text-base font-semibold",
4711
- $ > 0 ? "pt-5" : "pt-3",
4712
- q.tone === "danger" ? "text-danger-fg" : q.tone === "muted" ? "text-text-subtle" : "text-text",
4704
+ T > 0 ? "pt-5" : "pt-3",
4705
+ V.tone === "danger" ? "text-danger-fg" : V.tone === "muted" ? "text-text-subtle" : "text-text",
4713
4706
  N && "sticky z-10",
4714
4707
  p && "cursor-pointer select-none"
4715
4708
  ),
4716
- "aria-expanded": p ? !te : void 0,
4709
+ "aria-expanded": p ? !ee : void 0,
4717
4710
  style: N ? { top: W ? 28 : 0 } : void 0,
4718
- children: g ? g(q, L.map((fe) => fe.item)) : /* @__PURE__ */ c(Ee, { children: [
4711
+ children: g ? g(V, L.map((fe) => fe.item)) : /* @__PURE__ */ c(Ee, { children: [
4719
4712
  p && /* @__PURE__ */ e(
4720
4713
  Le,
4721
4714
  {
4722
4715
  "aria-hidden": !0,
4723
4716
  className: i(
4724
4717
  "size-icon-md shrink-0 text-text-subtle transition-transform duration-fast ease-out",
4725
- !te && "rotate-90"
4718
+ !ee && "rotate-90"
4726
4719
  )
4727
4720
  }
4728
4721
  ),
4729
- /* @__PURE__ */ e("span", { children: oe }),
4722
+ /* @__PURE__ */ e("span", { children: le }),
4730
4723
  !x && /* @__PURE__ */ e(
4731
4724
  "span",
4732
4725
  {
4733
4726
  className: i(
4734
4727
  "rounded-full px-2 text-xs font-normal tabular-nums",
4735
- q.tone === "danger" ? "bg-danger-soft text-danger-fg" : "bg-surface-sunk text-text-subtle"
4728
+ V.tone === "danger" ? "bg-danger-soft text-danger-fg" : "bg-surface-sunk text-text-subtle"
4736
4729
  ),
4737
4730
  children: be
4738
4731
  }
4739
4732
  )
4740
4733
  ] })
4741
4734
  },
4742
- `group-${q.id}`
4735
+ `group-${V.id}`
4743
4736
  );
4744
- return te ? [ye] : [
4737
+ return ee ? [ye] : [
4745
4738
  ye,
4746
4739
  ...L.map(
4747
4740
  ({ item: fe, index: he }, Oe) => F(fe, he, Oe === 0)
@@ -4749,7 +4742,7 @@ function Es({
4749
4742
  ];
4750
4743
  });
4751
4744
  })();
4752
- return /* @__PURE__ */ c("div", { ref: z, className: ie, onKeyDown: o ? k : void 0, children: [
4745
+ return /* @__PURE__ */ c("div", { ref: z, className: ce, onKeyDown: o ? k : void 0, children: [
4753
4746
  K && /* @__PURE__ */ c(
4754
4747
  "div",
4755
4748
  {
@@ -4774,7 +4767,7 @@ function Es({
4774
4767
  ]
4775
4768
  }
4776
4769
  ),
4777
- /* @__PURE__ */ e("ul", { "aria-label": de, className: "flex flex-col", children: T }),
4770
+ /* @__PURE__ */ e("ul", { "aria-label": de, className: "flex flex-col", children: M }),
4778
4771
  C && S.length > 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none sticky bottom-0 z-10 flex justify-center px-5 pb-4", children: /* @__PURE__ */ c("div", { className: "pointer-events-auto flex items-center gap-1.5 rounded-lg bg-accent py-1.5 pl-3.5 pr-1.5 text-accent-fg shadow-overlay", children: [
4779
4772
  /* @__PURE__ */ c("span", { className: "text-sm font-medium", children: [
4780
4773
  S.length,
@@ -4877,10 +4870,10 @@ const Cn = ({
4877
4870
  editable: m = !1,
4878
4871
  onTitleChange: f
4879
4872
  }) => {
4880
- const [b, g] = H(!1), [N, p] = H(r), x = re(null);
4881
- X(() => {
4873
+ const [b, g] = B(!1), [N, p] = B(r), x = re(null);
4874
+ J(() => {
4882
4875
  p(r);
4883
- }, [r]), X(() => {
4876
+ }, [r]), J(() => {
4884
4877
  b && x.current && (x.current.focus(), x.current.select());
4885
4878
  }, [b]);
4886
4879
  const C = () => {
@@ -4907,7 +4900,7 @@ const Cn = ({
4907
4900
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ c("div", { className: "flex items-start gap-4 text-text", children: [
4908
4901
  v && // Ghost: a framed box around a back chevron makes the way out of a
4909
4902
  // page look like the page's primary control.
4910
- /* @__PURE__ */ e(se, { variant: "ghost", onClick: v, leftIcon: /* @__PURE__ */ e(ee, { icon: ze, size: "md" }), iconOnly: !0 }),
4903
+ /* @__PURE__ */ e(se, { variant: "ghost", onClick: v, leftIcon: /* @__PURE__ */ e(Q, { icon: ze, size: "md" }), iconOnly: !0 }),
4911
4904
  /* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: [
4912
4905
  b ? /* @__PURE__ */ e(
4913
4906
  "input",
@@ -4960,7 +4953,7 @@ const Cn = ({
4960
4953
  ] })
4961
4954
  ] }) }),
4962
4955
  a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
4963
- (A) => A.render ? /* @__PURE__ */ e(ce.Fragment, { children: A.render() }, A.id) : A.splitOptions && A.splitOptions.length > 0 ? /* @__PURE__ */ e(
4956
+ (A) => A.render ? /* @__PURE__ */ e(oe.Fragment, { children: A.render() }, A.id) : A.splitOptions && A.splitOptions.length > 0 ? /* @__PURE__ */ e(
4964
4957
  st,
4965
4958
  {
4966
4959
  label: A.label,
@@ -5074,7 +5067,7 @@ function En() {
5074
5067
  return yt(dt);
5075
5068
  }
5076
5069
  function Is() {
5077
- const [t, r] = H(null), n = pe(
5070
+ const [t, r] = B(null), n = pe(
5078
5071
  () => ({
5079
5072
  setTrail: (s, a) => r((l) => a ? { ownerId: s, entry: a } : l && l.ownerId !== s ? l : null)
5080
5073
  }),
@@ -5112,10 +5105,10 @@ const zn = {
5112
5105
  [...n, ...r].map((D) => [D.id, D.label, D.variant, D.disabled])
5113
5106
  ) : "", K = pe(() => {
5114
5107
  if (!I) return;
5115
- const D = (U) => (ne, Z) => ({
5108
+ const D = (q) => (ne, Y) => ({
5116
5109
  ...ne,
5117
5110
  onClick: () => {
5118
- (U === "primary" ? x.current : C.current)[Z]?.onClick();
5111
+ (q === "primary" ? x.current : C.current)[Y]?.onClick();
5119
5112
  }
5120
5113
  });
5121
5114
  return {
@@ -5123,7 +5116,7 @@ const zn = {
5123
5116
  secondaryActions: C.current.map(D("secondary"))
5124
5117
  };
5125
5118
  }, [I, A]);
5126
- X(() => {
5119
+ J(() => {
5127
5120
  if (b && !(!p && !o && !K))
5128
5121
  return b.setTrail(g, {
5129
5122
  title: o,
@@ -5148,7 +5141,7 @@ const zn = {
5148
5141
  variant: "ghost",
5149
5142
  onClick: () => N.current?.(),
5150
5143
  "aria-label": l,
5151
- leftIcon: /* @__PURE__ */ e(ee, { icon: ze, size: "sm" }),
5144
+ leftIcon: /* @__PURE__ */ e(Q, { icon: ze, size: "sm" }),
5152
5145
  iconOnly: !0
5153
5146
  }
5154
5147
  ),
@@ -5203,7 +5196,7 @@ function js({
5203
5196
  }) {
5204
5197
  return /* @__PURE__ */ c("section", { className: i("flex flex-col gap-2", l), children: [
5205
5198
  /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
5206
- t && /* @__PURE__ */ e(ee, { icon: t, size: "md", color: "secondary", className: "mt-0.5" }),
5199
+ t && /* @__PURE__ */ e(Q, { icon: t, size: "md", color: "secondary", className: "mt-0.5" }),
5207
5200
  /* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: [
5208
5201
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-text", children: r }),
5209
5202
  n && /* @__PURE__ */ e("p", { className: "text-xs text-text-muted", children: n })
@@ -5226,7 +5219,7 @@ function Fs({ label: t, dotColor: r, onClick: n, className: s }) {
5226
5219
  children: [
5227
5220
  r && /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full", style: { backgroundColor: r }, "aria-hidden": !0 }),
5228
5221
  /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: t }),
5229
- /* @__PURE__ */ e(ee, { icon: Bt, size: "xs", className: "opacity-70" })
5222
+ /* @__PURE__ */ e(Q, { icon: Bt, size: "xs", className: "opacity-70" })
5230
5223
  ]
5231
5224
  }
5232
5225
  );
@@ -5740,12 +5733,12 @@ const Us = ({
5740
5733
  initialCommandPath: a,
5741
5734
  initialActiveIndex: l
5742
5735
  }) => {
5743
- const [o, u] = H(""), [d, v] = H(a || []), [m, f] = H(l || 0), b = re(null), g = re(null), p = (d.length ? t.find((x) => x.id === d[0])?.subCommands || [] : t).filter(
5736
+ const [o, u] = B(""), [d, v] = B(a || []), [m, f] = B(l || 0), b = re(null), g = re(null), p = (d.length ? t.find((x) => x.id === d[0])?.subCommands || [] : t).filter(
5744
5737
  (x) => x.label.toLowerCase().includes(o.toLowerCase())
5745
5738
  );
5746
- return X(() => {
5739
+ return J(() => {
5747
5740
  r || (u(""), v(a || []), f(l || 0));
5748
- }, [r]), X(() => {
5741
+ }, [r]), J(() => {
5749
5742
  const x = (C) => {
5750
5743
  if (r) {
5751
5744
  if (C.key === "Escape")
@@ -5765,12 +5758,12 @@ const Us = ({
5765
5758
  }
5766
5759
  };
5767
5760
  return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
5768
- }, [r, n, p, m, d]), X(() => {
5761
+ }, [r, n, p, m, d]), J(() => {
5769
5762
  const x = (C) => {
5770
5763
  b.current && !b.current.contains(C.target) && n();
5771
5764
  };
5772
5765
  return r && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
5773
- }, [r, n]), X(() => {
5766
+ }, [r, n]), J(() => {
5774
5767
  if (!r) return;
5775
5768
  g.current?.querySelector(`[data-index="${m}"]`)?.scrollIntoView({ block: "nearest" });
5776
5769
  }, [m, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ c(
@@ -5954,8 +5947,8 @@ function Ks({
5954
5947
  componentProps: l,
5955
5948
  className: o
5956
5949
  }) {
5957
- const u = re(null), [d, v] = H(null), [, m] = H(0), f = re(null), b = re(r);
5958
- b.current = r, X(() => {
5950
+ const u = re(null), [d, v] = B(null), [, m] = B(0), f = re(null), b = re(r);
5951
+ b.current = r, J(() => {
5959
5952
  if (Re.has(t)) return;
5960
5953
  let C = !0;
5961
5954
  return (async () => {
@@ -5971,7 +5964,7 @@ function Ks({
5971
5964
  };
5972
5965
  }, [t]);
5973
5966
  const g = Re.get(t) ?? null, N = !g && d === t, p = !g && !N, x = g ? n === "react" && (g.component || g.default) || g : null;
5974
- return X(() => {
5967
+ return J(() => {
5975
5968
  if (!x || n === "react") return;
5976
5969
  const C = u.current;
5977
5970
  if (C) {
@@ -5986,7 +5979,7 @@ function Ks({
5986
5979
  };
5987
5980
  }
5988
5981
  }
5989
- }, [x, n]), X(() => {
5982
+ }, [x, n]), J(() => {
5990
5983
  n === "svelte" && f.current && f.current.$set?.(l);
5991
5984
  }, [l, n]), /* @__PURE__ */ c("div", { ref: u, className: o, style: { display: "contents" }, children: [
5992
5985
  p && s,
@@ -6048,7 +6041,7 @@ export {
6048
6041
  Jr as FormSection,
6049
6042
  qs as Heading,
6050
6043
  Ut as IDENTITY_TONE_COUNT,
6051
- ee as Icon,
6044
+ Q as Icon,
6052
6045
  Cs as Image,
6053
6046
  ls as ImageField,
6054
6047
  xs as Kbd,