@versini/sassysaint 8.96.0 → 8.96.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/chunks/{AboutChangelog.BT8UgmHQ.js → AboutChangelog.C6Gh0-Dw.js} +3 -3
  2. package/dist/chunks/{AboutEntry.BJE-bU_N.js → AboutEntry.BKljfLAy.js} +5 -5
  3. package/dist/chunks/{App.LYDFtAda.js → App.DOKuGnyj.js} +550 -522
  4. package/dist/chunks/{Chart.B095KoRq.js → Chart.A7Ud1PMs.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.BknxuERx.js → ChatBubbleAssistant.CAcD_Ozt.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.BclrVW4B.js → ChatBubbleUser.C3gcIlG2.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.CB_X65fc.js → ChatHistoryTable.BvwT62gn.js} +3 -3
  8. package/dist/chunks/{HistoryEntry.BgHyFwE3.js → HistoryEntry.C4JEfMvJ.js} +3 -3
  9. package/dist/chunks/{ProfileEntry.C9QOm9l-.js → ProfileEntry.OLQuNVJm.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.CzbiS7Bz.js → SettingsEntry._-U9exEs.js} +3 -3
  11. package/dist/chunks/{UsageEntry.CgQaTCNr.js → UsageEntry.bjFxMAjP.js} +3 -3
  12. package/dist/chunks/{UserMemoriesPanel.DTr5Rx1F.js → UserMemoriesPanel.BNSUeJdn.js} +4 -4
  13. package/dist/chunks/{index.BXgW23HY.js → index.B4iNX5B6.js} +1 -1
  14. package/dist/chunks/{index.B5KZFYb6.js → index.BHxq4pYM.js} +3 -3
  15. package/dist/chunks/{index.BwhIOCQB.js → index.BVmd5Zwm.js} +1 -1
  16. package/dist/chunks/{index.BCn9j5ZA.js → index.Bz6Xsi4J.js} +1 -1
  17. package/dist/chunks/{index.66Na7pB6.js → index.Co6I2Iv-.js} +1 -1
  18. package/dist/chunks/{index.CQkhzIBN.js → index.DB2NyTaK.js} +1 -1
  19. package/dist/chunks/{index.CLiPgVbU.js → index.DKyf2wm9.js} +1 -1
  20. package/dist/chunks/{index.sJ3tCqwk.js → index.DvcgyAt7.js} +10 -8
  21. package/dist/chunks/{index.D9s4cOVM.js → index.NScI5MgE.js} +2 -2
  22. package/dist/chunks/{useMarkdown.DLS4h-XT.js → useMarkdown.Cx6uXAyf.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 +4 -4
@@ -1,8 +1,8 @@
1
1
  import { jsx as p, jsxs as N, Fragment as $e } 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 Ie, LOCAL_STORAGE_PREFIX as Ce, LOCAL_STORAGE_CHAT_ID as jt, n as Ee, useLocalStorage as Oe, isDev as fa, isPWAMode as go, isTauri as _t, useChat as ma, useClickOutside as ha, useInterval as ga, isProbablyiPhone as Pe, useTheme as xe, ButtonIcon as Ae, IconAddLight as va, DEFAULT_ICON_ACTION_SIZE as Re, useUserPreferences as Fe, useHotkeys as Fr, 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 Ma, INPUT_PLACEHOLDER_TEXT_IN_SESSION as _o, INPUT_PLACEHOLDER_TEXT_MORNING as za, 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 Mi, LOCAL_STORAGE_OLED_MODE as zi, 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.sJ3tCqwk.js";
3
- import ko, { useRef as J, useCallback as X, useSyncExternalStore as fr, useEffect as $, useState as Z, createContext as Hr, useContext as Q, useMemo as he, forwardRef as Qe, useId as Co, useLayoutEffect as Gr, cloneElement as ji, Suspense as Wt, lazy as Me, useReducer as Rt } from "react";
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 Ie, LOCAL_STORAGE_PREFIX as Ce, LOCAL_STORAGE_CHAT_ID as jt, n as Ee, useLocalStorage as Oe, isDev as fa, isPWAMode as go, isTauri as _t, useChat as ma, useClickOutside as ha, useInterval as ga, isProbablyiPhone as Pe, useTheme as xe, ButtonIcon as Ae, IconAddLight as va, DEFAULT_ICON_ACTION_SIZE as Re, useUserPreferences as Fe, useHotkeys as Vr, IconCloseLight as ya, IconEditLight as _a, serverUrl as vo, useEntitlements as Hr, IconClose as yo, useHaptic as ba, L as Cr, j as at, Button as ln, 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 Gr, IconBookSparklesLight as xa, IconRewrite as Aa, IconProofread as Na, IconMagic as Oa, LOCAL_STORAGE_REASONING_DISCLOSURE as Pa, IconLightBulbLight as Ra, IconSendLight as Ma, INPUT_PLACEHOLDER_TEXT_IN_SESSION as _o, INPUT_PLACEHOLDER_TEXT_MORNING as za, 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 un, getHotkeyHandler as Ga, U as Ja, FOOTER_DISCLAIMERS as dn, isProbablyiPad as Wa, useResizeObserver as Io, useViewportSize as Ya, useVisualViewportSize as qa, INPUT_BOTTOM_OFFSET_IPHONE as Xa, INPUT_BOTTOM_OFFSET_IPAD as Qa, INPUT_BOTTOM_OFFSET as Eo, INPUT_BOTTOM_OFFSET_EXTRA as pr, APP_SET_FOOTER_HEIGHT as Ka, FOOTER_TOP as xr, FOOTER_BOTTOM as vt, APP_SET_FOOTER_POSITION as fr, getLayoutPaddingClass as Ar, 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 mr, 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 Mi, LOCAL_STORAGE_OLED_MODE as zi, 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.DvcgyAt7.js";
3
+ import ko, { useRef as J, useCallback as X, useSyncExternalStore as hr, useEffect as $, useState as Z, createContext as Jr, useContext as Q, useMemo as he, forwardRef as Qe, useId as Co, useLayoutEffect as or, cloneElement as ji, Suspense as Wt, lazy as Me, useReducer as Rt } from "react";
4
4
  import R, { clsx as Ze } 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 Mo, useInteractions as zo, 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";
5
+ import { computePosition as Fi, offset as xo, flip as Ao, shift as No, arrow as Bi, useMergeRefs as Wr, FloatingPortal as Nr, FloatingOverlay as Vi, FloatingFocusManager as Or, useFloating as Oo, useClick as Po, useDismiss as Ro, useRole as Mo, useInteractions as zo, 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.
@@ -64,7 +64,7 @@ Error message: ${Fo(t)}`,
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 De {
67
+ var Yo = "AI_TypeValidationError", qo = `vercel.ai.error.${Yo}`, nc = Symbol.for(qo), Xo, oc = class Pr extends De {
68
68
  constructor({ value: t, cause: r }) {
69
69
  super({
70
70
  name: Yo,
@@ -90,7 +90,7 @@ Error message: ${Fo(r)}`,
90
90
  value: t,
91
91
  cause: r
92
92
  }) {
93
- return Nr.isInstance(r) && r.value === t ? r : new Nr({ value: t, cause: r });
93
+ return Pr.isInstance(r) && r.value === t ? r : new Pr({ value: t, cause: r });
94
94
  }
95
95
  };
96
96
  Xo = nc;
@@ -100,14 +100,14 @@ class wn extends Error {
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
  }
102
102
  }
103
- function mr(e) {
103
+ function gr(e) {
104
104
  }
105
105
  function sc(e) {
106
106
  if (typeof e == "function")
107
107
  throw new TypeError(
108
108
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
109
109
  );
110
- const { onEvent: t = mr, onError: r = mr, onRetry: n = mr, onComment: o } = e;
110
+ const { onEvent: t = gr, onError: r = gr, onRetry: n = gr, onComment: o } = e;
111
111
  let s = "", i = !0, a, l = "", c = "";
112
112
  function d(m) {
113
113
  const v = i ? m.replace(/^\xEF\xBB\xBF/, "") : m, [b, w] = ac(`${s}${v}`);
@@ -261,7 +261,7 @@ function Ko(e) {
261
261
  function cc(e, t) {
262
262
  return typeof t == "bigint" ? t.toString() : t;
263
263
  }
264
- function Wr(e) {
264
+ function Yr(e) {
265
265
  return {
266
266
  get value() {
267
267
  {
@@ -271,10 +271,10 @@ function Wr(e) {
271
271
  }
272
272
  };
273
273
  }
274
- function Yr(e) {
274
+ function qr(e) {
275
275
  return e == null;
276
276
  }
277
- function qr(e) {
277
+ function Xr(e) {
278
278
  const t = e.startsWith("^") ? 1 : 0, r = e.endsWith("$") ? e.length - 1 : e.length;
279
279
  return e.slice(t, r);
280
280
  }
@@ -299,7 +299,7 @@ function L(e, t, r) {
299
299
  configurable: !0
300
300
  });
301
301
  }
302
- function or(e, t, r) {
302
+ function sr(e, t, r) {
303
303
  Object.defineProperty(e, t, {
304
304
  value: r,
305
305
  writable: !0,
@@ -315,7 +315,7 @@ const es = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
315
315
  function qt(e) {
316
316
  return typeof e == "object" && e !== null && !Array.isArray(e);
317
317
  }
318
- const uc = Wr(() => {
318
+ const uc = Yr(() => {
319
319
  if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
320
320
  return !1;
321
321
  try {
@@ -342,7 +342,7 @@ function Ke(e, t, r) {
342
342
  const n = new e._zod.constr(t ?? e._zod.def);
343
343
  return (!t || r?.parent) && (n._zod.parent = e), n;
344
344
  }
345
- function T(e) {
345
+ function S(e) {
346
346
  const t = e;
347
347
  if (!t)
348
348
  return {};
@@ -398,7 +398,7 @@ function gc(e, t) {
398
398
  ...e._zod.def,
399
399
  get shape() {
400
400
  const n = { ...e._zod.def.shape, ...t };
401
- return or(this, "shape", n), n;
401
+ return sr(this, "shape", n), n;
402
402
  },
403
403
  checks: []
404
404
  // delete existing checks
@@ -410,7 +410,7 @@ function vc(e, t) {
410
410
  ...e._zod.def,
411
411
  get shape() {
412
412
  const r = { ...e._zod.def.shape, ...t._zod.def.shape };
413
- return or(this, "shape", r), r;
413
+ return sr(this, "shape", r), r;
414
414
  },
415
415
  catchall: t._zod.def.catchall,
416
416
  checks: []
@@ -487,7 +487,7 @@ function Ue(e, t, r) {
487
487
  }
488
488
  return delete n.inst, delete n.continue, t?.reportInput || delete n.input, n;
489
489
  }
490
- function Xr(e) {
490
+ function Qr(e) {
491
491
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
492
492
  }
493
493
  function It(...e) {
@@ -716,7 +716,7 @@ const Jc = (e) => {
716
716
  var r;
717
717
  ce.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
718
718
  const o = n.value;
719
- return !Yr(o) && o.length !== void 0;
719
+ return !qr(o) && o.length !== void 0;
720
720
  }), e._zod.onattach.push((n) => {
721
721
  const o = n._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
722
722
  t.maximum < o && (n._zod.bag.maximum = t.maximum);
@@ -724,7 +724,7 @@ const Jc = (e) => {
724
724
  const o = n.value;
725
725
  if (o.length <= t.maximum)
726
726
  return;
727
- const i = Xr(o);
727
+ const i = Qr(o);
728
728
  n.issues.push({
729
729
  origin: i,
730
730
  code: "too_big",
@@ -739,7 +739,7 @@ const Jc = (e) => {
739
739
  var r;
740
740
  ce.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
741
741
  const o = n.value;
742
- return !Yr(o) && o.length !== void 0;
742
+ return !qr(o) && o.length !== void 0;
743
743
  }), e._zod.onattach.push((n) => {
744
744
  const o = n._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
745
745
  t.minimum > o && (n._zod.bag.minimum = t.minimum);
@@ -747,7 +747,7 @@ const Jc = (e) => {
747
747
  const o = n.value;
748
748
  if (o.length >= t.minimum)
749
749
  return;
750
- const i = Xr(o);
750
+ const i = Qr(o);
751
751
  n.issues.push({
752
752
  origin: i,
753
753
  code: "too_small",
@@ -762,7 +762,7 @@ const Jc = (e) => {
762
762
  var r;
763
763
  ce.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
764
764
  const o = n.value;
765
- return !Yr(o) && o.length !== void 0;
765
+ return !qr(o) && o.length !== void 0;
766
766
  }), e._zod.onattach.push((n) => {
767
767
  const o = n._zod.bag;
768
768
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
@@ -770,7 +770,7 @@ const Jc = (e) => {
770
770
  const o = n.value, s = o.length;
771
771
  if (s === t.length)
772
772
  return;
773
- const i = Xr(o), a = s > t.length;
773
+ const i = Qr(o), a = s > t.length;
774
774
  n.issues.push({
775
775
  origin: i,
776
776
  ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
@@ -781,7 +781,7 @@ const Jc = (e) => {
781
781
  continue: !t.abort
782
782
  });
783
783
  };
784
- }), sr = /* @__PURE__ */ _("$ZodCheckStringFormat", (e, t) => {
784
+ }), ar = /* @__PURE__ */ _("$ZodCheckStringFormat", (e, t) => {
785
785
  var r, n;
786
786
  ce.init(e, t), e._zod.onattach.push((o) => {
787
787
  const s = o._zod.bag;
@@ -799,7 +799,7 @@ const Jc = (e) => {
799
799
  }) : (n = e._zod).check ?? (n.check = () => {
800
800
  });
801
801
  }), sl = /* @__PURE__ */ _("$ZodCheckRegex", (e, t) => {
802
- sr.init(e, t), e._zod.check = (r) => {
802
+ ar.init(e, t), e._zod.check = (r) => {
803
803
  t.pattern.lastIndex = 0, !t.pattern.test(r.value) && r.issues.push({
804
804
  origin: "string",
805
805
  code: "invalid_format",
@@ -811,9 +811,9 @@ const Jc = (e) => {
811
811
  });
812
812
  };
813
813
  }), al = /* @__PURE__ */ _("$ZodCheckLowerCase", (e, t) => {
814
- t.pattern ?? (t.pattern = Qc), sr.init(e, t);
814
+ t.pattern ?? (t.pattern = Qc), ar.init(e, t);
815
815
  }), il = /* @__PURE__ */ _("$ZodCheckUpperCase", (e, t) => {
816
- t.pattern ?? (t.pattern = Kc), sr.init(e, t);
816
+ t.pattern ?? (t.pattern = Kc), ar.init(e, t);
817
817
  }), cl = /* @__PURE__ */ _("$ZodCheckIncludes", (e, t) => {
818
818
  ce.init(e, t);
819
819
  const r = xt(t.includes), n = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${r}` : r);
@@ -955,7 +955,7 @@ const fl = {
955
955
  vendor: "zod",
956
956
  version: 1
957
957
  };
958
- }), Qr = /* @__PURE__ */ _("$ZodString", (e, t) => {
958
+ }), Kr = /* @__PURE__ */ _("$ZodString", (e, t) => {
959
959
  F.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Jc(e._zod.bag), e._zod.parse = (r, n) => {
960
960
  if (t.coerce)
961
961
  try {
@@ -970,7 +970,7 @@ const fl = {
970
970
  }), r;
971
971
  };
972
972
  }), V = /* @__PURE__ */ _("$ZodStringFormat", (e, t) => {
973
- sr.init(e, t), Qr.init(e, t);
973
+ ar.init(e, t), Kr.init(e, t);
974
974
  }), ml = /* @__PURE__ */ _("$ZodGUID", (e, t) => {
975
975
  t.pattern ?? (t.pattern = Rc), V.init(e, t);
976
976
  }), hl = /* @__PURE__ */ _("$ZodUUID", (e, t) => {
@@ -1252,7 +1252,7 @@ function Tn(e, t, r, n) {
1252
1252
  }
1253
1253
  const Hl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
1254
1254
  F.init(e, t);
1255
- const r = Wr(() => {
1255
+ const r = Yr(() => {
1256
1256
  const u = Object.keys(t.shape);
1257
1257
  for (const g of u)
1258
1258
  if (!(t.shape[g] instanceof F))
@@ -1346,8 +1346,8 @@ const Hl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
1346
1346
  u.value = {};
1347
1347
  const I = d.shape;
1348
1348
  for (const h of d.keys) {
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 ? f.push(x.then((C) => E ? Tn(C, u, h, g) : zt(C, u, h))) : E ? Tn(x, u, h, g) : zt(x, u, h);
1349
+ const E = I[h], x = E._zod.run({ value: g[h], issues: [] }, y), T = E._zod.optin === "optional" && E._zod.optout === "optional";
1350
+ x instanceof Promise ? f.push(x.then((C) => T ? Tn(C, u, h, g) : zt(C, u, h))) : T ? Tn(x, u, h, g) : zt(x, u, h);
1351
1351
  }
1352
1352
  }
1353
1353
  if (!c)
@@ -1361,7 +1361,7 @@ const Hl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
1361
1361
  continue;
1362
1362
  }
1363
1363
  const h = b.run({ value: g[I], issues: [] }, y);
1364
- h instanceof Promise ? f.push(h.then((S) => zt(S, u, I))) : zt(h, u, I);
1364
+ h instanceof Promise ? f.push(h.then((E) => zt(E, u, I))) : zt(h, u, I);
1365
1365
  }
1366
1366
  return m.length && u.issues.push({
1367
1367
  code: "unrecognized_keys",
@@ -1389,7 +1389,7 @@ const ms = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
1389
1389
  }), L(e._zod, "pattern", () => {
1390
1390
  if (t.options.every((r) => r._zod.pattern)) {
1391
1391
  const r = t.options.map((n) => n._zod.pattern);
1392
- return new RegExp(`^(${r.map((n) => qr(n.source)).join("|")})$`);
1392
+ return new RegExp(`^(${r.map((n) => Xr(n.source)).join("|")})$`);
1393
1393
  }
1394
1394
  }), e._zod.parse = (r, n) => {
1395
1395
  let o = !1;
@@ -1426,7 +1426,7 @@ const ms = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
1426
1426
  }
1427
1427
  return o;
1428
1428
  });
1429
- const n = Wr(() => {
1429
+ const n = Yr(() => {
1430
1430
  const o = t.options, s = /* @__PURE__ */ new Map();
1431
1431
  for (const i of o) {
1432
1432
  const a = i._zod.propValues[t.discriminator];
@@ -1465,7 +1465,7 @@ const ms = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
1465
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
- function Or(e, t) {
1468
+ function Rr(e, t) {
1469
1469
  if (e === t)
1470
1470
  return { valid: !0, data: e };
1471
1471
  if (e instanceof Date && t instanceof Date && +e == +t)
@@ -1473,7 +1473,7 @@ function Or(e, t) {
1473
1473
  if (Xt(e) && Xt(t)) {
1474
1474
  const r = Object.keys(t), n = Object.keys(e).filter((s) => r.indexOf(s) !== -1), o = { ...e, ...t };
1475
1475
  for (const s of n) {
1476
- const i = Or(e[s], t[s]);
1476
+ const i = Rr(e[s], t[s]);
1477
1477
  if (!i.valid)
1478
1478
  return {
1479
1479
  valid: !1,
@@ -1488,7 +1488,7 @@ function Or(e, t) {
1488
1488
  return { valid: !1, mergeErrorPath: [] };
1489
1489
  const r = [];
1490
1490
  for (let n = 0; n < e.length; n++) {
1491
- const o = e[n], s = t[n], i = Or(o, s);
1491
+ const o = e[n], s = t[n], i = Rr(o, s);
1492
1492
  if (!i.valid)
1493
1493
  return {
1494
1494
  valid: !1,
@@ -1503,7 +1503,7 @@ function Or(e, t) {
1503
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
- const n = Or(t.value, r.value);
1506
+ const n = Rr(t.value, r.value);
1507
1507
  if (!n.valid)
1508
1508
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);
1509
1509
  return e.value = n.data, e;
@@ -1599,12 +1599,12 @@ const Wl = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
1599
1599
  }), Ql = /* @__PURE__ */ _("$ZodOptional", (e, t) => {
1600
1600
  F.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", L(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), L(e._zod, "pattern", () => {
1601
1601
  const r = t.innerType._zod.pattern;
1602
- return r ? new RegExp(`^(${qr(r.source)})?$`) : void 0;
1602
+ return r ? new RegExp(`^(${Xr(r.source)})?$`) : void 0;
1603
1603
  }), e._zod.parse = (r, n) => t.innerType._zod.optin === "optional" ? t.innerType._zod.run(r, n) : r.value === void 0 ? r : t.innerType._zod.run(r, n);
1604
1604
  }), Kl = /* @__PURE__ */ _("$ZodNullable", (e, t) => {
1605
1605
  F.init(e, t), L(e._zod, "optin", () => t.innerType._zod.optin), L(e._zod, "optout", () => t.innerType._zod.optout), L(e._zod, "pattern", () => {
1606
1606
  const r = t.innerType._zod.pattern;
1607
- return r ? new RegExp(`^(${qr(r.source)}|null)$`) : void 0;
1607
+ return r ? new RegExp(`^(${Xr(r.source)}|null)$`) : void 0;
1608
1608
  }), L(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (r, n) => r.value === null ? r : t.innerType._zod.run(r, n);
1609
1609
  }), eu = /* @__PURE__ */ _("$ZodDefault", (e, t) => {
1610
1610
  F.init(e, t), e._zod.optin = "optional", L(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
@@ -1735,7 +1735,7 @@ const pt = /* @__PURE__ */ cu();
1735
1735
  function lu(e, t) {
1736
1736
  return new e({
1737
1737
  type: "string",
1738
- ...T(t)
1738
+ ...S(t)
1739
1739
  });
1740
1740
  }
1741
1741
  function uu(e, t) {
@@ -1744,7 +1744,7 @@ function uu(e, t) {
1744
1744
  format: "email",
1745
1745
  check: "string_format",
1746
1746
  abort: !1,
1747
- ...T(t)
1747
+ ...S(t)
1748
1748
  });
1749
1749
  }
1750
1750
  function Pn(e, t) {
@@ -1753,7 +1753,7 @@ function Pn(e, t) {
1753
1753
  format: "guid",
1754
1754
  check: "string_format",
1755
1755
  abort: !1,
1756
- ...T(t)
1756
+ ...S(t)
1757
1757
  });
1758
1758
  }
1759
1759
  function du(e, t) {
@@ -1762,7 +1762,7 @@ function du(e, t) {
1762
1762
  format: "uuid",
1763
1763
  check: "string_format",
1764
1764
  abort: !1,
1765
- ...T(t)
1765
+ ...S(t)
1766
1766
  });
1767
1767
  }
1768
1768
  function pu(e, t) {
@@ -1772,7 +1772,7 @@ function pu(e, t) {
1772
1772
  check: "string_format",
1773
1773
  abort: !1,
1774
1774
  version: "v4",
1775
- ...T(t)
1775
+ ...S(t)
1776
1776
  });
1777
1777
  }
1778
1778
  function fu(e, t) {
@@ -1782,7 +1782,7 @@ function fu(e, t) {
1782
1782
  check: "string_format",
1783
1783
  abort: !1,
1784
1784
  version: "v6",
1785
- ...T(t)
1785
+ ...S(t)
1786
1786
  });
1787
1787
  }
1788
1788
  function mu(e, t) {
@@ -1792,7 +1792,7 @@ function mu(e, t) {
1792
1792
  check: "string_format",
1793
1793
  abort: !1,
1794
1794
  version: "v7",
1795
- ...T(t)
1795
+ ...S(t)
1796
1796
  });
1797
1797
  }
1798
1798
  function hu(e, t) {
@@ -1801,7 +1801,7 @@ function hu(e, t) {
1801
1801
  format: "url",
1802
1802
  check: "string_format",
1803
1803
  abort: !1,
1804
- ...T(t)
1804
+ ...S(t)
1805
1805
  });
1806
1806
  }
1807
1807
  function gu(e, t) {
@@ -1810,7 +1810,7 @@ function gu(e, t) {
1810
1810
  format: "emoji",
1811
1811
  check: "string_format",
1812
1812
  abort: !1,
1813
- ...T(t)
1813
+ ...S(t)
1814
1814
  });
1815
1815
  }
1816
1816
  function vu(e, t) {
@@ -1819,7 +1819,7 @@ function vu(e, t) {
1819
1819
  format: "nanoid",
1820
1820
  check: "string_format",
1821
1821
  abort: !1,
1822
- ...T(t)
1822
+ ...S(t)
1823
1823
  });
1824
1824
  }
1825
1825
  function yu(e, t) {
@@ -1828,7 +1828,7 @@ function yu(e, t) {
1828
1828
  format: "cuid",
1829
1829
  check: "string_format",
1830
1830
  abort: !1,
1831
- ...T(t)
1831
+ ...S(t)
1832
1832
  });
1833
1833
  }
1834
1834
  function _u(e, t) {
@@ -1837,7 +1837,7 @@ function _u(e, t) {
1837
1837
  format: "cuid2",
1838
1838
  check: "string_format",
1839
1839
  abort: !1,
1840
- ...T(t)
1840
+ ...S(t)
1841
1841
  });
1842
1842
  }
1843
1843
  function bu(e, t) {
@@ -1846,7 +1846,7 @@ function bu(e, t) {
1846
1846
  format: "ulid",
1847
1847
  check: "string_format",
1848
1848
  abort: !1,
1849
- ...T(t)
1849
+ ...S(t)
1850
1850
  });
1851
1851
  }
1852
1852
  function wu(e, t) {
@@ -1855,7 +1855,7 @@ function wu(e, t) {
1855
1855
  format: "xid",
1856
1856
  check: "string_format",
1857
1857
  abort: !1,
1858
- ...T(t)
1858
+ ...S(t)
1859
1859
  });
1860
1860
  }
1861
1861
  function Iu(e, t) {
@@ -1864,7 +1864,7 @@ function Iu(e, t) {
1864
1864
  format: "ksuid",
1865
1865
  check: "string_format",
1866
1866
  abort: !1,
1867
- ...T(t)
1867
+ ...S(t)
1868
1868
  });
1869
1869
  }
1870
1870
  function Eu(e, t) {
@@ -1873,7 +1873,7 @@ function Eu(e, t) {
1873
1873
  format: "ipv4",
1874
1874
  check: "string_format",
1875
1875
  abort: !1,
1876
- ...T(t)
1876
+ ...S(t)
1877
1877
  });
1878
1878
  }
1879
1879
  function Tu(e, t) {
@@ -1882,7 +1882,7 @@ function Tu(e, t) {
1882
1882
  format: "ipv6",
1883
1883
  check: "string_format",
1884
1884
  abort: !1,
1885
- ...T(t)
1885
+ ...S(t)
1886
1886
  });
1887
1887
  }
1888
1888
  function Su(e, t) {
@@ -1891,7 +1891,7 @@ function Su(e, t) {
1891
1891
  format: "cidrv4",
1892
1892
  check: "string_format",
1893
1893
  abort: !1,
1894
- ...T(t)
1894
+ ...S(t)
1895
1895
  });
1896
1896
  }
1897
1897
  function ku(e, t) {
@@ -1900,7 +1900,7 @@ function ku(e, t) {
1900
1900
  format: "cidrv6",
1901
1901
  check: "string_format",
1902
1902
  abort: !1,
1903
- ...T(t)
1903
+ ...S(t)
1904
1904
  });
1905
1905
  }
1906
1906
  function Cu(e, t) {
@@ -1909,7 +1909,7 @@ function Cu(e, t) {
1909
1909
  format: "base64",
1910
1910
  check: "string_format",
1911
1911
  abort: !1,
1912
- ...T(t)
1912
+ ...S(t)
1913
1913
  });
1914
1914
  }
1915
1915
  function xu(e, t) {
@@ -1918,7 +1918,7 @@ function xu(e, t) {
1918
1918
  format: "base64url",
1919
1919
  check: "string_format",
1920
1920
  abort: !1,
1921
- ...T(t)
1921
+ ...S(t)
1922
1922
  });
1923
1923
  }
1924
1924
  function Au(e, t) {
@@ -1927,7 +1927,7 @@ function Au(e, t) {
1927
1927
  format: "e164",
1928
1928
  check: "string_format",
1929
1929
  abort: !1,
1930
- ...T(t)
1930
+ ...S(t)
1931
1931
  });
1932
1932
  }
1933
1933
  function Nu(e, t) {
@@ -1936,7 +1936,7 @@ function Nu(e, t) {
1936
1936
  format: "jwt",
1937
1937
  check: "string_format",
1938
1938
  abort: !1,
1939
- ...T(t)
1939
+ ...S(t)
1940
1940
  });
1941
1941
  }
1942
1942
  function Ou(e, t) {
@@ -1947,7 +1947,7 @@ function Ou(e, t) {
1947
1947
  offset: !1,
1948
1948
  local: !1,
1949
1949
  precision: null,
1950
- ...T(t)
1950
+ ...S(t)
1951
1951
  });
1952
1952
  }
1953
1953
  function Pu(e, t) {
@@ -1955,7 +1955,7 @@ function Pu(e, t) {
1955
1955
  type: "string",
1956
1956
  format: "date",
1957
1957
  check: "string_format",
1958
- ...T(t)
1958
+ ...S(t)
1959
1959
  });
1960
1960
  }
1961
1961
  function Ru(e, t) {
@@ -1964,7 +1964,7 @@ function Ru(e, t) {
1964
1964
  format: "time",
1965
1965
  check: "string_format",
1966
1966
  precision: null,
1967
- ...T(t)
1967
+ ...S(t)
1968
1968
  });
1969
1969
  }
1970
1970
  function Mu(e, t) {
@@ -1972,14 +1972,14 @@ function Mu(e, t) {
1972
1972
  type: "string",
1973
1973
  format: "duration",
1974
1974
  check: "string_format",
1975
- ...T(t)
1975
+ ...S(t)
1976
1976
  });
1977
1977
  }
1978
1978
  function zu(e, t) {
1979
1979
  return new e({
1980
1980
  type: "number",
1981
1981
  checks: [],
1982
- ...T(t)
1982
+ ...S(t)
1983
1983
  });
1984
1984
  }
1985
1985
  function $u(e, t) {
@@ -1988,19 +1988,19 @@ function $u(e, t) {
1988
1988
  check: "number_format",
1989
1989
  abort: !1,
1990
1990
  format: "safeint",
1991
- ...T(t)
1991
+ ...S(t)
1992
1992
  });
1993
1993
  }
1994
1994
  function Zu(e, t) {
1995
1995
  return new e({
1996
1996
  type: "boolean",
1997
- ...T(t)
1997
+ ...S(t)
1998
1998
  });
1999
1999
  }
2000
2000
  function Du(e, t) {
2001
2001
  return new e({
2002
2002
  type: "null",
2003
- ...T(t)
2003
+ ...S(t)
2004
2004
  });
2005
2005
  }
2006
2006
  function Lu(e) {
@@ -2011,21 +2011,21 @@ function Lu(e) {
2011
2011
  function Uu(e, t) {
2012
2012
  return new e({
2013
2013
  type: "never",
2014
- ...T(t)
2014
+ ...S(t)
2015
2015
  });
2016
2016
  }
2017
2017
  function Rn(e, t) {
2018
2018
  return new us({
2019
2019
  check: "less_than",
2020
- ...T(t),
2020
+ ...S(t),
2021
2021
  value: e,
2022
2022
  inclusive: !1
2023
2023
  });
2024
2024
  }
2025
- function hr(e, t) {
2025
+ function vr(e, t) {
2026
2026
  return new us({
2027
2027
  check: "less_than",
2028
- ...T(t),
2028
+ ...S(t),
2029
2029
  value: e,
2030
2030
  inclusive: !0
2031
2031
  });
@@ -2033,15 +2033,15 @@ function hr(e, t) {
2033
2033
  function Mn(e, t) {
2034
2034
  return new ds({
2035
2035
  check: "greater_than",
2036
- ...T(t),
2036
+ ...S(t),
2037
2037
  value: e,
2038
2038
  inclusive: !1
2039
2039
  });
2040
2040
  }
2041
- function gr(e, t) {
2041
+ function yr(e, t) {
2042
2042
  return new ds({
2043
2043
  check: "greater_than",
2044
- ...T(t),
2044
+ ...S(t),
2045
2045
  value: e,
2046
2046
  inclusive: !0
2047
2047
  });
@@ -2049,28 +2049,28 @@ function gr(e, t) {
2049
2049
  function zn(e, t) {
2050
2050
  return new el({
2051
2051
  check: "multiple_of",
2052
- ...T(t),
2052
+ ...S(t),
2053
2053
  value: e
2054
2054
  });
2055
2055
  }
2056
2056
  function gs(e, t) {
2057
2057
  return new rl({
2058
2058
  check: "max_length",
2059
- ...T(t),
2059
+ ...S(t),
2060
2060
  maximum: e
2061
2061
  });
2062
2062
  }
2063
2063
  function Qt(e, t) {
2064
2064
  return new nl({
2065
2065
  check: "min_length",
2066
- ...T(t),
2066
+ ...S(t),
2067
2067
  minimum: e
2068
2068
  });
2069
2069
  }
2070
2070
  function vs(e, t) {
2071
2071
  return new ol({
2072
2072
  check: "length_equals",
2073
- ...T(t),
2073
+ ...S(t),
2074
2074
  length: e
2075
2075
  });
2076
2076
  }
@@ -2078,7 +2078,7 @@ function ju(e, t) {
2078
2078
  return new sl({
2079
2079
  check: "string_format",
2080
2080
  format: "regex",
2081
- ...T(t),
2081
+ ...S(t),
2082
2082
  pattern: e
2083
2083
  });
2084
2084
  }
@@ -2086,21 +2086,21 @@ function Fu(e) {
2086
2086
  return new al({
2087
2087
  check: "string_format",
2088
2088
  format: "lowercase",
2089
- ...T(e)
2089
+ ...S(e)
2090
2090
  });
2091
2091
  }
2092
2092
  function Bu(e) {
2093
2093
  return new il({
2094
2094
  check: "string_format",
2095
2095
  format: "uppercase",
2096
- ...T(e)
2096
+ ...S(e)
2097
2097
  });
2098
2098
  }
2099
2099
  function Vu(e, t) {
2100
2100
  return new cl({
2101
2101
  check: "string_format",
2102
2102
  format: "includes",
2103
- ...T(t),
2103
+ ...S(t),
2104
2104
  includes: e
2105
2105
  });
2106
2106
  }
@@ -2108,7 +2108,7 @@ function Hu(e, t) {
2108
2108
  return new ll({
2109
2109
  check: "string_format",
2110
2110
  format: "starts_with",
2111
- ...T(t),
2111
+ ...S(t),
2112
2112
  prefix: e
2113
2113
  });
2114
2114
  }
@@ -2116,7 +2116,7 @@ function Gu(e, t) {
2116
2116
  return new ul({
2117
2117
  check: "string_format",
2118
2118
  format: "ends_with",
2119
- ...T(t),
2119
+ ...S(t),
2120
2120
  suffix: e
2121
2121
  });
2122
2122
  }
@@ -2145,11 +2145,11 @@ function Xu(e, t, r) {
2145
2145
  // get element() {
2146
2146
  // return element;
2147
2147
  // },
2148
- ...T(r)
2148
+ ...S(r)
2149
2149
  });
2150
2150
  }
2151
2151
  function Qu(e, t, r) {
2152
- const n = T(r);
2152
+ const n = S(r);
2153
2153
  return n.abort ?? (n.abort = !0), new e({
2154
2154
  type: "custom",
2155
2155
  check: "custom",
@@ -2162,7 +2162,7 @@ function Ku(e, t, r) {
2162
2162
  type: "custom",
2163
2163
  check: "custom",
2164
2164
  fn: t,
2165
- ...T(r)
2165
+ ...S(r)
2166
2166
  });
2167
2167
  }
2168
2168
  class $n {
@@ -2205,9 +2205,9 @@ class $n {
2205
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
2207
  h.length === 1 ? f.pattern = h[0].source : h.length > 1 && (a.schema.allOf = [
2208
- ...h.map((S) => ({
2208
+ ...h.map((E) => ({
2209
2209
  ...this.target === "draft-7" ? { type: "string" } : {},
2210
- pattern: S.source
2210
+ pattern: E.source
2211
2211
  }))
2212
2212
  ]);
2213
2213
  }
@@ -2724,9 +2724,9 @@ const ld = (e, t) => {
2724
2724
  // enumerable: false,
2725
2725
  }
2726
2726
  });
2727
- }, ar = _("ZodError", ld, {
2727
+ }, ir = _("ZodError", ld, {
2728
2728
  Parent: Error
2729
- }), ud = /* @__PURE__ */ Ic(ar), dd = /* @__PURE__ */ Ec(ar), pd = /* @__PURE__ */ os(ar), ys = /* @__PURE__ */ ss(ar), H = /* @__PURE__ */ _("ZodType", (e, t) => (F.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(
2729
+ }), ud = /* @__PURE__ */ Ic(ir), dd = /* @__PURE__ */ Ec(ir), pd = /* @__PURE__ */ os(ir), ys = /* @__PURE__ */ ss(ir), H = /* @__PURE__ */ _("ZodType", (e, t) => (F.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(
2730
2730
  {
2731
2731
  ...t,
2732
2732
  checks: [
@@ -2749,11 +2749,11 @@ const ld = (e, t) => {
2749
2749
  const n = e.clone();
2750
2750
  return pt.add(n, r[0]), n;
2751
2751
  }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), _s = /* @__PURE__ */ _("_ZodString", (e, t) => {
2752
- Qr.init(e, t), H.init(e, t);
2752
+ Kr.init(e, t), H.init(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(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));
2756
+ Kr.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 k(e) {
2759
2759
  return lu(fd, e);
@@ -2799,7 +2799,7 @@ const W = /* @__PURE__ */ _("ZodStringFormat", (e, t) => {
2799
2799
  }), Nd = /* @__PURE__ */ _("ZodJWT", (e, t) => {
2800
2800
  Dl.init(e, t), W.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(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(Mn(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(zn(n, o)), e.step = (n, o) => e.check(zn(n, o)), e.finite = () => e;
2802
+ fs.init(e, t), H.init(e, t), e.gt = (n, o) => e.check(Mn(n, o)), e.gte = (n, o) => e.check(yr(n, o)), e.min = (n, o) => e.check(yr(n, o)), e.lt = (n, o) => e.check(Rn(n, o)), e.lte = (n, o) => e.check(vr(n, o)), e.max = (n, o) => e.check(vr(n, o)), e.int = (n) => e.check(Dn(n)), e.safe = (n) => e.check(Dn(n)), e.positive = (n) => e.check(Mn(0, n)), e.nonnegative = (n) => e.check(yr(0, n)), e.negative = (n) => e.check(Rn(0, n)), e.nonpositive = (n) => e.check(vr(0, n)), e.multipleOf = (n, o) => e.check(zn(n, o)), e.step = (n, o) => e.check(zn(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
  });
@@ -2849,9 +2849,9 @@ function oe(e, t) {
2849
2849
  const r = {
2850
2850
  type: "object",
2851
2851
  get shape() {
2852
- return or(this, "shape", { ...e }), this.shape;
2852
+ return sr(this, "shape", { ...e }), this.shape;
2853
2853
  },
2854
- ...T(t)
2854
+ ...S(t)
2855
2855
  };
2856
2856
  return new Is(r);
2857
2857
  }
@@ -2859,10 +2859,10 @@ function G(e, t) {
2859
2859
  return new Is({
2860
2860
  type: "object",
2861
2861
  get shape() {
2862
- return or(this, "shape", { ...e }), this.shape;
2862
+ return sr(this, "shape", { ...e }), this.shape;
2863
2863
  },
2864
2864
  catchall: ws(),
2865
- ...T(t)
2865
+ ...S(t)
2866
2866
  });
2867
2867
  }
2868
2868
  const Es = /* @__PURE__ */ _("ZodUnion", (e, t) => {
@@ -2872,7 +2872,7 @@ function ge(e, t) {
2872
2872
  return new Es({
2873
2873
  type: "union",
2874
2874
  options: e,
2875
- ...T(t)
2875
+ ...S(t)
2876
2876
  });
2877
2877
  }
2878
2878
  const Ld = /* @__PURE__ */ _("ZodDiscriminatedUnion", (e, t) => {
@@ -2883,7 +2883,7 @@ function Ud(e, t, r) {
2883
2883
  type: "union",
2884
2884
  options: t,
2885
2885
  discriminator: e,
2886
- ...T(r)
2886
+ ...S(r)
2887
2887
  });
2888
2888
  }
2889
2889
  const jd = /* @__PURE__ */ _("ZodIntersection", (e, t) => {
@@ -2899,15 +2899,15 @@ function Fd(e, t) {
2899
2899
  const Bd = /* @__PURE__ */ _("ZodRecord", (e, t) => {
2900
2900
  Wl.init(e, t), H.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
2901
2901
  });
2902
- function Pr(e, t, r) {
2902
+ function Mr(e, t, r) {
2903
2903
  return new Bd({
2904
2904
  type: "record",
2905
2905
  keyType: e,
2906
2906
  valueType: t,
2907
- ...T(r)
2907
+ ...S(r)
2908
2908
  });
2909
2909
  }
2910
- const Rr = /* @__PURE__ */ _("ZodEnum", (e, t) => {
2910
+ const zr = /* @__PURE__ */ _("ZodEnum", (e, t) => {
2911
2911
  Yl.init(e, t), H.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
2912
2912
  const r = new Set(Object.keys(t.entries));
2913
2913
  e.extract = (n, o) => {
@@ -2917,10 +2917,10 @@ const Rr = /* @__PURE__ */ _("ZodEnum", (e, t) => {
2917
2917
  s[i] = t.entries[i];
2918
2918
  else
2919
2919
  throw new Error(`Key ${i} not found in enum`);
2920
- return new Rr({
2920
+ return new zr({
2921
2921
  ...t,
2922
2922
  checks: [],
2923
- ...T(o),
2923
+ ...S(o),
2924
2924
  entries: s
2925
2925
  });
2926
2926
  }, e.exclude = (n, o) => {
@@ -2930,20 +2930,20 @@ const Rr = /* @__PURE__ */ _("ZodEnum", (e, t) => {
2930
2930
  delete s[i];
2931
2931
  else
2932
2932
  throw new Error(`Key ${i} not found in enum`);
2933
- return new Rr({
2933
+ return new zr({
2934
2934
  ...t,
2935
2935
  checks: [],
2936
- ...T(o),
2936
+ ...S(o),
2937
2937
  entries: s
2938
2938
  });
2939
2939
  };
2940
2940
  });
2941
2941
  function Ts(e, t) {
2942
2942
  const r = Array.isArray(e) ? Object.fromEntries(e.map((n) => [n, n])) : e;
2943
- return new Rr({
2943
+ return new zr({
2944
2944
  type: "enum",
2945
2945
  entries: r,
2946
- ...T(t)
2946
+ ...S(t)
2947
2947
  });
2948
2948
  }
2949
2949
  const Vd = /* @__PURE__ */ _("ZodLiteral", (e, t) => {
@@ -2959,7 +2959,7 @@ function P(e, t) {
2959
2959
  return new Vd({
2960
2960
  type: "literal",
2961
2961
  values: Array.isArray(e) ? e : [e],
2962
- ...T(t)
2962
+ ...S(t)
2963
2963
  });
2964
2964
  }
2965
2965
  const Hd = /* @__PURE__ */ _("ZodTransform", (e, t) => {
@@ -3031,7 +3031,7 @@ function Qd(e, t) {
3031
3031
  return new ks({
3032
3032
  type: "nonoptional",
3033
3033
  innerType: e,
3034
- ...T(t)
3034
+ ...S(t)
3035
3035
  });
3036
3036
  }
3037
3037
  const Kd = /* @__PURE__ */ _("ZodCatch", (e, t) => {
@@ -3073,7 +3073,7 @@ function sp(e) {
3073
3073
  getter: e
3074
3074
  });
3075
3075
  }
3076
- const Kr = /* @__PURE__ */ _("ZodCustom", (e, t) => {
3076
+ const en = /* @__PURE__ */ _("ZodCustom", (e, t) => {
3077
3077
  iu.init(e, t), H.init(e, t);
3078
3078
  });
3079
3079
  function ap(e) {
@@ -3084,10 +3084,10 @@ function ap(e) {
3084
3084
  return t._zod.check = e, t;
3085
3085
  }
3086
3086
  function Cs(e, t) {
3087
- return Qu(Kr, e ?? (() => !0), t);
3087
+ return Qu(en, e ?? (() => !0), t);
3088
3088
  }
3089
3089
  function ip(e, t = {}) {
3090
- return Ku(Kr, e, t);
3090
+ return Ku(en, e, t);
3091
3091
  }
3092
3092
  function cp(e) {
3093
3093
  const t = ap((r) => (r.addIssue = (n) => {
@@ -3103,12 +3103,12 @@ function cp(e) {
3103
3103
  function Kt(e, t = {
3104
3104
  error: `Input not instance of ${e.name}`
3105
3105
  }) {
3106
- const r = new Kr({
3106
+ const r = new en({
3107
3107
  type: "custom",
3108
3108
  check: "custom",
3109
3109
  fn: (n) => n instanceof e,
3110
3110
  abort: !0,
3111
- ...T(t)
3111
+ ...S(t)
3112
3112
  });
3113
3113
  return r._zod.bag.Class = e, r;
3114
3114
  }
@@ -3229,12 +3229,12 @@ async function Hn({
3229
3229
  value: e,
3230
3230
  schema: t
3231
3231
  }) {
3232
- const r = await en({ value: e, schema: t });
3232
+ const r = await tn({ value: e, schema: t });
3233
3233
  if (!r.success)
3234
3234
  throw Yt.wrap({ value: e, cause: r.error });
3235
3235
  return r.value;
3236
3236
  }
3237
- async function en({
3237
+ async function tn({
3238
3238
  value: e,
3239
3239
  schema: t
3240
3240
  }) {
@@ -3262,7 +3262,7 @@ async function tr({
3262
3262
  }) {
3263
3263
  try {
3264
3264
  const r = fp(e);
3265
- return t == null ? { success: !0, value: r, rawValue: r } : await en({ value: r, schema: t });
3265
+ return t == null ? { success: !0, value: r, rawValue: r } : await tn({ value: r, schema: t });
3266
3266
  } catch (r) {
3267
3267
  return {
3268
3268
  success: !1,
@@ -3447,7 +3447,7 @@ function Rp(e) {
3447
3447
  const: e.value
3448
3448
  };
3449
3449
  }
3450
- var vr = void 0, _e = {
3450
+ var _r = void 0, _e = {
3451
3451
  /**
3452
3452
  * `c` was changed to `[cC]` to replicate /i flag
3453
3453
  */
@@ -3469,10 +3469,10 @@ var vr = void 0, _e = {
3469
3469
  * Fix in Zod:
3470
3470
  * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
3471
3471
  */
3472
- emoji: () => (vr === void 0 && (vr = RegExp(
3472
+ emoji: () => (_r === void 0 && (_r = RegExp(
3473
3473
  "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
3474
3474
  "u"
3475
- )), vr),
3475
+ )), _r),
3476
3476
  /**
3477
3477
  * Unused
3478
3478
  */
@@ -3536,7 +3536,7 @@ function Ns(e, t) {
3536
3536
  case "startsWith":
3537
3537
  ae(
3538
3538
  r,
3539
- RegExp(`^${yr(n.value, t)}`),
3539
+ RegExp(`^${br(n.value, t)}`),
3540
3540
  n.message,
3541
3541
  t
3542
3542
  );
@@ -3544,7 +3544,7 @@ function Ns(e, t) {
3544
3544
  case "endsWith":
3545
3545
  ae(
3546
3546
  r,
3547
- RegExp(`${yr(n.value, t)}$`),
3547
+ RegExp(`${br(n.value, t)}$`),
3548
3548
  n.message,
3549
3549
  t
3550
3550
  );
@@ -3567,7 +3567,7 @@ function Ns(e, t) {
3567
3567
  case "includes": {
3568
3568
  ae(
3569
3569
  r,
3570
- RegExp(yr(n.value, t)),
3570
+ RegExp(br(n.value, t)),
3571
3571
  n.message,
3572
3572
  t
3573
3573
  );
@@ -3616,7 +3616,7 @@ function Ns(e, t) {
3616
3616
  }
3617
3617
  return r;
3618
3618
  }
3619
- function yr(e, t) {
3619
+ function br(e, t) {
3620
3620
  return t.patternStrategy === "escape" ? zp(e) : e;
3621
3621
  }
3622
3622
  var Mp = new Set(
@@ -3770,7 +3770,7 @@ function Lp() {
3770
3770
  type: "null"
3771
3771
  };
3772
3772
  }
3773
- var Mr = {
3773
+ var $r = {
3774
3774
  ZodString: "string",
3775
3775
  ZodNumber: "number",
3776
3776
  ZodBigInt: "integer",
@@ -3780,10 +3780,10 @@ var Mr = {
3780
3780
  function Up(e, t) {
3781
3781
  const r = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
3782
3782
  if (r.every(
3783
- (n) => n._def.typeName in Mr && (!n._def.checks || !n._def.checks.length)
3783
+ (n) => n._def.typeName in $r && (!n._def.checks || !n._def.checks.length)
3784
3784
  )) {
3785
3785
  const n = r.reduce((o, s) => {
3786
- const i = Mr[s._def.typeName];
3786
+ const i = $r[s._def.typeName];
3787
3787
  return i && !o.includes(i) ? [...o, i] : o;
3788
3788
  }, []);
3789
3789
  return {
@@ -3851,7 +3851,7 @@ function Fp(e, t) {
3851
3851
  ) && (!e.innerType._def.checks || !e.innerType._def.checks.length))
3852
3852
  return {
3853
3853
  type: [
3854
- Mr[e.innerType._def.typeName],
3854
+ $r[e.innerType._def.typeName],
3855
3855
  "null"
3856
3856
  ]
3857
3857
  };
@@ -4187,7 +4187,7 @@ var rf = (e, t) => {
4187
4187
  function cf(e, t) {
4188
4188
  var r;
4189
4189
  const n = (r = void 0) != null ? r : !1;
4190
- return tn(
4190
+ return rn(
4191
4191
  // defer json schema creation to avoid unnecessary computation when only validation is needed
4192
4192
  () => af(e, {
4193
4193
  $refStrategy: n ? "root" : "none"
@@ -4203,7 +4203,7 @@ function cf(e, t) {
4203
4203
  function lf(e, t) {
4204
4204
  var r;
4205
4205
  const n = (r = void 0) != null ? r : !1;
4206
- return tn(
4206
+ return rn(
4207
4207
  // defer json schema creation to avoid unnecessary computation when only validation is needed
4208
4208
  () => ed(e, {
4209
4209
  target: "draft-7",
@@ -4224,12 +4224,12 @@ function uf(e) {
4224
4224
  function Ps(e, t) {
4225
4225
  return uf(e) ? lf(e) : cf(e);
4226
4226
  }
4227
- var zr = Symbol.for("vercel.ai.schema");
4228
- function tn(e, {
4227
+ var Zr = Symbol.for("vercel.ai.schema");
4228
+ function rn(e, {
4229
4229
  validate: t
4230
4230
  } = {}) {
4231
4231
  return {
4232
- [zr]: !0,
4232
+ [Zr]: !0,
4233
4233
  _type: void 0,
4234
4234
  // should never be used directly
4235
4235
  [er]: !0,
@@ -4240,10 +4240,10 @@ function tn(e, {
4240
4240
  };
4241
4241
  }
4242
4242
  function df(e) {
4243
- return typeof e == "object" && e !== null && zr in e && e[zr] === !0 && "jsonSchema" in e && "validate" in e;
4243
+ return typeof e == "object" && e !== null && Zr in e && e[Zr] === !0 && "jsonSchema" in e && "validate" in e;
4244
4244
  }
4245
4245
  function pf(e) {
4246
- return e == null ? tn({
4246
+ return e == null ? rn({
4247
4247
  properties: {},
4248
4248
  additionalProperties: !1
4249
4249
  }) : df(e) ? e : typeof e == "function" ? e() : Ps(e);
@@ -4288,12 +4288,12 @@ var Yn = "5.0.104", $s = ge([
4288
4288
  k(),
4289
4289
  Od(),
4290
4290
  ie(),
4291
- Pr(k(), Et),
4291
+ Mr(k(), Et),
4292
4292
  ct(Et)
4293
4293
  ])
4294
- ), q = Pr(
4294
+ ), q = Mr(
4295
4295
  k(),
4296
- Pr(k(), Et)
4296
+ Mr(k(), Et)
4297
4297
  ), Zs = oe({
4298
4298
  type: P("text"),
4299
4299
  text: k(),
@@ -4873,7 +4873,7 @@ function Nf({
4873
4873
  var u, y, g, f;
4874
4874
  function m(h) {
4875
4875
  const x = c.message.parts.filter(Ft).find(
4876
- (E) => E.toolCallId === h
4876
+ (T) => T.toolCallId === h
4877
4877
  );
4878
4878
  if (x == null)
4879
4879
  throw new Error(
@@ -4883,9 +4883,9 @@ function Nf({
4883
4883
  }
4884
4884
  function v(h) {
4885
4885
  const x = c.message.parts.filter(
4886
- (E) => E.type === "dynamic-tool"
4886
+ (T) => T.type === "dynamic-tool"
4887
4887
  ).find(
4888
- (E) => E.toolCallId === h
4888
+ (T) => T.toolCallId === h
4889
4889
  );
4890
4890
  if (x == null)
4891
4891
  throw new Error(
@@ -4894,29 +4894,29 @@ function Nf({
4894
4894
  return x;
4895
4895
  }
4896
4896
  function b(h) {
4897
- var S;
4897
+ var E;
4898
4898
  const x = c.message.parts.find(
4899
4899
  (M) => Ft(M) && M.toolCallId === h.toolCallId
4900
- ), E = h, C = x;
4901
- x != null ? (x.state = h.state, C.input = E.input, C.output = E.output, C.errorText = E.errorText, C.rawInput = E.rawInput, C.preliminary = E.preliminary, C.providerExecuted = (S = E.providerExecuted) != null ? S : x.providerExecuted, E.providerMetadata != null && x.state === "input-available" && (x.callProviderMetadata = E.providerMetadata)) : c.message.parts.push({
4900
+ ), T = h, C = x;
4901
+ x != null ? (x.state = h.state, C.input = T.input, C.output = T.output, C.errorText = T.errorText, C.rawInput = T.rawInput, C.preliminary = T.preliminary, C.providerExecuted = (E = T.providerExecuted) != null ? E : x.providerExecuted, T.providerMetadata != null && x.state === "input-available" && (x.callProviderMetadata = T.providerMetadata)) : c.message.parts.push({
4902
4902
  type: `tool-${h.toolName}`,
4903
4903
  toolCallId: h.toolCallId,
4904
4904
  state: h.state,
4905
- input: E.input,
4906
- output: E.output,
4907
- rawInput: E.rawInput,
4908
- errorText: E.errorText,
4909
- providerExecuted: E.providerExecuted,
4910
- preliminary: E.preliminary,
4911
- ...E.providerMetadata != null ? { callProviderMetadata: E.providerMetadata } : {}
4905
+ input: T.input,
4906
+ output: T.output,
4907
+ rawInput: T.rawInput,
4908
+ errorText: T.errorText,
4909
+ providerExecuted: T.providerExecuted,
4910
+ preliminary: T.preliminary,
4911
+ ...T.providerMetadata != null ? { callProviderMetadata: T.providerMetadata } : {}
4912
4912
  });
4913
4913
  }
4914
4914
  function w(h) {
4915
- var S, x;
4916
- const E = c.message.parts.find(
4915
+ var E, x;
4916
+ const T = c.message.parts.find(
4917
4917
  (D) => D.type === "dynamic-tool" && D.toolCallId === h.toolCallId
4918
- ), C = h, M = E;
4919
- E != null ? (E.state = h.state, M.toolName = h.toolName, M.input = C.input, M.output = C.output, M.errorText = C.errorText, M.rawInput = (S = C.rawInput) != null ? S : M.rawInput, M.preliminary = C.preliminary, M.providerExecuted = (x = C.providerExecuted) != null ? x : E.providerExecuted, C.providerMetadata != null && E.state === "input-available" && (E.callProviderMetadata = C.providerMetadata)) : c.message.parts.push({
4918
+ ), C = h, M = T;
4919
+ T != null ? (T.state = h.state, M.toolName = h.toolName, M.input = C.input, M.output = C.output, M.errorText = C.errorText, M.rawInput = (E = C.rawInput) != null ? E : M.rawInput, M.preliminary = C.preliminary, M.providerExecuted = (x = C.providerExecuted) != null ? x : T.providerExecuted, C.providerMetadata != null && T.state === "input-available" && (T.callProviderMetadata = C.providerMetadata)) : c.message.parts.push({
4920
4920
  type: "dynamic-tool",
4921
4921
  toolName: h.toolName,
4922
4922
  toolCallId: h.toolCallId,
@@ -4931,11 +4931,11 @@ function Nf({
4931
4931
  }
4932
4932
  async function I(h) {
4933
4933
  if (h != null) {
4934
- const S = c.message.metadata != null ? Us(c.message.metadata, h) : h;
4934
+ const E = c.message.metadata != null ? Us(c.message.metadata, h) : h;
4935
4935
  t != null && await Hn({
4936
- value: S,
4936
+ value: E,
4937
4937
  schema: t
4938
- }), c.message.metadata = S;
4938
+ }), c.message.metadata = E;
4939
4939
  }
4940
4940
  }
4941
4941
  switch (a.type) {
@@ -5033,19 +5033,19 @@ function Nf({
5033
5033
  case "tool-input-delta": {
5034
5034
  const h = c.partialToolCalls[a.toolCallId];
5035
5035
  h.text += a.inputTextDelta;
5036
- const { value: S } = await js(
5036
+ const { value: E } = await js(
5037
5037
  h.text
5038
5038
  );
5039
5039
  h.dynamic ? w({
5040
5040
  toolCallId: a.toolCallId,
5041
5041
  toolName: h.toolName,
5042
5042
  state: "input-streaming",
5043
- input: S
5043
+ input: E
5044
5044
  }) : b({
5045
5045
  toolCallId: a.toolCallId,
5046
5046
  toolName: h.toolName,
5047
5047
  state: "input-streaming",
5048
- input: S
5048
+ input: E
5049
5049
  }), d();
5050
5050
  break;
5051
5051
  }
@@ -5181,10 +5181,10 @@ function Nf({
5181
5181
  i?.(h);
5182
5182
  break;
5183
5183
  }
5184
- const S = h.id != null ? c.message.parts.find(
5184
+ const E = h.id != null ? c.message.parts.find(
5185
5185
  (x) => h.type === x.type && h.id === x.id
5186
5186
  ) : void 0;
5187
- S != null ? S.data = h.data : c.message.parts.push(h), i?.(h), d();
5187
+ E != null ? E.data = h.data : c.message.parts.push(h), i?.(h), d();
5188
5188
  }
5189
5189
  }
5190
5190
  l.enqueue(a);
@@ -5292,7 +5292,7 @@ var Mf = () => ({
5292
5292
  usage: n.usage,
5293
5293
  finishReason: n.finishReason
5294
5294
  });
5295
- const s = await en({
5295
+ const s = await tn({
5296
5296
  value: o.value,
5297
5297
  schema: t
5298
5298
  });
@@ -5422,7 +5422,7 @@ var Zf = class {
5422
5422
  throw new Error("The response body is empty.");
5423
5423
  return this.processResponseStream(m.body);
5424
5424
  }
5425
- }, rn = class extends Zf {
5425
+ }, nn = class extends Zf {
5426
5426
  constructor(e = {}) {
5427
5427
  super(e);
5428
5428
  }
@@ -5444,7 +5444,7 @@ var Zf = class {
5444
5444
  constructor({
5445
5445
  generateId: e = lp,
5446
5446
  id: t = e(),
5447
- transport: r = new rn(),
5447
+ transport: r = new nn(),
5448
5448
  messageMetadataSchema: n,
5449
5449
  dataPartSchemas: o,
5450
5450
  state: s,
@@ -5688,15 +5688,15 @@ for (let e = 0; e < 256; ++e)
5688
5688
  function Lf(e, t = 0) {
5689
5689
  return (ne[e[t + 0]] + ne[e[t + 1]] + ne[e[t + 2]] + ne[e[t + 3]] + "-" + ne[e[t + 4]] + ne[e[t + 5]] + "-" + ne[e[t + 6]] + ne[e[t + 7]] + "-" + ne[e[t + 8]] + ne[e[t + 9]] + "-" + ne[e[t + 10]] + ne[e[t + 11]] + ne[e[t + 12]] + ne[e[t + 13]] + ne[e[t + 14]] + ne[e[t + 15]]).toLowerCase();
5690
5690
  }
5691
- let _r;
5691
+ let wr;
5692
5692
  const Uf = new Uint8Array(16);
5693
5693
  function jf() {
5694
- if (!_r) {
5694
+ if (!wr) {
5695
5695
  if (typeof crypto > "u" || !crypto.getRandomValues)
5696
5696
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
5697
- _r = crypto.getRandomValues.bind(crypto);
5697
+ wr = crypto.getRandomValues.bind(crypto);
5698
5698
  }
5699
- return _r(Uf);
5699
+ return wr(Uf);
5700
5700
  }
5701
5701
  const Ff = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Qn = { randomUUID: Ff };
5702
5702
  function je(e, t, r) {
@@ -5708,14 +5708,14 @@ function je(e, t, r) {
5708
5708
  throw new Error("Random bytes length must be >= 16");
5709
5709
  return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Lf(n);
5710
5710
  }
5711
- let br = null, wr = null;
5712
- const Fs = async () => (br || (br = import(
5711
+ let Ir = null, Er = null;
5712
+ const Fs = async () => (Ir || (Ir = import(
5713
5713
  /* webpackChunkName: "toast-react-toastify" */
5714
5714
  "./index.790ujKXR.js"
5715
- )), br), Bs = async () => (wr || (wr = import(
5715
+ )), Ir), Bs = async () => (Er || (Er = import(
5716
5716
  /* webpackChunkName: "toast-utilities" */
5717
- "./index.sJ3tCqwk.js"
5718
- ).then((e) => e.utilities)), wr), Bf = async () => {
5717
+ "./index.DvcgyAt7.js"
5718
+ ).then((e) => e.utilities)), Er), Bf = async () => {
5719
5719
  try {
5720
5720
  await Promise.all([Fs(), Bs()]);
5721
5721
  } catch {
@@ -5736,7 +5736,7 @@ const Fs = async () => (br || (br = import(
5736
5736
  }, 100);
5737
5737
  } catch {
5738
5738
  }
5739
- }, rr = (e, t) => Vs(e, "success", t), Vf = (e, t) => Vs(e, "error", t), Xe = "CHAT_SET_STATUS", Hs = "CHAT_SET_USAGE", Tt = "CHAT_SET_ATTACHMENTS", $r = "CHAT_SET_PRIVATE", Gs = "CHAT_SET_PROVIDER", it = "CHAT_RESET", Hf = (e, t) => {
5739
+ }, rr = (e, t) => Vs(e, "success", t), Vf = (e, t) => Vs(e, "error", t), Xe = "CHAT_SET_STATUS", Hs = "CHAT_SET_USAGE", Tt = "CHAT_SET_ATTACHMENTS", Dr = "CHAT_SET_PRIVATE", Gs = "CHAT_SET_PROVIDER", it = "CHAT_RESET", Hf = (e, t) => {
5740
5740
  switch (t.type) {
5741
5741
  case Hs:
5742
5742
  return {
@@ -5748,7 +5748,7 @@ const Fs = async () => (br || (br = import(
5748
5748
  ...e,
5749
5749
  attachments: t.payload.attachments
5750
5750
  };
5751
- case $r:
5751
+ case Dr:
5752
5752
  return {
5753
5753
  ...e,
5754
5754
  privateChat: t.payload.privateChat
@@ -5828,9 +5828,9 @@ const Fs = async () => (br || (br = import(
5828
5828
  return e;
5829
5829
  }
5830
5830
  };
5831
- var Ir, Kn;
5831
+ var Tr, Kn;
5832
5832
  function Wf() {
5833
- if (Kn) return Ir;
5833
+ if (Kn) return Tr;
5834
5834
  Kn = 1;
5835
5835
  function e(t, r) {
5836
5836
  if (typeof t != "function")
@@ -5844,7 +5844,7 @@ function Wf() {
5844
5844
  }, c);
5845
5845
  };
5846
5846
  }
5847
- return Ir = e, Ir;
5847
+ return Tr = e, Tr;
5848
5848
  }
5849
5849
  var Yf = /* @__PURE__ */ Wf();
5850
5850
  const qf = /* @__PURE__ */ ff(Yf);
@@ -5859,7 +5859,7 @@ var Js = (e, t, r) => {
5859
5859
  function Xf(e, t) {
5860
5860
  return t != null ? qf(e, t) : e;
5861
5861
  }
5862
- var me, Bt, Vt, ft, mt, ht, ot, Zr, Dr, Qf = class {
5862
+ var me, Bt, Vt, ft, mt, ht, ot, Lr, Ur, Qf = class {
5863
5863
  constructor(e = []) {
5864
5864
  Se(this, me, void 0), Se(this, Bt, "ready"), Se(this, Vt, void 0), Se(this, ft, /* @__PURE__ */ new Set()), Se(this, mt, /* @__PURE__ */ new Set()), Se(this, ht, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
5865
5865
  ze(this, me, B(this, me).concat(t)), B(this, ot).call(this);
@@ -5883,9 +5883,9 @@ var me, Bt, Vt, ft, mt, ht, ot, Zr, Dr, Qf = class {
5883
5883
  B(this, ht).delete(t);
5884
5884
  }), Se(this, ot, () => {
5885
5885
  B(this, ft).forEach((t) => t());
5886
- }), Se(this, Zr, () => {
5886
+ }), Se(this, Lr, () => {
5887
5887
  B(this, mt).forEach((t) => t());
5888
- }), Se(this, Dr, () => {
5888
+ }), Se(this, Ur, () => {
5889
5889
  B(this, ht).forEach((t) => t());
5890
5890
  }), ze(this, me, e);
5891
5891
  }
@@ -5893,13 +5893,13 @@ var me, Bt, Vt, ft, mt, ht, ot, Zr, Dr, Qf = class {
5893
5893
  return B(this, Bt);
5894
5894
  }
5895
5895
  set status(e) {
5896
- ze(this, Bt, e), B(this, Zr).call(this);
5896
+ ze(this, Bt, e), B(this, Lr).call(this);
5897
5897
  }
5898
5898
  get error() {
5899
5899
  return B(this, Vt);
5900
5900
  }
5901
5901
  set error(e) {
5902
- ze(this, Vt, e), B(this, Dr).call(this);
5902
+ ze(this, Vt, e), B(this, Ur).call(this);
5903
5903
  }
5904
5904
  get messages() {
5905
5905
  return B(this, me);
@@ -5915,8 +5915,8 @@ ft = /* @__PURE__ */ new WeakMap();
5915
5915
  mt = /* @__PURE__ */ new WeakMap();
5916
5916
  ht = /* @__PURE__ */ new WeakMap();
5917
5917
  ot = /* @__PURE__ */ new WeakMap();
5918
- Zr = /* @__PURE__ */ new WeakMap();
5919
- Dr = /* @__PURE__ */ new WeakMap();
5918
+ Lr = /* @__PURE__ */ new WeakMap();
5919
+ Ur = /* @__PURE__ */ new WeakMap();
5920
5920
  var st, eo = class extends Df {
5921
5921
  constructor({ messages: e, ...t }) {
5922
5922
  const r = new Qf(e);
@@ -5938,15 +5938,15 @@ function Kf({
5938
5938
  // optionsId is required to trigger re-subscription when the chat ID changes
5939
5939
  // eslint-disable-next-line react-hooks/exhaustive-deps
5940
5940
  [e, s]
5941
- ), a = fr(
5941
+ ), a = hr(
5942
5942
  i,
5943
5943
  () => n.current.messages,
5944
5944
  () => n.current.messages
5945
- ), l = fr(
5945
+ ), l = hr(
5946
5946
  n.current["~registerStatusCallback"],
5947
5947
  () => n.current.status,
5948
5948
  () => n.current.status
5949
- ), c = fr(
5949
+ ), c = hr(
5950
5950
  n.current["~registerErrorCallback"],
5951
5951
  () => n.current.error,
5952
5952
  () => n.current.error
@@ -5981,7 +5981,7 @@ const to = () => ({
5981
5981
  onError: /* @__PURE__ */ new Set(),
5982
5982
  onData: /* @__PURE__ */ new Set(),
5983
5983
  onToolCall: /* @__PURE__ */ new Set()
5984
- }), Ws = Hr(null);
5984
+ }), Ws = Jr(null);
5985
5985
  function Be(e = {}) {
5986
5986
  const t = Q(Ws);
5987
5987
  if (!t)
@@ -6023,7 +6023,7 @@ function em({
6023
6023
  }, []), c = Kf({
6024
6024
  id: t.id,
6025
6025
  messages: t.messages,
6026
- transport: t.transport || new rn({
6026
+ transport: t.transport || new nn({
6027
6027
  api: t.api || "/api/chat",
6028
6028
  body: t.body
6029
6029
  }),
@@ -6062,7 +6062,7 @@ const tm = ({ chatId: e }) => {
6062
6062
  ), o.current = !1), n.current = e;
6063
6063
  }, [e, t.length, r]), null;
6064
6064
  };
6065
- let Zt = !1, Er = null;
6065
+ let Zt = !1, Sr = null;
6066
6066
  const ro = ({
6067
6067
  containerId: e,
6068
6068
  ...t
@@ -6076,7 +6076,7 @@ const ro = ({
6076
6076
  /* webpackChunkName: "toast-react-toastify" */
6077
6077
  "./index.790ujKXR.js"
6078
6078
  );
6079
- Er = i, Zt = !0, n(!0);
6079
+ Sr = i, Zt = !0, n(!0);
6080
6080
  } catch (i) {
6081
6081
  console.error("Failed to load ToastContainer:", i);
6082
6082
  }
@@ -6087,7 +6087,7 @@ const ro = ({
6087
6087
  window.removeEventListener("toast-request", s);
6088
6088
  };
6089
6089
  }
6090
- }, []), r && Er ? /* @__PURE__ */ p(Er, { containerId: e, ...t }) : null;
6090
+ }, []), r && Sr ? /* @__PURE__ */ p(Sr, { containerId: e, ...t }) : null;
6091
6091
  }, rm = ({
6092
6092
  currentChatId: e,
6093
6093
  setChatId: t,
@@ -6123,6 +6123,23 @@ const ro = ({
6123
6123
  n
6124
6124
  ]), { hasRestoredFromCache: i };
6125
6125
  }, nm = "z-20", om = "z-10";
6126
+ function sm(e) {
6127
+ const [t, r] = Z(!1);
6128
+ return $(() => {
6129
+ if (!e) {
6130
+ r(!1);
6131
+ return;
6132
+ }
6133
+ const n = (s) => {
6134
+ (s.target instanceof HTMLTextAreaElement || s.target instanceof HTMLInputElement) && r(!0);
6135
+ }, o = (s) => {
6136
+ (s.target instanceof HTMLTextAreaElement || s.target instanceof HTMLInputElement) && r(!1);
6137
+ };
6138
+ return document.addEventListener("focusin", n), document.addEventListener("focusout", o), () => {
6139
+ document.removeEventListener("focusin", n), document.removeEventListener("focusout", o);
6140
+ };
6141
+ }, [e]), t;
6142
+ }
6126
6143
  /*!
6127
6144
  @versini/ui-tooltip v4.0.1
6128
6145
  © 2025 gizmette.com
@@ -6136,22 +6153,22 @@ try {
6136
6153
  });
6137
6154
  } catch {
6138
6155
  }
6139
- const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, im = () => R("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), no = ({ mode: e }) => R({
6156
+ const am = "av-tooltip", im = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, cm = () => R("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), no = ({ mode: e }) => R({
6140
6157
  "bg-surface-darker": e === "dark" || e === "system",
6141
6158
  "bg-surface-light": e === "light" || e === "alt-system",
6142
6159
  "dark:bg-surface-light": e === "system",
6143
6160
  "dark:bg-surface-darker": e === "alt-system"
6144
- }), cm = ({ mode: e }) => R({
6161
+ }), lm = ({ mode: e }) => R({
6145
6162
  "text-copy-light": e === "dark" || e === "system",
6146
6163
  "text-copy-dark": e === "light" || e === "alt-system",
6147
6164
  "dark:text-copy-dark": e === "system",
6148
6165
  "dark:text-copy-light": e === "alt-system"
6149
- }), lm = () => R("absolute", "size-2", "transform rotate-45"), um = ({ mode: e, className: t, tooltipClassName: r, arrowClassName: n }) => {
6150
- const o = R("relative inline-block", t), s = R(sm, im(), no({
6166
+ }), um = () => R("absolute", "size-2", "transform rotate-45"), dm = ({ mode: e, className: t, tooltipClassName: r, arrowClassName: n }) => {
6167
+ const o = R("relative inline-block", t), s = R(am, cm(), no({
6151
6168
  mode: e
6152
- }), cm({
6169
+ }), lm({
6153
6170
  mode: e
6154
- }), r), i = R(am, lm(), no({
6171
+ }), r), i = R(im, um(), no({
6155
6172
  mode: e
6156
6173
  }), n);
6157
6174
  return {
@@ -6159,19 +6176,19 @@ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e
6159
6176
  arrow: i,
6160
6177
  wrapper: o
6161
6178
  };
6162
- }, dm = ({ animationDuration: e = 300 }) => ({
6179
+ }, pm = ({ animationDuration: e = 300 }) => ({
6163
6180
  animation: `av-tooltip-fade-in ${e}ms ease-in-out`
6164
- }), pm = 5e3, fm = ({ trigger: e, label: t, placement: r = "top", mode: n = "system", animationDuration: o = 300, delay: s = 0, className: i, tooltipClassName: a, arrowClassName: l }) => {
6181
+ }), fm = 5e3, mm = ({ trigger: e, label: t, placement: r = "top", mode: n = "system", animationDuration: o = 300, delay: s = 0, className: i, tooltipClassName: a, arrowClassName: l }) => {
6165
6182
  const c = ha(() => {
6166
6183
  I.stop(), v(!1);
6167
6184
  }), d = J(null), u = J(null), y = J(null), [g, f] = Z(!1), [m, v] = Z(!1), [b, w] = Z(!1), I = ga(() => {
6168
6185
  v(!1);
6169
- }, pm), h = um({
6186
+ }, fm), h = dm({
6170
6187
  mode: n,
6171
6188
  className: i,
6172
6189
  tooltipClassName: a,
6173
6190
  arrowClassName: l
6174
- }), S = dm({
6191
+ }), E = pm({
6175
6192
  animationDuration: o
6176
6193
  }), x = X(async () => {
6177
6194
  if (c.current && d.current && u.current) {
@@ -6194,7 +6211,7 @@ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e
6194
6211
  d?.current?.style && Object.assign(d.current.style, {
6195
6212
  left: Dt(D),
6196
6213
  top: Dt(se),
6197
- ...S
6214
+ ...E
6198
6215
  });
6199
6216
  const O = {
6200
6217
  top: "bottom",
@@ -6212,7 +6229,7 @@ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e
6212
6229
  }
6213
6230
  }, [
6214
6231
  r,
6215
- S,
6232
+ E,
6216
6233
  c
6217
6234
  ]);
6218
6235
  $(() => {
@@ -6223,7 +6240,7 @@ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e
6223
6240
  ]), $(() => () => {
6224
6241
  y.current && clearTimeout(y.current);
6225
6242
  }, []);
6226
- const E = () => {
6243
+ const T = () => {
6227
6244
  y.current && (clearTimeout(y.current), y.current = null), f(!1), v(!0), I.start();
6228
6245
  }, C = () => {
6229
6246
  m || (s > 0 ? y.current = setTimeout(() => {
@@ -6237,7 +6254,7 @@ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e
6237
6254
  ref: c,
6238
6255
  onMouseEnter: C,
6239
6256
  onMouseLeave: M,
6240
- onClick: E,
6257
+ onClick: T,
6241
6258
  children: [
6242
6259
  e,
6243
6260
  g && /* @__PURE__ */ N("div", {
@@ -6261,7 +6278,7 @@ const sm = "av-tooltip", am = "av-tooltip-arrow", Dt = (e, t = "px") => typeof e
6261
6278
  trigger: e,
6262
6279
  className: t,
6263
6280
  ...r
6264
- }) => he(() => Pe(), []) ? /* @__PURE__ */ p("div", { className: t, children: e }) : /* @__PURE__ */ p(fm, { delay: 500, className: t, trigger: e, ...r }), mm = ({
6281
+ }) => he(() => Pe(), []) ? /* @__PURE__ */ p("div", { className: t, children: e }) : /* @__PURE__ */ p(mm, { delay: 500, className: t, trigger: e, ...r }), hm = ({
6265
6282
  className: e,
6266
6283
  onClick: t
6267
6284
  }) => {
@@ -6303,7 +6320,7 @@ function Ys(e, t) {
6303
6320
  };
6304
6321
  }, [e, t]);
6305
6322
  }
6306
- const hm = ({
6323
+ const gm = ({
6307
6324
  className: e
6308
6325
  }) => {
6309
6326
  const { getAccessToken: t, user: r } = Ee(), {
@@ -6328,7 +6345,7 @@ const hm = ({
6328
6345
  }
6329
6346
  });
6330
6347
  }, [i, a, c, s]);
6331
- Ys("newChat", w), Fr(
6348
+ Ys("newChat", w), Vr(
6332
6349
  [
6333
6350
  [
6334
6351
  "mod+N",
@@ -6350,8 +6367,8 @@ const hm = ({
6350
6367
  */
6351
6368
  []
6352
6369
  );
6353
- const I = async (S) => {
6354
- S.preventDefault(), d(), s({
6370
+ const I = async (E) => {
6371
+ E.preventDefault(), d(), s({
6355
6372
  type: Xe,
6356
6373
  payload: {
6357
6374
  aborted: !0,
@@ -6372,8 +6389,8 @@ const hm = ({
6372
6389
  } catch (x) {
6373
6390
  console.error("Failed to send abort signal:", x);
6374
6391
  }
6375
- }, h = (S) => {
6376
- S.preventDefault(), w();
6392
+ }, h = (E) => {
6393
+ E.preventDefault(), w();
6377
6394
  };
6378
6395
  return $(() => {
6379
6396
  Pe() || ((n === !0 || o === !0) && !y.current && u.current && (y.current = !0, u.current.focus()), n === !1 && y.current && (y.current = !1));
@@ -6414,7 +6431,7 @@ const hm = ({
6414
6431
  }
6415
6432
  );
6416
6433
  }, nr = (e) => {
6417
- const { check: t } = Br();
6434
+ const { check: t } = Hr();
6418
6435
  return t(e);
6419
6436
  };
6420
6437
  /*!
@@ -6430,7 +6447,7 @@ try {
6430
6447
  });
6431
6448
  } catch {
6432
6449
  }
6433
- const gm = "av-messagebox", vm = "av-panel";
6450
+ const vm = "av-messagebox", ym = "av-panel";
6434
6451
  /*!
6435
6452
  @versini/ui-modal v3.1.1
6436
6453
  © 2025 gizmette.com
@@ -6444,8 +6461,8 @@ try {
6444
6461
  });
6445
6462
  } catch {
6446
6463
  }
6447
- const qs = /* @__PURE__ */ Hr(null);
6448
- function ym({ initialOpen: e = !1, open: t, onOpenChange: r } = {}) {
6464
+ const qs = /* @__PURE__ */ Jr(null);
6465
+ function _m({ initialOpen: e = !1, open: t, onOpenChange: r } = {}) {
6449
6466
  const [n, o] = Z(e), [s, i] = Z(), [a, l] = Z(), c = t ?? n, d = r ?? o, u = Oo({
6450
6467
  open: c,
6451
6468
  onOpenChange: d
@@ -6477,21 +6494,21 @@ function ym({ initialOpen: e = !1, open: t, onOpenChange: r } = {}) {
6477
6494
  a
6478
6495
  ]);
6479
6496
  }
6480
- const ir = () => {
6497
+ const cr = () => {
6481
6498
  const e = Q(qs);
6482
6499
  if (e == null)
6483
6500
  throw new Error("Modal components must be wrapped in <Modal />");
6484
6501
  return e;
6485
6502
  };
6486
- function _m({ children: e, ...t }) {
6487
- const r = ym(t);
6503
+ function bm({ children: e, ...t }) {
6504
+ const r = _m(t);
6488
6505
  return /* @__PURE__ */ p(qs.Provider, {
6489
6506
  value: r,
6490
6507
  children: e
6491
6508
  });
6492
6509
  }
6493
- const bm = /* @__PURE__ */ Qe(function(t, r) {
6494
- const { context: n, ...o } = ir(), s = Jr([
6510
+ const wm = /* @__PURE__ */ Qe(function(t, r) {
6511
+ const { context: n, ...o } = cr(), s = Wr([
6495
6512
  o.refs.setFloating,
6496
6513
  r
6497
6514
  ]);
@@ -6501,11 +6518,11 @@ const bm = /* @__PURE__ */ Qe(function(t, r) {
6501
6518
  [`${i}`]: i,
6502
6519
  "bg-black sm:bg-black/[.8]": !i
6503
6520
  });
6504
- return /* @__PURE__ */ p(xr, {
6521
+ return /* @__PURE__ */ p(Nr, {
6505
6522
  children: /* @__PURE__ */ p(Vi, {
6506
6523
  className: l,
6507
6524
  lockScroll: !0,
6508
- children: /* @__PURE__ */ p(Ar, {
6525
+ children: /* @__PURE__ */ p(Or, {
6509
6526
  context: n,
6510
6527
  children: /* @__PURE__ */ p("div", {
6511
6528
  ref: s,
@@ -6517,9 +6534,9 @@ const bm = /* @__PURE__ */ Qe(function(t, r) {
6517
6534
  })
6518
6535
  })
6519
6536
  });
6520
- }), wm = /* @__PURE__ */ Qe(function({ children: t, ...r }, n) {
6521
- const { setLabelId: o } = ir(), s = Co();
6522
- return Gr(() => (o(s), () => o(void 0)), [
6537
+ }), Im = /* @__PURE__ */ Qe(function({ children: t, ...r }, n) {
6538
+ const { setLabelId: o } = cr(), s = Co();
6539
+ return or(() => (o(s), () => o(void 0)), [
6523
6540
  s,
6524
6541
  o
6525
6542
  ]), /* @__PURE__ */ p("h1", {
@@ -6528,9 +6545,9 @@ const bm = /* @__PURE__ */ Qe(function(t, r) {
6528
6545
  id: s,
6529
6546
  children: t
6530
6547
  });
6531
- }), Im = /* @__PURE__ */ Qe(function({ children: t, ...r }, n) {
6532
- const { setDescriptionId: o } = ir(), s = Co();
6533
- return Gr(() => (o(s), () => o(void 0)), [
6548
+ }), Em = /* @__PURE__ */ Qe(function({ children: t, ...r }, n) {
6549
+ const { setDescriptionId: o } = cr(), s = Co();
6550
+ return or(() => (o(s), () => o(void 0)), [
6534
6551
  s,
6535
6552
  o
6536
6553
  ]), /* @__PURE__ */ p("div", {
@@ -6539,8 +6556,8 @@ const bm = /* @__PURE__ */ Qe(function(t, r) {
6539
6556
  id: s,
6540
6557
  children: t
6541
6558
  });
6542
- }), Em = /* @__PURE__ */ Qe(function(t, r) {
6543
- const { setOpen: n } = ir(), { trigger: o, className: s, ...i } = t, a = X(() => n(!1), [
6559
+ }), Tm = /* @__PURE__ */ Qe(function(t, r) {
6560
+ const { setOpen: n } = cr(), { trigger: o, className: s, ...i } = t, a = X(() => n(!1), [
6544
6561
  n
6545
6562
  ]);
6546
6563
  return /* @__PURE__ */ p("div", {
@@ -6556,7 +6573,7 @@ const bm = /* @__PURE__ */ Qe(function(t, r) {
6556
6573
  "backdrop-blur-md": e === "medium",
6557
6574
  "backdrop-blur-lg": e === "large",
6558
6575
  "bg-surface-darker": e === "none"
6559
- }), Tm = ({ className: e, kind: t, borderMode: r, animation: n, maxWidth: o = "medium", maxHeight: s, blurEffect: i = "none" }) => {
6576
+ }), Sm = ({ className: e, kind: t, borderMode: r, animation: n, maxWidth: o = "medium", maxHeight: s, blurEffect: i = "none" }) => {
6560
6577
  const a = s ?? (t === le ? "large" : void 0);
6561
6578
  return {
6562
6579
  outerWrapper: R("main prose prose-lighter flex flex-col bg-surface-dark", {
@@ -6564,7 +6581,7 @@ const bm = /* @__PURE__ */ Qe(function(t, r) {
6564
6581
  /**
6565
6582
  * Panel styles
6566
6583
  */
6567
- [`${vm} min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === le,
6584
+ [`${ym} min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === le,
6568
6585
  "w-full sm:w-[95%] md:max-w-2xl": t === le && !e && o === "small",
6569
6586
  "w-full sm:w-[95%] md:max-w-3xl": t === le && !e && o === "medium",
6570
6587
  "w-full sm:w-[95%] md:max-w-4xl": t === le && !e && o === "large",
@@ -6576,7 +6593,7 @@ const bm = /* @__PURE__ */ Qe(function(t, r) {
6576
6593
  /**
6577
6594
  * Messagebox styles
6578
6595
  */
6579
- [`${gm} rounded-lg border-2`]: t === Ne,
6596
+ [`${vm} rounded-lg border-2`]: t === Ne,
6580
6597
  "w-[95%] sm:w-[50%] md:max-w-2xl": t === Ne && !e,
6581
6598
  "max-h-[20%]": t === Ne && a === "small",
6582
6599
  "max-h-[50%]": t === Ne && a === "medium",
@@ -6602,12 +6619,12 @@ const bm = /* @__PURE__ */ Qe(function(t, r) {
6602
6619
  close: "p-2",
6603
6620
  content: "py-2 px-2"
6604
6621
  };
6605
- }, Sm = "slide", so = "fade", km = ({ open: e, onOpenChange: t, title: r, children: n, footer: o, borderMode: s = "light", kind: i = le, className: a, animation: l = !1, animationType: c = Sm, maxWidth: d = "medium", maxHeight: u, blurEffect: y = "none" }) => {
6622
+ }, km = "slide", so = "fade", Cm = ({ open: e, onOpenChange: t, title: r, children: n, footer: o, borderMode: s = "light", kind: i = le, className: a, animation: l = !1, animationType: c = km, maxWidth: d = "medium", maxHeight: u, blurEffect: y = "none" }) => {
6606
6623
  const g = J(""), [f, m] = Z(l ? c === so ? {
6607
6624
  opacity: 0
6608
6625
  } : {
6609
6626
  transform: "translateY(-100vh)"
6610
- } : {}), v = Tm({
6627
+ } : {}), v = Sm({
6611
6628
  className: a,
6612
6629
  kind: i,
6613
6630
  borderMode: s,
@@ -6642,19 +6659,19 @@ const bm = /* @__PURE__ */ Qe(function(t, r) {
6642
6659
  l,
6643
6660
  c
6644
6661
  ]), /* @__PURE__ */ p($e, {
6645
- children: e && /* @__PURE__ */ p(_m, {
6662
+ children: e && /* @__PURE__ */ p(bm, {
6646
6663
  open: e,
6647
6664
  onOpenChange: t,
6648
- children: /* @__PURE__ */ p(bm, {
6665
+ children: /* @__PURE__ */ p(wm, {
6649
6666
  className: v.outerWrapper,
6650
6667
  style: f,
6651
- children: /* @__PURE__ */ N(Im, {
6668
+ children: /* @__PURE__ */ N(Em, {
6652
6669
  className: v.innerWrapper,
6653
6670
  children: [
6654
6671
  /* @__PURE__ */ N("div", {
6655
6672
  className: v.header,
6656
6673
  children: [
6657
- /* @__PURE__ */ p(Em, {
6674
+ /* @__PURE__ */ p(Tm, {
6658
6675
  className: v.close,
6659
6676
  trigger: /* @__PURE__ */ p(Ae, {
6660
6677
  mode: "dark",
@@ -6666,7 +6683,7 @@ const bm = /* @__PURE__ */ Qe(function(t, r) {
6666
6683
  })
6667
6684
  })
6668
6685
  }),
6669
- /* @__PURE__ */ p(wm, {
6686
+ /* @__PURE__ */ p(Im, {
6670
6687
  className: v.title,
6671
6688
  children: r
6672
6689
  })
@@ -6699,7 +6716,7 @@ try {
6699
6716
  });
6700
6717
  } catch {
6701
6718
  }
6702
- const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6719
+ const xm = "av-toggle", Am = ({ narrow: e }) => R(
6703
6720
  "peer",
6704
6721
  "rounded-full",
6705
6722
  {
@@ -6708,12 +6725,12 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6708
6725
  },
6709
6726
  // Smooth background/border transition when toggling
6710
6727
  "transition-colors duration-300 ease-in-out motion-reduce:transition-none"
6711
- ), Am = ({ focusMode: e }) => R("peer-focus:outline", "peer-focus:outline-2", "peer-focus:outline-offset-2", {
6728
+ ), Nm = ({ focusMode: e }) => R("peer-focus:outline", "peer-focus:outline-2", "peer-focus:outline-offset-2", {
6712
6729
  "peer-focus:outline-focus-dark": e === "dark",
6713
6730
  "peer-focus:outline-focus-light": e === "light",
6714
6731
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
6715
6732
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
6716
- }), Nm = ({ narrow: e }) => R(
6733
+ }), Om = ({ narrow: e }) => R(
6717
6734
  {
6718
6735
  "peer-checked:after:translate-x-full": !e,
6719
6736
  "peer-checked:after:translate-x-4": e
@@ -6723,12 +6740,12 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6723
6740
  // knob circle and border color when checked
6724
6741
  "peer-checked:after:bg-white",
6725
6742
  "peer-checked:after:border-white"
6726
- ), Om = ({ narrow: e }) => R("after:left-[2px]", "after:top-[2px]", "after:border", "after:border-surface-light dark:after:border-surface-medium", "after:bg-surface-light dark:after:bg-surface-medium", "after:absolute", "after:transition-all after:duration-300 after:ease-in-out after:motion-reduce:transition-none after:will-change-transform", "after:content-['']", "after:rounded-full", {
6743
+ ), Pm = ({ narrow: e }) => R("after:left-[2px]", "after:top-[2px]", "after:border", "after:border-surface-light dark:after:border-surface-medium", "after:bg-surface-light dark:after:bg-surface-medium", "after:absolute", "after:transition-all after:duration-300 after:ease-in-out after:motion-reduce:transition-none after:will-change-transform", "after:content-['']", "after:rounded-full", {
6727
6744
  // Normal toggle knob (circle)
6728
6745
  "after:h-5 after:w-5": !e,
6729
6746
  // Narrow toggle knob (oval)
6730
6747
  " after:h-4 after:w-7": e
6731
- }), Pm = ({ mode: e, noBorder: t }) => R({
6748
+ }), Rm = ({ mode: e, noBorder: t }) => R({
6732
6749
  border: !t,
6733
6750
  "border-border-medium bg-surface-medium": e === "light",
6734
6751
  "border-border-light bg-surface-darker": e === "dark",
@@ -6747,17 +6764,17 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6747
6764
  "text-copy-lighter/60 dark:text-copy-dark/60": t === "alt-system" && o,
6748
6765
  "text-copy-dark/60 dark:text-copy-lighter/60": t === "system" && o,
6749
6766
  "text-xs": o
6750
- })), Rm = ({ className: e }) => R(Cm, "relative flex cursor-pointer items-center", e), Mm = () => "relative inline-block", zm = ({ mode: e, focusMode: t, labelHidden: r, className: n, noBorder: o, narrow: s, labelMode: i, labelPosition: a = "right", subLabel: l }) => ({
6751
- toggle: R(xm({
6767
+ })), Mm = ({ className: e }) => R(xm, "relative flex cursor-pointer items-center", e), zm = () => "relative inline-block", $m = ({ mode: e, focusMode: t, labelHidden: r, className: n, noBorder: o, narrow: s, labelMode: i, labelPosition: a = "right", subLabel: l }) => ({
6768
+ toggle: R(Am({
6752
6769
  narrow: s
6753
- }), Pm({
6770
+ }), Rm({
6754
6771
  mode: e,
6755
6772
  noBorder: o
6756
- }), Am({
6773
+ }), Nm({
6757
6774
  focusMode: t
6758
- }), Om({
6775
+ }), Pm({
6759
6776
  narrow: s
6760
- }), Nm({
6777
+ }), Om({
6761
6778
  narrow: s
6762
6779
  })),
6763
6780
  label: ao({
@@ -6774,12 +6791,12 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6774
6791
  subLabel: l
6775
6792
  }),
6776
6793
  input: "peer sr-only",
6777
- wrapper: Rm({
6794
+ wrapper: Mm({
6778
6795
  className: n
6779
6796
  }),
6780
- toggleWrapper: Mm()
6781
- }), $m = ({ 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 }) => {
6782
- const { haptic: f } = ba(), m = zm({
6797
+ toggleWrapper: zm()
6798
+ }), Zm = ({ 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 }) => {
6799
+ const { haptic: f } = ba(), m = $m({
6783
6800
  mode: s,
6784
6801
  focusMode: i,
6785
6802
  labelHidden: n,
@@ -6846,9 +6863,9 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6846
6863
  toggleChecked: c,
6847
6864
  onToggleChange: d
6848
6865
  }) => {
6849
- const u = /* @__PURE__ */ N(Sr, { columnGap: 2, alignHorizontal: "flex-end", children: [
6866
+ const u = /* @__PURE__ */ N(Cr, { columnGap: 2, alignHorizontal: "flex-end", children: [
6850
6867
  /* @__PURE__ */ p(at, { children: !s && /* @__PURE__ */ p(
6851
- cn,
6868
+ ln,
6852
6869
  {
6853
6870
  noBorder: !0,
6854
6871
  mode: "dark",
@@ -6861,7 +6878,7 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6861
6878
  }
6862
6879
  ) }),
6863
6880
  /* @__PURE__ */ p(at, { children: /* @__PURE__ */ p(
6864
- cn,
6881
+ ln,
6865
6882
  {
6866
6883
  noBorder: !0,
6867
6884
  mode: "dark",
@@ -6874,14 +6891,14 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6874
6891
  }
6875
6892
  ) })
6876
6893
  ] }), y = a ? /* @__PURE__ */ N(
6877
- Sr,
6894
+ Cr,
6878
6895
  {
6879
6896
  alignHorizontal: "space-between",
6880
6897
  alignVertical: "center",
6881
6898
  columnGap: 2,
6882
6899
  children: [
6883
6900
  /* @__PURE__ */ p(at, { span: "auto", children: /* @__PURE__ */ p(
6884
- $m,
6901
+ Zm,
6885
6902
  {
6886
6903
  narrow: !0,
6887
6904
  mode: "dark",
@@ -6900,7 +6917,7 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6900
6917
  }
6901
6918
  ) : u;
6902
6919
  return /* @__PURE__ */ p(
6903
- km,
6920
+ Cm,
6904
6921
  {
6905
6922
  kind: "messagebox",
6906
6923
  open: e,
@@ -6911,7 +6928,7 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6911
6928
  children: n
6912
6929
  }
6913
6930
  );
6914
- }, Zm = ({
6931
+ }, Dm = ({
6915
6932
  className: e
6916
6933
  }) => {
6917
6934
  const { getAccessToken: t, user: r } = Ee(), {
@@ -6923,22 +6940,22 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6923
6940
  }), w = nr(Jt.TOOL.MEMORIES), { data: I, isSuccess: h } = Fe({
6924
6941
  user: r?.username,
6925
6942
  getAccessToken: t
6926
- }), S = async () => {
6943
+ }), E = async () => {
6927
6944
  try {
6928
6945
  if (!l || !o)
6929
6946
  return;
6930
- const E = !n;
6947
+ const T = !n;
6931
6948
  if (!a || a.length === 0) {
6932
6949
  i({
6933
- type: $r,
6950
+ type: Dr,
6934
6951
  payload: {
6935
- privateChat: E
6952
+ privateChat: T
6936
6953
  }
6937
6954
  });
6938
6955
  return;
6939
6956
  }
6940
6957
  let C = [];
6941
- !E && a && a.length > 0 && (C = a.filter((M) => M.parts && M.parts.length > 0 ? M.parts.some(
6958
+ !T && a && a.length > 0 && (C = a.filter((M) => M.parts && M.parts.length > 0 ? M.parts.some(
6942
6959
  (D) => D.type === "text" && D.text?.trim()
6943
6960
  ) : !1).map((M) => ({
6944
6961
  role: M.role,
@@ -6951,11 +6968,11 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6951
6968
  messages: C,
6952
6969
  provider: o,
6953
6970
  tokenUsage: s,
6954
- privateChat: E
6971
+ privateChat: T
6955
6972
  }), i({
6956
- type: $r,
6973
+ type: Dr,
6957
6974
  payload: {
6958
- privateChat: E
6975
+ privateChat: T
6959
6976
  }
6960
6977
  });
6961
6978
  } catch {
@@ -6971,11 +6988,11 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
6971
6988
  toggleLabel: "Don't show this again",
6972
6989
  toggleName: "private-disclosure",
6973
6990
  toggleChecked: y,
6974
- onToggleChange: (E) => g(E),
6991
+ onToggleChange: (T) => g(T),
6975
6992
  showConfirmation: f,
6976
6993
  setShowConfirmation: m,
6977
6994
  action: () => {
6978
- y && b("true"), S();
6995
+ y && b("true"), E();
6979
6996
  },
6980
6997
  customStrings: {
6981
6998
  confirmAction: "Continue",
@@ -7010,8 +7027,8 @@ const Cm = "av-toggle", xm = ({ narrow: e }) => R(
7010
7027
  label: "Private Chat",
7011
7028
  labelRight: n ? "private" : "",
7012
7029
  variant: n ? "danger" : "secondary",
7013
- onClick: (E) => {
7014
- E && E.preventDefault(), !n && !v ? m(!0) : S();
7030
+ onClick: (T) => {
7031
+ T && T.preventDefault(), !n && !v ? m(!0) : E();
7015
7032
  },
7016
7033
  className: "text-sm",
7017
7034
  disabled: !(h && I),
@@ -7041,7 +7058,7 @@ try {
7041
7058
  });
7042
7059
  } catch {
7043
7060
  }
7044
- const Ht = /* @__PURE__ */ Hr({
7061
+ const Ht = /* @__PURE__ */ Jr({
7045
7062
  getItemProps: () => ({}),
7046
7063
  activeIndex: null,
7047
7064
  /* v8 ignore next 2 */
@@ -7063,11 +7080,11 @@ const Ht = /* @__PURE__ */ Hr({
7063
7080
  return t.displayName || t.name || "Component";
7064
7081
  }
7065
7082
  return "Element";
7066
- }, Lr = /* @__PURE__ */ Qe(({ trigger: e, children: t, label: r = "Open menu", defaultPlacement: n = "bottom-start", onOpenChange: o, mode: s = "system", focusMode: i = "system", ...a }, l) => {
7067
- const [c, d] = Z(!1), [u, y] = Z(!1), [g, f] = Z(null), [m, v] = Z(!1), b = J([]), w = J([]), I = Q(Ht), h = Do(), S = Gi(), x = $o(), E = Zo({
7083
+ }, jr = /* @__PURE__ */ Qe(({ trigger: e, children: t, label: r = "Open menu", defaultPlacement: n = "bottom-start", onOpenChange: o, mode: s = "system", focusMode: i = "system", ...a }, l) => {
7084
+ const [c, d] = Z(!1), [u, y] = Z(!1), [g, f] = Z(null), [m, v] = Z(!1), b = J([]), w = J([]), I = Q(Ht), h = Do(), E = Gi(), x = $o(), T = Zo({
7068
7085
  label: r !== "Open menu" ? r : null
7069
7086
  }), C = x != null, { floatingStyles: M, refs: D, context: se } = Oo({
7070
- nodeId: S,
7087
+ nodeId: E,
7071
7088
  open: c,
7072
7089
  onOpenChange: (K) => {
7073
7090
  d(K), o?.(K);
@@ -7119,9 +7136,9 @@ const Ht = /* @__PURE__ */ Hr({
7119
7136
  de,
7120
7137
  pe,
7121
7138
  He
7122
- ]), et = Jr([
7139
+ ]), et = Wr([
7123
7140
  D.setReference,
7124
- E.ref,
7141
+ T.ref,
7125
7142
  l
7126
7143
  ]);
7127
7144
  $(() => {
@@ -7131,25 +7148,25 @@ const Ht = /* @__PURE__ */ Hr({
7131
7148
  d(!1), o?.(!1);
7132
7149
  }
7133
7150
  function ve(tt) {
7134
- tt.nodeId !== S && tt.parentId === x && d(!1);
7151
+ tt.nodeId !== E && tt.parentId === x && d(!1);
7135
7152
  }
7136
7153
  return h.events.on("click", K), h.events.on("menuopen", ve), () => {
7137
7154
  h.events.off("click", K), h.events.off("menuopen", ve);
7138
7155
  };
7139
7156
  }, [
7140
7157
  h,
7141
- S,
7158
+ E,
7142
7159
  x,
7143
7160
  o
7144
7161
  ]), $(() => {
7145
7162
  c && h && h.events.emit("menuopen", {
7146
7163
  parentId: x,
7147
- nodeId: S
7164
+ nodeId: E
7148
7165
  });
7149
7166
  }, [
7150
7167
  h,
7151
7168
  c,
7152
- S,
7169
+ E,
7153
7170
  x
7154
7171
  ]), $(() => {
7155
7172
  function K({ pointerType: tt }) {
@@ -7177,7 +7194,7 @@ const Ht = /* @__PURE__ */ Hr({
7177
7194
  "bg-surface-lighter": c && !u
7178
7195
  });
7179
7196
  return /* @__PURE__ */ N(yn, {
7180
- id: S,
7197
+ id: E,
7181
7198
  children: [
7182
7199
  /* @__PURE__ */ N("button", {
7183
7200
  ref: et,
@@ -7189,7 +7206,7 @@ const Ht = /* @__PURE__ */ Hr({
7189
7206
  a.onFocus?.(ve), y(!1), I.setHasFocusInside(!0);
7190
7207
  },
7191
7208
  onMouseEnter(ve) {
7192
- a.onMouseEnter?.(ve), I.allowHover && I.isOpen && I.setActiveIndex(E.index);
7209
+ a.onMouseEnter?.(ve), I.allowHover && I.isOpen && I.setActiveIndex(T.index);
7193
7210
  }
7194
7211
  })),
7195
7212
  children: [
@@ -7216,8 +7233,8 @@ const Ht = /* @__PURE__ */ Hr({
7216
7233
  children: /* @__PURE__ */ p(_n, {
7217
7234
  elementsRef: b,
7218
7235
  labelsRef: w,
7219
- children: c && /* @__PURE__ */ p(xr, {
7220
- children: /* @__PURE__ */ p(Ar, {
7236
+ children: c && /* @__PURE__ */ p(Nr, {
7237
+ children: /* @__PURE__ */ p(Or, {
7221
7238
  context: se,
7222
7239
  modal: !1,
7223
7240
  initialFocus: -1,
@@ -7247,7 +7264,7 @@ const Ht = /* @__PURE__ */ Hr({
7247
7264
  }))
7248
7265
  });
7249
7266
  return /* @__PURE__ */ N(yn, {
7250
- id: S,
7267
+ id: E,
7251
7268
  children: [
7252
7269
  Te,
7253
7270
  /* @__PURE__ */ p(Ht.Provider, {
@@ -7263,8 +7280,8 @@ const Ht = /* @__PURE__ */ Hr({
7263
7280
  children: /* @__PURE__ */ p(_n, {
7264
7281
  elementsRef: b,
7265
7282
  labelsRef: w,
7266
- children: c && /* @__PURE__ */ p(xr, {
7267
- children: /* @__PURE__ */ p(Ar, {
7283
+ children: c && /* @__PURE__ */ p(Nr, {
7284
+ children: /* @__PURE__ */ p(Or, {
7268
7285
  context: se,
7269
7286
  modal: !1,
7270
7287
  initialFocus: 0,
@@ -7283,21 +7300,21 @@ const Ht = /* @__PURE__ */ Hr({
7283
7300
  ]
7284
7301
  });
7285
7302
  }), kt = /* @__PURE__ */ Qe((e, t) => $o() === null ? /* @__PURE__ */ p(Hi, {
7286
- children: /* @__PURE__ */ p(Lr, {
7303
+ children: /* @__PURE__ */ p(jr, {
7287
7304
  ...e,
7288
7305
  ref: t
7289
7306
  })
7290
- }) : /* @__PURE__ */ p(Lr, {
7307
+ }) : /* @__PURE__ */ p(jr, {
7291
7308
  ...e,
7292
7309
  ref: t
7293
7310
  }));
7294
7311
  kt.displayName = "Menu";
7295
- Lr.displayName = "MenuComponent";
7312
+ jr.displayName = "MenuComponent";
7296
7313
  const we = /* @__PURE__ */ Qe(({ label: e, disabled: t, icon: r, raw: n = !1, children: o, ignoreClick: s = !1, selected: i, ...a }, l) => {
7297
7314
  let c = "";
7298
7315
  const d = Q(Ht), u = Zo({
7299
7316
  label: t ? null : e
7300
- }), y = Do(), g = Jr([
7317
+ }), y = Do(), g = Wr([
7301
7318
  u.ref,
7302
7319
  l
7303
7320
  ]);
@@ -7348,28 +7365,28 @@ const we = /* @__PURE__ */ Qe(({ label: e, disabled: t, icon: r, raw: n = !1, ch
7348
7365
  });
7349
7366
  });
7350
7367
  we.displayName = "MenuItem";
7351
- const Dm = ({ className: e, ...t }) => {
7368
+ const Lm = ({ className: e, ...t }) => {
7352
7369
  const r = R(e, "my-1 border-t border-border-medium");
7353
7370
  return /* @__PURE__ */ p("div", {
7354
7371
  className: r,
7355
7372
  ...t
7356
7373
  });
7357
- }, Ur = ({ className: e, ...t }) => {
7374
+ }, Fr = ({ className: e, ...t }) => {
7358
7375
  const r = R(e, "pt-1 mb-2", "text-sm text-copy-dark font-bold", "border-b border-border-medium");
7359
7376
  return /* @__PURE__ */ p("div", {
7360
7377
  className: r,
7361
7378
  ...t
7362
7379
  });
7363
- }, Lm = (e) => {
7380
+ }, Um = (e) => {
7364
7381
  for (let t = 0; t < e.length; t++)
7365
7382
  if (e[t].enabled)
7366
7383
  return !0;
7367
7384
  return !1;
7368
- }, Um = ({
7385
+ }, jm = ({
7369
7386
  className: e,
7370
7387
  defaultPlacement: t = "top-start"
7371
7388
  }) => {
7372
- const { dispatch: r, setChatId: n, setInitialMessages: o } = Q(Ie), { dispatch: s } = Q(Vr), { getAccessToken: i, user: a } = Ee(), [l, c] = xe(), { data: d, isSuccess: u } = Fe({
7389
+ const { dispatch: r, setChatId: n, setInitialMessages: o } = Q(Ie), { dispatch: s } = Q(Gr), { getAccessToken: i, user: a } = Ee(), [l, c] = xe(), { data: d, isSuccess: u } = Fe({
7373
7390
  user: a?.username,
7374
7391
  getAccessToken: i
7375
7392
  }), y = (m, v, b) => {
@@ -7384,7 +7401,7 @@ const Dm = ({ className: e, ...t }) => {
7384
7401
  prompt: v
7385
7402
  }
7386
7403
  });
7387
- }, g = u && d && d.tags && Lm(d.tags), f = /* @__PURE__ */ N(
7404
+ }, g = u && d && d.tags && Um(d.tags), f = /* @__PURE__ */ N(
7388
7405
  kt,
7389
7406
  {
7390
7407
  mode: "dark",
@@ -7407,7 +7424,7 @@ const Dm = ({ className: e, ...t }) => {
7407
7424
  ),
7408
7425
  defaultPlacement: t,
7409
7426
  children: [
7410
- /* @__PURE__ */ p(Ur, { children: "Prompts" }),
7427
+ /* @__PURE__ */ p(Fr, { children: "Prompts" }),
7411
7428
  g && d.tags.map((m) => {
7412
7429
  let v = null;
7413
7430
  switch (m.slot) {
@@ -7446,7 +7463,7 @@ const Dm = ({ className: e, ...t }) => {
7446
7463
  trigger: f
7447
7464
  }
7448
7465
  ) : /* @__PURE__ */ p("div", { className: e, children: f });
7449
- }, jm = ({
7466
+ }, Fm = ({
7450
7467
  className: e
7451
7468
  }) => {
7452
7469
  const {
@@ -7544,7 +7561,7 @@ const Dm = ({ className: e, ...t }) => {
7544
7561
  }
7545
7562
  )
7546
7563
  ] });
7547
- }, Fm = ({
7564
+ }, Bm = ({
7548
7565
  className: e
7549
7566
  }) => {
7550
7567
  const { getAccessToken: t, user: r } = Ee(), {
@@ -7582,7 +7599,7 @@ const Dm = ({ className: e, ...t }) => {
7582
7599
  }
7583
7600
  );
7584
7601
  };
7585
- function Bm(e) {
7602
+ function Vm(e) {
7586
7603
  const [t, r] = Z(
7587
7604
  () => co()
7588
7605
  );
@@ -7598,7 +7615,7 @@ function co() {
7598
7615
  const e = (/* @__PURE__ */ new Date()).getHours();
7599
7616
  return e >= 5 && e < 11 ? za : e >= 11 && e < 12 ? $a : e >= 12 && e < 17 ? Za : e >= 17 && e < 21 ? Da : e >= 21 && e < 24 ? La : Ua;
7600
7617
  }
7601
- const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7618
+ const Hm = [".png", ".jpg", ".jpeg", ".webp"], Gm = [".pdf", ".txt"], Jm = [
7602
7619
  ".js",
7603
7620
  ".cjs",
7604
7621
  ".mjs",
@@ -7613,28 +7630,28 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7613
7630
  ".json",
7614
7631
  ".md"
7615
7632
  ], We = [
7616
- ...Hm,
7617
7633
  ...Gm,
7618
- ...Vm
7619
- ], jr = 400 * 1024, Jm = "text/plain", Gt = (e) => {
7634
+ ...Jm,
7635
+ ...Hm
7636
+ ], Br = 400 * 1024, Wm = "text/plain", Gt = (e) => {
7620
7637
  if (e === 0)
7621
7638
  return "0 Bytes";
7622
7639
  const t = 1024, r = ["Bytes", "KB", "MB", "GB"], n = Math.floor(Math.log(e) / Math.log(t));
7623
7640
  return parseFloat((e / Math.pow(t, n)).toFixed(2)) + " " + r[n];
7624
- }, Xs = (e) => e.reduce((t, r) => t + r.size, 0), Wm = (e) => e.type ? e : new File(
7641
+ }, Xs = (e) => e.reduce((t, r) => t + r.size, 0), Ym = (e) => e.type ? e : new File(
7625
7642
  [e],
7626
7643
  // Use the original file content
7627
7644
  e.name,
7628
7645
  {
7629
- type: Jm,
7646
+ type: Wm,
7630
7647
  lastModified: e.lastModified
7631
7648
  }
7632
- ), Ym = () => Ze(
7649
+ ), qm = () => Ze(
7633
7650
  "relative rounded-md text-base h-auto min-w-28 overflow-hidden pt-2"
7634
- ), qm = ({ oledMode: e }) => Ze({
7651
+ ), Xm = ({ oledMode: e }) => Ze({
7635
7652
  "bg-slate-900/95 dark:bg-slate-900": e,
7636
7653
  "bg-slate-900": !e
7637
- }), Xm = () => Ze("text-copy-lighter caret-copy-light"), Qm = ({ oledMode: e }) => Ze(
7654
+ }), Qm = () => Ze("text-copy-lighter caret-copy-light"), Km = ({ oledMode: e }) => Ze(
7638
7655
  "has-[.av-prompt-editable:focus]:outline",
7639
7656
  "has-[.av-prompt-editable:focus]:outline-2",
7640
7657
  "has-[.av-prompt-editable:focus]:outline-offset-2",
@@ -7642,28 +7659,28 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7642
7659
  "has-[.av-prompt-editable:focus]:outline-focus-light": !e,
7643
7660
  "dark:has-[.av-prompt-editable:focus]:outline-focus-light has-[.av-prompt-editable:focus]:outline-focus-dark": e
7644
7661
  }
7645
- ), Km = (e) => Ze(
7662
+ ), eh = (e) => Ze(
7646
7663
  "peer",
7647
7664
  "text-base resize-none overflow-hidden w-full text-inherit outline-none",
7648
7665
  "h-6 pr-2 pl-3",
7649
7666
  "placeholder:text-sm",
7650
7667
  e
7651
- ), eh = ({
7668
+ ), th = ({
7652
7669
  oledMode: e,
7653
7670
  placeholderColor: t
7654
7671
  }) => ({
7655
7672
  wrapper: Ze(
7656
7673
  Fa,
7657
- qm({ oledMode: e }),
7658
- Ym(),
7659
- Xm(),
7660
- Qm({ oledMode: e })
7674
+ Xm({ oledMode: e }),
7675
+ qm(),
7676
+ Qm(),
7677
+ Km({ oledMode: e })
7661
7678
  ),
7662
7679
  textArea: Ze(
7663
7680
  ja,
7664
- Km(t)
7681
+ eh(t)
7665
7682
  )
7666
- }), th = ({
7683
+ }), rh = ({
7667
7684
  files: e,
7668
7685
  clearFile: t
7669
7686
  }) => e && e.length > 0 && /* @__PURE__ */ N("div", { className: "px-4 py-2", children: [
@@ -7700,9 +7717,9 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7700
7717
  Gt(Xs(Array.from(e))),
7701
7718
  " /",
7702
7719
  " ",
7703
- Gt(jr)
7720
+ Gt(Br)
7704
7721
  ] })
7705
- ] }), nn = 1200, Qs = 200 * 1024, rh = 0.85, lo = 0.5, nh = 0.1, oh = ["image/jpeg", "image/webp"], sh = ["image/png", "image/jpeg", "image/webp"], Ks = (e) => sh.includes(e.type), ah = (e, t, r = nn) => {
7722
+ ] }), on = 1200, Qs = 200 * 1024, nh = 0.85, lo = 0.5, oh = 0.1, sh = ["image/jpeg", "image/webp"], ah = ["image/png", "image/jpeg", "image/webp"], Ks = (e) => ah.includes(e.type), ih = (e, t, r = on) => {
7706
7723
  if (e <= r && t <= r)
7707
7724
  return { width: e, height: t };
7708
7725
  const n = e / t;
@@ -7713,14 +7730,14 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7713
7730
  width: Math.round(r * n),
7714
7731
  height: r
7715
7732
  };
7716
- }, ih = (e) => new Promise((t, r) => {
7733
+ }, ch = (e) => new Promise((t, r) => {
7717
7734
  const n = new Image(), o = URL.createObjectURL(e);
7718
7735
  n.onload = () => {
7719
7736
  URL.revokeObjectURL(o), t(n);
7720
7737
  }, n.onerror = () => {
7721
7738
  URL.revokeObjectURL(o), r(new Error(`Failed to load image: ${e.name}`));
7722
7739
  }, n.src = o;
7723
- }), ch = (e, t, r) => new Promise((n, o) => {
7740
+ }), lh = (e, t, r) => new Promise((n, o) => {
7724
7741
  e.toBlob(
7725
7742
  (s) => {
7726
7743
  s ? n(s) : o(new Error("Failed to convert canvas to blob"));
@@ -7728,11 +7745,11 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7728
7745
  t,
7729
7746
  r
7730
7747
  );
7731
- }), lh = (e) => e === "image/png" ? "image/jpeg" : e, uh = async (e, t = Qs, r = nn) => {
7748
+ }), uh = (e) => e === "image/png" ? "image/jpeg" : e, dh = async (e, t = Qs, r = on) => {
7732
7749
  if (!Ks(e) || e.size <= t)
7733
7750
  return e;
7734
7751
  try {
7735
- const n = await ih(e), { width: o, height: s } = ah(
7752
+ const n = await ch(e), { width: o, height: s } = ih(
7736
7753
  n.naturalWidth,
7737
7754
  n.naturalHeight,
7738
7755
  r
@@ -7742,16 +7759,16 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7742
7759
  if (!a)
7743
7760
  return e;
7744
7761
  a.fillStyle = "#FFFFFF", a.fillRect(0, 0, o, s), a.drawImage(n, 0, 0, o, s);
7745
- const l = lh(e.type), c = oh.includes(l);
7746
- let d = rh, u;
7762
+ const l = uh(e.type), c = sh.includes(l);
7763
+ let d = nh, u;
7747
7764
  do {
7748
- if (u = await ch(
7765
+ if (u = await lh(
7749
7766
  i,
7750
7767
  l,
7751
7768
  c ? d : 1
7752
7769
  ), u.size <= t || d <= lo)
7753
7770
  break;
7754
- d -= nh;
7771
+ d -= oh;
7755
7772
  } while (d >= lo);
7756
7773
  if (u.size >= e.size)
7757
7774
  return e;
@@ -7767,12 +7784,12 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7767
7784
  } catch (n) {
7768
7785
  return console.warn("Image compression failed, using original file:", n), e;
7769
7786
  }
7770
- }, dh = async (e, t = Qs, r = nn) => await Promise.all(
7771
- e.map((o) => Ks(o) ? uh(o, t, r) : Promise.resolve(o))
7772
- ), ea = 24, ph = 500, ta = 1, fh = 5, mh = ea * ta, uo = fh * ea, hh = "ready", gh = "streaming", vh = "error", yh = "submitted", Lt = (e) => {
7773
- e.current && (e.current.style.height = `${mh}px`);
7774
- }, _h = () => {
7775
- const { user: e, getAccessToken: t } = Ee(), r = nr(Jt.ADDON.ATTACHMENTS), n = nr(Jt.ADDON.REASONING), { allowedModels: o } = Br(), [s, i] = Z(null), [a, l] = Z(!1), [c, d] = Z(!1), {
7787
+ }, ph = async (e, t = Qs, r = on) => await Promise.all(
7788
+ e.map((o) => Ks(o) ? dh(o, t, r) : Promise.resolve(o))
7789
+ ), ea = 24, fh = 500, ta = 1, mh = 5, hh = ea * ta, uo = mh * ea, gh = "ready", vh = "streaming", yh = "error", _h = "submitted", Lt = (e) => {
7790
+ e.current && (e.current.style.height = `${hh}px`);
7791
+ }, bh = () => {
7792
+ const { user: e, getAccessToken: t } = Ee(), r = nr(Jt.ADDON.ATTACHMENTS), n = nr(Jt.ADDON.REASONING), { allowedModels: o } = Hr(), [s, i] = Z(null), [a, l] = Z(!1), [c, d] = Z(!1), {
7776
7793
  state: { oledMode: u }
7777
7794
  } = Q(Ct), {
7778
7795
  dispatch: y,
@@ -7785,7 +7802,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7785
7802
  provider: w,
7786
7803
  privateChat: I
7787
7804
  }
7788
- } = Q(Ie), { state: h, dispatch: S } = Q(Vr), { state: x } = Q(bo), { refetch: E } = Ba({
7805
+ } = Q(Ie), { state: h, dispatch: E } = Q(Gr), { state: x } = Q(bo), { refetch: T } = Ba({
7789
7806
  enabled: !1,
7790
7807
  user: e?.username || "",
7791
7808
  searchString: x.searchString,
@@ -7795,12 +7812,12 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7795
7812
  }), { data: C } = Fe({
7796
7813
  user: e?.username,
7797
7814
  getAccessToken: t
7798
- }), M = J(null), D = J(null), se = J(!1), z = J(0), Y = J(null), O = J(null), de = Va(), [pe, He] = xe(), lt = eh({
7815
+ }), M = J(null), D = J(null), se = J(!1), z = J(0), Y = J(null), O = J(null), de = Va(), [pe, He] = xe(), lt = th({
7799
7816
  oledMode: u,
7800
7817
  placeholderColor: pe(He.Placeholder)
7801
7818
  }), fe = n && C?.showReasoningButton, { setMessages: ut, status: et, id: Ot, sendMessage: Pt, input: Te, setInput: K, messages: ve } = Be({
7802
7819
  onFinish: (U) => {
7803
- E();
7820
+ T();
7804
7821
  const te = U.message?.metadata;
7805
7822
  te?.tokenUsage && y({
7806
7823
  type: Hs,
@@ -7809,7 +7826,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7809
7826
  }
7810
7827
  });
7811
7828
  }
7812
- }), tt = Bm(!!ve.length), oa = X(
7829
+ }), tt = Vm(!!ve.length), oa = X(
7813
7830
  (U) => {
7814
7831
  K(U.target.value);
7815
7832
  },
@@ -7849,27 +7866,27 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7849
7866
  C?.model,
7850
7867
  o
7851
7868
  ]
7852
- ), sn = X(
7869
+ ), an = X(
7853
7870
  async (U) => {
7854
- U === hh && y({
7871
+ U === gh && y({
7855
7872
  type: Xe,
7856
7873
  payload: {
7857
7874
  loading: !1,
7858
7875
  streaming: !1
7859
7876
  }
7860
- }), U === yh && y({
7877
+ }), U === _h && y({
7861
7878
  type: Xe,
7862
7879
  payload: {
7863
7880
  loading: !0,
7864
7881
  streaming: !1
7865
7882
  }
7866
- }), U === gh && y({
7883
+ }), U === vh && y({
7867
7884
  type: Xe,
7868
7885
  payload: {
7869
7886
  loading: !1,
7870
7887
  streaming: !0
7871
7888
  }
7872
- }), U === vh && setTimeout(() => {
7889
+ }), U === yh && setTimeout(() => {
7873
7890
  m || (y({
7874
7891
  type: Xe,
7875
7892
  payload: {
@@ -7889,11 +7906,11 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7889
7906
  [y, ut, m]
7890
7907
  );
7891
7908
  $(() => {
7892
- et && sn(et);
7893
- }, [et, sn]), $(() => {
7909
+ et && an(et);
7910
+ }, [et, an]), $(() => {
7894
7911
  C?.sendOnEnter !== void 0 && d(C.sendOnEnter);
7895
7912
  }, [C]);
7896
- const cr = X(() => {
7913
+ const lr = X(() => {
7897
7914
  if (!O.current)
7898
7915
  return;
7899
7916
  O.current.style.height = "auto";
@@ -7908,9 +7925,9 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7908
7925
  const re = s ? Array.from(s) : [], te = Array.from(U.target.files), rt = [...re];
7909
7926
  let Ge = !1;
7910
7927
  for (const ye of te) {
7911
- const lr = "." + ye.name.split(".").pop()?.toLowerCase();
7912
- We.includes(lr) ? rt.some(
7913
- (ur) => ur.name === ye.name && ur.size === ye.size && ur.lastModified === ye.lastModified
7928
+ const ur = "." + ye.name.split(".").pop()?.toLowerCase();
7929
+ We.includes(ur) ? rt.some(
7930
+ (dr) => dr.name === ye.name && dr.size === ye.size && dr.lastModified === ye.lastModified
7914
7931
  ) || rt.push(ye) : Ge = !0;
7915
7932
  }
7916
7933
  if (D.current && (D.current.value = ""), Ge) {
@@ -7918,16 +7935,16 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7918
7935
  M.current = `Only ${ye} files are allowed.`, l(!0);
7919
7936
  return;
7920
7937
  }
7921
- const Je = await dh(rt);
7922
- if (Xs(Je) > jr) {
7938
+ const Je = await ph(rt);
7939
+ if (Xs(Je) > Br) {
7923
7940
  M.current = `Total file size exceeds the limit of ${Gt(
7924
- jr
7941
+ Br
7925
7942
  )}.`, l(!0);
7926
7943
  return;
7927
7944
  }
7928
7945
  if (Je.length > 0) {
7929
7946
  const ye = new DataTransfer();
7930
- Je.forEach((lr) => ye.items.add(lr)), i(ye.files), y({
7947
+ Je.forEach((ur) => ye.items.add(ur)), i(ye.files), y({
7931
7948
  type: Tt,
7932
7949
  payload: {
7933
7950
  attachments: ye.files.length
@@ -7951,13 +7968,13 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7951
7968
  }), D.current && (D.current.value = "");
7952
7969
  }, la = X(() => {
7953
7970
  D.current && (D.current.value = ""), i(null);
7954
- }, []), an = async (U) => {
7971
+ }, []), cn = async (U) => {
7955
7972
  U.preventDefault(), Lt(O);
7956
7973
  const re = await t();
7957
7974
  let te;
7958
7975
  if (s && s.length > 0) {
7959
7976
  const rt = Array.from(s).map(
7960
- (Je) => Wm(Je)
7977
+ (Je) => Ym(Je)
7961
7978
  ), Ge = new DataTransfer();
7962
7979
  rt.forEach((Je) => Ge.items.add(Je)), te = Ge.files;
7963
7980
  }
@@ -7973,9 +7990,9 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7973
7990
  experimental_attachments: te
7974
7991
  }), la();
7975
7992
  }, ua = (U) => {
7976
- cr(), oa(U);
7993
+ lr(), oa(U);
7977
7994
  };
7978
- return Fr([
7995
+ return Vr([
7979
7996
  [
7980
7997
  "mod+K",
7981
7998
  () => {
@@ -7985,26 +8002,26 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
7985
8002
  ]), $(() => {
7986
8003
  if (h.prompt !== "") {
7987
8004
  const U = h.prompt.endsWith(":") && !h.prompt.endsWith(": ") ? h.prompt + " " : h.prompt;
7988
- U.indexOf(ln) !== -1 ? navigator.clipboard.readText().then((te) => {
8005
+ U.indexOf(un) !== -1 ? navigator.clipboard.readText().then((te) => {
7989
8006
  const Ge = te.startsWith("http://") || te.startsWith("https://") ? te : `"""${te}"""`;
7990
- K(U.replace(ln, Ge));
7991
- }) : K(U), !Pe() && O.current && O.current.focus(), S({
8007
+ K(U.replace(un, Ge));
8008
+ }) : K(U), !Pe() && O.current && O.current.focus(), E({
7992
8009
  type: mo
7993
8010
  });
7994
8011
  }
7995
- }, [h, S, K]), $(() => {
8012
+ }, [h, E, K]), $(() => {
7996
8013
  if (se.current === !1) {
7997
8014
  se.current = !0, !Te && Lt(O);
7998
8015
  return;
7999
8016
  }
8000
8017
  v > 0 && v !== z.current ? (z.current = v, setTimeout(() => {
8001
8018
  O.current && (!Te && Lt(O), O.current.focus());
8002
- }, ph)) : f === !1 && !Te && (Lt(O), !Pe() && O.current && O.current.focus());
8019
+ }, fh)) : f === !1 && !Te && (Lt(O), !Pe() && O.current && O.current.focus());
8003
8020
  }, [v, f, Te]), $(() => {
8004
8021
  h.lastTriggeredTimestamp && setTimeout(() => {
8005
- cr();
8022
+ lr();
8006
8023
  }, 100);
8007
- }, [h.lastTriggeredTimestamp, cr]), $(() => {
8024
+ }, [h.lastTriggeredTimestamp, lr]), $(() => {
8008
8025
  b === 0 && (D.current && (D.current.value = ""), i(null));
8009
8026
  }, [b]), /* @__PURE__ */ N($e, { children: [
8010
8027
  /* @__PURE__ */ p(
@@ -8023,7 +8040,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8023
8040
  children: /* @__PURE__ */ p("p", { className: "m-0", children: M.current })
8024
8041
  }
8025
8042
  ),
8026
- /* @__PURE__ */ p("div", { className: lt.wrapper, ref: Y, children: /* @__PURE__ */ N("form", { onSubmit: an, children: [
8043
+ /* @__PURE__ */ p("div", { className: lt.wrapper, ref: Y, children: /* @__PURE__ */ N("form", { onSubmit: cn, children: [
8027
8044
  /* @__PURE__ */ p("div", { id: de, className: "sr-only", children: _o }),
8028
8045
  /* @__PURE__ */ N("div", { className: "relative pb-3 sm:pb-0", children: [
8029
8046
  /* @__PURE__ */ p(
@@ -8037,7 +8054,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8037
8054
  onChange: ua,
8038
8055
  value: Te,
8039
8056
  onKeyDown: Ga([
8040
- [c ? "enter" : "mod+Enter", an]
8057
+ [c ? "enter" : "mod+Enter", cn]
8041
8058
  ]),
8042
8059
  className: lt.textArea,
8043
8060
  "aria-labelledby": de
@@ -8056,11 +8073,11 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8056
8073
  }
8057
8074
  )
8058
8075
  ] }),
8059
- /* @__PURE__ */ p(th, { files: s, clearFile: ca }),
8076
+ /* @__PURE__ */ p(rh, { files: s, clearFile: ca }),
8060
8077
  /* @__PURE__ */ N("div", { className: "p-2 flex items-center", children: [
8061
- /* @__PURE__ */ p(Fm, { className: "order-7 ml-auto" }),
8078
+ /* @__PURE__ */ p(Bm, { className: "order-7 ml-auto" }),
8062
8079
  /* @__PURE__ */ p(
8063
- hm,
8080
+ gm,
8064
8081
  {
8065
8082
  className: R("order-1 sm:mr-2", {
8066
8083
  "mr-3": fe,
@@ -8069,7 +8086,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8069
8086
  }
8070
8087
  ),
8071
8088
  /* @__PURE__ */ p(
8072
- Um,
8089
+ jm,
8073
8090
  {
8074
8091
  className: R("order-2 sm:mr-2", {
8075
8092
  "mr-3": fe,
@@ -8078,7 +8095,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8078
8095
  }
8079
8096
  ),
8080
8097
  r && /* @__PURE__ */ p(
8081
- mm,
8098
+ hm,
8082
8099
  {
8083
8100
  className: R("order-3 sm:mr-2", {
8084
8101
  "mr-3": fe,
@@ -8087,9 +8104,9 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8087
8104
  onClick: ia
8088
8105
  }
8089
8106
  ),
8090
- fe && /* @__PURE__ */ p(jm, { className: R("order-4 mr-3 sm:mr-2") }),
8107
+ fe && /* @__PURE__ */ p(Fm, { className: R("order-4 mr-3 sm:mr-2") }),
8091
8108
  /* @__PURE__ */ p(
8092
- Zm,
8109
+ Dm,
8093
8110
  {
8094
8111
  className: R("order-5 mr-3 sm:mr-2", {
8095
8112
  "mr-3": fe,
@@ -8100,18 +8117,18 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8100
8117
  ] })
8101
8118
  ] }) })
8102
8119
  ] });
8103
- }, Ut = "--sassy-bottom", bh = ({ isComponent: e }) => {
8120
+ }, Ut = "--sassy-bottom", wh = ({ isComponent: e }) => {
8104
8121
  const {
8105
8122
  state: { loading: t, streaming: r, restoring: n }
8106
8123
  } = Q(Ie), {
8107
8124
  state: { footerHeight: o, footerPosition: s, fullScreen: i },
8108
8125
  dispatch: a
8109
8126
  } = Q(Ct), [l] = Z(
8110
- () => un[Math.floor(Math.random() * un.length)]
8111
- ), { messages: c } = Be(), { height: d } = Wa(), { height: u } = Ya(), [y, g] = Io(), [f, m] = xe(), v = he(() => Pe(), []), b = he(() => qa(), []), w = d - u, I = he(() => {
8112
- const h = v ? Xa : b ? Qa : Eo;
8113
- return w > 70 && w < 500 ? v ? dn / 2 : dn : h;
8114
- }, [w, v, b]);
8127
+ () => dn[Math.floor(Math.random() * dn.length)]
8128
+ ), c = he(() => Pe(), []), d = he(() => Wa(), []), { messages: u } = Be(), [y, g] = Io(), [f, m] = xe(), v = sm(d), { height: b } = Ya(), { height: w } = qa(), I = d ? 0 : b - w, h = he(() => {
8129
+ const E = c ? Xa : d ? Qa : Eo;
8130
+ return c ? I > 70 && I < 500 ? pr / 2 : E : d ? v ? pr : E : I > 0 && I < 100 ? pr : E;
8131
+ }, [I, c, d, v]);
8115
8132
  return $(() => {
8116
8133
  o !== g.height && a({
8117
8134
  type: Ka,
@@ -8119,40 +8136,40 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8119
8136
  footerHeight: g.height
8120
8137
  }
8121
8138
  });
8122
- }, [g.height, o, a]), $(() => {
8139
+ }, [g.height, o, a]), or(() => {
8123
8140
  if (!y || !y.current)
8124
8141
  return;
8125
- const h = y?.current?.style.getPropertyValue(Ut);
8126
- if (s === kr && (t && !r || n) && h !== `${I}px` && (a({
8127
- type: dr,
8142
+ const E = y?.current?.style.getPropertyValue(Ut);
8143
+ if (s === xr && (t && !r || n) && E !== `${h}px` && (y.current.style.setProperty(
8144
+ Ut,
8145
+ `${h}px`
8146
+ ), a({
8147
+ type: fr,
8128
8148
  payload: {
8129
8149
  footerPosition: vt,
8130
- footerOffset: I
8150
+ footerOffset: h
8131
8151
  }
8132
- }), y.current.style.setProperty(
8152
+ })), s === vt && E !== `${h}px` && (y.current.style.setProperty(
8133
8153
  Ut,
8134
- `${I}px`
8135
- )), s === vt && h !== `${I}px` && (a({
8136
- type: dr,
8154
+ `${h}px`
8155
+ ), a({
8156
+ type: fr,
8137
8157
  payload: {
8138
8158
  footerPosition: vt,
8139
- footerOffset: I
8159
+ footerOffset: h
8140
8160
  }
8141
- }), y.current.style.setProperty(
8142
- Ut,
8143
- `${I}px`
8144
- )), !t && !r && !n && c.length === 0 && d > 0 && g.height > 0) {
8145
- const S = `${d - g.height - (e ? 300 : 245)}`;
8146
- h !== `${S}px` && Number(S) > 0 && (a({
8147
- type: dr,
8161
+ })), !t && !r && !n && u.length === 0 && b > 0 && g.height > 0) {
8162
+ const x = `${b - g.height - (e ? 300 : 245)}`;
8163
+ E !== `${x}px` && Number(x) > 0 && (y?.current?.style.setProperty(
8164
+ Ut,
8165
+ `${x}px`
8166
+ ), a({
8167
+ type: fr,
8148
8168
  payload: {
8149
- footerPosition: kr,
8150
- footerOffset: Number(S)
8169
+ footerPosition: xr,
8170
+ footerOffset: Number(x)
8151
8171
  }
8152
- }), y?.current?.style.setProperty(
8153
- Ut,
8154
- `${S}px`
8155
- ));
8172
+ }));
8156
8173
  }
8157
8174
  }, [
8158
8175
  y,
@@ -8160,11 +8177,11 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8160
8177
  r,
8161
8178
  n,
8162
8179
  e,
8163
- c,
8164
- d,
8180
+ u,
8181
+ b,
8165
8182
  g.height,
8166
8183
  s,
8167
- I,
8184
+ h,
8168
8185
  a
8169
8186
  ]), /* @__PURE__ */ p(
8170
8187
  "footer",
@@ -8173,10 +8190,13 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8173
8190
  className: R(
8174
8191
  "border-transparent mt-5",
8175
8192
  "bottom-(--sassy-bottom)",
8176
- nm
8193
+ nm,
8194
+ {
8195
+ "transition-all duration-300 ease-in-out": d
8196
+ }
8177
8197
  ),
8178
- children: /* @__PURE__ */ N("div", { className: Cr({ fullScreen: i }), children: [
8179
- /* @__PURE__ */ p(_h, {}),
8198
+ children: /* @__PURE__ */ N("div", { className: Ar({ fullScreen: i }), children: [
8199
+ /* @__PURE__ */ p(bh, {}),
8180
8200
  /* @__PURE__ */ p(
8181
8201
  "div",
8182
8202
  {
@@ -8190,7 +8210,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8190
8210
  ] })
8191
8211
  }
8192
8212
  );
8193
- }, Tr = [
8213
+ }, kr = [
8194
8214
  {
8195
8215
  id: ri,
8196
8216
  label: "OpenAI",
@@ -8206,13 +8226,13 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8206
8226
  label: "Google Gemini",
8207
8227
  icon: si
8208
8228
  }
8209
- ], wh = ({ className: e }) => {
8229
+ ], Ih = ({ className: e }) => {
8210
8230
  const {
8211
8231
  dispatch: t,
8212
8232
  state: { privateChat: r },
8213
8233
  setChatId: n,
8214
8234
  setInitialMessages: o
8215
- } = Q(Ie), { getAccessToken: s, user: i } = Ee(), { status: a } = Be(), { allowedModels: l, status: c } = Br(), [d, u] = xe(), [y, g] = Z(!1), f = X(() => {
8235
+ } = Q(Ie), { getAccessToken: s, user: i } = Ee(), { status: a } = Be(), { allowedModels: l, status: c } = Hr(), [d, u] = xe(), [y, g] = Z(!1), f = X(() => {
8216
8236
  y || (Bf(), g(!0));
8217
8237
  }, [y]), {
8218
8238
  isSuccess: m,
@@ -8223,14 +8243,14 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8223
8243
  getAccessToken: s
8224
8244
  }), w = he(() => {
8225
8245
  if (pn(l, c)) {
8226
- const z = ei(l), Y = Tr.filter(
8246
+ const z = ei(l), Y = kr.filter(
8227
8247
  (O) => z.includes(
8228
8248
  O.id
8229
8249
  )
8230
8250
  );
8231
- return Y.length > 0 ? Y : Tr;
8251
+ return Y.length > 0 ? Y : kr;
8232
8252
  }
8233
- return Tr;
8253
+ return kr;
8234
8254
  }, [l, c]), I = he(() => pn(l, c) ? ii(l) : /* @__PURE__ */ new Map(), [l, c]), h = he(() => {
8235
8255
  if (!b?.useNestedModelSelection)
8236
8256
  return !1;
@@ -8238,7 +8258,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8238
8258
  if (z.length > 1)
8239
8259
  return !0;
8240
8260
  return !1;
8241
- }, [b?.useNestedModelSelection, I]), S = async (z) => {
8261
+ }, [b?.useNestedModelSelection, I]), E = async (z) => {
8242
8262
  try {
8243
8263
  n(je()), o([]), z !== b?.provider && (await fn({
8244
8264
  provider: z,
@@ -8263,7 +8283,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8263
8283
  accessToken: await s(),
8264
8284
  username: i?.username || ""
8265
8285
  }), v();
8266
- const O = pr[Y] || Y;
8286
+ const O = mr[Y] || Y;
8267
8287
  await rr(
8268
8288
  `${mn} ${z} (${O})`,
8269
8289
  {
@@ -8279,9 +8299,9 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8279
8299
  });
8280
8300
  } catch {
8281
8301
  }
8282
- }, E = b && m, C = E && w.find(
8302
+ }, T = b && m, C = T && w.find(
8283
8303
  (z) => b.provider === z.id
8284
- )?.icon || w[0]?.icon, M = he(() => !b?.useNestedModelSelection || !b?.model || !l || !wo(b.model, l) ? null : pr[b.model] || b.model, [b?.useNestedModelSelection, b?.model, l]), D = /* @__PURE__ */ p($e, { children: /* @__PURE__ */ N(
8304
+ )?.icon || w[0]?.icon, M = he(() => !b?.useNestedModelSelection || !b?.model || !l || !wo(b.model, l) ? null : mr[b.model] || b.model, [b?.useNestedModelSelection, b?.model, l]), D = /* @__PURE__ */ p($e, { children: /* @__PURE__ */ N(
8285
8305
  kt,
8286
8306
  {
8287
8307
  mode: "dark",
@@ -8292,13 +8312,13 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8292
8312
  noBorder: !0,
8293
8313
  noBackground: !0,
8294
8314
  label: "Providers",
8295
- disabled: !E,
8315
+ disabled: !T,
8296
8316
  onMouseEnter: f,
8297
8317
  onFocus: f,
8298
8318
  children: /* @__PURE__ */ p(
8299
8319
  C,
8300
8320
  {
8301
- className: E && a === "streaming" ? "av-pulsate-icon" : d(u.Provider),
8321
+ className: T && a === "streaming" ? "av-pulsate-icon" : d(u.Provider),
8302
8322
  size: Re
8303
8323
  }
8304
8324
  )
@@ -8306,11 +8326,11 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8306
8326
  ),
8307
8327
  defaultPlacement: "top-start",
8308
8328
  children: [
8309
- /* @__PURE__ */ p(Ur, { children: "Providers" }),
8310
- E && w.map((z) => {
8329
+ /* @__PURE__ */ p(Fr, { children: "Providers" }),
8330
+ T && w.map((z) => {
8311
8331
  const Y = I.get(z.id) || [];
8312
8332
  return h && Y.length > 1 ? /* @__PURE__ */ N(kt, { label: z.label, children: [
8313
- /* @__PURE__ */ N(Ur, { children: [
8333
+ /* @__PURE__ */ N(Fr, { children: [
8314
8334
  z.label,
8315
8335
  " Models"
8316
8336
  ] }),
@@ -8318,7 +8338,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8318
8338
  we,
8319
8339
  {
8320
8340
  selected: b.provider === z.id && b.model === de,
8321
- label: pr[de] || de,
8341
+ label: mr[de] || de,
8322
8342
  onClick: () => x(z.id, de)
8323
8343
  },
8324
8344
  de
@@ -8329,7 +8349,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8329
8349
  selected: b.provider === z.id,
8330
8350
  label: z.label,
8331
8351
  icon: /* @__PURE__ */ p(z.icon, {}),
8332
- onClick: () => S(z.id)
8352
+ onClick: () => E(z.id)
8333
8353
  },
8334
8354
  z.id
8335
8355
  );
@@ -8337,7 +8357,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8337
8357
  ]
8338
8358
  }
8339
8359
  ) });
8340
- return E ? /* @__PURE__ */ N("div", { className: "flex items-center", children: [
8360
+ return T ? /* @__PURE__ */ N("div", { className: "flex items-center", children: [
8341
8361
  /* @__PURE__ */ p(
8342
8362
  Ve,
8343
8363
  {
@@ -8359,75 +8379,75 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8359
8379
  }
8360
8380
  )
8361
8381
  ] }) : /* @__PURE__ */ p("div", { className: e, children: D });
8362
- }, Ih = Me(
8382
+ }, Eh = Me(
8363
8383
  () => import(
8364
8384
  /* webpackChunkName: "modal-chunk" */
8365
- "./ProfileEntry.C9QOm9l-.js"
8385
+ "./ProfileEntry.OLQuNVJm.js"
8366
8386
  ).then((e) => ({
8367
8387
  default: e.Profile
8368
8388
  }))
8369
- ), Eh = Me(
8389
+ ), Th = Me(
8370
8390
  () => import(
8371
8391
  /* webpackChunkName: "modal-chunk" */
8372
- "./SettingsEntry.CzbiS7Bz.js"
8392
+ "./SettingsEntry._-U9exEs.js"
8373
8393
  ).then((e) => ({
8374
8394
  default: e.SettingsPanel
8375
8395
  }))
8376
- ), Th = Me(
8396
+ ), Sh = Me(
8377
8397
  () => import(
8378
8398
  /* webpackChunkName: "modal-chunk" */
8379
- "./HistoryEntry.BgHyFwE3.js"
8399
+ "./HistoryEntry.C4JEfMvJ.js"
8380
8400
  ).then((e) => ({
8381
8401
  default: e.HistoryPanel
8382
8402
  }))
8383
- ), Sh = Me(
8403
+ ), kh = Me(
8384
8404
  () => import(
8385
8405
  /* webpackChunkName: "modal-chunk" */
8386
- "./AboutEntry.BJE-bU_N.js"
8406
+ "./AboutEntry.BKljfLAy.js"
8387
8407
  ).then((e) => ({ default: e.About }))
8388
- ), kh = Me(
8408
+ ), Ch = Me(
8389
8409
  () => import(
8390
8410
  /* webpackChunkName: "modal-chunk" */
8391
- "./UsageEntry.CgQaTCNr.js"
8411
+ "./UsageEntry.bjFxMAjP.js"
8392
8412
  ).then((e) => ({ default: e.Usage }))
8393
- ), Ch = Me(
8413
+ ), xh = Me(
8394
8414
  () => import(
8395
8415
  /* webpackChunkName: "modal-chunk" */
8396
- "./UserMemoriesPanel.DTr5Rx1F.js"
8416
+ "./UserMemoriesPanel.BNSUeJdn.js"
8397
8417
  ).then(
8398
8418
  (e) => ({ default: e.default })
8399
8419
  )
8400
- ), xh = ({
8420
+ ), Ah = ({
8401
8421
  open: e,
8402
8422
  onOpenChange: t
8403
8423
  }) => {
8404
8424
  const { user: r } = Ee();
8405
8425
  return /* @__PURE__ */ p(
8406
- Ch,
8426
+ xh,
8407
8427
  {
8408
8428
  open: e,
8409
8429
  onOpenChange: t,
8410
8430
  user: r?.username
8411
8431
  }
8412
8432
  );
8413
- }, Ah = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ p(Wt, { fallback: /* @__PURE__ */ p("div", {}), children: (() => {
8433
+ }, Nh = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ p(Wt, { fallback: /* @__PURE__ */ p("div", {}), children: (() => {
8414
8434
  switch (e) {
8415
8435
  case "profile":
8416
- return /* @__PURE__ */ p(Ih, { open: t, onOpenChange: r });
8417
- case "settings":
8418
8436
  return /* @__PURE__ */ p(Eh, { open: t, onOpenChange: r });
8419
- case "history":
8437
+ case "settings":
8420
8438
  return /* @__PURE__ */ p(Th, { open: t, onOpenChange: r });
8421
- case "about":
8439
+ case "history":
8422
8440
  return /* @__PURE__ */ p(Sh, { open: t, onOpenChange: r });
8423
- case "usage":
8441
+ case "about":
8424
8442
  return /* @__PURE__ */ p(kh, { open: t, onOpenChange: r });
8443
+ case "usage":
8444
+ return /* @__PURE__ */ p(Ch, { open: t, onOpenChange: r });
8425
8445
  case "memories":
8426
- return /* @__PURE__ */ p(xh, { open: t, onOpenChange: r });
8446
+ return /* @__PURE__ */ p(Ah, { open: t, onOpenChange: r });
8427
8447
  default:
8428
8448
  return null;
8429
8449
  }
8430
- })() }) : null, Nh = ({
8450
+ })() }) : null, Oh = ({
8431
8451
  isComponent: e = !1
8432
8452
  }) => {
8433
8453
  const {
@@ -8443,39 +8463,39 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8443
8463
  f || Promise.all([
8444
8464
  import(
8445
8465
  /* webpackChunkName: "modal-chunk" */
8446
- "./ProfileEntry.C9QOm9l-.js"
8466
+ "./ProfileEntry.OLQuNVJm.js"
8447
8467
  ),
8448
8468
  import(
8449
8469
  /* webpackChunkName: "modal-chunk" */
8450
- "./SettingsEntry.CzbiS7Bz.js"
8470
+ "./SettingsEntry._-U9exEs.js"
8451
8471
  ),
8452
8472
  import(
8453
8473
  /* webpackChunkName: "modal-chunk" */
8454
- "./HistoryEntry.BgHyFwE3.js"
8474
+ "./HistoryEntry.C4JEfMvJ.js"
8455
8475
  ),
8456
8476
  import(
8457
8477
  /* webpackChunkName: "modal-chunk" */
8458
- "./AboutEntry.BJE-bU_N.js"
8478
+ "./AboutEntry.BKljfLAy.js"
8459
8479
  ),
8460
8480
  import(
8461
8481
  /* webpackChunkName: "modal-chunk" */
8462
- "./UsageEntry.CgQaTCNr.js"
8482
+ "./UsageEntry.bjFxMAjP.js"
8463
8483
  )
8464
8484
  ]).finally(() => m(!0));
8465
8485
  }, [f]), h = X((M) => {
8466
8486
  u(M);
8467
- }, []), S = X(() => {
8487
+ }, []), E = X(() => {
8468
8488
  u(null);
8469
8489
  }, []), x = X(() => {
8470
8490
  h("settings");
8471
8491
  }, [h]);
8472
8492
  Ys("openSettings", x);
8473
- const E = () => {
8493
+ const T = () => {
8474
8494
  g(!y);
8475
8495
  }, C = X(() => {
8476
8496
  s.clear(), r();
8477
8497
  }, [r, s]);
8478
- return Fr(
8498
+ return Vr(
8479
8499
  [
8480
8500
  [
8481
8501
  "mod+,",
@@ -8506,11 +8526,11 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8506
8526
  }
8507
8527
  ),
8508
8528
  /* @__PURE__ */ p(
8509
- Ah,
8529
+ Nh,
8510
8530
  {
8511
8531
  type: d,
8512
8532
  open: d !== null,
8513
- onOpenChange: S
8533
+ onOpenChange: E
8514
8534
  }
8515
8535
  ),
8516
8536
  /* @__PURE__ */ p(
@@ -8521,14 +8541,14 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8521
8541
  "bg-slate-900/95 dark:bg-slate-900": t
8522
8542
  }),
8523
8543
  children: /* @__PURE__ */ N(
8524
- Sr,
8544
+ Cr,
8525
8545
  {
8526
8546
  alignHorizontal: "space-between",
8527
8547
  alignVertical: "center",
8528
8548
  rowGap: 0,
8529
8549
  columnGap: 0,
8530
8550
  children: [
8531
- /* @__PURE__ */ p(at, { children: /* @__PURE__ */ p(wh, { className: "mr-2" }) }),
8551
+ /* @__PURE__ */ p(at, { children: /* @__PURE__ */ p(Ih, { className: "mr-2" }) }),
8532
8552
  /* @__PURE__ */ p(at, { children: /* @__PURE__ */ p(
8533
8553
  Ve,
8534
8554
  {
@@ -8602,12 +8622,12 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8602
8622
  }
8603
8623
  ),
8604
8624
  !e && /* @__PURE__ */ N($e, { children: [
8605
- /* @__PURE__ */ p(Dm, {}),
8625
+ /* @__PURE__ */ p(Lm, {}),
8606
8626
  /* @__PURE__ */ p(
8607
8627
  we,
8608
8628
  {
8609
8629
  label: "Log out",
8610
- onClick: E,
8630
+ onClick: T,
8611
8631
  icon: /* @__PURE__ */ p("div", { className: "text-red-700", children: /* @__PURE__ */ p(hi, { monotone: !0 }) })
8612
8632
  }
8613
8633
  )
@@ -8623,7 +8643,7 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8623
8643
  }
8624
8644
  )
8625
8645
  ] });
8626
- }, Oh = ({
8646
+ }, Ph = ({
8627
8647
  show: e,
8628
8648
  bottom: t,
8629
8649
  onClick: r,
@@ -8635,7 +8655,8 @@ const Vm = [".png", ".jpg", ".jpeg", ".webp"], Hm = [".pdf", ".txt"], Gm = [
8635
8655
  style: { bottom: `${t}px` },
8636
8656
  className: n || R(
8637
8657
  om,
8638
- "fixed left-1/2 transform -translate-x-1/2 isolate"
8658
+ "fixed left-1/2 transform -translate-x-1/2 isolate",
8659
+ "transition-all duration-300 ease-in-out"
8639
8660
  ),
8640
8661
  children: /* @__PURE__ */ p(
8641
8662
  "button",
@@ -8728,21 +8749,21 @@ const po = "av-spinner", ra = ({ spinnerRef: e, mode: t = "system", type: r = "c
8728
8749
  })
8729
8750
  ]
8730
8751
  });
8731
- }, Ph = Me(
8732
- () => import("./index.BwhIOCQB.js").then((e) => ({ default: e.Bubble }))
8733
- ), on = (e) => /* @__PURE__ */ p(Wt, { fallback: /* @__PURE__ */ p("span", { className: "inline-block" }), children: /* @__PURE__ */ p(Ph, { ...e }) });
8734
- on.displayName = "AsyncBubble";
8735
- const fo = 1, Rh = 150, Mh = Me(
8752
+ }, Rh = Me(
8753
+ () => import("./index.BVmd5Zwm.js").then((e) => ({ default: e.Bubble }))
8754
+ ), sn = (e) => /* @__PURE__ */ p(Wt, { fallback: /* @__PURE__ */ p("span", { className: "inline-block" }), children: /* @__PURE__ */ p(Rh, { ...e }) });
8755
+ sn.displayName = "AsyncBubble";
8756
+ const fo = 1, Mh = 150, zh = Me(
8736
8757
  () => import(
8737
8758
  /* webpackChunkName: "LazyMessageAssistant" */
8738
- "./ChatBubbleAssistant.BknxuERx.js"
8759
+ "./ChatBubbleAssistant.CAcD_Ozt.js"
8739
8760
  )
8740
- ), zh = Me(
8761
+ ), $h = Me(
8741
8762
  () => import(
8742
8763
  /* webpackChunkName: "LazyMessageUser" */
8743
- "./ChatBubbleUser.BclrVW4B.js"
8764
+ "./ChatBubbleUser.C3gcIlG2.js"
8744
8765
  )
8745
- ), $h = ko.memo(
8766
+ ), Zh = ko.memo(
8746
8767
  ({
8747
8768
  role: e,
8748
8769
  content: t,
@@ -8756,7 +8777,7 @@ const fo = 1, Rh = 150, Mh = Me(
8756
8777
  );
8757
8778
  return $(() => {
8758
8779
  if (o && i && t && t.trim().length >= fo) {
8759
- const u = Date.now() - l.current, y = Rh - u;
8780
+ const u = Date.now() - l.current, y = Mh - u;
8760
8781
  if (y > 0) {
8761
8782
  const g = setTimeout(
8762
8783
  () => a(!1),
@@ -8766,8 +8787,8 @@ const fo = 1, Rh = 150, Mh = Me(
8766
8787
  }
8767
8788
  a(!1);
8768
8789
  }
8769
- }, [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(
8770
- Mh,
8790
+ }, [t, i, o]), e === To && t ? /* @__PURE__ */ p(Wt, { fallback: /* @__PURE__ */ p("span", {}), children: /* @__PURE__ */ p($h, { content: t }) }) : e === bt && o && (s === "submitted" || s === "streaming") && i ? /* @__PURE__ */ p(sn, { 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(
8791
+ zh,
8771
8792
  {
8772
8793
  role: e,
8773
8794
  content: t,
@@ -8778,7 +8799,7 @@ const fo = 1, Rh = 150, Mh = Me(
8778
8799
  }
8779
8800
  ) }) : null;
8780
8801
  }
8781
- ), Zh = (e) => {
8802
+ ), Dh = (e) => {
8782
8803
  if (e.parts && Array.isArray(e.parts)) {
8783
8804
  const t = e.parts.filter((r) => r.type === "text").map((r) => r.text).filter(Boolean);
8784
8805
  return t.length > 0 ? t.join(`
@@ -8787,7 +8808,7 @@ const fo = 1, Rh = 150, Mh = Me(
8787
8808
  if ("content" in e && typeof e.content == "string")
8788
8809
  return e.content;
8789
8810
  };
8790
- function Dh(e) {
8811
+ function Lh(e) {
8791
8812
  const t = e.metadata;
8792
8813
  if (t?.model)
8793
8814
  return { model: String(t.model) };
@@ -8801,14 +8822,14 @@ function Dh(e) {
8801
8822
  }
8802
8823
  }
8803
8824
  }
8804
- const Lh = () => {
8825
+ const Uh = () => {
8805
8826
  const { messages: e, status: t } = Be(), 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;
8806
8827
  return e && e.length > 0 ? /* @__PURE__ */ N("div", { className: "space-y-6 mt-2 @container", children: [
8807
8828
  e?.map((s, i) => {
8808
8829
  let a;
8809
- const l = `${i}-${s.role}`, c = Zh(s), d = Dh(s), u = s.role === bt && i === r;
8830
+ const l = `${i}-${s.role}`, c = Dh(s), d = Lh(s), u = s.role === bt && i === r;
8810
8831
  return /* @__PURE__ */ p(
8811
- $h,
8832
+ Zh,
8812
8833
  {
8813
8834
  role: s.role,
8814
8835
  content: c,
@@ -8820,9 +8841,9 @@ const Lh = () => {
8820
8841
  l
8821
8842
  );
8822
8843
  }),
8823
- o && /* @__PURE__ */ p(on, { tail: !0, children: /* @__PURE__ */ p(ra, { type: "dots" }) })
8844
+ o && /* @__PURE__ */ p(sn, { tail: !0, children: /* @__PURE__ */ p(ra, { type: "dots" }) })
8824
8845
  ] }) : null;
8825
- }, Uh = () => {
8846
+ }, jh = () => {
8826
8847
  const { isAuthenticated: e } = Ee(), { ref: t, inViewport: r } = vi(), n = J(null), o = J(null), {
8827
8848
  state: { footerPosition: s, footerHeight: i, footerOffset: a, oledMode: l }
8828
8849
  } = Q(Ct), {
@@ -8851,7 +8872,7 @@ const Lh = () => {
8851
8872
  capabilities: y
8852
8873
  }
8853
8874
  ),
8854
- /* @__PURE__ */ p(Lh, {}),
8875
+ /* @__PURE__ */ p(Uh, {}),
8855
8876
  /* @__PURE__ */ p("div", { ref: t, className: "scroll-marker" }),
8856
8877
  /* @__PURE__ */ p(
8857
8878
  "div",
@@ -8864,7 +8885,7 @@ const Lh = () => {
8864
8885
  )
8865
8886
  ] }),
8866
8887
  /* @__PURE__ */ p(
8867
- Oh,
8888
+ Ph,
8868
8889
  {
8869
8890
  show: !r && s === vt,
8870
8891
  bottom: u.current,
@@ -8896,16 +8917,16 @@ function na({
8896
8917
  key: $i,
8897
8918
  initialValue: !1
8898
8919
  }), w = he(() => ({
8899
- footerPosition: kr,
8920
+ footerPosition: xr,
8900
8921
  footerHeight: 0,
8901
8922
  footerOffset: Pe() ? Eo : 0,
8902
8923
  oledMode: !1,
8903
8924
  fullScreen: !1,
8904
8925
  themeMode: Ei
8905
- }), []), [I, h] = Rt(Ti, w), S = he(() => {
8926
+ }), []), [I, h] = Rt(Ti, w), E = he(() => {
8906
8927
  const pe = Pe(), He = go();
8907
8928
  return pe && He ? "mt-1" : "mt-5";
8908
- }, []), E = {
8929
+ }, []), T = {
8909
8930
  searchString: y,
8910
8931
  sortedCell: g,
8911
8932
  sortDirection: (() => {
@@ -8919,7 +8940,7 @@ function na({
8919
8940
  })()
8920
8941
  }, [C, M] = Rt(
8921
8942
  Gf,
8922
- E
8943
+ T
8923
8944
  ), [D, se] = Rt(Jf, {
8924
8945
  prompt: "",
8925
8946
  lastTriggeredTimestamp: 0
@@ -8939,7 +8960,7 @@ function na({
8939
8960
  }), { data: O } = Fe({
8940
8961
  user: r?.username,
8941
8962
  getAccessToken: n
8942
- }), de = he(() => new rn({
8963
+ }), de = he(() => new nn({
8943
8964
  api: `${vo}/api/generate`,
8944
8965
  // Only include static values in transport body.
8945
8966
  body: {
@@ -8986,9 +9007,9 @@ function na({
8986
9007
  }), sessionStorage.removeItem("sw-toggle-pending"));
8987
9008
  } catch {
8988
9009
  }
8989
- }, []), Gr(() => {
9010
+ }, []), or(() => {
8990
9011
  if (I.footerPosition === "FOOTER_BOTTOM") {
8991
- const pe = S === "mt-1" ? 4 : 20, He = `calc(${a.height}px + ${pe}px)`;
9012
+ const pe = E === "mt-1" ? 4 : 20, He = `calc(${a.height}px + ${pe}px)`;
8992
9013
  s(
8993
9014
  `calc(100svh - ${t}px - ${He} - ${I.footerHeight}px - ${I.footerOffset}px - ${So}px)`
8994
9015
  );
@@ -8996,7 +9017,14 @@ function na({
8996
9017
  s(
8997
9018
  Pe() ? `${Ni}px` : `${gn}px`
8998
9019
  );
8999
- }, [I, a, t, S]), /* @__PURE__ */ p(
9020
+ }, [
9021
+ I.footerPosition,
9022
+ I.footerHeight,
9023
+ I.footerOffset,
9024
+ a.height,
9025
+ t,
9026
+ E
9027
+ ]), /* @__PURE__ */ p(
9000
9028
  bo.Provider,
9001
9029
  {
9002
9030
  value: {
@@ -9004,7 +9032,7 @@ function na({
9004
9032
  dispatch: M
9005
9033
  },
9006
9034
  children: /* @__PURE__ */ p(Ct.Provider, { value: { state: I, dispatch: h }, children: /* @__PURE__ */ p(
9007
- Vr.Provider,
9035
+ Gr.Provider,
9008
9036
  {
9009
9037
  value: { state: D, dispatch: se },
9010
9038
  children: /* @__PURE__ */ p(
@@ -9038,24 +9066,24 @@ function na({
9038
9066
  "header",
9039
9067
  {
9040
9068
  ref: i,
9041
- className: Cr({
9042
- extraClass: S,
9069
+ className: Ar({
9070
+ extraClass: E,
9043
9071
  fullScreen: b
9044
9072
  }),
9045
- children: /* @__PURE__ */ p(Nh, { isComponent: e })
9073
+ children: /* @__PURE__ */ p(Oh, { isComponent: e })
9046
9074
  }
9047
9075
  ),
9048
9076
  /* @__PURE__ */ p(
9049
9077
  "main",
9050
9078
  {
9051
- className: Cr({ fullScreen: b }),
9079
+ className: Ar({ fullScreen: b }),
9052
9080
  style: {
9053
9081
  height: o
9054
9082
  },
9055
- children: /* @__PURE__ */ p(Uh, {})
9083
+ children: /* @__PURE__ */ p(jh, {})
9056
9084
  }
9057
9085
  ),
9058
- /* @__PURE__ */ p(bh, { isComponent: e })
9086
+ /* @__PURE__ */ p(wh, { isComponent: e })
9059
9087
  ]
9060
9088
  }
9061
9089
  )
@@ -9067,22 +9095,22 @@ function na({
9067
9095
  );
9068
9096
  }
9069
9097
  na.displayName = "App";
9070
- const Wh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: na }, Symbol.toStringTag, { value: "Module" }));
9098
+ const Yh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: na }, Symbol.toStringTag, { value: "Module" }));
9071
9099
  export {
9072
- Wh as App,
9073
- on as AsyncBubble,
9074
- Oh as ButtonScroll,
9100
+ Yh as App,
9101
+ sn as AsyncBubble,
9102
+ Ph as ButtonScroll,
9075
9103
  it as CHAT_RESET,
9076
9104
  Tt as CHAT_SET_ATTACHMENTS,
9077
9105
  Xe as CHAT_SET_STATUS,
9078
9106
  St as ConfirmationPanel,
9079
9107
  ro as LazyToastContainerWrapper,
9080
9108
  kt as Menu,
9081
- Ur as MenuGroupLabel,
9109
+ Fr as MenuGroupLabel,
9082
9110
  we as MenuItem,
9083
- km as Panel,
9111
+ Cm as Panel,
9084
9112
  Ve as ResponsiveTooltip,
9085
- $m as Toggle,
9113
+ Zm as Toggle,
9086
9114
  ff as getDefaultExportFromCjs,
9087
9115
  Bf as preloadToast,
9088
9116
  Vf as showErrorToast,