@lettuceai/crisp 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
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";
@@ -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
  ]
@@ -833,7 +833,7 @@ function Nt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, show
833
833
  onClick: r,
834
834
  "aria-label": i ?? s.navCreate,
835
835
  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, {
836
+ children: /* @__PURE__ */ U(be, {
837
837
  size: 20,
838
838
  strokeWidth: 2.5
839
839
  })
@@ -884,7 +884,7 @@ function Pt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, edge
884
884
  onClick: r,
885
885
  "aria-label": i ?? s.navCreate,
886
886
  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, {
887
+ children: /* @__PURE__ */ U(be, {
888
888
  size: 20,
889
889
  strokeWidth: 2.5
890
890
  })
@@ -970,7 +970,7 @@ function Vt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
970
970
  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
971
  children: [/* @__PURE__ */ U("span", {
972
972
  className: Rt,
973
- children: /* @__PURE__ */ U(B, {
973
+ children: /* @__PURE__ */ U(be, {
974
974
  size: 18,
975
975
  strokeWidth: 2.5
976
976
  })
@@ -1018,7 +1018,7 @@ function Vt({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1018
1018
  animate: { rotate: h ? 0 : 180 },
1019
1019
  transition: m ? { duration: 0 } : K.sidebar,
1020
1020
  className: "flex",
1021
- children: /* @__PURE__ */ U(ge, {
1021
+ children: /* @__PURE__ */ U(he, {
1022
1022
  size: 18,
1023
1023
  className: o === "right" ? "-scale-x-100" : void 0
1024
1024
  })
@@ -1071,7 +1071,7 @@ function Ht({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1071
1071
  type: "button",
1072
1072
  onClick: r,
1073
1073
  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, {
1074
+ children: [/* @__PURE__ */ U(be, {
1075
1075
  size: 18,
1076
1076
  strokeWidth: 2.5
1077
1077
  }), i ?? f.navCreate]
@@ -1084,7 +1084,7 @@ function Ht({ items: e, value: t, onChange: n, onCreate: r, createLabel: i, foot
1084
1084
  onClick: r,
1085
1085
  "aria-label": i ?? f.navCreate,
1086
1086
  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, {
1087
+ children: /* @__PURE__ */ U(be, {
1088
1088
  size: 20,
1089
1089
  strokeWidth: 2.5
1090
1090
  })
@@ -1224,13 +1224,13 @@ function Gt({ title: e, description: t, src: n, onLoadSrc: r, badge: i, actions:
1224
1224
  onClick: w,
1225
1225
  "aria-label": v ? c.audioItemPause(e) : c.audioItemPlay(e),
1226
1226
  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, {
1227
+ children: g ? /* @__PURE__ */ U(B, {
1228
1228
  size: 18,
1229
1229
  className: "animate-spin"
1230
- }) : v ? /* @__PURE__ */ U(_e, {
1230
+ }) : v ? /* @__PURE__ */ U(ge, {
1231
1231
  size: 18,
1232
1232
  fill: "currentColor"
1233
- }) : /* @__PURE__ */ U(be, {
1233
+ }) : /* @__PURE__ */ U(ye, {
1234
1234
  size: 18,
1235
1235
  fill: "currentColor",
1236
1236
  className: "ml-0.5"
@@ -1379,7 +1379,7 @@ var Zt = {
1379
1379
  danger: "bg-danger/15 text-danger",
1380
1380
  offline: "bg-fill-3 text-fg-2"
1381
1381
  }, Qt = {
1382
- info: /* @__PURE__ */ U(z, { size: 16 }),
1382
+ info: /* @__PURE__ */ U(ue, { size: 16 }),
1383
1383
  warning: /* @__PURE__ */ U(T, { size: 16 }),
1384
1384
  danger: /* @__PURE__ */ U(Ae, { size: 16 }),
1385
1385
  offline: /* @__PURE__ */ U(ke, { size: 16 })
@@ -1579,7 +1579,7 @@ function un({ items: e, maxVisible: n = 1, className: r }) {
1579
1579
  type: "button",
1580
1580
  "aria-label": i.breadcrumbMore(c.length),
1581
1581
  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 })
1582
+ children: /* @__PURE__ */ U(me, { size: 14 })
1583
1583
  }) }), /* @__PURE__ */ U(an, { children: c.map((e) => /* @__PURE__ */ U(on, {
1584
1584
  icon: e.icon,
1585
1585
  onSelect: e.onClick,
@@ -1631,7 +1631,7 @@ var Z = {
1631
1631
  ...u,
1632
1632
  children: [n && /* @__PURE__ */ U("span", {
1633
1633
  className: "absolute inset-0 flex items-center justify-center",
1634
- children: /* @__PURE__ */ U(fe, {
1634
+ children: /* @__PURE__ */ U(B, {
1635
1635
  size: mn[t],
1636
1636
  className: "animate-spin"
1637
1637
  })
@@ -2294,7 +2294,7 @@ function Bn({ value: e, children: t, label: n, copiedLabel: r, className: i, ...
2294
2294
  leading: s ? /* @__PURE__ */ U(M, {
2295
2295
  size: 16,
2296
2296
  className: "text-accent"
2297
- }) : /* @__PURE__ */ U(R, { size: 16 }),
2297
+ }) : /* @__PURE__ */ U(L, { size: 16 }),
2298
2298
  className: G(i),
2299
2299
  ...a,
2300
2300
  children: s ? r ?? o.copyButtonCopied : t
@@ -2305,7 +2305,7 @@ function Bn({ value: e, children: t, label: n, copiedLabel: r, className: i, ...
2305
2305
  children: s ? /* @__PURE__ */ U(M, {
2306
2306
  size: 16,
2307
2307
  className: "text-accent"
2308
- }) : /* @__PURE__ */ U(R, { size: 16 })
2308
+ }) : /* @__PURE__ */ U(L, { size: 16 })
2309
2309
  });
2310
2310
  }
2311
2311
  //#endregion
@@ -2541,7 +2541,7 @@ function $n({ side: e = "bottom", align: t = "start", offset: n = 6, matchWidth:
2541
2541
  o,
2542
2542
  s,
2543
2543
  u
2544
- ]), qe(/* @__PURE__ */ U(g, { children: o && /* @__PURE__ */ U(y.div, {
2544
+ ]), typeof document > "u" ? null : qe(/* @__PURE__ */ U(g, { children: o && /* @__PURE__ */ U(y.div, {
2545
2545
  ref: d,
2546
2546
  id: c,
2547
2547
  role: "dialog",
@@ -2629,7 +2629,7 @@ function nr({ value: e, onChange: t, swatches: n = er, disabled: r, id: i, class
2629
2629
  className: "mt-3 flex items-center gap-2",
2630
2630
  children: [/* @__PURE__ */ W("label", {
2631
2631
  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", {
2632
+ children: [/* @__PURE__ */ U(ve, { size: 16 }), /* @__PURE__ */ U("input", {
2633
2633
  type: "color",
2634
2634
  value: e,
2635
2635
  onChange: (e) => t(e.target.value),
@@ -2659,7 +2659,7 @@ var rr = {
2659
2659
  lg: 24
2660
2660
  };
2661
2661
  function ir({ size: e = "md", label: t, className: n }) {
2662
- return /* @__PURE__ */ U(fe, {
2662
+ return /* @__PURE__ */ U(B, {
2663
2663
  size: rr[e],
2664
2664
  role: t ? "status" : void 0,
2665
2665
  "aria-label": t,
@@ -2892,7 +2892,7 @@ function ur({ open: e, onOpenChange: t, commands: n, placeholder: r, onQueryChan
2892
2892
  }, C = (e) => {
2893
2893
  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
2894
  }, w = -1;
2895
- return qe(/* @__PURE__ */ U(g, { children: e && /* @__PURE__ */ W("div", {
2895
+ return typeof document > "u" ? null : qe(/* @__PURE__ */ U(g, { children: e && /* @__PURE__ */ W("div", {
2896
2896
  className: "fixed inset-0 z-[95] flex items-start justify-center p-4 pt-[12vh]",
2897
2897
  children: [/* @__PURE__ */ U(y.div, {
2898
2898
  initial: { opacity: 0 },
@@ -2982,7 +2982,7 @@ function ur({ open: e, onOpenChange: t, commands: n, placeholder: r, onQueryChan
2982
2982
  })]
2983
2983
  }),
2984
2984
  e.shortcut && /* @__PURE__ */ U(lr, { children: e.shortcut }),
2985
- t && /* @__PURE__ */ U(re, {
2985
+ t && /* @__PURE__ */ U(ie, {
2986
2986
  size: 14,
2987
2987
  className: "shrink-0 text-fg-4"
2988
2988
  })
@@ -3082,11 +3082,11 @@ function pr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSend
3082
3082
  size: 18,
3083
3083
  strokeWidth: 2.5
3084
3084
  }),
3085
- busy: /* @__PURE__ */ U(fe, {
3085
+ busy: /* @__PURE__ */ U(B, {
3086
3086
  size: 18,
3087
3087
  className: "animate-spin"
3088
3088
  }),
3089
- continue: /* @__PURE__ */ U(I, { size: 18 })
3089
+ continue: /* @__PURE__ */ U(ne, { size: 18 })
3090
3090
  };
3091
3091
  return /* @__PURE__ */ W("div", {
3092
3092
  className: G("space-y-2", b),
@@ -3129,7 +3129,7 @@ function pr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSend
3129
3129
  size: "md",
3130
3130
  onClick: o,
3131
3131
  disabled: f || d || w,
3132
- children: /* @__PURE__ */ U(B, { size: 18 })
3132
+ children: /* @__PURE__ */ U(be, { size: 18 })
3133
3133
  }),
3134
3134
  w && u ? /* @__PURE__ */ U(hr, {
3135
3135
  elapsedMs: u.elapsedMs,
@@ -3160,7 +3160,7 @@ function pr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSend
3160
3160
  disabled: u.transcribing,
3161
3161
  "aria-label": u.transcribing ? x.composerTranscribing : x.composerStopAndTranscribe,
3162
3162
  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, {
3163
+ children: u.transcribing ? /* @__PURE__ */ U(B, {
3164
3164
  size: 18,
3165
3165
  className: "animate-spin"
3166
3166
  }) : /* @__PURE__ */ U(M, {
@@ -3173,7 +3173,7 @@ function pr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSend
3173
3173
  size: "md",
3174
3174
  onClick: u.onStart,
3175
3175
  disabled: f || d || u.disabled,
3176
- children: /* @__PURE__ */ U(pe, { size: 16 })
3176
+ children: /* @__PURE__ */ U(fe, { size: 16 })
3177
3177
  })),
3178
3178
  !w && /* @__PURE__ */ U(y.button, {
3179
3179
  type: "button",
@@ -3356,36 +3356,38 @@ function Sr({ onExit: e, children: t }) {
3356
3356
  });
3357
3357
  }, [n]), /* @__PURE__ */ U(H, { children: t });
3358
3358
  }
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;
3359
+ function Cr({ 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 }) {
3360
+ 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 = () => {
3361
+ s && t();
3362
+ };
3363
+ gr(e, ne, k, { lockScroll: !P }), l(() => {
3364
+ e && te(b);
3365
+ }, [e, b]);
3366
+ 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) => {
3367
+ let t = z.current;
3366
3368
  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 } : {
3369
+ }), B = (e, t, n = 0) => (ae.current?.stop(), ae.current = v(R, e, j ? { duration: 0 } : {
3368
3370
  ...t,
3369
3371
  velocity: n
3370
- }), ie.current), de = p(!1);
3371
- I && e && !de.current && (ae.current = !1, R.jump(br)), de.current = e, d(() => {
3372
+ }), ae.current), fe = p(!1);
3373
+ I && e && !fe.current && (oe.current = !1, R.jump(br)), fe.current = e, d(() => {
3372
3374
  if (!e || !I) return;
3373
- let t = O.current;
3375
+ let t = k.current;
3374
3376
  if (!t) return;
3375
- re.current = t.offsetHeight, R.jump(re.current), z(0, K.sheetIn);
3377
+ z.current = t.offsetHeight, R.jump(z.current), B(0, K.sheetIn);
3376
3378
  let n = new ResizeObserver(() => {
3377
- re.current = t.offsetHeight;
3378
- let e = k.current;
3379
- ce(!!(e && e.scrollHeight > e.clientHeight + 1));
3379
+ z.current = t.offsetHeight;
3380
+ let e = A.current;
3381
+ le(!!(e && e.scrollHeight > e.clientHeight + 1));
3380
3382
  });
3381
- return n.observe(t), k.current && n.observe(k.current), () => n.disconnect();
3383
+ return n.observe(t), A.current && n.observe(A.current), () => n.disconnect();
3382
3384
  }, [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();
3385
+ let pe = (e) => {
3386
+ oe.current = !0, B(z.current, K.sheetOut, Math.max(0, e)).finished.then(() => {
3387
+ oe.current && t();
3386
3388
  });
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 = {
3389
+ }, me = (e, t) => {
3390
+ I && e.button === 0 && !oe.current && (t && e.target.closest("input, textarea, select, [contenteditable='true'], [data-no-drag]") || (se.current = {
3389
3391
  pointerId: e.pointerId,
3390
3392
  startY: e.clientY,
3391
3393
  fromBody: t,
@@ -3396,44 +3398,44 @@ function Cr({ open: e, onClose: t, title: n, description: r, leftAction: i, righ
3396
3398
  y: e.clientY
3397
3399
  }]
3398
3400
  }));
3399
- }, me = (e) => {
3400
- let t = oe.current;
3401
+ }, he = (e) => {
3402
+ let t = se.current;
3401
3403
  if (!t || t.pointerId !== e.pointerId) return;
3402
3404
  let n = e.clientY - t.startY;
3403
3405
  if (!t.active) {
3404
3406
  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;
3407
+ let r = A.current;
3408
+ if (t.fromBody && ce && (n < 0 || (r?.scrollTop ?? 0) > 0)) {
3409
+ se.current = null;
3408
3410
  return;
3409
3411
  }
3410
- t.active = !0, ie.current?.stop(), e.currentTarget.setPointerCapture(e.pointerId);
3412
+ t.active = !0, ae.current?.stop(), e.currentTarget.setPointerCapture(e.pointerId);
3411
3413
  }
3412
3414
  for (t.dy = n, R.set(Math.max(0, n)), t.samples.push({
3413
3415
  t: e.timeStamp,
3414
3416
  y: e.clientY
3415
3417
  }); 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);
3418
+ }, ge = (e) => {
3419
+ let t = se.current;
3420
+ if (se.current = null, !t || !t.active || t.pointerId !== e.pointerId) return;
3421
+ 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);
3422
+ if (L && (u || t.dy < -40) && M < L.length - 1) {
3423
+ te((e) => Math.min(e + 1, L.length - 1)), B(0, K.sheetSettle, a);
3422
3424
  return;
3423
3425
  }
3424
- if ((c || u) && a > -200) {
3425
- L && j > 0 ? (M((e) => Math.max(e - 1, 0)), z(0, K.sheetSettle, a)) : fe(a);
3426
+ if ((l || d) && a > -200) {
3427
+ L && M > 0 ? (te((e) => Math.max(e - 1, 0)), B(0, K.sheetSettle, a)) : s ? pe(a) : B(0, K.sheetSettle, a);
3426
3428
  return;
3427
3429
  }
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", {
3430
+ B(0, K.sheetSettle, a);
3431
+ }, _e = (e) => I ? {
3432
+ onPointerDown: (t) => me(t, e),
3433
+ onPointerMove: he,
3434
+ onPointerUp: ge,
3435
+ onPointerCancel: ge
3436
+ } : {}, ve = s && (o ?? !I), ye = "flex flex-col overflow-hidden border-line bg-surface-2 outline-none", be = /* @__PURE__ */ W("div", {
3435
3437
  className: G("shrink-0", I && "cursor-grab touch-none select-none active:cursor-grabbing"),
3436
- ...ge(!1),
3438
+ ..._e(!1),
3437
3439
  children: [
3438
3440
  I && /* @__PURE__ */ U("div", {
3439
3441
  className: "flex justify-center pb-1 pt-2.5",
@@ -3452,25 +3454,25 @@ function Cr({ open: e, onClose: t, title: n, description: r, leftAction: i, righ
3452
3454
  /* @__PURE__ */ W("div", {
3453
3455
  className: "min-w-0 flex-1",
3454
3456
  children: [n && /* @__PURE__ */ U("h2", {
3455
- id: E,
3457
+ id: D,
3456
3458
  className: "truncate text-lg font-semibold text-fg",
3457
3459
  children: n
3458
3460
  }), r && /* @__PURE__ */ U("p", {
3459
- id: D,
3461
+ id: O,
3460
3462
  className: "mt-0.5 text-sm text-fg-3",
3461
3463
  children: r
3462
3464
  })]
3463
3465
  }),
3464
3466
  /* @__PURE__ */ W("div", {
3465
3467
  className: "flex shrink-0 items-center gap-1",
3466
- children: [a, /* @__PURE__ */ U(J, {
3467
- label: T.sheetClose,
3468
+ children: [a, s && /* @__PURE__ */ U(J, {
3469
+ label: E.sheetClose,
3468
3470
  shape: "round",
3469
3471
  variant: "secondary",
3470
3472
  size: "sm",
3471
- onClick: t,
3473
+ onClick: ne,
3472
3474
  "data-modal-chrome": !0,
3473
- className: G(!_e && "sr-only focus-visible:not-sr-only"),
3475
+ className: G(!ve && "sr-only focus-visible:not-sr-only"),
3474
3476
  children: /* @__PURE__ */ U(V, { size: 14 })
3475
3477
  })]
3476
3478
  })
@@ -3478,51 +3480,51 @@ function Cr({ open: e, onClose: t, title: n, description: r, leftAction: i, righ
3478
3480
  }),
3479
3481
  /* @__PURE__ */ U("div", { className: "h-px bg-line" })
3480
3482
  ]
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 = {
3483
+ }), xe = /* @__PURE__ */ U("div", {
3484
+ ref: A,
3485
+ ..._e(!0),
3486
+ 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"),
3487
+ children: T
3488
+ }), Se = {
3487
3489
  role: "dialog",
3488
3490
  "aria-modal": !0,
3489
- "aria-labelledby": n ? E : void 0,
3490
- "aria-describedby": r ? D : void 0,
3491
+ "aria-labelledby": n ? D : void 0,
3492
+ "aria-describedby": r ? O : void 0,
3491
3493
  tabIndex: -1
3492
- }, xe = null;
3493
- if (e && I) xe = /* @__PURE__ */ U(Sr, {
3494
- onExit: () => z(re.current, K.sheetOut).finished,
3494
+ }, Ce = null;
3495
+ if (e && I) Ce = /* @__PURE__ */ U(Sr, {
3496
+ onExit: () => B(z.current, K.sheetOut).finished,
3495
3497
  children: /* @__PURE__ */ W("div", {
3496
3498
  className: "fixed inset-0 z-50",
3497
3499
  children: [/* @__PURE__ */ U(y.div, {
3498
3500
  className: "absolute inset-0 bg-black/50",
3499
- style: { opacity: ue },
3500
- onClick: t
3501
+ style: { opacity: de },
3502
+ onClick: ne
3501
3503
  }), /* @__PURE__ */ W(y.div, {
3502
- ref: O,
3503
- ...B,
3504
+ ref: k,
3505
+ ...Se,
3504
3506
  style: {
3505
- y: le,
3506
- height: ne,
3507
+ y: ue,
3508
+ height: ie,
3507
3509
  boxShadow: "var(--shadow-sheet), 0 120px 0 0 var(--color-surface-2)",
3508
3510
  transition: L ? "height 0.4s cubic-bezier(0.32, 0.72, 0, 1)" : void 0
3509
3511
  },
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),
3512
+ 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]"), yr[h], S),
3511
3513
  children: [
3512
- ye,
3513
3514
  be,
3514
- s && /* @__PURE__ */ U("div", {
3515
+ xe,
3516
+ c && /* @__PURE__ */ U("div", {
3515
3517
  className: "shrink-0 border-t border-line px-5 py-3",
3516
- children: s
3518
+ children: c
3517
3519
  })
3518
3520
  ]
3519
3521
  })]
3520
3522
  })
3521
3523
  }, "bottom");
3522
3524
  else if (e) {
3523
- let e = F === "side", n = /* @__PURE__ */ W(y.div, {
3524
- ref: O,
3525
- ...B,
3525
+ let e = re === "side", t = /* @__PURE__ */ W(y.div, {
3526
+ ref: k,
3527
+ ...Se,
3526
3528
  initial: e ? { x: "100%" } : {
3527
3529
  opacity: 0,
3528
3530
  scale: .97,
@@ -3543,17 +3545,17 @@ function Cr({ open: e, onClose: t, title: n, description: r, leftAction: i, righ
3543
3545
  transition: K.instant
3544
3546
  },
3545
3547
  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),
3548
+ className: G(ye, e ? G("fixed inset-y-0 right-0 z-50 w-full border-l shadow-sheet pb-[var(--safe-bottom)]", _r[h]) : G("relative z-50 w-full rounded-2xl border shadow-raised", P ? "max-h-[85%]" : "max-h-[85dvh]", vr[h]), S),
3547
3549
  children: [
3548
- ye,
3549
3550
  be,
3550
- s && /* @__PURE__ */ U("div", {
3551
+ xe,
3552
+ c && /* @__PURE__ */ U("div", {
3551
3553
  className: "shrink-0 border-t border-line px-5 py-3",
3552
- children: s
3554
+ children: c
3553
3555
  })
3554
3556
  ]
3555
3557
  });
3556
- xe = /* @__PURE__ */ W(y.div, {
3558
+ Ce = /* @__PURE__ */ W(y.div, {
3557
3559
  className: "fixed inset-0 z-50",
3558
3560
  children: [/* @__PURE__ */ U(y.div, {
3559
3561
  className: "absolute inset-0 bg-black/50",
@@ -3561,14 +3563,14 @@ function Cr({ open: e, onClose: t, title: n, description: r, leftAction: i, righ
3561
3563
  animate: { opacity: 1 },
3562
3564
  exit: { opacity: 0 },
3563
3565
  transition: K.quick,
3564
- onClick: t
3565
- }), e ? n : /* @__PURE__ */ U("div", {
3566
+ onClick: ne
3567
+ }), e ? t : /* @__PURE__ */ U("div", {
3566
3568
  className: "pointer-events-none absolute inset-0 flex items-center justify-center p-4 [&>*]:pointer-events-auto",
3567
- children: n
3569
+ children: t
3568
3570
  })]
3569
- }, F);
3571
+ }, re);
3570
3572
  }
3571
- return te ? qe(/* @__PURE__ */ U(g, { children: xe }), te) : null;
3573
+ return N ? qe(/* @__PURE__ */ U(g, { children: Ce }), N) : null;
3572
3574
  }
3573
3575
  var wr = Cr, Tr = null;
3574
3576
  function Er(e) {
@@ -3676,7 +3678,7 @@ function Or({ menu: e, longPressDelay: t = 450, onOpenChange: n, disabled: r, cl
3676
3678
  onPointerUp: h,
3677
3679
  onPointerCancel: h,
3678
3680
  children: a
3679
- }), qe(/* @__PURE__ */ U(g, { children: o && /* @__PURE__ */ U(y.div, {
3681
+ }), typeof document < "u" && qe(/* @__PURE__ */ U(g, { children: o && /* @__PURE__ */ U(y.div, {
3680
3682
  ref: u,
3681
3683
  role: "menu",
3682
3684
  initial: {
@@ -3824,7 +3826,7 @@ var Nr = {
3824
3826
  };
3825
3827
  function Pr({ open: e, onClose: t, title: n, description: r, footer: i, size: a = "md", dismissible: o = !0, className: s, children: c }) {
3826
3828
  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", {
3829
+ return gr(e, t, m), typeof document > "u" ? null : qe(/* @__PURE__ */ U(g, { children: e && /* @__PURE__ */ W("div", {
3828
3830
  className: "fixed inset-0 z-50 flex items-end justify-center p-4 sm:items-center",
3829
3831
  children: [/* @__PURE__ */ U(y.div, {
3830
3832
  className: "absolute inset-0 bg-black/50 backdrop-blur-sm",
@@ -4123,7 +4125,7 @@ function Kr({ name: e, detail: t, status: n, progress: r, speed: i, eta: a, size
4123
4125
  children: [
4124
4126
  /* @__PURE__ */ U("span", {
4125
4127
  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 })
4128
+ children: _ ? /* @__PURE__ */ U(M, { size: 18 }) : v ? /* @__PURE__ */ U(T, { size: 18 }) : n === "verifying" ? /* @__PURE__ */ U(ir, { size: "md" }) : /* @__PURE__ */ U(z, { size: 18 })
4127
4129
  }),
4128
4130
  /* @__PURE__ */ W("div", {
4129
4131
  className: "min-w-0 flex-1 space-y-1.5",
@@ -4159,19 +4161,19 @@ function Kr({ name: e, detail: t, status: n, progress: r, speed: i, eta: a, size
4159
4161
  label: p.downloadPause(e),
4160
4162
  size: "sm",
4161
4163
  onClick: c,
4162
- children: /* @__PURE__ */ U(_e, { size: 16 })
4164
+ children: /* @__PURE__ */ U(ge, { size: 16 })
4163
4165
  }),
4164
4166
  n === "paused" && l && /* @__PURE__ */ U(J, {
4165
4167
  label: p.downloadResume(e),
4166
4168
  size: "sm",
4167
4169
  onClick: l,
4168
- children: /* @__PURE__ */ U(be, { size: 16 })
4170
+ children: /* @__PURE__ */ U(ye, { size: 16 })
4169
4171
  }),
4170
4172
  v && d && /* @__PURE__ */ U(J, {
4171
4173
  label: p.downloadRetry(e),
4172
4174
  size: "sm",
4173
4175
  onClick: d,
4174
- children: /* @__PURE__ */ U(ae, { size: 16 })
4176
+ children: /* @__PURE__ */ U(z, { size: 16 })
4175
4177
  }),
4176
4178
  !_ && u && /* @__PURE__ */ U(J, {
4177
4179
  label: p.downloadCancel(e),
@@ -4517,7 +4519,7 @@ function oi({ images: e, index: t, onIndexChange: n }) {
4517
4519
  d
4518
4520
  ]), l(() => {
4519
4521
  o || a(1);
4520
- }, [o]), qe(/* @__PURE__ */ U(g, { children: o && c && /* @__PURE__ */ W(y.div, {
4522
+ }, [o]), typeof document > "u" ? null : qe(/* @__PURE__ */ U(g, { children: o && c && /* @__PURE__ */ W(y.div, {
4521
4523
  role: "dialog",
4522
4524
  "aria-modal": "true",
4523
4525
  "aria-label": c.alt,
@@ -4929,7 +4931,7 @@ function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle",
4929
4931
  l && /* @__PURE__ */ W("span", {
4930
4932
  className: "inline-flex shrink-0 items-center gap-1 text-2xs text-info",
4931
4933
  "aria-label": _.messagePinned,
4932
- children: [/* @__PURE__ */ U(ve, { size: 12 }), _.messagePinned]
4934
+ children: [/* @__PURE__ */ U(_e, { size: 12 }), _.messagePinned]
4933
4935
  })
4934
4936
  ]
4935
4937
  }), F = /* @__PURE__ */ W(y.div, {
@@ -4981,7 +4983,7 @@ function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle",
4981
4983
  ]
4982
4984
  })
4983
4985
  ]
4984
- }), I = /* @__PURE__ */ W("div", {
4986
+ }), ne = /* @__PURE__ */ W("div", {
4985
4987
  ...O ? k.handlers : {},
4986
4988
  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
4989
  children: [te ? /* @__PURE__ */ U(Jt, {
@@ -4992,7 +4994,7 @@ function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle",
4992
4994
  }) : j && v.avatar !== "hidden" && C ? /* @__PURE__ */ U("span", {
4993
4995
  "aria-hidden": "true",
4994
4996
  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 })
4997
+ children: U(e === "scene" ? re : ue, { size: 14 })
4996
4998
  }) : v.avatar !== "hidden" && /* @__PURE__ */ U("span", {
4997
4999
  className: G("shrink-0", v.avatarSize === "small" ? "w-6" : v.avatarSize === "large" ? "w-10" : "w-8"),
4998
5000
  "aria-hidden": "true"
@@ -5017,13 +5019,13 @@ function Di({ role: e, children: t, author: n, timestamp: r, state: i = "idle",
5017
5019
  }), l && /* @__PURE__ */ W("span", {
5018
5020
  className: "inline-flex shrink-0 items-center gap-1 text-2xs text-info",
5019
5021
  "aria-label": _.messagePinned,
5020
- children: [/* @__PURE__ */ U(ve, { size: 12 }), _.messagePinned]
5022
+ children: [/* @__PURE__ */ U(_e, { size: 12 }), _.messagePinned]
5021
5023
  })]
5022
5024
  })
5023
5025
  ]
5024
5026
  })]
5025
5027
  });
5026
- return !d || p ? I : /* @__PURE__ */ W(H, { children: [I, /* @__PURE__ */ U(Cr, {
5028
+ return !d || p ? ne : /* @__PURE__ */ W(H, { children: [ne, /* @__PURE__ */ U(Cr, {
5027
5029
  open: T,
5028
5030
  onClose: () => E(!1),
5029
5031
  title: f ?? _.messageMenuTitle,
@@ -5203,7 +5205,7 @@ function Ni({ title: e, detail: t, items: n, onPauseAll: r, onResumeAll: i, onCa
5203
5205
  children: [
5204
5206
  /* @__PURE__ */ U("span", {
5205
5207
  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 })
5208
+ children: C ? /* @__PURE__ */ U(M, { size: 18 }) : w ? /* @__PURE__ */ U(T, { size: 18 }) : b.status === "verifying" ? /* @__PURE__ */ U(ir, { size: "md" }) : /* @__PURE__ */ U(z, { size: 18 })
5207
5209
  }),
5208
5210
  /* @__PURE__ */ W("div", {
5209
5211
  className: "min-w-0 flex-1 space-y-1.5",
@@ -5239,13 +5241,13 @@ function Ni({ title: e, detail: t, items: n, onPauseAll: r, onResumeAll: i, onCa
5239
5241
  label: p.downloadPause(e),
5240
5242
  size: "sm",
5241
5243
  onClick: r,
5242
- children: /* @__PURE__ */ U(_e, { size: 16 })
5244
+ children: /* @__PURE__ */ U(ge, { size: 16 })
5243
5245
  }),
5244
5246
  b.status === "paused" && i && /* @__PURE__ */ U(J, {
5245
5247
  label: p.downloadResume(e),
5246
5248
  size: "sm",
5247
5249
  onClick: i,
5248
- children: /* @__PURE__ */ U(be, { size: 16 })
5250
+ children: /* @__PURE__ */ U(ye, { size: 16 })
5249
5251
  }),
5250
5252
  !C && a && /* @__PURE__ */ U(J, {
5251
5253
  label: p.downloadCancel(e),
@@ -5329,7 +5331,7 @@ function Pi({ value: e, onChange: t, min: n = -Infinity, max: r = Infinity, step
5329
5331
  disabled: s || e <= n,
5330
5332
  "aria-label": u.numberInputDecrease,
5331
5333
  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 })
5334
+ children: /* @__PURE__ */ U(pe, { size: 16 })
5333
5335
  }),
5334
5336
  /* @__PURE__ */ U("input", {
5335
5337
  ref: f,
@@ -5356,7 +5358,7 @@ function Pi({ value: e, onChange: t, min: n = -Infinity, max: r = Infinity, step
5356
5358
  disabled: s || e >= r,
5357
5359
  "aria-label": u.numberInputIncrease,
5358
5360
  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 })
5361
+ children: /* @__PURE__ */ U(be, { size: 16 })
5360
5362
  })
5361
5363
  ]
5362
5364
  });
@@ -6126,7 +6128,7 @@ function ta({ label: e, value: t, sub: n, trend: r, goodDirection: i = "up", ico
6126
6128
  className: "mt-1 truncate text-2xl font-semibold tabular-nums text-fg",
6127
6129
  children: t
6128
6130
  }),
6129
- n && /* @__PURE__ */ U("p", {
6131
+ n && /* @__PURE__ */ U("div", {
6130
6132
  className: "mt-0.5 truncate text-sm text-fg-3",
6131
6133
  children: n
6132
6134
  })
@@ -6234,9 +6236,10 @@ function ia({ checked: e, onChange: t, disabled: n, id: r, className: i, ...a })
6234
6236
  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
6237
  children: /* @__PURE__ */ U(y.span, {
6236
6238
  "aria-hidden": "true",
6237
- layout: !0,
6239
+ initial: !1,
6240
+ animate: { x: e ? 20 : 0 },
6238
6241
  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")
6242
+ className: "block h-5 w-5 rounded-full bg-knob shadow-sm ring-1 ring-inset ring-black/5"
6240
6243
  })
6241
6244
  });
6242
6245
  }
@@ -7044,7 +7047,7 @@ function Ha({ title: e, platform: t = "linux", onMinimize: n, onMaximize: r, onC
7044
7047
  onClick: n,
7045
7048
  "aria-label": s.titleBarMinimize,
7046
7049
  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 })
7050
+ children: /* @__PURE__ */ U(pe, { size: 14 })
7048
7051
  }),
7049
7052
  r && /* @__PURE__ */ U("button", {
7050
7053
  type: "button",
@@ -7068,7 +7071,7 @@ function Ha({ title: e, platform: t = "linux", onMinimize: n, onMaximize: r, onC
7068
7071
  //#endregion
7069
7072
  //#region src/components/Toast.tsx
7070
7073
  var Ua = {
7071
- info: /* @__PURE__ */ U(z, {
7074
+ info: /* @__PURE__ */ U(ue, {
7072
7075
  size: 16,
7073
7076
  className: "text-info"
7074
7077
  }),
@@ -7169,7 +7172,7 @@ function Ja({ id: e, title: t, description: n, progress: r, duration: i }) {
7169
7172
  "aria-hidden": "true",
7170
7173
  className: "absolute inset-y-0 left-0 w-0.5 bg-accent"
7171
7174
  }),
7172
- /* @__PURE__ */ U(fe, {
7175
+ /* @__PURE__ */ U(B, {
7173
7176
  size: 16,
7174
7177
  className: "shrink-0 animate-spin text-fg-3"
7175
7178
  }),
@@ -7346,7 +7349,7 @@ function no({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7346
7349
  left: "50%",
7347
7350
  transform: "translate(-50%, -50%)"
7348
7351
  };
7349
- return qe(/* @__PURE__ */ U(g, { children: t && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(y.div, {
7352
+ return typeof document > "u" ? null : qe(/* @__PURE__ */ U(g, { children: t && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(y.div, {
7350
7353
  initial: { opacity: 0 },
7351
7354
  animate: { opacity: 1 },
7352
7355
  exit: { opacity: 0 },
@@ -7791,7 +7794,7 @@ var po = a(function({ value: e, onChange: t, status: n = { state: "idle" }, past
7791
7794
  size: "sm",
7792
7795
  disabled: o,
7793
7796
  onClick: h,
7794
- children: /* @__PURE__ */ U(ne, { size: Z.sm })
7797
+ children: /* @__PURE__ */ U(I, { size: Z.sm })
7795
7798
  }),
7796
7799
  e && /* @__PURE__ */ U(J, {
7797
7800
  label: l.secretInputClear,
@@ -7806,7 +7809,7 @@ var po = a(function({ value: e, onChange: t, status: n = { state: "idle" }, past
7806
7809
  active: d,
7807
7810
  disabled: o,
7808
7811
  onClick: () => f((e) => !e),
7809
- children: U(d ? ce : se, { size: Z.sm })
7812
+ children: U(d ? se : oe, { size: Z.sm })
7810
7813
  })
7811
7814
  ]
7812
7815
  })]
@@ -7859,7 +7862,7 @@ function ho({ item: e, index: t, count: n, handleOnly: r, axis: i, onMove: a, cl
7859
7862
  },
7860
7863
  onPointerDown: (e) => l.start(e),
7861
7864
  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 })
7865
+ children: /* @__PURE__ */ U(le, { size: Z.md })
7863
7866
  });
7864
7867
  return /* @__PURE__ */ U(_.Item, {
7865
7868
  value: e,
@@ -8071,7 +8074,7 @@ function xo({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, fo
8071
8074
  label: e.name,
8072
8075
  description: e.meta,
8073
8076
  group: e.provider,
8074
- icon: e.local ? /* @__PURE__ */ U(ie, { size: Z.md }) : /* @__PURE__ */ U(le, { size: Z.md }),
8077
+ icon: e.local ? /* @__PURE__ */ U(R, { size: Z.md }) : /* @__PURE__ */ U(ce, { size: Z.md }),
8075
8078
  meta: /* @__PURE__ */ W("span", {
8076
8079
  className: "flex items-center gap-1",
8077
8080
  children: [bo(e, u), e.id === i && /* @__PURE__ */ U(ut, {
@@ -8103,7 +8106,7 @@ function xo({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, fo
8103
8106
  children: [
8104
8107
  /* @__PURE__ */ U("span", {
8105
8108
  className: "shrink-0 text-fg-3",
8106
- children: g?.local ? /* @__PURE__ */ U(ie, { size: Z.md }) : /* @__PURE__ */ U(le, { size: Z.md })
8109
+ children: g?.local ? /* @__PURE__ */ U(R, { size: Z.md }) : /* @__PURE__ */ U(ce, { size: Z.md })
8107
8110
  }),
8108
8111
  /* @__PURE__ */ U("span", {
8109
8112
  className: G("min-w-0 flex-1 truncate", !g && "text-fg-4"),
@@ -8128,7 +8131,7 @@ function xo({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, fo
8128
8131
  children: [v.map((r) => /* @__PURE__ */ U(ci, {
8129
8132
  label: r,
8130
8133
  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 }),
8134
+ icon: e.local ? /* @__PURE__ */ U(R, { size: Z.lg }) : /* @__PURE__ */ U(ce, { size: Z.lg }),
8132
8135
  tone: e.local ? "accent" : "info",
8133
8136
  title: e.name,
8134
8137
  description: /* @__PURE__ */ W("span", {
@@ -8182,7 +8185,7 @@ function So({ index: e, title: t, url: n, snippet: r, domain: i, favicon: a, cla
8182
8185
  src: a,
8183
8186
  alt: "",
8184
8187
  className: "h-4 w-4 rounded-sm object-contain"
8185
- }) : /* @__PURE__ */ U(le, { size: Z.xs })
8188
+ }) : /* @__PURE__ */ U(ce, { size: Z.xs })
8186
8189
  }), /* @__PURE__ */ W("div", {
8187
8190
  className: "min-w-0 flex-1",
8188
8191
  children: [/* @__PURE__ */ U("p", {
@@ -8207,7 +8210,7 @@ function So({ index: e, title: t, url: n, snippet: r, domain: i, favicon: a, cla
8207
8210
  target: "_blank",
8208
8211
  rel: "noopener noreferrer",
8209
8212
  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 })]
8213
+ children: [/* @__PURE__ */ U("span", { children: s.citationVisit }), /* @__PURE__ */ U(ae, { size: 12 })]
8211
8214
  })
8212
8215
  ]
8213
8216
  });
@@ -8273,7 +8276,7 @@ function Co({ sentiment: e = null, onLike: t, onDislike: n, onCopy: r, copyText:
8273
8276
  } catch {}
8274
8277
  },
8275
8278
  className: G(l && "text-accent"),
8276
- children: U(l ? M : R, { size: Z.xs })
8279
+ children: U(l ? M : L, { size: Z.xs })
8277
8280
  }),
8278
8281
  a && /* @__PURE__ */ U(J, {
8279
8282
  size: "sm",