@opencxh/ui-kit 3.137.13 → 3.140.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,23 +1,23 @@
1
- import { clsx as it } from "clsx";
2
- import ce, { useState as O, useLayoutEffect as dt, useRef as se, useEffect as G, forwardRef as be, useMemo as pe, useCallback as xe, createContext as Je, useId as ut, useContext as mt, Component as ft } from "react";
1
+ import { clsx as dt } from "clsx";
2
+ import ce, { useState as j, useLayoutEffect as ut, useRef as se, useEffect as G, forwardRef as be, useMemo as pe, useCallback as xe, createContext as Ye, useId as mt, useContext as ft, Component as ht } from "react";
3
3
  import { jsxs as i, jsx as e, Fragment as ke } from "react/jsx-runtime";
4
- import * as ht from "lucide-react";
5
- import { VideoOff as xt, User as bt, MicOff as gt, Mic as pt, X as we, ChevronDown as $e, ExternalLink as vt, Calendar as yt, ChevronLeft as Ce, ChevronRight as _e, ChevronDownIcon as Nt, Loader2 as wt, Search as De, Check as Be, ChevronUp as kt, Ellipsis as Ct, FileText as Ie, HardDrive as Re, ArrowLeft as St, FolderPlus as Et, Upload as zt, Folder as He, Trash2 as Mt, Plus as Tt, Sparkles as $t, ImageOff as _t, Pencil as Dt, ArrowUpRight as At } from "lucide-react";
6
- import Lt from "dompurify";
4
+ import * as xt from "lucide-react";
5
+ import { VideoOff as bt, User as gt, MicOff as pt, Mic as vt, X as we, ChevronDown as $e, ExternalLink as yt, Calendar as Nt, ChevronLeft as Ce, ChevronRight as Ae, ChevronDownIcon as wt, Loader2 as kt, Search as De, Check as Re, ChevronUp as Ct, Ellipsis as St, FileText as Ie, HardDrive as He, ArrowLeft as Et, FolderPlus as zt, Upload as Tt, Folder as Ve, Trash2 as Mt, Plus as _t, Sparkles as $t, ImageOff as At, Pencil as Dt, ArrowUpRight as Lt } from "lucide-react";
6
+ import Pt from "dompurify";
7
7
  import It from "react-markdown";
8
- import Pt from "remark-gfm";
8
+ import Ot from "remark-gfm";
9
9
  function c(...t) {
10
- return it(t);
10
+ return dt(t);
11
11
  }
12
- function Pn(t) {
12
+ function Rn(t) {
13
13
  return (r, n) => t[r]?.[n] || "";
14
14
  }
15
- function jn(t) {
15
+ function Hn(t) {
16
16
  return (r) => t[r] || "";
17
17
  }
18
- function Ae(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
19
- const [l, o] = O({});
20
- return dt(() => {
18
+ function Le(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
19
+ const [l, o] = j({});
20
+ return ut(() => {
21
21
  if (!t) return;
22
22
  const f = () => {
23
23
  const d = r.current;
@@ -31,43 +31,43 @@ function Ae(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start
31
31
  }, [t, r, n, s, a]), l;
32
32
  }
33
33
  const jt = 5;
34
- function Ot(t) {
34
+ function Ft(t) {
35
35
  let r = 2166136261;
36
36
  for (let n = 0; n < t.length; n++)
37
37
  r ^= t.charCodeAt(n), r = Math.imul(r, 16777619);
38
38
  return r >>> 0;
39
39
  }
40
- function Ye(t) {
40
+ function Xe(t) {
41
41
  const r = (t ?? "").trim().toLowerCase();
42
- return r ? Ot(r) % jt + 1 : 1;
42
+ return r ? Ft(r) % jt + 1 : 1;
43
43
  }
44
- const Ft = {
44
+ const Bt = {
45
45
  1: "bg-cat-1-soft text-cat-1-fg",
46
46
  2: "bg-cat-2-soft text-cat-2-fg",
47
47
  3: "bg-cat-3-soft text-cat-3-fg",
48
48
  4: "bg-cat-4-soft text-cat-4-fg",
49
49
  5: "bg-cat-5-soft text-cat-5-fg"
50
- }, Bt = {
50
+ }, Rt = {
51
51
  1: "bg-cat-1",
52
52
  2: "bg-cat-2",
53
53
  3: "bg-cat-3",
54
54
  4: "bg-cat-4",
55
55
  5: "bg-cat-5"
56
56
  };
57
- function Xe(t) {
58
- return Ft[Ye(t)];
57
+ function Ze(t) {
58
+ return Bt[Xe(t)];
59
59
  }
60
- function On(t) {
61
- return Bt[Ye(t)];
60
+ function Vn(t) {
61
+ return Rt[Xe(t)];
62
62
  }
63
- const Ve = ["cat-1", "cat-2", "cat-3", "cat-4", "cat-5"];
64
- function Fn(t) {
63
+ const qe = ["cat-1", "cat-2", "cat-3", "cat-4", "cat-5"];
64
+ function qn(t) {
65
65
  let r = 0;
66
66
  for (let n = 0; n < t.length; n++) r = r * 31 + t.charCodeAt(n) >>> 0;
67
- return Ve[r % Ve.length];
67
+ return qe[r % qe.length];
68
68
  }
69
- const ze = (t) => t == null ? "" : String(t), Rt = (t) => ze(t).trim().toLowerCase();
70
- function Bn({ tiles: t, pinned: r, className: n }) {
69
+ const Te = (t) => t == null ? "" : String(t), Ht = (t) => Te(t).trim().toLowerCase();
70
+ function Un({ tiles: t, pinned: r, className: n }) {
71
71
  if (r)
72
72
  return /* @__PURE__ */ i("div", { className: c("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
73
73
  /* @__PURE__ */ e("div", { className: "flex-1 min-h-0", children: r }),
@@ -76,7 +76,7 @@ function Bn({ tiles: t, pinned: r, className: n }) {
76
76
  const s = t.length <= 1 ? "grid-cols-1" : t.length <= 4 ? "grid-cols-2" : t.length <= 9 ? "grid-cols-3" : "grid-cols-4";
77
77
  return /* @__PURE__ */ e("div", { className: c("grid gap-2 h-full", s, n), children: t.map((a, l) => /* @__PURE__ */ e("div", { children: a }, l)) });
78
78
  }
79
- function Rn({
79
+ function Kn({
80
80
  name: t,
81
81
  avatarUrl: r,
82
82
  muted: n,
@@ -96,16 +96,16 @@ function Rn({
96
96
  o
97
97
  ),
98
98
  children: [
99
- a && l ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: l }) : /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2 text-gray-300", children: r ? /* @__PURE__ */ e("img", { src: r, alt: t, className: "w-16 h-16 rounded-full object-cover" }) : /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-video-surface-strong flex items-center justify-center", children: a ? /* @__PURE__ */ e(xt, { className: "w-8 h-8" }) : /* @__PURE__ */ e(bt, { className: "w-8 h-8" }) }) }),
99
+ a && l ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: l }) : /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2 text-gray-300", children: r ? /* @__PURE__ */ e("img", { src: r, alt: t, className: "w-16 h-16 rounded-full object-cover" }) : /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-video-surface-strong flex items-center justify-center", children: a ? /* @__PURE__ */ e(bt, { className: "w-8 h-8" }) : /* @__PURE__ */ e(gt, { className: "w-8 h-8" }) }) }),
100
100
  /* @__PURE__ */ i("div", { className: "absolute bottom-2 left-2 flex items-center gap-1.5 px-2 py-1 rounded bg-video-overlay text-white text-xs", children: [
101
- n ? /* @__PURE__ */ e(gt, { className: "w-3 h-3" }) : /* @__PURE__ */ e(pt, { className: "w-3 h-3" }),
101
+ n ? /* @__PURE__ */ e(pt, { className: "w-3 h-3" }) : /* @__PURE__ */ e(vt, { className: "w-3 h-3" }),
102
102
  /* @__PURE__ */ e("span", { className: "truncate max-w-35", children: t })
103
103
  ] })
104
104
  ]
105
105
  }
106
106
  );
107
107
  }
108
- function Hn({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
108
+ function Wn({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
109
109
  const a = se(null);
110
110
  return G(() => {
111
111
  if (!r || !a.current) return;
@@ -125,7 +125,7 @@ function Hn({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
125
125
  }
126
126
  );
127
127
  }
128
- const Ht = {
128
+ const Vt = {
129
129
  primary: "bg-accent text-accent-fg hover:bg-accent-hover disabled:bg-surface-hover",
130
130
  secondary: "bg-surface-sunk text-text-strong hover:bg-surface-hover disabled:bg-surface-hover",
131
131
  // No resting fill, so no disabled fill either — a greyed-out plate where
@@ -138,7 +138,7 @@ const Ht = {
138
138
  success: "bg-success text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
139
139
  warning: "bg-warning text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
140
140
  "danger-solid": "bg-danger text-text-inverse hover:opacity-90 disabled:bg-surface-hover"
141
- }, Vt = {
141
+ }, qt = {
142
142
  xs: "h-control-xs px-2 text-xs",
143
143
  sm: "h-control-sm px-3 text-sm",
144
144
  md: "h-control-md px-4 text-sm",
@@ -146,7 +146,7 @@ const Ht = {
146
146
  xl: "h-control-xl px-6 text-base",
147
147
  "2xl": "h-control-2xl px-6 text-base",
148
148
  full: "h-control-md px-4 text-sm"
149
- }, qt = {
149
+ }, Ut = {
150
150
  xs: "h-control-xs w-6",
151
151
  sm: "h-control-sm w-7",
152
152
  md: "h-control-md w-8",
@@ -185,8 +185,8 @@ const Ht = {
185
185
  "focus-visible:outline-none focus-visible:focus-ring",
186
186
  "disabled:cursor-not-allowed disabled:border-border-subtle",
187
187
  "disabled:text-text-disabled",
188
- Ht[t],
189
- o ? qt[r] : Vt[r],
188
+ Vt[t],
189
+ o ? Ut[r] : qt[r],
190
190
  (n || r === "full") && "w-full",
191
191
  s && "cursor-wait",
192
192
  d
@@ -212,7 +212,7 @@ const Ht = {
212
212
  }
213
213
  );
214
214
  le.displayName = "Button";
215
- const Vn = ({
215
+ const Gn = ({
216
216
  children: t,
217
217
  size: r = "md",
218
218
  orientation: n = "horizontal",
@@ -243,12 +243,12 @@ const Vn = ({
243
243
  );
244
244
  return /* @__PURE__ */ e("div", { className: l, role: "group", children: t });
245
245
  };
246
- function qn(t) {
246
+ function Jn(t) {
247
247
  if (!t) return;
248
- const r = t.split(/[-_ ]/).filter(Boolean).map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(""), n = ht[r];
248
+ const r = t.split(/[-_ ]/).filter(Boolean).map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(""), n = xt[r];
249
249
  return typeof n == "function" || typeof n == "object" && n !== null ? n : void 0;
250
250
  }
251
- const Ut = {
251
+ const Kt = {
252
252
  primary: "text-text",
253
253
  secondary: "text-text-muted",
254
254
  accent: "text-accent",
@@ -270,7 +270,7 @@ const Ut = {
270
270
  }) => {
271
271
  const d = typeof r == "number" ? r : Wt(r), p = c(
272
272
  "inline-block shrink-0",
273
- Ut[n],
273
+ Kt[n],
274
274
  s && [
275
275
  "cursor-pointer rounded-sm transition-opacity duration-fast ease-out hover:opacity-80",
276
276
  "focus-visible:outline-none focus-visible:focus-ring"
@@ -301,7 +301,7 @@ function Wt(t) {
301
301
  xl: 24
302
302
  }[t];
303
303
  }
304
- const Ze = ({
304
+ const Qe = ({
305
305
  trigger: t,
306
306
  children: r,
307
307
  placement: n = "bottom-start",
@@ -311,13 +311,13 @@ const Ze = ({
311
311
  disabled: o = !1,
312
312
  triggerLabel: f
313
313
  }) => {
314
- const [d, p] = O(!1), h = se(null), u = se(null), b = Ae(d, u, { placement: n });
314
+ const [d, p] = j(!1), h = se(null), u = se(null), b = Le(d, u, { placement: n });
315
315
  G(() => {
316
316
  if (!d) return;
317
- const g = ($) => {
318
- h.current && !h.current.contains($.target) && p(!1);
319
- }, x = ($) => {
320
- $.key === "Escape" && p(!1);
317
+ const g = (_) => {
318
+ h.current && !h.current.contains(_.target) && p(!1);
319
+ }, x = (_) => {
320
+ _.key === "Escape" && p(!1);
321
321
  };
322
322
  return document.addEventListener("mousedown", g), document.addEventListener("keydown", x), () => {
323
323
  document.removeEventListener("mousedown", g), document.removeEventListener("keydown", x);
@@ -358,29 +358,29 @@ const Ze = ({
358
358
  }
359
359
  )
360
360
  ] });
361
- }, Kt = {
361
+ }, Gt = {
362
362
  none: "hover:bg-surface-sunk hover:text-text",
363
363
  default: "bg-surface-sunk text-text-muted hover:text-text",
364
364
  muted: "bg-surface-sunk text-text-subtle hover:text-text",
365
365
  outline: "text-text-muted ring-1 ring-inset ring-border-strong hover:bg-surface-hover hover:text-text",
366
366
  warning: "bg-warning-soft text-warning-fg",
367
367
  danger: "bg-danger-soft text-danger-fg"
368
- }, Gt = (t) => c(
368
+ }, Jt = (t) => c(
369
369
  // A button's default cursor is an arrow, so it has to be asked for.
370
370
  "inline-flex cursor-pointer select-none items-center text-sm font-medium",
371
371
  t.size === "sm" ? "h-control-sm" : "h-control-md",
372
372
  "transition-colors duration-fast ease-out",
373
373
  t.shape === "pill" ? "rounded-full" : "rounded-md",
374
374
  // Picking a value outranks whatever the value happens to mean.
375
- t.active ? "bg-info-soft text-info-fg" : Kt[t.tone ?? "default"],
375
+ t.active ? "bg-info-soft text-info-fg" : Gt[t.tone ?? "default"],
376
376
  t.className
377
- ), Jt = (t) => c(
377
+ ), Yt = (t) => c(
378
378
  "inline-flex items-center gap-1.5 pl-3",
379
379
  t.shape === "pill" ? "rounded-full" : "rounded-md",
380
380
  t.withClear ? "pr-1.5" : "pr-3",
381
381
  "focus-visible:outline-none focus-visible:focus-ring"
382
382
  );
383
- function Yt({
383
+ function Xt({
384
384
  label: t,
385
385
  icon: r,
386
386
  tone: n = "default",
@@ -396,11 +396,11 @@ function Yt({
396
396
  title: b,
397
397
  className: v
398
398
  }) {
399
- const w = l && !!p, g = s === "pill" ? "rounded-full" : "rounded-md", x = Gt({ active: l, tone: n, shape: s, size: a, className: v }), $ = /* @__PURE__ */ i(ke, { children: [
399
+ const w = l && !!p, g = s === "pill" ? "rounded-full" : "rounded-md", x = Jt({ active: l, tone: n, shape: s, size: a, className: v }), _ = /* @__PURE__ */ i(ke, { children: [
400
400
  r,
401
401
  t,
402
402
  o && /* @__PURE__ */ e(Z, { icon: $e, size: "xs" })
403
- ] }), S = Jt({ shape: s, withClear: w }), q = w && /* @__PURE__ */ e(
403
+ ] }), S = Yt({ shape: s, withClear: w }), q = w && /* @__PURE__ */ e(
404
404
  "button",
405
405
  {
406
406
  type: "button",
@@ -412,9 +412,9 @@ function Yt({
412
412
  );
413
413
  return f ? /* @__PURE__ */ i("span", { className: x, title: b, children: [
414
414
  /* @__PURE__ */ e(
415
- Ze,
415
+ Qe,
416
416
  {
417
- trigger: $,
417
+ trigger: _,
418
418
  rootClassName: "h-full",
419
419
  triggerClassName: c(S, "h-full"),
420
420
  className: c("min-w-menu p-1.5", d),
@@ -423,17 +423,17 @@ function Yt({
423
423
  ),
424
424
  q
425
425
  ] }) : w ? /* @__PURE__ */ i("span", { className: x, title: b, children: [
426
- /* @__PURE__ */ e("button", { type: "button", onClick: u, className: S, children: $ }),
426
+ /* @__PURE__ */ e("button", { type: "button", onClick: u, className: S, children: _ }),
427
427
  q
428
- ] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: u, className: c(x, S), children: $ });
428
+ ] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: u, className: c(x, S), children: _ });
429
429
  }
430
- const Xt = {
430
+ const Zt = {
431
431
  xs: "text-xs",
432
432
  sm: "text-sm",
433
433
  md: "text-base",
434
434
  lg: "text-md",
435
435
  xl: "text-lg"
436
- }, Zt = {
436
+ }, Qt = {
437
437
  primary: "text-text hover:text-info-fg hover:underline",
438
438
  info: "text-info-fg hover:underline",
439
439
  secondary: "text-text-muted hover:text-text",
@@ -442,7 +442,7 @@ const Xt = {
442
442
  success: "text-success-fg hover:underline",
443
443
  warning: "text-warning-fg hover:underline",
444
444
  error: "text-danger-fg hover:underline"
445
- }, Qt = {
445
+ }, er = {
446
446
  primary: "bg-accent-soft",
447
447
  accent: "bg-accent-soft",
448
448
  secondary: "bg-surface-hover",
@@ -451,7 +451,7 @@ const Xt = {
451
451
  warning: "bg-warning-soft",
452
452
  error: "bg-danger-soft",
453
453
  info: "bg-info-soft"
454
- }, Un = ({
454
+ }, Yn = ({
455
455
  variant: t = "default",
456
456
  size: r = "md",
457
457
  color: n = "primary",
@@ -468,13 +468,13 @@ const Xt = {
468
468
  "inline-flex items-center gap-1 underline-offset-2",
469
469
  "transition-colors duration-fast ease-out",
470
470
  "focus-visible:outline-none focus-visible:focus-ring",
471
- Xt[r],
472
- !s && Zt[n],
471
+ Zt[r],
472
+ !s && Qt[n],
473
473
  t === "subtle" && "no-underline opacity-70 hover:opacity-100",
474
474
  t === "underline" && "underline decoration-1 hover:decoration-2",
475
475
  t === "button" && [
476
476
  "h-control-md rounded-md px-3 font-semibold no-underline hover:no-underline",
477
- Qt[n]
477
+ er[n]
478
478
  ],
479
479
  s && "pointer-events-none cursor-not-allowed text-text-disabled opacity-50",
480
480
  l
@@ -487,13 +487,13 @@ const Xt = {
487
487
  };
488
488
  return /* @__PURE__ */ i("a", { className: b, ...v, children: [
489
489
  o,
490
- u && /* @__PURE__ */ e(vt, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
490
+ u && /* @__PURE__ */ e(yt, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
491
491
  ] });
492
- }, er = {
492
+ }, tr = {
493
493
  sm: "h-control-sm px-3 text-sm",
494
494
  md: "h-control-md px-3 text-sm"
495
495
  };
496
- function tr({
496
+ function rr({
497
497
  options: t,
498
498
  value: r,
499
499
  onChange: n,
@@ -528,7 +528,7 @@ function tr({
528
528
  "transition-colors duration-fast ease-out",
529
529
  "focus-visible:outline-none focus-visible:focus-ring",
530
530
  l && "min-w-0 flex-1",
531
- er[s],
531
+ tr[s],
532
532
  p ? "bg-surface text-text font-medium shadow-sm" : "text-text-muted hover:text-text"
533
533
  ),
534
534
  children: d.label
@@ -539,15 +539,15 @@ function tr({
539
539
  }
540
540
  );
541
541
  }
542
- const rr = {
542
+ const nr = {
543
543
  primary: "bg-accent text-accent-fg hover:bg-accent-hover",
544
544
  secondary: "border border-border bg-surface text-text hover:bg-surface-hover",
545
545
  outline: "border border-accent-border text-accent hover:bg-accent-soft"
546
- }, nr = {
546
+ }, sr = {
547
547
  sm: "h-control-sm w-7",
548
548
  md: "h-control-md w-8"
549
549
  };
550
- function Qe({
550
+ function et({
551
551
  label: t,
552
552
  onClick: r,
553
553
  variant: n = "primary",
@@ -580,7 +580,7 @@ function Qe({
580
580
  }
581
581
  ),
582
582
  u && /* @__PURE__ */ e(
583
- Ze,
583
+ Qe,
584
584
  {
585
585
  placement: d,
586
586
  disabled: h,
@@ -593,8 +593,8 @@ function Qe({
593
593
  className: c(
594
594
  "inline-flex items-center justify-center rounded-md rounded-l-none",
595
595
  "transition-colors duration-fast ease-out",
596
- rr[n],
597
- nr[s],
596
+ nr[n],
597
+ sr[s],
598
598
  h && "cursor-not-allowed opacity-50"
599
599
  ),
600
600
  children: /* @__PURE__ */ e($e, { className: "size-icon-md" })
@@ -625,17 +625,17 @@ function Qe({
625
625
  ] })
626
626
  );
627
627
  }
628
- const sr = {
628
+ const ar = {
629
629
  sm: "size-checkbox-sm",
630
630
  md: "size-checkbox",
631
631
  lg: "size-checkbox-lg",
632
632
  full: "size-checkbox"
633
- }, ar = {
633
+ }, lr = {
634
634
  sm: "min-h-control-sm",
635
635
  md: "min-h-control-md",
636
636
  lg: "min-h-control-lg",
637
637
  full: "min-h-control-md"
638
- }, lr = {
638
+ }, or = {
639
639
  sm: "text-sm",
640
640
  md: "text-base",
641
641
  lg: "text-md",
@@ -662,7 +662,7 @@ const sr = {
662
662
  return ce.useEffect(() => {
663
663
  w.current && (w.current.indeterminate = a);
664
664
  }, [a]), /* @__PURE__ */ i("div", { className: c("flex flex-col", l), children: [
665
- /* @__PURE__ */ i("div", { className: c("flex items-center gap-3", ar[s]), children: [
665
+ /* @__PURE__ */ i("div", { className: c("flex items-center gap-3", lr[s]), children: [
666
666
  /* @__PURE__ */ e(
667
667
  "input",
668
668
  {
@@ -679,7 +679,7 @@ const sr = {
679
679
  "transition-colors duration-fast ease-out",
680
680
  "focus-visible:outline-none focus-visible:focus-ring",
681
681
  "disabled:cursor-not-allowed disabled:bg-surface-hover",
682
- sr[s],
682
+ ar[s],
683
683
  v ? "border-danger-border" : "border-border-strong",
684
684
  f
685
685
  ),
@@ -694,7 +694,7 @@ const sr = {
694
694
  className: c(
695
695
  "cursor-pointer",
696
696
  v ? "text-danger-fg" : "text-text",
697
- lr[s],
697
+ or[s],
698
698
  o
699
699
  ),
700
700
  children: t
@@ -708,7 +708,7 @@ const sr = {
708
708
  }
709
709
  );
710
710
  ye.displayName = "Checkbox";
711
- const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }), cr = () => /* @__PURE__ */ e(Z, { icon: Ce, size: "md", color: "current" }), ir = () => /* @__PURE__ */ e(Z, { icon: _e, size: "md", color: "current" }), je = be(({
711
+ const cr = () => /* @__PURE__ */ e(Z, { icon: Nt, size: "md", color: "current" }), ir = () => /* @__PURE__ */ e(Z, { icon: Ce, size: "md", color: "current" }), dr = () => /* @__PURE__ */ e(Z, { icon: Ae, size: "md", color: "current" }), je = be(({
712
712
  value: t,
713
713
  onChange: r,
714
714
  placeholder: n = "Select date",
@@ -721,7 +721,7 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
721
721
  format: p = "MM/dd/yyyy",
722
722
  withTime: h = !1
723
723
  }, u) => {
724
- const [b, v] = O(!1), [w, g] = O(() => t || /* @__PURE__ */ new Date()), x = se(null), $ = se(null), S = Ae(b, $);
724
+ const [b, v] = j(!1), [w, g] = j(() => t || /* @__PURE__ */ new Date()), x = se(null), _ = se(null), S = Le(b, _);
725
725
  G(() => {
726
726
  const m = (z) => {
727
727
  x.current && !x.current.contains(z.target) && v(!1);
@@ -732,21 +732,21 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
732
732
  }, [b]);
733
733
  const q = (m) => {
734
734
  if (!m) return "";
735
- const z = m.getDate().toString().padStart(2, "0"), y = (m.getMonth() + 1).toString().padStart(2, "0"), _ = m.getFullYear(), N = p === "dd/MM/yyyy" ? `${z}/${y}/${_}` : p === "yyyy-MM-dd" ? `${_}-${y}-${z}` : `${y}/${z}/${_}`;
736
- return h ? `${N} ${D(m)}` : N;
737
- }, D = (m) => `${m.getHours().toString().padStart(2, "0")}:${m.getMinutes().toString().padStart(2, "0")}`, J = (m) => {
735
+ const z = m.getDate().toString().padStart(2, "0"), y = (m.getMonth() + 1).toString().padStart(2, "0"), $ = m.getFullYear(), N = p === "dd/MM/yyyy" ? `${z}/${y}/${$}` : p === "yyyy-MM-dd" ? `${$}-${y}-${z}` : `${y}/${z}/${$}`;
736
+ return h ? `${N} ${A(m)}` : N;
737
+ }, A = (m) => `${m.getHours().toString().padStart(2, "0")}:${m.getMinutes().toString().padStart(2, "0")}`, J = (m) => {
738
738
  const [z, y] = m.split(":").map(Number);
739
739
  if (Number.isNaN(z) || Number.isNaN(y)) return;
740
- const _ = t ? new Date(t) : /* @__PURE__ */ new Date();
741
- _.setHours(z, y, 0, 0), r?.(_);
740
+ const $ = t ? new Date(t) : /* @__PURE__ */ new Date();
741
+ $.setHours(z, y, 0, 0), r?.($);
742
742
  }, V = () => {
743
- const m = w.getFullYear(), z = w.getMonth(), y = new Date(m, z, 1), _ = new Date(y);
744
- _.setDate(_.getDate() - y.getDay());
745
- const N = [], K = new Date(_);
743
+ const m = w.getFullYear(), z = w.getMonth(), y = new Date(m, z, 1), $ = new Date(y);
744
+ $.setDate($.getDate() - y.getDay());
745
+ const N = [], W = new Date($);
746
746
  for (let re = 0; re < 42; re++)
747
- N.push(new Date(K)), K.setDate(K.getDate() + 1);
747
+ N.push(new Date(W)), W.setDate(W.getDate() + 1);
748
748
  return N;
749
- }, P = (m) => {
749
+ }, I = (m) => {
750
750
  if (m.getMonth() === w.getMonth() && !(f && m < f) && !(d && m > d)) {
751
751
  if (h) {
752
752
  const y = new Date(m);
@@ -761,7 +761,7 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
761
761
  g(new Date(w.getFullYear(), w.getMonth() + 1, 1));
762
762
  }, Y = () => {
763
763
  r?.(null), v(!1);
764
- }, W = c(
764
+ }, K = c(
765
765
  "w-full border border-border-strong rounded-tile transition-colors duration-fast",
766
766
  "bg-surface text-text",
767
767
  "placeholder:text-text-muted",
@@ -789,7 +789,7 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
789
789
  "December"
790
790
  ];
791
791
  return /* @__PURE__ */ i("div", { ref: x, className: "relative", children: [
792
- /* @__PURE__ */ i("div", { ref: $, className: "relative", children: [
792
+ /* @__PURE__ */ i("div", { ref: _, className: "relative", children: [
793
793
  /* @__PURE__ */ e(
794
794
  "input",
795
795
  {
@@ -801,7 +801,7 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
801
801
  required: a,
802
802
  readOnly: !0,
803
803
  onClick: () => !s && v(!b),
804
- className: c(W, "pr-10 cursor-pointer")
804
+ className: c(K, "pr-10 cursor-pointer")
805
805
  }
806
806
  ),
807
807
  /* @__PURE__ */ e(
@@ -811,7 +811,7 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
811
811
  onClick: () => !s && v(!b),
812
812
  disabled: s,
813
813
  className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-muted",
814
- children: /* @__PURE__ */ e(or, {})
814
+ children: /* @__PURE__ */ e(cr, {})
815
815
  }
816
816
  )
817
817
  ] }),
@@ -822,7 +822,7 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
822
822
  {
823
823
  onClick: H,
824
824
  className: "p-1 hover:bg-surface-hover rounded",
825
- children: /* @__PURE__ */ e(cr, {})
825
+ children: /* @__PURE__ */ e(ir, {})
826
826
  }
827
827
  ),
828
828
  /* @__PURE__ */ i("h3", { className: "text-sm font-medium text-text", children: [
@@ -835,25 +835,25 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
835
835
  {
836
836
  onClick: te,
837
837
  className: "p-1 hover:bg-surface-hover rounded",
838
- children: /* @__PURE__ */ e(ir, {})
838
+ children: /* @__PURE__ */ e(dr, {})
839
839
  }
840
840
  )
841
841
  ] }),
842
842
  /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((m) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: m }, m)) }),
843
843
  /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: ie.map((m, z) => {
844
- const y = m.getMonth() === w.getMonth(), _ = t && m.toDateString() === t.toDateString(), N = m.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), K = !y || f && m < f || d && m > d;
844
+ const y = m.getMonth() === w.getMonth(), $ = t && m.toDateString() === t.toDateString(), N = m.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), W = !y || f && m < f || d && m > d;
845
845
  return /* @__PURE__ */ e(
846
846
  "button",
847
847
  {
848
- onClick: () => !K && P(m),
849
- disabled: K,
848
+ onClick: () => !W && I(m),
849
+ disabled: W,
850
850
  className: c(
851
851
  "w-8 h-8 text-sm rounded transition-colors duration-fast",
852
852
  {
853
- "text-text hover:bg-surface-hover": y && !_ && !K,
854
- "bg-accent text-accent-fg": _,
855
- "bg-surface-hover text-text": N && !_,
856
- "text-text-muted cursor-not-allowed": K
853
+ "text-text hover:bg-surface-hover": y && !$ && !W,
854
+ "bg-accent text-accent-fg": $,
855
+ "bg-surface-hover text-text": N && !$,
856
+ "text-text-muted cursor-not-allowed": W
857
857
  }
858
858
  ),
859
859
  children: m.getDate()
@@ -868,7 +868,7 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
868
868
  {
869
869
  id: "datepicker-time",
870
870
  type: "time",
871
- value: t ? D(t) : "",
871
+ value: t ? A(t) : "",
872
872
  onChange: (m) => J(m.target.value),
873
873
  className: "h-control-sm rounded-md border border-border bg-surface-input px-2 text-sm text-text focus-visible:outline-none focus-visible:focus-ring"
874
874
  }
@@ -894,12 +894,12 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
894
894
  ] })
895
895
  ] })
896
896
  ] });
897
- }), dr = {
897
+ }), ur = {
898
898
  sm: "h-control-sm px-3 text-sm",
899
899
  md: "h-control-md px-3 text-sm",
900
900
  lg: "h-control-lg px-3 text-base",
901
901
  full: "h-control-md w-full px-3 text-sm"
902
- }, Se = Rt, Me = be(
902
+ }, Se = Ht, Me = be(
903
903
  ({
904
904
  label: t,
905
905
  helperText: r,
@@ -918,65 +918,65 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
918
918
  value: w,
919
919
  onChange: g,
920
920
  allowCreate: x,
921
- onCreateOption: $,
921
+ onCreateOption: _,
922
922
  ...S
923
923
  }, q) => {
924
- const D = u || `select-${Math.random().toString(36).substr(2, 9)}`, J = !!n, [V, P] = ce.useState(!1), [H, te] = ce.useState(""), Y = ce.useRef(null), W = ce.useRef(null), ie = Ae(V, W, { matchWidth: !0 }), [k, m] = ce.useState(o);
924
+ const A = u || `select-${Math.random().toString(36).substr(2, 9)}`, J = !!n, [V, I] = ce.useState(!1), [H, te] = ce.useState(""), Y = ce.useRef(null), K = ce.useRef(null), ie = Le(V, K, { matchWidth: !0 }), [k, m] = ce.useState(o);
925
925
  ce.useImperativeHandle(q, () => Y.current), ce.useEffect(() => {
926
- const M = (C) => {
927
- Y.current && !Y.current.contains(C.target) && P(!1);
926
+ const T = (C) => {
927
+ Y.current && !Y.current.contains(C.target) && I(!1);
928
928
  };
929
- return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
929
+ return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
930
930
  }, []);
931
931
  const z = ce.useCallback(
932
- (M, C) => M.some(
933
- (A) => Se(A.value) === Se(C) || Se(A.label) === Se(C)
932
+ (T, C) => T.some(
933
+ (D) => Se(D.value) === Se(C) || Se(D.label) === Se(C)
934
934
  ),
935
935
  []
936
936
  ), y = ce.useCallback(
937
- (M, C) => {
938
- const A = [...M], j = (R) => {
939
- const T = ze(R).trim();
940
- T && (z(A, T) || A.push({ value: T, label: T }));
937
+ (T, C) => {
938
+ const D = [...T], O = (R) => {
939
+ const M = Te(R).trim();
940
+ M && (z(D, M) || D.push({ value: M, label: M }));
941
941
  };
942
- return Array.isArray(C) ? C.forEach(j) : j(C), A;
942
+ return Array.isArray(C) ? C.forEach(O) : O(C), D;
943
943
  },
944
944
  [z]
945
945
  );
946
946
  ce.useEffect(() => {
947
- m((M) => {
947
+ m((T) => {
948
948
  const C = [...o];
949
- return M.forEach((A) => {
950
- !z(C, A.value) && !z(C, A.label) && C.push(A);
949
+ return T.forEach((D) => {
950
+ !z(C, D.value) && !z(C, D.label) && C.push(D);
951
951
  }), y(C, w);
952
952
  });
953
953
  }, [o, w, y, z]);
954
- const _ = ce.useMemo(
955
- () => Array.isArray(w) ? w.map(ze) : w == null ? void 0 : ze(w),
954
+ const $ = ce.useMemo(
955
+ () => Array.isArray(w) ? w.map(Te) : w == null ? void 0 : Te(w),
956
956
  [w]
957
- ), N = (M) => {
957
+ ), N = (T) => {
958
958
  if (v) {
959
- const C = Array.isArray(_) ? _ : [], A = C.includes(M) ? C.filter((j) => j !== M) : [...C, M];
960
- g?.(A);
959
+ const C = Array.isArray($) ? $ : [], D = C.includes(T) ? C.filter((O) => O !== T) : [...C, T];
960
+ g?.(D);
961
961
  } else
962
- g?.(M), P(!1), te("");
963
- }, K = v ? null : k.find((M) => M.value === _), re = v ? k.filter(
964
- (M) => Array.isArray(_) && _.includes(M.value)
962
+ g?.(T), I(!1), te("");
963
+ }, W = v ? null : k.find((T) => T.value === $), re = v ? k.filter(
964
+ (T) => Array.isArray($) && $.includes(T.value)
965
965
  ) : [], ee = b && H ? k.filter(
966
- (M) => M.label.toLowerCase().includes(H.toLowerCase())
967
- ) : k, X = !!x && !!b && !!H.trim() && !z(k, H), I = (M) => {
968
- const C = M.trim();
966
+ (T) => T.label.toLowerCase().includes(H.toLowerCase())
967
+ ) : k, X = !!x && !!b && !!H.trim() && !z(k, H), P = (T) => {
968
+ const C = T.trim();
969
969
  if (!C) return;
970
- const A = $?.(C) ?? {
970
+ const D = _?.(C) ?? {
971
971
  value: C,
972
972
  label: C
973
973
  };
974
- if (z(k, A.value) || z(k, A.label)) {
975
- N(A.value), te(""), v || P(!1);
974
+ if (z(k, D.value) || z(k, D.label)) {
975
+ N(D.value), te(""), v || I(!1);
976
976
  return;
977
977
  }
978
- m((j) => [...j, A]), N(A.value), te(""), v || P(!1);
979
- }, B = () => v ? re.length > 0 ? re.map((M) => M.label).join(", ") : f || "Select options" : K?.label || f || "Select an option";
978
+ m((O) => [...O, D]), N(D.value), te(""), v || I(!1);
979
+ }, B = () => v ? re.length > 0 ? re.map((T) => T.label).join(", ") : f || "Select options" : W?.label || f || "Select an option";
980
980
  return /* @__PURE__ */ i(
981
981
  "div",
982
982
  {
@@ -991,8 +991,8 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
991
991
  t && /* @__PURE__ */ e(
992
992
  "label",
993
993
  {
994
- htmlFor: D,
995
- onClick: () => P(!V),
994
+ htmlFor: A,
995
+ onClick: () => I(!V),
996
996
  className: c(
997
997
  "block text-xs font-semibold uppercase tracking-label mb-1.5",
998
998
  J ? "text-danger-fg" : "text-text-muted",
@@ -1005,24 +1005,24 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
1005
1005
  /* @__PURE__ */ i(
1006
1006
  "button",
1007
1007
  {
1008
- ref: W,
1008
+ ref: K,
1009
1009
  type: "button",
1010
- id: D,
1010
+ id: A,
1011
1011
  disabled: l,
1012
- onClick: () => P(!V),
1012
+ onClick: () => I(!V),
1013
1013
  className: c(
1014
1014
  "flex w-full items-center justify-between gap-2 rounded-tile border transition-colors duration-fast text-left",
1015
1015
  "focus-visible:outline-none focus-visible:focus-ring",
1016
1016
  "disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
1017
1017
  "bg-surface",
1018
- dr[s],
1018
+ ur[s],
1019
1019
  J ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
1020
1020
  h
1021
1021
  ),
1022
1022
  children: [
1023
1023
  /* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: B() }),
1024
1024
  /* @__PURE__ */ e(
1025
- Nt,
1025
+ wt,
1026
1026
  {
1027
1027
  size: 16,
1028
1028
  className: c(
@@ -1041,9 +1041,9 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
1041
1041
  type: "text",
1042
1042
  placeholder: "Search...",
1043
1043
  value: H,
1044
- onChange: (M) => te(M.target.value),
1045
- onKeyDown: (M) => {
1046
- M.key === "Enter" && X && (M.preventDefault(), I(H));
1044
+ onChange: (T) => te(T.target.value),
1045
+ onKeyDown: (T) => {
1046
+ T.key === "Enter" && X && (T.preventDefault(), P(H));
1047
1047
  },
1048
1048
  className: c(
1049
1049
  "w-full px-3 py-2 text-sm rounded-md border",
@@ -1058,7 +1058,7 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
1058
1058
  "cursor-pointer px-3 py-1.5 text-sm",
1059
1059
  "text-info-fg hover:bg-surface-hover"
1060
1060
  ),
1061
- onClick: () => I(H),
1061
+ onClick: () => P(H),
1062
1062
  children: [
1063
1063
  "+: “",
1064
1064
  H.trim(),
@@ -1072,21 +1072,21 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
1072
1072
  {
1073
1073
  className: "cursor-pointer px-3 py-1.5 text-sm text-text-muted hover:bg-surface-hover",
1074
1074
  onClick: () => {
1075
- g?.(""), P(!1);
1075
+ g?.(""), I(!1);
1076
1076
  },
1077
1077
  children: f
1078
1078
  }
1079
1079
  ),
1080
- ee.map((M) => {
1081
- const C = v ? Array.isArray(_) && _.includes(M.value) : _ === M.value;
1080
+ ee.map((T) => {
1081
+ const C = v ? Array.isArray($) && $.includes(T.value) : $ === T.value;
1082
1082
  return /* @__PURE__ */ e(
1083
1083
  "li",
1084
1084
  {
1085
- onClick: () => !M.disabled && N(M.value),
1085
+ onClick: () => !T.disabled && N(T.value),
1086
1086
  className: c(
1087
1087
  "cursor-pointer px-3 py-1.5 text-sm",
1088
1088
  "text-text",
1089
- M.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
1089
+ T.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
1090
1090
  C && "bg-accent-soft text-accent font-semibold"
1091
1091
  ),
1092
1092
  children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
@@ -1099,10 +1099,10 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
1099
1099
  className: "mr-3 h-4 w-4 rounded border-border [&:not(:checked)]:bg-surface-input text-accent "
1100
1100
  }
1101
1101
  ),
1102
- /* @__PURE__ */ e("span", { children: M.label })
1102
+ /* @__PURE__ */ e("span", { children: T.label })
1103
1103
  ] })
1104
1104
  },
1105
- M.value
1105
+ T.value
1106
1106
  );
1107
1107
  })
1108
1108
  ] })
@@ -1124,12 +1124,12 @@ const or = () => /* @__PURE__ */ e(Z, { icon: yt, size: "md", color: "current" }
1124
1124
  }
1125
1125
  );
1126
1126
  Me.displayName = "Select";
1127
- const ur = {
1127
+ const mr = {
1128
1128
  sm: "h-control-sm px-3 text-sm",
1129
1129
  md: "h-control-md px-3 text-base",
1130
1130
  lg: "h-control-lg px-3 text-base",
1131
1131
  full: "h-control-md px-3 text-base"
1132
- }, et = "mb-1.5 block text-sm font-medium", tt = "block w-full rounded-tile border bg-surface-input text-text transition-colors duration-fast ease-out placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled", rt = (t) => t ? "border-danger-border bg-danger-soft" : "border-border-strong", Ne = be(
1132
+ }, tt = "mb-1.5 block text-sm font-medium", rt = "block w-full rounded-tile border bg-surface-input text-text transition-colors duration-fast ease-out placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled", nt = (t) => t ? "border-danger-border bg-danger-soft" : "border-border-strong", Ne = be(
1133
1133
  ({
1134
1134
  label: t,
1135
1135
  helperText: r,
@@ -1145,14 +1145,14 @@ const ur = {
1145
1145
  id: u,
1146
1146
  ...b
1147
1147
  }, v) => {
1148
- const w = ce.useId(), g = u || `textfield-${w}`, x = !!n, $ = n || r ? `${g}-description` : void 0;
1148
+ const w = ce.useId(), g = u || `textfield-${w}`, x = !!n, _ = n || r ? `${g}-description` : void 0;
1149
1149
  return /* @__PURE__ */ i("div", { className: c("flex flex-col", a && "w-full", d), children: [
1150
1150
  t && /* @__PURE__ */ e(
1151
1151
  "label",
1152
1152
  {
1153
1153
  htmlFor: g,
1154
1154
  className: c(
1155
- et,
1155
+ tt,
1156
1156
  x ? "text-danger-fg" : "text-text-muted",
1157
1157
  p
1158
1158
  ),
@@ -1167,13 +1167,13 @@ const ur = {
1167
1167
  ref: v,
1168
1168
  id: g,
1169
1169
  "aria-invalid": x || void 0,
1170
- "aria-describedby": $,
1170
+ "aria-describedby": _,
1171
1171
  className: c(
1172
- tt,
1173
- ur[s],
1172
+ rt,
1173
+ mr[s],
1174
1174
  l && "pl-9",
1175
1175
  (o || f) && "pr-9",
1176
- rt(x),
1176
+ nt(x),
1177
1177
  h
1178
1178
  ),
1179
1179
  ...b
@@ -1190,7 +1190,7 @@ const ur = {
1190
1190
  (n || r) && /* @__PURE__ */ e(
1191
1191
  "p",
1192
1192
  {
1193
- id: $,
1193
+ id: _,
1194
1194
  className: c("mt-1 text-xs", x ? "text-danger-fg" : "text-text-subtle"),
1195
1195
  children: n || r
1196
1196
  }
@@ -1199,7 +1199,7 @@ const ur = {
1199
1199
  }
1200
1200
  );
1201
1201
  Ne.displayName = "TextField";
1202
- function mr({
1202
+ function fr({
1203
1203
  value: t,
1204
1204
  onChange: r,
1205
1205
  onListFolders: n,
@@ -1209,7 +1209,7 @@ function mr({
1209
1209
  templatePlaceholder: o,
1210
1210
  showTemplate: f = !0
1211
1211
  }) {
1212
- const [d, p] = O([]);
1212
+ const [d, p] = j([]);
1213
1213
  G(() => {
1214
1214
  let u = !0;
1215
1215
  return Promise.resolve(n?.()).then((b) => {
@@ -1244,24 +1244,24 @@ function mr({
1244
1244
  )
1245
1245
  ] });
1246
1246
  }
1247
- const ve = (...t) => t.filter(Boolean).join(" "), fr = (t) => /* @__PURE__ */ e(De, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), hr = (t) => /* @__PURE__ */ e($e, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), xr = {
1247
+ const ve = (...t) => t.filter(Boolean).join(" "), hr = (t) => /* @__PURE__ */ e(De, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), xr = (t) => /* @__PURE__ */ e($e, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), br = {
1248
1248
  sm: "h-control-sm px-3 text-sm",
1249
1249
  md: "h-control-md px-3 text-base",
1250
1250
  lg: "h-control-lg px-3 text-base",
1251
1251
  full: "h-control-md w-full px-3 text-base"
1252
- }, Pe = {
1252
+ }, Oe = {
1253
1253
  sm: "h-4 w-4",
1254
1254
  md: "h-5 w-5",
1255
1255
  lg: "h-6 w-6",
1256
1256
  full: "h-6 w-6"
1257
- }, br = be(
1257
+ }, gr = be(
1258
1258
  ({
1259
1259
  label: t,
1260
1260
  helperText: r,
1261
1261
  error: n,
1262
1262
  size: s = "md",
1263
1263
  fullWidth: a = !1,
1264
- startIcon: l = /* @__PURE__ */ e(fr, {}),
1264
+ startIcon: l = /* @__PURE__ */ e(hr, {}),
1265
1265
  loading: o = !1,
1266
1266
  containerClassName: f,
1267
1267
  labelClassName: d,
@@ -1273,18 +1273,18 @@ const ve = (...t) => t.filter(Boolean).join(" "), fr = (t) => /* @__PURE__ */ e(
1273
1273
  debounceTime: w = 500,
1274
1274
  showAllOnOpen: g = !1,
1275
1275
  value: x,
1276
- onChange: $,
1276
+ onChange: _,
1277
1277
  ...S
1278
1278
  }, q) => {
1279
- const D = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, J = !!n, V = se(null), P = se(null), [H, te] = O(x || ""), [Y, W] = O(!1), [ie, k] = O(!1), [m, z] = O(!1);
1279
+ const A = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, J = !!n, V = se(null), I = se(null), [H, te] = j(x || ""), [Y, K] = j(!1), [ie, k] = j(!1), [m, z] = j(!1);
1280
1280
  G(() => {
1281
1281
  x !== void 0 && te(x);
1282
1282
  }, [x]);
1283
1283
  const y = pe(() => {
1284
1284
  if (g && !m || !H) return u;
1285
- const I = String(H).toLowerCase();
1285
+ const P = String(H).toLowerCase();
1286
1286
  return u.filter(
1287
- (B) => String(B.label).toLowerCase().includes(I)
1287
+ (B) => String(B.label).toLowerCase().includes(P)
1288
1288
  );
1289
1289
  }, [H, u, g, m]);
1290
1290
  G(() => {
@@ -1292,7 +1292,7 @@ const ve = (...t) => t.filter(Boolean).join(" "), fr = (t) => /* @__PURE__ */ e(
1292
1292
  k(!1);
1293
1293
  return;
1294
1294
  }
1295
- const I = setTimeout(async () => {
1295
+ const P = setTimeout(async () => {
1296
1296
  k(!0);
1297
1297
  try {
1298
1298
  await b(String(H));
@@ -1303,22 +1303,22 @@ const ve = (...t) => t.filter(Boolean).join(" "), fr = (t) => /* @__PURE__ */ e(
1303
1303
  }
1304
1304
  }, w);
1305
1305
  return () => {
1306
- clearTimeout(I), k(!1);
1306
+ clearTimeout(P), k(!1);
1307
1307
  };
1308
1308
  }, [H, w, b]), G(() => {
1309
- const I = (B) => {
1310
- V.current && !V.current.contains(B.target) && W(!1);
1309
+ const P = (B) => {
1310
+ V.current && !V.current.contains(B.target) && K(!1);
1311
1311
  };
1312
- return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
1312
+ return document.addEventListener("mousedown", P), () => document.removeEventListener("mousedown", P);
1313
1313
  }, []);
1314
- const _ = (I) => {
1315
- const B = I.target.value;
1316
- te(B), W(!0), z(!0), $ && $(I);
1317
- }, N = (I) => {
1318
- te(I.label), W(!1), z(!1), v && v(I.value);
1319
- }, K = () => {
1320
- (u.length > 0 || b) && (W(!0), z(!1));
1321
- }, re = o || ie, ee = Y && (y.length > 0 || re), X = pe(() => q || P, [q]);
1314
+ const $ = (P) => {
1315
+ const B = P.target.value;
1316
+ te(B), K(!0), z(!0), _ && _(P);
1317
+ }, N = (P) => {
1318
+ te(P.label), K(!1), z(!1), v && v(P.value);
1319
+ }, W = () => {
1320
+ (u.length > 0 || b) && (K(!0), z(!1));
1321
+ }, re = o || ie, ee = Y && (y.length > 0 || re), X = pe(() => q || I, [q]);
1322
1322
  return /* @__PURE__ */ i(
1323
1323
  "div",
1324
1324
  {
@@ -1333,7 +1333,7 @@ const ve = (...t) => t.filter(Boolean).join(" "), fr = (t) => /* @__PURE__ */ e(
1333
1333
  t && /* @__PURE__ */ e(
1334
1334
  "label",
1335
1335
  {
1336
- htmlFor: D,
1336
+ htmlFor: A,
1337
1337
  className: ve(
1338
1338
  "block text-sm font-medium mb-1",
1339
1339
  J ? "text-danger-fg" : "text-text",
@@ -1343,22 +1343,22 @@ const ve = (...t) => t.filter(Boolean).join(" "), fr = (t) => /* @__PURE__ */ e(
1343
1343
  }
1344
1344
  ),
1345
1345
  /* @__PURE__ */ i("div", { className: "relative", children: [
1346
- l && /* @__PURE__ */ e("div", { className: "absolute left-0 pl-3 flex items-center pointer-events-none h-full", children: /* @__PURE__ */ e("span", { className: ve("text-text-muted", Pe[s]), children: l }) }),
1346
+ l && /* @__PURE__ */ e("div", { className: "absolute left-0 pl-3 flex items-center pointer-events-none h-full", children: /* @__PURE__ */ e("span", { className: ve("text-text-muted", Oe[s]), children: l }) }),
1347
1347
  /* @__PURE__ */ e(
1348
1348
  "input",
1349
1349
  {
1350
1350
  ref: X,
1351
- id: D,
1351
+ id: A,
1352
1352
  value: H,
1353
- onChange: _,
1354
- onFocus: K,
1353
+ onChange: $,
1354
+ onFocus: W,
1355
1355
  className: ve(
1356
1356
  // Base styles
1357
1357
  "block w-full rounded-tile border bg-surface-input transition-colors duration-fast ease-out",
1358
1358
  "placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring",
1359
1359
  "disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
1360
1360
  // Size styles
1361
- xr[s],
1361
+ br[s],
1362
1362
  // Icon padding
1363
1363
  l ? "pl-10" : "",
1364
1364
  "pr-10",
@@ -1373,24 +1373,24 @@ const ve = (...t) => t.filter(Boolean).join(" "), fr = (t) => /* @__PURE__ */ e(
1373
1373
  /* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: re || o ? (
1374
1374
  // Loading Spinner
1375
1375
  /* @__PURE__ */ e(
1376
- wt,
1376
+ kt,
1377
1377
  {
1378
- className: ve("animate-spin text-info-fg", Pe[s]),
1378
+ className: ve("animate-spin text-info-fg", Oe[s]),
1379
1379
  "aria-hidden": !0
1380
1380
  }
1381
1381
  )
1382
1382
  ) : (
1383
1383
  // Dropdown Chevron
1384
1384
  /* @__PURE__ */ e(
1385
- hr,
1385
+ xr,
1386
1386
  {
1387
1387
  className: ve(
1388
1388
  "text-text-muted cursor-pointer transition-transform",
1389
- Pe[s],
1389
+ Oe[s],
1390
1390
  Y ? "rotate-180" : "rotate-0"
1391
1391
  ),
1392
1392
  onClick: () => {
1393
- W((I) => (I || z(!1), !I));
1393
+ K((P) => (P || z(!1), !P));
1394
1394
  }
1395
1395
  }
1396
1396
  )
@@ -1401,16 +1401,16 @@ const ve = (...t) => t.filter(Boolean).join(" "), fr = (t) => /* @__PURE__ */ e(
1401
1401
  {
1402
1402
  className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
1403
1403
  role: "listbox",
1404
- children: y.length > 0 ? y.map((I) => /* @__PURE__ */ e(
1404
+ children: y.length > 0 ? y.map((P) => /* @__PURE__ */ e(
1405
1405
  "li",
1406
1406
  {
1407
1407
  className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
1408
- onClick: () => N(I),
1408
+ onClick: () => N(P),
1409
1409
  role: "option",
1410
- "aria-selected": H === I.label,
1411
- children: I.label
1410
+ "aria-selected": H === P.label,
1411
+ children: P.label
1412
1412
  },
1413
- I.value
1413
+ P.value
1414
1414
  )) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: re || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
1415
1415
  }
1416
1416
  ),
@@ -1433,8 +1433,8 @@ const ve = (...t) => t.filter(Boolean).join(" "), fr = (t) => /* @__PURE__ */ e(
1433
1433
  );
1434
1434
  }
1435
1435
  );
1436
- br.displayName = "SearchableTextField";
1437
- const nt = be(
1436
+ gr.displayName = "SearchableTextField";
1437
+ const st = be(
1438
1438
  ({
1439
1439
  value: t,
1440
1440
  onValueChange: r,
@@ -1498,8 +1498,8 @@ const nt = be(
1498
1498
  }
1499
1499
  )
1500
1500
  );
1501
- nt.displayName = "SearchField";
1502
- const gr = be(
1501
+ st.displayName = "SearchField";
1502
+ const pr = be(
1503
1503
  ({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, o) => {
1504
1504
  const f = /* @__PURE__ */ e(
1505
1505
  "span",
@@ -1552,8 +1552,8 @@ const gr = be(
1552
1552
  );
1553
1553
  }
1554
1554
  );
1555
- gr.displayName = "Switch";
1556
- const pr = ({
1555
+ pr.displayName = "Switch";
1556
+ const vr = ({
1557
1557
  trigger: t,
1558
1558
  options: r,
1559
1559
  value: n,
@@ -1564,7 +1564,7 @@ const pr = ({
1564
1564
  showCheck: f = !0,
1565
1565
  header: d
1566
1566
  }) => {
1567
- const [p, h] = O(!1), [u, b] = O(null), [v, w] = O({ top: 0, left: 0 }), g = se(null), x = se(null), $ = se(null), S = se(null), q = Ae(p, x, { placement: a }), D = se(null), J = () => Array.from(
1567
+ const [p, h] = j(!1), [u, b] = j(null), [v, w] = j({ top: 0, left: 0 }), g = se(null), x = se(null), _ = se(null), S = se(null), q = Le(p, x, { placement: a }), A = se(null), J = () => Array.from(
1568
1568
  S.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
1569
1569
  );
1570
1570
  G(() => {
@@ -1575,19 +1575,19 @@ const pr = ({
1575
1575
  const y = J();
1576
1576
  if (y.length === 0) return;
1577
1577
  m.preventDefault();
1578
- const _ = y.indexOf(document.activeElement), N = m.key === "Home" ? 0 : m.key === "End" ? y.length - 1 : m.key === "ArrowDown" ? (_ + 1) % y.length : (_ - 1 + y.length) % y.length;
1578
+ const $ = y.indexOf(document.activeElement), N = m.key === "Home" ? 0 : m.key === "End" ? y.length - 1 : m.key === "ArrowDown" ? ($ + 1) % y.length : ($ - 1 + y.length) % y.length;
1579
1579
  y[N]?.focus();
1580
1580
  };
1581
1581
  G(() => {
1582
1582
  const m = (z) => {
1583
- g.current && (!g.current.contains(z.target) || $.current && !$.current.contains(z.target)) && (h(!1), b(null), D.current && (clearTimeout(D.current), D.current = null));
1583
+ g.current && (!g.current.contains(z.target) || _.current && !_.current.contains(z.target)) && (h(!1), b(null), A.current && (clearTimeout(A.current), A.current = null));
1584
1584
  };
1585
1585
  return p && document.addEventListener("mousedown", m), () => {
1586
1586
  document.removeEventListener("mousedown", m);
1587
1587
  };
1588
1588
  }, [p]), G(() => {
1589
1589
  const m = (z) => {
1590
- z.key === "Escape" && (h(!1), b(null), x.current?.focus(), D.current && (clearTimeout(D.current), D.current = null));
1590
+ z.key === "Escape" && (h(!1), b(null), x.current?.focus(), A.current && (clearTimeout(A.current), A.current = null));
1591
1591
  };
1592
1592
  return p && document.addEventListener("keydown", m), () => {
1593
1593
  document.removeEventListener("keydown", m);
@@ -1606,19 +1606,19 @@ const pr = ({
1606
1606
  }
1607
1607
  }
1608
1608
  }, [u]), G(() => () => {
1609
- D.current && clearTimeout(D.current);
1609
+ A.current && clearTimeout(A.current);
1610
1610
  }, []);
1611
- const P = (m) => {
1612
- m.stopPropagation(), !l && (h(!p), b(null), D.current && (clearTimeout(D.current), D.current = null));
1611
+ const I = (m) => {
1612
+ m.stopPropagation(), !l && (h(!p), b(null), A.current && (clearTimeout(A.current), A.current = null));
1613
1613
  }, H = (m, z, y) => {
1614
1614
  m.stopPropagation(), !z.disabled && !z.divider && (!z.children || z.children.length === 0) && (s?.(z.value, y), h(!1), b(null));
1615
1615
  }, te = (m) => {
1616
- D.current && (clearTimeout(D.current), D.current = null), m.children && m.children.length > 0 ? b(m.value) : b(null);
1616
+ A.current && (clearTimeout(A.current), A.current = null), m.children && m.children.length > 0 ? b(m.value) : b(null);
1617
1617
  }, Y = (m) => {
1618
- m.children && m.children.length > 0 ? D.current = setTimeout(() => {
1618
+ m.children && m.children.length > 0 ? A.current = setTimeout(() => {
1619
1619
  b(null);
1620
1620
  }, 150) : b(null);
1621
- }, W = (m, z, y) => {
1621
+ }, K = (m, z, y) => {
1622
1622
  m.stopPropagation(), !z.disabled && !z.divider && (s?.(z.value, y), h(!1), b(null));
1623
1623
  }, ie = c(
1624
1624
  "fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
@@ -1640,7 +1640,7 @@ const pr = ({
1640
1640
  "button",
1641
1641
  {
1642
1642
  ref: x,
1643
- onClick: P,
1643
+ onClick: I,
1644
1644
  disabled: l,
1645
1645
  "aria-haspopup": "menu",
1646
1646
  "aria-expanded": p,
@@ -1661,7 +1661,7 @@ const pr = ({
1661
1661
  },
1662
1662
  `divider-${z}`
1663
1663
  );
1664
- const y = m.children && m.children.length > 0, _ = u === m.value;
1664
+ const y = m.children && m.children.length > 0, $ = u === m.value;
1665
1665
  return /* @__PURE__ */ i("div", { className: "relative group", children: [
1666
1666
  /* @__PURE__ */ i(
1667
1667
  "button",
@@ -1677,7 +1677,7 @@ const pr = ({
1677
1677
  "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",
1678
1678
  {
1679
1679
  "opacity-50 cursor-not-allowed": m.disabled,
1680
- "bg-surface-hover": _ && y
1680
+ "bg-surface-hover": $ && y
1681
1681
  }
1682
1682
  ),
1683
1683
  children: [
@@ -1689,37 +1689,37 @@ const pr = ({
1689
1689
  ] })
1690
1690
  ] }),
1691
1691
  /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
1692
- f && n === m.value && /* @__PURE__ */ e(Be, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
1692
+ f && n === m.value && /* @__PURE__ */ e(Re, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
1693
1693
  y && /* @__PURE__ */ e("span", { className: "text-text-muted text-xs", children: "▶" })
1694
1694
  ] })
1695
1695
  ]
1696
1696
  }
1697
1697
  ),
1698
- y && _ && /* @__PURE__ */ e(
1698
+ y && $ && /* @__PURE__ */ e(
1699
1699
  "div",
1700
1700
  {
1701
- ref: $,
1701
+ ref: _,
1702
1702
  className: k,
1703
1703
  style: {
1704
1704
  top: `${v.top}px`,
1705
1705
  left: `${v.left}px`
1706
1706
  },
1707
1707
  onMouseEnter: () => {
1708
- D.current && (clearTimeout(D.current), D.current = null), b(m.value);
1708
+ A.current && (clearTimeout(A.current), A.current = null), b(m.value);
1709
1709
  },
1710
1710
  onMouseLeave: () => {
1711
- D.current = setTimeout(() => {
1711
+ A.current = setTimeout(() => {
1712
1712
  b(null);
1713
1713
  }, 150);
1714
1714
  },
1715
- children: /* @__PURE__ */ e("div", { className: "p-2", children: m.children.map((N, K) => {
1715
+ children: /* @__PURE__ */ e("div", { className: "p-2", children: m.children.map((N, W) => {
1716
1716
  if (N.divider)
1717
1717
  return /* @__PURE__ */ e(
1718
1718
  "div",
1719
1719
  {
1720
1720
  className: "border-t border-border my-2"
1721
1721
  },
1722
- `divider-${K}`
1722
+ `divider-${W}`
1723
1723
  );
1724
1724
  const re = typeof n == "object" && n[m.value] && n[m.value].includes(
1725
1725
  N.value
@@ -1727,7 +1727,7 @@ const pr = ({
1727
1727
  return /* @__PURE__ */ i(
1728
1728
  "button",
1729
1729
  {
1730
- onClick: (ee) => W(
1730
+ onClick: (ee) => K(
1731
1731
  ee,
1732
1732
  N,
1733
1733
  m.value
@@ -1747,7 +1747,7 @@ const pr = ({
1747
1747
  N.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: N.description })
1748
1748
  ] })
1749
1749
  ] }),
1750
- f && re && /* @__PURE__ */ e(Be, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
1750
+ f && re && /* @__PURE__ */ e(Re, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
1751
1751
  ]
1752
1752
  },
1753
1753
  N.value
@@ -1760,8 +1760,8 @@ const pr = ({
1760
1760
  (() => {
1761
1761
  const m = r.reduce((z, y) => {
1762
1762
  if (y.divider) return z;
1763
- const _ = y.children ? y.children.filter((N) => !N.divider).length : 0;
1764
- return z + 1 + _;
1763
+ const $ = y.children ? y.children.filter((N) => !N.divider).length : 0;
1764
+ return z + 1 + $;
1765
1765
  }, 0);
1766
1766
  return m > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ i("div", { className: "text-xs text-text-muted px-3 py-1", children: [
1767
1767
  m,
@@ -1772,13 +1772,13 @@ const pr = ({
1772
1772
  ]
1773
1773
  }
1774
1774
  );
1775
- }, Te = ({
1775
+ }, _e = ({
1776
1776
  actions: t,
1777
1777
  defaultVariant: r = "secondary",
1778
1778
  className: n
1779
1779
  }) => t.length === 0 ? null : /* @__PURE__ */ e("div", { className: c("flex flex-wrap items-center gap-2", n), children: t.map(
1780
1780
  (s) => s.render ? /* @__PURE__ */ e(ce.Fragment, { children: s.render() }, s.id) : s.splitOptions && s.splitOptions.length > 0 ? /* @__PURE__ */ e(
1781
- Qe,
1781
+ et,
1782
1782
  {
1783
1783
  label: s.label,
1784
1784
  onClick: s.onClick,
@@ -1801,19 +1801,19 @@ const pr = ({
1801
1801
  },
1802
1802
  s.id
1803
1803
  )
1804
- ) }), vr = {
1804
+ ) }), yr = {
1805
1805
  none: "p-0",
1806
1806
  sm: "p-2",
1807
1807
  md: "px-5 py-4",
1808
1808
  lg: "p-6"
1809
- }, Wn = ({
1809
+ }, Xn = ({
1810
1810
  actions: t = [],
1811
1811
  onBack: r,
1812
1812
  backLabel: n = "Back",
1813
1813
  className: s,
1814
1814
  padding: a = "md",
1815
1815
  children: l
1816
- }) => /* @__PURE__ */ i("div", { className: c("flex items-center gap-2", vr[a], s), children: [
1816
+ }) => /* @__PURE__ */ i("div", { className: c("flex items-center gap-2", yr[a], s), children: [
1817
1817
  r && /* @__PURE__ */ e(
1818
1818
  le,
1819
1819
  {
@@ -1825,25 +1825,25 @@ const pr = ({
1825
1825
  }
1826
1826
  ),
1827
1827
  l && /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: l }),
1828
- /* @__PURE__ */ e(Te, { actions: t, className: c(!l && "ml-auto") })
1829
- ] }), Kn = (t) => (r) => t(r instanceof Date ? r : null), Gn = (t) => (r) => t(typeof r == "string" ? r : ""), yr = {
1828
+ /* @__PURE__ */ e(_e, { actions: t, className: c(!l && "ml-auto") })
1829
+ ] }), Zn = (t) => (r) => t(r instanceof Date ? r : null), Qn = (t) => (r) => t(typeof r == "string" ? r : ""), Nr = {
1830
1830
  none: "px-0",
1831
1831
  sm: "px-2",
1832
1832
  md: "px-3.5",
1833
1833
  lg: "px-5"
1834
- }, Nr = {
1834
+ }, wr = {
1835
1835
  sm: "h-row-lg",
1836
1836
  md: "h-row-xl",
1837
1837
  lg: "h-14"
1838
- }, wr = 8, qe = ["62%", "44%", "74%", "52%", "68%", "48%", "80%", "56%"];
1839
- function kr(t, r) {
1838
+ }, kr = 8, Ue = ["62%", "44%", "74%", "52%", "68%", "48%", "80%", "56%"];
1839
+ function Cr(t, r) {
1840
1840
  if (r <= 7) return Array.from({ length: r }, (l, o) => o);
1841
1841
  const s = [.../* @__PURE__ */ new Set([0, r - 1, t - 1, t, t + 1])].filter((l) => l >= 0 && l < r).sort((l, o) => l - o), a = [];
1842
1842
  return s.forEach((l, o) => {
1843
1843
  o > 0 && l - s[o - 1] > 1 && a.push("gap"), a.push(l);
1844
1844
  }), a;
1845
1845
  }
1846
- const Cr = (t) => {
1846
+ const Sr = (t) => {
1847
1847
  const r = Array.isArray(t.value) ? t.value : t.value != null && t.value !== "" && t.value !== "all" ? [t.value] : [];
1848
1848
  if (t.type === "date") {
1849
1849
  const o = t.value instanceof Date;
@@ -1865,7 +1865,7 @@ const Cr = (t) => {
1865
1865
  );
1866
1866
  }, l = r.length > 0;
1867
1867
  return /* @__PURE__ */ e(
1868
- Yt,
1868
+ Xt,
1869
1869
  {
1870
1870
  tone: "outline",
1871
1871
  caret: !0,
@@ -1895,7 +1895,7 @@ const Cr = (t) => {
1895
1895
  )) })
1896
1896
  }
1897
1897
  );
1898
- }, Ue = ({
1898
+ }, Ke = ({
1899
1899
  data: t,
1900
1900
  columns: r,
1901
1901
  loading: n = !1,
@@ -1913,24 +1913,24 @@ const Cr = (t) => {
1913
1913
  selectedRows: w = [],
1914
1914
  onSelectionChange: g,
1915
1915
  getRowKey: x = (te, Y) => Y,
1916
- emptyContent: $,
1916
+ emptyContent: _,
1917
1917
  footerSummary: S,
1918
1918
  size: q = "md",
1919
- hoverable: D = !0,
1919
+ hoverable: A = !0,
1920
1920
  padding: J = "md",
1921
1921
  className: V,
1922
- rowClassName: P,
1922
+ rowClassName: I,
1923
1923
  headerBackground: H = !0
1924
1924
  }) => {
1925
- const [te, Y] = O(""), W = l !== void 0, ie = W ? l : te, k = o ?? Y, [m, z] = O({
1925
+ const [te, Y] = j(""), K = l !== void 0, ie = K ? l : te, k = o ?? Y, [m, z] = j({
1926
1926
  column: null,
1927
1927
  direction: null
1928
- }), [y, _] = O({
1928
+ }), [y, $] = j({
1929
1929
  page: 0,
1930
1930
  pageSize: h
1931
- }), N = se(null), K = pe(() => {
1931
+ }), N = se(null), W = pe(() => {
1932
1932
  let E = t;
1933
- if (s && !W && ie.trim()) {
1933
+ if (s && !K && ie.trim()) {
1934
1934
  const U = r.filter(
1935
1935
  (oe) => oe.searchable !== !1
1936
1936
  ), ne = ie.toLowerCase();
@@ -1947,15 +1947,15 @@ const Cr = (t) => {
1947
1947
  return String(F || "") === U.value;
1948
1948
  }));
1949
1949
  }), E;
1950
- }, [t, ie, W, r, s, f]), re = pe(() => {
1951
- if (!m.column || !m.direction) return K;
1950
+ }, [t, ie, K, r, s, f]), re = pe(() => {
1951
+ if (!m.column || !m.direction) return W;
1952
1952
  const E = r.find((U) => U.id === m.column);
1953
- return E ? [...K].sort((U, ne) => {
1953
+ return E ? [...W].sort((U, ne) => {
1954
1954
  const oe = typeof E.accessor == "function" ? E.accessor(U) : U[E.accessor], F = typeof E.accessor == "function" ? E.accessor(ne) : ne[E.accessor];
1955
1955
  let ue = 0;
1956
1956
  return oe < F ? ue = -1 : oe > F && (ue = 1), m.direction === "desc" ? -ue : ue;
1957
- }) : K;
1958
- }, [K, m, r]), ee = pe(() => {
1957
+ }) : W;
1958
+ }, [W, m, r]), ee = pe(() => {
1959
1959
  if (!p) return re;
1960
1960
  const E = y.page * y.pageSize, U = E + y.pageSize;
1961
1961
  return re.slice(E, U);
@@ -1964,8 +1964,8 @@ const Cr = (t) => {
1964
1964
  r.find((ne) => ne.id === E)?.sortable && z((ne) => ne.column !== E ? { column: E, direction: "asc" } : ne.direction === "asc" ? { column: E, direction: "desc" } : { column: null, direction: null });
1965
1965
  },
1966
1966
  [r]
1967
- ), I = xe((E) => {
1968
- _((U) => ({ ...U, page: E }));
1967
+ ), P = xe((E) => {
1968
+ $((U) => ({ ...U, page: E }));
1969
1969
  }, []), B = xe(
1970
1970
  (E, U) => {
1971
1971
  if (!g) return;
@@ -1975,18 +1975,18 @@ const Cr = (t) => {
1975
1975
  ));
1976
1976
  },
1977
1977
  [w, g, x]
1978
- ), M = xe(
1978
+ ), T = xe(
1979
1979
  (E) => {
1980
1980
  g && g(E ? [...ee] : []);
1981
1981
  },
1982
1982
  [ee, g]
1983
1983
  );
1984
1984
  G(() => {
1985
- _((E) => ({ ...E, page: 0 }));
1985
+ $((E) => ({ ...E, page: 0 }));
1986
1986
  }, [ie, m]), G(() => {
1987
- _((E) => ({ ...E, page: 0 }));
1987
+ $((E) => ({ ...E, page: 0 }));
1988
1988
  }, [f.map((E) => E.value).join(",")]);
1989
- const C = re.length, A = Math.ceil(C / y.pageSize), j = y.page * y.pageSize + 1, R = Math.min(j + y.pageSize - 1, C), T = ee.length > 0 && ee.every((E) => {
1989
+ const C = re.length, D = Math.ceil(C / y.pageSize), O = y.page * y.pageSize + 1, R = Math.min(O + y.pageSize - 1, C), M = ee.length > 0 && ee.every((E) => {
1990
1990
  const U = x(E, 0);
1991
1991
  return w.some(
1992
1992
  (ne, oe) => x(ne, oe) === U
@@ -1996,11 +1996,11 @@ const Cr = (t) => {
1996
1996
  return w.some(
1997
1997
  (ne, oe) => x(ne, oe) === U
1998
1998
  );
1999
- }), Q = yr[J], ae = H ? "bg-surface-sunk" : "bg-surface", de = c("text-text", Q), ge = s || f.length > 0 || d.length > 0, he = p && C > 0, Le = he || S !== void 0;
1999
+ }), Q = Nr[J], ae = H ? "bg-surface-sunk" : "bg-surface", de = c("text-text", Q), ge = s || f.length > 0 || d.length > 0, he = p && C > 0, Pe = he || S !== void 0;
2000
2000
  return /* @__PURE__ */ i("div", { className: c("flex min-w-0 flex-col", V), children: [
2001
2001
  ge && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
2002
2002
  s && /* @__PURE__ */ e(
2003
- nt,
2003
+ st,
2004
2004
  {
2005
2005
  value: ie,
2006
2006
  onValueChange: k,
@@ -2008,8 +2008,8 @@ const Cr = (t) => {
2008
2008
  containerClassName: "w-full sm:w-66"
2009
2009
  }
2010
2010
  ),
2011
- f.map((E) => /* @__PURE__ */ e(Cr, { ...E }, E.id)),
2012
- d.length > 0 && /* @__PURE__ */ e(Te, { actions: d, className: "ml-auto" })
2011
+ f.map((E) => /* @__PURE__ */ e(Sr, { ...E }, E.id)),
2012
+ d.length > 0 && /* @__PURE__ */ e(_e, { actions: d, className: "ml-auto" })
2013
2013
  ] }),
2014
2014
  /* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ i("table", { ref: N, className: "min-w-full border-collapse text-base text-text", children: [
2015
2015
  /* @__PURE__ */ e("thead", { className: c(ae, "h-control-lg"), children: /* @__PURE__ */ i("tr", { children: [
@@ -2017,9 +2017,9 @@ const Cr = (t) => {
2017
2017
  ye,
2018
2018
  {
2019
2019
  size: "sm",
2020
- checked: T,
2021
- indeterminate: L && !T,
2022
- onChange: (E) => M(E.target.checked),
2020
+ checked: M,
2021
+ indeterminate: L && !M,
2022
+ onChange: (E) => T(E.target.checked),
2023
2023
  "aria-label": "Select all rows"
2024
2024
  }
2025
2025
  ) }),
@@ -2046,7 +2046,7 @@ const Cr = (t) => {
2046
2046
  E.sortable && /* @__PURE__ */ e(
2047
2047
  Z,
2048
2048
  {
2049
- icon: m.column === E.id && m.direction === "desc" ? $e : kt,
2049
+ icon: m.column === E.id && m.direction === "desc" ? $e : Ct,
2050
2050
  size: "xs",
2051
2051
  className: c(
2052
2052
  "transition-opacity duration-fast ease-out",
@@ -2060,13 +2060,13 @@ const Cr = (t) => {
2060
2060
  )),
2061
2061
  u.length > 0 && /* @__PURE__ */ e("th", { className: c(de, "w-10"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
2062
2062
  ] }) }),
2063
- /* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: wr }).map((E, U) => /* @__PURE__ */ i("tr", { className: "animate-pulse border-t border-border-subtle", "aria-hidden": !0, children: [
2063
+ /* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: kr }).map((E, U) => /* @__PURE__ */ i("tr", { className: "animate-pulse border-t border-border-subtle", "aria-hidden": !0, children: [
2064
2064
  v && /* @__PURE__ */ e("td", { className: c(de, "h-row-lg"), children: /* @__PURE__ */ e("span", { className: "block size-4 rounded-xs bg-surface-hover" }) }),
2065
2065
  r.map((ne, oe) => /* @__PURE__ */ e("td", { className: c(de, "h-row-lg"), style: { width: ne.width }, children: /* @__PURE__ */ e(
2066
2066
  "span",
2067
2067
  {
2068
2068
  className: "block h-3 rounded-xs bg-surface-hover",
2069
- style: { width: qe[(U + oe) % qe.length] }
2069
+ style: { width: Ue[(U + oe) % Ue.length] }
2070
2070
  }
2071
2071
  ) }, ne.id)),
2072
2072
  u.length > 0 && /* @__PURE__ */ e("td", { className: c(de, "h-row-lg") })
@@ -2078,7 +2078,7 @@ const Cr = (t) => {
2078
2078
  de,
2079
2079
  "border-t border-border-subtle py-10 text-center text-text-muted"
2080
2080
  ),
2081
- children: $ || "No data available"
2081
+ children: _ || "No data available"
2082
2082
  }
2083
2083
  ) }) : ee.map((E, U) => {
2084
2084
  const ne = x(E, U), oe = w.some(
@@ -2088,14 +2088,14 @@ const Cr = (t) => {
2088
2088
  "tr",
2089
2089
  {
2090
2090
  className: c(
2091
- Nr[q],
2091
+ wr[q],
2092
2092
  // Hairline above every row, including the first: it is
2093
2093
  // what separates the body from the column strip.
2094
2094
  "border-t border-border-subtle",
2095
- D && "transition-colors duration-fast ease-out hover:bg-surface-hover",
2095
+ A && "transition-colors duration-fast ease-out hover:bg-surface-hover",
2096
2096
  b && "cursor-pointer",
2097
2097
  oe && "bg-accent-soft",
2098
- P?.(E, U)
2098
+ I?.(E, U)
2099
2099
  ),
2100
2100
  onClick: (F) => {
2101
2101
  F.stopPropagation(), b?.(E, U);
@@ -2131,10 +2131,10 @@ const Cr = (t) => {
2131
2131
  );
2132
2132
  }),
2133
2133
  u.length > 0 && /* @__PURE__ */ e("td", { className: de, children: /* @__PURE__ */ e(
2134
- pr,
2134
+ vr,
2135
2135
  {
2136
2136
  className: "rounded-md",
2137
- trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(Z, { icon: Ct, size: "md", color: "current" }) }),
2137
+ trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(Z, { icon: St, size: "md", color: "current" }) }),
2138
2138
  options: u.map((F) => ({
2139
2139
  value: F.id,
2140
2140
  label: F.label,
@@ -2143,7 +2143,7 @@ const Cr = (t) => {
2143
2143
  })),
2144
2144
  onSelect: (F) => {
2145
2145
  const ue = u.find(
2146
- (ct) => ct.id === F
2146
+ (it) => it.id === F
2147
2147
  );
2148
2148
  ue && ue.onClick(E, U);
2149
2149
  },
@@ -2156,8 +2156,8 @@ const Cr = (t) => {
2156
2156
  );
2157
2157
  }) })
2158
2158
  ] }) }),
2159
- Le && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-3 px-1 pt-3 text-xs text-text-muted", children: [
2160
- /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: S ?? `Showing ${j}–${R} of ${C}` }),
2159
+ Pe && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-3 px-1 pt-3 text-xs text-text-muted", children: [
2160
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: S ?? `Showing ${O}–${R} of ${C}` }),
2161
2161
  he && /* @__PURE__ */ i("div", { className: "flex items-center gap-0.5", children: [
2162
2162
  /* @__PURE__ */ e(
2163
2163
  le,
@@ -2166,18 +2166,18 @@ const Cr = (t) => {
2166
2166
  variant: "ghost",
2167
2167
  iconOnly: !0,
2168
2168
  "aria-label": "Previous page",
2169
- onClick: () => I(y.page - 1),
2169
+ onClick: () => P(y.page - 1),
2170
2170
  disabled: y.page === 0,
2171
2171
  children: /* @__PURE__ */ e(Z, { icon: Ce, size: "md", color: "current" })
2172
2172
  }
2173
2173
  ),
2174
- kr(y.page, A).map(
2174
+ Cr(y.page, D).map(
2175
2175
  (E, U) => E === "gap" ? /* @__PURE__ */ e("span", { className: "px-1 text-text-subtle", children: "…" }, `gap-${U}`) : /* @__PURE__ */ e(
2176
2176
  "button",
2177
2177
  {
2178
2178
  type: "button",
2179
2179
  "aria-current": E === y.page ? "page" : void 0,
2180
- onClick: () => I(E),
2180
+ onClick: () => P(E),
2181
2181
  className: c(
2182
2182
  "h-control-xs min-w-6 cursor-pointer rounded-sm px-1.5 tabular-nums",
2183
2183
  "transition-colors duration-fast ease-out",
@@ -2196,21 +2196,21 @@ const Cr = (t) => {
2196
2196
  variant: "ghost",
2197
2197
  iconOnly: !0,
2198
2198
  "aria-label": "Next page",
2199
- onClick: () => I(y.page + 1),
2200
- disabled: y.page >= A - 1,
2201
- children: /* @__PURE__ */ e(Z, { icon: _e, size: "md", color: "current" })
2199
+ onClick: () => P(y.page + 1),
2200
+ disabled: y.page >= D - 1,
2201
+ children: /* @__PURE__ */ e(Z, { icon: Ae, size: "md", color: "current" })
2202
2202
  }
2203
2203
  )
2204
2204
  ] })
2205
2205
  ] })
2206
2206
  ] });
2207
- }, Sr = Je(null), Jn = ({
2207
+ }, Er = Ye(null), es = ({
2208
2208
  items: t,
2209
2209
  activeTab: r,
2210
2210
  onTabChange: n,
2211
2211
  className: s
2212
2212
  }) => {
2213
- const [a, l] = O(t[0]?.id || ""), o = r || a, f = (d) => {
2213
+ const [a, l] = j(t[0]?.id || ""), o = r || a, f = (d) => {
2214
2214
  n ? n(d) : l(d);
2215
2215
  };
2216
2216
  return /* @__PURE__ */ e("div", { className: c("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((d) => /* @__PURE__ */ e(
@@ -2236,7 +2236,7 @@ const Cr = (t) => {
2236
2236
  },
2237
2237
  d.id
2238
2238
  )) }) });
2239
- }, Er = ({
2239
+ }, zr = ({
2240
2240
  items: t,
2241
2241
  defaultTab: r,
2242
2242
  activeTab: n,
@@ -2245,7 +2245,7 @@ const Cr = (t) => {
2245
2245
  size: l = "md",
2246
2246
  className: o
2247
2247
  }) => {
2248
- const [f, d] = O(
2248
+ const [f, d] = j(
2249
2249
  r || n || t[0]?.id || ""
2250
2250
  ), p = n || f, h = (g) => {
2251
2251
  s ? s(g) : d(g);
@@ -2262,7 +2262,7 @@ const Cr = (t) => {
2262
2262
  },
2263
2263
  o
2264
2264
  ), w = (g, x) => {
2265
- const $ = "transition-colors duration-fast font-medium", S = {
2265
+ const _ = "transition-colors duration-fast font-medium", S = {
2266
2266
  "text-xs px-2 py-1": l === "sm",
2267
2267
  "text-sm px-3 py-2": l === "md",
2268
2268
  "text-base px-4 py-3": l === "lg"
@@ -2273,7 +2273,7 @@ const Cr = (t) => {
2273
2273
  "rounded-md": a === "pills",
2274
2274
  // Underline variant
2275
2275
  "border-b-2 pb-2": a === "underline"
2276
- }, D = {
2276
+ }, A = {
2277
2277
  "opacity-50 cursor-not-allowed": g.disabled,
2278
2278
  "cursor-pointer": !g.disabled
2279
2279
  }, J = x ? {
@@ -2284,9 +2284,9 @@ const Cr = (t) => {
2284
2284
  "text-text-muted hover:text-text": a === "pills",
2285
2285
  "border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
2286
2286
  } : {};
2287
- return c($, S, q, D, J, V);
2287
+ return c(_, S, q, A, J, V);
2288
2288
  };
2289
- return /* @__PURE__ */ e(Sr.Provider, { value: u, children: /* @__PURE__ */ i("div", { children: [
2289
+ return /* @__PURE__ */ e(Er.Provider, { value: u, children: /* @__PURE__ */ i("div", { children: [
2290
2290
  /* @__PURE__ */ e("div", { className: v, role: "tablist", children: t.map((g) => /* @__PURE__ */ e(
2291
2291
  "button",
2292
2292
  {
@@ -2315,14 +2315,14 @@ const Cr = (t) => {
2315
2315
  }
2316
2316
  )
2317
2317
  ] }) });
2318
- }, zr = {
2318
+ }, Tr = {
2319
2319
  sm: "max-w-md",
2320
2320
  md: "max-w-lg",
2321
2321
  lg: "max-w-2xl",
2322
2322
  xl: "max-w-4xl",
2323
2323
  full: "max-w-full mx-4"
2324
2324
  };
2325
- function st({
2325
+ function at({
2326
2326
  open: t,
2327
2327
  onClose: r,
2328
2328
  title: n,
@@ -2366,7 +2366,7 @@ function st({
2366
2366
  "relative w-full bg-surface rounded-lg shadow-modal",
2367
2367
  // 'animate-scale-in',
2368
2368
  "focus:outline-none",
2369
- zr[s],
2369
+ Tr[s],
2370
2370
  o
2371
2371
  ),
2372
2372
  role: "dialog",
@@ -2407,7 +2407,7 @@ const Mr = {
2407
2407
  md: "text-base",
2408
2408
  lg: "text-md",
2409
2409
  xl: "text-lg"
2410
- }, Tr = {
2410
+ }, _r = {
2411
2411
  light: "font-normal",
2412
2412
  normal: "font-normal",
2413
2413
  medium: "font-medium",
@@ -2424,7 +2424,7 @@ const Mr = {
2424
2424
  neutral: "text-text",
2425
2425
  current: "text-current",
2426
2426
  muted: "text-text-subtle"
2427
- }, _r = {
2427
+ }, Ar = {
2428
2428
  left: "text-left",
2429
2429
  center: "text-center",
2430
2430
  right: "text-right",
@@ -2448,7 +2448,7 @@ const Mr = {
2448
2448
  children: u,
2449
2449
  ...b
2450
2450
  }) => {
2451
- const v = p || Ar(t), w = t === "caption", g = t === "label", x = t === "code", $ = c(
2451
+ const v = p || Lr(t), w = t === "caption", g = t === "label", x = t === "code", _ = c(
2452
2452
  "font-sans",
2453
2453
  // Variant — caption and label pin their own size/weight
2454
2454
  w && "text-xs text-text-subtle",
@@ -2457,9 +2457,9 @@ const Mr = {
2457
2457
  // Size — only where the variant does not pin it
2458
2458
  !w && !g && !x && Mr[r],
2459
2459
  // Weight — label owns its weight
2460
- !g && Tr[n],
2460
+ !g && _r[n],
2461
2461
  $r[s],
2462
- _r[a],
2462
+ Ar[a],
2463
2463
  // Line height only overrides the body variant
2464
2464
  t === "body" && Dr[d],
2465
2465
  o && "italic",
@@ -2467,9 +2467,9 @@ const Mr = {
2467
2467
  l && "truncate",
2468
2468
  h
2469
2469
  );
2470
- return /* @__PURE__ */ e(v, { className: $, ...b, children: u });
2470
+ return /* @__PURE__ */ e(v, { className: _, ...b, children: u });
2471
2471
  };
2472
- function Ar(t) {
2472
+ function Lr(t) {
2473
2473
  return {
2474
2474
  body: "p",
2475
2475
  caption: "span",
@@ -2477,7 +2477,7 @@ function Ar(t) {
2477
2477
  code: "code"
2478
2478
  }[t] || "p";
2479
2479
  }
2480
- const Lr = ({
2480
+ const Pr = ({
2481
2481
  value: t,
2482
2482
  onChange: r,
2483
2483
  label: n,
@@ -2491,40 +2491,40 @@ const Lr = ({
2491
2491
  onDownloadFile: h,
2492
2492
  onRegisterFile: u
2493
2493
  }) => {
2494
- const [b, v] = O(!1), [w, g] = O([]), [x, $] = O(null), [S, q] = O("/"), [D, J] = O([]), [V, P] = O(!1), [H, te] = O(""), [Y, W] = O(
2494
+ const [b, v] = j(!1), [w, g] = j([]), [x, _] = j(null), [S, q] = j("/"), [A, J] = j([]), [V, I] = j(!1), [H, te] = j(""), [Y, K] = j(
2495
2495
  typeof t == "object" ? t : null
2496
- ), [ie, k] = O(!1), [m, z] = O(""), y = se(null);
2496
+ ), [ie, k] = j(!1), [m, z] = j(""), y = se(null);
2497
2497
  G(() => {
2498
- b && _();
2498
+ b && $();
2499
2499
  }, [b]), G(() => {
2500
2500
  b && x && N();
2501
2501
  }, [b, x, S, H]);
2502
- const _ = async () => {
2503
- P(!0);
2502
+ const $ = async () => {
2503
+ I(!0);
2504
2504
  try {
2505
- const T = await d?.();
2506
- T?.data && g(T.data);
2507
- } catch (T) {
2508
- console.error("Failed to load mounts", T);
2505
+ const M = await d?.();
2506
+ M?.data && g(M.data);
2507
+ } catch (M) {
2508
+ console.error("Failed to load mounts", M);
2509
2509
  } finally {
2510
- P(!1);
2510
+ I(!1);
2511
2511
  }
2512
2512
  }, N = async () => {
2513
2513
  if (x) {
2514
- P(!0);
2514
+ I(!0);
2515
2515
  try {
2516
- const T = await f?.({ mountId: x.id, name: H, path: S });
2517
- T?.data && J(T.data);
2518
- } catch (T) {
2519
- console.error("Failed to load files", T);
2516
+ const M = await f?.({ mountId: x.id, name: H, path: S });
2517
+ M?.data && J(M.data);
2518
+ } catch (M) {
2519
+ console.error("Failed to load files", M);
2520
2520
  } finally {
2521
- P(!1);
2521
+ I(!1);
2522
2522
  }
2523
2523
  }
2524
- }, K = async (T) => {
2525
- const L = T.target.files?.[0];
2524
+ }, W = async (M) => {
2525
+ const L = M.target.files?.[0];
2526
2526
  if (L) {
2527
- P(!0);
2527
+ I(!0);
2528
2528
  try {
2529
2529
  const Q = await L.arrayBuffer(), ae = new Uint8Array(Q), de = {
2530
2530
  id: `local-${Date.now()}`,
@@ -2537,17 +2537,17 @@ const Lr = ({
2537
2537
  providerKey: L.name,
2538
2538
  ownerId: "me"
2539
2539
  };
2540
- W(de), r(de, ae), v(!1);
2540
+ K(de), r(de, ae), v(!1);
2541
2541
  } catch (Q) {
2542
2542
  console.error("Local file selection failed", Q);
2543
2543
  } finally {
2544
- P(!1);
2544
+ I(!1);
2545
2545
  }
2546
2546
  }
2547
- }, re = async (T) => {
2548
- const L = T.target.files?.[0];
2547
+ }, re = async (M) => {
2548
+ const L = M.target.files?.[0];
2549
2549
  if (!(!L || !x)) {
2550
- P(!0);
2550
+ I(!0);
2551
2551
  try {
2552
2552
  const Q = await L.arrayBuffer(), ae = await p?.({
2553
2553
  file: new Uint8Array(Q),
@@ -2558,19 +2558,19 @@ const Lr = ({
2558
2558
  });
2559
2559
  if (ae?.data) {
2560
2560
  const de = ae.data;
2561
- W(de), r(de, new Uint8Array(Q)), v(!1);
2561
+ K(de), r(de, new Uint8Array(Q)), v(!1);
2562
2562
  }
2563
2563
  } catch (Q) {
2564
2564
  console.error("Upload failed", Q);
2565
2565
  } finally {
2566
- P(!1);
2566
+ I(!1);
2567
2567
  }
2568
2568
  }
2569
2569
  }, ee = async () => {
2570
2570
  if (!(!m || !x)) {
2571
- P(!0);
2571
+ I(!0);
2572
2572
  try {
2573
- const T = `${S}${m}/`;
2573
+ const M = `${S}${m}/`;
2574
2574
  u && (await u({
2575
2575
  name: m,
2576
2576
  type: "folder",
@@ -2578,95 +2578,95 @@ const Lr = ({
2578
2578
  mimeType: "application/x-directory",
2579
2579
  size: 0,
2580
2580
  mountId: x.id,
2581
- providerKey: T,
2581
+ providerKey: M,
2582
2582
  ownerId: "me"
2583
2583
  }), await N()), k(!1), z("");
2584
- } catch (T) {
2585
- console.error("Failed to create folder", T);
2584
+ } catch (M) {
2585
+ console.error("Failed to create folder", M);
2586
2586
  } finally {
2587
- P(!1);
2587
+ I(!1);
2588
2588
  }
2589
2589
  }
2590
- }, X = async (T) => {
2591
- P(!0);
2590
+ }, X = async (M) => {
2591
+ I(!0);
2592
2592
  try {
2593
- const L = await h?.(T.id);
2594
- W(T), r(T, L), v(!1);
2593
+ const L = await h?.(M.id);
2594
+ K(M), r(M, L), v(!1);
2595
2595
  } catch (L) {
2596
2596
  console.error("Failed to download file", L);
2597
2597
  } finally {
2598
- P(!1);
2598
+ I(!1);
2599
2599
  }
2600
- }, I = (T) => {
2601
- T.stopPropagation(), W(null), r(null);
2600
+ }, P = (M) => {
2601
+ M.stopPropagation(), K(null), r(null);
2602
2602
  }, B = pe(() => {
2603
- const T = /* @__PURE__ */ new Set(), L = [];
2604
- return D.forEach((Q) => {
2603
+ const M = /* @__PURE__ */ new Set(), L = [];
2604
+ return A.forEach((Q) => {
2605
2605
  if (Q.type === "folder") {
2606
- Q.path === S && T.add(Q.name);
2606
+ Q.path === S && M.add(Q.name);
2607
2607
  return;
2608
2608
  }
2609
2609
  const ae = Q.providerKey || Q.name, ge = (S ? ae.substring(S.length) : ae).split("/").filter((he) => he !== "");
2610
- ge.length > 1 ? T.add(ge[0]) : ge.length === 1 && L.push(Q);
2610
+ ge.length > 1 ? M.add(ge[0]) : ge.length === 1 && L.push(Q);
2611
2611
  }), {
2612
- folders: Array.from(T).sort(),
2612
+ folders: Array.from(M).sort(),
2613
2613
  files: L.sort((Q, ae) => Q.name.localeCompare(ae.name))
2614
2614
  };
2615
- }, [D, S]), M = (T) => {
2616
- q((L) => `${L}${T}/`);
2615
+ }, [A, S]), T = (M) => {
2616
+ q((L) => `${L}${M}/`);
2617
2617
  }, C = () => {
2618
- const T = S.split("/").filter((L) => L !== "");
2619
- T.pop(), T.length === 0 ? q("/") : q(`${T.join("/")}/`);
2620
- }, A = pe(() => {
2621
- const T = B.folders.map((L) => ({
2618
+ const M = S.split("/").filter((L) => L !== "");
2619
+ M.pop(), M.length === 0 ? q("/") : q(`${M.join("/")}/`);
2620
+ }, D = pe(() => {
2621
+ const M = B.folders.map((L) => ({
2622
2622
  id: `folder-${L}`,
2623
2623
  name: L,
2624
2624
  type: "folder"
2625
2625
  }));
2626
2626
  return B.files.forEach((L) => {
2627
- T.push({
2627
+ M.push({
2628
2628
  ...L,
2629
2629
  type: "file"
2630
2630
  });
2631
- }), T;
2632
- }, [B]), j = [
2631
+ }), M;
2632
+ }, [B]), O = [
2633
2633
  {
2634
2634
  id: "name",
2635
2635
  header: "Name",
2636
2636
  accessor: "name",
2637
- cell: (T, L) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
2637
+ cell: (M, L) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
2638
2638
  /* @__PURE__ */ e(
2639
2639
  Z,
2640
2640
  {
2641
- icon: L.type === "folder" ? He : Ie,
2641
+ icon: L.type === "folder" ? Ve : Ie,
2642
2642
  size: "sm",
2643
2643
  color: L.type === "folder" ? "warning" : "secondary"
2644
2644
  }
2645
2645
  ),
2646
- /* @__PURE__ */ e("span", { className: c(L.type === "folder" && "font-medium"), children: T })
2646
+ /* @__PURE__ */ e("span", { className: c(L.type === "folder" && "font-medium"), children: M })
2647
2647
  ] })
2648
2648
  },
2649
2649
  {
2650
2650
  id: "type",
2651
2651
  header: "Type",
2652
- accessor: (T) => T.type === "folder" ? "Folder" : T.mimeType
2652
+ accessor: (M) => M.type === "folder" ? "Folder" : M.mimeType
2653
2653
  },
2654
2654
  {
2655
2655
  id: "size",
2656
2656
  header: "Size",
2657
- accessor: (T) => T.type === "file" ? `${(T.size / 1024).toFixed(1)} KB` : "-"
2657
+ accessor: (M) => M.type === "file" ? `${(M.size / 1024).toFixed(1)} KB` : "-"
2658
2658
  },
2659
2659
  {
2660
2660
  id: "actions",
2661
2661
  header: "",
2662
2662
  accessor: "id",
2663
2663
  align: "right",
2664
- cell: (T, L) => /* @__PURE__ */ e(
2664
+ cell: (M, L) => /* @__PURE__ */ e(
2665
2665
  le,
2666
2666
  {
2667
2667
  variant: "outline",
2668
2668
  onClick: (Q) => {
2669
- Q.stopPropagation(), L.type === "folder" ? M(L.name) : X(L);
2669
+ Q.stopPropagation(), L.type === "folder" ? T(L.name) : X(L);
2670
2670
  },
2671
2671
  loading: V && L.type === "file" && Y?.id === L.id,
2672
2672
  children: L.type === "folder" ? "Open" : "Select"
@@ -2678,9 +2678,9 @@ const Lr = ({
2678
2678
  id: "name",
2679
2679
  header: "Mount Name",
2680
2680
  accessor: "name",
2681
- cell: (T) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2 font-medium", children: [
2682
- /* @__PURE__ */ e(Z, { icon: Re, size: "sm", color: "primary" }),
2683
- /* @__PURE__ */ e("span", { children: T })
2681
+ cell: (M) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2 font-medium", children: [
2682
+ /* @__PURE__ */ e(Z, { icon: He, size: "sm", color: "primary" }),
2683
+ /* @__PURE__ */ e("span", { children: M })
2684
2684
  ] })
2685
2685
  },
2686
2686
  {
@@ -2688,7 +2688,7 @@ const Lr = ({
2688
2688
  header: "",
2689
2689
  accessor: "id",
2690
2690
  align: "right",
2691
- cell: (T, L) => /* @__PURE__ */ e(le, { variant: "outline", onClick: () => $(L), children: "Open" })
2691
+ cell: (M, L) => /* @__PURE__ */ e(le, { variant: "outline", onClick: () => _(L), children: "Open" })
2692
2692
  }
2693
2693
  ];
2694
2694
  return /* @__PURE__ */ i("div", { className: "space-y-1", children: [
@@ -2704,12 +2704,12 @@ const Lr = ({
2704
2704
  l && "opacity-50 cursor-not-allowed bg-surface-sunk"
2705
2705
  ),
2706
2706
  children: [
2707
- /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Z, { icon: Y ? Ie : Re, color: Y ? "primary" : "secondary" }) }),
2707
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Z, { icon: Y ? Ie : He, color: Y ? "primary" : "secondary" }) }),
2708
2708
  /* @__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 }) }),
2709
2709
  Y && !l && /* @__PURE__ */ e(
2710
2710
  "button",
2711
2711
  {
2712
- onClick: I,
2712
+ onClick: P,
2713
2713
  className: "p-1 hover:bg-surface-hover rounded",
2714
2714
  children: /* @__PURE__ */ e(Z, { icon: we, size: "xs" })
2715
2715
  }
@@ -2719,16 +2719,16 @@ const Lr = ({
2719
2719
  ),
2720
2720
  a && /* @__PURE__ */ e(fe, { variant: "body", size: "xs", className: "text-danger-fg", children: a }),
2721
2721
  /* @__PURE__ */ e(
2722
- st,
2722
+ at,
2723
2723
  {
2724
2724
  open: b,
2725
2725
  onClose: () => {
2726
- v(!1), $(null), q("/"), k(!1);
2726
+ v(!1), _(null), q("/"), k(!1);
2727
2727
  },
2728
2728
  title: x ? `Explorer: ${x.name}` : "Select Storage Mount",
2729
2729
  size: "lg",
2730
2730
  children: /* @__PURE__ */ e(
2731
- Er,
2731
+ zr,
2732
2732
  {
2733
2733
  variant: "pills",
2734
2734
  items: [
@@ -2742,9 +2742,9 @@ const Lr = ({
2742
2742
  {
2743
2743
  variant: "ghost",
2744
2744
  onClick: () => {
2745
- S && S !== "/" ? C() : $(null);
2745
+ S && S !== "/" ? C() : _(null);
2746
2746
  },
2747
- leftIcon: /* @__PURE__ */ e(Z, { icon: St, size: "xs" }),
2747
+ leftIcon: /* @__PURE__ */ e(Z, { icon: Et, size: "xs" }),
2748
2748
  children: S ? "Back" : "Back to Mounts"
2749
2749
  }
2750
2750
  ),
@@ -2754,7 +2754,7 @@ const Lr = ({
2754
2754
  {
2755
2755
  placeholder: "Search...",
2756
2756
  value: H,
2757
- onChange: (T) => te(T.target.value),
2757
+ onChange: (M) => te(M.target.value),
2758
2758
  startIcon: /* @__PURE__ */ e(De, { size: 14 }),
2759
2759
  fullWidth: !0
2760
2760
  }
@@ -2765,7 +2765,7 @@ const Lr = ({
2765
2765
  {
2766
2766
  variant: "outline",
2767
2767
  onClick: () => k(!0),
2768
- leftIcon: /* @__PURE__ */ e(Z, { icon: Et, size: "xs" }),
2768
+ leftIcon: /* @__PURE__ */ e(Z, { icon: zt, size: "xs" }),
2769
2769
  children: "New Folder"
2770
2770
  }
2771
2771
  ),
@@ -2774,7 +2774,7 @@ const Lr = ({
2774
2774
  {
2775
2775
  variant: "primary",
2776
2776
  onClick: () => y.current?.click(),
2777
- leftIcon: /* @__PURE__ */ e(Z, { icon: zt, size: "xs" }),
2777
+ leftIcon: /* @__PURE__ */ e(Z, { icon: Tt, size: "xs" }),
2778
2778
  loading: V,
2779
2779
  children: "Upload"
2780
2780
  }
@@ -2792,13 +2792,13 @@ const Lr = ({
2792
2792
  ] })
2793
2793
  ] }),
2794
2794
  ie && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 p-3 bg-surface-sunk rounded-lg border border-border", children: [
2795
- /* @__PURE__ */ e(Z, { icon: He, size: "sm", color: "warning" }),
2795
+ /* @__PURE__ */ e(Z, { icon: Ve, size: "sm", color: "warning" }),
2796
2796
  /* @__PURE__ */ e(
2797
2797
  Ne,
2798
2798
  {
2799
2799
  placeholder: "Folder name",
2800
2800
  value: m,
2801
- onChange: (T) => z(T.target.value),
2801
+ onChange: (M) => z(M.target.value),
2802
2802
  autoFocus: !0
2803
2803
  }
2804
2804
  ),
@@ -2806,23 +2806,23 @@ const Lr = ({
2806
2806
  /* @__PURE__ */ e(le, { variant: "ghost", onClick: () => k(!1), children: "Cancel" })
2807
2807
  ] }),
2808
2808
  /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
2809
- Ue,
2809
+ Ke,
2810
2810
  {
2811
- data: A,
2812
- columns: j,
2811
+ data: D,
2812
+ columns: O,
2813
2813
  loading: V,
2814
2814
  emptyContent: "This folder is empty",
2815
- onRowClick: (T) => T.type === "folder" ? M(T.name) : X(T)
2815
+ onRowClick: (M) => M.type === "folder" ? T(M.name) : X(M)
2816
2816
  }
2817
2817
  ) })
2818
2818
  ] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
2819
- Ue,
2819
+ Ke,
2820
2820
  {
2821
2821
  data: w,
2822
2822
  columns: R,
2823
2823
  loading: V,
2824
2824
  emptyContent: "No storage mounts configured",
2825
- onRowClick: (T) => $(T)
2825
+ onRowClick: (M) => _(M)
2826
2826
  }
2827
2827
  ) }) })
2828
2828
  },
@@ -2844,7 +2844,7 @@ const Lr = ({
2844
2844
  {
2845
2845
  type: "file",
2846
2846
  className: "hidden",
2847
- onChange: K,
2847
+ onChange: W,
2848
2848
  accept: o,
2849
2849
  disabled: V
2850
2850
  }
@@ -2863,7 +2863,7 @@ const Lr = ({
2863
2863
  md: "px-3 py-2 text-base",
2864
2864
  lg: "px-3 py-2 text-md",
2865
2865
  full: "px-3 py-2 text-md"
2866
- }, Oe = be(
2866
+ }, Fe = be(
2867
2867
  ({
2868
2868
  label: t,
2869
2869
  helperText: r,
@@ -2885,7 +2885,7 @@ const Lr = ({
2885
2885
  {
2886
2886
  htmlFor: w,
2887
2887
  className: c(
2888
- et,
2888
+ tt,
2889
2889
  g ? "text-danger-fg" : "text-text-muted",
2890
2890
  f
2891
2891
  ),
@@ -2902,10 +2902,10 @@ const Lr = ({
2902
2902
  "aria-invalid": g || void 0,
2903
2903
  "aria-describedby": x,
2904
2904
  className: c(
2905
- tt,
2905
+ rt,
2906
2906
  "resize-y leading-relaxed",
2907
2907
  Ir[s],
2908
- rt(g),
2908
+ nt(g),
2909
2909
  d
2910
2910
  ),
2911
2911
  ...u
@@ -2930,8 +2930,8 @@ const Lr = ({
2930
2930
  ] });
2931
2931
  }
2932
2932
  );
2933
- Oe.displayName = "TextArea";
2934
- const Pr = /* @__PURE__ */ new Set([
2933
+ Fe.displayName = "TextArea";
2934
+ const Or = /* @__PURE__ */ new Set([
2935
2935
  "name",
2936
2936
  "given-name",
2937
2937
  "family-name",
@@ -2966,7 +2966,7 @@ const Pr = /* @__PURE__ */ new Set([
2966
2966
  "one-time-code"
2967
2967
  ]);
2968
2968
  function We(t) {
2969
- return t && Pr.has(t) ? { autoComplete: t } : {
2969
+ return t && Or.has(t) ? { autoComplete: t } : {
2970
2970
  autoComplete: "off",
2971
2971
  // 1Password
2972
2972
  "data-1p-ignore": "true",
@@ -2978,7 +2978,7 @@ function We(t) {
2978
2978
  "data-form-type": "other"
2979
2979
  };
2980
2980
  }
2981
- function Ke(t, r) {
2981
+ function Ge(t, r) {
2982
2982
  return r.split(".").reduce(
2983
2983
  (n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
2984
2984
  t
@@ -2993,7 +2993,7 @@ function jr(t, r, n) {
2993
2993
  }
2994
2994
  return l[s[s.length - 1]] = n, a;
2995
2995
  }
2996
- function Or(t, r) {
2996
+ function Fr(t, r) {
2997
2997
  const n = r.split("."), s = Array.isArray(t) ? [...t] : { ...t };
2998
2998
  let a = s;
2999
2999
  for (let l = 0; l < n.length - 1; l++) {
@@ -3003,7 +3003,7 @@ function Or(t, r) {
3003
3003
  }
3004
3004
  return delete a[n[n.length - 1]], s;
3005
3005
  }
3006
- function Fr({
3006
+ function Br({
3007
3007
  title: t,
3008
3008
  description: r,
3009
3009
  className: n,
@@ -3017,7 +3017,7 @@ function Fr({
3017
3017
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: s })
3018
3018
  ] });
3019
3019
  }
3020
- const Yn = ({
3020
+ const ts = ({
3021
3021
  groups: t,
3022
3022
  data: r,
3023
3023
  onSubmit: n,
@@ -3035,13 +3035,13 @@ const Yn = ({
3035
3035
  ref: w,
3036
3036
  sdk: g
3037
3037
  }) => {
3038
- const [x, $] = O(r || {}), [S, q] = O({}), [D, J] = O({});
3038
+ const [x, _] = j(r || {}), [S, q] = j({}), [A, J] = j({});
3039
3039
  G(() => {
3040
- r && $({ ...r });
3040
+ r && _({ ...r });
3041
3041
  }, [r]);
3042
3042
  const V = xe(
3043
3043
  (k, m, z) => {
3044
- const y = t.flatMap((_) => _.items).find((_) => _.name === k);
3044
+ const y = t.flatMap(($) => $.items).find(($) => $.name === k);
3045
3045
  if (!y) return null;
3046
3046
  if (y.required && (m == null || m === ""))
3047
3047
  return `${y.label} is required`;
@@ -3051,61 +3051,61 @@ const Yn = ({
3051
3051
  if (m && !Array.isArray(m))
3052
3052
  return `${y.label} must be an array.`;
3053
3053
  if (Array.isArray(m) && y.arrayFields) {
3054
- const _ = [];
3054
+ const $ = [];
3055
3055
  let N = !1;
3056
- if (m.forEach((K, re) => {
3056
+ if (m.forEach((W, re) => {
3057
3057
  const ee = {};
3058
3058
  for (const X of y.arrayFields) {
3059
- const I = K?.[X.name];
3060
- if (X.required && (I == null || I === ""))
3059
+ const P = W?.[X.name];
3060
+ if (X.required && (P == null || P === ""))
3061
3061
  ee[X.name] = `${X.label} is required`, N = !0;
3062
3062
  else if (X.validator) {
3063
- const B = X.validator(I, K);
3063
+ const B = X.validator(P, W);
3064
3064
  B && (ee[X.name] = B, N = !0);
3065
3065
  }
3066
3066
  }
3067
- _[re] = ee;
3067
+ $[re] = ee;
3068
3068
  }), N)
3069
- return JSON.stringify(_);
3069
+ return JSON.stringify($);
3070
3070
  }
3071
3071
  }
3072
3072
  return y.validator ? y.validator(m, z) : null;
3073
3073
  },
3074
3074
  [t]
3075
- ), P = xe(
3075
+ ), I = xe(
3076
3076
  (k, m) => {
3077
3077
  let z = jr(
3078
3078
  x,
3079
3079
  k,
3080
3080
  m
3081
3081
  );
3082
- t.flatMap((N) => N.items).find((N) => N.name === k)?.removeIfEmpty && (m == null || m === "") && (z = Or(z, k)), $(z), J((N) => ({ ...N, [k]: !0 }));
3083
- const _ = V(k, m, z);
3082
+ t.flatMap((N) => N.items).find((N) => N.name === k)?.removeIfEmpty && (m == null || m === "") && (z = Fr(z, k)), _(z), J((N) => ({ ...N, [k]: !0 }));
3083
+ const $ = V(k, m, z);
3084
3084
  q((N) => ({
3085
3085
  ...N,
3086
- [k]: _ || ""
3086
+ [k]: $ || ""
3087
3087
  })), a?.(z, k);
3088
3088
  },
3089
3089
  [x, t, V, a]
3090
3090
  ), H = xe(
3091
3091
  async (k) => {
3092
3092
  if (k.preventDefault(), b) return;
3093
- const m = {}, z = t.flatMap((_) => _.items);
3094
- for (const _ of z) {
3095
- if (_.hidden || _.conditional && !_.conditional(x))
3093
+ const m = {}, z = t.flatMap(($) => $.items);
3094
+ for (const $ of z) {
3095
+ if ($.hidden || $.conditional && !$.conditional(x))
3096
3096
  continue;
3097
3097
  const N = V(
3098
- _.name,
3099
- Ke(x, _.name),
3098
+ $.name,
3099
+ Ge(x, $.name),
3100
3100
  x
3101
3101
  );
3102
- N && (m[_.name] = N);
3102
+ N && (m[$.name] = N);
3103
3103
  }
3104
3104
  if (o) {
3105
- const _ = o(x);
3106
- _ && Object.assign(m, _);
3105
+ const $ = o(x);
3106
+ $ && Object.assign(m, $);
3107
3107
  }
3108
- if (q(m), Object.keys(m).some((_) => m[_]))
3108
+ if (q(m), Object.keys(m).some(($) => m[$]))
3109
3109
  return;
3110
3110
  const y = l ? l(x) : x;
3111
3111
  await n?.(x, y);
@@ -3113,7 +3113,7 @@ const Yn = ({
3113
3113
  [x, t, V, o, l, n, b]
3114
3114
  ), te = xe(
3115
3115
  (k) => {
3116
- const m = Ke(x, k.name), z = D[k.name] ? S[k.name] : void 0, y = k.disabled || b, _ = {
3116
+ const m = Ge(x, k.name), z = A[k.name] ? S[k.name] : void 0, y = k.disabled || b, $ = {
3117
3117
  value: m || "",
3118
3118
  disabled: y,
3119
3119
  required: k.required,
@@ -3130,8 +3130,8 @@ const Yn = ({
3130
3130
  return /* @__PURE__ */ e(
3131
3131
  Ne,
3132
3132
  {
3133
- ..._,
3134
- onChange: (N) => P(k.name, N.target.value),
3133
+ ...$,
3134
+ onChange: (N) => I(k.name, N.target.value),
3135
3135
  type: k.textType || k.type,
3136
3136
  ...We(k.autocomplete),
3137
3137
  error: z,
@@ -3140,10 +3140,10 @@ const Yn = ({
3140
3140
  );
3141
3141
  case "textarea":
3142
3142
  return /* @__PURE__ */ e(
3143
- Oe,
3143
+ Fe,
3144
3144
  {
3145
- ..._,
3146
- onChange: (N) => P(k.name, N.target.value),
3145
+ ...$,
3146
+ onChange: (N) => I(k.name, N.target.value),
3147
3147
  rows: k.rows ?? 4,
3148
3148
  error: z,
3149
3149
  size: u
@@ -3153,8 +3153,8 @@ const Yn = ({
3153
3153
  return /* @__PURE__ */ e(
3154
3154
  Me,
3155
3155
  {
3156
- ..._,
3157
- onChange: (N) => P(k.name, N),
3156
+ ...$,
3157
+ onChange: (N) => I(k.name, N),
3158
3158
  options: (k.options || []).map((N) => ({
3159
3159
  ...N,
3160
3160
  value: String(N.value)
@@ -3171,11 +3171,11 @@ const Yn = ({
3171
3171
  // open to learn what the choices even are.
3172
3172
  case "segmented":
3173
3173
  return /* @__PURE__ */ e(
3174
- tr,
3174
+ rr,
3175
3175
  {
3176
3176
  "aria-label": k.label,
3177
3177
  value: m == null ? "" : String(m),
3178
- onChange: (N) => P(k.name, N),
3178
+ onChange: (N) => I(k.name, N),
3179
3179
  options: (k.options || []).map((N) => ({
3180
3180
  value: String(N.value),
3181
3181
  label: N.label
@@ -3188,10 +3188,10 @@ const Yn = ({
3188
3188
  return /* @__PURE__ */ e(
3189
3189
  ye,
3190
3190
  {
3191
- ..._,
3191
+ ...$,
3192
3192
  label: k.label,
3193
3193
  checked: !!m,
3194
- onChange: (N) => P(k.name, N.target.checked),
3194
+ onChange: (N) => I(k.name, N.target.checked),
3195
3195
  size: u
3196
3196
  }
3197
3197
  );
@@ -3208,7 +3208,7 @@ const Yn = ({
3208
3208
  name: k.name,
3209
3209
  value: N.value,
3210
3210
  checked: m === N.value,
3211
- onChange: () => P(k.name, N.value),
3211
+ onChange: () => I(k.name, N.value),
3212
3212
  disabled: y || N.disabled,
3213
3213
  className: "size-checkbox shrink-0 rounded-xs border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
3214
3214
  }
@@ -3222,19 +3222,19 @@ const Yn = ({
3222
3222
  return /* @__PURE__ */ e(
3223
3223
  je,
3224
3224
  {
3225
- ..._,
3225
+ ...$,
3226
3226
  value: m ? new Date(m) : null,
3227
- onChange: (N) => P(k.name, N),
3227
+ onChange: (N) => I(k.name, N),
3228
3228
  size: u
3229
3229
  }
3230
3230
  );
3231
3231
  case "file":
3232
3232
  return /* @__PURE__ */ e(
3233
- Lr,
3233
+ Pr,
3234
3234
  {
3235
- ..._,
3235
+ ...$,
3236
3236
  value: m,
3237
- onChange: (N) => P(k.name, N),
3237
+ onChange: (N) => I(k.name, N),
3238
3238
  error: z,
3239
3239
  onListFiles: (N) => g?.http.invoke({
3240
3240
  method: "POST",
@@ -3263,10 +3263,10 @@ const Yn = ({
3263
3263
  );
3264
3264
  case "folder":
3265
3265
  return /* @__PURE__ */ e(
3266
- mr,
3266
+ fr,
3267
3267
  {
3268
3268
  value: m || {},
3269
- onChange: (N) => P(k.name, N),
3269
+ onChange: (N) => I(k.name, N),
3270
3270
  onListFolders: () => g?.http.invoke({
3271
3271
  method: "GET",
3272
3272
  action: "storage.mount"
@@ -3279,54 +3279,54 @@ const Yn = ({
3279
3279
  case "custom":
3280
3280
  return k.customComponent?.({
3281
3281
  value: m,
3282
- onChange: (N) => P(k.name, N),
3282
+ onChange: (N) => I(k.name, N),
3283
3283
  error: z,
3284
3284
  disabled: y
3285
3285
  });
3286
3286
  case "array": {
3287
3287
  const N = m || [];
3288
- let K = [];
3288
+ let W = [];
3289
3289
  if (typeof z == "string" && z.startsWith("["))
3290
3290
  try {
3291
- K = JSON.parse(z);
3291
+ W = JSON.parse(z);
3292
3292
  } catch {
3293
3293
  }
3294
3294
  const re = () => {
3295
- P(k.name, [...N, {}]);
3296
- }, ee = (I) => {
3297
- P(
3295
+ I(k.name, [...N, {}]);
3296
+ }, ee = (P) => {
3297
+ I(
3298
3298
  k.name,
3299
- N.filter((B, M) => M !== I)
3299
+ N.filter((B, T) => T !== P)
3300
3300
  );
3301
- }, X = (I, B, M) => {
3301
+ }, X = (P, B, T) => {
3302
3302
  const C = [...N];
3303
- C[I] = {
3304
- ...C[I],
3305
- [B]: M
3306
- }, P(k.name, C);
3303
+ C[P] = {
3304
+ ...C[P],
3305
+ [B]: T
3306
+ }, I(k.name, C);
3307
3307
  };
3308
3308
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
3309
- N.map((I, B) => /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
3310
- /* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: k.arrayFields?.map((M) => {
3311
- const C = K?.[B]?.[M.name];
3309
+ N.map((P, B) => /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
3310
+ /* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: k.arrayFields?.map((T) => {
3311
+ const C = W?.[B]?.[T.name];
3312
3312
  return /* @__PURE__ */ i(
3313
3313
  "div",
3314
3314
  {
3315
3315
  className: "flex flex-col gap-1",
3316
3316
  children: [
3317
3317
  B === 0 && /* @__PURE__ */ i("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
3318
- M.label,
3319
- M.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3318
+ T.label,
3319
+ T.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3320
3320
  ] }),
3321
3321
  (() => {
3322
- const A = {
3323
- value: I?.[M.name] || "",
3322
+ const D = {
3323
+ value: P?.[T.name] || "",
3324
3324
  disabled: y,
3325
- required: M.required,
3326
- placeholder: M.placeholder,
3327
- ...M.fieldProps
3325
+ required: T.required,
3326
+ placeholder: T.placeholder,
3327
+ ...T.fieldProps
3328
3328
  };
3329
- switch (M.type) {
3329
+ switch (T.type) {
3330
3330
  case "text":
3331
3331
  case "email":
3332
3332
  case "password":
@@ -3336,29 +3336,29 @@ const Yn = ({
3336
3336
  return /* @__PURE__ */ e(
3337
3337
  Ne,
3338
3338
  {
3339
- ...A,
3340
- onChange: (j) => X(
3339
+ ...D,
3340
+ onChange: (O) => X(
3341
3341
  B,
3342
- M.name,
3343
- j.target.value
3342
+ T.name,
3343
+ O.target.value
3344
3344
  ),
3345
- type: M.textType || M.type,
3346
- ...We(M.autocomplete),
3345
+ type: T.textType || T.type,
3346
+ ...We(T.autocomplete),
3347
3347
  error: C,
3348
3348
  size: u
3349
3349
  }
3350
3350
  );
3351
3351
  case "textarea":
3352
3352
  return /* @__PURE__ */ e(
3353
- Oe,
3353
+ Fe,
3354
3354
  {
3355
- ...A,
3356
- onChange: (j) => X(
3355
+ ...D,
3356
+ onChange: (O) => X(
3357
3357
  B,
3358
- M.name,
3359
- j.target.value
3358
+ T.name,
3359
+ O.target.value
3360
3360
  ),
3361
- rows: M.rows ?? 4,
3361
+ rows: T.rows ?? 4,
3362
3362
  error: C,
3363
3363
  size: u
3364
3364
  }
@@ -3367,21 +3367,21 @@ const Yn = ({
3367
3367
  return /* @__PURE__ */ e(
3368
3368
  Me,
3369
3369
  {
3370
- ...A,
3371
- onChange: (j) => X(
3370
+ ...D,
3371
+ onChange: (O) => X(
3372
3372
  B,
3373
- M.name,
3374
- j
3373
+ T.name,
3374
+ O
3375
3375
  ),
3376
- options: (M.options || []).map(
3377
- (j) => ({
3378
- ...j,
3379
- value: String(j.value)
3376
+ options: (T.options || []).map(
3377
+ (O) => ({
3378
+ ...O,
3379
+ value: String(O.value)
3380
3380
  })
3381
3381
  ),
3382
- searchable: M.searchable,
3383
- multiple: M.multiple,
3384
- allowCreate: M.allowCreate,
3382
+ searchable: T.searchable,
3383
+ multiple: T.multiple,
3384
+ allowCreate: T.allowCreate,
3385
3385
  error: C,
3386
3386
  size: u
3387
3387
  }
@@ -3390,18 +3390,18 @@ const Yn = ({
3390
3390
  return /* @__PURE__ */ e(
3391
3391
  ye,
3392
3392
  {
3393
- ...A,
3394
- checked: !!I?.[M.name],
3395
- onChange: (j) => X(
3393
+ ...D,
3394
+ checked: !!P?.[T.name],
3395
+ onChange: (O) => X(
3396
3396
  B,
3397
- M.name,
3398
- j.target.checked
3397
+ T.name,
3398
+ O.target.checked
3399
3399
  ),
3400
3400
  size: u
3401
3401
  }
3402
3402
  );
3403
3403
  case "radio":
3404
- return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: M.options?.map((j) => /* @__PURE__ */ i(
3404
+ return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: T.options?.map((O) => /* @__PURE__ */ i(
3405
3405
  "label",
3406
3406
  {
3407
3407
  className: "flex cursor-pointer items-center gap-2 text-base text-text",
@@ -3410,33 +3410,33 @@ const Yn = ({
3410
3410
  "input",
3411
3411
  {
3412
3412
  type: "radio",
3413
- name: `${k.name}.${B}.${M.name}`,
3414
- value: j.value,
3415
- checked: I?.[M.name] === j.value,
3413
+ name: `${k.name}.${B}.${T.name}`,
3414
+ value: O.value,
3415
+ checked: P?.[T.name] === O.value,
3416
3416
  onChange: () => X(
3417
3417
  B,
3418
- M.name,
3419
- j.value
3418
+ T.name,
3419
+ O.value
3420
3420
  ),
3421
- disabled: y || j.disabled,
3421
+ disabled: y || O.disabled,
3422
3422
  className: "size-checkbox shrink-0 rounded-xs border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
3423
3423
  }
3424
3424
  ),
3425
- j.label
3425
+ O.label
3426
3426
  ]
3427
3427
  },
3428
- j.value
3428
+ O.value
3429
3429
  )) });
3430
3430
  case "date": {
3431
- const j = I?.[M.name];
3431
+ const O = P?.[T.name];
3432
3432
  return /* @__PURE__ */ e(
3433
3433
  je,
3434
3434
  {
3435
- ...A,
3436
- value: j ? new Date(j) : null,
3435
+ ...D,
3436
+ value: O ? new Date(O) : null,
3437
3437
  onChange: (R) => X(
3438
3438
  B,
3439
- M.name,
3439
+ T.name,
3440
3440
  R
3441
3441
  ),
3442
3442
  size: u
@@ -3444,12 +3444,12 @@ const Yn = ({
3444
3444
  );
3445
3445
  }
3446
3446
  case "custom":
3447
- return M.customComponent?.({
3448
- value: I?.[M.name],
3449
- onChange: (j) => X(
3447
+ return T.customComponent?.({
3448
+ value: P?.[T.name],
3449
+ onChange: (O) => X(
3450
3450
  B,
3451
- M.name,
3452
- j
3451
+ T.name,
3452
+ O
3453
3453
  ),
3454
3454
  error: C,
3455
3455
  disabled: y
@@ -3459,14 +3459,14 @@ const Yn = ({
3459
3459
  return /* @__PURE__ */ i("p", { children: [
3460
3460
  "Unsupported field type in array:",
3461
3461
  " ",
3462
- M.type
3462
+ T.type
3463
3463
  ] });
3464
3464
  }
3465
3465
  })(),
3466
3466
  C && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: C })
3467
3467
  ]
3468
3468
  },
3469
- M.name
3469
+ T.name
3470
3470
  );
3471
3471
  }) }),
3472
3472
  /* @__PURE__ */ e(
@@ -3489,7 +3489,7 @@ const Yn = ({
3489
3489
  {
3490
3490
  type: "button",
3491
3491
  variant: "secondary",
3492
- leftIcon: /* @__PURE__ */ e(Tt, { className: "size-icon-sm" }),
3492
+ leftIcon: /* @__PURE__ */ e(_t, { className: "size-icon-sm" }),
3493
3493
  onClick: re,
3494
3494
  disabled: y,
3495
3495
  children: [
@@ -3504,7 +3504,7 @@ const Yn = ({
3504
3504
  return null;
3505
3505
  }
3506
3506
  },
3507
- [x, D, S, b, u, P]
3507
+ [x, A, S, b, u, I]
3508
3508
  ), Y = xe(
3509
3509
  (k) => {
3510
3510
  if (k.conditional && !k.conditional(x))
@@ -3526,13 +3526,13 @@ const Yn = ({
3526
3526
  // form *is* the page now, so a panel around each section would be a
3527
3527
  // second surface on top of the one it already sits on.
3528
3528
  /* @__PURE__ */ e(
3529
- Fr,
3529
+ Br,
3530
3530
  {
3531
3531
  title: k.title,
3532
3532
  description: k.description,
3533
3533
  className: "not-last:border-b not-last:border-border-subtle",
3534
3534
  children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: z, children: m.map((y) => {
3535
- const _ = D[y.name] ? S[y.name] : void 0;
3535
+ const $ = A[y.name] ? S[y.name] : void 0;
3536
3536
  return /* @__PURE__ */ i(
3537
3537
  "div",
3538
3538
  {
@@ -3550,7 +3550,7 @@ const Yn = ({
3550
3550
  y.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3551
3551
  ] }),
3552
3552
  te(y),
3553
- y.help && !_ && /* @__PURE__ */ e("p", { className: "text-xs leading-4 text-text-subtle", children: y.help })
3553
+ y.help && !$ && /* @__PURE__ */ e("p", { className: "text-xs leading-4 text-text-subtle", children: y.help })
3554
3554
  ]
3555
3555
  },
3556
3556
  y.name
@@ -3561,8 +3561,8 @@ const Yn = ({
3561
3561
  )
3562
3562
  );
3563
3563
  },
3564
- [x, D, S, te]
3565
- ), W = c(
3564
+ [x, A, S, te]
3565
+ ), K = c(
3566
3566
  {
3567
3567
  "max-w-settings": u === "sm",
3568
3568
  "max-w-form": u === "md",
@@ -3571,7 +3571,7 @@ const Yn = ({
3571
3571
  },
3572
3572
  v
3573
3573
  ), ie = u === "full" ? "md" : u;
3574
- return /* @__PURE__ */ i("form", { ref: w, onSubmit: H, className: W, children: [
3574
+ return /* @__PURE__ */ i("form", { ref: w, onSubmit: H, className: K, children: [
3575
3575
  !p && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
3576
3576
  /* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(Y) }),
3577
3577
  p && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ i(ke, { children: [
@@ -3603,7 +3603,7 @@ const Yn = ({
3603
3603
  ] }) })
3604
3604
  ] });
3605
3605
  };
3606
- function Xn({
3606
+ function rs({
3607
3607
  open: t,
3608
3608
  title: r,
3609
3609
  description: n,
@@ -3615,7 +3615,7 @@ function Xn({
3615
3615
  onCancel: d
3616
3616
  }) {
3617
3617
  return /* @__PURE__ */ e(
3618
- st,
3618
+ at,
3619
3619
  {
3620
3620
  open: t,
3621
3621
  onClose: d,
@@ -3637,7 +3637,7 @@ function Xn({
3637
3637
  }
3638
3638
  );
3639
3639
  }
3640
- const Br = {
3640
+ const Rr = {
3641
3641
  default: "bg-surface-hover text-text",
3642
3642
  primary: "bg-accent-soft text-accent",
3643
3643
  secondary: "bg-surface-hover text-text-muted",
@@ -3647,11 +3647,11 @@ const Br = {
3647
3647
  info: "bg-info-soft text-info-fg",
3648
3648
  // Internal-note amber. Never for customer-visible content.
3649
3649
  note: "bg-note-soft text-note"
3650
- }, Rr = {
3650
+ }, Hr = {
3651
3651
  sm: "px-2 py-0.5 text-xs",
3652
3652
  md: "px-2.5 py-1 text-sm",
3653
3653
  lg: "px-3 py-1.5 text-base"
3654
- }, Hr = {
3654
+ }, Vr = {
3655
3655
  default: "bg-surface-hover",
3656
3656
  primary: "bg-accent",
3657
3657
  secondary: "bg-surface-hover",
@@ -3661,7 +3661,7 @@ const Br = {
3661
3661
  info: "bg-info",
3662
3662
  note: "bg-note"
3663
3663
  };
3664
- function Vr({
3664
+ function qr({
3665
3665
  variant: t = "default",
3666
3666
  size: r = "md",
3667
3667
  dot: n = !1,
@@ -3679,9 +3679,9 @@ function Vr({
3679
3679
  // Base styles
3680
3680
  "inline-flex items-center font-medium rounded-full",
3681
3681
  // Variant styles
3682
- Br[t],
3682
+ Rr[t],
3683
3683
  // Size styles
3684
- Rr[r],
3684
+ Hr[r],
3685
3685
  o
3686
3686
  ),
3687
3687
  ...d,
@@ -3691,7 +3691,7 @@ function Vr({
3691
3691
  {
3692
3692
  className: c(
3693
3693
  "w-2 h-2 rounded-full mr-1.5",
3694
- Hr[t]
3694
+ Vr[t]
3695
3695
  )
3696
3696
  }
3697
3697
  ),
@@ -3711,7 +3711,7 @@ function Vr({
3711
3711
  );
3712
3712
  }
3713
3713
  const me = ({ className: t }) => /* @__PURE__ */ e("span", { className: c("block rounded-xs bg-surface-hover", t) });
3714
- function qr({ shape: t, rows: r, columns: n }) {
3714
+ function Ur({ shape: t, rows: r, columns: n }) {
3715
3715
  switch (t) {
3716
3716
  case "table":
3717
3717
  return /* @__PURE__ */ i("div", { className: "overflow-hidden rounded-lg ring-1 ring-border", children: [
@@ -3775,7 +3775,7 @@ function qr({ shape: t, rows: r, columns: n }) {
3775
3775
  ] });
3776
3776
  }
3777
3777
  }
3778
- const Ur = {
3778
+ const Kr = {
3779
3779
  text: 2,
3780
3780
  table: 8,
3781
3781
  list: 6,
@@ -3783,7 +3783,7 @@ const Ur = {
3783
3783
  menu: 4,
3784
3784
  cards: 2
3785
3785
  };
3786
- function Fe({
3786
+ function Be({
3787
3787
  variant: t = "page",
3788
3788
  shape: r,
3789
3789
  rows: n,
@@ -3794,14 +3794,14 @@ function Fe({
3794
3794
  tableColumns: f,
3795
3795
  tableRows: d
3796
3796
  }) {
3797
- const p = r ?? (o ? "table" : "text"), h = n ?? d ?? Ur[p], u = s ?? f ?? (p === "cards" ? 3 : 6), b = /* @__PURE__ */ e("div", { className: c("w-full animate-pulse", l), "aria-hidden": !0, children: a ?? /* @__PURE__ */ e(qr, { shape: p, rows: h, columns: u }) });
3797
+ const p = r ?? (o ? "table" : "text"), h = n ?? d ?? Kr[p], u = s ?? f ?? (p === "cards" ? 3 : 6), b = /* @__PURE__ */ e("div", { className: c("w-full animate-pulse", l), "aria-hidden": !0, children: a ?? /* @__PURE__ */ e(Ur, { shape: p, rows: h, columns: u }) });
3798
3798
  return t === "inline" ? b : /* @__PURE__ */ e("main", { className: "flex-1 bg-surface p-6", children: b });
3799
3799
  }
3800
3800
  const Wr = {
3801
3801
  neutral: "bg-surface-hover text-text-muted",
3802
3802
  success: "bg-success-soft text-success-fg"
3803
3803
  };
3804
- function Zn({
3804
+ function ns({
3805
3805
  icon: t,
3806
3806
  tone: r = "neutral",
3807
3807
  title: n,
@@ -3829,7 +3829,7 @@ function Zn({
3829
3829
  }
3830
3830
  );
3831
3831
  }
3832
- function Qn({ children: t, className: r, ...n }) {
3832
+ function ss({ children: t, className: r, ...n }) {
3833
3833
  return /* @__PURE__ */ e(
3834
3834
  "kbd",
3835
3835
  {
@@ -3842,14 +3842,14 @@ function Qn({ children: t, className: r, ...n }) {
3842
3842
  }
3843
3843
  );
3844
3844
  }
3845
- const Kr = {
3845
+ const Gr = {
3846
3846
  sm: "h-1",
3847
3847
  md: "h-1.5"
3848
- }, Gr = {
3848
+ }, Jr = {
3849
3849
  accent: "bg-accent",
3850
3850
  success: "bg-success"
3851
3851
  };
3852
- function es({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
3852
+ function as({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
3853
3853
  const l = Math.max(0, Math.min(100, t));
3854
3854
  return /* @__PURE__ */ e(
3855
3855
  "div",
@@ -3858,37 +3858,37 @@ function es({ value: t, variant: r = "accent", size: n = "md", className: s, ...
3858
3858
  "aria-valuenow": Math.round(l),
3859
3859
  "aria-valuemin": 0,
3860
3860
  "aria-valuemax": 100,
3861
- className: c("w-full overflow-hidden rounded-full bg-surface-hover", Kr[n], s),
3861
+ className: c("w-full overflow-hidden rounded-full bg-surface-hover", Gr[n], s),
3862
3862
  ...a,
3863
3863
  children: /* @__PURE__ */ e(
3864
3864
  "div",
3865
3865
  {
3866
- className: c("h-full rounded-full transition-[width] duration-300 ease-out", Gr[r]),
3866
+ className: c("h-full rounded-full transition-[width] duration-300 ease-out", Jr[r]),
3867
3867
  style: { width: `${l}%` }
3868
3868
  }
3869
3869
  )
3870
3870
  }
3871
3871
  );
3872
3872
  }
3873
- const Jr = {
3873
+ const Yr = {
3874
3874
  xs: "h-3 w-3",
3875
3875
  sm: "h-4 w-4",
3876
3876
  md: "h-6 w-6",
3877
3877
  lg: "h-8 w-8",
3878
3878
  xl: "h-12 w-12"
3879
- }, Yr = {
3879
+ }, Xr = {
3880
3880
  primary: "text-accent",
3881
3881
  secondary: "text-text-muted",
3882
3882
  white: "text-white",
3883
3883
  current: "text-current"
3884
- }, Xr = {
3884
+ }, Zr = {
3885
3885
  xs: "text-xs",
3886
3886
  sm: "text-sm",
3887
3887
  md: "text-sm",
3888
3888
  lg: "text-base",
3889
3889
  xl: "text-lg"
3890
3890
  };
3891
- function ts({
3891
+ function ls({
3892
3892
  size: t = "md",
3893
3893
  variant: r = "primary",
3894
3894
  label: n = "Loading...",
@@ -3911,8 +3911,8 @@ function ts({
3911
3911
  {
3912
3912
  className: c(
3913
3913
  "animate-spin",
3914
- Jr[t],
3915
- Yr[r]
3914
+ Yr[t],
3915
+ Xr[r]
3916
3916
  ),
3917
3917
  fill: "none",
3918
3918
  viewBox: "0 0 24 24",
@@ -3946,7 +3946,7 @@ function ts({
3946
3946
  {
3947
3947
  className: c(
3948
3948
  "text-text-muted",
3949
- Xr[t]
3949
+ Zr[t]
3950
3950
  ),
3951
3951
  children: n
3952
3952
  }
@@ -3956,7 +3956,7 @@ function ts({
3956
3956
  }
3957
3957
  );
3958
3958
  }
3959
- const Zr = {
3959
+ const Qr = {
3960
3960
  neutral: "bg-text-disabled",
3961
3961
  accent: "bg-accent",
3962
3962
  success: "bg-success",
@@ -3970,7 +3970,7 @@ const Zr = {
3970
3970
  "cat-4": "bg-cat-4",
3971
3971
  "cat-5": "bg-cat-5"
3972
3972
  };
3973
- function rs({
3973
+ function os({
3974
3974
  tone: t = "neutral",
3975
3975
  shape: r = "round",
3976
3976
  pulse: n = !1,
@@ -3986,14 +3986,14 @@ function rs({
3986
3986
  className: c(
3987
3987
  "inline-block size-dot shrink-0",
3988
3988
  r === "round" ? "rounded-full" : "rounded-sm",
3989
- Zr[t],
3989
+ Qr[t],
3990
3990
  n && "animate-pulse",
3991
3991
  a
3992
3992
  )
3993
3993
  }
3994
3994
  );
3995
3995
  }
3996
- function ns({
3996
+ function cs({
3997
3997
  steps: t,
3998
3998
  current: r,
3999
3999
  variant: n = "numbered",
@@ -4029,7 +4029,163 @@ function ns({
4029
4029
  d < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
4030
4030
  ] }, f)) });
4031
4031
  }
4032
- function ss({ title: t, icon: r = /* @__PURE__ */ e($t, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
4032
+ const en = /<[a-z][\s\S]*>/i, tn = [
4033
+ "[&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_p]:leading-relaxed",
4034
+ "[&_a]:text-accent [&_a]:underline [&_a]:underline-offset-2",
4035
+ "[&_strong]:font-semibold [&_em]:italic",
4036
+ "[&_ul]:my-1.5 [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:my-1.5 [&_ol]:list-decimal [&_ol]:pl-5",
4037
+ "[&_li]:leading-relaxed",
4038
+ "[&_h1]:mb-1 [&_h1]:mt-2 [&_h1]:font-semibold [&_h2]:mb-1 [&_h2]:mt-2 [&_h2]:font-semibold [&_h3]:mb-1 [&_h3]:mt-2 [&_h3]:font-semibold",
4039
+ "[&_blockquote]:my-1.5 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-text-muted",
4040
+ "[&_hr]:my-2 [&_hr]:border-border",
4041
+ "[&_pre]:my-1.5 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-surface-sunk [&_pre]:p-2 [&_pre]:text-xs",
4042
+ "[&_code]:rounded-sm [&_code]:bg-surface-sunk [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-xs",
4043
+ "[&_pre_code]:bg-transparent [&_pre_code]:p-0",
4044
+ "[&_table]:my-1.5 [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs",
4045
+ "[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-semibold",
4046
+ "[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1"
4047
+ ].join(" "), rn = {
4048
+ p: (t) => /* @__PURE__ */ e("p", { className: "my-1.5 leading-relaxed first:mt-0 last:mb-0", ...t }),
4049
+ a: (t) => /* @__PURE__ */ e("a", { className: "text-accent underline underline-offset-2 hover:opacity-80", target: "_blank", rel: "noopener noreferrer", ...t }),
4050
+ strong: (t) => /* @__PURE__ */ e("strong", { className: "font-semibold", ...t }),
4051
+ em: (t) => /* @__PURE__ */ e("em", { className: "italic", ...t }),
4052
+ ul: (t) => /* @__PURE__ */ e("ul", { className: "my-1.5 list-disc space-y-0.5 pl-5", ...t }),
4053
+ ol: (t) => /* @__PURE__ */ e("ol", { className: "my-1.5 list-decimal space-y-0.5 pl-5", ...t }),
4054
+ li: (t) => /* @__PURE__ */ e("li", { className: "leading-relaxed", ...t }),
4055
+ h1: (t) => /* @__PURE__ */ e("h1", { className: "mb-1 mt-2 text-md font-semibold first:mt-0", ...t }),
4056
+ h2: (t) => /* @__PURE__ */ e("h2", { className: "mb-1 mt-2 text-base font-semibold first:mt-0", ...t }),
4057
+ h3: (t) => /* @__PURE__ */ e("h3", { className: "mb-1 mt-2 text-base font-semibold first:mt-0", ...t }),
4058
+ blockquote: (t) => /* @__PURE__ */ e("blockquote", { className: "my-1.5 border-l-2 border-border pl-3 text-text-muted", ...t }),
4059
+ hr: (t) => /* @__PURE__ */ e("hr", { className: "my-2 border-border", ...t }),
4060
+ pre: (t) => /* @__PURE__ */ e("pre", { className: "my-1.5 overflow-x-auto rounded-md bg-surface-sunk p-2 text-xs", ...t }),
4061
+ code: ({ className: t, children: r, ...n }) => {
4062
+ const s = String(r ?? "");
4063
+ return /language-/.test(t ?? "") || s.includes(`
4064
+ `) ? /* @__PURE__ */ e("code", { className: "font-mono text-xs", ...n, children: r }) : /* @__PURE__ */ e("code", { className: "rounded-sm bg-surface-sunk px-1 py-0.5 font-mono text-xs", ...n, children: r });
4065
+ },
4066
+ table: (t) => /* @__PURE__ */ e("div", { className: "my-1.5 overflow-x-auto", children: /* @__PURE__ */ e("table", { className: "w-full border-collapse text-xs", ...t }) }),
4067
+ th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
4068
+ td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
4069
+ };
4070
+ function Ee({ text: t, className: r, as: n }) {
4071
+ const s = t ?? "";
4072
+ return (n ? n === "html" : en.test(s)) ? /* @__PURE__ */ e(
4073
+ "div",
4074
+ {
4075
+ className: c("break-words", tn, r),
4076
+ dangerouslySetInnerHTML: { __html: Pt.sanitize(s, { ADD_ATTR: ["target", "rel"] }) }
4077
+ }
4078
+ ) : /* @__PURE__ */ e("div", { className: c("break-words", r), children: /* @__PURE__ */ e(It, { remarkPlugins: [Ot], components: rn, children: s }) });
4079
+ }
4080
+ const nn = {
4081
+ info: "text-info-fg",
4082
+ success: "text-success-fg",
4083
+ warning: "text-warning-fg",
4084
+ destructive: "text-danger-fg"
4085
+ }, sn = {
4086
+ info: "bg-info-soft border-info-border",
4087
+ success: "bg-success-soft border-success-border",
4088
+ warning: "bg-warning-soft border-warning-border",
4089
+ destructive: "bg-danger-soft border-danger-border"
4090
+ }, an = {
4091
+ 1: "grid-cols-1",
4092
+ 2: "grid-cols-2",
4093
+ 3: "grid-cols-3",
4094
+ 4: "grid-cols-4"
4095
+ };
4096
+ function ln({ block: t }) {
4097
+ switch (t.type) {
4098
+ case "heading":
4099
+ return t.level === 1 ? /* @__PURE__ */ e("h1", { className: "text-2xl font-semibold tracking-tight text-text", children: t.text }) : t.level === 2 ? /* @__PURE__ */ e("h2", { className: "pt-2 text-base font-semibold tracking-tight text-text", children: t.text }) : /* @__PURE__ */ e("h3", { className: "pt-1 text-sm font-semibold text-text", children: t.text });
4100
+ case "paragraph":
4101
+ return /* @__PURE__ */ e(Ee, { as: "markdown", text: t.text, className: "text-sm text-text" });
4102
+ case "quote":
4103
+ return /* @__PURE__ */ e("blockquote", { className: "border-l-2 border-border pl-3.5", children: /* @__PURE__ */ e(Ee, { as: "markdown", text: t.text, className: "text-sm text-text-muted" }) });
4104
+ case "code":
4105
+ return /* @__PURE__ */ e("pre", { className: "overflow-x-auto rounded-lg bg-surface-sunk p-3 text-xs", children: /* @__PURE__ */ e("code", { className: "font-mono", children: t.text }) });
4106
+ case "divider":
4107
+ return /* @__PURE__ */ e("hr", { className: "border-border-subtle" });
4108
+ case "list": {
4109
+ const r = t.style === "numbered" ? "ol" : "ul";
4110
+ return /* @__PURE__ */ e(
4111
+ r,
4112
+ {
4113
+ className: c(
4114
+ "flex flex-col gap-2 pl-5 text-sm text-text",
4115
+ t.style === "numbered" ? "list-decimal" : "list-disc"
4116
+ ),
4117
+ children: t.items.map((n, s) => /* @__PURE__ */ i("li", { className: "leading-relaxed marker:text-text-subtle", children: [
4118
+ n.lead && /* @__PURE__ */ i("strong", { className: "font-semibold", children: [
4119
+ n.lead,
4120
+ " "
4121
+ ] }),
4122
+ /* @__PURE__ */ e(Ee, { as: "markdown", text: n.text, className: "inline" })
4123
+ ] }, s))
4124
+ }
4125
+ );
4126
+ }
4127
+ case "table":
4128
+ return /* @__PURE__ */ i("figure", { className: "m-0", children: [
4129
+ /* @__PURE__ */ e("div", { className: "overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ i("table", { className: "w-full border-collapse text-sm", children: [
4130
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "bg-surface-sunk", children: t.columns.map((r, n) => /* @__PURE__ */ e(
4131
+ "th",
4132
+ {
4133
+ className: c(
4134
+ "px-4 py-2.5 text-xs font-semibold text-text-muted",
4135
+ r.align === "right" ? "text-right" : "text-left"
4136
+ ),
4137
+ children: r.label
4138
+ },
4139
+ n
4140
+ )) }) }),
4141
+ /* @__PURE__ */ e("tbody", { children: t.rows.map((r, n) => /* @__PURE__ */ e("tr", { className: "border-t border-border-subtle", children: r.map((s, a) => /* @__PURE__ */ e(
4142
+ "td",
4143
+ {
4144
+ className: c(
4145
+ "px-4 py-2.5 tabular-nums text-text",
4146
+ t.columns[a]?.align === "right" ? "text-right" : "text-left"
4147
+ ),
4148
+ children: s
4149
+ },
4150
+ a
4151
+ )) }, n)) })
4152
+ ] }) }),
4153
+ t.caption && /* @__PURE__ */ e("figcaption", { className: "pt-2 text-xs italic text-text-subtle", children: t.caption })
4154
+ ] });
4155
+ case "kpi":
4156
+ return /* @__PURE__ */ e("div", { className: c("grid gap-3", an[t.items.length] ?? "grid-cols-4"), children: t.items.map((r, n) => /* @__PURE__ */ i("div", { className: "rounded-lg bg-surface-sunk px-4 py-3.5", children: [
4157
+ /* @__PURE__ */ e(
4158
+ "div",
4159
+ {
4160
+ className: c(
4161
+ "text-2xl font-semibold tracking-tight",
4162
+ r.tone ? nn[r.tone] : "text-text"
4163
+ ),
4164
+ children: r.value
4165
+ }
4166
+ ),
4167
+ /* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r.label })
4168
+ ] }, n)) });
4169
+ case "callout":
4170
+ return /* @__PURE__ */ i("div", { className: c("rounded-lg border px-4 py-3", sn[t.tone]), children: [
4171
+ t.title && /* @__PURE__ */ e("div", { className: "pb-0.5 text-sm font-semibold text-text", children: t.title }),
4172
+ /* @__PURE__ */ e(Ee, { as: "markdown", text: t.text, className: "text-sm text-text" })
4173
+ ] });
4174
+ default:
4175
+ return null;
4176
+ }
4177
+ }
4178
+ function is({ blocks: t, runtime: r = "inert", className: n }) {
4179
+ return r !== "inert" ? /* @__PURE__ */ i("div", { className: c("rounded-lg border border-warning-border bg-warning-soft px-4 py-3", n), children: [
4180
+ /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-text", children: "Deze versie kan hier niet getoond worden" }),
4181
+ /* @__PURE__ */ i("div", { className: "pt-0.5 text-xs text-text-muted", children: [
4182
+ "Hij is opgeslagen als ",
4183
+ /* @__PURE__ */ e("code", { className: "font-mono", children: r }),
4184
+ ", en deze weergave tekent alleen inerte inhoud."
4185
+ ] })
4186
+ ] }) : /* @__PURE__ */ e("article", { className: c("flex flex-col gap-4", n), children: t.map((s, a) => /* @__PURE__ */ e(ln, { block: s }, s.block_id ?? a)) });
4187
+ }
4188
+ function ds({ title: t, icon: r = /* @__PURE__ */ e($t, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
4033
4189
  return /* @__PURE__ */ i(
4034
4190
  "div",
4035
4191
  {
@@ -4050,23 +4206,23 @@ function ss({ title: t, icon: r = /* @__PURE__ */ e($t, { className: "size-icon-
4050
4206
  }
4051
4207
  );
4052
4208
  }
4053
- const Qr = {
4209
+ const on = {
4054
4210
  default: "bg-avatar text-avatar-fg",
4055
4211
  in: "bg-avatar-in text-avatar-in-fg",
4056
4212
  out: "bg-accent text-accent-fg",
4057
4213
  note: "bg-avatar-note text-avatar-note-fg"
4058
- }, en = {
4214
+ }, cn = {
4059
4215
  xs: "w-5 h-5 text-xs",
4060
4216
  sm: "w-6 h-6 text-xs",
4061
4217
  md: "w-7 h-7 text-base",
4062
4218
  lg: "w-9 h-9 text-sm"
4063
4219
  };
4064
- function tn(t) {
4220
+ function dn(t) {
4065
4221
  if (!t) return "?";
4066
4222
  const r = t.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean);
4067
4223
  return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
4068
4224
  }
4069
- const rn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a, title: l }) => {
4225
+ const un = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a, title: l }) => {
4070
4226
  const [o, f] = ce.useState(!1), d = c(
4071
4227
  // Its own token and not `surface-hover`: at 0.972 the plate was within a few
4072
4228
  // percent of every surface it sits on, so the monogram floated instead of
@@ -4074,8 +4230,8 @@ const rn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4074
4230
  "inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none",
4075
4231
  // `identity` is seeded on the name, so the same person keeps their colour
4076
4232
  // wherever they appear; the fixed tones stay as they were.
4077
- n === "identity" ? Xe(t) : Qr[n],
4078
- en[s],
4233
+ n === "identity" ? Ze(t) : on[n],
4234
+ cn[s],
4079
4235
  a
4080
4236
  );
4081
4237
  return r && !o ? /* @__PURE__ */ e(
@@ -4087,13 +4243,13 @@ const rn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4087
4243
  className: c(d, "object-cover"),
4088
4244
  onError: () => f(!0)
4089
4245
  }
4090
- ) : /* @__PURE__ */ e("span", { className: d, title: l ?? t, "aria-label": t, children: tn(t) });
4091
- }, Ge = "ring-surface", nn = "ring-surface-accent", as = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
4246
+ ) : /* @__PURE__ */ e("span", { className: d, title: l ?? t, "aria-label": t, children: dn(t) });
4247
+ }, Je = "ring-surface", mn = "ring-surface-accent", us = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
4092
4248
  if (t.length === 0) return null;
4093
4249
  const a = t.slice(0, r), l = t.length - a.length;
4094
4250
  return /* @__PURE__ */ i("span", { className: c("inline-flex items-center", s), children: [
4095
4251
  a.map((o, f) => /* @__PURE__ */ e(
4096
- rn,
4252
+ un,
4097
4253
  {
4098
4254
  name: o.name,
4099
4255
  src: o.src,
@@ -4101,7 +4257,7 @@ const rn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4101
4257
  title: o.name ? o.seen === !1 ? `${o.name} — nog niet gelezen` : o.name : void 0,
4102
4258
  className: c(
4103
4259
  f > 0 && "-ml-2",
4104
- o.owner ? nn : Ge,
4260
+ o.owner ? mn : Je,
4105
4261
  o.seen === !1 && "opacity-40"
4106
4262
  )
4107
4263
  },
@@ -4115,7 +4271,7 @@ const rn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4115
4271
  // in the row rather than a gap at the end of it.
4116
4272
  "inline-flex items-center justify-center rounded-full shrink-0 -ml-2 font-semibold bg-avatar text-avatar-fg",
4117
4273
  n === "xs" ? "w-5 h-5 text-xs" : n === "md" ? "w-7 h-7 text-xs" : n === "lg" ? "w-9 h-9 text-xs" : "w-6 h-6 text-xs",
4118
- Ge
4274
+ Je
4119
4275
  ),
4120
4276
  children: [
4121
4277
  "+",
@@ -4124,37 +4280,37 @@ const rn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4124
4280
  }
4125
4281
  )
4126
4282
  ] });
4127
- }, Ee = {
4283
+ }, ze = {
4128
4284
  mail: { fg: "text-channel-mail-fg", bg: "bg-channel-mail-soft" },
4129
4285
  wa: { fg: "text-channel-whatsapp-fg", bg: "bg-channel-whatsapp-soft" },
4130
4286
  chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
4131
4287
  tel: { fg: "text-channel-phone-fg", bg: "bg-channel-phone-soft" },
4132
4288
  note: { fg: "text-channel-note-fg", bg: "bg-channel-note-soft" }
4133
- }, sn = {
4289
+ }, fn = {
4134
4290
  sm: "size-avatar-xs rounded-sm text-xs",
4135
4291
  md: "size-avatar-sm rounded-md text-xs",
4136
4292
  lg: "size-avatar-lg rounded-md text-base"
4137
4293
  };
4138
- function ls({ channel: t, children: r, size: n = "md", className: s, title: a }) {
4139
- const l = t in Ee ? Ee[t] : void 0;
4294
+ function ms({ channel: t, children: r, size: n = "md", className: s, title: a }) {
4295
+ const l = t in ze ? ze[t] : void 0;
4140
4296
  return /* @__PURE__ */ e(
4141
4297
  "span",
4142
4298
  {
4143
4299
  title: a,
4144
4300
  className: c(
4145
4301
  "inline-flex shrink-0 items-center justify-center font-bold",
4146
- sn[n],
4302
+ fn[n],
4147
4303
  // An undeclared channel used to collapse onto the neutral "note" tone,
4148
4304
  // which is also what a real internal note looks like. Deriving from the
4149
4305
  // key keeps it distinguishable and keeps `note` meaning `note`.
4150
- l ? c(l.fg, l.bg) : t ? Xe(t) : c(Ee.note.fg, Ee.note.bg),
4306
+ l ? c(l.fg, l.bg) : t ? Ze(t) : c(ze.note.fg, ze.note.bg),
4151
4307
  s
4152
4308
  ),
4153
4309
  children: r
4154
4310
  }
4155
4311
  );
4156
4312
  }
4157
- const os = ({
4313
+ const fs = ({
4158
4314
  src: t,
4159
4315
  alt: r,
4160
4316
  size: n = "md",
@@ -4170,14 +4326,14 @@ const os = ({
4170
4326
  onError: b,
4171
4327
  ...v
4172
4328
  }) => {
4173
- const [w, g] = O(!0), [x, $] = O(!1), [S, q] = O(t), D = (W) => {
4174
- g(!1), $(!1), u?.(W);
4175
- }, J = (W) => {
4176
- if (g(!1), $(!0), f && S !== f) {
4177
- q(f), $(!1), g(!0);
4329
+ const [w, g] = j(!0), [x, _] = j(!1), [S, q] = j(t), A = (K) => {
4330
+ g(!1), _(!1), u?.(K);
4331
+ }, J = (K) => {
4332
+ if (g(!1), _(!0), f && S !== f) {
4333
+ q(f), _(!1), g(!0);
4178
4334
  return;
4179
4335
  }
4180
- b?.(W);
4336
+ b?.(K);
4181
4337
  }, V = c(
4182
4338
  "relative overflow-hidden bg-surface-hover",
4183
4339
  // Size variants
@@ -4206,7 +4362,7 @@ const os = ({
4206
4362
  "rounded-full": a === "full"
4207
4363
  },
4208
4364
  h
4209
- ), P = c(
4365
+ ), I = c(
4210
4366
  "w-full h-full object-cover transition-opacity duration-fast",
4211
4367
  {
4212
4368
  "opacity-0": w || x,
@@ -4216,7 +4372,7 @@ const os = ({
4216
4372
  "absolute inset-0 flex items-center justify-center",
4217
4373
  "text-text-muted"
4218
4374
  ), te = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), Y = /* @__PURE__ */ i("div", { className: "text-center", children: [
4219
- /* @__PURE__ */ e(Z, { icon: _t, size: "lg", className: "mx-auto mb-1" }),
4375
+ /* @__PURE__ */ e(Z, { icon: At, size: "lg", className: "mx-auto mb-1" }),
4220
4376
  /* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
4221
4377
  ] });
4222
4378
  return /* @__PURE__ */ i("div", { className: V, children: [
@@ -4226,8 +4382,8 @@ const os = ({
4226
4382
  ...v,
4227
4383
  src: S,
4228
4384
  alt: r,
4229
- className: P,
4230
- onLoad: D,
4385
+ className: I,
4386
+ onLoad: A,
4231
4387
  onError: J
4232
4388
  }
4233
4389
  ),
@@ -4235,7 +4391,7 @@ const os = ({
4235
4391
  x && o && /* @__PURE__ */ e("div", { className: H, children: p || Y })
4236
4392
  ] });
4237
4393
  };
4238
- function cs({
4394
+ function hs({
4239
4395
  icon: t,
4240
4396
  onClick: r,
4241
4397
  children: n
@@ -4258,7 +4414,7 @@ function cs({
4258
4414
  }
4259
4415
  );
4260
4416
  }
4261
- function is({
4417
+ function xs({
4262
4418
  items: t,
4263
4419
  getRowKey: r,
4264
4420
  variant: n = "divided",
@@ -4276,17 +4432,17 @@ function is({
4276
4432
  stickyGroupHeaders: w = !1,
4277
4433
  collapsibleGroups: g = !1,
4278
4434
  hideGroupCount: x = !1,
4279
- selectable: $ = !1,
4435
+ selectable: _ = !1,
4280
4436
  selectedItems: S = [],
4281
4437
  onSelectionChange: q,
4282
- bulkActions: D,
4438
+ bulkActions: A,
4283
4439
  header: J,
4284
4440
  stickyHeader: V = !1,
4285
- bordered: P = !1,
4441
+ bordered: I = !1,
4286
4442
  emptyContent: H,
4287
4443
  loading: te = !1,
4288
4444
  loadingRows: Y = 4,
4289
- className: W,
4445
+ className: K,
4290
4446
  "aria-label": ie
4291
4447
  }) {
4292
4448
  const [k, m] = ce.useState(
@@ -4295,16 +4451,16 @@ function is({
4295
4451
  )
4296
4452
  ), z = ce.useRef(null), y = (C) => {
4297
4453
  if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(C.key)) return;
4298
- const j = Array.from(
4454
+ const O = Array.from(
4299
4455
  z.current?.querySelectorAll("li[data-list-row]") ?? []
4300
4456
  );
4301
- if (j.length === 0) return;
4457
+ if (O.length === 0) return;
4302
4458
  C.preventDefault();
4303
- const R = j.indexOf(document.activeElement), T = C.key === "Home" ? 0 : C.key === "End" ? j.length - 1 : C.key === "ArrowDown" ? (R + 1) % j.length : (R - 1 + j.length) % j.length;
4304
- j[T]?.focus();
4305
- }, _ = (C, A) => r ? r(C, A) : A, N = (C) => S.includes(C), K = (C, A) => {
4459
+ const R = O.indexOf(document.activeElement), M = C.key === "Home" ? 0 : C.key === "End" ? O.length - 1 : C.key === "ArrowDown" ? (R + 1) % O.length : (R - 1 + O.length) % O.length;
4460
+ O[M]?.focus();
4461
+ }, $ = (C, D) => r ? r(C, D) : D, N = (C) => S.includes(C), W = (C, D) => {
4306
4462
  q && q(
4307
- A ? [...S, C] : S.filter((j) => j !== C)
4463
+ D ? [...S, C] : S.filter((O) => O !== C)
4308
4464
  );
4309
4465
  }, re = (C) => q?.(C ? [...t] : []), ee = c(
4310
4466
  "flex flex-col",
@@ -4314,17 +4470,17 @@ function is({
4314
4470
  // screen. Growing the box to the height of its parent puts it where it
4315
4471
  // belongs — and only while a selection exists, so an ordinary short list
4316
4472
  // keeps its natural height.
4317
- $ && S.length > 0 && "min-h-full",
4318
- P && "overflow-hidden rounded-lg border border-border-subtle",
4319
- W
4473
+ _ && S.length > 0 && "min-h-full",
4474
+ I && "overflow-hidden rounded-lg border border-border-subtle",
4475
+ K
4320
4476
  );
4321
4477
  if (te)
4322
- return /* @__PURE__ */ e("div", { className: ee, children: Array.from({ length: Y }).map((C, A) => /* @__PURE__ */ i(
4478
+ return /* @__PURE__ */ e("div", { className: ee, children: Array.from({ length: Y }).map((C, D) => /* @__PURE__ */ i(
4323
4479
  "div",
4324
4480
  {
4325
4481
  className: c(
4326
4482
  "flex animate-pulse items-center gap-3 px-4 py-2",
4327
- n === "divided" && A > 0 && "border-t border-border-subtle"
4483
+ n === "divided" && D > 0 && "border-t border-border-subtle"
4328
4484
  ),
4329
4485
  children: [
4330
4486
  /* @__PURE__ */ e("span", { className: "size-tile-sm shrink-0 rounded-md bg-surface-hover" }),
@@ -4333,12 +4489,12 @@ function is({
4333
4489
  /* @__PURE__ */ e("span", { className: "h-3 w-8 shrink-0 rounded-sm bg-surface-hover" })
4334
4490
  ]
4335
4491
  },
4336
- `skeleton-${A}`
4492
+ `skeleton-${D}`
4337
4493
  )) });
4338
4494
  if (t.length === 0 && H)
4339
4495
  return /* @__PURE__ */ e("div", { className: ee, children: H });
4340
- const X = t.length > 0 && S.length === t.length, I = S.length > 0 && !X, B = (C, A, j) => {
4341
- const R = d?.(C, A) ?? !1, T = p?.(C, A) ?? !1, L = h?.(C, A) ?? !1, Q = $ && N(C);
4496
+ const X = t.length > 0 && S.length === t.length, P = S.length > 0 && !X, B = (C, D, O) => {
4497
+ const R = d?.(C, D) ?? !1, M = p?.(C, D) ?? !1, L = h?.(C, D) ?? !1, Q = _ && N(C);
4342
4498
  return /* @__PURE__ */ i(
4343
4499
  "li",
4344
4500
  {
@@ -4347,33 +4503,33 @@ function is({
4347
4503
  tabIndex: 0,
4348
4504
  "data-list-row": "",
4349
4505
  "aria-current": R || void 0,
4350
- onClick: () => o(C, A),
4351
- onFocus: () => f?.(A),
4506
+ onClick: () => o(C, D),
4507
+ onFocus: () => f?.(D),
4352
4508
  onKeyDown: (ae) => {
4353
- ae.key !== "Enter" && ae.key !== " " || (ae.preventDefault(), o(C, A));
4509
+ ae.key !== "Enter" && ae.key !== " " || (ae.preventDefault(), o(C, D));
4354
4510
  }
4355
4511
  } : {},
4356
4512
  className: c(
4357
4513
  "flex items-center gap-3 text-base",
4358
4514
  "transition-colors duration-fast ease-out",
4359
4515
  n === "inset" ? "mx-2 rounded-lg px-3 py-2.5" : "px-5 py-2.5",
4360
- n === "divided" && !j && "border-t border-border-subtle",
4516
+ n === "divided" && !O && "border-t border-border-subtle",
4361
4517
  o && "cursor-pointer focus-visible:outline-none focus-visible:focus-ring",
4362
4518
  // An unread row is tinted, not bolded: at five columns a bold row
4363
4519
  // shouts across all of them, while the tint marks the row and leaves
4364
4520
  // the consumer free to weight only the sender and the subject.
4365
- R || Q ? "bg-accent-soft text-text" : T ? c("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
4521
+ R || Q ? "bg-accent-soft text-text" : M ? c("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
4366
4522
  // Read rows stay at full opacity — fading them also fades the avatars
4367
4523
  // and team dots, which is exactly the identity you scan by. They read
4368
4524
  // as secondary through weight and text colour instead.
4369
4525
  L && "text-text-muted"
4370
4526
  ),
4371
4527
  children: [
4372
- $ && /* @__PURE__ */ e("span", { onClick: (ae) => ae.stopPropagation(), children: /* @__PURE__ */ e(
4528
+ _ && /* @__PURE__ */ e("span", { onClick: (ae) => ae.stopPropagation(), children: /* @__PURE__ */ e(
4373
4529
  ye,
4374
4530
  {
4375
4531
  checked: N(C),
4376
- onChange: (ae) => K(C, ae.target.checked),
4532
+ onChange: (ae) => W(C, ae.target.checked),
4377
4533
  "aria-label": "Rij selecteren"
4378
4534
  }
4379
4535
  ) }),
@@ -4384,26 +4540,26 @@ function is({
4384
4540
  className: "mt-2 size-1.5 shrink-0 self-start rounded-full bg-border-strong"
4385
4541
  }
4386
4542
  ),
4387
- s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(C, A) }),
4388
- /* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(C, A) : String(C) }),
4389
- l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(C, A) })
4543
+ s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(C, D) }),
4544
+ /* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(C, D) : String(C) }),
4545
+ l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(C, D) })
4390
4546
  ]
4391
4547
  },
4392
- _(C, A)
4548
+ $(C, D)
4393
4549
  );
4394
- }, M = (() => {
4550
+ }, T = (() => {
4395
4551
  if (!u)
4396
- return t.map((R, T) => B(R, T, T === 0));
4552
+ return t.map((R, M) => B(R, M, M === 0));
4397
4553
  const C = /* @__PURE__ */ new Map();
4398
- t.forEach((R, T) => {
4399
- const L = u(R, T);
4400
- C.has(L) || C.set(L, []), C.get(L).push({ item: R, index: T });
4554
+ t.forEach((R, M) => {
4555
+ const L = u(R, M);
4556
+ C.has(L) || C.set(L, []), C.get(L).push({ item: R, index: M });
4401
4557
  });
4402
- const A = b ?? [];
4558
+ const D = b ?? [];
4403
4559
  return [
4404
- ...A.filter((R) => C.has(R.id)),
4405
- ...[...C.keys()].filter((R) => !A.some((T) => T.id === R)).map((R) => ({ id: R }))
4406
- ].flatMap((R, T) => {
4560
+ ...D.filter((R) => C.has(R.id)),
4561
+ ...[...C.keys()].filter((R) => !D.some((M) => M.id === R)).map((R) => ({ id: R }))
4562
+ ].flatMap((R, M) => {
4407
4563
  const L = C.get(R.id) ?? [], Q = g && k[R.id], ae = R.title ?? R.id, de = R.count ?? L.length, ge = /* @__PURE__ */ e(
4408
4564
  "li",
4409
4565
  {
@@ -4413,7 +4569,7 @@ function is({
4413
4569
  // surface as the rows, no rules, and the count as a quiet pill.
4414
4570
  // The old grey uppercase strip read as a second column header.
4415
4571
  "flex items-center gap-2.5 bg-surface px-5 pb-1.5 text-base font-semibold",
4416
- T > 0 ? "pt-5" : "pt-3",
4572
+ M > 0 ? "pt-5" : "pt-3",
4417
4573
  R.tone === "danger" ? "text-danger-fg" : R.tone === "muted" ? "text-text-subtle" : "text-text",
4418
4574
  w && "sticky z-10",
4419
4575
  g && "cursor-pointer select-none"
@@ -4422,7 +4578,7 @@ function is({
4422
4578
  style: w ? { top: V ? 28 : 0 } : void 0,
4423
4579
  children: v ? v(R, L.map((he) => he.item)) : /* @__PURE__ */ i(ke, { children: [
4424
4580
  g && /* @__PURE__ */ e(
4425
- _e,
4581
+ Ae,
4426
4582
  {
4427
4583
  "aria-hidden": !0,
4428
4584
  className: c(
@@ -4449,7 +4605,7 @@ function is({
4449
4605
  return Q ? [ge] : [
4450
4606
  ge,
4451
4607
  ...L.map(
4452
- ({ item: he, index: Le }, E) => B(he, Le, E === 0)
4608
+ ({ item: he, index: Pe }, E) => B(he, Pe, E === 0)
4453
4609
  )
4454
4610
  ];
4455
4611
  });
@@ -4466,11 +4622,11 @@ function is({
4466
4622
  V && "sticky top-0 z-20"
4467
4623
  ),
4468
4624
  children: [
4469
- $ && /* @__PURE__ */ e("span", { className: "flex items-center", children: /* @__PURE__ */ e(
4625
+ _ && /* @__PURE__ */ e("span", { className: "flex items-center", children: /* @__PURE__ */ e(
4470
4626
  ye,
4471
4627
  {
4472
4628
  checked: X,
4473
- indeterminate: I,
4629
+ indeterminate: P,
4474
4630
  onChange: (C) => re(C.target.checked),
4475
4631
  "aria-label": "Alles selecteren"
4476
4632
  }
@@ -4479,14 +4635,14 @@ function is({
4479
4635
  ]
4480
4636
  }
4481
4637
  ),
4482
- /* @__PURE__ */ e("ul", { "aria-label": ie, className: "flex flex-col", children: M }),
4483
- $ && S.length > 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none sticky bottom-0 z-10 flex justify-center px-5 pb-4", children: /* @__PURE__ */ i("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: [
4638
+ /* @__PURE__ */ e("ul", { "aria-label": ie, className: "flex flex-col", children: T }),
4639
+ _ && S.length > 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none sticky bottom-0 z-10 flex justify-center px-5 pb-4", children: /* @__PURE__ */ i("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: [
4484
4640
  /* @__PURE__ */ i("span", { className: "text-sm font-medium", children: [
4485
4641
  S.length,
4486
4642
  " geselecteerd"
4487
4643
  ] }),
4488
4644
  /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "mx-1.5 h-4 w-px bg-current opacity-25" }),
4489
- D,
4645
+ A,
4490
4646
  /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "mx-1.5 h-4 w-px bg-current opacity-25" }),
4491
4647
  /* @__PURE__ */ e(
4492
4648
  "button",
@@ -4501,7 +4657,7 @@ function is({
4501
4657
  ] }) })
4502
4658
  ] });
4503
4659
  }
4504
- function ds({
4660
+ function bs({
4505
4661
  side: t,
4506
4662
  continued: r = !1,
4507
4663
  tone: n = "default",
@@ -4538,18 +4694,18 @@ function ds({
4538
4694
  }
4539
4695
  );
4540
4696
  }
4541
- const an = {
4697
+ const hn = {
4542
4698
  default: "text-text",
4543
4699
  urgent: "text-danger-fg",
4544
4700
  success: "text-success-fg"
4545
4701
  };
4546
- function us({ value: t, label: r, tone: n = "default", className: s, ...a }) {
4702
+ function gs({ value: t, label: r, tone: n = "default", className: s, ...a }) {
4547
4703
  return /* @__PURE__ */ i("div", { className: c("rounded-xl bg-editor px-4 py-3.5", s), ...a, children: [
4548
- /* @__PURE__ */ e("div", { className: c("text-2xl font-semibold", an[n]), children: t }),
4704
+ /* @__PURE__ */ e("div", { className: c("text-2xl font-semibold", hn[n]), children: t }),
4549
4705
  /* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
4550
4706
  ] });
4551
4707
  }
4552
- const ln = ({
4708
+ const xn = ({
4553
4709
  surface: t = !1,
4554
4710
  title: r,
4555
4711
  subtitle: n,
@@ -4563,18 +4719,18 @@ const ln = ({
4563
4719
  editable: h = !1,
4564
4720
  onTitleChange: u
4565
4721
  }) => {
4566
- const [b, v] = O(!1), [w, g] = O(r), x = se(null);
4722
+ const [b, v] = j(!1), [w, g] = j(r), x = se(null);
4567
4723
  G(() => {
4568
4724
  g(r);
4569
4725
  }, [r]), G(() => {
4570
4726
  b && x.current && (x.current.focus(), x.current.select());
4571
4727
  }, [b]);
4572
- const $ = () => {
4728
+ const _ = () => {
4573
4729
  h && v(!0);
4574
4730
  }, S = () => {
4575
4731
  v(!1), w.trim() !== "" && w !== r && u ? u(w.trim()) : g(r);
4576
- }, q = (D) => {
4577
- D.key === "Enter" ? x.current?.blur() : D.key === "Escape" && (g(r), v(!1));
4732
+ }, q = (A) => {
4733
+ A.key === "Enter" ? x.current?.blur() : A.key === "Escape" && (g(r), v(!1));
4578
4734
  };
4579
4735
  return /* @__PURE__ */ i(
4580
4736
  "div",
@@ -4601,7 +4757,7 @@ const ln = ({
4601
4757
  ref: x,
4602
4758
  type: "text",
4603
4759
  value: w,
4604
- onChange: (D) => g(D.target.value),
4760
+ onChange: (A) => g(A.target.value),
4605
4761
  onBlur: S,
4606
4762
  onKeyDown: q,
4607
4763
  className: "text-1xl font-semibold bg-transparent border-b-1 border-border rounded-lg outline-none focus:border-none px-1 -mx-1 min-w-0 w-full"
@@ -4610,7 +4766,7 @@ const ln = ({
4610
4766
  /* @__PURE__ */ e(
4611
4767
  "h2",
4612
4768
  {
4613
- onClick: $,
4769
+ onClick: _,
4614
4770
  className: c(
4615
4771
  "text-lg font-semibold tracking-title truncate",
4616
4772
  h && "cursor-pointer"
@@ -4624,7 +4780,7 @@ const ln = ({
4624
4780
  Dt,
4625
4781
  {
4626
4782
  size: 15,
4627
- onClick: $,
4783
+ onClick: _,
4628
4784
  className: "shrink-0 cursor-pointer text-text-muted opacity-0 group-hover:opacity-100 transition-opacity"
4629
4785
  }
4630
4786
  )
@@ -4646,29 +4802,29 @@ const ln = ({
4646
4802
  ] })
4647
4803
  ] }) }),
4648
4804
  a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
4649
- (D) => D.render ? /* @__PURE__ */ e(ce.Fragment, { children: D.render() }, D.id) : D.splitOptions && D.splitOptions.length > 0 ? /* @__PURE__ */ e(
4650
- Qe,
4805
+ (A) => A.render ? /* @__PURE__ */ e(ce.Fragment, { children: A.render() }, A.id) : A.splitOptions && A.splitOptions.length > 0 ? /* @__PURE__ */ e(
4806
+ et,
4651
4807
  {
4652
- label: D.label,
4653
- onClick: D.onClick,
4654
- icon: D.icon,
4655
- variant: D.variant === "primary" ? "primary" : "outline",
4656
- options: D.splitOptions,
4657
- disabled: D.disabled
4808
+ label: A.label,
4809
+ onClick: A.onClick,
4810
+ icon: A.icon,
4811
+ variant: A.variant === "primary" ? "primary" : "outline",
4812
+ options: A.splitOptions,
4813
+ disabled: A.disabled
4658
4814
  },
4659
- D.id
4815
+ A.id
4660
4816
  ) : /* @__PURE__ */ e(
4661
4817
  le,
4662
4818
  {
4663
- variant: D.variant ?? "secondary",
4819
+ variant: A.variant ?? "secondary",
4664
4820
  onClick: (J) => {
4665
- J.stopPropagation(), J.target.blur(), D.onClick();
4821
+ J.stopPropagation(), J.target.blur(), A.onClick();
4666
4822
  },
4667
- disabled: D.disabled,
4668
- leftIcon: D.icon,
4669
- children: D.label
4823
+ disabled: A.disabled,
4824
+ leftIcon: A.icon,
4825
+ children: A.label
4670
4826
  },
4671
- D.id
4827
+ A.id
4672
4828
  )
4673
4829
  ) })
4674
4830
  ] }),
@@ -4676,11 +4832,11 @@ const ln = ({
4676
4832
  ]
4677
4833
  }
4678
4834
  );
4679
- }, on = {
4835
+ }, bn = {
4680
4836
  none: "",
4681
4837
  sm: "px-3 pb-3 pt-1",
4682
4838
  md: "px-5 pb-5 pt-1.5"
4683
- }, ms = ({
4839
+ }, ps = ({
4684
4840
  title: t,
4685
4841
  subtitle: r,
4686
4842
  meta: n,
@@ -4697,7 +4853,7 @@ const ln = ({
4697
4853
  contentClassName: v,
4698
4854
  children: w
4699
4855
  }) => {
4700
- const g = f ? /* @__PURE__ */ e(Fe, { variant: "inline", shape: d }) : p ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-12", children: p }) : w;
4856
+ const g = f ? /* @__PURE__ */ e(Be, { variant: "inline", shape: d }) : p ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-12", children: p }) : w;
4701
4857
  return /* @__PURE__ */ i(
4702
4858
  "div",
4703
4859
  {
@@ -4711,7 +4867,7 @@ const ln = ({
4711
4867
  ),
4712
4868
  children: [
4713
4869
  /* @__PURE__ */ e(
4714
- ln,
4870
+ xn,
4715
4871
  {
4716
4872
  surface: l ?? u,
4717
4873
  title: t,
@@ -4728,7 +4884,7 @@ const ln = ({
4728
4884
  {
4729
4885
  className: c(
4730
4886
  u && "min-h-0 flex-1 overflow-y-auto",
4731
- on[h],
4887
+ bn[h],
4732
4888
  v
4733
4889
  ),
4734
4890
  children: g
@@ -4737,60 +4893,12 @@ const ln = ({
4737
4893
  ]
4738
4894
  }
4739
4895
  );
4740
- }, cn = /<[a-z][\s\S]*>/i, dn = [
4741
- "[&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_p]:leading-relaxed",
4742
- "[&_a]:text-accent [&_a]:underline [&_a]:underline-offset-2",
4743
- "[&_strong]:font-semibold [&_em]:italic",
4744
- "[&_ul]:my-1.5 [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:my-1.5 [&_ol]:list-decimal [&_ol]:pl-5",
4745
- "[&_li]:leading-relaxed",
4746
- "[&_h1]:mb-1 [&_h1]:mt-2 [&_h1]:font-semibold [&_h2]:mb-1 [&_h2]:mt-2 [&_h2]:font-semibold [&_h3]:mb-1 [&_h3]:mt-2 [&_h3]:font-semibold",
4747
- "[&_blockquote]:my-1.5 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-text-muted",
4748
- "[&_hr]:my-2 [&_hr]:border-border",
4749
- "[&_pre]:my-1.5 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-surface-sunk [&_pre]:p-2 [&_pre]:text-xs",
4750
- "[&_code]:rounded-sm [&_code]:bg-surface-sunk [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-xs",
4751
- "[&_pre_code]:bg-transparent [&_pre_code]:p-0",
4752
- "[&_table]:my-1.5 [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs",
4753
- "[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-semibold",
4754
- "[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1"
4755
- ].join(" "), un = {
4756
- p: (t) => /* @__PURE__ */ e("p", { className: "my-1.5 leading-relaxed first:mt-0 last:mb-0", ...t }),
4757
- a: (t) => /* @__PURE__ */ e("a", { className: "text-accent underline underline-offset-2 hover:opacity-80", target: "_blank", rel: "noopener noreferrer", ...t }),
4758
- strong: (t) => /* @__PURE__ */ e("strong", { className: "font-semibold", ...t }),
4759
- em: (t) => /* @__PURE__ */ e("em", { className: "italic", ...t }),
4760
- ul: (t) => /* @__PURE__ */ e("ul", { className: "my-1.5 list-disc space-y-0.5 pl-5", ...t }),
4761
- ol: (t) => /* @__PURE__ */ e("ol", { className: "my-1.5 list-decimal space-y-0.5 pl-5", ...t }),
4762
- li: (t) => /* @__PURE__ */ e("li", { className: "leading-relaxed", ...t }),
4763
- h1: (t) => /* @__PURE__ */ e("h1", { className: "mb-1 mt-2 text-md font-semibold first:mt-0", ...t }),
4764
- h2: (t) => /* @__PURE__ */ e("h2", { className: "mb-1 mt-2 text-base font-semibold first:mt-0", ...t }),
4765
- h3: (t) => /* @__PURE__ */ e("h3", { className: "mb-1 mt-2 text-base font-semibold first:mt-0", ...t }),
4766
- blockquote: (t) => /* @__PURE__ */ e("blockquote", { className: "my-1.5 border-l-2 border-border pl-3 text-text-muted", ...t }),
4767
- hr: (t) => /* @__PURE__ */ e("hr", { className: "my-2 border-border", ...t }),
4768
- pre: (t) => /* @__PURE__ */ e("pre", { className: "my-1.5 overflow-x-auto rounded-md bg-surface-sunk p-2 text-xs", ...t }),
4769
- code: ({ className: t, children: r, ...n }) => {
4770
- const s = String(r ?? "");
4771
- return /language-/.test(t ?? "") || s.includes(`
4772
- `) ? /* @__PURE__ */ e("code", { className: "font-mono text-xs", ...n, children: r }) : /* @__PURE__ */ e("code", { className: "rounded-sm bg-surface-sunk px-1 py-0.5 font-mono text-xs", ...n, children: r });
4773
- },
4774
- table: (t) => /* @__PURE__ */ e("div", { className: "my-1.5 overflow-x-auto", children: /* @__PURE__ */ e("table", { className: "w-full border-collapse text-xs", ...t }) }),
4775
- th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
4776
- td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
4777
- };
4778
- function fs({ text: t, className: r, as: n }) {
4779
- const s = t ?? "";
4780
- return (n ? n === "html" : cn.test(s)) ? /* @__PURE__ */ e(
4781
- "div",
4782
- {
4783
- className: c("break-words", dn, r),
4784
- dangerouslySetInnerHTML: { __html: Lt.sanitize(s, { ADD_ATTR: ["target", "rel"] }) }
4785
- }
4786
- ) : /* @__PURE__ */ e("div", { className: c("break-words", r), children: /* @__PURE__ */ e(It, { remarkPlugins: [Pt], components: un, children: s }) });
4787
- }
4788
- const hs = ({ label: t, meta: r, action: n, className: s }) => /* @__PURE__ */ i("div", { className: c("flex items-center gap-2 px-1 pb-2 pt-7 first:pt-0", s), children: [
4896
+ }, vs = ({ label: t, meta: r, action: n, className: s }) => /* @__PURE__ */ i("div", { className: c("flex items-center gap-2 px-1 pb-2 pt-7 first:pt-0", s), children: [
4789
4897
  /* @__PURE__ */ e("span", { className: "shrink-0 text-2xs font-semibold uppercase tracking-label text-text-subtle", children: t }),
4790
4898
  r && /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-right text-xs tabular-nums text-text-subtle", children: r }),
4791
4899
  n && /* @__PURE__ */ e("span", { className: "ml-auto shrink-0", children: n })
4792
4900
  ] });
4793
- function xs({ label: t, trailing: r, align: n = "center", className: s }) {
4901
+ function ys({ label: t, trailing: r, align: n = "center", className: s }) {
4794
4902
  const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
4795
4903
  return !t && !r ? /* @__PURE__ */ e("div", { className: c("flex items-center py-2", s), children: a }) : /* @__PURE__ */ i("div", { className: c("flex items-center gap-3 py-2", s), children: [
4796
4904
  n === "center" && a,
@@ -4799,12 +4907,12 @@ function xs({ label: t, trailing: r, align: n = "center", className: s }) {
4799
4907
  r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
4800
4908
  ] });
4801
4909
  }
4802
- const at = Je(null), bs = at.Provider;
4803
- function mn() {
4804
- return mt(at);
4910
+ const lt = Ye(null), Ns = lt.Provider;
4911
+ function gn() {
4912
+ return ft(lt);
4805
4913
  }
4806
- function gs() {
4807
- const [t, r] = O(null), n = pe(
4914
+ function ws() {
4915
+ const [t, r] = j(null), n = pe(
4808
4916
  () => ({
4809
4917
  setTrail: (s, a) => r((l) => a ? { ownerId: s, entry: a } : l && l.ownerId !== s ? l : null)
4810
4918
  }),
@@ -4812,13 +4920,13 @@ function gs() {
4812
4920
  );
4813
4921
  return { trail: t?.entry ?? null, api: n };
4814
4922
  }
4815
- const fn = {
4923
+ const pn = {
4816
4924
  none: "",
4817
4925
  sm: "px-3 py-3",
4818
4926
  // Matches the frame header's own horizontal padding, so content lines up
4819
4927
  // with the title above it.
4820
4928
  md: "px-5 py-4"
4821
- }, ps = ({
4929
+ }, ks = ({
4822
4930
  children: t,
4823
4931
  actions: r = [],
4824
4932
  secondaryActions: n = [],
@@ -4831,7 +4939,7 @@ const fn = {
4831
4939
  className: p,
4832
4940
  contentClassName: h
4833
4941
  }) => {
4834
- const u = mn(), b = ut(), v = se(s);
4942
+ const u = gn(), b = mt(), v = se(s);
4835
4943
  v.current = s;
4836
4944
  const w = !!s;
4837
4945
  G(() => {
@@ -4863,15 +4971,15 @@ const fn = {
4863
4971
  ),
4864
4972
  l && /* @__PURE__ */ e("h2", { className: "min-w-0 truncate text-md font-semibold tracking-title text-text", children: l })
4865
4973
  ] }),
4866
- /* @__PURE__ */ e("div", { className: c("flex-1", fn[d], h), children: o ? /* @__PURE__ */ e(Fe, { variant: "inline", shape: f }) : t }),
4974
+ /* @__PURE__ */ e("div", { className: c("flex-1", pn[d], h), children: o ? /* @__PURE__ */ e(Be, { variant: "inline", shape: f }) : t }),
4867
4975
  g && /* @__PURE__ */ i("div", { className: "sticky bottom-0 z-10 flex shrink-0 items-center gap-2 border-t border-border bg-surface px-5 py-3", children: [
4868
- n.length > 0 && /* @__PURE__ */ e(Te, { actions: n, defaultVariant: "ghost" }),
4869
- r.length > 0 && /* @__PURE__ */ e(Te, { actions: r, className: "ml-auto" })
4976
+ n.length > 0 && /* @__PURE__ */ e(_e, { actions: n, defaultVariant: "ghost" }),
4977
+ r.length > 0 && /* @__PURE__ */ e(_e, { actions: r, className: "ml-auto" })
4870
4978
  ] })
4871
4979
  ] })
4872
4980
  );
4873
4981
  };
4874
- function vs({
4982
+ function Cs({
4875
4983
  label: t,
4876
4984
  description: r,
4877
4985
  control: n,
@@ -4898,7 +5006,7 @@ function vs({
4898
5006
  }
4899
5007
  );
4900
5008
  }
4901
- function ys({
5009
+ function Ss({
4902
5010
  icon: t,
4903
5011
  title: r,
4904
5012
  description: n,
@@ -4918,7 +5026,7 @@ function ys({
4918
5026
  /* @__PURE__ */ e("div", { className: c("flex flex-col", t && "pl-6"), children: a })
4919
5027
  ] });
4920
5028
  }
4921
- function Ns({ label: t, dotColor: r, onClick: n, className: s }) {
5029
+ function Es({ label: t, dotColor: r, onClick: n, className: s }) {
4922
5030
  return /* @__PURE__ */ i(
4923
5031
  "button",
4924
5032
  {
@@ -4931,12 +5039,12 @@ function Ns({ label: t, dotColor: r, onClick: n, className: s }) {
4931
5039
  children: [
4932
5040
  r && /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full", style: { backgroundColor: r }, "aria-hidden": !0 }),
4933
5041
  /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: t }),
4934
- /* @__PURE__ */ e(Z, { icon: At, size: "xs", className: "opacity-70" })
5042
+ /* @__PURE__ */ e(Z, { icon: Lt, size: "xs", className: "opacity-70" })
4935
5043
  ]
4936
5044
  }
4937
5045
  );
4938
5046
  }
4939
- function hn(t) {
5047
+ function vn(t) {
4940
5048
  const { id: r, header: n, accessor: s, label: a, tone: l, visible: o, width: f, sortable: d, align: p } = t;
4941
5049
  return {
4942
5050
  id: r,
@@ -4944,14 +5052,14 @@ function hn(t) {
4944
5052
  accessor: (h) => a(s(h), h),
4945
5053
  cell: (h, u) => {
4946
5054
  const b = s(u);
4947
- return o && !o(b, u) ? null : /* @__PURE__ */ e(Vr, { variant: l ? l(b, u) : "default", size: "sm", children: a(b, u) });
5055
+ return o && !o(b, u) ? null : /* @__PURE__ */ e(qr, { variant: l ? l(b, u) : "default", size: "sm", children: a(b, u) });
4948
5056
  },
4949
5057
  width: f,
4950
5058
  sortable: d,
4951
5059
  align: p
4952
5060
  };
4953
5061
  }
4954
- function ws(t) {
5062
+ function zs(t) {
4955
5063
  const {
4956
5064
  id: r,
4957
5065
  header: n,
@@ -4963,7 +5071,7 @@ function ws(t) {
4963
5071
  width: d,
4964
5072
  sortable: p
4965
5073
  } = t;
4966
- return hn({
5074
+ return vn({
4967
5075
  id: r,
4968
5076
  header: n,
4969
5077
  accessor: (h) => !!s(h),
@@ -4973,7 +5081,7 @@ function ws(t) {
4973
5081
  sortable: p
4974
5082
  });
4975
5083
  }
4976
- function ks(t) {
5084
+ function Ts(t) {
4977
5085
  const {
4978
5086
  id: r,
4979
5087
  header: n,
@@ -4997,13 +5105,13 @@ function ks(t) {
4997
5105
  sortable: p
4998
5106
  };
4999
5107
  }
5000
- function xn(t, r) {
5108
+ function yn(t, r) {
5001
5109
  return r.split(".").reduce(
5002
5110
  (n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
5003
5111
  t
5004
5112
  );
5005
5113
  }
5006
- const Cs = ({
5114
+ const Ms = ({
5007
5115
  groups: t,
5008
5116
  data: r,
5009
5117
  size: n = "md",
@@ -5026,7 +5134,7 @@ const Cs = ({
5026
5134
  return b ? b.label : String(h || "-");
5027
5135
  }, f = xe(
5028
5136
  (h) => {
5029
- const u = xn(r, h.name);
5137
+ const u = yn(r, h.name);
5030
5138
  if (h.type === "array") {
5031
5139
  const v = u;
5032
5140
  return !v || v.length === 0 ? /* @__PURE__ */ e(
@@ -5057,7 +5165,7 @@ const Cs = ({
5057
5165
  }
5058
5166
  ) }),
5059
5167
  /* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: h.arrayFields?.map((x) => {
5060
- const $ = w?.[x.name];
5168
+ const _ = w?.[x.name];
5061
5169
  let S = "-";
5062
5170
  switch (x.type) {
5063
5171
  case "text":
@@ -5066,30 +5174,30 @@ const Cs = ({
5066
5174
  case "tel":
5067
5175
  case "url":
5068
5176
  case "textarea":
5069
- S = $ || "-";
5177
+ S = _ || "-";
5070
5178
  break;
5071
5179
  case "select":
5072
5180
  case "radio":
5073
5181
  S = o(
5074
- $,
5182
+ _,
5075
5183
  x.options
5076
5184
  );
5077
5185
  break;
5078
5186
  case "checkbox":
5079
- S = l($);
5187
+ S = l(_);
5080
5188
  break;
5081
5189
  case "date":
5082
- S = a($);
5190
+ S = a(_);
5083
5191
  break;
5084
5192
  case "custom":
5085
5193
  S = x.customComponent?.({
5086
- value: $
5194
+ value: _
5087
5195
  });
5088
5196
  break;
5089
5197
  default:
5090
- S = String($ || "-");
5198
+ S = String(_ || "-");
5091
5199
  }
5092
- return x.format && (S = x.format($, w)), /* @__PURE__ */ i("div", { className: "space-y-1", children: [
5200
+ return x.format && (S = x.format(_, w)), /* @__PURE__ */ i("div", { className: "space-y-1", children: [
5093
5201
  /* @__PURE__ */ e(
5094
5202
  fe,
5095
5203
  {
@@ -5252,7 +5360,7 @@ const Cs = ({
5252
5360
  s
5253
5361
  );
5254
5362
  return /* @__PURE__ */ e("div", { className: p, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(d) }) });
5255
- }, bn = () => /* @__PURE__ */ e(Fe, { variant: "inline", shape: "menu" }), lt = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
5363
+ }, Nn = () => /* @__PURE__ */ e(Be, { variant: "inline", shape: "menu" }), ot = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
5256
5364
  const a = !!(t.children && t.children.length > 0), l = r ? r(t.path) : !1;
5257
5365
  if (a)
5258
5366
  return /* @__PURE__ */ i("li", { children: [
@@ -5269,7 +5377,7 @@ const Cs = ({
5269
5377
  }
5270
5378
  ),
5271
5379
  /* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.children?.map((d, p) => /* @__PURE__ */ e(
5272
- lt,
5380
+ ot,
5273
5381
  {
5274
5382
  item: d,
5275
5383
  isSelectedHandler: r,
@@ -5344,7 +5452,7 @@ const Cs = ({
5344
5452
  ]
5345
5453
  }
5346
5454
  ) });
5347
- }, Ss = ({
5455
+ }, _s = ({
5348
5456
  items: t,
5349
5457
  isSelectedHandler: r,
5350
5458
  onClick: n,
@@ -5352,12 +5460,12 @@ const Cs = ({
5352
5460
  loading: a = !1
5353
5461
  }) => a ? /* @__PURE__ */ i("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
5354
5462
  s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
5355
- /* @__PURE__ */ e(bn, {})
5463
+ /* @__PURE__ */ e(Nn, {})
5356
5464
  ] }) : /* @__PURE__ */ i("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
5357
5465
  s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
5358
5466
  /* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-px overflow-y-auto", children: t.map(
5359
5467
  (l, o) => !l.path && !l.label && !l.children ? /* @__PURE__ */ e("li", { "aria-hidden": !0, className: "h-4" }, o) : /* @__PURE__ */ e(
5360
- lt,
5468
+ ot,
5361
5469
  {
5362
5470
  item: l,
5363
5471
  isSelectedHandler: r,
@@ -5366,7 +5474,7 @@ const Cs = ({
5366
5474
  o
5367
5475
  )
5368
5476
  ) })
5369
- ] }), gn = {
5477
+ ] }), wn = {
5370
5478
  xs: "text-xs",
5371
5479
  sm: "text-sm",
5372
5480
  md: "text-base",
@@ -5375,13 +5483,13 @@ const Cs = ({
5375
5483
  "2xl": "text-2xl",
5376
5484
  "3xl": "text-3xl",
5377
5485
  "4xl": "text-3xl"
5378
- }, pn = {
5486
+ }, kn = {
5379
5487
  light: "font-normal",
5380
5488
  normal: "font-normal",
5381
5489
  medium: "font-medium",
5382
5490
  semibold: "font-semibold",
5383
5491
  bold: "font-bold"
5384
- }, vn = {
5492
+ }, Cn = {
5385
5493
  primary: "text-text",
5386
5494
  secondary: "text-text-muted",
5387
5495
  accent: "text-accent",
@@ -5391,11 +5499,11 @@ const Cs = ({
5391
5499
  info: "text-info-fg",
5392
5500
  neutral: "text-text",
5393
5501
  current: "text-current"
5394
- }, yn = {
5502
+ }, Sn = {
5395
5503
  left: "text-left",
5396
5504
  center: "text-center",
5397
5505
  right: "text-right"
5398
- }, Es = ({
5506
+ }, $s = ({
5399
5507
  level: t = 1,
5400
5508
  size: r,
5401
5509
  weight: n = "semibold",
@@ -5408,16 +5516,16 @@ const Cs = ({
5408
5516
  }) => {
5409
5517
  const p = `h${t}`, h = c(
5410
5518
  "font-sans text-pretty",
5411
- gn[r || Nn(t)],
5412
- pn[n],
5413
- vn[s],
5414
- yn[a],
5519
+ wn[r || En(t)],
5520
+ kn[n],
5521
+ Cn[s],
5522
+ Sn[a],
5415
5523
  l && "truncate",
5416
5524
  o
5417
5525
  );
5418
5526
  return /* @__PURE__ */ e(p, { className: h, ...d, children: f });
5419
5527
  };
5420
- function Nn(t) {
5528
+ function En(t) {
5421
5529
  return {
5422
5530
  1: "2xl",
5423
5531
  2: "xl",
@@ -5427,7 +5535,7 @@ function Nn(t) {
5427
5535
  6: "md"
5428
5536
  }[t] || "md";
5429
5537
  }
5430
- const zs = ({
5538
+ const As = ({
5431
5539
  commands: t,
5432
5540
  isOpen: r,
5433
5541
  onClose: n,
@@ -5435,25 +5543,25 @@ const zs = ({
5435
5543
  initialCommandPath: a,
5436
5544
  initialActiveIndex: l
5437
5545
  }) => {
5438
- const [o, f] = O(""), [d, p] = O(a || []), [h, u] = O(l || 0), b = se(null), v = se(null), g = (d.length ? t.find((x) => x.id === d[0])?.subCommands || [] : t).filter(
5546
+ const [o, f] = j(""), [d, p] = j(a || []), [h, u] = j(l || 0), b = se(null), v = se(null), g = (d.length ? t.find((x) => x.id === d[0])?.subCommands || [] : t).filter(
5439
5547
  (x) => x.label.toLowerCase().includes(o.toLowerCase())
5440
5548
  );
5441
5549
  return G(() => {
5442
5550
  r || (f(""), p(a || []), u(l || 0));
5443
5551
  }, [r]), G(() => {
5444
- const x = ($) => {
5552
+ const x = (_) => {
5445
5553
  if (r) {
5446
- if ($.key === "Escape")
5554
+ if (_.key === "Escape")
5447
5555
  n();
5448
- else if ($.key === "ArrowUp")
5556
+ else if (_.key === "ArrowUp")
5449
5557
  u(
5450
5558
  (S) => S > 0 ? S - 1 : g.length - 1
5451
5559
  );
5452
- else if ($.key === "ArrowDown")
5560
+ else if (_.key === "ArrowDown")
5453
5561
  u(
5454
5562
  (S) => S < g.length - 1 ? S + 1 : 0
5455
5563
  );
5456
- else if ($.key === "Enter") {
5564
+ else if (_.key === "Enter") {
5457
5565
  const S = g[h];
5458
5566
  S && (S.subCommands ? (p([...d, S.id]), u(0)) : S.action && (S.action(), n()));
5459
5567
  }
@@ -5461,8 +5569,8 @@ const zs = ({
5461
5569
  };
5462
5570
  return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
5463
5571
  }, [r, n, g, h, d]), G(() => {
5464
- const x = ($) => {
5465
- b.current && !b.current.contains($.target) && n();
5572
+ const x = (_) => {
5573
+ b.current && !b.current.contains(_.target) && n();
5466
5574
  };
5467
5575
  return r && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
5468
5576
  }, [r, n]), G(() => {
@@ -5495,19 +5603,19 @@ const zs = ({
5495
5603
  className: "mt-2 pt-2 text-sm border-t border-border max-h-dialog-list overflow-y-auto",
5496
5604
  children: [
5497
5605
  g.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
5498
- g.map((x, $) => /* @__PURE__ */ i(
5606
+ g.map((x, _) => /* @__PURE__ */ i(
5499
5607
  "div",
5500
5608
  {
5501
- "data-index": $,
5502
- className: `flex items-center p-2 cursor-pointer rounded-md ${$ === h ? "bg-accent-soft text-accent" : "text-text"}`,
5609
+ "data-index": _,
5610
+ className: `flex items-center p-2 cursor-pointer rounded-md ${_ === h ? "bg-accent-soft text-accent" : "text-text"}`,
5503
5611
  onClick: () => {
5504
5612
  x.subCommands ? (p([...d, x.id]), u(0)) : x.action && (x.action(), n());
5505
5613
  },
5506
- onMouseEnter: () => u($),
5614
+ onMouseEnter: () => u(_),
5507
5615
  children: [
5508
5616
  x.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: x.icon }),
5509
5617
  /* @__PURE__ */ e("span", { className: "flex-grow", children: x.label }),
5510
- x.subCommands && /* @__PURE__ */ e("span", { className: "text-text-muted", children: /* @__PURE__ */ e(_e, { className: "w-4 h-4" }) })
5618
+ x.subCommands && /* @__PURE__ */ e("span", { className: "text-text-muted", children: /* @__PURE__ */ e(Ae, { className: "w-4 h-4" }) })
5511
5619
  ]
5512
5620
  },
5513
5621
  x.id
@@ -5532,7 +5640,7 @@ const zs = ({
5532
5640
  ]
5533
5641
  }
5534
5642
  ) }) : null;
5535
- }, wn = {
5643
+ }, zn = {
5536
5644
  none: "p-0",
5537
5645
  xs: "p-1",
5538
5646
  sm: "p-2",
@@ -5540,7 +5648,7 @@ const zs = ({
5540
5648
  lg: "p-6",
5541
5649
  xl: "p-8",
5542
5650
  "2xl": "p-12"
5543
- }, kn = {
5651
+ }, Tn = {
5544
5652
  none: "m-0",
5545
5653
  xs: "m-1",
5546
5654
  sm: "m-2",
@@ -5548,7 +5656,7 @@ const zs = ({
5548
5656
  lg: "m-6",
5549
5657
  xl: "m-8",
5550
5658
  "2xl": "m-12"
5551
- }, Cn = {
5659
+ }, Mn = {
5552
5660
  none: "",
5553
5661
  primary: "bg-accent text-accent-fg",
5554
5662
  secondary: "bg-surface-hover",
@@ -5564,26 +5672,26 @@ const zs = ({
5564
5672
  backdrop: "bg-page",
5565
5673
  editor: "bg-surface",
5566
5674
  input: "bg-surface-input"
5567
- }, Sn = {
5675
+ }, _n = {
5568
5676
  none: "rounded-none",
5569
5677
  sm: "rounded-sm",
5570
5678
  md: "rounded-md",
5571
5679
  lg: "rounded-lg",
5572
5680
  xl: "rounded-xl",
5573
5681
  full: "rounded-full"
5574
- }, En = {
5682
+ }, $n = {
5575
5683
  none: "shadow-none",
5576
5684
  sm: "shadow-none",
5577
5685
  md: "shadow-overlay",
5578
5686
  lg: "shadow-overlay",
5579
5687
  xl: "shadow-modal",
5580
5688
  "2xl": "shadow-modal"
5581
- }, zn = {
5689
+ }, An = {
5582
5690
  none: "border-0",
5583
5691
  sm: "border",
5584
5692
  md: "border-2",
5585
5693
  lg: "border-4"
5586
- }, Mn = {
5694
+ }, Dn = {
5587
5695
  primary: "border-accent-border",
5588
5696
  secondary: "border-border",
5589
5697
  accent: "border-accent-border",
@@ -5593,7 +5701,7 @@ const zs = ({
5593
5701
  info: "border-info-border",
5594
5702
  neutral: "border-border-subtle",
5595
5703
  white: "border-border-subtle"
5596
- }, ot = be(
5704
+ }, ct = be(
5597
5705
  ({
5598
5706
  padding: t,
5599
5707
  margin: r,
@@ -5610,13 +5718,13 @@ const zs = ({
5610
5718
  {
5611
5719
  ref: h,
5612
5720
  className: c(
5613
- t && wn[t],
5614
- r && kn[r],
5615
- n && Cn[n],
5616
- s && Sn[s],
5617
- a && En[a],
5618
- l && zn[l],
5619
- o && Mn[o],
5721
+ t && zn[t],
5722
+ r && Tn[r],
5723
+ n && Mn[n],
5724
+ s && _n[s],
5725
+ a && $n[a],
5726
+ l && An[l],
5727
+ o && Dn[o],
5620
5728
  f
5621
5729
  ),
5622
5730
  ...p,
@@ -5624,9 +5732,9 @@ const zs = ({
5624
5732
  }
5625
5733
  )
5626
5734
  );
5627
- ot.displayName = "Box";
5628
- const Ms = ({ children: t, title: r, ...n }) => /* @__PURE__ */ i(
5629
- ot,
5735
+ ct.displayName = "Box";
5736
+ const Ds = ({ children: t, title: r, ...n }) => /* @__PURE__ */ i(
5737
+ ct,
5630
5738
  {
5631
5739
  background: "module",
5632
5740
  radius: "lg",
@@ -5640,7 +5748,7 @@ const Ms = ({ children: t, title: r, ...n }) => /* @__PURE__ */ i(
5640
5748
  ]
5641
5749
  }
5642
5750
  );
5643
- function Ts({
5751
+ function Ls({
5644
5752
  identifier: t,
5645
5753
  resourceLoader: r,
5646
5754
  framework: n = "react",
@@ -5649,7 +5757,7 @@ function Ts({
5649
5757
  componentProps: l,
5650
5758
  className: o
5651
5759
  }) {
5652
- const f = se(null), [d, p] = O(!0), [h, u] = O(!1), [b, v] = O(null), w = se(null);
5760
+ const f = se(null), [d, p] = j(!0), [h, u] = j(!1), [b, v] = j(null), w = se(null);
5653
5761
  se(null);
5654
5762
  const g = se(r);
5655
5763
  return g.current = r, G(() => {
@@ -5674,13 +5782,13 @@ function Ts({
5674
5782
  const x = f.current;
5675
5783
  if (x) {
5676
5784
  if (n === "svelte") {
5677
- const $ = b.default || b, S = new $({ target: x, props: l || {} });
5785
+ const _ = b.default || b, S = new _({ target: x, props: l || {} });
5678
5786
  return w.current = S, () => S.$destroy();
5679
5787
  }
5680
5788
  if (b.mount) {
5681
- const $ = b.mount({ container: x, props: l || {} });
5789
+ const _ = b.mount({ container: x, props: l || {} });
5682
5790
  return () => {
5683
- typeof $ == "function" ? $() : b.unmount?.(x);
5791
+ typeof _ == "function" ? _() : b.unmount?.(x);
5684
5792
  };
5685
5793
  }
5686
5794
  }
@@ -5692,7 +5800,7 @@ function Ts({
5692
5800
  n === "react" && !h && b && /* @__PURE__ */ e(b, { ...l })
5693
5801
  ] });
5694
5802
  }
5695
- class $s extends ft {
5803
+ class Ps extends ht {
5696
5804
  constructor() {
5697
5805
  super(...arguments), this.state = {
5698
5806
  hasError: !1,
@@ -5721,92 +5829,93 @@ class $s extends ft {
5721
5829
  }
5722
5830
  }
5723
5831
  export {
5724
- ss as AssistantCard,
5725
- rn as Avatar,
5726
- as as AvatarStack,
5727
- Vr as Badge,
5728
- ot as Box,
5832
+ is as ArtifactView,
5833
+ ds as AssistantCard,
5834
+ un as Avatar,
5835
+ us as AvatarStack,
5836
+ qr as Badge,
5837
+ ct as Box,
5729
5838
  le as Button,
5730
- Vn as ButtonGroup,
5731
- Ms as Card,
5732
- ls as ChannelBadge,
5839
+ Gn as ButtonGroup,
5840
+ Ds as Card,
5841
+ ms as ChannelBadge,
5733
5842
  ye as Checkbox,
5734
- zs as CommandPalette,
5735
- Xn as ConfirmDialog,
5736
- Fe as ContentLoading,
5843
+ As as CommandPalette,
5844
+ rs as ConfirmDialog,
5845
+ Be as ContentLoading,
5737
5846
  je as DatePicker,
5738
- pr as Dropdown,
5739
- Zn as EmptyState,
5740
- $s as ErrorBoundary,
5741
- Ts as FederatedResource,
5742
- Yt as FilterChip,
5743
- mr as FolderSelect,
5744
- Yn as Form,
5745
- Fr as FormSection,
5746
- Es as Heading,
5847
+ vr as Dropdown,
5848
+ ns as EmptyState,
5849
+ Ps as ErrorBoundary,
5850
+ Ls as FederatedResource,
5851
+ Xt as FilterChip,
5852
+ fr as FolderSelect,
5853
+ ts as Form,
5854
+ Br as FormSection,
5855
+ $s as Heading,
5747
5856
  jt as IDENTITY_TONE_COUNT,
5748
5857
  Z as Icon,
5749
- os as Image,
5750
- Qn as Kbd,
5751
- us as KpiCard,
5752
- Un as Link,
5753
- is as List,
5754
- cs as ListBulkAction,
5755
- Bn as MeetingGrid,
5756
- ds as MessageBubble,
5757
- st as Modal,
5758
- ms as Page,
5759
- ln as PageHeader,
5760
- Wn as PageToolbar,
5761
- Te as PageToolbarActions,
5762
- Rn as ParticipantTile,
5763
- Ze as Popover,
5764
- es as ProgressBar,
5765
- fs as RichText,
5766
- nt as SearchField,
5767
- br as SearchableTextField,
5768
- hs as SectionCaption,
5769
- xs as SectionDivider,
5770
- tr as SegmentedToggle,
5858
+ fs as Image,
5859
+ ss as Kbd,
5860
+ gs as KpiCard,
5861
+ Yn as Link,
5862
+ xs as List,
5863
+ hs as ListBulkAction,
5864
+ Un as MeetingGrid,
5865
+ bs as MessageBubble,
5866
+ at as Modal,
5867
+ ps as Page,
5868
+ xn as PageHeader,
5869
+ Xn as PageToolbar,
5870
+ _e as PageToolbarActions,
5871
+ Kn as ParticipantTile,
5872
+ Qe as Popover,
5873
+ as as ProgressBar,
5874
+ Ee as RichText,
5875
+ st as SearchField,
5876
+ gr as SearchableTextField,
5877
+ vs as SectionCaption,
5878
+ ys as SectionDivider,
5879
+ rr as SegmentedToggle,
5771
5880
  Me as Select,
5772
- bs as SettingsFrameProvider,
5773
- ps as SettingsPage,
5774
- vs as SettingsRow,
5775
- ys as SettingsSection,
5776
- Ss as SidebarMenu,
5777
- Ns as SourceChip,
5778
- ts as Spinner,
5779
- Qe as SplitButton,
5780
- rs as StatusDot,
5781
- ns as StepIndicator,
5782
- Lr as StorageInput,
5783
- gr as Switch,
5784
- Jn as TabBar,
5785
- Ue as Table,
5786
- Er as Tabs,
5881
+ Ns as SettingsFrameProvider,
5882
+ ks as SettingsPage,
5883
+ Cs as SettingsRow,
5884
+ Ss as SettingsSection,
5885
+ _s as SidebarMenu,
5886
+ Es as SourceChip,
5887
+ ls as Spinner,
5888
+ et as SplitButton,
5889
+ os as StatusDot,
5890
+ cs as StepIndicator,
5891
+ Pr as StorageInput,
5892
+ pr as Switch,
5893
+ es as TabBar,
5894
+ Ke as Table,
5895
+ zr as Tabs,
5787
5896
  fe as Text,
5788
- Oe as TextArea,
5897
+ Fe as TextArea,
5789
5898
  Ne as TextField,
5790
- Hn as VideoSurface,
5791
- Cs as View,
5899
+ Wn as VideoSurface,
5900
+ Ms as View,
5792
5901
  We as autofillProps,
5793
- hn as badgeColumn,
5794
- ws as booleanBadgeColumn,
5795
- Fn as catTone,
5902
+ vn as badgeColumn,
5903
+ zs as booleanBadgeColumn,
5904
+ qn as catTone,
5796
5905
  c as cn,
5797
- jn as createSizes,
5798
- Pn as createVariants,
5799
- Kn as dateFilterHandler,
5800
- On as identityDotClass,
5801
- Xe as identityPlateClass,
5802
- Ye as identityTone,
5803
- ks as labelsColumn,
5804
- Rt as normalizeText,
5805
- qn as resolveLucideIcon,
5806
- Gn as selectFilterHandler,
5807
- ze as text,
5808
- Ae as useAnchoredPosition,
5809
- mn as useSettingsFrame,
5810
- gs as useSettingsFrameHost
5906
+ Hn as createSizes,
5907
+ Rn as createVariants,
5908
+ Zn as dateFilterHandler,
5909
+ Vn as identityDotClass,
5910
+ Ze as identityPlateClass,
5911
+ Xe as identityTone,
5912
+ Ts as labelsColumn,
5913
+ Ht as normalizeText,
5914
+ Jn as resolveLucideIcon,
5915
+ Qn as selectFilterHandler,
5916
+ Te as text,
5917
+ Le as useAnchoredPosition,
5918
+ gn as useSettingsFrame,
5919
+ ws as useSettingsFrameHost
5811
5920
  };
5812
5921
  //# sourceMappingURL=index.js.map