@lettuceai/crisp 1.1.0 → 1.2.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.
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { Children as e, Fragment as t, cloneElement as n, createContext as r, createElement as i, forwardRef as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m, useSyncExternalStore as h } from "react";
2
2
  import { AnimatePresence as g, Reorder as _, animate as v, motion as y, useDragControls as b, useMotionValue as x, usePresence as S, useReducedMotion as C, useTransform as w } from "framer-motion";
3
- import { AlertTriangle as T, ArrowDown as E, ArrowLeft as D, ArrowUp as O, ArrowUpDown as k, Brain as A, CalendarDays as ee, Camera as j, Check as M, CheckCircle2 as te, ChevronDown as N, ChevronLeft as P, ChevronRight as F, ChevronsRight as I, Clapperboard as L, ClipboardPaste as ne, Copy as R, CornerDownLeft as re, Cpu as ie, Download as ae, ExternalLink as oe, Eye as se, EyeOff as ce, Globe as le, GripVertical as ue, Info as z, Layers as de, Loader2 as fe, Mic as pe, Minus as me, MoreHorizontal as he, PanelLeftClose as ge, Pause as _e, Pin as ve, Pipette as ye, Play as be, Plus as B, RotateCcw as xe, Search as Se, Sparkles as Ce, Square as we, ThumbsDown as Te, ThumbsUp as Ee, Trash2 as De, Upload as Oe, WifiOff as ke, X as V, XCircle as Ae, ZoomIn as je, ZoomOut as Me } from "lucide-react";
3
+ import { AlertTriangle as T, ArrowDown as E, ArrowLeft as D, ArrowUp as O, ArrowUpDown as k, Brain as A, CalendarDays as ee, Camera as j, Check as M, CheckCircle2 as te, ChevronDown as N, ChevronLeft as P, ChevronRight as F, ChevronsRight as ne, Clapperboard as re, ClipboardPaste as I, Copy as L, CornerDownLeft as ie, Cpu as R, Download as z, ExternalLink as ae, Eye as oe, EyeOff as se, Globe as ce, GripVertical as le, Info as ue, Layers as de, Loader2 as B, Mic as fe, Minus as pe, MoreHorizontal as me, PanelLeftClose as he, Pause as ge, Pin as _e, Pipette as ve, Play as ye, Plus as be, RotateCcw as xe, Search as Se, Sparkles as Ce, Square as we, ThumbsDown as Te, ThumbsUp as Ee, Trash2 as De, Upload as Oe, WifiOff as ke, X as V, XCircle as Ae, ZoomIn as je, ZoomOut as Me } from "lucide-react";
4
4
  import { clsx as Ne } from "clsx";
5
5
  import { twMerge as Pe } from "tailwind-merge";
6
6
  import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
7
- import { Area as Fe, AreaChart as Ie, Bar as Le, BarChart as Re, CartesianGrid as ze, Cell as Be, Line as Ve, LineChart as He, ResponsiveContainer as Ue, Tooltip as We, XAxis as Ge, YAxis as Ke } from "recharts";
8
- import { createPortal as qe } from "react-dom";
7
+ import { createPortal as Fe } from "react-dom";
8
+ import { Area as Ie, AreaChart as Le, Bar as Re, BarChart as ze, CartesianGrid as Be, Cell as Ve, Line as He, LineChart as Ue, ResponsiveContainer as We, Tooltip as Ge, XAxis as Ke, YAxis as qe } from "recharts";
9
9
  import Je from "react-markdown";
10
10
  import Ye from "remark-gfm";
11
11
  import { Toaster as Xe, toast as Ze } from "sonner";
@@ -393,7 +393,7 @@ function q() {
393
393
  //#region src/components/Alert.tsx
394
394
  var mt = {
395
395
  info: {
396
- icon: z,
396
+ icon: ue,
397
397
  iconClass: "text-info",
398
398
  bar: "bg-info"
399
399
  },
@@ -564,12 +564,12 @@ var X = G("w-full rounded-xl border border-line bg-fill text-base text-fg placeh
564
564
  className: "relative",
565
565
  children: [
566
566
  e && /* @__PURE__ */ U("span", {
567
- className: "pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-fg-3",
567
+ className: "pointer-events-none absolute inset-y-0 left-3.5 flex items-center text-fg-3",
568
568
  children: e
569
569
  }),
570
570
  s,
571
571
  t && /* @__PURE__ */ U("span", {
572
- className: "absolute right-2 top-1/2 -translate-y-1/2",
572
+ className: "absolute inset-y-0 right-2 flex items-center",
573
573
  children: t
574
574
  })
575
575
  ]
@@ -716,55 +716,88 @@ function Ot() {
716
716
  }
717
717
  //#endregion
718
718
  //#region src/components/Tooltip.tsx
719
- var kt = {
720
- top: "bottom-full left-1/2 mb-2 -translate-x-1/2",
721
- bottom: "top-full left-1/2 mt-2 -translate-x-1/2",
722
- left: "right-full top-1/2 mr-2 -translate-y-1/2",
723
- right: "left-full top-1/2 ml-2 -translate-y-1/2"
724
- }, At = {
719
+ var kt = 8, At = {
720
+ top: "-translate-x-1/2 -translate-y-full",
721
+ bottom: "-translate-x-1/2",
722
+ left: "-translate-x-full -translate-y-1/2",
723
+ right: "-translate-y-1/2"
724
+ };
725
+ function jt(e, t, n) {
726
+ let r = n ? n.left : 0, i = n ? n.top : 0;
727
+ switch (e) {
728
+ case "top": return {
729
+ left: t.left + t.width / 2 - r,
730
+ top: t.top - kt - i
731
+ };
732
+ case "bottom": return {
733
+ left: t.left + t.width / 2 - r,
734
+ top: t.bottom + kt - i
735
+ };
736
+ case "left": return {
737
+ left: t.left - kt - r,
738
+ top: t.top + t.height / 2 - i
739
+ };
740
+ case "right": return {
741
+ left: t.right + kt - r,
742
+ top: t.top + t.height / 2 - i
743
+ };
744
+ }
745
+ }
746
+ var Mt = {
725
747
  top: { y: 4 },
726
748
  bottom: { y: -4 },
727
749
  left: { x: 4 },
728
750
  right: { x: -4 }
729
751
  };
730
- function jt({ content: e, placement: t = "top", delay: r = 300, disabled: i = !1, className: a, children: o }) {
731
- let [s, c] = m(!1), d = p(null), f = u(), h = () => {
732
- i || (d.current && window.clearTimeout(d.current), d.current = window.setTimeout(() => c(!0), r));
733
- }, _ = () => {
734
- d.current && window.clearTimeout(d.current), d.current = null, c(!1);
752
+ function Nt({ content: e, placement: t = "top", delay: r = 300, disabled: i = !1, className: a, children: o }) {
753
+ let [s, c] = m(!1), [d, f] = m(null), h = p(null), _ = p(null), v = Et(), b = u(), x = () => {
754
+ i || (h.current && window.clearTimeout(h.current), h.current = window.setTimeout(() => c(!0), r));
755
+ }, S = () => {
756
+ h.current && window.clearTimeout(h.current), h.current = null, c(!1), f(null);
735
757
  };
736
758
  l(() => () => {
737
- d.current && window.clearTimeout(d.current);
759
+ h.current && window.clearTimeout(h.current);
738
760
  }, []), l(() => {
739
761
  if (!s) return;
740
- let e = (e) => {
741
- e.key === "Escape" && _();
762
+ let e = _.current?.getBoundingClientRect();
763
+ if (e) {
764
+ let n = v && v !== document.body ? v.getBoundingClientRect() : null;
765
+ f(jt(t, e, n));
766
+ }
767
+ let n = (e) => {
768
+ e.key === "Escape" && S();
742
769
  };
743
- return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
744
- }, [s]);
745
- let v = o.props, b = n(o, {
746
- "aria-describedby": s ? f : void 0,
770
+ return document.addEventListener("keydown", n), window.addEventListener("scroll", S, !0), window.addEventListener("resize", S), () => {
771
+ document.removeEventListener("keydown", n), window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S);
772
+ };
773
+ }, [
774
+ s,
775
+ t,
776
+ v
777
+ ]);
778
+ let C = o.props, w = n(o, {
779
+ "aria-describedby": s ? b : void 0,
747
780
  onMouseEnter: (e) => {
748
- v.onMouseEnter?.(e), h();
781
+ C.onMouseEnter?.(e), x();
749
782
  },
750
783
  onMouseLeave: (e) => {
751
- v.onMouseLeave?.(e), _();
784
+ C.onMouseLeave?.(e), S();
752
785
  },
753
786
  onFocus: (e) => {
754
- v.onFocus?.(e), i || c(!0);
787
+ C.onFocus?.(e), i || c(!0);
755
788
  },
756
789
  onBlur: (e) => {
757
- v.onBlur?.(e), _();
790
+ C.onBlur?.(e), S();
758
791
  }
759
- });
760
- return /* @__PURE__ */ W("span", {
761
- className: G("relative inline-flex", a),
762
- children: [b, /* @__PURE__ */ U(g, { children: s && !i && /* @__PURE__ */ U(y.span, {
763
- id: f,
792
+ }), T = /* @__PURE__ */ U(g, { children: s && !i && d && /* @__PURE__ */ U("span", {
793
+ className: G("pointer-events-none fixed z-50 will-change-transform", At[t]),
794
+ style: d,
795
+ children: /* @__PURE__ */ U(y.span, {
796
+ id: b,
764
797
  role: "tooltip",
765
798
  initial: {
766
799
  opacity: 0,
767
- ...At[t]
800
+ ...Mt[t]
768
801
  },
769
802
  animate: {
770
803
  opacity: 1,
@@ -773,23 +806,28 @@ function jt({ content: e, placement: t = "top", delay: r = 300, disabled: i = !1
773
806
  },
774
807
  exit: {
775
808
  opacity: 0,
776
- ...At[t]
809
+ ...Mt[t]
777
810
  },
778
811
  transition: K.instant,
779
- className: G("pointer-events-none absolute z-50 whitespace-nowrap rounded-lg border border-line bg-surface-2 px-2.5 py-1.5 text-xs text-fg-2 shadow-raised", kt[t]),
812
+ className: "block whitespace-nowrap rounded-lg border border-line bg-surface-2 px-2.5 py-1.5 text-xs text-fg-2 shadow-raised",
780
813
  children: e
781
- }) })]
814
+ })
815
+ }) });
816
+ return /* @__PURE__ */ W("span", {
817
+ ref: _,
818
+ className: G("relative inline-flex", a),
819
+ children: [w, v ? Fe(T, v) : T]
782
820
  });
783
821
  }
784
822
  //#endregion
785
823
  //#region src/components/TabBar.tsx
786
- function Mt({ badge: e }) {
824
+ function Pt({ badge: e }) {
787
825
  return /* @__PURE__ */ U("span", {
788
826
  className: G("absolute -right-1.5 -top-1 flex items-center justify-center rounded-full bg-accent text-on-accent", typeof e == "number" ? "h-4 min-w-4 px-1 text-2xs font-semibold tabular-nums" : "h-2 w-2"),
789
827
  children: typeof e == "number" ? e > 99 ? "99+" : e : null
790
828
  });
791
829
  }
792
- function Nt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, showLabels: a = !1, className: o }) {
830
+ function Ft({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, showLabels: a = !1, className: o }) {
793
831
  let { strings: s } = q(), c = u(), l = Math.ceil(e.length / 2), d = (e) => {
794
832
  let r = e.id === t;
795
833
  return /* @__PURE__ */ W("button", {
@@ -806,7 +844,7 @@ function Nt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, show
806
844
  }),
807
845
  /* @__PURE__ */ W("span", {
808
846
  className: "relative",
809
- children: [e.icon, e.badge ? /* @__PURE__ */ U(Mt, { badge: e.badge }) : null]
847
+ children: [e.icon, e.badge ? /* @__PURE__ */ U(Pt, { badge: e.badge }) : null]
810
848
  }),
811
849
  a ? /* @__PURE__ */ U("span", {
812
850
  className: "relative text-2xs font-medium leading-none",
@@ -833,7 +871,7 @@ function Nt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, show
833
871
  onClick: r,
834
872
  "aria-label": i ?? s.navCreate,
835
873
  className: G("flex items-center justify-center rounded-full bg-accent text-on-accent shadow-raised", a ? "h-11 w-11" : "h-10 w-10"),
836
- children: /* @__PURE__ */ U(B, {
874
+ children: /* @__PURE__ */ U(be, {
837
875
  size: 20,
838
876
  strokeWidth: 2.5
839
877
  })
@@ -846,14 +884,14 @@ function Nt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, show
846
884
  }
847
885
  //#endregion
848
886
  //#region src/components/Dock.tsx
849
- function Pt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, edge: a = "bottom", className: o }) {
887
+ function It({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, edge: a = "bottom", className: o }) {
850
888
  let { strings: s } = q(), c = u();
851
889
  return /* @__PURE__ */ W("nav", {
852
890
  "aria-label": s.navPrimary,
853
891
  className: G("z-30 flex items-center gap-1 rounded-full border border-line bg-nav/95 p-1.5 shadow-raised backdrop-blur-md", o),
854
892
  children: [e.map((e) => {
855
893
  let r = e.id === t;
856
- return /* @__PURE__ */ U(jt, {
894
+ return /* @__PURE__ */ U(Nt, {
857
895
  content: e.label,
858
896
  placement: a === "bottom" ? "top" : "bottom",
859
897
  children: /* @__PURE__ */ W("button", {
@@ -868,14 +906,14 @@ function Pt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, edge
868
906
  className: "absolute inset-0 rounded-full bg-fill-2"
869
907
  }), /* @__PURE__ */ W("span", {
870
908
  className: "relative",
871
- children: [e.icon, e.badge ? /* @__PURE__ */ U(Mt, { badge: e.badge }) : null]
909
+ children: [e.icon, e.badge ? /* @__PURE__ */ U(Pt, { badge: e.badge }) : null]
872
910
  })]
873
911
  })
874
912
  }, e.id);
875
913
  }), r && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("span", {
876
914
  "aria-hidden": "true",
877
915
  className: "mx-0.5 h-6 w-px bg-line"
878
- }), /* @__PURE__ */ U(jt, {
916
+ }), /* @__PURE__ */ U(Nt, {
879
917
  content: i ?? s.navCreate,
880
918
  placement: a === "bottom" ? "top" : "bottom",
881
919
  children: /* @__PURE__ */ U(y.button, {
@@ -884,7 +922,7 @@ function Pt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, edge
884
922
  onClick: r,
885
923
  "aria-label": i ?? s.navCreate,
886
924
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-accent text-on-accent transition-colors hover:bg-accent/90",
887
- children: /* @__PURE__ */ U(B, {
925
+ children: /* @__PURE__ */ U(be, {
888
926
  size: 20,
889
927
  strokeWidth: 2.5
890
928
  })
@@ -894,29 +932,29 @@ function Pt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, edge
894
932
  }
895
933
  //#endregion
896
934
  //#region src/components/NavRail.tsx
897
- var Ft = {
935
+ var Lt = {
898
936
  start: "justify-start",
899
937
  center: "justify-center",
900
938
  end: "justify-end"
901
- }, It = r(!0);
902
- function Lt() {
903
- return c(It);
939
+ }, Rt = r(!0);
940
+ function zt() {
941
+ return c(Rt);
904
942
  }
905
- var Rt = "flex w-11 shrink-0 items-center justify-center";
906
- function zt({ children: e, className: t }) {
907
- let n = Lt();
943
+ var Bt = "flex w-11 shrink-0 items-center justify-center";
944
+ function Vt({ children: e, className: t }) {
945
+ let n = zt();
908
946
  return /* @__PURE__ */ U("span", {
909
947
  className: G("relative min-w-0 flex-1 overflow-hidden whitespace-nowrap text-left transition-opacity", "mask-[linear-gradient(to_right,black_calc(100%-14px),transparent)]", n ? "opacity-100 duration-200 delay-100" : "opacity-0 duration-100", t),
910
948
  children: e
911
949
  });
912
950
  }
913
- function Bt(e) {
914
- return e.floating ? /* @__PURE__ */ U(Ht, { ...e }) : /* @__PURE__ */ U(Vt, { ...e });
951
+ function Ht(e) {
952
+ return e.floating ? /* @__PURE__ */ U(Wt, { ...e }) : /* @__PURE__ */ U(Ut, { ...e });
915
953
  }
916
- function Vt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, footerItems: a, side: o = "left", variant: s = "rail", section: c, onToggle: l, className: d }) {
954
+ function Ut({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, footerItems: a, side: o = "left", variant: s = "rail", section: c, onToggle: l, className: d }) {
917
955
  let { strings: f } = q(), p = u(), m = C(), h = s === "sidebar", _ = h ? c ? 256 : 224 : 64, v = o === "left" ? "right" : "left", b = (e) => {
918
956
  let r = e.id === t;
919
- return /* @__PURE__ */ U(jt, {
957
+ return /* @__PURE__ */ U(Nt, {
920
958
  content: e.label,
921
959
  placement: v,
922
960
  disabled: h,
@@ -934,10 +972,10 @@ function Vt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
934
972
  className: "absolute inset-0 rounded-xl bg-fill-2"
935
973
  }),
936
974
  /* @__PURE__ */ W("span", {
937
- className: G(Rt, "relative"),
938
- children: [e.icon, e.badge ? /* @__PURE__ */ U(Mt, { badge: e.badge }) : null]
975
+ className: G(Bt, "relative"),
976
+ children: [e.icon, e.badge ? /* @__PURE__ */ U(Pt, { badge: e.badge }) : null]
939
977
  }),
940
- /* @__PURE__ */ U(zt, {
978
+ /* @__PURE__ */ U(Vt, {
941
979
  className: "text-base font-medium",
942
980
  children: e.label
943
981
  })
@@ -948,7 +986,7 @@ function Vt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
948
986
  "aria-hidden": "true",
949
987
  className: "mx-1 my-1 h-px shrink-0 bg-line"
950
988
  });
951
- return /* @__PURE__ */ U(It.Provider, {
989
+ return /* @__PURE__ */ U(Rt.Provider, {
952
990
  value: h,
953
991
  children: /* @__PURE__ */ W(y.nav, {
954
992
  "aria-label": f.navPrimary,
@@ -957,7 +995,7 @@ function Vt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
957
995
  transition: m ? { duration: 0 } : K.sidebar,
958
996
  className: G("z-30 flex h-full shrink-0 flex-col gap-1 bg-nav px-2.5 py-3 text-fg", o === "left" ? "border-r border-line" : "border-l border-line", d),
959
997
  children: [
960
- r && /* @__PURE__ */ U(jt, {
998
+ r && /* @__PURE__ */ U(Nt, {
961
999
  content: i ?? f.navCreate,
962
1000
  placement: v,
963
1001
  disabled: h,
@@ -969,12 +1007,12 @@ function Vt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
969
1007
  "aria-label": i ?? f.navCreate,
970
1008
  className: "flex h-10 w-full shrink-0 items-center overflow-hidden rounded-xl bg-accent text-on-accent transition-colors hover:bg-accent/90",
971
1009
  children: [/* @__PURE__ */ U("span", {
972
- className: Rt,
973
- children: /* @__PURE__ */ U(B, {
1010
+ className: Bt,
1011
+ children: /* @__PURE__ */ U(be, {
974
1012
  size: 18,
975
1013
  strokeWidth: 2.5
976
1014
  })
977
- }), /* @__PURE__ */ U(zt, {
1015
+ }), /* @__PURE__ */ U(Vt, {
978
1016
  className: "text-base font-medium",
979
1017
  children: i ?? f.navCreate
980
1018
  })]
@@ -1001,7 +1039,7 @@ function Vt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1001
1039
  className: "flex-1"
1002
1040
  }),
1003
1041
  (a?.length || l) && x,
1004
- l && /* @__PURE__ */ U(jt, {
1042
+ l && /* @__PURE__ */ U(Nt, {
1005
1043
  content: f.navExpandSidebar,
1006
1044
  placement: v,
1007
1045
  disabled: h,
@@ -1013,17 +1051,17 @@ function Vt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1013
1051
  "aria-expanded": h,
1014
1052
  className: "flex h-10 w-full shrink-0 items-center overflow-hidden rounded-xl text-fg-3 transition-colors hover:bg-fill hover:text-fg",
1015
1053
  children: [/* @__PURE__ */ U("span", {
1016
- className: Rt,
1054
+ className: Bt,
1017
1055
  children: /* @__PURE__ */ U(y.span, {
1018
1056
  animate: { rotate: h ? 0 : 180 },
1019
1057
  transition: m ? { duration: 0 } : K.sidebar,
1020
1058
  className: "flex",
1021
- children: /* @__PURE__ */ U(ge, {
1059
+ children: /* @__PURE__ */ U(he, {
1022
1060
  size: 18,
1023
1061
  className: o === "right" ? "-scale-x-100" : void 0
1024
1062
  })
1025
1063
  })
1026
- }), /* @__PURE__ */ U(zt, {
1064
+ }), /* @__PURE__ */ U(Vt, {
1027
1065
  className: "text-base font-medium",
1028
1066
  children: f.navCollapse
1029
1067
  })]
@@ -1034,7 +1072,7 @@ function Vt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1034
1072
  })
1035
1073
  });
1036
1074
  }
1037
- function Ht({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, footerItems: a, side: o = "left", variant: s = "rail", floating: c = !1, align: l = "start", className: d }) {
1075
+ function Wt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, footerItems: a, side: o = "left", variant: s = "rail", floating: c = !1, align: l = "start", className: d }) {
1038
1076
  let { strings: f } = q(), p = u(), m = s === "sidebar", h = (e) => {
1039
1077
  let r = e.id === t, i = /* @__PURE__ */ W("button", {
1040
1078
  type: "button",
@@ -1050,7 +1088,7 @@ function Ht({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1050
1088
  }),
1051
1089
  /* @__PURE__ */ W("span", {
1052
1090
  className: "relative shrink-0",
1053
- children: [e.icon, e.badge ? /* @__PURE__ */ U(Mt, { badge: e.badge }) : null]
1091
+ children: [e.icon, e.badge ? /* @__PURE__ */ U(Pt, { badge: e.badge }) : null]
1054
1092
  }),
1055
1093
  m && /* @__PURE__ */ U("span", {
1056
1094
  className: "relative min-w-0 flex-1 truncate text-left text-base font-medium",
@@ -1062,7 +1100,7 @@ function Ht({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1062
1100
  })
1063
1101
  ]
1064
1102
  }, e.id);
1065
- return m ? i : /* @__PURE__ */ U(jt, {
1103
+ return m ? i : /* @__PURE__ */ U(Nt, {
1066
1104
  content: e.label,
1067
1105
  placement: o === "left" ? "right" : "left",
1068
1106
  children: i
@@ -1071,11 +1109,11 @@ function Ht({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1071
1109
  type: "button",
1072
1110
  onClick: r,
1073
1111
  className: "flex h-10 w-full items-center gap-2.5 rounded-xl bg-accent px-3 text-base font-medium text-on-accent transition-colors hover:bg-accent/90",
1074
- children: [/* @__PURE__ */ U(B, {
1112
+ children: [/* @__PURE__ */ U(be, {
1075
1113
  size: 18,
1076
1114
  strokeWidth: 2.5
1077
1115
  }), i ?? f.navCreate]
1078
- }) : /* @__PURE__ */ U(jt, {
1116
+ }) : /* @__PURE__ */ U(Nt, {
1079
1117
  content: i ?? f.navCreate,
1080
1118
  placement: o === "left" ? "right" : "left",
1081
1119
  children: /* @__PURE__ */ U(y.button, {
@@ -1084,7 +1122,7 @@ function Ht({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1084
1122
  onClick: r,
1085
1123
  "aria-label": i ?? f.navCreate,
1086
1124
  className: G("flex h-11 w-11 shrink-0 items-center justify-center bg-accent text-on-accent transition-colors hover:bg-accent/90", c ? "rounded-full" : "rounded-xl"),
1087
- children: /* @__PURE__ */ U(B, {
1125
+ children: /* @__PURE__ */ U(be, {
1088
1126
  size: 20,
1089
1127
  strokeWidth: 2.5
1090
1128
  })
@@ -1092,7 +1130,7 @@ function Ht({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1092
1130
  }));
1093
1131
  return /* @__PURE__ */ W("nav", {
1094
1132
  "aria-label": f.navPrimary,
1095
- className: G("z-30 flex flex-col text-fg", m ? "w-56 gap-1 p-3" : "w-16 items-center gap-1.5 py-3", c ? "gap-1.5 rounded-2xl border border-line bg-nav/95 p-2 shadow-raised backdrop-blur-md" : G("h-full bg-nav", o === "left" ? "border-r border-line" : "border-l border-line"), !c && Ft[l], d),
1133
+ className: G("z-30 flex flex-col text-fg", m ? "w-56 gap-1 p-3" : "w-16 items-center gap-1.5 py-3", c ? "gap-1.5 rounded-2xl border border-line bg-nav/95 p-2 shadow-raised backdrop-blur-md" : G("h-full bg-nav", o === "left" ? "border-r border-line" : "border-l border-line"), !c && Lt[l], d),
1096
1134
  children: [
1097
1135
  g,
1098
1136
  g && /* @__PURE__ */ U("span", {
@@ -1116,7 +1154,7 @@ function Ht({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1116
1154
  }
1117
1155
  //#endregion
1118
1156
  //#region src/components/AppShell.tsx
1119
- function Ut({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, footerItems: a, navStyle: o = "auto", side: s = "left", dockEdge: c = "bottom", titleBar: l, header: u, mainRef: d, navSection: f, onNavToggle: p, children: m, className: h }) {
1157
+ function Gt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, footerItems: a, navStyle: o = "auto", side: s = "left", dockEdge: c = "bottom", titleBar: l, header: u, mainRef: d, navSection: f, onNavToggle: p, children: m, className: h }) {
1120
1158
  let g = Ot(), _ = o === "auto" ? g ? "tabs" : "rail" : o, v = g && (_ === "rail" || _ === "sidebar" || _ === "floatingRail" || _ === "dock") ? "tabs" : _, y = {
1121
1159
  items: e,
1122
1160
  value: t,
@@ -1133,12 +1171,12 @@ function Ut({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1133
1171
  className: G("flex min-h-0 flex-1", s === "right" && "flex-row-reverse"),
1134
1172
  children: [b && (v === "floatingRail" ? /* @__PURE__ */ U("div", {
1135
1173
  className: G("absolute top-1/2 z-30 -translate-y-1/2", s === "left" ? "left-4" : "right-4"),
1136
- children: /* @__PURE__ */ U(Bt, {
1174
+ children: /* @__PURE__ */ U(Ht, {
1137
1175
  ...y,
1138
1176
  side: s,
1139
1177
  floating: !0
1140
1178
  })
1141
- }) : /* @__PURE__ */ U(Bt, {
1179
+ }) : /* @__PURE__ */ U(Ht, {
1142
1180
  ...y,
1143
1181
  side: s,
1144
1182
  variant: v === "sidebar" ? "sidebar" : "rail",
@@ -1157,13 +1195,13 @@ function Ut({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1157
1195
  className: G("pointer-events-none absolute inset-x-0 z-30 flex justify-center", c === "bottom" ? "bottom-4" : "top-4"),
1158
1196
  children: /* @__PURE__ */ U("div", {
1159
1197
  className: "pointer-events-auto",
1160
- children: /* @__PURE__ */ U(Pt, {
1198
+ children: /* @__PURE__ */ U(It, {
1161
1199
  ...y,
1162
1200
  edge: c
1163
1201
  })
1164
1202
  })
1165
1203
  }),
1166
- (v === "tabs" || v === "tabsLabelled") && /* @__PURE__ */ U(Nt, {
1204
+ (v === "tabs" || v === "tabsLabelled") && /* @__PURE__ */ U(Ft, {
1167
1205
  ...y,
1168
1206
  showLabels: v === "tabsLabelled"
1169
1207
  })
@@ -1172,10 +1210,10 @@ function Ut({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1172
1210
  }
1173
1211
  //#endregion
1174
1212
  //#region src/components/AudioItem.tsx
1175
- function Wt(e) {
1213
+ function Kt(e) {
1176
1214
  return (!Number.isFinite(e) || e < 0) && (e = 0), `${Math.floor(e / 60)}:${String(Math.floor(e % 60)).padStart(2, "0")}`;
1177
1215
  }
1178
- function Gt({ title: e, description: t, src: n, onLoadSrc: r, badge: i, actions: a, className: o }) {
1216
+ function qt({ title: e, description: t, src: n, onLoadSrc: r, badge: i, actions: a, className: o }) {
1179
1217
  let { strings: c } = q(), u = p(null), d = p(!1), [f, h] = m(n ?? null), [g, _] = m(!1), [v, y] = m(!1), [b, x] = m(0), [S, C] = m(0);
1180
1218
  l(() => {
1181
1219
  n !== void 0 && h(n);
@@ -1224,13 +1262,13 @@ function Gt({ title: e, description: t, src: n, onLoadSrc: r, badge: i, actions:
1224
1262
  onClick: w,
1225
1263
  "aria-label": v ? c.audioItemPause(e) : c.audioItemPlay(e),
1226
1264
  className: G("touch-target flex h-11 w-11 shrink-0 items-center justify-center rounded-full", "bg-accent text-on-accent transition-transform motion-instant active:scale-95"),
1227
- children: g ? /* @__PURE__ */ U(fe, {
1265
+ children: g ? /* @__PURE__ */ U(B, {
1228
1266
  size: 18,
1229
1267
  className: "animate-spin"
1230
- }) : v ? /* @__PURE__ */ U(_e, {
1268
+ }) : v ? /* @__PURE__ */ U(ge, {
1231
1269
  size: 18,
1232
1270
  fill: "currentColor"
1233
- }) : /* @__PURE__ */ U(be, {
1271
+ }) : /* @__PURE__ */ U(ye, {
1234
1272
  size: 18,
1235
1273
  fill: "currentColor",
1236
1274
  className: "ml-0.5"
@@ -1259,14 +1297,14 @@ function Gt({ title: e, description: t, src: n, onLoadSrc: r, badge: i, actions:
1259
1297
  value: b,
1260
1298
  onChange: (e) => T(Number(e.target.value)),
1261
1299
  "aria-label": c.audioItemSeek(e),
1262
- "aria-valuetext": `${Wt(b)} of ${Wt(S)}`,
1300
+ "aria-valuetext": `${Kt(b)} of ${Kt(S)}`,
1263
1301
  style: { "--slider-fill": `${D}%` }
1264
1302
  }), /* @__PURE__ */ W("span", {
1265
1303
  className: "shrink-0 text-2xs tabular-nums text-fg-3",
1266
1304
  children: [
1267
- Wt(b),
1305
+ Kt(b),
1268
1306
  " / ",
1269
- Wt(S)
1307
+ Kt(S)
1270
1308
  ]
1271
1309
  })]
1272
1310
  }) : t && /* @__PURE__ */ U("p", {
@@ -1283,34 +1321,34 @@ function Gt({ title: e, description: t, src: n, onLoadSrc: r, badge: i, actions:
1283
1321
  }
1284
1322
  //#endregion
1285
1323
  //#region src/components/Avatar.tsx
1286
- var Kt = {
1324
+ var Jt = {
1287
1325
  xs: "h-6 w-6 text-2xs",
1288
1326
  sm: "h-8 w-8 text-xs",
1289
1327
  md: "h-10 w-10 text-sm",
1290
1328
  lg: "h-14 w-14 text-lg",
1291
1329
  xl: "h-24 w-24 text-2xl"
1292
1330
  };
1293
- function qt(e) {
1331
+ function Yt(e) {
1294
1332
  return e.trim().split(/\s+/).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("");
1295
1333
  }
1296
- function Jt({ src: e, name: t, size: n = "md", ring: r, className: i, style: a }) {
1334
+ function Xt({ src: e, name: t, size: n = "md", ring: r, className: i, style: a }) {
1297
1335
  let [o, s] = m(!1), c = !!e && !o;
1298
1336
  return /* @__PURE__ */ U("span", {
1299
1337
  role: "img",
1300
1338
  "aria-label": t,
1301
1339
  style: a,
1302
- className: G("relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden rounded-full", "border border-line bg-fill-2 font-semibold text-fg-2", r && "ring-2 ring-accent ring-offset-2 ring-offset-surface", Kt[n], i),
1340
+ className: G("relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden rounded-full", "border border-line bg-fill-2 font-semibold text-fg-2", r && "ring-2 ring-accent ring-offset-2 ring-offset-surface", Jt[n], i),
1303
1341
  children: c ? /* @__PURE__ */ U("img", {
1304
1342
  src: e,
1305
1343
  alt: "",
1306
1344
  onError: () => s(!0),
1307
1345
  className: "h-full w-full object-cover"
1308
- }) : qt(t)
1346
+ }) : Yt(t)
1309
1347
  });
1310
1348
  }
1311
1349
  //#endregion
1312
1350
  //#region src/components/AvatarGroup.tsx
1313
- var Yt = {
1351
+ var Zt = {
1314
1352
  xs: {
1315
1353
  size: 24,
1316
1354
  pull: "-ml-2",
@@ -1347,15 +1385,15 @@ var Yt = {
1347
1385
  chip: "h-24 w-24 text-lg"
1348
1386
  }
1349
1387
  };
1350
- function Xt({ people: e, max: t = 4, size: n = "sm", interactive: r, overflow: i, className: a }) {
1351
- let { strings: o } = q(), s = e.slice(0, t), c = e.length - s.length, l = Yt[n ?? "sm"], u = c > 0 || !!i, d = `radial-gradient(circle ${l.cut}px at ${l.cx}px 50%, transparent 100%, black 100%)`;
1388
+ function Qt({ people: e, max: t = 4, size: n = "sm", interactive: r, overflow: i, className: a }) {
1389
+ let { strings: o } = q(), s = e.slice(0, t), c = e.length - s.length, l = Zt[n ?? "sm"], u = c > 0 || !!i, d = `radial-gradient(circle ${l.cut}px at ${l.cx}px 50%, transparent 100%, black 100%)`;
1352
1390
  return /* @__PURE__ */ W("div", {
1353
1391
  className: G("flex items-center", a),
1354
1392
  role: "group",
1355
1393
  "aria-label": o.avatarGroupPeople(e.length),
1356
1394
  children: [s.map((e, t) => {
1357
1395
  let i = t < s.length - 1 || u;
1358
- return /* @__PURE__ */ U(Jt, {
1396
+ return /* @__PURE__ */ U(Xt, {
1359
1397
  name: e.name,
1360
1398
  src: e.src,
1361
1399
  size: n,
@@ -1373,26 +1411,26 @@ function Xt({ people: e, max: t = 4, size: n = "sm", interactive: r, overflow: i
1373
1411
  }
1374
1412
  //#endregion
1375
1413
  //#region src/components/Banner.tsx
1376
- var Zt = {
1414
+ var $t = {
1377
1415
  info: "bg-info/15 text-info",
1378
1416
  warning: "bg-warning/15 text-warning",
1379
1417
  danger: "bg-danger/15 text-danger",
1380
1418
  offline: "bg-fill-3 text-fg-2"
1381
- }, Qt = {
1382
- info: /* @__PURE__ */ U(z, { size: 16 }),
1419
+ }, en = {
1420
+ info: /* @__PURE__ */ U(ue, { size: 16 }),
1383
1421
  warning: /* @__PURE__ */ U(T, { size: 16 }),
1384
1422
  danger: /* @__PURE__ */ U(Ae, { size: 16 }),
1385
1423
  offline: /* @__PURE__ */ U(ke, { size: 16 })
1386
1424
  };
1387
- function $t({ tone: e = "info", children: t, action: n, onDismiss: r, sticky: i, className: a }) {
1425
+ function tn({ tone: e = "info", children: t, action: n, onDismiss: r, sticky: i, className: a }) {
1388
1426
  let { strings: o } = q();
1389
1427
  return /* @__PURE__ */ W("div", {
1390
1428
  role: e === "danger" ? "alert" : "status",
1391
- className: G("flex items-center gap-2.5 px-4 py-2 text-sm", Zt[e], i && "sticky top-0 z-30", a),
1429
+ className: G("flex items-center gap-2.5 px-4 py-2 text-sm", $t[e], i && "sticky top-0 z-30", a),
1392
1430
  children: [
1393
1431
  /* @__PURE__ */ U("span", {
1394
1432
  className: "shrink-0",
1395
- children: Qt[e]
1433
+ children: en[e]
1396
1434
  }),
1397
1435
  /* @__PURE__ */ U("span", {
1398
1436
  className: "min-w-0 flex-1 truncate font-medium",
@@ -1414,8 +1452,8 @@ function $t({ tone: e = "info", children: t, action: n, onDismiss: r, sticky: i,
1414
1452
  }
1415
1453
  //#endregion
1416
1454
  //#region src/components/Menu.tsx
1417
- var en = r(null);
1418
- function tn({ children: e }) {
1455
+ var nn = r(null);
1456
+ function rn({ children: e }) {
1419
1457
  let [t, n] = m(!1), r = u(), i = p(null);
1420
1458
  return l(() => {
1421
1459
  if (!t) return;
@@ -1427,7 +1465,7 @@ function tn({ children: e }) {
1427
1465
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", r), () => {
1428
1466
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", r);
1429
1467
  };
1430
- }, [t]), /* @__PURE__ */ U(en.Provider, {
1468
+ }, [t]), /* @__PURE__ */ U(nn.Provider, {
1431
1469
  value: {
1432
1470
  open: t,
1433
1471
  setOpen: n,
@@ -1440,13 +1478,13 @@ function tn({ children: e }) {
1440
1478
  })
1441
1479
  });
1442
1480
  }
1443
- function nn() {
1444
- let e = c(en);
1481
+ function an() {
1482
+ let e = c(nn);
1445
1483
  if (!e) throw Error("Menu parts must be used inside <Menu>");
1446
1484
  return e;
1447
1485
  }
1448
- function rn({ children: e }) {
1449
- let { open: t, setOpen: r, id: i } = nn(), a = e.props;
1486
+ function on({ children: e }) {
1487
+ let { open: t, setOpen: r, id: i } = an(), a = e.props;
1450
1488
  return n(e, {
1451
1489
  "aria-haspopup": "menu",
1452
1490
  "aria-expanded": t,
@@ -1456,8 +1494,8 @@ function rn({ children: e }) {
1456
1494
  }
1457
1495
  });
1458
1496
  }
1459
- function an({ align: e = "start", side: t = "bottom", className: n, children: r }) {
1460
- let { open: i, setOpen: a, id: o } = nn(), c = p(null);
1497
+ function sn({ align: e = "start", side: t = "bottom", className: n, children: r }) {
1498
+ let { open: i, setOpen: a, id: o } = an(), c = p(null);
1461
1499
  l(() => {
1462
1500
  i && c.current?.querySelector("[role=\"menuitem\"]:not([aria-disabled=\"true\"])")?.focus();
1463
1501
  }, [i]);
@@ -1490,8 +1528,8 @@ function an({ align: e = "start", side: t = "bottom", className: n, children: r
1490
1528
  children: r
1491
1529
  }) });
1492
1530
  }
1493
- function on({ icon: e, shortcut: t, danger: n, disabled: r, selected: i, onSelect: a, children: o }) {
1494
- let { setOpen: s } = nn();
1531
+ function cn({ icon: e, shortcut: t, danger: n, disabled: r, selected: i, onSelect: a, children: o }) {
1532
+ let { setOpen: s } = an();
1495
1533
  return /* @__PURE__ */ W("button", {
1496
1534
  type: "button",
1497
1535
  role: "menuitem",
@@ -1521,13 +1559,13 @@ function on({ icon: e, shortcut: t, danger: n, disabled: r, selected: i, onSelec
1521
1559
  ]
1522
1560
  });
1523
1561
  }
1524
- function sn() {
1562
+ function ln() {
1525
1563
  return /* @__PURE__ */ U("div", {
1526
1564
  role: "separator",
1527
1565
  className: "my-1 h-px bg-line"
1528
1566
  });
1529
1567
  }
1530
- function cn({ children: e }) {
1568
+ function un({ children: e }) {
1531
1569
  return /* @__PURE__ */ U("div", {
1532
1570
  className: "px-2.5 pb-1 pt-2 text-2xs font-medium text-fg-3",
1533
1571
  children: e
@@ -1535,7 +1573,7 @@ function cn({ children: e }) {
1535
1573
  }
1536
1574
  //#endregion
1537
1575
  //#region src/components/Breadcrumb.tsx
1538
- function ln({ crumb: e, current: t }) {
1576
+ function dn({ crumb: e, current: t }) {
1539
1577
  let n = /* @__PURE__ */ W(H, { children: [e.icon && /* @__PURE__ */ U("span", {
1540
1578
  className: "shrink-0",
1541
1579
  children: e.icon
@@ -1558,7 +1596,7 @@ function ln({ crumb: e, current: t }) {
1558
1596
  children: n
1559
1597
  });
1560
1598
  }
1561
- function un({ items: e, maxVisible: n = 1, className: r }) {
1599
+ function fn({ items: e, maxVisible: n = 1, className: r }) {
1562
1600
  let { strings: i } = q();
1563
1601
  if (e.length === 0) return null;
1564
1602
  let a = Math.max(1, n), o = e.length > a + 2, s = o ? e[0] : null, c = o ? e.slice(1, e.length - a) : [], l = o ? e.slice(e.length - a) : e, u = /* @__PURE__ */ U(F, {
@@ -1570,23 +1608,23 @@ function un({ items: e, maxVisible: n = 1, className: r }) {
1570
1608
  "aria-label": i.breadcrumbLabel,
1571
1609
  className: G("flex min-w-0 items-center gap-1", r),
1572
1610
  children: [s && /* @__PURE__ */ W(H, { children: [
1573
- /* @__PURE__ */ U(ln, {
1611
+ /* @__PURE__ */ U(dn, {
1574
1612
  crumb: s,
1575
1613
  current: !1
1576
1614
  }),
1577
1615
  u,
1578
- /* @__PURE__ */ W(tn, { children: [/* @__PURE__ */ U(rn, { children: /* @__PURE__ */ U("button", {
1616
+ /* @__PURE__ */ W(rn, { children: [/* @__PURE__ */ U(on, { children: /* @__PURE__ */ U("button", {
1579
1617
  type: "button",
1580
1618
  "aria-label": i.breadcrumbMore(c.length),
1581
1619
  className: "tap-target flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-fg-3 transition-colors hover:bg-fill-2 hover:text-fg",
1582
- children: /* @__PURE__ */ U(he, { size: 14 })
1583
- }) }), /* @__PURE__ */ U(an, { children: c.map((e) => /* @__PURE__ */ U(on, {
1620
+ children: /* @__PURE__ */ U(me, { size: 14 })
1621
+ }) }), /* @__PURE__ */ U(sn, { children: c.map((e) => /* @__PURE__ */ U(cn, {
1584
1622
  icon: e.icon,
1585
1623
  onSelect: e.onClick,
1586
1624
  children: e.label
1587
1625
  }, e.label)) })] }),
1588
1626
  u
1589
- ] }), l.map((e, n) => /* @__PURE__ */ W(t, { children: [n > 0 && u, /* @__PURE__ */ U(ln, {
1627
+ ] }), l.map((e, n) => /* @__PURE__ */ W(t, { children: [n > 0 && u, /* @__PURE__ */ U(dn, {
1590
1628
  crumb: e,
1591
1629
  current: n === l.length - 1
1592
1630
  })] }, e.label))]
@@ -1600,23 +1638,23 @@ var Z = {
1600
1638
  md: 16,
1601
1639
  lg: 18,
1602
1640
  xl: 20
1603
- }, dn = {
1641
+ }, pn = {
1604
1642
  primary: "bg-accent text-on-accent hover:bg-accent/82 active:bg-accent/68",
1605
1643
  tonal: "border border-accent/30 bg-accent/15 text-accent hover:border-accent/55 hover:bg-accent/28 active:bg-accent/38",
1606
1644
  secondary: "border border-line bg-fill-2 text-fg hover:border-line-3 hover:bg-fill-3 active:bg-line-2",
1607
1645
  ghost: "text-fg-2 hover:bg-fill-2 hover:text-fg active:bg-fill-3",
1608
1646
  danger: "border border-danger/25 bg-danger/12 text-danger hover:border-danger/55 hover:bg-danger/22 active:bg-danger/32"
1609
- }, fn = {
1647
+ }, mn = {
1610
1648
  primary: "focus-visible:outline-fg",
1611
1649
  tonal: "focus-visible:outline-accent",
1612
1650
  secondary: "focus-visible:outline-fg-2",
1613
1651
  ghost: "focus-visible:outline-fg-2",
1614
1652
  danger: "focus-visible:outline-danger"
1615
- }, pn = {
1653
+ }, hn = {
1616
1654
  sm: "control-sm gap-1.5 rounded-lg px-3 text-sm",
1617
1655
  md: "control-md gap-2 rounded-xl px-4 text-base",
1618
1656
  lg: "control-lg gap-2 rounded-xl px-5 text-base"
1619
- }, mn = {
1657
+ }, gn = {
1620
1658
  sm: Z.sm,
1621
1659
  md: Z.md,
1622
1660
  lg: Z.lg
@@ -1627,12 +1665,12 @@ var Z = {
1627
1665
  disabled: c,
1628
1666
  "aria-busy": n || void 0,
1629
1667
  "aria-disabled": c || n || void 0,
1630
- className: G("touch-target relative inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap font-medium", e === "ghost" ? "raise-flat" : "raise", "focus-visible:outline-1 focus-visible:outline-offset-2", fn[e], "disabled:opacity-45", (n || c) && "pointer-events-none", dn[e], pn[t], a && "w-full", o),
1668
+ className: G("touch-target relative inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap font-medium", e === "ghost" ? "raise-flat" : "raise", "focus-visible:outline-1 focus-visible:outline-offset-2", mn[e], "disabled:opacity-45", (n || c) && "pointer-events-none", pn[e], hn[t], a && "w-full", o),
1631
1669
  ...u,
1632
1670
  children: [n && /* @__PURE__ */ U("span", {
1633
1671
  className: "absolute inset-0 flex items-center justify-center",
1634
- children: /* @__PURE__ */ U(fe, {
1635
- size: mn[t],
1672
+ children: /* @__PURE__ */ U(B, {
1673
+ size: gn[t],
1636
1674
  className: "animate-spin"
1637
1675
  })
1638
1676
  }), /* @__PURE__ */ W("span", {
@@ -1648,7 +1686,7 @@ var Z = {
1648
1686
  Q.displayName = "Button";
1649
1687
  //#endregion
1650
1688
  //#region src/components/ButtonGroup.tsx
1651
- function hn({ attached: t = !0, className: r, children: i }) {
1689
+ function _n({ attached: t = !0, className: r, children: i }) {
1652
1690
  let a = e.toArray(i).filter(o);
1653
1691
  return /* @__PURE__ */ U("div", {
1654
1692
  role: "group",
@@ -1656,7 +1694,7 @@ function hn({ attached: t = !0, className: r, children: i }) {
1656
1694
  children: a.map((e, r) => n(e, { className: G(e.props.className, t && r > 0 && "rounded-l-none", t && r < a.length - 1 && "rounded-r-none", t && "relative focus-visible:z-10") }))
1657
1695
  });
1658
1696
  }
1659
- function gn({ children: e, menu: t, menuLabel: n, variant: r = "primary", size: i = "md", ...a }) {
1697
+ function vn({ children: e, menu: t, menuLabel: n, variant: r = "primary", size: i = "md", ...a }) {
1660
1698
  let { strings: o } = q();
1661
1699
  return /* @__PURE__ */ W("div", {
1662
1700
  className: "inline-flex -space-x-px",
@@ -1666,13 +1704,13 @@ function gn({ children: e, menu: t, menuLabel: n, variant: r = "primary", size:
1666
1704
  className: "rounded-r-none",
1667
1705
  ...a,
1668
1706
  children: e
1669
- }), /* @__PURE__ */ W(tn, { children: [/* @__PURE__ */ U(rn, { children: /* @__PURE__ */ U(Q, {
1707
+ }), /* @__PURE__ */ W(rn, { children: [/* @__PURE__ */ U(on, { children: /* @__PURE__ */ U(Q, {
1670
1708
  variant: r,
1671
1709
  size: i,
1672
1710
  "aria-label": n ?? o.splitButtonMore,
1673
1711
  className: "rounded-l-none px-2",
1674
1712
  children: /* @__PURE__ */ U(N, { size: 16 })
1675
- }) }), /* @__PURE__ */ U(an, {
1713
+ }) }), /* @__PURE__ */ U(sn, {
1676
1714
  align: "end",
1677
1715
  children: t
1678
1716
  })] })]
@@ -1680,33 +1718,33 @@ function gn({ children: e, menu: t, menuLabel: n, variant: r = "primary", size:
1680
1718
  }
1681
1719
  //#endregion
1682
1720
  //#region src/components/Card.tsx
1683
- var _n = "rounded-xl bg-surface-1", vn = {
1721
+ var yn = "rounded-xl bg-surface-1", bn = {
1684
1722
  none: "",
1685
1723
  sm: "p-3",
1686
1724
  md: "p-4"
1687
- }, yn = a(function({ level: e = "flat", padding: t = "md", className: n, ...r }, i) {
1725
+ }, xn = a(function({ level: e = "flat", padding: t = "md", className: n, ...r }, i) {
1688
1726
  return /* @__PURE__ */ U("div", {
1689
1727
  ref: i,
1690
- className: G(_n, e === "raised" && "bg-surface-el shadow-raised", vn[t], n),
1728
+ className: G(yn, e === "raised" && "bg-surface-el shadow-raised", bn[t], n),
1691
1729
  ...r
1692
1730
  });
1693
1731
  });
1694
- yn.displayName = "Card";
1695
- var bn = a(function({ selected: e, padding: t = "md", className: n, type: r = "button", ...i }, a) {
1732
+ xn.displayName = "Card";
1733
+ var Sn = a(function({ selected: e, padding: t = "md", className: n, type: r = "button", ...i }, a) {
1696
1734
  return /* @__PURE__ */ U(y.button, {
1697
1735
  ref: a,
1698
1736
  type: r,
1699
1737
  "aria-pressed": e,
1700
1738
  whileTap: { scale: .99 },
1701
1739
  transition: K.instant,
1702
- className: G(_n, "touch-target block w-full text-left transition-[background-color,box-shadow] motion-instant", "hover:bg-fill-2", e && "ring-2 ring-inset ring-fg/30", vn[t], n),
1740
+ className: G(yn, "touch-target block w-full text-left transition-[background-color,box-shadow] motion-instant", "hover:bg-fill-2", e && "ring-2 ring-inset ring-fg/30", bn[t], n),
1703
1741
  ...i
1704
1742
  });
1705
1743
  });
1706
- bn.displayName = "CardButton";
1744
+ Sn.displayName = "CardButton";
1707
1745
  //#endregion
1708
1746
  //#region src/components/Carousel.tsx
1709
- function xn({ children: e, controls: t = !0, className: n, slideClassName: r, ...i }) {
1747
+ function Cn({ children: e, controls: t = !0, className: n, slideClassName: r, ...i }) {
1710
1748
  let { strings: a } = q(), o = p(null), [c, u] = m(0), d = e.length, f = s((e) => {
1711
1749
  let t = o.current;
1712
1750
  if (!t) return;
@@ -1774,7 +1812,7 @@ function xn({ children: e, controls: t = !0, className: n, slideClassName: r, ..
1774
1812
  }
1775
1813
  //#endregion
1776
1814
  //#region src/lib/tint.ts
1777
- function Sn(e) {
1815
+ function wn(e) {
1778
1816
  let t = 0;
1779
1817
  for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
1780
1818
  let n = Math.abs(t) % 360;
@@ -1785,7 +1823,7 @@ function Sn(e) {
1785
1823
  }
1786
1824
  //#endregion
1787
1825
  //#region src/lib/imageBrightness.ts
1788
- function Cn(e) {
1826
+ function Tn(e) {
1789
1827
  let [t, n] = m(null);
1790
1828
  return l(() => {
1791
1829
  if (!e) {
@@ -1820,14 +1858,14 @@ function Cn(e) {
1820
1858
  }
1821
1859
  //#endregion
1822
1860
  //#region src/components/Surface.tsx
1823
- var wn = r({
1861
+ var En = r({
1824
1862
  hasBackground: !1,
1825
1863
  tone: "dark"
1826
1864
  });
1827
- function Tn() {
1828
- return c(wn);
1865
+ function Dn() {
1866
+ return c(En);
1829
1867
  }
1830
- var En = {
1868
+ var On = {
1831
1869
  dark: {
1832
1870
  none: null,
1833
1871
  soft: "bg-black/20",
@@ -1840,8 +1878,8 @@ var En = {
1840
1878
  auto: "bg-white/50",
1841
1879
  strong: "bg-white/70"
1842
1880
  }
1843
- }, Dn = .42, On = a(function({ image: e, imagePosition: t, tint: n, fg: r, fgMuted: i, scrim: a = "auto", tone: o, as: s, className: c, style: l, children: u }, d) {
1844
- let f = s ?? "div", p = !!(e || n), m = Cn(o || r ? null : e), h = o ?? (m !== null && m > Dn ? "light" : "dark"), g = r ?? (e && h === "light" ? "#111112" : e ? "#ffffff" : null), _ = g ? {
1881
+ }, kn = .42, An = a(function({ image: e, imagePosition: t, tint: n, fg: r, fgMuted: i, scrim: a = "auto", tone: o, as: s, className: c, style: l, children: u }, d) {
1882
+ let f = s ?? "div", p = !!(e || n), m = Tn(o || r ? null : e), h = o ?? (m !== null && m > kn ? "light" : "dark"), g = r ?? (e && h === "light" ? "#111112" : e ? "#ffffff" : null), _ = g ? {
1845
1883
  "--color-fg": g,
1846
1884
  "--color-fg-2": i ?? `color-mix(in oklab, ${g} 78%, transparent)`,
1847
1885
  "--color-fg-3": `color-mix(in oklab, ${g} 58%, transparent)`,
@@ -1856,7 +1894,7 @@ var En = {
1856
1894
  "--color-surface-2": h === "light" ? "rgb(255 255 255 / 0.7)" : "rgb(0 0 0 / 0.6)",
1857
1895
  "--color-surface-el": h === "light" ? "rgb(255 255 255 / 0.55)" : "rgb(0 0 0 / 0.45)"
1858
1896
  } : void 0;
1859
- return /* @__PURE__ */ U(wn.Provider, {
1897
+ return /* @__PURE__ */ U(En.Provider, {
1860
1898
  value: {
1861
1899
  hasBackground: p,
1862
1900
  tone: h
@@ -1880,16 +1918,16 @@ var En = {
1880
1918
  ...n ? { backgroundColor: n } : void 0
1881
1919
  }
1882
1920
  }),
1883
- p && En[h][a] && /* @__PURE__ */ U("span", {
1921
+ p && On[h][a] && /* @__PURE__ */ U("span", {
1884
1922
  "aria-hidden": "true",
1885
- className: G("pointer-events-none absolute inset-0 -z-10", En[h][a])
1923
+ className: G("pointer-events-none absolute inset-0 -z-10", On[h][a])
1886
1924
  }),
1887
1925
  u
1888
1926
  ]
1889
1927
  })
1890
1928
  });
1891
1929
  });
1892
- On.displayName = "Surface";
1930
+ An.displayName = "Surface";
1893
1931
  //#endregion
1894
1932
  //#region src/components/Skeleton.tsx
1895
1933
  function $({ shape: e = "text", width: t, height: n, className: r }) {
@@ -1902,7 +1940,7 @@ function $({ shape: e = "text", width: t, height: n, className: r }) {
1902
1940
  }
1903
1941
  });
1904
1942
  }
1905
- function kn({ className: e }) {
1943
+ function jn({ className: e }) {
1906
1944
  return /* @__PURE__ */ W("div", {
1907
1945
  className: G("flex items-center gap-3 px-4 py-3", e),
1908
1946
  children: [/* @__PURE__ */ U($, {
@@ -1920,8 +1958,8 @@ function kn({ className: e }) {
1920
1958
  }
1921
1959
  //#endregion
1922
1960
  //#region src/components/CharacterCard.tsx
1923
- var An = a(function({ name: e, description: t, avatar: n, gradient: r, fg: i, fgMuted: a, variant: o = "row", trailing: s, selected: c, className: l, type: u = "button", ...d }, f) {
1924
- let [p, h] = m(!1), g = r ?? Sn(e).background, _ = !!n && !p, v = G("group relative w-full overflow-hidden text-left", "rounded-2xl @3xl:rounded-3xl", "ring-1 ring-inset ring-line-2 transition-[box-shadow,transform] motion-instant", c && "ring-2 ring-accent", l);
1961
+ var Mn = a(function({ name: e, description: t, avatar: n, gradient: r, fg: i, fgMuted: a, variant: o = "row", trailing: s, selected: c, className: l, type: u = "button", ...d }, f) {
1962
+ let [p, h] = m(!1), g = r ?? wn(e).background, _ = !!n && !p, v = G("group relative w-full overflow-hidden text-left", "rounded-2xl @3xl:rounded-3xl", "ring-1 ring-inset ring-line-2 transition-[box-shadow,transform] motion-instant", c && "ring-2 ring-accent", l);
1925
1963
  return o === "banner" ? /* @__PURE__ */ U(y.button, {
1926
1964
  ref: f,
1927
1965
  type: u,
@@ -1930,7 +1968,7 @@ var An = a(function({ name: e, description: t, avatar: n, gradient: r, fg: i, fg
1930
1968
  transition: K.instant,
1931
1969
  className: v,
1932
1970
  ...d,
1933
- children: /* @__PURE__ */ W(On, {
1971
+ children: /* @__PURE__ */ W(An, {
1934
1972
  tint: g,
1935
1973
  fg: i,
1936
1974
  fgMuted: a,
@@ -1977,7 +2015,7 @@ var An = a(function({ name: e, description: t, avatar: n, gradient: r, fg: i, fg
1977
2015
  transition: K.instant,
1978
2016
  className: v,
1979
2017
  ...d,
1980
- children: /* @__PURE__ */ W(On, {
2018
+ children: /* @__PURE__ */ W(An, {
1981
2019
  tint: g,
1982
2020
  fg: i,
1983
2021
  fgMuted: a,
@@ -2016,8 +2054,8 @@ var An = a(function({ name: e, description: t, avatar: n, gradient: r, fg: i, fg
2016
2054
  })
2017
2055
  });
2018
2056
  });
2019
- An.displayName = "CharacterCard";
2020
- function jn({ variant: e = "row" }) {
2057
+ Mn.displayName = "CharacterCard";
2058
+ function Nn({ variant: e = "row" }) {
2021
2059
  return e === "banner" ? /* @__PURE__ */ U($, {
2022
2060
  shape: "block",
2023
2061
  className: "h-24 w-full rounded-2xl @3xl:h-36 @3xl:rounded-3xl"
@@ -2040,13 +2078,13 @@ function jn({ variant: e = "row" }) {
2040
2078
  }
2041
2079
  //#endregion
2042
2080
  //#region src/components/Chart.tsx
2043
- var Mn = [
2081
+ var Pn = [
2044
2082
  "var(--color-accent)",
2045
2083
  "var(--color-info)",
2046
2084
  "var(--color-secondary)",
2047
2085
  "var(--color-warning)",
2048
2086
  "var(--color-danger)"
2049
- ], Nn = {
2087
+ ], Fn = {
2050
2088
  stroke: "var(--color-fg-4)",
2051
2089
  tickLine: !1,
2052
2090
  axisLine: !1,
@@ -2055,7 +2093,7 @@ var Mn = [
2055
2093
  fill: "var(--color-fg-3)"
2056
2094
  }
2057
2095
  };
2058
- function Pn({ active: e, payload: t, label: n, format: r }) {
2096
+ function In({ active: e, payload: t, label: n, format: r }) {
2059
2097
  return !e || !t?.length ? null : /* @__PURE__ */ W("div", {
2060
2098
  className: "rounded-lg border border-line bg-surface-el px-2.5 py-2 shadow-raised",
2061
2099
  children: [/* @__PURE__ */ U("p", {
@@ -2080,12 +2118,12 @@ function Pn({ active: e, payload: t, label: n, format: r }) {
2080
2118
  }, e.dataKey))]
2081
2119
  });
2082
2120
  }
2083
- function Fn({ data: e, x: t, series: n, kind: r = "area", height: i = 200, format: a, minimal: o, className: s }) {
2084
- let c = u(), l = r === "bar" ? Re : r === "line" ? He : Ie;
2121
+ function Ln({ data: e, x: t, series: n, kind: r = "area", height: i = 200, format: a, minimal: o, className: s }) {
2122
+ let c = u(), l = r === "bar" ? ze : r === "line" ? Ue : Le;
2085
2123
  return /* @__PURE__ */ U("div", {
2086
2124
  className: G("w-full", s),
2087
2125
  style: { height: i },
2088
- children: /* @__PURE__ */ U(Ue, {
2126
+ children: /* @__PURE__ */ U(We, {
2089
2127
  width: "100%",
2090
2128
  height: "100%",
2091
2129
  children: /* @__PURE__ */ W(l, {
@@ -2105,35 +2143,35 @@ function Fn({ data: e, x: t, series: n, kind: r = "area", height: i = 200, forma
2105
2143
  y2: "1",
2106
2144
  children: [/* @__PURE__ */ U("stop", {
2107
2145
  offset: "0%",
2108
- stopColor: e.color ?? Mn[t % Mn.length],
2146
+ stopColor: e.color ?? Pn[t % Pn.length],
2109
2147
  stopOpacity: .35
2110
2148
  }), /* @__PURE__ */ U("stop", {
2111
2149
  offset: "100%",
2112
- stopColor: e.color ?? Mn[t % Mn.length],
2150
+ stopColor: e.color ?? Pn[t % Pn.length],
2113
2151
  stopOpacity: 0
2114
2152
  })]
2115
2153
  }, e.key)) }),
2116
- !o && /* @__PURE__ */ U(ze, {
2154
+ !o && /* @__PURE__ */ U(Be, {
2117
2155
  stroke: "var(--color-line)",
2118
2156
  vertical: !1
2119
2157
  }),
2120
- /* @__PURE__ */ U(Ge, {
2158
+ /* @__PURE__ */ U(Ke, {
2121
2159
  dataKey: t,
2122
- ...Nn,
2160
+ ...Fn,
2123
2161
  hide: o
2124
2162
  }),
2125
- !o && /* @__PURE__ */ U(Ke, {
2126
- ...Nn,
2163
+ !o && /* @__PURE__ */ U(qe, {
2164
+ ...Fn,
2127
2165
  width: 48,
2128
2166
  tickFormatter: a
2129
2167
  }),
2130
- /* @__PURE__ */ U(We, {
2168
+ /* @__PURE__ */ U(Ge, {
2131
2169
  cursor: { stroke: "var(--color-line-2)" },
2132
- content: /* @__PURE__ */ U(Pn, { format: a })
2170
+ content: /* @__PURE__ */ U(In, { format: a })
2133
2171
  }),
2134
2172
  n.map((e, t) => {
2135
- let n = e.color ?? Mn[t % Mn.length];
2136
- return r === "bar" ? /* @__PURE__ */ U(Le, {
2173
+ let n = e.color ?? Pn[t % Pn.length];
2174
+ return r === "bar" ? /* @__PURE__ */ U(Re, {
2137
2175
  dataKey: e.key,
2138
2176
  name: e.label,
2139
2177
  fill: n,
@@ -2143,14 +2181,14 @@ function Fn({ data: e, x: t, series: n, kind: r = "area", height: i = 200, forma
2143
2181
  0,
2144
2182
  0
2145
2183
  ]
2146
- }, e.key) : r === "line" ? /* @__PURE__ */ U(Ve, {
2184
+ }, e.key) : r === "line" ? /* @__PURE__ */ U(He, {
2147
2185
  type: "monotone",
2148
2186
  dataKey: e.key,
2149
2187
  name: e.label,
2150
2188
  stroke: n,
2151
2189
  strokeWidth: 2,
2152
2190
  dot: !1
2153
- }, e.key) : /* @__PURE__ */ U(Fe, {
2191
+ }, e.key) : /* @__PURE__ */ U(Ie, {
2154
2192
  type: "monotone",
2155
2193
  dataKey: e.key,
2156
2194
  name: e.label,
@@ -2164,7 +2202,7 @@ function Fn({ data: e, x: t, series: n, kind: r = "area", height: i = 200, forma
2164
2202
  })
2165
2203
  });
2166
2204
  }
2167
- function In({ data: e, color: t = "var(--color-accent)", height: n = 32, className: r }) {
2205
+ function Rn({ data: e, color: t = "var(--color-accent)", height: n = 32, className: r }) {
2168
2206
  let i = e.map((e, t) => ({
2169
2207
  index: t,
2170
2208
  value: e
@@ -2172,10 +2210,10 @@ function In({ data: e, color: t = "var(--color-accent)", height: n = 32, classNa
2172
2210
  return /* @__PURE__ */ U("div", {
2173
2211
  className: G("w-full", r),
2174
2212
  style: { height: n },
2175
- children: /* @__PURE__ */ U(Ue, {
2213
+ children: /* @__PURE__ */ U(We, {
2176
2214
  width: "100%",
2177
2215
  height: "100%",
2178
- children: /* @__PURE__ */ U(He, {
2216
+ children: /* @__PURE__ */ U(Ue, {
2179
2217
  data: i,
2180
2218
  margin: {
2181
2219
  top: 2,
@@ -2183,7 +2221,7 @@ function In({ data: e, color: t = "var(--color-accent)", height: n = 32, classNa
2183
2221
  bottom: 2,
2184
2222
  left: 0
2185
2223
  },
2186
- children: /* @__PURE__ */ U(Ve, {
2224
+ children: /* @__PURE__ */ U(He, {
2187
2225
  type: "monotone",
2188
2226
  dataKey: "value",
2189
2227
  stroke: t,
@@ -2197,10 +2235,10 @@ function In({ data: e, color: t = "var(--color-accent)", height: n = 32, classNa
2197
2235
  }
2198
2236
  //#endregion
2199
2237
  //#region src/components/Checkbox.tsx
2200
- var Ln = {
2238
+ var zn = {
2201
2239
  sm: "h-4 w-4 rounded-[5px]",
2202
2240
  md: "h-5 w-5 rounded-md"
2203
- }, Rn = a(function({ checked: e, onChange: t, indeterminate: n, label: r, size: i = "md", disabled: a, className: o, id: s, ...c }, l) {
2241
+ }, Bn = a(function({ checked: e, onChange: t, indeterminate: n, label: r, size: i = "md", disabled: a, className: o, id: s, ...c }, l) {
2204
2242
  let u = Y(), d = e || n, f = /* @__PURE__ */ U("button", {
2205
2243
  ref: l,
2206
2244
  type: "button",
@@ -2210,7 +2248,7 @@ var Ln = {
2210
2248
  "aria-describedby": u?.describedBy,
2211
2249
  disabled: a,
2212
2250
  onClick: () => t(!e),
2213
- className: G("inline-flex shrink-0 items-center justify-center border transition-colors motion-instant", Ln[i], d ? "border-accent bg-accent text-on-accent" : "border-line-3 bg-fill hover:border-fg-3", a && !r && "cursor-not-allowed opacity-40", a && "cursor-not-allowed", o),
2251
+ className: G("inline-flex shrink-0 items-center justify-center border transition-colors motion-instant", zn[i], d ? "border-accent bg-accent text-on-accent" : "border-line-3 bg-fill hover:border-fg-3", a && !r && "cursor-not-allowed opacity-40", a && "cursor-not-allowed", o),
2214
2252
  ...c,
2215
2253
  children: /* @__PURE__ */ U("svg", {
2216
2254
  viewBox: "0 0 16 16",
@@ -2248,10 +2286,10 @@ var Ln = {
2248
2286
  children: [f, /* @__PURE__ */ U("span", { children: r })]
2249
2287
  }) : f;
2250
2288
  });
2251
- Rn.displayName = "Checkbox";
2289
+ Bn.displayName = "Checkbox";
2252
2290
  //#endregion
2253
2291
  //#region src/components/Chip.tsx
2254
- function zn({ selected: e, onRemove: t, icon: n, className: r, children: i, ...a }) {
2292
+ function Vn({ selected: e, onRemove: t, icon: n, className: r, children: i, ...a }) {
2255
2293
  let { strings: o } = q(), s = G("inline-flex h-8 items-center gap-1.5 rounded-full border px-3 text-sm font-medium transition-colors motion-instant", e ? "border-accent/40 bg-accent/15 text-accent" : "border-line-2 bg-fill text-fg-2 hover:border-line-3 hover:bg-fill-2 hover:text-fg", r);
2256
2294
  return t ? /* @__PURE__ */ W("span", {
2257
2295
  className: G(s, "pr-1"),
@@ -2276,7 +2314,7 @@ function zn({ selected: e, onRemove: t, icon: n, className: r, children: i, ...a
2276
2314
  }
2277
2315
  //#endregion
2278
2316
  //#region src/components/CopyButton.tsx
2279
- function Bn({ value: e, children: t, label: n, copiedLabel: r, className: i, ...a }) {
2317
+ function Hn({ value: e, children: t, label: n, copiedLabel: r, className: i, ...a }) {
2280
2318
  let { strings: o } = q(), [s, c] = m(!1), u = p(null);
2281
2319
  l(() => () => {
2282
2320
  u.current && window.clearTimeout(u.current);
@@ -2294,7 +2332,7 @@ function Bn({ value: e, children: t, label: n, copiedLabel: r, className: i, ...
2294
2332
  leading: s ? /* @__PURE__ */ U(M, {
2295
2333
  size: 16,
2296
2334
  className: "text-accent"
2297
- }) : /* @__PURE__ */ U(R, { size: 16 }),
2335
+ }) : /* @__PURE__ */ U(L, { size: 16 }),
2298
2336
  className: G(i),
2299
2337
  ...a,
2300
2338
  children: s ? r ?? o.copyButtonCopied : t
@@ -2305,13 +2343,13 @@ function Bn({ value: e, children: t, label: n, copiedLabel: r, className: i, ...
2305
2343
  children: s ? /* @__PURE__ */ U(M, {
2306
2344
  size: 16,
2307
2345
  className: "text-accent"
2308
- }) : /* @__PURE__ */ U(R, { size: 16 })
2346
+ }) : /* @__PURE__ */ U(L, { size: 16 })
2309
2347
  });
2310
2348
  }
2311
2349
  //#endregion
2312
2350
  //#region src/components/ScrollArea.tsx
2313
- var Vn = 28;
2314
- function Hn({ axis: e = "y", fade: t = !0, bar: n = !1, className: r, children: i }) {
2351
+ var Un = 28;
2352
+ function Wn({ axis: e = "y", fade: t = !0, bar: n = !1, className: r, children: i }) {
2315
2353
  let a = p(null), [o, s] = m({
2316
2354
  start: !1,
2317
2355
  end: !1
@@ -2332,7 +2370,7 @@ function Hn({ axis: e = "y", fade: t = !0, bar: n = !1, className: r, children:
2332
2370
  n.removeEventListener("scroll", r), i.disconnect();
2333
2371
  };
2334
2372
  }, [e, t]);
2335
- let c = e === "y" ? "to bottom" : "to right", u = !t || !o.start && !o.end ? void 0 : o.start && o.end ? `linear-gradient(${c}, transparent, black ${Vn}px, black calc(100% - ${Vn}px), transparent)` : o.end ? `linear-gradient(${c}, black calc(100% - ${Vn}px), transparent)` : `linear-gradient(${c}, transparent, black ${Vn}px)`;
2373
+ let c = e === "y" ? "to bottom" : "to right", u = !t || !o.start && !o.end ? void 0 : o.start && o.end ? `linear-gradient(${c}, transparent, black ${Un}px, black calc(100% - ${Un}px), transparent)` : o.end ? `linear-gradient(${c}, black calc(100% - ${Un}px), transparent)` : `linear-gradient(${c}, transparent, black ${Un}px)`;
2336
2374
  return /* @__PURE__ */ U("div", {
2337
2375
  ref: a,
2338
2376
  className: G(e === "y" ? "overflow-y-auto" : "overflow-x-auto", n ? "scrollbar-thin" : "scrollbar-none", r),
@@ -2345,7 +2383,7 @@ function Hn({ axis: e = "y", fade: t = !0, bar: n = !1, className: r, children:
2345
2383
  }
2346
2384
  //#endregion
2347
2385
  //#region src/components/CodeBlock.tsx
2348
- function Un({ code: e, label: t, wrap: n, lineNumbers: r, maxHeight: i = 320, className: a }) {
2386
+ function Gn({ code: e, label: t, wrap: n, lineNumbers: r, maxHeight: i = 320, className: a }) {
2349
2387
  let o = e.split("\n");
2350
2388
  return /* @__PURE__ */ W("div", {
2351
2389
  className: G("overflow-hidden rounded-xl border border-line bg-surface-1", a),
@@ -2354,8 +2392,8 @@ function Un({ code: e, label: t, wrap: n, lineNumbers: r, maxHeight: i = 320, cl
2354
2392
  children: [/* @__PURE__ */ U("span", {
2355
2393
  className: "min-w-0 flex-1 truncate font-mono text-2xs text-fg-3",
2356
2394
  children: t
2357
- }), /* @__PURE__ */ U(Bn, { value: e })]
2358
- }), /* @__PURE__ */ U(Hn, {
2395
+ }), /* @__PURE__ */ U(Hn, { value: e })]
2396
+ }), /* @__PURE__ */ U(Wn, {
2359
2397
  axis: n ? "y" : "x",
2360
2398
  bar: !0,
2361
2399
  className: "max-w-full",
@@ -2378,7 +2416,7 @@ function Un({ code: e, label: t, wrap: n, lineNumbers: r, maxHeight: i = 320, cl
2378
2416
  }
2379
2417
  //#endregion
2380
2418
  //#region src/components/Collapsible.tsx
2381
- function Wn({ title: e, description: t, defaultOpen: n = !1, open: r, onOpenChange: i, trailing: a, variant: o = "panel", className: s, children: c }) {
2419
+ function Kn({ title: e, description: t, defaultOpen: n = !1, open: r, onOpenChange: i, trailing: a, variant: o = "panel", className: s, children: c }) {
2382
2420
  let l = u(), [d, f] = m(n), p = r ?? d, h = (e) => {
2383
2421
  r === void 0 && f(e), i?.(e);
2384
2422
  };
@@ -2440,29 +2478,29 @@ function Wn({ title: e, description: t, defaultOpen: n = !1, open: r, onOpenChan
2440
2478
  }
2441
2479
  //#endregion
2442
2480
  //#region src/lib/ref.ts
2443
- function Gn(...e) {
2481
+ function qn(...e) {
2444
2482
  return (t) => {
2445
2483
  for (let n of e) n && (typeof n == "function" ? n(t) : typeof n == "object" && "current" in n && (n.current = t));
2446
2484
  };
2447
2485
  }
2448
- function Kn(e) {
2486
+ function Jn(e) {
2449
2487
  if (!e || typeof e != "object") return;
2450
2488
  let t = e;
2451
2489
  return t.props?.ref ?? t.ref;
2452
2490
  }
2453
2491
  //#endregion
2454
2492
  //#region src/components/Popover.tsx
2455
- var qn = r(null);
2456
- function Jn() {
2457
- let e = c(qn);
2493
+ var Yn = r(null);
2494
+ function Xn() {
2495
+ let e = c(Yn);
2458
2496
  if (!e) throw Error("Popover parts must be used inside <Popover>");
2459
2497
  return e;
2460
2498
  }
2461
- function Yn({ open: e, onOpenChange: t, children: n }) {
2499
+ function Zn({ open: e, onOpenChange: t, children: n }) {
2462
2500
  let [r, i] = m(!1), a = e ?? r, o = p(null), c = u(), l = s((n) => {
2463
2501
  e === void 0 && i(n), t?.(n);
2464
2502
  }, [e, t]);
2465
- return /* @__PURE__ */ U(qn.Provider, {
2503
+ return /* @__PURE__ */ U(Yn.Provider, {
2466
2504
  value: {
2467
2505
  open: a,
2468
2506
  setOpen: l,
@@ -2472,10 +2510,10 @@ function Yn({ open: e, onOpenChange: t, children: n }) {
2472
2510
  children: n
2473
2511
  });
2474
2512
  }
2475
- function Xn({ children: e }) {
2476
- let { open: t, setOpen: r, id: i, anchorRef: a } = Jn(), o = e.props, s = Kn(e);
2513
+ function Qn({ children: e }) {
2514
+ let { open: t, setOpen: r, id: i, anchorRef: a } = Xn(), o = e.props, s = Jn(e);
2477
2515
  return n(e, {
2478
- ref: Gn(a, s),
2516
+ ref: qn(a, s),
2479
2517
  "aria-haspopup": "dialog",
2480
2518
  "aria-expanded": t,
2481
2519
  "aria-controls": t ? i : void 0,
@@ -2484,11 +2522,11 @@ function Xn({ children: e }) {
2484
2522
  }
2485
2523
  });
2486
2524
  }
2487
- function Zn({ children: e }) {
2488
- let { anchorRef: t } = Jn(), r = Kn(e);
2489
- return n(e, { ref: Gn(t, r) });
2525
+ function $n({ children: e }) {
2526
+ let { anchorRef: t } = Xn(), r = Jn(e);
2527
+ return n(e, { ref: qn(t, r) });
2490
2528
  }
2491
- function Qn(e, t, { open: n, side: r, align: i, offset: a }) {
2529
+ function er(e, t, { open: n, side: r, align: i, offset: a }) {
2492
2530
  let [o, s] = m({
2493
2531
  top: 0,
2494
2532
  left: 0
@@ -2519,8 +2557,8 @@ function Qn(e, t, { open: n, side: r, align: i, offset: a }) {
2519
2557
  t
2520
2558
  ]), o;
2521
2559
  }
2522
- function $n({ side: e = "bottom", align: t = "start", offset: n = 6, matchWidth: r, className: i, children: a }) {
2523
- let { open: o, setOpen: s, id: c, anchorRef: u } = Jn(), d = p(null), f = Qn(u, d, {
2560
+ function tr({ side: e = "bottom", align: t = "start", offset: n = 6, matchWidth: r, className: i, children: a }) {
2561
+ let { open: o, setOpen: s, id: c, anchorRef: u } = Xn(), d = p(null), f = er(u, d, {
2524
2562
  open: o,
2525
2563
  side: e,
2526
2564
  align: t,
@@ -2541,7 +2579,7 @@ function $n({ side: e = "bottom", align: t = "start", offset: n = 6, matchWidth:
2541
2579
  o,
2542
2580
  s,
2543
2581
  u
2544
- ]), qe(/* @__PURE__ */ U(g, { children: o && /* @__PURE__ */ U(y.div, {
2582
+ ]), typeof document > "u" ? null : Fe(/* @__PURE__ */ U(g, { children: o && /* @__PURE__ */ U(y.div, {
2545
2583
  ref: d,
2546
2584
  id: c,
2547
2585
  role: "dialog",
@@ -2569,7 +2607,7 @@ function $n({ side: e = "bottom", align: t = "start", offset: n = 6, matchWidth:
2569
2607
  }
2570
2608
  //#endregion
2571
2609
  //#region src/components/ColorPicker.tsx
2572
- var er = [
2610
+ var nr = [
2573
2611
  "#65c789",
2574
2612
  "#22d3ee",
2575
2613
  "#3b82f6",
@@ -2581,21 +2619,21 @@ var er = [
2581
2619
  "#e5e7eb",
2582
2620
  "#71717a"
2583
2621
  ];
2584
- function tr(e) {
2622
+ function rr(e) {
2585
2623
  let t = e.trim().replace(/^#?/, "");
2586
2624
  return /^[0-9a-f]{3}$/i.test(t) ? `#${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}`.toLowerCase() : /^[0-9a-f]{6}$/i.test(t) ? `#${t.toLowerCase()}` : null;
2587
2625
  }
2588
- function nr({ value: e, onChange: t, swatches: n = er, disabled: r, id: i, className: a }) {
2626
+ function ir({ value: e, onChange: t, swatches: n = nr, disabled: r, id: i, className: a }) {
2589
2627
  let { strings: o } = q(), s = Y(), [c, l] = m(e), [u, d] = m(!1), f = (n) => {
2590
- let r = tr(n);
2628
+ let r = rr(n);
2591
2629
  r ? t(r) : l(e);
2592
2630
  };
2593
- return /* @__PURE__ */ W(Yn, {
2631
+ return /* @__PURE__ */ W(Zn, {
2594
2632
  open: u,
2595
2633
  onOpenChange: (t) => {
2596
2634
  d(t), t && l(e);
2597
2635
  },
2598
- children: [/* @__PURE__ */ U(Xn, { children: /* @__PURE__ */ W("button", {
2636
+ children: [/* @__PURE__ */ U(Qn, { children: /* @__PURE__ */ W("button", {
2599
2637
  type: "button",
2600
2638
  id: i ?? s?.id,
2601
2639
  disabled: r,
@@ -2608,7 +2646,7 @@ function nr({ value: e, onChange: t, swatches: n = er, disabled: r, id: i, class
2608
2646
  className: "font-mono text-sm uppercase text-fg-2",
2609
2647
  children: e
2610
2648
  })]
2611
- }) }), /* @__PURE__ */ W($n, {
2649
+ }) }), /* @__PURE__ */ W(tr, {
2612
2650
  className: "w-60 p-3",
2613
2651
  children: [/* @__PURE__ */ U("div", {
2614
2652
  className: "grid grid-cols-5 gap-2",
@@ -2629,7 +2667,7 @@ function nr({ value: e, onChange: t, swatches: n = er, disabled: r, id: i, class
2629
2667
  className: "mt-3 flex items-center gap-2",
2630
2668
  children: [/* @__PURE__ */ W("label", {
2631
2669
  className: "relative flex h-9 w-9 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-line bg-fill text-fg-3 hover:text-fg",
2632
- children: [/* @__PURE__ */ U(ye, { size: 16 }), /* @__PURE__ */ U("input", {
2670
+ children: [/* @__PURE__ */ U(ve, { size: 16 }), /* @__PURE__ */ U("input", {
2633
2671
  type: "color",
2634
2672
  value: e,
2635
2673
  onChange: (e) => t(e.target.value),
@@ -2653,26 +2691,26 @@ function nr({ value: e, onChange: t, swatches: n = er, disabled: r, id: i, class
2653
2691
  }
2654
2692
  //#endregion
2655
2693
  //#region src/components/Spinner.tsx
2656
- var rr = {
2694
+ var ar = {
2657
2695
  sm: 14,
2658
2696
  md: 18,
2659
2697
  lg: 24
2660
2698
  };
2661
- function ir({ size: e = "md", label: t, className: n }) {
2662
- return /* @__PURE__ */ U(fe, {
2663
- size: rr[e],
2699
+ function or({ size: e = "md", label: t, className: n }) {
2700
+ return /* @__PURE__ */ U(B, {
2701
+ size: ar[e],
2664
2702
  role: t ? "status" : void 0,
2665
2703
  "aria-label": t,
2666
2704
  "aria-hidden": !t || void 0,
2667
2705
  className: G("animate-spin text-fg-3", n)
2668
2706
  });
2669
2707
  }
2670
- function ar({ label: e, className: t }) {
2708
+ function sr({ label: e, className: t }) {
2671
2709
  let { strings: n } = q();
2672
2710
  return /* @__PURE__ */ W("div", {
2673
2711
  className: G("flex flex-col items-center justify-center gap-3 px-6 py-12", t),
2674
2712
  role: "status",
2675
- children: [/* @__PURE__ */ U(ir, { size: "lg" }), /* @__PURE__ */ U("p", {
2713
+ children: [/* @__PURE__ */ U(or, { size: "lg" }), /* @__PURE__ */ U("p", {
2676
2714
  className: "text-sm text-fg-3",
2677
2715
  children: e ?? n.loadingState
2678
2716
  })]
@@ -2680,7 +2718,7 @@ function ar({ label: e, className: t }) {
2680
2718
  }
2681
2719
  //#endregion
2682
2720
  //#region src/components/Combobox.tsx
2683
- function or({ options: e, value: t, onChange: n, placeholder: r, searchPlaceholder: i, onSearch: a, loading: o, emptyMessage: s, clearable: c, disabled: u, id: d, className: h }) {
2721
+ function cr({ options: e, value: t, onChange: n, placeholder: r, searchPlaceholder: i, onSearch: a, loading: o, emptyMessage: s, clearable: c, disabled: u, id: d, className: h }) {
2684
2722
  let { strings: g } = q(), _ = Y(), [v, y] = m(!1), [b, x] = m(""), [S, C] = m(0), w = p(null), T = p(null), E = f(() => {
2685
2723
  if (a || !b.trim()) return e;
2686
2724
  let t = b.toLowerCase();
@@ -2716,10 +2754,10 @@ function or({ options: e, value: t, onChange: n, placeholder: r, searchPlacehold
2716
2754
  }
2717
2755
  e.key === "Enter" && O[S] && (e.preventDefault(), A(O[S])), e.key === "Home" && (e.preventDefault(), C(0)), e.key === "End" && (e.preventDefault(), C(O.length - 1));
2718
2756
  }, j = -1;
2719
- return /* @__PURE__ */ W(Yn, {
2757
+ return /* @__PURE__ */ W(Zn, {
2720
2758
  open: v,
2721
2759
  onOpenChange: y,
2722
- children: [/* @__PURE__ */ U(Xn, { children: /* @__PURE__ */ W("button", {
2760
+ children: [/* @__PURE__ */ U(Qn, { children: /* @__PURE__ */ W("button", {
2723
2761
  type: "button",
2724
2762
  id: d ?? _?.id,
2725
2763
  role: "combobox",
@@ -2752,7 +2790,7 @@ function or({ options: e, value: t, onChange: n, placeholder: r, searchPlacehold
2752
2790
  className: "shrink-0 text-fg-3"
2753
2791
  })
2754
2792
  ]
2755
- }) }), /* @__PURE__ */ W($n, {
2793
+ }) }), /* @__PURE__ */ W(tr, {
2756
2794
  matchWidth: !0,
2757
2795
  className: "p-0",
2758
2796
  children: [/* @__PURE__ */ W("div", {
@@ -2773,7 +2811,7 @@ function or({ options: e, value: t, onChange: n, placeholder: r, searchPlacehold
2773
2811
  "aria-label": i ?? g.comboboxSearch,
2774
2812
  className: "min-w-0 flex-1 bg-transparent text-base text-fg outline-none placeholder:text-fg-4"
2775
2813
  }),
2776
- o && /* @__PURE__ */ U(ir, { size: "sm" })
2814
+ o && /* @__PURE__ */ U(or, { size: "sm" })
2777
2815
  ]
2778
2816
  }), /* @__PURE__ */ W("div", {
2779
2817
  ref: T,
@@ -2825,14 +2863,14 @@ function or({ options: e, value: t, onChange: n, placeholder: r, searchPlacehold
2825
2863
  }
2826
2864
  //#endregion
2827
2865
  //#region src/components/Highlight.tsx
2828
- function sr(e) {
2866
+ function lr(e) {
2829
2867
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2830
2868
  }
2831
- function cr({ children: e, query: t, words: n, className: r, markClassName: i }) {
2869
+ function ur({ children: e, query: t, words: n, className: r, markClassName: i }) {
2832
2870
  let a = f(() => {
2833
2871
  let r = t.trim();
2834
2872
  if (!r) return [e];
2835
- let a = n ? r.split(/\s+/).filter(Boolean) : [r], o = RegExp(`(${a.map(sr).join("|")})`, "gi");
2873
+ let a = n ? r.split(/\s+/).filter(Boolean) : [r], o = RegExp(`(${a.map(lr).join("|")})`, "gi");
2836
2874
  return e.split(o).map((e, t) => t % 2 == 1 ? /* @__PURE__ */ U("mark", {
2837
2875
  className: G("rounded-[3px] bg-accent/25 px-0.5 text-fg", i),
2838
2876
  children: e
@@ -2850,7 +2888,7 @@ function cr({ children: e, query: t, words: n, className: r, markClassName: i })
2850
2888
  }
2851
2889
  //#endregion
2852
2890
  //#region src/components/Kbd.tsx
2853
- function lr({ children: e, className: t }) {
2891
+ function dr({ children: e, className: t }) {
2854
2892
  return /* @__PURE__ */ U("kbd", {
2855
2893
  className: G("inline-flex h-5 min-w-5 items-center justify-center rounded-md border border-line-2 bg-fill px-1.5 font-sans text-2xs font-medium text-fg-2", t),
2856
2894
  children: e
@@ -2858,7 +2896,7 @@ function lr({ children: e, className: t }) {
2858
2896
  }
2859
2897
  //#endregion
2860
2898
  //#region src/components/CommandPalette.tsx
2861
- function ur({ open: e, onOpenChange: t, commands: n, placeholder: r, onQueryChange: i, loading: a, emptyMessage: o }) {
2899
+ function fr({ open: e, onOpenChange: t, commands: n, placeholder: r, onQueryChange: i, loading: a, emptyMessage: o }) {
2862
2900
  let { strings: s } = q(), [c, u] = m(""), [d, h] = m(0), _ = p(null), v = p(null), b = f(() => {
2863
2901
  if (i || !c.trim()) return n;
2864
2902
  let e = c.toLowerCase();
@@ -2892,7 +2930,7 @@ function ur({ open: e, onOpenChange: t, commands: n, placeholder: r, onQueryChan
2892
2930
  }, C = (e) => {
2893
2931
  e.key === "Escape" && (e.preventDefault(), t(!1)), e.key === "ArrowDown" && (e.preventDefault(), h((e) => (e + 1) % Math.max(1, b.length))), e.key === "ArrowUp" && (e.preventDefault(), h((e) => (e - 1 + b.length) % Math.max(1, b.length))), e.key === "Enter" && b[d] && (e.preventDefault(), S(b[d]));
2894
2932
  }, w = -1;
2895
- return qe(/* @__PURE__ */ U(g, { children: e && /* @__PURE__ */ W("div", {
2933
+ return typeof document > "u" ? null : Fe(/* @__PURE__ */ U(g, { children: e && /* @__PURE__ */ W("div", {
2896
2934
  className: "fixed inset-0 z-[95] flex items-start justify-center p-4 pt-[12vh]",
2897
2935
  children: [/* @__PURE__ */ U(y.div, {
2898
2936
  initial: { opacity: 0 },
@@ -2940,8 +2978,8 @@ function ur({ open: e, onOpenChange: t, commands: n, placeholder: r, onQueryChan
2940
2978
  "aria-label": r ?? s.commandPalettePlaceholder,
2941
2979
  className: "min-w-0 flex-1 bg-transparent text-lg text-fg outline-none placeholder:text-fg-4"
2942
2980
  }),
2943
- a && /* @__PURE__ */ U(ir, { size: "sm" }),
2944
- /* @__PURE__ */ U(lr, { children: s.commandPaletteEscape })
2981
+ a && /* @__PURE__ */ U(or, { size: "sm" }),
2982
+ /* @__PURE__ */ U(dr, { children: s.commandPaletteEscape })
2945
2983
  ]
2946
2984
  }), /* @__PURE__ */ W("div", {
2947
2985
  ref: _,
@@ -2972,7 +3010,7 @@ function ur({ open: e, onOpenChange: t, commands: n, placeholder: r, onQueryChan
2972
3010
  className: "min-w-0 flex-1",
2973
3011
  children: [/* @__PURE__ */ U("span", {
2974
3012
  className: "block truncate text-base text-fg",
2975
- children: /* @__PURE__ */ U(cr, {
3013
+ children: /* @__PURE__ */ U(ur, {
2976
3014
  query: c,
2977
3015
  children: e.label
2978
3016
  })
@@ -2981,8 +3019,8 @@ function ur({ open: e, onOpenChange: t, commands: n, placeholder: r, onQueryChan
2981
3019
  children: e.description
2982
3020
  })]
2983
3021
  }),
2984
- e.shortcut && /* @__PURE__ */ U(lr, { children: e.shortcut }),
2985
- t && /* @__PURE__ */ U(re, {
3022
+ e.shortcut && /* @__PURE__ */ U(dr, { children: e.shortcut }),
3023
+ t && /* @__PURE__ */ U(ie, {
2986
3024
  size: 14,
2987
3025
  className: "shrink-0 text-fg-4"
2988
3026
  })
@@ -2993,7 +3031,7 @@ function ur({ open: e, onOpenChange: t, commands: n, placeholder: r, onQueryChan
2993
3031
  })]
2994
3032
  }) }), document.body);
2995
3033
  }
2996
- function dr() {
3034
+ function pr() {
2997
3035
  let [e, t] = m(!1);
2998
3036
  return l(() => {
2999
3037
  let e = (e) => {
@@ -3007,7 +3045,7 @@ function dr() {
3007
3045
  }
3008
3046
  //#endregion
3009
3047
  //#region src/lib/useLongPress.ts
3010
- function fr(e, { delay: t = 450, enabled: n = !0 } = {}) {
3048
+ function mr(e, { delay: t = 450, enabled: n = !0 } = {}) {
3011
3049
  let r = p(null), i = p(!1), a = p(null), o = s(() => {
3012
3050
  r.current !== null && window.clearTimeout(r.current), r.current = null;
3013
3051
  }, []), c = s((s) => {
@@ -3053,13 +3091,13 @@ function fr(e, { delay: t = 450, enabled: n = !0 } = {}) {
3053
3091
  }
3054
3092
  //#endregion
3055
3093
  //#region src/components/Composer.tsx
3056
- function pr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSendAsSystem: a, onAttach: o, attachments: s = [], onRemoveAttachment: c, mic: u, sending: d = !1, disabled: f = !1, placeholder: m, enterSends: h = !0, notice: _, topSlot: v, className: b }) {
3094
+ function hr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSendAsSystem: a, onAttach: o, attachments: s = [], onRemoveAttachment: c, mic: u, sending: d = !1, disabled: f = !1, placeholder: m, enterSends: h = !0, notice: _, topSlot: v, className: b }) {
3057
3095
  let { strings: x } = q(), S = p(null), C = e.trim().length > 0 || s.length > 0, w = !!u?.active, T = d ? r ? "stop" : "busy" : C ? "send" : "continue", E = f || T === "busy" || T === "continue" && !i;
3058
3096
  l(() => {
3059
3097
  let e = S.current;
3060
3098
  e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 160)}px`);
3061
3099
  }, [e]);
3062
- let D = fr(a, { enabled: T === "send" && !f }), k = () => {
3100
+ let D = mr(a, { enabled: T === "send" && !f }), k = () => {
3063
3101
  T === "stop" ? r?.() : T === "send" ? n() : T === "continue" && i?.();
3064
3102
  }, A = (e) => {
3065
3103
  !h || e.key !== "Enter" || e.shiftKey || e.nativeEvent.isComposing || (e.preventDefault(), !d && !f && C && n());
@@ -3082,11 +3120,11 @@ function pr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSend
3082
3120
  size: 18,
3083
3121
  strokeWidth: 2.5
3084
3122
  }),
3085
- busy: /* @__PURE__ */ U(fe, {
3123
+ busy: /* @__PURE__ */ U(B, {
3086
3124
  size: 18,
3087
3125
  className: "animate-spin"
3088
3126
  }),
3089
- continue: /* @__PURE__ */ U(I, { size: 18 })
3127
+ continue: /* @__PURE__ */ U(ne, { size: 18 })
3090
3128
  };
3091
3129
  return /* @__PURE__ */ W("div", {
3092
3130
  className: G("space-y-2", b),
@@ -3129,9 +3167,9 @@ function pr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSend
3129
3167
  size: "md",
3130
3168
  onClick: o,
3131
3169
  disabled: f || d || w,
3132
- children: /* @__PURE__ */ U(B, { size: 18 })
3170
+ children: /* @__PURE__ */ U(be, { size: 18 })
3133
3171
  }),
3134
- w && u ? /* @__PURE__ */ U(hr, {
3172
+ w && u ? /* @__PURE__ */ U(_r, {
3135
3173
  elapsedMs: u.elapsedMs,
3136
3174
  analyser: u.analyser,
3137
3175
  frozen: u.transcribing
@@ -3160,7 +3198,7 @@ function pr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSend
3160
3198
  disabled: u.transcribing,
3161
3199
  "aria-label": u.transcribing ? x.composerTranscribing : x.composerStopAndTranscribe,
3162
3200
  className: "touch-target control-md flex w-10 shrink-0 items-center justify-center rounded-full bg-accent text-on-accent disabled:opacity-70",
3163
- children: u.transcribing ? /* @__PURE__ */ U(fe, {
3201
+ children: u.transcribing ? /* @__PURE__ */ U(B, {
3164
3202
  size: 18,
3165
3203
  className: "animate-spin"
3166
3204
  }) : /* @__PURE__ */ U(M, {
@@ -3173,7 +3211,7 @@ function pr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSend
3173
3211
  size: "md",
3174
3212
  onClick: u.onStart,
3175
3213
  disabled: f || d || u.disabled,
3176
- children: /* @__PURE__ */ U(pe, { size: 16 })
3214
+ children: /* @__PURE__ */ U(fe, { size: 16 })
3177
3215
  })),
3178
3216
  !w && /* @__PURE__ */ U(y.button, {
3179
3217
  type: "button",
@@ -3212,11 +3250,11 @@ function pr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSend
3212
3250
  })]
3213
3251
  });
3214
3252
  }
3215
- function mr(e) {
3253
+ function gr(e) {
3216
3254
  let t = Math.max(0, Math.floor(e / 1e3));
3217
3255
  return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
3218
3256
  }
3219
- function hr({ elapsedMs: e, analyser: t, frozen: n = !1 }) {
3257
+ function _r({ elapsedMs: e, analyser: t, frozen: n = !1 }) {
3220
3258
  let { strings: r } = q(), i = p(null), a = p(null), o = p([]), s = p(null), [c, u] = m({
3221
3259
  w: 0,
3222
3260
  h: 0
@@ -3273,7 +3311,7 @@ function hr({ elapsedMs: e, analyser: t, frozen: n = !1 }) {
3273
3311
  className: "flex min-h-[var(--composer-row)] min-w-0 flex-1 items-center gap-2.5 px-2",
3274
3312
  role: "status",
3275
3313
  "aria-live": "polite",
3276
- "aria-label": n ? r.composerTranscribing : r.composerRecording(mr(e)),
3314
+ "aria-label": n ? r.composerTranscribing : r.composerRecording(gr(e)),
3277
3315
  children: [
3278
3316
  /* @__PURE__ */ W("span", {
3279
3317
  className: "relative flex h-2 w-2 shrink-0",
@@ -3298,14 +3336,14 @@ function hr({ elapsedMs: e, analyser: t, frozen: n = !1 }) {
3298
3336
  }),
3299
3337
  /* @__PURE__ */ U("span", {
3300
3338
  className: "shrink-0 text-xs tabular-nums text-fg-2",
3301
- children: mr(e)
3339
+ children: gr(e)
3302
3340
  })
3303
3341
  ]
3304
3342
  });
3305
3343
  }
3306
3344
  //#endregion
3307
3345
  //#region src/lib/useModal.ts
3308
- function gr(e, t, n, { lockScroll: r = !0 } = {}) {
3346
+ function vr(e, t, n, { lockScroll: r = !0 } = {}) {
3309
3347
  l(() => {
3310
3348
  if (!e) return;
3311
3349
  let i = document.activeElement, a = document.body.style.overflow;
@@ -3335,20 +3373,20 @@ function gr(e, t, n, { lockScroll: r = !0 } = {}) {
3335
3373
  }
3336
3374
  //#endregion
3337
3375
  //#region src/components/Sheet.tsx
3338
- var _r = {
3376
+ var yr = {
3339
3377
  sm: "max-w-sm",
3340
3378
  md: "max-w-md",
3341
3379
  lg: "max-w-xl"
3342
- }, vr = {
3380
+ }, br = {
3343
3381
  sm: "max-w-sm",
3344
3382
  md: "max-w-lg",
3345
3383
  lg: "max-w-2xl"
3346
- }, yr = {
3384
+ }, xr = {
3347
3385
  sm: "max-w-md",
3348
3386
  md: "max-w-xl",
3349
3387
  lg: "max-w-3xl"
3350
- }, br = 4e3, xr = 4;
3351
- function Sr({ onExit: e, children: t }) {
3388
+ }, Sr = 4e3, Cr = 4;
3389
+ function wr({ onExit: e, children: t }) {
3352
3390
  let [n, r] = S(), i = p(n);
3353
3391
  return i.current = n, l(() => {
3354
3392
  n || e().then(() => {
@@ -3356,36 +3394,38 @@ function Sr({ onExit: e, children: t }) {
3356
3394
  });
3357
3395
  }, [n]), /* @__PURE__ */ U(H, { children: t });
3358
3396
  }
3359
- function Cr({ open: e, onClose: t, title: n, description: r, leftAction: i, rightAction: a, closeButton: o, footer: s, placement: c = "bottom", size: f = "md", detents: h, defaultDetent: _ = 0, className: b, children: S }) {
3360
- let { strings: T } = q(), E = u(), D = u(), O = p(null), k = p(null), A = Ot(), ee = C(), [j, M] = m(_), te = Et(), N = !!Tt().portal, P = N ? "%" : "dvh";
3361
- gr(e, t, O, { lockScroll: !N }), l(() => {
3362
- e && M(_);
3363
- }, [e, _]);
3364
- let F = c === "auto" ? A ? "bottom" : "side" : c, I = F === "bottom", L = h?.length ? h : null, ne = L ? `${Math.round(L[Math.min(j, L.length - 1)] * 100)}${P}` : void 0, R = x(0), re = p(0), ie = p(null), ae = p(!1), oe = p(null), [se, ce] = m(!1), le = w(R, (e) => Math.max(0, e)), ue = w(R, (e) => {
3365
- let t = re.current;
3397
+ function Tr({ open: e, onClose: t, title: n, description: r, leftAction: i, rightAction: a, closeButton: o, dismissible: s = !0, footer: c, placement: f = "bottom", size: h = "md", detents: _, defaultDetent: b = 0, className: S, children: T }) {
3398
+ let { strings: E } = q(), D = u(), O = u(), k = p(null), A = p(null), ee = Ot(), j = C(), [M, te] = m(b), N = Et(), P = !!Tt().portal, F = P ? "%" : "dvh", ne = () => {
3399
+ s && t();
3400
+ };
3401
+ vr(e, ne, k, { lockScroll: !P }), l(() => {
3402
+ e && te(b);
3403
+ }, [e, b]);
3404
+ let re = f === "auto" ? ee ? "bottom" : "side" : f, I = re === "bottom", L = _?.length ? _ : null, ie = L ? `${Math.round(L[Math.min(M, L.length - 1)] * 100)}${F}` : void 0, R = x(0), z = p(0), ae = p(null), oe = p(!1), se = p(null), [ce, le] = m(!1), ue = w(R, (e) => Math.max(0, e)), de = w(R, (e) => {
3405
+ let t = z.current;
3366
3406
  return t ? 1 - Math.min(1, Math.max(0, e / t)) : 0;
3367
- }), z = (e, t, n = 0) => (ie.current?.stop(), ie.current = v(R, e, ee ? { duration: 0 } : {
3407
+ }), B = (e, t, n = 0) => (ae.current?.stop(), ae.current = v(R, e, j ? { duration: 0 } : {
3368
3408
  ...t,
3369
3409
  velocity: n
3370
- }), ie.current), de = p(!1);
3371
- I && e && !de.current && (ae.current = !1, R.jump(br)), de.current = e, d(() => {
3410
+ }), ae.current), fe = p(!1);
3411
+ I && e && !fe.current && (oe.current = !1, R.jump(Sr)), fe.current = e, d(() => {
3372
3412
  if (!e || !I) return;
3373
- let t = O.current;
3413
+ let t = k.current;
3374
3414
  if (!t) return;
3375
- re.current = t.offsetHeight, R.jump(re.current), z(0, K.sheetIn);
3415
+ z.current = t.offsetHeight, R.jump(z.current), B(0, K.sheetIn);
3376
3416
  let n = new ResizeObserver(() => {
3377
- re.current = t.offsetHeight;
3378
- let e = k.current;
3379
- ce(!!(e && e.scrollHeight > e.clientHeight + 1));
3417
+ z.current = t.offsetHeight;
3418
+ let e = A.current;
3419
+ le(!!(e && e.scrollHeight > e.clientHeight + 1));
3380
3420
  });
3381
- return n.observe(t), k.current && n.observe(k.current), () => n.disconnect();
3421
+ return n.observe(t), A.current && n.observe(A.current), () => n.disconnect();
3382
3422
  }, [e, I]);
3383
- let fe = (e) => {
3384
- ae.current = !0, z(re.current, K.sheetOut, Math.max(0, e)).finished.then(() => {
3385
- ae.current && t();
3423
+ let pe = (e) => {
3424
+ oe.current = !0, B(z.current, K.sheetOut, Math.max(0, e)).finished.then(() => {
3425
+ oe.current && t();
3386
3426
  });
3387
- }, pe = (e, t) => {
3388
- I && e.button === 0 && !ae.current && (t && e.target.closest("input, textarea, select, [contenteditable='true'], [data-no-drag]") || (oe.current = {
3427
+ }, me = (e, t) => {
3428
+ I && e.button === 0 && !oe.current && (t && e.target.closest("input, textarea, select, [contenteditable='true'], [data-no-drag]") || (se.current = {
3389
3429
  pointerId: e.pointerId,
3390
3430
  startY: e.clientY,
3391
3431
  fromBody: t,
@@ -3396,44 +3436,44 @@ function Cr({ open: e, onClose: t, title: n, description: r, leftAction: i, righ
3396
3436
  y: e.clientY
3397
3437
  }]
3398
3438
  }));
3399
- }, me = (e) => {
3400
- let t = oe.current;
3439
+ }, he = (e) => {
3440
+ let t = se.current;
3401
3441
  if (!t || t.pointerId !== e.pointerId) return;
3402
3442
  let n = e.clientY - t.startY;
3403
3443
  if (!t.active) {
3404
- if (Math.abs(n) < xr) return;
3405
- let r = k.current;
3406
- if (t.fromBody && se && (n < 0 || (r?.scrollTop ?? 0) > 0)) {
3407
- oe.current = null;
3444
+ if (Math.abs(n) < Cr) return;
3445
+ let r = A.current;
3446
+ if (t.fromBody && ce && (n < 0 || (r?.scrollTop ?? 0) > 0)) {
3447
+ se.current = null;
3408
3448
  return;
3409
3449
  }
3410
- t.active = !0, ie.current?.stop(), e.currentTarget.setPointerCapture(e.pointerId);
3450
+ t.active = !0, ae.current?.stop(), e.currentTarget.setPointerCapture(e.pointerId);
3411
3451
  }
3412
3452
  for (t.dy = n, R.set(Math.max(0, n)), t.samples.push({
3413
3453
  t: e.timeStamp,
3414
3454
  y: e.clientY
3415
3455
  }); t.samples.length > 2 && e.timeStamp - t.samples[0].t > 60;) t.samples.shift();
3416
- }, he = (e) => {
3417
- let t = oe.current;
3418
- if (oe.current = null, !t || !t.active || t.pointerId !== e.pointerId) return;
3419
- let n = t.samples[0], r = t.samples[t.samples.length - 1], i = Math.max(1, r.t - n.t), a = (r.y - n.y) / i * 1e3, o = R.get(), s = re.current || 1, c = a > 500, l = a < -500, u = o > Math.min(s * .25, 160);
3420
- if (L && (l || t.dy < -40) && j < L.length - 1) {
3421
- M((e) => Math.min(e + 1, L.length - 1)), z(0, K.sheetSettle, a);
3456
+ }, ge = (e) => {
3457
+ let t = se.current;
3458
+ if (se.current = null, !t || !t.active || t.pointerId !== e.pointerId) return;
3459
+ let n = t.samples[0], r = t.samples[t.samples.length - 1], i = Math.max(1, r.t - n.t), a = (r.y - n.y) / i * 1e3, o = R.get(), c = z.current || 1, l = a > 500, u = a < -500, d = o > Math.min(c * .25, 160);
3460
+ if (L && (u || t.dy < -40) && M < L.length - 1) {
3461
+ te((e) => Math.min(e + 1, L.length - 1)), B(0, K.sheetSettle, a);
3422
3462
  return;
3423
3463
  }
3424
- if ((c || u) && a > -200) {
3425
- L && j > 0 ? (M((e) => Math.max(e - 1, 0)), z(0, K.sheetSettle, a)) : fe(a);
3464
+ if ((l || d) && a > -200) {
3465
+ L && M > 0 ? (te((e) => Math.max(e - 1, 0)), B(0, K.sheetSettle, a)) : s ? pe(a) : B(0, K.sheetSettle, a);
3426
3466
  return;
3427
3467
  }
3428
- z(0, K.sheetSettle, a);
3429
- }, ge = (e) => I ? {
3430
- onPointerDown: (t) => pe(t, e),
3431
- onPointerMove: me,
3432
- onPointerUp: he,
3433
- onPointerCancel: he
3434
- } : {}, _e = o ?? !I, ve = "flex flex-col overflow-hidden border-line bg-surface-2 outline-none", ye = /* @__PURE__ */ W("div", {
3468
+ B(0, K.sheetSettle, a);
3469
+ }, _e = (e) => I ? {
3470
+ onPointerDown: (t) => me(t, e),
3471
+ onPointerMove: he,
3472
+ onPointerUp: ge,
3473
+ onPointerCancel: ge
3474
+ } : {}, ve = s && (o ?? !I), ye = "flex flex-col overflow-hidden border-line bg-surface-2 outline-none", be = /* @__PURE__ */ W("div", {
3435
3475
  className: G("shrink-0", I && "cursor-grab touch-none select-none active:cursor-grabbing"),
3436
- ...ge(!1),
3476
+ ..._e(!1),
3437
3477
  children: [
3438
3478
  I && /* @__PURE__ */ U("div", {
3439
3479
  className: "flex justify-center pb-1 pt-2.5",
@@ -3452,25 +3492,25 @@ function Cr({ open: e, onClose: t, title: n, description: r, leftAction: i, righ
3452
3492
  /* @__PURE__ */ W("div", {
3453
3493
  className: "min-w-0 flex-1",
3454
3494
  children: [n && /* @__PURE__ */ U("h2", {
3455
- id: E,
3495
+ id: D,
3456
3496
  className: "truncate text-lg font-semibold text-fg",
3457
3497
  children: n
3458
3498
  }), r && /* @__PURE__ */ U("p", {
3459
- id: D,
3499
+ id: O,
3460
3500
  className: "mt-0.5 text-sm text-fg-3",
3461
3501
  children: r
3462
3502
  })]
3463
3503
  }),
3464
3504
  /* @__PURE__ */ W("div", {
3465
3505
  className: "flex shrink-0 items-center gap-1",
3466
- children: [a, /* @__PURE__ */ U(J, {
3467
- label: T.sheetClose,
3506
+ children: [a, s && /* @__PURE__ */ U(J, {
3507
+ label: E.sheetClose,
3468
3508
  shape: "round",
3469
3509
  variant: "secondary",
3470
3510
  size: "sm",
3471
- onClick: t,
3511
+ onClick: ne,
3472
3512
  "data-modal-chrome": !0,
3473
- className: G(!_e && "sr-only focus-visible:not-sr-only"),
3513
+ className: G(!ve && "sr-only focus-visible:not-sr-only"),
3474
3514
  children: /* @__PURE__ */ U(V, { size: 14 })
3475
3515
  })]
3476
3516
  })
@@ -3478,51 +3518,51 @@ function Cr({ open: e, onClose: t, title: n, description: r, leftAction: i, righ
3478
3518
  }),
3479
3519
  /* @__PURE__ */ U("div", { className: "h-px bg-line" })
3480
3520
  ]
3481
- }), be = /* @__PURE__ */ U("div", {
3482
- ref: k,
3483
- ...ge(!0),
3484
- className: G("scrollbar-thin min-h-0 overflow-y-auto overscroll-contain px-5 py-4", L ? "flex-1" : "shrink", I && !se && "touch-none [&_input]:touch-auto [&_textarea]:touch-auto"),
3485
- children: S
3486
- }), B = {
3521
+ }), xe = /* @__PURE__ */ U("div", {
3522
+ ref: A,
3523
+ ..._e(!0),
3524
+ className: G("scrollbar-thin min-h-0 overflow-y-auto overscroll-contain px-5 py-4", L ? "flex-1" : "shrink", I && !ce && "touch-none [&_input]:touch-auto [&_textarea]:touch-auto"),
3525
+ children: T
3526
+ }), Se = {
3487
3527
  role: "dialog",
3488
3528
  "aria-modal": !0,
3489
- "aria-labelledby": n ? E : void 0,
3490
- "aria-describedby": r ? D : void 0,
3529
+ "aria-labelledby": n ? D : void 0,
3530
+ "aria-describedby": r ? O : void 0,
3491
3531
  tabIndex: -1
3492
- }, xe = null;
3493
- if (e && I) xe = /* @__PURE__ */ U(Sr, {
3494
- onExit: () => z(re.current, K.sheetOut).finished,
3532
+ }, Ce = null;
3533
+ if (e && I) Ce = /* @__PURE__ */ U(wr, {
3534
+ onExit: () => B(z.current, K.sheetOut).finished,
3495
3535
  children: /* @__PURE__ */ W("div", {
3496
3536
  className: "fixed inset-0 z-50",
3497
3537
  children: [/* @__PURE__ */ U(y.div, {
3498
3538
  className: "absolute inset-0 bg-black/50",
3499
- style: { opacity: ue },
3500
- onClick: t
3539
+ style: { opacity: de },
3540
+ onClick: ne
3501
3541
  }), /* @__PURE__ */ W(y.div, {
3502
- ref: O,
3503
- ...B,
3542
+ ref: k,
3543
+ ...Se,
3504
3544
  style: {
3505
- y: le,
3506
- height: ne,
3545
+ y: ue,
3546
+ height: ie,
3507
3547
  boxShadow: "var(--shadow-sheet), 0 120px 0 0 var(--color-surface-2)",
3508
3548
  transition: L ? "height 0.4s cubic-bezier(0.32, 0.72, 0, 1)" : void 0
3509
3549
  },
3510
- className: G(ve, "absolute inset-x-0 bottom-0 mx-auto w-full rounded-t-2xl border border-b-0 will-change-transform", "pb-[var(--safe-bottom)]", !L && (N ? "max-h-[85%]" : "max-h-[85dvh]"), yr[f], b),
3550
+ className: G(ye, "absolute inset-x-0 bottom-0 mx-auto w-full rounded-t-2xl border border-b-0 will-change-transform", "pb-[var(--safe-bottom)]", !L && (P ? "max-h-[85%]" : "max-h-[85dvh]"), xr[h], S),
3511
3551
  children: [
3512
- ye,
3513
3552
  be,
3514
- s && /* @__PURE__ */ U("div", {
3553
+ xe,
3554
+ c && /* @__PURE__ */ U("div", {
3515
3555
  className: "shrink-0 border-t border-line px-5 py-3",
3516
- children: s
3556
+ children: c
3517
3557
  })
3518
3558
  ]
3519
3559
  })]
3520
3560
  })
3521
3561
  }, "bottom");
3522
3562
  else if (e) {
3523
- let e = F === "side", n = /* @__PURE__ */ W(y.div, {
3524
- ref: O,
3525
- ...B,
3563
+ let e = re === "side", t = /* @__PURE__ */ W(y.div, {
3564
+ ref: k,
3565
+ ...Se,
3526
3566
  initial: e ? { x: "100%" } : {
3527
3567
  opacity: 0,
3528
3568
  scale: .97,
@@ -3543,17 +3583,17 @@ function Cr({ open: e, onClose: t, title: n, description: r, leftAction: i, righ
3543
3583
  transition: K.instant
3544
3584
  },
3545
3585
  transition: e ? K.sheetIn : K.settle,
3546
- className: G(ve, e ? G("fixed inset-y-0 right-0 z-50 w-full border-l shadow-sheet pb-[var(--safe-bottom)]", _r[f]) : G("relative z-50 w-full rounded-2xl border shadow-raised", N ? "max-h-[85%]" : "max-h-[85dvh]", vr[f]), b),
3586
+ className: G(ye, e ? G("fixed inset-y-0 right-0 z-50 w-full border-l shadow-sheet pb-[var(--safe-bottom)]", yr[h]) : G("relative z-50 w-full rounded-2xl border shadow-raised", P ? "max-h-[85%]" : "max-h-[85dvh]", br[h]), S),
3547
3587
  children: [
3548
- ye,
3549
3588
  be,
3550
- s && /* @__PURE__ */ U("div", {
3589
+ xe,
3590
+ c && /* @__PURE__ */ U("div", {
3551
3591
  className: "shrink-0 border-t border-line px-5 py-3",
3552
- children: s
3592
+ children: c
3553
3593
  })
3554
3594
  ]
3555
3595
  });
3556
- xe = /* @__PURE__ */ W(y.div, {
3596
+ Ce = /* @__PURE__ */ W(y.div, {
3557
3597
  className: "fixed inset-0 z-50",
3558
3598
  children: [/* @__PURE__ */ U(y.div, {
3559
3599
  className: "absolute inset-0 bg-black/50",
@@ -3561,39 +3601,39 @@ function Cr({ open: e, onClose: t, title: n, description: r, leftAction: i, righ
3561
3601
  animate: { opacity: 1 },
3562
3602
  exit: { opacity: 0 },
3563
3603
  transition: K.quick,
3564
- onClick: t
3565
- }), e ? n : /* @__PURE__ */ U("div", {
3604
+ onClick: ne
3605
+ }), e ? t : /* @__PURE__ */ U("div", {
3566
3606
  className: "pointer-events-none absolute inset-0 flex items-center justify-center p-4 [&>*]:pointer-events-auto",
3567
- children: n
3607
+ children: t
3568
3608
  })]
3569
- }, F);
3609
+ }, re);
3570
3610
  }
3571
- return te ? qe(/* @__PURE__ */ U(g, { children: xe }), te) : null;
3611
+ return N ? Fe(/* @__PURE__ */ U(g, { children: Ce }), N) : null;
3572
3612
  }
3573
- var wr = Cr, Tr = null;
3574
- function Er(e) {
3613
+ var Er = Tr, Dr = null;
3614
+ function Or(e) {
3575
3615
  return new Promise((t) => {
3576
- if (!Tr) {
3616
+ if (!Dr) {
3577
3617
  t(!1);
3578
3618
  return;
3579
3619
  }
3580
- Tr({
3620
+ Dr({
3581
3621
  options: e,
3582
3622
  resolve: t
3583
3623
  });
3584
3624
  });
3585
3625
  }
3586
- function Dr() {
3626
+ function kr() {
3587
3627
  let { strings: e } = q(), [t, n] = m(null), [r, i] = m(!1);
3588
- l(() => (Tr = (e) => {
3628
+ l(() => (Dr = (e) => {
3589
3629
  n(e), i(!0);
3590
3630
  }, () => {
3591
- Tr = null;
3631
+ Dr = null;
3592
3632
  }), []);
3593
3633
  let a = (e) => {
3594
3634
  t?.resolve(e), i(!1);
3595
3635
  }, o = t?.options;
3596
- return /* @__PURE__ */ U(Cr, {
3636
+ return /* @__PURE__ */ U(Tr, {
3597
3637
  open: r,
3598
3638
  onClose: () => a(!1),
3599
3639
  size: "sm",
@@ -3636,7 +3676,7 @@ function Dr() {
3636
3676
  }
3637
3677
  //#endregion
3638
3678
  //#region src/components/ContextMenu.tsx
3639
- function Or({ menu: e, longPressDelay: t = 450, onOpenChange: n, disabled: r, className: i, children: a }) {
3679
+ function Ar({ menu: e, longPressDelay: t = 450, onOpenChange: n, disabled: r, className: i, children: a }) {
3640
3680
  let [o, c] = m(null), u = p(null), d = p(null), f = p(null), h = s(() => {
3641
3681
  d.current && window.clearTimeout(d.current), d.current = null;
3642
3682
  }, []);
@@ -3676,7 +3716,7 @@ function Or({ menu: e, longPressDelay: t = 450, onOpenChange: n, disabled: r, cl
3676
3716
  onPointerUp: h,
3677
3717
  onPointerCancel: h,
3678
3718
  children: a
3679
- }), qe(/* @__PURE__ */ U(g, { children: o && /* @__PURE__ */ U(y.div, {
3719
+ }), typeof document < "u" && Fe(/* @__PURE__ */ U(g, { children: o && /* @__PURE__ */ U(y.div, {
3680
3720
  ref: u,
3681
3721
  role: "menu",
3682
3722
  initial: {
@@ -3703,15 +3743,15 @@ function Or({ menu: e, longPressDelay: t = 450, onOpenChange: n, disabled: r, cl
3703
3743
  }
3704
3744
  //#endregion
3705
3745
  //#region src/components/DatePicker.tsx
3706
- function kr(e) {
3746
+ function jr(e) {
3707
3747
  let t = new Date(e);
3708
3748
  return t.setHours(0, 0, 0, 0), t;
3709
3749
  }
3710
- function Ar(e, t) {
3711
- return kr(e).getTime() === kr(t).getTime();
3750
+ function Mr(e, t) {
3751
+ return jr(e).getTime() === jr(t).getTime();
3712
3752
  }
3713
- function jr({ value: e, onChange: t, min: n, max: r, weekStartsOn: i = 1, locale: a, className: o }) {
3714
- let { strings: s, locale: c } = q(), l = a ?? c, [u, d] = m(() => kr(e ?? /* @__PURE__ */ new Date())), p = kr(/* @__PURE__ */ new Date()), { days: h, monthLabel: g, weekdays: _ } = f(() => {
3753
+ function Nr({ value: e, onChange: t, min: n, max: r, weekStartsOn: i = 1, locale: a, className: o }) {
3754
+ let { strings: s, locale: c } = q(), l = a ?? c, [u, d] = m(() => jr(e ?? /* @__PURE__ */ new Date())), p = jr(/* @__PURE__ */ new Date()), { days: h, monthLabel: g, weekdays: _ } = f(() => {
3715
3755
  let e = u.getFullYear(), t = u.getMonth(), n = new Date(e, t, 1), r = (n.getDay() - i + 7) % 7, a = new Date(e, t + 1, 0).getDate(), o = Array.from({ length: r }, () => null);
3716
3756
  for (let n = 1; n <= a; n++) o.push(new Date(e, t, n));
3717
3757
  let s = new Intl.DateTimeFormat(l, { weekday: "narrow" }), c = Array.from({ length: 7 }, (e, t) => s.format(new Date(2024, 0, 7 + (t + i) % 7)));
@@ -3727,7 +3767,7 @@ function jr({ value: e, onChange: t, min: n, max: r, weekStartsOn: i = 1, locale
3727
3767
  u,
3728
3768
  i,
3729
3769
  l
3730
- ]), v = (e) => n && e < kr(n) || r && e > kr(r);
3770
+ ]), v = (e) => n && e < jr(n) || r && e > jr(r);
3731
3771
  return /* @__PURE__ */ W("div", {
3732
3772
  className: G("w-64 select-none [@media(pointer:coarse)]:w-[21rem]", o),
3733
3773
  children: [/* @__PURE__ */ W("div", {
@@ -3762,23 +3802,23 @@ function jr({ value: e, onChange: t, min: n, max: r, weekStartsOn: i = 1, locale
3762
3802
  type: "button",
3763
3803
  disabled: v(n),
3764
3804
  onClick: () => t(n),
3765
- "aria-current": Ar(n, p) ? "date" : void 0,
3766
- "aria-pressed": e ? Ar(n, e) : !1,
3767
- className: G("flex h-8 items-center justify-center rounded-lg text-sm tabular-nums transition-colors [@media(pointer:coarse)]:h-11", e && Ar(n, e) ? "bg-accent font-medium text-on-accent" : Ar(n, p) ? "text-accent hover:bg-fill-2" : "text-fg-2 hover:bg-fill-2 hover:text-fg", v(n) && "pointer-events-none opacity-25"),
3805
+ "aria-current": Mr(n, p) ? "date" : void 0,
3806
+ "aria-pressed": e ? Mr(n, e) : !1,
3807
+ className: G("flex h-8 items-center justify-center rounded-lg text-sm tabular-nums transition-colors [@media(pointer:coarse)]:h-11", e && Mr(n, e) ? "bg-accent font-medium text-on-accent" : Mr(n, p) ? "text-accent hover:bg-fill-2" : "text-fg-2 hover:bg-fill-2 hover:text-fg", v(n) && "pointer-events-none opacity-25"),
3768
3808
  children: n.getDate()
3769
3809
  }, r) : /* @__PURE__ */ U("span", {}, r))]
3770
3810
  })]
3771
3811
  });
3772
3812
  }
3773
- function Mr({ value: e, onChange: t, placeholder: n, withTime: r, disabled: i, id: a, className: o, ...s }) {
3813
+ function Pr({ value: e, onChange: t, placeholder: n, withTime: r, disabled: i, id: a, className: o, ...s }) {
3774
3814
  let { strings: c, locale: l } = q(), u = Y(), [d, f] = m(!1), p = e ? new Intl.DateTimeFormat(s.locale ?? l, {
3775
3815
  dateStyle: "medium",
3776
3816
  ...r ? { timeStyle: "short" } : {}
3777
3817
  }).format(e) : n ?? c.datePickerPlaceholder;
3778
- return /* @__PURE__ */ W(Yn, {
3818
+ return /* @__PURE__ */ W(Zn, {
3779
3819
  open: d,
3780
3820
  onOpenChange: f,
3781
- children: [/* @__PURE__ */ U(Xn, { children: /* @__PURE__ */ W("button", {
3821
+ children: [/* @__PURE__ */ U(Qn, { children: /* @__PURE__ */ W("button", {
3782
3822
  type: "button",
3783
3823
  id: a ?? u?.id,
3784
3824
  disabled: i,
@@ -3791,9 +3831,9 @@ function Mr({ value: e, onChange: t, placeholder: n, withTime: r, disabled: i, i
3791
3831
  className: G("min-w-0 flex-1 truncate", e ? "text-fg" : "text-fg-4"),
3792
3832
  children: p
3793
3833
  })]
3794
- }) }), /* @__PURE__ */ W($n, {
3834
+ }) }), /* @__PURE__ */ W(tr, {
3795
3835
  className: "p-3",
3796
- children: [/* @__PURE__ */ U(jr, {
3836
+ children: [/* @__PURE__ */ U(Nr, {
3797
3837
  value: e,
3798
3838
  onChange: (n) => {
3799
3839
  r && e && n.setHours(e.getHours(), e.getMinutes()), t(n), r || f(!1);
@@ -3817,14 +3857,14 @@ function Mr({ value: e, onChange: t, placeholder: n, withTime: r, disabled: i, i
3817
3857
  }
3818
3858
  //#endregion
3819
3859
  //#region src/components/Dialog.tsx
3820
- var Nr = {
3860
+ var Fr = {
3821
3861
  sm: "max-w-sm",
3822
3862
  md: "max-w-md",
3823
3863
  lg: "max-w-2xl"
3824
3864
  };
3825
- function Pr({ open: e, onClose: t, title: n, description: r, footer: i, size: a = "md", dismissible: o = !0, className: s, children: c }) {
3865
+ function Ir({ open: e, onClose: t, title: n, description: r, footer: i, size: a = "md", dismissible: o = !0, className: s, children: c }) {
3826
3866
  let { strings: l } = q(), d = u(), f = u(), m = p(null);
3827
- return gr(e, t, m), qe(/* @__PURE__ */ U(g, { children: e && /* @__PURE__ */ W("div", {
3867
+ return vr(e, t, m), typeof document > "u" ? null : Fe(/* @__PURE__ */ U(g, { children: e && /* @__PURE__ */ W("div", {
3828
3868
  className: "fixed inset-0 z-50 flex items-end justify-center p-4 sm:items-center",
3829
3869
  children: [/* @__PURE__ */ U(y.div, {
3830
3870
  className: "absolute inset-0 bg-black/50 backdrop-blur-sm",
@@ -3840,7 +3880,7 @@ function Pr({ open: e, onClose: t, title: n, description: r, footer: i, size: a
3840
3880
  "aria-labelledby": n ? d : void 0,
3841
3881
  "aria-describedby": r ? f : void 0,
3842
3882
  tabIndex: -1,
3843
- className: G("relative flex max-h-[85dvh] w-full flex-col overflow-hidden outline-none", "rounded-2xl border border-line bg-surface-2 shadow-raised", Nr[a], s),
3883
+ className: G("relative flex max-h-[85dvh] w-full flex-col overflow-hidden outline-none", "rounded-2xl border border-line bg-surface-2 shadow-raised", Fr[a], s),
3844
3884
  initial: {
3845
3885
  opacity: 0,
3846
3886
  scale: .96,
@@ -3896,7 +3936,7 @@ function Pr({ open: e, onClose: t, title: n, description: r, footer: i, size: a
3896
3936
  }
3897
3937
  //#endregion
3898
3938
  //#region src/components/Diff.tsx
3899
- function Fr(e, t) {
3939
+ function Lr(e, t) {
3900
3940
  let n = e.split("\n"), r = t.split("\n"), i = Array.from({ length: n.length + 1 }, () => Array.from({ length: r.length + 1 }, () => 0));
3901
3941
  for (let e = n.length - 1; e >= 0; e--) for (let t = r.length - 1; t >= 0; t--) i[e][t] = n[e] === r[t] ? i[e + 1][t + 1] + 1 : Math.max(i[e + 1][t], i[e][t + 1]);
3902
3942
  let a = [], o = 0, s = 0;
@@ -3926,13 +3966,13 @@ function Fr(e, t) {
3926
3966
  });
3927
3967
  return a;
3928
3968
  }
3929
- var Ir = {
3969
+ var Rr = {
3930
3970
  same: "text-fg-3",
3931
3971
  add: "bg-accent/10 text-fg",
3932
3972
  remove: "bg-danger/10 text-fg"
3933
3973
  };
3934
- function Lr({ before: e, after: t, beforeLabel: n, afterLabel: r, view: i = "unified", context: a = 3, className: o }) {
3935
- let { strings: s } = q(), c = n ?? s.diffBefore, l = r ?? s.diffAfter, u = f(() => Fr(e, t), [e, t]), d = f(() => {
3974
+ function zr({ before: e, after: t, beforeLabel: n, afterLabel: r, view: i = "unified", context: a = 3, className: o }) {
3975
+ let { strings: s } = q(), c = n ?? s.diffBefore, l = r ?? s.diffAfter, u = f(() => Lr(e, t), [e, t]), d = f(() => {
3936
3976
  if (!a) return u.map((e) => ({
3937
3977
  line: e,
3938
3978
  elided: 0
@@ -3981,7 +4021,7 @@ function Lr({ before: e, after: t, beforeLabel: n, afterLabel: r, view: i = "uni
3981
4021
  className: "border-b border-line px-3 py-1 text-2xs font-medium text-fg-3",
3982
4022
  children: e === "remove" ? c : l
3983
4023
  }), u.map((t, n) => t.op === "same" || t.op === e ? /* @__PURE__ */ U("p", {
3984
- className: G("whitespace-pre px-3 py-0.5 font-mono text-xs", t.op === "same" ? "text-fg-3" : Ir[t.op]),
4024
+ className: G("whitespace-pre px-3 py-0.5 font-mono text-xs", t.op === "same" ? "text-fg-3" : Rr[t.op]),
3985
4025
  children: t.text || " "
3986
4026
  }, n) : /* @__PURE__ */ U("p", {
3987
4027
  "aria-hidden": "true",
@@ -3992,7 +4032,7 @@ function Lr({ before: e, after: t, beforeLabel: n, afterLabel: r, view: i = "uni
3992
4032
  }) : /* @__PURE__ */ U("div", {
3993
4033
  className: "scrollbar-thin overflow-x-auto py-1",
3994
4034
  children: d.map((e, t) => e.line ? /* @__PURE__ */ W("p", {
3995
- className: G("flex gap-3 whitespace-pre px-3 py-0.5 font-mono text-xs", Ir[e.line.op]),
4035
+ className: G("flex gap-3 whitespace-pre px-3 py-0.5 font-mono text-xs", Rr[e.line.op]),
3996
4036
  children: [/* @__PURE__ */ U("span", {
3997
4037
  "aria-hidden": "true",
3998
4038
  className: "w-3 shrink-0 select-none text-fg-4",
@@ -4012,13 +4052,13 @@ function Lr({ before: e, after: t, beforeLabel: n, afterLabel: r, view: i = "uni
4012
4052
  }
4013
4053
  //#endregion
4014
4054
  //#region src/components/Progress.tsx
4015
- var Rr = {
4055
+ var Br = {
4016
4056
  accent: "bg-accent",
4017
4057
  info: "bg-info",
4018
4058
  warning: "bg-warning",
4019
4059
  danger: "bg-danger"
4020
4060
  };
4021
- function zr({ value: e, size: t = "md", tone: n = "accent", label: r, className: i }) {
4061
+ function Vr({ value: e, size: t = "md", tone: n = "accent", label: r, className: i }) {
4022
4062
  let a = e === void 0;
4023
4063
  return /* @__PURE__ */ U("div", {
4024
4064
  role: "progressbar",
@@ -4028,17 +4068,17 @@ function zr({ value: e, size: t = "md", tone: n = "accent", label: r, className:
4028
4068
  "aria-valuenow": a ? void 0 : Math.round(e),
4029
4069
  className: G("relative w-full overflow-hidden rounded-full bg-fill-3", t === "sm" ? "h-1" : "h-1.5", i),
4030
4070
  children: /* @__PURE__ */ U("div", {
4031
- className: G("h-full rounded-full transition-[width] motion-slow ease-out", Rr[n], a && "w-1/3 animate-[indeterminate_1.4s_ease-in-out_infinite]"),
4071
+ className: G("h-full rounded-full transition-[width] motion-slow ease-out", Br[n], a && "w-1/3 animate-[indeterminate_1.4s_ease-in-out_infinite]"),
4032
4072
  style: a ? void 0 : { width: `${Math.max(0, Math.min(100, e))}%` }
4033
4073
  })
4034
4074
  });
4035
4075
  }
4036
4076
  //#endregion
4037
4077
  //#region src/lib/format.ts
4038
- var Br = (e) => /^en(-|$)/i.test(e);
4039
- function Vr(e, t = Date.now(), n = "en") {
4078
+ var Hr = (e) => /^en(-|$)/i.test(e);
4079
+ function Ur(e, t = Date.now(), n = "en") {
4040
4080
  let r = +t - e, i = Math.round(r / 6e4);
4041
- if (Br(n)) {
4081
+ if (Hr(n)) {
4042
4082
  if (i < 1) return "Just now";
4043
4083
  if (i < 60) return `${i} min ago`;
4044
4084
  let e = Math.floor(i / 60);
@@ -4057,8 +4097,8 @@ function Vr(e, t = Date.now(), n = "en") {
4057
4097
  let s = Math.floor(o / 24);
4058
4098
  return s < 7 ? a.format(-s, "day") : s < 30 ? a.format(-Math.floor(s / 7), "week") : s < 365 ? a.format(-Math.floor(s / 30), "month") : a.format(-Math.floor(s / 365), "year");
4059
4099
  }
4060
- function Hr(e, t = "en") {
4061
- if (!Br(t)) return new Intl.NumberFormat(t, { notation: "compact" }).format(e);
4100
+ function Wr(e, t = "en") {
4101
+ if (!Hr(t)) return new Intl.NumberFormat(t, { notation: "compact" }).format(e);
4062
4102
  let n = Math.abs(e);
4063
4103
  if (n < 1e3) return String(e);
4064
4104
  for (let [t, r] of [
@@ -4071,14 +4111,14 @@ function Hr(e, t = "en") {
4071
4111
  }
4072
4112
  return String(e);
4073
4113
  }
4074
- var Ur = [
4114
+ var Gr = [
4075
4115
  "byte",
4076
4116
  "kilobyte",
4077
4117
  "megabyte",
4078
4118
  "gigabyte",
4079
4119
  "terabyte"
4080
4120
  ];
4081
- function Wr(e, t = "en") {
4121
+ function Kr(e, t = "en") {
4082
4122
  let n = [
4083
4123
  "B",
4084
4124
  "KB",
@@ -4087,12 +4127,12 @@ function Wr(e, t = "en") {
4087
4127
  "TB"
4088
4128
  ], r = 0, i = e;
4089
4129
  for (; i >= 1024 && r < n.length - 1;) i /= 1024, r++;
4090
- if (r === 0 && (i = Math.round(i)), Br(t)) return `${r === 0 ? i : i.toFixed(i >= 10 ? 0 : 1)} ${n[r]}`;
4130
+ if (r === 0 && (i = Math.round(i)), Hr(t)) return `${r === 0 ? i : i.toFixed(i >= 10 ? 0 : 1)} ${n[r]}`;
4091
4131
  let a = r === 0 || i >= 10 ? 0 : 1;
4092
4132
  try {
4093
4133
  return new Intl.NumberFormat(t, {
4094
4134
  style: "unit",
4095
- unit: Ur[r],
4135
+ unit: Gr[r],
4096
4136
  unitDisplay: "short",
4097
4137
  maximumFractionDigits: a
4098
4138
  }).format(i);
@@ -4102,7 +4142,7 @@ function Wr(e, t = "en") {
4102
4142
  }
4103
4143
  //#endregion
4104
4144
  //#region src/components/DownloadItem.tsx
4105
- function Gr(e, t, n) {
4145
+ function qr(e, t, n) {
4106
4146
  if (n === void 0 || !Number.isFinite(n)) return "";
4107
4147
  if (n < 60) return e.downloadLeftSeconds(Math.round(n));
4108
4148
  if (n < 3600) return e.downloadLeftMinutes(Math.round(n / 60));
@@ -4112,18 +4152,18 @@ function Gr(e, t, n) {
4112
4152
  }).format(n / 3600);
4113
4153
  return e.downloadLeftHours(r);
4114
4154
  }
4115
- function Kr({ name: e, detail: t, status: n, progress: r, speed: i, eta: a, size: o, error: s, onPause: c, onResume: l, onCancel: u, onRetry: d, className: f }) {
4116
- let { strings: p, locale: m } = q(), h = (e) => e === void 0 ? "" : Wr(e, m), g = r === void 0 ? void 0 : Math.round(r * 100), _ = n === "done", v = n === "failed", y = v ? s ?? p.downloadFailed : _ ? h(o) : n === "queued" ? p.downloadWaiting : n === "verifying" ? p.downloadVerifying : n === "paused" ? `${p.downloadPaused}${o ? ` · ${p.downloadProgress(h((r ?? 0) * o), h(o))}` : ""}` : [
4155
+ function Jr({ name: e, detail: t, status: n, progress: r, speed: i, eta: a, size: o, error: s, onPause: c, onResume: l, onCancel: u, onRetry: d, className: f }) {
4156
+ let { strings: p, locale: m } = q(), h = (e) => e === void 0 ? "" : Kr(e, m), g = r === void 0 ? void 0 : Math.round(r * 100), _ = n === "done", v = n === "failed", y = v ? s ?? p.downloadFailed : _ ? h(o) : n === "queued" ? p.downloadWaiting : n === "verifying" ? p.downloadVerifying : n === "paused" ? `${p.downloadPaused}${o ? ` · ${p.downloadProgress(h((r ?? 0) * o), h(o))}` : ""}` : [
4117
4157
  o ? p.downloadProgress(h((r ?? 0) * o), h(o)) : void 0,
4118
4158
  i ? p.downloadSpeed(h(i)) : void 0,
4119
- Gr(p, m, a)
4159
+ qr(p, m, a)
4120
4160
  ].filter(Boolean).join(" · ");
4121
4161
  return /* @__PURE__ */ W("div", {
4122
4162
  className: G("flex items-center gap-3 rounded-xl border border-line bg-surface-1 p-3", f),
4123
4163
  children: [
4124
4164
  /* @__PURE__ */ U("span", {
4125
4165
  className: G("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border", _ ? "border-accent/30 bg-accent/12 text-accent" : v ? "border-danger/30 bg-danger/12 text-danger" : "border-line bg-fill-2 text-fg-3"),
4126
- children: _ ? /* @__PURE__ */ U(M, { size: 18 }) : v ? /* @__PURE__ */ U(T, { size: 18 }) : n === "verifying" ? /* @__PURE__ */ U(ir, { size: "md" }) : /* @__PURE__ */ U(ae, { size: 18 })
4166
+ children: _ ? /* @__PURE__ */ U(M, { size: 18 }) : v ? /* @__PURE__ */ U(T, { size: 18 }) : n === "verifying" ? /* @__PURE__ */ U(or, { size: "md" }) : /* @__PURE__ */ U(z, { size: 18 })
4127
4167
  }),
4128
4168
  /* @__PURE__ */ W("div", {
4129
4169
  className: "min-w-0 flex-1 space-y-1.5",
@@ -4142,7 +4182,7 @@ function Kr({ name: e, detail: t, status: n, progress: r, speed: i, eta: a, size
4142
4182
  className: "truncate text-sm text-fg-3",
4143
4183
  children: t
4144
4184
  }),
4145
- !_ && !v && /* @__PURE__ */ U(zr, {
4185
+ !_ && !v && /* @__PURE__ */ U(Vr, {
4146
4186
  value: n === "queued" || n === "verifying" ? void 0 : g,
4147
4187
  size: "sm"
4148
4188
  }),
@@ -4159,19 +4199,19 @@ function Kr({ name: e, detail: t, status: n, progress: r, speed: i, eta: a, size
4159
4199
  label: p.downloadPause(e),
4160
4200
  size: "sm",
4161
4201
  onClick: c,
4162
- children: /* @__PURE__ */ U(_e, { size: 16 })
4202
+ children: /* @__PURE__ */ U(ge, { size: 16 })
4163
4203
  }),
4164
4204
  n === "paused" && l && /* @__PURE__ */ U(J, {
4165
4205
  label: p.downloadResume(e),
4166
4206
  size: "sm",
4167
4207
  onClick: l,
4168
- children: /* @__PURE__ */ U(be, { size: 16 })
4208
+ children: /* @__PURE__ */ U(ye, { size: 16 })
4169
4209
  }),
4170
4210
  v && d && /* @__PURE__ */ U(J, {
4171
4211
  label: p.downloadRetry(e),
4172
4212
  size: "sm",
4173
4213
  onClick: d,
4174
- children: /* @__PURE__ */ U(ae, { size: 16 })
4214
+ children: /* @__PURE__ */ U(z, { size: 16 })
4175
4215
  }),
4176
4216
  !_ && u && /* @__PURE__ */ U(J, {
4177
4217
  label: p.downloadCancel(e),
@@ -4186,7 +4226,7 @@ function Kr({ name: e, detail: t, status: n, progress: r, speed: i, eta: a, size
4186
4226
  }
4187
4227
  //#endregion
4188
4228
  //#region src/components/Dropzone.tsx
4189
- function qr({ onFiles: e, accept: t, multiple: n, maxSize: r, onReject: i, disabled: a, children: o, hint: s, className: c }) {
4229
+ function Yr({ onFiles: e, accept: t, multiple: n, maxSize: r, onReject: i, disabled: a, children: o, hint: s, className: c }) {
4190
4230
  let { strings: l } = q(), u = Y(), d = p(null), [f, h] = m(!1), g = (e) => !t || t.split(",").some((t) => {
4191
4231
  let n = t.trim();
4192
4232
  return n.endsWith("/*") ? e.type.startsWith(n.slice(0, -1)) : n.startsWith(".") ? e.name.toLowerCase().endsWith(n.toLowerCase()) : e.type === n;
@@ -4235,7 +4275,7 @@ function qr({ onFiles: e, accept: t, multiple: n, maxSize: r, onReject: i, disab
4235
4275
  }
4236
4276
  //#endregion
4237
4277
  //#region src/components/EmptyState.tsx
4238
- function Jr({ icon: e, title: t, description: n, action: r, size: i = "md", className: a }) {
4278
+ function Xr({ icon: e, title: t, description: n, action: r, size: i = "md", className: a }) {
4239
4279
  return /* @__PURE__ */ W("div", {
4240
4280
  className: G("flex flex-col items-center text-center", i === "md" ? "px-6 py-14" : "px-4 py-8", a),
4241
4281
  children: [
@@ -4258,7 +4298,7 @@ function Jr({ icon: e, title: t, description: n, action: r, size: i = "md", clas
4258
4298
  ]
4259
4299
  });
4260
4300
  }
4261
- function Yr({ title: e, description: t, onRetry: n, retryLabel: r, size: i = "md", className: a }) {
4301
+ function Zr({ title: e, description: t, onRetry: n, retryLabel: r, size: i = "md", className: a }) {
4262
4302
  let { strings: o } = q(), s = e ?? o.errorStateTitle;
4263
4303
  return /* @__PURE__ */ W("div", {
4264
4304
  className: G("flex flex-col items-center text-center", i === "md" ? "px-6 py-14" : "px-4 py-8", a),
@@ -4287,8 +4327,8 @@ function Yr({ title: e, description: t, onRetry: n, retryLabel: r, size: i = "md
4287
4327
  }
4288
4328
  //#endregion
4289
4329
  //#region src/components/FilterBar.tsx
4290
- var Xr = 28;
4291
- function Zr({ options: e, value: t, onChange: n, className: r, ...i }) {
4330
+ var Qr = 28;
4331
+ function $r({ options: e, value: t, onChange: n, className: r, ...i }) {
4292
4332
  let a = p(null), [o, s] = m({
4293
4333
  start: !1,
4294
4334
  end: !1
@@ -4309,7 +4349,7 @@ function Zr({ options: e, value: t, onChange: n, className: r, ...i }) {
4309
4349
  e.removeEventListener("scroll", t), n.disconnect();
4310
4350
  };
4311
4351
  }, [e.length]);
4312
- let c = o.start && o.end ? `linear-gradient(to right, transparent, black ${Xr}px, black calc(100% - ${Xr}px), transparent)` : o.end ? `linear-gradient(to right, black calc(100% - ${Xr}px), transparent)` : o.start ? `linear-gradient(to right, transparent, black ${Xr}px)` : void 0;
4352
+ let c = o.start && o.end ? `linear-gradient(to right, transparent, black ${Qr}px, black calc(100% - ${Qr}px), transparent)` : o.end ? `linear-gradient(to right, black calc(100% - ${Qr}px), transparent)` : o.start ? `linear-gradient(to right, transparent, black ${Qr}px)` : void 0;
4313
4353
  return /* @__PURE__ */ U("div", {
4314
4354
  ref: a,
4315
4355
  role: "radiogroup",
@@ -4321,7 +4361,7 @@ function Zr({ options: e, value: t, onChange: n, className: r, ...i }) {
4321
4361
  } : void 0,
4322
4362
  children: e.map((e) => {
4323
4363
  let r = e.value === t;
4324
- return /* @__PURE__ */ W(zn, {
4364
+ return /* @__PURE__ */ W(Vn, {
4325
4365
  role: "radio",
4326
4366
  "aria-checked": r,
4327
4367
  selected: r,
@@ -4338,13 +4378,13 @@ function Zr({ options: e, value: t, onChange: n, className: r, ...i }) {
4338
4378
  }
4339
4379
  //#endregion
4340
4380
  //#region src/components/Form.tsx
4341
- var Qr = r(null);
4342
- function $r() {
4343
- let e = c(Qr);
4381
+ var ei = r(null);
4382
+ function ti() {
4383
+ let e = c(ei);
4344
4384
  if (!e) throw Error("useForm must be used inside <Form>");
4345
4385
  return e;
4346
4386
  }
4347
- function ei({ initial: e, onSubmit: t, validate: n, guardUnload: r = !0, children: i, className: a }) {
4387
+ function ni({ initial: e, onSubmit: t, validate: n, guardUnload: r = !0, children: i, className: a }) {
4348
4388
  let [o, c] = m(e), [u, d] = m({}), [h, g] = m(!1), _ = p(e), v = f(() => JSON.stringify(o) !== JSON.stringify(_.current), [o]);
4349
4389
  l(() => {
4350
4390
  if (!r || !v) return;
@@ -4388,7 +4428,7 @@ function ei({ initial: e, onSubmit: t, validate: n, guardUnload: r = !0, childre
4388
4428
  patch: b,
4389
4429
  reset: x
4390
4430
  };
4391
- return /* @__PURE__ */ U(Qr.Provider, {
4431
+ return /* @__PURE__ */ U(ei.Provider, {
4392
4432
  value: C,
4393
4433
  children: /* @__PURE__ */ U("form", {
4394
4434
  onSubmit: S,
@@ -4398,8 +4438,8 @@ function ei({ initial: e, onSubmit: t, validate: n, guardUnload: r = !0, childre
4398
4438
  })
4399
4439
  });
4400
4440
  }
4401
- function ti({ submitLabel: e, cancelLabel: t, onCancel: n, sticky: r, children: i }) {
4402
- let { strings: a } = q(), { dirty: o, submitting: s, reset: c } = $r();
4441
+ function ri({ submitLabel: e, cancelLabel: t, onCancel: n, sticky: r, children: i }) {
4442
+ let { strings: a } = q(), { dirty: o, submitting: s, reset: c } = ti();
4403
4443
  return /* @__PURE__ */ W("div", {
4404
4444
  className: G("flex items-center gap-2 border-t border-line pt-4", r && "sticky bottom-0 -mx-4 mt-0 bg-surface/90 px-4 pb-[calc(var(--safe-bottom)+12px)] backdrop-blur-md"),
4405
4445
  children: [
@@ -4428,9 +4468,9 @@ function ti({ submitLabel: e, cancelLabel: t, onCancel: n, sticky: r, children:
4428
4468
  ]
4429
4469
  });
4430
4470
  }
4431
- function ni(e) {
4471
+ function ii(e) {
4432
4472
  let { strings: t } = q();
4433
- return s(async () => !e || Er({
4473
+ return s(async () => !e || Or({
4434
4474
  title: t.formDiscardTitle,
4435
4475
  message: t.formDiscardMessage,
4436
4476
  confirmLabel: t.formDiscardConfirm,
@@ -4440,7 +4480,7 @@ function ni(e) {
4440
4480
  }
4441
4481
  //#endregion
4442
4482
  //#region src/components/HoverCard.tsx
4443
- function ri({ content: e, openDelay: t = 400, closeDelay: r = 150, side: i = "top", children: a }) {
4483
+ function ai({ content: e, openDelay: t = 400, closeDelay: r = 150, side: i = "top", children: a }) {
4444
4484
  let [o, s] = m(!1), c = p(null);
4445
4485
  l(() => () => {
4446
4486
  c.current && window.clearTimeout(c.current);
@@ -4455,10 +4495,10 @@ function ri({ content: e, openDelay: t = 400, closeDelay: r = 150, side: i = "to
4455
4495
  d.onPointerLeave?.(e), u(!1);
4456
4496
  }
4457
4497
  });
4458
- return /* @__PURE__ */ W(Yn, {
4498
+ return /* @__PURE__ */ W(Zn, {
4459
4499
  open: o,
4460
4500
  onOpenChange: s,
4461
- children: [/* @__PURE__ */ U(Zn, { children: f }), /* @__PURE__ */ U($n, {
4501
+ children: [/* @__PURE__ */ U($n, { children: f }), /* @__PURE__ */ U(tr, {
4462
4502
  side: i,
4463
4503
  align: "center",
4464
4504
  className: "w-72 p-0",
@@ -4472,15 +4512,15 @@ function ri({ content: e, openDelay: t = 400, closeDelay: r = 150, side: i = "to
4472
4512
  }
4473
4513
  //#endregion
4474
4514
  //#region src/components/Icon.tsx
4475
- var ii = {
4515
+ var oi = {
4476
4516
  sm: 14,
4477
4517
  md: 16,
4478
4518
  lg: 18,
4479
4519
  xl: 22
4480
4520
  };
4481
- function ai({ as: e, size: t = "md", label: n, strokeWidth: r = 2, className: a }) {
4521
+ function si({ as: e, size: t = "md", label: n, strokeWidth: r = 2, className: a }) {
4482
4522
  return i(e, {
4483
- size: ii[t],
4523
+ size: oi[t],
4484
4524
  strokeWidth: r,
4485
4525
  "aria-hidden": !n || void 0,
4486
4526
  ...n ? {
@@ -4492,7 +4532,7 @@ function ai({ as: e, size: t = "md", label: n, strokeWidth: r = 2, className: a
4492
4532
  }
4493
4533
  //#endregion
4494
4534
  //#region src/components/ImageViewer.tsx
4495
- function oi({ images: e, index: t, onIndexChange: n }) {
4535
+ function ci({ images: e, index: t, onIndexChange: n }) {
4496
4536
  let { strings: r } = q(), [i, a] = m(1), o = t !== null, c = o ? e[t] : null, u = p(null), d = s((r) => {
4497
4537
  t !== null && (n(Math.min(e.length - 1, Math.max(0, t + r))), a(1));
4498
4538
  }, [
@@ -4517,7 +4557,7 @@ function oi({ images: e, index: t, onIndexChange: n }) {
4517
4557
  d
4518
4558
  ]), l(() => {
4519
4559
  o || a(1);
4520
- }, [o]), qe(/* @__PURE__ */ U(g, { children: o && c && /* @__PURE__ */ W(y.div, {
4560
+ }, [o]), typeof document > "u" ? null : Fe(/* @__PURE__ */ U(g, { children: o && c && /* @__PURE__ */ W(y.div, {
4521
4561
  role: "dialog",
4522
4562
  "aria-modal": "true",
4523
4563
  "aria-label": c.alt,
@@ -4609,7 +4649,7 @@ function oi({ images: e, index: t, onIndexChange: n }) {
4609
4649
  }
4610
4650
  //#endregion
4611
4651
  //#region src/components/InfiniteScroll.tsx
4612
- function si({ onLoadMore: e, disabled: t = !1, loading: n = !1, endMessage: r, rootMargin: i = "600px", className: a }) {
4652
+ function li({ onLoadMore: e, disabled: t = !1, loading: n = !1, endMessage: r, rootMargin: i = "600px", className: a }) {
4613
4653
  let { strings: o } = q(), s = p(null), c = p(e);
4614
4654
  return c.current = e, l(() => {
4615
4655
  let e = s.current;
@@ -4626,7 +4666,7 @@ function si({ onLoadMore: e, disabled: t = !1, loading: n = !1, endMessage: r, r
4626
4666
  className: "h-px w-px",
4627
4667
  "aria-hidden": "true"
4628
4668
  }),
4629
- n && /* @__PURE__ */ U(ir, { label: o.infiniteScrollLoading }),
4669
+ n && /* @__PURE__ */ U(or, { label: o.infiniteScrollLoading }),
4630
4670
  !n && t && r && /* @__PURE__ */ U("p", {
4631
4671
  className: "text-sm text-fg-3",
4632
4672
  children: r
@@ -4636,7 +4676,7 @@ function si({ onLoadMore: e, disabled: t = !1, loading: n = !1, endMessage: r, r
4636
4676
  }
4637
4677
  //#endregion
4638
4678
  //#region src/components/List.tsx
4639
- function ci({ label: e, className: t, children: n, ...r }) {
4679
+ function ui({ label: e, className: t, children: n, ...r }) {
4640
4680
  return /* @__PURE__ */ W("section", {
4641
4681
  className: G("space-y-2", t),
4642
4682
  ...r,
@@ -4649,7 +4689,7 @@ function ci({ label: e, className: t, children: n, ...r }) {
4649
4689
  })]
4650
4690
  });
4651
4691
  }
4652
- var li = {
4692
+ var di = {
4653
4693
  neutral: "border-line text-fg-3",
4654
4694
  accent: "border-line text-accent",
4655
4695
  danger: "border-line text-danger",
@@ -4657,10 +4697,10 @@ var li = {
4657
4697
  info: "border-line text-info",
4658
4698
  secondary: "border-line text-secondary"
4659
4699
  };
4660
- function ui({ icon: e, tone: t = "neutral", title: n, description: r, trailing: i, chevron: a }) {
4700
+ function fi({ icon: e, tone: t = "neutral", title: n, description: r, trailing: i, chevron: a }) {
4661
4701
  return /* @__PURE__ */ W(H, { children: [
4662
4702
  e && /* @__PURE__ */ U("span", {
4663
- className: G("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border", li[t]),
4703
+ className: G("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border", di[t]),
4664
4704
  children: e
4665
4705
  }),
4666
4706
  /* @__PURE__ */ W("span", {
@@ -4683,12 +4723,12 @@ function ui({ icon: e, tone: t = "neutral", title: n, description: r, trailing:
4683
4723
  })
4684
4724
  ] });
4685
4725
  }
4686
- var di = "group row-py flex w-full items-center gap-3 px-4 text-left";
4687
- function fi({ icon: e, tone: t, title: n, description: r, trailing: i, chevron: a, className: o, ...s }) {
4726
+ var pi = "group row-py flex w-full items-center gap-3 px-4 text-left";
4727
+ function mi({ icon: e, tone: t, title: n, description: r, trailing: i, chevron: a, className: o, ...s }) {
4688
4728
  return /* @__PURE__ */ U("div", {
4689
- className: G(di, o),
4729
+ className: G(pi, o),
4690
4730
  ...s,
4691
- children: /* @__PURE__ */ U(ui, {
4731
+ children: /* @__PURE__ */ U(fi, {
4692
4732
  icon: e,
4693
4733
  tone: t,
4694
4734
  title: n,
@@ -4698,15 +4738,15 @@ function fi({ icon: e, tone: t, title: n, description: r, trailing: i, chevron:
4698
4738
  })
4699
4739
  });
4700
4740
  }
4701
- var pi = a(function({ icon: e, tone: t, title: n, description: r, trailing: i, chevron: a = !0, className: o, type: s = "button", ...c }, l) {
4741
+ var hi = a(function({ icon: e, tone: t, title: n, description: r, trailing: i, chevron: a = !0, className: o, type: s = "button", ...c }, l) {
4702
4742
  return /* @__PURE__ */ U(y.button, {
4703
4743
  ref: l,
4704
4744
  type: s,
4705
4745
  whileTap: { scale: .995 },
4706
4746
  transition: K.instant,
4707
- className: G(di, "touch-target transition-colors motion-instant hover:bg-fill-2 disabled:pointer-events-none disabled:opacity-40", o),
4747
+ className: G(pi, "touch-target transition-colors motion-instant hover:bg-fill-2 disabled:pointer-events-none disabled:opacity-40", o),
4708
4748
  ...c,
4709
- children: /* @__PURE__ */ U(ui, {
4749
+ children: /* @__PURE__ */ U(fi, {
4710
4750
  icon: e,
4711
4751
  tone: t,
4712
4752
  title: n,
@@ -4716,10 +4756,10 @@ var pi = a(function({ icon: e, tone: t, title: n, description: r, trailing: i, c
4716
4756
  })
4717
4757
  });
4718
4758
  });
4719
- pi.displayName = "ListRowButton";
4759
+ hi.displayName = "ListRowButton";
4720
4760
  //#endregion
4721
4761
  //#region src/components/Masonry.tsx
4722
- function mi({ children: t, minColumnWidth: n = 180, maxColumns: r = 6, gap: i = 8, className: a }) {
4762
+ function gi({ children: t, minColumnWidth: n = 180, maxColumns: r = 6, gap: i = 8, className: a }) {
4723
4763
  let o = p(null), [s, c] = m(0);
4724
4764
  l(() => {
4725
4765
  let e = o.current;
@@ -4746,14 +4786,14 @@ function mi({ children: t, minColumnWidth: n = 180, maxColumns: r = 6, gap: i =
4746
4786
  }
4747
4787
  //#endregion
4748
4788
  //#region src/components/MediaCard.tsx
4749
- var hi = {
4789
+ var _i = {
4750
4790
  accent: "bg-accent",
4751
4791
  info: "bg-info",
4752
4792
  warning: "bg-warning",
4753
4793
  secondary: "bg-secondary",
4754
4794
  neutral: "bg-fg-3"
4755
- }, gi = a(function({ title: e, description: t, image: n, kind: r, tone: i = "neutral", tag: a, meta: o, selected: s, className: c, type: l = "button", ...u }, d) {
4756
- let [f, p] = m(!1), h = Sn(e), g = !!n && !f;
4795
+ }, vi = a(function({ title: e, description: t, image: n, kind: r, tone: i = "neutral", tag: a, meta: o, selected: s, className: c, type: l = "button", ...u }, d) {
4796
+ let [f, p] = m(!1), h = wn(e), g = !!n && !f;
4757
4797
  return /* @__PURE__ */ W(y.button, {
4758
4798
  ref: d,
4759
4799
  type: l,
@@ -4782,7 +4822,7 @@ var hi = {
4782
4822
  }),
4783
4823
  r && /* @__PURE__ */ W("span", {
4784
4824
  className: "absolute left-2.5 top-2.5 z-10 inline-flex items-center gap-1.5 rounded-full border border-white/12 bg-black/55 px-2 py-1 text-2xs font-medium text-white/90 backdrop-blur-md",
4785
- children: [/* @__PURE__ */ U("span", { className: G("h-1.5 w-1.5 rounded-full", hi[i]) }), r]
4825
+ children: [/* @__PURE__ */ U("span", { className: G("h-1.5 w-1.5 rounded-full", _i[i]) }), r]
4786
4826
  }),
4787
4827
  o && /* @__PURE__ */ U("span", {
4788
4828
  className: "absolute right-2.5 top-2.5 z-10 rounded-full border border-white/12 bg-black/55 px-2 py-1 text-2xs font-medium tabular-nums text-white/90 backdrop-blur-md",
@@ -4807,8 +4847,8 @@ var hi = {
4807
4847
  ]
4808
4848
  });
4809
4849
  });
4810
- gi.displayName = "MediaCard";
4811
- function _i() {
4850
+ vi.displayName = "MediaCard";
4851
+ function yi() {
4812
4852
  return /* @__PURE__ */ W("div", {
4813
4853
  className: "relative aspect-3/4 w-full overflow-hidden rounded-2xl border border-line",
4814
4854
  children: [/* @__PURE__ */ U($, {
@@ -4828,7 +4868,7 @@ function _i() {
4828
4868
  }
4829
4869
  //#endregion
4830
4870
  //#region src/components/MediaTile.tsx
4831
- var vi = a(function({ src: e, alt: t, kind: n, variantCount: r, selected: i, aspect: a = "square", className: o, type: s = "button", ...c }, l) {
4871
+ var bi = a(function({ src: e, alt: t, kind: n, variantCount: r, selected: i, aspect: a = "square", className: o, type: s = "button", ...c }, l) {
4832
4872
  let [u, d] = m(!1);
4833
4873
  return /* @__PURE__ */ W(y.button, {
4834
4874
  ref: l,
@@ -4862,8 +4902,8 @@ var vi = a(function({ src: e, alt: t, kind: n, variantCount: r, selected: i, asp
4862
4902
  ]
4863
4903
  });
4864
4904
  });
4865
- vi.displayName = "MediaTile";
4866
- function yi({ aspect: e = "square" }) {
4905
+ bi.displayName = "MediaTile";
4906
+ function xi({ aspect: e = "square" }) {
4867
4907
  return /* @__PURE__ */ U($, {
4868
4908
  shape: "block",
4869
4909
  className: G("w-full rounded-xl", e === "square" ? "aspect-square" : "aspect-3/4")
@@ -4871,32 +4911,32 @@ function yi({ aspect: e = "square" }) {
4871
4911
  }
4872
4912
  //#endregion
4873
4913
  //#region src/components/Message.tsx
4874
- var bi = {
4914
+ var Si = {
4875
4915
  small: "text-sm",
4876
4916
  medium: "text-base",
4877
4917
  large: "text-lg",
4878
4918
  xlarge: "text-xl"
4879
- }, xi = {
4919
+ }, Ci = {
4880
4920
  tight: "leading-snug",
4881
4921
  normal: "leading-normal",
4882
4922
  relaxed: "leading-relaxed"
4883
- }, Si = {
4923
+ }, wi = {
4884
4924
  sharp: "rounded-md",
4885
4925
  rounded: "rounded-xl",
4886
4926
  pill: "rounded-2xl"
4887
- }, Ci = {
4927
+ }, Ti = {
4888
4928
  compact: "max-w-[min(calc(100%-3rem),30rem)]",
4889
4929
  normal: "max-w-[min(calc(100%-1.5rem),36rem)]",
4890
4930
  wide: "max-w-[min(100%,44rem)]"
4891
- }, wi = {
4931
+ }, Ei = {
4892
4932
  compact: "px-3 py-2",
4893
4933
  normal: "px-4 py-2.5",
4894
4934
  spacious: "px-5 py-3.5"
4895
- }, Ti = {
4935
+ }, Di = {
4896
4936
  small: "xs",
4897
4937
  medium: "sm",
4898
4938
  large: "md"
4899
- }, Ei = {
4939
+ }, Oi = {
4900
4940
  fontSize: "medium",
4901
4941
  lineSpacing: "relaxed",
4902
4942
  radius: "rounded",
@@ -4907,11 +4947,11 @@ var bi = {
4907
4947
  avatarSize: "medium",
4908
4948
  headerPlacement: "below"
4909
4949
  };
4910
- function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle", reasoning: a, attachments: o, variants: s, group: c = "only", pinned: l, held: u, menu: d, menuTitle: f, onMenu: p, appearance: h, className: g }) {
4950
+ function ki({ role: e, children: t, author: n, timestamp: r, state: i = "idle", reasoning: a, attachments: o, variants: s, group: c = "only", pinned: l, held: u, menu: d, menuTitle: f, onMenu: p, appearance: h, className: g }) {
4911
4951
  let { strings: _ } = q(), v = {
4912
- ...Ei,
4952
+ ...Oi,
4913
4953
  ...h
4914
- }, b = e === "user", { hasBackground: x, tone: S } = Tn(), C = c === "only" || c === "start", w = c === "only" || c === (v.headerPlacement === "below" ? "end" : "start"), [T, E] = m(!1), D = u || T, O = p ?? (d ? () => E(!0) : void 0), k = fr(O, { enabled: !!O }), A = !!(s && s.total > 1), ee = (e, t) => {
4954
+ }, b = e === "user", { hasBackground: x, tone: S } = Dn(), C = c === "only" || c === "start", w = c === "only" || c === (v.headerPlacement === "below" ? "end" : "start"), [T, E] = m(!1), D = u || T, O = p ?? (d ? () => E(!0) : void 0), k = mr(O, { enabled: !!O }), A = !!(s && s.total > 1), ee = (e, t) => {
4915
4955
  if (!s) return;
4916
4956
  let n = Math.abs(t.offset.x) > 40, r = Math.abs(t.velocity.x) > 320;
4917
4957
  (n || r) && (t.offset.x < 0 ? s.index < s.total - 1 && s.onNext() : s.index > 0 && s.onPrev());
@@ -4929,7 +4969,7 @@ function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle",
4929
4969
  l && /* @__PURE__ */ W("span", {
4930
4970
  className: "inline-flex shrink-0 items-center gap-1 text-2xs text-info",
4931
4971
  "aria-label": _.messagePinned,
4932
- children: [/* @__PURE__ */ U(ve, { size: 12 }), _.messagePinned]
4972
+ children: [/* @__PURE__ */ U(_e, { size: 12 }), _.messagePinned]
4933
4973
  })
4934
4974
  ]
4935
4975
  }), F = /* @__PURE__ */ W(y.div, {
@@ -4956,7 +4996,7 @@ function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle",
4956
4996
  whileDrag: { cursor: "grabbing" },
4957
4997
  onDragEnd: ee
4958
4998
  } : {},
4959
- className: G("relative min-w-0", bi[v.fontSize], xi[v.lineSpacing], j ? G("w-fit text-fg-2", Ci[v.maxWidth], v.style !== "minimal" && wi[v.padding], e === "system" && "text-sm leading-normal", e === "system" && v.style !== "minimal" && "px-3 py-2", v.style !== "minimal" && Si[v.radius], x && v.style !== "minimal" && "backdrop-blur-md", v.style === "filled" && (x ? S === "light" ? "border border-black/10 bg-white/45" : "border border-white/10 bg-black/45" : "border border-line bg-fill"), v.style === "bordered" && "border border-line-2") : G("w-fit", Ci[v.maxWidth], v.style !== "minimal" && wi[v.padding], v.style !== "minimal" && Si[v.radius], v.style === "minimal" && "text-fg", v.style === "filled" && (b ? "bg-accent/22 text-fg" : "bg-fill-2 text-fg"), x && v.style !== "minimal" && "backdrop-blur-md", x && v.style === "filled" && S === "dark" && (b ? "bg-accent/35" : "border border-white/10 bg-black/35"), x && v.style === "filled" && S === "light" && (b ? "bg-accent/40" : "border border-black/10 bg-white/55"), v.style === "bordered" && (b ? "border border-accent/40 text-fg" : "border border-line-2 text-fg"), b && "ml-auto"), A && "pb-6", D && "ring-2 ring-accent/50"),
4999
+ className: G("relative min-w-0", Si[v.fontSize], Ci[v.lineSpacing], j ? G("w-fit text-fg-2", Ti[v.maxWidth], v.style !== "minimal" && Ei[v.padding], e === "system" && "text-sm leading-normal", e === "system" && v.style !== "minimal" && "px-3 py-2", v.style !== "minimal" && wi[v.radius], x && v.style !== "minimal" && "backdrop-blur-md", v.style === "filled" && (x ? S === "light" ? "border border-black/10 bg-white/45" : "border border-white/10 bg-black/45" : "border border-line bg-fill"), v.style === "bordered" && "border border-line-2") : G("w-fit", Ti[v.maxWidth], v.style !== "minimal" && Ei[v.padding], v.style !== "minimal" && wi[v.radius], v.style === "minimal" && "text-fg", v.style === "filled" && (b ? "bg-accent/22 text-fg" : "bg-fill-2 text-fg"), x && v.style !== "minimal" && "backdrop-blur-md", x && v.style === "filled" && S === "dark" && (b ? "bg-accent/35" : "border border-white/10 bg-black/35"), x && v.style === "filled" && S === "light" && (b ? "bg-accent/40" : "border border-black/10 bg-white/55"), v.style === "bordered" && (b ? "border border-accent/40 text-fg" : "border border-line-2 text-fg"), b && "ml-auto"), A && "pb-6", D && "ring-2 ring-accent/50"),
4960
5000
  children: [
4961
5001
  v.headerPlacement === "inside" && P && /* @__PURE__ */ U("div", {
4962
5002
  className: "mb-1.5",
@@ -4966,7 +5006,7 @@ function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle",
4966
5006
  className: "mb-2",
4967
5007
  children: o
4968
5008
  }),
4969
- i === "typing" ? /* @__PURE__ */ U(ki, {}) : t,
5009
+ i === "typing" ? /* @__PURE__ */ U(ji, {}) : t,
4970
5010
  i === "streaming" && /* @__PURE__ */ U("span", {
4971
5011
  "aria-hidden": "true",
4972
5012
  className: "ml-0.5 inline-block h-[1em] w-[2px] translate-y-[0.15em] animate-pulse bg-accent"
@@ -4981,18 +5021,18 @@ function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle",
4981
5021
  ]
4982
5022
  })
4983
5023
  ]
4984
- }), I = /* @__PURE__ */ W("div", {
5024
+ }), ne = /* @__PURE__ */ W("div", {
4985
5025
  ...O ? k.handlers : {},
4986
5026
  className: G("group/message flex w-full gap-2", c === "start" || c === "only" ? "mt-5 first:mt-0" : "mt-1", b ? "flex-row-reverse" : "flex-row", g),
4987
- children: [te ? /* @__PURE__ */ U(Jt, {
5027
+ children: [te ? /* @__PURE__ */ U(Xt, {
4988
5028
  name: n.name,
4989
5029
  src: n.avatar,
4990
- size: Ti[v.avatarSize],
5030
+ size: Di[v.avatarSize],
4991
5031
  className: G("mt-0.5", v.avatar === "rounded" && "rounded-lg")
4992
5032
  }) : j && v.avatar !== "hidden" && C ? /* @__PURE__ */ U("span", {
4993
5033
  "aria-hidden": "true",
4994
5034
  className: G("mt-0.5 flex shrink-0 items-center justify-center border border-line bg-fill text-fg-3", v.avatar === "rounded" ? "rounded-lg" : "rounded-full", v.avatarSize === "small" ? "h-6 w-6" : v.avatarSize === "large" ? "h-10 w-10" : "h-8 w-8"),
4995
- children: U(e === "scene" ? L : z, { size: 14 })
5035
+ children: U(e === "scene" ? re : ue, { size: 14 })
4996
5036
  }) : v.avatar !== "hidden" && /* @__PURE__ */ U("span", {
4997
5037
  className: G("shrink-0", v.avatarSize === "small" ? "w-6" : v.avatarSize === "large" ? "w-10" : "w-8"),
4998
5038
  "aria-hidden": "true"
@@ -5000,7 +5040,7 @@ function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle",
5000
5040
  className: G("flex min-w-0 flex-1 flex-col gap-0.5", b && "items-end"),
5001
5041
  children: [
5002
5042
  v.headerPlacement === "outside" && P,
5003
- a && /* @__PURE__ */ U(Oi, {
5043
+ a && /* @__PURE__ */ U(Ai, {
5004
5044
  label: a.label,
5005
5045
  align: b ? "end" : "start",
5006
5046
  children: a.text
@@ -5017,13 +5057,13 @@ function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle",
5017
5057
  }), l && /* @__PURE__ */ W("span", {
5018
5058
  className: "inline-flex shrink-0 items-center gap-1 text-2xs text-info",
5019
5059
  "aria-label": _.messagePinned,
5020
- children: [/* @__PURE__ */ U(ve, { size: 12 }), _.messagePinned]
5060
+ children: [/* @__PURE__ */ U(_e, { size: 12 }), _.messagePinned]
5021
5061
  })]
5022
5062
  })
5023
5063
  ]
5024
5064
  })]
5025
5065
  });
5026
- return !d || p ? I : /* @__PURE__ */ W(H, { children: [I, /* @__PURE__ */ U(Cr, {
5066
+ return !d || p ? ne : /* @__PURE__ */ W(H, { children: [ne, /* @__PURE__ */ U(Tr, {
5027
5067
  open: T,
5028
5068
  onClose: () => E(!1),
5029
5069
  title: f ?? _.messageMenuTitle,
@@ -5034,7 +5074,7 @@ function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle",
5034
5074
  })
5035
5075
  })] });
5036
5076
  }
5037
- function Oi({ label: e, align: t = "start", children: n }) {
5077
+ function Ai({ label: e, align: t = "start", children: n }) {
5038
5078
  let { strings: r } = q(), [i, a] = m(!1);
5039
5079
  return /* @__PURE__ */ W("div", {
5040
5080
  className: G("flex w-full flex-col", t === "end" ? "items-end" : "items-start"),
@@ -5079,7 +5119,7 @@ function Oi({ label: e, align: t = "start", children: n }) {
5079
5119
  })]
5080
5120
  });
5081
5121
  }
5082
- function ki({ className: e }) {
5122
+ function ji({ className: e }) {
5083
5123
  let { strings: t } = q();
5084
5124
  return /* @__PURE__ */ U("span", {
5085
5125
  className: G("flex items-center gap-1 py-1", e),
@@ -5110,7 +5150,7 @@ function ki({ className: e }) {
5110
5150
  }, e))
5111
5151
  });
5112
5152
  }
5113
- function Ai({ children: e }) {
5153
+ function Mi({ children: e }) {
5114
5154
  return /* @__PURE__ */ W("div", {
5115
5155
  className: "flex items-center gap-3 py-3",
5116
5156
  children: [
@@ -5125,7 +5165,7 @@ function Ai({ children: e }) {
5125
5165
  }
5126
5166
  //#endregion
5127
5167
  //#region src/components/Meter.tsx
5128
- function ji({ value: e, max: t = 100, label: n, valueLabel: r, thresholds: i = {
5168
+ function Ni({ value: e, max: t = 100, label: n, valueLabel: r, thresholds: i = {
5129
5169
  warning: .75,
5130
5170
  danger: .9
5131
5171
  }, size: a = "md", className: o }) {
@@ -5165,7 +5205,7 @@ function ji({ value: e, max: t = 100, label: n, valueLabel: r, thresholds: i = {
5165
5205
  }
5166
5206
  //#endregion
5167
5207
  //#region src/components/MultiItemDownloadCard.tsx
5168
- function Mi(e, t, n) {
5208
+ function Pi(e, t, n) {
5169
5209
  if (n === void 0 || !Number.isFinite(n) || n <= 0) return "";
5170
5210
  if (n < 60) return e.downloadLeftSeconds(Math.round(n));
5171
5211
  if (n < 3600) return e.downloadLeftMinutes(Math.round(n / 60));
@@ -5175,7 +5215,7 @@ function Mi(e, t, n) {
5175
5215
  }).format(n / 3600);
5176
5216
  return e.downloadLeftHours(r);
5177
5217
  }
5178
- function Ni({ title: e, detail: t, items: n, onPauseAll: r, onResumeAll: i, onCancelAll: a, onItemPause: o, onItemResume: s, onItemCancel: c, onItemRetry: l, defaultExpanded: u = !1, className: d }) {
5218
+ function Fi({ title: e, detail: t, items: n, onPauseAll: r, onResumeAll: i, onCancelAll: a, onItemPause: o, onItemResume: s, onItemCancel: c, onItemRetry: l, defaultExpanded: u = !1, className: d }) {
5179
5219
  let { strings: p, locale: h } = q(), [_, v] = m(u), b = f(() => {
5180
5220
  let e = n.filter((e) => e.status === "failed"), t = n.filter((e) => e.status === "done"), r = n.filter((e) => e.status === "downloading"), i = n.filter((e) => e.status === "paused"), a = n.filter((e) => e.status === "verifying"), o = e.length ? "failed" : t.length === n.length ? "done" : r.length ? "downloading" : a.length ? "verifying" : i.length && i.length + t.length === n.length ? "paused" : "queued", s = n.every((e) => e.size !== void 0), c = n.reduce((e, t) => e + (t.size ?? 0), 0), l = n.reduce((e, t) => e + (t.status === "done" ? t.size ?? 0 : (t.progress ?? 0) * (t.size ?? 0)), 0), u = s && c > 0 ? l / c : n.reduce((e, t) => e + (t.status === "done" ? 1 : t.progress ?? 0), 0) / Math.max(1, n.length), d = r.reduce((e, t) => e + (t.speed ?? 0), 0);
5181
5221
  return {
@@ -5189,11 +5229,11 @@ function Ni({ title: e, detail: t, items: n, onPauseAll: r, onResumeAll: i, onCa
5189
5229
  doneCount: t.length,
5190
5230
  failedCount: e.length
5191
5231
  };
5192
- }, [n]), x = (e) => e === void 0 ? "" : Wr(e, h), S = Math.round(b.progress * 100), C = b.status === "done", w = b.status === "failed", E = w ? p.downloadFailedCount(b.failedCount, n.length) : C ? `${p.downloadFileCount(n.length)} · ${b.knownSizes ? x(b.total) : ""}`.trim() : [
5232
+ }, [n]), x = (e) => e === void 0 ? "" : Kr(e, h), S = Math.round(b.progress * 100), C = b.status === "done", w = b.status === "failed", E = w ? p.downloadFailedCount(b.failedCount, n.length) : C ? `${p.downloadFileCount(n.length)} · ${b.knownSizes ? x(b.total) : ""}`.trim() : [
5193
5233
  p.downloadFilesDone(b.doneCount, n.length),
5194
5234
  b.knownSizes ? p.downloadProgress(x(b.transferred), x(b.total)) : void 0,
5195
5235
  b.speed ? p.downloadSpeed(x(b.speed)) : void 0,
5196
- Mi(p, h, b.eta)
5236
+ Pi(p, h, b.eta)
5197
5237
  ].filter(Boolean).join(" · ");
5198
5238
  return /* @__PURE__ */ W("div", {
5199
5239
  className: G("overflow-hidden rounded-xl border border-line bg-surface-1", d),
@@ -5203,7 +5243,7 @@ function Ni({ title: e, detail: t, items: n, onPauseAll: r, onResumeAll: i, onCa
5203
5243
  children: [
5204
5244
  /* @__PURE__ */ U("span", {
5205
5245
  className: G("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border", C ? "border-accent/30 bg-accent/12 text-accent" : w ? "border-danger/30 bg-danger/12 text-danger" : "border-line bg-fill-2 text-fg-3"),
5206
- children: C ? /* @__PURE__ */ U(M, { size: 18 }) : w ? /* @__PURE__ */ U(T, { size: 18 }) : b.status === "verifying" ? /* @__PURE__ */ U(ir, { size: "md" }) : /* @__PURE__ */ U(ae, { size: 18 })
5246
+ children: C ? /* @__PURE__ */ U(M, { size: 18 }) : w ? /* @__PURE__ */ U(T, { size: 18 }) : b.status === "verifying" ? /* @__PURE__ */ U(or, { size: "md" }) : /* @__PURE__ */ U(z, { size: 18 })
5207
5247
  }),
5208
5248
  /* @__PURE__ */ W("div", {
5209
5249
  className: "min-w-0 flex-1 space-y-1.5",
@@ -5222,7 +5262,7 @@ function Ni({ title: e, detail: t, items: n, onPauseAll: r, onResumeAll: i, onCa
5222
5262
  className: "truncate text-sm text-fg-3",
5223
5263
  children: t
5224
5264
  }),
5225
- !C && !w && /* @__PURE__ */ U(zr, {
5265
+ !C && !w && /* @__PURE__ */ U(Vr, {
5226
5266
  value: b.status === "queued" ? void 0 : S,
5227
5267
  size: "sm"
5228
5268
  }),
@@ -5239,13 +5279,13 @@ function Ni({ title: e, detail: t, items: n, onPauseAll: r, onResumeAll: i, onCa
5239
5279
  label: p.downloadPause(e),
5240
5280
  size: "sm",
5241
5281
  onClick: r,
5242
- children: /* @__PURE__ */ U(_e, { size: 16 })
5282
+ children: /* @__PURE__ */ U(ge, { size: 16 })
5243
5283
  }),
5244
5284
  b.status === "paused" && i && /* @__PURE__ */ U(J, {
5245
5285
  label: p.downloadResume(e),
5246
5286
  size: "sm",
5247
5287
  onClick: i,
5248
- children: /* @__PURE__ */ U(be, { size: 16 })
5288
+ children: /* @__PURE__ */ U(ye, { size: 16 })
5249
5289
  }),
5250
5290
  !C && a && /* @__PURE__ */ U(J, {
5251
5291
  label: p.downloadCancel(e),
@@ -5293,7 +5333,7 @@ function Ni({ title: e, detail: t, items: n, onPauseAll: r, onResumeAll: i, onCa
5293
5333
  className: "overflow-hidden",
5294
5334
  children: /* @__PURE__ */ U("div", {
5295
5335
  className: "space-y-1.5 border-t border-line bg-surface/40 p-2",
5296
- children: n.map((e) => /* @__PURE__ */ U(Kr, {
5336
+ children: n.map((e) => /* @__PURE__ */ U(Jr, {
5297
5337
  name: e.name,
5298
5338
  detail: e.detail,
5299
5339
  status: e.status,
@@ -5316,7 +5356,7 @@ function Ni({ title: e, detail: t, items: n, onPauseAll: r, onResumeAll: i, onCa
5316
5356
  }
5317
5357
  //#endregion
5318
5358
  //#region src/components/NumberInput.tsx
5319
- function Pi({ value: e, onChange: t, min: n = -Infinity, max: r = Infinity, step: i = 1, precision: a, suffix: o, disabled: s, id: c, className: l }) {
5359
+ function Ii({ value: e, onChange: t, min: n = -Infinity, max: r = Infinity, step: i = 1, precision: a, suffix: o, disabled: s, id: c, className: l }) {
5320
5360
  let { strings: u } = q(), d = Y(), f = p(null), m = a ?? String(i).split(".")[1]?.length ?? 0, h = (e) => Math.min(r, Math.max(n, e)), g = (e) => {
5321
5361
  Number.isNaN(e) || t(Number(h(e).toFixed(m)));
5322
5362
  };
@@ -5329,7 +5369,7 @@ function Pi({ value: e, onChange: t, min: n = -Infinity, max: r = Infinity, step
5329
5369
  disabled: s || e <= n,
5330
5370
  "aria-label": u.numberInputDecrease,
5331
5371
  className: "touch-target flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-fg-3 transition-colors hover:bg-fill-2 hover:text-fg disabled:pointer-events-none disabled:opacity-30",
5332
- children: /* @__PURE__ */ U(me, { size: 16 })
5372
+ children: /* @__PURE__ */ U(pe, { size: 16 })
5333
5373
  }),
5334
5374
  /* @__PURE__ */ U("input", {
5335
5375
  ref: f,
@@ -5356,23 +5396,23 @@ function Pi({ value: e, onChange: t, min: n = -Infinity, max: r = Infinity, step
5356
5396
  disabled: s || e >= r,
5357
5397
  "aria-label": u.numberInputIncrease,
5358
5398
  className: "touch-target flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-fg-3 transition-colors hover:bg-fill-2 hover:text-fg disabled:pointer-events-none disabled:opacity-30",
5359
- children: /* @__PURE__ */ U(B, { size: 16 })
5399
+ children: /* @__PURE__ */ U(be, { size: 16 })
5360
5400
  })
5361
5401
  ]
5362
5402
  });
5363
5403
  }
5364
5404
  //#endregion
5365
5405
  //#region src/components/Pagination.tsx
5366
- function Fi(e, t) {
5406
+ function Li(e, t) {
5367
5407
  return Array.from({ length: Math.max(0, t - e + 1) }, (t, n) => e + n);
5368
5408
  }
5369
- function Ii({ page: e, pageCount: t, onChange: n, siblings: r = 1, className: i }) {
5409
+ function Ri({ page: e, pageCount: t, onChange: n, siblings: r = 1, className: i }) {
5370
5410
  let { strings: a } = q();
5371
5411
  if (t <= 1) return null;
5372
5412
  let o = Math.max(2, e - r), s = Math.min(t - 1, e + r), c = [
5373
5413
  1,
5374
5414
  ...o > 2 ? ["gap"] : [],
5375
- ...Fi(o, s),
5415
+ ...Li(o, s),
5376
5416
  ...s < t - 1 ? ["gap"] : [],
5377
5417
  ...t > 1 ? [t] : []
5378
5418
  ], l = (r) => n(Math.min(t, Math.max(1, e + r)));
@@ -5413,7 +5453,7 @@ function Ii({ page: e, pageCount: t, onChange: n, siblings: r = 1, className: i
5413
5453
  }
5414
5454
  //#endregion
5415
5455
  //#region src/components/Panel.tsx
5416
- var Li = {
5456
+ var zi = {
5417
5457
  neutral: "border-line bg-surface-1",
5418
5458
  subtle: "border-line bg-surface-1/60",
5419
5459
  accent: "border-accent/30 bg-accent/8",
@@ -5421,7 +5461,7 @@ var Li = {
5421
5461
  warning: "border-warning/30 bg-warning/8",
5422
5462
  danger: "border-danger/30 bg-danger/8",
5423
5463
  secondary: "border-secondary/30 bg-secondary/8"
5424
- }, Ri = {
5464
+ }, Bi = {
5425
5465
  neutral: "text-fg",
5426
5466
  subtle: "text-fg-2",
5427
5467
  accent: "text-accent",
@@ -5430,16 +5470,16 @@ var Li = {
5430
5470
  danger: "text-danger",
5431
5471
  secondary: "text-secondary"
5432
5472
  };
5433
- function zi({ title: e, description: t, tone: n = "neutral", action: r, onSurface: i, className: a, children: o, ...s }) {
5473
+ function Vi({ title: e, description: t, tone: n = "neutral", action: r, onSurface: i, className: a, children: o, ...s }) {
5434
5474
  return /* @__PURE__ */ W("section", {
5435
- className: G("flex flex-col gap-2 rounded-xl border px-3.5 py-3", Li[n], i && "backdrop-blur-md", a),
5475
+ className: G("flex flex-col gap-2 rounded-xl border px-3.5 py-3", zi[n], i && "backdrop-blur-md", a),
5436
5476
  ...s,
5437
5477
  children: [(e || t || r) && /* @__PURE__ */ W("header", {
5438
5478
  className: "flex items-start gap-2",
5439
5479
  children: [/* @__PURE__ */ W("div", {
5440
5480
  className: "min-w-0 flex-1 space-y-0.5",
5441
5481
  children: [e && /* @__PURE__ */ U("h3", {
5442
- className: G("truncate text-base font-semibold", Ri[n]),
5482
+ className: G("truncate text-base font-semibold", Bi[n]),
5443
5483
  children: e
5444
5484
  }), t && /* @__PURE__ */ U("p", {
5445
5485
  className: "text-sm leading-snug text-fg-3",
@@ -5454,27 +5494,27 @@ function zi({ title: e, description: t, tone: n = "neutral", action: r, onSurfac
5454
5494
  }
5455
5495
  //#endregion
5456
5496
  //#region src/components/PartitionBar.tsx
5457
- var Bi = {
5497
+ var Hi = {
5458
5498
  accent: "var(--color-accent)",
5459
5499
  info: "var(--color-info)",
5460
5500
  secondary: "var(--color-secondary)",
5461
5501
  warning: "var(--color-warning)",
5462
5502
  danger: "var(--color-danger)",
5463
5503
  neutral: "var(--color-fg-3)"
5464
- }, Vi = {
5504
+ }, Ui = {
5465
5505
  sm: "h-1.5",
5466
5506
  md: "h-2.5",
5467
5507
  lg: "h-3.5"
5468
5508
  };
5469
- function Hi({ segments: e, total: t, format: n, labels: r = "below", minLabelShare: i = .12, size: a = "md", showRemainder: o, className: s, ...c }) {
5470
- let { strings: l } = q(), d = u(), f = e.reduce((e, t) => e + Math.max(0, t.value), 0), p = t ?? f, m = (e) => p > 0 ? Math.max(0, e) / p : 0, h = Math.max(0, p - f), g = e.some((e) => m(e.value) > 0 && m(e.value) < i), _ = r === "below" && g ? "legend" : r, v = (e) => n ? n(e.value, m(e.value)) : `${Math.round(m(e.value) * 100)}%`, y = (e) => e.color ?? Bi[e.tone ?? "neutral"];
5509
+ function Wi({ segments: e, total: t, format: n, labels: r = "below", minLabelShare: i = .12, size: a = "md", showRemainder: o, className: s, ...c }) {
5510
+ let { strings: l } = q(), d = u(), f = e.reduce((e, t) => e + Math.max(0, t.value), 0), p = t ?? f, m = (e) => p > 0 ? Math.max(0, e) / p : 0, h = Math.max(0, p - f), g = e.some((e) => m(e.value) > 0 && m(e.value) < i), _ = r === "below" && g ? "legend" : r, v = (e) => n ? n(e.value, m(e.value)) : `${Math.round(m(e.value) * 100)}%`, y = (e) => e.color ?? Hi[e.tone ?? "neutral"];
5471
5511
  return /* @__PURE__ */ W("div", {
5472
5512
  className: G("w-full", s),
5473
5513
  children: [
5474
5514
  /* @__PURE__ */ W("div", {
5475
5515
  role: "img",
5476
5516
  "aria-label": c["aria-label"] ?? e.map((e) => `${typeof e.label == "string" ? e.label : e.id} ${v(e)}`).join(", "),
5477
- className: G("flex w-full items-stretch gap-1", Vi[a]),
5517
+ className: G("flex w-full items-stretch gap-1", Ui[a]),
5478
5518
  children: [e.map((e) => {
5479
5519
  let t = m(e.value);
5480
5520
  return t <= 0 ? null : /* @__PURE__ */ U("div", {
@@ -5552,13 +5592,13 @@ function Hi({ segments: e, total: t, format: n, labels: r = "below", minLabelSha
5552
5592
  }
5553
5593
  //#endregion
5554
5594
  //#region src/components/primitives.tsx
5555
- function Ui({ children: e }) {
5595
+ function Gi({ children: e }) {
5556
5596
  return /* @__PURE__ */ U("span", {
5557
5597
  className: "absolute -m-px h-px w-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]",
5558
5598
  children: e
5559
5599
  });
5560
5600
  }
5561
- var Wi = a(function({ ratio: e = 1, className: t, style: n, ...r }, i) {
5601
+ var Ki = a(function({ ratio: e = 1, className: t, style: n, ...r }, i) {
5562
5602
  return /* @__PURE__ */ U("div", {
5563
5603
  ref: i,
5564
5604
  className: G("relative w-full overflow-hidden", t),
@@ -5569,10 +5609,10 @@ var Wi = a(function({ ratio: e = 1, className: t, style: n, ...r }, i) {
5569
5609
  ...r
5570
5610
  });
5571
5611
  });
5572
- Wi.displayName = "AspectRatio";
5612
+ Ki.displayName = "AspectRatio";
5573
5613
  //#endregion
5574
5614
  //#region src/components/Prose.tsx
5575
- function Gi({ children: e, size: t = "md", className: n }) {
5615
+ function qi({ children: e, size: t = "md", className: n }) {
5576
5616
  return /* @__PURE__ */ U("div", {
5577
5617
  className: G(t === "sm" ? "text-sm" : "text-base", "leading-relaxed text-fg", n),
5578
5618
  children: /* @__PURE__ */ U(Je, {
@@ -5627,7 +5667,7 @@ function Gi({ children: e, size: t = "md", className: n }) {
5627
5667
  return !e && !n.includes("\n") ? /* @__PURE__ */ U("code", {
5628
5668
  className: "rounded-md border border-line bg-fill px-1 py-0.5 font-mono text-[0.9em] text-fg-2",
5629
5669
  children: n
5630
- }) : /* @__PURE__ */ U(Un, {
5670
+ }) : /* @__PURE__ */ U(Gn, {
5631
5671
  code: n,
5632
5672
  label: e?.replace("language-", ""),
5633
5673
  className: "my-3"
@@ -5665,10 +5705,10 @@ function Gi({ children: e, size: t = "md", className: n }) {
5665
5705
  }
5666
5706
  //#endregion
5667
5707
  //#region src/components/Radio.tsx
5668
- var Ki = r(null);
5669
- function qi({ value: e, onChange: t, disabled: n, orientation: r = "vertical", className: i, children: a, ...o }) {
5708
+ var Ji = r(null);
5709
+ function Yi({ value: e, onChange: t, disabled: n, orientation: r = "vertical", className: i, children: a, ...o }) {
5670
5710
  let s = u();
5671
- return /* @__PURE__ */ U(Ki.Provider, {
5711
+ return /* @__PURE__ */ U(Ji.Provider, {
5672
5712
  value: {
5673
5713
  name: s,
5674
5714
  value: e,
@@ -5683,8 +5723,8 @@ function qi({ value: e, onChange: t, disabled: n, orientation: r = "vertical", c
5683
5723
  })
5684
5724
  });
5685
5725
  }
5686
- function Ji({ value: e, label: t, description: n, disabled: r }) {
5687
- let i = c(Ki);
5726
+ function Xi({ value: e, label: t, description: n, disabled: r }) {
5727
+ let i = c(Ji);
5688
5728
  if (!i) throw Error("Radio must be used inside <RadioGroup>");
5689
5729
  let a = i.value === e, o = r || i.disabled;
5690
5730
  return /* @__PURE__ */ W("label", {
@@ -5718,7 +5758,7 @@ function Ji({ value: e, label: t, description: n, disabled: r }) {
5718
5758
  }
5719
5759
  //#endregion
5720
5760
  //#region src/components/Resizable.tsx
5721
- function Yi({ panel: e, children: t, side: n = "left", defaultSize: r = 320, minSize: i = 200, maxSize: a = 640, storageKey: o, className: c }) {
5761
+ function Zi({ panel: e, children: t, side: n = "left", defaultSize: r = 320, minSize: i = 200, maxSize: a = 640, storageKey: o, className: c }) {
5722
5762
  let { strings: u } = q(), [d, f] = m(() => {
5723
5763
  if (!o || typeof localStorage > "u") return r;
5724
5764
  try {
@@ -5783,7 +5823,7 @@ function Yi({ panel: e, children: t, side: n = "left", defaultSize: r = 320, min
5783
5823
  }
5784
5824
  //#endregion
5785
5825
  //#region src/components/SearchField.tsx
5786
- var Xi = a(function({ value: e, onChange: t, loading: n, shortcut: r, size: i = "md", placeholder: a, className: o, ...s }, c) {
5826
+ var Qi = a(function({ value: e, onChange: t, loading: n, shortcut: r, size: i = "md", placeholder: a, className: o, ...s }, c) {
5787
5827
  let { strings: l } = q(), u = p(null);
5788
5828
  return /* @__PURE__ */ W("div", {
5789
5829
  className: "relative",
@@ -5816,18 +5856,18 @@ var Xi = a(function({ value: e, onChange: t, loading: n, shortcut: r, size: i =
5816
5856
  children: /* @__PURE__ */ U(V, { size: 14 })
5817
5857
  }) : n ? /* @__PURE__ */ U("span", {
5818
5858
  className: "absolute right-3 top-1/2 -translate-y-1/2",
5819
- children: /* @__PURE__ */ U(ir, { size: "sm" })
5859
+ children: /* @__PURE__ */ U(or, { size: "sm" })
5820
5860
  }) : r ? /* @__PURE__ */ U("span", {
5821
5861
  className: "absolute right-2 top-1/2 hidden -translate-y-1/2 hoverable:block",
5822
- children: /* @__PURE__ */ U(lr, { children: r })
5862
+ children: /* @__PURE__ */ U(dr, { children: r })
5823
5863
  }) : null
5824
5864
  ]
5825
5865
  });
5826
5866
  });
5827
- Xi.displayName = "SearchField";
5867
+ Qi.displayName = "SearchField";
5828
5868
  //#endregion
5829
5869
  //#region src/components/Segmented.tsx
5830
- function Zi({ options: e, value: t, onChange: n, size: r = "md", block: i, className: a, ...o }) {
5870
+ function $i({ options: e, value: t, onChange: n, size: r = "md", block: i, className: a, ...o }) {
5831
5871
  let s = u();
5832
5872
  return /* @__PURE__ */ U("div", {
5833
5873
  role: "radiogroup",
@@ -5866,7 +5906,7 @@ function Zi({ options: e, value: t, onChange: n, size: r = "md", block: i, class
5866
5906
  }
5867
5907
  //#endregion
5868
5908
  //#region src/components/Select.tsx
5869
- var Qi = a(function({ options: e, placeholder: t, className: n, id: r, value: i, defaultValue: a, ...o }, s) {
5909
+ var ea = a(function({ options: e, placeholder: t, className: n, id: r, value: i, defaultValue: a, ...o }, s) {
5870
5910
  let c = Y(), l = (i ?? a ?? "") === "";
5871
5911
  return /* @__PURE__ */ W("div", {
5872
5912
  className: "relative",
@@ -5895,10 +5935,10 @@ var Qi = a(function({ options: e, placeholder: t, className: n, id: r, value: i,
5895
5935
  })]
5896
5936
  });
5897
5937
  });
5898
- Qi.displayName = "Select";
5938
+ ea.displayName = "Select";
5899
5939
  //#endregion
5900
5940
  //#region src/components/SelectMenu.tsx
5901
- function $i(e) {
5941
+ function ta(e) {
5902
5942
  let { strings: t } = q(), { options: n, placeholder: r, triggerIcon: i = !0, disabled: a, id: o, className: c, menuClassName: d } = e, h = e.multiple === !0, g = Y(), _ = u(), [v, y] = m(!1), [b, x] = m(0), S = p(null), C = p({
5903
5943
  query: "",
5904
5944
  at: 0
@@ -5968,10 +6008,10 @@ function $i(e) {
5968
6008
  }
5969
6009
  }
5970
6010
  }, A = n.filter((e) => w.includes(e.value)), ee = h ? e.maxLabels ?? 2 : 1, j = A.length === 0 ? r ?? t.selectMenuPlaceholder : h && A.length > ee ? t.selectMenuSelected(A.length) : A.map((e) => e.label).join(", "), te = -1;
5971
- return /* @__PURE__ */ W(Yn, {
6011
+ return /* @__PURE__ */ W(Zn, {
5972
6012
  open: v,
5973
6013
  onOpenChange: y,
5974
- children: [/* @__PURE__ */ U(Xn, { children: /* @__PURE__ */ W("button", {
6014
+ children: [/* @__PURE__ */ U(Qn, { children: /* @__PURE__ */ W("button", {
5975
6015
  type: "button",
5976
6016
  id: o ?? g?.id,
5977
6017
  role: "combobox",
@@ -6008,7 +6048,7 @@ function $i(e) {
6008
6048
  className: G("shrink-0 text-fg-3 transition-transform motion-instant", v && "rotate-180")
6009
6049
  })
6010
6050
  ]
6011
- }) }), /* @__PURE__ */ U($n, {
6051
+ }) }), /* @__PURE__ */ U(tr, {
6012
6052
  matchWidth: !0,
6013
6053
  className: G("p-0", d),
6014
6054
  children: /* @__PURE__ */ W("div", {
@@ -6068,7 +6108,7 @@ function $i(e) {
6068
6108
  }
6069
6109
  //#endregion
6070
6110
  //#region src/components/Slider.tsx
6071
- var ea = a(function({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, showValue: a, className: o, id: s, style: c, ...l }, u) {
6111
+ var na = a(function({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, showValue: a, className: o, id: s, style: c, ...l }, u) {
6072
6112
  let d = Y(), f = (e - n) / (r - n) * 100, p = typeof a == "function" ? a(e) : a ? String(e) : null;
6073
6113
  return /* @__PURE__ */ W("div", {
6074
6114
  className: G("flex items-center gap-3", o),
@@ -6094,10 +6134,10 @@ var ea = a(function({ value: e, onChange: t, min: n = 0, max: r = 100, step: i =
6094
6134
  })]
6095
6135
  });
6096
6136
  });
6097
- ea.displayName = "Slider";
6137
+ na.displayName = "Slider";
6098
6138
  //#endregion
6099
6139
  //#region src/components/StatTile.tsx
6100
- function ta({ label: e, value: t, sub: n, trend: r, goodDirection: i = "up", icon: a, highlight: o, className: s }) {
6140
+ function ra({ label: e, value: t, sub: n, trend: r, goodDirection: i = "up", icon: a, highlight: o, className: s }) {
6101
6141
  let c = r ? r.direction === i : void 0;
6102
6142
  return /* @__PURE__ */ W("div", {
6103
6143
  className: G("rounded-xl border px-3.5 py-3", o ? "border-accent/30 bg-accent/8" : "border-line bg-surface-1", s),
@@ -6126,14 +6166,14 @@ function ta({ label: e, value: t, sub: n, trend: r, goodDirection: i = "up", ico
6126
6166
  className: "mt-1 truncate text-2xl font-semibold tabular-nums text-fg",
6127
6167
  children: t
6128
6168
  }),
6129
- n && /* @__PURE__ */ U("p", {
6169
+ n && /* @__PURE__ */ U("div", {
6130
6170
  className: "mt-0.5 truncate text-sm text-fg-3",
6131
6171
  children: n
6132
6172
  })
6133
6173
  ]
6134
6174
  });
6135
6175
  }
6136
- function na({ items: e, layout: t = "inline", className: n }) {
6176
+ function ia({ items: e, layout: t = "inline", className: n }) {
6137
6177
  return /* @__PURE__ */ U("dl", {
6138
6178
  className: G("divide-y divide-line", n),
6139
6179
  children: e.map((e, n) => /* @__PURE__ */ W("div", {
@@ -6150,7 +6190,7 @@ function na({ items: e, layout: t = "inline", className: n }) {
6150
6190
  }
6151
6191
  //#endregion
6152
6192
  //#region src/components/Stepper.tsx
6153
- function ra({ steps: e, current: t, onStepClick: n, variant: r = "bar", className: i }) {
6193
+ function aa({ steps: e, current: t, onStepClick: n, variant: r = "bar", className: i }) {
6154
6194
  let { strings: a } = q(), o = Math.max(0, Math.min(t, e.length - 1));
6155
6195
  return r === "dots" ? /* @__PURE__ */ U("div", {
6156
6196
  className: G("flex items-center gap-1.5", i),
@@ -6220,7 +6260,7 @@ function ra({ steps: e, current: t, onStepClick: n, variant: r = "bar", classNam
6220
6260
  }
6221
6261
  //#endregion
6222
6262
  //#region src/components/Switch.tsx
6223
- function ia({ checked: e, onChange: t, disabled: n, id: r, className: i, ...a }) {
6263
+ function oa({ checked: e, onChange: t, disabled: n, id: r, className: i, ...a }) {
6224
6264
  let o = Y();
6225
6265
  return /* @__PURE__ */ U("button", {
6226
6266
  type: "button",
@@ -6234,15 +6274,16 @@ function ia({ checked: e, onChange: t, disabled: n, id: r, className: i, ...a })
6234
6274
  className: G("relative inline-flex h-6 w-11 shrink-0 items-center rounded-full p-0.5", "transition-colors motion-quick", e ? "bg-accent" : "bg-fill-3 hover:bg-line-3", n && "cursor-not-allowed opacity-40", i),
6235
6275
  children: /* @__PURE__ */ U(y.span, {
6236
6276
  "aria-hidden": "true",
6237
- layout: !0,
6277
+ initial: !1,
6278
+ animate: { x: e ? 20 : 0 },
6238
6279
  transition: K.snap,
6239
- className: G("block h-5 w-5 rounded-full bg-knob shadow-sm ring-1 ring-inset ring-black/5", e && "ml-auto")
6280
+ className: "block h-5 w-5 rounded-full bg-knob shadow-sm ring-1 ring-inset ring-black/5"
6240
6281
  })
6241
6282
  });
6242
6283
  }
6243
6284
  //#endregion
6244
6285
  //#region src/components/Table.tsx
6245
- function aa({ columns: e, rows: t, rowKey: n, sort: r, onSortChange: i, onRowClick: a, empty: o, caption: s, className: c }) {
6286
+ function sa({ columns: e, rows: t, rowKey: n, sort: r, onSortChange: i, onRowClick: a, empty: o, caption: s, className: c }) {
6246
6287
  let { strings: l } = q(), u = (e) => {
6247
6288
  i && i({
6248
6289
  key: e,
@@ -6251,7 +6292,7 @@ function aa({ columns: e, rows: t, rowKey: n, sort: r, onSortChange: i, onRowCli
6251
6292
  };
6252
6293
  return /* @__PURE__ */ U("div", {
6253
6294
  className: G("overflow-hidden rounded-xl border border-line", c),
6254
- children: /* @__PURE__ */ U(Hn, {
6295
+ children: /* @__PURE__ */ U(Wn, {
6255
6296
  axis: "x",
6256
6297
  bar: !0,
6257
6298
  children: /* @__PURE__ */ W("table", {
@@ -6303,15 +6344,15 @@ function aa({ columns: e, rows: t, rowKey: n, sort: r, onSortChange: i, onRowCli
6303
6344
  }
6304
6345
  //#endregion
6305
6346
  //#region src/components/Tabs.tsx
6306
- var oa = r(null);
6307
- function sa() {
6308
- let e = c(oa);
6347
+ var ca = r(null);
6348
+ function la() {
6349
+ let e = c(ca);
6309
6350
  if (!e) throw Error("Tabs parts must be used inside <Tabs>");
6310
6351
  return e;
6311
6352
  }
6312
- function ca({ value: e, onChange: t, className: n, children: r }) {
6353
+ function ua({ value: e, onChange: t, className: n, children: r }) {
6313
6354
  let i = u();
6314
- return /* @__PURE__ */ U(oa.Provider, {
6355
+ return /* @__PURE__ */ U(ca.Provider, {
6315
6356
  value: {
6316
6357
  value: e,
6317
6358
  onChange: t,
@@ -6323,7 +6364,7 @@ function ca({ value: e, onChange: t, className: n, children: r }) {
6323
6364
  })
6324
6365
  });
6325
6366
  }
6326
- function la({ children: e, className: t, "aria-label": n }) {
6367
+ function da({ children: e, className: t, "aria-label": n }) {
6327
6368
  return /* @__PURE__ */ U("div", {
6328
6369
  role: "tablist",
6329
6370
  "aria-label": n,
@@ -6340,8 +6381,8 @@ function la({ children: e, className: t, "aria-label": n }) {
6340
6381
  children: e
6341
6382
  });
6342
6383
  }
6343
- function ua({ value: e, icon: t, count: n, children: r }) {
6344
- let i = sa(), a = i.value === e;
6384
+ function fa({ value: e, icon: t, count: n, children: r }) {
6385
+ let i = la(), a = i.value === e;
6345
6386
  return /* @__PURE__ */ W("button", {
6346
6387
  type: "button",
6347
6388
  role: "tab",
@@ -6366,8 +6407,8 @@ function ua({ value: e, icon: t, count: n, children: r }) {
6366
6407
  ]
6367
6408
  });
6368
6409
  }
6369
- function da({ value: e, className: t, children: n }) {
6370
- let r = sa();
6410
+ function pa({ value: e, className: t, children: n }) {
6411
+ let r = la();
6371
6412
  return r.value === e ? /* @__PURE__ */ U("div", {
6372
6413
  role: "tabpanel",
6373
6414
  id: `${r.id}-panel-${e}`,
@@ -6379,7 +6420,7 @@ function da({ value: e, className: t, children: n }) {
6379
6420
  }
6380
6421
  //#endregion
6381
6422
  //#region src/components/TagInput.tsx
6382
- function fa({ value: e, onChange: t, placeholder: n, max: r, separators: i = [","], disabled: a, id: o, className: s }) {
6423
+ function ma({ value: e, onChange: t, placeholder: n, max: r, separators: i = [","], disabled: a, id: o, className: s }) {
6383
6424
  let { strings: c } = q(), l = Y(), u = p(null), [d, f] = m(""), h = (n) => {
6384
6425
  let i = n.trim();
6385
6426
  if (!i || e.includes(i)) return f("");
@@ -6421,7 +6462,7 @@ function fa({ value: e, onChange: t, placeholder: n, max: r, separators: i = [",
6421
6462
  }
6422
6463
  //#endregion
6423
6464
  //#region src/components/Text.tsx
6424
- var pa = {
6465
+ var ha = {
6425
6466
  hero: "text-5xl font-bold leading-[1.05] tracking-[-0.03em] text-fg @3xl:text-6xl",
6426
6467
  display: "text-4xl font-bold leading-[1.1] tracking-tight text-fg",
6427
6468
  page: "text-3xl font-bold tracking-tight text-fg",
@@ -6432,7 +6473,7 @@ var pa = {
6432
6473
  label: "text-sm font-medium text-fg-2",
6433
6474
  hint: "text-sm text-fg-3",
6434
6475
  caption: "text-2xs text-fg-3"
6435
- }, ma = {
6476
+ }, ga = {
6436
6477
  hero: "h1",
6437
6478
  display: "h1",
6438
6479
  page: "h1",
@@ -6444,15 +6485,15 @@ var pa = {
6444
6485
  hint: "p",
6445
6486
  caption: "span"
6446
6487
  };
6447
- function ha({ variant: e = "body", as: t, className: n, ...r }) {
6448
- return i(t ?? ma[e], {
6449
- className: G(pa[e], n),
6488
+ function _a({ variant: e = "body", as: t, className: n, ...r }) {
6489
+ return i(t ?? ga[e], {
6490
+ className: G(ha[e], n),
6450
6491
  ...r
6451
6492
  });
6452
6493
  }
6453
6494
  //#endregion
6454
6495
  //#region src/lib/color.ts
6455
- function ga(e) {
6496
+ function va(e) {
6456
6497
  let t = e.trim().replace(/^#/, ""), n = t.length === 3 ? t.split("").map((e) => e + e).join("") : t;
6457
6498
  return /^[0-9a-f]{6}$/i.test(n) ? {
6458
6499
  r: parseInt(n.slice(0, 2), 16),
@@ -6460,16 +6501,16 @@ function ga(e) {
6460
6501
  b: parseInt(n.slice(4, 6), 16)
6461
6502
  } : null;
6462
6503
  }
6463
- function _a(e) {
6464
- let t = ga(e);
6504
+ function ya(e) {
6505
+ let t = va(e);
6465
6506
  return t ? `#${[
6466
6507
  t.r,
6467
6508
  t.g,
6468
6509
  t.b
6469
6510
  ].map((e) => e.toString(16).padStart(2, "0")).join("")}` : null;
6470
6511
  }
6471
- function va(e) {
6472
- let t = ga(e);
6512
+ function ba(e) {
6513
+ let t = va(e);
6473
6514
  if (!t) return 0;
6474
6515
  let n = (e) => {
6475
6516
  let t = e / 255;
@@ -6477,18 +6518,18 @@ function va(e) {
6477
6518
  };
6478
6519
  return .2126 * n(t.r) + .7152 * n(t.g) + .0722 * n(t.b);
6479
6520
  }
6480
- function ya(e, t) {
6481
- let n = va(e), r = va(t);
6521
+ function xa(e, t) {
6522
+ let n = ba(e), r = ba(t);
6482
6523
  return (Math.max(n, r) + .05) / (Math.min(n, r) + .05);
6483
6524
  }
6484
- function ba(e) {
6485
- return va(e) > .4;
6525
+ function Sa(e) {
6526
+ return ba(e) > .4;
6486
6527
  }
6487
- function xa(e) {
6488
- return ya(e, "#ffffff") >= ya(e, "#000000") ? "#ffffff" : "#0a0a0a";
6528
+ function Ca(e) {
6529
+ return xa(e, "#ffffff") >= xa(e, "#000000") ? "#ffffff" : "#0a0a0a";
6489
6530
  }
6490
- function Sa(e, t, n) {
6491
- let r = ga(e), i = ga(t);
6531
+ function wa(e, t, n) {
6532
+ let r = va(e), i = va(t);
6492
6533
  if (!r || !i) return e;
6493
6534
  let a = Math.min(1, Math.max(0, n)), o = (e, t) => Math.round(e + (t - e) * a);
6494
6535
  return `#${[
@@ -6499,7 +6540,7 @@ function Sa(e, t, n) {
6499
6540
  }
6500
6541
  //#endregion
6501
6542
  //#region src/theme/theme.ts
6502
- var Ca = {
6543
+ var Ta = {
6503
6544
  sharp: {
6504
6545
  sm: "2px",
6505
6546
  md: "3px",
@@ -6521,21 +6562,21 @@ var Ca = {
6521
6562
  xl: "18px",
6522
6563
  "2xl": "24px"
6523
6564
  }
6524
- }, wa = {
6565
+ }, Ea = {
6525
6566
  fg2: 72,
6526
6567
  fg3: 50,
6527
6568
  fg4: 34
6528
- }, Ta = {
6569
+ }, Da = {
6529
6570
  fill: 5,
6530
6571
  fill2: 8,
6531
6572
  fill3: 12
6532
- }, Ea = {
6573
+ }, Oa = {
6533
6574
  line: 10,
6534
6575
  line2: 16,
6535
6576
  line3: 26
6536
6577
  };
6537
- function Da(e) {
6538
- let { surface: t, fg: n, accent: r, danger: i, warning: a, info: o, secondary: s, nav: c } = e.colors, l = ba(t), u = l ? Sa(t, "#ffffff", .6) : Sa(t, "#ffffff", .075), d = l ? "#ffffff" : Sa(t, "#ffffff", .13), f = l ? .12 : .45, p = (e, t) => `color-mix(in oklab, ${e} ${t}%, transparent)`;
6578
+ function ka(e) {
6579
+ let { surface: t, fg: n, accent: r, danger: i, warning: a, info: o, secondary: s, nav: c } = e.colors, l = Sa(t), u = l ? wa(t, "#ffffff", .6) : wa(t, "#ffffff", .075), d = l ? "#ffffff" : wa(t, "#ffffff", .13), f = l ? .12 : .45, p = (e, t) => `color-mix(in oklab, ${e} ${t}%, transparent)`;
6539
6580
  return {
6540
6581
  "--color-surface": t,
6541
6582
  "--color-surface-1": u,
@@ -6543,36 +6584,36 @@ function Da(e) {
6543
6584
  "--color-surface-el": u,
6544
6585
  "--color-nav": c ?? u,
6545
6586
  "--color-fg": n,
6546
- "--color-fg-2": p(n, wa.fg2),
6547
- "--color-fg-3": p(n, wa.fg3),
6548
- "--color-fg-4": p(n, wa.fg4),
6549
- "--color-fill": p(n, Ta.fill),
6550
- "--color-fill-2": p(n, Ta.fill2),
6551
- "--color-fill-3": p(n, Ta.fill3),
6552
- "--color-line": p(n, Ea.line),
6553
- "--color-line-2": p(n, Ea.line2),
6554
- "--color-line-3": p(n, Ea.line3),
6587
+ "--color-fg-2": p(n, Ea.fg2),
6588
+ "--color-fg-3": p(n, Ea.fg3),
6589
+ "--color-fg-4": p(n, Ea.fg4),
6590
+ "--color-fill": p(n, Da.fill),
6591
+ "--color-fill-2": p(n, Da.fill2),
6592
+ "--color-fill-3": p(n, Da.fill3),
6593
+ "--color-line": p(n, Oa.line),
6594
+ "--color-line-2": p(n, Oa.line2),
6595
+ "--color-line-3": p(n, Oa.line3),
6555
6596
  "--color-accent": r,
6556
6597
  "--color-danger": i,
6557
6598
  "--color-warning": a,
6558
6599
  "--color-info": o,
6559
6600
  "--color-secondary": s,
6560
- "--color-on-accent": xa(r),
6601
+ "--color-on-accent": Ca(r),
6561
6602
  "--color-knob": l ? "#ffffff" : n,
6562
6603
  "--edge-light": l ? "rgb(255 255 255 / 0.9)" : "rgb(255 255 255 / 0.08)",
6563
6604
  "--edge-dark": l ? "rgb(0 0 0 / 0.16)" : "rgb(0 0 0 / 0.55)",
6564
6605
  "--edge-ambient": l ? "rgb(0 0 0 / 0.08)" : "rgb(0 0 0 / 0.35)",
6565
6606
  "--shadow-raised": `0 8px 24px rgb(0 0 0 / ${f})`,
6566
6607
  "--shadow-sheet": `0 -12px 40px rgb(0 0 0 / ${f + .1})`,
6567
- ...Object.fromEntries(Object.entries(Ca[e.radius ?? "default"]).map(([e, t]) => [`--radius-${e}`, t]))
6608
+ ...Object.fromEntries(Object.entries(Ta[e.radius ?? "default"]).map(([e, t]) => [`--radius-${e}`, t]))
6568
6609
  };
6569
6610
  }
6570
- function Oa(e, t = document.documentElement) {
6571
- let n = Da(e);
6611
+ function Aa(e, t = document.documentElement) {
6612
+ let n = ka(e);
6572
6613
  for (let [e, r] of Object.entries(n)) t.style.setProperty(e, r);
6573
- t.style.colorScheme = ba(e.colors.surface) ? "light" : "dark", t.dataset.theme = ba(e.colors.surface) ? "light" : "dark", t.dataset.density = e.density ?? "default";
6614
+ t.style.colorScheme = Sa(e.colors.surface) ? "light" : "dark", t.dataset.theme = Sa(e.colors.surface) ? "light" : "dark", t.dataset.density = e.density ?? "default";
6574
6615
  }
6575
- var ka = [
6616
+ var ja = [
6576
6617
  {
6577
6618
  id: "midnight",
6578
6619
  name: "Midnight",
@@ -6651,29 +6692,29 @@ var ka = [
6651
6692
  secondary: "#e879f9"
6652
6693
  }
6653
6694
  }
6654
- ], Aa = ka[0], ja = "crisp.theme", Ma = r(null);
6655
- function Na() {
6656
- let e = c(Ma);
6695
+ ], Ma = ja[0], Na = "crisp.theme", Pa = r(null);
6696
+ function Fa() {
6697
+ let e = c(Pa);
6657
6698
  if (!e) throw Error("useTheme must be used inside <ThemeProvider>");
6658
6699
  return e;
6659
6700
  }
6660
- function Pa() {
6661
- if (typeof localStorage > "u") return Aa;
6701
+ function Ia() {
6702
+ if (typeof localStorage > "u") return Ma;
6662
6703
  try {
6663
- let e = localStorage.getItem(ja);
6664
- if (!e) return Aa;
6704
+ let e = localStorage.getItem(Na);
6705
+ if (!e) return Ma;
6665
6706
  let t = JSON.parse(e);
6666
- return !t?.colors?.surface || !t.colors.fg ? Aa : t;
6707
+ return !t?.colors?.surface || !t.colors.fg ? Ma : t;
6667
6708
  } catch {
6668
- return Aa;
6709
+ return Ma;
6669
6710
  }
6670
6711
  }
6671
- function Fa({ children: e, initial: t }) {
6672
- let [n, r] = m(() => t ?? Pa());
6673
- m(() => (typeof document < "u" && Oa(t ?? Pa()), null)), l(() => {
6674
- Oa(n);
6712
+ function La({ children: e, initial: t }) {
6713
+ let [n, r] = m(() => t ?? Ia());
6714
+ m(() => (typeof document < "u" && Aa(t ?? Ia()), null)), l(() => {
6715
+ Aa(n);
6675
6716
  try {
6676
- localStorage.setItem(ja, JSON.stringify(n));
6717
+ localStorage.setItem(Na, JSON.stringify(n));
6677
6718
  } catch {}
6678
6719
  }, [n]);
6679
6720
  let i = s((e, t) => {
@@ -6698,12 +6739,12 @@ function Fa({ children: e, initial: t }) {
6698
6739
  }));
6699
6740
  }, []), c = f(() => ({
6700
6741
  theme: n,
6701
- presets: ka,
6742
+ presets: ja,
6702
6743
  setTheme: r,
6703
6744
  setColor: i,
6704
6745
  setRadius: a,
6705
6746
  setDensity: o,
6706
- reset: () => r(Aa),
6747
+ reset: () => r(Ma),
6707
6748
  isCustom: n.id === "custom"
6708
6749
  }), [
6709
6750
  n,
@@ -6711,14 +6752,14 @@ function Fa({ children: e, initial: t }) {
6711
6752
  a,
6712
6753
  o
6713
6754
  ]);
6714
- return /* @__PURE__ */ U(Ma.Provider, {
6755
+ return /* @__PURE__ */ U(Pa.Provider, {
6715
6756
  value: c,
6716
6757
  children: e
6717
6758
  });
6718
6759
  }
6719
6760
  //#endregion
6720
6761
  //#region src/components/ThemeEditor.tsx
6721
- var Ia = (e) => [
6762
+ var Ra = (e) => [
6722
6763
  {
6723
6764
  key: "surface",
6724
6765
  label: e.themeEditorSurface,
@@ -6754,7 +6795,7 @@ var Ia = (e) => [
6754
6795
  label: e.themeEditorSecondary,
6755
6796
  hint: e.themeEditorSecondaryHint
6756
6797
  }
6757
- ], La = [
6798
+ ], za = [
6758
6799
  {
6759
6800
  var: "--color-surface-1",
6760
6801
  label: "surface-1"
@@ -6804,9 +6845,9 @@ var Ia = (e) => [
6804
6845
  label: "on-accent"
6805
6846
  }
6806
6847
  ];
6807
- function Ra({ ratio: e, need: t = 4.5, label: n }) {
6848
+ function Ba({ ratio: e, need: t = 4.5, label: n }) {
6808
6849
  let { strings: r } = q(), i = e >= t;
6809
- return /* @__PURE__ */ U(jt, {
6850
+ return /* @__PURE__ */ U(Nt, {
6810
6851
  content: r.themeEditorContrast(n, e.toFixed(2), t),
6811
6852
  children: /* @__PURE__ */ W("span", {
6812
6853
  className: G("inline-flex h-6 items-center gap-1 rounded-full border px-2 text-2xs font-medium tabular-nums", i ? "border-accent/25 bg-accent/12 text-accent" : "border-danger/25 bg-danger/12 text-danger"),
@@ -6819,13 +6860,13 @@ function Ra({ ratio: e, need: t = 4.5, label: n }) {
6819
6860
  })
6820
6861
  });
6821
6862
  }
6822
- function za({ className: e }) {
6823
- let { strings: t } = q(), { theme: n, presets: r, setTheme: i, setColor: a, setRadius: o, setDensity: s, reset: c, isCustom: l } = Na(), { surface: u, fg: d, accent: p } = n.colors, m = f(() => {
6824
- let e = ya(d, u);
6863
+ function Va({ className: e }) {
6864
+ let { strings: t } = q(), { theme: n, presets: r, setTheme: i, setColor: a, setRadius: o, setDensity: s, reset: c, isCustom: l } = Fa(), { surface: u, fg: d, accent: p } = n.colors, m = f(() => {
6865
+ let e = xa(d, u);
6825
6866
  return {
6826
6867
  body: e,
6827
6868
  muted: (e + 1) / 2,
6828
- accent: ya(p, u)
6869
+ accent: xa(p, u)
6829
6870
  };
6830
6871
  }, [
6831
6872
  d,
@@ -6838,7 +6879,7 @@ function za({ className: e }) {
6838
6879
  /* @__PURE__ */ W("div", {
6839
6880
  className: "flex flex-wrap items-center gap-2",
6840
6881
  children: [
6841
- /* @__PURE__ */ U(Zi, {
6882
+ /* @__PURE__ */ U($i, {
6842
6883
  "aria-label": t.themeEditorPreset,
6843
6884
  size: "sm",
6844
6885
  value: l ? "custom" : n.id,
@@ -6855,7 +6896,7 @@ function za({ className: e }) {
6855
6896
  }] : []]
6856
6897
  }),
6857
6898
  /* @__PURE__ */ U("span", { className: "flex-1" }),
6858
- /* @__PURE__ */ U(Zi, {
6899
+ /* @__PURE__ */ U($i, {
6859
6900
  "aria-label": t.themeEditorDensity,
6860
6901
  size: "sm",
6861
6902
  value: n.density ?? "default",
@@ -6868,7 +6909,7 @@ function za({ className: e }) {
6868
6909
  label: t.themeEditorDensityCompact
6869
6910
  }]
6870
6911
  }),
6871
- /* @__PURE__ */ U(Zi, {
6912
+ /* @__PURE__ */ U($i, {
6872
6913
  "aria-label": t.themeEditorRadius,
6873
6914
  size: "sm",
6874
6915
  value: n.radius ?? "default",
@@ -6899,7 +6940,7 @@ function za({ className: e }) {
6899
6940
  }),
6900
6941
  /* @__PURE__ */ U("div", {
6901
6942
  className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-3",
6902
- children: Ia(t).map((e) => /* @__PURE__ */ W("div", {
6943
+ children: Ra(t).map((e) => /* @__PURE__ */ W("div", {
6903
6944
  className: "space-y-1.5",
6904
6945
  children: [
6905
6946
  /* @__PURE__ */ W("div", {
@@ -6912,7 +6953,7 @@ function za({ className: e }) {
6912
6953
  children: n.colors[e.key]
6913
6954
  })]
6914
6955
  }),
6915
- /* @__PURE__ */ U(nr, {
6956
+ /* @__PURE__ */ U(ir, {
6916
6957
  value: n.colors[e.key] ?? "#000000",
6917
6958
  onChange: (t) => a(e.key, t),
6918
6959
  className: "w-full"
@@ -6927,16 +6968,16 @@ function za({ className: e }) {
6927
6968
  /* @__PURE__ */ W("div", {
6928
6969
  className: "flex flex-wrap items-center gap-2",
6929
6970
  children: [
6930
- /* @__PURE__ */ U(Ra, {
6971
+ /* @__PURE__ */ U(Ba, {
6931
6972
  ratio: m.body,
6932
6973
  label: t.themeEditorBody
6933
6974
  }),
6934
- /* @__PURE__ */ U(Ra, {
6975
+ /* @__PURE__ */ U(Ba, {
6935
6976
  ratio: m.muted,
6936
6977
  need: 4.5,
6937
6978
  label: t.themeEditorMuted
6938
6979
  }),
6939
- /* @__PURE__ */ U(Ra, {
6980
+ /* @__PURE__ */ U(Ba, {
6940
6981
  ratio: m.accent,
6941
6982
  need: 3,
6942
6983
  label: t.themeEditorAccent
@@ -6956,7 +6997,7 @@ function za({ className: e }) {
6956
6997
  }),
6957
6998
  /* @__PURE__ */ U("div", {
6958
6999
  className: "flex flex-wrap gap-2 pt-1",
6959
- children: La.map((e) => /* @__PURE__ */ W("div", {
7000
+ children: za.map((e) => /* @__PURE__ */ W("div", {
6960
7001
  className: "flex items-center gap-2 rounded-lg border border-line bg-fill px-2 py-1.5",
6961
7002
  children: [/* @__PURE__ */ U("span", {
6962
7003
  className: "h-5 w-5 shrink-0 rounded-md ring-1 ring-inset ring-line-2",
@@ -6974,7 +7015,7 @@ function za({ className: e }) {
6974
7015
  }
6975
7016
  //#endregion
6976
7017
  //#region src/components/Timeline.tsx
6977
- var Ba = {
7018
+ var Ha = {
6978
7019
  neutral: "border-line-3 bg-fill-2 text-fg-3",
6979
7020
  accent: "border-accent/45 bg-accent/18 text-accent",
6980
7021
  info: "border-info/40 bg-info/15 text-info",
@@ -6982,7 +7023,7 @@ var Ba = {
6982
7023
  danger: "border-danger/40 bg-danger/15 text-danger",
6983
7024
  secondary: "border-secondary/40 bg-secondary/15 text-secondary"
6984
7025
  };
6985
- function Va({ items: e, className: t }) {
7026
+ function Ua({ items: e, className: t }) {
6986
7027
  return /* @__PURE__ */ U("ol", {
6987
7028
  className: G("relative", t),
6988
7029
  children: e.map((t, n) => /* @__PURE__ */ W("li", {
@@ -6993,7 +7034,7 @@ function Va({ items: e, className: t }) {
6993
7034
  className: "absolute left-3.5 top-8 h-[calc(100%-2rem)] w-px bg-line"
6994
7035
  }),
6995
7036
  /* @__PURE__ */ W("span", {
6996
- className: G("relative z-10 flex h-7 w-7 shrink-0 items-center justify-center rounded-full border", Ba[t.tone ?? "neutral"]),
7037
+ className: G("relative z-10 flex h-7 w-7 shrink-0 items-center justify-center rounded-full border", Ha[t.tone ?? "neutral"]),
6997
7038
  children: [t.active && /* @__PURE__ */ U("span", {
6998
7039
  "aria-hidden": "true",
6999
7040
  className: "absolute inset-0 animate-ping rounded-full bg-current opacity-25 motion-reduce:hidden"
@@ -7021,7 +7062,7 @@ function Va({ items: e, className: t }) {
7021
7062
  }
7022
7063
  //#endregion
7023
7064
  //#region src/components/TitleBar.tsx
7024
- function Ha({ title: e, platform: t = "linux", onMinimize: n, onMaximize: r, onClose: i, children: a, className: o }) {
7065
+ function Wa({ title: e, platform: t = "linux", onMinimize: n, onMaximize: r, onClose: i, children: a, className: o }) {
7025
7066
  let { strings: s } = q(), c = t === "macos";
7026
7067
  return /* @__PURE__ */ W("div", {
7027
7068
  "data-tauri-drag-region": !0,
@@ -7044,7 +7085,7 @@ function Ha({ title: e, platform: t = "linux", onMinimize: n, onMaximize: r, onC
7044
7085
  onClick: n,
7045
7086
  "aria-label": s.titleBarMinimize,
7046
7087
  className: "flex h-9 w-11 items-center justify-center text-fg-3 transition-colors hover:bg-fill-2 hover:text-fg",
7047
- children: /* @__PURE__ */ U(me, { size: 14 })
7088
+ children: /* @__PURE__ */ U(pe, { size: 14 })
7048
7089
  }),
7049
7090
  r && /* @__PURE__ */ U("button", {
7050
7091
  type: "button",
@@ -7067,8 +7108,8 @@ function Ha({ title: e, platform: t = "linux", onMinimize: n, onMaximize: r, onC
7067
7108
  }
7068
7109
  //#endregion
7069
7110
  //#region src/components/Toast.tsx
7070
- var Ua = {
7071
- info: /* @__PURE__ */ U(z, {
7111
+ var Ga = {
7112
+ info: /* @__PURE__ */ U(ue, {
7072
7113
  size: 16,
7073
7114
  className: "text-info"
7074
7115
  }),
@@ -7084,24 +7125,24 @@ var Ua = {
7084
7125
  size: 16,
7085
7126
  className: "text-danger"
7086
7127
  })
7087
- }, Wa = {
7128
+ }, Ka = {
7088
7129
  info: "bg-info",
7089
7130
  success: "bg-accent",
7090
7131
  warning: "bg-warning",
7091
7132
  error: "bg-danger"
7092
- }, Ga = "pointer-events-auto relative flex w-full items-start gap-3 overflow-hidden rounded-xl border border-line bg-surface-2 py-3 pl-4 pr-3 shadow-raised";
7093
- function Ka({ tone: e, title: t, description: n, action: r, secondary: i, onDismiss: a }) {
7133
+ }, qa = "pointer-events-auto relative flex w-full items-start gap-3 overflow-hidden rounded-xl border border-line bg-surface-2 py-3 pl-4 pr-3 shadow-raised";
7134
+ function Ja({ tone: e, title: t, description: n, action: r, secondary: i, onDismiss: a }) {
7094
7135
  let { strings: o } = q(), s = (e) => (t) => {
7095
7136
  t.preventDefault(), t.stopPropagation(), e(), a();
7096
7137
  };
7097
7138
  return /* @__PURE__ */ W(H, { children: [
7098
7139
  /* @__PURE__ */ U("span", {
7099
7140
  "aria-hidden": "true",
7100
- className: G("absolute inset-y-0 left-0 w-0.5", Wa[e])
7141
+ className: G("absolute inset-y-0 left-0 w-0.5", Ka[e])
7101
7142
  }),
7102
7143
  /* @__PURE__ */ U("span", {
7103
7144
  className: "mt-0.5 shrink-0",
7104
- children: Ua[e]
7145
+ children: Ga[e]
7105
7146
  }),
7106
7147
  /* @__PURE__ */ W("div", {
7107
7148
  className: "min-w-0 flex-1",
@@ -7144,10 +7185,10 @@ function Ka({ tone: e, title: t, description: n, action: r, secondary: i, onDism
7144
7185
  })
7145
7186
  ] });
7146
7187
  }
7147
- function qa(e, t, n, r) {
7188
+ function Ya(e, t, n, r) {
7148
7189
  return Ze.custom((i) => /* @__PURE__ */ U("div", {
7149
- className: Ga,
7150
- children: /* @__PURE__ */ U(Ka, {
7190
+ className: qa,
7191
+ children: /* @__PURE__ */ U(Ja, {
7151
7192
  tone: e,
7152
7193
  title: t,
7153
7194
  description: n,
@@ -7160,16 +7201,16 @@ function qa(e, t, n, r) {
7160
7201
  id: r?.id
7161
7202
  });
7162
7203
  }
7163
- function Ja({ id: e, title: t, description: n, progress: r, duration: i }) {
7204
+ function Xa({ id: e, title: t, description: n, progress: r, duration: i }) {
7164
7205
  let a = r === void 0 ? void 0 : Math.round(Math.min(1, Math.max(0, r)) * 100);
7165
7206
  return Ze.custom(() => /* @__PURE__ */ W("div", {
7166
- className: G(Ga, "items-center"),
7207
+ className: G(qa, "items-center"),
7167
7208
  children: [
7168
7209
  /* @__PURE__ */ U("span", {
7169
7210
  "aria-hidden": "true",
7170
7211
  className: "absolute inset-y-0 left-0 w-0.5 bg-accent"
7171
7212
  }),
7172
- /* @__PURE__ */ U(fe, {
7213
+ /* @__PURE__ */ U(B, {
7173
7214
  size: 16,
7174
7215
  className: "shrink-0 animate-spin text-fg-3"
7175
7216
  }),
@@ -7212,16 +7253,16 @@ function Ja({ id: e, title: t, description: n, progress: r, duration: i }) {
7212
7253
  id: e
7213
7254
  });
7214
7255
  }
7215
- var Ya = {
7216
- info: (e, t, n) => qa("info", e, t, n),
7217
- success: (e, t, n) => qa("success", e, t, n),
7218
- warning: (e, t, n) => qa("warning", e, t, n),
7219
- error: (e, t, n) => qa("error", e, t, n),
7220
- progress: Ja,
7256
+ var Za = {
7257
+ info: (e, t, n) => Ya("info", e, t, n),
7258
+ success: (e, t, n) => Ya("success", e, t, n),
7259
+ warning: (e, t, n) => Ya("warning", e, t, n),
7260
+ error: (e, t, n) => Ya("error", e, t, n),
7261
+ progress: Xa,
7221
7262
  dismiss: (e) => Ze.dismiss(e),
7222
7263
  isVisible: (e) => Ze.getToasts().some((t) => t.id === e)
7223
7264
  };
7224
- function Xa({ position: e = "bottom-center", bottomInset: t = 0 } = {}) {
7265
+ function Qa({ position: e = "bottom-center", bottomInset: t = 0 } = {}) {
7225
7266
  return /* @__PURE__ */ U(Xe, {
7226
7267
  position: e,
7227
7268
  gap: 8,
@@ -7242,7 +7283,7 @@ function Xa({ position: e = "bottom-center", bottomInset: t = 0 } = {}) {
7242
7283
  }
7243
7284
  //#endregion
7244
7285
  //#region src/components/ToggleGroup.tsx
7245
- function Za({ options: e, value: t, onChange: n, min: r = 0, size: i = "md", className: a, ...o }) {
7286
+ function $a({ options: e, value: t, onChange: n, min: r = 0, size: i = "md", className: a, ...o }) {
7246
7287
  let s = (e) => {
7247
7288
  if (e.disabled) return;
7248
7289
  let i = t.includes(e.value);
@@ -7273,7 +7314,7 @@ function Za({ options: e, value: t, onChange: n, min: r = 0, size: i = "md", cla
7273
7314
  }
7274
7315
  //#endregion
7275
7316
  //#region src/components/Toolbar.tsx
7276
- function Qa({ variant: e = "bar", className: t, children: n, ...r }) {
7317
+ function eo({ variant: e = "bar", className: t, children: n, ...r }) {
7277
7318
  return /* @__PURE__ */ U("div", {
7278
7319
  role: "toolbar",
7279
7320
  "aria-label": r["aria-label"],
@@ -7287,13 +7328,13 @@ function Qa({ variant: e = "bar", className: t, children: n, ...r }) {
7287
7328
  children: n
7288
7329
  });
7289
7330
  }
7290
- function $a() {
7331
+ function to() {
7291
7332
  return /* @__PURE__ */ U("span", {
7292
7333
  "aria-hidden": "true",
7293
7334
  className: "mx-1 h-5 w-px shrink-0 bg-line"
7294
7335
  });
7295
7336
  }
7296
- function eo({ children: e, className: t }) {
7337
+ function no({ children: e, className: t }) {
7297
7338
  return /* @__PURE__ */ U("div", {
7298
7339
  className: G("flex items-center gap-0.5", t),
7299
7340
  children: e
@@ -7301,8 +7342,8 @@ function eo({ children: e, className: t }) {
7301
7342
  }
7302
7343
  //#endregion
7303
7344
  //#region src/components/Tour.tsx
7304
- var to = 8;
7305
- function no({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7345
+ var ro = 8;
7346
+ function io({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7306
7347
  let { strings: a } = q(), [o, c] = m(0), [u, f] = m(null), p = e[o];
7307
7348
  l(() => {
7308
7349
  t && c(0);
@@ -7346,7 +7387,7 @@ function no({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7346
7387
  left: "50%",
7347
7388
  transform: "translate(-50%, -50%)"
7348
7389
  };
7349
- return qe(/* @__PURE__ */ U(g, { children: t && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(y.div, {
7390
+ return typeof document > "u" ? null : Fe(/* @__PURE__ */ U(g, { children: t && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(y.div, {
7350
7391
  initial: { opacity: 0 },
7351
7392
  animate: { opacity: 1 },
7352
7393
  exit: { opacity: 0 },
@@ -7357,8 +7398,8 @@ function no({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7357
7398
  layout: !0,
7358
7399
  transition: K.surface,
7359
7400
  style: {
7360
- top: u.top - to,
7361
- left: u.left - to,
7401
+ top: u.top - ro,
7402
+ left: u.left - ro,
7362
7403
  width: u.width + 16,
7363
7404
  height: u.height + 16
7364
7405
  },
@@ -7403,7 +7444,7 @@ function no({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7403
7444
  /* @__PURE__ */ W("div", {
7404
7445
  className: "mt-4 flex items-center gap-3",
7405
7446
  children: [
7406
- /* @__PURE__ */ U(ra, {
7447
+ /* @__PURE__ */ U(aa, {
7407
7448
  steps: e.map((e, t) => ({
7408
7449
  id: String(t),
7409
7450
  label: String(e.title)
@@ -7431,7 +7472,7 @@ function no({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7431
7472
  }
7432
7473
  //#endregion
7433
7474
  //#region src/components/Tree.tsx
7434
- function ro({ nodes: e, selectedId: t, onSelect: n, defaultExpanded: r = [], className: i }) {
7475
+ function ao({ nodes: e, selectedId: t, onSelect: n, defaultExpanded: r = [], className: i }) {
7435
7476
  let { strings: a } = q(), [o, s] = m(() => new Set(r)), c = (e) => s((t) => {
7436
7477
  let n = new Set(t);
7437
7478
  return n.has(e) ? n.delete(e) : n.add(e), n;
@@ -7489,7 +7530,7 @@ function ro({ nodes: e, selectedId: t, onSelect: n, defaultExpanded: r = [], cla
7489
7530
  }
7490
7531
  //#endregion
7491
7532
  //#region src/components/VirtualList.tsx
7492
- function io({ items: e, children: t, estimateSize: n = 56, overscan: r = 8, itemKey: i, className: a }) {
7533
+ function oo({ items: e, children: t, estimateSize: n = 56, overscan: r = 8, itemKey: i, className: a }) {
7493
7534
  let o = p(null), s = Qe({
7494
7535
  count: e.length,
7495
7536
  getScrollElement: () => o.current,
@@ -7523,7 +7564,7 @@ function io({ items: e, children: t, estimateSize: n = 56, overscan: r = 8, item
7523
7564
  }
7524
7565
  //#endregion
7525
7566
  //#region src/components/WindowControls.tsx
7526
- var ao = [
7567
+ var so = [
7527
7568
  {
7528
7569
  dir: "North",
7529
7570
  className: "left-2 right-2 top-0 h-1 cursor-n-resize"
@@ -7557,8 +7598,8 @@ var ao = [
7557
7598
  className: "bottom-0 right-0 h-2.5 w-2.5 cursor-se-resize"
7558
7599
  }
7559
7600
  ];
7560
- function oo({ onResizeStart: e, disabled: t }) {
7561
- return t ? null : /* @__PURE__ */ U(H, { children: ao.map(({ dir: t, className: n }) => /* @__PURE__ */ U("div", {
7601
+ function co({ onResizeStart: e, disabled: t }) {
7602
+ return t ? null : /* @__PURE__ */ U(H, { children: so.map(({ dir: t, className: n }) => /* @__PURE__ */ U("div", {
7562
7603
  "aria-hidden": "true",
7563
7604
  "data-tauri-drag-region": "false",
7564
7605
  onPointerDown: (n) => {
@@ -7569,7 +7610,7 @@ function oo({ onResizeStart: e, disabled: t }) {
7569
7610
  }
7570
7611
  //#endregion
7571
7612
  //#region src/components/ActionBar.tsx
7572
- function so({ primary: e, secondary: t, onBack: n, backLabel: r, leading: i, pinned: a, className: o }) {
7613
+ function lo({ primary: e, secondary: t, onBack: n, backLabel: r, leading: i, pinned: a, className: o }) {
7573
7614
  let { strings: s } = q(), c = Ot(), l = a ?? c;
7574
7615
  return /* @__PURE__ */ W("div", {
7575
7616
  className: G("flex items-center gap-2", l ? "sticky bottom-0 z-20 border-t border-line bg-surface/90 px-4 pt-3 pb-[calc(var(--safe-bottom,0px)+0.75rem)] backdrop-blur-md" : "pt-8", o),
@@ -7589,7 +7630,7 @@ function so({ primary: e, secondary: t, onBack: n, backLabel: r, leading: i, pin
7589
7630
  }
7590
7631
  //#endregion
7591
7632
  //#region src/components/ChoiceCard.tsx
7592
- var co = a(function({ selected: e, title: t, description: n, icon: r, meta: i, indicator: a = "radio", children: o, layout: s = "row", className: c, type: l = "button", ...u }, d) {
7633
+ var uo = a(function({ selected: e, title: t, description: n, icon: r, meta: i, indicator: a = "radio", children: o, layout: s = "row", className: c, type: l = "button", ...u }, d) {
7593
7634
  let f = a === "none" ? null : /* @__PURE__ */ U("span", {
7594
7635
  "aria-hidden": "true",
7595
7636
  className: G("flex h-5 w-5 shrink-0 items-center justify-center border transition-colors motion-instant", a === "radio" ? "rounded-full" : "rounded-md", e ? "border-accent bg-accent text-on-accent" : "border-line-3"),
@@ -7639,10 +7680,10 @@ var co = a(function({ selected: e, title: t, description: n, icon: r, meta: i, i
7639
7680
  })]
7640
7681
  });
7641
7682
  });
7642
- co.displayName = "ChoiceCard";
7683
+ uo.displayName = "ChoiceCard";
7643
7684
  //#endregion
7644
7685
  //#region src/components/Shelf.tsx
7645
- function lo({ children: e, itemClassName: t = "w-40", bleed: n = !0, className: r, ...i }) {
7686
+ function fo({ children: e, itemClassName: t = "w-40", bleed: n = !0, className: r, ...i }) {
7646
7687
  let { strings: a } = q(), o = p(null), [s, c] = m({
7647
7688
  start: !1,
7648
7689
  end: !1
@@ -7704,7 +7745,7 @@ function lo({ children: e, itemClassName: t = "w-40", bleed: n = !0, className:
7704
7745
  }
7705
7746
  //#endregion
7706
7747
  //#region src/components/Wizard.tsx
7707
- function uo(e, t = 0) {
7748
+ function po(e, t = 0) {
7708
7749
  let [n, r] = m(t), i = (t) => Math.max(0, Math.min(e.length - 1, t));
7709
7750
  return {
7710
7751
  index: n,
@@ -7716,11 +7757,11 @@ function uo(e, t = 0) {
7716
7757
  goTo: (e) => r(i(e))
7717
7758
  };
7718
7759
  }
7719
- function fo({ steps: e, index: t, onStepClick: n, title: r, description: i, progress: a = "bar", className: o, children: s }) {
7760
+ function mo({ steps: e, index: t, onStepClick: n, title: r, description: i, progress: a = "bar", className: o, children: s }) {
7720
7761
  let c = C(), [l, u] = m(t), d = t >= l ? 1 : -1;
7721
7762
  return l !== t && u(t), /* @__PURE__ */ W("div", {
7722
7763
  className: G("space-y-6", o),
7723
- children: [a !== "none" && /* @__PURE__ */ U(ra, {
7764
+ children: [a !== "none" && /* @__PURE__ */ U(aa, {
7724
7765
  steps: e,
7725
7766
  current: t,
7726
7767
  onStepClick: n,
@@ -7760,7 +7801,7 @@ function fo({ steps: e, index: t, onStepClick: n, title: r, description: i, prog
7760
7801
  }
7761
7802
  //#endregion
7762
7803
  //#region src/components/SecretInput.tsx
7763
- var po = a(function({ value: e, onChange: t, status: n = { state: "idle" }, paste: r = !0, className: i, id: a, disabled: o, ...s }, c) {
7804
+ var ho = a(function({ value: e, onChange: t, status: n = { state: "idle" }, paste: r = !0, className: i, id: a, disabled: o, ...s }, c) {
7764
7805
  let { strings: l } = q(), u = Y(), [d, f] = m(!1), p = r && typeof navigator < "u" && !!navigator.clipboard?.readText, h = async () => {
7765
7806
  try {
7766
7807
  let e = (await navigator.clipboard.readText()).trim();
@@ -7791,7 +7832,7 @@ var po = a(function({ value: e, onChange: t, status: n = { state: "idle" }, past
7791
7832
  size: "sm",
7792
7833
  disabled: o,
7793
7834
  onClick: h,
7794
- children: /* @__PURE__ */ U(ne, { size: Z.sm })
7835
+ children: /* @__PURE__ */ U(I, { size: Z.sm })
7795
7836
  }),
7796
7837
  e && /* @__PURE__ */ U(J, {
7797
7838
  label: l.secretInputClear,
@@ -7806,7 +7847,7 @@ var po = a(function({ value: e, onChange: t, status: n = { state: "idle" }, past
7806
7847
  active: d,
7807
7848
  disabled: o,
7808
7849
  onClick: () => f((e) => !e),
7809
- children: U(d ? ce : se, { size: Z.sm })
7850
+ children: U(d ? se : oe, { size: Z.sm })
7810
7851
  })
7811
7852
  ]
7812
7853
  })]
@@ -7821,10 +7862,10 @@ var po = a(function({ value: e, onChange: t, status: n = { state: "idle" }, past
7821
7862
  ]
7822
7863
  })] });
7823
7864
  });
7824
- po.displayName = "SecretInput";
7865
+ ho.displayName = "SecretInput";
7825
7866
  //#endregion
7826
7867
  //#region src/components/ReorderableList.tsx
7827
- function mo({ items: e, onReorder: t, keyOf: n, children: r, axis: i = "y", handleOnly: a = !0, className: o, itemClassName: s, ...c }) {
7868
+ function go({ items: e, onReorder: t, keyOf: n, children: r, axis: i = "y", handleOnly: a = !0, className: o, itemClassName: s, ...c }) {
7828
7869
  let l = (n, r) => {
7829
7870
  if (r < 0 || r >= e.length || n === r) return;
7830
7871
  let i = [...e], [a] = i.splice(n, 1);
@@ -7836,7 +7877,7 @@ function mo({ items: e, onReorder: t, keyOf: n, children: r, axis: i = "y", hand
7836
7877
  onReorder: t,
7837
7878
  "aria-label": c["aria-label"],
7838
7879
  className: G("flex", i === "y" ? "flex-col gap-2" : "flex-row gap-2", o),
7839
- children: e.map((t, o) => /* @__PURE__ */ U(ho, {
7880
+ children: e.map((t, o) => /* @__PURE__ */ U(_o, {
7840
7881
  item: t,
7841
7882
  index: o,
7842
7883
  count: e.length,
@@ -7848,7 +7889,7 @@ function mo({ items: e, onReorder: t, keyOf: n, children: r, axis: i = "y", hand
7848
7889
  }, n(t)))
7849
7890
  });
7850
7891
  }
7851
- function ho({ item: e, index: t, count: n, handleOnly: r, axis: i, onMove: a, className: o, children: s }) {
7892
+ function _o({ item: e, index: t, count: n, handleOnly: r, axis: i, onMove: a, className: o, children: s }) {
7852
7893
  let { strings: c } = q(), l = b(), u = C(), d = /* @__PURE__ */ U("button", {
7853
7894
  type: "button",
7854
7895
  "aria-label": c.reorderableHandle(t + 1, n),
@@ -7859,7 +7900,7 @@ function ho({ item: e, index: t, count: n, handleOnly: r, axis: i, onMove: a, cl
7859
7900
  },
7860
7901
  onPointerDown: (e) => l.start(e),
7861
7902
  className: "tap-target flex h-8 w-6 shrink-0 cursor-grab touch-none items-center justify-center rounded-md text-fg-4 hover:bg-fill-2 hover:text-fg-2 active:cursor-grabbing",
7862
- children: /* @__PURE__ */ U(ue, { size: Z.md })
7903
+ children: /* @__PURE__ */ U(le, { size: Z.md })
7863
7904
  });
7864
7905
  return /* @__PURE__ */ U(_.Item, {
7865
7906
  value: e,
@@ -7878,21 +7919,21 @@ function ho({ item: e, index: t, count: n, handleOnly: r, axis: i, onMove: a, cl
7878
7919
  }
7879
7920
  //#endregion
7880
7921
  //#region src/components/AvatarPicker.tsx
7881
- function go({ value: e, onChange: t, name: n = "?", size: r = "xl", output: i = 512, crop: a = !0, disabled: o, className: s }) {
7922
+ function vo({ value: e, onChange: t, name: n = "?", size: r = "xl", output: i = 512, crop: a = !0, disabled: o, className: s }) {
7882
7923
  let { strings: c } = q(), [l, u] = m(null), d = (e) => {
7883
7924
  let n = new FileReader();
7884
7925
  n.onload = () => a ? u(String(n.result)) : t(String(n.result)), n.readAsDataURL(e);
7885
7926
  };
7886
7927
  return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ W("div", {
7887
7928
  className: G("relative w-fit", s),
7888
- children: [/* @__PURE__ */ U(qr, {
7929
+ children: [/* @__PURE__ */ U(Yr, {
7889
7930
  accept: "image/*",
7890
7931
  disabled: o,
7891
7932
  onFiles: ([e]) => e && d(e),
7892
7933
  className: "rounded-full p-0",
7893
7934
  children: /* @__PURE__ */ W("div", {
7894
7935
  className: "relative",
7895
- children: [/* @__PURE__ */ U(Jt, {
7936
+ children: [/* @__PURE__ */ U(Xt, {
7896
7937
  src: e ?? void 0,
7897
7938
  name: n,
7898
7939
  size: r,
@@ -7910,7 +7951,7 @@ function go({ value: e, onChange: t, name: n = "?", size: r = "xl", output: i =
7910
7951
  className: "absolute -left-1 -top-1 flex h-7 w-7 items-center justify-center rounded-full border border-line-2 bg-surface-2 text-fg-3 shadow-raised hover:text-danger",
7911
7952
  children: /* @__PURE__ */ U(De, { size: Z.xs })
7912
7953
  })]
7913
- }), /* @__PURE__ */ U(vo, {
7954
+ }), /* @__PURE__ */ U(bo, {
7914
7955
  src: l,
7915
7956
  output: i,
7916
7957
  onClose: () => u(null),
@@ -7919,8 +7960,8 @@ function go({ value: e, onChange: t, name: n = "?", size: r = "xl", output: i =
7919
7960
  }
7920
7961
  })] });
7921
7962
  }
7922
- var _o = 288;
7923
- function vo({ src: e, output: t, onClose: n, onDone: r }) {
7963
+ var yo = 288;
7964
+ function bo({ src: e, output: t, onClose: n, onDone: r }) {
7924
7965
  let { strings: i } = q(), [a, o] = m(null), [s, c] = m(1), [u, d] = m({
7925
7966
  x: 0,
7926
7967
  y: 0
@@ -7938,12 +7979,12 @@ function vo({ src: e, output: t, onClose: n, onDone: r }) {
7938
7979
  });
7939
7980
  }, t.src = e;
7940
7981
  }, [e]);
7941
- let h = (a ? Math.max(_o / a.width, _o / a.height) : 1) * s, g = (a?.width ?? 0) * h, _ = (a?.height ?? 0) * h, v = ((e) => ({
7942
- x: Math.min(Math.max(e.x, _o - g), 0),
7943
- y: Math.min(Math.max(e.y, _o - _), 0)
7982
+ let h = (a ? Math.max(yo / a.width, yo / a.height) : 1) * s, g = (a?.width ?? 0) * h, _ = (a?.height ?? 0) * h, v = ((e) => ({
7983
+ x: Math.min(Math.max(e.x, yo - g), 0),
7984
+ y: Math.min(Math.max(e.y, yo - _), 0)
7944
7985
  }))({
7945
- x: u.x + (_o - g) / 2,
7946
- y: u.y + (_o - _) / 2
7986
+ x: u.x + (yo - g) / 2,
7987
+ y: u.y + (yo - _) / 2
7947
7988
  }), y = (e) => {
7948
7989
  f.current = {
7949
7990
  x: e.clientX,
@@ -7959,7 +8000,7 @@ function vo({ src: e, output: t, onClose: n, onDone: r }) {
7959
8000
  }, x = () => {
7960
8001
  f.current = null;
7961
8002
  };
7962
- return /* @__PURE__ */ U(Pr, {
8003
+ return /* @__PURE__ */ U(Ir, {
7963
8004
  open: !!e,
7964
8005
  onClose: n,
7965
8006
  title: i.avatarPickerTitle,
@@ -7977,7 +8018,7 @@ function vo({ src: e, output: t, onClose: n, onDone: r }) {
7977
8018
  if (!a) return;
7978
8019
  let e = document.createElement("canvas");
7979
8020
  e.width = t, e.height = t;
7980
- let n = e.getContext("2d"), i = t / _o;
8021
+ let n = e.getContext("2d"), i = t / yo;
7981
8022
  n.drawImage(a, v.x * i, v.y * i, g * i, _ * i), r(e.toDataURL("image/webp", .9));
7982
8023
  },
7983
8024
  children: i.avatarPickerUse
@@ -7992,8 +8033,8 @@ function vo({ src: e, output: t, onClose: n, onDone: r }) {
7992
8033
  onPointerCancel: x,
7993
8034
  className: "relative cursor-grab touch-none select-none overflow-hidden rounded-2xl bg-black active:cursor-grabbing",
7994
8035
  style: {
7995
- width: _o,
7996
- height: _o
8036
+ width: yo,
8037
+ height: yo
7997
8038
  },
7998
8039
  children: [
7999
8040
  a && /* @__PURE__ */ U("img", {
@@ -8022,7 +8063,7 @@ function vo({ src: e, output: t, onClose: n, onDone: r }) {
8022
8063
  children: [/* @__PURE__ */ U(je, {
8023
8064
  size: Z.md,
8024
8065
  className: "shrink-0 text-fg-3"
8025
- }), /* @__PURE__ */ U(ea, {
8066
+ }), /* @__PURE__ */ U(na, {
8026
8067
  "aria-label": i.avatarPickerZoom,
8027
8068
  value: s,
8028
8069
  onChange: c,
@@ -8037,7 +8078,7 @@ function vo({ src: e, output: t, onClose: n, onDone: r }) {
8037
8078
  }
8038
8079
  //#endregion
8039
8080
  //#region src/components/Page.tsx
8040
- function yo({ footer: e, mainRef: t, padding: n = "default", contentClassName: r, className: i, children: a, ...o }) {
8081
+ function xo({ footer: e, mainRef: t, padding: n = "default", contentClassName: r, className: i, children: a, ...o }) {
8041
8082
  return /* @__PURE__ */ W("div", {
8042
8083
  className: G("flex h-full min-h-0 flex-col", i),
8043
8084
  children: [/* @__PURE__ */ W("main", {
@@ -8055,7 +8096,7 @@ function yo({ footer: e, mainRef: t, padding: n = "default", contentClassName: r
8055
8096
  }
8056
8097
  //#endregion
8057
8098
  //#region src/components/ModelSelect.tsx
8058
- var bo = (e, t) => /* @__PURE__ */ W("span", {
8099
+ var So = (e, t) => /* @__PURE__ */ W("span", {
8059
8100
  className: "flex items-center gap-1",
8060
8101
  children: [e.vision && /* @__PURE__ */ U(ut, {
8061
8102
  tone: "info",
@@ -8065,23 +8106,23 @@ var bo = (e, t) => /* @__PURE__ */ W("span", {
8065
8106
  children: t.modelSelectAudio
8066
8107
  })]
8067
8108
  });
8068
- function xo({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, footer: a, disabled: o, id: s, className: c, ...l }) {
8109
+ function Co({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, footer: a, disabled: o, id: s, className: c, ...l }) {
8069
8110
  let { strings: u } = q(), d = Ot(), [p, h] = m(!1), g = e.find((e) => e.id === t) ?? null, _ = f(() => e.map((e) => ({
8070
8111
  value: e.id,
8071
8112
  label: e.name,
8072
8113
  description: e.meta,
8073
8114
  group: e.provider,
8074
- icon: e.local ? /* @__PURE__ */ U(ie, { size: Z.md }) : /* @__PURE__ */ U(le, { size: Z.md }),
8115
+ icon: e.local ? /* @__PURE__ */ U(R, { size: Z.md }) : /* @__PURE__ */ U(ce, { size: Z.md }),
8075
8116
  meta: /* @__PURE__ */ W("span", {
8076
8117
  className: "flex items-center gap-1",
8077
- children: [bo(e, u), e.id === i && /* @__PURE__ */ U(ut, {
8118
+ children: [So(e, u), e.id === i && /* @__PURE__ */ U(ut, {
8078
8119
  tone: "accent",
8079
8120
  dot: !0,
8080
8121
  children: u.modelSelectDefault
8081
8122
  })]
8082
8123
  })
8083
8124
  })), [e, i]);
8084
- if (!d) return /* @__PURE__ */ U($i, {
8125
+ if (!d) return /* @__PURE__ */ U(ta, {
8085
8126
  id: s,
8086
8127
  options: _,
8087
8128
  value: t,
@@ -8103,7 +8144,7 @@ function xo({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, fo
8103
8144
  children: [
8104
8145
  /* @__PURE__ */ U("span", {
8105
8146
  className: "shrink-0 text-fg-3",
8106
- children: g?.local ? /* @__PURE__ */ U(ie, { size: Z.md }) : /* @__PURE__ */ U(le, { size: Z.md })
8147
+ children: g?.local ? /* @__PURE__ */ U(R, { size: Z.md }) : /* @__PURE__ */ U(ce, { size: Z.md })
8107
8148
  }),
8108
8149
  /* @__PURE__ */ U("span", {
8109
8150
  className: G("min-w-0 flex-1 truncate", !g && "text-fg-4"),
@@ -8111,31 +8152,31 @@ function xo({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, fo
8111
8152
  }),
8112
8153
  g && /* @__PURE__ */ U("span", {
8113
8154
  className: "hidden @sm:flex",
8114
- children: bo(g, u)
8155
+ children: So(g, u)
8115
8156
  }),
8116
8157
  /* @__PURE__ */ U(N, {
8117
8158
  size: Z.md,
8118
8159
  className: "shrink-0 text-fg-3"
8119
8160
  })
8120
8161
  ]
8121
- }), /* @__PURE__ */ U(Cr, {
8162
+ }), /* @__PURE__ */ U(Tr, {
8122
8163
  open: p,
8123
8164
  onClose: () => h(!1),
8124
8165
  title: l["aria-label"] ?? u.modelSelectTitle,
8125
8166
  detents: [.6, .92],
8126
8167
  children: /* @__PURE__ */ W("div", {
8127
8168
  className: "space-y-5",
8128
- children: [v.map((r) => /* @__PURE__ */ U(ci, {
8169
+ children: [v.map((r) => /* @__PURE__ */ U(ui, {
8129
8170
  label: r,
8130
- children: e.filter((e) => e.provider === r).map((e) => /* @__PURE__ */ U(pi, {
8131
- icon: e.local ? /* @__PURE__ */ U(ie, { size: Z.lg }) : /* @__PURE__ */ U(le, { size: Z.lg }),
8171
+ children: e.filter((e) => e.provider === r).map((e) => /* @__PURE__ */ U(hi, {
8172
+ icon: e.local ? /* @__PURE__ */ U(R, { size: Z.lg }) : /* @__PURE__ */ U(ce, { size: Z.lg }),
8132
8173
  tone: e.local ? "accent" : "info",
8133
8174
  title: e.name,
8134
8175
  description: /* @__PURE__ */ W("span", {
8135
8176
  className: "flex flex-wrap items-center gap-1.5",
8136
8177
  children: [
8137
8178
  e.meta,
8138
- bo(e, u),
8179
+ So(e, u),
8139
8180
  e.id === i && /* @__PURE__ */ U(ut, {
8140
8181
  tone: "accent",
8141
8182
  dot: !0,
@@ -8158,7 +8199,7 @@ function xo({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, fo
8158
8199
  }
8159
8200
  //#endregion
8160
8201
  //#region src/components/Citation.tsx
8161
- function So({ index: e, title: t, url: n, snippet: r, domain: i, favicon: a, className: o }) {
8202
+ function wo({ index: e, title: t, url: n, snippet: r, domain: i, favicon: a, className: o }) {
8162
8203
  let { strings: s } = q(), c = Ot(), [l, u] = m(!1), d = i ?? (n ? (() => {
8163
8204
  try {
8164
8205
  return new URL(n).hostname.replace(/^www\./, "");
@@ -8182,7 +8223,7 @@ function So({ index: e, title: t, url: n, snippet: r, domain: i, favicon: a, cla
8182
8223
  src: a,
8183
8224
  alt: "",
8184
8225
  className: "h-4 w-4 rounded-sm object-contain"
8185
- }) : /* @__PURE__ */ U(le, { size: Z.xs })
8226
+ }) : /* @__PURE__ */ U(ce, { size: Z.xs })
8186
8227
  }), /* @__PURE__ */ W("div", {
8187
8228
  className: "min-w-0 flex-1",
8188
8229
  children: [/* @__PURE__ */ U("p", {
@@ -8207,11 +8248,11 @@ function So({ index: e, title: t, url: n, snippet: r, domain: i, favicon: a, cla
8207
8248
  target: "_blank",
8208
8249
  rel: "noopener noreferrer",
8209
8250
  className: "inline-flex items-center gap-1.5 text-xs font-medium text-accent hover:underline",
8210
- children: [/* @__PURE__ */ U("span", { children: s.citationVisit }), /* @__PURE__ */ U(oe, { size: 12 })]
8251
+ children: [/* @__PURE__ */ U("span", { children: s.citationVisit }), /* @__PURE__ */ U(ae, { size: 12 })]
8211
8252
  })
8212
8253
  ]
8213
8254
  });
8214
- return c ? /* @__PURE__ */ W(H, { children: [f, /* @__PURE__ */ U(Cr, {
8255
+ return c ? /* @__PURE__ */ W(H, { children: [f, /* @__PURE__ */ U(Tr, {
8215
8256
  open: l,
8216
8257
  onClose: () => u(!1),
8217
8258
  title: `[${e}] ${d ?? "Source"}`,
@@ -8219,7 +8260,7 @@ function So({ index: e, title: t, url: n, snippet: r, domain: i, favicon: a, cla
8219
8260
  className: "pb-2",
8220
8261
  children: p
8221
8262
  })
8222
- })] }) : /* @__PURE__ */ U(ri, {
8263
+ })] }) : /* @__PURE__ */ U(ai, {
8223
8264
  content: /* @__PURE__ */ U("div", {
8224
8265
  className: "w-72",
8225
8266
  children: p
@@ -8227,10 +8268,10 @@ function So({ index: e, title: t, url: n, snippet: r, domain: i, favicon: a, cla
8227
8268
  children: f
8228
8269
  });
8229
8270
  }
8230
- So.displayName = "Citation";
8271
+ wo.displayName = "Citation";
8231
8272
  //#endregion
8232
8273
  //#region src/components/FeedbackAction.tsx
8233
- function Co({ sentiment: e = null, onLike: t, onDislike: n, onCopy: r, copyText: i, onRetry: a, children: o, className: s }) {
8274
+ function To({ sentiment: e = null, onLike: t, onDislike: n, onCopy: r, copyText: i, onRetry: a, children: o, className: s }) {
8234
8275
  let { strings: c } = q(), [l, u] = m(!1);
8235
8276
  return /* @__PURE__ */ W("div", {
8236
8277
  className: G("inline-flex items-center gap-1 text-fg-3", s),
@@ -8273,7 +8314,7 @@ function Co({ sentiment: e = null, onLike: t, onDislike: n, onCopy: r, copyText:
8273
8314
  } catch {}
8274
8315
  },
8275
8316
  className: G(l && "text-accent"),
8276
- children: U(l ? M : R, { size: Z.xs })
8317
+ children: U(l ? M : L, { size: Z.xs })
8277
8318
  }),
8278
8319
  a && /* @__PURE__ */ U(J, {
8279
8320
  size: "sm",
@@ -8286,16 +8327,16 @@ function Co({ sentiment: e = null, onLike: t, onDislike: n, onCopy: r, copyText:
8286
8327
  ]
8287
8328
  });
8288
8329
  }
8289
- Co.displayName = "FeedbackAction";
8330
+ To.displayName = "FeedbackAction";
8290
8331
  //#endregion
8291
8332
  //#region src/components/PromptSuggestions.tsx
8292
- var wo = {
8333
+ var Eo = {
8293
8334
  1: "grid-cols-1",
8294
8335
  2: "grid-cols-1 @sm:grid-cols-2",
8295
8336
  3: "grid-cols-1 @sm:grid-cols-2 @lg:grid-cols-3",
8296
8337
  4: "grid-cols-1 @sm:grid-cols-2 @lg:grid-cols-4"
8297
8338
  };
8298
- function To({ prompts: e, onSelect: t, title: n, columns: r = 2, className: i }) {
8339
+ function Do({ prompts: e, onSelect: t, title: n, columns: r = 2, className: i }) {
8299
8340
  let { strings: a } = q(), o = n ?? /* @__PURE__ */ W("span", {
8300
8341
  className: "flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-3",
8301
8342
  children: [/* @__PURE__ */ U(Ce, {
@@ -8306,7 +8347,7 @@ function To({ prompts: e, onSelect: t, title: n, columns: r = 2, className: i })
8306
8347
  return /* @__PURE__ */ W("div", {
8307
8348
  className: G("@container w-full space-y-3", i),
8308
8349
  children: [o && /* @__PURE__ */ U("div", { children: o }), /* @__PURE__ */ U("div", {
8309
- className: G("grid gap-2.5", wo[r]),
8350
+ className: G("grid gap-2.5", Eo[r]),
8310
8351
  children: e.map((e) => /* @__PURE__ */ W("button", {
8311
8352
  type: "button",
8312
8353
  onClick: () => t(e.prompt, e),
@@ -8335,10 +8376,10 @@ function To({ prompts: e, onSelect: t, title: n, columns: r = 2, className: i })
8335
8376
  })]
8336
8377
  });
8337
8378
  }
8338
- To.displayName = "PromptSuggestions";
8379
+ Do.displayName = "PromptSuggestions";
8339
8380
  //#endregion
8340
8381
  //#region src/components/OtpInput.tsx
8341
- var Eo = a(function({ length: e = 6, value: t = "", onChange: n, onComplete: r, type: i = "number", mask: a = !1, disabled: o = !1, autoFocus: c = !1, className: l, id: u }, d) {
8382
+ var Oo = a(function({ length: e = 6, value: t = "", onChange: n, onComplete: r, type: i = "number", mask: a = !1, disabled: o = !1, autoFocus: c = !1, className: l, id: u }, d) {
8342
8383
  let { strings: f } = q(), m = Y(), h = p([]), g = Array.from({ length: e }, (e, n) => t[n] ?? ""), _ = s((t) => {
8343
8384
  let n = Math.max(0, Math.min(e - 1, t));
8344
8385
  h.current[n]?.focus(), h.current[n]?.select();
@@ -8398,39 +8439,39 @@ var Eo = a(function({ length: e = 6, value: t = "", onChange: n, onComplete: r,
8398
8439
  }, n))
8399
8440
  });
8400
8441
  });
8401
- Eo.displayName = "OtpInput";
8442
+ Oo.displayName = "OtpInput";
8402
8443
  //#endregion
8403
8444
  //#region src/layout/Box.tsx
8404
- var Do = a(function({ as: e, className: t, ...n }, r) {
8445
+ var ko = a(function({ as: e, className: t, ...n }, r) {
8405
8446
  return /* @__PURE__ */ U(e ?? "div", {
8406
8447
  ref: r,
8407
8448
  className: G(t),
8408
8449
  ...n
8409
8450
  });
8410
- }), Oo = a(function({ as: e, className: t, ...n }, r) {
8451
+ }), Ao = a(function({ as: e, className: t, ...n }, r) {
8411
8452
  return /* @__PURE__ */ U(e ?? "div", {
8412
8453
  ref: r,
8413
8454
  className: G("flex items-center justify-center", t),
8414
8455
  ...n
8415
8456
  });
8416
- }), ko = {
8457
+ }), jo = {
8417
8458
  sm: "max-w-screen-sm",
8418
8459
  md: "max-w-screen-md",
8419
8460
  lg: "max-w-screen-lg",
8420
8461
  xl: "max-w-screen-xl",
8421
8462
  prose: "max-w-prose"
8422
- }, Ao = a(function({ as: e, size: t = "lg", flush: n, className: r, ...i }, a) {
8463
+ }, Mo = a(function({ as: e, size: t = "lg", flush: n, className: r, ...i }, a) {
8423
8464
  return /* @__PURE__ */ U(e ?? "div", {
8424
8465
  ref: a,
8425
- className: G("mx-auto w-full", ko[t], !n && "px-4 sm:px-6", r),
8466
+ className: G("mx-auto w-full", jo[t], !n && "px-4 sm:px-6", r),
8426
8467
  ...i
8427
8468
  });
8428
- }), jo = {
8469
+ }), No = {
8429
8470
  none: "",
8430
8471
  sm: "my-2",
8431
8472
  md: "my-4",
8432
8473
  lg: "my-8"
8433
- }, Mo = a(function({ orientation: e = "horizontal", label: t, spacing: n = "none", className: r, ...i }, a) {
8474
+ }, Po = a(function({ orientation: e = "horizontal", label: t, spacing: n = "none", className: r, ...i }, a) {
8434
8475
  return e === "vertical" ? /* @__PURE__ */ U("div", {
8435
8476
  ref: a,
8436
8477
  role: "separator",
@@ -8440,7 +8481,7 @@ var Do = a(function({ as: e, className: t, ...n }, r) {
8440
8481
  }) : t ? /* @__PURE__ */ W("div", {
8441
8482
  ref: a,
8442
8483
  role: "separator",
8443
- className: G("flex items-center gap-3", jo[n], r),
8484
+ className: G("flex items-center gap-3", No[n], r),
8444
8485
  ...i,
8445
8486
  children: [
8446
8487
  /* @__PURE__ */ U("span", { className: "h-px flex-1 bg-line" }),
@@ -8453,10 +8494,10 @@ var Do = a(function({ as: e, className: t, ...n }, r) {
8453
8494
  }) : /* @__PURE__ */ U("div", {
8454
8495
  ref: a,
8455
8496
  role: "separator",
8456
- className: G("h-px w-full bg-line", jo[n], r),
8497
+ className: G("h-px w-full bg-line", No[n], r),
8457
8498
  ...i
8458
8499
  });
8459
- }), No = {
8500
+ }), Fo = {
8460
8501
  0: "gap-0",
8461
8502
  .5: "gap-0.5",
8462
8503
  1: "gap-1",
@@ -8471,31 +8512,31 @@ var Do = a(function({ as: e, className: t, ...n }, r) {
8471
8512
  10: "gap-10",
8472
8513
  12: "gap-12",
8473
8514
  16: "gap-16"
8474
- }, Po = {
8515
+ }, Io = {
8475
8516
  start: "items-start",
8476
8517
  center: "items-center",
8477
8518
  end: "items-end",
8478
8519
  stretch: "items-stretch",
8479
8520
  baseline: "items-baseline"
8480
- }, Fo = {
8521
+ }, Lo = {
8481
8522
  start: "justify-start",
8482
8523
  center: "justify-center",
8483
8524
  end: "justify-end",
8484
8525
  between: "justify-between",
8485
8526
  around: "justify-around",
8486
8527
  evenly: "justify-evenly"
8487
- }, Io = {
8528
+ }, Ro = {
8488
8529
  row: "flex-row",
8489
8530
  column: "flex-col",
8490
8531
  "row-reverse": "flex-row-reverse",
8491
8532
  "column-reverse": "flex-col-reverse"
8492
- }, Lo = a(function({ as: e, direction: t = "row", align: n, justify: r, wrap: i, gap: a, inline: o, className: s, ...c }, l) {
8533
+ }, zo = a(function({ as: e, direction: t = "row", align: n, justify: r, wrap: i, gap: a, inline: o, className: s, ...c }, l) {
8493
8534
  return /* @__PURE__ */ U(e ?? "div", {
8494
8535
  ref: l,
8495
- className: G(o ? "inline-flex" : "flex", Io[t], n && Po[n], r && Fo[r], i && "flex-wrap", a !== void 0 && No[a], s),
8536
+ className: G(o ? "inline-flex" : "flex", Ro[t], n && Io[n], r && Lo[r], i && "flex-wrap", a !== void 0 && Fo[a], s),
8496
8537
  ...c
8497
8538
  });
8498
- }), Ro = {
8539
+ }), Bo = {
8499
8540
  base: {
8500
8541
  1: "grid-cols-1",
8501
8542
  2: "grid-cols-2",
@@ -8541,11 +8582,11 @@ var Do = a(function({ as: e, className: t, ...n }, r) {
8541
8582
  6: "xl:grid-cols-6",
8542
8583
  12: "xl:grid-cols-12"
8543
8584
  }
8544
- }, zo = a(function({ as: e, columns: t, gap: n = 4, minChildWidth: r, className: i, style: a, ...o }, s) {
8545
- let c = e ?? "div", l = t === void 0 ? null : typeof t == "number" ? Ro.base[t] : Object.entries(t).map(([e, t]) => Ro[e][t]);
8585
+ }, Vo = a(function({ as: e, columns: t, gap: n = 4, minChildWidth: r, className: i, style: a, ...o }, s) {
8586
+ let c = e ?? "div", l = t === void 0 ? null : typeof t == "number" ? Bo.base[t] : Object.entries(t).map(([e, t]) => Bo[e][t]);
8546
8587
  return /* @__PURE__ */ U(c, {
8547
8588
  ref: s,
8548
- className: G("grid", No[n], l, i),
8589
+ className: G("grid", Fo[n], l, i),
8549
8590
  style: r ? {
8550
8591
  gridTemplateColumns: `repeat(auto-fit, minmax(min(${r}, 100%), 1fr))`,
8551
8592
  ...a
@@ -8555,7 +8596,7 @@ var Do = a(function({ as: e, className: t, ...n }, r) {
8555
8596
  });
8556
8597
  //#endregion
8557
8598
  //#region src/layout/Spacer.tsx
8558
- function Bo({ className: e }) {
8599
+ function Ho({ className: e }) {
8559
8600
  return /* @__PURE__ */ U("div", {
8560
8601
  "aria-hidden": "true",
8561
8602
  className: G("flex-1", e)
@@ -8563,21 +8604,21 @@ function Bo({ className: e }) {
8563
8604
  }
8564
8605
  //#endregion
8565
8606
  //#region src/layout/Stack.tsx
8566
- function Vo(e, t, n) {
8607
+ function Uo(e, t, n) {
8567
8608
  let r = a(function({ as: e, gap: r = n.gap, align: i = n.align, justify: a, wrap: o, className: s, ...c }, l) {
8568
8609
  return /* @__PURE__ */ U(e ?? "div", {
8569
8610
  ref: l,
8570
- className: G("flex", t === "column" ? "flex-col" : "flex-row", No[r], i && Po[i], a && Fo[a], o && "flex-wrap", s),
8611
+ className: G("flex", t === "column" ? "flex-col" : "flex-row", Fo[r], i && Io[i], a && Lo[a], o && "flex-wrap", s),
8571
8612
  ...c
8572
8613
  });
8573
8614
  });
8574
8615
  return r.displayName = e, r;
8575
8616
  }
8576
- var Ho = Vo("Stack", "column", { gap: 4 }), Uo = Ho, Wo = Vo("HStack", "row", {
8617
+ var Wo = Uo("Stack", "column", { gap: 4 }), Go = Wo, Ko = Uo("HStack", "row", {
8577
8618
  gap: 3,
8578
8619
  align: "center"
8579
8620
  });
8580
8621
  //#endregion
8581
- export { st as Accordion, ct as AccordionItem, so as ActionBar, ht as Alert, St as AppBar, Ut as AppShell, Wi as AspectRatio, Gt as AudioItem, Jt as Avatar, Xt as AvatarGroup, go as AvatarPicker, ut as Badge, $t as Banner, wr as BottomMenu, Do as Box, un as Breadcrumb, Q as Button, hn as ButtonGroup, Mn as CHART_SERIES, jr as Calendar, yn as Card, bn as CardButton, xn as Carousel, Oo as Center, An as CharacterCard, jn as CharacterCardSkeleton, Fn as Chart, Be as ChartCell, Rn as Checkbox, zn as Chip, co as ChoiceCard, So as Citation, Un as CodeBlock, Wn as Collapsible, nr as ColorPicker, or as Combobox, ur as CommandPalette, pr as Composer, Dr as ConfirmHost, Ao as Container, Or as ContextMenu, Bn as CopyButton, pt as CrispStringsProvider, Aa as DEFAULT_THEME, Mr as DatePicker, Pr as Dialog, Lr as Diff, Mo as Divider, Pt as Dock, Kr as DownloadItem, qr as Dropzone, Jr as EmptyState, Yr as ErrorState, Co as FeedbackAction, yt as Field, Zr as FilterBar, Lo as Flex, ei as Form, ti as FormActions, wt as FrameProvider, zo as Grid, Wo as HStack, cr as Highlight, ri as HoverCard, ii as ICON_SIZE, ai as Icon, J as IconButton, oi as ImageViewer, si as InfiniteScroll, bt as Input, lr as Kbd, na as KeyValue, ci as ListGroup, fi as ListRow, pi as ListRowButton, ar as LoadingState, mi as Masonry, gi as MediaCard, _i as MediaCardSkeleton, vi as MediaTile, yi as MediaTileSkeleton, tn as Menu, an as MenuContent, on as MenuItem, cn as MenuLabel, sn as MenuSeparator, rn as MenuTrigger, Di as Message, Ai as MessageDivider, ji as Meter, xo as ModelSelect, Ni as MultiItemDownloadCard, Mt as NavBadge, zt as NavLabel, Bt as NavRail, Pi as NumberInput, Eo as OtpInput, ka as PRESETS, yo as Page, Ii as Pagination, zi as Panel, Hi as PartitionBar, Yn as Popover, Zn as PopoverAnchor, $n as PopoverContent, Xn as PopoverTrigger, zr as Progress, To as PromptSuggestions, Gi as Prose, Ji as Radio, qi as RadioGroup, hr as RecordingWave, mo as ReorderableList, Yi as Resizable, Hn as ScrollArea, Xi as SearchField, po as SecretInput, Zi as Segmented, Qi as Select, $i as SelectMenu, Cr as Sheet, lo as Shelf, $ as Skeleton, kn as SkeletonRow, ea as Slider, Bo as Spacer, In as Sparkline, ir as Spinner, gn as SplitButton, Ho as Stack, ta as StatTile, ra as Stepper, On as Surface, ia as Switch, ua as Tab, Nt as TabBar, la as TabList, da as TabPanel, aa as Table, ca as Tabs, fa as TagInput, ha as Text, xt as Textarea, za as ThemeEditor, Fa as ThemeProvider, Va as Timeline, Ha as TitleBar, Xa as Toaster, Za as ToggleGroup, Qa as Toolbar, eo as ToolbarGroup, $a as ToolbarSeparator, jt as Tooltip, no as Tour, ro as Tree, ki as TypingDots, Uo as VStack, io as VirtualList, Ui as VisuallyHidden, oo as WindowResizeHandles, fo as Wizard, Po as alignClass, Oa as applyTheme, G as cn, Hr as compactNumber, Er as confirm, ya as contrastRatio, Fr as diffLines, dt as englishStrings, Wr as fileSize, No as gapClass, Kn as getElementRef, ga as hexToRgb, Z as icon, mn as iconSize, X as inputSurface, ba as isLight, Fo as justifyClass, va as luminance, Gn as mergeRefs, Sa as mixHex, K as motion, _a as normaliseHex, xa as readableOn, Vr as relativeTime, Da as themeToVars, Sn as tintFromName, Ya as toast, dr as useCommandPalette, Ot as useCompactLayout, q as useCrispStrings, Y as useFieldContext, $r as useForm, Tt as useFrame, Cn as useImageBrightness, fr as useLongPress, Dt as useMediaQuery, gr as useModal, Lt as useNavExpanded, Tn as useOnSurface, Qn as usePopoverPosition, Et as usePortalTarget, Na as useTheme, ni as useUnsavedGuard, uo as useWizard };
8622
+ export { st as Accordion, ct as AccordionItem, lo as ActionBar, ht as Alert, St as AppBar, Gt as AppShell, Ki as AspectRatio, qt as AudioItem, Xt as Avatar, Qt as AvatarGroup, vo as AvatarPicker, ut as Badge, tn as Banner, Er as BottomMenu, ko as Box, fn as Breadcrumb, Q as Button, _n as ButtonGroup, Pn as CHART_SERIES, Nr as Calendar, xn as Card, Sn as CardButton, Cn as Carousel, Ao as Center, Mn as CharacterCard, Nn as CharacterCardSkeleton, Ln as Chart, Ve as ChartCell, Bn as Checkbox, Vn as Chip, uo as ChoiceCard, wo as Citation, Gn as CodeBlock, Kn as Collapsible, ir as ColorPicker, cr as Combobox, fr as CommandPalette, hr as Composer, kr as ConfirmHost, Mo as Container, Ar as ContextMenu, Hn as CopyButton, pt as CrispStringsProvider, Ma as DEFAULT_THEME, Pr as DatePicker, Ir as Dialog, zr as Diff, Po as Divider, It as Dock, Jr as DownloadItem, Yr as Dropzone, Xr as EmptyState, Zr as ErrorState, To as FeedbackAction, yt as Field, $r as FilterBar, zo as Flex, ni as Form, ri as FormActions, wt as FrameProvider, Vo as Grid, Ko as HStack, ur as Highlight, ai as HoverCard, oi as ICON_SIZE, si as Icon, J as IconButton, ci as ImageViewer, li as InfiniteScroll, bt as Input, dr as Kbd, ia as KeyValue, ui as ListGroup, mi as ListRow, hi as ListRowButton, sr as LoadingState, gi as Masonry, vi as MediaCard, yi as MediaCardSkeleton, bi as MediaTile, xi as MediaTileSkeleton, rn as Menu, sn as MenuContent, cn as MenuItem, un as MenuLabel, ln as MenuSeparator, on as MenuTrigger, ki as Message, Mi as MessageDivider, Ni as Meter, Co as ModelSelect, Fi as MultiItemDownloadCard, Pt as NavBadge, Vt as NavLabel, Ht as NavRail, Ii as NumberInput, Oo as OtpInput, ja as PRESETS, xo as Page, Ri as Pagination, Vi as Panel, Wi as PartitionBar, Zn as Popover, $n as PopoverAnchor, tr as PopoverContent, Qn as PopoverTrigger, Vr as Progress, Do as PromptSuggestions, qi as Prose, Xi as Radio, Yi as RadioGroup, _r as RecordingWave, go as ReorderableList, Zi as Resizable, Wn as ScrollArea, Qi as SearchField, ho as SecretInput, $i as Segmented, ea as Select, ta as SelectMenu, Tr as Sheet, fo as Shelf, $ as Skeleton, jn as SkeletonRow, na as Slider, Ho as Spacer, Rn as Sparkline, or as Spinner, vn as SplitButton, Wo as Stack, ra as StatTile, aa as Stepper, An as Surface, oa as Switch, fa as Tab, Ft as TabBar, da as TabList, pa as TabPanel, sa as Table, ua as Tabs, ma as TagInput, _a as Text, xt as Textarea, Va as ThemeEditor, La as ThemeProvider, Ua as Timeline, Wa as TitleBar, Qa as Toaster, $a as ToggleGroup, eo as Toolbar, no as ToolbarGroup, to as ToolbarSeparator, Nt as Tooltip, io as Tour, ao as Tree, ji as TypingDots, Go as VStack, oo as VirtualList, Gi as VisuallyHidden, co as WindowResizeHandles, mo as Wizard, Io as alignClass, Aa as applyTheme, G as cn, Wr as compactNumber, Or as confirm, xa as contrastRatio, Lr as diffLines, dt as englishStrings, Kr as fileSize, Fo as gapClass, Jn as getElementRef, va as hexToRgb, Z as icon, gn as iconSize, X as inputSurface, Sa as isLight, Lo as justifyClass, ba as luminance, qn as mergeRefs, wa as mixHex, K as motion, ya as normaliseHex, Ca as readableOn, Ur as relativeTime, ka as themeToVars, wn as tintFromName, Za as toast, pr as useCommandPalette, Ot as useCompactLayout, q as useCrispStrings, Y as useFieldContext, ti as useForm, Tt as useFrame, Tn as useImageBrightness, mr as useLongPress, Dt as useMediaQuery, vr as useModal, zt as useNavExpanded, Dn as useOnSurface, er as usePopoverPosition, Et as usePortalTarget, Fa as useTheme, ii as useUnsavedGuard, po as useWizard };
8582
8623
 
8583
8624
  //# sourceMappingURL=index.js.map