@uxuissk/design-system 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as a, Fragment as ge } from "react/jsx-runtime";
2
- import pe, { forwardRef as Pe, useState as j, useCallback as X, useRef as V, useContext as lt, createContext as it, useEffect as te, useMemo as se, useId as mr } from "react";
3
- import { Loader2 as Re, X as le, EyeOff as an, Eye as ln, AlertCircle as Ie, CheckCircle2 as Ne, XCircle as hr, AlertTriangle as br, Info as pr, Minus as st, Check as me, Calendar as gr, ChevronsLeft as Wt, ChevronLeft as Fe, ChevronRight as fe, ChevronsRight as Mt, Clock as Lt, MoreHorizontal as vr, Search as Ye, ChevronUp as Ge, ChevronDown as Me, ChevronsUpDown as wt, Slash as sn, Dot as dn, Copy as Pt, Inbox as cn, Plus as Ct, Upload as Ve, Image as un, Film as fn, FileText as mn, File as xr, ZoomOut as hn, ZoomIn as yr, RotateCw as bn, ExternalLink as pn, Bell as wr, BellOff as gn, Heart as vn, ThumbsUp as xn, Star as yn, PanelLeftOpen as wn, PanelLeftClose as Nn, ArrowUpRight as Nr, ArrowDownRight as $r, Circle as Yt, Menu as Gt, FolderOpen as $n, Folder as Sn, SlidersHorizontal as kn, Columns3 as zn, GripVertical as Fn, Trash2 as Nt, Link as Wn, Unlink as Mn, Heading2 as Ln, Quote as Cn, Code as jn, AlignLeft as Dn, AlignCenter as An, AlignRight as En, List as Sr, ListOrdered as In, Bold as Tn, Italic as Bn, Underline as _n, Strikethrough as Hn, Undo as On, Redo as Rn, Minimize2 as Pn, Maximize2 as Yn, Grid as Gn } from "lucide-react";
4
- import Un, { createPortal as jt } from "react-dom";
2
+ import pe, { forwardRef as Pe, useState as j, useCallback as Q, useRef as ee, useContext as lt, createContext as it, useEffect as ne, useMemo as se, useId as mr } from "react";
3
+ import { Loader2 as Re, X as le, EyeOff as an, Eye as ln, AlertCircle as Ie, CheckCircle2 as Ne, XCircle as hr, AlertTriangle as br, Info as pr, Minus as st, Check as me, Calendar as gr, ChevronsLeft as Mt, ChevronLeft as Fe, ChevronRight as fe, ChevronsRight as Lt, Clock as Ct, MoreHorizontal as vr, Search as Ye, ChevronUp as Ge, ChevronDown as Me, ChevronsUpDown as Nt, Slash as sn, Dot as dn, Copy as Pt, Inbox as cn, Plus as jt, Upload as Ve, Image as un, Film as fn, FileText as mn, File as xr, ZoomOut as hn, ZoomIn as yr, RotateCw as bn, ExternalLink as pn, Bell as wr, BellOff as gn, Heart as vn, ThumbsUp as xn, Star as yn, PanelLeftOpen as wn, PanelLeftClose as Nn, ArrowUpRight as Nr, ArrowDownRight as $r, Circle as Yt, Menu as Gt, FolderOpen as $n, Folder as Sn, SlidersHorizontal as kn, Columns3 as zn, GripVertical as Fn, Trash2 as $t, Link as Wn, Unlink as Mn, Heading2 as Ln, Quote as Cn, Code as jn, AlignLeft as Dn, AlignCenter as An, AlignRight as En, List as Sr, ListOrdered as In, Bold as Tn, Italic as Bn, Underline as _n, Strikethrough as Hn, Undo as On, Redo as Rn, Minimize2 as Pn, Maximize2 as Yn, Grid as Gn } from "lucide-react";
4
+ import Un, { createPortal as dt } from "react-dom";
5
5
  const Kn = {
6
6
  sm: "h-8 px-3 gap-1.5",
7
7
  // 32px
@@ -127,7 +127,7 @@ function bi({
127
127
  const Fr = {
128
128
  sm: {
129
129
  wrapper: "h-9 px-2.5 gap-1.5",
130
- textStyle: { fontFamily: "var(--font-caption)", fontSize: "var(--text-caption)", fontWeight: "var(--weight-caption)" },
130
+ textStyle: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" },
131
131
  icon: 14
132
132
  },
133
133
  md: {
@@ -189,23 +189,23 @@ const Fr = {
189
189
  fullWidth: p = !0,
190
190
  required: b = !1,
191
191
  showCount: g = !1,
192
- onClear: N,
192
+ onClear: $,
193
193
  disabled: k,
194
194
  type: m = "text",
195
195
  value: y,
196
196
  defaultValue: w,
197
197
  onChange: z,
198
198
  className: W = "",
199
- ...L
199
+ ...M
200
200
  }, F) => {
201
- const [M, I] = j(!1), [C, $] = j(!1), [S, A] = j(w ?? ""), E = y !== void 0 ? y : S, H = String(E).length, T = L.maxLength, B = Fr[l], U = Wr[i], ee = n ? "error" : d, oe = m === "password", ae = oe && C ? "text" : m, q = X(
202
- (_) => {
203
- A(_.target.value), z == null || z(_);
201
+ const [L, I] = j(!1), [C, N] = j(!1), [S, A] = j(w ?? ""), E = y !== void 0 ? y : S, O = String(E).length, _ = M.maxLength, B = Fr[l], K = Wr[i], H = n ? "error" : d, X = m === "password", ae = X && C ? "text" : m, q = Q(
202
+ (T) => {
203
+ A(T.target.value), z == null || z(T);
204
204
  },
205
205
  [z]
206
- ), re = X(() => {
207
- A(""), N == null || N();
208
- }, [N]), R = String(E).length > 0;
206
+ ), re = Q(() => {
207
+ A(""), $ == null || $();
208
+ }, [$]), P = String(E).length > 0;
209
209
  return /* @__PURE__ */ a("div", { className: `${p ? "w-full" : "inline-flex flex-col"} ${W}`, children: [
210
210
  t && /* @__PURE__ */ a("label", { className: "block mb-1.5 text-foreground", children: [
211
211
  t,
@@ -216,11 +216,11 @@ const Fr = {
216
216
  {
217
217
  className: `flex items-center rounded-[var(--radius-md)] transition-all duration-150
218
218
  ${B.wrapper}
219
- ${U.base}
220
- ${k ? "" : U.hover}
221
- ${M && !k ? U.focus : ""}
219
+ ${K.base}
220
+ ${k ? "" : K.hover}
221
+ ${L && !k ? K.focus : ""}
222
222
  ${k ? "opacity-50 cursor-not-allowed" : ""}
223
- ${Mr[ee]}
223
+ ${Mr[H]}
224
224
  `,
225
225
  children: [
226
226
  c && /* @__PURE__ */ e("span", { className: "flex-shrink-0 text-muted-foreground", children: c }),
@@ -237,11 +237,11 @@ const Fr = {
237
237
  onBlur: () => I(!1),
238
238
  className: "flex-1 min-w-0 bg-transparent border-none outline-none text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed",
239
239
  style: B.textStyle,
240
- ...L
240
+ ...M
241
241
  }
242
242
  ),
243
243
  h && /* @__PURE__ */ e("span", { className: "flex-shrink-0 text-muted-foreground", style: et, children: h }),
244
- v && R && !k && /* @__PURE__ */ e(
244
+ v && P && !k && /* @__PURE__ */ e(
245
245
  "button",
246
246
  {
247
247
  type: "button",
@@ -250,32 +250,32 @@ const Fr = {
250
250
  children: /* @__PURE__ */ e(le, { size: B.icon - 2 })
251
251
  }
252
252
  ),
253
- oe && x && /* @__PURE__ */ e(
253
+ X && x && /* @__PURE__ */ e(
254
254
  "button",
255
255
  {
256
256
  type: "button",
257
- onClick: () => $(!C),
257
+ onClick: () => N(!C),
258
258
  className: "flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer p-0.5",
259
259
  children: C ? /* @__PURE__ */ e(an, { size: B.icon }) : /* @__PURE__ */ e(ln, { size: B.icon })
260
260
  }
261
261
  ),
262
- s && !oe && /* @__PURE__ */ e("span", { className: "flex-shrink-0 text-muted-foreground", children: s }),
262
+ s && !X && /* @__PURE__ */ e("span", { className: "flex-shrink-0 text-muted-foreground", children: s }),
263
263
  u && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: /* @__PURE__ */ e("span", { className: "block w-4 h-4 border-2 border-muted-foreground border-t-transparent rounded-full animate-spin" }) })
264
264
  ]
265
265
  }
266
266
  ),
267
- g && T && /* @__PURE__ */ a("div", { className: "flex justify-end mt-1", style: { fontFamily: "var(--font-label)", fontSize: "var(--text-caption)", color: H >= T ? "var(--destructive)" : "var(--muted-foreground)" }, children: [
268
- H,
267
+ g && _ && /* @__PURE__ */ a("div", { className: "flex justify-end mt-1", style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", color: O >= _ ? "var(--destructive)" : "var(--muted-foreground)" }, children: [
268
+ O,
269
269
  " / ",
270
- T
270
+ _
271
271
  ] }),
272
272
  (r || n || o) && /* @__PURE__ */ a("div", { className: "mt-1.5 flex items-center gap-1", children: [
273
- ee === "error" && /* @__PURE__ */ e(Ie, { size: 12, className: "text-destructive flex-shrink-0" }),
274
- ee === "success" && /* @__PURE__ */ e(Ne, { size: 12, className: "text-chart-2 flex-shrink-0" }),
273
+ H === "error" && /* @__PURE__ */ e(Ie, { size: 12, className: "text-destructive flex-shrink-0" }),
274
+ H === "success" && /* @__PURE__ */ e(Ne, { size: 12, className: "text-chart-2 flex-shrink-0" }),
275
275
  /* @__PURE__ */ e(
276
276
  "span",
277
277
  {
278
- className: `${ee === "error" ? "text-destructive" : ee === "success" ? "text-chart-2" : "text-muted-foreground"}`,
278
+ className: `${H === "error" ? "text-destructive" : H === "success" ? "text-chart-2" : "text-muted-foreground"}`,
279
279
  style: et,
280
280
  children: n || o || r
281
281
  }
@@ -304,7 +304,7 @@ const Qn = Pe(
304
304
  className: p = "",
305
305
  ...b
306
306
  }, g) => {
307
- const [N, k] = j(!1), [m, y] = j(String(x ?? "").length), w = Fr[l], z = Wr[i], W = n ? "error" : d, L = X(
307
+ const [$, k] = j(!1), [m, y] = j(String(x ?? "").length), w = Fr[l], z = Wr[i], W = n ? "error" : d, M = Q(
308
308
  (F) => {
309
309
  y(F.target.value.length), u == null || u(F);
310
310
  },
@@ -321,7 +321,7 @@ const Qn = Pe(
321
321
  className: `transition-all duration-150 overflow-hidden rounded-[var(--radius-md)]
322
322
  ${z.base}
323
323
  ${h ? "" : z.hover}
324
- ${N && !h ? z.focus : ""}
324
+ ${$ && !h ? z.focus : ""}
325
325
  ${h ? "opacity-50 cursor-not-allowed" : ""}
326
326
  ${Mr[W]}
327
327
  `,
@@ -334,7 +334,7 @@ const Qn = Pe(
334
334
  value: v,
335
335
  defaultValue: x,
336
336
  maxLength: s,
337
- onChange: L,
337
+ onChange: M,
338
338
  onFocus: () => k(!0),
339
339
  onBlur: () => k(!1),
340
340
  className: "w-full min-h-[100px] px-3 py-2.5 bg-transparent border-none outline-none text-foreground placeholder:text-muted-foreground resize-y disabled:cursor-not-allowed",
@@ -346,7 +346,7 @@ const Qn = Pe(
346
346
  "div",
347
347
  {
348
348
  className: "flex justify-end px-3 py-1.5 border-t border-border text-muted-foreground bg-muted/20",
349
- style: { fontFamily: "var(--font-label)", fontSize: "var(--text-caption)", fontWeight: "var(--weight-label)" },
349
+ style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" },
350
350
  children: [
351
351
  m,
352
352
  s ? ` / ${s}` : "",
@@ -415,7 +415,7 @@ const De = {
415
415
  }
416
416
  };
417
417
  function eo() {
418
- const [t, r] = j([]), n = V(!1);
418
+ const [t, r] = j([]), n = ee(!1);
419
419
  return n.current || (n.current = !0, Cr.push(r)), t.length === 0 ? null : /* @__PURE__ */ e("div", { className: "fixed bottom-4 right-4 z-[200] flex flex-col gap-2 max-w-sm w-full pointer-events-none", children: t.map((o) => /* @__PURE__ */ e("div", { className: "pointer-events-auto animate-in slide-in-from-right fade-in duration-300", children: /* @__PURE__ */ e(Lr, { variant: o.variant, title: o.title, dismissible: !0, onDismiss: () => De.dismiss(o.id), children: o.message }) }, o.id)) });
420
420
  }
421
421
  const to = {
@@ -515,7 +515,7 @@ const oo = {
515
515
  lg: {
516
516
  box: "w-6 h-6",
517
517
  icon: 14,
518
- labelStyle: { fontFamily: "var(--font-label)", fontSize: "var(--text-caption)", fontWeight: "var(--weight-label)" },
518
+ labelStyle: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" },
519
519
  descStyle: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" }
520
520
  }
521
521
  };
@@ -536,7 +536,7 @@ function ot({
536
536
  if (c) return;
537
537
  const k = !u;
538
538
  t === void 0 && x(k), o == null || o(k);
539
- }, N = u || r;
539
+ }, $ = u || r;
540
540
  return /* @__PURE__ */ a("div", { className: `inline-flex items-start gap-2.5 ${c ? "opacity-50" : ""} ${f}`, children: [
541
541
  /* @__PURE__ */ e(
542
542
  "button",
@@ -547,7 +547,7 @@ function ot({
547
547
  disabled: c,
548
548
  onClick: g,
549
549
  className: `${p.box} flex-shrink-0 rounded-[var(--radius-sm)] border-2 transition-all flex items-center justify-center cursor-pointer mt-0.5
550
- ${N ? "bg-primary border-primary text-primary-foreground" : s ? "border-destructive bg-card" : "border-border bg-card hover:border-primary/50"}
550
+ ${$ ? "bg-primary border-primary text-primary-foreground" : s ? "border-destructive bg-card" : "border-border bg-card hover:border-primary/50"}
551
551
  ${c ? "!cursor-not-allowed" : ""}
552
552
  focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 outline-none`,
553
553
  children: r ? /* @__PURE__ */ e(st, { size: p.icon, strokeWidth: 3 }) : u ? /* @__PURE__ */ e(me, { size: p.icon, strokeWidth: 3 }) : null
@@ -591,7 +591,7 @@ const jr = it(null), ao = {
591
591
  lg: {
592
592
  outer: "w-6 h-6",
593
593
  inner: "w-2.5 h-2.5",
594
- labelStyle: { fontFamily: "var(--font-caption)", fontSize: "var(--text-caption)", fontWeight: "var(--weight-label)" },
594
+ labelStyle: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" },
595
595
  descStyle: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" }
596
596
  }
597
597
  };
@@ -650,7 +650,7 @@ function xi({
650
650
  f && /* @__PURE__ */ e("span", { className: "text-destructive block mt-1.5", style: { fontFamily: "var(--font-button)", fontSize: "var(--text-button)", fontWeight: "var(--weight-label)" }, children: f })
651
651
  ] }) });
652
652
  }
653
- const lo = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], mt = [
653
+ const lo = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], ht = [
654
654
  "January",
655
655
  "February",
656
656
  "March",
@@ -718,9 +718,9 @@ const so = {
718
718
  lg: {
719
719
  trigger: "h-12 px-4",
720
720
  text: {
721
- fontFamily: "var(--font-caption)",
722
- fontSize: "var(--text-caption)",
723
- fontWeight: "var(--weight-caption)"
721
+ fontFamily: "var(--font-label)",
722
+ fontSize: "var(--text-label)",
723
+ fontWeight: "var(--weight-label)"
724
724
  },
725
725
  icon: 18,
726
726
  cell: "w-10 h-10"
@@ -753,50 +753,50 @@ function yi({
753
753
  required: p = !1,
754
754
  clearable: b = !1,
755
755
  showTime: g = !1,
756
- minDate: N,
756
+ minDate: $,
757
757
  maxDate: k,
758
758
  disabledDates: m,
759
759
  showToday: y = !0,
760
760
  footer: w,
761
761
  fullWidth: z = !1
762
762
  }) {
763
- const [W, L] = j(!1), [F, M] = j(() => t ?? /* @__PURE__ */ new Date()), [I, C] = j("days"), [$, S] = j(null), [A, E] = j(() => t ? t.getHours() : 0), [H, T] = j(() => t ? t.getMinutes() : 0), B = V(null), U = so[h];
764
- te(() => {
765
- function P(Q) {
766
- B.current && !B.current.contains(Q.target) && (L(!1), C("days"));
763
+ const [W, M] = j(!1), [F, L] = j(() => t ?? /* @__PURE__ */ new Date()), [I, C] = j("days"), [N, S] = j(null), [A, E] = j(() => t ? t.getHours() : 0), [O, _] = j(() => t ? t.getMinutes() : 0), B = ee(null), K = so[h];
764
+ ne(() => {
765
+ function Y(te) {
766
+ B.current && !B.current.contains(te.target) && (M(!1), C("days"));
767
767
  }
768
- return W && document.addEventListener("mousedown", P), () => document.removeEventListener("mousedown", P);
768
+ return W && document.addEventListener("mousedown", Y), () => document.removeEventListener("mousedown", Y);
769
769
  }, [W]), se(
770
770
  () => Xt(F.getFullYear(), F.getMonth()),
771
771
  [F]
772
772
  );
773
- const ee = se(() => /* @__PURE__ */ new Date(), []), oe = () => M(new Date(F.getFullYear(), F.getMonth() - 1, 1)), ae = () => M(new Date(F.getFullYear(), F.getMonth() + 1, 1)), q = () => M(new Date(F.getFullYear() - 1, F.getMonth(), 1)), re = () => M(new Date(F.getFullYear() + 1, F.getMonth(), 1)), R = X(
774
- (P) => {
775
- if (!Zt(P, N, k, m))
773
+ const H = se(() => /* @__PURE__ */ new Date(), []), X = () => L(new Date(F.getFullYear(), F.getMonth() - 1, 1)), ae = () => L(new Date(F.getFullYear(), F.getMonth() + 1, 1)), q = () => L(new Date(F.getFullYear() - 1, F.getMonth(), 1)), re = () => L(new Date(F.getFullYear() + 1, F.getMonth(), 1)), P = Q(
774
+ (Y) => {
775
+ if (!Zt(Y, $, k, m))
776
776
  if (l === "single") {
777
- let Q = new Date(P);
778
- g && Q.setHours(A, H), n == null || n(Q), g || (L(!1), C("days"));
777
+ let te = new Date(Y);
778
+ g && te.setHours(A, O), n == null || n(te), g || (M(!1), C("days"));
779
779
  } else {
780
- const Q = r == null ? void 0 : r.start, he = r == null ? void 0 : r.end;
781
- !Q || Q && he ? o == null || o({ start: P, end: null }) : (P < Q ? o == null || o({ start: P, end: Q }) : o == null || o({ start: Q, end: P }), L(!1), C("days"));
780
+ const te = r == null ? void 0 : r.start, he = r == null ? void 0 : r.end;
781
+ !te || te && he ? o == null || o({ start: Y, end: null }) : (Y < te ? o == null || o({ start: Y, end: te }) : o == null || o({ start: te, end: Y }), M(!1), C("days"));
782
782
  }
783
783
  },
784
- [l, n, o, r, N, k, m, g, A, H]
785
- ), _ = (P) => {
786
- P.stopPropagation(), l === "single" ? n == null || n(null) : o == null || o({ start: null, end: null });
787
- }, Z = () => {
788
- const P = /* @__PURE__ */ new Date();
789
- if (M(P), l === "single") {
790
- const Q = new Date(P);
791
- g && Q.setHours(A, H), n == null || n(Q), g || (L(!1), C("days"));
784
+ [l, n, o, r, $, k, m, g, A, O]
785
+ ), T = (Y) => {
786
+ Y.stopPropagation(), l === "single" ? n == null || n(null) : o == null || o({ start: null, end: null });
787
+ }, J = () => {
788
+ const Y = /* @__PURE__ */ new Date();
789
+ if (L(Y), l === "single") {
790
+ const te = new Date(Y);
791
+ g && te.setHours(A, O), n == null || n(te), g || (M(!1), C("days"));
792
792
  }
793
- }, K = () => {
793
+ }, Z = () => {
794
794
  if (t) {
795
- const P = new Date(t);
796
- P.setHours(A, H), n == null || n(P);
795
+ const Y = new Date(t);
796
+ Y.setHours(A, O), n == null || n(Y);
797
797
  }
798
- L(!1), C("days");
799
- }, ue = se(() => l === "single" ? qe(t, g) : r != null && r.start && (r != null && r.end) ? `${qe(r.start)} – ${qe(r.end)}` : r != null && r.start ? `${qe(r.start)} – ...` : "", [l, t, r, g]), we = l === "single" ? !!t : !!(r != null && r.start || r != null && r.end), Te = x === "error" ? /* @__PURE__ */ e(Ie, { size: U.icon, className: "text-destructive flex-shrink-0" }) : x === "success" ? /* @__PURE__ */ e(Ne, { size: U.icon, className: "text-chart-2 flex-shrink-0" }) : null, Y = x === "error" ? s : x === "success" ? f : c, ke = x === "error" ? "text-destructive" : x === "success" ? "text-chart-2" : "text-muted-foreground", Be = {
798
+ M(!1), C("days");
799
+ }, ue = se(() => l === "single" ? qe(t, g) : r != null && r.start && (r != null && r.end) ? `${qe(r.start)} – ${qe(r.end)}` : r != null && r.start ? `${qe(r.start)} – ...` : "", [l, t, r, g]), we = l === "single" ? !!t : !!(r != null && r.start || r != null && r.end), Te = x === "error" ? /* @__PURE__ */ e(Ie, { size: K.icon, className: "text-destructive flex-shrink-0" }) : x === "success" ? /* @__PURE__ */ e(Ne, { size: K.icon, className: "text-chart-2 flex-shrink-0" }) : null, G = x === "error" ? s : x === "success" ? f : c, ke = x === "error" ? "text-destructive" : x === "success" ? "text-chart-2" : "text-muted-foreground", Be = {
800
800
  fontFamily: "var(--font-label)",
801
801
  fontSize: "var(--text-label)",
802
802
  fontWeight: "var(--weight-label)"
@@ -818,32 +818,32 @@ function yi({
818
818
  "button",
819
819
  {
820
820
  type: "button",
821
- onClick: () => !u && L(!W),
821
+ onClick: () => !u && M(!W),
822
822
  disabled: u,
823
823
  className: `
824
824
  w-full flex items-center gap-2 rounded-[var(--radius-md)] transition-all cursor-pointer
825
- ${U.trigger}
825
+ ${K.trigger}
826
826
  ${co[v]}
827
827
  ${uo[x]}
828
828
  ${u ? "opacity-50 cursor-not-allowed" : "hover:border-primary/50"}
829
829
  `,
830
- style: U.text,
830
+ style: K.text,
831
831
  children: [
832
- /* @__PURE__ */ e(gr, { size: U.icon, className: "text-muted-foreground flex-shrink-0" }),
832
+ /* @__PURE__ */ e(gr, { size: K.icon, className: "text-muted-foreground flex-shrink-0" }),
833
833
  /* @__PURE__ */ e("span", { className: `flex-1 text-left truncate ${we ? "text-foreground" : "text-muted-foreground"}`, children: we ? ue : d || (l === "range" ? "Select date range…" : "Select date…") }),
834
834
  Te,
835
835
  b && we && !u && /* @__PURE__ */ e(
836
836
  "span",
837
837
  {
838
- onClick: _,
838
+ onClick: T,
839
839
  className: "text-muted-foreground hover:text-foreground cursor-pointer",
840
- children: /* @__PURE__ */ e(le, { size: U.icon - 2 })
840
+ children: /* @__PURE__ */ e(le, { size: K.icon - 2 })
841
841
  }
842
842
  )
843
843
  ]
844
844
  }
845
845
  ),
846
- Y && /* @__PURE__ */ e("p", { className: `mt-1.5 ${ke}`, style: { fontFamily: "var(--font-button)", fontSize: "var(--text-button)", fontWeight: "var(--weight-label)" }, children: Y }),
846
+ G && /* @__PURE__ */ e("p", { className: `mt-1.5 ${ke}`, style: { fontFamily: "var(--font-button)", fontSize: "var(--text-button)", fontWeight: "var(--weight-label)" }, children: G }),
847
847
  W && /* @__PURE__ */ a(
848
848
  "div",
849
849
  {
@@ -852,8 +852,8 @@ function yi({
852
852
  children: [
853
853
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between px-4 py-3 border-b border-border bg-card", children: [
854
854
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
855
- /* @__PURE__ */ e("button", { onClick: q, className: "p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer", title: "Previous year", children: /* @__PURE__ */ e(Wt, { size: 16 }) }),
856
- /* @__PURE__ */ e("button", { onClick: oe, className: "p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer", title: "Previous month", children: /* @__PURE__ */ e(Fe, { size: 16 }) })
855
+ /* @__PURE__ */ e("button", { onClick: q, className: "p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer", title: "Previous year", children: /* @__PURE__ */ e(Mt, { size: 16 }) }),
856
+ /* @__PURE__ */ e("button", { onClick: X, className: "p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer", title: "Previous month", children: /* @__PURE__ */ e(Fe, { size: 16 }) })
857
857
  ] }),
858
858
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
859
859
  /* @__PURE__ */ e(
@@ -862,7 +862,7 @@ function yi({
862
862
  onClick: () => C(I === "months" ? "days" : "months"),
863
863
  className: "px-2 py-1 rounded-[var(--radius-sm)] hover:bg-muted text-foreground transition-colors cursor-pointer",
864
864
  style: ie,
865
- children: mt[F.getMonth()]
865
+ children: ht[F.getMonth()]
866
866
  }
867
867
  ),
868
868
  /* @__PURE__ */ e(
@@ -877,75 +877,75 @@ function yi({
877
877
  ] }),
878
878
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
879
879
  /* @__PURE__ */ e("button", { onClick: ae, className: "p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer", title: "Next month", children: /* @__PURE__ */ e(fe, { size: 16 }) }),
880
- /* @__PURE__ */ e("button", { onClick: re, className: "p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer", title: "Next year", children: /* @__PURE__ */ e(Mt, { size: 16 }) })
880
+ /* @__PURE__ */ e("button", { onClick: re, className: "p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer", title: "Next year", children: /* @__PURE__ */ e(Lt, { size: 16 }) })
881
881
  ] })
882
882
  ] }),
883
- I === "days" && /* @__PURE__ */ e("div", { className: `p-3 ${l === "range" ? "flex gap-3" : ""}`, children: (l === "range" ? [0, 1] : [0]).map((P) => {
884
- const Q = new Date(F.getFullYear(), F.getMonth() + P, 1), he = Xt(Q.getFullYear(), Q.getMonth());
883
+ I === "days" && /* @__PURE__ */ e("div", { className: `p-3 ${l === "range" ? "flex gap-3" : ""}`, children: (l === "range" ? [0, 1] : [0]).map((Y) => {
884
+ const te = new Date(F.getFullYear(), F.getMonth() + Y, 1), he = Xt(te.getFullYear(), te.getMonth());
885
885
  return /* @__PURE__ */ a("div", { className: "flex-1", children: [
886
- P > 0 && /* @__PURE__ */ a("div", { className: "text-center mb-2 text-foreground", style: ie, children: [
887
- mt[Q.getMonth()],
886
+ Y > 0 && /* @__PURE__ */ a("div", { className: "text-center mb-2 text-foreground", style: ie, children: [
887
+ ht[te.getMonth()],
888
888
  " ",
889
- Q.getFullYear()
889
+ te.getFullYear()
890
890
  ] }),
891
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 mb-1", children: lo.map((ne) => /* @__PURE__ */ e(
891
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 mb-1", children: lo.map((oe) => /* @__PURE__ */ e(
892
892
  "div",
893
893
  {
894
894
  className: "text-center text-muted-foreground py-1",
895
895
  style: ve,
896
- children: ne
896
+ children: oe
897
897
  },
898
- `${P}-${ne}`
898
+ `${Y}-${oe}`
899
899
  )) }),
900
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7", children: he.map((ne, Ue) => {
901
- if (!ne) return /* @__PURE__ */ e("div", {}, `empty-${P}-${Ue}`);
902
- const Ke = Zt(ne, N, k, m), dt = Oe(ne, ee), Ce = l === "single" ? t && Oe(ne, t) : (r == null ? void 0 : r.start) && Oe(ne, r.start) || (r == null ? void 0 : r.end) && Oe(ne, r.end), ct = l === "range" && (Kt(ne, (r == null ? void 0 : r.start) ?? null, (r == null ? void 0 : r.end) ?? null) || (r == null ? void 0 : r.start) && !(r != null && r.end) && $ && Kt(
903
- ne,
900
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7", children: he.map((oe, Ue) => {
901
+ if (!oe) return /* @__PURE__ */ e("div", {}, `empty-${Y}-${Ue}`);
902
+ const Ke = Zt(oe, $, k, m), ct = Oe(oe, H), Ce = l === "single" ? t && Oe(oe, t) : (r == null ? void 0 : r.start) && Oe(oe, r.start) || (r == null ? void 0 : r.end) && Oe(oe, r.end), ut = l === "range" && (Kt(oe, (r == null ? void 0 : r.start) ?? null, (r == null ? void 0 : r.end) ?? null) || (r == null ? void 0 : r.start) && !(r != null && r.end) && N && Kt(
903
+ oe,
904
904
  r.start,
905
- $ > r.start ? $ : null
905
+ N > r.start ? N : null
906
906
  ));
907
907
  return /* @__PURE__ */ e(
908
908
  "button",
909
909
  {
910
- onClick: () => R(ne),
911
- onMouseEnter: () => l === "range" && S(ne),
910
+ onClick: () => P(oe),
911
+ onMouseEnter: () => l === "range" && S(oe),
912
912
  disabled: Ke,
913
913
  className: `
914
- ${U.cell} flex items-center justify-center rounded-[var(--radius-sm)] transition-all cursor-pointer
914
+ ${K.cell} flex items-center justify-center rounded-[var(--radius-sm)] transition-all cursor-pointer
915
915
  ${Ke ? "opacity-30 cursor-not-allowed" : "hover:bg-muted"}
916
916
  ${Ce ? "bg-primary text-primary-foreground hover:bg-primary/90" : ""}
917
- ${ct && !Ce ? "bg-accent text-accent-foreground" : ""}
918
- ${dt && !Ce ? "border border-primary text-primary" : ""}
917
+ ${ut && !Ce ? "bg-accent text-accent-foreground" : ""}
918
+ ${ct && !Ce ? "border border-primary text-primary" : ""}
919
919
  `,
920
920
  style: ie,
921
- children: ne.getDate()
921
+ children: oe.getDate()
922
922
  },
923
- `${P}-${ne.getTime()}`
923
+ `${Y}-${oe.getTime()}`
924
924
  );
925
925
  }) })
926
- ] }, P);
926
+ ] }, Y);
927
927
  }) }),
928
- I === "months" && /* @__PURE__ */ e("div", { className: "p-3 grid grid-cols-3 gap-2", children: mt.map((P, Q) => /* @__PURE__ */ e(
928
+ I === "months" && /* @__PURE__ */ e("div", { className: "p-3 grid grid-cols-3 gap-2", children: ht.map((Y, te) => /* @__PURE__ */ e(
929
929
  "button",
930
930
  {
931
931
  onClick: () => {
932
- M(new Date(F.getFullYear(), Q, 1)), C("days");
932
+ L(new Date(F.getFullYear(), te, 1)), C("days");
933
933
  },
934
934
  className: `
935
935
  py-2.5 rounded-[var(--radius-md)] transition-all cursor-pointer
936
- ${F.getMonth() === Q ? "bg-primary text-primary-foreground" : "text-foreground hover:bg-muted"}
936
+ ${F.getMonth() === te ? "bg-primary text-primary-foreground" : "text-foreground hover:bg-muted"}
937
937
  `,
938
938
  style: ie,
939
- children: P.substring(0, 3)
939
+ children: Y.substring(0, 3)
940
940
  },
941
- P
941
+ Y
942
942
  )) }),
943
943
  I === "years" && /* @__PURE__ */ a("div", { className: "p-3", children: [
944
944
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between mb-3", children: [
945
945
  /* @__PURE__ */ e(
946
946
  "button",
947
947
  {
948
- onClick: () => M(new Date(F.getFullYear() - 12, F.getMonth(), 1)),
948
+ onClick: () => L(new Date(F.getFullYear() - 12, F.getMonth(), 1)),
949
949
  className: "p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",
950
950
  children: /* @__PURE__ */ e(Fe, { size: 16 })
951
951
  }
@@ -958,31 +958,31 @@ function yi({
958
958
  /* @__PURE__ */ e(
959
959
  "button",
960
960
  {
961
- onClick: () => M(new Date(F.getFullYear() + 12, F.getMonth(), 1)),
961
+ onClick: () => L(new Date(F.getFullYear() + 12, F.getMonth(), 1)),
962
962
  className: "p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",
963
963
  children: /* @__PURE__ */ e(fe, { size: 16 })
964
964
  }
965
965
  )
966
966
  ] }),
967
- /* @__PURE__ */ e("div", { className: "grid grid-cols-4 gap-2", children: Array.from({ length: 12 }, (P, Q) => Le + Q).map((P) => /* @__PURE__ */ e(
967
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-4 gap-2", children: Array.from({ length: 12 }, (Y, te) => Le + te).map((Y) => /* @__PURE__ */ e(
968
968
  "button",
969
969
  {
970
970
  onClick: () => {
971
- M(new Date(P, F.getMonth(), 1)), C("months");
971
+ L(new Date(Y, F.getMonth(), 1)), C("months");
972
972
  },
973
973
  className: `
974
974
  py-2.5 rounded-[var(--radius-md)] transition-all cursor-pointer
975
- ${F.getFullYear() === P ? "bg-primary text-primary-foreground" : "text-foreground hover:bg-muted"}
976
- ${P === ee.getFullYear() && F.getFullYear() !== P ? "border border-primary text-primary" : ""}
975
+ ${F.getFullYear() === Y ? "bg-primary text-primary-foreground" : "text-foreground hover:bg-muted"}
976
+ ${Y === H.getFullYear() && F.getFullYear() !== Y ? "border border-primary text-primary" : ""}
977
977
  `,
978
978
  style: ie,
979
- children: P
979
+ children: Y
980
980
  },
981
- P
981
+ Y
982
982
  )) })
983
983
  ] }),
984
984
  g && l === "single" && I === "days" && /* @__PURE__ */ a("div", { className: "px-4 py-3 border-t border-border flex items-center gap-3", children: [
985
- /* @__PURE__ */ e(Lt, { size: 14, className: "text-muted-foreground" }),
985
+ /* @__PURE__ */ e(Ct, { size: 14, className: "text-muted-foreground" }),
986
986
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
987
987
  /* @__PURE__ */ e(
988
988
  "input",
@@ -991,7 +991,7 @@ function yi({
991
991
  min: 0,
992
992
  max: 23,
993
993
  value: String(A).padStart(2, "0"),
994
- onChange: (P) => E(Math.max(0, Math.min(23, Number(P.target.value)))),
994
+ onChange: (Y) => E(Math.max(0, Math.min(23, Number(Y.target.value)))),
995
995
  className: "w-10 text-center bg-input-background border border-border rounded-[var(--radius-sm)] py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-ring/30",
996
996
  style: ie
997
997
  }
@@ -1003,8 +1003,8 @@ function yi({
1003
1003
  type: "number",
1004
1004
  min: 0,
1005
1005
  max: 59,
1006
- value: String(H).padStart(2, "0"),
1007
- onChange: (P) => T(Math.max(0, Math.min(59, Number(P.target.value)))),
1006
+ value: String(O).padStart(2, "0"),
1007
+ onChange: (Y) => _(Math.max(0, Math.min(59, Number(Y.target.value)))),
1008
1008
  className: "w-10 text-center bg-input-background border border-border rounded-[var(--radius-sm)] py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-ring/30",
1009
1009
  style: ie
1010
1010
  }
@@ -1013,7 +1013,7 @@ function yi({
1013
1013
  /* @__PURE__ */ e(
1014
1014
  "button",
1015
1015
  {
1016
- onClick: K,
1016
+ onClick: Z,
1017
1017
  className: "ml-auto px-3 py-1 rounded-[var(--radius-md)] bg-primary text-primary-foreground hover:bg-primary/90 transition-colors cursor-pointer",
1018
1018
  style: ie,
1019
1019
  children: "Apply"
@@ -1024,7 +1024,7 @@ function yi({
1024
1024
  y ? /* @__PURE__ */ e(
1025
1025
  "button",
1026
1026
  {
1027
- onClick: Z,
1027
+ onClick: J,
1028
1028
  className: "text-primary hover:underline cursor-pointer",
1029
1029
  style: ie,
1030
1030
  children: "Today"
@@ -1034,7 +1034,7 @@ function yi({
1034
1034
  "button",
1035
1035
  {
1036
1036
  onClick: () => {
1037
- L(!1), C("days");
1037
+ M(!1), C("days");
1038
1038
  },
1039
1039
  className: "text-muted-foreground hover:text-foreground cursor-pointer",
1040
1040
  style: ie,
@@ -1066,8 +1066,8 @@ function mo({
1066
1066
  showCloseButton: s = !0,
1067
1067
  className: f = ""
1068
1068
  }) {
1069
- const h = V(null);
1070
- return te(() => {
1069
+ const h = ee(null);
1070
+ return ne(() => {
1071
1071
  if (!t) return;
1072
1072
  const v = (x) => {
1073
1073
  x.key === "Escape" && r();
@@ -1075,7 +1075,7 @@ function mo({
1075
1075
  return document.addEventListener("keydown", v), document.body.style.overflow = "hidden", () => {
1076
1076
  document.removeEventListener("keydown", v), document.body.style.overflow = "";
1077
1077
  };
1078
- }, [t, r]), te(() => {
1078
+ }, [t, r]), ne(() => {
1079
1079
  t && h.current && h.current.focus();
1080
1080
  }, [t]), t ? /* @__PURE__ */ a("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
1081
1081
  /* @__PURE__ */ e(
@@ -1244,17 +1244,17 @@ function Ni({
1244
1244
  showPageInfo: p = !1,
1245
1245
  showItemsInfo: b = !1,
1246
1246
  prevLabel: g,
1247
- nextLabel: N
1247
+ nextLabel: $
1248
1248
  }) {
1249
- const k = po(t, r, o), m = ho[v], y = bo[x], w = X(
1250
- (M) => {
1251
- !u && M >= 1 && M <= r && n(M);
1249
+ const k = po(t, r, o), m = ho[v], y = bo[x], w = Q(
1250
+ (L) => {
1251
+ !u && L >= 1 && L <= r && n(L);
1252
1252
  },
1253
1253
  [u, r, n]
1254
- ), z = (M, I) => `inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all cursor-pointer select-none
1254
+ ), z = (L, I) => `inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all cursor-pointer select-none
1255
1255
  ${m.btn}
1256
1256
  ${I ? "opacity-40 pointer-events-none cursor-default" : ""}
1257
- ${M ? y.active : `${y.base} ${I ? "" : y.hover}`}`, W = h ? (t - 1) * s + 1 : 0, L = h ? Math.min(t * s, h) : 0, F = {
1257
+ ${L ? y.active : `${y.base} ${I ? "" : y.hover}`}`, W = h ? (t - 1) * s + 1 : 0, M = h ? Math.min(t * s, h) : 0, F = {
1258
1258
  fontFamily: "var(--font-label)",
1259
1259
  fontSize: "var(--text-label)",
1260
1260
  fontWeight: "var(--weight-label)"
@@ -1264,7 +1264,7 @@ function Ni({
1264
1264
  b && h !== void 0 && /* @__PURE__ */ a("span", { className: "text-muted-foreground", style: F, children: [
1265
1265
  W,
1266
1266
  "–",
1267
- L,
1267
+ M,
1268
1268
  " of ",
1269
1269
  h
1270
1270
  ] }),
@@ -1274,7 +1274,7 @@ function Ni({
1274
1274
  "select",
1275
1275
  {
1276
1276
  value: s,
1277
- onChange: (M) => f == null ? void 0 : f(Number(M.target.value)),
1277
+ onChange: (L) => f == null ? void 0 : f(Number(L.target.value)),
1278
1278
  disabled: u,
1279
1279
  className: "bg-input-background text-foreground border border-border rounded-[var(--radius-md)] px-2 py-1 cursor-pointer focus:outline-none focus:ring-2 focus:ring-ring/30",
1280
1280
  style: {
@@ -1282,7 +1282,7 @@ function Ni({
1282
1282
  fontSize: "var(--text-button)",
1283
1283
  fontWeight: "var(--weight-button)"
1284
1284
  },
1285
- children: c.map((M) => /* @__PURE__ */ e("option", { value: M, children: M }, M))
1285
+ children: c.map((L) => /* @__PURE__ */ e("option", { value: L, children: L }, L))
1286
1286
  }
1287
1287
  )
1288
1288
  ] })
@@ -1303,7 +1303,7 @@ function Ni({
1303
1303
  style: m.text,
1304
1304
  "aria-label": "First page",
1305
1305
  title: "First page",
1306
- children: /* @__PURE__ */ e(Wt, { size: m.icon })
1306
+ children: /* @__PURE__ */ e(Mt, { size: m.icon })
1307
1307
  }
1308
1308
  ),
1309
1309
  i && /* @__PURE__ */ e(
@@ -1317,26 +1317,26 @@ function Ni({
1317
1317
  children: g ?? /* @__PURE__ */ e(Fe, { size: m.icon })
1318
1318
  }
1319
1319
  ),
1320
- k.map((M, I) => M === "dots-left" || M === "dots-right" ? /* @__PURE__ */ e(
1320
+ k.map((L, I) => L === "dots-left" || L === "dots-right" ? /* @__PURE__ */ e(
1321
1321
  "span",
1322
1322
  {
1323
1323
  className: `inline-flex items-center justify-center text-muted-foreground ${m.btn}`,
1324
1324
  style: m.text,
1325
1325
  children: /* @__PURE__ */ e(vr, { size: m.icon })
1326
1326
  },
1327
- M
1327
+ L
1328
1328
  ) : /* @__PURE__ */ e(
1329
1329
  "button",
1330
1330
  {
1331
- onClick: () => w(M),
1331
+ onClick: () => w(L),
1332
1332
  disabled: u,
1333
- className: z(M === t, u),
1333
+ className: z(L === t, u),
1334
1334
  style: m.text,
1335
- "aria-label": `Page ${M}`,
1336
- "aria-current": M === t ? "page" : void 0,
1337
- children: M
1335
+ "aria-label": `Page ${L}`,
1336
+ "aria-current": L === t ? "page" : void 0,
1337
+ children: L
1338
1338
  },
1339
- M
1339
+ L
1340
1340
  )),
1341
1341
  i && /* @__PURE__ */ e(
1342
1342
  "button",
@@ -1346,7 +1346,7 @@ function Ni({
1346
1346
  className: z(!1, u || t >= r),
1347
1347
  style: m.text,
1348
1348
  "aria-label": "Next page",
1349
- children: N ?? /* @__PURE__ */ e(fe, { size: m.icon })
1349
+ children: $ ?? /* @__PURE__ */ e(fe, { size: m.icon })
1350
1350
  }
1351
1351
  ),
1352
1352
  l && /* @__PURE__ */ e(
@@ -1358,7 +1358,7 @@ function Ni({
1358
1358
  style: m.text,
1359
1359
  "aria-label": "Last page",
1360
1360
  title: "Last page",
1361
- children: /* @__PURE__ */ e(Mt, { size: m.icon })
1361
+ children: /* @__PURE__ */ e(Lt, { size: m.icon })
1362
1362
  }
1363
1363
  )
1364
1364
  ]
@@ -1397,71 +1397,71 @@ function $i({
1397
1397
  debounce: x = 0,
1398
1398
  className: u = ""
1399
1399
  }) {
1400
- const [p, b] = j(""), [g, N] = j(!1), [k, m] = j(-1), y = t ?? p, w = V(null), z = V(null), W = V(void 0), L = go[l], F = X(($) => {
1401
- t === void 0 && b($), r == null || r($), x > 0 && (clearTimeout(W.current), W.current = setTimeout(() => n == null ? void 0 : n($), x));
1402
- }, [t, r, n, x]), M = ($) => {
1403
- $.key === "Enter" ? k >= 0 && c[k] ? (s == null || s(c[k]), N(!1)) : n == null || n(y) : $.key === "ArrowDown" ? ($.preventDefault(), m((S) => Math.min(S + 1, c.length - 1))) : $.key === "ArrowUp" ? ($.preventDefault(), m((S) => Math.max(S - 1, -1))) : $.key === "Escape" && N(!1);
1400
+ const [p, b] = j(""), [g, $] = j(!1), [k, m] = j(-1), y = t ?? p, w = ee(null), z = ee(null), W = ee(void 0), M = go[l], F = Q((N) => {
1401
+ t === void 0 && b(N), r == null || r(N), x > 0 && (clearTimeout(W.current), W.current = setTimeout(() => n == null ? void 0 : n(N), x));
1402
+ }, [t, r, n, x]), L = (N) => {
1403
+ N.key === "Enter" ? k >= 0 && c[k] ? (s == null || s(c[k]), $(!1)) : n == null || n(y) : N.key === "ArrowDown" ? (N.preventDefault(), m((S) => Math.min(S + 1, c.length - 1))) : N.key === "ArrowUp" ? (N.preventDefault(), m((S) => Math.max(S - 1, -1))) : N.key === "Escape" && $(!1);
1404
1404
  };
1405
- te(() => {
1406
- const $ = (S) => {
1407
- z.current && !z.current.contains(S.target) && N(!1);
1405
+ ne(() => {
1406
+ const N = (S) => {
1407
+ z.current && !z.current.contains(S.target) && $(!1);
1408
1408
  };
1409
- return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
1410
- }, []), te(() => {
1411
- N(c.length > 0 && y.length > 0), m(-1);
1409
+ return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
1410
+ }, []), ne(() => {
1411
+ $(c.length > 0 && y.length > 0), m(-1);
1412
1412
  }, [c, y]);
1413
1413
  const I = { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" }, C = { fontFamily: "var(--font-label)", fontSize: "var(--text-button)", fontWeight: "var(--weight-button)" };
1414
1414
  return /* @__PURE__ */ a("div", { ref: z, className: `relative ${u}`, children: [
1415
1415
  /* @__PURE__ */ a("div", { className: `relative rounded-[var(--radius-md)] transition-all ${vo[i]} ${h ? "opacity-50 pointer-events-none" : ""}`, children: [
1416
- /* @__PURE__ */ e("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none", children: /* @__PURE__ */ e(Ye, { size: L.icon }) }),
1416
+ /* @__PURE__ */ e("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none", children: /* @__PURE__ */ e(Ye, { size: M.icon }) }),
1417
1417
  /* @__PURE__ */ e(
1418
1418
  "input",
1419
1419
  {
1420
1420
  ref: w,
1421
1421
  type: "text",
1422
1422
  value: y,
1423
- onChange: ($) => F($.target.value),
1424
- onKeyDown: M,
1425
- onFocus: () => c.length > 0 && y.length > 0 && N(!0),
1423
+ onChange: (N) => F(N.target.value),
1424
+ onKeyDown: L,
1425
+ onFocus: () => c.length > 0 && y.length > 0 && $(!0),
1426
1426
  placeholder: o,
1427
1427
  disabled: h,
1428
1428
  autoFocus: v,
1429
- className: `w-full ${L.input} rounded-[var(--radius-md)] bg-transparent outline-none text-foreground placeholder:text-muted-foreground`,
1430
- style: L.style
1429
+ className: `w-full ${M.input} rounded-[var(--radius-md)] bg-transparent outline-none text-foreground placeholder:text-muted-foreground`,
1430
+ style: M.style
1431
1431
  }
1432
1432
  ),
1433
1433
  /* @__PURE__ */ a("span", { className: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1", children: [
1434
- d && /* @__PURE__ */ e(Re, { size: L.icon, className: "animate-spin text-muted-foreground" }),
1434
+ d && /* @__PURE__ */ e(Re, { size: M.icon, className: "animate-spin text-muted-foreground" }),
1435
1435
  f && y && !d && /* @__PURE__ */ e(
1436
1436
  "button",
1437
1437
  {
1438
1438
  onClick: () => {
1439
- var $;
1440
- F(""), ($ = w.current) == null || $.focus();
1439
+ var N;
1440
+ F(""), (N = w.current) == null || N.focus();
1441
1441
  },
1442
1442
  className: "text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
1443
- children: /* @__PURE__ */ e(le, { size: L.icon })
1443
+ children: /* @__PURE__ */ e(le, { size: M.icon })
1444
1444
  }
1445
1445
  )
1446
1446
  ] })
1447
1447
  ] }),
1448
- g && c.length > 0 && /* @__PURE__ */ e("div", { className: "absolute top-full left-0 right-0 mt-1 bg-popover border border-border rounded-[var(--radius-md)] shadow-elevation-sm z-50 overflow-hidden max-h-64 overflow-y-auto", style: { padding: "var(--Spacing--Spacing-sm)" }, children: c.map(($, S) => /* @__PURE__ */ a(
1448
+ g && c.length > 0 && /* @__PURE__ */ e("div", { className: "absolute top-full left-0 right-0 mt-1 bg-popover border border-border rounded-[var(--radius-md)] shadow-elevation-sm z-50 overflow-hidden max-h-64 overflow-y-auto", style: { padding: "var(--Spacing--Spacing-sm)" }, children: c.map((N, S) => /* @__PURE__ */ a(
1449
1449
  "button",
1450
1450
  {
1451
1451
  onClick: () => {
1452
- s == null || s($), N(!1);
1452
+ s == null || s(N), $(!1);
1453
1453
  },
1454
1454
  className: `w-full text-left flex items-center rounded-[var(--radius-sm)] transition-colors cursor-pointer ${S === k ? "bg-[var(--Colors--Background--bg-brand-secondary)]" : "hover:bg-[var(--Colors--Background--bg-primary_hover)]"}`,
1455
1455
  style: { padding: "var(--Spacing--Spacing-md) var(--Spacing--Spacing-2xl)", gap: "var(--Spacing--Spacing-lg)" },
1456
1456
  children: [
1457
- $.icon && /* @__PURE__ */ e("span", { className: "text-muted-foreground flex-shrink-0", children: $.icon }),
1457
+ N.icon && /* @__PURE__ */ e("span", { className: "text-muted-foreground flex-shrink-0", children: N.icon }),
1458
1458
  /* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
1459
- /* @__PURE__ */ e("span", { className: "text-foreground block truncate", style: I, children: $.label }),
1460
- $.description && /* @__PURE__ */ e("span", { className: "text-muted-foreground block truncate", style: { marginTop: "var(--Spacing--Spacing-xxs)", ...C }, children: $.description })
1459
+ /* @__PURE__ */ e("span", { className: "text-foreground block truncate", style: I, children: N.label }),
1460
+ N.description && /* @__PURE__ */ e("span", { className: "text-muted-foreground block truncate", style: { marginTop: "var(--Spacing--Spacing-xxs)", ...C }, children: N.description })
1461
1461
  ] })
1462
1462
  ]
1463
1463
  },
1464
- $.id
1464
+ N.id
1465
1465
  )) })
1466
1466
  ] });
1467
1467
  }
@@ -1487,22 +1487,22 @@ function Si({
1487
1487
  flush: u = !1,
1488
1488
  className: p = ""
1489
1489
  }) {
1490
- const [b, g] = j(null), [N, k] = j("asc"), [m, y] = j(/* @__PURE__ */ new Set()), w = c ?? m, z = (A) => {
1490
+ const [b, g] = j(null), [$, k] = j("asc"), [m, y] = j(/* @__PURE__ */ new Set()), w = c ?? m, z = (A) => {
1491
1491
  c || y(A), s == null || s(A);
1492
1492
  }, W = se(() => b ? [...r].sort((A, E) => {
1493
- const H = A[b], T = E[b];
1494
- if (H == null) return 1;
1495
- if (T == null) return -1;
1496
- const B = typeof H == "string" ? H.localeCompare(T) : H - T;
1497
- return N === "asc" ? B : -B;
1498
- }) : r, [r, b, N]), L = (A) => {
1493
+ const O = A[b], _ = E[b];
1494
+ if (O == null) return 1;
1495
+ if (_ == null) return -1;
1496
+ const B = typeof O == "string" ? O.localeCompare(_) : O - _;
1497
+ return $ === "asc" ? B : -B;
1498
+ }) : r, [r, b, $]), M = (A) => {
1499
1499
  b === A ? k((E) => E === "asc" ? "desc" : "asc") : (g(A), k("asc"));
1500
- }, F = r.length > 0 && w.size === r.length, M = w.size > 0 && !F, I = () => {
1500
+ }, F = r.length > 0 && w.size === r.length, L = w.size > 0 && !F, I = () => {
1501
1501
  z(F ? /* @__PURE__ */ new Set() : new Set(r.map((A, E) => E)));
1502
1502
  }, C = (A) => {
1503
1503
  const E = new Set(w);
1504
1504
  E.has(A) ? E.delete(A) : E.add(A), z(E);
1505
- }, $ = { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" }, S = { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-button)" };
1505
+ }, N = { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" }, S = { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-button)" };
1506
1506
  return /* @__PURE__ */ e("div", { className: `${u ? "" : "rounded-[var(--radius-md)] border border-border"} overflow-hidden ${p}`, children: /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ a("table", { className: "w-full border-collapse", children: [
1507
1507
  /* @__PURE__ */ e("thead", { className: x ? "sticky top-0 z-10" : "", children: /* @__PURE__ */ a("tr", { className: "border-b border-border", style: { backgroundColor: "color-mix(in srgb, var(--muted) 30%, var(--background) 70%)" }, children: [
1508
1508
  d && /* @__PURE__ */ e("th", { className: `${We[n]} w-12`, children: /* @__PURE__ */ e(
@@ -1510,7 +1510,7 @@ function Si({
1510
1510
  {
1511
1511
  size: "sm",
1512
1512
  checked: F,
1513
- indeterminate: M,
1513
+ indeterminate: L,
1514
1514
  onChange: I
1515
1515
  }
1516
1516
  ) }),
@@ -1519,10 +1519,10 @@ function Si({
1519
1519
  {
1520
1520
  className: `${We[n]} text-${A.align ?? "left"} text-foreground ${A.sortable ? "cursor-pointer select-none hover:text-primary transition-colors" : ""} ${i ? "border-x border-border first:border-l-0 last:border-r-0" : ""}`,
1521
1521
  style: { ...S, width: A.width },
1522
- onClick: () => A.sortable && L(A.key),
1522
+ onClick: () => A.sortable && M(A.key),
1523
1523
  children: /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1", children: [
1524
1524
  A.header,
1525
- A.sortable && /* @__PURE__ */ e("span", { className: "text-muted-foreground/50", children: b === A.key ? N === "asc" ? /* @__PURE__ */ e(Ge, { size: 14 }) : /* @__PURE__ */ e(Me, { size: 14 }) : /* @__PURE__ */ e(wt, { size: 12 }) })
1525
+ A.sortable && /* @__PURE__ */ e("span", { className: "text-muted-foreground/50", children: b === A.key ? $ === "asc" ? /* @__PURE__ */ e(Ge, { size: 14 }) : /* @__PURE__ */ e(Me, { size: 14 }) : /* @__PURE__ */ e(Nt, { size: 12 }) })
1526
1526
  ] })
1527
1527
  },
1528
1528
  A.key
@@ -1530,30 +1530,30 @@ function Si({
1530
1530
  ] }) }),
1531
1531
  /* @__PURE__ */ e("tbody", { children: f ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (d ? 1 : 0), className: `${We[n]} text-center text-muted-foreground`, children: /* @__PURE__ */ a("div", { className: "flex items-center justify-center gap-2 py-8", children: [
1532
1532
  /* @__PURE__ */ e("div", { className: "w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin" }),
1533
- /* @__PURE__ */ e("span", { style: $, children: "Loading..." })
1534
- ] }) }) }) : h ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (d ? 1 : 0), className: `${We[n]} text-center py-12`, children: /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e("span", { style: { ...$, color: "var(--destructive)" }, children: h }) }) }) }) : W.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (d ? 1 : 0), className: `${We[n]} text-center text-muted-foreground py-12`, children: /* @__PURE__ */ e("span", { style: $, children: v }) }) }) : W.map((A, E) => {
1535
- const H = w.has(E);
1533
+ /* @__PURE__ */ e("span", { style: N, children: "Loading..." })
1534
+ ] }) }) }) : h ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (d ? 1 : 0), className: `${We[n]} text-center py-12`, children: /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e("span", { style: { ...N, color: "var(--destructive)" }, children: h }) }) }) }) : W.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (d ? 1 : 0), className: `${We[n]} text-center text-muted-foreground py-12`, children: /* @__PURE__ */ e("span", { style: N, children: v }) }) }) : W.map((A, E) => {
1535
+ const O = w.has(E);
1536
1536
  return /* @__PURE__ */ a(
1537
1537
  "tr",
1538
1538
  {
1539
- className: `border-b border-border last:border-b-0 transition-colors ${H ? "bg-primary/5" : o && E % 2 === 1 ? "bg-muted/20" : "bg-card"} ${l ? "hover:bg-[var(--row-hover-bg)]" : ""}`,
1539
+ className: `border-b border-border last:border-b-0 transition-colors ${O ? "bg-primary/5" : o && E % 2 === 1 ? "bg-muted/20" : "bg-card"} ${l ? "hover:bg-[var(--row-hover-bg)]" : ""}`,
1540
1540
  children: [
1541
1541
  d && /* @__PURE__ */ e("td", { className: `${We[n]} w-12`, children: /* @__PURE__ */ e(
1542
1542
  ot,
1543
1543
  {
1544
1544
  size: "sm",
1545
- checked: H,
1545
+ checked: O,
1546
1546
  onChange: () => C(E)
1547
1547
  }
1548
1548
  ) }),
1549
- t.map((T) => /* @__PURE__ */ e(
1549
+ t.map((_) => /* @__PURE__ */ e(
1550
1550
  "td",
1551
1551
  {
1552
- className: `${We[n]} text-${T.align ?? "left"} text-foreground ${i ? "border-x border-border first:border-l-0 last:border-r-0" : ""}`,
1553
- style: $,
1554
- children: T.render ? T.render(A[T.key], A, E) : A[T.key]
1552
+ className: `${We[n]} text-${_.align ?? "left"} text-foreground ${i ? "border-x border-border first:border-l-0 last:border-r-0" : ""}`,
1553
+ style: N,
1554
+ children: _.render ? _.render(A[_.key], A, E) : A[_.key]
1555
1555
  },
1556
- T.key
1556
+ _.key
1557
1557
  ))
1558
1558
  ]
1559
1559
  },
@@ -1569,10 +1569,10 @@ const xo = {
1569
1569
  };
1570
1570
  function ki({ tabs: t, variant: r = "default", size: n = "md", defaultTab: o, activeTab: l, onChange: i, fullWidth: d = !1, className: c = "" }) {
1571
1571
  var k, m;
1572
- const [s, f] = j(o ?? ((k = t[0]) == null ? void 0 : k.id) ?? ""), h = l ?? s, v = V(null), [x, u] = j({ left: 0, width: 0 }), p = (y) => {
1572
+ const [s, f] = j(o ?? ((k = t[0]) == null ? void 0 : k.id) ?? ""), h = l ?? s, v = ee(null), [x, u] = j({ left: 0, width: 0 }), p = (y) => {
1573
1573
  l || f(y), i == null || i(y);
1574
1574
  };
1575
- te(() => {
1575
+ ne(() => {
1576
1576
  if (r !== "underline" && r !== "default") return;
1577
1577
  const y = v.current;
1578
1578
  if (!y) return;
@@ -1590,7 +1590,7 @@ function ki({ tabs: t, variant: r = "default", size: n = "md", defaultTab: o, ac
1590
1590
  default:
1591
1591
  return "border-b border-border relative";
1592
1592
  }
1593
- })(), N = (y, w) => {
1593
+ })(), $ = (y, w) => {
1594
1594
  const z = "relative flex items-center gap-1.5 transition-all cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring whitespace-nowrap";
1595
1595
  if (w) return `${z} opacity-40 !cursor-not-allowed`;
1596
1596
  switch (r) {
@@ -1623,7 +1623,7 @@ function ki({ tabs: t, variant: r = "default", size: n = "md", defaultTab: o, ac
1623
1623
  "aria-selected": w,
1624
1624
  disabled: y.disabled,
1625
1625
  onClick: () => !y.disabled && p(y.id),
1626
- className: `${N(w, !!y.disabled)} ${d ? "flex-1 justify-center" : ""}`,
1626
+ className: `${$(w, !!y.disabled)} ${d ? "flex-1 justify-center" : ""}`,
1627
1627
  style: xo[n],
1628
1628
  children: [
1629
1629
  y.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: y.icon }),
@@ -1935,7 +1935,7 @@ function Fi({
1935
1935
  size: d = "md",
1936
1936
  disabled: c = !1
1937
1937
  }) {
1938
- const [s, f] = j(!1), h = V(null), v = d === "sm" ? "w-5 h-5" : d === "lg" ? "w-8 h-8" : "w-6 h-6", x = o || Io, u = (p) => {
1938
+ const [s, f] = j(!1), h = ee(null), v = d === "sm" ? "w-5 h-5" : d === "lg" ? "w-8 h-8" : "w-6 h-6", x = o || Io, u = (p) => {
1939
1939
  navigator.clipboard.writeText(p).then(() => {
1940
1940
  f(!0), setTimeout(() => f(!1), 1500);
1941
1941
  });
@@ -2111,7 +2111,7 @@ const Go = {
2111
2111
  trigger: "h-11 px-[var(--Spacing--Spacing-2xl)] gap-[var(--Spacing--Spacing-lg)]",
2112
2112
  option: "rounded-[var(--radius-sm)]",
2113
2113
  optionStyle: { padding: "var(--Spacing--Spacing-md) var(--Spacing--Spacing-2xl)" },
2114
- textStyle: { fontFamily: "var(--font-caption)", fontSize: "var(--text-caption)", fontWeight: "var(--weight-caption)" },
2114
+ textStyle: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" },
2115
2115
  descStyle: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" },
2116
2116
  icon: 16,
2117
2117
  avatarSize: 24
@@ -2121,7 +2121,7 @@ const Go = {
2121
2121
  option: "rounded-[var(--radius-sm)]",
2122
2122
  optionStyle: { padding: "var(--Spacing--Spacing-lg) var(--Spacing--Spacing-3xl)" },
2123
2123
  textStyle: { fontFamily: "var(--font-p)", fontSize: "var(--text-p)", fontWeight: "var(--weight-p)" },
2124
- descStyle: { fontFamily: "var(--font-caption)", fontSize: "var(--text-caption)", fontWeight: "var(--weight-caption)" },
2124
+ descStyle: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" },
2125
2125
  icon: 18,
2126
2126
  avatarSize: 28
2127
2127
  }
@@ -2170,162 +2170,162 @@ const Go = {
2170
2170
  searchable: p = !1,
2171
2171
  clearable: b = !1,
2172
2172
  multiple: g = !1,
2173
- maxSelections: N,
2173
+ maxSelections: $,
2174
2174
  grouped: k = !1,
2175
2175
  required: m = !1,
2176
2176
  id: y,
2177
2177
  className: w = "",
2178
2178
  showSelectAll: z = !1,
2179
2179
  tagLimit: W,
2180
- creatable: L = !1,
2180
+ creatable: M = !1,
2181
2181
  onCreateOption: F,
2182
- createLabel: M = 'Create "{query}"',
2182
+ createLabel: L = 'Create "{query}"',
2183
2183
  emptyState: I,
2184
2184
  footer: C,
2185
- onSearch: $,
2185
+ onSearch: N,
2186
2186
  searchDebounce: S = 300,
2187
2187
  searchLoading: A = !1,
2188
2188
  renderOption: E
2189
- }, H) => {
2190
- const [T, B] = j(!1), [U, ee] = j(""), [oe, ae] = j(-1), [q, re] = j(
2189
+ }, O) => {
2190
+ const [_, B] = j(!1), [K, H] = j(""), [X, ae] = j(-1), [q, re] = j(
2191
2191
  n ?? (g ? [] : "")
2192
- ), R = r ?? q, _ = V(null), Z = V(null), K = V(null), ue = V(null), [we, Te] = j({ top: 0, left: 0, width: 0 }), Y = Go[f], ke = Uo[h];
2193
- te(() => {
2194
- if (!T || !_.current) return;
2192
+ ), P = r ?? q, T = ee(null), J = ee(null), Z = ee(null), ue = ee(null), [we, Te] = j({ top: 0, left: 0, width: 0 }), G = Go[f], ke = Uo[h];
2193
+ ne(() => {
2194
+ if (!_ || !T.current) return;
2195
2195
  const D = () => {
2196
- const O = _.current.getBoundingClientRect();
2197
- Te({ top: O.bottom + 4, left: O.left, width: O.width });
2196
+ const R = T.current.getBoundingClientRect();
2197
+ Te({ top: R.bottom + 4, left: R.left, width: R.width });
2198
2198
  };
2199
2199
  return D(), window.addEventListener("scroll", D, !0), window.addEventListener("resize", D), () => {
2200
2200
  window.removeEventListener("scroll", D, !0), window.removeEventListener("resize", D);
2201
2201
  };
2202
- }, [T]);
2203
- const Be = X(
2202
+ }, [_]);
2203
+ const Be = Q(
2204
2204
  (D) => {
2205
- ee(D), $ && (ue.current && clearTimeout(ue.current), ue.current = setTimeout(() => {
2206
- $(D);
2205
+ H(D), N && (ue.current && clearTimeout(ue.current), ue.current = setTimeout(() => {
2206
+ N(D);
2207
2207
  }, S));
2208
2208
  },
2209
- [$, S]
2209
+ [N, S]
2210
2210
  );
2211
- te(() => () => {
2211
+ ne(() => () => {
2212
2212
  ue.current && clearTimeout(ue.current);
2213
2213
  }, []);
2214
- const ve = se(() => !U || $ ? t : t.filter(
2214
+ const ve = se(() => !K || N ? t : t.filter(
2215
2215
  (D) => {
2216
- var O;
2217
- return D.label.toLowerCase().includes(U.toLowerCase()) || ((O = D.description) == null ? void 0 : O.toLowerCase().includes(U.toLowerCase()));
2216
+ var R;
2217
+ return D.label.toLowerCase().includes(K.toLowerCase()) || ((R = D.description) == null ? void 0 : R.toLowerCase().includes(K.toLowerCase()));
2218
2218
  }
2219
- ), [t, U, $]), ie = se(() => {
2219
+ ), [t, K, N]), ie = se(() => {
2220
2220
  if (!k) return null;
2221
2221
  const D = {};
2222
- return ve.forEach((O) => {
2223
- const G = O.group || "Other";
2224
- D[G] || (D[G] = []), D[G].push(O);
2222
+ return ve.forEach((R) => {
2223
+ const U = R.group || "Other";
2224
+ D[U] || (D[U] = []), D[U].push(R);
2225
2225
  }), D;
2226
2226
  }, [ve, k]), Le = se(() => {
2227
2227
  var D;
2228
- return g && Array.isArray(R) ? R.map((O) => {
2229
- var G;
2230
- return (G = t.find((je) => je.value === O)) == null ? void 0 : G.label;
2231
- }).filter(Boolean) : (D = t.find((O) => O.value === R)) != null && D.label ? [t.find((O) => O.value === R).label] : [];
2232
- }, [R, t, g]), P = X(
2233
- (D) => g && Array.isArray(R) ? R.includes(D) : R === D,
2234
- [R, g]
2235
- ), Q = X(
2228
+ return g && Array.isArray(P) ? P.map((R) => {
2229
+ var U;
2230
+ return (U = t.find((je) => je.value === R)) == null ? void 0 : U.label;
2231
+ }).filter(Boolean) : (D = t.find((R) => R.value === P)) != null && D.label ? [t.find((R) => R.value === P).label] : [];
2232
+ }, [P, t, g]), Y = Q(
2233
+ (D) => g && Array.isArray(P) ? P.includes(D) : P === D,
2234
+ [P, g]
2235
+ ), te = Q(
2236
2236
  (D) => {
2237
2237
  if (g) {
2238
- const O = Array.isArray(R) ? [...R] : [], G = O.indexOf(D);
2239
- if (G > -1)
2240
- O.splice(G, 1);
2238
+ const R = Array.isArray(P) ? [...P] : [], U = R.indexOf(D);
2239
+ if (U > -1)
2240
+ R.splice(U, 1);
2241
2241
  else {
2242
- if (N && O.length >= N) return;
2243
- O.push(D);
2242
+ if ($ && R.length >= $) return;
2243
+ R.push(D);
2244
2244
  }
2245
- re(O), o == null || o(O);
2245
+ re(R), o == null || o(R);
2246
2246
  } else
2247
2247
  re(D), o == null || o(D), B(!1);
2248
- ee("");
2248
+ H("");
2249
2249
  },
2250
- [R, g, N, o]
2250
+ [P, g, $, o]
2251
2251
  ), he = se(
2252
2252
  () => ve.filter((D) => !D.disabled).map((D) => D.value),
2253
2253
  [ve]
2254
- ), ne = se(() => !g || !Array.isArray(R) ? !1 : he.length > 0 && he.every((D) => R.includes(D)), [g, R, he]), Ue = se(() => !g || !Array.isArray(R) ? !1 : he.some((D) => R.includes(D)) && !ne, [g, R, he, ne]), Ke = X(() => {
2254
+ ), oe = se(() => !g || !Array.isArray(P) ? !1 : he.length > 0 && he.every((D) => P.includes(D)), [g, P, he]), Ue = se(() => !g || !Array.isArray(P) ? !1 : he.some((D) => P.includes(D)) && !oe, [g, P, he, oe]), Ke = Q(() => {
2255
2255
  if (g)
2256
- if (ne) {
2257
- const D = Array.isArray(R) ? R.filter((O) => !he.includes(O)) : [];
2256
+ if (oe) {
2257
+ const D = Array.isArray(P) ? P.filter((R) => !he.includes(R)) : [];
2258
2258
  re(D), o == null || o(D);
2259
2259
  } else {
2260
- const D = Array.isArray(R) ? [...R] : [];
2261
- for (const O of he)
2262
- if (!D.includes(O)) {
2263
- if (N && D.length >= N) break;
2264
- D.push(O);
2260
+ const D = Array.isArray(P) ? [...P] : [];
2261
+ for (const R of he)
2262
+ if (!D.includes(R)) {
2263
+ if ($ && D.length >= $) break;
2264
+ D.push(R);
2265
2265
  }
2266
2266
  re(D), o == null || o(D);
2267
2267
  }
2268
- }, [g, ne, R, he, N, o]), dt = X(() => {
2269
- U.trim() && (F == null || F(U.trim()), ee(""));
2270
- }, [U, F]), Ce = se(() => !L || !U.trim() ? !1 : !t.some((D) => D.label.toLowerCase() === U.toLowerCase()), [L, U, t]), ct = X(
2268
+ }, [g, oe, P, he, $, o]), ct = Q(() => {
2269
+ K.trim() && (F == null || F(K.trim()), H(""));
2270
+ }, [K, F]), Ce = se(() => !M || !K.trim() ? !1 : !t.some((D) => D.label.toLowerCase() === K.toLowerCase()), [M, K, t]), ut = Q(
2271
2271
  (D) => {
2272
2272
  D.stopPropagation();
2273
- const O = g ? [] : "";
2274
- re(O), o == null || o(O);
2273
+ const R = g ? [] : "";
2274
+ re(R), o == null || o(R);
2275
2275
  },
2276
2276
  [g, o]
2277
- ), Ze = k ? Object.values(ie || {}).flat() : ve, _t = X(
2277
+ ), Ze = k ? Object.values(ie || {}).flat() : ve, _t = Q(
2278
2278
  (D) => {
2279
- var O;
2279
+ var R;
2280
2280
  if (!(x || u))
2281
2281
  switch (D.key) {
2282
2282
  case "ArrowDown":
2283
- D.preventDefault(), T ? ae(
2284
- (G) => G < Ze.length - 1 ? G + 1 : 0
2283
+ D.preventDefault(), _ ? ae(
2284
+ (U) => U < Ze.length - 1 ? U + 1 : 0
2285
2285
  ) : B(!0);
2286
2286
  break;
2287
2287
  case "ArrowUp":
2288
2288
  D.preventDefault(), ae(
2289
- (G) => G > 0 ? G - 1 : Ze.length - 1
2289
+ (U) => U > 0 ? U - 1 : Ze.length - 1
2290
2290
  );
2291
2291
  break;
2292
2292
  case "Enter":
2293
2293
  case " ":
2294
- if (D.preventDefault(), T && oe >= 0) {
2295
- const G = Ze[oe];
2296
- G && !G.disabled && Q(G.value);
2294
+ if (D.preventDefault(), _ && X >= 0) {
2295
+ const U = Ze[X];
2296
+ U && !U.disabled && te(U.value);
2297
2297
  } else
2298
2298
  B(!0);
2299
2299
  break;
2300
2300
  case "Escape":
2301
- B(!1), (O = _.current) == null || O.focus();
2301
+ B(!1), (R = T.current) == null || R.focus();
2302
2302
  break;
2303
2303
  }
2304
2304
  },
2305
- [x, u, T, oe, Ze, Q]
2305
+ [x, u, _, X, Ze, te]
2306
2306
  );
2307
- te(() => {
2308
- const D = (O) => {
2309
- const G = O.target;
2310
- _.current && !_.current.contains(G) && Z.current && !Z.current.contains(G) && (B(!1), ee(""));
2307
+ ne(() => {
2308
+ const D = (R) => {
2309
+ const U = R.target;
2310
+ T.current && !T.current.contains(U) && J.current && !J.current.contains(U) && (B(!1), H(""));
2311
2311
  };
2312
2312
  return document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
2313
- }, []), te(() => {
2314
- T && p && setTimeout(() => {
2313
+ }, []), ne(() => {
2314
+ _ && p && setTimeout(() => {
2315
2315
  var D;
2316
- return (D = K.current) == null ? void 0 : D.focus();
2317
- }, 50), T && ae(-1);
2318
- }, [T, p]);
2319
- const ut = g ? Array.isArray(R) && R.length > 0 : !!R, Xe = c ? "error" : v, rn = () => {
2320
- const D = Le, O = W && W > 0 ? W : D.length, G = D.slice(0, O), je = D.length - G.length;
2316
+ return (D = Z.current) == null ? void 0 : D.focus();
2317
+ }, 50), _ && ae(-1);
2318
+ }, [_, p]);
2319
+ const ft = g ? Array.isArray(P) && P.length > 0 : !!P, Xe = c ? "error" : v, rn = () => {
2320
+ const D = Le, R = W && W > 0 ? W : D.length, U = D.slice(0, R), je = D.length - U.length;
2321
2321
  return /* @__PURE__ */ a("span", { className: "flex flex-wrap gap-1", children: [
2322
- G.map((ft) => /* @__PURE__ */ a(
2322
+ U.map((mt) => /* @__PURE__ */ a(
2323
2323
  "span",
2324
2324
  {
2325
2325
  className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-[var(--radius-sm)] bg-[var(--Colors--Background--bg-brand-secondary)] text-[var(--Colors--Text--text-brand-primary)]",
2326
2326
  style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" },
2327
2327
  children: [
2328
- ft,
2328
+ mt,
2329
2329
  /* @__PURE__ */ e(
2330
2330
  le,
2331
2331
  {
@@ -2333,14 +2333,14 @@ const Go = {
2333
2333
  className: "cursor-pointer hover:text-destructive transition-colors",
2334
2334
  onClick: (nn) => {
2335
2335
  nn.stopPropagation();
2336
- const Rt = t.find((on) => on.label === ft);
2337
- Rt && Q(Rt.value);
2336
+ const Rt = t.find((on) => on.label === mt);
2337
+ Rt && te(Rt.value);
2338
2338
  }
2339
2339
  }
2340
2340
  )
2341
2341
  ]
2342
2342
  },
2343
- ft
2343
+ mt
2344
2344
  )),
2345
2345
  je > 0 && /* @__PURE__ */ a(
2346
2346
  "span",
@@ -2355,24 +2355,24 @@ const Go = {
2355
2355
  }
2356
2356
  )
2357
2357
  ] });
2358
- }, Ht = (D, O) => {
2359
- const G = P(D.value);
2358
+ }, Ht = (D, R) => {
2359
+ const U = Y(D.value);
2360
2360
  return E ? /* @__PURE__ */ e(
2361
2361
  "button",
2362
2362
  {
2363
2363
  type: "button",
2364
2364
  role: "option",
2365
- "aria-selected": G,
2365
+ "aria-selected": U,
2366
2366
  disabled: D.disabled,
2367
- className: `w-full ${Y.option} transition-colors cursor-pointer
2368
- ${G ? "bg-[var(--Colors--Background--bg-brand-secondary)]" : ""}
2369
- ${oe === O && !G ? "bg-[var(--Colors--Background--bg-primary_hover)]" : ""}
2367
+ className: `w-full ${G.option} transition-colors cursor-pointer
2368
+ ${U ? "bg-[var(--Colors--Background--bg-brand-secondary)]" : ""}
2369
+ ${X === R && !U ? "bg-[var(--Colors--Background--bg-primary_hover)]" : ""}
2370
2370
  ${D.disabled ? "opacity-40 cursor-not-allowed" : "hover:bg-[var(--Colors--Background--bg-primary_hover)]"}
2371
2371
  `,
2372
- style: Y.optionStyle,
2373
- onClick: () => !D.disabled && Q(D.value),
2374
- onMouseEnter: () => ae(O),
2375
- children: E(D, G)
2372
+ style: G.optionStyle,
2373
+ onClick: () => !D.disabled && te(D.value),
2374
+ onMouseEnter: () => ae(R),
2375
+ children: E(D, U)
2376
2376
  },
2377
2377
  D.value
2378
2378
  ) : /* @__PURE__ */ a(
@@ -2380,24 +2380,24 @@ const Go = {
2380
2380
  {
2381
2381
  type: "button",
2382
2382
  role: "option",
2383
- "aria-selected": G,
2383
+ "aria-selected": U,
2384
2384
  disabled: D.disabled,
2385
- className: `w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${Y.option} transition-colors cursor-pointer
2386
- ${G ? "bg-[var(--Colors--Background--bg-brand-secondary)] text-[var(--Colors--Text--text-brand-primary)]" : ""}
2387
- ${oe === O && !G ? "bg-[var(--Colors--Background--bg-primary_hover)]" : ""}
2385
+ className: `w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${G.option} transition-colors cursor-pointer
2386
+ ${U ? "bg-[var(--Colors--Background--bg-brand-secondary)] text-[var(--Colors--Text--text-brand-primary)]" : ""}
2387
+ ${X === R && !U ? "bg-[var(--Colors--Background--bg-primary_hover)]" : ""}
2388
2388
  ${D.disabled ? "opacity-40 cursor-not-allowed" : "hover:bg-[var(--Colors--Background--bg-primary_hover)]"}
2389
2389
  `,
2390
- style: { ...Y.optionStyle, ...Y.textStyle },
2391
- onClick: () => !D.disabled && Q(D.value),
2392
- onMouseEnter: () => ae(O),
2390
+ style: { ...G.optionStyle, ...G.textStyle },
2391
+ onClick: () => !D.disabled && te(D.value),
2392
+ onMouseEnter: () => ae(R),
2393
2393
  children: [
2394
2394
  g && /* @__PURE__ */ e(
2395
2395
  "span",
2396
2396
  {
2397
2397
  className: `flex-shrink-0 w-4 h-4 rounded-[var(--radius-sm)] border flex items-center justify-center transition-colors
2398
- ${G ? "bg-primary border-primary" : "border-border"}
2398
+ ${U ? "bg-primary border-primary" : "border-border"}
2399
2399
  `,
2400
- children: G && /* @__PURE__ */ e(me, { size: 10, className: "text-primary-foreground" })
2400
+ children: U && /* @__PURE__ */ e(me, { size: 10, className: "text-primary-foreground" })
2401
2401
  }
2402
2402
  ),
2403
2403
  D.avatar && /* @__PURE__ */ e(
@@ -2406,7 +2406,7 @@ const Go = {
2406
2406
  src: D.avatar,
2407
2407
  alt: "",
2408
2408
  className: "flex-shrink-0 rounded-full object-cover",
2409
- style: { width: Y.avatarSize, height: Y.avatarSize }
2409
+ style: { width: G.avatarSize, height: G.avatarSize }
2410
2410
  }
2411
2411
  ),
2412
2412
  D.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: D.icon }),
@@ -2416,69 +2416,76 @@ const Go = {
2416
2416
  "span",
2417
2417
  {
2418
2418
  className: "block text-muted-foreground",
2419
- style: { marginTop: "var(--Spacing--Spacing-xxs)", ...Y.descStyle },
2419
+ style: { marginTop: "var(--Spacing--Spacing-xxs)", ...G.descStyle },
2420
2420
  children: D.description
2421
2421
  }
2422
2422
  )
2423
2423
  ] }),
2424
- !g && G && /* @__PURE__ */ e(me, { size: Y.icon, className: "text-primary flex-shrink-0" })
2424
+ !g && U && /* @__PURE__ */ e(me, { size: G.icon, className: "text-primary flex-shrink-0" })
2425
2425
  ]
2426
2426
  },
2427
2427
  D.value
2428
2428
  );
2429
2429
  };
2430
2430
  let Ot = 0;
2431
- return /* @__PURE__ */ a("div", { ref: H, className: `relative w-full ${w}`, id: y, children: [
2432
- i && /* @__PURE__ */ a("label", { className: "block mb-1.5 text-foreground", children: [
2433
- i,
2434
- m && /* @__PURE__ */ e("span", { className: "text-destructive ml-0.5", children: "*" })
2435
- ] }),
2431
+ return /* @__PURE__ */ a("div", { ref: O, className: `relative w-full ${w}`, id: y, children: [
2432
+ i && /* @__PURE__ */ a(
2433
+ "label",
2434
+ {
2435
+ className: "block mb-1.5 text-foreground",
2436
+ style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" },
2437
+ children: [
2438
+ i,
2439
+ m && /* @__PURE__ */ e("span", { className: "text-destructive ml-0.5", children: "*" })
2440
+ ]
2441
+ }
2442
+ ),
2436
2443
  /* @__PURE__ */ a(
2437
2444
  "button",
2438
2445
  {
2439
- ref: _,
2446
+ ref: T,
2440
2447
  type: "button",
2441
2448
  role: "combobox",
2442
- "aria-expanded": T,
2449
+ "aria-expanded": _,
2443
2450
  "aria-haspopup": "listbox",
2444
2451
  disabled: x || u,
2445
- onClick: () => !x && !u && B(!T),
2452
+ onClick: () => !x && !u && B(!_),
2446
2453
  onKeyDown: _t,
2447
- className: `w-full flex items-center rounded-[var(--radius-md)] transition-all duration-150 ${Y.trigger}
2454
+ className: `w-full flex items-center rounded-[var(--radius-md)] transition-all duration-150 ${G.trigger}
2448
2455
  ${ke.base}
2449
2456
  ${!x && !u ? ke.hover : ""}
2450
- ${T ? ke.focus : ""}
2457
+ ${_ ? ke.focus : ""}
2451
2458
  ${x ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
2452
2459
  ${u ? "opacity-70 cursor-wait" : ""}
2453
2460
  ${Ko[Xe]}
2454
2461
  `,
2455
- style: Y.textStyle,
2462
+ style: G.textStyle,
2456
2463
  children: [
2457
- u ? /* @__PURE__ */ e(Re, { size: Y.icon, className: "animate-spin text-muted-foreground" }) : null,
2458
- /* @__PURE__ */ e("span", { className: `flex-1 text-left truncate ${ut ? "text-foreground" : "text-muted-foreground"}`, children: ut ? g ? rn() : Le[0] : l }),
2459
- b && ut && !x && /* @__PURE__ */ e(
2464
+ u ? /* @__PURE__ */ e(Re, { size: G.icon, className: "animate-spin text-muted-foreground" }) : null,
2465
+ /* @__PURE__ */ e("span", { className: `flex-1 text-left min-w-0 ${g ? "" : "truncate"} ${ft ? "text-foreground" : "text-muted-foreground"}`, children: ft ? g ? rn() : Le[0] : l }),
2466
+ b && ft && !x && /* @__PURE__ */ e(
2460
2467
  le,
2461
2468
  {
2462
- size: Y.icon,
2469
+ size: G.icon,
2463
2470
  className: "flex-shrink-0 text-muted-foreground hover:text-foreground cursor-pointer transition-colors",
2464
- onClick: ct
2471
+ onClick: ut
2465
2472
  }
2466
2473
  ),
2467
2474
  /* @__PURE__ */ e(
2468
2475
  Me,
2469
2476
  {
2470
- size: Y.icon,
2471
- className: `flex-shrink-0 text-muted-foreground transition-transform duration-200 ${T ? "rotate-180" : ""}`
2477
+ size: G.icon,
2478
+ className: `flex-shrink-0 text-muted-foreground transition-transform duration-200 ${_ ? "rotate-180" : ""}`
2472
2479
  }
2473
2480
  )
2474
2481
  ]
2475
2482
  }
2476
2483
  ),
2477
- T && jt(
2484
+ _ && dt(
2478
2485
  /* @__PURE__ */ a(
2479
2486
  "div",
2480
2487
  {
2481
- ref: Z,
2488
+ ref: J,
2482
2489
  role: "listbox",
2483
2490
  className: "fixed z-[9999] bg-popover border border-border rounded-[var(--radius)] shadow-elevation-sm overflow-hidden",
2484
2491
  style: { top: we.top, left: we.left, width: we.width || "auto" },
@@ -2488,9 +2495,9 @@ const Go = {
2488
2495
  /* @__PURE__ */ e(
2489
2496
  "input",
2490
2497
  {
2491
- ref: K,
2498
+ ref: Z,
2492
2499
  type: "text",
2493
- value: U,
2500
+ value: K,
2494
2501
  onChange: (D) => Be(D.target.value),
2495
2502
  placeholder: "Search\\u2026",
2496
2503
  className: "w-full pl-8 pr-3 py-1.5 bg-background border border-border rounded-[var(--radius-sm)] outline-none placeholder:text-muted-foreground focus:border-ring focus:ring-1 focus:ring-ring/20 transition-colors",
@@ -2503,30 +2510,30 @@ const Go = {
2503
2510
  "button",
2504
2511
  {
2505
2512
  type: "button",
2506
- className: `w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${Y.option} border-b border-border transition-colors hover:bg-[var(--Colors--Background--bg-primary_hover)] cursor-pointer`,
2507
- style: { ...Y.optionStyle, ...Y.textStyle },
2513
+ className: `w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${G.option} border-b border-border transition-colors hover:bg-[var(--Colors--Background--bg-primary_hover)] cursor-pointer`,
2514
+ style: { ...G.optionStyle, ...G.textStyle },
2508
2515
  onClick: Ke,
2509
2516
  children: [
2510
2517
  /* @__PURE__ */ a(
2511
2518
  "span",
2512
2519
  {
2513
2520
  className: `flex-shrink-0 w-4 h-4 rounded-[var(--radius-sm)] border flex items-center justify-center transition-colors
2514
- ${ne ? "bg-primary border-primary" : Ue ? "bg-primary/50 border-primary" : "border-border"}
2521
+ ${oe ? "bg-primary border-primary" : Ue ? "bg-primary/50 border-primary" : "border-border"}
2515
2522
  `,
2516
2523
  children: [
2517
- ne && /* @__PURE__ */ e(me, { size: 10, className: "text-primary-foreground" }),
2518
- Ue && !ne && /* @__PURE__ */ e("span", { className: "w-2 h-0.5 bg-primary-foreground rounded-full" })
2524
+ oe && /* @__PURE__ */ e(me, { size: 10, className: "text-primary-foreground" }),
2525
+ Ue && !oe && /* @__PURE__ */ e("span", { className: "w-2 h-0.5 bg-primary-foreground rounded-full" })
2519
2526
  ]
2520
2527
  }
2521
2528
  ),
2522
- /* @__PURE__ */ e("span", { className: "text-foreground", children: ne ? "Deselect All" : "Select All" }),
2529
+ /* @__PURE__ */ e("span", { className: "text-foreground", children: oe ? "Deselect All" : "Select All" }),
2523
2530
  /* @__PURE__ */ a(
2524
2531
  "span",
2525
2532
  {
2526
2533
  className: "ml-auto text-muted-foreground",
2527
2534
  style: { fontFamily: "var(--font-button)", fontSize: "var(--text-button)", fontWeight: "var(--weight-label)" },
2528
2535
  children: [
2529
- Array.isArray(R) ? R.length : 0,
2536
+ Array.isArray(P) ? P.length : 0,
2530
2537
  "/",
2531
2538
  ve.filter((D) => !D.disabled).length
2532
2539
  ]
@@ -2542,7 +2549,7 @@ const Go = {
2542
2549
  ] }) : ve.length === 0 && !Ce ? I ? /* @__PURE__ */ e("div", { className: "py-4 px-3", children: I }) : /* @__PURE__ */ a("div", { className: "text-center py-6 text-muted-foreground flex flex-col items-center gap-2", children: [
2543
2550
  /* @__PURE__ */ e(cn, { size: 24, className: "opacity-40" }),
2544
2551
  /* @__PURE__ */ e("span", { style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)" }, children: "No options found" })
2545
- ] }) : k && ie ? Object.entries(ie).map(([D, O]) => /* @__PURE__ */ a("div", { children: [
2552
+ ] }) : k && ie ? Object.entries(ie).map(([D, R]) => /* @__PURE__ */ a("div", { children: [
2546
2553
  /* @__PURE__ */ e(
2547
2554
  "div",
2548
2555
  {
@@ -2551,35 +2558,35 @@ const Go = {
2551
2558
  children: D
2552
2559
  }
2553
2560
  ),
2554
- O.map((G) => {
2555
- const je = Ht(G, Ot);
2561
+ R.map((U) => {
2562
+ const je = Ht(U, Ot);
2556
2563
  return Ot++, je;
2557
2564
  })
2558
- ] }, D)) : ve.map((D, O) => Ht(D, O)),
2565
+ ] }, D)) : ve.map((D, R) => Ht(D, R)),
2559
2566
  Ce && /* @__PURE__ */ a(
2560
2567
  "button",
2561
2568
  {
2562
2569
  type: "button",
2563
- className: `w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${Y.option} text-primary transition-colors hover:bg-[var(--Colors--Background--bg-primary_hover)] cursor-pointer`,
2564
- style: { ...Y.optionStyle, ...Y.textStyle },
2565
- onClick: dt,
2570
+ className: `w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${G.option} text-primary transition-colors hover:bg-[var(--Colors--Background--bg-primary_hover)] cursor-pointer`,
2571
+ style: { ...G.optionStyle, ...G.textStyle },
2572
+ onClick: ct,
2566
2573
  children: [
2567
- /* @__PURE__ */ e(Ct, { size: Y.icon, className: "flex-shrink-0" }),
2568
- /* @__PURE__ */ e("span", { children: M.replace("{query}", U.trim()) })
2574
+ /* @__PURE__ */ e(jt, { size: G.icon, className: "flex-shrink-0" }),
2575
+ /* @__PURE__ */ e("span", { children: L.replace("{query}", K.trim()) })
2569
2576
  ]
2570
2577
  }
2571
2578
  )
2572
2579
  ] }),
2573
- (C || g && N) && /* @__PURE__ */ a("div", { className: "border-t border-border", children: [
2574
- g && N && /* @__PURE__ */ a(
2580
+ (C || g && $) && /* @__PURE__ */ a("div", { className: "border-t border-border", children: [
2581
+ g && $ && /* @__PURE__ */ a(
2575
2582
  "div",
2576
2583
  {
2577
2584
  className: "px-3 py-2 text-muted-foreground",
2578
2585
  style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" },
2579
2586
  children: [
2580
- Array.isArray(R) ? R.length : 0,
2587
+ Array.isArray(P) ? P.length : 0,
2581
2588
  " / ",
2582
- N,
2589
+ $,
2583
2590
  " selected"
2584
2591
  ]
2585
2592
  }
@@ -2738,7 +2745,7 @@ function Mi({
2738
2745
  onUpload: f,
2739
2746
  onRemove: h
2740
2747
  }) {
2741
- const [v, x] = j([]), [u, p] = j(!1), b = V(null), g = c ?? v, N = (m) => {
2748
+ const [v, x] = j([]), [u, p] = j(!1), b = ee(null), g = c ?? v, $ = (m) => {
2742
2749
  if (!m) return;
2743
2750
  const y = Array.from(m);
2744
2751
  if (s && s(y), c === void 0) {
@@ -2752,14 +2759,14 @@ function Mi({
2752
2759
  }));
2753
2760
  x((z) => [...z, ...w]), w.forEach((z) => {
2754
2761
  let W = 0;
2755
- const L = setInterval(() => {
2756
- W += Math.random() * 30 + 10, W >= 100 && (W = 100, clearInterval(L)), x(
2762
+ const M = setInterval(() => {
2763
+ W += Math.random() * 30 + 10, W >= 100 && (W = 100, clearInterval(M)), x(
2757
2764
  (F) => F.map(
2758
- (M) => M.id === z.id ? {
2759
- ...M,
2765
+ (L) => L.id === z.id ? {
2766
+ ...L,
2760
2767
  progress: Math.min(W, 100),
2761
2768
  status: W >= 100 ? "done" : "uploading"
2762
- } : M
2769
+ } : L
2763
2770
  )
2764
2771
  ), W >= 100 && f && f({ ...z, progress: 100, status: "done" });
2765
2772
  }, 300);
@@ -2795,7 +2802,7 @@ function Mi({
2795
2802
  className: "hidden",
2796
2803
  accept: t,
2797
2804
  multiple: n,
2798
- onChange: (m) => N(m.target.files)
2805
+ onChange: (m) => $(m.target.files)
2799
2806
  }
2800
2807
  ),
2801
2808
  g.length > 0 && /* @__PURE__ */ e(Vt, { files: g, onRemove: k })
@@ -2820,7 +2827,7 @@ function Mi({
2820
2827
  type: "file",
2821
2828
  className: "hidden",
2822
2829
  accept: t || "image/*",
2823
- onChange: (m) => N(m.target.files)
2830
+ onChange: (m) => $(m.target.files)
2824
2831
  }
2825
2832
  )
2826
2833
  ] }) : /* @__PURE__ */ a("div", { className: "space-y-3", children: [
@@ -2833,7 +2840,7 @@ function Mi({
2833
2840
  },
2834
2841
  onDragLeave: () => p(!1),
2835
2842
  onDrop: (m) => {
2836
- m.preventDefault(), p(!1), N(m.dataTransfer.files);
2843
+ m.preventDefault(), p(!1), $(m.dataTransfer.files);
2837
2844
  },
2838
2845
  onClick: () => {
2839
2846
  var m;
@@ -2865,7 +2872,7 @@ function Mi({
2865
2872
  className: "hidden",
2866
2873
  accept: t,
2867
2874
  multiple: n,
2868
- onChange: (m) => N(m.target.files)
2875
+ onChange: (m) => $(m.target.files)
2869
2876
  }
2870
2877
  ),
2871
2878
  g.length > 0 && /* @__PURE__ */ e(Vt, { files: g, onRemove: k })
@@ -2887,14 +2894,14 @@ function Li({ images: t, initialIndex: r = 0 }) {
2887
2894
  i((g) => (g + 1) % t.length), c(1), f(0);
2888
2895
  }, u = () => c((g) => Math.min(g + 0.25, 3)), p = () => c((g) => Math.max(g - 0.25, 0.5)), b = () => f((g) => (g + 90) % 360);
2889
2896
  return /* @__PURE__ */ a("div", { children: [
2890
- /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: t.map((g, N) => /* @__PURE__ */ e(
2897
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: t.map((g, $) => /* @__PURE__ */ e(
2891
2898
  "button",
2892
2899
  {
2893
2900
  onClick: () => {
2894
- i(N), o(!0), c(1), f(0);
2901
+ i($), o(!0), c(1), f(0);
2895
2902
  },
2896
2903
  className: `rounded-[var(--radius-md)] overflow-hidden border-2 transition-all cursor-pointer hover:opacity-80
2897
- ${l === N && n ? "border-primary" : "border-border"}`,
2904
+ ${l === $ && n ? "border-primary" : "border-border"}`,
2898
2905
  children: /* @__PURE__ */ e("div", { className: "w-20 h-20 bg-muted flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ e(
2899
2906
  "img",
2900
2907
  {
@@ -2905,7 +2912,7 @@ function Li({ images: t, initialIndex: r = 0 }) {
2905
2912
  }
2906
2913
  ) })
2907
2914
  },
2908
- N
2915
+ $
2909
2916
  )) }),
2910
2917
  n && /* @__PURE__ */ a(
2911
2918
  "div",
@@ -3010,14 +3017,14 @@ function Li({ images: t, initialIndex: r = 0 }) {
3010
3017
  ]
3011
3018
  }
3012
3019
  ),
3013
- t.length > 1 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center gap-2 py-3 bg-foreground/20", children: t.map((g, N) => /* @__PURE__ */ e(
3020
+ t.length > 1 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center gap-2 py-3 bg-foreground/20", children: t.map((g, $) => /* @__PURE__ */ e(
3014
3021
  "button",
3015
3022
  {
3016
3023
  onClick: () => {
3017
- i(N), c(1), f(0);
3024
+ i($), c(1), f(0);
3018
3025
  },
3019
3026
  className: `w-12 h-12 rounded-[var(--radius-sm)] overflow-hidden border-2 cursor-pointer transition-all
3020
- ${N === l ? "border-primary-foreground" : "border-transparent opacity-50 hover:opacity-80"}`,
3027
+ ${$ === l ? "border-primary-foreground" : "border-transparent opacity-50 hover:opacity-80"}`,
3021
3028
  children: /* @__PURE__ */ e(
3022
3029
  "img",
3023
3030
  {
@@ -3027,7 +3034,7 @@ function Li({ images: t, initialIndex: r = 0 }) {
3027
3034
  }
3028
3035
  )
3029
3036
  },
3030
- N
3037
+ $
3031
3038
  )) })
3032
3039
  ]
3033
3040
  }
@@ -3048,13 +3055,13 @@ const ta = {
3048
3055
  fontWeight: "var(--weight-button)"
3049
3056
  };
3050
3057
  function oa({ items: t, parentRect: r }) {
3051
- const n = V(null), [o, l] = j({ top: r.top, left: r.right + 4 });
3052
- return te(() => {
3058
+ const n = ee(null), [o, l] = j({ top: r.top, left: r.right + 4 });
3059
+ return ne(() => {
3053
3060
  if (!n.current) return;
3054
3061
  const d = n.current.getBoundingClientRect();
3055
3062
  let c = r.top, s = r.right + 4;
3056
3063
  s + d.width > window.innerWidth - 8 && (s = r.left - d.width - 4), c + d.height > window.innerHeight - 8 && (c = window.innerHeight - d.height - 8), l({ top: c, left: s });
3057
- }, [r]), jt(
3064
+ }, [r]), dt(
3058
3065
  /* @__PURE__ */ e(
3059
3066
  "div",
3060
3067
  {
@@ -3068,7 +3075,7 @@ function oa({ items: t, parentRect: r }) {
3068
3075
  );
3069
3076
  }
3070
3077
  function Ir({ item: t }) {
3071
- const [r, n] = j(!1), o = V(null), l = V(null);
3078
+ const [r, n] = j(!1), o = ee(null), l = ee(null);
3072
3079
  if (t.divider) return /* @__PURE__ */ e("div", { className: "my-1 border-t border-border" });
3073
3080
  if (t.label)
3074
3081
  return /* @__PURE__ */ e("div", { className: "px-3 py-1.5 text-muted-foreground", style: na, children: t.label });
@@ -3100,8 +3107,8 @@ function Ir({ item: t }) {
3100
3107
  ] });
3101
3108
  }
3102
3109
  function aa({ items: t, open: r, onClose: n, triggerRef: o, className: l = "" }) {
3103
- const i = V(null), [d, c] = j({ top: 0, left: 0 });
3104
- return te(() => {
3110
+ const i = ee(null), [d, c] = j({ top: 0, left: 0 });
3111
+ return ne(() => {
3105
3112
  if (!r || !o.current) return;
3106
3113
  const s = o.current.getBoundingClientRect();
3107
3114
  let f = s.bottom + 4, h = s.left;
@@ -3110,14 +3117,14 @@ function aa({ items: t, open: r, onClose: n, triggerRef: o, className: l = "" })
3110
3117
  const v = i.current.getBoundingClientRect();
3111
3118
  h + v.width > window.innerWidth - 8 && (h = s.right - v.width), f + v.height > window.innerHeight - 8 && (f = s.top - v.height - 4), c({ top: f, left: h });
3112
3119
  }), c({ top: f, left: h });
3113
- }, [r, o]), te(() => {
3120
+ }, [r, o]), ne(() => {
3114
3121
  if (!r) return;
3115
3122
  const s = (f) => {
3116
3123
  var h, v;
3117
3124
  (h = o.current) != null && h.contains(f.target) || (v = i.current) != null && v.contains(f.target) || n();
3118
3125
  };
3119
3126
  return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
3120
- }, [r, n, o]), r ? jt(
3127
+ }, [r, n, o]), r ? dt(
3121
3128
  /* @__PURE__ */ a(
3122
3129
  "div",
3123
3130
  {
@@ -3138,7 +3145,7 @@ const Tr = {
3138
3145
  fontFamily: "var(--font-label)",
3139
3146
  fontSize: "var(--text-label)",
3140
3147
  fontWeight: "var(--weight-label)"
3141
- }, $t = {
3148
+ }, St = {
3142
3149
  fontFamily: "var(--font-label)",
3143
3150
  fontSize: "var(--text-label)",
3144
3151
  fontWeight: "var(--weight-button)"
@@ -3182,13 +3189,13 @@ function ia({
3182
3189
  "div",
3183
3190
  {
3184
3191
  className: "w-8 h-8 rounded-full bg-muted flex-shrink-0 flex items-center justify-center overflow-hidden",
3185
- style: $t,
3192
+ style: St,
3186
3193
  children: /* @__PURE__ */ e("span", { className: "text-primary", children: d.slice(0, 2).toUpperCase() })
3187
3194
  }
3188
3195
  ) : /* @__PURE__ */ e("span", { className: "flex-shrink-0 mt-0.5", children: f[t] }),
3189
3196
  /* @__PURE__ */ a("div", { className: "flex-1 min-w-0", children: [
3190
3197
  /* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-2", children: [
3191
- /* @__PURE__ */ e("span", { className: "text-foreground", style: $t, children: r }),
3198
+ /* @__PURE__ */ e("span", { className: "text-foreground", style: St, children: r }),
3192
3199
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 flex-shrink-0", children: [
3193
3200
  c && /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: la, children: c }),
3194
3201
  s === !1 && /* @__PURE__ */ e("span", { className: "w-2 h-2 rounded-full bg-primary" }),
@@ -3241,7 +3248,7 @@ function Ci({
3241
3248
  /* @__PURE__ */ a("div", { className: "px-4 py-3 border-b border-border flex items-center justify-between", children: [
3242
3249
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
3243
3250
  /* @__PURE__ */ e(wr, { size: 16, className: "text-foreground" }),
3244
- /* @__PURE__ */ e("span", { className: "text-foreground", style: $t, children: "Notifications" }),
3251
+ /* @__PURE__ */ e("span", { className: "text-foreground", style: St, children: "Notifications" }),
3245
3252
  f > 0 && /* @__PURE__ */ e(
3246
3253
  "span",
3247
3254
  {
@@ -3313,8 +3320,8 @@ function ji({
3313
3320
  }) {
3314
3321
  const [d, c] = j(!1), s = l !== void 0 ? l : d, f = (x) => {
3315
3322
  i == null || i(x), l === void 0 && c(x);
3316
- }, h = V(null);
3317
- return te(() => {
3323
+ }, h = ee(null);
3324
+ return ne(() => {
3318
3325
  if (!s) return;
3319
3326
  const x = (u) => {
3320
3327
  h.current && !h.current.contains(u.target) && f(!1);
@@ -3416,7 +3423,7 @@ function Di({
3416
3423
  showValue: c,
3417
3424
  label: s
3418
3425
  }) {
3419
- const [f, h] = j(0), v = o === "sm" ? 16 : o === "lg" ? 28 : 20, x = o === "sm" ? "gap-0.5" : o === "lg" ? "gap-1.5" : "gap-1", u = d === "heart" ? vn : d === "thumb" ? xn : yn, p = d === "heart" ? "text-destructive" : "text-chart-5", b = Array.from({ length: n }, (g, N) => N + 1);
3426
+ const [f, h] = j(0), v = o === "sm" ? 16 : o === "lg" ? 28 : 20, x = o === "sm" ? "gap-0.5" : o === "lg" ? "gap-1.5" : "gap-1", u = d === "heart" ? vn : d === "thumb" ? xn : yn, p = d === "heart" ? "text-destructive" : "text-chart-5", b = Array.from({ length: n }, (g, $) => $ + 1);
3420
3427
  return /* @__PURE__ */ a(
3421
3428
  "div",
3422
3429
  {
@@ -3424,12 +3431,12 @@ function Di({
3424
3431
  children: [
3425
3432
  s && /* @__PURE__ */ e("span", { className: "text-foreground mr-2", style: fa, children: s }),
3426
3433
  b.map((g) => {
3427
- const N = g <= (f || t);
3434
+ const $ = g <= (f || t);
3428
3435
  return /* @__PURE__ */ e(
3429
3436
  "button",
3430
3437
  {
3431
3438
  type: "button",
3432
- className: `transition-transform ${i || l ? "" : "cursor-pointer hover:scale-110"} ${N ? p : "text-muted-foreground/40"}`,
3439
+ className: `transition-transform ${i || l ? "" : "cursor-pointer hover:scale-110"} ${$ ? p : "text-muted-foreground/40"}`,
3433
3440
  onMouseEnter: () => !i && !l && h(g),
3434
3441
  onMouseLeave: () => h(0),
3435
3442
  onClick: () => !i && !l && (r == null ? void 0 : r(g === t ? 0 : g)),
@@ -3438,7 +3445,7 @@ function Di({
3438
3445
  u,
3439
3446
  {
3440
3447
  size: v,
3441
- fill: N ? "currentColor" : "none"
3448
+ fill: $ ? "currentColor" : "none"
3442
3449
  }
3443
3450
  )
3444
3451
  },
@@ -3465,15 +3472,15 @@ function Br({
3465
3472
  placement: n = "top",
3466
3473
  className: o = ""
3467
3474
  }) {
3468
- const [l, i] = j(!1), [d, c] = j({ top: 0, left: 0 }), s = V(null), f = () => {
3475
+ const [l, i] = j(!1), [d, c] = j({ top: 0, left: 0 }), s = ee(null), f = () => {
3469
3476
  if (!s.current) return;
3470
3477
  const p = s.current.getBoundingClientRect(), b = 8;
3471
- let g = 0, N = 0;
3472
- n === "right" ? (g = p.top + p.height / 2, N = p.right + b) : n === "left" ? (g = p.top + p.height / 2, N = p.left - b) : n === "bottom" ? (g = p.bottom + b, N = p.left + p.width / 2) : (g = p.top - b, N = p.left + p.width / 2), c({ top: g, left: N });
3478
+ let g = 0, $ = 0;
3479
+ n === "right" ? (g = p.top + p.height / 2, $ = p.right + b) : n === "left" ? (g = p.top + p.height / 2, $ = p.left - b) : n === "bottom" ? (g = p.bottom + b, $ = p.left + p.width / 2) : (g = p.top - b, $ = p.left + p.width / 2), c({ top: g, left: $ });
3473
3480
  }, h = () => {
3474
3481
  f(), i(!0);
3475
3482
  }, v = () => i(!1);
3476
- te(() => {
3483
+ ne(() => {
3477
3484
  if (!l) return;
3478
3485
  const p = () => f();
3479
3486
  return window.addEventListener("scroll", p, !0), window.addEventListener("resize", p), () => {
@@ -3535,7 +3542,7 @@ const er = {
3535
3542
  fontWeight: "var(--weight-p)",
3536
3543
  lineHeight: "1"
3537
3544
  };
3538
- function ht({ item: t, size: r = 40 }) {
3545
+ function bt({ item: t, size: r = 40 }) {
3539
3546
  const n = r + "px", o = r >= 40 ? "var(--text-label)" : "var(--text-caption)";
3540
3547
  if (t.avatarUrl)
3541
3548
  return /* @__PURE__ */ e(
@@ -3580,11 +3587,11 @@ function _r({
3580
3587
  onProviderChange: s,
3581
3588
  collapsed: f = !1
3582
3589
  }) {
3583
- const [h, v] = j(!1), x = V(null);
3584
- te(() => {
3590
+ const [h, v] = j(!1), x = ee(null);
3591
+ ne(() => {
3585
3592
  if (!h) return;
3586
- const g = (N) => {
3587
- x.current && !x.current.contains(N.target) && v(!1);
3593
+ const g = ($) => {
3594
+ x.current && !x.current.contains($.target) && v(!1);
3588
3595
  };
3589
3596
  return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
3590
3597
  }, [h]);
@@ -3608,7 +3615,7 @@ function _r({
3608
3615
  alignItems: "center",
3609
3616
  justifyContent: "center"
3610
3617
  },
3611
- children: u ? /* @__PURE__ */ e(ht, { item: u, size: 36 }) : /* @__PURE__ */ e("div", { style: { width: 36, height: 36, borderRadius: "50%", background: "var(--primary)", display: "flex", alignItems: "center", justifyContent: "center", color: "#fff", fontFamily: "var(--font-label)", fontSize: "var(--text-caption)", fontWeight: "var(--weight-button)" }, children: "S" })
3618
+ children: u ? /* @__PURE__ */ e(bt, { item: u, size: 36 }) : /* @__PURE__ */ e("div", { style: { width: 36, height: 36, borderRadius: "50%", background: "var(--primary)", display: "flex", alignItems: "center", justifyContent: "center", color: "#fff", fontFamily: "var(--font-label)", fontSize: "var(--text-caption)", fontWeight: "var(--weight-button)" }, children: "S" })
3612
3619
  }
3613
3620
  ) : /* @__PURE__ */ a("div", { ref: x, style: { position: "relative", width: "100%" }, children: [
3614
3621
  /* @__PURE__ */ a(
@@ -3629,7 +3636,7 @@ function _r({
3629
3636
  minHeight: "56px"
3630
3637
  },
3631
3638
  children: [
3632
- u ? /* @__PURE__ */ e(ht, { item: u, size: 40 }) : /* @__PURE__ */ e("div", { style: { width: 40, height: 40, borderRadius: "50%", background: "var(--primary)", display: "flex", alignItems: "center", justifyContent: "center", color: "#fff", fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-button)", flexShrink: 0 }, children: "S" }),
3639
+ u ? /* @__PURE__ */ e(bt, { item: u, size: 40 }) : /* @__PURE__ */ e("div", { style: { width: 40, height: 40, borderRadius: "50%", background: "var(--primary)", display: "flex", alignItems: "center", justifyContent: "center", color: "#fff", fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-button)", flexShrink: 0 }, children: "S" }),
3633
3640
  /* @__PURE__ */ a("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: "4px" }, children: [
3634
3641
  /* @__PURE__ */ e("span", { style: { ...er, color: "var(--foreground, #1f2937)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", display: "block" }, children: (u == null ? void 0 : u.name) ?? "Select Company" }),
3635
3642
  p && /* @__PURE__ */ e("span", { style: { ...ba, color: "var(--Base_Color--Sky--500, #32a9ff)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", display: "block" }, children: p })
@@ -3665,7 +3672,7 @@ function _r({
3665
3672
  overflow: "hidden"
3666
3673
  },
3667
3674
  children: /* @__PURE__ */ e("div", { style: { maxHeight: "240px", overflowY: "auto" }, children: o.map((g) => {
3668
- const N = (t == null ? void 0 : t.id) === g.id;
3675
+ const $ = (t == null ? void 0 : t.id) === g.id;
3669
3676
  return /* @__PURE__ */ a(
3670
3677
  "button",
3671
3678
  {
@@ -3676,7 +3683,7 @@ function _r({
3676
3683
  alignItems: "center",
3677
3684
  gap: "10px",
3678
3685
  padding: "8px 12px",
3679
- background: N ? "rgba(240,249,255,0.6)" : "none",
3686
+ background: $ ? "rgba(240,249,255,0.6)" : "none",
3680
3687
  border: "none",
3681
3688
  cursor: "pointer",
3682
3689
  textAlign: "left",
@@ -3684,18 +3691,18 @@ function _r({
3684
3691
  minHeight: "48px"
3685
3692
  },
3686
3693
  onMouseEnter: (k) => {
3687
- N || (k.currentTarget.style.background = "var(--accent, #f3f4f6)");
3694
+ $ || (k.currentTarget.style.background = "var(--accent, #f3f4f6)");
3688
3695
  },
3689
3696
  onMouseLeave: (k) => {
3690
- k.currentTarget.style.background = N ? "rgba(240,249,255,0.6)" : "none";
3697
+ k.currentTarget.style.background = $ ? "rgba(240,249,255,0.6)" : "none";
3691
3698
  },
3692
3699
  children: [
3693
- /* @__PURE__ */ e(ht, { item: g, size: 36 }),
3700
+ /* @__PURE__ */ e(bt, { item: g, size: 36 }),
3694
3701
  /* @__PURE__ */ a("div", { style: { flex: 1, minWidth: 0 }, children: [
3695
3702
  /* @__PURE__ */ e("div", { style: { ...er, color: "var(--foreground, #1f2937)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: g.name }),
3696
3703
  g.handle && /* @__PURE__ */ e("div", { style: { ...pa, color: "var(--muted-foreground, #6b7280)", marginTop: "2px" }, children: g.handle })
3697
3704
  ] }),
3698
- N && /* @__PURE__ */ e(me, { size: 16, color: "var(--Base_Color--Sky--500, #32a9ff)", style: { flexShrink: 0 } })
3705
+ $ && /* @__PURE__ */ e(me, { size: 16, color: "var(--Base_Color--Sky--500, #32a9ff)", style: { flexShrink: 0 } })
3699
3706
  ]
3700
3707
  },
3701
3708
  g.id
@@ -3726,7 +3733,7 @@ const ga = {
3726
3733
  fontSize: "var(--text-button)",
3727
3734
  fontWeight: "var(--weight-label)"
3728
3735
  };
3729
- function St({
3736
+ function kt({
3730
3737
  brand: t,
3731
3738
  accountSwitcher: r,
3732
3739
  groups: n,
@@ -3800,14 +3807,14 @@ function St({
3800
3807
  ),
3801
3808
  i && /* @__PURE__ */ e("div", { className: "h-px bg-sidebar-border mx-1 mb-2 mt-1" }),
3802
3809
  !b && /* @__PURE__ */ e("div", { className: "space-y-0.5", children: p.items.map((g) => {
3803
- const N = o === g.id, k = /* @__PURE__ */ a(
3810
+ const $ = o === g.id, k = /* @__PURE__ */ a(
3804
3811
  "button",
3805
3812
  {
3806
3813
  onClick: () => l == null ? void 0 : l(g),
3807
- className: `w-full flex items-center ${i ? "justify-center" : "gap-2"} ${i ? "px-0" : "px-2"} py-2 rounded-[var(--radius-md)] transition-colors cursor-pointer ${N ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-foreground hover:bg-sidebar-accent/50"}`,
3814
+ className: `w-full flex items-center ${i ? "justify-center" : "gap-2"} ${i ? "px-0" : "px-2"} py-2 rounded-[var(--radius-md)] transition-colors cursor-pointer ${$ ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-foreground hover:bg-sidebar-accent/50"}`,
3808
3815
  style: va,
3809
3816
  children: [
3810
- /* @__PURE__ */ e("span", { className: `flex-shrink-0 ${N ? "text-sidebar-primary" : "text-muted-foreground"}`, children: g.icon }),
3817
+ /* @__PURE__ */ e("span", { className: `flex-shrink-0 ${$ ? "text-sidebar-primary" : "text-muted-foreground"}`, children: g.icon }),
3811
3818
  !i && /* @__PURE__ */ e("span", { className: "truncate flex-1 text-left", children: g.label }),
3812
3819
  g.badge != null && !i && /* @__PURE__ */ e(
3813
3820
  "span",
@@ -3862,7 +3869,7 @@ function St({
3862
3869
  }
3863
3870
  );
3864
3871
  }
3865
- St.displayName = "Sidebar";
3872
+ kt.displayName = "Sidebar";
3866
3873
  function de({
3867
3874
  width: t,
3868
3875
  height: r,
@@ -3974,7 +3981,7 @@ function $a({ size: t = "md", color: r, className: n = "" }) {
3974
3981
  );
3975
3982
  }
3976
3983
  $a.displayName = "Spinner";
3977
- const kt = {
3984
+ const zt = {
3978
3985
  fontFamily: "var(--font-label)",
3979
3986
  fontSize: "var(--text-label)",
3980
3987
  fontWeight: "var(--weight-label)"
@@ -4026,12 +4033,12 @@ function Ii({
4026
4033
  ] }) : /* @__PURE__ */ a("div", { className: "space-y-1", children: [
4027
4034
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
4028
4035
  d && /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: d }),
4029
- /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: kt, children: t })
4036
+ /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: zt, children: t })
4030
4037
  ] }),
4031
4038
  /* @__PURE__ */ a("div", { className: "flex items-baseline gap-1", children: [
4032
4039
  n && /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: Hr, children: n }),
4033
4040
  /* @__PURE__ */ e("span", { className: "text-foreground", style: f, children: typeof r == "number" ? r.toLocaleString() : r }),
4034
- o && /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: kt, children: o })
4041
+ o && /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: zt, children: o })
4035
4042
  ] }),
4036
4043
  l && /* @__PURE__ */ a("div", { className: `flex items-center gap-1 ${h}`, children: [
4037
4044
  /* @__PURE__ */ e(v, { size: 14 }),
@@ -4055,7 +4062,7 @@ function Ti({
4055
4062
  const c = (o == null ? void 0 : o.direction) === "up" ? "text-chart-2" : (o == null ? void 0 : o.direction) === "down" ? "text-destructive" : "text-muted-foreground", s = (o == null ? void 0 : o.direction) === "up" ? Nr : (o == null ? void 0 : o.direction) === "down" ? $r : st;
4056
4063
  return /* @__PURE__ */ e("div", { className: "rounded-[var(--radius-md)] border border-border bg-card p-5 overflow-hidden", children: /* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-3", children: [
4057
4064
  /* @__PURE__ */ a("div", { className: "space-y-1 min-w-0 flex-1", children: [
4058
- /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: kt, children: t }),
4065
+ /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: zt, children: t }),
4059
4066
  /* @__PURE__ */ a("div", { className: "flex items-baseline gap-1", children: [
4060
4067
  n && /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: Hr, children: n }),
4061
4068
  /* @__PURE__ */ e(
@@ -4396,7 +4403,7 @@ const Ha = {
4396
4403
  fontFamily: "var(--font-label)",
4397
4404
  fontSize: "var(--text-label)",
4398
4405
  fontWeight: "var(--weight-button)"
4399
- }, bt = {
4406
+ }, pt = {
4400
4407
  fontFamily: "var(--font-button)",
4401
4408
  fontSize: "var(--text-button)",
4402
4409
  fontWeight: "var(--weight-label)"
@@ -4423,13 +4430,13 @@ function _i({
4423
4430
  /* @__PURE__ */ a("div", { className: "pb-4 min-w-0", children: [
4424
4431
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
4425
4432
  /* @__PURE__ */ e("span", { className: "text-foreground", style: ar, children: d.title }),
4426
- d.time && /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: bt, children: d.time })
4433
+ d.time && /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: pt, children: d.time })
4427
4434
  ] }),
4428
4435
  d.description && /* @__PURE__ */ e(
4429
4436
  "p",
4430
4437
  {
4431
4438
  className: "text-muted-foreground mt-0.5",
4432
- style: bt,
4439
+ style: pt,
4433
4440
  children: d.description
4434
4441
  }
4435
4442
  )
@@ -4464,7 +4471,7 @@ function _i({
4464
4471
  className: `flex items-center gap-2 ${s ? "justify-end" : ""}`,
4465
4472
  children: [
4466
4473
  /* @__PURE__ */ e("span", { className: "text-foreground", style: ar, children: d.title }),
4467
- d.time && /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: bt, children: d.time })
4474
+ d.time && /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: pt, children: d.time })
4468
4475
  ]
4469
4476
  }
4470
4477
  ),
@@ -4510,7 +4517,7 @@ function Pr({
4510
4517
  workspaceSwitcher: b,
4511
4518
  className: g = ""
4512
4519
  }) {
4513
- const N = l != null && l.name ? l.name.split(" ").map((k) => k[0]).join("").slice(0, 2).toUpperCase() : "";
4520
+ const $ = l != null && l.name ? l.name.split(" ").map((k) => k[0]).join("").slice(0, 2).toUpperCase() : "";
4514
4521
  return /* @__PURE__ */ a(
4515
4522
  "div",
4516
4523
  {
@@ -4609,7 +4616,7 @@ function Pr({
4609
4616
  {
4610
4617
  className: "w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center",
4611
4618
  style: _e,
4612
- children: N
4619
+ children: $
4613
4620
  }
4614
4621
  )
4615
4622
  }
@@ -4627,7 +4634,7 @@ const Oa = {
4627
4634
  fontFamily: "var(--font-label)",
4628
4635
  fontSize: "var(--text-label)",
4629
4636
  fontWeight: "var(--weight-button)"
4630
- }, pt = {
4637
+ }, gt = {
4631
4638
  fontFamily: "var(--font-button)",
4632
4639
  fontSize: "var(--text-button)",
4633
4640
  fontWeight: "var(--weight-label)"
@@ -4644,7 +4651,7 @@ function lr({
4644
4651
  return /* @__PURE__ */ a("div", { className: "flex-1 min-w-[180px] rounded-[var(--radius-md)] border border-border bg-card overflow-hidden", children: [
4645
4652
  /* @__PURE__ */ a("div", { className: "px-3 py-2.5 border-b border-border bg-muted/30 flex items-center justify-between", children: [
4646
4653
  /* @__PURE__ */ e("span", { className: "text-foreground", style: Yr, children: t }),
4647
- /* @__PURE__ */ a("span", { className: "text-muted-foreground", style: pt, children: [
4654
+ /* @__PURE__ */ a("span", { className: "text-muted-foreground", style: gt, children: [
4648
4655
  r.length,
4649
4656
  " items"
4650
4657
  ] })
@@ -4658,7 +4665,7 @@ function lr({
4658
4665
  onChange: (c) => i(c.target.value),
4659
4666
  placeholder: "Search\\u2026",
4660
4667
  className: "flex-1 bg-transparent outline-none text-foreground placeholder:text-muted-foreground",
4661
- style: pt
4668
+ style: gt
4662
4669
  }
4663
4670
  )
4664
4671
  ] }),
@@ -4667,7 +4674,7 @@ function lr({
4667
4674
  "div",
4668
4675
  {
4669
4676
  className: "px-3 py-6 text-center text-muted-foreground",
4670
- style: pt,
4677
+ style: gt,
4671
4678
  children: "No items"
4672
4679
  }
4673
4680
  ),
@@ -4715,23 +4722,23 @@ function Hi({
4715
4722
  /* @__PURE__ */ new Set()
4716
4723
  ), [b, g] = j(
4717
4724
  /* @__PURE__ */ new Set()
4718
- ), [N, k] = j(""), [m, y] = j(""), w = n.filter((S) => !v.has(S.id)), z = n.filter((S) => v.has(S.id)), W = N ? w.filter(
4719
- (S) => S.label.toLowerCase().includes(N.toLowerCase())
4720
- ) : w, L = m ? z.filter(
4725
+ ), [$, k] = j(""), [m, y] = j(""), w = n.filter((S) => !v.has(S.id)), z = n.filter((S) => v.has(S.id)), W = $ ? w.filter(
4726
+ (S) => S.label.toLowerCase().includes($.toLowerCase())
4727
+ ) : w, M = m ? z.filter(
4721
4728
  (S) => S.label.toLowerCase().includes(m.toLowerCase())
4722
4729
  ) : z, F = () => {
4723
4730
  const S = new Set(v);
4724
4731
  u.forEach((A) => S.add(A)), x(S), p(/* @__PURE__ */ new Set());
4725
- }, M = () => {
4732
+ }, L = () => {
4726
4733
  const S = new Set(v);
4727
4734
  b.forEach((A) => S.delete(A)), x(S), g(/* @__PURE__ */ new Set());
4728
4735
  }, I = () => {
4729
4736
  x(new Set(n.filter((S) => !S.disabled).map((S) => S.id))), p(/* @__PURE__ */ new Set());
4730
4737
  }, C = () => {
4731
4738
  x(/* @__PURE__ */ new Set()), g(/* @__PURE__ */ new Set());
4732
- }, $ = (S, A, E) => {
4733
- const H = new Set(A);
4734
- H.has(S) ? H.delete(S) : H.add(S), E(H);
4739
+ }, N = (S, A, E) => {
4740
+ const O = new Set(A);
4741
+ O.has(S) ? O.delete(S) : O.add(S), E(O);
4735
4742
  };
4736
4743
  return s ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center rounded-[var(--radius-md)] border border-border bg-card px-6 py-10 text-center", children: /* @__PURE__ */ e("span", { style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", color: "var(--destructive)" }, children: s }) }) : c ? /* @__PURE__ */ e("div", { className: "flex items-stretch gap-3 flex-wrap opacity-60 pointer-events-none", children: [t, r].map((S) => /* @__PURE__ */ a("div", { className: "flex-1 min-w-[180px] rounded-[var(--radius-md)] border border-border bg-card overflow-hidden", children: [
4737
4744
  /* @__PURE__ */ e("div", { className: "px-3 py-2.5 border-b border-border bg-muted/30", children: /* @__PURE__ */ e("span", { style: Yr, children: S }) }),
@@ -4743,8 +4750,8 @@ function Hi({
4743
4750
  title: t,
4744
4751
  items: W,
4745
4752
  selected: u,
4746
- onToggle: (S) => $(S, u, p),
4747
- search: N,
4753
+ onToggle: (S) => N(S, u, p),
4754
+ search: $,
4748
4755
  onSearch: k,
4749
4756
  searchable: l
4750
4757
  }
@@ -4756,7 +4763,7 @@ function Hi({
4756
4763
  onClick: I,
4757
4764
  disabled: w.length === 0,
4758
4765
  className: "w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",
4759
- children: /* @__PURE__ */ e(Mt, { size: 14 })
4766
+ children: /* @__PURE__ */ e(Lt, { size: 14 })
4760
4767
  }
4761
4768
  ),
4762
4769
  /* @__PURE__ */ e(
@@ -4771,7 +4778,7 @@ function Hi({
4771
4778
  /* @__PURE__ */ e(
4772
4779
  "button",
4773
4780
  {
4774
- onClick: M,
4781
+ onClick: L,
4775
4782
  disabled: b.size === 0,
4776
4783
  className: "w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",
4777
4784
  children: /* @__PURE__ */ e(Fe, { size: 14 })
@@ -4783,7 +4790,7 @@ function Hi({
4783
4790
  onClick: C,
4784
4791
  disabled: z.length === 0,
4785
4792
  className: "w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",
4786
- children: /* @__PURE__ */ e(Wt, { size: 14 })
4793
+ children: /* @__PURE__ */ e(Mt, { size: 14 })
4787
4794
  }
4788
4795
  )
4789
4796
  ] }),
@@ -4791,9 +4798,9 @@ function Hi({
4791
4798
  lr,
4792
4799
  {
4793
4800
  title: r,
4794
- items: L,
4801
+ items: M,
4795
4802
  selected: b,
4796
- onToggle: (S) => $(S, b, g),
4803
+ onToggle: (S) => N(S, b, g),
4797
4804
  search: m,
4798
4805
  onSearch: y,
4799
4806
  searchable: l
@@ -4801,7 +4808,7 @@ function Hi({
4801
4808
  )
4802
4809
  ] });
4803
4810
  }
4804
- const zt = {
4811
+ const Ft = {
4805
4812
  fontFamily: "var(--font-label)",
4806
4813
  fontSize: "var(--text-label)",
4807
4814
  fontWeight: "var(--weight-label)"
@@ -4824,7 +4831,7 @@ function Gr({
4824
4831
  className: `flex items-center gap-1.5 py-1 px-2 rounded-[var(--radius-sm)] transition-colors
4825
4832
  ${t.disabled ? "opacity-40 pointer-events-none" : "cursor-pointer hover:bg-accent"}
4826
4833
  ${h ? "bg-primary/10 text-primary" : "text-foreground"}`,
4827
- style: { paddingLeft: `${r * 20 + 8}px`, ...zt },
4834
+ style: { paddingLeft: `${r * 20 + 8}px`, ...Ft },
4828
4835
  onClick: () => {
4829
4836
  s && l(t.id), d && i(t.id);
4830
4837
  },
@@ -4873,21 +4880,21 @@ function Oi({
4873
4880
  }) {
4874
4881
  const [v, x] = j(
4875
4882
  new Set(o || [])
4876
- ), [u, p] = j(/* @__PURE__ */ new Set()), b = l !== void 0 ? new Set(l) : v, g = d !== void 0 ? new Set(d) : u, N = (m) => {
4883
+ ), [u, p] = j(/* @__PURE__ */ new Set()), b = l !== void 0 ? new Set(l) : v, g = d !== void 0 ? new Set(d) : u, $ = (m) => {
4877
4884
  const y = new Set(b);
4878
4885
  y.has(m) ? y.delete(m) : y.add(m), i && i(Array.from(y)), l === void 0 && x(y);
4879
4886
  }, k = (m) => {
4880
4887
  const y = new Set(g);
4881
4888
  y.has(m) ? y.delete(m) : y.add(m), c && c(Array.from(y)), d === void 0 && p(y);
4882
4889
  };
4883
- return f ? /* @__PURE__ */ e("div", { className: "rounded-[var(--radius-md)] border border-border bg-card px-4 py-8 text-center", children: /* @__PURE__ */ e("span", { style: { ...zt, color: "var(--destructive)" }, children: f }) }) : s ? /* @__PURE__ */ e("div", { className: "rounded-[var(--radius-md)] border border-border bg-card py-2 px-3 flex flex-col gap-2", children: [1, 2, 3, 4, 5].map((m) => /* @__PURE__ */ e("div", { className: "h-7 rounded bg-muted/50 animate-pulse", style: { width: `${60 + m % 3 * 15}%` } }, m)) }) : /* @__PURE__ */ e("div", { className: "rounded-[var(--radius-md)] border border-border bg-card py-1", children: t.length === 0 ? /* @__PURE__ */ e("div", { className: "px-4 py-8 text-center text-muted-foreground", style: zt, children: h }) : t.map((m) => /* @__PURE__ */ e(
4890
+ return f ? /* @__PURE__ */ e("div", { className: "rounded-[var(--radius-md)] border border-border bg-card px-4 py-8 text-center", children: /* @__PURE__ */ e("span", { style: { ...Ft, color: "var(--destructive)" }, children: f }) }) : s ? /* @__PURE__ */ e("div", { className: "rounded-[var(--radius-md)] border border-border bg-card py-2 px-3 flex flex-col gap-2", children: [1, 2, 3, 4, 5].map((m) => /* @__PURE__ */ e("div", { className: "h-7 rounded bg-muted/50 animate-pulse", style: { width: `${60 + m % 3 * 15}%` } }, m)) }) : /* @__PURE__ */ e("div", { className: "rounded-[var(--radius-md)] border border-border bg-card py-1", children: t.length === 0 ? /* @__PURE__ */ e("div", { className: "px-4 py-8 text-center text-muted-foreground", style: Ft, children: h }) : t.map((m) => /* @__PURE__ */ e(
4884
4891
  Gr,
4885
4892
  {
4886
4893
  node: m,
4887
4894
  level: 0,
4888
4895
  expanded: b,
4889
4896
  selected: g,
4890
- onToggle: N,
4897
+ onToggle: $,
4891
4898
  onSelect: k,
4892
4899
  selectable: r,
4893
4900
  showLines: n
@@ -5027,7 +5034,7 @@ function Yi({
5027
5034
  const [x, u] = j(r), p = t ?? x, b = (k) => {
5028
5035
  const m = Math.max(o ?? -1 / 0, Math.min(l ?? 1 / 0, k));
5029
5036
  n && n(m), t === void 0 && u(m);
5030
- }, g = o === void 0 || p - i >= o, N = l === void 0 || p + i <= l;
5037
+ }, g = o === void 0 || p - i >= o, $ = l === void 0 || p + i <= l;
5031
5038
  return /* @__PURE__ */ a("div", { className: v, children: [
5032
5039
  s && /* @__PURE__ */ e("label", { className: "block text-foreground mb-1.5", style: Ua, children: s }),
5033
5040
  /* @__PURE__ */ a(
@@ -5066,10 +5073,10 @@ function Yi({
5066
5073
  {
5067
5074
  type: "button",
5068
5075
  onClick: () => b(p + i),
5069
- disabled: d || !N,
5076
+ disabled: d || !$,
5070
5077
  className: "flex items-center justify-center px-2.5 border-l border-border text-muted-foreground hover:text-foreground disabled:opacity-30 transition-colors cursor-pointer",
5071
5078
  style: { height: "100%" },
5072
- children: /* @__PURE__ */ e(Ct, { size: sr[c] })
5079
+ children: /* @__PURE__ */ e(jt, { size: sr[c] })
5073
5080
  }
5074
5081
  )
5075
5082
  ]
@@ -5103,7 +5110,7 @@ function Gi({
5103
5110
  masked: s,
5104
5111
  className: f = ""
5105
5112
  }) {
5106
- const [h, v] = j(() => "".padEnd(t, "")), x = V([]), p = (r ?? h).padEnd(t, "").split("").slice(0, t), b = X(
5113
+ const [h, v] = j(() => "".padEnd(t, "")), x = ee([]), p = (r ?? h).padEnd(t, "").split("").slice(0, t), b = Q(
5107
5114
  (m) => {
5108
5115
  n && n(m), r === void 0 && v(m), m.replace(/ /g, "").length === t && o && o(m);
5109
5116
  },
@@ -5115,12 +5122,12 @@ function Gi({
5115
5122
  w[m] = y;
5116
5123
  const z = w.join("");
5117
5124
  b(z), m < t - 1 && ((W = x.current[m + 1]) == null || W.focus());
5118
- }, N = (m, y) => {
5125
+ }, $ = (m, y) => {
5119
5126
  var w, z, W;
5120
5127
  if (y.key === "Backspace") {
5121
5128
  y.preventDefault();
5122
- const L = p.slice();
5123
- L[m] !== " " && L[m] !== "" ? (L[m] = " ", b(L.join(""))) : m > 0 && (L[m - 1] = " ", b(L.join("")), (w = x.current[m - 1]) == null || w.focus());
5129
+ const M = p.slice();
5130
+ M[m] !== " " && M[m] !== "" ? (M[m] = " ", b(M.join(""))) : m > 0 && (M[m - 1] = " ", b(M.join("")), (w = x.current[m - 1]) == null || w.focus());
5124
5131
  } else y.key === "ArrowLeft" && m > 0 ? (z = x.current[m - 1]) == null || z.focus() : y.key === "ArrowRight" && m < t - 1 && ((W = x.current[m + 1]) == null || W.focus());
5125
5132
  };
5126
5133
  return /* @__PURE__ */ a("div", { className: f, children: [
@@ -5149,7 +5156,7 @@ function Gi({
5149
5156
  const z = w.target.value;
5150
5157
  z && g(y, z[z.length - 1]);
5151
5158
  },
5152
- onKeyDown: (w) => N(y, w),
5159
+ onKeyDown: (w) => $(y, w),
5153
5160
  onFocus: (w) => w.target.select(),
5154
5161
  className: `${Qa[d]} text-center rounded-[var(--radius-md)] border outline-none transition-all
5155
5162
  ${i ? "border-destructive focus:ring-2 focus:ring-destructive/30" : "border-border focus:border-primary focus:ring-2 focus:ring-primary/20"}
@@ -5175,8 +5182,8 @@ const Va = {
5175
5182
  color: "var(--muted-foreground)",
5176
5183
  lineHeight: 1.4
5177
5184
  }, tl = {
5178
- fontFamily: "var(--font-caption, 'DB HeaventRounded', sans-serif)",
5179
- fontSize: "var(--text-caption, 14px)"
5185
+ fontFamily: "var(--font-label, 'DB HeaventRounded', sans-serif)",
5186
+ fontSize: "var(--text-label)"
5180
5187
  };
5181
5188
  function Ui({
5182
5189
  title: t,
@@ -5218,7 +5225,7 @@ const rl = {
5218
5225
  };
5219
5226
  function nl({ config: t, value: r, onChange: n }) {
5220
5227
  var f;
5221
- const [o, l] = j(!1), i = Array.isArray(r) ? r : r ? [r] : [], d = i.length > 0, c = X(
5228
+ const [o, l] = j(!1), i = Array.isArray(r) ? r : r ? [r] : [], d = i.length > 0, c = Q(
5222
5229
  (h) => {
5223
5230
  if (t.type === "single") {
5224
5231
  const v = i[0] === h ? null : h;
@@ -5244,7 +5251,7 @@ function nl({ config: t, value: r, onChange: n }) {
5244
5251
  "span",
5245
5252
  {
5246
5253
  className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-[var(--primary)] text-primary-foreground font-bold",
5247
- style: { fontSize: "var(--text-caption)", lineHeight: 1 },
5254
+ style: { fontSize: "var(--text-label)", lineHeight: 1 },
5248
5255
  children: i.length
5249
5256
  }
5250
5257
  ),
@@ -5312,17 +5319,17 @@ function Ki({
5312
5319
  const [d, c] = j({
5313
5320
  search: "",
5314
5321
  filters: {}
5315
- }), s = o ?? d, f = X(
5322
+ }), s = o ?? d, f = Q(
5316
5323
  (b) => {
5317
5324
  c(b), l == null || l(b);
5318
5325
  },
5319
5326
  [l]
5320
- ), h = X(
5327
+ ), h = Q(
5321
5328
  (b) => {
5322
5329
  f({ ...s, search: b.target.value });
5323
5330
  },
5324
5331
  [s, f]
5325
- ), v = X(
5332
+ ), v = Q(
5326
5333
  (b, g) => {
5327
5334
  f({
5328
5335
  ...s,
@@ -5330,7 +5337,7 @@ function Ki({
5330
5337
  });
5331
5338
  },
5332
5339
  [s, f]
5333
- ), x = X(() => {
5340
+ ), x = Q(() => {
5334
5341
  f({ search: "", filters: {} });
5335
5342
  }, [f]), u = Object.values(s.filters).filter(
5336
5343
  (b) => b !== null && (!Array.isArray(b) || b.length > 0)
@@ -5409,7 +5416,7 @@ const Kr = {
5409
5416
  fontFamily: "var(--font-button)",
5410
5417
  fontSize: "var(--text-button)",
5411
5418
  fontWeight: "var(--weight-button)"
5412
- }, gt = {
5419
+ }, vt = {
5413
5420
  fontFamily: "var(--font-label)",
5414
5421
  fontSize: "var(--text-label)",
5415
5422
  fontWeight: "var(--weight-label)"
@@ -5432,8 +5439,8 @@ function ol({ width: t }) {
5432
5439
  );
5433
5440
  }
5434
5441
  function al({ columns: t, hidden: r, onToggle: n }) {
5435
- const [o, l] = j(!1), i = V(null);
5436
- te(() => {
5442
+ const [o, l] = j(!1), i = ee(null);
5443
+ ne(() => {
5437
5444
  function c(s) {
5438
5445
  i.current && !i.current.contains(s.target) && l(!1);
5439
5446
  }
@@ -5550,7 +5557,7 @@ function sl({ meta: t, onPageChange: r }) {
5550
5557
  ] }),
5551
5558
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
5552
5559
  /* @__PURE__ */ e(
5553
- vt,
5560
+ xt,
5554
5561
  {
5555
5562
  disabled: n === 1,
5556
5563
  onClick: () => r(n - 1, o),
@@ -5559,7 +5566,7 @@ function sl({ meta: t, onPageChange: r }) {
5559
5566
  ),
5560
5567
  s.map(
5561
5568
  (f, h) => f === "..." ? /* @__PURE__ */ e("span", { className: "px-2 text-[var(--muted-foreground)]", style: ze, children: "…" }, `ellipsis-${h}`) : /* @__PURE__ */ e(
5562
- vt,
5569
+ xt,
5563
5570
  {
5564
5571
  active: f === n,
5565
5572
  onClick: () => r(f, o),
@@ -5569,7 +5576,7 @@ function sl({ meta: t, onPageChange: r }) {
5569
5576
  )
5570
5577
  ),
5571
5578
  /* @__PURE__ */ e(
5572
- vt,
5579
+ xt,
5573
5580
  {
5574
5581
  disabled: n === i,
5575
5582
  onClick: () => r(n + 1, o),
@@ -5579,7 +5586,7 @@ function sl({ meta: t, onPageChange: r }) {
5579
5586
  ] })
5580
5587
  ] });
5581
5588
  }
5582
- function vt({
5589
+ function xt({
5583
5590
  label: t,
5584
5591
  active: r,
5585
5592
  disabled: n,
@@ -5615,68 +5622,68 @@ function Zi({
5615
5622
  loading: p = !1,
5616
5623
  loadingRows: b = 5,
5617
5624
  error: g,
5618
- emptyMessage: N = "No data found",
5625
+ emptyMessage: $ = "No data found",
5619
5626
  emptyDescription: k,
5620
5627
  showColumnToggle: m = !1,
5621
5628
  size: y = "md",
5622
5629
  stickyHeader: w = !1,
5623
5630
  className: z = ""
5624
5631
  }) {
5625
- const [W, L] = j(
5626
- new Set(t.filter((_) => _.defaultHidden).map((_) => _.key))
5627
- ), F = X((_) => {
5628
- L((Z) => {
5629
- const K = new Set(Z);
5630
- return K.has(_) ? K.delete(_) : K.add(_), K;
5632
+ const [W, M] = j(
5633
+ new Set(t.filter((T) => T.defaultHidden).map((T) => T.key))
5634
+ ), F = Q((T) => {
5635
+ M((J) => {
5636
+ const Z = new Set(J);
5637
+ return Z.has(T) ? Z.delete(T) : Z.add(T), Z;
5631
5638
  });
5632
- }, []), M = se(
5633
- () => t.filter((_) => !W.has(_.key)),
5639
+ }, []), L = se(
5640
+ () => t.filter((T) => !W.has(T.key)),
5634
5641
  [t, W]
5635
- ), [I, C] = j(/* @__PURE__ */ new Set()), $ = f ?? I, S = X(
5636
- (_) => {
5637
- f || C(_);
5638
- const Z = r.filter((K) => _.has(K[n]));
5639
- h == null || h(_, Z);
5642
+ ), [I, C] = j(/* @__PURE__ */ new Set()), N = f ?? I, S = Q(
5643
+ (T) => {
5644
+ f || C(T);
5645
+ const J = r.filter((Z) => T.has(Z[n]));
5646
+ h == null || h(T, J);
5640
5647
  },
5641
5648
  [f, r, n, h]
5642
- ), A = se(() => r.map((_) => _[n]), [r, n]), E = A.length > 0 && A.every((_) => $.has(_)), H = $.size > 0 && !E, T = X(() => {
5649
+ ), A = se(() => r.map((T) => T[n]), [r, n]), E = A.length > 0 && A.every((T) => N.has(T)), O = N.size > 0 && !E, _ = Q(() => {
5643
5650
  S(E ? /* @__PURE__ */ new Set() : new Set(A));
5644
- }, [E, A, S]), B = X(
5645
- (_) => {
5646
- const Z = new Set($);
5647
- Z.has(_) ? Z.delete(_) : Z.add(_), S(Z);
5651
+ }, [E, A, S]), B = Q(
5652
+ (T) => {
5653
+ const J = new Set(N);
5654
+ J.has(T) ? J.delete(T) : J.add(T), S(J);
5648
5655
  },
5649
- [$, S]
5650
- ), [U, ee] = j(/* @__PURE__ */ new Set()), oe = X((_) => {
5651
- ee((Z) => {
5652
- const K = new Set(Z);
5653
- return K.has(_) ? K.delete(_) : K.add(_), K;
5656
+ [N, S]
5657
+ ), [K, H] = j(/* @__PURE__ */ new Set()), X = Q((T) => {
5658
+ H((J) => {
5659
+ const Z = new Set(J);
5660
+ return Z.has(T) ? Z.delete(T) : Z.add(T), Z;
5654
5661
  });
5655
- }, []), ae = X(
5656
- (_) => {
5657
- c && (l === _ ? c(_, i === "asc" ? "desc" : "asc") : c(_, "asc"));
5662
+ }, []), ae = Q(
5663
+ (T) => {
5664
+ c && (l === T ? c(T, i === "asc" ? "desc" : "asc") : c(T, "asc"));
5658
5665
  },
5659
5666
  [l, i, c]
5660
5667
  ), q = se(() => {
5661
- const _ = {};
5662
- let Z = 0;
5663
- s && (Z += 48), u && (Z += 40);
5664
- for (const K of M)
5665
- if (K.frozen) {
5666
- _[K.key] = Z;
5667
- const ue = typeof K.width == "number" ? K.width : parseInt(K.width ?? "120");
5668
- Z += isNaN(ue) ? 120 : ue;
5668
+ const T = {};
5669
+ let J = 0;
5670
+ s && (J += 48), u && (J += 40);
5671
+ for (const Z of L)
5672
+ if (Z.frozen) {
5673
+ T[Z.key] = J;
5674
+ const ue = typeof Z.width == "number" ? Z.width : parseInt(Z.width ?? "120");
5675
+ J += isNaN(ue) ? 120 : ue;
5669
5676
  }
5670
- return _;
5671
- }, [M, s, u]), re = M.length + (s ? 1 : 0) + (u ? 1 : 0), R = "sticky z-[2] bg-inherit";
5677
+ return T;
5678
+ }, [L, s, u]), re = L.length + (s ? 1 : 0) + (u ? 1 : 0), P = "sticky z-[2] bg-inherit";
5672
5679
  return /* @__PURE__ */ a("div", { className: `rounded-[var(--radius-md)] border border-[var(--border)] overflow-hidden ${z}`, children: [
5673
5680
  m && /* @__PURE__ */ e("div", { className: "flex items-center justify-end gap-2 px-4 py-2.5 border-b border-[var(--border)] bg-[var(--background)]", children: /* @__PURE__ */ e(al, { columns: t, hidden: W, onToggle: F }) }),
5674
- s && $.size > 0 && v.length > 0 && /* @__PURE__ */ e(
5681
+ s && N.size > 0 && v.length > 0 && /* @__PURE__ */ e(
5675
5682
  ll,
5676
5683
  {
5677
- count: $.size,
5684
+ count: N.size,
5678
5685
  actions: v,
5679
- selectedKeys: Array.from($),
5686
+ selectedKeys: Array.from(N),
5680
5687
  onClear: () => S(/* @__PURE__ */ new Set())
5681
5688
  }
5682
5689
  ),
@@ -5688,64 +5695,64 @@ function Zi({
5688
5695
  {
5689
5696
  size: "sm",
5690
5697
  checked: E,
5691
- indeterminate: H && !E,
5692
- onChange: T
5698
+ indeterminate: O && !E,
5699
+ onChange: _
5693
5700
  }
5694
5701
  ) }),
5695
- M.map((_) => {
5696
- const Z = _.frozen && _.key in q, K = l === _.key;
5702
+ L.map((T) => {
5703
+ const J = T.frozen && T.key in q, Z = l === T.key;
5697
5704
  return /* @__PURE__ */ e(
5698
5705
  "th",
5699
5706
  {
5700
- className: `${xe[y]} text-${_.align ?? "left"} text-[var(--foreground)] whitespace-nowrap select-none ${_.sortable && c ? "cursor-pointer hover:text-[var(--primary)]" : ""} ${Z ? R : ""}`,
5707
+ className: `${xe[y]} text-${T.align ?? "left"} text-[var(--foreground)] whitespace-nowrap select-none ${T.sortable && c ? "cursor-pointer hover:text-[var(--primary)]" : ""} ${J ? P : ""}`,
5701
5708
  style: {
5702
5709
  ...Kr,
5703
- width: _.width,
5704
- minWidth: _.minWidth ?? 80,
5705
- ...Z ? { left: q[_.key], boxShadow: "2px 0 4px rgba(0,0,0,0.04)" } : {}
5710
+ width: T.width,
5711
+ minWidth: T.minWidth ?? 80,
5712
+ ...J ? { left: q[T.key], boxShadow: "2px 0 4px rgba(0,0,0,0.04)" } : {}
5706
5713
  },
5707
- onClick: () => _.sortable && ae(_.key),
5714
+ onClick: () => T.sortable && ae(T.key),
5708
5715
  children: /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1", children: [
5709
- _.header,
5710
- _.sortable && c && /* @__PURE__ */ e("span", { className: K ? "text-[var(--primary)]" : "text-[var(--muted-foreground)]/60", children: K ? i === "asc" ? /* @__PURE__ */ e(Ge, { size: 13 }) : /* @__PURE__ */ e(Me, { size: 13 }) : /* @__PURE__ */ e(wt, { size: 12 }) })
5716
+ T.header,
5717
+ T.sortable && c && /* @__PURE__ */ e("span", { className: Z ? "text-[var(--primary)]" : "text-[var(--muted-foreground)]/60", children: Z ? i === "asc" ? /* @__PURE__ */ e(Ge, { size: 13 }) : /* @__PURE__ */ e(Me, { size: 13 }) : /* @__PURE__ */ e(Nt, { size: 12 }) })
5711
5718
  ] })
5712
5719
  },
5713
- _.key
5720
+ T.key
5714
5721
  );
5715
5722
  })
5716
5723
  ] }) }),
5717
5724
  /* @__PURE__ */ a("tbody", { children: [
5718
5725
  g && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: re, className: `${xe[y]} text-center`, children: /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2 py-10", children: [
5719
5726
  /* @__PURE__ */ e(Ie, { size: 32, className: "text-[var(--destructive)] opacity-60" }),
5720
- /* @__PURE__ */ e("span", { className: "text-[var(--destructive)]", style: gt, children: g })
5727
+ /* @__PURE__ */ e("span", { className: "text-[var(--destructive)]", style: vt, children: g })
5721
5728
  ] }) }) }),
5722
- !g && p && Array.from({ length: b }).map((_, Z) => /* @__PURE__ */ a("tr", { className: "border-b border-[var(--border)] last:border-b-0", children: [
5729
+ !g && p && Array.from({ length: b }).map((T, J) => /* @__PURE__ */ a("tr", { className: "border-b border-[var(--border)] last:border-b-0", children: [
5723
5730
  u && /* @__PURE__ */ e("td", { className: `${xe[y]} w-10` }),
5724
5731
  s && /* @__PURE__ */ e("td", { className: `${xe[y]} w-12`, children: /* @__PURE__ */ e("div", { className: "w-4 h-4 rounded bg-muted animate-pulse" }) }),
5725
- M.map((K) => /* @__PURE__ */ e("td", { className: `${xe[y]}`, children: /* @__PURE__ */ e(ol, { width: K.align === "right" ? "60%" : K.align === "center" ? "50%" : "75%" }) }, K.key))
5726
- ] }, `skel-${Z}`)),
5732
+ L.map((Z) => /* @__PURE__ */ e("td", { className: `${xe[y]}`, children: /* @__PURE__ */ e(ol, { width: Z.align === "right" ? "60%" : Z.align === "center" ? "50%" : "75%" }) }, Z.key))
5733
+ ] }, `skel-${J}`)),
5727
5734
  !g && !p && r.length === 0 && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: re, className: `${xe[y]} text-center`, children: /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2 py-12", children: [
5728
- /* @__PURE__ */ e("div", { className: "w-12 h-12 rounded-full bg-[var(--muted)] flex items-center justify-center text-[var(--muted-foreground)]", children: /* @__PURE__ */ e(wt, { size: 20 }) }),
5729
- /* @__PURE__ */ e("span", { className: "text-[var(--foreground)]", style: gt, children: N }),
5735
+ /* @__PURE__ */ e("div", { className: "w-12 h-12 rounded-full bg-[var(--muted)] flex items-center justify-center text-[var(--muted-foreground)]", children: /* @__PURE__ */ e(Nt, { size: 20 }) }),
5736
+ /* @__PURE__ */ e("span", { className: "text-[var(--foreground)]", style: vt, children: $ }),
5730
5737
  k && /* @__PURE__ */ e("span", { className: "text-[var(--muted-foreground)]", style: ze, children: k })
5731
5738
  ] }) }) }),
5732
- !g && !p && r.map((_, Z) => {
5733
- const K = _[n], ue = $.has(K), we = U.has(K), Te = !!x || !!u;
5739
+ !g && !p && r.map((T, J) => {
5740
+ const Z = T[n], ue = N.has(Z), we = K.has(Z), Te = !!x || !!u;
5734
5741
  return /* @__PURE__ */ a(pe.Fragment, { children: [
5735
5742
  /* @__PURE__ */ a(
5736
5743
  "tr",
5737
5744
  {
5738
5745
  className: `group/row border-b border-[var(--border)] last:border-b-0 transition-colors ${ue ? "bg-primary/5" : "bg-[var(--card)] hover:bg-[var(--row-hover-bg)]"} ${Te ? "cursor-pointer" : ""}`,
5739
5746
  onClick: () => {
5740
- x == null || x(_), u && oe(K);
5747
+ x == null || x(T), u && X(Z);
5741
5748
  },
5742
5749
  children: [
5743
5750
  u && /* @__PURE__ */ e(
5744
5751
  "td",
5745
5752
  {
5746
5753
  className: `${xe[y]} w-10 text-center`,
5747
- onClick: (Y) => {
5748
- Y.stopPropagation(), oe(K);
5754
+ onClick: (G) => {
5755
+ G.stopPropagation(), X(Z);
5749
5756
  },
5750
5757
  children: /* @__PURE__ */ e(
5751
5758
  fe,
@@ -5760,37 +5767,37 @@ function Zi({
5760
5767
  "td",
5761
5768
  {
5762
5769
  className: `${xe[y]} w-12`,
5763
- onClick: (Y) => Y.stopPropagation(),
5770
+ onClick: (G) => G.stopPropagation(),
5764
5771
  children: /* @__PURE__ */ e(
5765
5772
  ot,
5766
5773
  {
5767
5774
  size: "sm",
5768
5775
  checked: ue,
5769
- onChange: () => B(K)
5776
+ onChange: () => B(Z)
5770
5777
  }
5771
5778
  )
5772
5779
  }
5773
5780
  ),
5774
- M.map((Y) => {
5775
- const ke = Y.frozen && Y.key in q, Be = ke ? ue ? "sticky z-[1] bg-primary/5" : "sticky z-[1] bg-[var(--card)] group-hover/row:bg-[var(--row-hover-bg)] transition-colors" : "";
5781
+ L.map((G) => {
5782
+ const ke = G.frozen && G.key in q, Be = ke ? ue ? "sticky z-[1] bg-primary/5" : "sticky z-[1] bg-[var(--card)] group-hover/row:bg-[var(--row-hover-bg)] transition-colors" : "";
5776
5783
  return /* @__PURE__ */ e(
5777
5784
  "td",
5778
5785
  {
5779
- className: `${xe[y]} text-${Y.align ?? "left"} text-[var(--foreground)] ${Be}`,
5786
+ className: `${xe[y]} text-${G.align ?? "left"} text-[var(--foreground)] ${Be}`,
5780
5787
  style: {
5781
- ...gt,
5782
- ...ke ? { left: q[Y.key], boxShadow: "2px 0 4px rgba(0,0,0,0.04)" } : {}
5788
+ ...vt,
5789
+ ...ke ? { left: q[G.key], boxShadow: "2px 0 4px rgba(0,0,0,0.04)" } : {}
5783
5790
  },
5784
- children: Y.render ? Y.render(_[Y.key], _, Z) : _[Y.key]
5791
+ children: G.render ? G.render(T[G.key], T, J) : T[G.key]
5785
5792
  },
5786
- Y.key
5793
+ G.key
5787
5794
  );
5788
5795
  })
5789
5796
  ]
5790
5797
  }
5791
5798
  ),
5792
- u && we && /* @__PURE__ */ e("tr", { className: "bg-[var(--muted)] border-b border-[var(--border)]", children: /* @__PURE__ */ e("td", { colSpan: re, className: "px-6 py-4", children: u(_) }) })
5793
- ] }, K ?? Z);
5799
+ u && we && /* @__PURE__ */ e("tr", { className: "bg-[var(--muted)] border-b border-[var(--border)]", children: /* @__PURE__ */ e("td", { colSpan: re, className: "px-6 py-4", children: u(T) }) })
5800
+ ] }, Z ?? J);
5794
5801
  })
5795
5802
  ] })
5796
5803
  ] }) }),
@@ -5810,7 +5817,7 @@ function be(t, r) {
5810
5817
  }
5811
5818
  const ce = {
5812
5819
  fontFamily: "var(--font-label)",
5813
- fontSize: "var(--text-caption)",
5820
+ fontSize: "var(--text-label)",
5814
5821
  fontWeight: "var(--weight-label)"
5815
5822
  };
5816
5823
  function At(t, r, n) {
@@ -5872,16 +5879,16 @@ function dl({
5872
5879
  className: h = ""
5873
5880
  }) {
5874
5881
  mr();
5875
- const v = V(null), [x, u] = j(null);
5882
+ const v = ee(null), [x, u] = j(null);
5876
5883
  if (!t.length || !t[0].data.length) return null;
5877
- const p = t[0].data.map((I) => I.label), b = t.flatMap((I) => I.data.map((C) => C.value)), g = at(b), N = 0, k = { top: 12, right: 16, bottom: o ? 36 : 12, left: l ? 48 : 16 }, m = n ?? 600, y = r, w = m - k.left - k.right, z = y - k.top - k.bottom, W = p.length > 1 ? w / (p.length - 1) : w;
5878
- function L(I) {
5884
+ const p = t[0].data.map((I) => I.label), b = t.flatMap((I) => I.data.map((C) => C.value)), g = at(b), $ = 0, k = { top: 12, right: 16, bottom: o ? 36 : 12, left: l ? 48 : 16 }, m = n ?? 600, y = r, w = m - k.left - k.right, z = y - k.top - k.bottom, W = p.length > 1 ? w / (p.length - 1) : w;
5885
+ function M(I) {
5879
5886
  return k.left + I * W;
5880
5887
  }
5881
5888
  function F(I) {
5882
- return k.top + z - (I - N) / (g - N || 1) * z;
5889
+ return k.top + z - (I - $) / (g - $ || 1) * z;
5883
5890
  }
5884
- const M = Array.from({ length: 5 }, (I, C) => N + C / 4 * (g - N));
5891
+ const L = Array.from({ length: 5 }, (I, C) => $ + C / 4 * (g - $));
5885
5892
  return /* @__PURE__ */ a("div", { className: `w-full ${h}`, children: [
5886
5893
  /* @__PURE__ */ a(
5887
5894
  "svg",
@@ -5892,7 +5899,7 @@ function dl({
5892
5899
  viewBox: `0 0 ${m} ${y}`,
5893
5900
  onMouseLeave: () => u(null),
5894
5901
  children: [
5895
- i && M.map((I, C) => /* @__PURE__ */ e(
5902
+ i && L.map((I, C) => /* @__PURE__ */ e(
5896
5903
  "line",
5897
5904
  {
5898
5905
  x1: k.left,
@@ -5905,7 +5912,7 @@ function dl({
5905
5912
  },
5906
5913
  C
5907
5914
  )),
5908
- l && M.map((I, C) => /* @__PURE__ */ e(
5915
+ l && L.map((I, C) => /* @__PURE__ */ e(
5909
5916
  "text",
5910
5917
  {
5911
5918
  x: k.left - 8,
@@ -5918,11 +5925,11 @@ function dl({
5918
5925
  C
5919
5926
  )),
5920
5927
  o && p.map((I, C) => {
5921
- const $ = Math.max(1, Math.floor(p.length / 8));
5922
- return C % $ !== 0 && C !== p.length - 1 ? null : /* @__PURE__ */ e(
5928
+ const N = Math.max(1, Math.floor(p.length / 8));
5929
+ return C % N !== 0 && C !== p.length - 1 ? null : /* @__PURE__ */ e(
5923
5930
  "text",
5924
5931
  {
5925
- x: L(C),
5932
+ x: M(C),
5926
5933
  y: y - k.bottom + 16,
5927
5934
  textAnchor: "middle",
5928
5935
  fill: "var(--muted-foreground)",
@@ -5933,51 +5940,51 @@ function dl({
5933
5940
  );
5934
5941
  }),
5935
5942
  t.map((I, C) => {
5936
- const $ = be(I, C), S = I.data.map((E, H) => [L(H), F(E.value)]), A = Et(S, f);
5943
+ const N = be(I, C), S = I.data.map((E, O) => [M(O), F(E.value)]), A = Et(S, f);
5937
5944
  return /* @__PURE__ */ a("g", { children: [
5938
5945
  /* @__PURE__ */ e(
5939
5946
  "path",
5940
5947
  {
5941
5948
  d: A,
5942
5949
  fill: "none",
5943
- stroke: $,
5950
+ stroke: N,
5944
5951
  strokeWidth: 2,
5945
5952
  strokeLinecap: "round",
5946
5953
  strokeLinejoin: "round"
5947
5954
  }
5948
5955
  ),
5949
- s && S.map(([E, H], T) => /* @__PURE__ */ e(
5956
+ s && S.map(([E, O], _) => /* @__PURE__ */ e(
5950
5957
  "circle",
5951
5958
  {
5952
5959
  cx: E,
5953
- cy: H,
5960
+ cy: O,
5954
5961
  r: 3,
5955
5962
  fill: "var(--card)",
5956
- stroke: $,
5963
+ stroke: N,
5957
5964
  strokeWidth: 2
5958
5965
  },
5959
- T
5966
+ _
5960
5967
  ))
5961
5968
  ] }, C);
5962
5969
  }),
5963
5970
  c && p.map((I, C) => /* @__PURE__ */ e(
5964
5971
  "rect",
5965
5972
  {
5966
- x: L(C) - W / 2,
5973
+ x: M(C) - W / 2,
5967
5974
  y: k.top,
5968
5975
  width: W,
5969
5976
  height: z,
5970
5977
  fill: "transparent",
5971
- onMouseEnter: () => u({ x: L(C), y: k.top, labelIdx: C })
5978
+ onMouseEnter: () => u({ x: M(C), y: k.top, labelIdx: C })
5972
5979
  },
5973
5980
  C
5974
5981
  )),
5975
5982
  x && /* @__PURE__ */ e(
5976
5983
  "line",
5977
5984
  {
5978
- x1: L(x.labelIdx),
5985
+ x1: M(x.labelIdx),
5979
5986
  y1: k.top,
5980
- x2: L(x.labelIdx),
5987
+ x2: M(x.labelIdx),
5981
5988
  y2: k.top + z,
5982
5989
  stroke: "var(--border)",
5983
5990
  strokeWidth: 1,
@@ -5987,14 +5994,14 @@ function dl({
5987
5994
  x && c && /* @__PURE__ */ e(
5988
5995
  It,
5989
5996
  {
5990
- x: At(L(x.labelIdx) + 8, k.left, m - 180),
5997
+ x: At(M(x.labelIdx) + 8, k.left, m - 180),
5991
5998
  y: k.top,
5992
5999
  label: p[x.labelIdx],
5993
6000
  items: t.map((I, C) => {
5994
- var $;
6001
+ var N;
5995
6002
  return {
5996
6003
  name: I.name,
5997
- value: (($ = I.data[x.labelIdx]) == null ? void 0 : $.value) ?? 0,
6004
+ value: ((N = I.data[x.labelIdx]) == null ? void 0 : N.value) ?? 0,
5998
6005
  color: be(I, C)
5999
6006
  };
6000
6007
  })
@@ -6026,14 +6033,14 @@ function cl({
6026
6033
  }) {
6027
6034
  const x = mr(), [u, p] = j(null);
6028
6035
  if (!t.length || !t[0].data.length) return null;
6029
- const b = t[0].data.map(($) => $.label), g = t.flatMap(($) => $.data.map((S) => S.value)), N = at(g), k = 0, m = { top: 12, right: 16, bottom: o ? 36 : 12, left: l ? 48 : 16 }, y = n ?? 600, w = r, z = y - m.left - m.right, W = w - m.top - m.bottom, L = b.length > 1 ? z / (b.length - 1) : z;
6030
- function F($) {
6031
- return m.left + $ * L;
6036
+ const b = t[0].data.map((N) => N.label), g = t.flatMap((N) => N.data.map((S) => S.value)), $ = at(g), k = 0, m = { top: 12, right: 16, bottom: o ? 36 : 12, left: l ? 48 : 16 }, y = n ?? 600, w = r, z = y - m.left - m.right, W = w - m.top - m.bottom, M = b.length > 1 ? z / (b.length - 1) : z;
6037
+ function F(N) {
6038
+ return m.left + N * M;
6032
6039
  }
6033
- function M($) {
6034
- return m.top + W - ($ - k) / (N - k || 1) * W;
6040
+ function L(N) {
6041
+ return m.top + W - (N - k) / ($ - k || 1) * W;
6035
6042
  }
6036
- const I = Array.from({ length: 5 }, ($, S) => k + S / 4 * (N - k)), C = m.top + W;
6043
+ const I = Array.from({ length: 5 }, (N, S) => k + S / 4 * ($ - k)), C = m.top + W;
6037
6044
  return /* @__PURE__ */ a("div", { className: `w-full ${v}`, children: [
6038
6045
  /* @__PURE__ */ a(
6039
6046
  "svg",
@@ -6043,36 +6050,36 @@ function cl({
6043
6050
  viewBox: `0 0 ${y} ${w}`,
6044
6051
  onMouseLeave: () => p(null),
6045
6052
  children: [
6046
- /* @__PURE__ */ e("defs", { children: t.map(($, S) => /* @__PURE__ */ a("linearGradient", { id: `${x}-grad-${S}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6047
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: be($, S), stopOpacity: h * 4 }),
6048
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: be($, S), stopOpacity: 0 })
6053
+ /* @__PURE__ */ e("defs", { children: t.map((N, S) => /* @__PURE__ */ a("linearGradient", { id: `${x}-grad-${S}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6054
+ /* @__PURE__ */ e("stop", { offset: "0%", stopColor: be(N, S), stopOpacity: h * 4 }),
6055
+ /* @__PURE__ */ e("stop", { offset: "100%", stopColor: be(N, S), stopOpacity: 0 })
6049
6056
  ] }, S)) }),
6050
- i && I.map(($, S) => /* @__PURE__ */ e(
6057
+ i && I.map((N, S) => /* @__PURE__ */ e(
6051
6058
  "line",
6052
6059
  {
6053
6060
  x1: m.left,
6054
- y1: M($),
6061
+ y1: L(N),
6055
6062
  x2: y - m.right,
6056
- y2: M($),
6063
+ y2: L(N),
6057
6064
  stroke: "var(--border)",
6058
6065
  strokeWidth: 0.5,
6059
6066
  strokeDasharray: "4 2"
6060
6067
  },
6061
6068
  S
6062
6069
  )),
6063
- l && I.map(($, S) => /* @__PURE__ */ e(
6070
+ l && I.map((N, S) => /* @__PURE__ */ e(
6064
6071
  "text",
6065
6072
  {
6066
6073
  x: m.left - 8,
6067
- y: M($) + 4,
6074
+ y: L(N) + 4,
6068
6075
  textAnchor: "end",
6069
6076
  fill: "var(--muted-foreground)",
6070
6077
  style: ce,
6071
- children: $ >= 1e3 ? `${($ / 1e3).toFixed(1)}k` : $
6078
+ children: N >= 1e3 ? `${(N / 1e3).toFixed(1)}k` : N
6072
6079
  },
6073
6080
  S
6074
6081
  )),
6075
- o && b.map(($, S) => {
6082
+ o && b.map((N, S) => {
6076
6083
  const A = Math.max(1, Math.floor(b.length / 8));
6077
6084
  return S % A !== 0 && S !== b.length - 1 ? null : /* @__PURE__ */ e(
6078
6085
  "text",
@@ -6082,25 +6089,25 @@ function cl({
6082
6089
  textAnchor: "middle",
6083
6090
  fill: "var(--muted-foreground)",
6084
6091
  style: ce,
6085
- children: $
6092
+ children: N
6086
6093
  },
6087
6094
  S
6088
6095
  );
6089
6096
  }),
6090
- t.map(($, S) => {
6091
- const A = be($, S), E = $.data.map((B, U) => [F(U), M(B.value)]), H = Et(E, f), T = H + ` L${E[E.length - 1][0]},${C} L${E[0][0]},${C} Z`;
6097
+ t.map((N, S) => {
6098
+ const A = be(N, S), E = N.data.map((B, K) => [F(K), L(B.value)]), O = Et(E, f), _ = O + ` L${E[E.length - 1][0]},${C} L${E[0][0]},${C} Z`;
6092
6099
  return /* @__PURE__ */ a("g", { children: [
6093
- /* @__PURE__ */ e("path", { d: T, fill: `url(#${x}-grad-${S})` }),
6094
- /* @__PURE__ */ e("path", { d: H, fill: "none", stroke: A, strokeWidth: 2, strokeLinecap: "round" }),
6095
- s && E.map(([B, U], ee) => /* @__PURE__ */ e("circle", { cx: B, cy: U, r: 3, fill: "var(--card)", stroke: A, strokeWidth: 2 }, ee))
6100
+ /* @__PURE__ */ e("path", { d: _, fill: `url(#${x}-grad-${S})` }),
6101
+ /* @__PURE__ */ e("path", { d: O, fill: "none", stroke: A, strokeWidth: 2, strokeLinecap: "round" }),
6102
+ s && E.map(([B, K], H) => /* @__PURE__ */ e("circle", { cx: B, cy: K, r: 3, fill: "var(--card)", stroke: A, strokeWidth: 2 }, H))
6096
6103
  ] }, S);
6097
6104
  }),
6098
- c && b.map(($, S) => /* @__PURE__ */ e(
6105
+ c && b.map((N, S) => /* @__PURE__ */ e(
6099
6106
  "rect",
6100
6107
  {
6101
- x: F(S) - L / 2,
6108
+ x: F(S) - M / 2,
6102
6109
  y: m.top,
6103
- width: L,
6110
+ width: M,
6104
6111
  height: W,
6105
6112
  fill: "transparent",
6106
6113
  onMouseEnter: () => p({ x: F(S), y: m.top, labelIdx: S })
@@ -6125,12 +6132,12 @@ function cl({
6125
6132
  x: At(F(u.labelIdx) + 8, m.left, y - 180),
6126
6133
  y: m.top,
6127
6134
  label: b[u.labelIdx],
6128
- items: t.map(($, S) => {
6135
+ items: t.map((N, S) => {
6129
6136
  var A;
6130
6137
  return {
6131
- name: $.name,
6132
- value: ((A = $.data[u.labelIdx]) == null ? void 0 : A.value) ?? 0,
6133
- color: be($, S)
6138
+ name: N.name,
6139
+ value: ((A = N.data[u.labelIdx]) == null ? void 0 : A.value) ?? 0,
6140
+ color: be(N, S)
6134
6141
  };
6135
6142
  })
6136
6143
  }
@@ -6138,9 +6145,9 @@ function cl({
6138
6145
  ]
6139
6146
  }
6140
6147
  ),
6141
- d && t.length > 1 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-4 mt-2 justify-center", children: t.map(($, S) => /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", style: ce, children: [
6142
- /* @__PURE__ */ e("div", { className: "w-3 h-0.5 rounded-full", style: { backgroundColor: be($, S) } }),
6143
- /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: $.name })
6148
+ d && t.length > 1 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-4 mt-2 justify-center", children: t.map((N, S) => /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", style: ce, children: [
6149
+ /* @__PURE__ */ e("div", { className: "w-3 h-0.5 rounded-full", style: { backgroundColor: be(N, S) } }),
6150
+ /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: N.name })
6144
6151
  ] }, S)) })
6145
6152
  ] });
6146
6153
  }
@@ -6163,104 +6170,104 @@ function ul({
6163
6170
  const u = t[0].data.map((C) => C.label);
6164
6171
  let p;
6165
6172
  s ? p = at(
6166
- u.map((C, $) => t.reduce((S, A) => {
6173
+ u.map((C, N) => t.reduce((S, A) => {
6167
6174
  var E;
6168
- return S + (((E = A.data[$]) == null ? void 0 : E.value) ?? 0);
6175
+ return S + (((E = A.data[N]) == null ? void 0 : E.value) ?? 0);
6169
6176
  }, 0))
6170
- ) : p = at(t.flatMap((C) => C.data.map(($) => $.value)));
6171
- const b = { top: 12, right: 16, bottom: o ? 36 : 12, left: l ? 48 : 16 }, g = n ?? 600, N = r, k = g - b.left - b.right, m = N - b.top - b.bottom, y = k / u.length, w = y * 0.2, z = y - w * 2, W = s ? z : z / t.length;
6172
- function L(C) {
6177
+ ) : p = at(t.flatMap((C) => C.data.map((N) => N.value)));
6178
+ const b = { top: 12, right: 16, bottom: o ? 36 : 12, left: l ? 48 : 16 }, g = n ?? 600, $ = r, k = g - b.left - b.right, m = $ - b.top - b.bottom, y = k / u.length, w = y * 0.2, z = y - w * 2, W = s ? z : z / t.length;
6179
+ function M(C) {
6173
6180
  return b.top + m - C / p * m;
6174
6181
  }
6175
6182
  function F(C) {
6176
6183
  return C / p * m;
6177
6184
  }
6178
- function M(C) {
6185
+ function L(C) {
6179
6186
  return b.left + C * y + w;
6180
6187
  }
6181
- const I = Array.from({ length: 5 }, (C, $) => $ / 4 * p);
6188
+ const I = Array.from({ length: 5 }, (C, N) => N / 4 * p);
6182
6189
  return /* @__PURE__ */ a("div", { className: `w-full ${h}`, children: [
6183
6190
  /* @__PURE__ */ a(
6184
6191
  "svg",
6185
6192
  {
6186
6193
  width: n ? g : "100%",
6187
- height: N,
6188
- viewBox: `0 0 ${g} ${N}`,
6194
+ height: $,
6195
+ viewBox: `0 0 ${g} ${$}`,
6189
6196
  onMouseLeave: () => x(null),
6190
6197
  children: [
6191
- i && I.map((C, $) => /* @__PURE__ */ e(
6198
+ i && I.map((C, N) => /* @__PURE__ */ e(
6192
6199
  "line",
6193
6200
  {
6194
6201
  x1: b.left,
6195
- y1: L(C),
6202
+ y1: M(C),
6196
6203
  x2: g - b.right,
6197
- y2: L(C),
6204
+ y2: M(C),
6198
6205
  stroke: "var(--border)",
6199
6206
  strokeWidth: 0.5,
6200
6207
  strokeDasharray: "4 2"
6201
6208
  },
6202
- $
6209
+ N
6203
6210
  )),
6204
- l && I.map((C, $) => /* @__PURE__ */ e(
6211
+ l && I.map((C, N) => /* @__PURE__ */ e(
6205
6212
  "text",
6206
6213
  {
6207
6214
  x: b.left - 8,
6208
- y: L(C) + 4,
6215
+ y: M(C) + 4,
6209
6216
  textAnchor: "end",
6210
6217
  fill: "var(--muted-foreground)",
6211
6218
  style: ce,
6212
6219
  children: C >= 1e3 ? `${(C / 1e3).toFixed(1)}k` : C
6213
6220
  },
6214
- $
6221
+ N
6215
6222
  )),
6216
- o && u.map((C, $) => /* @__PURE__ */ e(
6223
+ o && u.map((C, N) => /* @__PURE__ */ e(
6217
6224
  "text",
6218
6225
  {
6219
- x: M($) + z / 2,
6220
- y: N - b.bottom + 16,
6226
+ x: L(N) + z / 2,
6227
+ y: $ - b.bottom + 16,
6221
6228
  textAnchor: "middle",
6222
6229
  fill: "var(--muted-foreground)",
6223
6230
  style: ce,
6224
6231
  children: C
6225
6232
  },
6226
- $
6233
+ N
6227
6234
  )),
6228
- u.map((C, $) => {
6235
+ u.map((C, N) => {
6229
6236
  if (s) {
6230
6237
  let S = b.top + m;
6231
6238
  return /* @__PURE__ */ e("g", { children: t.map((A, E) => {
6232
- var Z;
6233
- const H = ((Z = A.data[$]) == null ? void 0 : Z.value) ?? 0, T = F(H), B = S - T;
6239
+ var J;
6240
+ const O = ((J = A.data[N]) == null ? void 0 : J.value) ?? 0, _ = F(O), B = S - _;
6234
6241
  S = B;
6235
- const U = be(A, E), ee = E === t.length - 1, oe = E === 0, ae = f, q = M($), re = z, R = T, _ = ee && oe ? `M${q},${B + ae} Q${q},${B} ${q + ae},${B} L${q + re - ae},${B} Q${q + re},${B} ${q + re},${B + ae} L${q + re},${B + R} L${q},${B + R} Z` : ee ? `M${q},${B + ae} Q${q},${B} ${q + ae},${B} L${q + re - ae},${B} Q${q + re},${B} ${q + re},${B + ae} L${q + re},${B + R} L${q},${B + R} Z` : `M${q},${B} L${q + re},${B} L${q + re},${B + R} L${q},${B + R} Z`;
6236
- return /* @__PURE__ */ e("path", { d: _, fill: U }, E);
6237
- }) }, $);
6242
+ const K = be(A, E), H = E === t.length - 1, X = E === 0, ae = f, q = L(N), re = z, P = _, T = H && X ? `M${q},${B + ae} Q${q},${B} ${q + ae},${B} L${q + re - ae},${B} Q${q + re},${B} ${q + re},${B + ae} L${q + re},${B + P} L${q},${B + P} Z` : H ? `M${q},${B + ae} Q${q},${B} ${q + ae},${B} L${q + re - ae},${B} Q${q + re},${B} ${q + re},${B + ae} L${q + re},${B + P} L${q},${B + P} Z` : `M${q},${B} L${q + re},${B} L${q + re},${B + P} L${q},${B + P} Z`;
6243
+ return /* @__PURE__ */ e("path", { d: T, fill: K }, E);
6244
+ }) }, N);
6238
6245
  } else
6239
6246
  return /* @__PURE__ */ e("g", { children: t.map((S, A) => {
6240
- var oe;
6241
- const E = ((oe = S.data[$]) == null ? void 0 : oe.value) ?? 0, H = F(E), T = M($) + A * W, B = L(E), U = be(S, A), ee = Math.min(f, W / 2);
6247
+ var X;
6248
+ const E = ((X = S.data[N]) == null ? void 0 : X.value) ?? 0, O = F(E), _ = L(N) + A * W, B = M(E), K = be(S, A), H = Math.min(f, W / 2);
6242
6249
  return /* @__PURE__ */ e(
6243
6250
  "path",
6244
6251
  {
6245
- d: `M${T},${B + ee} Q${T},${B} ${T + ee},${B} L${T + W - ee},${B} Q${T + W},${B} ${T + W},${B + ee} L${T + W},${B + H} L${T},${B + H} Z`,
6246
- fill: U
6252
+ d: `M${_},${B + H} Q${_},${B} ${_ + H},${B} L${_ + W - H},${B} Q${_ + W},${B} ${_ + W},${B + H} L${_ + W},${B + O} L${_},${B + O} Z`,
6253
+ fill: K
6247
6254
  },
6248
6255
  A
6249
6256
  );
6250
- }) }, $);
6257
+ }) }, N);
6251
6258
  }),
6252
- c && u.map((C, $) => /* @__PURE__ */ e(
6259
+ c && u.map((C, N) => /* @__PURE__ */ e(
6253
6260
  "rect",
6254
6261
  {
6255
- x: M($),
6262
+ x: L(N),
6256
6263
  y: b.top,
6257
6264
  width: z,
6258
6265
  height: m,
6259
6266
  fill: "transparent",
6260
6267
  style: { cursor: "default" },
6261
- onMouseEnter: () => x({ x: M($) + z / 2, y: b.top, labelIdx: $ })
6268
+ onMouseEnter: () => x({ x: L(N) + z / 2, y: b.top, labelIdx: N })
6262
6269
  },
6263
- $
6270
+ N
6264
6271
  )),
6265
6272
  v && /* @__PURE__ */ e(
6266
6273
  It,
@@ -6268,12 +6275,12 @@ function ul({
6268
6275
  x: At(v.x + 8, b.left, g - 180),
6269
6276
  y: b.top,
6270
6277
  label: u[v.labelIdx],
6271
- items: t.map((C, $) => {
6278
+ items: t.map((C, N) => {
6272
6279
  var S;
6273
6280
  return {
6274
6281
  name: C.name,
6275
6282
  value: ((S = C.data[v.labelIdx]) == null ? void 0 : S.value) ?? 0,
6276
- color: be(C, $)
6283
+ color: be(C, N)
6277
6284
  };
6278
6285
  })
6279
6286
  }
@@ -6281,10 +6288,10 @@ function ul({
6281
6288
  ]
6282
6289
  }
6283
6290
  ),
6284
- d && t.length > 1 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-4 mt-2 justify-center", children: t.map((C, $) => /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", style: ce, children: [
6285
- /* @__PURE__ */ e("div", { className: "w-2.5 h-2.5 rounded-sm", style: { backgroundColor: be(C, $) } }),
6291
+ d && t.length > 1 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-4 mt-2 justify-center", children: t.map((C, N) => /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", style: ce, children: [
6292
+ /* @__PURE__ */ e("div", { className: "w-2.5 h-2.5 rounded-sm", style: { backgroundColor: be(C, N) } }),
6286
6293
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: C.name })
6287
- ] }, $)) })
6294
+ ] }, N)) })
6288
6295
  ] });
6289
6296
  }
6290
6297
  ul.displayName = "BarChart";
@@ -6305,15 +6312,15 @@ function fl({
6305
6312
  const g = t.map((m, y) => {
6306
6313
  const w = m.value / h, z = b, W = b + w * 2 * Math.PI;
6307
6314
  b = W;
6308
- const L = v + u * Math.cos(z), F = x + u * Math.sin(z), M = v + u * Math.cos(W), I = x + u * Math.sin(W), C = v + p * Math.cos(W), $ = x + p * Math.sin(W), S = v + p * Math.cos(z), A = x + p * Math.sin(z), E = w > 0.5 ? 1 : 0;
6315
+ const M = v + u * Math.cos(z), F = x + u * Math.sin(z), L = v + u * Math.cos(W), I = x + u * Math.sin(W), C = v + p * Math.cos(W), N = x + p * Math.sin(W), S = v + p * Math.cos(z), A = x + p * Math.sin(z), E = w > 0.5 ? 1 : 0;
6309
6316
  return { path: [
6310
- `M${L},${F}`,
6311
- `A${u},${u} 0 ${E} 1 ${M},${I}`,
6312
- `L${C},${$}`,
6317
+ `M${M},${F}`,
6318
+ `A${u},${u} 0 ${E} 1 ${L},${I}`,
6319
+ `L${C},${N}`,
6313
6320
  `A${p},${p} 0 ${E} 0 ${S},${A}`,
6314
6321
  "Z"
6315
6322
  ].join(" "), color: m.color ?? Ae[y % Ae.length], ratio: w, d: m, i: y };
6316
- }), N = l ?? h.toLocaleString(), k = s !== null ? t[s] : null;
6323
+ }), $ = l ?? h.toLocaleString(), k = s !== null ? t[s] : null;
6317
6324
  return /* @__PURE__ */ a("div", { className: `flex items-center gap-6 ${c}`, children: [
6318
6325
  /* @__PURE__ */ e("div", { className: "relative flex-shrink-0", children: /* @__PURE__ */ a("svg", { width: r, height: r, viewBox: `0 0 ${r} ${r}`, children: [
6319
6326
  g.map((m) => /* @__PURE__ */ e(
@@ -6337,7 +6344,7 @@ function fl({
6337
6344
  textAnchor: "middle",
6338
6345
  fill: "var(--foreground)",
6339
6346
  style: { ...ce, fontWeight: "700", fontSize: "18px" },
6340
- children: k ? k.value.toLocaleString() : N
6347
+ children: k ? k.value.toLocaleString() : $
6341
6348
  }
6342
6349
  ),
6343
6350
  (o || k) && /* @__PURE__ */ e(
@@ -6347,7 +6354,7 @@ function fl({
6347
6354
  y: x + 12,
6348
6355
  textAnchor: "middle",
6349
6356
  fill: "var(--muted-foreground)",
6350
- style: { ...ce, fontSize: "12px" },
6357
+ style: { ...ce, fontSize: "var(--text-caption)" },
6351
6358
  children: k ? k.label : o
6352
6359
  }
6353
6360
  )
@@ -6391,25 +6398,25 @@ function ml({
6391
6398
  className: c = ""
6392
6399
  }) {
6393
6400
  if (!t.length) return null;
6394
- const s = Math.min(...t), h = Math.max(...t) - s || 1, v = t[t.length - 1] > t[0] ? "up" : t[t.length - 1] < t[0] ? "down" : "neutral", x = d ?? v, p = l ?? (x === "up" ? "var(--chart-1, #22c55e)" : x === "down" ? "var(--chart-4, #ef4444)" : "var(--muted-foreground)"), b = 2, g = n - b * 2, N = o - b * 2;
6401
+ const s = Math.min(...t), h = Math.max(...t) - s || 1, v = t[t.length - 1] > t[0] ? "up" : t[t.length - 1] < t[0] ? "down" : "neutral", x = d ?? v, p = l ?? (x === "up" ? "var(--chart-1, #22c55e)" : x === "down" ? "var(--chart-4, #ef4444)" : "var(--muted-foreground)"), b = 2, g = n - b * 2, $ = o - b * 2;
6395
6402
  function k(W) {
6396
6403
  return b + W / (t.length - 1 || 1) * g;
6397
6404
  }
6398
6405
  function m(W) {
6399
- return b + N - (W - s) / h * N;
6406
+ return b + $ - (W - s) / h * $;
6400
6407
  }
6401
6408
  if (r === "bar") {
6402
6409
  const W = g / t.length - 1;
6403
6410
  return /* @__PURE__ */ a("div", { className: `inline-flex items-center gap-1.5 ${c}`, children: [
6404
- /* @__PURE__ */ e("svg", { width: n, height: o, viewBox: `0 0 ${n} ${o}`, children: t.map((L, F) => {
6405
- const M = (L - s) / h * N;
6411
+ /* @__PURE__ */ e("svg", { width: n, height: o, viewBox: `0 0 ${n} ${o}`, children: t.map((M, F) => {
6412
+ const L = (M - s) / h * $;
6406
6413
  return /* @__PURE__ */ e(
6407
6414
  "rect",
6408
6415
  {
6409
6416
  x: b + F * (g / t.length),
6410
- y: b + N - M,
6417
+ y: b + $ - L,
6411
6418
  width: W,
6412
- height: M,
6419
+ height: L,
6413
6420
  fill: p,
6414
6421
  rx: 1,
6415
6422
  opacity: F === t.length - 1 ? 1 : 0.5
@@ -6420,7 +6427,7 @@ function ml({
6420
6427
  i && /* @__PURE__ */ e("span", { style: { ...ce, color: p }, children: t[t.length - 1].toLocaleString() })
6421
6428
  ] });
6422
6429
  }
6423
- const y = t.map((W, L) => [k(L), m(W)]), w = Et(y, !1), z = w + ` L${y[y.length - 1][0]},${b + N} L${y[0][0]},${b + N} Z`;
6430
+ const y = t.map((W, M) => [k(M), m(W)]), w = Et(y, !1), z = w + ` L${y[y.length - 1][0]},${b + $} L${y[0][0]},${b + $} Z`;
6424
6431
  return /* @__PURE__ */ a("div", { className: `inline-flex items-center gap-1.5 ${c}`, children: [
6425
6432
  /* @__PURE__ */ a("svg", { width: n, height: o, viewBox: `0 0 ${n} ${o}`, children: [
6426
6433
  r === "area" && /* @__PURE__ */ e("path", { d: z, fill: p, fillOpacity: 0.15 }),
@@ -6507,10 +6514,10 @@ const hl = [
6507
6514
  "November",
6508
6515
  "December"
6509
6516
  ], pl = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
6510
- function xt(t) {
6517
+ function yt(t) {
6511
6518
  return t ? t.toLocaleDateString("en-GB", { day: "2-digit", month: "short", year: "numeric" }) : "";
6512
6519
  }
6513
- function yt(t, r) {
6520
+ function wt(t, r) {
6514
6521
  return t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate();
6515
6522
  }
6516
6523
  function gl(t, r) {
@@ -6526,14 +6533,14 @@ const vl = {
6526
6533
  fontWeight: "var(--weight-p)"
6527
6534
  }, dr = {
6528
6535
  fontFamily: "var(--font-label)",
6529
- fontSize: "var(--text-caption)",
6536
+ fontSize: "var(--text-label)",
6530
6537
  fontWeight: "var(--weight-label)"
6531
6538
  }, Zr = {
6532
6539
  fontFamily: "var(--font-label)",
6533
6540
  fontSize: "var(--text-button)",
6534
6541
  fontWeight: "var(--weight-button)"
6535
6542
  }, xl = {
6536
- sm: "h-8 px-3 text-sm",
6543
+ sm: "h-8 px-3",
6537
6544
  md: "h-10 px-3.5",
6538
6545
  lg: "h-11 px-4"
6539
6546
  };
@@ -6553,8 +6560,8 @@ function cr({
6553
6560
  function v(u) {
6554
6561
  const p = n.from, b = n.to ?? o;
6555
6562
  if (!p || !b) return !1;
6556
- const [g, N] = p <= b ? [p, b] : [b, p];
6557
- return u > g && u < N;
6563
+ const [g, $] = p <= b ? [p, b] : [b, p];
6564
+ return u > g && u < $;
6558
6565
  }
6559
6566
  function x(u) {
6560
6567
  return !!(s && u < $e(s) || f && u > Se(f));
@@ -6587,7 +6594,7 @@ function cr({
6587
6594
  ] }),
6588
6595
  /* @__PURE__ */ e("div", { className: "grid grid-cols-7 mb-1", children: pl.map((u) => /* @__PURE__ */ e("div", { className: "h-8 flex items-center justify-center text-muted-foreground", style: dr, children: u }, u)) }),
6589
6596
  /* @__PURE__ */ e("div", { className: "grid grid-cols-7", children: h.map((u, p) => {
6590
- const b = u.getMonth() === t, g = n.from ? yt(u, n.from) : !1, N = n.to ? yt(u, n.to) : o && n.from ? yt(u, o) : !1, k = v(u), m = x(u);
6597
+ const b = u.getMonth() === t, g = n.from ? wt(u, n.from) : !1, $ = n.to ? wt(u, n.to) : o && n.from ? wt(u, o) : !1, k = v(u), m = x(u);
6591
6598
  return /* @__PURE__ */ e(
6592
6599
  "button",
6593
6600
  {
@@ -6600,7 +6607,7 @@ function cr({
6600
6607
  "h-8 w-full flex items-center justify-center text-center transition-colors",
6601
6608
  m ? "opacity-30 cursor-not-allowed" : "cursor-pointer",
6602
6609
  b ? "" : "text-muted-foreground/40",
6603
- g || N ? "bg-primary text-primary-foreground rounded-[var(--radius-md)] font-semibold" : k ? "bg-primary/10 text-primary" : m ? "" : "hover:bg-muted/40 rounded-[var(--radius-md)]"
6610
+ g || $ ? "bg-primary text-primary-foreground rounded-[var(--radius-md)] font-semibold" : k ? "bg-primary/10 text-primary" : m ? "" : "hover:bg-muted/40 rounded-[var(--radius-md)]"
6604
6611
  ].filter(Boolean).join(" "),
6605
6612
  style: dr,
6606
6613
  children: u.getDate()
@@ -6622,39 +6629,49 @@ function yl({
6622
6629
  disabled: s = !1,
6623
6630
  className: f = ""
6624
6631
  }) {
6625
- const h = /* @__PURE__ */ new Date(), [v, x] = j(!1), [u, p] = j({ from: null, to: null }), [b, g] = j(null), [N, k] = j(void 0), [m, y] = j(h.getMonth()), [w, z] = j(h.getFullYear()), [W, L] = j("from"), F = V(null), M = t ?? u, I = (m + 1) % 12, C = m === 11 ? w + 1 : w;
6626
- te(() => {
6627
- function T(B) {
6628
- F.current && !F.current.contains(B.target) && x(!1);
6632
+ const h = /* @__PURE__ */ new Date(), [v, x] = j(!1), [u, p] = j({ from: null, to: null }), [b, g] = j(null), [$, k] = j(void 0), [m, y] = j(h.getMonth()), [w, z] = j(h.getFullYear()), [W, M] = j("from"), [F, L] = j({ top: 0, left: 0, width: 0 }), I = ee(null), C = ee(null), N = t ?? u, S = (m + 1) % 12, A = m === 11 ? w + 1 : w;
6633
+ ne(() => {
6634
+ function H(X) {
6635
+ I.current && !I.current.contains(X.target) && x(!1);
6629
6636
  }
6630
- return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
6631
- }, []);
6632
- function $(T) {
6633
- if (T.value === "custom") {
6637
+ return document.addEventListener("mousedown", H), () => document.removeEventListener("mousedown", H);
6638
+ }, []), ne(() => {
6639
+ if (!v || !C.current) return;
6640
+ const H = () => {
6641
+ const X = C.current.getBoundingClientRect();
6642
+ L({ top: X.bottom + 4, left: X.left, width: X.width });
6643
+ };
6644
+ return H(), window.addEventListener("scroll", H, !0), window.addEventListener("resize", H), () => {
6645
+ window.removeEventListener("scroll", H, !0), window.removeEventListener("resize", H);
6646
+ };
6647
+ }, [v]);
6648
+ function E(H) {
6649
+ if (H.value === "custom") {
6634
6650
  k("custom");
6635
6651
  return;
6636
6652
  }
6637
- const B = T.range();
6638
- p(B), r == null || r(B, T.value), k(T.value), x(!1);
6653
+ const X = H.range();
6654
+ p(X), r == null || r(X, H.value), k(H.value), x(!1);
6639
6655
  }
6640
- function S(T) {
6656
+ function O(H) {
6641
6657
  if (W === "from")
6642
- p({ from: $e(T), to: null }), L("to");
6658
+ p({ from: $e(H), to: null }), M("to");
6643
6659
  else {
6644
- const B = u.from, [U, ee] = T >= B ? [B, Se(T)] : [$e(T), Se(B)], oe = { from: U, to: ee };
6645
- p(oe), r == null || r(oe, "custom"), k("custom"), L("from"), x(!1);
6660
+ const X = u.from, [ae, q] = H >= X ? [X, Se(H)] : [$e(H), Se(X)], re = { from: ae, to: q };
6661
+ p(re), r == null || r(re, "custom"), k("custom"), M("from"), x(!1);
6646
6662
  }
6647
6663
  }
6648
- function A(T) {
6649
- T.stopPropagation();
6650
- const B = { from: null, to: null };
6651
- p(B), r == null || r(B, void 0), k(void 0);
6664
+ function _(H) {
6665
+ H.stopPropagation();
6666
+ const X = { from: null, to: null };
6667
+ p(X), r == null || r(X, void 0), k(void 0);
6652
6668
  }
6653
- const E = M.from && M.to ? `${xt(M.from)} – ${xt(M.to)}` : M.from ? `${xt(M.from)} – ...` : "", H = hl.filter((T) => n.includes(T.value));
6654
- return /* @__PURE__ */ a("div", { ref: F, className: `relative inline-block ${f}`, children: [
6669
+ const B = N.from && N.to ? `${yt(N.from)} – ${yt(N.to)}` : N.from ? `${yt(N.from)} – ...` : "", K = hl.filter((H) => n.includes(H.value));
6670
+ return /* @__PURE__ */ a("div", { ref: I, className: `relative inline-block ${f}`, children: [
6655
6671
  /* @__PURE__ */ a(
6656
6672
  "button",
6657
6673
  {
6674
+ ref: C,
6658
6675
  type: "button",
6659
6676
  disabled: s,
6660
6677
  onClick: () => !s && x(!v),
@@ -6667,14 +6684,14 @@ function yl({
6667
6684
  style: vl,
6668
6685
  children: [
6669
6686
  /* @__PURE__ */ e(gr, { size: 14, className: "text-muted-foreground flex-shrink-0" }),
6670
- /* @__PURE__ */ e("span", { className: E ? "text-foreground flex-1" : "text-muted-foreground flex-1", children: E || o }),
6671
- c && M.from && /* @__PURE__ */ e(
6687
+ /* @__PURE__ */ e("span", { className: B ? "text-foreground flex-1" : "text-muted-foreground flex-1", children: B || o }),
6688
+ c && N.from && /* @__PURE__ */ e(
6672
6689
  "span",
6673
6690
  {
6674
6691
  role: "button",
6675
6692
  tabIndex: 0,
6676
- onClick: A,
6677
- onKeyDown: (T) => T.key === "Enter" && A(T),
6693
+ onClick: _,
6694
+ onKeyDown: (H) => H.key === "Enter" && _(H),
6678
6695
  className: "text-muted-foreground hover:text-foreground transition-colors cursor-pointer flex-shrink-0",
6679
6696
  children: /* @__PURE__ */ e(le, { size: 12 })
6680
6697
  }
@@ -6682,69 +6699,72 @@ function yl({
6682
6699
  ]
6683
6700
  }
6684
6701
  ),
6685
- v && /* @__PURE__ */ a(
6686
- "div",
6687
- {
6688
- className: "absolute top-full mt-1 z-50 bg-card border border-border rounded-[var(--radius-md)] shadow-[0_4px_24px_0_rgba(0,0,0,0.1)] flex overflow-y-auto",
6689
- style: { minWidth: "620px", maxHeight: "calc(100vh - 120px)" },
6690
- children: [
6691
- /* @__PURE__ */ e("div", { className: "w-36 border-r border-border py-2 flex flex-col gap-0.5 flex-shrink-0", children: H.map((T) => /* @__PURE__ */ e(
6692
- "button",
6693
- {
6694
- type: "button",
6695
- onClick: () => $(T),
6696
- className: [
6697
- "w-full text-left px-3 py-1.5 rounded-none transition-colors",
6698
- N === T.value ? "bg-primary/10 text-primary" : "text-foreground hover:bg-muted/30"
6699
- ].join(" "),
6700
- style: Zr,
6701
- children: T.label
6702
- },
6703
- T.value
6704
- )) }),
6705
- /* @__PURE__ */ a("div", { className: "flex gap-4 p-4 flex-1 min-w-0", children: [
6706
- /* @__PURE__ */ e(
6707
- cr,
6708
- {
6709
- month: m,
6710
- year: w,
6711
- range: M,
6712
- hovered: b,
6713
- onHover: g,
6714
- onSelect: S,
6715
- onPrevMonth: () => {
6716
- m === 0 ? (y(11), z(w - 1)) : y(m - 1);
6717
- },
6718
- onNextMonth: () => {
6719
- m === 11 ? (y(0), z(w + 1)) : y(m + 1);
6720
- },
6721
- minDate: i,
6722
- maxDate: d
6723
- }
6724
- ),
6725
- /* @__PURE__ */ e("div", { className: "w-px bg-border" }),
6726
- /* @__PURE__ */ e(
6727
- cr,
6702
+ v && dt(
6703
+ /* @__PURE__ */ a(
6704
+ "div",
6705
+ {
6706
+ className: "fixed z-[9999] bg-card border border-border rounded-[var(--radius-md)] shadow-[0_4px_24px_0_rgba(0,0,0,0.1)] flex overflow-y-auto",
6707
+ style: { top: F.top, left: F.left, minWidth: "620px", maxHeight: "calc(100vh - 120px)" },
6708
+ children: [
6709
+ /* @__PURE__ */ e("div", { className: "w-36 border-r border-border py-2 flex flex-col gap-0.5 flex-shrink-0", children: K.map((H) => /* @__PURE__ */ e(
6710
+ "button",
6728
6711
  {
6729
- month: I,
6730
- year: C,
6731
- range: M,
6732
- hovered: b,
6733
- onHover: g,
6734
- onSelect: S,
6735
- onPrevMonth: () => {
6736
- m === 0 ? (y(11), z(w - 1)) : y(m - 1);
6737
- },
6738
- onNextMonth: () => {
6739
- m === 11 ? (y(0), z(w + 1)) : y(m + 1);
6740
- },
6741
- minDate: i,
6742
- maxDate: d
6743
- }
6744
- )
6745
- ] })
6746
- ]
6747
- }
6712
+ type: "button",
6713
+ onClick: () => E(H),
6714
+ className: [
6715
+ "w-full text-left px-3 py-1.5 rounded-none transition-colors",
6716
+ $ === H.value ? "bg-primary/10 text-primary" : "text-foreground hover:bg-muted/30"
6717
+ ].join(" "),
6718
+ style: Zr,
6719
+ children: H.label
6720
+ },
6721
+ H.value
6722
+ )) }),
6723
+ /* @__PURE__ */ a("div", { className: "flex gap-4 p-4 flex-1 min-w-0", children: [
6724
+ /* @__PURE__ */ e(
6725
+ cr,
6726
+ {
6727
+ month: m,
6728
+ year: w,
6729
+ range: N,
6730
+ hovered: b,
6731
+ onHover: g,
6732
+ onSelect: O,
6733
+ onPrevMonth: () => {
6734
+ m === 0 ? (y(11), z(w - 1)) : y(m - 1);
6735
+ },
6736
+ onNextMonth: () => {
6737
+ m === 11 ? (y(0), z(w + 1)) : y(m + 1);
6738
+ },
6739
+ minDate: i,
6740
+ maxDate: d
6741
+ }
6742
+ ),
6743
+ /* @__PURE__ */ e("div", { className: "w-px bg-border" }),
6744
+ /* @__PURE__ */ e(
6745
+ cr,
6746
+ {
6747
+ month: S,
6748
+ year: A,
6749
+ range: N,
6750
+ hovered: b,
6751
+ onHover: g,
6752
+ onSelect: O,
6753
+ onPrevMonth: () => {
6754
+ m === 0 ? (y(11), z(w - 1)) : y(m - 1);
6755
+ },
6756
+ onNextMonth: () => {
6757
+ m === 11 ? (y(0), z(w + 1)) : y(m + 1);
6758
+ },
6759
+ minDate: i,
6760
+ maxDate: d
6761
+ }
6762
+ )
6763
+ ] })
6764
+ ]
6765
+ }
6766
+ ),
6767
+ document.body
6748
6768
  )
6749
6769
  ] });
6750
6770
  }
@@ -6806,7 +6826,7 @@ function Qe({
6806
6826
  children: /* @__PURE__ */ e(Me, { size: 14 })
6807
6827
  }
6808
6828
  ),
6809
- /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: { fontFamily: "var(--font-label)", fontSize: "var(--text-caption)" }, children: o })
6829
+ /* @__PURE__ */ e("span", { className: "text-muted-foreground", style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)" }, children: o })
6810
6830
  ] });
6811
6831
  }
6812
6832
  function Qr({
@@ -6820,24 +6840,24 @@ function Qr({
6820
6840
  disabled: c = !1,
6821
6841
  className: s = ""
6822
6842
  }) {
6823
- const [f, h] = j(!1), [v, x] = j({ hours: 0, minutes: 0, seconds: 0 }), u = V(null), p = t ?? v, b = n === "12h" ? Array.from({ length: 12 }, (F, M) => M + 1) : Array.from({ length: 24 }, (F, M) => M), g = Array.from(
6843
+ const [f, h] = j(!1), [v, x] = j({ hours: 0, minutes: 0, seconds: 0 }), u = ee(null), p = t ?? v, b = n === "12h" ? Array.from({ length: 12 }, (F, L) => L + 1) : Array.from({ length: 24 }, (F, L) => L), g = Array.from(
6824
6844
  { length: Math.ceil(60 / l) },
6825
- (F, M) => M * l
6826
- ), N = Array.from({ length: 60 }, (F, M) => M), k = ["AM", "PM"];
6827
- te(() => {
6828
- function F(M) {
6829
- u.current && !u.current.contains(M.target) && h(!1);
6845
+ (F, L) => L * l
6846
+ ), $ = Array.from({ length: 60 }, (F, L) => L), k = ["AM", "PM"];
6847
+ ne(() => {
6848
+ function F(L) {
6849
+ u.current && !u.current.contains(L.target) && h(!1);
6830
6850
  }
6831
6851
  return document.addEventListener("mousedown", F), () => document.removeEventListener("mousedown", F);
6832
6852
  }, []);
6833
6853
  function m(F) {
6834
- const M = { ...p, ...F };
6835
- x(M), r == null || r(M);
6854
+ const L = { ...p, ...F };
6855
+ x(L), r == null || r(L);
6836
6856
  }
6837
6857
  const y = Xr(p, n, o), w = t !== void 0 || v.hours !== 0 || v.minutes !== 0, z = n === "12h" ? p.hours % 12 || 12 : p.hours, W = p.hours < 12;
6838
- function L(F, M) {
6858
+ function M(F, L) {
6839
6859
  let I = F % 12;
6840
- M || (I += 12), m({ hours: I });
6860
+ L || (I += 12), m({ hours: I });
6841
6861
  }
6842
6862
  return /* @__PURE__ */ a("div", { ref: u, className: `relative inline-block ${s}`, children: [
6843
6863
  /* @__PURE__ */ a(
@@ -6854,7 +6874,7 @@ function Qr({
6854
6874
  ].join(" "),
6855
6875
  style: qr,
6856
6876
  children: [
6857
- /* @__PURE__ */ e(Lt, { size: 14, className: "text-muted-foreground flex-shrink-0" }),
6877
+ /* @__PURE__ */ e(Ct, { size: 14, className: "text-muted-foreground flex-shrink-0" }),
6858
6878
  /* @__PURE__ */ e("span", { className: w ? "text-foreground" : "text-muted-foreground", children: w ? y : i })
6859
6879
  ]
6860
6880
  }
@@ -6865,7 +6885,7 @@ function Qr({
6865
6885
  {
6866
6886
  options: b,
6867
6887
  value: z,
6868
- onChange: (F) => L(F, W),
6888
+ onChange: (F) => M(F, W),
6869
6889
  label: "Hour"
6870
6890
  }
6871
6891
  ) : /* @__PURE__ */ e(
@@ -6892,7 +6912,7 @@ function Qr({
6892
6912
  /* @__PURE__ */ e(
6893
6913
  Qe,
6894
6914
  {
6895
- options: N,
6915
+ options: $,
6896
6916
  value: p.seconds ?? 0,
6897
6917
  onChange: (F) => m({ seconds: F }),
6898
6918
  label: "Sec"
@@ -6905,7 +6925,7 @@ function Qr({
6905
6925
  "button",
6906
6926
  {
6907
6927
  type: "button",
6908
- onClick: () => L(z, F === "AM"),
6928
+ onClick: () => M(z, F === "AM"),
6909
6929
  className: [
6910
6930
  "px-2 py-1 rounded-[var(--radius-md)] transition-colors",
6911
6931
  F === "AM" === W ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted/30 cursor-pointer"
@@ -6932,8 +6952,8 @@ function wl({
6932
6952
  disabled: s = !1,
6933
6953
  className: f = ""
6934
6954
  }) {
6935
- const [h, v] = j(!1), [x, u] = j(t ?? /* @__PURE__ */ new Date()), p = V(null), b = t ?? x, g = /* @__PURE__ */ new Date(), [N, k] = j(b.getMonth()), [m, y] = j(b.getFullYear());
6936
- te(() => {
6955
+ const [h, v] = j(!1), [x, u] = j(t ?? /* @__PURE__ */ new Date()), p = ee(null), b = t ?? x, g = /* @__PURE__ */ new Date(), [$, k] = j(b.getMonth()), [m, y] = j(b.getFullYear());
6956
+ ne(() => {
6937
6957
  function S(A) {
6938
6958
  p.current && !p.current.contains(A.target) && v(!1);
6939
6959
  }
@@ -6950,23 +6970,23 @@ function wl({
6950
6970
  const A = new Date(b);
6951
6971
  A.setHours(S.hours, S.minutes, S.seconds ?? 0, 0), w(A);
6952
6972
  }
6953
- const L = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], F = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
6954
- function M() {
6955
- const S = [], A = new Date(m, N, 1), E = new Date(A);
6973
+ const M = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], F = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
6974
+ function L() {
6975
+ const S = [], A = new Date(m, $, 1), E = new Date(A);
6956
6976
  E.setDate(E.getDate() - E.getDay());
6957
- for (let H = 0; H < 42; H++)
6977
+ for (let O = 0; O < 42; O++)
6958
6978
  S.push(new Date(E)), E.setDate(E.getDate() + 1);
6959
6979
  return S;
6960
6980
  }
6961
6981
  const I = {
6962
6982
  fontFamily: "var(--font-label)",
6963
- fontSize: "var(--text-caption)",
6983
+ fontSize: "var(--text-label)",
6964
6984
  fontWeight: "var(--weight-label)"
6965
6985
  }, C = {
6966
6986
  fontFamily: "var(--font-label)",
6967
6987
  fontSize: "var(--text-button)",
6968
6988
  fontWeight: "var(--weight-button)"
6969
- }, $ = `${b.toLocaleDateString("en-GB", { day: "2-digit", month: "short", year: "numeric" })} ${Xr(
6989
+ }, N = `${b.toLocaleDateString("en-GB", { day: "2-digit", month: "short", year: "numeric" })} ${Xr(
6970
6990
  { hours: b.getHours(), minutes: b.getMinutes(), seconds: b.getSeconds() },
6971
6991
  n,
6972
6992
  o
@@ -6986,8 +7006,8 @@ function wl({
6986
7006
  ].join(" "),
6987
7007
  style: qr,
6988
7008
  children: [
6989
- /* @__PURE__ */ e(Lt, { size: 14, className: "text-muted-foreground flex-shrink-0" }),
6990
- /* @__PURE__ */ e("span", { className: "text-foreground", children: $ })
7009
+ /* @__PURE__ */ e(Ct, { size: 14, className: "text-muted-foreground flex-shrink-0" }),
7010
+ /* @__PURE__ */ e("span", { className: "text-foreground", children: N })
6991
7011
  ]
6992
7012
  }
6993
7013
  ),
@@ -6999,14 +7019,14 @@ function wl({
6999
7019
  {
7000
7020
  type: "button",
7001
7021
  onClick: () => {
7002
- N === 0 ? (k(11), y(m - 1)) : k(N - 1);
7022
+ $ === 0 ? (k(11), y(m - 1)) : k($ - 1);
7003
7023
  },
7004
7024
  className: "w-7 h-7 flex items-center justify-center rounded-[var(--radius-md)] hover:bg-muted/40 text-muted-foreground cursor-pointer",
7005
7025
  children: /* @__PURE__ */ e(Fe, { size: 14 })
7006
7026
  }
7007
7027
  ),
7008
7028
  /* @__PURE__ */ a("span", { style: C, children: [
7009
- L[N],
7029
+ M[$],
7010
7030
  " ",
7011
7031
  m
7012
7032
  ] }),
@@ -7015,7 +7035,7 @@ function wl({
7015
7035
  {
7016
7036
  type: "button",
7017
7037
  onClick: () => {
7018
- N === 11 ? (k(0), y(m + 1)) : k(N + 1);
7038
+ $ === 11 ? (k(0), y(m + 1)) : k($ + 1);
7019
7039
  },
7020
7040
  className: "w-7 h-7 flex items-center justify-center rounded-[var(--radius-md)] hover:bg-muted/40 text-muted-foreground cursor-pointer",
7021
7041
  children: /* @__PURE__ */ e(fe, { size: 14 })
@@ -7023,8 +7043,8 @@ function wl({
7023
7043
  )
7024
7044
  ] }),
7025
7045
  /* @__PURE__ */ e("div", { className: "grid grid-cols-7 mb-1", children: F.map((S) => /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground", style: I, children: S }, S)) }),
7026
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-y-0.5", children: M().map((S, A) => {
7027
- const E = S.getMonth() === N, H = t ? S.toDateString() === t.toDateString() : S.toDateString() === x.toDateString(), T = S.toDateString() === g.toDateString();
7046
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-y-0.5", children: L().map((S, A) => {
7047
+ const E = S.getMonth() === $, O = t ? S.toDateString() === t.toDateString() : S.toDateString() === x.toDateString(), _ = S.toDateString() === g.toDateString();
7028
7048
  return /* @__PURE__ */ e(
7029
7049
  "button",
7030
7050
  {
@@ -7033,7 +7053,7 @@ function wl({
7033
7053
  className: [
7034
7054
  "h-7 w-full text-center transition-colors rounded-[var(--radius-md)] cursor-pointer",
7035
7055
  E ? "" : "text-muted-foreground/40",
7036
- H ? "bg-primary text-primary-foreground font-semibold" : T ? "border border-primary text-primary" : "hover:bg-muted/40"
7056
+ O ? "bg-primary text-primary-foreground font-semibold" : _ ? "border border-primary text-primary" : "hover:bg-muted/40"
7037
7057
  ].filter(Boolean).join(" "),
7038
7058
  style: I,
7039
7059
  children: S.getDate()
@@ -7070,15 +7090,15 @@ const Nl = {
7070
7090
  fontWeight: "var(--weight-p)"
7071
7091
  }, Sl = {
7072
7092
  fontFamily: "var(--font-label)",
7073
- fontSize: "var(--text-caption)",
7093
+ fontSize: "var(--text-label)",
7074
7094
  fontWeight: "var(--weight-button)"
7075
7095
  }, kl = {
7076
7096
  sm: "p-3 gap-2.5 rounded-[var(--radius-md)]",
7077
7097
  md: "p-4 gap-3 rounded-[var(--radius-md)]",
7078
7098
  lg: "p-5 gap-4 rounded-[var(--radius-md)]"
7079
7099
  }, zl = {
7080
- sm: "w-8 h-8 rounded-[var(--radius-sm)] text-sm",
7081
- md: "w-10 h-10 rounded-[var(--radius-md)] text-base",
7100
+ sm: "w-8 h-8 rounded-[var(--radius-sm)]",
7101
+ md: "w-10 h-10 rounded-[var(--radius-md)]",
7082
7102
  lg: "w-12 h-12 rounded-[var(--radius-md)] text-lg"
7083
7103
  };
7084
7104
  function Fl({
@@ -7202,7 +7222,7 @@ const Ml = {
7202
7222
  fontWeight: "var(--weight-p)"
7203
7223
  }, Cl = {
7204
7224
  fontFamily: "var(--font-label)",
7205
- fontSize: "var(--text-caption)",
7225
+ fontSize: "var(--text-label)",
7206
7226
  fontWeight: "var(--weight-button)"
7207
7227
  }, jl = {
7208
7228
  sm: "p-3",
@@ -7357,12 +7377,12 @@ function _l({
7357
7377
  }, g = (w, z, W) => {
7358
7378
  u(
7359
7379
  x.map(
7360
- (L) => L.id === w ? { ...L, values: { ...L.values, [z]: W } } : L
7380
+ (M) => M.id === w ? { ...M, values: { ...M.values, [z]: W } } : M
7361
7381
  )
7362
7382
  );
7363
- }, N = (w, z) => {
7364
- const W = [...x], [L] = W.splice(w, 1);
7365
- W.splice(z, 0, L), u(W);
7383
+ }, $ = (w, z) => {
7384
+ const W = [...x], [M] = W.splice(w, 1);
7385
+ W.splice(z, 0, M), u(W);
7366
7386
  }, k = x.length <= l, m = i !== void 0 && x.length >= i, y = pe.useRef(null);
7367
7387
  return /* @__PURE__ */ a("div", { className: `space-y-2 ${f}`, children: [
7368
7388
  /* @__PURE__ */ a(
@@ -7401,7 +7421,7 @@ function _l({
7401
7421
  W.preventDefault();
7402
7422
  },
7403
7423
  onDrop: () => {
7404
- y.current !== null && y.current !== z && (N(y.current, z), y.current = null);
7424
+ y.current !== null && y.current !== z && ($(y.current, z), y.current = null);
7405
7425
  },
7406
7426
  children: [
7407
7427
  c && /* @__PURE__ */ e("div", { className: "cursor-grab text-muted-foreground/50 hover:text-muted-foreground flex-shrink-0", children: /* @__PURE__ */ e(Fn, { size: 14 }) }),
@@ -7412,7 +7432,7 @@ function _l({
7412
7432
  className: "min-w-0",
7413
7433
  children: W.render(
7414
7434
  w.values[W.key],
7415
- (L) => g(w.id, W.key, L),
7435
+ (M) => g(w.id, W.key, M),
7416
7436
  z
7417
7437
  )
7418
7438
  },
@@ -7429,7 +7449,7 @@ function _l({
7429
7449
  s || k ? "text-muted-foreground/30 cursor-not-allowed" : "text-muted-foreground hover:text-destructive hover:bg-destructive/10 cursor-pointer"
7430
7450
  ].join(" "),
7431
7451
  "aria-label": "Remove row",
7432
- children: /* @__PURE__ */ e(Nt, { size: 14 })
7452
+ children: /* @__PURE__ */ e($t, { size: 14 })
7433
7453
  }
7434
7454
  )
7435
7455
  ]
@@ -7453,7 +7473,7 @@ function _l({
7453
7473
  ].join(" "),
7454
7474
  style: ur,
7455
7475
  children: [
7456
- /* @__PURE__ */ e(Ct, { size: 14 }),
7476
+ /* @__PURE__ */ e(jt, { size: 14 }),
7457
7477
  d
7458
7478
  ]
7459
7479
  }
@@ -7514,12 +7534,12 @@ function Pl({
7514
7534
  size: f = "md",
7515
7535
  className: h = ""
7516
7536
  }) {
7517
- const v = V(null), [x, u] = j(!1), [p, b] = j(/* @__PURE__ */ new Set()), [g, N] = j(!t);
7518
- te(() => {
7519
- v.current && t && v.current.innerHTML !== t && (v.current.innerHTML = t, N(!1));
7537
+ const v = ee(null), [x, u] = j(!1), [p, b] = j(/* @__PURE__ */ new Set()), [g, $] = j(!t);
7538
+ ne(() => {
7539
+ v.current && t && v.current.innerHTML !== t && (v.current.innerHTML = t, $(!1));
7520
7540
  }, []);
7521
- const k = X(() => {
7522
- const L = /* @__PURE__ */ new Set();
7541
+ const k = Q(() => {
7542
+ const M = /* @__PURE__ */ new Set();
7523
7543
  [
7524
7544
  "bold",
7525
7545
  "italic",
@@ -7532,29 +7552,29 @@ function Pl({
7532
7552
  "justifyRight"
7533
7553
  ].forEach((F) => {
7534
7554
  try {
7535
- document.queryCommandState(F) && L.add(F);
7555
+ document.queryCommandState(F) && M.add(F);
7536
7556
  } catch {
7537
7557
  }
7538
- }), b(L);
7558
+ }), b(M);
7539
7559
  }, []);
7540
- function m(L) {
7560
+ function m(M) {
7541
7561
  var F;
7542
7562
  if (!(c || s)) {
7543
- if ((F = v.current) == null || F.focus(), L.startsWith("formatBlock-")) {
7544
- const M = L.replace("formatBlock-", "");
7545
- document.execCommand("formatBlock", !1, M);
7546
- } else if (L === "createLink") {
7547
- const M = window.prompt("Enter URL:");
7548
- M && document.execCommand("createLink", !1, M);
7563
+ if ((F = v.current) == null || F.focus(), M.startsWith("formatBlock-")) {
7564
+ const L = M.replace("formatBlock-", "");
7565
+ document.execCommand("formatBlock", !1, L);
7566
+ } else if (M === "createLink") {
7567
+ const L = window.prompt("Enter URL:");
7568
+ L && document.execCommand("createLink", !1, L);
7549
7569
  } else
7550
- document.execCommand(L, !1);
7570
+ document.execCommand(M, !1);
7551
7571
  k(), v.current && r && r(v.current.innerHTML);
7552
7572
  }
7553
7573
  }
7554
7574
  function y() {
7555
7575
  if (v.current) {
7556
- const L = v.current.innerHTML, F = v.current.innerText.trim();
7557
- N(!F), r == null || r(L), k();
7576
+ const M = v.current.innerHTML, F = v.current.innerText.trim();
7577
+ $(!F), r == null || r(M), k();
7558
7578
  }
7559
7579
  }
7560
7580
  const z = o ?? { sm: 120, md: 160, lg: 240 }[f], W = [
@@ -7565,12 +7585,12 @@ function Pl({
7565
7585
  ].filter(Boolean).join(" ");
7566
7586
  return /* @__PURE__ */ a("div", { className: W, children: [
7567
7587
  !s && /* @__PURE__ */ a("div", { className: "flex items-center gap-0.5 flex-wrap px-2 py-1.5 border-b border-border bg-muted/10", children: [
7568
- i.map((L, F) => {
7569
- const M = Hl[L];
7588
+ i.map((M, F) => {
7589
+ const L = Hl[M];
7570
7590
  return /* @__PURE__ */ a(pe.Fragment, { children: [
7571
7591
  F > 0 && /* @__PURE__ */ e("div", { className: "w-px h-5 bg-border mx-1" }),
7572
- M.map((I) => {
7573
- const C = I.icon, $ = p.has(I.cmd);
7592
+ L.map((I) => {
7593
+ const C = I.icon, N = p.has(I.cmd);
7574
7594
  return /* @__PURE__ */ e(
7575
7595
  "button",
7576
7596
  {
@@ -7582,7 +7602,7 @@ function Pl({
7582
7602
  },
7583
7603
  className: [
7584
7604
  "w-7 h-7 flex items-center justify-center rounded-[var(--radius-sm)] transition-colors",
7585
- $ ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-muted/40 hover:text-foreground",
7605
+ N ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-muted/40 hover:text-foreground",
7586
7606
  c ? "cursor-not-allowed" : "cursor-pointer"
7587
7607
  ].join(" "),
7588
7608
  children: /* @__PURE__ */ e(C, { size: 13 })
@@ -7590,7 +7610,7 @@ function Pl({
7590
7610
  I.cmd
7591
7611
  );
7592
7612
  })
7593
- ] }, L);
7613
+ ] }, M);
7594
7614
  }),
7595
7615
  d && /* @__PURE__ */ a(ge, { children: [
7596
7616
  /* @__PURE__ */ e("div", { className: "ml-auto w-px h-5 bg-border mx-1" }),
@@ -7645,13 +7665,13 @@ function Pl({
7645
7665
  ] });
7646
7666
  }
7647
7667
  Pl.displayName = "RichTextEditor";
7648
- const Ft = {
7668
+ const Wt = {
7649
7669
  fontFamily: "var(--font-label)",
7650
7670
  fontSize: "var(--text-label)",
7651
7671
  fontWeight: "var(--weight-label)"
7652
7672
  }, Ee = {
7653
7673
  fontFamily: "var(--font-label)",
7654
- fontSize: "var(--text-caption)",
7674
+ fontSize: "var(--text-label)",
7655
7675
  fontWeight: "var(--weight-p)"
7656
7676
  }, Yl = {
7657
7677
  2: "grid-cols-2",
@@ -7760,7 +7780,7 @@ function Vr({
7760
7780
  }
7761
7781
  ) }),
7762
7782
  (n || o) && /* @__PURE__ */ a("div", { className: "min-w-0", children: [
7763
- n && /* @__PURE__ */ e("div", { className: "truncate text-foreground", style: Ft, children: n }),
7783
+ n && /* @__PURE__ */ e("div", { className: "truncate text-foreground", style: Wt, children: n }),
7764
7784
  o && /* @__PURE__ */ e("div", { className: "truncate text-muted-foreground", style: Ee, children: o })
7765
7785
  ] })
7766
7786
  ]
@@ -7783,7 +7803,7 @@ function Ul({
7783
7803
  disabled: v = !1,
7784
7804
  className: x = ""
7785
7805
  }) {
7786
- const [u, p] = j(f), [b, g] = j(null), N = pe.useRef(null);
7806
+ const [u, p] = j(f), [b, g] = j(null), $ = pe.useRef(null);
7787
7807
  function k(w) {
7788
7808
  if (v) return;
7789
7809
  if (n.includes(w))
@@ -7796,11 +7816,11 @@ function Ul({
7796
7816
  function m(w, z) {
7797
7817
  r ? k(z) : i && g(w);
7798
7818
  }
7799
- const y = X((w) => {
7819
+ const y = Q((w) => {
7800
7820
  var z;
7801
7821
  (z = w.target.files) != null && z.length && (c == null || c(w.target.files), w.target.value = "");
7802
7822
  }, [c]);
7803
- return t.length === 0 && !d ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground border border-dashed border-border rounded-[var(--radius-md)]", children: /* @__PURE__ */ e("span", { style: Ft, children: "No images yet" }) }) : /* @__PURE__ */ a("div", { className: x, children: [
7823
+ return t.length === 0 && !d ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground border border-dashed border-border rounded-[var(--radius-md)]", children: /* @__PURE__ */ e("span", { style: Wt, children: "No images yet" }) }) : /* @__PURE__ */ a("div", { className: x, children: [
7804
7824
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between mb-3", children: [
7805
7825
  /* @__PURE__ */ a("span", { className: "text-muted-foreground", style: Ee, children: [
7806
7826
  t.length,
@@ -7813,7 +7833,7 @@ function Ul({
7813
7833
  /* @__PURE__ */ e(
7814
7834
  "input",
7815
7835
  {
7816
- ref: N,
7836
+ ref: $,
7817
7837
  type: "file",
7818
7838
  accept: "image/*",
7819
7839
  multiple: !0,
@@ -7828,7 +7848,7 @@ function Ul({
7828
7848
  disabled: v,
7829
7849
  onClick: () => {
7830
7850
  var w;
7831
- return (w = N.current) == null ? void 0 : w.click();
7851
+ return (w = $.current) == null ? void 0 : w.click();
7832
7852
  },
7833
7853
  className: "flex items-center gap-1.5 px-2.5 py-1.5 rounded-[var(--radius-md)] border border-border bg-card hover:bg-muted/20 text-foreground transition-colors cursor-pointer",
7834
7854
  style: Ee,
@@ -7887,11 +7907,11 @@ function Ul({
7887
7907
  "button",
7888
7908
  {
7889
7909
  type: "button",
7890
- onClick: (L) => {
7891
- L.stopPropagation(), s(w.id);
7910
+ onClick: (M) => {
7911
+ M.stopPropagation(), s(w.id);
7892
7912
  },
7893
7913
  className: "absolute top-1.5 right-1.5 w-6 h-6 flex items-center justify-center rounded-full bg-black/60 text-white opacity-0 group-hover:opacity-100 transition-opacity hover:bg-destructive cursor-pointer",
7894
- children: /* @__PURE__ */ e(Nt, { size: 10 })
7914
+ children: /* @__PURE__ */ e($t, { size: 10 })
7895
7915
  }
7896
7916
  )
7897
7917
  ]
@@ -7912,7 +7932,7 @@ function Ul({
7912
7932
  children: [
7913
7933
  /* @__PURE__ */ e(Vr, { src: w.src, alt: w.alt, size: "sm" }),
7914
7934
  /* @__PURE__ */ a("div", { className: "flex-1 min-w-0", children: [
7915
- /* @__PURE__ */ e("div", { className: "truncate text-foreground", style: Ft, children: w.name ?? w.alt ?? `Image ${z + 1}` }),
7935
+ /* @__PURE__ */ e("div", { className: "truncate text-foreground", style: Wt, children: w.name ?? w.alt ?? `Image ${z + 1}` }),
7916
7936
  w.size && /* @__PURE__ */ e("div", { className: "text-muted-foreground", style: Ee, children: w.size })
7917
7937
  ] }),
7918
7938
  r && W && /* @__PURE__ */ e("div", { className: "w-5 h-5 rounded-full bg-primary flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e(me, { size: 10, className: "text-primary-foreground" }) }),
@@ -7920,11 +7940,11 @@ function Ul({
7920
7940
  "button",
7921
7941
  {
7922
7942
  type: "button",
7923
- onClick: (L) => {
7924
- L.stopPropagation(), s(w.id);
7943
+ onClick: (M) => {
7944
+ M.stopPropagation(), s(w.id);
7925
7945
  },
7926
7946
  className: "w-7 h-7 flex items-center justify-center rounded-[var(--radius-md)] text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors cursor-pointer flex-shrink-0",
7927
- children: /* @__PURE__ */ e(Nt, { size: 13 })
7947
+ children: /* @__PURE__ */ e($t, { size: 13 })
7928
7948
  }
7929
7949
  )
7930
7950
  ]
@@ -7956,30 +7976,30 @@ function en({
7956
7976
  defaultSidebarOpen: i = !0,
7957
7977
  children: d
7958
7978
  }) {
7959
- const c = o !== void 0, [s, f] = j(i), h = c ? o : s, v = X(
7979
+ const c = o !== void 0, [s, f] = j(i), h = c ? o : s, v = Q(
7960
7980
  (y) => {
7961
7981
  c || f(y), l == null || l(y);
7962
7982
  },
7963
7983
  [c, l]
7964
- ), [x, u] = j([]), p = X((y) => {
7984
+ ), [x, u] = j([]), p = Q((y) => {
7965
7985
  u(y);
7966
7986
  }, []), [b, g] = j({
7967
7987
  groups: [],
7968
7988
  loading: !1,
7969
7989
  error: null
7970
- }), N = V(0), k = X(async () => {
7990
+ }), $ = ee(0), k = Q(async () => {
7971
7991
  if (!n || !t) {
7972
7992
  g({ groups: [], loading: !1, error: null });
7973
7993
  return;
7974
7994
  }
7975
- const y = ++N.current;
7995
+ const y = ++$.current;
7976
7996
  g((w) => ({ ...w, loading: !0, error: null }));
7977
7997
  try {
7978
7998
  const w = await n(t);
7979
- if (y !== N.current) return;
7999
+ if (y !== $.current) return;
7980
8000
  g({ groups: w, loading: !1, error: null });
7981
8001
  } catch (w) {
7982
- if (y !== N.current) return;
8002
+ if (y !== $.current) return;
7983
8003
  g({
7984
8004
  groups: [],
7985
8005
  loading: !1,
@@ -7987,9 +8007,9 @@ function en({
7987
8007
  });
7988
8008
  }
7989
8009
  }, [n, t]);
7990
- te(() => {
8010
+ ne(() => {
7991
8011
  k();
7992
- }, [k]), te(() => {
8012
+ }, [k]), ne(() => {
7993
8013
  if (!(r != null && r.product)) return;
7994
8014
  const y = document.documentElement.getAttribute("data-product");
7995
8015
  return document.documentElement.setAttribute("data-product", r.product), () => {
@@ -8043,14 +8063,14 @@ function Zl() {
8043
8063
  }
8044
8064
  function Xi(t) {
8045
8065
  const { setBreadcrumbs: r } = Kl(), n = JSON.stringify(t);
8046
- te(() => (r(t), () => r([])), [n]);
8066
+ ne(() => (r(t), () => r([])), [n]);
8047
8067
  }
8048
8068
  function qi(t, r) {
8049
8069
  const [n, o] = j({
8050
8070
  groups: [],
8051
8071
  loading: !1,
8052
8072
  error: null
8053
- }), l = V(0), i = X(async () => {
8073
+ }), l = ee(0), i = Q(async () => {
8054
8074
  if (!t || !r) {
8055
8075
  o({ groups: [], loading: !1, error: null });
8056
8076
  return;
@@ -8070,7 +8090,7 @@ function qi(t, r) {
8070
8090
  });
8071
8091
  }
8072
8092
  }, [t, r]);
8073
- return te(() => {
8093
+ return ne(() => {
8074
8094
  i();
8075
8095
  }, [i]), { ...n, refresh: i };
8076
8096
  }
@@ -8117,7 +8137,7 @@ class Xl extends pe.Component {
8117
8137
  ) : this.props.children;
8118
8138
  }
8119
8139
  }
8120
- function J({ children: t, className: r = "" }) {
8140
+ function V({ children: t, className: r = "" }) {
8121
8141
  return t ? /* @__PURE__ */ e("div", { className: r, children: t }) : null;
8122
8142
  }
8123
8143
  function tn({ children: t }) {
@@ -8126,19 +8146,19 @@ function tn({ children: t }) {
8126
8146
  function fr({ p: t }) {
8127
8147
  const r = t.gap ?? "gap-5";
8128
8148
  return /* @__PURE__ */ a("div", { className: `flex flex-col ${r}`, children: [
8129
- /* @__PURE__ */ e(J, { children: t.header }),
8130
- /* @__PURE__ */ e(J, { children: t.banner }),
8131
- /* @__PURE__ */ e(J, { children: t.stats }),
8132
- /* @__PURE__ */ e(J, { children: t.filters }),
8133
- /* @__PURE__ */ e(J, { className: "min-h-0", children: t.content }),
8134
- /* @__PURE__ */ e(J, { children: t.footer })
8149
+ /* @__PURE__ */ e(V, { children: t.header }),
8150
+ /* @__PURE__ */ e(V, { children: t.banner }),
8151
+ /* @__PURE__ */ e(V, { children: t.stats }),
8152
+ /* @__PURE__ */ e(V, { children: t.filters }),
8153
+ /* @__PURE__ */ e(V, { className: "min-h-0", children: t.content }),
8154
+ /* @__PURE__ */ e(V, { children: t.footer })
8135
8155
  ] });
8136
8156
  }
8137
8157
  function ql({ p: t }) {
8138
8158
  const r = t.gap ?? "gap-6", n = t.asideWidth ?? "w-80";
8139
8159
  return /* @__PURE__ */ a("div", { className: `flex flex-col ${r}`, children: [
8140
- /* @__PURE__ */ e(J, { children: t.header }),
8141
- /* @__PURE__ */ e(J, { children: t.banner }),
8160
+ /* @__PURE__ */ e(V, { children: t.header }),
8161
+ /* @__PURE__ */ e(V, { children: t.banner }),
8142
8162
  /* @__PURE__ */ a("div", { className: `flex flex-col lg:flex-row ${r} min-h-0`, children: [
8143
8163
  t.asideLeft && /* @__PURE__ */ e("div", { className: `flex-shrink-0 ${n} lg:sticky lg:top-4 lg:max-h-[calc(100vh-5rem)] lg:overflow-y-auto`, children: t.aside }),
8144
8164
  /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 flex flex-col gap-5", children: t.main ?? t.content }),
@@ -8149,19 +8169,19 @@ function ql({ p: t }) {
8149
8169
  function Jl({ p: t }) {
8150
8170
  const r = t.gap ?? "gap-8";
8151
8171
  return /* @__PURE__ */ a("div", { className: `flex flex-col ${r} max-w-3xl`, children: [
8152
- /* @__PURE__ */ e(J, { children: t.header }),
8153
- /* @__PURE__ */ e(J, { children: t.banner }),
8154
- /* @__PURE__ */ e(J, { className: `flex flex-col ${r}`, children: t.sections ?? t.content })
8172
+ /* @__PURE__ */ e(V, { children: t.header }),
8173
+ /* @__PURE__ */ e(V, { children: t.banner }),
8174
+ /* @__PURE__ */ e(V, { className: `flex flex-col ${r}`, children: t.sections ?? t.content })
8155
8175
  ] });
8156
8176
  }
8157
8177
  function Ql({ p: t }) {
8158
8178
  const r = t.gap ?? "gap-6";
8159
8179
  return /* @__PURE__ */ a("div", { className: "flex flex-col min-h-screen", children: [
8160
8180
  /* @__PURE__ */ a("div", { className: `flex flex-col ${r} flex-1 pb-24`, children: [
8161
- /* @__PURE__ */ e(J, { children: t.header }),
8162
- /* @__PURE__ */ e(J, { children: t.banner }),
8163
- /* @__PURE__ */ e(J, { children: t.stepper }),
8164
- /* @__PURE__ */ e(J, { className: "flex-1", children: t.form ?? t.content })
8181
+ /* @__PURE__ */ e(V, { children: t.header }),
8182
+ /* @__PURE__ */ e(V, { children: t.banner }),
8183
+ /* @__PURE__ */ e(V, { children: t.stepper }),
8184
+ /* @__PURE__ */ e(V, { className: "flex-1", children: t.form ?? t.content })
8165
8185
  ] }),
8166
8186
  /* @__PURE__ */ e(tn, { children: t.actions })
8167
8187
  ] });
@@ -8169,27 +8189,27 @@ function Ql({ p: t }) {
8169
8189
  function Vl({ p: t }) {
8170
8190
  const r = t.gap ?? "gap-6", n = t.primaryChart && t.secondaryCharts;
8171
8191
  return /* @__PURE__ */ a("div", { className: `flex flex-col ${r}`, children: [
8172
- /* @__PURE__ */ e(J, { children: t.header }),
8173
- /* @__PURE__ */ e(J, { children: t.banner }),
8174
- /* @__PURE__ */ e(J, { children: t.kpis ?? t.stats }),
8192
+ /* @__PURE__ */ e(V, { children: t.header }),
8193
+ /* @__PURE__ */ e(V, { children: t.banner }),
8194
+ /* @__PURE__ */ e(V, { children: t.kpis ?? t.stats }),
8175
8195
  n ? /* @__PURE__ */ a("div", { className: `grid grid-cols-1 lg:grid-cols-3 ${r}`, children: [
8176
8196
  /* @__PURE__ */ e("div", { className: "lg:col-span-2", children: t.primaryChart }),
8177
8197
  /* @__PURE__ */ e("div", { className: "flex flex-col gap-4", children: t.secondaryCharts })
8178
8198
  ] }) : /* @__PURE__ */ a(ge, { children: [
8179
- /* @__PURE__ */ e(J, { children: t.primaryChart ?? t.charts }),
8180
- /* @__PURE__ */ e(J, { children: t.secondaryCharts })
8199
+ /* @__PURE__ */ e(V, { children: t.primaryChart ?? t.charts }),
8200
+ /* @__PURE__ */ e(V, { children: t.secondaryCharts })
8181
8201
  ] }),
8182
- /* @__PURE__ */ e(J, { children: t.content ?? t.table }),
8183
- /* @__PURE__ */ e(J, { children: t.footer })
8202
+ /* @__PURE__ */ e(V, { children: t.content ?? t.table }),
8203
+ /* @__PURE__ */ e(V, { children: t.footer })
8184
8204
  ] });
8185
8205
  }
8186
8206
  function ei({ p: t }) {
8187
8207
  const r = t.gap ?? "gap-6";
8188
8208
  return /* @__PURE__ */ a("div", { className: "flex flex-col min-h-screen", children: [
8189
8209
  /* @__PURE__ */ a("div", { className: `flex flex-col ${r} flex-1 pb-24`, children: [
8190
- /* @__PURE__ */ e(J, { children: t.header }),
8191
- /* @__PURE__ */ e(J, { children: t.banner }),
8192
- /* @__PURE__ */ e(J, { className: "flex-1 max-w-2xl", children: t.form ?? t.content })
8210
+ /* @__PURE__ */ e(V, { children: t.header }),
8211
+ /* @__PURE__ */ e(V, { children: t.banner }),
8212
+ /* @__PURE__ */ e(V, { className: "flex-1 max-w-2xl", children: t.form ?? t.content })
8193
8213
  ] }),
8194
8214
  /* @__PURE__ */ e(tn, { children: t.actions })
8195
8215
  ] });
@@ -8197,17 +8217,17 @@ function ei({ p: t }) {
8197
8217
  function ti({ p: t }) {
8198
8218
  const r = t.gap ?? "gap-6";
8199
8219
  return /* @__PURE__ */ a("div", { className: `flex flex-col ${r}`, children: [
8200
- /* @__PURE__ */ e(J, { children: t.header }),
8201
- /* @__PURE__ */ e(J, { children: t.banner }),
8220
+ /* @__PURE__ */ e(V, { children: t.header }),
8221
+ /* @__PURE__ */ e(V, { children: t.banner }),
8202
8222
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between flex-wrap gap-3", children: [
8203
8223
  t.stats && /* @__PURE__ */ e("div", { className: "flex-1", children: t.stats }),
8204
8224
  t.dateRange && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: t.dateRange })
8205
8225
  ] }),
8206
- /* @__PURE__ */ e(J, { children: t.filters }),
8207
- /* @__PURE__ */ e(J, { children: t.charts ?? t.primaryChart }),
8226
+ /* @__PURE__ */ e(V, { children: t.filters }),
8227
+ /* @__PURE__ */ e(V, { children: t.charts ?? t.primaryChart }),
8208
8228
  t.secondaryCharts && /* @__PURE__ */ e("div", { className: `grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 ${r}`, children: t.secondaryCharts }),
8209
- /* @__PURE__ */ e(J, { children: t.table ?? t.content }),
8210
- /* @__PURE__ */ e(J, { children: t.footer })
8229
+ /* @__PURE__ */ e(V, { children: t.table ?? t.content }),
8230
+ /* @__PURE__ */ e(V, { children: t.footer })
8211
8231
  ] });
8212
8232
  }
8213
8233
  function ri(t) {
@@ -8287,42 +8307,42 @@ function si({
8287
8307
  children: h,
8288
8308
  className: v = ""
8289
8309
  }) {
8290
- var C, $, S, A;
8310
+ var C, N, S, A;
8291
8311
  const {
8292
8312
  sidebarOpen: x,
8293
8313
  setSidebarOpen: u,
8294
8314
  user: p,
8295
8315
  product: b,
8296
8316
  breadcrumbs: g,
8297
- navGroups: N,
8317
+ navGroups: $,
8298
8318
  navLoading: k,
8299
8319
  navError: m,
8300
8320
  refreshNav: y
8301
8321
  } = Zl(), [w, z] = j(
8302
8322
  !(((C = b == null ? void 0 : b.shell) == null ? void 0 : C.sidebarDefaultOpen) ?? !0)
8303
- ), [W, L] = j(!1);
8304
- te(() => {
8323
+ ), [W, M] = j(!1);
8324
+ ne(() => {
8305
8325
  function E() {
8306
- window.innerWidth >= 768 && L(!1);
8326
+ window.innerWidth >= 768 && M(!1);
8307
8327
  }
8308
8328
  return window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
8309
8329
  }, []);
8310
- const F = ii(N), M = X(
8330
+ const F = ii($), L = Q(
8311
8331
  (E) => {
8312
- const H = N.flatMap((T) => T.items).find((T) => T.id === E.id);
8313
- H && r && r(H), L(!1);
8332
+ const O = $.flatMap((_) => _.items).find((_) => _.id === E.id);
8333
+ O && r && r(O), M(!1);
8314
8334
  },
8315
- [N, r]
8335
+ [$, r]
8316
8336
  ), I = /* @__PURE__ */ e(
8317
- St,
8337
+ kt,
8318
8338
  {
8319
8339
  brand: b ? { name: b.brand.name } : { name: "Sellsuki" },
8320
8340
  groups: k ? [{ label: "Loading", items: [] }] : F,
8321
8341
  activeItem: t,
8322
- onNavigate: M,
8342
+ onNavigate: L,
8323
8343
  collapsed: w,
8324
8344
  onCollapsedChange: z,
8325
- showCollapseToggle: (($ = b == null ? void 0 : b.shell) == null ? void 0 : $.sidebarCollapsible) ?? !0,
8345
+ showCollapseToggle: ((N = b == null ? void 0 : b.shell) == null ? void 0 : N.sidebarCollapsible) ?? !0,
8326
8346
  version: c,
8327
8347
  versionDate: s
8328
8348
  }
@@ -8346,9 +8366,9 @@ function si({
8346
8366
  onUserClick: l,
8347
8367
  workspaceSwitcher: (S = b == null ? void 0 : b.brand) == null ? void 0 : S.workspaceSwitcher,
8348
8368
  onSidebarToggle: () => {
8349
- window.innerWidth < 768 ? L((E) => !E) : z((E) => !E);
8369
+ window.innerWidth < 768 ? M((E) => !E) : z((E) => !E);
8350
8370
  },
8351
- onMobileMenuClick: () => L((E) => !E)
8371
+ onMobileMenuClick: () => M((E) => !E)
8352
8372
  }
8353
8373
  ),
8354
8374
  /* @__PURE__ */ a("div", { className: "flex flex-1 overflow-hidden", children: [
@@ -8361,12 +8381,13 @@ function si({
8361
8381
  transition: "width var(--duration-sidebar, 250ms) var(--easing-default, cubic-bezier(0.4,0,0.2,1))"
8362
8382
  },
8363
8383
  children: k ? /* @__PURE__ */ e("div", { className: "p-4 w-full", children: /* @__PURE__ */ e(tr, { rows: 6 }) }) : m ? /* @__PURE__ */ a("div", { className: "p-3", children: [
8364
- /* @__PURE__ */ e(Lr, { variant: "error", children: /* @__PURE__ */ e("span", { style: { fontSize: "var(--text-caption)" }, children: "Nav load failed" }) }),
8384
+ /* @__PURE__ */ e(Lr, { variant: "error", children: /* @__PURE__ */ e("span", { style: { fontSize: "var(--text-label)" }, children: "Nav load failed" }) }),
8365
8385
  /* @__PURE__ */ e(
8366
8386
  "button",
8367
8387
  {
8368
8388
  type: "button",
8369
- className: "mt-2 text-xs text-primary cursor-pointer hover:underline",
8389
+ className: "mt-2 text-primary cursor-pointer hover:underline",
8390
+ style: { fontSize: "var(--text-label)" },
8370
8391
  onClick: y,
8371
8392
  children: "Retry"
8372
8393
  }
@@ -8379,7 +8400,7 @@ function si({
8379
8400
  "div",
8380
8401
  {
8381
8402
  className: "fixed inset-0 z-[var(--z-shell-overlay,80)] bg-black/40 md:hidden",
8382
- onClick: () => L(!1)
8403
+ onClick: () => M(!1)
8383
8404
  }
8384
8405
  ),
8385
8406
  /* @__PURE__ */ e(
@@ -8388,12 +8409,12 @@ function si({
8388
8409
  className: "fixed left-0 top-[56px] bottom-0 z-[var(--z-shell-sidebar,90)] w-[240px] bg-card shadow-lg md:hidden overflow-y-auto",
8389
8410
  style: { transition: "transform var(--duration-sidebar, 250ms) var(--easing-default)" },
8390
8411
  children: k ? /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e(tr, { rows: 6 }) }) : /* @__PURE__ */ e(
8391
- St,
8412
+ kt,
8392
8413
  {
8393
8414
  brand: b ? { name: b.brand.name } : { name: "Sellsuki" },
8394
8415
  groups: F,
8395
8416
  activeItem: t,
8396
- onNavigate: M,
8417
+ onNavigate: L,
8397
8418
  collapsed: !1,
8398
8419
  showCollapseToggle: !1,
8399
8420
  version: c,
@@ -8577,7 +8598,7 @@ export {
8577
8598
  li as ScaffoldKPIRow,
8578
8599
  ai as ScaffoldSection,
8579
8600
  $i as SearchField,
8580
- St as Sidebar,
8601
+ kt as Sidebar,
8581
8602
  _r as SidebarAccountSwitcher,
8582
8603
  de as Skeleton,
8583
8604
  Ai as SkeletonCard,