@versini/sassysaint 8.90.3 → 8.92.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.
Files changed (29) hide show
  1. package/dist/chunks/{AboutChangelog.CPjLntlq.js → AboutChangelog.BOP3BSrk.js} +3 -3
  2. package/dist/chunks/AboutEntry.Bj8HUsU4.js +89 -0
  3. package/dist/chunks/{App.zkb8gvM3.js → App.DAQta2pJ.js} +638 -613
  4. package/dist/chunks/{Chart.DLxNkoZh.js → Chart.4eKSXUC7.js} +1133 -1143
  5. package/dist/chunks/ChatBubbleAssistant.CSgJfGV8.js +71 -0
  6. package/dist/chunks/{ChatBubbleUser.BVHUcko2.js → ChatBubbleUser.K3_2TN_h.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.BupKfYV_.js → ChatHistoryTable.BngsfWch.js} +8 -8
  8. package/dist/chunks/{HistoryEntry.B0rPR2OE.js → HistoryEntry.BXEni06v.js} +38 -37
  9. package/dist/chunks/{ProfileEntry.NsztPEkp.js → ProfileEntry.B5H9_Q-0.js} +21 -20
  10. package/dist/chunks/{SettingsEntry.CDOPc6iD.js → SettingsEntry.D5cipDqa.js} +25 -24
  11. package/dist/chunks/UsageEntry.DPue9312.js +211 -0
  12. package/dist/chunks/{UserMemoriesPanel.4Bgcvr6X.js → UserMemoriesPanel.CwAnAj0p.js} +13 -12
  13. package/dist/chunks/{index.ChYRuj2g.js → index.BECvwaM5.js} +764 -736
  14. package/dist/chunks/{index.BAQ69A14.js → index.C5Rg3-rY.js} +1 -1
  15. package/dist/chunks/{index.BqwARS2K.js → index.C9N2vELq.js} +1 -1
  16. package/dist/chunks/{index.D12uAEYv.js → index.CGdw9MqW.js} +2 -2
  17. package/dist/chunks/{index.DIt56Ck2.js → index.CzSTlOsu.js} +3 -3
  18. package/dist/chunks/{index.Bg0DWoXf.js → index.Drx_3ie_.js} +1 -1
  19. package/dist/chunks/{index.DUcwF6lX.js → index.N6iGJtWi.js} +1 -1
  20. package/dist/chunks/{index.wC_fDv6h.js → index.NHQBZNrH.js} +1 -1
  21. package/dist/chunks/{index.BMVDRH6N.js → index.hL9trLAw.js} +1 -1
  22. package/dist/chunks/{useMarkdown.D-AXpwz2.js → useMarkdown.keqTeXmn.js} +6 -6
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/dist/style.css +1 -1
  26. package/package.json +3 -3
  27. package/dist/chunks/AboutEntry.D4NbCMmI.js +0 -69
  28. package/dist/chunks/ChatBubbleAssistant.CT-lt9VL.js +0 -82
  29. package/dist/chunks/UsageEntry.Bq3qWoi3.js +0 -152
@@ -1,8 +1,8 @@
1
- import { jsx as p, jsxs as N, Fragment as ze } from "react/jsx-runtime";
2
- import { ACTION_SORT as da, e$1 as gt, ACTION_SEARCH as pa, ACTION_RESET_PROMPT as mo, ACTION_TOGGLE_PROMPT as ho, ChatContext as we, LOCAL_STORAGE_PREFIX as ke, LOCAL_STORAGE_CHAT_ID as jt, n as Ie, useLocalStorage as Ae, isDev as fa, isPWAMode as go, isTauri as _t, useChat as ma, useClickOutside as ha, useInterval as ga, useTheme as Ce, ButtonIcon as xe, IconAddLight as va, DEFAULT_ICON_ACTION_SIZE as Ne, useUserPreferences as Ue, useHotkeys as Fr, isProbablyiPhone as Re, IconCloseLight as ya, IconEditLight as _a, serverUrl as vo, useEntitlements as Br, IconClose as yo, useHaptic as ba, L as Sr, j$1 as at, Button as cn, useSaveChat as wa, LOCAL_STORAGE_PRIVATE_DISCLOSURE as Ia, j as Jt, IconLockedLight as Ea, IconUnlockedLight as Ta, IconSelected as Sa, IconUnSelected as ka, IconNext as Ca, PromptsContext as Vr, IconBookSparklesLight as xa, IconRewrite as Aa, IconProofread as Na, IconMagic as Oa, LOCAL_STORAGE_REASONING_DISCLOSURE as Pa, IconLightBulbLight as Ra, IconSendLight as za, INPUT_PLACEHOLDER_TEXT_IN_SESSION as _o, INPUT_PLACEHOLDER_TEXT_MORNING as Ma, INPUT_PLACEHOLDER_TEXT_TODAY as $a, INPUT_PLACEHOLDER_TEXT_AFTERNOON as Za, INPUT_PLACEHOLDER_TEXT_EVENING as Da, INPUT_PLACEHOLDER_TEXT_NIGHT as La, INPUT_PLACEHOLDER_TEXT_DEFAULT as Ua, PROMPT_EDITABLE_AREA_CLASSNAME as ja, PROMPT_CLASSNAME as Fa, AppContext as Ct, HistoryContext as bo, useChatsHistory as Ba, useUniqueId as Va, q as wo, ERROR_MESSAGE as Ha, i as bt, CLIPBOARD_PROMPT as ln, getHotkeyHandler as Ga, Y as Ja, FOOTER_DISCLAIMERS as un, useViewportSize as Wa, useVisualViewportSize as Ya, useResizeObserver as Io, isProbablyiPad as qa, INPUT_BOTTOM_OFFSET_EXTRA as dn, INPUT_BOTTOM_OFFSET_IPHONE as Xa, INPUT_BOTTOM_OFFSET_IPAD as Qa, INPUT_BOTTOM_OFFSET as Eo, APP_SET_FOOTER_HEIGHT as Ka, FOOTER_TOP as kr, FOOTER_BOTTOM as vt, APP_SET_FOOTER_POSITION as dr, getLayoutPaddingClass as Cr, canEvaluateModels as pn, X as ei, IconOpenAI as ti, l as ri, IconAnthropic as ni, _ as oi, IconGoogleGemini as si, R as ai, z as ii, H as pr, setNewProvider as fn, TOAST_PROVIDER_CHANGED as mn, useQueryClient as ci, LOG_OUT as hn, IconProfile as li, IconSliders as ui, IconHistory as di, IconEditUser as pi, IconChart as fi, IconInfo as mi, IconBack as hi, IconSettings as gi, o as To, O as gn, useInViewport as vi, useServerCapabilities as yi, getMessageContaintWrapperClass as _i, UI_FOOTER_BUFFER as So, UI_BUTTON_SCROLL_BUFFER as bi, Logo as wi, isProbablyMobile as Ii, UI_DEFAULT_MAIN_HEIGHT as vn, e as Ei, appReducer as Ti, applyOledMode as Si, APP_SET_OLED_MODE as ki, APP_SET_FULL_SCREEN as Ci, APP_SET_THEME_MODE as xi, APP_SET_THEME_PALETTE as Ai, UI_DEFAULT_MAIN_HEIGHT_IPHONE as Ni, APP_CLASSNAME as Oi, B as yn, w as Pi, LOCAL_STORAGE_SORT as Ri, LOCAL_STORAGE_SEARCH as zi, LOCAL_STORAGE_OLED_MODE as Mi, LOCAL_STORAGE_FULL_SCREEN as $i, LOCAL_STORAGE_SORT_TIMESTAMP as Zi, LOCAL_STORAGE_SORT_TOKEN_USAGE as Di, TOAST_CACHE_ENABLED as Li, TOAST_CACHE_DISABLED as Ui } from "./index.ChYRuj2g.js";
3
- import ko, { useRef as W, useCallback as q, useSyncExternalStore as fr, useEffect as $, useState as Z, createContext as Hr, useContext as X, forwardRef as Xe, cloneElement as ji, useId as Co, useLayoutEffect as Gr, useMemo as be, Suspense as Wt, lazy as Oe, useReducer as Rt } from "react";
4
- import z, { clsx as Me } from "clsx";
5
- import { computePosition as Fi, offset as xo, flip as Ao, shift as No, arrow as Bi, useMergeRefs as Jr, FloatingPortal as xr, FloatingOverlay as Vi, FloatingFocusManager as Ar, useFloating as Oo, useClick as Po, useDismiss as Ro, useRole as zo, useInteractions as Mo, useFloatingParentNodeId as $o, FloatingTree as Hi, useListItem as Zo, useFloatingTree as Do, useFloatingNodeId as Gi, autoUpdate as Ji, useHover as Wi, safePolygon as Yi, useListNavigation as qi, useTypeahead as Xi, FloatingNode as _n, FloatingList as bn } from "@floating-ui/react";
1
+ import { jsx as p, jsxs as N, Fragment as Me } from "react/jsx-runtime";
2
+ import { ACTION_SORT as da, e$1 as gt, ACTION_SEARCH as pa, ACTION_RESET_PROMPT as mo, ACTION_TOGGLE_PROMPT as ho, ChatContext as we, LOCAL_STORAGE_PREFIX as ke, LOCAL_STORAGE_CHAT_ID as jt, n as Ie, useLocalStorage as Ne, isDev as fa, isPWAMode as go, isTauri as _t, useChat as ma, useClickOutside as ha, useInterval as ga, useTheme as Ce, ButtonIcon as xe, IconAddLight as va, DEFAULT_ICON_ACTION_SIZE as Oe, useUserPreferences as je, useHotkeys as Fr, isProbablyiPhone as ze, IconCloseLight as ya, IconEditLight as _a, serverUrl as vo, useEntitlements as Br, IconClose as yo, useHaptic as ba, L as Sr, j as at, Button as cn, useSaveChat as wa, LOCAL_STORAGE_PRIVATE_DISCLOSURE as Ia, w as Jt, IconLockedLight as Ea, IconUnlockedLight as Ta, IconSelected as Sa, IconUnSelected as ka, IconNext as Ca, PromptsContext as Vr, IconBookSparklesLight as xa, IconRewrite as Aa, IconProofread as Na, IconMagic as Oa, LOCAL_STORAGE_REASONING_DISCLOSURE as Pa, IconLightBulbLight as Ra, IconSendLight as za, INPUT_PLACEHOLDER_TEXT_IN_SESSION as _o, INPUT_PLACEHOLDER_TEXT_MORNING as Ma, INPUT_PLACEHOLDER_TEXT_TODAY as $a, INPUT_PLACEHOLDER_TEXT_AFTERNOON as Za, INPUT_PLACEHOLDER_TEXT_EVENING as Da, INPUT_PLACEHOLDER_TEXT_NIGHT as La, INPUT_PLACEHOLDER_TEXT_DEFAULT as Ua, PROMPT_EDITABLE_AREA_CLASSNAME as ja, PROMPT_CLASSNAME as Fa, AppContext as Ct, HistoryContext as bo, useChatsHistory as Ba, useUniqueId as Va, j$1 as wo, ERROR_MESSAGE as Ha, o as bt, CLIPBOARD_PROMPT as ln, getHotkeyHandler as Ga, U as Ja, FOOTER_DISCLAIMERS as un, useViewportSize as Wa, useVisualViewportSize as Ya, useResizeObserver as Io, isProbablyiPad as qa, INPUT_BOTTOM_OFFSET_EXTRA as dn, INPUT_BOTTOM_OFFSET_IPHONE as Xa, INPUT_BOTTOM_OFFSET_IPAD as Qa, INPUT_BOTTOM_OFFSET as Eo, APP_SET_FOOTER_HEIGHT as Ka, FOOTER_TOP as kr, FOOTER_BOTTOM as vt, APP_SET_FOOTER_POSITION as dr, getLayoutPaddingClass as Cr, canEvaluateModels as pn, k as ei, IconOpenAI as ti, a as ri, IconAnthropic as ni, i as oi, IconGoogleGemini as si, s as ai, x as ii, p as pr, setNewProvider as fn, TOAST_PROVIDER_CHANGED as mn, useQueryClient as ci, LOG_OUT as hn, IconProfile as li, IconSliders as ui, IconHistory as di, IconEditUser as pi, IconChart as fi, IconInfo as mi, IconBack as hi, IconSettings as gi, n$1 as To, useInViewport as vi, useServerCapabilities as yi, getMessageContaintWrapperClass as _i, UI_FOOTER_BUFFER as So, UI_BUTTON_SCROLL_BUFFER as bi, Logo as wi, isProbablyMobile as Ii, UI_DEFAULT_MAIN_HEIGHT as gn, e as Ei, appReducer as Ti, applyOledMode as Si, APP_SET_OLED_MODE as ki, APP_SET_FULL_SCREEN as Ci, APP_SET_THEME_MODE as xi, APP_SET_THEME_PALETTE as Ai, UI_DEFAULT_MAIN_HEIGHT_IPHONE as Ni, APP_CLASSNAME as Oi, y as vn, v as Pi, LOCAL_STORAGE_SORT as Ri, LOCAL_STORAGE_SEARCH as zi, LOCAL_STORAGE_OLED_MODE as Mi, LOCAL_STORAGE_FULL_SCREEN as $i, LOCAL_STORAGE_SORT_TIMESTAMP as Zi, LOCAL_STORAGE_SORT_TOKEN_USAGE as Di, TOAST_CACHE_ENABLED as Li, TOAST_CACHE_DISABLED as Ui } from "./index.BECvwaM5.js";
3
+ import ko, { useRef as W, useCallback as q, useSyncExternalStore as fr, useEffect as $, useState as Z, createContext as Hr, useContext as X, forwardRef as Xe, useId as Co, useLayoutEffect as Gr, cloneElement as ji, useMemo as be, Suspense as Wt, lazy as Pe, useReducer as Rt } from "react";
4
+ import z, { clsx as $e } from "clsx";
5
+ import { computePosition as Fi, offset as xo, flip as Ao, shift as No, arrow as Bi, useMergeRefs as Jr, FloatingPortal as xr, FloatingOverlay as Vi, FloatingFocusManager as Ar, useFloating as Oo, useClick as Po, useDismiss as Ro, useRole as zo, useInteractions as Mo, useFloatingParentNodeId as $o, FloatingTree as Hi, useListItem as Zo, useFloatingTree as Do, useFloatingNodeId as Gi, autoUpdate as Ji, useHover as Wi, safePolygon as Yi, useListNavigation as qi, useTypeahead as Xi, FloatingNode as yn, FloatingList as _n } from "@floating-ui/react";
6
6
  var Lo = "vercel.ai.error", Qi = Symbol.for(Lo), Uo, Ki = class jo extends Error {
7
7
  /**
8
8
  * Creates an AI SDK Error.
@@ -33,11 +33,11 @@ var Lo = "vercel.ai.error", Qi = Symbol.for(Lo), Uo, Ki = class jo extends Error
33
33
  }
34
34
  };
35
35
  Uo = Qi;
36
- var $e = Ki;
36
+ var Ze = Ki;
37
37
  function Fo(e) {
38
38
  return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.message : JSON.stringify(e);
39
39
  }
40
- var Bo = "AI_InvalidArgumentError", Vo = `vercel.ai.error.${Bo}`, ec = Symbol.for(Vo), Ho, tc = class extends $e {
40
+ var Bo = "AI_InvalidArgumentError", Vo = `vercel.ai.error.${Bo}`, ec = Symbol.for(Vo), Ho, tc = class extends Ze {
41
41
  constructor({
42
42
  message: e,
43
43
  cause: t,
@@ -46,11 +46,11 @@ var Bo = "AI_InvalidArgumentError", Vo = `vercel.ai.error.${Bo}`, ec = Symbol.fo
46
46
  super({ name: Bo, message: e, cause: t }), this[Ho] = !0, this.argument = r;
47
47
  }
48
48
  static isInstance(e) {
49
- return $e.hasMarker(e, Vo);
49
+ return Ze.hasMarker(e, Vo);
50
50
  }
51
51
  };
52
52
  Ho = ec;
53
- var Go = "AI_JSONParseError", Jo = `vercel.ai.error.${Go}`, rc = Symbol.for(Jo), Wo, wn = class extends $e {
53
+ var Go = "AI_JSONParseError", Jo = `vercel.ai.error.${Go}`, rc = Symbol.for(Jo), Wo, bn = class extends Ze {
54
54
  constructor({ text: e, cause: t }) {
55
55
  super({
56
56
  name: Go,
@@ -60,11 +60,11 @@ Error message: ${Fo(t)}`,
60
60
  }), this[Wo] = !0, this.text = e;
61
61
  }
62
62
  static isInstance(e) {
63
- return $e.hasMarker(e, Jo);
63
+ return Ze.hasMarker(e, Jo);
64
64
  }
65
65
  };
66
66
  Wo = rc;
67
- var Yo = "AI_TypeValidationError", qo = `vercel.ai.error.${Yo}`, nc = Symbol.for(qo), Xo, oc = class Nr extends $e {
67
+ var Yo = "AI_TypeValidationError", qo = `vercel.ai.error.${Yo}`, nc = Symbol.for(qo), Xo, oc = class Nr extends Ze {
68
68
  constructor({ value: t, cause: r }) {
69
69
  super({
70
70
  name: Yo,
@@ -74,7 +74,7 @@ Error message: ${Fo(r)}`,
74
74
  }), this[Xo] = !0, this.value = t;
75
75
  }
76
76
  static isInstance(t) {
77
- return $e.hasMarker(t, qo);
77
+ return Ze.hasMarker(t, qo);
78
78
  }
79
79
  /**
80
80
  * Wraps an error into a TypeValidationError.
@@ -95,7 +95,7 @@ Error message: ${Fo(r)}`,
95
95
  };
96
96
  Xo = nc;
97
97
  var Yt = oc;
98
- class In extends Error {
98
+ class wn extends Error {
99
99
  constructor(t, r) {
100
100
  super(t), this.name = "ParseError", this.type = r.type, this.field = r.field, this.value = r.value, this.line = r.line;
101
101
  }
@@ -109,31 +109,31 @@ function sc(e) {
109
109
  );
110
110
  const { onEvent: t = mr, onError: r = mr, onRetry: n = mr, onComment: o } = e;
111
111
  let s = "", i = !0, a, l = "", c = "";
112
- function d(f) {
113
- const v = i ? f.replace(/^\xEF\xBB\xBF/, "") : f, [b, w] = ac(`${s}${v}`);
112
+ function d(m) {
113
+ const v = i ? m.replace(/^\xEF\xBB\xBF/, "") : m, [b, w] = ac(`${s}${v}`);
114
114
  for (const I of b)
115
115
  u(I);
116
116
  s = w, i = !1;
117
117
  }
118
- function u(f) {
119
- if (f === "") {
118
+ function u(m) {
119
+ if (m === "") {
120
120
  g();
121
121
  return;
122
122
  }
123
- if (f.startsWith(":")) {
124
- o && o(f.slice(f.startsWith(": ") ? 2 : 1));
123
+ if (m.startsWith(":")) {
124
+ o && o(m.slice(m.startsWith(": ") ? 2 : 1));
125
125
  return;
126
126
  }
127
- const v = f.indexOf(":");
127
+ const v = m.indexOf(":");
128
128
  if (v !== -1) {
129
- const b = f.slice(0, v), w = f[v + 1] === " " ? 2 : 1, I = f.slice(v + w);
130
- y(b, I, f);
129
+ const b = m.slice(0, v), w = m[v + 1] === " " ? 2 : 1, I = m.slice(v + w);
130
+ y(b, I, m);
131
131
  return;
132
132
  }
133
- y(f, "", f);
133
+ y(m, "", m);
134
134
  }
135
- function y(f, v, b) {
136
- switch (f) {
135
+ function y(m, v, b) {
136
+ switch (m) {
137
137
  case "event":
138
138
  c = v;
139
139
  break;
@@ -146,7 +146,7 @@ function sc(e) {
146
146
  break;
147
147
  case "retry":
148
148
  /^\d+$/.test(v) ? n(parseInt(v, 10)) : r(
149
- new In(`Invalid \`retry\` value: "${v}"`, {
149
+ new wn(`Invalid \`retry\` value: "${v}"`, {
150
150
  type: "invalid-retry",
151
151
  value: v,
152
152
  line: b
@@ -155,9 +155,9 @@ function sc(e) {
155
155
  break;
156
156
  default:
157
157
  r(
158
- new In(
159
- `Unknown field "${f.length > 20 ? `${f.slice(0, 20)}…` : f}"`,
160
- { type: "unknown-field", field: f, value: v, line: b }
158
+ new wn(
159
+ `Unknown field "${m.length > 20 ? `${m.slice(0, 20)}…` : m}"`,
160
+ { type: "unknown-field", field: m, value: v, line: b }
161
161
  )
162
162
  );
163
163
  break;
@@ -173,10 +173,10 @@ function sc(e) {
173
173
  `) ? l.slice(0, -1) : l
174
174
  }), a = void 0, l = "", c = "";
175
175
  }
176
- function m(f = {}) {
177
- s && f.consume && u(s), i = !0, a = void 0, l = "", c = "", s = "";
176
+ function f(m = {}) {
177
+ s && m.consume && u(s), i = !0, a = void 0, l = "", c = "", s = "";
178
178
  }
179
- return { feed: d, reset: m };
179
+ return { feed: d, reset: f };
180
180
  }
181
181
  function ac(e) {
182
182
  const t = [];
@@ -251,7 +251,7 @@ class wt extends Error {
251
251
  }
252
252
  }
253
253
  const Qo = {};
254
- function Ze(e) {
254
+ function De(e) {
255
255
  return Qo;
256
256
  }
257
257
  function Ko(e) {
@@ -479,7 +479,7 @@ function Ye(e, t) {
479
479
  function zt(e) {
480
480
  return typeof e == "string" ? e : e?.message;
481
481
  }
482
- function De(e, t, r) {
482
+ function Le(e, t, r) {
483
483
  const n = { ...e, path: e.path ?? [] };
484
484
  if (!e.message) {
485
485
  const o = zt(e.inst?._zod.def?.error?.(e)) ?? zt(t?.error?.(e)) ?? zt(r.customError?.(e)) ?? zt(r.localeError?.(e)) ?? "Invalid input";
@@ -551,7 +551,7 @@ const Ic = (e) => (t, r, n, o) => {
551
551
  if (i instanceof Promise)
552
552
  throw new wt();
553
553
  if (i.issues.length) {
554
- const a = new (o?.Err ?? e)(i.issues.map((l) => De(l, s, Ze())));
554
+ const a = new (o?.Err ?? e)(i.issues.map((l) => Le(l, s, De())));
555
555
  throw es(a, o?.callee), a;
556
556
  }
557
557
  return i.value;
@@ -559,7 +559,7 @@ const Ic = (e) => (t, r, n, o) => {
559
559
  const s = n ? Object.assign(n, { async: !0 }) : { async: !0 };
560
560
  let i = t._zod.run({ value: r, issues: [] }, s);
561
561
  if (i instanceof Promise && (i = await i), i.issues.length) {
562
- const a = new (o?.Err ?? e)(i.issues.map((l) => De(l, s, Ze())));
562
+ const a = new (o?.Err ?? e)(i.issues.map((l) => Le(l, s, De())));
563
563
  throw es(a, o?.callee), a;
564
564
  }
565
565
  return i.value;
@@ -569,16 +569,16 @@ const Ic = (e) => (t, r, n, o) => {
569
569
  throw new wt();
570
570
  return s.issues.length ? {
571
571
  success: !1,
572
- error: new (e ?? rs)(s.issues.map((i) => De(i, o, Ze())))
572
+ error: new (e ?? rs)(s.issues.map((i) => Le(i, o, De())))
573
573
  } : { success: !0, data: s.value };
574
574
  }, Tc = /* @__PURE__ */ os(ns), ss = (e) => async (t, r, n) => {
575
575
  const o = n ? Object.assign(n, { async: !0 }) : { async: !0 };
576
576
  let s = t._zod.run({ value: r, issues: [] }, o);
577
577
  return s instanceof Promise && (s = await s), s.issues.length ? {
578
578
  success: !1,
579
- error: new e(s.issues.map((i) => De(i, o, Ze())))
579
+ error: new e(s.issues.map((i) => Le(i, o, De())))
580
580
  } : { success: !0, data: s.value };
581
- }, Sc = /* @__PURE__ */ ss(ns), kc = /^[cC][^\s-]{8,}$/, Cc = /^[0-9a-z]+$/, xc = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ac = /^[0-9a-vA-V]{20}$/, Nc = /^[A-Za-z0-9]{27}$/, Oc = /^[a-zA-Z0-9_-]{21}$/, Pc = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Rc = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, En = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/, zc = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Mc = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
581
+ }, Sc = /* @__PURE__ */ ss(ns), kc = /^[cC][^\s-]{8,}$/, Cc = /^[0-9a-z]+$/, xc = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ac = /^[0-9a-vA-V]{20}$/, Nc = /^[A-Za-z0-9]{27}$/, Oc = /^[a-zA-Z0-9_-]{21}$/, Pc = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Rc = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, In = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/, zc = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Mc = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
582
582
  function $c() {
583
583
  return new RegExp(Mc, "u");
584
584
  }
@@ -987,9 +987,9 @@ const fl = {
987
987
  }[t.version];
988
988
  if (n === void 0)
989
989
  throw new Error(`Invalid UUID version: "${t.version}"`);
990
- t.pattern ?? (t.pattern = En(n));
990
+ t.pattern ?? (t.pattern = In(n));
991
991
  } else
992
- t.pattern ?? (t.pattern = En());
992
+ t.pattern ?? (t.pattern = In());
993
993
  V.init(e, t);
994
994
  }), gl = /* @__PURE__ */ _("$ZodEmail", (e, t) => {
995
995
  t.pattern ?? (t.pattern = zc), V.init(e, t);
@@ -1219,7 +1219,7 @@ const Dl = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
1219
1219
  inst: e
1220
1220
  }), r);
1221
1221
  });
1222
- function Tn(e, t, r) {
1222
+ function En(e, t, r) {
1223
1223
  e.issues.length && t.issues.push(...Ye(r, e.issues)), t.value[r] = e.value;
1224
1224
  }
1225
1225
  const Vl = /* @__PURE__ */ _("$ZodArray", (e, t) => {
@@ -1239,7 +1239,7 @@ const Vl = /* @__PURE__ */ _("$ZodArray", (e, t) => {
1239
1239
  value: a,
1240
1240
  issues: []
1241
1241
  }, n);
1242
- l instanceof Promise ? s.push(l.then((c) => Tn(c, r, i))) : Tn(l, r, i);
1242
+ l instanceof Promise ? s.push(l.then((c) => En(c, r, i))) : En(l, r, i);
1243
1243
  }
1244
1244
  return s.length ? Promise.all(s).then(() => r) : r;
1245
1245
  };
@@ -1247,7 +1247,7 @@ const Vl = /* @__PURE__ */ _("$ZodArray", (e, t) => {
1247
1247
  function Mt(e, t, r) {
1248
1248
  e.issues.length && t.issues.push(...Ye(r, e.issues)), t.value[r] = e.value;
1249
1249
  }
1250
- function Sn(e, t, r, n) {
1250
+ function Tn(e, t, r, n) {
1251
1251
  e.issues.length ? n[r] === void 0 ? r in n ? t.value[r] = void 0 : t.value[r] = e.value : t.issues.push(...Ye(r, e.issues)) : e.value === void 0 ? r in n && (t.value[r] = void 0) : t.value[r] = e.value;
1252
1252
  }
1253
1253
  const Hl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
@@ -1269,30 +1269,30 @@ const Hl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
1269
1269
  L(e._zod, "propValues", () => {
1270
1270
  const u = t.shape, y = {};
1271
1271
  for (const g in u) {
1272
- const m = u[g]._zod;
1273
- if (m.values) {
1272
+ const f = u[g]._zod;
1273
+ if (f.values) {
1274
1274
  y[g] ?? (y[g] = /* @__PURE__ */ new Set());
1275
- for (const f of m.values)
1276
- y[g].add(f);
1275
+ for (const m of f.values)
1276
+ y[g].add(m);
1277
1277
  }
1278
1278
  }
1279
1279
  return y;
1280
1280
  });
1281
1281
  const n = (u) => {
1282
- const y = new pl(["shape", "payload", "ctx"]), g = r.value, m = (w) => {
1282
+ const y = new pl(["shape", "payload", "ctx"]), g = r.value, f = (w) => {
1283
1283
  const I = dt(w);
1284
1284
  return `shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`;
1285
1285
  };
1286
1286
  y.write("const input = payload.value;");
1287
- const f = /* @__PURE__ */ Object.create(null);
1287
+ const m = /* @__PURE__ */ Object.create(null);
1288
1288
  let v = 0;
1289
1289
  for (const w of g.keys)
1290
- f[w] = `key_${v++}`;
1290
+ m[w] = `key_${v++}`;
1291
1291
  y.write("const newResult = {}");
1292
1292
  for (const w of g.keys)
1293
1293
  if (g.optionalKeys.has(w)) {
1294
- const I = f[w];
1295
- y.write(`const ${I} = ${m(w)};`);
1294
+ const I = m[w];
1295
+ y.write(`const ${I} = ${f(w)};`);
1296
1296
  const h = dt(w);
1297
1297
  y.write(`
1298
1298
  if (${I}.issues.length) {
@@ -1315,8 +1315,8 @@ const Hl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
1315
1315
  }
1316
1316
  `);
1317
1317
  } else {
1318
- const I = f[w];
1319
- y.write(`const ${I} = ${m(w)};`), y.write(`
1318
+ const I = m[w];
1319
+ y.write(`const ${I} = ${f(w)};`), y.write(`
1320
1320
  if (${I}.issues.length) payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
1321
1321
  ...iss,
1322
1322
  path: iss.path ? [${dt(w)}, ...iss.path] : [${dt(w)}]
@@ -1339,7 +1339,7 @@ const Hl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
1339
1339
  input: g,
1340
1340
  inst: e
1341
1341
  }), u;
1342
- const m = [];
1342
+ const f = [];
1343
1343
  if (i && l && y?.async === !1 && y.jitless !== !0)
1344
1344
  o || (o = n(t.shape)), u = o(u, y);
1345
1345
  else {
@@ -1347,31 +1347,31 @@ const Hl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
1347
1347
  const I = d.shape;
1348
1348
  for (const h of d.keys) {
1349
1349
  const S = I[h], x = S._zod.run({ value: g[h], issues: [] }, y), E = S._zod.optin === "optional" && S._zod.optout === "optional";
1350
- x instanceof Promise ? m.push(x.then((k) => E ? Sn(k, u, h, g) : Mt(k, u, h))) : E ? Sn(x, u, h, g) : Mt(x, u, h);
1350
+ x instanceof Promise ? f.push(x.then((k) => E ? Tn(k, u, h, g) : Mt(k, u, h))) : E ? Tn(x, u, h, g) : Mt(x, u, h);
1351
1351
  }
1352
1352
  }
1353
1353
  if (!c)
1354
- return m.length ? Promise.all(m).then(() => u) : u;
1355
- const f = [], v = d.keySet, b = c._zod, w = b.def.type;
1354
+ return f.length ? Promise.all(f).then(() => u) : u;
1355
+ const m = [], v = d.keySet, b = c._zod, w = b.def.type;
1356
1356
  for (const I of Object.keys(g)) {
1357
1357
  if (v.has(I))
1358
1358
  continue;
1359
1359
  if (w === "never") {
1360
- f.push(I);
1360
+ m.push(I);
1361
1361
  continue;
1362
1362
  }
1363
1363
  const h = b.run({ value: g[I], issues: [] }, y);
1364
- h instanceof Promise ? m.push(h.then((S) => Mt(S, u, I))) : Mt(h, u, I);
1364
+ h instanceof Promise ? f.push(h.then((S) => Mt(S, u, I))) : Mt(h, u, I);
1365
1365
  }
1366
- return f.length && u.issues.push({
1366
+ return m.length && u.issues.push({
1367
1367
  code: "unrecognized_keys",
1368
- keys: f,
1368
+ keys: m,
1369
1369
  input: g,
1370
1370
  inst: e
1371
- }), m.length ? Promise.all(m).then(() => u) : u;
1371
+ }), f.length ? Promise.all(f).then(() => u) : u;
1372
1372
  };
1373
1373
  });
1374
- function kn(e, t, r, n) {
1374
+ function Sn(e, t, r, n) {
1375
1375
  for (const o of e)
1376
1376
  if (o.issues.length === 0)
1377
1377
  return t.value = o.value, t;
@@ -1379,7 +1379,7 @@ function kn(e, t, r, n) {
1379
1379
  code: "invalid_union",
1380
1380
  input: t.value,
1381
1381
  inst: r,
1382
- errors: e.map((o) => o.issues.map((s) => De(s, n, Ze())))
1382
+ errors: e.map((o) => o.issues.map((s) => Le(s, n, De())))
1383
1383
  }), t;
1384
1384
  }
1385
1385
  const ms = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
@@ -1407,7 +1407,7 @@ const ms = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
1407
1407
  s.push(a);
1408
1408
  }
1409
1409
  }
1410
- return o ? Promise.all(s).then((i) => kn(i, r, e, n)) : kn(s, r, e, n);
1410
+ return o ? Promise.all(s).then((i) => Sn(i, r, e, n)) : Sn(s, r, e, n);
1411
1411
  };
1412
1412
  }), Gl = /* @__PURE__ */ _("$ZodDiscriminatedUnion", (e, t) => {
1413
1413
  ms.init(e, t);
@@ -1462,7 +1462,7 @@ const ms = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
1462
1462
  }), Jl = /* @__PURE__ */ _("$ZodIntersection", (e, t) => {
1463
1463
  F.init(e, t), e._zod.parse = (r, n) => {
1464
1464
  const o = r.value, s = t.left._zod.run({ value: o, issues: [] }, n), i = t.right._zod.run({ value: o, issues: [] }, n);
1465
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([l, c]) => Cn(r, l, c)) : Cn(r, s, i);
1465
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([l, c]) => kn(r, l, c)) : kn(r, s, i);
1466
1466
  };
1467
1467
  });
1468
1468
  function Or(e, t) {
@@ -1500,7 +1500,7 @@ function Or(e, t) {
1500
1500
  }
1501
1501
  return { valid: !1, mergeErrorPath: [] };
1502
1502
  }
1503
- function Cn(e, t, r) {
1503
+ function kn(e, t, r) {
1504
1504
  if (t.issues.length && e.issues.push(...t.issues), r.issues.length && e.issues.push(...r.issues), yt(e))
1505
1505
  return e;
1506
1506
  const n = Or(t.value, r.value);
@@ -1550,7 +1550,7 @@ const Wl = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
1550
1550
  r.issues.push({
1551
1551
  origin: "record",
1552
1552
  code: "invalid_key",
1553
- issues: a.issues.map((c) => De(c, n, Ze())),
1553
+ issues: a.issues.map((c) => Le(c, n, De())),
1554
1554
  input: i,
1555
1555
  path: [i],
1556
1556
  inst: e
@@ -1611,10 +1611,10 @@ const Wl = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
1611
1611
  if (r.value === void 0)
1612
1612
  return r.value = t.defaultValue, r;
1613
1613
  const o = t.innerType._zod.run(r, n);
1614
- return o instanceof Promise ? o.then((s) => xn(s, t)) : xn(o, t);
1614
+ return o instanceof Promise ? o.then((s) => Cn(s, t)) : Cn(o, t);
1615
1615
  };
1616
1616
  });
1617
- function xn(e, t) {
1617
+ function Cn(e, t) {
1618
1618
  return e.value === void 0 && (e.value = t.defaultValue), e;
1619
1619
  }
1620
1620
  const tu = /* @__PURE__ */ _("$ZodPrefault", (e, t) => {
@@ -1625,10 +1625,10 @@ const tu = /* @__PURE__ */ _("$ZodPrefault", (e, t) => {
1625
1625
  return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
1626
1626
  }), e._zod.parse = (r, n) => {
1627
1627
  const o = t.innerType._zod.run(r, n);
1628
- return o instanceof Promise ? o.then((s) => An(s, e)) : An(o, e);
1628
+ return o instanceof Promise ? o.then((s) => xn(s, e)) : xn(o, e);
1629
1629
  };
1630
1630
  });
1631
- function An(e, t) {
1631
+ function xn(e, t) {
1632
1632
  return !e.issues.length && e.value === void 0 && e.issues.push({
1633
1633
  code: "invalid_type",
1634
1634
  expected: "nonoptional",
@@ -1642,13 +1642,13 @@ const nu = /* @__PURE__ */ _("$ZodCatch", (e, t) => {
1642
1642
  return o instanceof Promise ? o.then((s) => (r.value = s.value, s.issues.length && (r.value = t.catchValue({
1643
1643
  ...r,
1644
1644
  error: {
1645
- issues: s.issues.map((i) => De(i, n, Ze()))
1645
+ issues: s.issues.map((i) => Le(i, n, De()))
1646
1646
  },
1647
1647
  input: r.value
1648
1648
  }), r.issues = []), r)) : (r.value = o.value, o.issues.length && (r.value = t.catchValue({
1649
1649
  ...r,
1650
1650
  error: {
1651
- issues: o.issues.map((s) => De(s, n, Ze()))
1651
+ issues: o.issues.map((s) => Le(s, n, De()))
1652
1652
  },
1653
1653
  input: r.value
1654
1654
  }), r.issues = []), r);
@@ -1656,19 +1656,19 @@ const nu = /* @__PURE__ */ _("$ZodCatch", (e, t) => {
1656
1656
  }), ou = /* @__PURE__ */ _("$ZodPipe", (e, t) => {
1657
1657
  F.init(e, t), L(e._zod, "values", () => t.in._zod.values), L(e._zod, "optin", () => t.in._zod.optin), L(e._zod, "optout", () => t.out._zod.optout), e._zod.parse = (r, n) => {
1658
1658
  const o = t.in._zod.run(r, n);
1659
- return o instanceof Promise ? o.then((s) => Nn(s, t, n)) : Nn(o, t, n);
1659
+ return o instanceof Promise ? o.then((s) => An(s, t, n)) : An(o, t, n);
1660
1660
  };
1661
1661
  });
1662
- function Nn(e, t, r) {
1662
+ function An(e, t, r) {
1663
1663
  return yt(e) ? e : t.out._zod.run({ value: e.value, issues: e.issues }, r);
1664
1664
  }
1665
1665
  const su = /* @__PURE__ */ _("$ZodReadonly", (e, t) => {
1666
1666
  F.init(e, t), L(e._zod, "propValues", () => t.innerType._zod.propValues), L(e._zod, "values", () => t.innerType._zod.values), L(e._zod, "optin", () => t.innerType._zod.optin), L(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (r, n) => {
1667
1667
  const o = t.innerType._zod.run(r, n);
1668
- return o instanceof Promise ? o.then(On) : On(o);
1668
+ return o instanceof Promise ? o.then(Nn) : Nn(o);
1669
1669
  };
1670
1670
  });
1671
- function On(e) {
1671
+ function Nn(e) {
1672
1672
  return e.value = Object.freeze(e.value), e;
1673
1673
  }
1674
1674
  const au = /* @__PURE__ */ _("$ZodLazy", (e, t) => {
@@ -1677,11 +1677,11 @@ const au = /* @__PURE__ */ _("$ZodLazy", (e, t) => {
1677
1677
  ie.init(e, t), F.init(e, t), e._zod.parse = (r, n) => r, e._zod.check = (r) => {
1678
1678
  const n = r.value, o = t.fn(n);
1679
1679
  if (o instanceof Promise)
1680
- return o.then((s) => Pn(s, r, n, e));
1681
- Pn(o, r, n, e);
1680
+ return o.then((s) => On(s, r, n, e));
1681
+ On(o, r, n, e);
1682
1682
  };
1683
1683
  });
1684
- function Pn(e, t, r, n) {
1684
+ function On(e, t, r, n) {
1685
1685
  if (!e) {
1686
1686
  const o = {
1687
1687
  code: "custom",
@@ -1747,7 +1747,7 @@ function uu(e, t) {
1747
1747
  ...T(t)
1748
1748
  });
1749
1749
  }
1750
- function Rn(e, t) {
1750
+ function Pn(e, t) {
1751
1751
  return new e({
1752
1752
  type: "string",
1753
1753
  format: "guid",
@@ -2014,7 +2014,7 @@ function Uu(e, t) {
2014
2014
  ...T(t)
2015
2015
  });
2016
2016
  }
2017
- function zn(e, t) {
2017
+ function Rn(e, t) {
2018
2018
  return new us({
2019
2019
  check: "less_than",
2020
2020
  ...T(t),
@@ -2030,7 +2030,7 @@ function hr(e, t) {
2030
2030
  inclusive: !0
2031
2031
  });
2032
2032
  }
2033
- function Mn(e, t) {
2033
+ function zn(e, t) {
2034
2034
  return new ds({
2035
2035
  check: "greater_than",
2036
2036
  ...T(t),
@@ -2046,7 +2046,7 @@ function gr(e, t) {
2046
2046
  inclusive: !0
2047
2047
  });
2048
2048
  }
2049
- function $n(e, t) {
2049
+ function Mn(e, t) {
2050
2050
  return new el({
2051
2051
  check: "multiple_of",
2052
2052
  ...T(t),
@@ -2165,7 +2165,7 @@ function Ku(e, t, r) {
2165
2165
  ...T(r)
2166
2166
  });
2167
2167
  }
2168
- class Zn {
2168
+ class $n {
2169
2169
  constructor(t) {
2170
2170
  this.counter = 0, this.metadataRegistry = t?.metadata ?? pt, this.target = t?.target ?? "draft-2020-12", this.unrepresentable = t?.unrepresentable ?? "throw", this.override = t?.override ?? (() => {
2171
2171
  }), this.io = t?.io ?? "output", this.seen = /* @__PURE__ */ new Map();
@@ -2199,12 +2199,12 @@ class Zn {
2199
2199
  const g = a.schema;
2200
2200
  switch (o.type) {
2201
2201
  case "string": {
2202
- const m = g;
2203
- m.type = "string";
2204
- const { minimum: f, maximum: v, format: b, patterns: w, contentEncoding: I } = t._zod.bag;
2205
- if (typeof f == "number" && (m.minLength = f), typeof v == "number" && (m.maxLength = v), b && (m.format = s[b] ?? b, m.format === "" && delete m.format), I && (m.contentEncoding = I), w && w.size > 0) {
2202
+ const f = g;
2203
+ f.type = "string";
2204
+ const { minimum: m, maximum: v, format: b, patterns: w, contentEncoding: I } = t._zod.bag;
2205
+ if (typeof m == "number" && (f.minLength = m), typeof v == "number" && (f.maxLength = v), b && (f.format = s[b] ?? b, f.format === "" && delete f.format), I && (f.contentEncoding = I), w && w.size > 0) {
2206
2206
  const h = [...w];
2207
- h.length === 1 ? m.pattern = h[0].source : h.length > 1 && (a.schema.allOf = [
2207
+ h.length === 1 ? f.pattern = h[0].source : h.length > 1 && (a.schema.allOf = [
2208
2208
  ...h.map((S) => ({
2209
2209
  ...this.target === "draft-7" ? { type: "string" } : {},
2210
2210
  pattern: S.source
@@ -2214,13 +2214,13 @@ class Zn {
2214
2214
  break;
2215
2215
  }
2216
2216
  case "number": {
2217
- const m = g, { minimum: f, maximum: v, format: b, multipleOf: w, exclusiveMaximum: I, exclusiveMinimum: h } = t._zod.bag;
2218
- typeof b == "string" && b.includes("int") ? m.type = "integer" : m.type = "number", typeof h == "number" && (m.exclusiveMinimum = h), typeof f == "number" && (m.minimum = f, typeof h == "number" && (h >= f ? delete m.minimum : delete m.exclusiveMinimum)), typeof I == "number" && (m.exclusiveMaximum = I), typeof v == "number" && (m.maximum = v, typeof I == "number" && (I <= v ? delete m.maximum : delete m.exclusiveMaximum)), typeof w == "number" && (m.multipleOf = w);
2217
+ const f = g, { minimum: m, maximum: v, format: b, multipleOf: w, exclusiveMaximum: I, exclusiveMinimum: h } = t._zod.bag;
2218
+ typeof b == "string" && b.includes("int") ? f.type = "integer" : f.type = "number", typeof h == "number" && (f.exclusiveMinimum = h), typeof m == "number" && (f.minimum = m, typeof h == "number" && (h >= m ? delete f.minimum : delete f.exclusiveMinimum)), typeof I == "number" && (f.exclusiveMaximum = I), typeof v == "number" && (f.maximum = v, typeof I == "number" && (I <= v ? delete f.maximum : delete f.exclusiveMaximum)), typeof w == "number" && (f.multipleOf = w);
2219
2219
  break;
2220
2220
  }
2221
2221
  case "boolean": {
2222
- const m = g;
2223
- m.type = "boolean";
2222
+ const f = g;
2223
+ f.type = "boolean";
2224
2224
  break;
2225
2225
  }
2226
2226
  case "bigint": {
@@ -2261,73 +2261,73 @@ class Zn {
2261
2261
  break;
2262
2262
  }
2263
2263
  case "array": {
2264
- const m = g, { minimum: f, maximum: v } = t._zod.bag;
2265
- typeof f == "number" && (m.minItems = f), typeof v == "number" && (m.maxItems = v), m.type = "array", m.items = this.process(o.element, { ...u, path: [...u.path, "items"] });
2264
+ const f = g, { minimum: m, maximum: v } = t._zod.bag;
2265
+ typeof m == "number" && (f.minItems = m), typeof v == "number" && (f.maxItems = v), f.type = "array", f.items = this.process(o.element, { ...u, path: [...u.path, "items"] });
2266
2266
  break;
2267
2267
  }
2268
2268
  case "object": {
2269
- const m = g;
2270
- m.type = "object", m.properties = {};
2271
- const f = o.shape;
2272
- for (const w in f)
2273
- m.properties[w] = this.process(f[w], {
2269
+ const f = g;
2270
+ f.type = "object", f.properties = {};
2271
+ const m = o.shape;
2272
+ for (const w in m)
2273
+ f.properties[w] = this.process(m[w], {
2274
2274
  ...u,
2275
2275
  path: [...u.path, "properties", w]
2276
2276
  });
2277
- const v = new Set(Object.keys(f)), b = new Set([...v].filter((w) => {
2277
+ const v = new Set(Object.keys(m)), b = new Set([...v].filter((w) => {
2278
2278
  const I = o.shape[w]._zod;
2279
2279
  return this.io === "input" ? I.optin === void 0 : I.optout === void 0;
2280
2280
  }));
2281
- b.size > 0 && (m.required = Array.from(b)), o.catchall?._zod.def.type === "never" ? m.additionalProperties = !1 : o.catchall ? o.catchall && (m.additionalProperties = this.process(o.catchall, {
2281
+ b.size > 0 && (f.required = Array.from(b)), o.catchall?._zod.def.type === "never" ? f.additionalProperties = !1 : o.catchall ? o.catchall && (f.additionalProperties = this.process(o.catchall, {
2282
2282
  ...u,
2283
2283
  path: [...u.path, "additionalProperties"]
2284
- })) : this.io === "output" && (m.additionalProperties = !1);
2284
+ })) : this.io === "output" && (f.additionalProperties = !1);
2285
2285
  break;
2286
2286
  }
2287
2287
  case "union": {
2288
- const m = g;
2289
- m.anyOf = o.options.map((f, v) => this.process(f, {
2288
+ const f = g;
2289
+ f.anyOf = o.options.map((m, v) => this.process(m, {
2290
2290
  ...u,
2291
2291
  path: [...u.path, "anyOf", v]
2292
2292
  }));
2293
2293
  break;
2294
2294
  }
2295
2295
  case "intersection": {
2296
- const m = g, f = this.process(o.left, {
2296
+ const f = g, m = this.process(o.left, {
2297
2297
  ...u,
2298
2298
  path: [...u.path, "allOf", 0]
2299
2299
  }), v = this.process(o.right, {
2300
2300
  ...u,
2301
2301
  path: [...u.path, "allOf", 1]
2302
2302
  }), b = (I) => "allOf" in I && Object.keys(I).length === 1, w = [
2303
- ...b(f) ? f.allOf : [f],
2303
+ ...b(m) ? m.allOf : [m],
2304
2304
  ...b(v) ? v.allOf : [v]
2305
2305
  ];
2306
- m.allOf = w;
2306
+ f.allOf = w;
2307
2307
  break;
2308
2308
  }
2309
2309
  case "tuple": {
2310
- const m = g;
2311
- m.type = "array";
2312
- const f = o.items.map((w, I) => this.process(w, { ...u, path: [...u.path, "prefixItems", I] }));
2313
- if (this.target === "draft-2020-12" ? m.prefixItems = f : m.items = f, o.rest) {
2310
+ const f = g;
2311
+ f.type = "array";
2312
+ const m = o.items.map((w, I) => this.process(w, { ...u, path: [...u.path, "prefixItems", I] }));
2313
+ if (this.target === "draft-2020-12" ? f.prefixItems = m : f.items = m, o.rest) {
2314
2314
  const w = this.process(o.rest, {
2315
2315
  ...u,
2316
2316
  path: [...u.path, "items"]
2317
2317
  });
2318
- this.target === "draft-2020-12" ? m.items = w : m.additionalItems = w;
2318
+ this.target === "draft-2020-12" ? f.items = w : f.additionalItems = w;
2319
2319
  }
2320
- o.rest && (m.items = this.process(o.rest, {
2320
+ o.rest && (f.items = this.process(o.rest, {
2321
2321
  ...u,
2322
2322
  path: [...u.path, "items"]
2323
2323
  }));
2324
2324
  const { minimum: v, maximum: b } = t._zod.bag;
2325
- typeof v == "number" && (m.minItems = v), typeof b == "number" && (m.maxItems = b);
2325
+ typeof v == "number" && (f.minItems = v), typeof b == "number" && (f.maxItems = b);
2326
2326
  break;
2327
2327
  }
2328
2328
  case "record": {
2329
- const m = g;
2330
- m.type = "object", m.propertyNames = this.process(o.keyType, { ...u, path: [...u.path, "propertyNames"] }), m.additionalProperties = this.process(o.valueType, {
2329
+ const f = g;
2330
+ f.type = "object", f.propertyNames = this.process(o.keyType, { ...u, path: [...u.path, "propertyNames"] }), f.additionalProperties = this.process(o.valueType, {
2331
2331
  ...u,
2332
2332
  path: [...u.path, "additionalProperties"]
2333
2333
  });
@@ -2344,12 +2344,12 @@ class Zn {
2344
2344
  break;
2345
2345
  }
2346
2346
  case "enum": {
2347
- const m = g, f = Ko(o.entries);
2348
- f.every((v) => typeof v == "number") && (m.type = "number"), f.every((v) => typeof v == "string") && (m.type = "string"), m.enum = f;
2347
+ const f = g, m = Ko(o.entries);
2348
+ m.every((v) => typeof v == "number") && (f.type = "number"), m.every((v) => typeof v == "string") && (f.type = "string"), f.enum = m;
2349
2349
  break;
2350
2350
  }
2351
2351
  case "literal": {
2352
- const m = g, f = [];
2352
+ const f = g, m = [];
2353
2353
  for (const v of o.values)
2354
2354
  if (v === void 0) {
2355
2355
  if (this.unrepresentable === "throw")
@@ -2357,23 +2357,23 @@ class Zn {
2357
2357
  } else if (typeof v == "bigint") {
2358
2358
  if (this.unrepresentable === "throw")
2359
2359
  throw new Error("BigInt literals cannot be represented in JSON Schema");
2360
- f.push(Number(v));
2360
+ m.push(Number(v));
2361
2361
  } else
2362
- f.push(v);
2363
- if (f.length !== 0) if (f.length === 1) {
2364
- const v = f[0];
2365
- m.type = v === null ? "null" : typeof v, m.const = v;
2362
+ m.push(v);
2363
+ if (m.length !== 0) if (m.length === 1) {
2364
+ const v = m[0];
2365
+ f.type = v === null ? "null" : typeof v, f.const = v;
2366
2366
  } else
2367
- f.every((v) => typeof v == "number") && (m.type = "number"), f.every((v) => typeof v == "string") && (m.type = "string"), f.every((v) => typeof v == "boolean") && (m.type = "string"), f.every((v) => v === null) && (m.type = "null"), m.enum = f;
2367
+ m.every((v) => typeof v == "number") && (f.type = "number"), m.every((v) => typeof v == "string") && (f.type = "string"), m.every((v) => typeof v == "boolean") && (f.type = "string"), m.every((v) => v === null) && (f.type = "null"), f.enum = m;
2368
2368
  break;
2369
2369
  }
2370
2370
  case "file": {
2371
- const m = g, f = {
2371
+ const f = g, m = {
2372
2372
  type: "string",
2373
2373
  format: "binary",
2374
2374
  contentEncoding: "binary"
2375
2375
  }, { minimum: v, maximum: b, mime: w } = t._zod.bag;
2376
- v !== void 0 && (f.minLength = v), b !== void 0 && (f.maxLength = b), w ? w.length === 1 ? (f.contentMediaType = w[0], Object.assign(m, f)) : m.anyOf = w.map((I) => ({ ...f, contentMediaType: I })) : Object.assign(m, f);
2376
+ v !== void 0 && (m.minLength = v), b !== void 0 && (m.maxLength = b), w ? w.length === 1 ? (m.contentMediaType = w[0], Object.assign(f, m)) : f.anyOf = w.map((I) => ({ ...m, contentMediaType: I })) : Object.assign(f, m);
2377
2377
  break;
2378
2378
  }
2379
2379
  case "transform": {
@@ -2382,8 +2382,8 @@ class Zn {
2382
2382
  break;
2383
2383
  }
2384
2384
  case "nullable": {
2385
- const m = this.process(o.innerType, u);
2386
- g.anyOf = [m, { type: "null" }];
2385
+ const f = this.process(o.innerType, u);
2386
+ g.anyOf = [f, { type: "null" }];
2387
2387
  break;
2388
2388
  }
2389
2389
  case "nonoptional": {
@@ -2391,8 +2391,8 @@ class Zn {
2391
2391
  break;
2392
2392
  }
2393
2393
  case "success": {
2394
- const m = g;
2395
- m.type = "boolean";
2394
+ const f = g;
2395
+ f.type = "boolean";
2396
2396
  break;
2397
2397
  }
2398
2398
  case "default": {
@@ -2405,13 +2405,13 @@ class Zn {
2405
2405
  }
2406
2406
  case "catch": {
2407
2407
  this.process(o.innerType, u), a.ref = o.innerType;
2408
- let m;
2408
+ let f;
2409
2409
  try {
2410
- m = o.catchValue(void 0);
2410
+ f = o.catchValue(void 0);
2411
2411
  } catch {
2412
2412
  throw new Error("Dynamic catch values are not supported in JSON Schema");
2413
2413
  }
2414
- g.default = m;
2414
+ g.default = f;
2415
2415
  break;
2416
2416
  }
2417
2417
  case "nan": {
@@ -2420,15 +2420,15 @@ class Zn {
2420
2420
  break;
2421
2421
  }
2422
2422
  case "template_literal": {
2423
- const m = g, f = t._zod.pattern;
2424
- if (!f)
2423
+ const f = g, m = t._zod.pattern;
2424
+ if (!m)
2425
2425
  throw new Error("Pattern not found in template literal");
2426
- m.type = "string", m.pattern = f.source;
2426
+ f.type = "string", f.pattern = m.source;
2427
2427
  break;
2428
2428
  }
2429
2429
  case "pipe": {
2430
- const m = this.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2431
- this.process(m, u), a.ref = m;
2430
+ const f = this.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2431
+ this.process(f, u), a.ref = f;
2432
2432
  break;
2433
2433
  }
2434
2434
  case "readonly": {
@@ -2445,8 +2445,8 @@ class Zn {
2445
2445
  break;
2446
2446
  }
2447
2447
  case "lazy": {
2448
- const m = t._zod.innerType;
2449
- this.process(m, u), a.ref = m;
2448
+ const f = t._zod.innerType;
2449
+ this.process(f, u), a.ref = f;
2450
2450
  break;
2451
2451
  }
2452
2452
  case "custom": {
@@ -2473,25 +2473,25 @@ class Zn {
2473
2473
  const s = (d) => {
2474
2474
  const u = this.target === "draft-2020-12" ? "$defs" : "definitions";
2475
2475
  if (n.external) {
2476
- const f = n.external.registry.get(d[0])?.id, v = n.external.uri ?? ((w) => w);
2477
- if (f)
2478
- return { ref: v(f) };
2476
+ const m = n.external.registry.get(d[0])?.id, v = n.external.uri ?? ((w) => w);
2477
+ if (m)
2478
+ return { ref: v(m) };
2479
2479
  const b = d[1].defId ?? d[1].schema.id ?? `schema${this.counter++}`;
2480
2480
  return d[1].defId = b, { defId: b, ref: `${v("__shared")}#/${u}/${b}` };
2481
2481
  }
2482
2482
  if (d[1] === o)
2483
2483
  return { ref: "#" };
2484
- const g = `#/${u}/`, m = d[1].schema.id ?? `__schema${this.counter++}`;
2485
- return { defId: m, ref: g + m };
2484
+ const g = `#/${u}/`, f = d[1].schema.id ?? `__schema${this.counter++}`;
2485
+ return { defId: f, ref: g + f };
2486
2486
  }, i = (d) => {
2487
2487
  if (d[1].schema.$ref)
2488
2488
  return;
2489
2489
  const u = d[1], { ref: y, defId: g } = s(d);
2490
2490
  u.def = { ...u.schema }, g && (u.defId = g);
2491
- const m = u.schema;
2492
- for (const f in m)
2493
- delete m[f];
2494
- m.$ref = y;
2491
+ const f = u.schema;
2492
+ for (const m in f)
2493
+ delete f[m];
2494
+ f.$ref = y;
2495
2495
  };
2496
2496
  if (n.cycles === "throw")
2497
2497
  for (const d of this.seen.entries()) {
@@ -2528,14 +2528,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2528
2528
  }
2529
2529
  }
2530
2530
  const a = (d, u) => {
2531
- const y = this.seen.get(d), g = y.def ?? y.schema, m = { ...g };
2531
+ const y = this.seen.get(d), g = y.def ?? y.schema, f = { ...g };
2532
2532
  if (y.ref === null)
2533
2533
  return;
2534
- const f = y.ref;
2535
- if (y.ref = null, f) {
2536
- a(f, u);
2537
- const v = this.seen.get(f).schema;
2538
- v.$ref && u.target === "draft-7" ? (g.allOf = g.allOf ?? [], g.allOf.push(v)) : (Object.assign(g, v), Object.assign(g, m));
2534
+ const m = y.ref;
2535
+ if (y.ref = null, m) {
2536
+ a(m, u);
2537
+ const v = this.seen.get(m).schema;
2538
+ v.$ref && u.target === "draft-7" ? (g.allOf = g.allOf ?? [], g.allOf.push(v)) : (Object.assign(g, v), Object.assign(g, f));
2539
2539
  }
2540
2540
  y.isParent || this.override({
2541
2541
  zodSchema: d,
@@ -2568,7 +2568,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2568
2568
  }
2569
2569
  function ed(e, t) {
2570
2570
  if (e instanceof hs) {
2571
- const n = new Zn(t), o = {};
2571
+ const n = new $n(t), o = {};
2572
2572
  for (const a of e._idmap.entries()) {
2573
2573
  const [l, c] = a;
2574
2574
  n.process(c);
@@ -2593,7 +2593,7 @@ function ed(e, t) {
2593
2593
  }
2594
2594
  return { schemas: s };
2595
2595
  }
2596
- const r = new Zn(t);
2596
+ const r = new $n(t);
2597
2597
  return r.process(e), r.emit(e, t);
2598
2598
  }
2599
2599
  function K(e, t) {
@@ -2735,7 +2735,7 @@ const ld = (e, t) => {
2735
2735
  ]
2736
2736
  }
2737
2737
  // { parent: true }
2738
- ), e.clone = (r, n) => Qe(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) => ud(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => pd(e, r, n), e.parseAsync = async (r, n) => dd(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => ys(e, r, n), e.spa = e.safeParseAsync, e.refine = (r, n) => e.check(ip(r, n)), e.superRefine = (r) => e.check(cp(r)), e.overwrite = (r) => e.check(At(r)), e.optional = () => Un(e), e.nullable = () => jn(e), e.nullish = () => Un(jn(e)), e.nonoptional = (r) => Qd(e, r), e.array = () => ct(e), e.or = (r) => fe([e, r]), e.and = (r) => Fd(e, r), e.transform = (r) => Fn(e, Gd(r)), e.default = (r) => Yd(e, r), e.prefault = (r) => Xd(e, r), e.catch = (r) => ep(e, r), e.pipe = (r) => Fn(e, r), e.readonly = () => np(e), e.describe = (r) => {
2738
+ ), e.clone = (r, n) => Qe(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) => ud(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => pd(e, r, n), e.parseAsync = async (r, n) => dd(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => ys(e, r, n), e.spa = e.safeParseAsync, e.refine = (r, n) => e.check(ip(r, n)), e.superRefine = (r) => e.check(cp(r)), e.overwrite = (r) => e.check(At(r)), e.optional = () => Ln(e), e.nullable = () => Un(e), e.nullish = () => Ln(Un(e)), e.nonoptional = (r) => Qd(e, r), e.array = () => ct(e), e.or = (r) => me([e, r]), e.and = (r) => Fd(e, r), e.transform = (r) => jn(e, Gd(r)), e.default = (r) => Yd(e, r), e.prefault = (r) => Xd(e, r), e.catch = (r) => ep(e, r), e.pipe = (r) => jn(e, r), e.readonly = () => np(e), e.describe = (r) => {
2739
2739
  const n = e.clone();
2740
2740
  return pt.add(n, { description: r }), n;
2741
2741
  }, Object.defineProperty(e, "description", {
@@ -2753,7 +2753,7 @@ const ld = (e, t) => {
2753
2753
  const r = e._zod.bag;
2754
2754
  e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(ju(...n)), e.includes = (...n) => e.check(Vu(...n)), e.startsWith = (...n) => e.check(Hu(...n)), e.endsWith = (...n) => e.check(Gu(...n)), e.min = (...n) => e.check(Qt(...n)), e.max = (...n) => e.check(gs(...n)), e.length = (...n) => e.check(vs(...n)), e.nonempty = (...n) => e.check(Qt(1, ...n)), e.lowercase = (n) => e.check(Fu(n)), e.uppercase = (n) => e.check(Bu(n)), e.trim = () => e.check(Wu()), e.normalize = (...n) => e.check(Ju(...n)), e.toLowerCase = () => e.check(Yu()), e.toUpperCase = () => e.check(qu());
2755
2755
  }), fd = /* @__PURE__ */ _("ZodString", (e, t) => {
2756
- Qr.init(e, t), _s.init(e, t), e.email = (r) => e.check(uu(md, r)), e.url = (r) => e.check(hu(hd, r)), e.jwt = (r) => e.check(Nu(Nd, r)), e.emoji = (r) => e.check(gu(gd, r)), e.guid = (r) => e.check(Rn(Dn, r)), e.uuid = (r) => e.check(du($t, r)), e.uuidv4 = (r) => e.check(pu($t, r)), e.uuidv6 = (r) => e.check(fu($t, r)), e.uuidv7 = (r) => e.check(mu($t, r)), e.nanoid = (r) => e.check(vu(vd, r)), e.guid = (r) => e.check(Rn(Dn, r)), e.cuid = (r) => e.check(yu(yd, r)), e.cuid2 = (r) => e.check(_u(_d, r)), e.ulid = (r) => e.check(bu(bd, r)), e.base64 = (r) => e.check(Cu(Cd, r)), e.base64url = (r) => e.check(xu(xd, r)), e.xid = (r) => e.check(wu(wd, r)), e.ksuid = (r) => e.check(Iu(Id, r)), e.ipv4 = (r) => e.check(Eu(Ed, r)), e.ipv6 = (r) => e.check(Tu(Td, r)), e.cidrv4 = (r) => e.check(Su(Sd, r)), e.cidrv6 = (r) => e.check(ku(kd, r)), e.e164 = (r) => e.check(Au(Ad, r)), e.datetime = (r) => e.check(rd(r)), e.date = (r) => e.check(od(r)), e.time = (r) => e.check(ad(r)), e.duration = (r) => e.check(cd(r));
2756
+ Qr.init(e, t), _s.init(e, t), e.email = (r) => e.check(uu(md, r)), e.url = (r) => e.check(hu(hd, r)), e.jwt = (r) => e.check(Nu(Nd, r)), e.emoji = (r) => e.check(gu(gd, r)), e.guid = (r) => e.check(Pn(Zn, r)), e.uuid = (r) => e.check(du($t, r)), e.uuidv4 = (r) => e.check(pu($t, r)), e.uuidv6 = (r) => e.check(fu($t, r)), e.uuidv7 = (r) => e.check(mu($t, r)), e.nanoid = (r) => e.check(vu(vd, r)), e.guid = (r) => e.check(Pn(Zn, r)), e.cuid = (r) => e.check(yu(yd, r)), e.cuid2 = (r) => e.check(_u(_d, r)), e.ulid = (r) => e.check(bu(bd, r)), e.base64 = (r) => e.check(Cu(Cd, r)), e.base64url = (r) => e.check(xu(xd, r)), e.xid = (r) => e.check(wu(wd, r)), e.ksuid = (r) => e.check(Iu(Id, r)), e.ipv4 = (r) => e.check(Eu(Ed, r)), e.ipv6 = (r) => e.check(Tu(Td, r)), e.cidrv4 = (r) => e.check(Su(Sd, r)), e.cidrv6 = (r) => e.check(ku(kd, r)), e.e164 = (r) => e.check(Au(Ad, r)), e.datetime = (r) => e.check(rd(r)), e.date = (r) => e.check(od(r)), e.time = (r) => e.check(ad(r)), e.duration = (r) => e.check(cd(r));
2757
2757
  });
2758
2758
  function C(e) {
2759
2759
  return lu(fd, e);
@@ -2762,7 +2762,7 @@ const J = /* @__PURE__ */ _("ZodStringFormat", (e, t) => {
2762
2762
  V.init(e, t), _s.init(e, t);
2763
2763
  }), md = /* @__PURE__ */ _("ZodEmail", (e, t) => {
2764
2764
  gl.init(e, t), J.init(e, t);
2765
- }), Dn = /* @__PURE__ */ _("ZodGUID", (e, t) => {
2765
+ }), Zn = /* @__PURE__ */ _("ZodGUID", (e, t) => {
2766
2766
  ml.init(e, t), J.init(e, t);
2767
2767
  }), $t = /* @__PURE__ */ _("ZodUUID", (e, t) => {
2768
2768
  hl.init(e, t), J.init(e, t);
@@ -2799,7 +2799,7 @@ const J = /* @__PURE__ */ _("ZodStringFormat", (e, t) => {
2799
2799
  }), Nd = /* @__PURE__ */ _("ZodJWT", (e, t) => {
2800
2800
  Dl.init(e, t), J.init(e, t);
2801
2801
  }), bs = /* @__PURE__ */ _("ZodNumber", (e, t) => {
2802
- fs.init(e, t), H.init(e, t), e.gt = (n, o) => e.check(Mn(n, o)), e.gte = (n, o) => e.check(gr(n, o)), e.min = (n, o) => e.check(gr(n, o)), e.lt = (n, o) => e.check(zn(n, o)), e.lte = (n, o) => e.check(hr(n, o)), e.max = (n, o) => e.check(hr(n, o)), e.int = (n) => e.check(Ln(n)), e.safe = (n) => e.check(Ln(n)), e.positive = (n) => e.check(Mn(0, n)), e.nonnegative = (n) => e.check(gr(0, n)), e.negative = (n) => e.check(zn(0, n)), e.nonpositive = (n) => e.check(hr(0, n)), e.multipleOf = (n, o) => e.check($n(n, o)), e.step = (n, o) => e.check($n(n, o)), e.finite = () => e;
2802
+ fs.init(e, t), H.init(e, t), e.gt = (n, o) => e.check(zn(n, o)), e.gte = (n, o) => e.check(gr(n, o)), e.min = (n, o) => e.check(gr(n, o)), e.lt = (n, o) => e.check(Rn(n, o)), e.lte = (n, o) => e.check(hr(n, o)), e.max = (n, o) => e.check(hr(n, o)), e.int = (n) => e.check(Dn(n)), e.safe = (n) => e.check(Dn(n)), e.positive = (n) => e.check(zn(0, n)), e.nonnegative = (n) => e.check(gr(0, n)), e.negative = (n) => e.check(Rn(0, n)), e.nonpositive = (n) => e.check(hr(0, n)), e.multipleOf = (n, o) => e.check(Mn(n, o)), e.step = (n, o) => e.check(Mn(n, o)), e.finite = () => e;
2803
2803
  const r = e._zod.bag;
2804
2804
  e.minValue = Math.max(r.minimum ?? Number.NEGATIVE_INFINITY, r.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(r.maximum ?? Number.POSITIVE_INFINITY, r.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (r.format ?? "").includes("int") || Number.isSafeInteger(r.multipleOf ?? 0.5), e.isFinite = !0, e.format = r.format ?? null;
2805
2805
  });
@@ -2809,7 +2809,7 @@ function Od(e) {
2809
2809
  const Pd = /* @__PURE__ */ _("ZodNumberFormat", (e, t) => {
2810
2810
  Ll.init(e, t), bs.init(e, t);
2811
2811
  });
2812
- function Ln(e) {
2812
+ function Dn(e) {
2813
2813
  return $u(Pd, e);
2814
2814
  }
2815
2815
  const Rd = /* @__PURE__ */ _("ZodBoolean", (e, t) => {
@@ -2868,7 +2868,7 @@ function G(e, t) {
2868
2868
  const Es = /* @__PURE__ */ _("ZodUnion", (e, t) => {
2869
2869
  ms.init(e, t), H.init(e, t), e.options = t.options;
2870
2870
  });
2871
- function fe(e, t) {
2871
+ function me(e, t) {
2872
2872
  return new Es({
2873
2873
  type: "union",
2874
2874
  options: e,
@@ -2985,7 +2985,7 @@ function Gd(e) {
2985
2985
  const Ss = /* @__PURE__ */ _("ZodOptional", (e, t) => {
2986
2986
  Ql.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.innerType;
2987
2987
  });
2988
- function Un(e) {
2988
+ function Ln(e) {
2989
2989
  return new Ss({
2990
2990
  type: "optional",
2991
2991
  innerType: e
@@ -2994,7 +2994,7 @@ function Un(e) {
2994
2994
  const Jd = /* @__PURE__ */ _("ZodNullable", (e, t) => {
2995
2995
  Kl.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.innerType;
2996
2996
  });
2997
- function jn(e) {
2997
+ function Un(e) {
2998
2998
  return new Jd({
2999
2999
  type: "nullable",
3000
3000
  innerType: e
@@ -3047,7 +3047,7 @@ function ep(e, t) {
3047
3047
  const tp = /* @__PURE__ */ _("ZodPipe", (e, t) => {
3048
3048
  ou.init(e, t), H.init(e, t), e.in = t.in, e.out = t.out;
3049
3049
  });
3050
- function Fn(e, t) {
3050
+ function jn(e, t) {
3051
3051
  return new tp({
3052
3052
  type: "pipe",
3053
3053
  in: e,
@@ -3137,7 +3137,7 @@ var Nt = ({
3137
3137
  });
3138
3138
  return () => `${e}${n}${o()}`;
3139
3139
  }, lp = Nt();
3140
- function Bn(e = globalThis) {
3140
+ function Fn(e = globalThis) {
3141
3141
  var t, r, n;
3142
3142
  return e.window ? "runtime/browser" : (t = e.navigator) != null && t.userAgent ? `runtime/${e.navigator.userAgent.toLowerCase()}` : (n = (r = e.process) == null ? void 0 : r.versions) != null && n.node ? `runtime/node.js/${e.process.version.substring(0)}` : e.EdgeRuntime ? "runtime/vercel-edge" : "runtime/unknown";
3143
3143
  }
@@ -3156,7 +3156,7 @@ function We(e) {
3156
3156
  }
3157
3157
  return t;
3158
3158
  }
3159
- function Vn(e, ...t) {
3159
+ function Bn(e, ...t) {
3160
3160
  const r = new Headers(We(e)), n = r.get("user-agent") || "";
3161
3161
  return r.set(
3162
3162
  "user-agent",
@@ -3164,7 +3164,7 @@ function Vn(e, ...t) {
3164
3164
  ), Object.fromEntries(r.entries());
3165
3165
  }
3166
3166
  var up = /"__proto__"\s*:/, dp = /"constructor"\s*:/;
3167
- function Hn(e) {
3167
+ function Vn(e) {
3168
3168
  const t = JSON.parse(e);
3169
3169
  return t === null || typeof t != "object" || up.test(e) === !1 && dp.test(e) === !1 ? t : pp(t);
3170
3170
  }
@@ -3191,10 +3191,10 @@ function fp(e) {
3191
3191
  try {
3192
3192
  Error.stackTraceLimit = 0;
3193
3193
  } catch {
3194
- return Hn(e);
3194
+ return Vn(e);
3195
3195
  }
3196
3196
  try {
3197
- return Hn(e);
3197
+ return Vn(e);
3198
3198
  } finally {
3199
3199
  Error.stackTraceLimit = t;
3200
3200
  }
@@ -3225,7 +3225,7 @@ function yp(e) {
3225
3225
  };
3226
3226
  });
3227
3227
  }
3228
- async function Gn({
3228
+ async function Hn({
3229
3229
  value: e,
3230
3230
  schema: t
3231
3231
  }) {
@@ -3266,7 +3266,7 @@ async function tr({
3266
3266
  } catch (r) {
3267
3267
  return {
3268
3268
  success: !1,
3269
- error: wn.isInstance(r) ? r : new wn({ text: e, cause: r }),
3269
+ error: bn.isInstance(r) ? r : new bn({ text: e, cause: r }),
3270
3270
  rawValue: void 0
3271
3271
  };
3272
3272
  }
@@ -3293,7 +3293,7 @@ var bp = (e, t) => {
3293
3293
  return [(e.length - r).toString(), ...t.slice(r)].join("/");
3294
3294
  }, wp = Symbol(
3295
3295
  "Let zodToJsonSchema decide on which parser to use"
3296
- ), Jn = {
3296
+ ), Gn = {
3297
3297
  name: void 0,
3298
3298
  $refStrategy: "root",
3299
3299
  basePath: ["#"],
@@ -3314,13 +3314,13 @@ var bp = (e, t) => {
3314
3314
  base64Strategy: "contentEncoding:base64",
3315
3315
  nameStrategy: "ref"
3316
3316
  }, Ip = (e) => typeof e == "string" ? {
3317
- ...Jn,
3317
+ ...Gn,
3318
3318
  name: e
3319
3319
  } : {
3320
- ...Jn,
3320
+ ...Gn,
3321
3321
  ...e
3322
3322
  };
3323
- function le() {
3323
+ function ue() {
3324
3324
  return {};
3325
3325
  }
3326
3326
  function Ep(e, t) {
@@ -3405,7 +3405,7 @@ function xp(e, t) {
3405
3405
  };
3406
3406
  }
3407
3407
  function Ap(e, t) {
3408
- return t.effectStrategy === "input" ? j(e.schema._def, t) : le();
3408
+ return t.effectStrategy === "input" ? j(e.schema._def, t) : ue();
3409
3409
  }
3410
3410
  function Np(e) {
3411
3411
  return {
@@ -3447,7 +3447,7 @@ function Rp(e) {
3447
3447
  const: e.value
3448
3448
  };
3449
3449
  }
3450
- var vr = void 0, ge = {
3450
+ var vr = void 0, ve = {
3451
3451
  /**
3452
3452
  * `c` was changed to `[cC]` to replicate /i flag
3453
3453
  */
@@ -3508,30 +3508,30 @@ function Ns(e, t) {
3508
3508
  case "email":
3509
3509
  switch (t.emailStrategy) {
3510
3510
  case "format:email":
3511
- ve(r, "email", n.message, t);
3511
+ ye(r, "email", n.message, t);
3512
3512
  break;
3513
3513
  case "format:idn-email":
3514
- ve(r, "idn-email", n.message, t);
3514
+ ye(r, "idn-email", n.message, t);
3515
3515
  break;
3516
3516
  case "pattern:zod":
3517
- se(r, ge.email, n.message, t);
3517
+ se(r, ve.email, n.message, t);
3518
3518
  break;
3519
3519
  }
3520
3520
  break;
3521
3521
  case "url":
3522
- ve(r, "uri", n.message, t);
3522
+ ye(r, "uri", n.message, t);
3523
3523
  break;
3524
3524
  case "uuid":
3525
- ve(r, "uuid", n.message, t);
3525
+ ye(r, "uuid", n.message, t);
3526
3526
  break;
3527
3527
  case "regex":
3528
3528
  se(r, n.regex, n.message, t);
3529
3529
  break;
3530
3530
  case "cuid":
3531
- se(r, ge.cuid, n.message, t);
3531
+ se(r, ve.cuid, n.message, t);
3532
3532
  break;
3533
3533
  case "cuid2":
3534
- se(r, ge.cuid2, n.message, t);
3534
+ se(r, ve.cuid2, n.message, t);
3535
3535
  break;
3536
3536
  case "startsWith":
3537
3537
  se(
@@ -3550,16 +3550,16 @@ function Ns(e, t) {
3550
3550
  );
3551
3551
  break;
3552
3552
  case "datetime":
3553
- ve(r, "date-time", n.message, t);
3553
+ ye(r, "date-time", n.message, t);
3554
3554
  break;
3555
3555
  case "date":
3556
- ve(r, "date", n.message, t);
3556
+ ye(r, "date", n.message, t);
3557
3557
  break;
3558
3558
  case "time":
3559
- ve(r, "time", n.message, t);
3559
+ ye(r, "time", n.message, t);
3560
3560
  break;
3561
3561
  case "duration":
3562
- ve(r, "duration", n.message, t);
3562
+ ye(r, "duration", n.message, t);
3563
3563
  break;
3564
3564
  case "length":
3565
3565
  r.minLength = typeof r.minLength == "number" ? Math.max(r.minLength, n.value) : n.value, r.maxLength = typeof r.maxLength == "number" ? Math.min(r.maxLength, n.value) : n.value;
@@ -3574,30 +3574,30 @@ function Ns(e, t) {
3574
3574
  break;
3575
3575
  }
3576
3576
  case "ip": {
3577
- n.version !== "v6" && ve(r, "ipv4", n.message, t), n.version !== "v4" && ve(r, "ipv6", n.message, t);
3577
+ n.version !== "v6" && ye(r, "ipv4", n.message, t), n.version !== "v4" && ye(r, "ipv6", n.message, t);
3578
3578
  break;
3579
3579
  }
3580
3580
  case "base64url":
3581
- se(r, ge.base64url, n.message, t);
3581
+ se(r, ve.base64url, n.message, t);
3582
3582
  break;
3583
3583
  case "jwt":
3584
- se(r, ge.jwt, n.message, t);
3584
+ se(r, ve.jwt, n.message, t);
3585
3585
  break;
3586
3586
  case "cidr": {
3587
- n.version !== "v6" && se(r, ge.ipv4Cidr, n.message, t), n.version !== "v4" && se(r, ge.ipv6Cidr, n.message, t);
3587
+ n.version !== "v6" && se(r, ve.ipv4Cidr, n.message, t), n.version !== "v4" && se(r, ve.ipv6Cidr, n.message, t);
3588
3588
  break;
3589
3589
  }
3590
3590
  case "emoji":
3591
- se(r, ge.emoji(), n.message, t);
3591
+ se(r, ve.emoji(), n.message, t);
3592
3592
  break;
3593
3593
  case "ulid": {
3594
- se(r, ge.ulid, n.message, t);
3594
+ se(r, ve.ulid, n.message, t);
3595
3595
  break;
3596
3596
  }
3597
3597
  case "base64": {
3598
3598
  switch (t.base64Strategy) {
3599
3599
  case "format:binary": {
3600
- ve(r, "binary", n.message, t);
3600
+ ye(r, "binary", n.message, t);
3601
3601
  break;
3602
3602
  }
3603
3603
  case "contentEncoding:base64": {
@@ -3605,14 +3605,14 @@ function Ns(e, t) {
3605
3605
  break;
3606
3606
  }
3607
3607
  case "pattern:zod": {
3608
- se(r, ge.base64, n.message, t);
3608
+ se(r, ve.base64, n.message, t);
3609
3609
  break;
3610
3610
  }
3611
3611
  }
3612
3612
  break;
3613
3613
  }
3614
3614
  case "nanoid":
3615
- se(r, ge.nanoid, n.message, t);
3615
+ se(r, ve.nanoid, n.message, t);
3616
3616
  }
3617
3617
  return r;
3618
3618
  }
@@ -3628,7 +3628,7 @@ function Mp(e) {
3628
3628
  zp.has(e[r]) || (t += "\\"), t += e[r];
3629
3629
  return t;
3630
3630
  }
3631
- function ve(e, t, r, n) {
3631
+ function ye(e, t, r, n) {
3632
3632
  var o;
3633
3633
  e.format || (o = e.anyOf) != null && o.some((s) => s.format) ? (e.anyOf || (e.anyOf = []), e.format && (e.anyOf.push({
3634
3634
  format: e.format
@@ -3642,11 +3642,11 @@ function se(e, t, r, n) {
3642
3642
  e.pattern || (o = e.allOf) != null && o.some((s) => s.pattern) ? (e.allOf || (e.allOf = []), e.pattern && (e.allOf.push({
3643
3643
  pattern: e.pattern
3644
3644
  }), delete e.pattern), e.allOf.push({
3645
- pattern: Wn(t, n),
3645
+ pattern: Jn(t, n),
3646
3646
  ...r && n.errorMessages && { errorMessage: { pattern: r } }
3647
- })) : e.pattern = Wn(t, n);
3647
+ })) : e.pattern = Jn(t, n);
3648
3648
  }
3649
- function Wn(e, t) {
3649
+ function Jn(e, t) {
3650
3650
  var r;
3651
3651
  if (!t.applyRegexFlags || !e.flags)
3652
3652
  return e.source;
@@ -3738,10 +3738,10 @@ function $p(e, t) {
3738
3738
  const r = j(e.keyType._def, {
3739
3739
  ...t,
3740
3740
  currentPath: [...t.currentPath, "items", "items", "0"]
3741
- }) || le(), n = j(e.valueType._def, {
3741
+ }) || ue(), n = j(e.valueType._def, {
3742
3742
  ...t,
3743
3743
  currentPath: [...t.currentPath, "items", "items", "1"]
3744
- }) || le();
3744
+ }) || ue();
3745
3745
  return {
3746
3746
  type: "array",
3747
3747
  maxItems: 125,
@@ -3763,7 +3763,7 @@ function Zp(e) {
3763
3763
  };
3764
3764
  }
3765
3765
  function Dp() {
3766
- return { not: le() };
3766
+ return { not: ue() };
3767
3767
  }
3768
3768
  function Lp() {
3769
3769
  return {
@@ -3933,7 +3933,7 @@ var Jp = (e, t) => {
3933
3933
  ...t,
3934
3934
  currentPath: [...t.currentPath, "anyOf", "1"]
3935
3935
  });
3936
- return n ? { anyOf: [{ not: le() }, n] } : le();
3936
+ return n ? { anyOf: [{ not: ue() }, n] } : ue();
3937
3937
  }, Wp = (e, t) => {
3938
3938
  if (t.pipeStrategy === "input")
3939
3939
  return j(e.in._def, t);
@@ -3998,11 +3998,11 @@ function Xp(e, t) {
3998
3998
  }
3999
3999
  function Qp() {
4000
4000
  return {
4001
- not: le()
4001
+ not: ue()
4002
4002
  };
4003
4003
  }
4004
4004
  function Kp() {
4005
- return le();
4005
+ return ue();
4006
4006
  }
4007
4007
  var ef = (e, t) => j(e.innerType._def, t), tf = (e, t, r) => {
4008
4008
  switch (t) {
@@ -4057,7 +4057,7 @@ var ef = (e, t) => j(e.innerType._def, t), tf = (e, t, r) => {
4057
4057
  case A.ZodEffects:
4058
4058
  return Ap(e, r);
4059
4059
  case A.ZodAny:
4060
- return le();
4060
+ return ue();
4061
4061
  case A.ZodUnknown:
4062
4062
  return Kp();
4063
4063
  case A.ZodDefault:
@@ -4119,7 +4119,7 @@ var rf = (e, t) => {
4119
4119
  `Recursive reference detected at ${t.currentPath.join(
4120
4120
  "/"
4121
4121
  )}! Defaulting to any`
4122
- ), le()) : t.$refStrategy === "seen" ? le() : void 0;
4122
+ ), ue()) : t.$refStrategy === "seen" ? ue() : void 0;
4123
4123
  }
4124
4124
  }, nf = (e, t, r) => (e.description && (r.description = e.description), r), of = (e) => {
4125
4125
  const t = Ip(e), r = t.name !== void 0 ? [...t.basePath, t.definitionPath, t.name] : t.basePath;
@@ -4154,7 +4154,7 @@ var rf = (e, t) => {
4154
4154
  currentPath: [...n.basePath, n.definitionPath, d]
4155
4155
  },
4156
4156
  !0
4157
- )) != null ? y : le()
4157
+ )) != null ? y : ue()
4158
4158
  };
4159
4159
  },
4160
4160
  {}
@@ -4166,7 +4166,7 @@ var rf = (e, t) => {
4166
4166
  currentPath: [...n.basePath, n.definitionPath, s]
4167
4167
  },
4168
4168
  !1
4169
- )) != null ? r : le(), a = typeof t == "object" && t.name !== void 0 && t.nameStrategy === "title" ? t.name : void 0;
4169
+ )) != null ? r : ue(), a = typeof t == "object" && t.name !== void 0 && t.nameStrategy === "title" ? t.name : void 0;
4170
4170
  a !== void 0 && (i.title = a);
4171
4171
  const l = s === void 0 ? o ? {
4172
4172
  ...i,
@@ -4254,7 +4254,7 @@ function ff(e) {
4254
4254
  var mf = Object.defineProperty, hf = (e, t) => {
4255
4255
  for (var r in t)
4256
4256
  mf(e, r, { get: t[r], enumerable: !0 });
4257
- }, Rs = "AI_NoObjectGeneratedError", zs = `vercel.ai.error.${Rs}`, gf = Symbol.for(zs), Ms, Yn = class extends $e {
4257
+ }, Rs = "AI_NoObjectGeneratedError", zs = `vercel.ai.error.${Rs}`, gf = Symbol.for(zs), Ms, Wn = class extends Ze {
4258
4258
  constructor({
4259
4259
  message: e = "No object generated.",
4260
4260
  cause: t,
@@ -4266,11 +4266,11 @@ var mf = Object.defineProperty, hf = (e, t) => {
4266
4266
  super({ name: Rs, message: e, cause: t }), this[Ms] = !0, this.text = r, this.response = n, this.usage = o, this.finishReason = s;
4267
4267
  }
4268
4268
  static isInstance(e) {
4269
- return $e.hasMarker(e, zs);
4269
+ return Ze.hasMarker(e, zs);
4270
4270
  }
4271
4271
  };
4272
4272
  Ms = gf;
4273
- var qn = "5.0.102", $s = fe([
4273
+ var Yn = "5.0.102", $s = me([
4274
4274
  C(),
4275
4275
  Kt(Uint8Array),
4276
4276
  Kt(ArrayBuffer),
@@ -4283,7 +4283,7 @@ var qn = "5.0.102", $s = fe([
4283
4283
  { message: "Must be a Buffer" }
4284
4284
  )
4285
4285
  ]), Et = sp(
4286
- () => fe([
4286
+ () => me([
4287
4287
  Md(),
4288
4288
  C(),
4289
4289
  Od(),
@@ -4300,12 +4300,12 @@ var qn = "5.0.102", $s = fe([
4300
4300
  providerOptions: Y.optional()
4301
4301
  }), vf = oe({
4302
4302
  type: R("image"),
4303
- image: fe([$s, Kt(URL)]),
4303
+ image: me([$s, Kt(URL)]),
4304
4304
  mediaType: C().optional(),
4305
4305
  providerOptions: Y.optional()
4306
4306
  }), Ds = oe({
4307
4307
  type: R("file"),
4308
- data: fe([$s, Kt(URL)]),
4308
+ data: me([$s, Kt(URL)]),
4309
4309
  filename: C().optional(),
4310
4310
  mediaType: C(),
4311
4311
  providerOptions: Y.optional()
@@ -4340,7 +4340,7 @@ var qn = "5.0.102", $s = fe([
4340
4340
  oe({
4341
4341
  type: R("content"),
4342
4342
  value: ct(
4343
- fe([
4343
+ me([
4344
4344
  oe({
4345
4345
  type: R("text"),
4346
4346
  text: C()
@@ -4367,17 +4367,17 @@ var qn = "5.0.102", $s = fe([
4367
4367
  }
4368
4368
  ), If = oe({
4369
4369
  role: R("user"),
4370
- content: fe([
4370
+ content: me([
4371
4371
  C(),
4372
- ct(fe([Zs, vf, Ds]))
4372
+ ct(me([Zs, vf, Ds]))
4373
4373
  ]),
4374
4374
  providerOptions: Y.optional()
4375
4375
  }), Ef = oe({
4376
4376
  role: R("assistant"),
4377
- content: fe([
4377
+ content: me([
4378
4378
  C(),
4379
4379
  ct(
4380
- fe([
4380
+ me([
4381
4381
  Zs,
4382
4382
  Ds,
4383
4383
  yf,
@@ -4392,7 +4392,7 @@ var qn = "5.0.102", $s = fe([
4392
4392
  content: ct(Ls),
4393
4393
  providerOptions: Y.optional()
4394
4394
  });
4395
- fe([
4395
+ me([
4396
4396
  wf,
4397
4397
  If,
4398
4398
  Ef,
@@ -4404,7 +4404,7 @@ Nt({
4404
4404
  });
4405
4405
  var Sf = gp(
4406
4406
  () => Ps(
4407
- fe([
4407
+ me([
4408
4408
  G({
4409
4409
  type: R("text-start"),
4410
4410
  id: C(),
@@ -4835,10 +4835,10 @@ function Ft(e) {
4835
4835
  function xf(e) {
4836
4836
  return e.type === "dynamic-tool";
4837
4837
  }
4838
- function Xn(e) {
4838
+ function qn(e) {
4839
4839
  return Ft(e) || xf(e);
4840
4840
  }
4841
- function Qn(e) {
4841
+ function Xn(e) {
4842
4842
  return e.type.split("-").slice(1).join("-");
4843
4843
  }
4844
4844
  function Af({
@@ -4870,8 +4870,8 @@ function Nf({
4870
4870
  new TransformStream({
4871
4871
  async transform(a, l) {
4872
4872
  await n(async ({ state: c, write: d }) => {
4873
- var u, y, g, m;
4874
- function f(h) {
4873
+ var u, y, g, f;
4874
+ function m(h) {
4875
4875
  const x = c.message.parts.filter(Ft).find(
4876
4876
  (E) => E.toolCallId === h
4877
4877
  );
@@ -4932,7 +4932,7 @@ function Nf({
4932
4932
  async function I(h) {
4933
4933
  if (h != null) {
4934
4934
  const S = c.message.metadata != null ? Us(c.message.metadata, h) : h;
4935
- t != null && await Gn({
4935
+ t != null && await Hn({
4936
4936
  value: S,
4937
4937
  schema: t
4938
4938
  }), c.message.metadata = S;
@@ -4976,7 +4976,7 @@ function Nf({
4976
4976
  }
4977
4977
  case "reasoning-end": {
4978
4978
  const h = c.activeReasoningParts[a.id];
4979
- h.providerMetadata = (m = a.providerMetadata) != null ? m : h.providerMetadata, h.state = "done", delete c.activeReasoningParts[a.id], d();
4979
+ h.providerMetadata = (f = a.providerMetadata) != null ? f : h.providerMetadata, h.state = "done", delete c.activeReasoningParts[a.id], d();
4980
4980
  break;
4981
4981
  }
4982
4982
  case "file": {
@@ -5104,10 +5104,10 @@ function Nf({
5104
5104
  preliminary: a.preliminary
5105
5105
  });
5106
5106
  } else {
5107
- const h = f(a.toolCallId);
5107
+ const h = m(a.toolCallId);
5108
5108
  b({
5109
5109
  toolCallId: a.toolCallId,
5110
- toolName: Qn(h),
5110
+ toolName: Xn(h),
5111
5111
  state: "output-available",
5112
5112
  input: h.input,
5113
5113
  output: a.output,
@@ -5132,10 +5132,10 @@ function Nf({
5132
5132
  providerExecuted: a.providerExecuted
5133
5133
  });
5134
5134
  } else {
5135
- const h = f(a.toolCallId);
5135
+ const h = m(a.toolCallId);
5136
5136
  b({
5137
5137
  toolCallId: a.toolCallId,
5138
- toolName: Qn(h),
5138
+ toolName: Xn(h),
5139
5139
  state: "output-error",
5140
5140
  input: h.input,
5141
5141
  rawInput: h.rawInput,
@@ -5172,7 +5172,7 @@ function Nf({
5172
5172
  }
5173
5173
  default:
5174
5174
  if (kf(a)) {
5175
- r?.[a.type] != null && await Gn({
5175
+ r?.[a.type] != null && await Hn({
5176
5176
  value: a.data,
5177
5177
  schema: r[a.type]
5178
5178
  });
@@ -5284,7 +5284,7 @@ var zf = () => ({
5284
5284
  async parseOutput({ text: r }, n) {
5285
5285
  const o = await tr({ text: r });
5286
5286
  if (!o.success)
5287
- throw new Yn({
5287
+ throw new Wn({
5288
5288
  message: "No object generated: could not parse the response.",
5289
5289
  cause: o.error,
5290
5290
  text: r,
@@ -5297,7 +5297,7 @@ var zf = () => ({
5297
5297
  schema: t
5298
5298
  });
5299
5299
  if (!s.success)
5300
- throw new Yn({
5300
+ throw new Wn({
5301
5301
  message: "No object generated: response did not match schema.",
5302
5302
  cause: s.error,
5303
5303
  text: r,
@@ -5362,25 +5362,25 @@ var Zf = class {
5362
5362
  requestMetadata: t.metadata,
5363
5363
  trigger: t.trigger,
5364
5364
  messageId: t.messageId
5365
- })), y = (n = u?.api) != null ? n : this.api, g = u?.headers !== void 0 ? We(u.headers) : d, m = u?.body !== void 0 ? u.body : {
5365
+ })), y = (n = u?.api) != null ? n : this.api, g = u?.headers !== void 0 ? We(u.headers) : d, f = u?.body !== void 0 ? u.body : {
5366
5366
  ...a,
5367
5367
  ...t.body,
5368
5368
  id: t.chatId,
5369
5369
  messages: t.messages,
5370
5370
  trigger: t.trigger,
5371
5371
  messageId: t.messageId
5372
- }, f = (o = u?.credentials) != null ? o : c, b = await ((s = this.fetch) != null ? s : globalThis.fetch)(y, {
5372
+ }, m = (o = u?.credentials) != null ? o : c, b = await ((s = this.fetch) != null ? s : globalThis.fetch)(y, {
5373
5373
  method: "POST",
5374
- headers: Vn(
5374
+ headers: Bn(
5375
5375
  {
5376
5376
  "Content-Type": "application/json",
5377
5377
  ...g
5378
5378
  },
5379
- `ai-sdk/${qn}`,
5380
- Bn()
5379
+ `ai-sdk/${Yn}`,
5380
+ Fn()
5381
5381
  ),
5382
- body: JSON.stringify(m),
5383
- credentials: f,
5382
+ body: JSON.stringify(f),
5383
+ credentials: m,
5384
5384
  signal: e
5385
5385
  });
5386
5386
  if (!b.ok)
@@ -5403,24 +5403,24 @@ var Zf = class {
5403
5403
  headers: c,
5404
5404
  credentials: l,
5405
5405
  requestMetadata: e.metadata
5406
- })), u = (r = d?.api) != null ? r : `${this.api}/${e.chatId}/stream`, y = d?.headers !== void 0 ? We(d.headers) : c, g = (n = d?.credentials) != null ? n : l, f = await ((o = this.fetch) != null ? o : globalThis.fetch)(u, {
5406
+ })), u = (r = d?.api) != null ? r : `${this.api}/${e.chatId}/stream`, y = d?.headers !== void 0 ? We(d.headers) : c, g = (n = d?.credentials) != null ? n : l, m = await ((o = this.fetch) != null ? o : globalThis.fetch)(u, {
5407
5407
  method: "GET",
5408
- headers: Vn(
5408
+ headers: Bn(
5409
5409
  y,
5410
- `ai-sdk/${qn}`,
5411
- Bn()
5410
+ `ai-sdk/${Yn}`,
5411
+ Fn()
5412
5412
  ),
5413
5413
  credentials: g
5414
5414
  });
5415
- if (f.status === 204)
5415
+ if (m.status === 204)
5416
5416
  return null;
5417
- if (!f.ok)
5417
+ if (!m.ok)
5418
5418
  throw new Error(
5419
- (s = await f.text()) != null ? s : "Failed to fetch the chat response."
5419
+ (s = await m.text()) != null ? s : "Failed to fetch the chat response."
5420
5420
  );
5421
- if (!f.body)
5421
+ if (!m.body)
5422
5422
  throw new Error("The response body is empty.");
5423
- return this.processResponseStream(f.body);
5423
+ return this.processResponseStream(m.body);
5424
5424
  }
5425
5425
  }, rn = class extends Zf {
5426
5426
  constructor(e = {}) {
@@ -5455,7 +5455,7 @@ var Zf = class {
5455
5455
  sendAutomaticallyWhen: d
5456
5456
  }) {
5457
5457
  this.activeResponse = void 0, this.jobExecutor = new Pf(), this.sendMessage = async (u, y) => {
5458
- var g, m, f, v;
5458
+ var g, f, m, v;
5459
5459
  if (u == null) {
5460
5460
  await this.makeRequest({
5461
5461
  trigger: "submit-message",
@@ -5483,13 +5483,13 @@ var Zf = class {
5483
5483
  this.state.messages = this.state.messages.slice(0, w + 1), this.state.replaceMessage(w, {
5484
5484
  ...b,
5485
5485
  id: u.messageId,
5486
- role: (m = b.role) != null ? m : "user",
5486
+ role: (f = b.role) != null ? f : "user",
5487
5487
  metadata: u.metadata
5488
5488
  });
5489
5489
  } else
5490
5490
  this.state.pushMessage({
5491
5491
  ...b,
5492
- id: (f = b.id) != null ? f : this.generateId(),
5492
+ id: (m = b.id) != null ? m : this.generateId(),
5493
5493
  role: (v = b.role) != null ? v : "user",
5494
5494
  metadata: u.metadata
5495
5495
  });
@@ -5502,7 +5502,7 @@ var Zf = class {
5502
5502
  messageId: u,
5503
5503
  ...y
5504
5504
  } = {}) => {
5505
- const g = u == null ? this.state.messages.length - 1 : this.state.messages.findIndex((m) => m.id === u);
5505
+ const g = u == null ? this.state.messages.length - 1 : this.state.messages.findIndex((f) => f.id === u);
5506
5506
  if (g === -1)
5507
5507
  throw new Error(`message ${u} not found`);
5508
5508
  this.state.messages = this.state.messages.slice(
@@ -5522,22 +5522,22 @@ var Zf = class {
5522
5522
  state: u = "output-available",
5523
5523
  tool: y,
5524
5524
  toolCallId: g,
5525
- output: m,
5526
- errorText: f
5525
+ output: f,
5526
+ errorText: m
5527
5527
  }) => this.jobExecutor.run(async () => {
5528
5528
  var v, b;
5529
5529
  const w = this.state.messages, I = w[w.length - 1];
5530
5530
  this.state.replaceMessage(w.length - 1, {
5531
5531
  ...I,
5532
5532
  parts: I.parts.map(
5533
- (h) => Xn(h) && h.toolCallId === g ? { ...h, state: u, output: m, errorText: f } : h
5533
+ (h) => qn(h) && h.toolCallId === g ? { ...h, state: u, output: f, errorText: m } : h
5534
5534
  )
5535
5535
  }), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map(
5536
- (h) => Xn(h) && h.toolCallId === g ? {
5536
+ (h) => qn(h) && h.toolCallId === g ? {
5537
5537
  ...h,
5538
5538
  state: u,
5539
- output: m,
5540
- errorText: f
5539
+ output: f,
5540
+ errorText: m
5541
5541
  } : h
5542
5542
  )), this.status !== "streaming" && this.status !== "submitted" && ((v = this.sendAutomaticallyWhen) != null && v.call(this, { messages: this.state.messages })) && this.makeRequest({
5543
5543
  trigger: "submit-message",
@@ -5599,7 +5599,7 @@ var Zf = class {
5599
5599
  g.abortController.signal.addEventListener("abort", () => {
5600
5600
  d = !0;
5601
5601
  }), this.activeResponse = g;
5602
- let m;
5602
+ let f;
5603
5603
  if (e === "resume-stream") {
5604
5604
  const v = await this.transport.reconnectToStream({
5605
5605
  chatId: this.id,
@@ -5611,9 +5611,9 @@ var Zf = class {
5611
5611
  this.setStatus({ status: "ready" });
5612
5612
  return;
5613
5613
  }
5614
- m = v;
5614
+ f = v;
5615
5615
  } else
5616
- m = await this.transport.sendMessages({
5616
+ f = await this.transport.sendMessages({
5617
5617
  chatId: this.id,
5618
5618
  messages: this.state.messages,
5619
5619
  abortSignal: g.abortController.signal,
@@ -5623,7 +5623,7 @@ var Zf = class {
5623
5623
  trigger: e,
5624
5624
  messageId: o
5625
5625
  });
5626
- const f = (v) => (
5626
+ const m = (v) => (
5627
5627
  // serialize the job execution to avoid race conditions:
5628
5628
  this.jobExecutor.run(
5629
5629
  () => v({
@@ -5640,12 +5640,12 @@ var Zf = class {
5640
5640
  );
5641
5641
  await Of({
5642
5642
  stream: Nf({
5643
- stream: m,
5643
+ stream: f,
5644
5644
  onToolCall: this.onToolCall,
5645
5645
  onData: this.onData,
5646
5646
  messageMetadataSchema: this.messageMetadataSchema,
5647
5647
  dataPartSchemas: this.dataPartSchemas,
5648
- runUpdateMessageJob: f,
5648
+ runUpdateMessageJob: m,
5649
5649
  onError: (v) => {
5650
5650
  throw v;
5651
5651
  }
@@ -5698,10 +5698,10 @@ function jf() {
5698
5698
  }
5699
5699
  return _r(Uf);
5700
5700
  }
5701
- const Ff = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Kn = { randomUUID: Ff };
5702
- function Le(e, t, r) {
5703
- if (Kn.randomUUID && !e)
5704
- return Kn.randomUUID();
5701
+ const Ff = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Qn = { randomUUID: Ff };
5702
+ function Ue(e, t, r) {
5703
+ if (Qn.randomUUID && !e)
5704
+ return Qn.randomUUID();
5705
5705
  e = e || {};
5706
5706
  const n = e.random ?? e.rng?.() ?? jf();
5707
5707
  if (n.length < 16)
@@ -5714,7 +5714,7 @@ const Fs = async () => (br || (br = import(
5714
5714
  "./index.790ujKXR.js"
5715
5715
  )), br), Bs = async () => (wr || (wr = import(
5716
5716
  /* webpackChunkName: "toast-utilities" */
5717
- "./index.ChYRuj2g.js"
5717
+ "./index.BECvwaM5.js"
5718
5718
  ).then((e) => e.utilities)), wr), Bf = async () => {
5719
5719
  try {
5720
5720
  await Promise.all([Fs(), Bs()]);
@@ -5828,10 +5828,10 @@ const Fs = async () => (br || (br = import(
5828
5828
  return e;
5829
5829
  }
5830
5830
  };
5831
- var Ir, eo;
5831
+ var Ir, Kn;
5832
5832
  function Wf() {
5833
- if (eo) return Ir;
5834
- eo = 1;
5833
+ if (Kn) return Ir;
5834
+ Kn = 1;
5835
5835
  function e(t, r) {
5836
5836
  if (typeof t != "function")
5837
5837
  throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof t}\`.`);
@@ -5855,22 +5855,22 @@ var Js = (e, t, r) => {
5855
5855
  if (t.has(e))
5856
5856
  throw TypeError("Cannot add the same private member more than once");
5857
5857
  t instanceof WeakSet ? t.add(e) : t.set(e, r);
5858
- }, Pe = (e, t, r, n) => (Js(e, t, "write to private field"), t.set(e, r), r);
5858
+ }, Re = (e, t, r, n) => (Js(e, t, "write to private field"), t.set(e, r), r);
5859
5859
  function Xf(e, t) {
5860
5860
  return t != null ? qf(e, t) : e;
5861
5861
  }
5862
- var pe, Bt, Vt, ft, mt, ht, ot, Zr, Dr, Qf = class {
5862
+ var fe, Bt, Vt, ft, mt, ht, ot, Zr, Dr, Qf = class {
5863
5863
  constructor(e = []) {
5864
- Te(this, pe, void 0), Te(this, Bt, "ready"), Te(this, Vt, void 0), Te(this, ft, /* @__PURE__ */ new Set()), Te(this, mt, /* @__PURE__ */ new Set()), Te(this, ht, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
5865
- Pe(this, pe, B(this, pe).concat(t)), B(this, ot).call(this);
5864
+ Te(this, fe, void 0), Te(this, Bt, "ready"), Te(this, Vt, void 0), Te(this, ft, /* @__PURE__ */ new Set()), Te(this, mt, /* @__PURE__ */ new Set()), Te(this, ht, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
5865
+ Re(this, fe, B(this, fe).concat(t)), B(this, ot).call(this);
5866
5866
  }, this.popMessage = () => {
5867
- Pe(this, pe, B(this, pe).slice(0, -1)), B(this, ot).call(this);
5867
+ Re(this, fe, B(this, fe).slice(0, -1)), B(this, ot).call(this);
5868
5868
  }, this.replaceMessage = (t, r) => {
5869
- Pe(this, pe, [
5870
- ...B(this, pe).slice(0, t),
5869
+ Re(this, fe, [
5870
+ ...B(this, fe).slice(0, t),
5871
5871
  // We deep clone the message here to ensure the new React Compiler (currently in RC) detects deeply nested parts/metadata changes:
5872
5872
  this.snapshot(r),
5873
- ...B(this, pe).slice(t + 1)
5873
+ ...B(this, fe).slice(t + 1)
5874
5874
  ]), B(this, ot).call(this);
5875
5875
  }, this.snapshot = (t) => structuredClone(t), this["~registerMessagesCallback"] = (t, r) => {
5876
5876
  const n = r ? Xf(t, r) : t;
@@ -5887,28 +5887,28 @@ var pe, Bt, Vt, ft, mt, ht, ot, Zr, Dr, Qf = class {
5887
5887
  B(this, mt).forEach((t) => t());
5888
5888
  }), Te(this, Dr, () => {
5889
5889
  B(this, ht).forEach((t) => t());
5890
- }), Pe(this, pe, e);
5890
+ }), Re(this, fe, e);
5891
5891
  }
5892
5892
  get status() {
5893
5893
  return B(this, Bt);
5894
5894
  }
5895
5895
  set status(e) {
5896
- Pe(this, Bt, e), B(this, Zr).call(this);
5896
+ Re(this, Bt, e), B(this, Zr).call(this);
5897
5897
  }
5898
5898
  get error() {
5899
5899
  return B(this, Vt);
5900
5900
  }
5901
5901
  set error(e) {
5902
- Pe(this, Vt, e), B(this, Dr).call(this);
5902
+ Re(this, Vt, e), B(this, Dr).call(this);
5903
5903
  }
5904
5904
  get messages() {
5905
- return B(this, pe);
5905
+ return B(this, fe);
5906
5906
  }
5907
5907
  set messages(e) {
5908
- Pe(this, pe, [...e]), B(this, ot).call(this);
5908
+ Re(this, fe, [...e]), B(this, ot).call(this);
5909
5909
  }
5910
5910
  };
5911
- pe = /* @__PURE__ */ new WeakMap();
5911
+ fe = /* @__PURE__ */ new WeakMap();
5912
5912
  Bt = /* @__PURE__ */ new WeakMap();
5913
5913
  Vt = /* @__PURE__ */ new WeakMap();
5914
5914
  ft = /* @__PURE__ */ new WeakMap();
@@ -5917,10 +5917,10 @@ ht = /* @__PURE__ */ new WeakMap();
5917
5917
  ot = /* @__PURE__ */ new WeakMap();
5918
5918
  Zr = /* @__PURE__ */ new WeakMap();
5919
5919
  Dr = /* @__PURE__ */ new WeakMap();
5920
- var st, to = class extends Df {
5920
+ var st, eo = class extends Df {
5921
5921
  constructor({ messages: e, ...t }) {
5922
5922
  const r = new Qf(e);
5923
- super({ ...t, state: r }), Te(this, st, void 0), this["~registerMessagesCallback"] = (n, o) => B(this, st)["~registerMessagesCallback"](n, o), this["~registerStatusCallback"] = (n) => B(this, st)["~registerStatusCallback"](n), this["~registerErrorCallback"] = (n) => B(this, st)["~registerErrorCallback"](n), Pe(this, st, r);
5923
+ super({ ...t, state: r }), Te(this, st, void 0), this["~registerMessagesCallback"] = (n, o) => B(this, st)["~registerMessagesCallback"](n, o), this["~registerStatusCallback"] = (n) => B(this, st)["~registerStatusCallback"](n), this["~registerErrorCallback"] = (n) => B(this, st)["~registerErrorCallback"](n), Re(this, st, r);
5924
5924
  }
5925
5925
  };
5926
5926
  st = /* @__PURE__ */ new WeakMap();
@@ -5930,9 +5930,9 @@ function Kf({
5930
5930
  ...r
5931
5931
  } = {}) {
5932
5932
  const n = W(
5933
- "chat" in r ? r.chat : new to(r)
5933
+ "chat" in r ? r.chat : new eo(r)
5934
5934
  );
5935
- ("chat" in r && r.chat !== n.current || "id" in r && n.current.id !== r.id) && (n.current = "chat" in r ? r.chat : new to(r));
5935
+ ("chat" in r && r.chat !== n.current || "id" in r && n.current.id !== r.id) && (n.current = "chat" in r ? r.chat : new eo(r));
5936
5936
  const s = "id" in r ? r.id : null, i = q(
5937
5937
  (u) => n.current["~registerMessagesCallback"](u, e),
5938
5938
  // optionsId is required to trigger re-subscription when the chat ID changes
@@ -5976,13 +5976,13 @@ function Kf({
5976
5976
  addToolOutput: n.current.addToolOutput
5977
5977
  };
5978
5978
  }
5979
- const ro = () => ({
5979
+ const to = () => ({
5980
5980
  onFinish: /* @__PURE__ */ new Set(),
5981
5981
  onError: /* @__PURE__ */ new Set(),
5982
5982
  onData: /* @__PURE__ */ new Set(),
5983
5983
  onToolCall: /* @__PURE__ */ new Set()
5984
5984
  }), Ws = Hr(null);
5985
- function je(e = {}) {
5985
+ function Fe(e = {}) {
5986
5986
  const t = X(Ws);
5987
5987
  if (!t)
5988
5988
  throw new Error("useAiChat must be used within a AiChatProvider");
@@ -6004,9 +6004,9 @@ function em({
6004
6004
  children: e,
6005
6005
  value: t
6006
6006
  }) {
6007
- const r = W(ro()), [n, o] = Z("");
6007
+ const r = W(to()), [n, o] = Z("");
6008
6008
  $(() => {
6009
- r.current = ro();
6009
+ r.current = to();
6010
6010
  }, [t]);
6011
6011
  const s = q((d) => {
6012
6012
  for (const u of r.current.onError)
@@ -6047,7 +6047,7 @@ function em({
6047
6047
  );
6048
6048
  }
6049
6049
  const tm = ({ chatId: e }) => {
6050
- const { messages: t } = je(), {
6050
+ const { messages: t } = Fe(), {
6051
6051
  state: { privateChat: r }
6052
6052
  } = X(we), n = W(e), o = W(!1);
6053
6053
  return $(() => {
@@ -6063,7 +6063,7 @@ const tm = ({ chatId: e }) => {
6063
6063
  }, [e, t.length, r]), null;
6064
6064
  };
6065
6065
  let Zt = !1, Er = null;
6066
- const no = ({
6066
+ const ro = ({
6067
6067
  containerId: e,
6068
6068
  ...t
6069
6069
  }) => {
@@ -6094,7 +6094,7 @@ const no = ({
6094
6094
  setInitialMessages: r,
6095
6095
  dispatchChat: n
6096
6096
  }) => {
6097
- const { user: o, getAccessToken: s } = Ie(), [i, a] = Z(!1), [l] = Ae({
6097
+ const { user: o, getAccessToken: s } = Ie(), [i, a] = Z(!1), [l] = Ne({
6098
6098
  key: ke + jt,
6099
6099
  initialValue: ""
6100
6100
  }), d = (fa || go() || _t()) && !!l && !i && !!o?.username && l !== e, { data: u } = ma({
@@ -6136,7 +6136,7 @@ try {
6136
6136
  });
6137
6137
  } catch {
6138
6138
  }
6139
- const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, im = () => z("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), oo = ({ mode: e }) => z({
6139
+ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, im = () => z("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), no = ({ mode: e }) => z({
6140
6140
  "bg-surface-darker": e === "dark" || e === "system",
6141
6141
  "bg-surface-light": e === "light" || e === "alt-system",
6142
6142
  "dark:bg-surface-light": e === "system",
@@ -6147,11 +6147,11 @@ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e
6147
6147
  "dark:text-copy-dark": e === "system",
6148
6148
  "dark:text-copy-light": e === "alt-system"
6149
6149
  }), lm = () => z("absolute", "size-2", "transform rotate-45"), um = ({ mode: e, className: t, tooltipClassName: r, arrowClassName: n }) => {
6150
- const o = z("relative inline-block", t), s = z(sm, im(), oo({
6150
+ const o = z("relative inline-block", t), s = z(sm, im(), no({
6151
6151
  mode: e
6152
6152
  }), cm({
6153
6153
  mode: e
6154
- }), r), i = z(am, lm(), oo({
6154
+ }), r), i = z(am, lm(), no({
6155
6155
  mode: e
6156
6156
  }), n);
6157
6157
  return {
@@ -6161,11 +6161,11 @@ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e
6161
6161
  };
6162
6162
  }, dm = ({ delay: e = 300 }) => ({
6163
6163
  animation: `av-tooltip-fade-in ${e}ms ease-in-out`
6164
- }), pm = 5e3, Fe = ({ trigger: e, label: t, placement: r = "top", mode: n = "system", delay: o = 300, className: s, tooltipClassName: i, arrowClassName: a }) => {
6164
+ }), pm = 5e3, Be = ({ trigger: e, label: t, placement: r = "top", mode: n = "system", delay: o = 300, className: s, tooltipClassName: i, arrowClassName: a }) => {
6165
6165
  const l = ha(() => {
6166
- f.stop(), m(!1);
6167
- }), c = W(null), d = W(null), [u, y] = Z(!1), [g, m] = Z(!1), f = ga(() => {
6168
- m(!1);
6166
+ m.stop(), f(!1);
6167
+ }), c = W(null), d = W(null), [u, y] = Z(!1), [g, f] = Z(!1), m = ga(() => {
6168
+ f(!1);
6169
6169
  }, pm), v = um({
6170
6170
  mode: n,
6171
6171
  className: s,
@@ -6222,7 +6222,7 @@ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e
6222
6222
  u
6223
6223
  ]);
6224
6224
  const I = () => {
6225
- y(!1), m(!0), f.start();
6225
+ y(!1), f(!0), m.start();
6226
6226
  }, h = () => {
6227
6227
  g || y(!0);
6228
6228
  }, S = () => {
@@ -6256,7 +6256,7 @@ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e
6256
6256
  }) => {
6257
6257
  const [r, n] = Ce();
6258
6258
  return /* @__PURE__ */ p(
6259
- Fe,
6259
+ Be,
6260
6260
  {
6261
6261
  label: "Attach files",
6262
6262
  mode: "light",
@@ -6274,7 +6274,7 @@ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e
6274
6274
  children: /* @__PURE__ */ p(
6275
6275
  va,
6276
6276
  {
6277
- size: Ne,
6277
+ size: Oe,
6278
6278
  monotone: !0,
6279
6279
  className: r(n.Attachment)
6280
6280
  }
@@ -6300,11 +6300,11 @@ const mm = ({
6300
6300
  dispatch: s,
6301
6301
  setChatId: i,
6302
6302
  setInitialMessages: a
6303
- } = X(we), { id: l, setInput: c, stop: d } = je(), u = W(null), y = W(!1), [g, m] = Ce(), { data: f, isSuccess: v } = Ue({
6303
+ } = X(we), { id: l, setInput: c, stop: d } = Fe(), u = W(null), y = W(!1), [g, f] = Ce(), { data: m, isSuccess: v } = je({
6304
6304
  user: r?.username,
6305
6305
  getAccessToken: t
6306
- }), b = g(m.NewChat), w = q(() => {
6307
- i(Le()), a([]), c(""), s({
6306
+ }), b = g(f.NewChat), w = q(() => {
6307
+ i(Ue()), a([]), c(""), s({
6308
6308
  type: it,
6309
6309
  payload: {
6310
6310
  privateChat: !1,
@@ -6365,9 +6365,9 @@ const mm = ({
6365
6365
  S.preventDefault(), w();
6366
6366
  };
6367
6367
  return $(() => {
6368
- Re() || ((n === !0 || o === !0) && !y.current && u.current && (y.current = !0, u.current.focus()), n === !1 && y.current && (y.current = !1));
6368
+ ze() || ((n === !0 || o === !0) && !y.current && u.current && (y.current = !0, u.current.focus()), n === !1 && y.current && (y.current = !1));
6369
6369
  }, [n, o]), /* @__PURE__ */ p(
6370
- Fe,
6370
+ Be,
6371
6371
  {
6372
6372
  label: "New Chat",
6373
6373
  mode: "light",
@@ -6383,18 +6383,18 @@ const mm = ({
6383
6383
  label: "New Chat",
6384
6384
  ref: u,
6385
6385
  onClick: n || o ? I : h,
6386
- disabled: !(v && f),
6386
+ disabled: !(v && m),
6387
6387
  children: n || o ? /* @__PURE__ */ p(
6388
6388
  ya,
6389
6389
  {
6390
- size: Ne,
6390
+ size: Oe,
6391
6391
  monotone: !0,
6392
6392
  className: b
6393
6393
  }
6394
6394
  ) : /* @__PURE__ */ p(
6395
6395
  _a,
6396
6396
  {
6397
- size: Ne,
6397
+ size: Oe,
6398
6398
  className: b
6399
6399
  }
6400
6400
  )
@@ -6407,13 +6407,13 @@ const mm = ({
6407
6407
  return t(e);
6408
6408
  };
6409
6409
  /*!
6410
- @versini/ui-panel v3.4.2
6410
+ @versini/ui-panel v4.0.0
6411
6411
  © 2025 gizmette.com
6412
6412
  */
6413
6413
  try {
6414
6414
  window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
6415
- version: "3.4.2",
6416
- buildTime: "11/16/2025 05:48 PM EST",
6415
+ version: "4.0.0",
6416
+ buildTime: "11/28/2025 01:51 PM EST",
6417
6417
  homepage: "https://github.com/aversini/ui-components",
6418
6418
  license: "MIT"
6419
6419
  });
@@ -6427,7 +6427,7 @@ const hm = "av-messagebox", gm = "av-panel";
6427
6427
  try {
6428
6428
  window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
6429
6429
  version: "3.1.0",
6430
- buildTime: "11/16/2025 05:48 PM EST",
6430
+ buildTime: "11/28/2025 01:51 PM EST",
6431
6431
  homepage: "https://github.com/aversini/ui-components",
6432
6432
  license: "MIT"
6433
6433
  });
@@ -6440,13 +6440,13 @@ function vm({ initialOpen: e = !1, open: t, onOpenChange: r } = {}) {
6440
6440
  onOpenChange: d
6441
6441
  }), y = u.context, g = Po(y, {
6442
6442
  enabled: t == null
6443
- }), m = Ro(y, {
6443
+ }), f = Ro(y, {
6444
6444
  outsidePress: !1,
6445
6445
  outsidePressEvent: "mousedown"
6446
- }), f = zo(y), v = Mo([
6446
+ }), m = zo(y), v = Mo([
6447
6447
  g,
6448
- m,
6449
- f
6448
+ f,
6449
+ m
6450
6450
  ]);
6451
6451
  return be(() => ({
6452
6452
  open: c,
@@ -6540,55 +6540,73 @@ const _m = /* @__PURE__ */ Xe(function(t, r) {
6540
6540
  ...i
6541
6541
  })
6542
6542
  });
6543
- }), ye = "panel", Ge = "messagebox", Em = ({ className: e, kind: t, borderMode: r, animation: n, maxWidth: o = "medium", maxHeight: s }) => {
6544
- const i = s ?? (t === ye ? "large" : void 0);
6543
+ }), le = "panel", Ae = "messagebox", oo = ({ blurEffect: e }) => z("sticky z-10 backdrop-brightness-50", {
6544
+ "backdrop-blur-sm": e === "small",
6545
+ "backdrop-blur-md": e === "medium",
6546
+ "backdrop-blur-lg": e === "large",
6547
+ "bg-surface-darker": e === "none"
6548
+ }), Em = ({ className: e, kind: t, borderMode: r, animation: n, maxWidth: o = "medium", maxHeight: s, blurEffect: i = "none" }) => {
6549
+ const a = s ?? (t === le ? "large" : void 0);
6545
6550
  return {
6546
- main: z("prose prose-lighter flex flex-col bg-surface-dark", {
6551
+ outerWrapper: z("main prose prose-lighter flex flex-col bg-surface-dark", {
6547
6552
  "duration-200 ease-out": n,
6548
6553
  /**
6549
6554
  * Panel styles
6550
6555
  */
6551
- [`${gm} min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === ye,
6552
- "w-full sm:w-[95%] md:max-w-2xl": t === ye && !e && o === "small",
6553
- "w-full sm:w-[95%] md:max-w-3xl": t === ye && !e && o === "medium",
6554
- "w-full sm:w-[95%] md:max-w-4xl": t === ye && !e && o === "large",
6555
- "max-h-full sm:max-h-[40%]": t === ye && i === "small",
6556
- "max-h-full sm:max-h-[60%]": t === ye && i === "medium",
6557
- "max-h-full sm:max-h-[95%]": t === ye && i === "large",
6558
- "sm:border-border-dark": r === "dark" && t === ye,
6559
- "sm:border-border-accent": r === "light" && t === ye,
6556
+ [`${gm} min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === le,
6557
+ "w-full sm:w-[95%] md:max-w-2xl": t === le && !e && o === "small",
6558
+ "w-full sm:w-[95%] md:max-w-3xl": t === le && !e && o === "medium",
6559
+ "w-full sm:w-[95%] md:max-w-4xl": t === le && !e && o === "large",
6560
+ "max-h-full sm:max-h-[40%]": t === le && a === "small",
6561
+ "max-h-full sm:max-h-[60%]": t === le && a === "medium",
6562
+ "max-h-full sm:max-h-[95%]": t === le && a === "large",
6563
+ "sm:border-border-dark": r === "dark" && t === le,
6564
+ "sm:border-border-accent": r === "light" && t === le,
6560
6565
  /**
6561
6566
  * Messagebox styles
6562
6567
  */
6563
- [`${hm} rounded-lg border-2`]: t === Ge,
6564
- "w-[95%] sm:w-[50%] md:max-w-2xl": t === Ge && !e,
6565
- "max-h-[20%]": t === Ge && i === "small",
6566
- "max-h-[50%]": t === Ge && i === "medium",
6567
- "max-h-[95%]": t === Ge && i === "large",
6568
- "border-border-dark": r === "dark" && t === Ge,
6569
- "border-border-accent": r === "light" && t === Ge,
6568
+ [`${hm} rounded-lg border-2`]: t === Ae,
6569
+ "w-[95%] sm:w-[50%] md:max-w-2xl": t === Ae && !e,
6570
+ "max-h-[20%]": t === Ae && a === "small",
6571
+ "max-h-[50%]": t === Ae && a === "medium",
6572
+ "max-h-[95%]": t === Ae && a === "large",
6573
+ "border-border-dark": r === "dark" && t === Ae,
6574
+ "border-border-accent": r === "light" && t === Ae,
6570
6575
  [`${e}`]: !!e
6571
6576
  }),
6572
- content: "flex flex-col py-2 sm:py-4 sm:px-4 px-2 overflow-y-auto",
6573
- footer: "flex grow flex-col sm:p-4 p-2",
6574
- header: "sm:p-4 mb-0 p-2",
6575
- close: "sm:p-4 p-2"
6577
+ innerWrapper: "content flex flex-col overflow-y-auto",
6578
+ footer: z(oo({
6579
+ blurEffect: i
6580
+ }), "p-2 bottom-0", {
6581
+ "sm:rounded-b-md": t === le,
6582
+ "rounded-b-md": t === Ae
6583
+ }),
6584
+ header: z("flex flex-row-reverse items-center justify-between", oo({
6585
+ blurEffect: i
6586
+ }), "top-0", {
6587
+ "sm:rounded-t-md": t === le,
6588
+ "rounded-t-md": t === Ae
6589
+ }),
6590
+ title: "mb-0 p-2",
6591
+ close: "p-2",
6592
+ content: "py-2 px-2"
6576
6593
  };
6577
- }, Tm = "slide", so = "fade", Sm = ({ open: e, onOpenChange: t, title: r, children: n, footer: o, borderMode: s = "light", kind: i = ye, className: a, animation: l = !1, animationType: c = Tm, maxWidth: d = "medium", maxHeight: u }) => {
6578
- const y = W(""), [g, m] = Z(l ? c === so ? {
6594
+ }, Tm = "slide", so = "fade", Sm = ({ open: e, onOpenChange: t, title: r, children: n, footer: o, borderMode: s = "light", kind: i = le, className: a, animation: l = !1, animationType: c = Tm, maxWidth: d = "medium", maxHeight: u, blurEffect: y = "none" }) => {
6595
+ const g = W(""), [f, m] = Z(l ? c === so ? {
6579
6596
  opacity: 0
6580
6597
  } : {
6581
6598
  transform: "translateY(-100vh)"
6582
- } : {}), f = Em({
6599
+ } : {}), v = Em({
6583
6600
  className: a,
6584
6601
  kind: i,
6585
6602
  borderMode: s,
6586
6603
  animation: l,
6587
6604
  maxWidth: d,
6588
- maxHeight: u
6605
+ maxHeight: u,
6606
+ blurEffect: y
6589
6607
  });
6590
- return $(() => (e && (y.current = document.title, document.title = `${r} | ${y.current}`), () => {
6591
- e && (document.title = y.current);
6608
+ return $(() => (e && (g.current = document.title, document.title = `${r} | ${g.current}`), () => {
6609
+ e && (document.title = g.current);
6592
6610
  }), [
6593
6611
  r,
6594
6612
  e
@@ -6599,57 +6617,60 @@ const _m = /* @__PURE__ */ Xe(function(t, r) {
6599
6617
  } : {
6600
6618
  transform: "translateY(-666vh)"
6601
6619
  } : {});
6602
- const v = setTimeout(() => {
6620
+ const b = setTimeout(() => {
6603
6621
  m(l ? c === "fade" ? {
6604
6622
  opacity: 1
6605
6623
  } : {
6606
6624
  transform: "translateY(0)"
6607
6625
  } : {});
6608
6626
  }, 100);
6609
- return () => clearTimeout(v);
6627
+ return () => clearTimeout(b);
6610
6628
  }
6611
6629
  }, [
6612
6630
  e,
6613
6631
  l,
6614
6632
  c
6615
- ]), /* @__PURE__ */ p(ze, {
6633
+ ]), /* @__PURE__ */ p(Me, {
6616
6634
  children: e && /* @__PURE__ */ p(ym, {
6617
6635
  open: e,
6618
6636
  onOpenChange: t,
6619
- children: /* @__PURE__ */ N(_m, {
6620
- className: f.main,
6621
- style: g,
6622
- children: [
6623
- /* @__PURE__ */ N("div", {
6624
- className: "flex flex-row-reverse items-center justify-between",
6625
- children: [
6626
- /* @__PURE__ */ p(Im, {
6627
- className: f.close,
6628
- trigger: /* @__PURE__ */ p(xe, {
6629
- mode: "dark",
6630
- focusMode: "light",
6631
- noBorder: !0,
6632
- label: "Close",
6633
- children: /* @__PURE__ */ p(yo, {
6634
- monotone: !0
6637
+ children: /* @__PURE__ */ p(_m, {
6638
+ className: v.outerWrapper,
6639
+ style: f,
6640
+ children: /* @__PURE__ */ N(wm, {
6641
+ className: v.innerWrapper,
6642
+ children: [
6643
+ /* @__PURE__ */ N("div", {
6644
+ className: v.header,
6645
+ children: [
6646
+ /* @__PURE__ */ p(Im, {
6647
+ className: v.close,
6648
+ trigger: /* @__PURE__ */ p(xe, {
6649
+ mode: "dark",
6650
+ focusMode: "light",
6651
+ noBorder: !0,
6652
+ label: "Close",
6653
+ children: /* @__PURE__ */ p(yo, {
6654
+ monotone: !0
6655
+ })
6635
6656
  })
6657
+ }),
6658
+ /* @__PURE__ */ p(bm, {
6659
+ className: v.title,
6660
+ children: r
6636
6661
  })
6637
- }),
6638
- /* @__PURE__ */ p(bm, {
6639
- className: f.header,
6640
- children: r
6641
- })
6642
- ]
6643
- }),
6644
- /* @__PURE__ */ p(wm, {
6645
- className: f.content,
6646
- children: n
6647
- }),
6648
- o && /* @__PURE__ */ p("div", {
6649
- className: f.footer,
6650
- children: o
6651
- })
6652
- ]
6662
+ ]
6663
+ }),
6664
+ /* @__PURE__ */ p("div", {
6665
+ className: v.content,
6666
+ children: n
6667
+ }),
6668
+ o && /* @__PURE__ */ p("div", {
6669
+ className: v.footer,
6670
+ children: o
6671
+ })
6672
+ ]
6673
+ })
6653
6674
  })
6654
6675
  })
6655
6676
  });
@@ -6747,7 +6768,7 @@ const km = "av-toggle", Cm = ({ narrow: e }) => z(
6747
6768
  }),
6748
6769
  toggleWrapper: Rm()
6749
6770
  }), Mm = ({ checked: e = !1, onChange: t, label: r, labelHidden: n = !1, name: o, mode: s = "system", focusMode: i = "system", labelMode: a, className: l, noBorder: c = !1, narrow: d = !1, noHaptic: u = !1, labelPosition: y = "right", subLabel: g }) => {
6750
- const { haptic: m } = ba(), f = zm({
6771
+ const { haptic: f } = ba(), m = zm({
6751
6772
  mode: s,
6752
6773
  focusMode: i,
6753
6774
  labelHidden: n,
@@ -6758,39 +6779,39 @@ const km = "av-toggle", Cm = ({ narrow: e }) => z(
6758
6779
  labelPosition: y,
6759
6780
  subLabel: !!g
6760
6781
  }), v = (w) => {
6761
- u || m(1), t?.(w.target.checked);
6782
+ u || f(1), t?.(w.target.checked);
6762
6783
  }, b = g ? /* @__PURE__ */ N("span", {
6763
6784
  className: "flex flex-col gap-0.5",
6764
6785
  children: [
6765
6786
  /* @__PURE__ */ p("span", {
6766
- className: f.label,
6787
+ className: m.label,
6767
6788
  children: r
6768
6789
  }),
6769
6790
  /* @__PURE__ */ p("span", {
6770
- className: f.subLabel,
6791
+ className: m.subLabel,
6771
6792
  children: g
6772
6793
  })
6773
6794
  ]
6774
6795
  }) : /* @__PURE__ */ p("span", {
6775
- className: f.label,
6796
+ className: m.label,
6776
6797
  children: r
6777
6798
  });
6778
6799
  return /* @__PURE__ */ N("label", {
6779
- className: f.wrapper,
6800
+ className: m.wrapper,
6780
6801
  children: [
6781
6802
  y === "left" && b,
6782
6803
  /* @__PURE__ */ N("div", {
6783
- className: f.toggleWrapper,
6804
+ className: m.toggleWrapper,
6784
6805
  children: [
6785
6806
  /* @__PURE__ */ p("input", {
6786
6807
  name: o,
6787
6808
  checked: e,
6788
6809
  type: "checkbox",
6789
- className: f.input,
6810
+ className: m.input,
6790
6811
  onChange: v
6791
6812
  }),
6792
6813
  /* @__PURE__ */ p("div", {
6793
- className: f.toggle
6814
+ className: m.toggle
6794
6815
  })
6795
6816
  ]
6796
6817
  }),
@@ -6875,6 +6896,7 @@ const km = "av-toggle", Cm = ({ narrow: e }) => z(
6875
6896
  onOpenChange: t,
6876
6897
  title: o.title,
6877
6898
  footer: y,
6899
+ blurEffect: "large",
6878
6900
  children: n
6879
6901
  }
6880
6902
  );
@@ -6884,10 +6906,10 @@ const km = "av-toggle", Cm = ({ narrow: e }) => z(
6884
6906
  const { getAccessToken: t, user: r } = Ie(), {
6885
6907
  state: { privateChat: n, provider: o, tokenUsage: s },
6886
6908
  dispatch: i
6887
- } = X(we), { messages: a, id: l } = je(), { mutateAsync: c } = wa({ getAccessToken: t }), [d, u] = Ce(), [y, g] = Z(!1), [m, f] = Z(!1), [v, b] = Ae({
6909
+ } = X(we), { messages: a, id: l } = Fe(), { mutateAsync: c } = wa({ getAccessToken: t }), [d, u] = Ce(), [y, g] = Z(!1), [f, m] = Z(!1), [v, b] = Ne({
6888
6910
  key: ke + Ia,
6889
6911
  initialValue: ""
6890
- }), w = nr(Jt.TOOL.MEMORIES), { data: I, isSuccess: h } = Ue({
6912
+ }), w = nr(Jt.TOOL.MEMORIES), { data: I, isSuccess: h } = je({
6891
6913
  user: r?.username,
6892
6914
  getAccessToken: t
6893
6915
  }), S = async () => {
@@ -6931,16 +6953,16 @@ const km = "av-toggle", Cm = ({ narrow: e }) => z(
6931
6953
  });
6932
6954
  }
6933
6955
  };
6934
- return /* @__PURE__ */ N(ze, { children: [
6935
- m && /* @__PURE__ */ p(
6956
+ return /* @__PURE__ */ N(Me, { children: [
6957
+ f && /* @__PURE__ */ p(
6936
6958
  St,
6937
6959
  {
6938
6960
  toggleLabel: "Don't show this again",
6939
6961
  toggleName: "private-disclosure",
6940
6962
  toggleChecked: y,
6941
6963
  onToggleChange: (E) => g(E),
6942
- showConfirmation: m,
6943
- setShowConfirmation: f,
6964
+ showConfirmation: f,
6965
+ setShowConfirmation: m,
6944
6966
  action: () => {
6945
6967
  y && b("true"), S();
6946
6968
  },
@@ -6960,7 +6982,7 @@ const km = "av-toggle", Cm = ({ narrow: e }) => z(
6960
6982
  }
6961
6983
  ),
6962
6984
  /* @__PURE__ */ p(
6963
- Fe,
6985
+ Be,
6964
6986
  {
6965
6987
  label: "Private Chat",
6966
6988
  mode: "light",
@@ -6978,14 +7000,14 @@ const km = "av-toggle", Cm = ({ narrow: e }) => z(
6978
7000
  labelRight: n ? "private" : "",
6979
7001
  variant: n ? "danger" : "secondary",
6980
7002
  onClick: (E) => {
6981
- E && E.preventDefault(), !n && !v ? f(!0) : S();
7003
+ E && E.preventDefault(), !n && !v ? m(!0) : S();
6982
7004
  },
6983
7005
  className: "text-sm",
6984
7006
  disabled: !(h && I),
6985
- children: n ? /* @__PURE__ */ p(Ea, { size: Ne }) : /* @__PURE__ */ p(
7007
+ children: n ? /* @__PURE__ */ p(Ea, { size: Oe }) : /* @__PURE__ */ p(
6986
7008
  Ta,
6987
7009
  {
6988
- size: Ne,
7010
+ size: Oe,
6989
7011
  className: d(u.PrivateChat)
6990
7012
  }
6991
7013
  )
@@ -7031,7 +7053,7 @@ const Ht = /* @__PURE__ */ Hr({
7031
7053
  }
7032
7054
  return "Element";
7033
7055
  }, Lr = /* @__PURE__ */ Xe(({ trigger: e, children: t, label: r = "Open menu", defaultPlacement: n = "bottom-start", onOpenChange: o, mode: s = "system", focusMode: i = "system", ...a }, l) => {
7034
- const [c, d] = Z(!1), [u, y] = Z(!1), [g, m] = Z(null), [f, v] = Z(!1), b = W([]), w = W([]), I = X(Ht), h = Do(), S = Gi(), x = $o(), E = Zo({
7056
+ const [c, d] = Z(!1), [u, y] = Z(!1), [g, f] = Z(null), [m, v] = Z(!1), b = W([]), w = W([]), I = X(Ht), h = Do(), S = Gi(), x = $o(), E = Zo({
7035
7057
  label: r !== "Open menu" ? r : null
7036
7058
  }), k = x != null, { floatingStyles: M, refs: D, context: O } = Oo({
7037
7059
  nodeId: S,
@@ -7054,7 +7076,7 @@ const Ht = /* @__PURE__ */ Hr({
7054
7076
  ],
7055
7077
  whileElementsMounted: Ji
7056
7078
  }), ee = Wi(O, {
7057
- enabled: k && f,
7079
+ enabled: k && m,
7058
7080
  delay: {
7059
7081
  open: 75
7060
7082
  },
@@ -7063,29 +7085,29 @@ const Ht = /* @__PURE__ */ Hr({
7063
7085
  })
7064
7086
  }), ce = Po(O, {
7065
7087
  event: "mousedown",
7066
- toggle: !k || !f,
7067
- ignoreMouse: k && f
7088
+ toggle: !k || !m,
7089
+ ignoreMouse: k && m
7068
7090
  }), P = zo(O, {
7069
7091
  role: "menu"
7070
7092
  }), Ke = Ro(O, {
7071
7093
  bubbles: !0
7072
- }), ue = qi(O, {
7094
+ }), de = qi(O, {
7073
7095
  listRef: b,
7074
7096
  activeIndex: g,
7075
7097
  nested: k,
7076
- onNavigate: m,
7098
+ onNavigate: f,
7077
7099
  loop: !0
7078
- }), Be = Xi(O, {
7100
+ }), Ve = Xi(O, {
7079
7101
  listRef: w,
7080
- onMatch: c ? m : void 0,
7102
+ onMatch: c ? f : void 0,
7081
7103
  activeIndex: g
7082
- }), { getReferenceProps: lt, getFloatingProps: de, getItemProps: ut } = Mo([
7104
+ }), { getReferenceProps: lt, getFloatingProps: pe, getItemProps: ut } = Mo([
7083
7105
  ee,
7084
7106
  ce,
7085
7107
  P,
7086
7108
  Ke,
7087
- ue,
7088
- Be
7109
+ de,
7110
+ Ve
7089
7111
  ]), et = Jr([
7090
7112
  D.setReference,
7091
7113
  E.ref,
@@ -7097,11 +7119,11 @@ const Ht = /* @__PURE__ */ Hr({
7097
7119
  function Q() {
7098
7120
  d(!1), o?.(!1);
7099
7121
  }
7100
- function me(tt) {
7122
+ function he(tt) {
7101
7123
  tt.nodeId !== S && tt.parentId === x && d(!1);
7102
7124
  }
7103
- return h.events.on("click", Q), h.events.on("menuopen", me), () => {
7104
- h.events.off("click", Q), h.events.off("menuopen", me);
7125
+ return h.events.on("click", Q), h.events.on("menuopen", he), () => {
7126
+ h.events.off("click", Q), h.events.off("menuopen", he);
7105
7127
  };
7106
7128
  }, [
7107
7129
  h,
@@ -7122,16 +7144,16 @@ const Ht = /* @__PURE__ */ Hr({
7122
7144
  function Q({ pointerType: tt }) {
7123
7145
  tt !== "touch" && v(!0);
7124
7146
  }
7125
- function me() {
7147
+ function he() {
7126
7148
  v(!1);
7127
7149
  }
7128
7150
  return window.addEventListener("pointermove", Q, {
7129
7151
  once: !0,
7130
7152
  capture: !0
7131
- }), window.addEventListener("keydown", me, !0), () => {
7153
+ }), window.addEventListener("keydown", he, !0), () => {
7132
7154
  window.removeEventListener("pointermove", Q, {
7133
7155
  capture: !0
7134
- }), window.removeEventListener("keydown", me, !0);
7156
+ }), window.removeEventListener("keydown", he, !0);
7135
7157
  };
7136
7158
  }, []);
7137
7159
  const Ot = io(e) === "Button" || io(e) === "ButtonIcon", Pt = Ot ? {
@@ -7143,7 +7165,7 @@ const Ht = /* @__PURE__ */ Hr({
7143
7165
  const Q = z("flex items-center flex-row justify-between", "w-full", "m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1", "rounded-md border border-transparent", "text-left text-base", "outline-hidden focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline", "disabled:cursor-not-allowed disabled:text-copy-medium", {
7144
7166
  "bg-surface-lighter": c && !u
7145
7167
  });
7146
- return /* @__PURE__ */ N(_n, {
7168
+ return /* @__PURE__ */ N(yn, {
7147
7169
  id: S,
7148
7170
  children: [
7149
7171
  /* @__PURE__ */ N("button", {
@@ -7152,11 +7174,11 @@ const Ht = /* @__PURE__ */ Hr({
7152
7174
  ...lt(I.getItemProps({
7153
7175
  ...a,
7154
7176
  className: Q,
7155
- onFocus(me) {
7156
- a.onFocus?.(me), y(!1), I.setHasFocusInside(!0);
7177
+ onFocus(he) {
7178
+ a.onFocus?.(he), y(!1), I.setHasFocusInside(!0);
7157
7179
  },
7158
- onMouseEnter(me) {
7159
- a.onMouseEnter?.(me), I.allowHover && I.isOpen && I.setActiveIndex(E.index);
7180
+ onMouseEnter(he) {
7181
+ a.onMouseEnter?.(he), I.allowHover && I.isOpen && I.setActiveIndex(E.index);
7160
7182
  }
7161
7183
  })),
7162
7184
  children: [
@@ -7173,14 +7195,14 @@ const Ht = /* @__PURE__ */ Hr({
7173
7195
  /* @__PURE__ */ p(Ht.Provider, {
7174
7196
  value: {
7175
7197
  activeIndex: g,
7176
- setActiveIndex: m,
7198
+ setActiveIndex: f,
7177
7199
  getItemProps: ut,
7178
7200
  setHasFocusInside: y,
7179
7201
  isOpen: c,
7180
- allowHover: f,
7202
+ allowHover: m,
7181
7203
  parent: I
7182
7204
  },
7183
- children: /* @__PURE__ */ p(bn, {
7205
+ children: /* @__PURE__ */ p(_n, {
7184
7206
  elementsRef: b,
7185
7207
  labelsRef: w,
7186
7208
  children: c && /* @__PURE__ */ p(xr, {
@@ -7193,7 +7215,7 @@ const Ht = /* @__PURE__ */ Hr({
7193
7215
  ref: D.setFloating,
7194
7216
  className: "rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2",
7195
7217
  style: M,
7196
- ...de(),
7218
+ ...pe(),
7197
7219
  children: t
7198
7220
  })
7199
7221
  })
@@ -7213,21 +7235,21 @@ const Ht = /* @__PURE__ */ Hr({
7213
7235
  ...a
7214
7236
  }))
7215
7237
  });
7216
- return /* @__PURE__ */ N(_n, {
7238
+ return /* @__PURE__ */ N(yn, {
7217
7239
  id: S,
7218
7240
  children: [
7219
7241
  Ee,
7220
7242
  /* @__PURE__ */ p(Ht.Provider, {
7221
7243
  value: {
7222
7244
  activeIndex: g,
7223
- setActiveIndex: m,
7245
+ setActiveIndex: f,
7224
7246
  getItemProps: ut,
7225
7247
  setHasFocusInside: y,
7226
7248
  isOpen: c,
7227
- allowHover: f,
7249
+ allowHover: m,
7228
7250
  parent: I
7229
7251
  },
7230
- children: /* @__PURE__ */ p(bn, {
7252
+ children: /* @__PURE__ */ p(_n, {
7231
7253
  elementsRef: b,
7232
7254
  labelsRef: w,
7233
7255
  children: c && /* @__PURE__ */ p(xr, {
@@ -7240,7 +7262,7 @@ const Ht = /* @__PURE__ */ Hr({
7240
7262
  ref: D.setFloating,
7241
7263
  className: "rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2",
7242
7264
  style: M,
7243
- ...de(),
7265
+ ...pe(),
7244
7266
  children: t
7245
7267
  })
7246
7268
  })
@@ -7272,29 +7294,29 @@ const _e = /* @__PURE__ */ Xe(({ label: e, disabled: t, icon: r, raw: n = !1, ch
7272
7294
  return /* @__PURE__ */ p("div", {
7273
7295
  role: "menuitem",
7274
7296
  ...d.getItemProps({
7275
- onClick(f) {
7276
- s || (a.onClick?.(f), y?.events.emit("click"));
7297
+ onClick(m) {
7298
+ s || (a.onClick?.(m), y?.events.emit("click"));
7277
7299
  }
7278
7300
  }),
7279
7301
  children: o
7280
7302
  });
7281
7303
  r && (c = "pl-2");
7282
- const m = z("flex flex-row items-center", "w-full", "m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1", "rounded-md border border-transparent", "text-left text-base", "outline-hidden focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline", "disabled:cursor-not-allowed disabled:text-copy-medium", {
7304
+ const f = z("flex flex-row items-center", "w-full", "m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1", "rounded-md border border-transparent", "text-left text-base", "outline-hidden focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline", "disabled:cursor-not-allowed disabled:text-copy-medium", {
7283
7305
  "bg-none": !t && !i
7284
7306
  });
7285
7307
  return /* @__PURE__ */ N("button", {
7286
7308
  ...a,
7287
7309
  ref: g,
7288
7310
  role: "menuitem",
7289
- className: m,
7311
+ className: f,
7290
7312
  tabIndex: 0,
7291
7313
  disabled: t,
7292
7314
  ...d.getItemProps({
7293
- onClick(f) {
7294
- s || (a.onClick?.(f), y?.events.emit("click"));
7315
+ onClick(m) {
7316
+ s || (a.onClick?.(m), y?.events.emit("click"));
7295
7317
  },
7296
- onFocus(f) {
7297
- a.onFocus?.(f), d.setHasFocusInside(!0);
7318
+ onFocus(m) {
7319
+ a.onFocus?.(m), d.setHasFocusInside(!0);
7298
7320
  }
7299
7321
  }),
7300
7322
  children: [
@@ -7336,11 +7358,11 @@ const Zm = ({ className: e, ...t }) => {
7336
7358
  className: e,
7337
7359
  defaultPlacement: t = "top-start"
7338
7360
  }) => {
7339
- const { dispatch: r, setChatId: n, setInitialMessages: o } = X(we), { dispatch: s } = X(Vr), { getAccessToken: i, user: a } = Ie(), [l, c] = Ce(), { data: d, isSuccess: u } = Ue({
7361
+ const { dispatch: r, setChatId: n, setInitialMessages: o } = X(we), { dispatch: s } = X(Vr), { getAccessToken: i, user: a } = Ie(), [l, c] = Ce(), { data: d, isSuccess: u } = je({
7340
7362
  user: a?.username,
7341
7363
  getAccessToken: i
7342
- }), y = (f, v, b) => {
7343
- f.preventDefault(), n(Le()), o([]), r({
7364
+ }), y = (m, v, b) => {
7365
+ m.preventDefault(), n(Ue()), o([]), r({
7344
7366
  type: it,
7345
7367
  payload: {
7346
7368
  privateChat: b
@@ -7351,7 +7373,7 @@ const Zm = ({ className: e, ...t }) => {
7351
7373
  prompt: v
7352
7374
  }
7353
7375
  });
7354
- }, g = u && d && d.tags && Dm(d.tags), m = /* @__PURE__ */ N(
7376
+ }, g = u && d && d.tags && Dm(d.tags), f = /* @__PURE__ */ N(
7355
7377
  kt,
7356
7378
  {
7357
7379
  mode: "dark",
@@ -7366,7 +7388,7 @@ const Zm = ({ className: e, ...t }) => {
7366
7388
  children: /* @__PURE__ */ p(
7367
7389
  xa,
7368
7390
  {
7369
- size: Ne,
7391
+ size: Oe,
7370
7392
  className: l(c.Prompts)
7371
7393
  }
7372
7394
  )
@@ -7375,9 +7397,9 @@ const Zm = ({ className: e, ...t }) => {
7375
7397
  defaultPlacement: t,
7376
7398
  children: [
7377
7399
  /* @__PURE__ */ p(Ur, { children: "Prompts" }),
7378
- g && d.tags.map((f) => {
7400
+ g && d.tags.map((m) => {
7379
7401
  let v = null;
7380
- switch (f.slot) {
7402
+ switch (m.slot) {
7381
7403
  case 0:
7382
7404
  v = /* @__PURE__ */ p(Oa, {});
7383
7405
  break;
@@ -7391,28 +7413,28 @@ const Zm = ({ className: e, ...t }) => {
7391
7413
  v = null;
7392
7414
  break;
7393
7415
  }
7394
- return f.enabled && f.label && f.content && /* @__PURE__ */ p(
7416
+ return m.enabled && m.label && m.content && /* @__PURE__ */ p(
7395
7417
  _e,
7396
7418
  {
7397
- label: f.label,
7419
+ label: m.label,
7398
7420
  icon: v,
7399
- onClick: (b) => y(b, f.content, f?.privateChat)
7421
+ onClick: (b) => y(b, m.content, m?.privateChat)
7400
7422
  },
7401
- `prompt-button-${f.slot}`
7423
+ `prompt-button-${m.slot}`
7402
7424
  );
7403
7425
  })
7404
7426
  ]
7405
7427
  }
7406
7428
  );
7407
7429
  return g ? /* @__PURE__ */ p(
7408
- Fe,
7430
+ Be,
7409
7431
  {
7410
7432
  label: "Prompts",
7411
7433
  mode: "light",
7412
7434
  className: e,
7413
- trigger: m
7435
+ trigger: f
7414
7436
  }
7415
- ) : /* @__PURE__ */ p("div", { className: e, children: m });
7437
+ ) : /* @__PURE__ */ p("div", { className: e, children: f });
7416
7438
  }, Um = ({
7417
7439
  className: e
7418
7440
  }) => {
@@ -7421,11 +7443,11 @@ const Zm = ({ className: e, ...t }) => {
7421
7443
  dispatch: n,
7422
7444
  setChatId: o,
7423
7445
  setInitialMessages: s
7424
- } = X(we), [i, a] = Ce(), [l, c] = Z(!1), [d, u] = Z(!1), [y, g] = Ae({
7446
+ } = X(we), [i, a] = Ce(), [l, c] = Z(!1), [d, u] = Z(!1), [y, g] = Ne({
7425
7447
  key: ke + Pa,
7426
7448
  initialValue: ""
7427
- }), [m, f] = Z(!1), v = (w) => {
7428
- o(Le()), s([]), n({
7449
+ }), [f, m] = Z(!1), v = (w) => {
7450
+ o(Ue()), s([]), n({
7429
7451
  type: it,
7430
7452
  payload: {
7431
7453
  reasoning: !t
@@ -7437,7 +7459,7 @@ const Zm = ({ className: e, ...t }) => {
7437
7459
  }
7438
7460
  });
7439
7461
  };
7440
- return /* @__PURE__ */ N(ze, { children: [
7462
+ return /* @__PURE__ */ N(Me, { children: [
7441
7463
  d && /* @__PURE__ */ p(
7442
7464
  St,
7443
7465
  {
@@ -7457,12 +7479,12 @@ const Zm = ({ className: e, ...t }) => {
7457
7479
  {
7458
7480
  toggleLabel: "Don't show this again",
7459
7481
  toggleName: "reasoning-disclosure",
7460
- toggleChecked: m,
7461
- onToggleChange: (w) => f(w),
7482
+ toggleChecked: f,
7483
+ onToggleChange: (w) => m(w),
7462
7484
  showConfirmation: l,
7463
7485
  setShowConfirmation: c,
7464
7486
  action: () => {
7465
- m && g("true"), v();
7487
+ f && g("true"), v();
7466
7488
  },
7467
7489
  customStrings: {
7468
7490
  confirmAction: "Continue",
@@ -7477,7 +7499,7 @@ const Zm = ({ className: e, ...t }) => {
7477
7499
  }
7478
7500
  ),
7479
7501
  /* @__PURE__ */ p(
7480
- Fe,
7502
+ Be,
7481
7503
  {
7482
7504
  label: "Reasoning Chat",
7483
7505
  mode: "light",
@@ -7500,8 +7522,8 @@ const Zm = ({ className: e, ...t }) => {
7500
7522
  children: /* @__PURE__ */ p(
7501
7523
  Ra,
7502
7524
  {
7503
- size: Ne,
7504
- className: Me({
7525
+ size: Oe,
7526
+ className: $e({
7505
7527
  [`${i(a.Reasoning)}`]: !t
7506
7528
  })
7507
7529
  }
@@ -7516,12 +7538,12 @@ const Zm = ({ className: e, ...t }) => {
7516
7538
  }) => {
7517
7539
  const { getAccessToken: t, user: r } = Ie(), {
7518
7540
  state: { loading: n, streaming: o }
7519
- } = X(we), [s, i] = Ce(), { data: a, isSuccess: l } = Ue({
7541
+ } = X(we), [s, i] = Ce(), { data: a, isSuccess: l } = je({
7520
7542
  user: r?.username,
7521
7543
  getAccessToken: t
7522
7544
  });
7523
7545
  return /* @__PURE__ */ p(
7524
- Fe,
7546
+ Be,
7525
7547
  {
7526
7548
  label: "Send Message",
7527
7549
  mode: "light",
@@ -7540,7 +7562,7 @@ const Zm = ({ className: e, ...t }) => {
7540
7562
  children: /* @__PURE__ */ p(
7541
7563
  za,
7542
7564
  {
7543
- size: Ne,
7565
+ size: Oe,
7544
7566
  className: s(i.Send)
7545
7567
  }
7546
7568
  )
@@ -7596,12 +7618,12 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7596
7618
  type: Gm,
7597
7619
  lastModified: e.lastModified
7598
7620
  }
7599
- ), Wm = () => Me(
7621
+ ), Wm = () => $e(
7600
7622
  "relative rounded-md text-base h-auto min-w-28 overflow-hidden pt-2"
7601
- ), Ym = ({ oledMode: e }) => Me({
7623
+ ), Ym = ({ oledMode: e }) => $e({
7602
7624
  "bg-slate-900/95 dark:bg-slate-900": e,
7603
7625
  "bg-slate-900": !e
7604
- }), qm = () => Me("text-copy-lighter caret-copy-light"), Xm = ({ oledMode: e }) => Me(
7626
+ }), qm = () => $e("text-copy-lighter caret-copy-light"), Xm = ({ oledMode: e }) => $e(
7605
7627
  "has-[.av-prompt-editable:focus]:outline",
7606
7628
  "has-[.av-prompt-editable:focus]:outline-2",
7607
7629
  "has-[.av-prompt-editable:focus]:outline-offset-2",
@@ -7609,7 +7631,7 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7609
7631
  "has-[.av-prompt-editable:focus]:outline-focus-light": !e,
7610
7632
  "dark:has-[.av-prompt-editable:focus]:outline-focus-light has-[.av-prompt-editable:focus]:outline-focus-dark": e
7611
7633
  }
7612
- ), Qm = (e) => Me(
7634
+ ), Qm = (e) => $e(
7613
7635
  "peer",
7614
7636
  "text-base resize-none overflow-hidden w-full text-inherit outline-none",
7615
7637
  "h-6 pr-2 pl-3",
@@ -7619,14 +7641,14 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7619
7641
  oledMode: e,
7620
7642
  placeholderColor: t
7621
7643
  }) => ({
7622
- wrapper: Me(
7644
+ wrapper: $e(
7623
7645
  Fa,
7624
7646
  Ym({ oledMode: e }),
7625
7647
  Wm(),
7626
7648
  qm(),
7627
7649
  Xm({ oledMode: e })
7628
7650
  ),
7629
- textArea: Me(
7651
+ textArea: $e(
7630
7652
  ja,
7631
7653
  Qm(t)
7632
7654
  )
@@ -7726,8 +7748,8 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7726
7748
  "image/jpeg": ".jpg",
7727
7749
  "image/webp": ".webp",
7728
7750
  "image/png": ".png"
7729
- }[l] || ".jpg", f = `${e.name.replace(/\.[^.]+$/, "")}${g}`;
7730
- return new File([u], f, {
7751
+ }[l] || ".jpg", m = `${e.name.replace(/\.[^.]+$/, "")}${g}`;
7752
+ return new File([u], m, {
7731
7753
  type: l,
7732
7754
  lastModified: e.lastModified
7733
7755
  });
@@ -7745,8 +7767,8 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7745
7767
  dispatch: y,
7746
7768
  state: {
7747
7769
  reasoning: g,
7748
- streaming: m,
7749
- aborted: f,
7770
+ streaming: f,
7771
+ aborted: m,
7750
7772
  lastResetTimestamp: v,
7751
7773
  attachments: b,
7752
7774
  provider: w,
@@ -7759,13 +7781,13 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7759
7781
  sortDirection: x.sortDirection,
7760
7782
  sortedCell: x.sortedCell,
7761
7783
  getAccessToken: t
7762
- }), { data: k } = Ue({
7784
+ }), { data: k } = je({
7763
7785
  user: e?.username,
7764
7786
  getAccessToken: t
7765
- }), M = W(null), D = W(null), O = W(!1), ee = W(0), ce = W(null), P = W(null), Ke = Va(), [ue, Be] = Ce(), lt = Km({
7787
+ }), M = W(null), D = W(null), O = W(!1), ee = W(0), ce = W(null), P = W(null), Ke = Va(), [de, Ve] = Ce(), lt = Km({
7766
7788
  oledMode: u,
7767
- placeholderColor: ue(Be.Placeholder)
7768
- }), de = n && k?.showReasoningButton, { setMessages: ut, status: et, id: Ot, sendMessage: Pt, input: Ee, setInput: Q, messages: me } = je({
7789
+ placeholderColor: de(Ve.Placeholder)
7790
+ }), pe = n && k?.showReasoningButton, { setMessages: ut, status: et, id: Ot, sendMessage: Pt, input: Ee, setInput: Q, messages: he } = Fe({
7769
7791
  onFinish: (U) => {
7770
7792
  E();
7771
7793
  const te = U.message?.metadata;
@@ -7776,7 +7798,7 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7776
7798
  }
7777
7799
  });
7778
7800
  }
7779
- }), tt = Fm(!!me.length), oa = q(
7801
+ }), tt = Fm(!!he.length), oa = q(
7780
7802
  (U) => {
7781
7803
  Q(U.target.value);
7782
7804
  },
@@ -7837,7 +7859,7 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7837
7859
  streaming: !0
7838
7860
  }
7839
7861
  }), U === gh && setTimeout(() => {
7840
- f || (y({
7862
+ m || (y({
7841
7863
  type: qe,
7842
7864
  payload: {
7843
7865
  loading: !1,
@@ -7846,14 +7868,14 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7846
7868
  }), ut((re) => [
7847
7869
  ...re,
7848
7870
  {
7849
- id: Le(),
7871
+ id: Ue(),
7850
7872
  role: bt,
7851
7873
  parts: [{ type: "text", text: Ha }]
7852
7874
  }
7853
7875
  ]));
7854
7876
  }, 1e3);
7855
7877
  },
7856
- [y, ut, f]
7878
+ [y, ut, m]
7857
7879
  );
7858
7880
  $(() => {
7859
7881
  et && sn(et);
@@ -7873,31 +7895,31 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7873
7895
  }, []), aa = async (U) => {
7874
7896
  if (U.preventDefault(), U.target.files && U.target.files.length > 0) {
7875
7897
  const re = s ? Array.from(s) : [], te = Array.from(U.target.files), rt = [...re];
7876
- let Ve = !1;
7877
- for (const he of te) {
7878
- const lr = "." + he.name.split(".").pop()?.toLowerCase();
7898
+ let He = !1;
7899
+ for (const ge of te) {
7900
+ const lr = "." + ge.name.split(".").pop()?.toLowerCase();
7879
7901
  Je.includes(lr) ? rt.some(
7880
- (ur) => ur.name === he.name && ur.size === he.size && ur.lastModified === he.lastModified
7881
- ) || rt.push(he) : Ve = !0;
7902
+ (ur) => ur.name === ge.name && ur.size === ge.size && ur.lastModified === ge.lastModified
7903
+ ) || rt.push(ge) : He = !0;
7882
7904
  }
7883
- if (D.current && (D.current.value = ""), Ve) {
7884
- const he = Je.length > 1 ? `${Je.slice(0, -1).join(", ")} and ${Je[Je.length - 1]}` : Je[0];
7885
- M.current = `Only ${he} files are allowed.`, l(!0);
7905
+ if (D.current && (D.current.value = ""), He) {
7906
+ const ge = Je.length > 1 ? `${Je.slice(0, -1).join(", ")} and ${Je[Je.length - 1]}` : Je[0];
7907
+ M.current = `Only ${ge} files are allowed.`, l(!0);
7886
7908
  return;
7887
7909
  }
7888
- const He = await uh(rt);
7889
- if (Xs(He) > jr) {
7910
+ const Ge = await uh(rt);
7911
+ if (Xs(Ge) > jr) {
7890
7912
  M.current = `Total file size exceeds the limit of ${Gt(
7891
7913
  jr
7892
7914
  )}.`, l(!0);
7893
7915
  return;
7894
7916
  }
7895
- if (He.length > 0) {
7896
- const he = new DataTransfer();
7897
- He.forEach((lr) => he.items.add(lr)), i(he.files), y({
7917
+ if (Ge.length > 0) {
7918
+ const ge = new DataTransfer();
7919
+ Ge.forEach((lr) => ge.items.add(lr)), i(ge.files), y({
7898
7920
  type: Tt,
7899
7921
  payload: {
7900
- attachments: he.files.length
7922
+ attachments: ge.files.length
7901
7923
  }
7902
7924
  });
7903
7925
  }
@@ -7924,9 +7946,9 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7924
7946
  let te;
7925
7947
  if (s && s.length > 0) {
7926
7948
  const rt = Array.from(s).map(
7927
- (He) => Jm(He)
7928
- ), Ve = new DataTransfer();
7929
- rt.forEach((He) => Ve.items.add(He)), te = Ve.files;
7949
+ (Ge) => Jm(Ge)
7950
+ ), He = new DataTransfer();
7951
+ rt.forEach((Ge) => He.items.add(Ge)), te = He.files;
7930
7952
  }
7931
7953
  sa(U, {
7932
7954
  headers: {
@@ -7946,16 +7968,16 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7946
7968
  [
7947
7969
  "mod+K",
7948
7970
  () => {
7949
- P && P.current && !Re() && P.current.focus();
7971
+ P && P.current && !ze() && P.current.focus();
7950
7972
  }
7951
7973
  ]
7952
7974
  ]), $(() => {
7953
7975
  if (h.prompt !== "") {
7954
7976
  const U = h.prompt.endsWith(":") && !h.prompt.endsWith(": ") ? h.prompt + " " : h.prompt;
7955
7977
  U.indexOf(ln) !== -1 ? navigator.clipboard.readText().then((te) => {
7956
- const Ve = te.startsWith("http://") || te.startsWith("https://") ? te : `"""${te}"""`;
7957
- Q(U.replace(ln, Ve));
7958
- }) : Q(U), !Re() && P.current && P.current.focus(), S({
7978
+ const He = te.startsWith("http://") || te.startsWith("https://") ? te : `"""${te}"""`;
7979
+ Q(U.replace(ln, He));
7980
+ }) : Q(U), !ze() && P.current && P.current.focus(), S({
7959
7981
  type: mo
7960
7982
  });
7961
7983
  }
@@ -7966,14 +7988,14 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
7966
7988
  }
7967
7989
  v > 0 && v !== ee.current ? (ee.current = v, setTimeout(() => {
7968
7990
  P.current && (!Ee && Lt(P), P.current.focus());
7969
- }, dh)) : m === !1 && !Ee && (Lt(P), !Re() && P.current && P.current.focus());
7970
- }, [v, m, Ee]), $(() => {
7991
+ }, dh)) : f === !1 && !Ee && (Lt(P), !ze() && P.current && P.current.focus());
7992
+ }, [v, f, Ee]), $(() => {
7971
7993
  h.lastTriggeredTimestamp && setTimeout(() => {
7972
7994
  cr();
7973
7995
  }, 100);
7974
7996
  }, [h.lastTriggeredTimestamp, cr]), $(() => {
7975
7997
  b === 0 && (D.current && (D.current.value = ""), i(null));
7976
- }, [b]), /* @__PURE__ */ N(ze, { children: [
7998
+ }, [b]), /* @__PURE__ */ N(Me, { children: [
7977
7999
  /* @__PURE__ */ p(
7978
8000
  St,
7979
8001
  {
@@ -8030,8 +8052,8 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8030
8052
  mm,
8031
8053
  {
8032
8054
  className: z("order-1 sm:mr-2", {
8033
- "mr-3": de,
8034
- "mr-4": !de
8055
+ "mr-3": pe,
8056
+ "mr-4": !pe
8035
8057
  })
8036
8058
  }
8037
8059
  ),
@@ -8039,8 +8061,8 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8039
8061
  Lm,
8040
8062
  {
8041
8063
  className: z("order-2 sm:mr-2", {
8042
- "mr-3": de,
8043
- "mr-4": !de
8064
+ "mr-3": pe,
8065
+ "mr-4": !pe
8044
8066
  })
8045
8067
  }
8046
8068
  ),
@@ -8048,19 +8070,19 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8048
8070
  fm,
8049
8071
  {
8050
8072
  className: z("order-3 sm:mr-2", {
8051
- "mr-3": de,
8052
- "mr-4": !de
8073
+ "mr-3": pe,
8074
+ "mr-4": !pe
8053
8075
  }),
8054
8076
  onClick: ia
8055
8077
  }
8056
8078
  ),
8057
- de && /* @__PURE__ */ p(Um, { className: z("order-4 mr-3 sm:mr-2") }),
8079
+ pe && /* @__PURE__ */ p(Um, { className: z("order-4 mr-3 sm:mr-2") }),
8058
8080
  /* @__PURE__ */ p(
8059
8081
  $m,
8060
8082
  {
8061
8083
  className: z("order-5 mr-3 sm:mr-2", {
8062
- "mr-3": de,
8063
- "mr-4": !de
8084
+ "mr-3": pe,
8085
+ "mr-4": !pe
8064
8086
  })
8065
8087
  }
8066
8088
  )
@@ -8075,7 +8097,7 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8075
8097
  dispatch: a
8076
8098
  } = X(Ct), [l] = Z(
8077
8099
  () => un[Math.floor(Math.random() * un.length)]
8078
- ), { messages: c } = je(), { height: d } = Wa(), { height: u } = Ya(), [y, g] = Io(), [m, f] = Ce(), v = be(() => Re(), []), b = be(() => qa(), []), w = d - u, I = be(() => {
8100
+ ), { messages: c } = Fe(), { height: d } = Wa(), { height: u } = Ya(), [y, g] = Io(), [f, m] = Ce(), v = be(() => ze(), []), b = be(() => qa(), []), w = d - u, I = be(() => {
8079
8101
  const h = v ? Xa : b ? Qa : Eo;
8080
8102
  return w > 70 && w < 500 ? v ? dn / 2 : dn : h;
8081
8103
  }, [w, v, b]);
@@ -8149,7 +8171,7 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8149
8171
  {
8150
8172
  className: z(
8151
8173
  "w-full text-center text-xs pt-2",
8152
- m(f.Footer)
8174
+ f(m.Footer)
8153
8175
  ),
8154
8176
  children: l
8155
8177
  }
@@ -8179,13 +8201,13 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8179
8201
  state: { privateChat: r },
8180
8202
  setChatId: n,
8181
8203
  setInitialMessages: o
8182
- } = X(we), { getAccessToken: s, user: i } = Ie(), { status: a } = je(), { allowedModels: l, status: c } = Br(), [d, u] = Ce(), [y, g] = Z(!1), m = q(() => {
8204
+ } = X(we), { getAccessToken: s, user: i } = Ie(), { status: a } = Fe(), { allowedModels: l, status: c } = Br(), [d, u] = Ce(), [y, g] = Z(!1), f = q(() => {
8183
8205
  y || (Bf(), g(!0));
8184
8206
  }, [y]), {
8185
- isSuccess: f,
8207
+ isSuccess: m,
8186
8208
  refetch: v,
8187
8209
  data: b
8188
- } = Ue({
8210
+ } = je({
8189
8211
  user: i?.username,
8190
8212
  getAccessToken: s
8191
8213
  }), w = be(() => {
@@ -8207,7 +8229,7 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8207
8229
  return !1;
8208
8230
  }, [b?.useNestedModelSelection, I]), S = async (O) => {
8209
8231
  try {
8210
- n(Le()), o([]), O !== b?.provider && (await fn({
8232
+ n(Ue()), o([]), O !== b?.provider && (await fn({
8211
8233
  provider: O,
8212
8234
  accessToken: await s(),
8213
8235
  username: i?.username || ""
@@ -8223,7 +8245,7 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8223
8245
  }
8224
8246
  }, x = async (O, ee) => {
8225
8247
  try {
8226
- if (n(Le()), o([]), O !== b?.provider || ee !== b?.model) {
8248
+ if (n(Ue()), o([]), O !== b?.provider || ee !== b?.model) {
8227
8249
  await fn({
8228
8250
  provider: O,
8229
8251
  model: ee,
@@ -8246,9 +8268,9 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8246
8268
  });
8247
8269
  } catch {
8248
8270
  }
8249
- }, E = b && f, k = E && w.find(
8271
+ }, E = b && m, k = E && w.find(
8250
8272
  (O) => b.provider === O.id
8251
- )?.icon || w[0]?.icon, M = be(() => !b?.useNestedModelSelection || !b?.model || !l || !wo(b.model, l) ? null : pr[b.model] || b.model, [b?.useNestedModelSelection, b?.model, l]), D = /* @__PURE__ */ p(ze, { children: /* @__PURE__ */ N(
8273
+ )?.icon || w[0]?.icon, M = be(() => !b?.useNestedModelSelection || !b?.model || !l || !wo(b.model, l) ? null : pr[b.model] || b.model, [b?.useNestedModelSelection, b?.model, l]), D = /* @__PURE__ */ p(Me, { children: /* @__PURE__ */ N(
8252
8274
  kt,
8253
8275
  {
8254
8276
  mode: "dark",
@@ -8260,13 +8282,13 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8260
8282
  noBackground: !0,
8261
8283
  label: "Providers",
8262
8284
  disabled: !E,
8263
- onMouseEnter: m,
8264
- onFocus: m,
8285
+ onMouseEnter: f,
8286
+ onFocus: f,
8265
8287
  children: /* @__PURE__ */ p(
8266
8288
  k,
8267
8289
  {
8268
8290
  className: E && a === "streaming" ? "av-pulsate-icon" : d(u.Provider),
8269
- size: Ne
8291
+ size: Oe
8270
8292
  }
8271
8293
  )
8272
8294
  }
@@ -8306,7 +8328,7 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8306
8328
  ) });
8307
8329
  return E ? /* @__PURE__ */ N("div", { className: "flex items-center", children: [
8308
8330
  /* @__PURE__ */ p(
8309
- Fe,
8331
+ Be,
8310
8332
  {
8311
8333
  label: "Toggle Providers",
8312
8334
  mode: "light",
@@ -8326,41 +8348,41 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8326
8348
  }
8327
8349
  )
8328
8350
  ] }) : /* @__PURE__ */ p("div", { className: e, children: D });
8329
- }, wh = Oe(
8351
+ }, wh = Pe(
8330
8352
  () => import(
8331
8353
  /* webpackChunkName: "modal-chunk" */
8332
- "./ProfileEntry.NsztPEkp.js"
8354
+ "./ProfileEntry.B5H9_Q-0.js"
8333
8355
  ).then((e) => ({
8334
8356
  default: e.Profile
8335
8357
  }))
8336
- ), Ih = Oe(
8358
+ ), Ih = Pe(
8337
8359
  () => import(
8338
8360
  /* webpackChunkName: "modal-chunk" */
8339
- "./SettingsEntry.CDOPc6iD.js"
8361
+ "./SettingsEntry.D5cipDqa.js"
8340
8362
  ).then((e) => ({
8341
8363
  default: e.SettingsPanel
8342
8364
  }))
8343
- ), Eh = Oe(
8365
+ ), Eh = Pe(
8344
8366
  () => import(
8345
8367
  /* webpackChunkName: "modal-chunk" */
8346
- "./HistoryEntry.B0rPR2OE.js"
8368
+ "./HistoryEntry.BXEni06v.js"
8347
8369
  ).then((e) => ({
8348
8370
  default: e.HistoryPanel
8349
8371
  }))
8350
- ), Th = Oe(
8372
+ ), Th = Pe(
8351
8373
  () => import(
8352
8374
  /* webpackChunkName: "modal-chunk" */
8353
- "./AboutEntry.D4NbCMmI.js"
8375
+ "./AboutEntry.Bj8HUsU4.js"
8354
8376
  ).then((e) => ({ default: e.About }))
8355
- ), Sh = Oe(
8377
+ ), Sh = Pe(
8356
8378
  () => import(
8357
8379
  /* webpackChunkName: "modal-chunk" */
8358
- "./UsageEntry.Bq3qWoi3.js"
8380
+ "./UsageEntry.DPue9312.js"
8359
8381
  ).then((e) => ({ default: e.Usage }))
8360
- ), kh = Oe(
8382
+ ), kh = Pe(
8361
8383
  () => import(
8362
8384
  /* webpackChunkName: "modal-chunk" */
8363
- "./UserMemoriesPanel.4Bgcvr6X.js"
8385
+ "./UserMemoriesPanel.CwAnAj0p.js"
8364
8386
  ).then(
8365
8387
  (e) => ({ default: e.default })
8366
8388
  )
@@ -8399,37 +8421,37 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8399
8421
  }) => {
8400
8422
  const {
8401
8423
  state: { oledMode: t }
8402
- } = X(Ct), { logout: r, getAccessToken: n, user: o } = Ie(), s = ci(), [i, a] = Ce(), { data: l, isSuccess: c } = Ue({
8424
+ } = X(Ct), { logout: r, getAccessToken: n, user: o } = Ie(), s = ci(), [i, a] = Ce(), { data: l, isSuccess: c } = je({
8403
8425
  user: o?.username,
8404
8426
  getAccessToken: n
8405
- }), [d, u] = Z(null), [y, g] = Z(!1), [m, f] = Z(!1), [v, b] = Z(!1), w = nr(Jt.TOOL.MEMORIES);
8427
+ }), [d, u] = Z(null), [y, g] = Z(!1), [f, m] = Z(!1), [v, b] = Z(!1), w = nr(Jt.TOOL.MEMORIES);
8406
8428
  $(() => {
8407
8429
  c && l && w && b(l?.useMemory ?? !1);
8408
8430
  }, [c, l, w]);
8409
8431
  const I = q(() => {
8410
- m || Promise.all([
8432
+ f || Promise.all([
8411
8433
  import(
8412
8434
  /* webpackChunkName: "modal-chunk" */
8413
- "./ProfileEntry.NsztPEkp.js"
8435
+ "./ProfileEntry.B5H9_Q-0.js"
8414
8436
  ),
8415
8437
  import(
8416
8438
  /* webpackChunkName: "modal-chunk" */
8417
- "./SettingsEntry.CDOPc6iD.js"
8439
+ "./SettingsEntry.D5cipDqa.js"
8418
8440
  ),
8419
8441
  import(
8420
8442
  /* webpackChunkName: "modal-chunk" */
8421
- "./HistoryEntry.B0rPR2OE.js"
8443
+ "./HistoryEntry.BXEni06v.js"
8422
8444
  ),
8423
8445
  import(
8424
8446
  /* webpackChunkName: "modal-chunk" */
8425
- "./AboutEntry.D4NbCMmI.js"
8447
+ "./AboutEntry.Bj8HUsU4.js"
8426
8448
  ),
8427
8449
  import(
8428
8450
  /* webpackChunkName: "modal-chunk" */
8429
- "./UsageEntry.Bq3qWoi3.js"
8451
+ "./UsageEntry.DPue9312.js"
8430
8452
  )
8431
- ]).finally(() => f(!0));
8432
- }, [m]), h = q((M) => {
8453
+ ]).finally(() => m(!0));
8454
+ }, [f]), h = q((M) => {
8433
8455
  u(M);
8434
8456
  }, []), S = q(() => {
8435
8457
  u(null);
@@ -8457,7 +8479,7 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8457
8479
  * focus.
8458
8480
  */
8459
8481
  []
8460
- ), /* @__PURE__ */ N(ze, { children: [
8482
+ ), /* @__PURE__ */ N(Me, { children: [
8461
8483
  /* @__PURE__ */ p(
8462
8484
  St,
8463
8485
  {
@@ -8497,7 +8519,7 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8497
8519
  children: [
8498
8520
  /* @__PURE__ */ p(at, { children: /* @__PURE__ */ p(bh, { className: "mr-2" }) }),
8499
8521
  /* @__PURE__ */ p(at, { children: /* @__PURE__ */ p(
8500
- Fe,
8522
+ Be,
8501
8523
  {
8502
8524
  label: "Profile, Settings, etc.",
8503
8525
  mode: "light",
@@ -8568,7 +8590,7 @@ const Bm = [".png", ".jpg", ".jpeg", ".webp"], Vm = [".pdf", ".txt"], Hm = [
8568
8590
  icon: /* @__PURE__ */ p(mi, {})
8569
8591
  }
8570
8592
  ),
8571
- !e && /* @__PURE__ */ N(ze, { children: [
8593
+ !e && /* @__PURE__ */ N(Me, { children: [
8572
8594
  /* @__PURE__ */ p(Zm, {}),
8573
8595
  /* @__PURE__ */ p(
8574
8596
  _e,
@@ -8695,19 +8717,19 @@ const po = "av-spinner", ra = ({ spinnerRef: e, mode: t = "system", type: r = "c
8695
8717
  })
8696
8718
  ]
8697
8719
  });
8698
- }, Oh = Oe(
8699
- () => import("./index.BMVDRH6N.js").then((e) => ({ default: e.Bubble }))
8720
+ }, Oh = Pe(
8721
+ () => import("./index.hL9trLAw.js").then((e) => ({ default: e.Bubble }))
8700
8722
  ), on = (e) => /* @__PURE__ */ p(Wt, { fallback: /* @__PURE__ */ p("span", { className: "inline-block" }), children: /* @__PURE__ */ p(Oh, { ...e }) });
8701
8723
  on.displayName = "AsyncBubble";
8702
- const fo = 1, Ph = 150, Rh = Oe(
8724
+ const fo = 1, Ph = 150, Rh = Pe(
8703
8725
  () => import(
8704
8726
  /* webpackChunkName: "LazyMessageAssistant" */
8705
- "./ChatBubbleAssistant.CT-lt9VL.js"
8727
+ "./ChatBubbleAssistant.CSgJfGV8.js"
8706
8728
  )
8707
- ), zh = Oe(
8729
+ ), zh = Pe(
8708
8730
  () => import(
8709
8731
  /* webpackChunkName: "LazyMessageUser" */
8710
- "./ChatBubbleUser.BVHUcko2.js"
8732
+ "./ChatBubbleUser.K3_2TN_h.js"
8711
8733
  )
8712
8734
  ), Mh = ko.memo(
8713
8735
  ({
@@ -8733,7 +8755,7 @@ const fo = 1, Ph = 150, Rh = Oe(
8733
8755
  }
8734
8756
  a(!1);
8735
8757
  }
8736
- }, [t, i, o]), e === To && t ? /* @__PURE__ */ p(Wt, { fallback: /* @__PURE__ */ p("span", {}), children: /* @__PURE__ */ p(zh, { content: t }) }) : (e === bt || e === gn) && o && (s === "submitted" || s === "streaming") && i ? /* @__PURE__ */ p(on, { tail: !0, children: /* @__PURE__ */ p(ra, { type: "dots" }) }) : (e === bt || e === gn) && t && t.trim().length >= fo ? /* @__PURE__ */ p(Wt, { fallback: /* @__PURE__ */ p("span", {}), children: /* @__PURE__ */ p(
8758
+ }, [t, i, o]), e === To && t ? /* @__PURE__ */ p(Wt, { fallback: /* @__PURE__ */ p("span", {}), children: /* @__PURE__ */ p(zh, { content: t }) }) : e === bt && o && (s === "submitted" || s === "streaming") && i ? /* @__PURE__ */ p(on, { tail: !0, children: /* @__PURE__ */ p(ra, { type: "dots" }) }) : e === bt && t && t.trim().length >= fo ? /* @__PURE__ */ p(Wt, { fallback: /* @__PURE__ */ p("span", {}), children: /* @__PURE__ */ p(
8737
8759
  Rh,
8738
8760
  {
8739
8761
  role: e,
@@ -8769,7 +8791,7 @@ function Zh(e) {
8769
8791
  }
8770
8792
  }
8771
8793
  const Dh = () => {
8772
- const { messages: e, status: t } = je(), r = e ? e.map((s, i) => s.role === bt ? i : -1).filter((s) => s !== -1).pop() : -1, n = e && e.length > 0 ? e[e.length - 1] : null, o = (t === "submitted" || t === "streaming") && n?.role === To;
8794
+ const { messages: e, status: t } = Fe(), r = e ? e.map((s, i) => s.role === bt ? i : -1).filter((s) => s !== -1).pop() : -1, n = e && e.length > 0 ? e[e.length - 1] : null, o = (t === "submitted" || t === "streaming") && n?.role === To;
8773
8795
  return e && e.length > 0 ? /* @__PURE__ */ N("div", { className: "space-y-6 mt-2 @container", children: [
8774
8796
  e?.map((s, i) => {
8775
8797
  let a;
@@ -8794,11 +8816,11 @@ const Dh = () => {
8794
8816
  state: { footerPosition: s, footerHeight: i, footerOffset: a, oledMode: l }
8795
8817
  } = X(Ct), {
8796
8818
  state: { loading: c }
8797
- } = X(we), { messages: d } = je(), u = W(0), { data: y, isSuccess: g } = yi(), m = _i({
8819
+ } = X(we), { messages: d } = Fe(), u = W(0), { data: y, isSuccess: g } = yi(), f = _i({
8798
8820
  isAuthenticated: e,
8799
8821
  oledMode: l,
8800
8822
  extraClass: "rounded-b-md relative border-b-16 border-transparent"
8801
- }), f = Ii() ? "mt-4" : "", v = q(() => {
8823
+ }), m = Ii() ? "mt-4" : "", v = q(() => {
8802
8824
  o.current && o.current.scrollIntoView({
8803
8825
  behavior: "smooth",
8804
8826
  block: "end"
@@ -8808,12 +8830,12 @@ const Dh = () => {
8808
8830
  c && v();
8809
8831
  }, [c, v]), $(() => {
8810
8832
  u.current = s === vt ? i + a + So + bi + 15 : 0;
8811
- }, [s, i, a]), /* @__PURE__ */ N(ze, { children: [
8812
- /* @__PURE__ */ N("div", { className: m, ref: n, children: [
8833
+ }, [s, i, a]), /* @__PURE__ */ N(Me, { children: [
8834
+ /* @__PURE__ */ N("div", { className: f, ref: n, children: [
8813
8835
  /* @__PURE__ */ p(
8814
8836
  wi,
8815
8837
  {
8816
- className: f,
8838
+ className: m,
8817
8839
  isCapabilitiesSuccess: g,
8818
8840
  capabilities: y
8819
8841
  }
@@ -8844,44 +8866,44 @@ function na({
8844
8866
  isComponent: e = !1,
8845
8867
  headerHeight: t = 0
8846
8868
  }) {
8847
- const { user: r, getAccessToken: n } = Ie(), [o, s] = Z(`${vn}px`), [i, a] = Io(), [l, c] = Z(Le()), [d, u] = Z([]), [y] = Ae({
8869
+ const { user: r, getAccessToken: n } = Ie(), [o, s] = Z(`${gn}px`), [i, a] = Io(), [l, c] = Z(Ue()), [d, u] = Z([]), [y] = Ne({
8848
8870
  key: ke + zi,
8849
8871
  initialValue: ""
8850
- }), [g] = Ae({
8872
+ }), [g] = Ne({
8851
8873
  key: ke + Ri,
8852
- initialValue: yn
8853
- }), [m] = Ae({
8874
+ initialValue: vn
8875
+ }), [f] = Ne({
8854
8876
  key: ke + Zi,
8855
8877
  initialValue: gt.DESC
8856
- }), [f] = Ae({
8878
+ }), [m] = Ne({
8857
8879
  key: ke + Di,
8858
8880
  initialValue: gt.ASC
8859
- }), [v] = Ae({
8881
+ }), [v] = Ne({
8860
8882
  key: Mi,
8861
8883
  initialValue: !1
8862
- }), [b] = Ae({
8884
+ }), [b] = Ne({
8863
8885
  key: $i,
8864
8886
  initialValue: !1
8865
8887
  }), w = be(() => ({
8866
8888
  footerPosition: kr,
8867
8889
  footerHeight: 0,
8868
- footerOffset: Re() ? Eo : 0,
8890
+ footerOffset: ze() ? Eo : 0,
8869
8891
  oledMode: !1,
8870
8892
  fullScreen: !1,
8871
8893
  themeMode: Ei
8872
8894
  }), []), [I, h] = Rt(Ti, w), S = be(() => {
8873
- const ue = Re(), Be = go();
8874
- return ue && Be ? "mt-1" : "mt-5";
8895
+ const de = ze(), Ve = go();
8896
+ return de && Ve ? "mt-1" : "mt-5";
8875
8897
  }, []), E = {
8876
8898
  searchString: y,
8877
8899
  sortedCell: g,
8878
8900
  sortDirection: (() => {
8879
8901
  switch (g) {
8880
8902
  case Pi:
8881
- return f;
8882
- case yn:
8883
- default:
8884
8903
  return m;
8904
+ case vn:
8905
+ default:
8906
+ return f;
8885
8907
  }
8886
8908
  })()
8887
8909
  }, [k, M] = Rt(
@@ -8903,7 +8925,7 @@ function na({
8903
8925
  attachments: 0,
8904
8926
  lastStreamingTimestamp: 0,
8905
8927
  lastResetTimestamp: 0
8906
- }), { data: P } = Ue({
8928
+ }), { data: P } = je({
8907
8929
  user: r?.username,
8908
8930
  getAccessToken: n
8909
8931
  }), Ke = be(() => new rn({
@@ -8947,21 +8969,21 @@ function na({
8947
8969
  });
8948
8970
  }, [P]), $(() => {
8949
8971
  try {
8950
- const ue = sessionStorage.getItem("sw-toggle-pending");
8951
- ue && (ue === "enabled" ? rr(Li, { containerId: "toggle-save" }) : ue === "disabled" && rr(Ui, {
8972
+ const de = sessionStorage.getItem("sw-toggle-pending");
8973
+ de && (de === "enabled" ? rr(Li, { containerId: "toggle-save" }) : de === "disabled" && rr(Ui, {
8952
8974
  containerId: "toggle-save"
8953
8975
  }), sessionStorage.removeItem("sw-toggle-pending"));
8954
8976
  } catch {
8955
8977
  }
8956
8978
  }, []), Gr(() => {
8957
8979
  if (I.footerPosition === "FOOTER_BOTTOM") {
8958
- const ue = S === "mt-1" ? 4 : 20, Be = `calc(${a.height}px + ${ue}px)`;
8980
+ const de = S === "mt-1" ? 4 : 20, Ve = `calc(${a.height}px + ${de}px)`;
8959
8981
  s(
8960
- `calc(100svh - ${t}px - ${Be} - ${I.footerHeight}px - ${I.footerOffset}px - ${So}px)`
8982
+ `calc(100svh - ${t}px - ${Ve} - ${I.footerHeight}px - ${I.footerOffset}px - ${So}px)`
8961
8983
  );
8962
8984
  } else
8963
8985
  s(
8964
- Re() ? `${Ni}px` : `${vn}px`
8986
+ ze() ? `${Ni}px` : `${gn}px`
8965
8987
  );
8966
8988
  }, [I, a, t, S]), /* @__PURE__ */ p(
8967
8989
  bo.Provider,
@@ -8992,14 +9014,14 @@ function na({
8992
9014
  transport: Ke,
8993
9015
  experimental_throttle: 300,
8994
9016
  generateId() {
8995
- return Le();
9017
+ return Ue();
8996
9018
  }
8997
9019
  },
8998
9020
  children: [
8999
9021
  /* @__PURE__ */ p(tm, { chatId: l }),
9000
9022
  /* @__PURE__ */ N("div", { className: Oi, children: [
9001
- /* @__PURE__ */ p(no, { containerId: "toggle-save" }),
9002
- /* @__PURE__ */ p(no, { containerId: "toggle-provider" })
9023
+ /* @__PURE__ */ p(ro, { containerId: "toggle-save" }),
9024
+ /* @__PURE__ */ p(ro, { containerId: "toggle-provider" })
9003
9025
  ] }),
9004
9026
  /* @__PURE__ */ p(
9005
9027
  "header",
@@ -9043,15 +9065,18 @@ export {
9043
9065
  Tt as CHAT_SET_ATTACHMENTS,
9044
9066
  qe as CHAT_SET_STATUS,
9045
9067
  St as ConfirmationPanel,
9046
- no as LazyToastContainerWrapper,
9068
+ ro as LazyToastContainerWrapper,
9069
+ kt as Menu,
9070
+ Ur as MenuGroupLabel,
9071
+ _e as MenuItem,
9047
9072
  Sm as Panel,
9048
9073
  Mm as Toggle,
9049
- Fe as Tooltip,
9074
+ Be as Tooltip,
9050
9075
  ff as getDefaultExportFromCjs,
9051
9076
  Bf as preloadToast,
9052
9077
  Vf as showErrorToast,
9053
9078
  rr as showSuccessToast,
9054
- je as useAiChat,
9079
+ Fe as useAiChat,
9055
9080
  nr as useCapability,
9056
- Le as v4
9081
+ Ue as v4
9057
9082
  };