@versini/sassysaint 8.83.1 → 8.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AboutChangelog.mWn6DHnN.js → AboutChangelog.Cmviu4q-.js} +3 -3
- package/dist/chunks/{AboutEntry.CF0h629q.js → AboutEntry.Hi0jo6Cb.js} +5 -5
- package/dist/chunks/{App.ByR7hh4G.js → App.B6stoZHi.js} +823 -820
- package/dist/chunks/{Chart.BOrnLtUH.js → Chart.-Zf5n2lJ.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.BbKm4kCr.js → ChatBubbleAssistant.CJ9ZlMsQ.js} +10 -10
- package/dist/chunks/{ChatBubbleUser.CSd4FUFb.js → ChatBubbleUser.DrAvgLQQ.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.OhJzHZwR.js → ChatHistoryTable.lIRb_XTS.js} +12 -12
- package/dist/chunks/{HistoryEntry.DuHoMXgy.js → HistoryEntry.BkHfgtzh.js} +137 -106
- package/dist/chunks/ProfileEntry.BuGuaJZ7.js +200 -0
- package/dist/chunks/{SettingsEntry.W5dfrzDj.js → SettingsEntry.C5p3uHQS.js} +21 -21
- package/dist/chunks/{UsageEntry.BlC_GEWV.js → UsageEntry.BR0TAHBi.js} +7 -7
- package/dist/chunks/{UserMemoriesPanel.pk5CBYkd.js → UserMemoriesPanel.I6TEjRS_.js} +12 -10
- package/dist/chunks/{index.xYO9MQ7q.js → index.-hZzCrDt.js} +1 -1
- package/dist/chunks/{index.X83cFhfe.js → index.CMqrKzc1.js} +1 -1
- package/dist/chunks/{index.Dm0B1x9v.js → index.DrgEENCo.js} +1 -1
- package/dist/chunks/{index.DosDfPyo.js → index.DuJhOApx.js} +1 -1
- package/dist/chunks/{index.DvwicTLq.js → index.Hwof3Goa.js} +1217 -1271
- package/dist/chunks/{index.eSkzK0sZ.js → index.ZEvOt3IK.js} +2 -2
- package/dist/chunks/{index.LWfh_Nx0.js → index.f-Tyvnqq.js} +1 -1
- package/dist/chunks/{index.C4Kp9caJ.js → index.mKL_Oq89.js} +1 -1
- package/dist/chunks/{index.Dq1H4UoP.js → index.oca08k9S.js} +3 -3
- package/dist/chunks/{useMarkdown.Bxe6gfSy.js → useMarkdown.DSduoaoO.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/chunks/ProfileEntry.CTvtlf06.js +0 -181
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as d, jsxs as A, Fragment as Ae } from "react/jsx-runtime";
|
|
2
|
-
import { ACTION_SORT as oa, e as mt, ACTION_SEARCH as sa, ACTION_RESET_PROMPT as uo, ACTION_TOGGLE_PROMPT as po, useLocalStorage as ke, LOCAL_STORAGE_PREFIX as Me, LOCAL_STORAGE_CHAT_ID as fo, n as me, isDev as aa, isPWAMode as ho, isTauri as yt, useChat as ia, useClickOutside as ca, useInterval as la, useTheme as xe, ButtonIcon as Ie, IconAddLight as ua, DEFAULT_ICON_ACTION_SIZE as Ce, ChatContext as Ee, useUserPreferences as je, useHotkeys as Ur, isProbablyiPhone as $e, IconCloseLight as da, IconEditLight as pa, serverUrl as mo, useEntitlements as jr, IconClose as go, useHaptic as fa, L as Er, j as st, Button as on, LOCAL_STORAGE_PRIVATE_DISCLOSURE as ha,
|
|
3
|
-
import Eo, { useRef as W, useCallback as q, useSyncExternalStore as dr, useEffect as $, useState as M, createContext as Br, useContext as X, forwardRef as Xe, cloneElement as
|
|
4
|
-
import O, { clsx as
|
|
5
|
-
import { computePosition as
|
|
6
|
-
var $o = "vercel.ai.error",
|
|
2
|
+
import { ACTION_SORT as oa, e$1 as mt, ACTION_SEARCH as sa, ACTION_RESET_PROMPT as uo, ACTION_TOGGLE_PROMPT as po, useLocalStorage as ke, LOCAL_STORAGE_PREFIX as Me, LOCAL_STORAGE_CHAT_ID as fo, n as me, isDev as aa, isPWAMode as ho, isTauri as yt, useChat as ia, useClickOutside as ca, useInterval as la, useTheme as xe, ButtonIcon as Ie, IconAddLight as ua, DEFAULT_ICON_ACTION_SIZE as Ce, ChatContext as Ee, useUserPreferences as je, useHotkeys as Ur, isProbablyiPhone as $e, IconCloseLight as da, IconEditLight as pa, serverUrl as mo, useEntitlements as jr, IconClose as go, useHaptic as fa, L as Er, j$1 as st, Button as on, LOCAL_STORAGE_PRIVATE_DISCLOSURE as ha, j as Ht, IconLockedLight as ma, IconUnlockedLight as ga, IconSelected as va, IconUnSelected as ya, IconNext as _a, PromptsContext as Fr, IconBookSparklesLight as ba, IconRewrite as wa, IconProofread as Ia, IconMagic as Ea, LOCAL_STORAGE_REASONING_DISCLOSURE as Ta, IconLightBulbLight as Sa, useSaveChat as ka, IconDownloadLight as Ca, TOAST_CHAT_SAVED as xa, IconSendLight as Aa, AppContext as St, HistoryContext as vo, useChatsHistory as Na, useUniqueId as Oa, PROMPT_EDITABLE_AREA_CLASSNAME as Pa, PROMPT_CLASSNAME as za, q as yo, ERROR_MESSAGE as Ra, o as _t, CLIPBOARD_PROMPT as sn, INPUT_PLACEHOLDER_TEXT_MOBILE as an, INPUT_PLACEHOLDER_TEXT_ENTER as cn, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as ln, isProbablyMobile as Tr, getHotkeyHandler as Ma, Y as $a, FOOTER_DISCLAIMERS as un, useViewportSize as Za, useVisualViewportSize as Da, useResizeObserver as _o, isProbablyiPad as La, INPUT_BOTTOM_OFFSET_EXTRA as dn, INPUT_BOTTOM_OFFSET_IPHONE as Ua, INPUT_BOTTOM_OFFSET_IPAD as ja, INPUT_BOTTOM_OFFSET as bo, APP_SET_FOOTER_HEIGHT as Fa, FOOTER_TOP as Sr, FOOTER_BOTTOM as gt, APP_SET_FOOTER_POSITION as lr, getLayoutPaddingClass as kr, canEvaluateModels as pn, X as Ba, IconOpenAI as Va, l as Ha, IconAnthropic as Ga, _ as Ja, IconGoogleGemini as Wa, R as Ya, z as qa, H as ur, setNewProvider as fn, TOAST_PROVIDER_CHANGED as hn, useQueryClient as Xa, LOG_OUT as mn, IconProfile as Ka, IconSliders as Qa, IconHistory as ei, IconEditUser as ti, IconChart as ri, IconInfo as ni, IconBack as oi, IconSettings as si, i as wo, O as gn, useInViewport as ai, useServerCapabilities as ii, getMessageContaintWrapperClass as ci, UI_FOOTER_BUFFER as Io, UI_BUTTON_SCROLL_BUFFER as li, Logo as ui, UI_DEFAULT_MAIN_HEIGHT as vn, e as di, appReducer as pi, applyOledMode as fi, APP_SET_OLED_MODE as hi, APP_SET_FULL_SCREEN as mi, APP_SET_THEME_MODE as gi, APP_SET_THEME_PALETTE as vi, UI_DEFAULT_MAIN_HEIGHT_IPHONE as yi, APP_CLASSNAME as _i, B as yn, k as bi, LOCAL_STORAGE_SORT as wi, LOCAL_STORAGE_SEARCH as Ii, LOCAL_STORAGE_OLED_MODE as Ei, LOCAL_STORAGE_FULL_SCREEN as Ti, LOCAL_STORAGE_SORT_TIMESTAMP as Si, LOCAL_STORAGE_SORT_TOKEN_USAGE as ki, TOAST_CACHE_ENABLED as Ci, TOAST_CACHE_DISABLED as xi } from "./index.Hwof3Goa.js";
|
|
3
|
+
import Eo, { useRef as W, useCallback as q, useSyncExternalStore as dr, useEffect as $, useState as M, createContext as Br, useContext as X, forwardRef as Xe, cloneElement as Ai, useId as To, useLayoutEffect as Vr, useMemo as we, Suspense as Gt, lazy as Oe, useReducer as Pt } from "react";
|
|
4
|
+
import O, { clsx as Ni } from "clsx";
|
|
5
|
+
import { computePosition as Oi, offset as So, flip as ko, shift as Co, arrow as Pi, useMergeRefs as Hr, FloatingPortal as Cr, FloatingOverlay as zi, FloatingFocusManager as xr, useFloating as xo, useClick as Ao, useDismiss as No, useRole as Oo, useInteractions as Po, useFloatingParentNodeId as zo, FloatingTree as Ri, useListItem as Ro, useFloatingTree as Mo, useFloatingNodeId as Mi, autoUpdate as $i, useHover as Zi, safePolygon as Di, useListNavigation as Li, useTypeahead as Ui, FloatingNode as _n, FloatingList as bn } from "@floating-ui/react";
|
|
6
|
+
var $o = "vercel.ai.error", ji = Symbol.for($o), Zo, Fi = class Do extends Error {
|
|
7
7
|
/**
|
|
8
8
|
* Creates an AI SDK Error.
|
|
9
9
|
*
|
|
@@ -32,12 +32,12 @@ var $o = "vercel.ai.error", Ui = Symbol.for($o), Zo, ji = class Do extends Error
|
|
|
32
32
|
return t != null && typeof t == "object" && n in t && typeof t[n] == "boolean" && t[n] === !0;
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
Zo =
|
|
36
|
-
var Ze =
|
|
35
|
+
Zo = ji;
|
|
36
|
+
var Ze = Fi;
|
|
37
37
|
function Lo(e) {
|
|
38
38
|
return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.message : JSON.stringify(e);
|
|
39
39
|
}
|
|
40
|
-
var Uo = "AI_InvalidArgumentError", jo = `vercel.ai.error.${Uo}`,
|
|
40
|
+
var Uo = "AI_InvalidArgumentError", jo = `vercel.ai.error.${Uo}`, Bi = Symbol.for(jo), Fo, Vi = class extends Ze {
|
|
41
41
|
constructor({
|
|
42
42
|
message: e,
|
|
43
43
|
cause: t,
|
|
@@ -49,8 +49,8 @@ var Uo = "AI_InvalidArgumentError", jo = `vercel.ai.error.${Uo}`, Fi = Symbol.fo
|
|
|
49
49
|
return Ze.hasMarker(e, jo);
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
Fo =
|
|
53
|
-
var Bo = "AI_JSONParseError", Vo = `vercel.ai.error.${Bo}`,
|
|
52
|
+
Fo = Bi;
|
|
53
|
+
var Bo = "AI_JSONParseError", Vo = `vercel.ai.error.${Bo}`, Hi = Symbol.for(Vo), Ho, wn = class extends Ze {
|
|
54
54
|
constructor({ text: e, cause: t }) {
|
|
55
55
|
super({
|
|
56
56
|
name: Bo,
|
|
@@ -63,8 +63,8 @@ Error message: ${Lo(t)}`,
|
|
|
63
63
|
return Ze.hasMarker(e, Vo);
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
-
Ho =
|
|
67
|
-
var Go = "AI_TypeValidationError", Jo = `vercel.ai.error.${Go}`,
|
|
66
|
+
Ho = Hi;
|
|
67
|
+
var Go = "AI_TypeValidationError", Jo = `vercel.ai.error.${Go}`, Gi = Symbol.for(Jo), Wo, Ji = class Ar extends Ze {
|
|
68
68
|
constructor({ value: t, cause: r }) {
|
|
69
69
|
super({
|
|
70
70
|
name: Go,
|
|
@@ -93,8 +93,8 @@ Error message: ${Lo(r)}`,
|
|
|
93
93
|
return Ar.isInstance(r) && r.value === t ? r : new Ar({ value: t, cause: r });
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
Wo =
|
|
97
|
-
var Jt =
|
|
96
|
+
Wo = Gi;
|
|
97
|
+
var Jt = Ji;
|
|
98
98
|
class In extends Error {
|
|
99
99
|
constructor(t, r) {
|
|
100
100
|
super(t), this.name = "ParseError", this.type = r.type, this.field = r.field, this.value = r.value, this.line = r.line;
|
|
@@ -102,7 +102,7 @@ class In extends Error {
|
|
|
102
102
|
}
|
|
103
103
|
function pr(e) {
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function Wi(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}`?"
|
|
@@ -110,7 +110,7 @@ function Ji(e) {
|
|
|
110
110
|
const { onEvent: t = pr, onError: r = pr, onRetry: n = pr, onComment: o } = e;
|
|
111
111
|
let s = "", i = !0, a, l = "", c = "";
|
|
112
112
|
function p(f) {
|
|
113
|
-
const y = i ? f.replace(/^\xEF\xBB\xBF/, "") : f, [w, b] =
|
|
113
|
+
const y = i ? f.replace(/^\xEF\xBB\xBF/, "") : f, [w, b] = Yi(`${s}${y}`);
|
|
114
114
|
for (const I of w)
|
|
115
115
|
u(I);
|
|
116
116
|
s = b, i = !1;
|
|
@@ -178,7 +178,7 @@ function Ji(e) {
|
|
|
178
178
|
}
|
|
179
179
|
return { feed: p, reset: h };
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function Yi(e) {
|
|
182
182
|
const t = [];
|
|
183
183
|
let r = "", n = 0;
|
|
184
184
|
for (; n < e.length; ) {
|
|
@@ -196,12 +196,12 @@ function Wi(e) {
|
|
|
196
196
|
}
|
|
197
197
|
return [t, r];
|
|
198
198
|
}
|
|
199
|
-
class
|
|
199
|
+
class qi extends TransformStream {
|
|
200
200
|
constructor({ onError: t, onRetry: r, onComment: n } = {}) {
|
|
201
201
|
let o;
|
|
202
202
|
super({
|
|
203
203
|
start(s) {
|
|
204
|
-
o =
|
|
204
|
+
o = Wi({
|
|
205
205
|
onEvent: (i) => {
|
|
206
206
|
s.enqueue(i);
|
|
207
207
|
},
|
|
@@ -258,7 +258,7 @@ function qo(e) {
|
|
|
258
258
|
const t = Object.values(e).filter((n) => typeof n == "number");
|
|
259
259
|
return Object.entries(e).filter(([n, o]) => t.indexOf(+n) === -1).map(([n, o]) => o);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Xi(e, t) {
|
|
262
262
|
return typeof t == "bigint" ? t.toString() : t;
|
|
263
263
|
}
|
|
264
264
|
function Gr(e) {
|
|
@@ -278,7 +278,7 @@ function Wr(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
|
}
|
|
281
|
-
function
|
|
281
|
+
function Ki(e, t) {
|
|
282
282
|
const r = (e.toString().split(".")[1] || "").length, n = (t.toString().split(".")[1] || "").length, o = r > n ? r : n, s = Number.parseInt(e.toFixed(o).replace(".", "")), i = Number.parseInt(t.toFixed(o).replace(".", ""));
|
|
283
283
|
return s % i / 10 ** o;
|
|
284
284
|
}
|
|
@@ -315,7 +315,7 @@ const Xo = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
|
|
|
315
315
|
function Wt(e) {
|
|
316
316
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
317
317
|
}
|
|
318
|
-
const
|
|
318
|
+
const Qi = Gr(() => {
|
|
319
319
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
320
320
|
return !1;
|
|
321
321
|
try {
|
|
@@ -334,7 +334,7 @@ function Yt(e) {
|
|
|
334
334
|
const r = t.prototype;
|
|
335
335
|
return !(Wt(r) === !1 || Object.prototype.hasOwnProperty.call(r, "isPrototypeOf") === !1);
|
|
336
336
|
}
|
|
337
|
-
const
|
|
337
|
+
const ec = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
338
338
|
function kt(e) {
|
|
339
339
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
340
340
|
}
|
|
@@ -355,17 +355,17 @@ function E(e) {
|
|
|
355
355
|
}
|
|
356
356
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function tc(e) {
|
|
359
359
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
360
360
|
}
|
|
361
|
-
const
|
|
361
|
+
const rc = {
|
|
362
362
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
363
363
|
int32: [-2147483648, 2147483647],
|
|
364
364
|
uint32: [0, 4294967295],
|
|
365
365
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
366
366
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
367
367
|
};
|
|
368
|
-
function
|
|
368
|
+
function nc(e, t) {
|
|
369
369
|
const r = {}, n = e._zod.def;
|
|
370
370
|
for (const o in t) {
|
|
371
371
|
if (!(o in n.shape))
|
|
@@ -378,7 +378,7 @@ function rc(e, t) {
|
|
|
378
378
|
checks: []
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function oc(e, t) {
|
|
382
382
|
const r = { ...e._zod.def.shape }, n = e._zod.def;
|
|
383
383
|
for (const o in t) {
|
|
384
384
|
if (!(o in n.shape))
|
|
@@ -391,7 +391,7 @@ function nc(e, t) {
|
|
|
391
391
|
checks: []
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function sc(e, t) {
|
|
395
395
|
if (!Yt(t))
|
|
396
396
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
397
397
|
const r = {
|
|
@@ -405,7 +405,7 @@ function oc(e, t) {
|
|
|
405
405
|
};
|
|
406
406
|
return Ke(e, r);
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function ac(e, t) {
|
|
409
409
|
return Ke(e, {
|
|
410
410
|
...e._zod.def,
|
|
411
411
|
get shape() {
|
|
@@ -417,7 +417,7 @@ function sc(e, t) {
|
|
|
417
417
|
// delete existing checks
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function ic(e, t, r) {
|
|
421
421
|
const n = t._zod.def.shape, o = { ...n };
|
|
422
422
|
if (r)
|
|
423
423
|
for (const s in r) {
|
|
@@ -440,7 +440,7 @@ function ac(e, t, r) {
|
|
|
440
440
|
checks: []
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function cc(e, t, r) {
|
|
444
444
|
const n = t._zod.def.shape, o = { ...n };
|
|
445
445
|
if (r)
|
|
446
446
|
for (const s in r) {
|
|
@@ -476,13 +476,13 @@ function We(e, t) {
|
|
|
476
476
|
return (n = r).path ?? (n.path = []), r.path.unshift(e), r;
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function zt(e) {
|
|
480
480
|
return typeof e == "string" ? e : e?.message;
|
|
481
481
|
}
|
|
482
482
|
function Le(e, t, r) {
|
|
483
483
|
const n = { ...e, path: e.path ?? [] };
|
|
484
484
|
if (!e.message) {
|
|
485
|
-
const o =
|
|
485
|
+
const o = zt(e.inst?._zod.def?.error?.(e)) ?? zt(t?.error?.(e)) ?? zt(r.customError?.(e)) ?? zt(r.localeError?.(e)) ?? "Invalid input";
|
|
486
486
|
n.message = o;
|
|
487
487
|
}
|
|
488
488
|
return delete n.inst, delete n.continue, t?.reportInput || delete n.input, n;
|
|
@@ -508,7 +508,7 @@ const Ko = (e, t) => {
|
|
|
508
508
|
enumerable: !1
|
|
509
509
|
}), Object.defineProperty(e, "message", {
|
|
510
510
|
get() {
|
|
511
|
-
return JSON.stringify(t,
|
|
511
|
+
return JSON.stringify(t, Xi, 2);
|
|
512
512
|
},
|
|
513
513
|
enumerable: !0
|
|
514
514
|
// configurable: false,
|
|
@@ -517,13 +517,13 @@ const Ko = (e, t) => {
|
|
|
517
517
|
enumerable: !1
|
|
518
518
|
});
|
|
519
519
|
}, Qo = _("$ZodError", Ko), es = _("$ZodError", Ko, { Parent: Error });
|
|
520
|
-
function
|
|
520
|
+
function lc(e, t = (r) => r.message) {
|
|
521
521
|
const r = {}, n = [];
|
|
522
522
|
for (const o of e.issues)
|
|
523
523
|
o.path.length > 0 ? (r[o.path[0]] = r[o.path[0]] || [], r[o.path[0]].push(t(o))) : n.push(t(o));
|
|
524
524
|
return { formErrors: n, fieldErrors: r };
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function uc(e, t) {
|
|
527
527
|
const r = t || function(s) {
|
|
528
528
|
return s.message;
|
|
529
529
|
}, n = { _errors: [] }, o = (s) => {
|
|
@@ -546,7 +546,7 @@ function lc(e, t) {
|
|
|
546
546
|
};
|
|
547
547
|
return o(e), n;
|
|
548
548
|
}
|
|
549
|
-
const
|
|
549
|
+
const dc = (e) => (t, r, n, o) => {
|
|
550
550
|
const s = n ? Object.assign(n, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: r, issues: [] }, s);
|
|
551
551
|
if (i instanceof Promise)
|
|
552
552
|
throw new bt();
|
|
@@ -555,7 +555,7 @@ const uc = (e) => (t, r, n, o) => {
|
|
|
555
555
|
throw Xo(a, o?.callee), a;
|
|
556
556
|
}
|
|
557
557
|
return i.value;
|
|
558
|
-
},
|
|
558
|
+
}, pc = (e) => async (t, r, n, o) => {
|
|
559
559
|
const s = n ? Object.assign(n, { async: !0 }) : { async: !0 };
|
|
560
560
|
let i = t._zod.run({ value: r, issues: [] }, s);
|
|
561
561
|
if (i instanceof Promise && (i = await i), i.issues.length) {
|
|
@@ -571,35 +571,35 @@ const uc = (e) => (t, r, n, o) => {
|
|
|
571
571
|
success: !1,
|
|
572
572
|
error: new (e ?? Qo)(s.issues.map((i) => Le(i, o, De())))
|
|
573
573
|
} : { success: !0, data: s.value };
|
|
574
|
-
},
|
|
574
|
+
}, fc = /* @__PURE__ */ ts(es), rs = (e) => async (t, r, n) => {
|
|
575
575
|
const o = n ? Object.assign(n, { async: !0 }) : { async: !0 };
|
|
576
576
|
let s = t._zod.run({ value: r, issues: [] }, o);
|
|
577
577
|
return s instanceof Promise && (s = await s), s.issues.length ? {
|
|
578
578
|
success: !1,
|
|
579
579
|
error: new e(s.issues.map((i) => Le(i, o, De())))
|
|
580
580
|
} : { success: !0, data: s.value };
|
|
581
|
-
},
|
|
582
|
-
function
|
|
583
|
-
return new RegExp(
|
|
581
|
+
}, hc = /* @__PURE__ */ rs(es), mc = /^[cC][^\s-]{8,}$/, gc = /^[0-9a-z]+$/, vc = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, yc = /^[0-9a-vA-V]{20}$/, _c = /^[A-Za-z0-9]{27}$/, bc = /^[a-zA-Z0-9_-]{21}$/, wc = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Ic = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, En = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/, Ec = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Tc = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
582
|
+
function Sc() {
|
|
583
|
+
return new RegExp(Tc, "u");
|
|
584
584
|
}
|
|
585
|
-
const
|
|
585
|
+
const kc = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Cc = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/, xc = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Ac = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Nc = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ns = /^[A-Za-z0-9_-]*$/, Oc = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, Pc = /^\+(?:[0-9]){6,14}[0-9]$/, os = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", zc = /* @__PURE__ */ new RegExp(`^${os}$`);
|
|
586
586
|
function ss(e) {
|
|
587
587
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
588
588
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function Rc(e) {
|
|
591
591
|
return new RegExp(`^${ss(e)}$`);
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function Mc(e) {
|
|
594
594
|
const t = ss({ precision: e.precision }), r = ["Z"];
|
|
595
595
|
e.local && r.push(""), e.offset && r.push("([+-]\\d{2}:\\d{2})");
|
|
596
596
|
const n = `${t}(?:${r.join("|")})`;
|
|
597
597
|
return new RegExp(`^${os}T(?:${n})$`);
|
|
598
598
|
}
|
|
599
|
-
const
|
|
599
|
+
const $c = (e) => {
|
|
600
600
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
601
601
|
return new RegExp(`^${t}$`);
|
|
602
|
-
},
|
|
602
|
+
}, Zc = /^\d+$/, Dc = /^-?\d+(?:\.\d+)?/i, Lc = /true|false/i, Uc = /null/i, jc = /^[^A-Z]*$/, Fc = /^[^a-z]*$/, ce = /* @__PURE__ */ _("$ZodCheck", (e, t) => {
|
|
603
603
|
var r;
|
|
604
604
|
e._zod ?? (e._zod = {}), e._zod.def = t, (r = e._zod).onattach ?? (r.onattach = []);
|
|
605
605
|
}), as = {
|
|
@@ -640,14 +640,14 @@ const Mc = (e) => {
|
|
|
640
640
|
continue: !t.abort
|
|
641
641
|
});
|
|
642
642
|
};
|
|
643
|
-
}),
|
|
643
|
+
}), Bc = /* @__PURE__ */ _("$ZodCheckMultipleOf", (e, t) => {
|
|
644
644
|
ce.init(e, t), e._zod.onattach.push((r) => {
|
|
645
645
|
var n;
|
|
646
646
|
(n = r._zod.bag).multipleOf ?? (n.multipleOf = t.value);
|
|
647
647
|
}), e._zod.check = (r) => {
|
|
648
648
|
if (typeof r.value != typeof t.value)
|
|
649
649
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
650
|
-
(typeof r.value == "bigint" ? r.value % t.value === BigInt(0) :
|
|
650
|
+
(typeof r.value == "bigint" ? r.value % t.value === BigInt(0) : Ki(r.value, t.value) === 0) || r.issues.push({
|
|
651
651
|
origin: typeof r.value,
|
|
652
652
|
code: "not_multiple_of",
|
|
653
653
|
divisor: t.value,
|
|
@@ -656,12 +656,12 @@ const Mc = (e) => {
|
|
|
656
656
|
continue: !t.abort
|
|
657
657
|
});
|
|
658
658
|
};
|
|
659
|
-
}),
|
|
659
|
+
}), Vc = /* @__PURE__ */ _("$ZodCheckNumberFormat", (e, t) => {
|
|
660
660
|
ce.init(e, t), t.format = t.format || "float64";
|
|
661
|
-
const r = t.format?.includes("int"), n = r ? "int" : "number", [o, s] =
|
|
661
|
+
const r = t.format?.includes("int"), n = r ? "int" : "number", [o, s] = rc[t.format];
|
|
662
662
|
e._zod.onattach.push((i) => {
|
|
663
663
|
const a = i._zod.bag;
|
|
664
|
-
a.format = t.format, a.minimum = o, a.maximum = s, r && (a.pattern =
|
|
664
|
+
a.format = t.format, a.minimum = o, a.maximum = s, r && (a.pattern = Zc);
|
|
665
665
|
}), e._zod.check = (i) => {
|
|
666
666
|
const a = i.value;
|
|
667
667
|
if (r) {
|
|
@@ -712,7 +712,7 @@ const Mc = (e) => {
|
|
|
712
712
|
inst: e
|
|
713
713
|
});
|
|
714
714
|
};
|
|
715
|
-
}),
|
|
715
|
+
}), Hc = /* @__PURE__ */ _("$ZodCheckMaxLength", (e, t) => {
|
|
716
716
|
var r;
|
|
717
717
|
ce.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
|
|
718
718
|
const o = n.value;
|
|
@@ -735,7 +735,7 @@ const Mc = (e) => {
|
|
|
735
735
|
continue: !t.abort
|
|
736
736
|
});
|
|
737
737
|
};
|
|
738
|
-
}),
|
|
738
|
+
}), Gc = /* @__PURE__ */ _("$ZodCheckMinLength", (e, t) => {
|
|
739
739
|
var r;
|
|
740
740
|
ce.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
|
|
741
741
|
const o = n.value;
|
|
@@ -758,7 +758,7 @@ const Mc = (e) => {
|
|
|
758
758
|
continue: !t.abort
|
|
759
759
|
});
|
|
760
760
|
};
|
|
761
|
-
}),
|
|
761
|
+
}), Jc = /* @__PURE__ */ _("$ZodCheckLengthEquals", (e, t) => {
|
|
762
762
|
var r;
|
|
763
763
|
ce.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
|
|
764
764
|
const o = n.value;
|
|
@@ -798,7 +798,7 @@ const Mc = (e) => {
|
|
|
798
798
|
});
|
|
799
799
|
}) : (n = e._zod).check ?? (n.check = () => {
|
|
800
800
|
});
|
|
801
|
-
}),
|
|
801
|
+
}), Wc = /* @__PURE__ */ _("$ZodCheckRegex", (e, t) => {
|
|
802
802
|
rr.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",
|
|
@@ -810,11 +810,11 @@ const Mc = (e) => {
|
|
|
810
810
|
continue: !t.abort
|
|
811
811
|
});
|
|
812
812
|
};
|
|
813
|
-
}),
|
|
814
|
-
t.pattern ?? (t.pattern = Uc), rr.init(e, t);
|
|
815
|
-
}), Yc = /* @__PURE__ */ _("$ZodCheckUpperCase", (e, t) => {
|
|
813
|
+
}), Yc = /* @__PURE__ */ _("$ZodCheckLowerCase", (e, t) => {
|
|
816
814
|
t.pattern ?? (t.pattern = jc), rr.init(e, t);
|
|
817
|
-
}), qc = /* @__PURE__ */ _("$
|
|
815
|
+
}), qc = /* @__PURE__ */ _("$ZodCheckUpperCase", (e, t) => {
|
|
816
|
+
t.pattern ?? (t.pattern = Fc), rr.init(e, t);
|
|
817
|
+
}), Xc = /* @__PURE__ */ _("$ZodCheckIncludes", (e, t) => {
|
|
818
818
|
ce.init(e, t);
|
|
819
819
|
const r = kt(t.includes), n = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${r}` : r);
|
|
820
820
|
t.pattern = n, e._zod.onattach.push((o) => {
|
|
@@ -831,7 +831,7 @@ const Mc = (e) => {
|
|
|
831
831
|
continue: !t.abort
|
|
832
832
|
});
|
|
833
833
|
};
|
|
834
|
-
}),
|
|
834
|
+
}), Kc = /* @__PURE__ */ _("$ZodCheckStartsWith", (e, t) => {
|
|
835
835
|
ce.init(e, t);
|
|
836
836
|
const r = new RegExp(`^${kt(t.prefix)}.*`);
|
|
837
837
|
t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
|
|
@@ -848,7 +848,7 @@ const Mc = (e) => {
|
|
|
848
848
|
continue: !t.abort
|
|
849
849
|
});
|
|
850
850
|
};
|
|
851
|
-
}),
|
|
851
|
+
}), Qc = /* @__PURE__ */ _("$ZodCheckEndsWith", (e, t) => {
|
|
852
852
|
ce.init(e, t);
|
|
853
853
|
const r = new RegExp(`.*${kt(t.suffix)}$`);
|
|
854
854
|
t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
|
|
@@ -865,12 +865,12 @@ const Mc = (e) => {
|
|
|
865
865
|
continue: !t.abort
|
|
866
866
|
});
|
|
867
867
|
};
|
|
868
|
-
}),
|
|
868
|
+
}), el = /* @__PURE__ */ _("$ZodCheckOverwrite", (e, t) => {
|
|
869
869
|
ce.init(e, t), e._zod.check = (r) => {
|
|
870
870
|
r.value = t.tx(r.value);
|
|
871
871
|
};
|
|
872
872
|
});
|
|
873
|
-
class
|
|
873
|
+
class tl {
|
|
874
874
|
constructor(t = []) {
|
|
875
875
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
876
876
|
}
|
|
@@ -893,13 +893,13 @@ class el {
|
|
|
893
893
|
`));
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
|
-
const
|
|
896
|
+
const rl = {
|
|
897
897
|
major: 4,
|
|
898
898
|
minor: 0,
|
|
899
899
|
patch: 0
|
|
900
900
|
}, j = /* @__PURE__ */ _("$ZodType", (e, t) => {
|
|
901
901
|
var r;
|
|
902
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
902
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = rl;
|
|
903
903
|
const n = [...e._zod.def.checks ?? []];
|
|
904
904
|
e._zod.traits.has("$ZodCheck") && n.unshift(e);
|
|
905
905
|
for (const o of n)
|
|
@@ -946,17 +946,17 @@ const tl = {
|
|
|
946
946
|
e["~standard"] = {
|
|
947
947
|
validate: (o) => {
|
|
948
948
|
try {
|
|
949
|
-
const s =
|
|
949
|
+
const s = fc(e, o);
|
|
950
950
|
return s.success ? { value: s.data } : { issues: s.error?.issues };
|
|
951
951
|
} catch {
|
|
952
|
-
return
|
|
952
|
+
return hc(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
|
|
953
953
|
}
|
|
954
954
|
},
|
|
955
955
|
vendor: "zod",
|
|
956
956
|
version: 1
|
|
957
957
|
};
|
|
958
958
|
}), qr = /* @__PURE__ */ _("$ZodString", (e, t) => {
|
|
959
|
-
j.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
959
|
+
j.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? $c(e._zod.bag), e._zod.parse = (r, n) => {
|
|
960
960
|
if (t.coerce)
|
|
961
961
|
try {
|
|
962
962
|
r.value = String(r.value);
|
|
@@ -971,9 +971,9 @@ const tl = {
|
|
|
971
971
|
};
|
|
972
972
|
}), V = /* @__PURE__ */ _("$ZodStringFormat", (e, t) => {
|
|
973
973
|
rr.init(e, t), qr.init(e, t);
|
|
974
|
-
}),
|
|
975
|
-
t.pattern ?? (t.pattern =
|
|
976
|
-
}),
|
|
974
|
+
}), nl = /* @__PURE__ */ _("$ZodGUID", (e, t) => {
|
|
975
|
+
t.pattern ?? (t.pattern = Ic), V.init(e, t);
|
|
976
|
+
}), ol = /* @__PURE__ */ _("$ZodUUID", (e, t) => {
|
|
977
977
|
if (t.version) {
|
|
978
978
|
const n = {
|
|
979
979
|
v1: 1,
|
|
@@ -991,9 +991,9 @@ const tl = {
|
|
|
991
991
|
} else
|
|
992
992
|
t.pattern ?? (t.pattern = En());
|
|
993
993
|
V.init(e, t);
|
|
994
|
-
}),
|
|
995
|
-
t.pattern ?? (t.pattern =
|
|
996
|
-
}),
|
|
994
|
+
}), sl = /* @__PURE__ */ _("$ZodEmail", (e, t) => {
|
|
995
|
+
t.pattern ?? (t.pattern = Ec), V.init(e, t);
|
|
996
|
+
}), al = /* @__PURE__ */ _("$ZodURL", (e, t) => {
|
|
997
997
|
V.init(e, t), e._zod.check = (r) => {
|
|
998
998
|
try {
|
|
999
999
|
const n = r.value, o = new URL(n), s = o.href;
|
|
@@ -1001,7 +1001,7 @@ const tl = {
|
|
|
1001
1001
|
code: "invalid_format",
|
|
1002
1002
|
format: "url",
|
|
1003
1003
|
note: "Invalid hostname",
|
|
1004
|
-
pattern:
|
|
1004
|
+
pattern: Oc.source,
|
|
1005
1005
|
input: r.value,
|
|
1006
1006
|
inst: e,
|
|
1007
1007
|
continue: !t.abort
|
|
@@ -1025,35 +1025,35 @@ const tl = {
|
|
|
1025
1025
|
});
|
|
1026
1026
|
}
|
|
1027
1027
|
};
|
|
1028
|
-
}),
|
|
1029
|
-
t.pattern ?? (t.pattern =
|
|
1030
|
-
}),
|
|
1031
|
-
t.pattern ?? (t.pattern =
|
|
1032
|
-
}),
|
|
1033
|
-
t.pattern ?? (t.pattern = hc), V.init(e, t);
|
|
1034
|
-
}), ll = /* @__PURE__ */ _("$ZodCUID2", (e, t) => {
|
|
1028
|
+
}), il = /* @__PURE__ */ _("$ZodEmoji", (e, t) => {
|
|
1029
|
+
t.pattern ?? (t.pattern = Sc()), V.init(e, t);
|
|
1030
|
+
}), cl = /* @__PURE__ */ _("$ZodNanoID", (e, t) => {
|
|
1031
|
+
t.pattern ?? (t.pattern = bc), V.init(e, t);
|
|
1032
|
+
}), ll = /* @__PURE__ */ _("$ZodCUID", (e, t) => {
|
|
1035
1033
|
t.pattern ?? (t.pattern = mc), V.init(e, t);
|
|
1036
|
-
}), ul = /* @__PURE__ */ _("$
|
|
1034
|
+
}), ul = /* @__PURE__ */ _("$ZodCUID2", (e, t) => {
|
|
1037
1035
|
t.pattern ?? (t.pattern = gc), V.init(e, t);
|
|
1038
|
-
}), dl = /* @__PURE__ */ _("$
|
|
1036
|
+
}), dl = /* @__PURE__ */ _("$ZodULID", (e, t) => {
|
|
1039
1037
|
t.pattern ?? (t.pattern = vc), V.init(e, t);
|
|
1040
|
-
}), pl = /* @__PURE__ */ _("$
|
|
1038
|
+
}), pl = /* @__PURE__ */ _("$ZodXID", (e, t) => {
|
|
1041
1039
|
t.pattern ?? (t.pattern = yc), V.init(e, t);
|
|
1042
|
-
}), fl = /* @__PURE__ */ _("$
|
|
1043
|
-
t.pattern ?? (t.pattern =
|
|
1044
|
-
}), hl = /* @__PURE__ */ _("$
|
|
1040
|
+
}), fl = /* @__PURE__ */ _("$ZodKSUID", (e, t) => {
|
|
1041
|
+
t.pattern ?? (t.pattern = _c), V.init(e, t);
|
|
1042
|
+
}), hl = /* @__PURE__ */ _("$ZodISODateTime", (e, t) => {
|
|
1043
|
+
t.pattern ?? (t.pattern = Mc(t)), V.init(e, t);
|
|
1044
|
+
}), ml = /* @__PURE__ */ _("$ZodISODate", (e, t) => {
|
|
1045
1045
|
t.pattern ?? (t.pattern = zc), V.init(e, t);
|
|
1046
|
-
}),
|
|
1047
|
-
t.pattern ?? (t.pattern =
|
|
1048
|
-
}),
|
|
1049
|
-
t.pattern ?? (t.pattern =
|
|
1050
|
-
}),
|
|
1051
|
-
t.pattern ?? (t.pattern =
|
|
1046
|
+
}), gl = /* @__PURE__ */ _("$ZodISOTime", (e, t) => {
|
|
1047
|
+
t.pattern ?? (t.pattern = Rc(t)), V.init(e, t);
|
|
1048
|
+
}), vl = /* @__PURE__ */ _("$ZodISODuration", (e, t) => {
|
|
1049
|
+
t.pattern ?? (t.pattern = wc), V.init(e, t);
|
|
1050
|
+
}), yl = /* @__PURE__ */ _("$ZodIPv4", (e, t) => {
|
|
1051
|
+
t.pattern ?? (t.pattern = kc), V.init(e, t), e._zod.onattach.push((r) => {
|
|
1052
1052
|
const n = r._zod.bag;
|
|
1053
1053
|
n.format = "ipv4";
|
|
1054
1054
|
});
|
|
1055
|
-
}),
|
|
1056
|
-
t.pattern ?? (t.pattern =
|
|
1055
|
+
}), _l = /* @__PURE__ */ _("$ZodIPv6", (e, t) => {
|
|
1056
|
+
t.pattern ?? (t.pattern = Cc), V.init(e, t), e._zod.onattach.push((r) => {
|
|
1057
1057
|
const n = r._zod.bag;
|
|
1058
1058
|
n.format = "ipv6";
|
|
1059
1059
|
}), e._zod.check = (r) => {
|
|
@@ -1069,10 +1069,10 @@ const tl = {
|
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
1071
|
};
|
|
1072
|
-
}),
|
|
1073
|
-
t.pattern ?? (t.pattern =
|
|
1074
|
-
}),
|
|
1075
|
-
t.pattern ?? (t.pattern =
|
|
1072
|
+
}), bl = /* @__PURE__ */ _("$ZodCIDRv4", (e, t) => {
|
|
1073
|
+
t.pattern ?? (t.pattern = xc), V.init(e, t);
|
|
1074
|
+
}), wl = /* @__PURE__ */ _("$ZodCIDRv6", (e, t) => {
|
|
1075
|
+
t.pattern ?? (t.pattern = Ac), V.init(e, t), e._zod.check = (r) => {
|
|
1076
1076
|
const [n, o] = r.value.split("/");
|
|
1077
1077
|
try {
|
|
1078
1078
|
if (!o)
|
|
@@ -1105,8 +1105,8 @@ function ls(e) {
|
|
|
1105
1105
|
return !1;
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
|
-
const
|
|
1109
|
-
t.pattern ?? (t.pattern =
|
|
1108
|
+
const Il = /* @__PURE__ */ _("$ZodBase64", (e, t) => {
|
|
1109
|
+
t.pattern ?? (t.pattern = Nc), V.init(e, t), e._zod.onattach.push((r) => {
|
|
1110
1110
|
r._zod.bag.contentEncoding = "base64";
|
|
1111
1111
|
}), e._zod.check = (r) => {
|
|
1112
1112
|
ls(r.value) || r.issues.push({
|
|
@@ -1118,17 +1118,17 @@ const wl = /* @__PURE__ */ _("$ZodBase64", (e, t) => {
|
|
|
1118
1118
|
});
|
|
1119
1119
|
};
|
|
1120
1120
|
});
|
|
1121
|
-
function
|
|
1121
|
+
function El(e) {
|
|
1122
1122
|
if (!ns.test(e))
|
|
1123
1123
|
return !1;
|
|
1124
1124
|
const t = e.replace(/[-_]/g, (n) => n === "-" ? "+" : "/"), r = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
1125
1125
|
return ls(r);
|
|
1126
1126
|
}
|
|
1127
|
-
const
|
|
1127
|
+
const Tl = /* @__PURE__ */ _("$ZodBase64URL", (e, t) => {
|
|
1128
1128
|
t.pattern ?? (t.pattern = ns), V.init(e, t), e._zod.onattach.push((r) => {
|
|
1129
1129
|
r._zod.bag.contentEncoding = "base64url";
|
|
1130
1130
|
}), e._zod.check = (r) => {
|
|
1131
|
-
|
|
1131
|
+
El(r.value) || r.issues.push({
|
|
1132
1132
|
code: "invalid_format",
|
|
1133
1133
|
format: "base64url",
|
|
1134
1134
|
input: r.value,
|
|
@@ -1136,10 +1136,10 @@ const El = /* @__PURE__ */ _("$ZodBase64URL", (e, t) => {
|
|
|
1136
1136
|
continue: !t.abort
|
|
1137
1137
|
});
|
|
1138
1138
|
};
|
|
1139
|
-
}),
|
|
1140
|
-
t.pattern ?? (t.pattern =
|
|
1139
|
+
}), Sl = /* @__PURE__ */ _("$ZodE164", (e, t) => {
|
|
1140
|
+
t.pattern ?? (t.pattern = Pc), V.init(e, t);
|
|
1141
1141
|
});
|
|
1142
|
-
function
|
|
1142
|
+
function kl(e, t = null) {
|
|
1143
1143
|
try {
|
|
1144
1144
|
const r = e.split(".");
|
|
1145
1145
|
if (r.length !== 3)
|
|
@@ -1153,9 +1153,9 @@ function Sl(e, t = null) {
|
|
|
1153
1153
|
return !1;
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
|
-
const
|
|
1156
|
+
const Cl = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
|
|
1157
1157
|
V.init(e, t), e._zod.check = (r) => {
|
|
1158
|
-
|
|
1158
|
+
kl(r.value, t.alg) || r.issues.push({
|
|
1159
1159
|
code: "invalid_format",
|
|
1160
1160
|
format: "jwt",
|
|
1161
1161
|
input: r.value,
|
|
@@ -1164,7 +1164,7 @@ const kl = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
|
|
|
1164
1164
|
});
|
|
1165
1165
|
};
|
|
1166
1166
|
}), us = /* @__PURE__ */ _("$ZodNumber", (e, t) => {
|
|
1167
|
-
j.init(e, t), e._zod.pattern = e._zod.bag.pattern ??
|
|
1167
|
+
j.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Dc, e._zod.parse = (r, n) => {
|
|
1168
1168
|
if (t.coerce)
|
|
1169
1169
|
try {
|
|
1170
1170
|
r.value = Number(r.value);
|
|
@@ -1182,10 +1182,10 @@ const kl = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
|
|
|
1182
1182
|
...s ? { received: s } : {}
|
|
1183
1183
|
}), r;
|
|
1184
1184
|
};
|
|
1185
|
-
}),
|
|
1186
|
-
|
|
1187
|
-
}),
|
|
1188
|
-
j.init(e, t), e._zod.pattern =
|
|
1185
|
+
}), xl = /* @__PURE__ */ _("$ZodNumber", (e, t) => {
|
|
1186
|
+
Vc.init(e, t), us.init(e, t);
|
|
1187
|
+
}), Al = /* @__PURE__ */ _("$ZodBoolean", (e, t) => {
|
|
1188
|
+
j.init(e, t), e._zod.pattern = Lc, e._zod.parse = (r, n) => {
|
|
1189
1189
|
if (t.coerce)
|
|
1190
1190
|
try {
|
|
1191
1191
|
r.value = !!r.value;
|
|
@@ -1199,8 +1199,8 @@ const kl = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
|
|
|
1199
1199
|
inst: e
|
|
1200
1200
|
}), r;
|
|
1201
1201
|
};
|
|
1202
|
-
}),
|
|
1203
|
-
j.init(e, t), e._zod.pattern =
|
|
1202
|
+
}), Nl = /* @__PURE__ */ _("$ZodNull", (e, t) => {
|
|
1203
|
+
j.init(e, t), e._zod.pattern = Uc, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (r, n) => {
|
|
1204
1204
|
const o = r.value;
|
|
1205
1205
|
return o === null || r.issues.push({
|
|
1206
1206
|
expected: "null",
|
|
@@ -1209,9 +1209,9 @@ const kl = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
|
|
|
1209
1209
|
inst: e
|
|
1210
1210
|
}), r;
|
|
1211
1211
|
};
|
|
1212
|
-
}),
|
|
1212
|
+
}), Ol = /* @__PURE__ */ _("$ZodUnknown", (e, t) => {
|
|
1213
1213
|
j.init(e, t), e._zod.parse = (r) => r;
|
|
1214
|
-
}),
|
|
1214
|
+
}), Pl = /* @__PURE__ */ _("$ZodNever", (e, t) => {
|
|
1215
1215
|
j.init(e, t), e._zod.parse = (r, n) => (r.issues.push({
|
|
1216
1216
|
expected: "never",
|
|
1217
1217
|
code: "invalid_type",
|
|
@@ -1250,14 +1250,14 @@ function Rt(e, t, r) {
|
|
|
1250
1250
|
function Sn(e, t, r, n) {
|
|
1251
1251
|
e.issues.length ? n[r] === void 0 ? r in n ? t.value[r] = void 0 : t.value[r] = e.value : t.issues.push(...We(r, e.issues)) : e.value === void 0 ? r in n && (t.value[r] = void 0) : t.value[r] = e.value;
|
|
1252
1252
|
}
|
|
1253
|
-
const
|
|
1253
|
+
const Rl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
|
|
1254
1254
|
j.init(e, t);
|
|
1255
1255
|
const r = Gr(() => {
|
|
1256
1256
|
const u = Object.keys(t.shape);
|
|
1257
1257
|
for (const v of u)
|
|
1258
1258
|
if (!(t.shape[v] instanceof j))
|
|
1259
1259
|
throw new Error(`Invalid element at key "${v}": expected a Zod schema`);
|
|
1260
|
-
const g =
|
|
1260
|
+
const g = tc(t.shape);
|
|
1261
1261
|
return {
|
|
1262
1262
|
shape: t.shape,
|
|
1263
1263
|
keys: u,
|
|
@@ -1279,7 +1279,7 @@ const Pl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
|
|
|
1279
1279
|
return g;
|
|
1280
1280
|
});
|
|
1281
1281
|
const n = (u) => {
|
|
1282
|
-
const g = new
|
|
1282
|
+
const g = new tl(["shape", "payload", "ctx"]), v = r.value, h = (b) => {
|
|
1283
1283
|
const I = ut(b);
|
|
1284
1284
|
return `shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`;
|
|
1285
1285
|
};
|
|
@@ -1327,7 +1327,7 @@ const Pl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
|
|
|
1327
1327
|
return (b, I) => w(u, b, I);
|
|
1328
1328
|
};
|
|
1329
1329
|
let o;
|
|
1330
|
-
const s = Wt, i = !Yo.jitless, l = i &&
|
|
1330
|
+
const s = Wt, i = !Yo.jitless, l = i && Qi.value, c = t.catchall;
|
|
1331
1331
|
let p;
|
|
1332
1332
|
e._zod.parse = (u, g) => {
|
|
1333
1333
|
p ?? (p = r.value);
|
|
@@ -1409,7 +1409,7 @@ const ds = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
return o ? Promise.all(s).then((i) => kn(i, r, e, n)) : kn(s, r, e, n);
|
|
1411
1411
|
};
|
|
1412
|
-
}),
|
|
1412
|
+
}), Ml = /* @__PURE__ */ _("$ZodDiscriminatedUnion", (e, t) => {
|
|
1413
1413
|
ds.init(e, t);
|
|
1414
1414
|
const r = e._zod.parse;
|
|
1415
1415
|
Z(e._zod, "propValues", () => {
|
|
@@ -1459,7 +1459,7 @@ const ds = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
|
|
|
1459
1459
|
inst: e
|
|
1460
1460
|
}), o);
|
|
1461
1461
|
};
|
|
1462
|
-
}),
|
|
1462
|
+
}), $l = /* @__PURE__ */ _("$ZodIntersection", (e, t) => {
|
|
1463
1463
|
j.init(e, t), e._zod.parse = (r, n) => {
|
|
1464
1464
|
const o = r.value, s = t.left._zod.run({ value: o, issues: [] }, n), i = t.right._zod.run({ value: o, issues: [] }, n);
|
|
1465
1465
|
return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([l, c]) => Cn(r, l, c)) : Cn(r, s, i);
|
|
@@ -1508,7 +1508,7 @@ function Cn(e, t, r) {
|
|
|
1508
1508
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);
|
|
1509
1509
|
return e.value = n.data, e;
|
|
1510
1510
|
}
|
|
1511
|
-
const
|
|
1511
|
+
const Zl = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
1512
1512
|
j.init(e, t), e._zod.parse = (r, n) => {
|
|
1513
1513
|
const o = r.value;
|
|
1514
1514
|
if (!Yt(o))
|
|
@@ -1565,10 +1565,10 @@ const $l = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
return s.length ? Promise.all(s).then(() => r) : r;
|
|
1567
1567
|
};
|
|
1568
|
-
}),
|
|
1568
|
+
}), Dl = /* @__PURE__ */ _("$ZodEnum", (e, t) => {
|
|
1569
1569
|
j.init(e, t);
|
|
1570
1570
|
const r = qo(t.entries);
|
|
1571
|
-
e._zod.values = new Set(r), e._zod.pattern = new RegExp(`^(${r.filter((n) =>
|
|
1571
|
+
e._zod.values = new Set(r), e._zod.pattern = new RegExp(`^(${r.filter((n) => ec.has(typeof n)).map((n) => typeof n == "string" ? kt(n) : n.toString()).join("|")})$`), e._zod.parse = (n, o) => {
|
|
1572
1572
|
const s = n.value;
|
|
1573
1573
|
return e._zod.values.has(s) || n.issues.push({
|
|
1574
1574
|
code: "invalid_value",
|
|
@@ -1577,7 +1577,7 @@ const $l = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
|
1577
1577
|
inst: e
|
|
1578
1578
|
}), n;
|
|
1579
1579
|
};
|
|
1580
|
-
}),
|
|
1580
|
+
}), Ll = /* @__PURE__ */ _("$ZodLiteral", (e, t) => {
|
|
1581
1581
|
j.init(e, t), e._zod.values = new Set(t.values), e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? kt(r) : r ? r.toString() : String(r)).join("|")})$`), e._zod.parse = (r, n) => {
|
|
1582
1582
|
const o = r.value;
|
|
1583
1583
|
return e._zod.values.has(o) || r.issues.push({
|
|
@@ -1587,7 +1587,7 @@ const $l = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
|
1587
1587
|
inst: e
|
|
1588
1588
|
}), r;
|
|
1589
1589
|
};
|
|
1590
|
-
}),
|
|
1590
|
+
}), Ul = /* @__PURE__ */ _("$ZodTransform", (e, t) => {
|
|
1591
1591
|
j.init(e, t), e._zod.parse = (r, n) => {
|
|
1592
1592
|
const o = t.transform(r.value, r);
|
|
1593
1593
|
if (n.async)
|
|
@@ -1596,17 +1596,17 @@ const $l = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
|
1596
1596
|
throw new bt();
|
|
1597
1597
|
return r.value = o, r;
|
|
1598
1598
|
};
|
|
1599
|
-
}),
|
|
1599
|
+
}), jl = /* @__PURE__ */ _("$ZodOptional", (e, t) => {
|
|
1600
1600
|
j.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", Z(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), Z(e._zod, "pattern", () => {
|
|
1601
1601
|
const r = t.innerType._zod.pattern;
|
|
1602
1602
|
return r ? new RegExp(`^(${Wr(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
|
+
}), Fl = /* @__PURE__ */ _("$ZodNullable", (e, t) => {
|
|
1605
1605
|
j.init(e, t), Z(e._zod, "optin", () => t.innerType._zod.optin), Z(e._zod, "optout", () => t.innerType._zod.optout), Z(e._zod, "pattern", () => {
|
|
1606
1606
|
const r = t.innerType._zod.pattern;
|
|
1607
1607
|
return r ? new RegExp(`^(${Wr(r.source)}|null)$`) : void 0;
|
|
1608
1608
|
}), Z(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
|
+
}), Bl = /* @__PURE__ */ _("$ZodDefault", (e, t) => {
|
|
1610
1610
|
j.init(e, t), e._zod.optin = "optional", Z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
|
|
1611
1611
|
if (r.value === void 0)
|
|
1612
1612
|
return r.value = t.defaultValue, r;
|
|
@@ -1617,9 +1617,9 @@ const $l = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
|
1617
1617
|
function xn(e, t) {
|
|
1618
1618
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1619
1619
|
}
|
|
1620
|
-
const
|
|
1620
|
+
const Vl = /* @__PURE__ */ _("$ZodPrefault", (e, t) => {
|
|
1621
1621
|
j.init(e, t), e._zod.optin = "optional", Z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => (r.value === void 0 && (r.value = t.defaultValue), t.innerType._zod.run(r, n));
|
|
1622
|
-
}),
|
|
1622
|
+
}), Hl = /* @__PURE__ */ _("$ZodNonOptional", (e, t) => {
|
|
1623
1623
|
j.init(e, t), Z(e._zod, "values", () => {
|
|
1624
1624
|
const r = t.innerType._zod.values;
|
|
1625
1625
|
return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
|
|
@@ -1636,7 +1636,7 @@ function An(e, t) {
|
|
|
1636
1636
|
inst: t
|
|
1637
1637
|
}), e;
|
|
1638
1638
|
}
|
|
1639
|
-
const
|
|
1639
|
+
const Gl = /* @__PURE__ */ _("$ZodCatch", (e, t) => {
|
|
1640
1640
|
j.init(e, t), e._zod.optin = "optional", Z(e._zod, "optout", () => t.innerType._zod.optout), Z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
|
|
1641
1641
|
const o = t.innerType._zod.run(r, n);
|
|
1642
1642
|
return o instanceof Promise ? o.then((s) => (r.value = s.value, s.issues.length && (r.value = t.catchValue({
|
|
@@ -1653,7 +1653,7 @@ const Hl = /* @__PURE__ */ _("$ZodCatch", (e, t) => {
|
|
|
1653
1653
|
input: r.value
|
|
1654
1654
|
}), r.issues = []), r);
|
|
1655
1655
|
};
|
|
1656
|
-
}),
|
|
1656
|
+
}), Jl = /* @__PURE__ */ _("$ZodPipe", (e, t) => {
|
|
1657
1657
|
j.init(e, t), Z(e._zod, "values", () => t.in._zod.values), Z(e._zod, "optin", () => t.in._zod.optin), Z(e._zod, "optout", () => t.out._zod.optout), e._zod.parse = (r, n) => {
|
|
1658
1658
|
const o = t.in._zod.run(r, n);
|
|
1659
1659
|
return o instanceof Promise ? o.then((s) => Nn(s, t, n)) : Nn(o, t, n);
|
|
@@ -1662,7 +1662,7 @@ const Hl = /* @__PURE__ */ _("$ZodCatch", (e, t) => {
|
|
|
1662
1662
|
function Nn(e, t, r) {
|
|
1663
1663
|
return vt(e) ? e : t.out._zod.run({ value: e.value, issues: e.issues }, r);
|
|
1664
1664
|
}
|
|
1665
|
-
const
|
|
1665
|
+
const Wl = /* @__PURE__ */ _("$ZodReadonly", (e, t) => {
|
|
1666
1666
|
j.init(e, t), Z(e._zod, "propValues", () => t.innerType._zod.propValues), Z(e._zod, "values", () => t.innerType._zod.values), Z(e._zod, "optin", () => t.innerType._zod.optin), Z(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (r, n) => {
|
|
1667
1667
|
const o = t.innerType._zod.run(r, n);
|
|
1668
1668
|
return o instanceof Promise ? o.then(On) : On(o);
|
|
@@ -1671,17 +1671,17 @@ const Jl = /* @__PURE__ */ _("$ZodReadonly", (e, t) => {
|
|
|
1671
1671
|
function On(e) {
|
|
1672
1672
|
return e.value = Object.freeze(e.value), e;
|
|
1673
1673
|
}
|
|
1674
|
-
const
|
|
1674
|
+
const Yl = /* @__PURE__ */ _("$ZodLazy", (e, t) => {
|
|
1675
1675
|
j.init(e, t), Z(e._zod, "innerType", () => t.getter()), Z(e._zod, "pattern", () => e._zod.innerType._zod.pattern), Z(e._zod, "propValues", () => e._zod.innerType._zod.propValues), Z(e._zod, "optin", () => e._zod.innerType._zod.optin), Z(e._zod, "optout", () => e._zod.innerType._zod.optout), e._zod.parse = (r, n) => e._zod.innerType._zod.run(r, n);
|
|
1676
|
-
}),
|
|
1676
|
+
}), ql = /* @__PURE__ */ _("$ZodCustom", (e, t) => {
|
|
1677
1677
|
ce.init(e, t), j.init(e, t), e._zod.parse = (r, n) => r, e._zod.check = (r) => {
|
|
1678
1678
|
const n = r.value, o = t.fn(n);
|
|
1679
1679
|
if (o instanceof Promise)
|
|
1680
|
-
return o.then((s) =>
|
|
1681
|
-
|
|
1680
|
+
return o.then((s) => Pn(s, r, n, e));
|
|
1681
|
+
Pn(o, r, n, e);
|
|
1682
1682
|
};
|
|
1683
1683
|
});
|
|
1684
|
-
function
|
|
1684
|
+
function Pn(e, t, r, n) {
|
|
1685
1685
|
if (!e) {
|
|
1686
1686
|
const o = {
|
|
1687
1687
|
code: "custom",
|
|
@@ -1728,17 +1728,17 @@ class ps {
|
|
|
1728
1728
|
return this._map.has(t);
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function Xl() {
|
|
1732
1732
|
return new ps();
|
|
1733
1733
|
}
|
|
1734
|
-
const dt = /* @__PURE__ */
|
|
1735
|
-
function
|
|
1734
|
+
const dt = /* @__PURE__ */ Xl();
|
|
1735
|
+
function Kl(e, t) {
|
|
1736
1736
|
return new e({
|
|
1737
1737
|
type: "string",
|
|
1738
1738
|
...E(t)
|
|
1739
1739
|
});
|
|
1740
1740
|
}
|
|
1741
|
-
function
|
|
1741
|
+
function Ql(e, t) {
|
|
1742
1742
|
return new e({
|
|
1743
1743
|
type: "string",
|
|
1744
1744
|
format: "email",
|
|
@@ -1747,7 +1747,7 @@ function Kl(e, t) {
|
|
|
1747
1747
|
...E(t)
|
|
1748
1748
|
});
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function zn(e, t) {
|
|
1751
1751
|
return new e({
|
|
1752
1752
|
type: "string",
|
|
1753
1753
|
format: "guid",
|
|
@@ -1756,7 +1756,7 @@ function Pn(e, t) {
|
|
|
1756
1756
|
...E(t)
|
|
1757
1757
|
});
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1759
|
+
function eu(e, t) {
|
|
1760
1760
|
return new e({
|
|
1761
1761
|
type: "string",
|
|
1762
1762
|
format: "uuid",
|
|
@@ -1765,7 +1765,7 @@ function Ql(e, t) {
|
|
|
1765
1765
|
...E(t)
|
|
1766
1766
|
});
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function tu(e, t) {
|
|
1769
1769
|
return new e({
|
|
1770
1770
|
type: "string",
|
|
1771
1771
|
format: "uuid",
|
|
@@ -1775,7 +1775,7 @@ function eu(e, t) {
|
|
|
1775
1775
|
...E(t)
|
|
1776
1776
|
});
|
|
1777
1777
|
}
|
|
1778
|
-
function
|
|
1778
|
+
function ru(e, t) {
|
|
1779
1779
|
return new e({
|
|
1780
1780
|
type: "string",
|
|
1781
1781
|
format: "uuid",
|
|
@@ -1785,7 +1785,7 @@ function tu(e, t) {
|
|
|
1785
1785
|
...E(t)
|
|
1786
1786
|
});
|
|
1787
1787
|
}
|
|
1788
|
-
function
|
|
1788
|
+
function nu(e, t) {
|
|
1789
1789
|
return new e({
|
|
1790
1790
|
type: "string",
|
|
1791
1791
|
format: "uuid",
|
|
@@ -1795,7 +1795,7 @@ function ru(e, t) {
|
|
|
1795
1795
|
...E(t)
|
|
1796
1796
|
});
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function ou(e, t) {
|
|
1799
1799
|
return new e({
|
|
1800
1800
|
type: "string",
|
|
1801
1801
|
format: "url",
|
|
@@ -1804,7 +1804,7 @@ function nu(e, t) {
|
|
|
1804
1804
|
...E(t)
|
|
1805
1805
|
});
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function su(e, t) {
|
|
1808
1808
|
return new e({
|
|
1809
1809
|
type: "string",
|
|
1810
1810
|
format: "emoji",
|
|
@@ -1813,7 +1813,7 @@ function ou(e, t) {
|
|
|
1813
1813
|
...E(t)
|
|
1814
1814
|
});
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function au(e, t) {
|
|
1817
1817
|
return new e({
|
|
1818
1818
|
type: "string",
|
|
1819
1819
|
format: "nanoid",
|
|
@@ -1822,7 +1822,7 @@ function su(e, t) {
|
|
|
1822
1822
|
...E(t)
|
|
1823
1823
|
});
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1825
|
+
function iu(e, t) {
|
|
1826
1826
|
return new e({
|
|
1827
1827
|
type: "string",
|
|
1828
1828
|
format: "cuid",
|
|
@@ -1831,7 +1831,7 @@ function au(e, t) {
|
|
|
1831
1831
|
...E(t)
|
|
1832
1832
|
});
|
|
1833
1833
|
}
|
|
1834
|
-
function
|
|
1834
|
+
function cu(e, t) {
|
|
1835
1835
|
return new e({
|
|
1836
1836
|
type: "string",
|
|
1837
1837
|
format: "cuid2",
|
|
@@ -1840,7 +1840,7 @@ function iu(e, t) {
|
|
|
1840
1840
|
...E(t)
|
|
1841
1841
|
});
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function lu(e, t) {
|
|
1844
1844
|
return new e({
|
|
1845
1845
|
type: "string",
|
|
1846
1846
|
format: "ulid",
|
|
@@ -1849,7 +1849,7 @@ function cu(e, t) {
|
|
|
1849
1849
|
...E(t)
|
|
1850
1850
|
});
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1852
|
+
function uu(e, t) {
|
|
1853
1853
|
return new e({
|
|
1854
1854
|
type: "string",
|
|
1855
1855
|
format: "xid",
|
|
@@ -1858,7 +1858,7 @@ function lu(e, t) {
|
|
|
1858
1858
|
...E(t)
|
|
1859
1859
|
});
|
|
1860
1860
|
}
|
|
1861
|
-
function
|
|
1861
|
+
function du(e, t) {
|
|
1862
1862
|
return new e({
|
|
1863
1863
|
type: "string",
|
|
1864
1864
|
format: "ksuid",
|
|
@@ -1867,7 +1867,7 @@ function uu(e, t) {
|
|
|
1867
1867
|
...E(t)
|
|
1868
1868
|
});
|
|
1869
1869
|
}
|
|
1870
|
-
function
|
|
1870
|
+
function pu(e, t) {
|
|
1871
1871
|
return new e({
|
|
1872
1872
|
type: "string",
|
|
1873
1873
|
format: "ipv4",
|
|
@@ -1876,7 +1876,7 @@ function du(e, t) {
|
|
|
1876
1876
|
...E(t)
|
|
1877
1877
|
});
|
|
1878
1878
|
}
|
|
1879
|
-
function
|
|
1879
|
+
function fu(e, t) {
|
|
1880
1880
|
return new e({
|
|
1881
1881
|
type: "string",
|
|
1882
1882
|
format: "ipv6",
|
|
@@ -1885,7 +1885,7 @@ function pu(e, t) {
|
|
|
1885
1885
|
...E(t)
|
|
1886
1886
|
});
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function hu(e, t) {
|
|
1889
1889
|
return new e({
|
|
1890
1890
|
type: "string",
|
|
1891
1891
|
format: "cidrv4",
|
|
@@ -1894,7 +1894,7 @@ function fu(e, t) {
|
|
|
1894
1894
|
...E(t)
|
|
1895
1895
|
});
|
|
1896
1896
|
}
|
|
1897
|
-
function
|
|
1897
|
+
function mu(e, t) {
|
|
1898
1898
|
return new e({
|
|
1899
1899
|
type: "string",
|
|
1900
1900
|
format: "cidrv6",
|
|
@@ -1903,7 +1903,7 @@ function hu(e, t) {
|
|
|
1903
1903
|
...E(t)
|
|
1904
1904
|
});
|
|
1905
1905
|
}
|
|
1906
|
-
function
|
|
1906
|
+
function gu(e, t) {
|
|
1907
1907
|
return new e({
|
|
1908
1908
|
type: "string",
|
|
1909
1909
|
format: "base64",
|
|
@@ -1912,7 +1912,7 @@ function mu(e, t) {
|
|
|
1912
1912
|
...E(t)
|
|
1913
1913
|
});
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1915
|
+
function vu(e, t) {
|
|
1916
1916
|
return new e({
|
|
1917
1917
|
type: "string",
|
|
1918
1918
|
format: "base64url",
|
|
@@ -1921,7 +1921,7 @@ function gu(e, t) {
|
|
|
1921
1921
|
...E(t)
|
|
1922
1922
|
});
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1924
|
+
function yu(e, t) {
|
|
1925
1925
|
return new e({
|
|
1926
1926
|
type: "string",
|
|
1927
1927
|
format: "e164",
|
|
@@ -1930,7 +1930,7 @@ function vu(e, t) {
|
|
|
1930
1930
|
...E(t)
|
|
1931
1931
|
});
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1933
|
+
function _u(e, t) {
|
|
1934
1934
|
return new e({
|
|
1935
1935
|
type: "string",
|
|
1936
1936
|
format: "jwt",
|
|
@@ -1939,7 +1939,7 @@ function yu(e, t) {
|
|
|
1939
1939
|
...E(t)
|
|
1940
1940
|
});
|
|
1941
1941
|
}
|
|
1942
|
-
function
|
|
1942
|
+
function bu(e, t) {
|
|
1943
1943
|
return new e({
|
|
1944
1944
|
type: "string",
|
|
1945
1945
|
format: "datetime",
|
|
@@ -1950,7 +1950,7 @@ function _u(e, t) {
|
|
|
1950
1950
|
...E(t)
|
|
1951
1951
|
});
|
|
1952
1952
|
}
|
|
1953
|
-
function
|
|
1953
|
+
function wu(e, t) {
|
|
1954
1954
|
return new e({
|
|
1955
1955
|
type: "string",
|
|
1956
1956
|
format: "date",
|
|
@@ -1958,7 +1958,7 @@ function bu(e, t) {
|
|
|
1958
1958
|
...E(t)
|
|
1959
1959
|
});
|
|
1960
1960
|
}
|
|
1961
|
-
function
|
|
1961
|
+
function Iu(e, t) {
|
|
1962
1962
|
return new e({
|
|
1963
1963
|
type: "string",
|
|
1964
1964
|
format: "time",
|
|
@@ -1967,7 +1967,7 @@ function wu(e, t) {
|
|
|
1967
1967
|
...E(t)
|
|
1968
1968
|
});
|
|
1969
1969
|
}
|
|
1970
|
-
function
|
|
1970
|
+
function Eu(e, t) {
|
|
1971
1971
|
return new e({
|
|
1972
1972
|
type: "string",
|
|
1973
1973
|
format: "duration",
|
|
@@ -1975,14 +1975,14 @@ function Iu(e, t) {
|
|
|
1975
1975
|
...E(t)
|
|
1976
1976
|
});
|
|
1977
1977
|
}
|
|
1978
|
-
function
|
|
1978
|
+
function Tu(e, t) {
|
|
1979
1979
|
return new e({
|
|
1980
1980
|
type: "number",
|
|
1981
1981
|
checks: [],
|
|
1982
1982
|
...E(t)
|
|
1983
1983
|
});
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1985
|
+
function Su(e, t) {
|
|
1986
1986
|
return new e({
|
|
1987
1987
|
type: "number",
|
|
1988
1988
|
check: "number_format",
|
|
@@ -1991,24 +1991,24 @@ function Tu(e, t) {
|
|
|
1991
1991
|
...E(t)
|
|
1992
1992
|
});
|
|
1993
1993
|
}
|
|
1994
|
-
function
|
|
1994
|
+
function ku(e, t) {
|
|
1995
1995
|
return new e({
|
|
1996
1996
|
type: "boolean",
|
|
1997
1997
|
...E(t)
|
|
1998
1998
|
});
|
|
1999
1999
|
}
|
|
2000
|
-
function
|
|
2000
|
+
function Cu(e, t) {
|
|
2001
2001
|
return new e({
|
|
2002
2002
|
type: "null",
|
|
2003
2003
|
...E(t)
|
|
2004
2004
|
});
|
|
2005
2005
|
}
|
|
2006
|
-
function
|
|
2006
|
+
function xu(e) {
|
|
2007
2007
|
return new e({
|
|
2008
2008
|
type: "unknown"
|
|
2009
2009
|
});
|
|
2010
2010
|
}
|
|
2011
|
-
function
|
|
2011
|
+
function Au(e, t) {
|
|
2012
2012
|
return new e({
|
|
2013
2013
|
type: "never",
|
|
2014
2014
|
...E(t)
|
|
@@ -2047,73 +2047,73 @@ function hr(e, t) {
|
|
|
2047
2047
|
});
|
|
2048
2048
|
}
|
|
2049
2049
|
function $n(e, t) {
|
|
2050
|
-
return new
|
|
2050
|
+
return new Bc({
|
|
2051
2051
|
check: "multiple_of",
|
|
2052
2052
|
...E(t),
|
|
2053
2053
|
value: e
|
|
2054
2054
|
});
|
|
2055
2055
|
}
|
|
2056
2056
|
function fs(e, t) {
|
|
2057
|
-
return new
|
|
2057
|
+
return new Hc({
|
|
2058
2058
|
check: "max_length",
|
|
2059
2059
|
...E(t),
|
|
2060
2060
|
maximum: e
|
|
2061
2061
|
});
|
|
2062
2062
|
}
|
|
2063
2063
|
function qt(e, t) {
|
|
2064
|
-
return new
|
|
2064
|
+
return new Gc({
|
|
2065
2065
|
check: "min_length",
|
|
2066
2066
|
...E(t),
|
|
2067
2067
|
minimum: e
|
|
2068
2068
|
});
|
|
2069
2069
|
}
|
|
2070
2070
|
function hs(e, t) {
|
|
2071
|
-
return new
|
|
2071
|
+
return new Jc({
|
|
2072
2072
|
check: "length_equals",
|
|
2073
2073
|
...E(t),
|
|
2074
2074
|
length: e
|
|
2075
2075
|
});
|
|
2076
2076
|
}
|
|
2077
|
-
function
|
|
2078
|
-
return new
|
|
2077
|
+
function Nu(e, t) {
|
|
2078
|
+
return new Wc({
|
|
2079
2079
|
check: "string_format",
|
|
2080
2080
|
format: "regex",
|
|
2081
2081
|
...E(t),
|
|
2082
2082
|
pattern: e
|
|
2083
2083
|
});
|
|
2084
2084
|
}
|
|
2085
|
-
function
|
|
2086
|
-
return new
|
|
2085
|
+
function Ou(e) {
|
|
2086
|
+
return new Yc({
|
|
2087
2087
|
check: "string_format",
|
|
2088
2088
|
format: "lowercase",
|
|
2089
2089
|
...E(e)
|
|
2090
2090
|
});
|
|
2091
2091
|
}
|
|
2092
|
-
function
|
|
2093
|
-
return new
|
|
2092
|
+
function Pu(e) {
|
|
2093
|
+
return new qc({
|
|
2094
2094
|
check: "string_format",
|
|
2095
2095
|
format: "uppercase",
|
|
2096
2096
|
...E(e)
|
|
2097
2097
|
});
|
|
2098
2098
|
}
|
|
2099
2099
|
function zu(e, t) {
|
|
2100
|
-
return new
|
|
2100
|
+
return new Xc({
|
|
2101
2101
|
check: "string_format",
|
|
2102
2102
|
format: "includes",
|
|
2103
2103
|
...E(t),
|
|
2104
2104
|
includes: e
|
|
2105
2105
|
});
|
|
2106
2106
|
}
|
|
2107
|
-
function
|
|
2108
|
-
return new
|
|
2107
|
+
function Ru(e, t) {
|
|
2108
|
+
return new Kc({
|
|
2109
2109
|
check: "string_format",
|
|
2110
2110
|
format: "starts_with",
|
|
2111
2111
|
...E(t),
|
|
2112
2112
|
prefix: e
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
2115
|
-
function
|
|
2116
|
-
return new
|
|
2115
|
+
function Mu(e, t) {
|
|
2116
|
+
return new Qc({
|
|
2117
2117
|
check: "string_format",
|
|
2118
2118
|
format: "ends_with",
|
|
2119
2119
|
...E(t),
|
|
@@ -2121,24 +2121,24 @@ function Ru(e, t) {
|
|
|
2121
2121
|
});
|
|
2122
2122
|
}
|
|
2123
2123
|
function Ct(e) {
|
|
2124
|
-
return new
|
|
2124
|
+
return new el({
|
|
2125
2125
|
check: "overwrite",
|
|
2126
2126
|
tx: e
|
|
2127
2127
|
});
|
|
2128
2128
|
}
|
|
2129
|
-
function
|
|
2129
|
+
function $u(e) {
|
|
2130
2130
|
return Ct((t) => t.normalize(e));
|
|
2131
2131
|
}
|
|
2132
|
-
function
|
|
2132
|
+
function Zu() {
|
|
2133
2133
|
return Ct((e) => e.trim());
|
|
2134
2134
|
}
|
|
2135
|
-
function
|
|
2135
|
+
function Du() {
|
|
2136
2136
|
return Ct((e) => e.toLowerCase());
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2138
|
+
function Lu() {
|
|
2139
2139
|
return Ct((e) => e.toUpperCase());
|
|
2140
2140
|
}
|
|
2141
|
-
function
|
|
2141
|
+
function Uu(e, t, r) {
|
|
2142
2142
|
return new e({
|
|
2143
2143
|
type: "array",
|
|
2144
2144
|
element: t,
|
|
@@ -2148,7 +2148,7 @@ function Lu(e, t, r) {
|
|
|
2148
2148
|
...E(r)
|
|
2149
2149
|
});
|
|
2150
2150
|
}
|
|
2151
|
-
function
|
|
2151
|
+
function ju(e, t, r) {
|
|
2152
2152
|
const n = E(r);
|
|
2153
2153
|
return n.abort ?? (n.abort = !0), new e({
|
|
2154
2154
|
type: "custom",
|
|
@@ -2157,7 +2157,7 @@ function Uu(e, t, r) {
|
|
|
2157
2157
|
...n
|
|
2158
2158
|
});
|
|
2159
2159
|
}
|
|
2160
|
-
function
|
|
2160
|
+
function Fu(e, t, r) {
|
|
2161
2161
|
return new e({
|
|
2162
2162
|
type: "custom",
|
|
2163
2163
|
check: "custom",
|
|
@@ -2566,7 +2566,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2566
2566
|
}
|
|
2567
2567
|
}
|
|
2568
2568
|
}
|
|
2569
|
-
function
|
|
2569
|
+
function Bu(e, t) {
|
|
2570
2570
|
if (e instanceof ps) {
|
|
2571
2571
|
const n = new Zn(t), o = {};
|
|
2572
2572
|
for (const a of e._idmap.entries()) {
|
|
@@ -2675,38 +2675,38 @@ function Q(e, t) {
|
|
|
2675
2675
|
}
|
|
2676
2676
|
throw new Error(`Unknown schema type: ${o.type}`);
|
|
2677
2677
|
}
|
|
2678
|
-
const
|
|
2679
|
-
fl.init(e, t), J.init(e, t);
|
|
2680
|
-
});
|
|
2681
|
-
function Vu(e) {
|
|
2682
|
-
return _u(Bu, e);
|
|
2683
|
-
}
|
|
2684
|
-
const Hu = /* @__PURE__ */ _("ZodISODate", (e, t) => {
|
|
2678
|
+
const Vu = /* @__PURE__ */ _("ZodISODateTime", (e, t) => {
|
|
2685
2679
|
hl.init(e, t), J.init(e, t);
|
|
2686
2680
|
});
|
|
2687
|
-
function
|
|
2688
|
-
return bu(
|
|
2681
|
+
function Hu(e) {
|
|
2682
|
+
return bu(Vu, e);
|
|
2689
2683
|
}
|
|
2690
|
-
const
|
|
2684
|
+
const Gu = /* @__PURE__ */ _("ZodISODate", (e, t) => {
|
|
2691
2685
|
ml.init(e, t), J.init(e, t);
|
|
2692
2686
|
});
|
|
2693
|
-
function
|
|
2694
|
-
return wu(
|
|
2687
|
+
function Ju(e) {
|
|
2688
|
+
return wu(Gu, e);
|
|
2695
2689
|
}
|
|
2696
|
-
const
|
|
2690
|
+
const Wu = /* @__PURE__ */ _("ZodISOTime", (e, t) => {
|
|
2697
2691
|
gl.init(e, t), J.init(e, t);
|
|
2698
2692
|
});
|
|
2699
|
-
function
|
|
2700
|
-
return Iu(
|
|
2693
|
+
function Yu(e) {
|
|
2694
|
+
return Iu(Wu, e);
|
|
2695
|
+
}
|
|
2696
|
+
const qu = /* @__PURE__ */ _("ZodISODuration", (e, t) => {
|
|
2697
|
+
vl.init(e, t), J.init(e, t);
|
|
2698
|
+
});
|
|
2699
|
+
function Xu(e) {
|
|
2700
|
+
return Eu(qu, e);
|
|
2701
2701
|
}
|
|
2702
|
-
const
|
|
2702
|
+
const Ku = (e, t) => {
|
|
2703
2703
|
Qo.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2704
2704
|
format: {
|
|
2705
|
-
value: (r) =>
|
|
2705
|
+
value: (r) => uc(e, r)
|
|
2706
2706
|
// enumerable: false,
|
|
2707
2707
|
},
|
|
2708
2708
|
flatten: {
|
|
2709
|
-
value: (r) =>
|
|
2709
|
+
value: (r) => lc(e, r)
|
|
2710
2710
|
// enumerable: false,
|
|
2711
2711
|
},
|
|
2712
2712
|
addIssue: {
|
|
@@ -2724,9 +2724,9 @@ const Xu = (e, t) => {
|
|
|
2724
2724
|
// enumerable: false,
|
|
2725
2725
|
}
|
|
2726
2726
|
});
|
|
2727
|
-
}, nr = _("ZodError",
|
|
2727
|
+
}, nr = _("ZodError", Ku, {
|
|
2728
2728
|
Parent: Error
|
|
2729
|
-
}),
|
|
2729
|
+
}), Qu = /* @__PURE__ */ dc(nr), ed = /* @__PURE__ */ pc(nr), td = /* @__PURE__ */ ts(nr), ms = /* @__PURE__ */ rs(nr), H = /* @__PURE__ */ _("ZodType", (e, t) => (j.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: [
|
|
@@ -2735,7 +2735,7 @@ const Xu = (e, t) => {
|
|
|
2735
2735
|
]
|
|
2736
2736
|
}
|
|
2737
2737
|
// { parent: true }
|
|
2738
|
-
), e.clone = (r, n) => Ke(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) =>
|
|
2738
|
+
), e.clone = (r, n) => Ke(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) => Qu(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => td(e, r, n), e.parseAsync = async (r, n) => ed(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => ms(e, r, n), e.spa = e.safeParseAsync, e.refine = (r, n) => e.check(Xd(r, n)), e.superRefine = (r) => e.check(Kd(r)), e.overwrite = (r) => e.check(Ct(r)), e.optional = () => Un(e), e.nullable = () => jn(e), e.nullish = () => Un(jn(e)), e.nonoptional = (r) => Fd(e, r), e.array = () => it(e), e.or = (r) => he([e, r]), e.and = (r) => Od(e, r), e.transform = (r) => Fn(e, $d(r)), e.default = (r) => Ld(e, r), e.prefault = (r) => jd(e, r), e.catch = (r) => Vd(e, r), e.pipe = (r) => Fn(e, r), e.readonly = () => Jd(e), e.describe = (r) => {
|
|
2739
2739
|
const n = e.clone();
|
|
2740
2740
|
return dt.add(n, { description: r }), n;
|
|
2741
2741
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2751,99 +2751,99 @@ const Xu = (e, t) => {
|
|
|
2751
2751
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), gs = /* @__PURE__ */ _("_ZodString", (e, t) => {
|
|
2752
2752
|
qr.init(e, t), H.init(e, t);
|
|
2753
2753
|
const r = e._zod.bag;
|
|
2754
|
-
e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(
|
|
2755
|
-
}),
|
|
2756
|
-
qr.init(e, t), gs.init(e, t), e.email = (r) => e.check(
|
|
2754
|
+
e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(Nu(...n)), e.includes = (...n) => e.check(zu(...n)), e.startsWith = (...n) => e.check(Ru(...n)), e.endsWith = (...n) => e.check(Mu(...n)), e.min = (...n) => e.check(qt(...n)), e.max = (...n) => e.check(fs(...n)), e.length = (...n) => e.check(hs(...n)), e.nonempty = (...n) => e.check(qt(1, ...n)), e.lowercase = (n) => e.check(Ou(n)), e.uppercase = (n) => e.check(Pu(n)), e.trim = () => e.check(Zu()), e.normalize = (...n) => e.check($u(...n)), e.toLowerCase = () => e.check(Du()), e.toUpperCase = () => e.check(Lu());
|
|
2755
|
+
}), rd = /* @__PURE__ */ _("ZodString", (e, t) => {
|
|
2756
|
+
qr.init(e, t), gs.init(e, t), e.email = (r) => e.check(Ql(nd, r)), e.url = (r) => e.check(ou(od, r)), e.jwt = (r) => e.check(_u(_d, r)), e.emoji = (r) => e.check(su(sd, r)), e.guid = (r) => e.check(zn(Dn, r)), e.uuid = (r) => e.check(eu(Mt, r)), e.uuidv4 = (r) => e.check(tu(Mt, r)), e.uuidv6 = (r) => e.check(ru(Mt, r)), e.uuidv7 = (r) => e.check(nu(Mt, r)), e.nanoid = (r) => e.check(au(ad, r)), e.guid = (r) => e.check(zn(Dn, r)), e.cuid = (r) => e.check(iu(id, r)), e.cuid2 = (r) => e.check(cu(cd, r)), e.ulid = (r) => e.check(lu(ld, r)), e.base64 = (r) => e.check(gu(gd, r)), e.base64url = (r) => e.check(vu(vd, r)), e.xid = (r) => e.check(uu(ud, r)), e.ksuid = (r) => e.check(du(dd, r)), e.ipv4 = (r) => e.check(pu(pd, r)), e.ipv6 = (r) => e.check(fu(fd, r)), e.cidrv4 = (r) => e.check(hu(hd, r)), e.cidrv6 = (r) => e.check(mu(md, r)), e.e164 = (r) => e.check(yu(yd, r)), e.datetime = (r) => e.check(Hu(r)), e.date = (r) => e.check(Ju(r)), e.time = (r) => e.check(Yu(r)), e.duration = (r) => e.check(Xu(r));
|
|
2757
2757
|
});
|
|
2758
2758
|
function S(e) {
|
|
2759
|
-
return
|
|
2759
|
+
return Kl(rd, e);
|
|
2760
2760
|
}
|
|
2761
2761
|
const J = /* @__PURE__ */ _("ZodStringFormat", (e, t) => {
|
|
2762
2762
|
V.init(e, t), gs.init(e, t);
|
|
2763
|
-
}),
|
|
2764
|
-
|
|
2763
|
+
}), nd = /* @__PURE__ */ _("ZodEmail", (e, t) => {
|
|
2764
|
+
sl.init(e, t), J.init(e, t);
|
|
2765
2765
|
}), Dn = /* @__PURE__ */ _("ZodGUID", (e, t) => {
|
|
2766
|
-
rl.init(e, t), J.init(e, t);
|
|
2767
|
-
}), Mt = /* @__PURE__ */ _("ZodUUID", (e, t) => {
|
|
2768
2766
|
nl.init(e, t), J.init(e, t);
|
|
2769
|
-
}),
|
|
2770
|
-
|
|
2771
|
-
}), od = /* @__PURE__ */ _("
|
|
2767
|
+
}), Mt = /* @__PURE__ */ _("ZodUUID", (e, t) => {
|
|
2768
|
+
ol.init(e, t), J.init(e, t);
|
|
2769
|
+
}), od = /* @__PURE__ */ _("ZodURL", (e, t) => {
|
|
2772
2770
|
al.init(e, t), J.init(e, t);
|
|
2773
|
-
}), sd = /* @__PURE__ */ _("
|
|
2771
|
+
}), sd = /* @__PURE__ */ _("ZodEmoji", (e, t) => {
|
|
2774
2772
|
il.init(e, t), J.init(e, t);
|
|
2775
|
-
}), ad = /* @__PURE__ */ _("
|
|
2773
|
+
}), ad = /* @__PURE__ */ _("ZodNanoID", (e, t) => {
|
|
2776
2774
|
cl.init(e, t), J.init(e, t);
|
|
2777
|
-
}), id = /* @__PURE__ */ _("
|
|
2775
|
+
}), id = /* @__PURE__ */ _("ZodCUID", (e, t) => {
|
|
2778
2776
|
ll.init(e, t), J.init(e, t);
|
|
2779
|
-
}), cd = /* @__PURE__ */ _("
|
|
2777
|
+
}), cd = /* @__PURE__ */ _("ZodCUID2", (e, t) => {
|
|
2780
2778
|
ul.init(e, t), J.init(e, t);
|
|
2781
|
-
}), ld = /* @__PURE__ */ _("
|
|
2779
|
+
}), ld = /* @__PURE__ */ _("ZodULID", (e, t) => {
|
|
2782
2780
|
dl.init(e, t), J.init(e, t);
|
|
2783
|
-
}), ud = /* @__PURE__ */ _("
|
|
2781
|
+
}), ud = /* @__PURE__ */ _("ZodXID", (e, t) => {
|
|
2784
2782
|
pl.init(e, t), J.init(e, t);
|
|
2785
|
-
}), dd = /* @__PURE__ */ _("
|
|
2786
|
-
|
|
2787
|
-
}), pd = /* @__PURE__ */ _("
|
|
2783
|
+
}), dd = /* @__PURE__ */ _("ZodKSUID", (e, t) => {
|
|
2784
|
+
fl.init(e, t), J.init(e, t);
|
|
2785
|
+
}), pd = /* @__PURE__ */ _("ZodIPv4", (e, t) => {
|
|
2788
2786
|
yl.init(e, t), J.init(e, t);
|
|
2789
|
-
}), fd = /* @__PURE__ */ _("
|
|
2787
|
+
}), fd = /* @__PURE__ */ _("ZodIPv6", (e, t) => {
|
|
2790
2788
|
_l.init(e, t), J.init(e, t);
|
|
2791
|
-
}), hd = /* @__PURE__ */ _("
|
|
2789
|
+
}), hd = /* @__PURE__ */ _("ZodCIDRv4", (e, t) => {
|
|
2792
2790
|
bl.init(e, t), J.init(e, t);
|
|
2793
|
-
}), md = /* @__PURE__ */ _("
|
|
2791
|
+
}), md = /* @__PURE__ */ _("ZodCIDRv6", (e, t) => {
|
|
2794
2792
|
wl.init(e, t), J.init(e, t);
|
|
2795
|
-
}), gd = /* @__PURE__ */ _("
|
|
2796
|
-
|
|
2797
|
-
}), vd = /* @__PURE__ */ _("
|
|
2793
|
+
}), gd = /* @__PURE__ */ _("ZodBase64", (e, t) => {
|
|
2794
|
+
Il.init(e, t), J.init(e, t);
|
|
2795
|
+
}), vd = /* @__PURE__ */ _("ZodBase64URL", (e, t) => {
|
|
2798
2796
|
Tl.init(e, t), J.init(e, t);
|
|
2799
|
-
}), yd = /* @__PURE__ */ _("
|
|
2800
|
-
|
|
2797
|
+
}), yd = /* @__PURE__ */ _("ZodE164", (e, t) => {
|
|
2798
|
+
Sl.init(e, t), J.init(e, t);
|
|
2799
|
+
}), _d = /* @__PURE__ */ _("ZodJWT", (e, t) => {
|
|
2800
|
+
Cl.init(e, t), J.init(e, t);
|
|
2801
2801
|
}), vs = /* @__PURE__ */ _("ZodNumber", (e, t) => {
|
|
2802
2802
|
us.init(e, t), H.init(e, t), e.gt = (n, o) => e.check(Mn(n, o)), e.gte = (n, o) => e.check(hr(n, o)), e.min = (n, o) => e.check(hr(n, o)), e.lt = (n, o) => e.check(Rn(n, o)), e.lte = (n, o) => e.check(fr(n, o)), e.max = (n, o) => e.check(fr(n, o)), e.int = (n) => e.check(Ln(n)), e.safe = (n) => e.check(Ln(n)), e.positive = (n) => e.check(Mn(0, n)), e.nonnegative = (n) => e.check(hr(0, n)), e.negative = (n) => e.check(Rn(0, n)), e.nonpositive = (n) => e.check(fr(0, n)), e.multipleOf = (n, o) => e.check($n(n, o)), e.step = (n, o) => e.check($n(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
|
});
|
|
2806
|
-
function
|
|
2807
|
-
return
|
|
2806
|
+
function bd(e) {
|
|
2807
|
+
return Tu(vs, e);
|
|
2808
2808
|
}
|
|
2809
|
-
const
|
|
2810
|
-
|
|
2809
|
+
const wd = /* @__PURE__ */ _("ZodNumberFormat", (e, t) => {
|
|
2810
|
+
xl.init(e, t), vs.init(e, t);
|
|
2811
2811
|
});
|
|
2812
2812
|
function Ln(e) {
|
|
2813
|
-
return Tu(bd, e);
|
|
2814
|
-
}
|
|
2815
|
-
const wd = /* @__PURE__ */ _("ZodBoolean", (e, t) => {
|
|
2816
|
-
xl.init(e, t), H.init(e, t);
|
|
2817
|
-
});
|
|
2818
|
-
function ie(e) {
|
|
2819
2813
|
return Su(wd, e);
|
|
2820
2814
|
}
|
|
2821
|
-
const Id = /* @__PURE__ */ _("
|
|
2815
|
+
const Id = /* @__PURE__ */ _("ZodBoolean", (e, t) => {
|
|
2822
2816
|
Al.init(e, t), H.init(e, t);
|
|
2823
2817
|
});
|
|
2824
|
-
function
|
|
2818
|
+
function ie(e) {
|
|
2825
2819
|
return ku(Id, e);
|
|
2826
2820
|
}
|
|
2827
|
-
const
|
|
2821
|
+
const Ed = /* @__PURE__ */ _("ZodNull", (e, t) => {
|
|
2828
2822
|
Nl.init(e, t), H.init(e, t);
|
|
2829
2823
|
});
|
|
2830
|
-
function
|
|
2831
|
-
return Cu(
|
|
2824
|
+
function Td(e) {
|
|
2825
|
+
return Cu(Ed, e);
|
|
2832
2826
|
}
|
|
2833
|
-
const Sd = /* @__PURE__ */ _("
|
|
2827
|
+
const Sd = /* @__PURE__ */ _("ZodUnknown", (e, t) => {
|
|
2834
2828
|
Ol.init(e, t), H.init(e, t);
|
|
2835
2829
|
});
|
|
2830
|
+
function Se() {
|
|
2831
|
+
return xu(Sd);
|
|
2832
|
+
}
|
|
2833
|
+
const kd = /* @__PURE__ */ _("ZodNever", (e, t) => {
|
|
2834
|
+
Pl.init(e, t), H.init(e, t);
|
|
2835
|
+
});
|
|
2836
2836
|
function ys(e) {
|
|
2837
|
-
return
|
|
2837
|
+
return Au(kd, e);
|
|
2838
2838
|
}
|
|
2839
|
-
const
|
|
2839
|
+
const Cd = /* @__PURE__ */ _("ZodArray", (e, t) => {
|
|
2840
2840
|
zl.init(e, t), H.init(e, t), e.element = t.element, e.min = (r, n) => e.check(qt(r, n)), e.nonempty = (r) => e.check(qt(1, r)), e.max = (r, n) => e.check(fs(r, n)), e.length = (r, n) => e.check(hs(r, n)), e.unwrap = () => e.element;
|
|
2841
2841
|
});
|
|
2842
2842
|
function it(e, t) {
|
|
2843
|
-
return
|
|
2843
|
+
return Uu(Cd, e, t);
|
|
2844
2844
|
}
|
|
2845
2845
|
const _s = /* @__PURE__ */ _("ZodObject", (e, t) => {
|
|
2846
|
-
|
|
2846
|
+
Rl.init(e, t), H.init(e, t), Z(e, "shape", () => t.shape), e.keyof = () => zd(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Se() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Se() }), e.strict = () => e.clone({ ...e._zod.def, catchall: ys() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => sc(e, r), e.merge = (r) => ac(e, r), e.pick = (r) => nc(e, r), e.omit = (r) => oc(e, r), e.partial = (...r) => ic(ws, e, r[0]), e.required = (...r) => cc(Is, e, r[0]);
|
|
2847
2847
|
});
|
|
2848
2848
|
function se(e, t) {
|
|
2849
2849
|
const r = {
|
|
@@ -2875,40 +2875,40 @@ function he(e, t) {
|
|
|
2875
2875
|
...E(t)
|
|
2876
2876
|
});
|
|
2877
2877
|
}
|
|
2878
|
-
const
|
|
2879
|
-
bs.init(e, t),
|
|
2878
|
+
const xd = /* @__PURE__ */ _("ZodDiscriminatedUnion", (e, t) => {
|
|
2879
|
+
bs.init(e, t), Ml.init(e, t);
|
|
2880
2880
|
});
|
|
2881
|
-
function
|
|
2882
|
-
return new
|
|
2881
|
+
function Ad(e, t, r) {
|
|
2882
|
+
return new xd({
|
|
2883
2883
|
type: "union",
|
|
2884
2884
|
options: t,
|
|
2885
2885
|
discriminator: e,
|
|
2886
2886
|
...E(r)
|
|
2887
2887
|
});
|
|
2888
2888
|
}
|
|
2889
|
-
const
|
|
2890
|
-
|
|
2889
|
+
const Nd = /* @__PURE__ */ _("ZodIntersection", (e, t) => {
|
|
2890
|
+
$l.init(e, t), H.init(e, t);
|
|
2891
2891
|
});
|
|
2892
|
-
function
|
|
2893
|
-
return new
|
|
2892
|
+
function Od(e, t) {
|
|
2893
|
+
return new Nd({
|
|
2894
2894
|
type: "intersection",
|
|
2895
2895
|
left: e,
|
|
2896
2896
|
right: t
|
|
2897
2897
|
});
|
|
2898
2898
|
}
|
|
2899
|
-
const
|
|
2900
|
-
|
|
2899
|
+
const Pd = /* @__PURE__ */ _("ZodRecord", (e, t) => {
|
|
2900
|
+
Zl.init(e, t), H.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
2901
2901
|
});
|
|
2902
2902
|
function Or(e, t, r) {
|
|
2903
|
-
return new
|
|
2903
|
+
return new Pd({
|
|
2904
2904
|
type: "record",
|
|
2905
2905
|
keyType: e,
|
|
2906
2906
|
valueType: t,
|
|
2907
2907
|
...E(r)
|
|
2908
2908
|
});
|
|
2909
2909
|
}
|
|
2910
|
-
const
|
|
2911
|
-
|
|
2910
|
+
const Pr = /* @__PURE__ */ _("ZodEnum", (e, t) => {
|
|
2911
|
+
Dl.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) => {
|
|
2914
2914
|
const s = {};
|
|
@@ -2917,7 +2917,7 @@ const zr = /* @__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
|
|
2920
|
+
return new Pr({
|
|
2921
2921
|
...t,
|
|
2922
2922
|
checks: [],
|
|
2923
2923
|
...E(o),
|
|
@@ -2930,7 +2930,7 @@ const zr = /* @__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
|
|
2933
|
+
return new Pr({
|
|
2934
2934
|
...t,
|
|
2935
2935
|
checks: [],
|
|
2936
2936
|
...E(o),
|
|
@@ -2940,14 +2940,14 @@ const zr = /* @__PURE__ */ _("ZodEnum", (e, t) => {
|
|
|
2940
2940
|
});
|
|
2941
2941
|
function zd(e, t) {
|
|
2942
2942
|
const r = Array.isArray(e) ? Object.fromEntries(e.map((n) => [n, n])) : e;
|
|
2943
|
-
return new
|
|
2943
|
+
return new Pr({
|
|
2944
2944
|
type: "enum",
|
|
2945
2945
|
entries: r,
|
|
2946
2946
|
...E(t)
|
|
2947
2947
|
});
|
|
2948
2948
|
}
|
|
2949
|
-
const
|
|
2950
|
-
|
|
2949
|
+
const Rd = /* @__PURE__ */ _("ZodLiteral", (e, t) => {
|
|
2950
|
+
Ll.init(e, t), H.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
2951
2951
|
get() {
|
|
2952
2952
|
if (t.values.length > 1)
|
|
2953
2953
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -2955,15 +2955,15 @@ const Pd = /* @__PURE__ */ _("ZodLiteral", (e, t) => {
|
|
|
2955
2955
|
}
|
|
2956
2956
|
});
|
|
2957
2957
|
});
|
|
2958
|
-
function
|
|
2959
|
-
return new
|
|
2958
|
+
function R(e, t) {
|
|
2959
|
+
return new Rd({
|
|
2960
2960
|
type: "literal",
|
|
2961
2961
|
values: Array.isArray(e) ? e : [e],
|
|
2962
2962
|
...E(t)
|
|
2963
2963
|
});
|
|
2964
2964
|
}
|
|
2965
|
-
const
|
|
2966
|
-
|
|
2965
|
+
const Md = /* @__PURE__ */ _("ZodTransform", (e, t) => {
|
|
2966
|
+
Ul.init(e, t), H.init(e, t), e._zod.parse = (r, n) => {
|
|
2967
2967
|
r.addIssue = (s) => {
|
|
2968
2968
|
if (typeof s == "string")
|
|
2969
2969
|
r.issues.push(wt(s, r.value, t));
|
|
@@ -2976,14 +2976,14 @@ const Rd = /* @__PURE__ */ _("ZodTransform", (e, t) => {
|
|
|
2976
2976
|
return o instanceof Promise ? o.then((s) => (r.value = s, r)) : (r.value = o, r);
|
|
2977
2977
|
};
|
|
2978
2978
|
});
|
|
2979
|
-
function
|
|
2980
|
-
return new
|
|
2979
|
+
function $d(e) {
|
|
2980
|
+
return new Md({
|
|
2981
2981
|
type: "transform",
|
|
2982
2982
|
transform: e
|
|
2983
2983
|
});
|
|
2984
2984
|
}
|
|
2985
2985
|
const ws = /* @__PURE__ */ _("ZodOptional", (e, t) => {
|
|
2986
|
-
|
|
2986
|
+
jl.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2987
2987
|
});
|
|
2988
2988
|
function Un(e) {
|
|
2989
2989
|
return new ws({
|
|
@@ -2991,20 +2991,20 @@ function Un(e) {
|
|
|
2991
2991
|
innerType: e
|
|
2992
2992
|
});
|
|
2993
2993
|
}
|
|
2994
|
-
const
|
|
2995
|
-
|
|
2994
|
+
const Zd = /* @__PURE__ */ _("ZodNullable", (e, t) => {
|
|
2995
|
+
Fl.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2996
2996
|
});
|
|
2997
2997
|
function jn(e) {
|
|
2998
|
-
return new
|
|
2998
|
+
return new Zd({
|
|
2999
2999
|
type: "nullable",
|
|
3000
3000
|
innerType: e
|
|
3001
3001
|
});
|
|
3002
3002
|
}
|
|
3003
|
-
const
|
|
3004
|
-
|
|
3003
|
+
const Dd = /* @__PURE__ */ _("ZodDefault", (e, t) => {
|
|
3004
|
+
Bl.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
3005
3005
|
});
|
|
3006
|
-
function
|
|
3007
|
-
return new
|
|
3006
|
+
function Ld(e, t) {
|
|
3007
|
+
return new Dd({
|
|
3008
3008
|
type: "default",
|
|
3009
3009
|
innerType: e,
|
|
3010
3010
|
get defaultValue() {
|
|
@@ -3012,11 +3012,11 @@ function Dd(e, t) {
|
|
|
3012
3012
|
}
|
|
3013
3013
|
});
|
|
3014
3014
|
}
|
|
3015
|
-
const
|
|
3016
|
-
|
|
3015
|
+
const Ud = /* @__PURE__ */ _("ZodPrefault", (e, t) => {
|
|
3016
|
+
Vl.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3017
3017
|
});
|
|
3018
|
-
function
|
|
3019
|
-
return new
|
|
3018
|
+
function jd(e, t) {
|
|
3019
|
+
return new Ud({
|
|
3020
3020
|
type: "prefault",
|
|
3021
3021
|
innerType: e,
|
|
3022
3022
|
get defaultValue() {
|
|
@@ -3025,58 +3025,58 @@ function Ud(e, t) {
|
|
|
3025
3025
|
});
|
|
3026
3026
|
}
|
|
3027
3027
|
const Is = /* @__PURE__ */ _("ZodNonOptional", (e, t) => {
|
|
3028
|
-
|
|
3028
|
+
Hl.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3029
3029
|
});
|
|
3030
|
-
function
|
|
3030
|
+
function Fd(e, t) {
|
|
3031
3031
|
return new Is({
|
|
3032
3032
|
type: "nonoptional",
|
|
3033
3033
|
innerType: e,
|
|
3034
3034
|
...E(t)
|
|
3035
3035
|
});
|
|
3036
3036
|
}
|
|
3037
|
-
const
|
|
3038
|
-
|
|
3037
|
+
const Bd = /* @__PURE__ */ _("ZodCatch", (e, t) => {
|
|
3038
|
+
Gl.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
3039
3039
|
});
|
|
3040
|
-
function
|
|
3041
|
-
return new
|
|
3040
|
+
function Vd(e, t) {
|
|
3041
|
+
return new Bd({
|
|
3042
3042
|
type: "catch",
|
|
3043
3043
|
innerType: e,
|
|
3044
3044
|
catchValue: typeof t == "function" ? t : () => t
|
|
3045
3045
|
});
|
|
3046
3046
|
}
|
|
3047
|
-
const
|
|
3048
|
-
|
|
3047
|
+
const Hd = /* @__PURE__ */ _("ZodPipe", (e, t) => {
|
|
3048
|
+
Jl.init(e, t), H.init(e, t), e.in = t.in, e.out = t.out;
|
|
3049
3049
|
});
|
|
3050
3050
|
function Fn(e, t) {
|
|
3051
|
-
return new
|
|
3051
|
+
return new Hd({
|
|
3052
3052
|
type: "pipe",
|
|
3053
3053
|
in: e,
|
|
3054
3054
|
out: t
|
|
3055
3055
|
// ...util.normalizeParams(params),
|
|
3056
3056
|
});
|
|
3057
3057
|
}
|
|
3058
|
-
const
|
|
3059
|
-
|
|
3058
|
+
const Gd = /* @__PURE__ */ _("ZodReadonly", (e, t) => {
|
|
3059
|
+
Wl.init(e, t), H.init(e, t);
|
|
3060
3060
|
});
|
|
3061
|
-
function
|
|
3062
|
-
return new
|
|
3061
|
+
function Jd(e) {
|
|
3062
|
+
return new Gd({
|
|
3063
3063
|
type: "readonly",
|
|
3064
3064
|
innerType: e
|
|
3065
3065
|
});
|
|
3066
3066
|
}
|
|
3067
|
-
const
|
|
3068
|
-
|
|
3067
|
+
const Wd = /* @__PURE__ */ _("ZodLazy", (e, t) => {
|
|
3068
|
+
Yl.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.getter();
|
|
3069
3069
|
});
|
|
3070
|
-
function
|
|
3071
|
-
return new
|
|
3070
|
+
function Yd(e) {
|
|
3071
|
+
return new Wd({
|
|
3072
3072
|
type: "lazy",
|
|
3073
3073
|
getter: e
|
|
3074
3074
|
});
|
|
3075
3075
|
}
|
|
3076
3076
|
const Xr = /* @__PURE__ */ _("ZodCustom", (e, t) => {
|
|
3077
|
-
|
|
3077
|
+
ql.init(e, t), H.init(e, t);
|
|
3078
3078
|
});
|
|
3079
|
-
function
|
|
3079
|
+
function qd(e) {
|
|
3080
3080
|
const t = new ce({
|
|
3081
3081
|
check: "custom"
|
|
3082
3082
|
// ...util.normalizeParams(params),
|
|
@@ -3084,13 +3084,13 @@ function Yd(e) {
|
|
|
3084
3084
|
return t._zod.check = e, t;
|
|
3085
3085
|
}
|
|
3086
3086
|
function Es(e, t) {
|
|
3087
|
-
return
|
|
3087
|
+
return ju(Xr, e ?? (() => !0), t);
|
|
3088
3088
|
}
|
|
3089
|
-
function
|
|
3090
|
-
return
|
|
3089
|
+
function Xd(e, t = {}) {
|
|
3090
|
+
return Fu(Xr, e, t);
|
|
3091
3091
|
}
|
|
3092
|
-
function
|
|
3093
|
-
const t =
|
|
3092
|
+
function Kd(e) {
|
|
3093
|
+
const t = qd((r) => (r.addIssue = (n) => {
|
|
3094
3094
|
if (typeof n == "string")
|
|
3095
3095
|
r.issues.push(wt(n, r.value, t._zod.def));
|
|
3096
3096
|
else {
|
|
@@ -3131,12 +3131,12 @@ var xt = ({
|
|
|
3131
3131
|
if (e == null)
|
|
3132
3132
|
return o;
|
|
3133
3133
|
if (r.includes(n))
|
|
3134
|
-
throw new
|
|
3134
|
+
throw new Vi({
|
|
3135
3135
|
argument: "separator",
|
|
3136
3136
|
message: `The separator "${n}" must not be part of the alphabet "${r}".`
|
|
3137
3137
|
});
|
|
3138
3138
|
return () => `${e}${n}${o()}`;
|
|
3139
|
-
},
|
|
3139
|
+
}, Qd = xt();
|
|
3140
3140
|
function Bn(e = globalThis) {
|
|
3141
3141
|
var t, r, n;
|
|
3142
3142
|
return e.window ? "runtime/browser" : (t = e.navigator) != null && t.userAgent ? `runtime/${e.navigator.userAgent.toLowerCase()}` : (n = (r = e.process) == null ? void 0 : r.versions) != null && n.node ? `runtime/node.js/${e.process.version.substring(0)}` : e.EdgeRuntime ? "runtime/vercel-edge" : "runtime/unknown";
|
|
@@ -3163,12 +3163,12 @@ function Vn(e, ...t) {
|
|
|
3163
3163
|
[n, ...t].filter(Boolean).join(" ")
|
|
3164
3164
|
), Object.fromEntries(r.entries());
|
|
3165
3165
|
}
|
|
3166
|
-
var
|
|
3167
|
-
function
|
|
3166
|
+
var ep = /"__proto__"\s*:/, tp = /"constructor"\s*:/;
|
|
3167
|
+
function rp(e) {
|
|
3168
3168
|
const t = JSON.parse(e);
|
|
3169
|
-
return t === null || typeof t != "object" ||
|
|
3169
|
+
return t === null || typeof t != "object" || ep.test(e) === !1 && tp.test(e) === !1 ? t : np(t);
|
|
3170
3170
|
}
|
|
3171
|
-
function
|
|
3171
|
+
function np(e) {
|
|
3172
3172
|
let t = [e];
|
|
3173
3173
|
for (; t.length; ) {
|
|
3174
3174
|
const r = t;
|
|
@@ -3186,31 +3186,31 @@ function rp(e) {
|
|
|
3186
3186
|
}
|
|
3187
3187
|
return e;
|
|
3188
3188
|
}
|
|
3189
|
-
function
|
|
3189
|
+
function op(e) {
|
|
3190
3190
|
const { stackTraceLimit: t } = Error;
|
|
3191
3191
|
Error.stackTraceLimit = 0;
|
|
3192
3192
|
try {
|
|
3193
|
-
return
|
|
3193
|
+
return rp(e);
|
|
3194
3194
|
} finally {
|
|
3195
3195
|
Error.stackTraceLimit = t;
|
|
3196
3196
|
}
|
|
3197
3197
|
}
|
|
3198
3198
|
var Kt = Symbol.for("vercel.ai.validator");
|
|
3199
|
-
function
|
|
3199
|
+
function sp(e) {
|
|
3200
3200
|
return { [Kt]: !0, validate: e };
|
|
3201
3201
|
}
|
|
3202
|
-
function
|
|
3202
|
+
function ap(e) {
|
|
3203
3203
|
return typeof e == "object" && e !== null && Kt in e && e[Kt] === !0 && "validate" in e;
|
|
3204
3204
|
}
|
|
3205
|
-
function
|
|
3205
|
+
function ip(e) {
|
|
3206
3206
|
let t;
|
|
3207
3207
|
return () => (t == null && (t = e()), t);
|
|
3208
3208
|
}
|
|
3209
|
-
function ip(e) {
|
|
3210
|
-
return sp(e) ? e : typeof e == "function" ? e() : cp(e);
|
|
3211
|
-
}
|
|
3212
3209
|
function cp(e) {
|
|
3213
|
-
return
|
|
3210
|
+
return ap(e) ? e : typeof e == "function" ? e() : lp(e);
|
|
3211
|
+
}
|
|
3212
|
+
function lp(e) {
|
|
3213
|
+
return sp(async (t) => {
|
|
3214
3214
|
const r = await e["~standard"].validate(t);
|
|
3215
3215
|
return r.issues == null ? { success: !0, value: r.value } : {
|
|
3216
3216
|
success: !1,
|
|
@@ -3234,7 +3234,7 @@ async function Kr({
|
|
|
3234
3234
|
value: e,
|
|
3235
3235
|
schema: t
|
|
3236
3236
|
}) {
|
|
3237
|
-
const r =
|
|
3237
|
+
const r = cp(t);
|
|
3238
3238
|
try {
|
|
3239
3239
|
if (r.validate == null)
|
|
3240
3240
|
return { success: !0, value: e, rawValue: e };
|
|
@@ -3257,7 +3257,7 @@ async function Qt({
|
|
|
3257
3257
|
schema: t
|
|
3258
3258
|
}) {
|
|
3259
3259
|
try {
|
|
3260
|
-
const r =
|
|
3260
|
+
const r = op(e);
|
|
3261
3261
|
return t == null ? { success: !0, value: r, rawValue: r } : await Kr({ value: r, schema: t });
|
|
3262
3262
|
} catch (r) {
|
|
3263
3263
|
return {
|
|
@@ -3267,11 +3267,11 @@ async function Qt({
|
|
|
3267
3267
|
};
|
|
3268
3268
|
}
|
|
3269
3269
|
}
|
|
3270
|
-
function
|
|
3270
|
+
function up({
|
|
3271
3271
|
stream: e,
|
|
3272
3272
|
schema: t
|
|
3273
3273
|
}) {
|
|
3274
|
-
return e.pipeThrough(new TextDecoderStream()).pipeThrough(new
|
|
3274
|
+
return e.pipeThrough(new TextDecoderStream()).pipeThrough(new qi()).pipeThrough(
|
|
3275
3275
|
new TransformStream({
|
|
3276
3276
|
async transform({ data: r }, n) {
|
|
3277
3277
|
r !== "[DONE]" && n.enqueue(await Qt({ text: r, schema: t }));
|
|
@@ -3282,12 +3282,12 @@ function lp({
|
|
|
3282
3282
|
async function rt(e) {
|
|
3283
3283
|
return typeof e == "function" && (e = e()), Promise.resolve(e);
|
|
3284
3284
|
}
|
|
3285
|
-
var
|
|
3285
|
+
var dp = (e, t) => {
|
|
3286
3286
|
let r = 0;
|
|
3287
3287
|
for (; r < e.length && r < t.length && e[r] === t[r]; r++)
|
|
3288
3288
|
;
|
|
3289
3289
|
return [(e.length - r).toString(), ...t.slice(r)].join("/");
|
|
3290
|
-
},
|
|
3290
|
+
}, pp = Symbol(
|
|
3291
3291
|
"Let zodToJsonSchema decide on which parser to use"
|
|
3292
3292
|
), Gn = {
|
|
3293
3293
|
name: void 0,
|
|
@@ -3309,7 +3309,7 @@ var up = (e, t) => {
|
|
|
3309
3309
|
emailStrategy: "format:email",
|
|
3310
3310
|
base64Strategy: "contentEncoding:base64",
|
|
3311
3311
|
nameStrategy: "ref"
|
|
3312
|
-
},
|
|
3312
|
+
}, fp = (e) => typeof e == "string" ? {
|
|
3313
3313
|
...Gn,
|
|
3314
3314
|
name: e
|
|
3315
3315
|
} : {
|
|
@@ -3319,7 +3319,7 @@ var up = (e, t) => {
|
|
|
3319
3319
|
function ue() {
|
|
3320
3320
|
return {};
|
|
3321
3321
|
}
|
|
3322
|
-
function
|
|
3322
|
+
function hp(e, t) {
|
|
3323
3323
|
var r, n, o;
|
|
3324
3324
|
const s = {
|
|
3325
3325
|
type: "array"
|
|
@@ -3329,7 +3329,7 @@ function fp(e, t) {
|
|
|
3329
3329
|
currentPath: [...t.currentPath, "items"]
|
|
3330
3330
|
})), e.minLength && (s.minItems = e.minLength.value), e.maxLength && (s.maxItems = e.maxLength.value), e.exactLength && (s.minItems = e.exactLength.value, s.maxItems = e.exactLength.value), s;
|
|
3331
3331
|
}
|
|
3332
|
-
function
|
|
3332
|
+
function mp(e) {
|
|
3333
3333
|
const t = {
|
|
3334
3334
|
type: "integer",
|
|
3335
3335
|
format: "int64"
|
|
@@ -3349,13 +3349,13 @@ function hp(e) {
|
|
|
3349
3349
|
}
|
|
3350
3350
|
return t;
|
|
3351
3351
|
}
|
|
3352
|
-
function
|
|
3352
|
+
function gp() {
|
|
3353
3353
|
return { type: "boolean" };
|
|
3354
3354
|
}
|
|
3355
3355
|
function Ts(e, t) {
|
|
3356
3356
|
return L(e.type._def, t);
|
|
3357
3357
|
}
|
|
3358
|
-
var
|
|
3358
|
+
var vp = (e, t) => L(e.innerType._def, t);
|
|
3359
3359
|
function Ss(e, t, r) {
|
|
3360
3360
|
const n = r ?? t.dateStrategy;
|
|
3361
3361
|
if (Array.isArray(n))
|
|
@@ -3375,10 +3375,10 @@ function Ss(e, t, r) {
|
|
|
3375
3375
|
format: "date"
|
|
3376
3376
|
};
|
|
3377
3377
|
case "integer":
|
|
3378
|
-
return
|
|
3378
|
+
return yp(e);
|
|
3379
3379
|
}
|
|
3380
3380
|
}
|
|
3381
|
-
var
|
|
3381
|
+
var yp = (e) => {
|
|
3382
3382
|
const t = {
|
|
3383
3383
|
type: "integer",
|
|
3384
3384
|
format: "unix-time"
|
|
@@ -3394,23 +3394,23 @@ var vp = (e) => {
|
|
|
3394
3394
|
}
|
|
3395
3395
|
return t;
|
|
3396
3396
|
};
|
|
3397
|
-
function
|
|
3397
|
+
function _p(e, t) {
|
|
3398
3398
|
return {
|
|
3399
3399
|
...L(e.innerType._def, t),
|
|
3400
3400
|
default: e.defaultValue()
|
|
3401
3401
|
};
|
|
3402
3402
|
}
|
|
3403
|
-
function
|
|
3403
|
+
function bp(e, t) {
|
|
3404
3404
|
return t.effectStrategy === "input" ? L(e.schema._def, t) : ue();
|
|
3405
3405
|
}
|
|
3406
|
-
function
|
|
3406
|
+
function wp(e) {
|
|
3407
3407
|
return {
|
|
3408
3408
|
type: "string",
|
|
3409
3409
|
enum: Array.from(e.values)
|
|
3410
3410
|
};
|
|
3411
3411
|
}
|
|
3412
|
-
var
|
|
3413
|
-
function
|
|
3412
|
+
var Ip = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
|
|
3413
|
+
function Ep(e, t) {
|
|
3414
3414
|
const r = [
|
|
3415
3415
|
L(e.left._def, {
|
|
3416
3416
|
...t,
|
|
@@ -3422,7 +3422,7 @@ function Ip(e, t) {
|
|
|
3422
3422
|
})
|
|
3423
3423
|
].filter((o) => !!o), n = [];
|
|
3424
3424
|
return r.forEach((o) => {
|
|
3425
|
-
if (
|
|
3425
|
+
if (Ip(o))
|
|
3426
3426
|
n.push(...o.allOf);
|
|
3427
3427
|
else {
|
|
3428
3428
|
let s = o;
|
|
@@ -3434,7 +3434,7 @@ function Ip(e, t) {
|
|
|
3434
3434
|
}
|
|
3435
3435
|
}), n.length ? { allOf: n } : void 0;
|
|
3436
3436
|
}
|
|
3437
|
-
function
|
|
3437
|
+
function Tp(e) {
|
|
3438
3438
|
const t = typeof e.value;
|
|
3439
3439
|
return t !== "bigint" && t !== "number" && t !== "boolean" && t !== "string" ? {
|
|
3440
3440
|
type: Array.isArray(e.value) ? "array" : "object"
|
|
@@ -3613,15 +3613,15 @@ function ks(e, t) {
|
|
|
3613
3613
|
return r;
|
|
3614
3614
|
}
|
|
3615
3615
|
function gr(e, t) {
|
|
3616
|
-
return t.patternStrategy === "escape" ?
|
|
3616
|
+
return t.patternStrategy === "escape" ? kp(e) : e;
|
|
3617
3617
|
}
|
|
3618
|
-
var
|
|
3618
|
+
var Sp = new Set(
|
|
3619
3619
|
"ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"
|
|
3620
3620
|
);
|
|
3621
|
-
function
|
|
3621
|
+
function kp(e) {
|
|
3622
3622
|
let t = "";
|
|
3623
3623
|
for (let r = 0; r < e.length; r++)
|
|
3624
|
-
|
|
3624
|
+
Sp.has(e[r]) || (t += "\\"), t += e[r];
|
|
3625
3625
|
return t;
|
|
3626
3626
|
}
|
|
3627
3627
|
function ye(e, t, r, n) {
|
|
@@ -3728,7 +3728,7 @@ function Cs(e, t) {
|
|
|
3728
3728
|
}
|
|
3729
3729
|
return l;
|
|
3730
3730
|
}
|
|
3731
|
-
function
|
|
3731
|
+
function Cp(e, t) {
|
|
3732
3732
|
if (t.mapStrategy === "record")
|
|
3733
3733
|
return Cs(e, t);
|
|
3734
3734
|
const r = L(e.keyType._def, {
|
|
@@ -3749,7 +3749,7 @@ function kp(e, t) {
|
|
|
3749
3749
|
}
|
|
3750
3750
|
};
|
|
3751
3751
|
}
|
|
3752
|
-
function
|
|
3752
|
+
function xp(e) {
|
|
3753
3753
|
const t = e.values, n = Object.keys(e.values).filter((s) => typeof t[t[s]] != "number").map((s) => t[s]), o = Array.from(
|
|
3754
3754
|
new Set(n.map((s) => typeof s))
|
|
3755
3755
|
);
|
|
@@ -3758,28 +3758,28 @@ function Cp(e) {
|
|
|
3758
3758
|
enum: n
|
|
3759
3759
|
};
|
|
3760
3760
|
}
|
|
3761
|
-
function
|
|
3761
|
+
function Ap() {
|
|
3762
3762
|
return { not: ue() };
|
|
3763
3763
|
}
|
|
3764
|
-
function
|
|
3764
|
+
function Np() {
|
|
3765
3765
|
return {
|
|
3766
3766
|
type: "null"
|
|
3767
3767
|
};
|
|
3768
3768
|
}
|
|
3769
|
-
var
|
|
3769
|
+
var zr = {
|
|
3770
3770
|
ZodString: "string",
|
|
3771
3771
|
ZodNumber: "number",
|
|
3772
3772
|
ZodBigInt: "integer",
|
|
3773
3773
|
ZodBoolean: "boolean",
|
|
3774
3774
|
ZodNull: "null"
|
|
3775
3775
|
};
|
|
3776
|
-
function
|
|
3776
|
+
function Op(e, t) {
|
|
3777
3777
|
const r = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
|
|
3778
3778
|
if (r.every(
|
|
3779
|
-
(n) => n._def.typeName in
|
|
3779
|
+
(n) => n._def.typeName in zr && (!n._def.checks || !n._def.checks.length)
|
|
3780
3780
|
)) {
|
|
3781
3781
|
const n = r.reduce((o, s) => {
|
|
3782
|
-
const i =
|
|
3782
|
+
const i = zr[s._def.typeName];
|
|
3783
3783
|
return i && !o.includes(i) ? [...o, i] : o;
|
|
3784
3784
|
}, []);
|
|
3785
3785
|
return {
|
|
@@ -3828,9 +3828,9 @@ function Np(e, t) {
|
|
|
3828
3828
|
[]
|
|
3829
3829
|
)
|
|
3830
3830
|
};
|
|
3831
|
-
return
|
|
3831
|
+
return Pp(e, t);
|
|
3832
3832
|
}
|
|
3833
|
-
var
|
|
3833
|
+
var Pp = (e, t) => {
|
|
3834
3834
|
const r = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map(
|
|
3835
3835
|
(n, o) => L(n._def, {
|
|
3836
3836
|
...t,
|
|
@@ -3847,7 +3847,7 @@ function zp(e, t) {
|
|
|
3847
3847
|
) && (!e.innerType._def.checks || !e.innerType._def.checks.length))
|
|
3848
3848
|
return {
|
|
3849
3849
|
type: [
|
|
3850
|
-
|
|
3850
|
+
zr[e.innerType._def.typeName],
|
|
3851
3851
|
"null"
|
|
3852
3852
|
]
|
|
3853
3853
|
};
|
|
@@ -3857,7 +3857,7 @@ function zp(e, t) {
|
|
|
3857
3857
|
});
|
|
3858
3858
|
return r && { anyOf: [r, { type: "null" }] };
|
|
3859
3859
|
}
|
|
3860
|
-
function
|
|
3860
|
+
function Rp(e) {
|
|
3861
3861
|
const t = {
|
|
3862
3862
|
type: "number"
|
|
3863
3863
|
};
|
|
@@ -3879,7 +3879,7 @@ function Pp(e) {
|
|
|
3879
3879
|
}
|
|
3880
3880
|
return t;
|
|
3881
3881
|
}
|
|
3882
|
-
function
|
|
3882
|
+
function Mp(e, t) {
|
|
3883
3883
|
const r = {
|
|
3884
3884
|
type: "object",
|
|
3885
3885
|
properties: {}
|
|
@@ -3888,7 +3888,7 @@ function Rp(e, t) {
|
|
|
3888
3888
|
let a = o[i];
|
|
3889
3889
|
if (a === void 0 || a._def === void 0)
|
|
3890
3890
|
continue;
|
|
3891
|
-
const l =
|
|
3891
|
+
const l = Zp(a), c = L(a._def, {
|
|
3892
3892
|
...t,
|
|
3893
3893
|
currentPath: [...t.currentPath, "properties", i],
|
|
3894
3894
|
propertyPath: [...t.currentPath, "properties", i]
|
|
@@ -3896,10 +3896,10 @@ function Rp(e, t) {
|
|
|
3896
3896
|
c !== void 0 && (r.properties[i] = c, l || n.push(i));
|
|
3897
3897
|
}
|
|
3898
3898
|
n.length && (r.required = n);
|
|
3899
|
-
const s =
|
|
3899
|
+
const s = $p(e, t);
|
|
3900
3900
|
return s !== void 0 && (r.additionalProperties = s), r;
|
|
3901
3901
|
}
|
|
3902
|
-
function
|
|
3902
|
+
function $p(e, t) {
|
|
3903
3903
|
if (e.catchall._def.typeName !== "ZodNever")
|
|
3904
3904
|
return L(e.catchall._def, {
|
|
3905
3905
|
...t,
|
|
@@ -3914,14 +3914,14 @@ function Mp(e, t) {
|
|
|
3914
3914
|
return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
|
|
3915
3915
|
}
|
|
3916
3916
|
}
|
|
3917
|
-
function
|
|
3917
|
+
function Zp(e) {
|
|
3918
3918
|
try {
|
|
3919
3919
|
return e.isOptional();
|
|
3920
3920
|
} catch {
|
|
3921
3921
|
return !0;
|
|
3922
3922
|
}
|
|
3923
3923
|
}
|
|
3924
|
-
var
|
|
3924
|
+
var Dp = (e, t) => {
|
|
3925
3925
|
var r;
|
|
3926
3926
|
if (t.currentPath.toString() === ((r = t.propertyPath) == null ? void 0 : r.toString()))
|
|
3927
3927
|
return L(e.innerType._def, t);
|
|
@@ -3930,7 +3930,7 @@ var Zp = (e, t) => {
|
|
|
3930
3930
|
currentPath: [...t.currentPath, "anyOf", "1"]
|
|
3931
3931
|
});
|
|
3932
3932
|
return n ? { anyOf: [{ not: ue() }, n] } : ue();
|
|
3933
|
-
},
|
|
3933
|
+
}, Lp = (e, t) => {
|
|
3934
3934
|
if (t.pipeStrategy === "input")
|
|
3935
3935
|
return L(e.in._def, t);
|
|
3936
3936
|
if (t.pipeStrategy === "output")
|
|
@@ -3946,10 +3946,10 @@ var Zp = (e, t) => {
|
|
|
3946
3946
|
allOf: [r, n].filter((o) => o !== void 0)
|
|
3947
3947
|
};
|
|
3948
3948
|
};
|
|
3949
|
-
function
|
|
3949
|
+
function Up(e, t) {
|
|
3950
3950
|
return L(e.type._def, t);
|
|
3951
3951
|
}
|
|
3952
|
-
function
|
|
3952
|
+
function jp(e, t) {
|
|
3953
3953
|
const n = {
|
|
3954
3954
|
type: "array",
|
|
3955
3955
|
uniqueItems: !0,
|
|
@@ -3960,7 +3960,7 @@ function Up(e, t) {
|
|
|
3960
3960
|
};
|
|
3961
3961
|
return e.minSize && (n.minItems = e.minSize.value), e.maxSize && (n.maxItems = e.maxSize.value), n;
|
|
3962
3962
|
}
|
|
3963
|
-
function
|
|
3963
|
+
function Fp(e, t) {
|
|
3964
3964
|
return e.rest ? {
|
|
3965
3965
|
type: "array",
|
|
3966
3966
|
minItems: e.items.length,
|
|
@@ -3992,80 +3992,80 @@ function jp(e, t) {
|
|
|
3992
3992
|
)
|
|
3993
3993
|
};
|
|
3994
3994
|
}
|
|
3995
|
-
function
|
|
3995
|
+
function Bp() {
|
|
3996
3996
|
return {
|
|
3997
3997
|
not: ue()
|
|
3998
3998
|
};
|
|
3999
3999
|
}
|
|
4000
|
-
function
|
|
4000
|
+
function Vp() {
|
|
4001
4001
|
return ue();
|
|
4002
4002
|
}
|
|
4003
|
-
var
|
|
4003
|
+
var Hp = (e, t) => L(e.innerType._def, t), Gp = (e, t, r) => {
|
|
4004
4004
|
switch (t) {
|
|
4005
4005
|
case N.ZodString:
|
|
4006
4006
|
return ks(e, r);
|
|
4007
4007
|
case N.ZodNumber:
|
|
4008
|
-
return
|
|
4008
|
+
return Rp(e);
|
|
4009
4009
|
case N.ZodObject:
|
|
4010
|
-
return
|
|
4010
|
+
return Mp(e, r);
|
|
4011
4011
|
case N.ZodBigInt:
|
|
4012
|
-
return
|
|
4012
|
+
return mp(e);
|
|
4013
4013
|
case N.ZodBoolean:
|
|
4014
|
-
return
|
|
4014
|
+
return gp();
|
|
4015
4015
|
case N.ZodDate:
|
|
4016
4016
|
return Ss(e, r);
|
|
4017
4017
|
case N.ZodUndefined:
|
|
4018
|
-
return
|
|
4018
|
+
return Bp();
|
|
4019
4019
|
case N.ZodNull:
|
|
4020
|
-
return
|
|
4020
|
+
return Np();
|
|
4021
4021
|
case N.ZodArray:
|
|
4022
|
-
return
|
|
4022
|
+
return hp(e, r);
|
|
4023
4023
|
case N.ZodUnion:
|
|
4024
4024
|
case N.ZodDiscriminatedUnion:
|
|
4025
|
-
return
|
|
4025
|
+
return Op(e, r);
|
|
4026
4026
|
case N.ZodIntersection:
|
|
4027
|
-
return
|
|
4027
|
+
return Ep(e, r);
|
|
4028
4028
|
case N.ZodTuple:
|
|
4029
|
-
return
|
|
4029
|
+
return Fp(e, r);
|
|
4030
4030
|
case N.ZodRecord:
|
|
4031
4031
|
return Cs(e, r);
|
|
4032
4032
|
case N.ZodLiteral:
|
|
4033
|
-
return
|
|
4033
|
+
return Tp(e);
|
|
4034
4034
|
case N.ZodEnum:
|
|
4035
|
-
return
|
|
4035
|
+
return wp(e);
|
|
4036
4036
|
case N.ZodNativeEnum:
|
|
4037
|
-
return
|
|
4037
|
+
return xp(e);
|
|
4038
4038
|
case N.ZodNullable:
|
|
4039
4039
|
return zp(e, r);
|
|
4040
4040
|
case N.ZodOptional:
|
|
4041
|
-
return
|
|
4041
|
+
return Dp(e, r);
|
|
4042
4042
|
case N.ZodMap:
|
|
4043
|
-
return
|
|
4043
|
+
return Cp(e, r);
|
|
4044
4044
|
case N.ZodSet:
|
|
4045
|
-
return
|
|
4045
|
+
return jp(e, r);
|
|
4046
4046
|
case N.ZodLazy:
|
|
4047
4047
|
return () => e.getter()._def;
|
|
4048
4048
|
case N.ZodPromise:
|
|
4049
|
-
return
|
|
4049
|
+
return Up(e, r);
|
|
4050
4050
|
case N.ZodNaN:
|
|
4051
4051
|
case N.ZodNever:
|
|
4052
|
-
return
|
|
4052
|
+
return Ap();
|
|
4053
4053
|
case N.ZodEffects:
|
|
4054
|
-
return
|
|
4054
|
+
return bp(e, r);
|
|
4055
4055
|
case N.ZodAny:
|
|
4056
4056
|
return ue();
|
|
4057
4057
|
case N.ZodUnknown:
|
|
4058
|
-
return
|
|
4058
|
+
return Vp();
|
|
4059
4059
|
case N.ZodDefault:
|
|
4060
|
-
return
|
|
4060
|
+
return _p(e, r);
|
|
4061
4061
|
case N.ZodBranded:
|
|
4062
4062
|
return Ts(e, r);
|
|
4063
4063
|
case N.ZodReadonly:
|
|
4064
|
-
return
|
|
4064
|
+
return Hp(e, r);
|
|
4065
4065
|
case N.ZodCatch:
|
|
4066
|
-
return
|
|
4066
|
+
return vp(e, r);
|
|
4067
4067
|
case N.ZodPipeline:
|
|
4068
|
-
return
|
|
4068
|
+
return Lp(e, r);
|
|
4069
4069
|
case N.ZodFunction:
|
|
4070
4070
|
case N.ZodVoid:
|
|
4071
4071
|
case N.ZodSymbol:
|
|
@@ -4086,29 +4086,29 @@ function L(e, t, r = !1) {
|
|
|
4086
4086
|
o,
|
|
4087
4087
|
r
|
|
4088
4088
|
);
|
|
4089
|
-
if (l !==
|
|
4089
|
+
if (l !== pp)
|
|
4090
4090
|
return l;
|
|
4091
4091
|
}
|
|
4092
4092
|
if (o && !r) {
|
|
4093
|
-
const l =
|
|
4093
|
+
const l = Jp(o, t);
|
|
4094
4094
|
if (l !== void 0)
|
|
4095
4095
|
return l;
|
|
4096
4096
|
}
|
|
4097
4097
|
const s = { def: e, path: t.currentPath, jsonSchema: void 0 };
|
|
4098
4098
|
t.seen.set(e, s);
|
|
4099
|
-
const i =
|
|
4100
|
-
if (a &&
|
|
4099
|
+
const i = Gp(e, e.typeName, t), a = typeof i == "function" ? L(i(), t) : i;
|
|
4100
|
+
if (a && Wp(e, t, a), t.postProcess) {
|
|
4101
4101
|
const l = t.postProcess(a, e, t);
|
|
4102
4102
|
return s.jsonSchema = a, l;
|
|
4103
4103
|
}
|
|
4104
4104
|
return s.jsonSchema = a, a;
|
|
4105
4105
|
}
|
|
4106
|
-
var
|
|
4106
|
+
var Jp = (e, t) => {
|
|
4107
4107
|
switch (t.$refStrategy) {
|
|
4108
4108
|
case "root":
|
|
4109
4109
|
return { $ref: e.path.join("/") };
|
|
4110
4110
|
case "relative":
|
|
4111
|
-
return { $ref:
|
|
4111
|
+
return { $ref: dp(t.currentPath, e.path) };
|
|
4112
4112
|
case "none":
|
|
4113
4113
|
case "seen":
|
|
4114
4114
|
return e.path.length < t.currentPath.length && e.path.every((r, n) => t.currentPath[n] === r) ? (console.warn(
|
|
@@ -4117,8 +4117,8 @@ var Gp = (e, t) => {
|
|
|
4117
4117
|
)}! Defaulting to any`
|
|
4118
4118
|
), ue()) : t.$refStrategy === "seen" ? ue() : void 0;
|
|
4119
4119
|
}
|
|
4120
|
-
},
|
|
4121
|
-
const t =
|
|
4120
|
+
}, Wp = (e, t, r) => (e.description && (r.description = e.description), r), Yp = (e) => {
|
|
4121
|
+
const t = fp(e), r = t.name !== void 0 ? [...t.basePath, t.definitionPath, t.name] : t.basePath;
|
|
4122
4122
|
return {
|
|
4123
4123
|
...t,
|
|
4124
4124
|
currentPath: r,
|
|
@@ -4135,9 +4135,9 @@ var Gp = (e, t) => {
|
|
|
4135
4135
|
])
|
|
4136
4136
|
)
|
|
4137
4137
|
};
|
|
4138
|
-
},
|
|
4138
|
+
}, qp = (e, t) => {
|
|
4139
4139
|
var r;
|
|
4140
|
-
const n =
|
|
4140
|
+
const n = Yp(t);
|
|
4141
4141
|
let o = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce(
|
|
4142
4142
|
(c, [p, u]) => {
|
|
4143
4143
|
var g;
|
|
@@ -4179,13 +4179,13 @@ var Gp = (e, t) => {
|
|
|
4179
4179
|
}
|
|
4180
4180
|
};
|
|
4181
4181
|
return l.$schema = "http://json-schema.org/draft-07/schema#", l;
|
|
4182
|
-
},
|
|
4183
|
-
function
|
|
4182
|
+
}, Xp = qp;
|
|
4183
|
+
function Kp(e, t) {
|
|
4184
4184
|
var r;
|
|
4185
4185
|
const n = (r = void 0) != null ? r : !1;
|
|
4186
4186
|
return Qr(
|
|
4187
4187
|
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
4188
|
-
() =>
|
|
4188
|
+
() => Xp(e, {
|
|
4189
4189
|
$refStrategy: n ? "root" : "none"
|
|
4190
4190
|
}),
|
|
4191
4191
|
{
|
|
@@ -4196,12 +4196,12 @@ function Xp(e, t) {
|
|
|
4196
4196
|
}
|
|
4197
4197
|
);
|
|
4198
4198
|
}
|
|
4199
|
-
function
|
|
4199
|
+
function Qp(e, t) {
|
|
4200
4200
|
var r;
|
|
4201
4201
|
const n = (r = void 0) != null ? r : !1;
|
|
4202
4202
|
return Qr(
|
|
4203
4203
|
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
4204
|
-
() =>
|
|
4204
|
+
() => Bu(e, {
|
|
4205
4205
|
target: "draft-7",
|
|
4206
4206
|
io: "output",
|
|
4207
4207
|
reused: n ? "ref" : "inline"
|
|
@@ -4214,11 +4214,11 @@ function Kp(e, t) {
|
|
|
4214
4214
|
}
|
|
4215
4215
|
);
|
|
4216
4216
|
}
|
|
4217
|
-
function
|
|
4217
|
+
function ef(e) {
|
|
4218
4218
|
return "_zod" in e;
|
|
4219
4219
|
}
|
|
4220
4220
|
function xs(e, t) {
|
|
4221
|
-
return
|
|
4221
|
+
return ef(e) ? Qp(e) : Kp(e);
|
|
4222
4222
|
}
|
|
4223
4223
|
var Rr = Symbol.for("vercel.ai.schema");
|
|
4224
4224
|
function Qr(e, {
|
|
@@ -4235,22 +4235,22 @@ function Qr(e, {
|
|
|
4235
4235
|
validate: t
|
|
4236
4236
|
};
|
|
4237
4237
|
}
|
|
4238
|
-
function
|
|
4238
|
+
function tf(e) {
|
|
4239
4239
|
return typeof e == "object" && e !== null && Rr in e && e[Rr] === !0 && "jsonSchema" in e && "validate" in e;
|
|
4240
4240
|
}
|
|
4241
|
-
function
|
|
4241
|
+
function rf(e) {
|
|
4242
4242
|
return e == null ? Qr({
|
|
4243
4243
|
properties: {},
|
|
4244
4244
|
additionalProperties: !1
|
|
4245
|
-
}) :
|
|
4245
|
+
}) : tf(e) ? e : typeof e == "function" ? e() : xs(e);
|
|
4246
4246
|
}
|
|
4247
|
-
function
|
|
4247
|
+
function nf(e) {
|
|
4248
4248
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4249
4249
|
}
|
|
4250
|
-
var
|
|
4250
|
+
var of = Object.defineProperty, sf = (e, t) => {
|
|
4251
4251
|
for (var r in t)
|
|
4252
|
-
|
|
4253
|
-
}, As = "AI_NoObjectGeneratedError", Ns = `vercel.ai.error.${As}`,
|
|
4252
|
+
of(e, r, { get: t[r], enumerable: !0 });
|
|
4253
|
+
}, As = "AI_NoObjectGeneratedError", Ns = `vercel.ai.error.${As}`, af = Symbol.for(Ns), Os, Wn = class extends Ze {
|
|
4254
4254
|
constructor({
|
|
4255
4255
|
message: e = "No object generated.",
|
|
4256
4256
|
cause: t,
|
|
@@ -4265,8 +4265,8 @@ var nf = Object.defineProperty, of = (e, t) => {
|
|
|
4265
4265
|
return Ze.hasMarker(e, Ns);
|
|
4266
4266
|
}
|
|
4267
4267
|
};
|
|
4268
|
-
Os =
|
|
4269
|
-
var Yn = "5.0.86",
|
|
4268
|
+
Os = af;
|
|
4269
|
+
var Yn = "5.0.86", Ps = he([
|
|
4270
4270
|
S(),
|
|
4271
4271
|
Xt(Uint8Array),
|
|
4272
4272
|
Xt(ArrayBuffer),
|
|
@@ -4278,11 +4278,11 @@ var Yn = "5.0.86", zs = he([
|
|
|
4278
4278
|
},
|
|
4279
4279
|
{ message: "Must be a Buffer" }
|
|
4280
4280
|
)
|
|
4281
|
-
]), It =
|
|
4281
|
+
]), It = Yd(
|
|
4282
4282
|
() => he([
|
|
4283
|
-
|
|
4283
|
+
Td(),
|
|
4284
4284
|
S(),
|
|
4285
|
-
|
|
4285
|
+
bd(),
|
|
4286
4286
|
ie(),
|
|
4287
4287
|
Or(S(), It),
|
|
4288
4288
|
it(It)
|
|
@@ -4290,59 +4290,59 @@ var Yn = "5.0.86", zs = he([
|
|
|
4290
4290
|
), Y = Or(
|
|
4291
4291
|
S(),
|
|
4292
4292
|
Or(S(), It)
|
|
4293
|
-
),
|
|
4294
|
-
type:
|
|
4293
|
+
), zs = se({
|
|
4294
|
+
type: R("text"),
|
|
4295
4295
|
text: S(),
|
|
4296
4296
|
providerOptions: Y.optional()
|
|
4297
|
-
}),
|
|
4298
|
-
type:
|
|
4299
|
-
image: he([
|
|
4297
|
+
}), cf = se({
|
|
4298
|
+
type: R("image"),
|
|
4299
|
+
image: he([Ps, Xt(URL)]),
|
|
4300
4300
|
mediaType: S().optional(),
|
|
4301
4301
|
providerOptions: Y.optional()
|
|
4302
4302
|
}), Rs = se({
|
|
4303
|
-
type:
|
|
4304
|
-
data: he([
|
|
4303
|
+
type: R("file"),
|
|
4304
|
+
data: he([Ps, Xt(URL)]),
|
|
4305
4305
|
filename: S().optional(),
|
|
4306
4306
|
mediaType: S(),
|
|
4307
4307
|
providerOptions: Y.optional()
|
|
4308
|
-
}),
|
|
4309
|
-
type:
|
|
4308
|
+
}), lf = se({
|
|
4309
|
+
type: R("reasoning"),
|
|
4310
4310
|
text: S(),
|
|
4311
4311
|
providerOptions: Y.optional()
|
|
4312
|
-
}),
|
|
4313
|
-
type:
|
|
4312
|
+
}), uf = se({
|
|
4313
|
+
type: R("tool-call"),
|
|
4314
4314
|
toolCallId: S(),
|
|
4315
4315
|
toolName: S(),
|
|
4316
4316
|
input: Se(),
|
|
4317
4317
|
providerOptions: Y.optional(),
|
|
4318
4318
|
providerExecuted: ie().optional()
|
|
4319
|
-
}),
|
|
4319
|
+
}), df = Ad("type", [
|
|
4320
4320
|
se({
|
|
4321
|
-
type:
|
|
4321
|
+
type: R("text"),
|
|
4322
4322
|
value: S()
|
|
4323
4323
|
}),
|
|
4324
4324
|
se({
|
|
4325
|
-
type:
|
|
4325
|
+
type: R("json"),
|
|
4326
4326
|
value: It
|
|
4327
4327
|
}),
|
|
4328
4328
|
se({
|
|
4329
|
-
type:
|
|
4329
|
+
type: R("error-text"),
|
|
4330
4330
|
value: S()
|
|
4331
4331
|
}),
|
|
4332
4332
|
se({
|
|
4333
|
-
type:
|
|
4333
|
+
type: R("error-json"),
|
|
4334
4334
|
value: It
|
|
4335
4335
|
}),
|
|
4336
4336
|
se({
|
|
4337
|
-
type:
|
|
4337
|
+
type: R("content"),
|
|
4338
4338
|
value: it(
|
|
4339
4339
|
he([
|
|
4340
4340
|
se({
|
|
4341
|
-
type:
|
|
4341
|
+
type: R("text"),
|
|
4342
4342
|
text: S()
|
|
4343
4343
|
}),
|
|
4344
4344
|
se({
|
|
4345
|
-
type:
|
|
4345
|
+
type: R("media"),
|
|
4346
4346
|
data: S(),
|
|
4347
4347
|
mediaType: S()
|
|
4348
4348
|
})
|
|
@@ -4350,91 +4350,91 @@ var Yn = "5.0.86", zs = he([
|
|
|
4350
4350
|
)
|
|
4351
4351
|
})
|
|
4352
4352
|
]), Ms = se({
|
|
4353
|
-
type:
|
|
4353
|
+
type: R("tool-result"),
|
|
4354
4354
|
toolCallId: S(),
|
|
4355
4355
|
toolName: S(),
|
|
4356
|
-
output:
|
|
4356
|
+
output: df,
|
|
4357
4357
|
providerOptions: Y.optional()
|
|
4358
|
-
}),
|
|
4358
|
+
}), pf = se(
|
|
4359
4359
|
{
|
|
4360
|
-
role:
|
|
4360
|
+
role: R("system"),
|
|
4361
4361
|
content: S(),
|
|
4362
4362
|
providerOptions: Y.optional()
|
|
4363
4363
|
}
|
|
4364
|
-
),
|
|
4365
|
-
role:
|
|
4364
|
+
), ff = se({
|
|
4365
|
+
role: R("user"),
|
|
4366
4366
|
content: he([
|
|
4367
4367
|
S(),
|
|
4368
|
-
it(he([
|
|
4368
|
+
it(he([zs, cf, Rs]))
|
|
4369
4369
|
]),
|
|
4370
4370
|
providerOptions: Y.optional()
|
|
4371
|
-
}),
|
|
4372
|
-
role:
|
|
4371
|
+
}), hf = se({
|
|
4372
|
+
role: R("assistant"),
|
|
4373
4373
|
content: he([
|
|
4374
4374
|
S(),
|
|
4375
4375
|
it(
|
|
4376
4376
|
he([
|
|
4377
|
-
|
|
4377
|
+
zs,
|
|
4378
4378
|
Rs,
|
|
4379
|
-
cf,
|
|
4380
4379
|
lf,
|
|
4380
|
+
uf,
|
|
4381
4381
|
Ms
|
|
4382
4382
|
])
|
|
4383
4383
|
)
|
|
4384
4384
|
]),
|
|
4385
4385
|
providerOptions: Y.optional()
|
|
4386
|
-
}),
|
|
4387
|
-
role:
|
|
4386
|
+
}), mf = se({
|
|
4387
|
+
role: R("tool"),
|
|
4388
4388
|
content: it(Ms),
|
|
4389
4389
|
providerOptions: Y.optional()
|
|
4390
4390
|
});
|
|
4391
4391
|
he([
|
|
4392
|
-
df,
|
|
4393
4392
|
pf,
|
|
4394
4393
|
ff,
|
|
4395
|
-
hf
|
|
4394
|
+
hf,
|
|
4395
|
+
mf
|
|
4396
4396
|
]);
|
|
4397
4397
|
xt({
|
|
4398
4398
|
prefix: "aitxt",
|
|
4399
4399
|
size: 24
|
|
4400
4400
|
});
|
|
4401
|
-
var
|
|
4401
|
+
var gf = ip(
|
|
4402
4402
|
() => xs(
|
|
4403
4403
|
he([
|
|
4404
4404
|
G({
|
|
4405
|
-
type:
|
|
4405
|
+
type: R("text-start"),
|
|
4406
4406
|
id: S(),
|
|
4407
4407
|
providerMetadata: Y.optional()
|
|
4408
4408
|
}),
|
|
4409
4409
|
G({
|
|
4410
|
-
type:
|
|
4410
|
+
type: R("text-delta"),
|
|
4411
4411
|
id: S(),
|
|
4412
4412
|
delta: S(),
|
|
4413
4413
|
providerMetadata: Y.optional()
|
|
4414
4414
|
}),
|
|
4415
4415
|
G({
|
|
4416
|
-
type:
|
|
4416
|
+
type: R("text-end"),
|
|
4417
4417
|
id: S(),
|
|
4418
4418
|
providerMetadata: Y.optional()
|
|
4419
4419
|
}),
|
|
4420
4420
|
G({
|
|
4421
|
-
type:
|
|
4421
|
+
type: R("error"),
|
|
4422
4422
|
errorText: S()
|
|
4423
4423
|
}),
|
|
4424
4424
|
G({
|
|
4425
|
-
type:
|
|
4425
|
+
type: R("tool-input-start"),
|
|
4426
4426
|
toolCallId: S(),
|
|
4427
4427
|
toolName: S(),
|
|
4428
4428
|
providerExecuted: ie().optional(),
|
|
4429
4429
|
dynamic: ie().optional()
|
|
4430
4430
|
}),
|
|
4431
4431
|
G({
|
|
4432
|
-
type:
|
|
4432
|
+
type: R("tool-input-delta"),
|
|
4433
4433
|
toolCallId: S(),
|
|
4434
4434
|
inputTextDelta: S()
|
|
4435
4435
|
}),
|
|
4436
4436
|
G({
|
|
4437
|
-
type:
|
|
4437
|
+
type: R("tool-input-available"),
|
|
4438
4438
|
toolCallId: S(),
|
|
4439
4439
|
toolName: S(),
|
|
4440
4440
|
input: Se(),
|
|
@@ -4443,7 +4443,7 @@ var mf = ap(
|
|
|
4443
4443
|
dynamic: ie().optional()
|
|
4444
4444
|
}),
|
|
4445
4445
|
G({
|
|
4446
|
-
type:
|
|
4446
|
+
type: R("tool-input-error"),
|
|
4447
4447
|
toolCallId: S(),
|
|
4448
4448
|
toolName: S(),
|
|
4449
4449
|
input: Se(),
|
|
@@ -4453,7 +4453,7 @@ var mf = ap(
|
|
|
4453
4453
|
errorText: S()
|
|
4454
4454
|
}),
|
|
4455
4455
|
G({
|
|
4456
|
-
type:
|
|
4456
|
+
type: R("tool-output-available"),
|
|
4457
4457
|
toolCallId: S(),
|
|
4458
4458
|
output: Se(),
|
|
4459
4459
|
providerExecuted: ie().optional(),
|
|
@@ -4461,37 +4461,37 @@ var mf = ap(
|
|
|
4461
4461
|
preliminary: ie().optional()
|
|
4462
4462
|
}),
|
|
4463
4463
|
G({
|
|
4464
|
-
type:
|
|
4464
|
+
type: R("tool-output-error"),
|
|
4465
4465
|
toolCallId: S(),
|
|
4466
4466
|
errorText: S(),
|
|
4467
4467
|
providerExecuted: ie().optional(),
|
|
4468
4468
|
dynamic: ie().optional()
|
|
4469
4469
|
}),
|
|
4470
4470
|
G({
|
|
4471
|
-
type:
|
|
4471
|
+
type: R("reasoning-start"),
|
|
4472
4472
|
id: S(),
|
|
4473
4473
|
providerMetadata: Y.optional()
|
|
4474
4474
|
}),
|
|
4475
4475
|
G({
|
|
4476
|
-
type:
|
|
4476
|
+
type: R("reasoning-delta"),
|
|
4477
4477
|
id: S(),
|
|
4478
4478
|
delta: S(),
|
|
4479
4479
|
providerMetadata: Y.optional()
|
|
4480
4480
|
}),
|
|
4481
4481
|
G({
|
|
4482
|
-
type:
|
|
4482
|
+
type: R("reasoning-end"),
|
|
4483
4483
|
id: S(),
|
|
4484
4484
|
providerMetadata: Y.optional()
|
|
4485
4485
|
}),
|
|
4486
4486
|
G({
|
|
4487
|
-
type:
|
|
4487
|
+
type: R("source-url"),
|
|
4488
4488
|
sourceId: S(),
|
|
4489
4489
|
url: S(),
|
|
4490
4490
|
title: S().optional(),
|
|
4491
4491
|
providerMetadata: Y.optional()
|
|
4492
4492
|
}),
|
|
4493
4493
|
G({
|
|
4494
|
-
type:
|
|
4494
|
+
type: R("source-document"),
|
|
4495
4495
|
sourceId: S(),
|
|
4496
4496
|
mediaType: S(),
|
|
4497
4497
|
title: S(),
|
|
@@ -4499,7 +4499,7 @@ var mf = ap(
|
|
|
4499
4499
|
providerMetadata: Y.optional()
|
|
4500
4500
|
}),
|
|
4501
4501
|
G({
|
|
4502
|
-
type:
|
|
4502
|
+
type: R("file"),
|
|
4503
4503
|
url: S(),
|
|
4504
4504
|
mediaType: S(),
|
|
4505
4505
|
providerMetadata: Y.optional()
|
|
@@ -4514,31 +4514,31 @@ var mf = ap(
|
|
|
4514
4514
|
transient: ie().optional()
|
|
4515
4515
|
}),
|
|
4516
4516
|
G({
|
|
4517
|
-
type:
|
|
4517
|
+
type: R("start-step")
|
|
4518
4518
|
}),
|
|
4519
4519
|
G({
|
|
4520
|
-
type:
|
|
4520
|
+
type: R("finish-step")
|
|
4521
4521
|
}),
|
|
4522
4522
|
G({
|
|
4523
|
-
type:
|
|
4523
|
+
type: R("start"),
|
|
4524
4524
|
messageId: S().optional(),
|
|
4525
4525
|
messageMetadata: Se().optional()
|
|
4526
4526
|
}),
|
|
4527
4527
|
G({
|
|
4528
|
-
type:
|
|
4528
|
+
type: R("finish"),
|
|
4529
4529
|
messageMetadata: Se().optional()
|
|
4530
4530
|
}),
|
|
4531
4531
|
G({
|
|
4532
|
-
type:
|
|
4532
|
+
type: R("abort")
|
|
4533
4533
|
}),
|
|
4534
4534
|
G({
|
|
4535
|
-
type:
|
|
4535
|
+
type: R("message-metadata"),
|
|
4536
4536
|
messageMetadata: Se()
|
|
4537
4537
|
})
|
|
4538
4538
|
])
|
|
4539
4539
|
)
|
|
4540
4540
|
);
|
|
4541
|
-
function
|
|
4541
|
+
function vf(e) {
|
|
4542
4542
|
return e.type.startsWith("data-");
|
|
4543
4543
|
}
|
|
4544
4544
|
function $s(e, t) {
|
|
@@ -4562,7 +4562,7 @@ function $s(e, t) {
|
|
|
4562
4562
|
}
|
|
4563
4563
|
return r;
|
|
4564
4564
|
}
|
|
4565
|
-
function
|
|
4565
|
+
function yf(e) {
|
|
4566
4566
|
const t = ["ROOT"];
|
|
4567
4567
|
let r = -1, n = null;
|
|
4568
4568
|
function o(l, c, p) {
|
|
@@ -4814,21 +4814,21 @@ async function Zs(e) {
|
|
|
4814
4814
|
if (e === void 0)
|
|
4815
4815
|
return { value: void 0, state: "undefined-input" };
|
|
4816
4816
|
let t = await Qt({ text: e });
|
|
4817
|
-
return t.success ? { value: t.value, state: "successful-parse" } : (t = await Qt({ text:
|
|
4817
|
+
return t.success ? { value: t.value, state: "successful-parse" } : (t = await Qt({ text: yf(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
|
|
4818
4818
|
}
|
|
4819
4819
|
function Ut(e) {
|
|
4820
4820
|
return e.type.startsWith("tool-");
|
|
4821
4821
|
}
|
|
4822
|
-
function
|
|
4822
|
+
function _f(e) {
|
|
4823
4823
|
return e.type === "dynamic-tool";
|
|
4824
4824
|
}
|
|
4825
4825
|
function qn(e) {
|
|
4826
|
-
return Ut(e) ||
|
|
4826
|
+
return Ut(e) || _f(e);
|
|
4827
4827
|
}
|
|
4828
4828
|
function Xn(e) {
|
|
4829
4829
|
return e.type.split("-").slice(1).join("-");
|
|
4830
4830
|
}
|
|
4831
|
-
function
|
|
4831
|
+
function bf({
|
|
4832
4832
|
lastMessage: e,
|
|
4833
4833
|
messageId: t
|
|
4834
4834
|
}) {
|
|
@@ -4844,7 +4844,7 @@ function _f({
|
|
|
4844
4844
|
partialToolCalls: {}
|
|
4845
4845
|
};
|
|
4846
4846
|
}
|
|
4847
|
-
function
|
|
4847
|
+
function wf({
|
|
4848
4848
|
stream: e,
|
|
4849
4849
|
messageMetadataSchema: t,
|
|
4850
4850
|
dataPartSchemas: r,
|
|
@@ -5158,7 +5158,7 @@ function bf({
|
|
|
5158
5158
|
break;
|
|
5159
5159
|
}
|
|
5160
5160
|
default:
|
|
5161
|
-
if (
|
|
5161
|
+
if (vf(a)) {
|
|
5162
5162
|
r?.[a.type] != null && await Hn({
|
|
5163
5163
|
value: a.data,
|
|
5164
5164
|
schema: r[a.type]
|
|
@@ -5180,7 +5180,7 @@ function bf({
|
|
|
5180
5180
|
})
|
|
5181
5181
|
);
|
|
5182
5182
|
}
|
|
5183
|
-
async function
|
|
5183
|
+
async function If({
|
|
5184
5184
|
stream: e,
|
|
5185
5185
|
onError: t
|
|
5186
5186
|
}) {
|
|
@@ -5202,7 +5202,7 @@ xt({
|
|
|
5202
5202
|
size: 24
|
|
5203
5203
|
});
|
|
5204
5204
|
xt({ prefix: "aiobj", size: 24 });
|
|
5205
|
-
var
|
|
5205
|
+
var Ef = class {
|
|
5206
5206
|
constructor() {
|
|
5207
5207
|
this.queue = [], this.isProcessing = !1;
|
|
5208
5208
|
}
|
|
@@ -5226,12 +5226,12 @@ var If = class {
|
|
|
5226
5226
|
}
|
|
5227
5227
|
};
|
|
5228
5228
|
xt({ prefix: "aiobj", size: 24 });
|
|
5229
|
-
var
|
|
5230
|
-
|
|
5231
|
-
object: () =>
|
|
5232
|
-
text: () =>
|
|
5229
|
+
var Tf = {};
|
|
5230
|
+
sf(Tf, {
|
|
5231
|
+
object: () => kf,
|
|
5232
|
+
text: () => Sf
|
|
5233
5233
|
});
|
|
5234
|
-
var
|
|
5234
|
+
var Sf = () => ({
|
|
5235
5235
|
type: "text",
|
|
5236
5236
|
responseFormat: { type: "text" },
|
|
5237
5237
|
async parsePartial({ text: e }) {
|
|
@@ -5240,10 +5240,10 @@ var Tf = () => ({
|
|
|
5240
5240
|
async parseOutput({ text: e }) {
|
|
5241
5241
|
return e;
|
|
5242
5242
|
}
|
|
5243
|
-
}),
|
|
5243
|
+
}), kf = ({
|
|
5244
5244
|
schema: e
|
|
5245
5245
|
}) => {
|
|
5246
|
-
const t =
|
|
5246
|
+
const t = rf(e);
|
|
5247
5247
|
return {
|
|
5248
5248
|
type: "object",
|
|
5249
5249
|
responseFormat: {
|
|
@@ -5296,7 +5296,7 @@ var Tf = () => ({
|
|
|
5296
5296
|
}
|
|
5297
5297
|
};
|
|
5298
5298
|
};
|
|
5299
|
-
async function
|
|
5299
|
+
async function Cf(e) {
|
|
5300
5300
|
if (e == null)
|
|
5301
5301
|
return [];
|
|
5302
5302
|
if (!globalThis.FileList || !(e instanceof globalThis.FileList))
|
|
@@ -5319,7 +5319,7 @@ async function kf(e) {
|
|
|
5319
5319
|
})
|
|
5320
5320
|
);
|
|
5321
5321
|
}
|
|
5322
|
-
var
|
|
5322
|
+
var xf = class {
|
|
5323
5323
|
constructor({
|
|
5324
5324
|
api: e = "/api/chat",
|
|
5325
5325
|
credentials: t,
|
|
@@ -5409,14 +5409,14 @@ var Cf = class {
|
|
|
5409
5409
|
throw new Error("The response body is empty.");
|
|
5410
5410
|
return this.processResponseStream(f.body);
|
|
5411
5411
|
}
|
|
5412
|
-
}, en = class extends
|
|
5412
|
+
}, en = class extends xf {
|
|
5413
5413
|
constructor(e = {}) {
|
|
5414
5414
|
super(e);
|
|
5415
5415
|
}
|
|
5416
5416
|
processResponseStream(e) {
|
|
5417
|
-
return
|
|
5417
|
+
return up({
|
|
5418
5418
|
stream: e,
|
|
5419
|
-
schema:
|
|
5419
|
+
schema: gf
|
|
5420
5420
|
}).pipeThrough(
|
|
5421
5421
|
new TransformStream({
|
|
5422
5422
|
async transform(t, r) {
|
|
@@ -5427,9 +5427,9 @@ var Cf = class {
|
|
|
5427
5427
|
})
|
|
5428
5428
|
);
|
|
5429
5429
|
}
|
|
5430
|
-
},
|
|
5430
|
+
}, Af = class {
|
|
5431
5431
|
constructor({
|
|
5432
|
-
generateId: e =
|
|
5432
|
+
generateId: e = Qd,
|
|
5433
5433
|
id: t = e(),
|
|
5434
5434
|
transport: r = new en(),
|
|
5435
5435
|
messageMetadataSchema: n,
|
|
@@ -5441,7 +5441,7 @@ var Cf = class {
|
|
|
5441
5441
|
onData: c,
|
|
5442
5442
|
sendAutomaticallyWhen: p
|
|
5443
5443
|
}) {
|
|
5444
|
-
this.activeResponse = void 0, this.jobExecutor = new
|
|
5444
|
+
this.activeResponse = void 0, this.jobExecutor = new Ef(), this.sendMessage = async (u, g) => {
|
|
5445
5445
|
var v, h, f, y;
|
|
5446
5446
|
if (u == null) {
|
|
5447
5447
|
await this.makeRequest({
|
|
@@ -5454,7 +5454,7 @@ var Cf = class {
|
|
|
5454
5454
|
let w;
|
|
5455
5455
|
if ("text" in u || "files" in u ? w = {
|
|
5456
5456
|
parts: [
|
|
5457
|
-
...Array.isArray(u.files) ? u.files : await
|
|
5457
|
+
...Array.isArray(u.files) ? u.files : await Cf(u.files),
|
|
5458
5458
|
..."text" in u && u.text != null ? [{ type: "text", text: u.text }] : []
|
|
5459
5459
|
]
|
|
5460
5460
|
} : w = u, u.messageId != null) {
|
|
@@ -5577,7 +5577,7 @@ var Cf = class {
|
|
|
5577
5577
|
let c = !1, p = !1, u = !1;
|
|
5578
5578
|
try {
|
|
5579
5579
|
const g = {
|
|
5580
|
-
state:
|
|
5580
|
+
state: bf({
|
|
5581
5581
|
lastMessage: this.state.snapshot(l),
|
|
5582
5582
|
messageId: this.generateId()
|
|
5583
5583
|
}),
|
|
@@ -5625,8 +5625,8 @@ var Cf = class {
|
|
|
5625
5625
|
})
|
|
5626
5626
|
)
|
|
5627
5627
|
);
|
|
5628
|
-
await
|
|
5629
|
-
stream:
|
|
5628
|
+
await If({
|
|
5629
|
+
stream: wf({
|
|
5630
5630
|
stream: v,
|
|
5631
5631
|
onToolCall: this.onToolCall,
|
|
5632
5632
|
onData: this.onData,
|
|
@@ -5671,28 +5671,28 @@ var Cf = class {
|
|
|
5671
5671
|
const oe = [];
|
|
5672
5672
|
for (let e = 0; e < 256; ++e)
|
|
5673
5673
|
oe.push((e + 256).toString(16).slice(1));
|
|
5674
|
-
function
|
|
5674
|
+
function Nf(e, t = 0) {
|
|
5675
5675
|
return (oe[e[t + 0]] + oe[e[t + 1]] + oe[e[t + 2]] + oe[e[t + 3]] + "-" + oe[e[t + 4]] + oe[e[t + 5]] + "-" + oe[e[t + 6]] + oe[e[t + 7]] + "-" + oe[e[t + 8]] + oe[e[t + 9]] + "-" + oe[e[t + 10]] + oe[e[t + 11]] + oe[e[t + 12]] + oe[e[t + 13]] + oe[e[t + 14]] + oe[e[t + 15]]).toLowerCase();
|
|
5676
5676
|
}
|
|
5677
5677
|
let vr;
|
|
5678
|
-
const
|
|
5679
|
-
function
|
|
5678
|
+
const Of = new Uint8Array(16);
|
|
5679
|
+
function Pf() {
|
|
5680
5680
|
if (!vr) {
|
|
5681
5681
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
5682
5682
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
5683
5683
|
vr = crypto.getRandomValues.bind(crypto);
|
|
5684
5684
|
}
|
|
5685
|
-
return vr(
|
|
5685
|
+
return vr(Of);
|
|
5686
5686
|
}
|
|
5687
5687
|
const zf = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Kn = { randomUUID: zf };
|
|
5688
5688
|
function Ne(e, t, r) {
|
|
5689
5689
|
if (Kn.randomUUID && !e)
|
|
5690
5690
|
return Kn.randomUUID();
|
|
5691
5691
|
e = e || {};
|
|
5692
|
-
const n = e.random ?? e.rng?.() ??
|
|
5692
|
+
const n = e.random ?? e.rng?.() ?? Pf();
|
|
5693
5693
|
if (n.length < 16)
|
|
5694
5694
|
throw new Error("Random bytes length must be >= 16");
|
|
5695
|
-
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128,
|
|
5695
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Nf(n);
|
|
5696
5696
|
}
|
|
5697
5697
|
let yr = null, _r = null;
|
|
5698
5698
|
const Ds = async () => (yr || (yr = import(
|
|
@@ -5700,8 +5700,8 @@ const Ds = async () => (yr || (yr = import(
|
|
|
5700
5700
|
"./index.790ujKXR.js"
|
|
5701
5701
|
)), yr), Ls = async () => (_r || (_r = import(
|
|
5702
5702
|
/* webpackChunkName: "toast-utilities" */
|
|
5703
|
-
"./index.
|
|
5704
|
-
).then((e) => e.utilities)), _r),
|
|
5703
|
+
"./index.Hwof3Goa.js"
|
|
5704
|
+
).then((e) => e.utilities)), _r), Rf = async () => {
|
|
5705
5705
|
try {
|
|
5706
5706
|
await Promise.all([Ds(), Ls()]);
|
|
5707
5707
|
} catch {
|
|
@@ -5722,7 +5722,7 @@ const Ds = async () => (yr || (yr = import(
|
|
|
5722
5722
|
}, 100);
|
|
5723
5723
|
} catch {
|
|
5724
5724
|
}
|
|
5725
|
-
}, Et = (e, t) => Us(e, "success", t),
|
|
5725
|
+
}, Et = (e, t) => Us(e, "success", t), Tm = (e, t) => Us(e, "error", t), Ye = "CHAT_SET_STATUS", js = "CHAT_SET_USAGE", at = "CHAT_SET_ATTACHMENTS", Fs = "CHAT_SET_PROVIDER", Ue = "CHAT_RESET", Mf = (e, t) => {
|
|
5726
5726
|
switch (t.type) {
|
|
5727
5727
|
case js:
|
|
5728
5728
|
return {
|
|
@@ -5774,7 +5774,7 @@ const Ds = async () => (yr || (yr = import(
|
|
|
5774
5774
|
default:
|
|
5775
5775
|
return e;
|
|
5776
5776
|
}
|
|
5777
|
-
},
|
|
5777
|
+
}, $f = (e, t) => {
|
|
5778
5778
|
switch (t?.type) {
|
|
5779
5779
|
case sa:
|
|
5780
5780
|
return {
|
|
@@ -5793,7 +5793,7 @@ const Ds = async () => (yr || (yr = import(
|
|
|
5793
5793
|
default:
|
|
5794
5794
|
return e;
|
|
5795
5795
|
}
|
|
5796
|
-
},
|
|
5796
|
+
}, Zf = (e, t) => {
|
|
5797
5797
|
switch (t?.type) {
|
|
5798
5798
|
case po:
|
|
5799
5799
|
return {
|
|
@@ -5810,7 +5810,7 @@ const Ds = async () => (yr || (yr = import(
|
|
|
5810
5810
|
}
|
|
5811
5811
|
};
|
|
5812
5812
|
var br, Qn;
|
|
5813
|
-
function
|
|
5813
|
+
function Df() {
|
|
5814
5814
|
if (Qn) return br;
|
|
5815
5815
|
Qn = 1;
|
|
5816
5816
|
function e(t, r) {
|
|
@@ -5827,8 +5827,8 @@ function Zf() {
|
|
|
5827
5827
|
}
|
|
5828
5828
|
return br = e, br;
|
|
5829
5829
|
}
|
|
5830
|
-
var
|
|
5831
|
-
const
|
|
5830
|
+
var Lf = /* @__PURE__ */ Df();
|
|
5831
|
+
const Uf = /* @__PURE__ */ nf(Lf);
|
|
5832
5832
|
var Bs = (e, t, r) => {
|
|
5833
5833
|
if (!t.has(e))
|
|
5834
5834
|
throw TypeError("Cannot " + r);
|
|
@@ -5837,10 +5837,10 @@ var Bs = (e, t, r) => {
|
|
|
5837
5837
|
throw TypeError("Cannot add the same private member more than once");
|
|
5838
5838
|
t instanceof WeakSet ? t.add(e) : t.set(e, r);
|
|
5839
5839
|
}, Re = (e, t, r, n) => (Bs(e, t, "write to private field"), t.set(e, r), r);
|
|
5840
|
-
function
|
|
5841
|
-
return t != null ?
|
|
5840
|
+
function jf(e, t) {
|
|
5841
|
+
return t != null ? Uf(e, t) : e;
|
|
5842
5842
|
}
|
|
5843
|
-
var fe, jt, Ft, pt, ft, ht, nt, Mr, $r,
|
|
5843
|
+
var fe, jt, Ft, pt, ft, ht, nt, Mr, $r, Ff = class {
|
|
5844
5844
|
constructor(e = []) {
|
|
5845
5845
|
Te(this, fe, void 0), Te(this, jt, "ready"), Te(this, Ft, void 0), Te(this, pt, /* @__PURE__ */ new Set()), Te(this, ft, /* @__PURE__ */ new Set()), Te(this, ht, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
|
|
5846
5846
|
Re(this, fe, B(this, fe).concat(t)), B(this, nt).call(this);
|
|
@@ -5854,7 +5854,7 @@ var fe, jt, Ft, pt, ft, ht, nt, Mr, $r, jf = class {
|
|
|
5854
5854
|
...B(this, fe).slice(t + 1)
|
|
5855
5855
|
]), B(this, nt).call(this);
|
|
5856
5856
|
}, this.snapshot = (t) => structuredClone(t), this["~registerMessagesCallback"] = (t, r) => {
|
|
5857
|
-
const n = r ?
|
|
5857
|
+
const n = r ? jf(t, r) : t;
|
|
5858
5858
|
return B(this, pt).add(n), () => {
|
|
5859
5859
|
B(this, pt).delete(n);
|
|
5860
5860
|
};
|
|
@@ -5898,14 +5898,14 @@ ht = /* @__PURE__ */ new WeakMap();
|
|
|
5898
5898
|
nt = /* @__PURE__ */ new WeakMap();
|
|
5899
5899
|
Mr = /* @__PURE__ */ new WeakMap();
|
|
5900
5900
|
$r = /* @__PURE__ */ new WeakMap();
|
|
5901
|
-
var ot, eo = class extends
|
|
5901
|
+
var ot, eo = class extends Af {
|
|
5902
5902
|
constructor({ messages: e, ...t }) {
|
|
5903
|
-
const r = new
|
|
5903
|
+
const r = new Ff(e);
|
|
5904
5904
|
super({ ...t, state: r }), Te(this, ot, void 0), this["~registerMessagesCallback"] = (n, o) => B(this, ot)["~registerMessagesCallback"](n, o), this["~registerStatusCallback"] = (n) => B(this, ot)["~registerStatusCallback"](n), this["~registerErrorCallback"] = (n) => B(this, ot)["~registerErrorCallback"](n), Re(this, ot, r);
|
|
5905
5905
|
}
|
|
5906
5906
|
};
|
|
5907
5907
|
ot = /* @__PURE__ */ new WeakMap();
|
|
5908
|
-
function
|
|
5908
|
+
function Bf({
|
|
5909
5909
|
experimental_throttle: e,
|
|
5910
5910
|
resume: t = !1,
|
|
5911
5911
|
...r
|
|
@@ -5977,7 +5977,7 @@ function Fe(e = {}) {
|
|
|
5977
5977
|
setInput: t.setInput
|
|
5978
5978
|
};
|
|
5979
5979
|
}
|
|
5980
|
-
function
|
|
5980
|
+
function Vf({
|
|
5981
5981
|
children: e,
|
|
5982
5982
|
value: t
|
|
5983
5983
|
}) {
|
|
@@ -5997,7 +5997,7 @@ function Bf({
|
|
|
5997
5997
|
}, []), l = q(async (p) => {
|
|
5998
5998
|
for (const u of r.current.onToolCall)
|
|
5999
5999
|
await u(p);
|
|
6000
|
-
}, []), c =
|
|
6000
|
+
}, []), c = Bf({
|
|
6001
6001
|
id: t.id,
|
|
6002
6002
|
messages: t.messages,
|
|
6003
6003
|
transport: t.transport || new en({
|
|
@@ -6023,7 +6023,7 @@ function Bf({
|
|
|
6023
6023
|
}
|
|
6024
6024
|
);
|
|
6025
6025
|
}
|
|
6026
|
-
const
|
|
6026
|
+
const Hf = ({ chatId: e }) => {
|
|
6027
6027
|
const { messages: t } = Fe(), [r, n] = ke({
|
|
6028
6028
|
key: Me + fo,
|
|
6029
6029
|
initialValue: ""
|
|
@@ -6059,7 +6059,7 @@ const ro = ({
|
|
|
6059
6059
|
};
|
|
6060
6060
|
}
|
|
6061
6061
|
}, []), r && wr ? /* @__PURE__ */ d(wr, { containerId: e, ...t }) : null;
|
|
6062
|
-
},
|
|
6062
|
+
}, Gf = ({
|
|
6063
6063
|
currentChatId: e,
|
|
6064
6064
|
setChatId: t,
|
|
6065
6065
|
setInitialMessages: r,
|
|
@@ -6093,7 +6093,7 @@ const ro = ({
|
|
|
6093
6093
|
r,
|
|
6094
6094
|
n
|
|
6095
6095
|
]), { hasRestoredFromCache: i };
|
|
6096
|
-
},
|
|
6096
|
+
}, Jf = "z-20", Wf = "z-10";
|
|
6097
6097
|
/*!
|
|
6098
6098
|
@versini/ui-tooltip v3.1.0
|
|
6099
6099
|
© 2025 gizmette.com
|
|
@@ -6107,22 +6107,22 @@ try {
|
|
|
6107
6107
|
});
|
|
6108
6108
|
} catch {
|
|
6109
6109
|
}
|
|
6110
|
-
const
|
|
6110
|
+
const Yf = "av-tooltip", qf = "av-tooltip-arrow", Zt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Xf = () => O("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), no = ({ mode: e }) => O({
|
|
6111
6111
|
"bg-surface-darker": e === "dark" || e === "system",
|
|
6112
6112
|
"bg-surface-light": e === "light" || e === "alt-system",
|
|
6113
6113
|
"dark:bg-surface-light": e === "system",
|
|
6114
6114
|
"dark:bg-surface-darker": e === "alt-system"
|
|
6115
|
-
}),
|
|
6115
|
+
}), Kf = ({ mode: e }) => O({
|
|
6116
6116
|
"text-copy-light": e === "dark" || e === "system",
|
|
6117
6117
|
"text-copy-dark": e === "light" || e === "alt-system",
|
|
6118
6118
|
"dark:text-copy-dark": e === "system",
|
|
6119
6119
|
"dark:text-copy-light": e === "alt-system"
|
|
6120
|
-
}),
|
|
6121
|
-
const o = O("relative inline-block", t), s = O(
|
|
6120
|
+
}), Qf = () => O("absolute", "size-2", "transform rotate-45"), eh = ({ mode: e, className: t, tooltipClassName: r, arrowClassName: n }) => {
|
|
6121
|
+
const o = O("relative inline-block", t), s = O(Yf, Xf(), no({
|
|
6122
6122
|
mode: e
|
|
6123
|
-
}),
|
|
6123
|
+
}), Kf({
|
|
6124
6124
|
mode: e
|
|
6125
|
-
}), r), i = O(
|
|
6125
|
+
}), r), i = O(qf, Qf(), no({
|
|
6126
6126
|
mode: e
|
|
6127
6127
|
}), n);
|
|
6128
6128
|
return {
|
|
@@ -6130,23 +6130,23 @@ const Wf = "av-tooltip", Yf = "av-tooltip-arrow", Zt = (e, t = "px") => typeof e
|
|
|
6130
6130
|
arrow: i,
|
|
6131
6131
|
wrapper: o
|
|
6132
6132
|
};
|
|
6133
|
-
},
|
|
6133
|
+
}, th = ({ delay: e = 300 }) => ({
|
|
6134
6134
|
animation: `av-tooltip-fade-in ${e}ms ease-in-out`
|
|
6135
|
-
}),
|
|
6135
|
+
}), rh = 5e3, Pe = ({ trigger: e, label: t, placement: r = "top", mode: n = "system", delay: o = 300, className: s, tooltipClassName: i, arrowClassName: a }) => {
|
|
6136
6136
|
const l = ca(() => {
|
|
6137
6137
|
f.stop(), h(!1);
|
|
6138
6138
|
}), c = W(null), p = W(null), [u, g] = M(!1), [v, h] = M(!1), f = la(() => {
|
|
6139
6139
|
h(!1);
|
|
6140
|
-
},
|
|
6140
|
+
}, rh), y = eh({
|
|
6141
6141
|
mode: n,
|
|
6142
6142
|
className: s,
|
|
6143
6143
|
tooltipClassName: i,
|
|
6144
6144
|
arrowClassName: a
|
|
6145
|
-
}), w =
|
|
6145
|
+
}), w = th({
|
|
6146
6146
|
delay: o
|
|
6147
6147
|
}), b = q(async () => {
|
|
6148
6148
|
if (l.current && c.current && p.current) {
|
|
6149
|
-
const { x, y: T, middlewareData: C, placement: U } = await
|
|
6149
|
+
const { x, y: T, middlewareData: C, placement: U } = await Oi(l.current, c.current, {
|
|
6150
6150
|
placement: r,
|
|
6151
6151
|
middleware: [
|
|
6152
6152
|
So(10),
|
|
@@ -6157,7 +6157,7 @@ const Wf = "av-tooltip", Yf = "av-tooltip-arrow", Zt = (e, t = "px") => typeof e
|
|
|
6157
6157
|
Co({
|
|
6158
6158
|
padding: 5
|
|
6159
6159
|
}),
|
|
6160
|
-
|
|
6160
|
+
Pi({
|
|
6161
6161
|
element: p.current
|
|
6162
6162
|
})
|
|
6163
6163
|
]
|
|
@@ -6221,13 +6221,13 @@ const Wf = "av-tooltip", Yf = "av-tooltip-arrow", Zt = (e, t = "px") => typeof e
|
|
|
6221
6221
|
})
|
|
6222
6222
|
]
|
|
6223
6223
|
});
|
|
6224
|
-
},
|
|
6224
|
+
}, nh = ({
|
|
6225
6225
|
className: e,
|
|
6226
6226
|
onClick: t
|
|
6227
6227
|
}) => {
|
|
6228
6228
|
const [r, n] = xe();
|
|
6229
6229
|
return /* @__PURE__ */ d(
|
|
6230
|
-
|
|
6230
|
+
Pe,
|
|
6231
6231
|
{
|
|
6232
6232
|
label: "Attach files",
|
|
6233
6233
|
mode: "light",
|
|
@@ -6263,7 +6263,7 @@ function Hs(e, t) {
|
|
|
6263
6263
|
};
|
|
6264
6264
|
}, [e, t]);
|
|
6265
6265
|
}
|
|
6266
|
-
const
|
|
6266
|
+
const oh = ({
|
|
6267
6267
|
className: e
|
|
6268
6268
|
}) => {
|
|
6269
6269
|
const { getAccessToken: t, user: r } = me(), {
|
|
@@ -6338,7 +6338,7 @@ const nh = ({
|
|
|
6338
6338
|
return $(() => {
|
|
6339
6339
|
$e() || ((n === !0 || o === !0) && !g.current && u.current && (g.current = !0, u.current.focus()), n === !1 && g.current && (g.current = !1));
|
|
6340
6340
|
}, [n, o]), /* @__PURE__ */ d(
|
|
6341
|
-
|
|
6341
|
+
Pe,
|
|
6342
6342
|
{
|
|
6343
6343
|
label: "New Chat",
|
|
6344
6344
|
mode: "light",
|
|
@@ -6390,7 +6390,7 @@ try {
|
|
|
6390
6390
|
});
|
|
6391
6391
|
} catch {
|
|
6392
6392
|
}
|
|
6393
|
-
const
|
|
6393
|
+
const sh = "av-messagebox", ah = "av-panel";
|
|
6394
6394
|
/*!
|
|
6395
6395
|
@versini/ui-modal v3.1.0
|
|
6396
6396
|
© 2025 gizmette.com
|
|
@@ -6405,7 +6405,7 @@ try {
|
|
|
6405
6405
|
} catch {
|
|
6406
6406
|
}
|
|
6407
6407
|
const Gs = /* @__PURE__ */ Br(null);
|
|
6408
|
-
function
|
|
6408
|
+
function ih({ initialOpen: e = !1, open: t, onOpenChange: r } = {}) {
|
|
6409
6409
|
const [n, o] = M(e), [s, i] = M(), [a, l] = M(), c = t ?? n, p = r ?? o, u = xo({
|
|
6410
6410
|
open: c,
|
|
6411
6411
|
onOpenChange: p
|
|
@@ -6414,7 +6414,7 @@ function ah({ initialOpen: e = !1, open: t, onOpenChange: r } = {}) {
|
|
|
6414
6414
|
}), h = No(g, {
|
|
6415
6415
|
outsidePress: !1,
|
|
6416
6416
|
outsidePressEvent: "mousedown"
|
|
6417
|
-
}), f = Oo(g), y =
|
|
6417
|
+
}), f = Oo(g), y = Po([
|
|
6418
6418
|
v,
|
|
6419
6419
|
h,
|
|
6420
6420
|
f
|
|
@@ -6443,14 +6443,14 @@ const or = () => {
|
|
|
6443
6443
|
throw new Error("Modal components must be wrapped in <Modal />");
|
|
6444
6444
|
return e;
|
|
6445
6445
|
};
|
|
6446
|
-
function
|
|
6447
|
-
const r =
|
|
6446
|
+
function ch({ children: e, ...t }) {
|
|
6447
|
+
const r = ih(t);
|
|
6448
6448
|
return /* @__PURE__ */ d(Gs.Provider, {
|
|
6449
6449
|
value: r,
|
|
6450
6450
|
children: e
|
|
6451
6451
|
});
|
|
6452
6452
|
}
|
|
6453
|
-
const
|
|
6453
|
+
const lh = /* @__PURE__ */ Xe(function(t, r) {
|
|
6454
6454
|
const { context: n, ...o } = or(), s = Hr([
|
|
6455
6455
|
o.refs.setFloating,
|
|
6456
6456
|
r
|
|
@@ -6477,7 +6477,7 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
|
|
|
6477
6477
|
})
|
|
6478
6478
|
})
|
|
6479
6479
|
});
|
|
6480
|
-
}),
|
|
6480
|
+
}), uh = /* @__PURE__ */ Xe(function({ children: t, ...r }, n) {
|
|
6481
6481
|
const { setLabelId: o } = or(), s = To();
|
|
6482
6482
|
return Vr(() => (o(s), () => o(void 0)), [
|
|
6483
6483
|
s,
|
|
@@ -6488,7 +6488,7 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
|
|
|
6488
6488
|
id: s,
|
|
6489
6489
|
children: t
|
|
6490
6490
|
});
|
|
6491
|
-
}),
|
|
6491
|
+
}), dh = /* @__PURE__ */ Xe(function({ children: t, ...r }, n) {
|
|
6492
6492
|
const { setDescriptionId: o } = or(), s = To();
|
|
6493
6493
|
return Vr(() => (o(s), () => o(void 0)), [
|
|
6494
6494
|
s,
|
|
@@ -6499,19 +6499,19 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
|
|
|
6499
6499
|
id: s,
|
|
6500
6500
|
children: t
|
|
6501
6501
|
});
|
|
6502
|
-
}),
|
|
6502
|
+
}), ph = /* @__PURE__ */ Xe(function(t, r) {
|
|
6503
6503
|
const { setOpen: n } = or(), { trigger: o, className: s, ...i } = t, a = q(() => n(!1), [
|
|
6504
6504
|
n
|
|
6505
6505
|
]);
|
|
6506
6506
|
return /* @__PURE__ */ d("div", {
|
|
6507
6507
|
className: s,
|
|
6508
|
-
children: /* @__PURE__ */
|
|
6508
|
+
children: /* @__PURE__ */ Ai(o, {
|
|
6509
6509
|
ref: r,
|
|
6510
6510
|
onClick: a,
|
|
6511
6511
|
...i
|
|
6512
6512
|
})
|
|
6513
6513
|
});
|
|
6514
|
-
}), _e = "panel", He = "messagebox",
|
|
6514
|
+
}), _e = "panel", He = "messagebox", fh = ({ className: e, kind: t, borderMode: r, animation: n, maxWidth: o = "medium", maxHeight: s }) => {
|
|
6515
6515
|
const i = s ?? (t === _e ? "large" : void 0);
|
|
6516
6516
|
return {
|
|
6517
6517
|
main: O("prose prose-lighter flex flex-col bg-surface-dark", {
|
|
@@ -6519,7 +6519,7 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
|
|
|
6519
6519
|
/**
|
|
6520
6520
|
* Panel styles
|
|
6521
6521
|
*/
|
|
6522
|
-
[`${
|
|
6522
|
+
[`${ah} min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === _e,
|
|
6523
6523
|
"w-full sm:w-[95%] md:max-w-2xl": t === _e && !e && o === "small",
|
|
6524
6524
|
"w-full sm:w-[95%] md:max-w-3xl": t === _e && !e && o === "medium",
|
|
6525
6525
|
"w-full sm:w-[95%] md:max-w-4xl": t === _e && !e && o === "large",
|
|
@@ -6531,7 +6531,7 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
|
|
|
6531
6531
|
/**
|
|
6532
6532
|
* Messagebox styles
|
|
6533
6533
|
*/
|
|
6534
|
-
[`${
|
|
6534
|
+
[`${sh} rounded-lg border-2`]: t === He,
|
|
6535
6535
|
"w-[95%] sm:w-[50%] md:max-w-2xl": t === He && !e,
|
|
6536
6536
|
"max-h-[20%]": t === He && i === "small",
|
|
6537
6537
|
"max-h-[50%]": t === He && i === "medium",
|
|
@@ -6545,12 +6545,12 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
|
|
|
6545
6545
|
header: "sm:p-4 mb-0 p-2",
|
|
6546
6546
|
close: "sm:p-4 p-2"
|
|
6547
6547
|
};
|
|
6548
|
-
},
|
|
6548
|
+
}, hh = "slide", oo = "fade", mh = ({ open: e, onOpenChange: t, title: r, children: n, footer: o, borderMode: s = "light", kind: i = _e, className: a, animation: l = !1, animationType: c = hh, maxWidth: p = "medium", maxHeight: u }) => {
|
|
6549
6549
|
const g = W(""), [v, h] = M(l ? c === oo ? {
|
|
6550
6550
|
opacity: 0
|
|
6551
6551
|
} : {
|
|
6552
6552
|
transform: "translateY(-100vh)"
|
|
6553
|
-
} : {}), f =
|
|
6553
|
+
} : {}), f = fh({
|
|
6554
6554
|
className: a,
|
|
6555
6555
|
kind: i,
|
|
6556
6556
|
borderMode: s,
|
|
@@ -6584,17 +6584,17 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
|
|
|
6584
6584
|
l,
|
|
6585
6585
|
c
|
|
6586
6586
|
]), /* @__PURE__ */ d(Ae, {
|
|
6587
|
-
children: e && /* @__PURE__ */ d(
|
|
6587
|
+
children: e && /* @__PURE__ */ d(ch, {
|
|
6588
6588
|
open: e,
|
|
6589
6589
|
onOpenChange: t,
|
|
6590
|
-
children: /* @__PURE__ */ A(
|
|
6590
|
+
children: /* @__PURE__ */ A(lh, {
|
|
6591
6591
|
className: f.main,
|
|
6592
6592
|
style: v,
|
|
6593
6593
|
children: [
|
|
6594
6594
|
/* @__PURE__ */ A("div", {
|
|
6595
6595
|
className: "flex flex-row-reverse items-center justify-between",
|
|
6596
6596
|
children: [
|
|
6597
|
-
/* @__PURE__ */ d(
|
|
6597
|
+
/* @__PURE__ */ d(ph, {
|
|
6598
6598
|
className: f.close,
|
|
6599
6599
|
trigger: /* @__PURE__ */ d(Ie, {
|
|
6600
6600
|
mode: "dark",
|
|
@@ -6606,13 +6606,13 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
|
|
|
6606
6606
|
})
|
|
6607
6607
|
})
|
|
6608
6608
|
}),
|
|
6609
|
-
/* @__PURE__ */ d(
|
|
6609
|
+
/* @__PURE__ */ d(uh, {
|
|
6610
6610
|
className: f.header,
|
|
6611
6611
|
children: r
|
|
6612
6612
|
})
|
|
6613
6613
|
]
|
|
6614
6614
|
}),
|
|
6615
|
-
/* @__PURE__ */ d(
|
|
6615
|
+
/* @__PURE__ */ d(dh, {
|
|
6616
6616
|
className: f.content,
|
|
6617
6617
|
children: n
|
|
6618
6618
|
}),
|
|
@@ -6638,7 +6638,7 @@ try {
|
|
|
6638
6638
|
});
|
|
6639
6639
|
} catch {
|
|
6640
6640
|
}
|
|
6641
|
-
const
|
|
6641
|
+
const gh = "av-toggle", vh = ({ narrow: e }) => O(
|
|
6642
6642
|
"peer",
|
|
6643
6643
|
"rounded-full",
|
|
6644
6644
|
{
|
|
@@ -6647,12 +6647,12 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
|
|
|
6647
6647
|
},
|
|
6648
6648
|
// Smooth background/border transition when toggling
|
|
6649
6649
|
"transition-colors duration-300 ease-in-out motion-reduce:transition-none"
|
|
6650
|
-
),
|
|
6650
|
+
), yh = ({ focusMode: e }) => O("peer-focus:outline", "peer-focus:outline-2", "peer-focus:outline-offset-2", {
|
|
6651
6651
|
"peer-focus:outline-focus-dark": e === "dark",
|
|
6652
6652
|
"peer-focus:outline-focus-light": e === "light",
|
|
6653
6653
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
|
6654
6654
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
|
6655
|
-
}),
|
|
6655
|
+
}), _h = ({ narrow: e }) => O(
|
|
6656
6656
|
{
|
|
6657
6657
|
"peer-checked:after:translate-x-full": !e,
|
|
6658
6658
|
"peer-checked:after:translate-x-4": e
|
|
@@ -6662,12 +6662,12 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
|
|
|
6662
6662
|
// knob circle and border color when checked
|
|
6663
6663
|
"peer-checked:after:bg-white",
|
|
6664
6664
|
"peer-checked:after:border-white"
|
|
6665
|
-
),
|
|
6665
|
+
), bh = ({ narrow: e }) => O("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", {
|
|
6666
6666
|
// Normal toggle knob (circle)
|
|
6667
6667
|
"after:h-5 after:w-5": !e,
|
|
6668
6668
|
// Narrow toggle knob (oval)
|
|
6669
6669
|
" after:h-4 after:w-7": e
|
|
6670
|
-
}),
|
|
6670
|
+
}), wh = ({ mode: e, noBorder: t }) => O({
|
|
6671
6671
|
border: !t,
|
|
6672
6672
|
"border-border-medium bg-surface-medium": e === "light",
|
|
6673
6673
|
"border-border-light bg-surface-darker": e === "dark",
|
|
@@ -6686,17 +6686,17 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
|
|
|
6686
6686
|
"text-copy-lighter/50 dark:text-copy-dark/50": t === "alt-system" && o,
|
|
6687
6687
|
"text-copy-dark/50 dark:text-copy-lighter/50": t === "system" && o,
|
|
6688
6688
|
"text-xs": o
|
|
6689
|
-
})),
|
|
6690
|
-
toggle: O(
|
|
6689
|
+
})), Ih = ({ className: e }) => O(gh, "relative flex cursor-pointer items-center", e), Eh = () => "relative inline-block", Th = ({ mode: e, focusMode: t, labelHidden: r, className: n, noBorder: o, narrow: s, labelMode: i, labelPosition: a = "right", subLabel: l }) => ({
|
|
6690
|
+
toggle: O(vh({
|
|
6691
6691
|
narrow: s
|
|
6692
|
-
}),
|
|
6692
|
+
}), wh({
|
|
6693
6693
|
mode: e,
|
|
6694
6694
|
noBorder: o
|
|
6695
|
-
}),
|
|
6695
|
+
}), yh({
|
|
6696
6696
|
focusMode: t
|
|
6697
|
-
}),
|
|
6697
|
+
}), bh({
|
|
6698
6698
|
narrow: s
|
|
6699
|
-
}),
|
|
6699
|
+
}), _h({
|
|
6700
6700
|
narrow: s
|
|
6701
6701
|
})),
|
|
6702
6702
|
label: so({
|
|
@@ -6713,12 +6713,12 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
|
|
|
6713
6713
|
subLabel: l
|
|
6714
6714
|
}),
|
|
6715
6715
|
input: "peer sr-only",
|
|
6716
|
-
wrapper:
|
|
6716
|
+
wrapper: Ih({
|
|
6717
6717
|
className: n
|
|
6718
6718
|
}),
|
|
6719
|
-
toggleWrapper:
|
|
6720
|
-
}),
|
|
6721
|
-
const { haptic: h } = fa(), f =
|
|
6719
|
+
toggleWrapper: Eh()
|
|
6720
|
+
}), Sh = ({ 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: p = !1, noHaptic: u = !1, labelPosition: g = "right", subLabel: v }) => {
|
|
6721
|
+
const { haptic: h } = fa(), f = Th({
|
|
6722
6722
|
mode: s,
|
|
6723
6723
|
focusMode: i,
|
|
6724
6724
|
labelHidden: n,
|
|
@@ -6820,7 +6820,7 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
|
|
|
6820
6820
|
columnGap: 2,
|
|
6821
6821
|
children: [
|
|
6822
6822
|
/* @__PURE__ */ d(st, { span: "auto", children: /* @__PURE__ */ d(
|
|
6823
|
-
|
|
6823
|
+
Sh,
|
|
6824
6824
|
{
|
|
6825
6825
|
narrow: !0,
|
|
6826
6826
|
mode: "dark",
|
|
@@ -6839,7 +6839,7 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
|
|
|
6839
6839
|
}
|
|
6840
6840
|
) : u;
|
|
6841
6841
|
return /* @__PURE__ */ d(
|
|
6842
|
-
|
|
6842
|
+
mh,
|
|
6843
6843
|
{
|
|
6844
6844
|
kind: "messagebox",
|
|
6845
6845
|
open: e,
|
|
@@ -6849,7 +6849,7 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
|
|
|
6849
6849
|
children: n
|
|
6850
6850
|
}
|
|
6851
6851
|
);
|
|
6852
|
-
},
|
|
6852
|
+
}, kh = ({
|
|
6853
6853
|
className: e
|
|
6854
6854
|
}) => {
|
|
6855
6855
|
const { getAccessToken: t, user: r } = me(), {
|
|
@@ -6921,7 +6921,7 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
|
|
|
6921
6921
|
}
|
|
6922
6922
|
),
|
|
6923
6923
|
/* @__PURE__ */ d(
|
|
6924
|
-
|
|
6924
|
+
Pe,
|
|
6925
6925
|
{
|
|
6926
6926
|
label: "Private Chat",
|
|
6927
6927
|
mode: "light",
|
|
@@ -6992,9 +6992,9 @@ const Bt = /* @__PURE__ */ Br({
|
|
|
6992
6992
|
}
|
|
6993
6993
|
return "Element";
|
|
6994
6994
|
}, Zr = /* @__PURE__ */ Xe(({ trigger: e, children: t, label: r = "Open menu", defaultPlacement: n = "bottom-start", onOpenChange: o, mode: s = "system", focusMode: i = "system", ...a }, l) => {
|
|
6995
|
-
const [c, p] = M(!1), [u, g] = M(!1), [v, h] = M(null), [f, y] = M(!1), w = W([]), b = W([]), I = X(Bt), m = Mo(), k =
|
|
6995
|
+
const [c, p] = M(!1), [u, g] = M(!1), [v, h] = M(null), [f, y] = M(!1), w = W([]), b = W([]), I = X(Bt), m = Mo(), k = Mi(), x = zo(), T = Ro({
|
|
6996
6996
|
label: r !== "Open menu" ? r : null
|
|
6997
|
-
}), C = x != null, { floatingStyles: U, refs: F, context:
|
|
6997
|
+
}), C = x != null, { floatingStyles: U, refs: F, context: P } = xo({
|
|
6998
6998
|
nodeId: k,
|
|
6999
6999
|
open: c,
|
|
7000
7000
|
onOpenChange: (K) => {
|
|
@@ -7013,37 +7013,37 @@ const Bt = /* @__PURE__ */ Br({
|
|
|
7013
7013
|
ko(),
|
|
7014
7014
|
Co()
|
|
7015
7015
|
],
|
|
7016
|
-
whileElementsMounted:
|
|
7017
|
-
}), ee =
|
|
7016
|
+
whileElementsMounted: $i
|
|
7017
|
+
}), ee = Zi(P, {
|
|
7018
7018
|
enabled: C && f,
|
|
7019
7019
|
delay: {
|
|
7020
7020
|
open: 75
|
|
7021
7021
|
},
|
|
7022
|
-
handleClose:
|
|
7022
|
+
handleClose: Di({
|
|
7023
7023
|
blockPointerEvents: !0
|
|
7024
7024
|
})
|
|
7025
|
-
}), le = Ao(
|
|
7025
|
+
}), le = Ao(P, {
|
|
7026
7026
|
event: "mousedown",
|
|
7027
7027
|
toggle: !C || !f,
|
|
7028
7028
|
ignoreMouse: C && f
|
|
7029
|
-
}),
|
|
7029
|
+
}), z = Oo(P, {
|
|
7030
7030
|
role: "menu"
|
|
7031
|
-
}), Qe = No(
|
|
7031
|
+
}), Qe = No(P, {
|
|
7032
7032
|
bubbles: !0
|
|
7033
|
-
}), de =
|
|
7033
|
+
}), de = Li(P, {
|
|
7034
7034
|
listRef: w,
|
|
7035
7035
|
activeIndex: v,
|
|
7036
7036
|
nested: C,
|
|
7037
7037
|
onNavigate: h,
|
|
7038
7038
|
loop: !0
|
|
7039
|
-
}), Be =
|
|
7039
|
+
}), Be = Ui(P, {
|
|
7040
7040
|
listRef: b,
|
|
7041
7041
|
onMatch: c ? h : void 0,
|
|
7042
7042
|
activeIndex: v
|
|
7043
|
-
}), { getReferenceProps: At, getFloatingProps: ct, getItemProps: pe } =
|
|
7043
|
+
}), { getReferenceProps: At, getFloatingProps: ct, getItemProps: pe } = Po([
|
|
7044
7044
|
ee,
|
|
7045
7045
|
le,
|
|
7046
|
-
|
|
7046
|
+
z,
|
|
7047
7047
|
Qe,
|
|
7048
7048
|
de,
|
|
7049
7049
|
Be
|
|
@@ -7146,7 +7146,7 @@ const Bt = /* @__PURE__ */ Br({
|
|
|
7146
7146
|
labelsRef: b,
|
|
7147
7147
|
children: c && /* @__PURE__ */ d(Cr, {
|
|
7148
7148
|
children: /* @__PURE__ */ d(xr, {
|
|
7149
|
-
context:
|
|
7149
|
+
context: P,
|
|
7150
7150
|
modal: !1,
|
|
7151
7151
|
initialFocus: -1,
|
|
7152
7152
|
returnFocus: !1,
|
|
@@ -7193,7 +7193,7 @@ const Bt = /* @__PURE__ */ Br({
|
|
|
7193
7193
|
labelsRef: b,
|
|
7194
7194
|
children: c && /* @__PURE__ */ d(Cr, {
|
|
7195
7195
|
children: /* @__PURE__ */ d(xr, {
|
|
7196
|
-
context:
|
|
7196
|
+
context: P,
|
|
7197
7197
|
modal: !1,
|
|
7198
7198
|
initialFocus: 0,
|
|
7199
7199
|
returnFocus: !0,
|
|
@@ -7210,7 +7210,7 @@ const Bt = /* @__PURE__ */ Br({
|
|
|
7210
7210
|
})
|
|
7211
7211
|
]
|
|
7212
7212
|
});
|
|
7213
|
-
}), Tt = /* @__PURE__ */ Xe((e, t) =>
|
|
7213
|
+
}), Tt = /* @__PURE__ */ Xe((e, t) => zo() === null ? /* @__PURE__ */ d(Ri, {
|
|
7214
7214
|
children: /* @__PURE__ */ d(Zr, {
|
|
7215
7215
|
...e,
|
|
7216
7216
|
ref: t
|
|
@@ -7276,7 +7276,7 @@ const be = /* @__PURE__ */ Xe(({ label: e, disabled: t, icon: r, raw: n = !1, ch
|
|
|
7276
7276
|
});
|
|
7277
7277
|
});
|
|
7278
7278
|
be.displayName = "MenuItem";
|
|
7279
|
-
const
|
|
7279
|
+
const Ch = ({ className: e, ...t }) => {
|
|
7280
7280
|
const r = O(e, "my-1 border-t border-border-medium");
|
|
7281
7281
|
return /* @__PURE__ */ d("div", {
|
|
7282
7282
|
className: r,
|
|
@@ -7288,12 +7288,12 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7288
7288
|
className: r,
|
|
7289
7289
|
...t
|
|
7290
7290
|
});
|
|
7291
|
-
},
|
|
7291
|
+
}, xh = (e) => {
|
|
7292
7292
|
for (let t = 0; t < e.length; t++)
|
|
7293
7293
|
if (e[t].enabled)
|
|
7294
7294
|
return !0;
|
|
7295
7295
|
return !1;
|
|
7296
|
-
},
|
|
7296
|
+
}, Ah = ({
|
|
7297
7297
|
className: e,
|
|
7298
7298
|
defaultPlacement: t = "top-start"
|
|
7299
7299
|
}) => {
|
|
@@ -7312,7 +7312,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7312
7312
|
prompt: y
|
|
7313
7313
|
}
|
|
7314
7314
|
});
|
|
7315
|
-
}, v = u && p && p.tags &&
|
|
7315
|
+
}, v = u && p && p.tags && xh(p.tags), h = /* @__PURE__ */ A(
|
|
7316
7316
|
Tt,
|
|
7317
7317
|
{
|
|
7318
7318
|
mode: "dark",
|
|
@@ -7366,7 +7366,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7366
7366
|
}
|
|
7367
7367
|
);
|
|
7368
7368
|
return v ? /* @__PURE__ */ d(
|
|
7369
|
-
|
|
7369
|
+
Pe,
|
|
7370
7370
|
{
|
|
7371
7371
|
label: "Prompts",
|
|
7372
7372
|
mode: "light",
|
|
@@ -7374,7 +7374,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7374
7374
|
trigger: h
|
|
7375
7375
|
}
|
|
7376
7376
|
) : /* @__PURE__ */ d("div", { className: e, children: h });
|
|
7377
|
-
},
|
|
7377
|
+
}, Nh = ({
|
|
7378
7378
|
className: e
|
|
7379
7379
|
}) => {
|
|
7380
7380
|
const {
|
|
@@ -7438,7 +7438,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7438
7438
|
}
|
|
7439
7439
|
),
|
|
7440
7440
|
/* @__PURE__ */ d(
|
|
7441
|
-
|
|
7441
|
+
Pe,
|
|
7442
7442
|
{
|
|
7443
7443
|
label: "Reasoning Chat",
|
|
7444
7444
|
mode: "light",
|
|
@@ -7462,7 +7462,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7462
7462
|
Sa,
|
|
7463
7463
|
{
|
|
7464
7464
|
size: Ce,
|
|
7465
|
-
className:
|
|
7465
|
+
className: Ni({
|
|
7466
7466
|
[`${i(a.Reasoning)}`]: !t
|
|
7467
7467
|
})
|
|
7468
7468
|
}
|
|
@@ -7472,7 +7472,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7472
7472
|
}
|
|
7473
7473
|
)
|
|
7474
7474
|
] });
|
|
7475
|
-
},
|
|
7475
|
+
}, Oh = ({
|
|
7476
7476
|
className: e
|
|
7477
7477
|
}) => {
|
|
7478
7478
|
const { user: t, getAccessToken: r } = me(), {
|
|
@@ -7528,7 +7528,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7528
7528
|
}
|
|
7529
7529
|
),
|
|
7530
7530
|
g && /* @__PURE__ */ d(
|
|
7531
|
-
|
|
7531
|
+
Pe,
|
|
7532
7532
|
{
|
|
7533
7533
|
label: "Save Private Chat",
|
|
7534
7534
|
mode: "light",
|
|
@@ -7556,7 +7556,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7556
7556
|
}
|
|
7557
7557
|
)
|
|
7558
7558
|
] });
|
|
7559
|
-
},
|
|
7559
|
+
}, Ph = ({
|
|
7560
7560
|
className: e
|
|
7561
7561
|
}) => {
|
|
7562
7562
|
const { getAccessToken: t, user: r } = me(), {
|
|
@@ -7566,7 +7566,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7566
7566
|
getAccessToken: t
|
|
7567
7567
|
});
|
|
7568
7568
|
return /* @__PURE__ */ d(
|
|
7569
|
-
|
|
7569
|
+
Pe,
|
|
7570
7570
|
{
|
|
7571
7571
|
label: "Send Message",
|
|
7572
7572
|
mode: "light",
|
|
@@ -7593,7 +7593,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7593
7593
|
)
|
|
7594
7594
|
}
|
|
7595
7595
|
);
|
|
7596
|
-
}, zh = [".png", ".jpg", ".jpeg", ".webp"],
|
|
7596
|
+
}, zh = [".png", ".jpg", ".jpeg", ".webp"], Rh = [".pdf", ".txt"], Mh = [
|
|
7597
7597
|
".js",
|
|
7598
7598
|
".cjs",
|
|
7599
7599
|
".mjs",
|
|
@@ -7608,23 +7608,23 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7608
7608
|
".json",
|
|
7609
7609
|
".md"
|
|
7610
7610
|
], Ge = [
|
|
7611
|
-
...Ph,
|
|
7612
7611
|
...Rh,
|
|
7612
|
+
...Mh,
|
|
7613
7613
|
...zh
|
|
7614
|
-
], Lr = 400 * 1024,
|
|
7614
|
+
], Lr = 400 * 1024, $h = "text/plain", Vt = (e) => {
|
|
7615
7615
|
if (e === 0)
|
|
7616
7616
|
return "0 Bytes";
|
|
7617
7617
|
const t = 1024, r = ["Bytes", "KB", "MB", "GB"], n = Math.floor(Math.log(e) / Math.log(t));
|
|
7618
7618
|
return parseFloat((e / Math.pow(t, n)).toFixed(2)) + " " + r[n];
|
|
7619
|
-
}, Js = (e) => e.reduce((t, r) => t + r.size, 0),
|
|
7619
|
+
}, Js = (e) => e.reduce((t, r) => t + r.size, 0), Zh = (e) => e.type ? e : new File(
|
|
7620
7620
|
[e],
|
|
7621
7621
|
// Use the original file content
|
|
7622
7622
|
e.name,
|
|
7623
7623
|
{
|
|
7624
|
-
type:
|
|
7624
|
+
type: $h,
|
|
7625
7625
|
lastModified: e.lastModified
|
|
7626
7626
|
}
|
|
7627
|
-
),
|
|
7627
|
+
), Dh = ({
|
|
7628
7628
|
files: e,
|
|
7629
7629
|
clearFile: t
|
|
7630
7630
|
}) => e && e.length > 0 && /* @__PURE__ */ A("div", { className: "px-4 py-2", children: [
|
|
@@ -7663,14 +7663,14 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7663
7663
|
" ",
|
|
7664
7664
|
Vt(Lr)
|
|
7665
7665
|
] })
|
|
7666
|
-
] }), Ws = 24,
|
|
7667
|
-
e.current && (e.current.style.height = `${
|
|
7668
|
-
},
|
|
7666
|
+
] }), Ws = 24, Lh = 500, Ys = 2, Uh = 5, jh = Ws * Ys, io = Uh * Ws, Fh = "ready", Bh = "streaming", Vh = "error", Hh = "submitted", Dt = (e) => {
|
|
7667
|
+
e.current && (e.current.style.height = `${jh}px`);
|
|
7668
|
+
}, Gh = () => O(
|
|
7669
7669
|
"relative rounded-md text-base h-auto min-w-28 overflow-hidden pt-2"
|
|
7670
|
-
),
|
|
7670
|
+
), Jh = ({ oledMode: e }) => O({
|
|
7671
7671
|
"bg-slate-900/95 dark:bg-slate-900": e,
|
|
7672
7672
|
"bg-slate-900": !e
|
|
7673
|
-
}),
|
|
7673
|
+
}), Wh = () => O("text-copy-lighter caret-copy-light"), Yh = ({ oledMode: e }) => O(
|
|
7674
7674
|
"has-[.av-prompt-editable:focus]:outline",
|
|
7675
7675
|
"has-[.av-prompt-editable:focus]:outline-2",
|
|
7676
7676
|
"has-[.av-prompt-editable:focus]:outline-offset-2",
|
|
@@ -7678,7 +7678,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7678
7678
|
"has-[.av-prompt-editable:focus]:outline-focus-light": !e,
|
|
7679
7679
|
"dark:has-[.av-prompt-editable:focus]:outline-focus-light has-[.av-prompt-editable:focus]:outline-focus-dark": e
|
|
7680
7680
|
}
|
|
7681
|
-
),
|
|
7681
|
+
), qh = () => {
|
|
7682
7682
|
const { user: e, getAccessToken: t } = me(), r = er(Ht.ADDON.ATTACHMENTS), n = er(Ht.ADDON.REASONING), { allowedModels: o } = jr(), [s, i] = M(null), [a, l] = M(!1), [c, p] = M(!1), {
|
|
7683
7683
|
state: { oledMode: u }
|
|
7684
7684
|
} = X(St), {
|
|
@@ -7702,20 +7702,20 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7702
7702
|
}), { data: C } = je({
|
|
7703
7703
|
user: e?.username,
|
|
7704
7704
|
getAccessToken: t
|
|
7705
|
-
}), U = W(null), F = W(null),
|
|
7705
|
+
}), U = W(null), F = W(null), P = W(!1), ee = W(0), le = W(null), z = W(null), Qe = Oa(), [de, Be] = xe(), At = () => O(
|
|
7706
7706
|
"peer",
|
|
7707
7707
|
"text-base resize-none overflow-hidden w-full text-inherit outline-none",
|
|
7708
7708
|
"h-6 pr-2 pl-3",
|
|
7709
7709
|
de(Be.Placeholder)
|
|
7710
7710
|
), ct = {
|
|
7711
7711
|
wrapper: O(
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7712
|
+
za,
|
|
7713
|
+
Gh(),
|
|
7714
|
+
Jh({ oledMode: u }),
|
|
7715
|
+
Wh(),
|
|
7716
|
+
Yh({ oledMode: u })
|
|
7717
7717
|
),
|
|
7718
|
-
textArea: O(
|
|
7718
|
+
textArea: O(Pa, At())
|
|
7719
7719
|
}, pe = n && C?.showReasoningButton, { setMessages: lt, status: et, id: sr, sendMessage: Nt, input: K, setInput: re } = Fe({
|
|
7720
7720
|
onFinish: (D) => {
|
|
7721
7721
|
T();
|
|
@@ -7769,25 +7769,25 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7769
7769
|
]
|
|
7770
7770
|
), rn = q(
|
|
7771
7771
|
async (D) => {
|
|
7772
|
-
D ===
|
|
7772
|
+
D === Fh && g({
|
|
7773
7773
|
type: Ye,
|
|
7774
7774
|
payload: {
|
|
7775
7775
|
loading: !1,
|
|
7776
7776
|
streaming: !1
|
|
7777
7777
|
}
|
|
7778
|
-
}), D ===
|
|
7778
|
+
}), D === Hh && g({
|
|
7779
7779
|
type: Ye,
|
|
7780
7780
|
payload: {
|
|
7781
7781
|
loading: !0,
|
|
7782
7782
|
streaming: !1
|
|
7783
7783
|
}
|
|
7784
|
-
}), D ===
|
|
7784
|
+
}), D === Bh && g({
|
|
7785
7785
|
type: Ye,
|
|
7786
7786
|
payload: {
|
|
7787
7787
|
loading: !1,
|
|
7788
7788
|
streaming: !0
|
|
7789
7789
|
}
|
|
7790
|
-
}), D ===
|
|
7790
|
+
}), D === Vh && setTimeout(() => {
|
|
7791
7791
|
f || (g({
|
|
7792
7792
|
type: Ye,
|
|
7793
7793
|
payload: {
|
|
@@ -7812,26 +7812,26 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7812
7812
|
C?.sendOnEnter !== void 0 && p(C.sendOnEnter);
|
|
7813
7813
|
}, [C]);
|
|
7814
7814
|
const ar = q(() => {
|
|
7815
|
-
if (!
|
|
7815
|
+
if (!z.current)
|
|
7816
7816
|
return;
|
|
7817
|
-
|
|
7818
|
-
const D =
|
|
7817
|
+
z.current.style.height = "auto";
|
|
7818
|
+
const D = z.current.scrollHeight;
|
|
7819
7819
|
if (D > io) {
|
|
7820
|
-
|
|
7820
|
+
z.current.style.height = `${io}px`, z.current.style.overflowY = "scroll";
|
|
7821
7821
|
return;
|
|
7822
7822
|
}
|
|
7823
|
-
|
|
7823
|
+
z.current.style.height = `${D}px`, z.current.style.overflowY = "hidden";
|
|
7824
7824
|
}, []), Qs = (D) => {
|
|
7825
7825
|
if (D.preventDefault(), D.target.files && D.target.files.length > 0) {
|
|
7826
|
-
const ne = s ? Array.from(s) : [], te = Array.from(D.target.files),
|
|
7826
|
+
const ne = s ? Array.from(s) : [], te = Array.from(D.target.files), ze = [...ne];
|
|
7827
7827
|
let Ve = !1;
|
|
7828
7828
|
for (const ge of te) {
|
|
7829
7829
|
const ir = "." + ge.name.split(".").pop()?.toLowerCase();
|
|
7830
|
-
Ge.includes(ir) ?
|
|
7830
|
+
Ge.includes(ir) ? ze.some(
|
|
7831
7831
|
(cr) => cr.name === ge.name && cr.size === ge.size && cr.lastModified === ge.lastModified
|
|
7832
|
-
) ||
|
|
7832
|
+
) || ze.push(ge) : Ve = !0;
|
|
7833
7833
|
}
|
|
7834
|
-
if (F.current && (F.current.value = ""), Js(
|
|
7834
|
+
if (F.current && (F.current.value = ""), Js(ze) > Lr) {
|
|
7835
7835
|
U.current = `Total file size exceeds the limit of ${Vt(
|
|
7836
7836
|
Lr
|
|
7837
7837
|
)}.`, l(!0);
|
|
@@ -7842,9 +7842,9 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7842
7842
|
U.current = `Only ${ge} files are allowed.`, l(!0);
|
|
7843
7843
|
return;
|
|
7844
7844
|
}
|
|
7845
|
-
if (
|
|
7845
|
+
if (ze.length > 0) {
|
|
7846
7846
|
const ge = new DataTransfer();
|
|
7847
|
-
|
|
7847
|
+
ze.forEach((ir) => ge.items.add(ir)), i(ge.files), g({
|
|
7848
7848
|
type: at,
|
|
7849
7849
|
payload: {
|
|
7850
7850
|
attachments: ge.files.length
|
|
@@ -7869,14 +7869,14 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7869
7869
|
}, ra = q(() => {
|
|
7870
7870
|
F.current && (F.current.value = ""), i(null);
|
|
7871
7871
|
}, []), nn = async (D) => {
|
|
7872
|
-
D.preventDefault(), Dt(
|
|
7872
|
+
D.preventDefault(), Dt(z);
|
|
7873
7873
|
const ne = await t();
|
|
7874
7874
|
let te;
|
|
7875
7875
|
if (s && s.length > 0) {
|
|
7876
|
-
const
|
|
7877
|
-
(Ot) =>
|
|
7876
|
+
const ze = Array.from(s).map(
|
|
7877
|
+
(Ot) => Zh(Ot)
|
|
7878
7878
|
), Ve = new DataTransfer();
|
|
7879
|
-
|
|
7879
|
+
ze.forEach((Ot) => Ve.items.add(Ot)), te = Ve.files;
|
|
7880
7880
|
}
|
|
7881
7881
|
Ks(D, {
|
|
7882
7882
|
headers: {
|
|
@@ -7896,7 +7896,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7896
7896
|
[
|
|
7897
7897
|
"mod+K",
|
|
7898
7898
|
() => {
|
|
7899
|
-
|
|
7899
|
+
z && z.current && !$e() && z.current.focus();
|
|
7900
7900
|
}
|
|
7901
7901
|
]
|
|
7902
7902
|
]), $(() => {
|
|
@@ -7905,18 +7905,18 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7905
7905
|
D.indexOf(sn) !== -1 ? navigator.clipboard.readText().then((te) => {
|
|
7906
7906
|
const Ve = te.startsWith("http://") || te.startsWith("https://") ? te : `"""${te}"""`;
|
|
7907
7907
|
re(D.replace(sn, Ve));
|
|
7908
|
-
}) : re(D), !$e() &&
|
|
7908
|
+
}) : re(D), !$e() && z.current && z.current.focus(), k({
|
|
7909
7909
|
type: uo
|
|
7910
7910
|
});
|
|
7911
7911
|
}
|
|
7912
7912
|
}, [m, k, re]), $(() => {
|
|
7913
|
-
if (
|
|
7914
|
-
|
|
7913
|
+
if (P.current === !1) {
|
|
7914
|
+
P.current = !0, !K && Dt(z);
|
|
7915
7915
|
return;
|
|
7916
7916
|
}
|
|
7917
7917
|
y > 0 && y !== ee.current ? (ee.current = y, setTimeout(() => {
|
|
7918
|
-
|
|
7919
|
-
},
|
|
7918
|
+
z.current && (!K && Dt(z), z.current.focus());
|
|
7919
|
+
}, Lh)) : h === !1 && !K && (Dt(z), !$e() && z.current && z.current.focus());
|
|
7920
7920
|
}, [y, h, K]), $(() => {
|
|
7921
7921
|
m.lastTriggeredTimestamp && setTimeout(() => {
|
|
7922
7922
|
ar();
|
|
@@ -7948,7 +7948,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7948
7948
|
{
|
|
7949
7949
|
required: !0,
|
|
7950
7950
|
rows: Ys,
|
|
7951
|
-
ref:
|
|
7951
|
+
ref: z,
|
|
7952
7952
|
placeholder: Tr() ? an : c ? cn : ln,
|
|
7953
7953
|
translate: "no",
|
|
7954
7954
|
onChange: na,
|
|
@@ -7973,11 +7973,11 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7973
7973
|
}
|
|
7974
7974
|
)
|
|
7975
7975
|
] }),
|
|
7976
|
-
/* @__PURE__ */ d(
|
|
7976
|
+
/* @__PURE__ */ d(Dh, { files: s, clearFile: ta }),
|
|
7977
7977
|
/* @__PURE__ */ A("div", { className: "p-2 flex items-center", children: [
|
|
7978
|
-
/* @__PURE__ */ d(
|
|
7978
|
+
/* @__PURE__ */ d(Ph, { className: "order-7 ml-auto" }),
|
|
7979
7979
|
/* @__PURE__ */ d(
|
|
7980
|
-
|
|
7980
|
+
oh,
|
|
7981
7981
|
{
|
|
7982
7982
|
className: O("order-1 sm:mr-2", {
|
|
7983
7983
|
"mr-3": pe,
|
|
@@ -7986,7 +7986,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7986
7986
|
}
|
|
7987
7987
|
),
|
|
7988
7988
|
/* @__PURE__ */ d(
|
|
7989
|
-
|
|
7989
|
+
Ah,
|
|
7990
7990
|
{
|
|
7991
7991
|
className: O("order-2 sm:mr-2", {
|
|
7992
7992
|
"mr-3": pe,
|
|
@@ -7995,7 +7995,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
7995
7995
|
}
|
|
7996
7996
|
),
|
|
7997
7997
|
r && /* @__PURE__ */ d(
|
|
7998
|
-
|
|
7998
|
+
nh,
|
|
7999
7999
|
{
|
|
8000
8000
|
className: O("order-3 sm:mr-2", {
|
|
8001
8001
|
"mr-3": pe,
|
|
@@ -8004,9 +8004,9 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8004
8004
|
onClick: ea
|
|
8005
8005
|
}
|
|
8006
8006
|
),
|
|
8007
|
-
pe && /* @__PURE__ */ d(
|
|
8007
|
+
pe && /* @__PURE__ */ d(Nh, { className: O("order-4 mr-3 sm:mr-2") }),
|
|
8008
8008
|
/* @__PURE__ */ d(
|
|
8009
|
-
|
|
8009
|
+
kh,
|
|
8010
8010
|
{
|
|
8011
8011
|
className: O("order-5 mr-3 sm:mr-2", {
|
|
8012
8012
|
"mr-3": pe,
|
|
@@ -8014,11 +8014,11 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8014
8014
|
})
|
|
8015
8015
|
}
|
|
8016
8016
|
),
|
|
8017
|
-
/* @__PURE__ */ d(
|
|
8017
|
+
/* @__PURE__ */ d(Oh, { className: "order-6" })
|
|
8018
8018
|
] })
|
|
8019
8019
|
] }) })
|
|
8020
8020
|
] });
|
|
8021
|
-
}, Lt = "--sassy-bottom",
|
|
8021
|
+
}, Lt = "--sassy-bottom", Xh = ({ isComponent: e }) => {
|
|
8022
8022
|
const {
|
|
8023
8023
|
state: { loading: t, streaming: r, restoring: n }
|
|
8024
8024
|
} = X(Ee), {
|
|
@@ -8091,10 +8091,10 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8091
8091
|
className: O(
|
|
8092
8092
|
"border-transparent mt-5",
|
|
8093
8093
|
"bottom-(--sassy-bottom)",
|
|
8094
|
-
|
|
8094
|
+
Jf
|
|
8095
8095
|
),
|
|
8096
8096
|
children: /* @__PURE__ */ A("div", { className: kr({ fullScreen: i }), children: [
|
|
8097
|
-
/* @__PURE__ */ d(
|
|
8097
|
+
/* @__PURE__ */ d(qh, {}),
|
|
8098
8098
|
/* @__PURE__ */ d(
|
|
8099
8099
|
"div",
|
|
8100
8100
|
{
|
|
@@ -8124,14 +8124,14 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8124
8124
|
label: "Google Gemini",
|
|
8125
8125
|
icon: Wa
|
|
8126
8126
|
}
|
|
8127
|
-
],
|
|
8127
|
+
], Kh = ({ className: e }) => {
|
|
8128
8128
|
const {
|
|
8129
8129
|
dispatch: t,
|
|
8130
8130
|
state: { privateChat: r },
|
|
8131
8131
|
setChatId: n,
|
|
8132
8132
|
setInitialMessages: o
|
|
8133
8133
|
} = X(Ee), { getAccessToken: s, user: i } = me(), { status: a } = Fe(), { allowedModels: l, status: c } = jr(), [p, u] = xe(), [g, v] = M(!1), h = q(() => {
|
|
8134
|
-
g || (
|
|
8134
|
+
g || (Rf(), v(!0));
|
|
8135
8135
|
}, [g]), {
|
|
8136
8136
|
isSuccess: f,
|
|
8137
8137
|
refetch: y,
|
|
@@ -8141,8 +8141,8 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8141
8141
|
getAccessToken: s
|
|
8142
8142
|
}), b = we(() => {
|
|
8143
8143
|
if (pn(l, c)) {
|
|
8144
|
-
const
|
|
8145
|
-
(le) =>
|
|
8144
|
+
const P = Ba(l), ee = Ir.filter(
|
|
8145
|
+
(le) => P.includes(
|
|
8146
8146
|
le.id
|
|
8147
8147
|
)
|
|
8148
8148
|
);
|
|
@@ -8152,17 +8152,17 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8152
8152
|
}, [l, c]), I = we(() => pn(l, c) ? qa(l) : /* @__PURE__ */ new Map(), [l, c]), m = we(() => {
|
|
8153
8153
|
if (!w?.useNestedModelSelection)
|
|
8154
8154
|
return !1;
|
|
8155
|
-
for (const
|
|
8156
|
-
if (
|
|
8155
|
+
for (const P of I.values())
|
|
8156
|
+
if (P.length > 1)
|
|
8157
8157
|
return !0;
|
|
8158
8158
|
return !1;
|
|
8159
|
-
}, [w?.useNestedModelSelection, I]), k = async (
|
|
8159
|
+
}, [w?.useNestedModelSelection, I]), k = async (P) => {
|
|
8160
8160
|
try {
|
|
8161
|
-
n(Ne()), o([]),
|
|
8162
|
-
provider:
|
|
8161
|
+
n(Ne()), o([]), P !== w?.provider && (await fn({
|
|
8162
|
+
provider: P,
|
|
8163
8163
|
accessToken: await s(),
|
|
8164
8164
|
username: i?.username || ""
|
|
8165
|
-
}), y(), await Et(`${hn} ${
|
|
8165
|
+
}), y(), await Et(`${hn} ${P}`, {
|
|
8166
8166
|
containerId: "toggle-provider"
|
|
8167
8167
|
})), t({
|
|
8168
8168
|
type: Ue,
|
|
@@ -8172,18 +8172,18 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8172
8172
|
});
|
|
8173
8173
|
} catch {
|
|
8174
8174
|
}
|
|
8175
|
-
}, x = async (
|
|
8175
|
+
}, x = async (P, ee) => {
|
|
8176
8176
|
try {
|
|
8177
|
-
if (n(Ne()), o([]),
|
|
8177
|
+
if (n(Ne()), o([]), P !== w?.provider || ee !== w?.model) {
|
|
8178
8178
|
await fn({
|
|
8179
|
-
provider:
|
|
8179
|
+
provider: P,
|
|
8180
8180
|
model: ee,
|
|
8181
8181
|
accessToken: await s(),
|
|
8182
8182
|
username: i?.username || ""
|
|
8183
8183
|
}), y();
|
|
8184
8184
|
const le = ur[ee] || ee;
|
|
8185
8185
|
await Et(
|
|
8186
|
-
`${hn} ${
|
|
8186
|
+
`${hn} ${P} (${le})`,
|
|
8187
8187
|
{
|
|
8188
8188
|
containerId: "toggle-provider"
|
|
8189
8189
|
}
|
|
@@ -8198,7 +8198,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8198
8198
|
} catch {
|
|
8199
8199
|
}
|
|
8200
8200
|
}, T = w && f, C = T && b.find(
|
|
8201
|
-
(
|
|
8201
|
+
(P) => w.provider === P.id
|
|
8202
8202
|
)?.icon || b[0]?.icon, U = we(() => !w?.useNestedModelSelection || !w?.model || !l || !yo(w.model, l) ? null : ur[w.model] || w.model, [w?.useNestedModelSelection, w?.model, l]), F = /* @__PURE__ */ d(Ae, { children: /* @__PURE__ */ A(
|
|
8203
8203
|
Tt,
|
|
8204
8204
|
{
|
|
@@ -8225,31 +8225,31 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8225
8225
|
defaultPlacement: "top-start",
|
|
8226
8226
|
children: [
|
|
8227
8227
|
/* @__PURE__ */ d(Dr, { children: "Providers" }),
|
|
8228
|
-
T && b.map((
|
|
8229
|
-
const ee = I.get(
|
|
8230
|
-
return m && ee.length > 1 ? /* @__PURE__ */ A(Tt, { label:
|
|
8228
|
+
T && b.map((P) => {
|
|
8229
|
+
const ee = I.get(P.id) || [];
|
|
8230
|
+
return m && ee.length > 1 ? /* @__PURE__ */ A(Tt, { label: P.label, children: [
|
|
8231
8231
|
/* @__PURE__ */ A(Dr, { children: [
|
|
8232
|
-
|
|
8232
|
+
P.label,
|
|
8233
8233
|
" Models"
|
|
8234
8234
|
] }),
|
|
8235
|
-
ee.map((
|
|
8235
|
+
ee.map((z) => /* @__PURE__ */ d(
|
|
8236
8236
|
be,
|
|
8237
8237
|
{
|
|
8238
|
-
selected: w.provider ===
|
|
8239
|
-
label: ur[
|
|
8240
|
-
onClick: () => x(
|
|
8238
|
+
selected: w.provider === P.id && w.model === z,
|
|
8239
|
+
label: ur[z] || z,
|
|
8240
|
+
onClick: () => x(P.id, z)
|
|
8241
8241
|
},
|
|
8242
|
-
|
|
8242
|
+
z
|
|
8243
8243
|
))
|
|
8244
|
-
] },
|
|
8244
|
+
] }, P.id) : /* @__PURE__ */ d(
|
|
8245
8245
|
be,
|
|
8246
8246
|
{
|
|
8247
|
-
selected: w.provider ===
|
|
8248
|
-
label:
|
|
8249
|
-
icon: /* @__PURE__ */ d(
|
|
8250
|
-
onClick: () => k(
|
|
8247
|
+
selected: w.provider === P.id,
|
|
8248
|
+
label: P.label,
|
|
8249
|
+
icon: /* @__PURE__ */ d(P.icon, {}),
|
|
8250
|
+
onClick: () => k(P.id)
|
|
8251
8251
|
},
|
|
8252
|
-
|
|
8252
|
+
P.id
|
|
8253
8253
|
);
|
|
8254
8254
|
})
|
|
8255
8255
|
]
|
|
@@ -8257,7 +8257,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8257
8257
|
) });
|
|
8258
8258
|
return T ? /* @__PURE__ */ A("div", { className: "flex items-center", children: [
|
|
8259
8259
|
/* @__PURE__ */ d(
|
|
8260
|
-
|
|
8260
|
+
Pe,
|
|
8261
8261
|
{
|
|
8262
8262
|
label: "Toggle Providers",
|
|
8263
8263
|
mode: "light",
|
|
@@ -8277,75 +8277,75 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8277
8277
|
}
|
|
8278
8278
|
)
|
|
8279
8279
|
] }) : /* @__PURE__ */ d("div", { className: e, children: F });
|
|
8280
|
-
},
|
|
8280
|
+
}, Qh = Oe(
|
|
8281
8281
|
() => import(
|
|
8282
8282
|
/* webpackChunkName: "modal-chunk" */
|
|
8283
|
-
"./ProfileEntry.
|
|
8283
|
+
"./ProfileEntry.BuGuaJZ7.js"
|
|
8284
8284
|
).then((e) => ({
|
|
8285
8285
|
default: e.Profile
|
|
8286
8286
|
}))
|
|
8287
|
-
),
|
|
8287
|
+
), em = Oe(
|
|
8288
8288
|
() => import(
|
|
8289
8289
|
/* webpackChunkName: "modal-chunk" */
|
|
8290
|
-
"./SettingsEntry.
|
|
8290
|
+
"./SettingsEntry.C5p3uHQS.js"
|
|
8291
8291
|
).then((e) => ({
|
|
8292
8292
|
default: e.SettingsPanel
|
|
8293
8293
|
}))
|
|
8294
|
-
),
|
|
8294
|
+
), tm = Oe(
|
|
8295
8295
|
() => import(
|
|
8296
8296
|
/* webpackChunkName: "modal-chunk" */
|
|
8297
|
-
"./HistoryEntry.
|
|
8297
|
+
"./HistoryEntry.BkHfgtzh.js"
|
|
8298
8298
|
).then((e) => ({
|
|
8299
8299
|
default: e.HistoryPanel
|
|
8300
8300
|
}))
|
|
8301
|
-
),
|
|
8301
|
+
), rm = Oe(
|
|
8302
8302
|
() => import(
|
|
8303
8303
|
/* webpackChunkName: "modal-chunk" */
|
|
8304
|
-
"./AboutEntry.
|
|
8304
|
+
"./AboutEntry.Hi0jo6Cb.js"
|
|
8305
8305
|
).then((e) => ({ default: e.About }))
|
|
8306
|
-
),
|
|
8306
|
+
), nm = Oe(
|
|
8307
8307
|
() => import(
|
|
8308
8308
|
/* webpackChunkName: "modal-chunk" */
|
|
8309
|
-
"./UsageEntry.
|
|
8309
|
+
"./UsageEntry.BR0TAHBi.js"
|
|
8310
8310
|
).then((e) => ({ default: e.Usage }))
|
|
8311
|
-
),
|
|
8311
|
+
), om = Oe(
|
|
8312
8312
|
() => import(
|
|
8313
8313
|
/* webpackChunkName: "modal-chunk" */
|
|
8314
|
-
"./UserMemoriesPanel.
|
|
8314
|
+
"./UserMemoriesPanel.I6TEjRS_.js"
|
|
8315
8315
|
).then(
|
|
8316
8316
|
(e) => ({ default: e.default })
|
|
8317
8317
|
)
|
|
8318
|
-
),
|
|
8318
|
+
), sm = ({
|
|
8319
8319
|
open: e,
|
|
8320
8320
|
onOpenChange: t
|
|
8321
8321
|
}) => {
|
|
8322
8322
|
const { user: r } = me();
|
|
8323
8323
|
return /* @__PURE__ */ d(
|
|
8324
|
-
|
|
8324
|
+
om,
|
|
8325
8325
|
{
|
|
8326
8326
|
open: e,
|
|
8327
8327
|
onOpenChange: t,
|
|
8328
8328
|
user: r?.username
|
|
8329
8329
|
}
|
|
8330
8330
|
);
|
|
8331
|
-
},
|
|
8331
|
+
}, am = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("div", {}), children: (() => {
|
|
8332
8332
|
switch (e) {
|
|
8333
8333
|
case "profile":
|
|
8334
|
-
return /* @__PURE__ */ d(Kh, { open: t, onOpenChange: r });
|
|
8335
|
-
case "settings":
|
|
8336
8334
|
return /* @__PURE__ */ d(Qh, { open: t, onOpenChange: r });
|
|
8337
|
-
case "
|
|
8335
|
+
case "settings":
|
|
8338
8336
|
return /* @__PURE__ */ d(em, { open: t, onOpenChange: r });
|
|
8339
|
-
case "
|
|
8337
|
+
case "history":
|
|
8340
8338
|
return /* @__PURE__ */ d(tm, { open: t, onOpenChange: r });
|
|
8341
|
-
case "
|
|
8339
|
+
case "about":
|
|
8342
8340
|
return /* @__PURE__ */ d(rm, { open: t, onOpenChange: r });
|
|
8341
|
+
case "usage":
|
|
8342
|
+
return /* @__PURE__ */ d(nm, { open: t, onOpenChange: r });
|
|
8343
8343
|
case "memories":
|
|
8344
|
-
return /* @__PURE__ */ d(
|
|
8344
|
+
return /* @__PURE__ */ d(sm, { open: t, onOpenChange: r });
|
|
8345
8345
|
default:
|
|
8346
8346
|
return null;
|
|
8347
8347
|
}
|
|
8348
|
-
})() }) : null,
|
|
8348
|
+
})() }) : null, im = ({
|
|
8349
8349
|
isComponent: e = !1
|
|
8350
8350
|
}) => {
|
|
8351
8351
|
const {
|
|
@@ -8361,23 +8361,23 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8361
8361
|
h || Promise.all([
|
|
8362
8362
|
import(
|
|
8363
8363
|
/* webpackChunkName: "modal-chunk" */
|
|
8364
|
-
"./ProfileEntry.
|
|
8364
|
+
"./ProfileEntry.BuGuaJZ7.js"
|
|
8365
8365
|
),
|
|
8366
8366
|
import(
|
|
8367
8367
|
/* webpackChunkName: "modal-chunk" */
|
|
8368
|
-
"./SettingsEntry.
|
|
8368
|
+
"./SettingsEntry.C5p3uHQS.js"
|
|
8369
8369
|
),
|
|
8370
8370
|
import(
|
|
8371
8371
|
/* webpackChunkName: "modal-chunk" */
|
|
8372
|
-
"./HistoryEntry.
|
|
8372
|
+
"./HistoryEntry.BkHfgtzh.js"
|
|
8373
8373
|
),
|
|
8374
8374
|
import(
|
|
8375
8375
|
/* webpackChunkName: "modal-chunk" */
|
|
8376
|
-
"./AboutEntry.
|
|
8376
|
+
"./AboutEntry.Hi0jo6Cb.js"
|
|
8377
8377
|
),
|
|
8378
8378
|
import(
|
|
8379
8379
|
/* webpackChunkName: "modal-chunk" */
|
|
8380
|
-
"./UsageEntry.
|
|
8380
|
+
"./UsageEntry.BR0TAHBi.js"
|
|
8381
8381
|
)
|
|
8382
8382
|
]).finally(() => f(!0));
|
|
8383
8383
|
}, [h]), m = q((U) => {
|
|
@@ -8424,7 +8424,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8424
8424
|
}
|
|
8425
8425
|
),
|
|
8426
8426
|
/* @__PURE__ */ d(
|
|
8427
|
-
|
|
8427
|
+
am,
|
|
8428
8428
|
{
|
|
8429
8429
|
type: p,
|
|
8430
8430
|
open: p !== null,
|
|
@@ -8446,9 +8446,9 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8446
8446
|
rowGap: 0,
|
|
8447
8447
|
columnGap: 0,
|
|
8448
8448
|
children: [
|
|
8449
|
-
/* @__PURE__ */ d(st, { children: /* @__PURE__ */ d(
|
|
8449
|
+
/* @__PURE__ */ d(st, { children: /* @__PURE__ */ d(Kh, { className: "mr-2" }) }),
|
|
8450
8450
|
/* @__PURE__ */ d(st, { children: /* @__PURE__ */ d(
|
|
8451
|
-
|
|
8451
|
+
Pe,
|
|
8452
8452
|
{
|
|
8453
8453
|
label: "Profile, Settings, etc.",
|
|
8454
8454
|
mode: "light",
|
|
@@ -8520,7 +8520,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8520
8520
|
}
|
|
8521
8521
|
),
|
|
8522
8522
|
!e && /* @__PURE__ */ A(Ae, { children: [
|
|
8523
|
-
/* @__PURE__ */ d(
|
|
8523
|
+
/* @__PURE__ */ d(Ch, {}),
|
|
8524
8524
|
/* @__PURE__ */ d(
|
|
8525
8525
|
be,
|
|
8526
8526
|
{
|
|
@@ -8541,7 +8541,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8541
8541
|
}
|
|
8542
8542
|
)
|
|
8543
8543
|
] });
|
|
8544
|
-
},
|
|
8544
|
+
}, cm = ({
|
|
8545
8545
|
show: e,
|
|
8546
8546
|
bottom: t,
|
|
8547
8547
|
onClick: r,
|
|
@@ -8552,7 +8552,7 @@ const kh = ({ className: e, ...t }) => {
|
|
|
8552
8552
|
{
|
|
8553
8553
|
style: { bottom: `${t}px` },
|
|
8554
8554
|
className: n || O(
|
|
8555
|
-
|
|
8555
|
+
Wf,
|
|
8556
8556
|
"fixed left-1/2 transform -translate-x-1/2 isolate"
|
|
8557
8557
|
),
|
|
8558
8558
|
children: /* @__PURE__ */ d(
|
|
@@ -8646,21 +8646,21 @@ const co = "av-spinner", qs = ({ spinnerRef: e, mode: t = "system", type: r = "c
|
|
|
8646
8646
|
})
|
|
8647
8647
|
]
|
|
8648
8648
|
});
|
|
8649
|
-
},
|
|
8650
|
-
() => import("./index.
|
|
8651
|
-
), tn = (e) => /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("span", { className: "inline-block" }), children: /* @__PURE__ */ d(
|
|
8649
|
+
}, lm = Oe(
|
|
8650
|
+
() => import("./index.mKL_Oq89.js").then((e) => ({ default: e.Bubble }))
|
|
8651
|
+
), tn = (e) => /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("span", { className: "inline-block" }), children: /* @__PURE__ */ d(lm, { ...e }) });
|
|
8652
8652
|
tn.displayName = "AsyncBubble";
|
|
8653
|
-
const lo = 1,
|
|
8653
|
+
const lo = 1, um = 150, dm = Oe(
|
|
8654
8654
|
() => import(
|
|
8655
8655
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
8656
|
-
"./ChatBubbleAssistant.
|
|
8656
|
+
"./ChatBubbleAssistant.CJ9ZlMsQ.js"
|
|
8657
8657
|
)
|
|
8658
|
-
),
|
|
8658
|
+
), pm = Oe(
|
|
8659
8659
|
() => import(
|
|
8660
8660
|
/* webpackChunkName: "LazyMessageUser" */
|
|
8661
|
-
"./ChatBubbleUser.
|
|
8661
|
+
"./ChatBubbleUser.DrAvgLQQ.js"
|
|
8662
8662
|
)
|
|
8663
|
-
),
|
|
8663
|
+
), fm = Eo.memo(
|
|
8664
8664
|
({
|
|
8665
8665
|
role: e,
|
|
8666
8666
|
content: t,
|
|
@@ -8674,7 +8674,7 @@ const lo = 1, lm = 150, um = Oe(
|
|
|
8674
8674
|
);
|
|
8675
8675
|
return $(() => {
|
|
8676
8676
|
if (o && i && t && t.trim().length >= lo) {
|
|
8677
|
-
const u = Date.now() - l.current, g =
|
|
8677
|
+
const u = Date.now() - l.current, g = um - u;
|
|
8678
8678
|
if (g > 0) {
|
|
8679
8679
|
const v = setTimeout(
|
|
8680
8680
|
() => a(!1),
|
|
@@ -8684,8 +8684,8 @@ const lo = 1, lm = 150, um = Oe(
|
|
|
8684
8684
|
}
|
|
8685
8685
|
a(!1);
|
|
8686
8686
|
}
|
|
8687
|
-
}, [t, i, o]), e === wo && t ? /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(
|
|
8688
|
-
|
|
8687
|
+
}, [t, i, o]), e === wo && t ? /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(pm, { content: t }) }) : (e === _t || e === gn) && o && (s === "submitted" || s === "streaming") && i ? /* @__PURE__ */ d(tn, { tail: !0, children: /* @__PURE__ */ d(qs, { type: "dots" }) }) : (e === _t || e === gn) && t && t.trim().length >= lo ? /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(
|
|
8688
|
+
dm,
|
|
8689
8689
|
{
|
|
8690
8690
|
role: e,
|
|
8691
8691
|
content: t,
|
|
@@ -8696,7 +8696,7 @@ const lo = 1, lm = 150, um = Oe(
|
|
|
8696
8696
|
}
|
|
8697
8697
|
) }) : null;
|
|
8698
8698
|
}
|
|
8699
|
-
),
|
|
8699
|
+
), hm = (e) => {
|
|
8700
8700
|
if (e.parts && Array.isArray(e.parts)) {
|
|
8701
8701
|
const t = e.parts.filter((r) => r.type === "text").map((r) => r.text).filter(Boolean);
|
|
8702
8702
|
return t.length > 0 ? t.join(`
|
|
@@ -8705,7 +8705,7 @@ const lo = 1, lm = 150, um = Oe(
|
|
|
8705
8705
|
if ("content" in e && typeof e.content == "string")
|
|
8706
8706
|
return e.content;
|
|
8707
8707
|
};
|
|
8708
|
-
function
|
|
8708
|
+
function mm(e) {
|
|
8709
8709
|
const t = e.metadata;
|
|
8710
8710
|
if (t?.model)
|
|
8711
8711
|
return { model: String(t.model) };
|
|
@@ -8719,14 +8719,14 @@ function hm(e) {
|
|
|
8719
8719
|
}
|
|
8720
8720
|
}
|
|
8721
8721
|
}
|
|
8722
|
-
const
|
|
8722
|
+
const gm = () => {
|
|
8723
8723
|
const { messages: e, status: t } = Fe(), r = e ? e.map((s, i) => s.role === _t ? 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 === wo;
|
|
8724
8724
|
return e && e.length > 0 ? /* @__PURE__ */ A("div", { className: "space-y-6 mt-2 @container", children: [
|
|
8725
8725
|
e?.map((s, i) => {
|
|
8726
8726
|
let a;
|
|
8727
|
-
const l = `${i}-${s.role}`, c =
|
|
8727
|
+
const l = `${i}-${s.role}`, c = hm(s), p = mm(s), u = s.role === _t && i === r;
|
|
8728
8728
|
return /* @__PURE__ */ d(
|
|
8729
|
-
|
|
8729
|
+
fm,
|
|
8730
8730
|
{
|
|
8731
8731
|
role: s.role,
|
|
8732
8732
|
content: c,
|
|
@@ -8740,7 +8740,7 @@ const mm = () => {
|
|
|
8740
8740
|
}),
|
|
8741
8741
|
o && /* @__PURE__ */ d(tn, { tail: !0, children: /* @__PURE__ */ d(qs, { type: "dots" }) })
|
|
8742
8742
|
] }) : null;
|
|
8743
|
-
},
|
|
8743
|
+
}, vm = () => {
|
|
8744
8744
|
const { isAuthenticated: e } = me(), { ref: t, inViewport: r } = ai(), n = W(null), o = W(null), {
|
|
8745
8745
|
state: { footerPosition: s, footerHeight: i, footerOffset: a, oledMode: l }
|
|
8746
8746
|
} = X(St), {
|
|
@@ -8769,7 +8769,7 @@ const mm = () => {
|
|
|
8769
8769
|
capabilities: g
|
|
8770
8770
|
}
|
|
8771
8771
|
),
|
|
8772
|
-
/* @__PURE__ */ d(
|
|
8772
|
+
/* @__PURE__ */ d(gm, {}),
|
|
8773
8773
|
/* @__PURE__ */ d("div", { ref: t, className: "scroll-marker" }),
|
|
8774
8774
|
/* @__PURE__ */ d(
|
|
8775
8775
|
"div",
|
|
@@ -8782,7 +8782,7 @@ const mm = () => {
|
|
|
8782
8782
|
)
|
|
8783
8783
|
] }),
|
|
8784
8784
|
/* @__PURE__ */ d(
|
|
8785
|
-
|
|
8785
|
+
cm,
|
|
8786
8786
|
{
|
|
8787
8787
|
show: !r && s === gt,
|
|
8788
8788
|
bottom: u.current,
|
|
@@ -8796,22 +8796,22 @@ function Xs({
|
|
|
8796
8796
|
headerHeight: t = 0
|
|
8797
8797
|
}) {
|
|
8798
8798
|
const { user: r, getAccessToken: n } = me(), [o, s] = M(`${vn}px`), [i, a] = _o(), [l, c] = M(Ne()), [p, u] = M([]), [g] = ke({
|
|
8799
|
-
key: Me +
|
|
8799
|
+
key: Me + Ii,
|
|
8800
8800
|
initialValue: ""
|
|
8801
8801
|
}), [v] = ke({
|
|
8802
|
-
key: Me +
|
|
8802
|
+
key: Me + wi,
|
|
8803
8803
|
initialValue: yn
|
|
8804
8804
|
}), [h] = ke({
|
|
8805
|
-
key: Me +
|
|
8805
|
+
key: Me + Si,
|
|
8806
8806
|
initialValue: mt.DESC
|
|
8807
8807
|
}), [f] = ke({
|
|
8808
|
-
key: Me +
|
|
8808
|
+
key: Me + ki,
|
|
8809
8809
|
initialValue: mt.ASC
|
|
8810
8810
|
}), [y] = ke({
|
|
8811
|
-
key:
|
|
8811
|
+
key: Ei,
|
|
8812
8812
|
initialValue: !1
|
|
8813
8813
|
}), [w] = ke({
|
|
8814
|
-
key:
|
|
8814
|
+
key: Ti,
|
|
8815
8815
|
initialValue: !1
|
|
8816
8816
|
}), b = we(() => ({
|
|
8817
8817
|
footerPosition: Sr,
|
|
@@ -8820,7 +8820,7 @@ function Xs({
|
|
|
8820
8820
|
oledMode: !1,
|
|
8821
8821
|
fullScreen: !1,
|
|
8822
8822
|
themeMode: di
|
|
8823
|
-
}), []), [I, m] =
|
|
8823
|
+
}), []), [I, m] = Pt(pi, b), k = we(() => {
|
|
8824
8824
|
const de = $e(), Be = ho();
|
|
8825
8825
|
return de && Be ? "mt-1" : "mt-5";
|
|
8826
8826
|
}, []), T = {
|
|
@@ -8828,20 +8828,20 @@ function Xs({
|
|
|
8828
8828
|
sortedCell: v,
|
|
8829
8829
|
sortDirection: (() => {
|
|
8830
8830
|
switch (v) {
|
|
8831
|
-
case
|
|
8831
|
+
case bi:
|
|
8832
8832
|
return f;
|
|
8833
8833
|
case yn:
|
|
8834
8834
|
default:
|
|
8835
8835
|
return h;
|
|
8836
8836
|
}
|
|
8837
8837
|
})()
|
|
8838
|
-
}, [C, U] =
|
|
8839
|
-
|
|
8838
|
+
}, [C, U] = Pt(
|
|
8839
|
+
$f,
|
|
8840
8840
|
T
|
|
8841
|
-
), [F,
|
|
8841
|
+
), [F, P] = Pt(Zf, {
|
|
8842
8842
|
prompt: "",
|
|
8843
8843
|
lastTriggeredTimestamp: 0
|
|
8844
|
-
}), [ee, le] =
|
|
8844
|
+
}), [ee, le] = Pt(Mf, {
|
|
8845
8845
|
provider: "",
|
|
8846
8846
|
// OpenAI, Anthropic, etc.
|
|
8847
8847
|
privateChat: !1,
|
|
@@ -8854,7 +8854,7 @@ function Xs({
|
|
|
8854
8854
|
attachments: 0,
|
|
8855
8855
|
lastStreamingTimestamp: 0,
|
|
8856
8856
|
lastResetTimestamp: 0
|
|
8857
|
-
}), { data:
|
|
8857
|
+
}), { data: z } = je({
|
|
8858
8858
|
user: r?.username,
|
|
8859
8859
|
getAccessToken: n
|
|
8860
8860
|
}), Qe = we(() => new en({
|
|
@@ -8864,7 +8864,7 @@ function Xs({
|
|
|
8864
8864
|
username: r?.username
|
|
8865
8865
|
}
|
|
8866
8866
|
}), [r?.username]);
|
|
8867
|
-
return
|
|
8867
|
+
return Gf({
|
|
8868
8868
|
currentChatId: l,
|
|
8869
8869
|
setChatId: c,
|
|
8870
8870
|
setInitialMessages: u,
|
|
@@ -8882,21 +8882,24 @@ function Xs({
|
|
|
8882
8882
|
payload: { fullScreen: w }
|
|
8883
8883
|
});
|
|
8884
8884
|
}, [w]), $(() => {
|
|
8885
|
-
|
|
8885
|
+
z?.themeMode && m({
|
|
8886
8886
|
type: gi,
|
|
8887
|
-
payload: { themeMode:
|
|
8887
|
+
payload: { themeMode: z.themeMode }
|
|
8888
|
+
}), z?.themePalette && m({
|
|
8889
|
+
type: vi,
|
|
8890
|
+
payload: { themePalette: z.themePalette }
|
|
8888
8891
|
});
|
|
8889
|
-
}, [
|
|
8890
|
-
|
|
8892
|
+
}, [z]), $(() => {
|
|
8893
|
+
z && z.provider && le({
|
|
8891
8894
|
type: Fs,
|
|
8892
8895
|
payload: {
|
|
8893
|
-
provider:
|
|
8896
|
+
provider: z.provider
|
|
8894
8897
|
}
|
|
8895
8898
|
});
|
|
8896
|
-
}, [
|
|
8899
|
+
}, [z]), $(() => {
|
|
8897
8900
|
try {
|
|
8898
8901
|
const de = sessionStorage.getItem("sw-toggle-pending");
|
|
8899
|
-
de && (de === "enabled" ? Et(
|
|
8902
|
+
de && (de === "enabled" ? Et(Ci, { containerId: "toggle-save" }) : de === "disabled" && Et(xi, {
|
|
8900
8903
|
containerId: "toggle-save"
|
|
8901
8904
|
}), sessionStorage.removeItem("sw-toggle-pending"));
|
|
8902
8905
|
} catch {
|
|
@@ -8909,7 +8912,7 @@ function Xs({
|
|
|
8909
8912
|
);
|
|
8910
8913
|
} else
|
|
8911
8914
|
s(
|
|
8912
|
-
$e() ? `${
|
|
8915
|
+
$e() ? `${yi}px` : `${vn}px`
|
|
8913
8916
|
);
|
|
8914
8917
|
}, [I, a, t, k]), /* @__PURE__ */ d(
|
|
8915
8918
|
vo.Provider,
|
|
@@ -8921,7 +8924,7 @@ function Xs({
|
|
|
8921
8924
|
children: /* @__PURE__ */ d(St.Provider, { value: { state: I, dispatch: m }, children: /* @__PURE__ */ d(
|
|
8922
8925
|
Fr.Provider,
|
|
8923
8926
|
{
|
|
8924
|
-
value: { state: F, dispatch:
|
|
8927
|
+
value: { state: F, dispatch: P },
|
|
8925
8928
|
children: /* @__PURE__ */ d(
|
|
8926
8929
|
Ee.Provider,
|
|
8927
8930
|
{
|
|
@@ -8932,7 +8935,7 @@ function Xs({
|
|
|
8932
8935
|
setInitialMessages: u
|
|
8933
8936
|
},
|
|
8934
8937
|
children: /* @__PURE__ */ A(
|
|
8935
|
-
|
|
8938
|
+
Vf,
|
|
8936
8939
|
{
|
|
8937
8940
|
value: {
|
|
8938
8941
|
id: l,
|
|
@@ -8944,8 +8947,8 @@ function Xs({
|
|
|
8944
8947
|
}
|
|
8945
8948
|
},
|
|
8946
8949
|
children: [
|
|
8947
|
-
/* @__PURE__ */ d(
|
|
8948
|
-
/* @__PURE__ */ A("div", { className:
|
|
8950
|
+
/* @__PURE__ */ d(Hf, { chatId: l }),
|
|
8951
|
+
/* @__PURE__ */ A("div", { className: _i, children: [
|
|
8949
8952
|
/* @__PURE__ */ d(ro, { containerId: "toggle-save" }),
|
|
8950
8953
|
/* @__PURE__ */ d(ro, { containerId: "toggle-provider" })
|
|
8951
8954
|
] }),
|
|
@@ -8957,7 +8960,7 @@ function Xs({
|
|
|
8957
8960
|
extraClass: k,
|
|
8958
8961
|
fullScreen: w
|
|
8959
8962
|
}),
|
|
8960
|
-
children: /* @__PURE__ */ d(
|
|
8963
|
+
children: /* @__PURE__ */ d(im, { isComponent: e })
|
|
8961
8964
|
}
|
|
8962
8965
|
),
|
|
8963
8966
|
/* @__PURE__ */ d(
|
|
@@ -8967,10 +8970,10 @@ function Xs({
|
|
|
8967
8970
|
style: {
|
|
8968
8971
|
height: o
|
|
8969
8972
|
},
|
|
8970
|
-
children: /* @__PURE__ */ d(
|
|
8973
|
+
children: /* @__PURE__ */ d(vm, {})
|
|
8971
8974
|
}
|
|
8972
8975
|
),
|
|
8973
|
-
/* @__PURE__ */ d(
|
|
8976
|
+
/* @__PURE__ */ d(Xh, { isComponent: e })
|
|
8974
8977
|
]
|
|
8975
8978
|
}
|
|
8976
8979
|
)
|
|
@@ -8982,20 +8985,20 @@ function Xs({
|
|
|
8982
8985
|
);
|
|
8983
8986
|
}
|
|
8984
8987
|
Xs.displayName = "App";
|
|
8985
|
-
const
|
|
8988
|
+
const Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Xs }, Symbol.toStringTag, { value: "Module" }));
|
|
8986
8989
|
export {
|
|
8987
|
-
|
|
8990
|
+
Sm as App,
|
|
8988
8991
|
tn as AsyncBubble,
|
|
8989
|
-
|
|
8992
|
+
cm as ButtonScroll,
|
|
8990
8993
|
Ye as CHAT_SET_STATUS,
|
|
8991
8994
|
qe as ConfirmationPanel,
|
|
8992
8995
|
ro as LazyToastContainerWrapper,
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8996
|
+
mh as Panel,
|
|
8997
|
+
Sh as Toggle,
|
|
8998
|
+
Pe as Tooltip,
|
|
8999
|
+
nf as getDefaultExportFromCjs,
|
|
9000
|
+
Rf as preloadToast,
|
|
9001
|
+
Tm as showErrorToast,
|
|
8999
9002
|
Et as showSuccessToast,
|
|
9000
9003
|
Fe as useAiChat,
|
|
9001
9004
|
er as useCapability
|