@versini/sassysaint 8.111.2 → 8.111.4
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.dWuiIfoL.js → AboutChangelog.C99ZrqKf.js} +2 -2
- package/dist/chunks/{AboutEntry.COzMcfpY.js → AboutEntry.YWAyYLjf.js} +7 -7
- package/dist/chunks/{App.DokcpVPh.js → App.D7kYRe3a.js} +627 -618
- package/dist/chunks/{Bubble.QRjcn1Lv.js → Bubble.MXxGhdx0.js} +1 -1
- package/dist/chunks/{ButtonIconDelete.Dab7ZeCq.js → ButtonIconDelete.Ca_-Z3g5.js} +2 -2
- package/dist/chunks/{Chart.DlnR1Gtb.js → Chart.BmxHbT7B.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.Cqd-fUi1.js → ChatBubbleAssistant.BjZa9CVT.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.CSOd70yB.js → ChatBubbleUser.BvDGQWGU.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.BZREEzMX.js → ChatHistoryTable.gOA0wCai.js} +4 -4
- package/dist/chunks/{HistoryEntry.DyhOuzLz.js → HistoryEntry.m8eQcBA5.js} +6 -6
- package/dist/chunks/{LoginEntry.mnt2UmOe.js → LoginEntry.BZ0MKlEZ.js} +4 -4
- package/dist/chunks/{LogoEntry.lmV9zmpI.js → LogoEntry.VAaujt4V.js} +4 -4
- package/dist/chunks/{MemoriesEntry.BckrjsrE.js → MemoriesEntry.Dp9urYHa.js} +5 -5
- package/dist/chunks/{ProfileEntry.DhR2WKuK.js → ProfileEntry.8-BhqMWc.js} +4 -4
- package/dist/chunks/{SettingsEntry.kLs1a2Dj.js → SettingsEntry.BfQY7V1X.js} +5 -5
- package/dist/chunks/{UsageEntry.BLfcBtrN.js → UsageEntry.CzN_8YVL.js} +5 -5
- package/dist/chunks/{_baseUniq.DVmz6jHV.js → _baseUniq.rh3h2tHg.js} +1 -1
- package/dist/chunks/{arc.nOb9gxBl.js → arc.BKxb_yu5.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.BVMn383j.js → architecture-U656AL7Q.B36n-DM7.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.CnR-iRhb.js → architectureDiagram-VXUJARFQ.D3-Qxo-7.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.D11ZpcLR.js → blockDiagram-VD42YOAC.Mp-Xb22B.js} +5 -5
- package/dist/chunks/{browser.DEC1s1QP.js → browser.DjQN4eNb.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.bWSzY_rt.js → c4Diagram-YG6GDRKO.C9ltkFOr.js} +2 -2
- package/dist/chunks/{channel.1M5uTgQO.js → channel.Bo0ytD01.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.Cwa96jeP.js → chunk-4BX2VUAB.aYwLZcak.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.-zoAyrrp.js → chunk-55IACEB6.5GYTuunv.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.C4PYFgWM.js → chunk-B4BG7PRW.0yBrgVYm.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.CgFtYUkv.js → chunk-DI55MBZ5.CTqvgAEF.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.CwiKWz3b.js → chunk-FMBD7UC4.DaPPU-p7.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.DHmqB3FK.js → chunk-QN33PNHL.By3k-QDP.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.DNkMA4Um.js → chunk-QZHKN3VN.DObI7QtE.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.U545n4hj.js → chunk-TZMSLE5B.DFJLOpRz.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.DDxo0x4a.js → classDiagram-2ON5EDUG.CiC1TMro.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.DDxo0x4a.js → classDiagram-v2-WZHVMYZB.CiC1TMro.js} +2 -2
- package/dist/chunks/{clone.BDes26Un.js → clone.snnq5L3s.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.CqstBDYg.js → cose-bilkent-S5V4N54A.CDA47A7Q.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.C3Ham4x2.js → dagre-6UL2VRFP.BQluIDmg.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.Dxc-laJf.js → diagram-PSM6KHXK.Zu7EeNCT.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.BYjaO11V.js → diagram-QEK2KX5R.C35h0Q1S.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.BdSvjyAT.js → diagram-S2PKOQOG.DeIusNHA.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.fXzJbxCM.js → erDiagram-Q2GNP2WA.uQxkucxo.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.BRY_Tjyi.js → flowDiagram-NV44I4VS.BqkLb-Cs.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.Cwp-eTU6.js → ganttDiagram-JELNMOA3.DxEo8Kjd.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.C6ZVwNEu.js → gitGraph-F6HP7TQM.Dco6xaH4.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.gcnwvxHM.js → gitGraphDiagram-NY62KEGX.Wnzx_yR3.js} +4 -4
- package/dist/chunks/{graph.CPySSX5w.js → graph.BWteyPdy.js} +2 -2
- package/dist/chunks/{index.WUocwy4k.js → index.2IQnxrOb.js} +1 -1
- package/dist/chunks/{index.BzZO0Ipx.js → index.BRLCj5yF.js} +3 -3
- package/dist/chunks/{index.DTjyh1Yf.js → index.Byuy4Q49.js} +1 -1
- package/dist/chunks/{index.C2VHPd6a.js → index.CNqIVM7Q.js} +3 -3
- package/dist/chunks/{index.oLUsWDYJ.js → index.CZrGRJVJ.js} +1 -1
- package/dist/chunks/{index.CycGy587.js → index.D8xiBI-7.js} +1 -1
- package/dist/chunks/{index.pgMnuI31.js → index.DlSb-eu-.js} +3 -5
- package/dist/chunks/{index.DDgSNuFY.js → index.fanc5b7k.js} +1 -1
- package/dist/chunks/{index.BkTdw9OF.js → index.uWhcsflb.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.DkAZ6t3I.js → info-NVLQJR56.BEKQeHwA.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.DdkmJdhg.js → infoDiagram-WHAUD3N6.Dxbn3Ozt.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.DytriVE4.js → journeyDiagram-XKPGCS4Q.BD7YwSgA.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.D9a_7W5C.js → kanban-definition-3W4ZIXB7.CK8JRptb.js} +2 -2
- package/dist/chunks/{layout.Ekany93E.js → layout.CJKebkKn.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.Y-zUfZen.js → mermaid-parser.core.CSYrCldG.js} +10 -10
- package/dist/chunks/{min.DYaeWUNl.js → min.CQHAdIy9.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.BKI2PB37.js → mindmap-definition-VGOIOE7T.DM5DeM0F.js} +4 -4
- package/dist/chunks/{packet-BFZMPI3H.C9P9j3hX.js → packet-BFZMPI3H.DEd3gHu2.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.CW0RRcCh.js → pie-7BOR55EZ.B6CjUa98.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.vdiM68ye.js → pieDiagram-ADFJNKIX.Ch8Q0rB9.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.D6xbUkl9.js → quadrantDiagram-AYHSOK5B.C0GD2d0M.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.B5rD3VRN.js → radar-NHE76QYJ.D4DSygig.js} +1 -1
- package/dist/chunks/{rehype-mermaid.V9RRegCN.js → rehype-mermaid.cahUaoTc.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.B-DgeZPf.js → requirementDiagram-UZGBJVZJ.VgYSoiVA.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.B-rbHhsw.js → sankeyDiagram-TZEHDZUN.BxpPU8Mb.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.B7ALEyRR.js → sequenceDiagram-WL72ISMW.DaNv2DsB.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.DaKmdfH8.js → stateDiagram-FKZM4ZOC.CA2_FEiS.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.B1qCi5lM.js → stateDiagram-v2-4FDKWEC3.D7NqmU3X.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.C6TzjvBh.js → timeline-definition-IT6M3QCI.Cg8zMgPR.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.DxJ6jLpj.js → treemap-KMMF4GRG.BVFWHatk.js} +1 -1
- package/dist/chunks/{useMarkdown.CQHDsVCK.js → useMarkdown.Dupv6NhF.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.LsJsnk8u.js → xychartDiagram-PRI3JC2R.D_CVF5rq.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as h, jsxs as z, Fragment as ut } from "react/jsx-runtime";
|
|
2
|
-
import { ACTION_SORT as lu, ACTION_SEARCH as uu, ACTION_RESET_PROMPT as Ya, ACTION_TOGGLE_PROMPT as Ja, LOCAL_STORAGE_PREFIX as
|
|
2
|
+
import { ACTION_SORT as lu, ACTION_SEARCH as uu, ACTION_RESET_PROMPT as Ya, ACTION_TOGGLE_PROMPT as Ja, LOCAL_STORAGE_PREFIX as He, LOCAL_STORAGE_CHAT_ID as Kn, n as $e, useChat as du, DEFAULT_ICON_ACTION_SIZE as tt, isTauri as sr, useUserPreferences as bt, serverUrl as Ka, useEntitlements as ko, useSaveChat as fu, LOCAL_STORAGE_PRIVATE_DISCLOSURE as pu, B as ar, LOCAL_STORAGE_REASONING_DISCLOSURE as mu, PROMPT_EDITABLE_AREA_CLASSNAME as hu, PROMPT_CLASSNAME as gu, j as Xa, ERROR_MESSAGE as vu, o as cn, U as yu, INPUT_BOTTOM_OFFSET_IPHONE as bu, INPUT_BOTTOM_OFFSET_IPAD as wu, INPUT_BOTTOM_OFFSET as qa, INPUT_BOTTOM_OFFSET_EXTRA as Zr, getLayoutPaddingClass as fo, canEvaluateModels as ds, k as _u, a as Eu, i as Su, s as Cu, x as xu, c as Ur, setNewProvider as fs, useQueryClient as Iu, n$1 as po, useServerCapabilities as Tu, getMessageContaintWrapperClass as Au, UI_FOOTER_BUFFER as Qa, UI_BUTTON_SCROLL_BUFFER as Ru, UI_DEFAULT_MAIN_HEIGHT as ps, e as Ou, applyOledMode as Nu, UI_DEFAULT_MAIN_HEIGHT_IPHONE as Pu, y as ms, v as Mu, LOCAL_STORAGE_SORT as ku, LOCAL_STORAGE_SEARCH as Du, LOCAL_STORAGE_OLED_MODE as $u, LOCAL_STORAGE_FULL_SCREEN as Lu, LOCAL_STORAGE_SORT_TIMESTAMP as zu, LOCAL_STORAGE_SORT_TOKEN_USAGE as Fu } from "./index.DlSb-eu-.js";
|
|
3
3
|
import * as w from "react";
|
|
4
|
-
import Ze, { useSyncExternalStore as Xn, useCallback as
|
|
5
|
-
import { TableCellSortDirections as on, ChatContext as Le, useTheme as Ke, ButtonIcon as st, IconAddLight as Zu, IconCloseLight as Uu, IconEditLight as ju, Button as ri, IconLockedLight as Bu, IconUnlockedLight as
|
|
4
|
+
import Ze, { useSyncExternalStore as Xn, useCallback as J, useEffect as Z, useRef as W, useState as H, createContext as ei, useContext as de, useMemo as Ae, useId as ti, useLayoutEffect as _n, cloneElement as ni, Suspense as ir, lazy as ot, useReducer as Dn } from "react";
|
|
5
|
+
import { TableCellSortDirections as on, ChatContext as Le, useTheme as Ke, ButtonIcon as st, IconAddLight as Zu, IconCloseLight as Uu, IconEditLight as ju, Button as ri, IconLockedLight as Bu, IconUnlockedLight as Hu, IconNext as Vu, IconSelected as Wu, IconUnSelected as Gu, PromptsContext as Do, IconBookSparklesLight as Yu, IconRewrite as Ju, IconProofread as Ku, IconMagic as Xu, IconLightBulbLight as qu, IconSendLight as Qu, INPUT_PLACEHOLDER_TEXT_IN_SESSION as oi, INPUT_PLACEHOLDER_TEXT_MORNING as ed, INPUT_PLACEHOLDER_TEXT_TODAY as td, INPUT_PLACEHOLDER_TEXT_AFTERNOON as nd, INPUT_PLACEHOLDER_TEXT_EVENING as rd, INPUT_PLACEHOLDER_TEXT_NIGHT as od, INPUT_PLACEHOLDER_TEXT_DEFAULT as sd, IconClose as ad, AppContext as En, useUniqueId as id, CLIPBOARD_PROMPT as hs, FOOTER_DISCLAIMERS as gs, useResizeObserver as si, APP_SET_FOOTER_HEIGHT as cd, FOOTER_TOP as mo, FOOTER_BOTTOM as sn, APP_SET_FOOTER_POSITION as jr, IconOpenAI as ld, IconAnthropic as ud, IconGoogleGemini as dd, TOAST_PROVIDER_CHANGED as vs, LOG_OUT as ys, IconProfile as fd, IconSliders as pd, IconHistory as md, IconEditUser as hd, IconChart as gd, IconInfo as vd, IconBack as yd, IconSettings as bd, Logo as wd, appReducer as _d, APP_SET_OLED_MODE as Ed, APP_SET_FULL_SCREEN as Sd, APP_SET_THEME_MODE as Cd, APP_SET_THEME_PALETTE as xd, HistoryContext as Id, APP_CLASSNAME as Td, TOAST_CACHE_ENABLED as Ad, TOAST_CACHE_DISABLED as Rd } from "./LogoEntry.VAaujt4V.js";
|
|
6
6
|
import U, { clsx as dt } from "clsx";
|
|
7
7
|
import { useFloatingParentNodeId as Od, FloatingTree as Nd, useMergeRefs as Pd, FloatingNode as Md, FloatingPortal as kd, FloatingOverlay as Dd, FloatingFocusManager as $d, useFloatingNodeId as Ld, useFloating as zd, useClick as Fd, useDismiss as Zd, useRole as Ud, useInteractions as jd } from "@floating-ui/react";
|
|
8
8
|
import * as ai from "react-dom";
|
|
@@ -16,26 +16,26 @@ function ii(e, t) {
|
|
|
16
16
|
const bs = (e, t) => {
|
|
17
17
|
const n = JSON.stringify(typeof t == "function" ? t() : t);
|
|
18
18
|
window.localStorage.setItem(e, n), ii(e, n);
|
|
19
|
-
},
|
|
19
|
+
}, Hd = (e) => {
|
|
20
20
|
window.localStorage.removeItem(e), ii(e, null);
|
|
21
|
-
}, ws = (e) => window.localStorage.getItem(e),
|
|
21
|
+
}, ws = (e) => window.localStorage.getItem(e), Vd = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
22
22
|
function et({ key: e, initialValue: t }) {
|
|
23
|
-
const r = Xn(
|
|
23
|
+
const r = Xn(Vd, () => ws(e)), o = J((a) => {
|
|
24
24
|
try {
|
|
25
25
|
const c = typeof a == "function" ? a(JSON.parse(r)) : a;
|
|
26
|
-
c == null ?
|
|
26
|
+
c == null ? Hd(e) : bs(e, c);
|
|
27
27
|
} catch (c) {
|
|
28
28
|
console.warn(c);
|
|
29
29
|
}
|
|
30
30
|
}, [
|
|
31
31
|
e,
|
|
32
32
|
r
|
|
33
|
-
]), s =
|
|
33
|
+
]), s = J(() => {
|
|
34
34
|
o(t);
|
|
35
35
|
}, [
|
|
36
36
|
t,
|
|
37
37
|
o
|
|
38
|
-
]), i =
|
|
38
|
+
]), i = J(() => {
|
|
39
39
|
o(null);
|
|
40
40
|
}, [
|
|
41
41
|
o
|
|
@@ -61,11 +61,11 @@ const _0 = (e, t) => {
|
|
|
61
61
|
return (...r) => {
|
|
62
62
|
window.clearTimeout(n), n = window.setTimeout(() => e(...r), t);
|
|
63
63
|
};
|
|
64
|
-
},
|
|
64
|
+
}, Ht = () => window.innerWidth < 403, Wd = () => window.innerWidth >= 403 && window.innerWidth <= 1220, We = () => {
|
|
65
65
|
const e = [
|
|
66
66
|
"iPhone Simulator",
|
|
67
67
|
"iPhone"
|
|
68
|
-
].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), n =
|
|
68
|
+
].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), n = Ht(), r = navigator.maxTouchPoints > 1;
|
|
69
69
|
return e && t && n && r;
|
|
70
70
|
}, Gd = () => {
|
|
71
71
|
const e = [
|
|
@@ -136,7 +136,7 @@ Error message: ${ui(t)}`,
|
|
|
136
136
|
static isInstance(e) {
|
|
137
137
|
return ft.hasMarker(e, mi);
|
|
138
138
|
}
|
|
139
|
-
}, hi = "AI_TypeValidationError", gi = `vercel.ai.error.${hi}`, Qd = Symbol.for(gi), As, Rs,
|
|
139
|
+
}, hi = "AI_TypeValidationError", gi = `vercel.ai.error.${hi}`, Qd = Symbol.for(gi), As, Rs, Vt = class ho extends (Rs = ft, As = Qd, Rs) {
|
|
140
140
|
constructor({ value: t, cause: n }) {
|
|
141
141
|
super({
|
|
142
142
|
name: hi,
|
|
@@ -289,7 +289,7 @@ function Pt(e, t, n) {
|
|
|
289
289
|
const r = new e._zod.constr(t ?? e._zod.def);
|
|
290
290
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function P(e) {
|
|
293
293
|
const t = e;
|
|
294
294
|
if (!t)
|
|
295
295
|
return {};
|
|
@@ -546,7 +546,7 @@ function Ff(e) {
|
|
|
546
546
|
const Zf = (e) => {
|
|
547
547
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
548
548
|
return new RegExp(`^${t}$`);
|
|
549
|
-
}, Uf = /^\d+$/, jf = /^-?\d+(?:\.\d+)?/i, Bf = /true|false/i,
|
|
549
|
+
}, Uf = /^\d+$/, jf = /^-?\d+(?:\.\d+)?/i, Bf = /true|false/i, Hf = /null/i, Vf = /^[^A-Z]*$/, Wf = /^[^a-z]*$/, _e = /* @__PURE__ */ C("$ZodCheck", (e, t) => {
|
|
550
550
|
var n;
|
|
551
551
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
552
552
|
}), Ai = {
|
|
@@ -758,7 +758,7 @@ const Zf = (e) => {
|
|
|
758
758
|
});
|
|
759
759
|
};
|
|
760
760
|
}), Qf = /* @__PURE__ */ C("$ZodCheckLowerCase", (e, t) => {
|
|
761
|
-
t.pattern ?? (t.pattern =
|
|
761
|
+
t.pattern ?? (t.pattern = Vf), Sr.init(e, t);
|
|
762
762
|
}), ep = /* @__PURE__ */ C("$ZodCheckUpperCase", (e, t) => {
|
|
763
763
|
t.pattern ?? (t.pattern = Wf), Sr.init(e, t);
|
|
764
764
|
}), tp = /* @__PURE__ */ C("$ZodCheckIncludes", (e, t) => {
|
|
@@ -1147,7 +1147,7 @@ const Np = /* @__PURE__ */ C("$ZodJWT", (e, t) => {
|
|
|
1147
1147
|
}), n;
|
|
1148
1148
|
};
|
|
1149
1149
|
}), kp = /* @__PURE__ */ C("$ZodNull", (e, t) => {
|
|
1150
|
-
te.init(e, t), e._zod.pattern =
|
|
1150
|
+
te.init(e, t), e._zod.pattern = Hf, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (n, r) => {
|
|
1151
1151
|
const o = n.value;
|
|
1152
1152
|
return o === null || n.issues.push({
|
|
1153
1153
|
expected: "null",
|
|
@@ -1534,7 +1534,7 @@ const Up = /* @__PURE__ */ C("$ZodRecord", (e, t) => {
|
|
|
1534
1534
|
inst: e
|
|
1535
1535
|
}), n;
|
|
1536
1536
|
};
|
|
1537
|
-
}),
|
|
1537
|
+
}), Hp = /* @__PURE__ */ C("$ZodTransform", (e, t) => {
|
|
1538
1538
|
te.init(e, t), e._zod.parse = (n, r) => {
|
|
1539
1539
|
const o = t.transform(n.value, n);
|
|
1540
1540
|
if (r.async)
|
|
@@ -1543,7 +1543,7 @@ const Up = /* @__PURE__ */ C("$ZodRecord", (e, t) => {
|
|
|
1543
1543
|
throw new ln();
|
|
1544
1544
|
return n.value = o, n;
|
|
1545
1545
|
};
|
|
1546
|
-
}),
|
|
1546
|
+
}), Vp = /* @__PURE__ */ C("$ZodOptional", (e, t) => {
|
|
1547
1547
|
te.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", K(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), K(e._zod, "pattern", () => {
|
|
1548
1548
|
const n = t.innerType._zod.pattern;
|
|
1549
1549
|
return n ? new RegExp(`^(${zo(n.source)})?$`) : void 0;
|
|
@@ -1682,7 +1682,7 @@ const Qt = /* @__PURE__ */ tm();
|
|
|
1682
1682
|
function nm(e, t) {
|
|
1683
1683
|
return new e({
|
|
1684
1684
|
type: "string",
|
|
1685
|
-
...
|
|
1685
|
+
...P(t)
|
|
1686
1686
|
});
|
|
1687
1687
|
}
|
|
1688
1688
|
function rm(e, t) {
|
|
@@ -1691,7 +1691,7 @@ function rm(e, t) {
|
|
|
1691
1691
|
format: "email",
|
|
1692
1692
|
check: "string_format",
|
|
1693
1693
|
abort: !1,
|
|
1694
|
-
...
|
|
1694
|
+
...P(t)
|
|
1695
1695
|
});
|
|
1696
1696
|
}
|
|
1697
1697
|
function Zs(e, t) {
|
|
@@ -1700,7 +1700,7 @@ function Zs(e, t) {
|
|
|
1700
1700
|
format: "guid",
|
|
1701
1701
|
check: "string_format",
|
|
1702
1702
|
abort: !1,
|
|
1703
|
-
...
|
|
1703
|
+
...P(t)
|
|
1704
1704
|
});
|
|
1705
1705
|
}
|
|
1706
1706
|
function om(e, t) {
|
|
@@ -1709,7 +1709,7 @@ function om(e, t) {
|
|
|
1709
1709
|
format: "uuid",
|
|
1710
1710
|
check: "string_format",
|
|
1711
1711
|
abort: !1,
|
|
1712
|
-
...
|
|
1712
|
+
...P(t)
|
|
1713
1713
|
});
|
|
1714
1714
|
}
|
|
1715
1715
|
function sm(e, t) {
|
|
@@ -1719,7 +1719,7 @@ function sm(e, t) {
|
|
|
1719
1719
|
check: "string_format",
|
|
1720
1720
|
abort: !1,
|
|
1721
1721
|
version: "v4",
|
|
1722
|
-
...
|
|
1722
|
+
...P(t)
|
|
1723
1723
|
});
|
|
1724
1724
|
}
|
|
1725
1725
|
function am(e, t) {
|
|
@@ -1729,7 +1729,7 @@ function am(e, t) {
|
|
|
1729
1729
|
check: "string_format",
|
|
1730
1730
|
abort: !1,
|
|
1731
1731
|
version: "v6",
|
|
1732
|
-
...
|
|
1732
|
+
...P(t)
|
|
1733
1733
|
});
|
|
1734
1734
|
}
|
|
1735
1735
|
function im(e, t) {
|
|
@@ -1739,7 +1739,7 @@ function im(e, t) {
|
|
|
1739
1739
|
check: "string_format",
|
|
1740
1740
|
abort: !1,
|
|
1741
1741
|
version: "v7",
|
|
1742
|
-
...
|
|
1742
|
+
...P(t)
|
|
1743
1743
|
});
|
|
1744
1744
|
}
|
|
1745
1745
|
function cm(e, t) {
|
|
@@ -1748,7 +1748,7 @@ function cm(e, t) {
|
|
|
1748
1748
|
format: "url",
|
|
1749
1749
|
check: "string_format",
|
|
1750
1750
|
abort: !1,
|
|
1751
|
-
...
|
|
1751
|
+
...P(t)
|
|
1752
1752
|
});
|
|
1753
1753
|
}
|
|
1754
1754
|
function lm(e, t) {
|
|
@@ -1757,7 +1757,7 @@ function lm(e, t) {
|
|
|
1757
1757
|
format: "emoji",
|
|
1758
1758
|
check: "string_format",
|
|
1759
1759
|
abort: !1,
|
|
1760
|
-
...
|
|
1760
|
+
...P(t)
|
|
1761
1761
|
});
|
|
1762
1762
|
}
|
|
1763
1763
|
function um(e, t) {
|
|
@@ -1766,7 +1766,7 @@ function um(e, t) {
|
|
|
1766
1766
|
format: "nanoid",
|
|
1767
1767
|
check: "string_format",
|
|
1768
1768
|
abort: !1,
|
|
1769
|
-
...
|
|
1769
|
+
...P(t)
|
|
1770
1770
|
});
|
|
1771
1771
|
}
|
|
1772
1772
|
function dm(e, t) {
|
|
@@ -1775,7 +1775,7 @@ function dm(e, t) {
|
|
|
1775
1775
|
format: "cuid",
|
|
1776
1776
|
check: "string_format",
|
|
1777
1777
|
abort: !1,
|
|
1778
|
-
...
|
|
1778
|
+
...P(t)
|
|
1779
1779
|
});
|
|
1780
1780
|
}
|
|
1781
1781
|
function fm(e, t) {
|
|
@@ -1784,7 +1784,7 @@ function fm(e, t) {
|
|
|
1784
1784
|
format: "cuid2",
|
|
1785
1785
|
check: "string_format",
|
|
1786
1786
|
abort: !1,
|
|
1787
|
-
...
|
|
1787
|
+
...P(t)
|
|
1788
1788
|
});
|
|
1789
1789
|
}
|
|
1790
1790
|
function pm(e, t) {
|
|
@@ -1793,7 +1793,7 @@ function pm(e, t) {
|
|
|
1793
1793
|
format: "ulid",
|
|
1794
1794
|
check: "string_format",
|
|
1795
1795
|
abort: !1,
|
|
1796
|
-
...
|
|
1796
|
+
...P(t)
|
|
1797
1797
|
});
|
|
1798
1798
|
}
|
|
1799
1799
|
function mm(e, t) {
|
|
@@ -1802,7 +1802,7 @@ function mm(e, t) {
|
|
|
1802
1802
|
format: "xid",
|
|
1803
1803
|
check: "string_format",
|
|
1804
1804
|
abort: !1,
|
|
1805
|
-
...
|
|
1805
|
+
...P(t)
|
|
1806
1806
|
});
|
|
1807
1807
|
}
|
|
1808
1808
|
function hm(e, t) {
|
|
@@ -1811,7 +1811,7 @@ function hm(e, t) {
|
|
|
1811
1811
|
format: "ksuid",
|
|
1812
1812
|
check: "string_format",
|
|
1813
1813
|
abort: !1,
|
|
1814
|
-
...
|
|
1814
|
+
...P(t)
|
|
1815
1815
|
});
|
|
1816
1816
|
}
|
|
1817
1817
|
function gm(e, t) {
|
|
@@ -1820,7 +1820,7 @@ function gm(e, t) {
|
|
|
1820
1820
|
format: "ipv4",
|
|
1821
1821
|
check: "string_format",
|
|
1822
1822
|
abort: !1,
|
|
1823
|
-
...
|
|
1823
|
+
...P(t)
|
|
1824
1824
|
});
|
|
1825
1825
|
}
|
|
1826
1826
|
function vm(e, t) {
|
|
@@ -1829,7 +1829,7 @@ function vm(e, t) {
|
|
|
1829
1829
|
format: "ipv6",
|
|
1830
1830
|
check: "string_format",
|
|
1831
1831
|
abort: !1,
|
|
1832
|
-
...
|
|
1832
|
+
...P(t)
|
|
1833
1833
|
});
|
|
1834
1834
|
}
|
|
1835
1835
|
function ym(e, t) {
|
|
@@ -1838,7 +1838,7 @@ function ym(e, t) {
|
|
|
1838
1838
|
format: "cidrv4",
|
|
1839
1839
|
check: "string_format",
|
|
1840
1840
|
abort: !1,
|
|
1841
|
-
...
|
|
1841
|
+
...P(t)
|
|
1842
1842
|
});
|
|
1843
1843
|
}
|
|
1844
1844
|
function bm(e, t) {
|
|
@@ -1847,7 +1847,7 @@ function bm(e, t) {
|
|
|
1847
1847
|
format: "cidrv6",
|
|
1848
1848
|
check: "string_format",
|
|
1849
1849
|
abort: !1,
|
|
1850
|
-
...
|
|
1850
|
+
...P(t)
|
|
1851
1851
|
});
|
|
1852
1852
|
}
|
|
1853
1853
|
function wm(e, t) {
|
|
@@ -1856,7 +1856,7 @@ function wm(e, t) {
|
|
|
1856
1856
|
format: "base64",
|
|
1857
1857
|
check: "string_format",
|
|
1858
1858
|
abort: !1,
|
|
1859
|
-
...
|
|
1859
|
+
...P(t)
|
|
1860
1860
|
});
|
|
1861
1861
|
}
|
|
1862
1862
|
function _m(e, t) {
|
|
@@ -1865,7 +1865,7 @@ function _m(e, t) {
|
|
|
1865
1865
|
format: "base64url",
|
|
1866
1866
|
check: "string_format",
|
|
1867
1867
|
abort: !1,
|
|
1868
|
-
...
|
|
1868
|
+
...P(t)
|
|
1869
1869
|
});
|
|
1870
1870
|
}
|
|
1871
1871
|
function Em(e, t) {
|
|
@@ -1874,7 +1874,7 @@ function Em(e, t) {
|
|
|
1874
1874
|
format: "e164",
|
|
1875
1875
|
check: "string_format",
|
|
1876
1876
|
abort: !1,
|
|
1877
|
-
...
|
|
1877
|
+
...P(t)
|
|
1878
1878
|
});
|
|
1879
1879
|
}
|
|
1880
1880
|
function Sm(e, t) {
|
|
@@ -1883,7 +1883,7 @@ function Sm(e, t) {
|
|
|
1883
1883
|
format: "jwt",
|
|
1884
1884
|
check: "string_format",
|
|
1885
1885
|
abort: !1,
|
|
1886
|
-
...
|
|
1886
|
+
...P(t)
|
|
1887
1887
|
});
|
|
1888
1888
|
}
|
|
1889
1889
|
function Cm(e, t) {
|
|
@@ -1894,7 +1894,7 @@ function Cm(e, t) {
|
|
|
1894
1894
|
offset: !1,
|
|
1895
1895
|
local: !1,
|
|
1896
1896
|
precision: null,
|
|
1897
|
-
...
|
|
1897
|
+
...P(t)
|
|
1898
1898
|
});
|
|
1899
1899
|
}
|
|
1900
1900
|
function xm(e, t) {
|
|
@@ -1902,7 +1902,7 @@ function xm(e, t) {
|
|
|
1902
1902
|
type: "string",
|
|
1903
1903
|
format: "date",
|
|
1904
1904
|
check: "string_format",
|
|
1905
|
-
...
|
|
1905
|
+
...P(t)
|
|
1906
1906
|
});
|
|
1907
1907
|
}
|
|
1908
1908
|
function Im(e, t) {
|
|
@@ -1911,7 +1911,7 @@ function Im(e, t) {
|
|
|
1911
1911
|
format: "time",
|
|
1912
1912
|
check: "string_format",
|
|
1913
1913
|
precision: null,
|
|
1914
|
-
...
|
|
1914
|
+
...P(t)
|
|
1915
1915
|
});
|
|
1916
1916
|
}
|
|
1917
1917
|
function Tm(e, t) {
|
|
@@ -1919,14 +1919,14 @@ function Tm(e, t) {
|
|
|
1919
1919
|
type: "string",
|
|
1920
1920
|
format: "duration",
|
|
1921
1921
|
check: "string_format",
|
|
1922
|
-
...
|
|
1922
|
+
...P(t)
|
|
1923
1923
|
});
|
|
1924
1924
|
}
|
|
1925
1925
|
function Am(e, t) {
|
|
1926
1926
|
return new e({
|
|
1927
1927
|
type: "number",
|
|
1928
1928
|
checks: [],
|
|
1929
|
-
...
|
|
1929
|
+
...P(t)
|
|
1930
1930
|
});
|
|
1931
1931
|
}
|
|
1932
1932
|
function Rm(e, t) {
|
|
@@ -1935,19 +1935,19 @@ function Rm(e, t) {
|
|
|
1935
1935
|
check: "number_format",
|
|
1936
1936
|
abort: !1,
|
|
1937
1937
|
format: "safeint",
|
|
1938
|
-
...
|
|
1938
|
+
...P(t)
|
|
1939
1939
|
});
|
|
1940
1940
|
}
|
|
1941
1941
|
function Om(e, t) {
|
|
1942
1942
|
return new e({
|
|
1943
1943
|
type: "boolean",
|
|
1944
|
-
...
|
|
1944
|
+
...P(t)
|
|
1945
1945
|
});
|
|
1946
1946
|
}
|
|
1947
1947
|
function Nm(e, t) {
|
|
1948
1948
|
return new e({
|
|
1949
1949
|
type: "null",
|
|
1950
|
-
...
|
|
1950
|
+
...P(t)
|
|
1951
1951
|
});
|
|
1952
1952
|
}
|
|
1953
1953
|
function Pm(e) {
|
|
@@ -1958,13 +1958,13 @@ function Pm(e) {
|
|
|
1958
1958
|
function Mm(e, t) {
|
|
1959
1959
|
return new e({
|
|
1960
1960
|
type: "never",
|
|
1961
|
-
...
|
|
1961
|
+
...P(t)
|
|
1962
1962
|
});
|
|
1963
1963
|
}
|
|
1964
1964
|
function Us(e, t) {
|
|
1965
1965
|
return new Ri({
|
|
1966
1966
|
check: "less_than",
|
|
1967
|
-
...
|
|
1967
|
+
...P(t),
|
|
1968
1968
|
value: e,
|
|
1969
1969
|
inclusive: !1
|
|
1970
1970
|
});
|
|
@@ -1972,7 +1972,7 @@ function Us(e, t) {
|
|
|
1972
1972
|
function Br(e, t) {
|
|
1973
1973
|
return new Ri({
|
|
1974
1974
|
check: "less_than",
|
|
1975
|
-
...
|
|
1975
|
+
...P(t),
|
|
1976
1976
|
value: e,
|
|
1977
1977
|
inclusive: !0
|
|
1978
1978
|
});
|
|
@@ -1980,15 +1980,15 @@ function Br(e, t) {
|
|
|
1980
1980
|
function js(e, t) {
|
|
1981
1981
|
return new Oi({
|
|
1982
1982
|
check: "greater_than",
|
|
1983
|
-
...
|
|
1983
|
+
...P(t),
|
|
1984
1984
|
value: e,
|
|
1985
1985
|
inclusive: !1
|
|
1986
1986
|
});
|
|
1987
1987
|
}
|
|
1988
|
-
function
|
|
1988
|
+
function Hr(e, t) {
|
|
1989
1989
|
return new Oi({
|
|
1990
1990
|
check: "greater_than",
|
|
1991
|
-
...
|
|
1991
|
+
...P(t),
|
|
1992
1992
|
value: e,
|
|
1993
1993
|
inclusive: !0
|
|
1994
1994
|
});
|
|
@@ -1996,28 +1996,28 @@ function Vr(e, t) {
|
|
|
1996
1996
|
function Bs(e, t) {
|
|
1997
1997
|
return new Gf({
|
|
1998
1998
|
check: "multiple_of",
|
|
1999
|
-
...
|
|
1999
|
+
...P(t),
|
|
2000
2000
|
value: e
|
|
2001
2001
|
});
|
|
2002
2002
|
}
|
|
2003
2003
|
function Di(e, t) {
|
|
2004
2004
|
return new Jf({
|
|
2005
2005
|
check: "max_length",
|
|
2006
|
-
...
|
|
2006
|
+
...P(t),
|
|
2007
2007
|
maximum: e
|
|
2008
2008
|
});
|
|
2009
2009
|
}
|
|
2010
2010
|
function ur(e, t) {
|
|
2011
2011
|
return new Kf({
|
|
2012
2012
|
check: "min_length",
|
|
2013
|
-
...
|
|
2013
|
+
...P(t),
|
|
2014
2014
|
minimum: e
|
|
2015
2015
|
});
|
|
2016
2016
|
}
|
|
2017
2017
|
function $i(e, t) {
|
|
2018
2018
|
return new Xf({
|
|
2019
2019
|
check: "length_equals",
|
|
2020
|
-
...
|
|
2020
|
+
...P(t),
|
|
2021
2021
|
length: e
|
|
2022
2022
|
});
|
|
2023
2023
|
}
|
|
@@ -2025,7 +2025,7 @@ function km(e, t) {
|
|
|
2025
2025
|
return new qf({
|
|
2026
2026
|
check: "string_format",
|
|
2027
2027
|
format: "regex",
|
|
2028
|
-
...
|
|
2028
|
+
...P(t),
|
|
2029
2029
|
pattern: e
|
|
2030
2030
|
});
|
|
2031
2031
|
}
|
|
@@ -2033,21 +2033,21 @@ function Dm(e) {
|
|
|
2033
2033
|
return new Qf({
|
|
2034
2034
|
check: "string_format",
|
|
2035
2035
|
format: "lowercase",
|
|
2036
|
-
...
|
|
2036
|
+
...P(e)
|
|
2037
2037
|
});
|
|
2038
2038
|
}
|
|
2039
2039
|
function $m(e) {
|
|
2040
2040
|
return new ep({
|
|
2041
2041
|
check: "string_format",
|
|
2042
2042
|
format: "uppercase",
|
|
2043
|
-
...
|
|
2043
|
+
...P(e)
|
|
2044
2044
|
});
|
|
2045
2045
|
}
|
|
2046
2046
|
function Lm(e, t) {
|
|
2047
2047
|
return new tp({
|
|
2048
2048
|
check: "string_format",
|
|
2049
2049
|
format: "includes",
|
|
2050
|
-
...
|
|
2050
|
+
...P(t),
|
|
2051
2051
|
includes: e
|
|
2052
2052
|
});
|
|
2053
2053
|
}
|
|
@@ -2055,7 +2055,7 @@ function zm(e, t) {
|
|
|
2055
2055
|
return new np({
|
|
2056
2056
|
check: "string_format",
|
|
2057
2057
|
format: "starts_with",
|
|
2058
|
-
...
|
|
2058
|
+
...P(t),
|
|
2059
2059
|
prefix: e
|
|
2060
2060
|
});
|
|
2061
2061
|
}
|
|
@@ -2063,7 +2063,7 @@ function Fm(e, t) {
|
|
|
2063
2063
|
return new rp({
|
|
2064
2064
|
check: "string_format",
|
|
2065
2065
|
format: "ends_with",
|
|
2066
|
-
...
|
|
2066
|
+
...P(t),
|
|
2067
2067
|
suffix: e
|
|
2068
2068
|
});
|
|
2069
2069
|
}
|
|
@@ -2085,18 +2085,18 @@ function jm() {
|
|
|
2085
2085
|
function Bm() {
|
|
2086
2086
|
return Cn((e) => e.toUpperCase());
|
|
2087
2087
|
}
|
|
2088
|
-
function
|
|
2088
|
+
function Hm(e, t, n) {
|
|
2089
2089
|
return new e({
|
|
2090
2090
|
type: "array",
|
|
2091
2091
|
element: t,
|
|
2092
2092
|
// get element() {
|
|
2093
2093
|
// return element;
|
|
2094
2094
|
// },
|
|
2095
|
-
...
|
|
2095
|
+
...P(n)
|
|
2096
2096
|
});
|
|
2097
2097
|
}
|
|
2098
|
-
function
|
|
2099
|
-
const r =
|
|
2098
|
+
function Vm(e, t, n) {
|
|
2099
|
+
const r = P(n);
|
|
2100
2100
|
return r.abort ?? (r.abort = !0), new e({
|
|
2101
2101
|
type: "custom",
|
|
2102
2102
|
check: "custom",
|
|
@@ -2109,10 +2109,10 @@ function Wm(e, t, n) {
|
|
|
2109
2109
|
type: "custom",
|
|
2110
2110
|
check: "custom",
|
|
2111
2111
|
fn: t,
|
|
2112
|
-
...
|
|
2112
|
+
...P(n)
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
2115
|
-
class
|
|
2115
|
+
class Hs {
|
|
2116
2116
|
constructor(t) {
|
|
2117
2117
|
this.counter = 0, this.metadataRegistry = t?.metadata ?? Qt, this.target = t?.target ?? "draft-2020-12", this.unrepresentable = t?.unrepresentable ?? "throw", this.override = t?.override ?? (() => {
|
|
2118
2118
|
}), this.io = t?.io ?? "output", this.seen = /* @__PURE__ */ new Map();
|
|
@@ -2515,7 +2515,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2515
2515
|
}
|
|
2516
2516
|
function Gm(e, t) {
|
|
2517
2517
|
if (e instanceof ki) {
|
|
2518
|
-
const r = new
|
|
2518
|
+
const r = new Hs(t), o = {};
|
|
2519
2519
|
for (const a of e._idmap.entries()) {
|
|
2520
2520
|
const [c, l] = a;
|
|
2521
2521
|
r.process(l);
|
|
@@ -2540,7 +2540,7 @@ function Gm(e, t) {
|
|
|
2540
2540
|
}
|
|
2541
2541
|
return { schemas: s };
|
|
2542
2542
|
}
|
|
2543
|
-
const n = new
|
|
2543
|
+
const n = new Hs(t);
|
|
2544
2544
|
return n.process(e), n.emit(e, t);
|
|
2545
2545
|
}
|
|
2546
2546
|
function le(e, t) {
|
|
@@ -2682,7 +2682,7 @@ const nh = (e, t) => {
|
|
|
2682
2682
|
]
|
|
2683
2683
|
}
|
|
2684
2684
|
// { parent: true }
|
|
2685
|
-
), e.clone = (n, r) => Pt(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => rh(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => sh(e, n, r), e.parseAsync = async (n, r) => oh(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Li(e, n, r), e.spa = e.safeParseAsync, e.refine = (n, r) => e.check(eg(n, r)), e.superRefine = (n) => e.check(tg(n)), e.overwrite = (n) => e.check(Cn(n)), e.optional = () => Gs(e), e.nullable = () => Ys(e), e.nullish = () => Gs(Ys(e)), e.nonoptional = (n) =>
|
|
2685
|
+
), e.clone = (n, r) => Pt(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => rh(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => sh(e, n, r), e.parseAsync = async (n, r) => oh(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Li(e, n, r), e.spa = e.safeParseAsync, e.refine = (n, r) => e.check(eg(n, r)), e.superRefine = (n) => e.check(tg(n)), e.overwrite = (n) => e.check(Cn(n)), e.optional = () => Gs(e), e.nullable = () => Ys(e), e.nullish = () => Gs(Ys(e)), e.nonoptional = (n) => Vh(e, n), e.array = () => Yt(e), e.or = (n) => ye([e, n]), e.and = (n) => Dh(e, n), e.transform = (n) => Js(e, Fh(n)), e.default = (n) => jh(e, n), e.prefault = (n) => Hh(e, n), e.catch = (n) => Gh(e, n), e.pipe = (n) => Js(e, n), e.readonly = () => Kh(e), e.describe = (n) => {
|
|
2686
2686
|
const r = e.clone();
|
|
2687
2687
|
return Qt.add(r, { description: n }), r;
|
|
2688
2688
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2700,7 +2700,7 @@ const nh = (e, t) => {
|
|
|
2700
2700
|
const n = e._zod.bag;
|
|
2701
2701
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(km(...r)), e.includes = (...r) => e.check(Lm(...r)), e.startsWith = (...r) => e.check(zm(...r)), e.endsWith = (...r) => e.check(Fm(...r)), e.min = (...r) => e.check(ur(...r)), e.max = (...r) => e.check(Di(...r)), e.length = (...r) => e.check($i(...r)), e.nonempty = (...r) => e.check(ur(1, ...r)), e.lowercase = (r) => e.check(Dm(r)), e.uppercase = (r) => e.check($m(r)), e.trim = () => e.check(Um()), e.normalize = (...r) => e.check(Zm(...r)), e.toLowerCase = () => e.check(jm()), e.toUpperCase = () => e.check(Bm());
|
|
2702
2702
|
}), ah = /* @__PURE__ */ C("ZodString", (e, t) => {
|
|
2703
|
-
Zo.init(e, t), zi.init(e, t), e.email = (n) => e.check(rm(ih, n)), e.url = (n) => e.check(cm(ch, n)), e.jwt = (n) => e.check(Sm(Sh, n)), e.emoji = (n) => e.check(lm(lh, n)), e.guid = (n) => e.check(Zs(
|
|
2703
|
+
Zo.init(e, t), zi.init(e, t), e.email = (n) => e.check(rm(ih, n)), e.url = (n) => e.check(cm(ch, n)), e.jwt = (n) => e.check(Sm(Sh, n)), e.emoji = (n) => e.check(lm(lh, n)), e.guid = (n) => e.check(Zs(Vs, n)), e.uuid = (n) => e.check(om(zn, n)), e.uuidv4 = (n) => e.check(sm(zn, n)), e.uuidv6 = (n) => e.check(am(zn, n)), e.uuidv7 = (n) => e.check(im(zn, n)), e.nanoid = (n) => e.check(um(uh, n)), e.guid = (n) => e.check(Zs(Vs, n)), e.cuid = (n) => e.check(dm(dh, n)), e.cuid2 = (n) => e.check(fm(fh, n)), e.ulid = (n) => e.check(pm(ph, n)), e.base64 = (n) => e.check(wm(wh, n)), e.base64url = (n) => e.check(_m(_h, n)), e.xid = (n) => e.check(mm(mh, n)), e.ksuid = (n) => e.check(hm(hh, n)), e.ipv4 = (n) => e.check(gm(gh, n)), e.ipv6 = (n) => e.check(vm(vh, n)), e.cidrv4 = (n) => e.check(ym(yh, n)), e.cidrv6 = (n) => e.check(bm(bh, n)), e.e164 = (n) => e.check(Em(Eh, n)), e.datetime = (n) => e.check(Jm(n)), e.date = (n) => e.check(Xm(n)), e.time = (n) => e.check(Qm(n)), e.duration = (n) => e.check(th(n));
|
|
2704
2704
|
});
|
|
2705
2705
|
function A(e) {
|
|
2706
2706
|
return nm(ah, e);
|
|
@@ -2709,7 +2709,7 @@ const ae = /* @__PURE__ */ C("ZodStringFormat", (e, t) => {
|
|
|
2709
2709
|
oe.init(e, t), zi.init(e, t);
|
|
2710
2710
|
}), ih = /* @__PURE__ */ C("ZodEmail", (e, t) => {
|
|
2711
2711
|
lp.init(e, t), ae.init(e, t);
|
|
2712
|
-
}),
|
|
2712
|
+
}), Vs = /* @__PURE__ */ C("ZodGUID", (e, t) => {
|
|
2713
2713
|
ip.init(e, t), ae.init(e, t);
|
|
2714
2714
|
}), zn = /* @__PURE__ */ C("ZodUUID", (e, t) => {
|
|
2715
2715
|
cp.init(e, t), ae.init(e, t);
|
|
@@ -2746,7 +2746,7 @@ const ae = /* @__PURE__ */ C("ZodStringFormat", (e, t) => {
|
|
|
2746
2746
|
}), Sh = /* @__PURE__ */ C("ZodJWT", (e, t) => {
|
|
2747
2747
|
Np.init(e, t), ae.init(e, t);
|
|
2748
2748
|
}), Fi = /* @__PURE__ */ C("ZodNumber", (e, t) => {
|
|
2749
|
-
Pi.init(e, t), se.init(e, t), e.gt = (r, o) => e.check(js(r, o)), e.gte = (r, o) => e.check(
|
|
2749
|
+
Pi.init(e, t), se.init(e, t), e.gt = (r, o) => e.check(js(r, o)), e.gte = (r, o) => e.check(Hr(r, o)), e.min = (r, o) => e.check(Hr(r, o)), e.lt = (r, o) => e.check(Us(r, o)), e.lte = (r, o) => e.check(Br(r, o)), e.max = (r, o) => e.check(Br(r, o)), e.int = (r) => e.check(Ws(r)), e.safe = (r) => e.check(Ws(r)), e.positive = (r) => e.check(js(0, r)), e.nonnegative = (r) => e.check(Hr(0, r)), e.negative = (r) => e.check(Us(0, r)), e.nonpositive = (r) => e.check(Br(0, r)), e.multipleOf = (r, o) => e.check(Bs(r, o)), e.step = (r, o) => e.check(Bs(r, o)), e.finite = () => e;
|
|
2750
2750
|
const n = e._zod.bag;
|
|
2751
2751
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
2752
2752
|
});
|
|
@@ -2787,10 +2787,10 @@ const Nh = /* @__PURE__ */ C("ZodArray", (e, t) => {
|
|
|
2787
2787
|
Lp.init(e, t), se.init(e, t), e.element = t.element, e.min = (n, r) => e.check(ur(n, r)), e.nonempty = (n) => e.check(ur(1, n)), e.max = (n, r) => e.check(Di(n, r)), e.length = (n, r) => e.check($i(n, r)), e.unwrap = () => e.element;
|
|
2788
2788
|
});
|
|
2789
2789
|
function Yt(e, t) {
|
|
2790
|
-
return
|
|
2790
|
+
return Hm(Nh, e, t);
|
|
2791
2791
|
}
|
|
2792
2792
|
const Ui = /* @__PURE__ */ C("ZodObject", (e, t) => {
|
|
2793
|
-
zp.init(e, t), se.init(e, t), K(e, "shape", () => t.shape), e.keyof = () => Bi(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ue() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ue() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Zi() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => lf(e, n), e.merge = (n) => uf(e, n), e.pick = (n) => af(e, n), e.omit = (n) => cf(e, n), e.partial = (...n) => df(
|
|
2793
|
+
zp.init(e, t), se.init(e, t), K(e, "shape", () => t.shape), e.keyof = () => Bi(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ue() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ue() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Zi() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => lf(e, n), e.merge = (n) => uf(e, n), e.pick = (n) => af(e, n), e.omit = (n) => cf(e, n), e.partial = (...n) => df(Hi, e, n[0]), e.required = (...n) => ff(Vi, e, n[0]);
|
|
2794
2794
|
});
|
|
2795
2795
|
function ee(e, t) {
|
|
2796
2796
|
const n = {
|
|
@@ -2798,7 +2798,7 @@ function ee(e, t) {
|
|
|
2798
2798
|
get shape() {
|
|
2799
2799
|
return Er(this, "shape", { ...e }), this.shape;
|
|
2800
2800
|
},
|
|
2801
|
-
...
|
|
2801
|
+
...P(t)
|
|
2802
2802
|
};
|
|
2803
2803
|
return new Ui(n);
|
|
2804
2804
|
}
|
|
@@ -2809,7 +2809,7 @@ function ne(e, t) {
|
|
|
2809
2809
|
return Er(this, "shape", { ...e }), this.shape;
|
|
2810
2810
|
},
|
|
2811
2811
|
catchall: Zi(),
|
|
2812
|
-
...
|
|
2812
|
+
...P(t)
|
|
2813
2813
|
});
|
|
2814
2814
|
}
|
|
2815
2815
|
const ji = /* @__PURE__ */ C("ZodUnion", (e, t) => {
|
|
@@ -2819,7 +2819,7 @@ function ye(e, t) {
|
|
|
2819
2819
|
return new ji({
|
|
2820
2820
|
type: "union",
|
|
2821
2821
|
options: e,
|
|
2822
|
-
...
|
|
2822
|
+
...P(t)
|
|
2823
2823
|
});
|
|
2824
2824
|
}
|
|
2825
2825
|
const Ph = /* @__PURE__ */ C("ZodDiscriminatedUnion", (e, t) => {
|
|
@@ -2830,7 +2830,7 @@ function Mh(e, t, n) {
|
|
|
2830
2830
|
type: "union",
|
|
2831
2831
|
options: t,
|
|
2832
2832
|
discriminator: e,
|
|
2833
|
-
...
|
|
2833
|
+
...P(n)
|
|
2834
2834
|
});
|
|
2835
2835
|
}
|
|
2836
2836
|
const kh = /* @__PURE__ */ C("ZodIntersection", (e, t) => {
|
|
@@ -2851,7 +2851,7 @@ function dn(e, t, n) {
|
|
|
2851
2851
|
type: "record",
|
|
2852
2852
|
keyType: e,
|
|
2853
2853
|
valueType: t,
|
|
2854
|
-
...
|
|
2854
|
+
...P(n)
|
|
2855
2855
|
});
|
|
2856
2856
|
}
|
|
2857
2857
|
const vo = /* @__PURE__ */ C("ZodEnum", (e, t) => {
|
|
@@ -2867,7 +2867,7 @@ const vo = /* @__PURE__ */ C("ZodEnum", (e, t) => {
|
|
|
2867
2867
|
return new vo({
|
|
2868
2868
|
...t,
|
|
2869
2869
|
checks: [],
|
|
2870
|
-
...
|
|
2870
|
+
...P(o),
|
|
2871
2871
|
entries: s
|
|
2872
2872
|
});
|
|
2873
2873
|
}, e.exclude = (r, o) => {
|
|
@@ -2880,7 +2880,7 @@ const vo = /* @__PURE__ */ C("ZodEnum", (e, t) => {
|
|
|
2880
2880
|
return new vo({
|
|
2881
2881
|
...t,
|
|
2882
2882
|
checks: [],
|
|
2883
|
-
...
|
|
2883
|
+
...P(o),
|
|
2884
2884
|
entries: s
|
|
2885
2885
|
});
|
|
2886
2886
|
};
|
|
@@ -2890,7 +2890,7 @@ function Bi(e, t) {
|
|
|
2890
2890
|
return new vo({
|
|
2891
2891
|
type: "enum",
|
|
2892
2892
|
entries: n,
|
|
2893
|
-
...
|
|
2893
|
+
...P(t)
|
|
2894
2894
|
});
|
|
2895
2895
|
}
|
|
2896
2896
|
const Lh = /* @__PURE__ */ C("ZodLiteral", (e, t) => {
|
|
@@ -2902,15 +2902,15 @@ const Lh = /* @__PURE__ */ C("ZodLiteral", (e, t) => {
|
|
|
2902
2902
|
}
|
|
2903
2903
|
});
|
|
2904
2904
|
});
|
|
2905
|
-
function
|
|
2905
|
+
function $(e, t) {
|
|
2906
2906
|
return new Lh({
|
|
2907
2907
|
type: "literal",
|
|
2908
2908
|
values: Array.isArray(e) ? e : [e],
|
|
2909
|
-
...
|
|
2909
|
+
...P(t)
|
|
2910
2910
|
});
|
|
2911
2911
|
}
|
|
2912
2912
|
const zh = /* @__PURE__ */ C("ZodTransform", (e, t) => {
|
|
2913
|
-
|
|
2913
|
+
Hp.init(e, t), se.init(e, t), e._zod.parse = (n, r) => {
|
|
2914
2914
|
n.addIssue = (s) => {
|
|
2915
2915
|
if (typeof s == "string")
|
|
2916
2916
|
n.issues.push(un(s, n.value, t));
|
|
@@ -2929,11 +2929,11 @@ function Fh(e) {
|
|
|
2929
2929
|
transform: e
|
|
2930
2930
|
});
|
|
2931
2931
|
}
|
|
2932
|
-
const
|
|
2933
|
-
|
|
2932
|
+
const Hi = /* @__PURE__ */ C("ZodOptional", (e, t) => {
|
|
2933
|
+
Vp.init(e, t), se.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2934
2934
|
});
|
|
2935
2935
|
function Gs(e) {
|
|
2936
|
-
return new
|
|
2936
|
+
return new Hi({
|
|
2937
2937
|
type: "optional",
|
|
2938
2938
|
innerType: e
|
|
2939
2939
|
});
|
|
@@ -2962,7 +2962,7 @@ function jh(e, t) {
|
|
|
2962
2962
|
const Bh = /* @__PURE__ */ C("ZodPrefault", (e, t) => {
|
|
2963
2963
|
Yp.init(e, t), se.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2964
2964
|
});
|
|
2965
|
-
function
|
|
2965
|
+
function Hh(e, t) {
|
|
2966
2966
|
return new Bh({
|
|
2967
2967
|
type: "prefault",
|
|
2968
2968
|
innerType: e,
|
|
@@ -2971,14 +2971,14 @@ function Vh(e, t) {
|
|
|
2971
2971
|
}
|
|
2972
2972
|
});
|
|
2973
2973
|
}
|
|
2974
|
-
const
|
|
2974
|
+
const Vi = /* @__PURE__ */ C("ZodNonOptional", (e, t) => {
|
|
2975
2975
|
Jp.init(e, t), se.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2976
2976
|
});
|
|
2977
|
-
function
|
|
2978
|
-
return new
|
|
2977
|
+
function Vh(e, t) {
|
|
2978
|
+
return new Vi({
|
|
2979
2979
|
type: "nonoptional",
|
|
2980
2980
|
innerType: e,
|
|
2981
|
-
...
|
|
2981
|
+
...P(t)
|
|
2982
2982
|
});
|
|
2983
2983
|
}
|
|
2984
2984
|
const Wh = /* @__PURE__ */ C("ZodCatch", (e, t) => {
|
|
@@ -3031,7 +3031,7 @@ function Qh(e) {
|
|
|
3031
3031
|
return t._zod.check = e, t;
|
|
3032
3032
|
}
|
|
3033
3033
|
function Wi(e, t) {
|
|
3034
|
-
return
|
|
3034
|
+
return Vm(Uo, e ?? (() => !0), t);
|
|
3035
3035
|
}
|
|
3036
3036
|
function eg(e, t = {}) {
|
|
3037
3037
|
return Wm(Uo, e, t);
|
|
@@ -3055,7 +3055,7 @@ function dr(e, t = {
|
|
|
3055
3055
|
check: "custom",
|
|
3056
3056
|
fn: (r) => r instanceof e,
|
|
3057
3057
|
abort: !0,
|
|
3058
|
-
...
|
|
3058
|
+
...P(t)
|
|
3059
3059
|
});
|
|
3060
3060
|
return n._zod.bag.Class = e, n;
|
|
3061
3061
|
}
|
|
@@ -3068,14 +3068,14 @@ class Ks extends Error {
|
|
|
3068
3068
|
super(t), this.name = "ParseError", this.type = n.type, this.field = n.field, this.value = n.value, this.line = n.line;
|
|
3069
3069
|
}
|
|
3070
3070
|
}
|
|
3071
|
-
function
|
|
3071
|
+
function Vr(e) {
|
|
3072
3072
|
}
|
|
3073
3073
|
function ng(e) {
|
|
3074
3074
|
if (typeof e == "function")
|
|
3075
3075
|
throw new TypeError(
|
|
3076
3076
|
"`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
|
|
3077
3077
|
);
|
|
3078
|
-
const { onEvent: t =
|
|
3078
|
+
const { onEvent: t = Vr, onError: n = Vr, onRetry: r = Vr, onComment: o } = e;
|
|
3079
3079
|
let s = "", i = !0, a, c = "", l = "";
|
|
3080
3080
|
function d(f) {
|
|
3081
3081
|
const y = i ? f.replace(/^\xEF\xBB\xBF/, "") : f, [b, _] = rg(`${s}${y}`);
|
|
@@ -3995,7 +3995,7 @@ function Ug() {
|
|
|
3995
3995
|
function jg() {
|
|
3996
3996
|
return xe();
|
|
3997
3997
|
}
|
|
3998
|
-
var Bg = (e, t) => X(e.innerType._def, t),
|
|
3998
|
+
var Bg = (e, t) => X(e.innerType._def, t), Hg = (e, t, n) => {
|
|
3999
3999
|
switch (t) {
|
|
4000
4000
|
case F.ZodString:
|
|
4001
4001
|
return Ji(e, n);
|
|
@@ -4069,7 +4069,7 @@ var Bg = (e, t) => X(e.innerType._def, t), Vg = (e, t, n) => {
|
|
|
4069
4069
|
return /* @__PURE__ */ ((r) => {
|
|
4070
4070
|
})();
|
|
4071
4071
|
}
|
|
4072
|
-
},
|
|
4072
|
+
}, Vg = (e, t) => {
|
|
4073
4073
|
let n = 0;
|
|
4074
4074
|
for (; n < e.length && n < t.length && e[n] === t[n]; n++)
|
|
4075
4075
|
;
|
|
@@ -4096,7 +4096,7 @@ function X(e, t, n = !1) {
|
|
|
4096
4096
|
}
|
|
4097
4097
|
const s = { def: e, path: t.currentPath, jsonSchema: void 0 };
|
|
4098
4098
|
t.seen.set(e, s);
|
|
4099
|
-
const i =
|
|
4099
|
+
const i = Hg(e, e.typeName, t), a = typeof i == "function" ? X(i(), t) : i;
|
|
4100
4100
|
if (a && Gg(e, t, a), t.postProcess) {
|
|
4101
4101
|
const c = t.postProcess(a, e, t);
|
|
4102
4102
|
return s.jsonSchema = a, c;
|
|
@@ -4108,7 +4108,7 @@ var Wg = (e, t) => {
|
|
|
4108
4108
|
case "root":
|
|
4109
4109
|
return { $ref: e.path.join("/") };
|
|
4110
4110
|
case "relative":
|
|
4111
|
-
return { $ref:
|
|
4111
|
+
return { $ref: Vg(t.currentPath, e.path) };
|
|
4112
4112
|
case "none":
|
|
4113
4113
|
case "seen":
|
|
4114
4114
|
return e.path.length < t.currentPath.length && e.path.every((n, r) => t.currentPath[r] === n) ? (console.warn(
|
|
@@ -4213,7 +4213,7 @@ function qg(e) {
|
|
|
4213
4213
|
const n = await e["~standard"].validate(t);
|
|
4214
4214
|
return "value" in n ? { success: !0, value: n.value } : {
|
|
4215
4215
|
success: !1,
|
|
4216
|
-
error: new
|
|
4216
|
+
error: new Vt({
|
|
4217
4217
|
value: t,
|
|
4218
4218
|
cause: n.issues
|
|
4219
4219
|
})
|
|
@@ -4270,7 +4270,7 @@ async function na({
|
|
|
4270
4270
|
}) {
|
|
4271
4271
|
const n = await fn({ value: e, schema: t });
|
|
4272
4272
|
if (!n.success)
|
|
4273
|
-
throw
|
|
4273
|
+
throw Vt.wrap({ value: e, cause: n.error });
|
|
4274
4274
|
return n.value;
|
|
4275
4275
|
}
|
|
4276
4276
|
async function fn({
|
|
@@ -4284,13 +4284,13 @@ async function fn({
|
|
|
4284
4284
|
const r = await n.validate(e);
|
|
4285
4285
|
return r.success ? { success: !0, value: r.value, rawValue: e } : {
|
|
4286
4286
|
success: !1,
|
|
4287
|
-
error:
|
|
4287
|
+
error: Vt.wrap({ value: e, cause: r.error }),
|
|
4288
4288
|
rawValue: e
|
|
4289
4289
|
};
|
|
4290
4290
|
} catch (r) {
|
|
4291
4291
|
return {
|
|
4292
4292
|
success: !1,
|
|
4293
|
-
error:
|
|
4293
|
+
error: Vt.wrap({ value: e, cause: r }),
|
|
4294
4294
|
rawValue: e
|
|
4295
4295
|
};
|
|
4296
4296
|
}
|
|
@@ -4368,148 +4368,148 @@ var ra = "6.0.3", tc = ye([
|
|
|
4368
4368
|
dn(A(), pn.optional()),
|
|
4369
4369
|
Yt(pn)
|
|
4370
4370
|
])
|
|
4371
|
-
),
|
|
4371
|
+
), V = dn(
|
|
4372
4372
|
A(),
|
|
4373
4373
|
dn(A(), pn.optional())
|
|
4374
4374
|
), nc = ee({
|
|
4375
|
-
type:
|
|
4375
|
+
type: $("text"),
|
|
4376
4376
|
text: A(),
|
|
4377
|
-
providerOptions:
|
|
4377
|
+
providerOptions: V.optional()
|
|
4378
4378
|
}), iv = ee({
|
|
4379
|
-
type:
|
|
4379
|
+
type: $("image"),
|
|
4380
4380
|
image: ye([tc, dr(URL)]),
|
|
4381
4381
|
mediaType: A().optional(),
|
|
4382
|
-
providerOptions:
|
|
4382
|
+
providerOptions: V.optional()
|
|
4383
4383
|
}), rc = ee({
|
|
4384
|
-
type:
|
|
4384
|
+
type: $("file"),
|
|
4385
4385
|
data: ye([tc, dr(URL)]),
|
|
4386
4386
|
filename: A().optional(),
|
|
4387
4387
|
mediaType: A(),
|
|
4388
|
-
providerOptions:
|
|
4388
|
+
providerOptions: V.optional()
|
|
4389
4389
|
}), cv = ee({
|
|
4390
|
-
type:
|
|
4390
|
+
type: $("reasoning"),
|
|
4391
4391
|
text: A(),
|
|
4392
|
-
providerOptions:
|
|
4392
|
+
providerOptions: V.optional()
|
|
4393
4393
|
}), lv = ee({
|
|
4394
|
-
type:
|
|
4394
|
+
type: $("tool-call"),
|
|
4395
4395
|
toolCallId: A(),
|
|
4396
4396
|
toolName: A(),
|
|
4397
4397
|
input: Ue(),
|
|
4398
|
-
providerOptions:
|
|
4398
|
+
providerOptions: V.optional(),
|
|
4399
4399
|
providerExecuted: ve().optional()
|
|
4400
4400
|
}), uv = Mh(
|
|
4401
4401
|
"type",
|
|
4402
4402
|
[
|
|
4403
4403
|
ee({
|
|
4404
|
-
type:
|
|
4404
|
+
type: $("text"),
|
|
4405
4405
|
value: A(),
|
|
4406
|
-
providerOptions:
|
|
4406
|
+
providerOptions: V.optional()
|
|
4407
4407
|
}),
|
|
4408
4408
|
ee({
|
|
4409
|
-
type:
|
|
4409
|
+
type: $("json"),
|
|
4410
4410
|
value: pn,
|
|
4411
|
-
providerOptions:
|
|
4411
|
+
providerOptions: V.optional()
|
|
4412
4412
|
}),
|
|
4413
4413
|
ee({
|
|
4414
|
-
type:
|
|
4414
|
+
type: $("execution-denied"),
|
|
4415
4415
|
reason: A().optional(),
|
|
4416
|
-
providerOptions:
|
|
4416
|
+
providerOptions: V.optional()
|
|
4417
4417
|
}),
|
|
4418
4418
|
ee({
|
|
4419
|
-
type:
|
|
4419
|
+
type: $("error-text"),
|
|
4420
4420
|
value: A(),
|
|
4421
|
-
providerOptions:
|
|
4421
|
+
providerOptions: V.optional()
|
|
4422
4422
|
}),
|
|
4423
4423
|
ee({
|
|
4424
|
-
type:
|
|
4424
|
+
type: $("error-json"),
|
|
4425
4425
|
value: pn,
|
|
4426
|
-
providerOptions:
|
|
4426
|
+
providerOptions: V.optional()
|
|
4427
4427
|
}),
|
|
4428
4428
|
ee({
|
|
4429
|
-
type:
|
|
4429
|
+
type: $("content"),
|
|
4430
4430
|
value: Yt(
|
|
4431
4431
|
ye([
|
|
4432
4432
|
ee({
|
|
4433
|
-
type:
|
|
4433
|
+
type: $("text"),
|
|
4434
4434
|
text: A(),
|
|
4435
|
-
providerOptions:
|
|
4435
|
+
providerOptions: V.optional()
|
|
4436
4436
|
}),
|
|
4437
4437
|
ee({
|
|
4438
|
-
type:
|
|
4438
|
+
type: $("media"),
|
|
4439
4439
|
data: A(),
|
|
4440
4440
|
mediaType: A()
|
|
4441
4441
|
}),
|
|
4442
4442
|
ee({
|
|
4443
|
-
type:
|
|
4443
|
+
type: $("file-data"),
|
|
4444
4444
|
data: A(),
|
|
4445
4445
|
mediaType: A(),
|
|
4446
4446
|
filename: A().optional(),
|
|
4447
|
-
providerOptions:
|
|
4447
|
+
providerOptions: V.optional()
|
|
4448
4448
|
}),
|
|
4449
4449
|
ee({
|
|
4450
|
-
type:
|
|
4450
|
+
type: $("file-url"),
|
|
4451
4451
|
url: A(),
|
|
4452
|
-
providerOptions:
|
|
4452
|
+
providerOptions: V.optional()
|
|
4453
4453
|
}),
|
|
4454
4454
|
ee({
|
|
4455
|
-
type:
|
|
4455
|
+
type: $("file-id"),
|
|
4456
4456
|
fileId: ye([A(), dn(A(), A())]),
|
|
4457
|
-
providerOptions:
|
|
4457
|
+
providerOptions: V.optional()
|
|
4458
4458
|
}),
|
|
4459
4459
|
ee({
|
|
4460
|
-
type:
|
|
4460
|
+
type: $("image-data"),
|
|
4461
4461
|
data: A(),
|
|
4462
4462
|
mediaType: A(),
|
|
4463
|
-
providerOptions:
|
|
4463
|
+
providerOptions: V.optional()
|
|
4464
4464
|
}),
|
|
4465
4465
|
ee({
|
|
4466
|
-
type:
|
|
4466
|
+
type: $("image-url"),
|
|
4467
4467
|
url: A(),
|
|
4468
|
-
providerOptions:
|
|
4468
|
+
providerOptions: V.optional()
|
|
4469
4469
|
}),
|
|
4470
4470
|
ee({
|
|
4471
|
-
type:
|
|
4471
|
+
type: $("image-file-id"),
|
|
4472
4472
|
fileId: ye([A(), dn(A(), A())]),
|
|
4473
|
-
providerOptions:
|
|
4473
|
+
providerOptions: V.optional()
|
|
4474
4474
|
}),
|
|
4475
4475
|
ee({
|
|
4476
|
-
type:
|
|
4477
|
-
providerOptions:
|
|
4476
|
+
type: $("custom"),
|
|
4477
|
+
providerOptions: V.optional()
|
|
4478
4478
|
})
|
|
4479
4479
|
])
|
|
4480
4480
|
)
|
|
4481
4481
|
})
|
|
4482
4482
|
]
|
|
4483
4483
|
), oc = ee({
|
|
4484
|
-
type:
|
|
4484
|
+
type: $("tool-result"),
|
|
4485
4485
|
toolCallId: A(),
|
|
4486
4486
|
toolName: A(),
|
|
4487
4487
|
output: uv,
|
|
4488
|
-
providerOptions:
|
|
4488
|
+
providerOptions: V.optional()
|
|
4489
4489
|
}), dv = ee({
|
|
4490
|
-
type:
|
|
4490
|
+
type: $("tool-approval-request"),
|
|
4491
4491
|
approvalId: A(),
|
|
4492
4492
|
toolCallId: A()
|
|
4493
4493
|
}), fv = ee({
|
|
4494
|
-
type:
|
|
4494
|
+
type: $("tool-approval-response"),
|
|
4495
4495
|
approvalId: A(),
|
|
4496
4496
|
approved: ve(),
|
|
4497
4497
|
reason: A().optional()
|
|
4498
4498
|
}), pv = ee(
|
|
4499
4499
|
{
|
|
4500
|
-
role:
|
|
4500
|
+
role: $("system"),
|
|
4501
4501
|
content: A(),
|
|
4502
|
-
providerOptions:
|
|
4502
|
+
providerOptions: V.optional()
|
|
4503
4503
|
}
|
|
4504
4504
|
), mv = ee({
|
|
4505
|
-
role:
|
|
4505
|
+
role: $("user"),
|
|
4506
4506
|
content: ye([
|
|
4507
4507
|
A(),
|
|
4508
4508
|
Yt(ye([nc, iv, rc]))
|
|
4509
4509
|
]),
|
|
4510
|
-
providerOptions:
|
|
4510
|
+
providerOptions: V.optional()
|
|
4511
4511
|
}), hv = ee({
|
|
4512
|
-
role:
|
|
4512
|
+
role: $("assistant"),
|
|
4513
4513
|
content: ye([
|
|
4514
4514
|
A(),
|
|
4515
4515
|
Yt(
|
|
@@ -4523,11 +4523,11 @@ var ra = "6.0.3", tc = ye([
|
|
|
4523
4523
|
])
|
|
4524
4524
|
)
|
|
4525
4525
|
]),
|
|
4526
|
-
providerOptions:
|
|
4526
|
+
providerOptions: V.optional()
|
|
4527
4527
|
}), gv = ee({
|
|
4528
|
-
role:
|
|
4528
|
+
role: $("tool"),
|
|
4529
4529
|
content: Yt(ye([oc, fv])),
|
|
4530
|
-
providerOptions:
|
|
4530
|
+
providerOptions: V.optional()
|
|
4531
4531
|
});
|
|
4532
4532
|
ye([
|
|
4533
4533
|
pv,
|
|
@@ -4896,7 +4896,7 @@ var bv = () => ({
|
|
|
4896
4896
|
if (a == null || typeof a != "object" || !("elements" in a) || !Array.isArray(a.elements))
|
|
4897
4897
|
throw new lt({
|
|
4898
4898
|
message: "No object generated: response did not match schema.",
|
|
4899
|
-
cause: new
|
|
4899
|
+
cause: new Vt({
|
|
4900
4900
|
value: a,
|
|
4901
4901
|
cause: "response must be an object with an elements array"
|
|
4902
4902
|
}),
|
|
@@ -4981,7 +4981,7 @@ var bv = () => ({
|
|
|
4981
4981
|
if (i == null || typeof i != "object" || !("result" in i) || typeof i.result != "string" || !e.includes(i.result))
|
|
4982
4982
|
throw new lt({
|
|
4983
4983
|
message: "No object generated: response did not match schema.",
|
|
4984
|
-
cause: new
|
|
4984
|
+
cause: new Vt({
|
|
4985
4985
|
value: i,
|
|
4986
4986
|
cause: "response must be an object that contains a choice value."
|
|
4987
4987
|
}),
|
|
@@ -5052,27 +5052,27 @@ var Cv = Kg(
|
|
|
5052
5052
|
() => Xi(
|
|
5053
5053
|
ye([
|
|
5054
5054
|
ne({
|
|
5055
|
-
type:
|
|
5055
|
+
type: $("text-start"),
|
|
5056
5056
|
id: A(),
|
|
5057
|
-
providerMetadata:
|
|
5057
|
+
providerMetadata: V.optional()
|
|
5058
5058
|
}),
|
|
5059
5059
|
ne({
|
|
5060
|
-
type:
|
|
5060
|
+
type: $("text-delta"),
|
|
5061
5061
|
id: A(),
|
|
5062
5062
|
delta: A(),
|
|
5063
|
-
providerMetadata:
|
|
5063
|
+
providerMetadata: V.optional()
|
|
5064
5064
|
}),
|
|
5065
5065
|
ne({
|
|
5066
|
-
type:
|
|
5066
|
+
type: $("text-end"),
|
|
5067
5067
|
id: A(),
|
|
5068
|
-
providerMetadata:
|
|
5068
|
+
providerMetadata: V.optional()
|
|
5069
5069
|
}),
|
|
5070
5070
|
ne({
|
|
5071
|
-
type:
|
|
5071
|
+
type: $("error"),
|
|
5072
5072
|
errorText: A()
|
|
5073
5073
|
}),
|
|
5074
5074
|
ne({
|
|
5075
|
-
type:
|
|
5075
|
+
type: $("tool-input-start"),
|
|
5076
5076
|
toolCallId: A(),
|
|
5077
5077
|
toolName: A(),
|
|
5078
5078
|
providerExecuted: ve().optional(),
|
|
@@ -5080,38 +5080,38 @@ var Cv = Kg(
|
|
|
5080
5080
|
title: A().optional()
|
|
5081
5081
|
}),
|
|
5082
5082
|
ne({
|
|
5083
|
-
type:
|
|
5083
|
+
type: $("tool-input-delta"),
|
|
5084
5084
|
toolCallId: A(),
|
|
5085
5085
|
inputTextDelta: A()
|
|
5086
5086
|
}),
|
|
5087
5087
|
ne({
|
|
5088
|
-
type:
|
|
5088
|
+
type: $("tool-input-available"),
|
|
5089
5089
|
toolCallId: A(),
|
|
5090
5090
|
toolName: A(),
|
|
5091
5091
|
input: Ue(),
|
|
5092
5092
|
providerExecuted: ve().optional(),
|
|
5093
|
-
providerMetadata:
|
|
5093
|
+
providerMetadata: V.optional(),
|
|
5094
5094
|
dynamic: ve().optional(),
|
|
5095
5095
|
title: A().optional()
|
|
5096
5096
|
}),
|
|
5097
5097
|
ne({
|
|
5098
|
-
type:
|
|
5098
|
+
type: $("tool-input-error"),
|
|
5099
5099
|
toolCallId: A(),
|
|
5100
5100
|
toolName: A(),
|
|
5101
5101
|
input: Ue(),
|
|
5102
5102
|
providerExecuted: ve().optional(),
|
|
5103
|
-
providerMetadata:
|
|
5103
|
+
providerMetadata: V.optional(),
|
|
5104
5104
|
dynamic: ve().optional(),
|
|
5105
5105
|
errorText: A(),
|
|
5106
5106
|
title: A().optional()
|
|
5107
5107
|
}),
|
|
5108
5108
|
ne({
|
|
5109
|
-
type:
|
|
5109
|
+
type: $("tool-approval-request"),
|
|
5110
5110
|
approvalId: A(),
|
|
5111
5111
|
toolCallId: A()
|
|
5112
5112
|
}),
|
|
5113
5113
|
ne({
|
|
5114
|
-
type:
|
|
5114
|
+
type: $("tool-output-available"),
|
|
5115
5115
|
toolCallId: A(),
|
|
5116
5116
|
output: Ue(),
|
|
5117
5117
|
providerExecuted: ve().optional(),
|
|
@@ -5119,52 +5119,52 @@ var Cv = Kg(
|
|
|
5119
5119
|
preliminary: ve().optional()
|
|
5120
5120
|
}),
|
|
5121
5121
|
ne({
|
|
5122
|
-
type:
|
|
5122
|
+
type: $("tool-output-error"),
|
|
5123
5123
|
toolCallId: A(),
|
|
5124
5124
|
errorText: A(),
|
|
5125
5125
|
providerExecuted: ve().optional(),
|
|
5126
5126
|
dynamic: ve().optional()
|
|
5127
5127
|
}),
|
|
5128
5128
|
ne({
|
|
5129
|
-
type:
|
|
5129
|
+
type: $("tool-output-denied"),
|
|
5130
5130
|
toolCallId: A()
|
|
5131
5131
|
}),
|
|
5132
5132
|
ne({
|
|
5133
|
-
type:
|
|
5133
|
+
type: $("reasoning-start"),
|
|
5134
5134
|
id: A(),
|
|
5135
|
-
providerMetadata:
|
|
5135
|
+
providerMetadata: V.optional()
|
|
5136
5136
|
}),
|
|
5137
5137
|
ne({
|
|
5138
|
-
type:
|
|
5138
|
+
type: $("reasoning-delta"),
|
|
5139
5139
|
id: A(),
|
|
5140
5140
|
delta: A(),
|
|
5141
|
-
providerMetadata:
|
|
5141
|
+
providerMetadata: V.optional()
|
|
5142
5142
|
}),
|
|
5143
5143
|
ne({
|
|
5144
|
-
type:
|
|
5144
|
+
type: $("reasoning-end"),
|
|
5145
5145
|
id: A(),
|
|
5146
|
-
providerMetadata:
|
|
5146
|
+
providerMetadata: V.optional()
|
|
5147
5147
|
}),
|
|
5148
5148
|
ne({
|
|
5149
|
-
type:
|
|
5149
|
+
type: $("source-url"),
|
|
5150
5150
|
sourceId: A(),
|
|
5151
5151
|
url: A(),
|
|
5152
5152
|
title: A().optional(),
|
|
5153
|
-
providerMetadata:
|
|
5153
|
+
providerMetadata: V.optional()
|
|
5154
5154
|
}),
|
|
5155
5155
|
ne({
|
|
5156
|
-
type:
|
|
5156
|
+
type: $("source-document"),
|
|
5157
5157
|
sourceId: A(),
|
|
5158
5158
|
mediaType: A(),
|
|
5159
5159
|
title: A(),
|
|
5160
5160
|
filename: A().optional(),
|
|
5161
|
-
providerMetadata:
|
|
5161
|
+
providerMetadata: V.optional()
|
|
5162
5162
|
}),
|
|
5163
5163
|
ne({
|
|
5164
|
-
type:
|
|
5164
|
+
type: $("file"),
|
|
5165
5165
|
url: A(),
|
|
5166
5166
|
mediaType: A(),
|
|
5167
|
-
providerMetadata:
|
|
5167
|
+
providerMetadata: V.optional()
|
|
5168
5168
|
}),
|
|
5169
5169
|
ne({
|
|
5170
5170
|
type: Wi(
|
|
@@ -5176,18 +5176,18 @@ var Cv = Kg(
|
|
|
5176
5176
|
transient: ve().optional()
|
|
5177
5177
|
}),
|
|
5178
5178
|
ne({
|
|
5179
|
-
type:
|
|
5179
|
+
type: $("start-step")
|
|
5180
5180
|
}),
|
|
5181
5181
|
ne({
|
|
5182
|
-
type:
|
|
5182
|
+
type: $("finish-step")
|
|
5183
5183
|
}),
|
|
5184
5184
|
ne({
|
|
5185
|
-
type:
|
|
5185
|
+
type: $("start"),
|
|
5186
5186
|
messageId: A().optional(),
|
|
5187
5187
|
messageMetadata: Ue().optional()
|
|
5188
5188
|
}),
|
|
5189
5189
|
ne({
|
|
5190
|
-
type:
|
|
5190
|
+
type: $("finish"),
|
|
5191
5191
|
finishReason: Bi([
|
|
5192
5192
|
"stop",
|
|
5193
5193
|
"length",
|
|
@@ -5199,10 +5199,10 @@ var Cv = Kg(
|
|
|
5199
5199
|
messageMetadata: Ue().optional()
|
|
5200
5200
|
}),
|
|
5201
5201
|
ne({
|
|
5202
|
-
type:
|
|
5202
|
+
type: $("abort")
|
|
5203
5203
|
}),
|
|
5204
5204
|
ne({
|
|
5205
|
-
type:
|
|
5205
|
+
type: $("message-metadata"),
|
|
5206
5206
|
messageMetadata: Ue()
|
|
5207
5207
|
})
|
|
5208
5208
|
])
|
|
@@ -5285,7 +5285,7 @@ function Av({
|
|
|
5285
5285
|
function b(v) {
|
|
5286
5286
|
var E, S;
|
|
5287
5287
|
const I = l.message.parts.find(
|
|
5288
|
-
(
|
|
5288
|
+
(k) => k.type === "dynamic-tool" && k.toolCallId === v.toolCallId
|
|
5289
5289
|
), x = v, T = I;
|
|
5290
5290
|
I != null ? (I.state = v.state, T.toolName = v.toolName, T.input = x.input, T.output = x.output, T.errorText = x.errorText, T.rawInput = (E = x.rawInput) != null ? E : T.rawInput, T.preliminary = x.preliminary, v.title !== void 0 && (T.title = v.title), T.providerExecuted = (S = x.providerExecuted) != null ? S : I.providerExecuted, x.providerMetadata != null && I.state === "input-available" && (I.callProviderMetadata = x.providerMetadata)) : l.message.parts.push({
|
|
5291
5291
|
type: "dynamic-tool",
|
|
@@ -6031,7 +6031,7 @@ const ac = async () => (Jr || (Jr = import(
|
|
|
6031
6031
|
"./index.790ujKXR.js"
|
|
6032
6032
|
)), Jr), ic = async () => (Kr || (Kr = import(
|
|
6033
6033
|
/* webpackChunkName: "toast-utilities" */
|
|
6034
|
-
"./index.
|
|
6034
|
+
"./index.DlSb-eu-.js"
|
|
6035
6035
|
).then((e) => e.utilities)), Kr), zv = async () => {
|
|
6036
6036
|
try {
|
|
6037
6037
|
await Promise.all([ac(), ic()]);
|
|
@@ -6165,8 +6165,8 @@ function Bv() {
|
|
|
6165
6165
|
}
|
|
6166
6166
|
return Xr = e, Xr;
|
|
6167
6167
|
}
|
|
6168
|
-
var
|
|
6169
|
-
const
|
|
6168
|
+
var Hv = /* @__PURE__ */ Bv();
|
|
6169
|
+
const Vv = /* @__PURE__ */ rv(Hv);
|
|
6170
6170
|
var dc = (e, t, n) => {
|
|
6171
6171
|
if (!t.has(e))
|
|
6172
6172
|
throw TypeError("Cannot " + n);
|
|
@@ -6176,7 +6176,7 @@ var dc = (e, t, n) => {
|
|
|
6176
6176
|
t instanceof WeakSet ? t.add(e) : t.set(e, n);
|
|
6177
6177
|
}, at = (e, t, n, r) => (dc(e, t, "write to private field"), t.set(e, n), n);
|
|
6178
6178
|
function Wv(e, t) {
|
|
6179
|
-
return t != null ?
|
|
6179
|
+
return t != null ? Vv(e, t) : e;
|
|
6180
6180
|
}
|
|
6181
6181
|
var Te, Qn, er, en, tn, nn, Zt, So, Co, Gv = class {
|
|
6182
6182
|
constructor(e = []) {
|
|
@@ -6248,11 +6248,11 @@ function Yv({
|
|
|
6248
6248
|
resume: t = !1,
|
|
6249
6249
|
...n
|
|
6250
6250
|
} = {}) {
|
|
6251
|
-
const r =
|
|
6251
|
+
const r = W(
|
|
6252
6252
|
"chat" in n ? n.chat : new ia(n)
|
|
6253
6253
|
);
|
|
6254
6254
|
("chat" in n && n.chat !== r.current || "id" in n && r.current.id !== n.id) && (r.current = "chat" in n ? n.chat : new ia(n));
|
|
6255
|
-
const s =
|
|
6255
|
+
const s = J(
|
|
6256
6256
|
(d) => r.current["~registerMessagesCallback"](d, e),
|
|
6257
6257
|
// `chatRef.current.id` is required to trigger re-subscription when the chat ID changes
|
|
6258
6258
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -6269,7 +6269,7 @@ function Yv({
|
|
|
6269
6269
|
r.current["~registerErrorCallback"],
|
|
6270
6270
|
() => r.current.error,
|
|
6271
6271
|
() => r.current.error
|
|
6272
|
-
), l =
|
|
6272
|
+
), l = J(
|
|
6273
6273
|
(d) => {
|
|
6274
6274
|
typeof d == "function" && (d = d(r.current.messages)), r.current.messages = d;
|
|
6275
6275
|
},
|
|
@@ -6306,7 +6306,7 @@ function wt(e = {}) {
|
|
|
6306
6306
|
const t = de(fc);
|
|
6307
6307
|
if (!t)
|
|
6308
6308
|
throw new Error("useAiChat must be used within a AiChatProvider");
|
|
6309
|
-
const n =
|
|
6309
|
+
const n = W(e);
|
|
6310
6310
|
return Z(() => {
|
|
6311
6311
|
n.current = e;
|
|
6312
6312
|
}, [e]), Z(() => {
|
|
@@ -6324,20 +6324,20 @@ function Jv({
|
|
|
6324
6324
|
children: e,
|
|
6325
6325
|
value: t
|
|
6326
6326
|
}) {
|
|
6327
|
-
const n =
|
|
6327
|
+
const n = W(ca()), [r, o] = H("");
|
|
6328
6328
|
Z(() => {
|
|
6329
6329
|
n.current = ca();
|
|
6330
6330
|
}, [t]);
|
|
6331
|
-
const s =
|
|
6331
|
+
const s = J((d) => {
|
|
6332
6332
|
for (const u of n.current.onError)
|
|
6333
6333
|
u(d);
|
|
6334
|
-
}, []), i =
|
|
6334
|
+
}, []), i = J((d) => {
|
|
6335
6335
|
for (const u of n.current.onFinish)
|
|
6336
6336
|
u(d);
|
|
6337
|
-
}, []), a =
|
|
6337
|
+
}, []), a = J((d) => {
|
|
6338
6338
|
for (const u of n.current.onData)
|
|
6339
6339
|
u(d);
|
|
6340
|
-
}, []), c =
|
|
6340
|
+
}, []), c = J(async (d) => {
|
|
6341
6341
|
for (const u of n.current.onToolCall)
|
|
6342
6342
|
await u(d);
|
|
6343
6343
|
}, []), l = Yv({
|
|
@@ -6369,16 +6369,16 @@ function Jv({
|
|
|
6369
6369
|
const Kv = ({ chatId: e }) => {
|
|
6370
6370
|
const { messages: t } = wt(), {
|
|
6371
6371
|
state: { privateChat: n }
|
|
6372
|
-
} = de(Le), r =
|
|
6372
|
+
} = de(Le), r = W(e), o = W(!1);
|
|
6373
6373
|
return Z(() => {
|
|
6374
6374
|
const s = r.current !== e, i = t.length > 0;
|
|
6375
6375
|
i && !n ? (window.localStorage.setItem(
|
|
6376
|
-
|
|
6376
|
+
He + Kn,
|
|
6377
6377
|
JSON.stringify(e)
|
|
6378
6378
|
), o.current = !0) : n && i ? window.localStorage.removeItem(
|
|
6379
|
-
|
|
6379
|
+
He + Kn
|
|
6380
6380
|
) : s && o.current && (window.localStorage.removeItem(
|
|
6381
|
-
|
|
6381
|
+
He + Kn
|
|
6382
6382
|
), o.current = !1), r.current = e;
|
|
6383
6383
|
}, [e, t.length, n]), null;
|
|
6384
6384
|
};
|
|
@@ -6387,7 +6387,7 @@ const la = ({
|
|
|
6387
6387
|
containerId: e,
|
|
6388
6388
|
...t
|
|
6389
6389
|
}) => {
|
|
6390
|
-
const [n, r] =
|
|
6390
|
+
const [n, r] = H(Fn);
|
|
6391
6391
|
return Z(() => {
|
|
6392
6392
|
if (!Fn) {
|
|
6393
6393
|
const o = async () => {
|
|
@@ -6414,8 +6414,8 @@ const la = ({
|
|
|
6414
6414
|
setInitialMessages: n,
|
|
6415
6415
|
dispatchChat: r
|
|
6416
6416
|
}) => {
|
|
6417
|
-
const { user: o, getAccessToken: s } = $e(), [i, a] =
|
|
6418
|
-
key:
|
|
6417
|
+
const { user: o, getAccessToken: s } = $e(), [i, a] = H(!1), [c] = et({
|
|
6418
|
+
key: He + Kn,
|
|
6419
6419
|
initialValue: ""
|
|
6420
6420
|
}), l = !!c && !i && !!o?.username && c !== e, { data: d } = du({
|
|
6421
6421
|
chatId: l ? c : void 0,
|
|
@@ -6453,10 +6453,10 @@ function ua(e, t) {
|
|
|
6453
6453
|
]);
|
|
6454
6454
|
}
|
|
6455
6455
|
function qv() {
|
|
6456
|
-
const [e, t] =
|
|
6456
|
+
const [e, t] = H({
|
|
6457
6457
|
width: 0,
|
|
6458
6458
|
height: 0
|
|
6459
|
-
}), n =
|
|
6459
|
+
}), n = J(() => {
|
|
6460
6460
|
t({
|
|
6461
6461
|
width: window.innerWidth || 0,
|
|
6462
6462
|
height: window.innerHeight || 0
|
|
@@ -6465,10 +6465,10 @@ function qv() {
|
|
|
6465
6465
|
return ua("resize", n), ua("orientationchange", n), Z(n, []), e;
|
|
6466
6466
|
}
|
|
6467
6467
|
function Qv() {
|
|
6468
|
-
const [e, t] =
|
|
6468
|
+
const [e, t] = H({
|
|
6469
6469
|
width: 0,
|
|
6470
6470
|
height: 0
|
|
6471
|
-
}), n =
|
|
6471
|
+
}), n = J(() => {
|
|
6472
6472
|
t({
|
|
6473
6473
|
width: window?.visualViewport?.width || window.innerWidth || 0,
|
|
6474
6474
|
height: window?.visualViewport?.height || window.innerHeight || 0
|
|
@@ -6486,7 +6486,7 @@ function Qv() {
|
|
|
6486
6486
|
}
|
|
6487
6487
|
const ey = "z-20", ty = "z-10";
|
|
6488
6488
|
function ny(e) {
|
|
6489
|
-
const [t, n] =
|
|
6489
|
+
const [t, n] = H(!1);
|
|
6490
6490
|
return Z(() => {
|
|
6491
6491
|
if (!e) {
|
|
6492
6492
|
n(!1);
|
|
@@ -6548,7 +6548,7 @@ function sy(e) {
|
|
|
6548
6548
|
function ay(e, t, n = !1) {
|
|
6549
6549
|
return e.target instanceof HTMLElement ? (n || !e.target.isContentEditable) && !t.includes(e.target.tagName) : !0;
|
|
6550
6550
|
}
|
|
6551
|
-
function
|
|
6551
|
+
function Ho(e, t = [
|
|
6552
6552
|
"INPUT",
|
|
6553
6553
|
"TEXTAREA",
|
|
6554
6554
|
"SELECT"
|
|
@@ -6592,18 +6592,18 @@ function rt(e) {
|
|
|
6592
6592
|
function Jt(e) {
|
|
6593
6593
|
return e.split("-")[1];
|
|
6594
6594
|
}
|
|
6595
|
-
function
|
|
6595
|
+
function Vo(e) {
|
|
6596
6596
|
return e === "x" ? "y" : "x";
|
|
6597
6597
|
}
|
|
6598
6598
|
function Wo(e) {
|
|
6599
6599
|
return e === "y" ? "height" : "width";
|
|
6600
6600
|
}
|
|
6601
6601
|
const uy = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
6602
|
-
function
|
|
6602
|
+
function Ve(e) {
|
|
6603
6603
|
return uy.has(rt(e)) ? "y" : "x";
|
|
6604
6604
|
}
|
|
6605
6605
|
function Go(e) {
|
|
6606
|
-
return
|
|
6606
|
+
return Vo(Ve(e));
|
|
6607
6607
|
}
|
|
6608
6608
|
function dy(e, t, n) {
|
|
6609
6609
|
n === void 0 && (n = !1);
|
|
@@ -6679,7 +6679,7 @@ function pa(e, t, n) {
|
|
|
6679
6679
|
reference: r,
|
|
6680
6680
|
floating: o
|
|
6681
6681
|
} = e;
|
|
6682
|
-
const s =
|
|
6682
|
+
const s = Ve(t), i = Go(t), a = Wo(i), c = rt(t), l = s === "y", d = r.x + r.width / 2 - o.width / 2, u = r.y + r.height / 2 - o.height / 2, g = r[a] / 2 - o[a] / 2;
|
|
6683
6683
|
let m;
|
|
6684
6684
|
switch (c) {
|
|
6685
6685
|
case "top":
|
|
@@ -6852,17 +6852,17 @@ const by = (e) => ({
|
|
|
6852
6852
|
}, m = Go(o), p = Wo(m), f = await i.getDimensions(l), y = m === "y", b = y ? "top" : "left", _ = y ? "bottom" : "right", v = y ? "clientHeight" : "clientWidth", E = s.reference[p] + s.reference[m] - g[m] - s.floating[p], S = g[m] - s.reference[m], I = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
|
|
6853
6853
|
let x = I ? I[v] : 0;
|
|
6854
6854
|
(!x || !await (i.isElement == null ? void 0 : i.isElement(I))) && (x = a.floating[v] || s.floating[p]);
|
|
6855
|
-
const T = E / 2 - S / 2,
|
|
6855
|
+
const T = E / 2 - S / 2, k = x / 2 - f[p] / 2 - 1, M = gt(u[b], k), j = gt(u[_], k), O = M, R = x - f[p] - j, L = x / 2 - f[p] / 2 + T, Q = xo(O, L, R), B = !c.arrow && Jt(o) != null && L !== Q && s.reference[p] / 2 - (L < O ? M : j) - f[p] / 2 < 0, q = B ? L < O ? L - O : L - R : 0;
|
|
6856
6856
|
return {
|
|
6857
6857
|
[m]: g[m] + q,
|
|
6858
6858
|
data: {
|
|
6859
6859
|
[m]: Q,
|
|
6860
6860
|
centerOffset: L - Q - q,
|
|
6861
|
-
...
|
|
6861
|
+
...B && {
|
|
6862
6862
|
alignmentOffset: q
|
|
6863
6863
|
}
|
|
6864
6864
|
},
|
|
6865
|
-
reset:
|
|
6865
|
+
reset: B
|
|
6866
6866
|
};
|
|
6867
6867
|
}
|
|
6868
6868
|
}), wy = function(e) {
|
|
@@ -6889,57 +6889,57 @@ const by = (e) => ({
|
|
|
6889
6889
|
} = nt(e, t);
|
|
6890
6890
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
6891
6891
|
return {};
|
|
6892
|
-
const b = rt(o), _ =
|
|
6892
|
+
const b = rt(o), _ = Ve(a), v = rt(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), S = g || (v || !f ? [mr(a)] : fy(a)), I = p !== "none";
|
|
6893
6893
|
!g && I && S.push(...gy(a, f, p, E));
|
|
6894
|
-
const x = [a, ...S], T = await hn(t, y),
|
|
6895
|
-
let
|
|
6896
|
-
if (d &&
|
|
6894
|
+
const x = [a, ...S], T = await hn(t, y), k = [];
|
|
6895
|
+
let M = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
6896
|
+
if (d && k.push(T[b]), u) {
|
|
6897
6897
|
const L = dy(o, i, E);
|
|
6898
|
-
|
|
6898
|
+
k.push(T[L[0]], T[L[1]]);
|
|
6899
6899
|
}
|
|
6900
|
-
if (
|
|
6900
|
+
if (M = [...M, {
|
|
6901
6901
|
placement: o,
|
|
6902
|
-
overflows:
|
|
6903
|
-
}], !
|
|
6904
|
-
var
|
|
6905
|
-
const L = (((
|
|
6906
|
-
if (Q && (!(u === "alignment" ? _ !==
|
|
6902
|
+
overflows: k
|
|
6903
|
+
}], !k.every((L) => L <= 0)) {
|
|
6904
|
+
var j, O;
|
|
6905
|
+
const L = (((j = s.flip) == null ? void 0 : j.index) || 0) + 1, Q = x[L];
|
|
6906
|
+
if (Q && (!(u === "alignment" ? _ !== Ve(Q) : !1) || // We leave the current main axis only if every placement on that axis
|
|
6907
6907
|
// overflows the main axis.
|
|
6908
|
-
|
|
6908
|
+
M.every((D) => Ve(D.placement) === _ ? D.overflows[0] > 0 : !0)))
|
|
6909
6909
|
return {
|
|
6910
6910
|
data: {
|
|
6911
6911
|
index: L,
|
|
6912
|
-
overflows:
|
|
6912
|
+
overflows: M
|
|
6913
6913
|
},
|
|
6914
6914
|
reset: {
|
|
6915
6915
|
placement: Q
|
|
6916
6916
|
}
|
|
6917
6917
|
};
|
|
6918
|
-
let
|
|
6919
|
-
if (!
|
|
6918
|
+
let B = (O = M.filter((q) => q.overflows[0] <= 0).sort((q, D) => q.overflows[1] - D.overflows[1])[0]) == null ? void 0 : O.placement;
|
|
6919
|
+
if (!B)
|
|
6920
6920
|
switch (m) {
|
|
6921
6921
|
case "bestFit": {
|
|
6922
6922
|
var R;
|
|
6923
|
-
const q = (R =
|
|
6923
|
+
const q = (R = M.filter((D) => {
|
|
6924
6924
|
if (I) {
|
|
6925
|
-
const
|
|
6926
|
-
return
|
|
6925
|
+
const N = Ve(D.placement);
|
|
6926
|
+
return N === _ || // Create a bias to the `y` side axis due to horizontal
|
|
6927
6927
|
// reading directions favoring greater width.
|
|
6928
|
-
|
|
6928
|
+
N === "y";
|
|
6929
6929
|
}
|
|
6930
6930
|
return !0;
|
|
6931
|
-
}).map((
|
|
6932
|
-
q && (
|
|
6931
|
+
}).map((D) => [D.placement, D.overflows.filter((N) => N > 0).reduce((N, ie) => N + ie, 0)]).sort((D, N) => D[1] - N[1])[0]) == null ? void 0 : R[0];
|
|
6932
|
+
q && (B = q);
|
|
6933
6933
|
break;
|
|
6934
6934
|
}
|
|
6935
6935
|
case "initialPlacement":
|
|
6936
|
-
|
|
6936
|
+
B = a;
|
|
6937
6937
|
break;
|
|
6938
6938
|
}
|
|
6939
|
-
if (o !==
|
|
6939
|
+
if (o !== B)
|
|
6940
6940
|
return {
|
|
6941
6941
|
reset: {
|
|
6942
|
-
placement:
|
|
6942
|
+
placement: B
|
|
6943
6943
|
}
|
|
6944
6944
|
};
|
|
6945
6945
|
}
|
|
@@ -7005,7 +7005,7 @@ async function Ey(e, t) {
|
|
|
7005
7005
|
placement: n,
|
|
7006
7006
|
platform: r,
|
|
7007
7007
|
elements: o
|
|
7008
|
-
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = rt(n), a = Jt(n), c =
|
|
7008
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = rt(n), a = Jt(n), c = Ve(n) === "y", l = hc.has(i) ? -1 : 1, d = s && c ? -1 : 1, u = nt(t, e);
|
|
7009
7009
|
let {
|
|
7010
7010
|
mainAxis: g,
|
|
7011
7011
|
crossAxis: m,
|
|
@@ -7077,7 +7077,7 @@ const Sy = function(e) {
|
|
|
7077
7077
|
} = nt(e, t), l = {
|
|
7078
7078
|
x: n,
|
|
7079
7079
|
y: r
|
|
7080
|
-
}, d = await hn(t, c), u =
|
|
7080
|
+
}, d = await hn(t, c), u = Ve(rt(o)), g = Vo(u);
|
|
7081
7081
|
let m = l[g], p = l[u];
|
|
7082
7082
|
if (s) {
|
|
7083
7083
|
const y = g === "y" ? "top" : "left", b = g === "y" ? "bottom" : "right", _ = m + d[y], v = m - d[b];
|
|
@@ -7122,7 +7122,7 @@ const Sy = function(e) {
|
|
|
7122
7122
|
} = nt(e, t), d = {
|
|
7123
7123
|
x: n,
|
|
7124
7124
|
y: r
|
|
7125
|
-
}, u =
|
|
7125
|
+
}, u = Ve(o), g = Vo(u);
|
|
7126
7126
|
let m = d[g], p = d[u];
|
|
7127
7127
|
const f = nt(a, t), y = typeof f == "number" ? {
|
|
7128
7128
|
mainAxis: f,
|
|
@@ -7162,7 +7162,7 @@ const Sy = function(e) {
|
|
|
7162
7162
|
apply: c = () => {
|
|
7163
7163
|
},
|
|
7164
7164
|
...l
|
|
7165
|
-
} = nt(e, t), d = await hn(t, l), u = rt(o), g = Jt(o), m =
|
|
7165
|
+
} = nt(e, t), d = await hn(t, l), u = rt(o), g = Jt(o), m = Ve(o) === "y", {
|
|
7166
7166
|
width: p,
|
|
7167
7167
|
height: f
|
|
7168
7168
|
} = s.floating;
|
|
@@ -7171,16 +7171,16 @@ const Sy = function(e) {
|
|
|
7171
7171
|
const _ = f - d.top - d.bottom, v = p - d.left - d.right, E = gt(f - d[y], _), S = gt(p - d[b], v), I = !t.middlewareData.shift;
|
|
7172
7172
|
let x = E, T = S;
|
|
7173
7173
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (T = v), (r = t.middlewareData.shift) != null && r.enabled.y && (x = _), I && !g) {
|
|
7174
|
-
const
|
|
7175
|
-
m ? T = p - 2 * (
|
|
7174
|
+
const M = Se(d.left, 0), j = Se(d.right, 0), O = Se(d.top, 0), R = Se(d.bottom, 0);
|
|
7175
|
+
m ? T = p - 2 * (M !== 0 || j !== 0 ? M + j : Se(d.left, d.right)) : x = f - 2 * (O !== 0 || R !== 0 ? O + R : Se(d.top, d.bottom));
|
|
7176
7176
|
}
|
|
7177
7177
|
await c({
|
|
7178
7178
|
...t,
|
|
7179
7179
|
availableWidth: T,
|
|
7180
7180
|
availableHeight: x
|
|
7181
7181
|
});
|
|
7182
|
-
const
|
|
7183
|
-
return p !==
|
|
7182
|
+
const k = await i.getDimensions(a.floating);
|
|
7183
|
+
return p !== k.width || f !== k.height ? {
|
|
7184
7184
|
reset: {
|
|
7185
7185
|
rects: !0
|
|
7186
7186
|
}
|
|
@@ -7469,7 +7469,7 @@ function _c(e, t) {
|
|
|
7469
7469
|
const n = vt(e);
|
|
7470
7470
|
return n === t || !ke(n) || Gt(n) ? !1 : De(n).position === "fixed" || _c(n, t);
|
|
7471
7471
|
}
|
|
7472
|
-
function
|
|
7472
|
+
function Hy(e, t) {
|
|
7473
7473
|
const n = t.get(e);
|
|
7474
7474
|
if (n)
|
|
7475
7475
|
return n;
|
|
@@ -7482,14 +7482,14 @@ function Vy(e, t) {
|
|
|
7482
7482
|
}
|
|
7483
7483
|
return t.set(e, r), r;
|
|
7484
7484
|
}
|
|
7485
|
-
function
|
|
7485
|
+
function Vy(e) {
|
|
7486
7486
|
let {
|
|
7487
7487
|
element: t,
|
|
7488
7488
|
boundary: n,
|
|
7489
7489
|
rootBoundary: r,
|
|
7490
7490
|
strategy: o
|
|
7491
7491
|
} = e;
|
|
7492
|
-
const i = [...n === "clippingAncestors" ? Tr(t) ? [] :
|
|
7492
|
+
const i = [...n === "clippingAncestors" ? Tr(t) ? [] : Hy(t, this._c) : [].concat(n), r], a = i[0], c = i.reduce((l, d) => {
|
|
7493
7493
|
const u = ya(t, d, o);
|
|
7494
7494
|
return l.top = Se(u.top, l.top), l.right = gt(u.right, l.right), l.bottom = gt(u.bottom, l.bottom), l.left = Se(u.left, l.left), l;
|
|
7495
7495
|
}, ya(t, a, o));
|
|
@@ -7581,7 +7581,7 @@ function Jy(e) {
|
|
|
7581
7581
|
const Ky = {
|
|
7582
7582
|
convertOffsetParentRelativeRectToViewportRelativeRect: zy,
|
|
7583
7583
|
getDocumentElement: Xe,
|
|
7584
|
-
getClippingRect:
|
|
7584
|
+
getClippingRect: Vy,
|
|
7585
7585
|
getOffsetParent: Ec,
|
|
7586
7586
|
getElementRects: Yy,
|
|
7587
7587
|
getClientRects: Fy,
|
|
@@ -7693,7 +7693,7 @@ const wa = [
|
|
|
7693
7693
|
"touchstart"
|
|
7694
7694
|
];
|
|
7695
7695
|
function nb(e, t, n) {
|
|
7696
|
-
const r =
|
|
7696
|
+
const r = W(null);
|
|
7697
7697
|
return Z(() => {
|
|
7698
7698
|
const o = (s) => {
|
|
7699
7699
|
const i = s ? s.target : void 0;
|
|
@@ -7712,11 +7712,11 @@ function nb(e, t, n) {
|
|
|
7712
7712
|
]), r;
|
|
7713
7713
|
}
|
|
7714
7714
|
function rb(e, t) {
|
|
7715
|
-
const [n, r] =
|
|
7715
|
+
const [n, r] = H(!1), o = W(null), s = W(null), i = J(() => {
|
|
7716
7716
|
r((c) => (!c && (!o.current || o.current === -1) && (o.current = window.setInterval(s.current, t)), !0));
|
|
7717
7717
|
}, [
|
|
7718
7718
|
t
|
|
7719
|
-
]), a =
|
|
7719
|
+
]), a = J(() => {
|
|
7720
7720
|
r(!1), window.clearInterval(o.current || -1), o.current = -1;
|
|
7721
7721
|
}, []);
|
|
7722
7722
|
return Z(() => (s.current = e, n && i(), a), [
|
|
@@ -7758,7 +7758,7 @@ const ob = "av-tooltip", sb = "av-tooltip-arrow", Un = (e, t = "px") => typeof e
|
|
|
7758
7758
|
}), db = 5e3, fb = ({ trigger: e, label: t, placement: n = "top", mode: r = "system", animationDuration: o = 300, delay: s = 0, className: i, tooltipClassName: a, arrowClassName: c }) => {
|
|
7759
7759
|
const l = nb(() => {
|
|
7760
7760
|
v.stop(), y(!1);
|
|
7761
|
-
}), d =
|
|
7761
|
+
}), d = W(null), u = W(null), g = W(null), [m, p] = H(!1), [f, y] = H(!1), [b, _] = H(!1), v = rb(() => {
|
|
7762
7762
|
y(!1);
|
|
7763
7763
|
}, db), E = lb({
|
|
7764
7764
|
mode: r,
|
|
@@ -7767,9 +7767,9 @@ const ob = "av-tooltip", sb = "av-tooltip-arrow", Un = (e, t = "px") => typeof e
|
|
|
7767
7767
|
arrowClassName: c
|
|
7768
7768
|
}), S = ub({
|
|
7769
7769
|
animationDuration: o
|
|
7770
|
-
}), I =
|
|
7770
|
+
}), I = J(async () => {
|
|
7771
7771
|
if (l.current && d.current && u.current) {
|
|
7772
|
-
const { x:
|
|
7772
|
+
const { x: M, y: j, middlewareData: O, placement: R } = await Tc(l.current, d.current, {
|
|
7773
7773
|
placement: n,
|
|
7774
7774
|
middleware: [
|
|
7775
7775
|
Cc(10),
|
|
@@ -7786,8 +7786,8 @@ const ob = "av-tooltip", sb = "av-tooltip-arrow", Un = (e, t = "px") => typeof e
|
|
|
7786
7786
|
]
|
|
7787
7787
|
});
|
|
7788
7788
|
d?.current?.style && Object.assign(d.current.style, {
|
|
7789
|
-
left: Un(
|
|
7790
|
-
top: Un(
|
|
7789
|
+
left: Un(M),
|
|
7790
|
+
top: Un(j),
|
|
7791
7791
|
...S
|
|
7792
7792
|
});
|
|
7793
7793
|
const L = {
|
|
@@ -7797,8 +7797,8 @@ const ob = "av-tooltip", sb = "av-tooltip-arrow", Un = (e, t = "px") => typeof e
|
|
|
7797
7797
|
left: "right"
|
|
7798
7798
|
}[R.split("-")[0]];
|
|
7799
7799
|
u?.current?.style && Object.assign(u.current.style, {
|
|
7800
|
-
left: Un(
|
|
7801
|
-
top: Un(
|
|
7800
|
+
left: Un(O.arrow?.x),
|
|
7801
|
+
top: Un(O.arrow?.y),
|
|
7802
7802
|
right: "",
|
|
7803
7803
|
bottom: "",
|
|
7804
7804
|
[L]: "-4px"
|
|
@@ -7823,14 +7823,14 @@ const ob = "av-tooltip", sb = "av-tooltip-arrow", Un = (e, t = "px") => typeof e
|
|
|
7823
7823
|
f || (s > 0 ? g.current = setTimeout(() => {
|
|
7824
7824
|
p(!0), g.current = null;
|
|
7825
7825
|
}, s) : p(!0));
|
|
7826
|
-
},
|
|
7826
|
+
}, k = () => {
|
|
7827
7827
|
g.current && (clearTimeout(g.current), g.current = null), f || p(!1);
|
|
7828
7828
|
};
|
|
7829
7829
|
return /* @__PURE__ */ z("div", {
|
|
7830
7830
|
className: E.wrapper,
|
|
7831
7831
|
ref: l,
|
|
7832
7832
|
onMouseEnter: T,
|
|
7833
|
-
onMouseLeave:
|
|
7833
|
+
onMouseLeave: k,
|
|
7834
7834
|
onClick: x,
|
|
7835
7835
|
children: [
|
|
7836
7836
|
e,
|
|
@@ -7905,10 +7905,10 @@ const mb = ({
|
|
|
7905
7905
|
dispatch: s,
|
|
7906
7906
|
setChatId: i,
|
|
7907
7907
|
setInitialMessages: a
|
|
7908
|
-
} = de(Le), { id: c, setInput: l, stop: d } = wt(), u =
|
|
7908
|
+
} = de(Le), { id: c, setInput: l, stop: d } = wt(), u = W(null), g = W(!1), [m, p] = Ke(), { data: f, isSuccess: y } = bt({
|
|
7909
7909
|
user: n?.username,
|
|
7910
7910
|
getAccessToken: t
|
|
7911
|
-
}), b = m(p.NewChat), _ =
|
|
7911
|
+
}), b = m(p.NewChat), _ = J(() => {
|
|
7912
7912
|
i(ht()), a([]), l(""), s({
|
|
7913
7913
|
type: Wt,
|
|
7914
7914
|
payload: {
|
|
@@ -7922,7 +7922,7 @@ const mb = ({
|
|
|
7922
7922
|
}
|
|
7923
7923
|
});
|
|
7924
7924
|
}, [i, a, l, s]);
|
|
7925
|
-
Ac("newChat", _),
|
|
7925
|
+
Ac("newChat", _), Ho(
|
|
7926
7926
|
[
|
|
7927
7927
|
[
|
|
7928
7928
|
"mod+N",
|
|
@@ -8013,7 +8013,7 @@ const mb = ({
|
|
|
8013
8013
|
};
|
|
8014
8014
|
const hb = "av-messagebox", gb = "av-panel", Qe = "messagebox", Rc = /* @__PURE__ */ ei(null);
|
|
8015
8015
|
function vb({ initialOpen: e = !1, open: t, onOpenChange: n, initialFocus: r } = {}) {
|
|
8016
|
-
const [o, s] =
|
|
8016
|
+
const [o, s] = H(e), [i, a] = H(), [c, l] = H(), d = t ?? o, u = n ?? s, g = Ld(), m = zd({
|
|
8017
8017
|
nodeId: g,
|
|
8018
8018
|
open: d,
|
|
8019
8019
|
onOpenChange: u
|
|
@@ -8130,7 +8130,7 @@ function _b({ children: e, ref: t, ...n }) {
|
|
|
8130
8130
|
});
|
|
8131
8131
|
}
|
|
8132
8132
|
function Eb({ ref: e, trigger: t, className: n, ...r }) {
|
|
8133
|
-
const { setOpen: o } = Or(), s =
|
|
8133
|
+
const { setOpen: o } = Or(), s = J(() => o(!1), [
|
|
8134
8134
|
o
|
|
8135
8135
|
]);
|
|
8136
8136
|
return /* @__PURE__ */ h("div", {
|
|
@@ -8293,7 +8293,7 @@ const Sa = ({ blurEffect: e }) => U("absolute left-0 right-0 z-20 backdrop-brigh
|
|
|
8293
8293
|
/* inlined export .NONE */
|
|
8294
8294
|
"none"
|
|
8295
8295
|
), initialFocus: m }) => {
|
|
8296
|
-
const p =
|
|
8296
|
+
const p = W(""), [f, y] = H(c ? l === /* inlined export .ANIMATION_FADE */
|
|
8297
8297
|
"fade" ? {
|
|
8298
8298
|
opacity: 0
|
|
8299
8299
|
} : {
|
|
@@ -8415,7 +8415,7 @@ const xb = () => {
|
|
|
8415
8415
|
}, Ib = () => {
|
|
8416
8416
|
je && document.body && document.body.contains(je) && document.body.removeChild(je), je = null;
|
|
8417
8417
|
}, Tb = () => {
|
|
8418
|
-
const e =
|
|
8418
|
+
const e = W(/* @__PURE__ */ new Set());
|
|
8419
8419
|
Z(() => {
|
|
8420
8420
|
jn++;
|
|
8421
8421
|
try {
|
|
@@ -8429,7 +8429,7 @@ const xb = () => {
|
|
|
8429
8429
|
e.current.clear(), jn--, jn === 0 && Ib();
|
|
8430
8430
|
};
|
|
8431
8431
|
}, []);
|
|
8432
|
-
const t =
|
|
8432
|
+
const t = J(() => {
|
|
8433
8433
|
try {
|
|
8434
8434
|
if (navigator?.vibrate) {
|
|
8435
8435
|
navigator.vibrate(eo);
|
|
@@ -8440,7 +8440,7 @@ const xb = () => {
|
|
|
8440
8440
|
}
|
|
8441
8441
|
}, []);
|
|
8442
8442
|
return {
|
|
8443
|
-
haptic:
|
|
8443
|
+
haptic: J((r = 1) => {
|
|
8444
8444
|
if (!(typeof window > "u") && !(r < 1)) {
|
|
8445
8445
|
if (navigator?.vibrate && r > 1) {
|
|
8446
8446
|
const o = [];
|
|
@@ -8624,7 +8624,7 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
|
|
|
8624
8624
|
toggleChecked: d,
|
|
8625
8625
|
onToggleChange: u
|
|
8626
8626
|
}) => {
|
|
8627
|
-
const g =
|
|
8627
|
+
const g = W(null), m = /* @__PURE__ */ z("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
|
|
8628
8628
|
/* @__PURE__ */ h("div", { className: "box-border max-w-full basis-auto", children: !s && /* @__PURE__ */ h(
|
|
8629
8629
|
zb,
|
|
8630
8630
|
{
|
|
@@ -8684,8 +8684,8 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
|
|
|
8684
8684
|
const { getAccessToken: t, user: n } = $e(), {
|
|
8685
8685
|
state: { privateChat: r, provider: o, tokenUsage: s },
|
|
8686
8686
|
dispatch: i
|
|
8687
|
-
} = de(Le), { messages: a, id: c } = wt(), { mutateAsync: l } = fu({ getAccessToken: t }), [d, u] = Ke(), [g, m] =
|
|
8688
|
-
key:
|
|
8687
|
+
} = de(Le), { messages: a, id: c } = wt(), { mutateAsync: l } = fu({ getAccessToken: t }), [d, u] = Ke(), [g, m] = H(!1), [p, f] = H(!1), [y, b] = et({
|
|
8688
|
+
key: He + pu,
|
|
8689
8689
|
initialValue: ""
|
|
8690
8690
|
}), _ = gr(ar.TOOL.MEMORIES), { data: v, isSuccess: E } = bt({
|
|
8691
8691
|
user: n?.username,
|
|
@@ -8705,13 +8705,13 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
|
|
|
8705
8705
|
return;
|
|
8706
8706
|
}
|
|
8707
8707
|
let T = [];
|
|
8708
|
-
!x && a && a.length > 0 && (T = a.filter((
|
|
8709
|
-
(
|
|
8710
|
-
) : !1).map((
|
|
8711
|
-
role:
|
|
8708
|
+
!x && a && a.length > 0 && (T = a.filter((k) => k.parts && k.parts.length > 0 ? k.parts.some(
|
|
8709
|
+
(M) => M.type === "text" && M.text?.trim()
|
|
8710
|
+
) : !1).map((k) => ({
|
|
8711
|
+
role: k.role,
|
|
8712
8712
|
// Convert v5 parts array to v4-style content string for storage.
|
|
8713
|
-
content:
|
|
8714
|
-
id:
|
|
8713
|
+
content: k.parts?.filter((M) => M.type === "text").map((M) => M.text).join("") || "",
|
|
8714
|
+
id: k.id
|
|
8715
8715
|
}))), await l({
|
|
8716
8716
|
userId: n?.username || "",
|
|
8717
8717
|
id: c,
|
|
@@ -8739,8 +8739,8 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
|
|
|
8739
8739
|
{
|
|
8740
8740
|
toggleLabel: "Don't show this again",
|
|
8741
8741
|
toggleName: "private-disclosure",
|
|
8742
|
-
maxHeight:
|
|
8743
|
-
noCancelAction:
|
|
8742
|
+
maxHeight: Ht() ? "large" : "medium",
|
|
8743
|
+
noCancelAction: Ht(),
|
|
8744
8744
|
toggleChecked: g,
|
|
8745
8745
|
onToggleChange: (x) => m(x),
|
|
8746
8746
|
showConfirmation: p,
|
|
@@ -8785,7 +8785,7 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
|
|
|
8785
8785
|
className: "text-sm",
|
|
8786
8786
|
disabled: !(E && v),
|
|
8787
8787
|
children: r ? /* @__PURE__ */ h(Bu, { size: tt }) : /* @__PURE__ */ h(
|
|
8788
|
-
|
|
8788
|
+
Hu,
|
|
8789
8789
|
{
|
|
8790
8790
|
size: tt,
|
|
8791
8791
|
className: d(u.PrivateChat)
|
|
@@ -8797,7 +8797,7 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
|
|
|
8797
8797
|
)
|
|
8798
8798
|
] });
|
|
8799
8799
|
};
|
|
8800
|
-
function
|
|
8800
|
+
function G(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
8801
8801
|
return function(o) {
|
|
8802
8802
|
if (e?.(o), n === !1 || !o.defaultPrevented)
|
|
8803
8803
|
return t?.(o);
|
|
@@ -8925,7 +8925,7 @@ function Bb(e) {
|
|
|
8925
8925
|
}
|
|
8926
8926
|
// @__NO_SIDE_EFFECTS__
|
|
8927
8927
|
function vr(e) {
|
|
8928
|
-
const t = /* @__PURE__ */
|
|
8928
|
+
const t = /* @__PURE__ */ Hb(e), n = w.forwardRef((r, o) => {
|
|
8929
8929
|
const { children: s, ...i } = r, a = w.Children.toArray(s), c = a.find(Wb);
|
|
8930
8930
|
if (c) {
|
|
8931
8931
|
const l = c.props.children, d = a.map((u) => u === c ? w.Children.count(l) > 1 ? w.Children.only(null) : w.isValidElement(l) ? l.props.children : null : u);
|
|
@@ -8936,7 +8936,7 @@ function vr(e) {
|
|
|
8936
8936
|
return n.displayName = `${e}.Slot`, n;
|
|
8937
8937
|
}
|
|
8938
8938
|
// @__NO_SIDE_EFFECTS__
|
|
8939
|
-
function
|
|
8939
|
+
function Hb(e) {
|
|
8940
8940
|
const t = w.forwardRef((n, r) => {
|
|
8941
8941
|
const { children: o, ...s } = n;
|
|
8942
8942
|
if (w.isValidElement(o)) {
|
|
@@ -8947,9 +8947,9 @@ function Vb(e) {
|
|
|
8947
8947
|
});
|
|
8948
8948
|
return t.displayName = `${e}.SlotClone`, t;
|
|
8949
8949
|
}
|
|
8950
|
-
var
|
|
8950
|
+
var Vb = /* @__PURE__ */ Symbol("radix.slottable");
|
|
8951
8951
|
function Wb(e) {
|
|
8952
|
-
return w.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
8952
|
+
return w.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Vb;
|
|
8953
8953
|
}
|
|
8954
8954
|
function Gb(e, t) {
|
|
8955
8955
|
const n = { ...t };
|
|
@@ -9071,11 +9071,11 @@ var qb = "DismissableLayer", Ro = "dismissableLayer.update", Qb = "dismissableLa
|
|
|
9071
9071
|
onDismiss: a,
|
|
9072
9072
|
...c
|
|
9073
9073
|
} = e, l = w.useContext(Mc), [d, u] = w.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, m] = w.useState({}), p = we(t, (x) => u(x)), f = Array.from(l.layers), [y] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), b = f.indexOf(y), _ = d ? f.indexOf(d) : -1, v = l.layersWithOutsidePointerEventsDisabled.size > 0, E = _ >= b, S = rw((x) => {
|
|
9074
|
-
const T = x.target,
|
|
9075
|
-
!E ||
|
|
9074
|
+
const T = x.target, k = [...l.branches].some((M) => M.contains(T));
|
|
9075
|
+
!E || k || (o?.(x), i?.(x), x.defaultPrevented || a?.());
|
|
9076
9076
|
}, g), I = ow((x) => {
|
|
9077
9077
|
const T = x.target;
|
|
9078
|
-
[...l.branches].some((
|
|
9078
|
+
[...l.branches].some((M) => M.contains(T)) || (s?.(x), i?.(x), x.defaultPrevented || a?.());
|
|
9079
9079
|
}, g);
|
|
9080
9080
|
return Xb((x) => {
|
|
9081
9081
|
_ === l.layers.size - 1 && (r?.(x), !x.defaultPrevented && a && (x.preventDefault(), a()));
|
|
@@ -9098,9 +9098,9 @@ var qb = "DismissableLayer", Ro = "dismissableLayer.update", Qb = "dismissableLa
|
|
|
9098
9098
|
pointerEvents: v ? E ? "auto" : "none" : void 0,
|
|
9099
9099
|
...e.style
|
|
9100
9100
|
},
|
|
9101
|
-
onFocusCapture:
|
|
9102
|
-
onBlurCapture:
|
|
9103
|
-
onPointerDownCapture:
|
|
9101
|
+
onFocusCapture: G(e.onFocusCapture, I.onFocusCapture),
|
|
9102
|
+
onBlurCapture: G(e.onBlurCapture, I.onBlurCapture),
|
|
9103
|
+
onPointerDownCapture: G(
|
|
9104
9104
|
e.onPointerDownCapture,
|
|
9105
9105
|
S.onPointerDownCapture
|
|
9106
9106
|
)
|
|
@@ -9389,35 +9389,35 @@ function vw(e) {
|
|
|
9389
9389
|
isPositioned: !1
|
|
9390
9390
|
}), [g, m] = w.useState(r);
|
|
9391
9391
|
yr(g, r) || m(r);
|
|
9392
|
-
const [p, f] = w.useState(null), [y, b] = w.useState(null), _ = w.useCallback((
|
|
9393
|
-
|
|
9394
|
-
}, []), v = w.useCallback((
|
|
9395
|
-
|
|
9396
|
-
}, []), E = s || p, S = i || y, I = w.useRef(null), x = w.useRef(null), T = w.useRef(d),
|
|
9392
|
+
const [p, f] = w.useState(null), [y, b] = w.useState(null), _ = w.useCallback((D) => {
|
|
9393
|
+
D !== I.current && (I.current = D, f(D));
|
|
9394
|
+
}, []), v = w.useCallback((D) => {
|
|
9395
|
+
D !== x.current && (x.current = D, b(D));
|
|
9396
|
+
}, []), E = s || p, S = i || y, I = w.useRef(null), x = w.useRef(null), T = w.useRef(d), k = c != null, M = oo(c), j = oo(o), O = oo(l), R = w.useCallback(() => {
|
|
9397
9397
|
if (!I.current || !x.current)
|
|
9398
9398
|
return;
|
|
9399
|
-
const
|
|
9399
|
+
const D = {
|
|
9400
9400
|
placement: t,
|
|
9401
9401
|
strategy: n,
|
|
9402
9402
|
middleware: g
|
|
9403
9403
|
};
|
|
9404
|
-
|
|
9404
|
+
j.current && (D.platform = j.current), Tc(I.current, x.current, D).then((N) => {
|
|
9405
9405
|
const ie = {
|
|
9406
|
-
...
|
|
9406
|
+
...N,
|
|
9407
9407
|
// The floating element's position may be recomputed while it's closed
|
|
9408
9408
|
// but still mounted (such as when transitioning out). To ensure
|
|
9409
9409
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
9410
9410
|
// setting it to `true` when `open === false` (must be specified).
|
|
9411
|
-
isPositioned:
|
|
9411
|
+
isPositioned: O.current !== !1
|
|
9412
9412
|
};
|
|
9413
9413
|
L.current && !yr(T.current, ie) && (T.current = ie, ai.flushSync(() => {
|
|
9414
9414
|
u(ie);
|
|
9415
9415
|
}));
|
|
9416
9416
|
});
|
|
9417
|
-
}, [g, t, n,
|
|
9417
|
+
}, [g, t, n, j, O]);
|
|
9418
9418
|
tr(() => {
|
|
9419
|
-
l === !1 && T.current.isPositioned && (T.current.isPositioned = !1, u((
|
|
9420
|
-
...
|
|
9419
|
+
l === !1 && T.current.isPositioned && (T.current.isPositioned = !1, u((D) => ({
|
|
9420
|
+
...D,
|
|
9421
9421
|
isPositioned: !1
|
|
9422
9422
|
})));
|
|
9423
9423
|
}, [l]);
|
|
@@ -9426,47 +9426,47 @@ function vw(e) {
|
|
|
9426
9426
|
L.current = !1;
|
|
9427
9427
|
}), []), tr(() => {
|
|
9428
9428
|
if (E && (I.current = E), S && (x.current = S), E && S) {
|
|
9429
|
-
if (
|
|
9430
|
-
return
|
|
9429
|
+
if (M.current)
|
|
9430
|
+
return M.current(E, S, R);
|
|
9431
9431
|
R();
|
|
9432
9432
|
}
|
|
9433
|
-
}, [E, S, R,
|
|
9433
|
+
}, [E, S, R, M, k]);
|
|
9434
9434
|
const Q = w.useMemo(() => ({
|
|
9435
9435
|
reference: I,
|
|
9436
9436
|
floating: x,
|
|
9437
9437
|
setReference: _,
|
|
9438
9438
|
setFloating: v
|
|
9439
|
-
}), [_, v]),
|
|
9439
|
+
}), [_, v]), B = w.useMemo(() => ({
|
|
9440
9440
|
reference: E,
|
|
9441
9441
|
floating: S
|
|
9442
9442
|
}), [E, S]), q = w.useMemo(() => {
|
|
9443
|
-
const
|
|
9443
|
+
const D = {
|
|
9444
9444
|
position: n,
|
|
9445
9445
|
left: 0,
|
|
9446
9446
|
top: 0
|
|
9447
9447
|
};
|
|
9448
|
-
if (!
|
|
9449
|
-
return
|
|
9450
|
-
const
|
|
9448
|
+
if (!B.floating)
|
|
9449
|
+
return D;
|
|
9450
|
+
const N = ka(B.floating, d.x), ie = ka(B.floating, d.y);
|
|
9451
9451
|
return a ? {
|
|
9452
|
-
...
|
|
9453
|
-
transform: "translate(" +
|
|
9454
|
-
...zc(
|
|
9452
|
+
...D,
|
|
9453
|
+
transform: "translate(" + N + "px, " + ie + "px)",
|
|
9454
|
+
...zc(B.floating) >= 1.5 && {
|
|
9455
9455
|
willChange: "transform"
|
|
9456
9456
|
}
|
|
9457
9457
|
} : {
|
|
9458
9458
|
position: n,
|
|
9459
|
-
left:
|
|
9459
|
+
left: N,
|
|
9460
9460
|
top: ie
|
|
9461
9461
|
};
|
|
9462
|
-
}, [n, a,
|
|
9462
|
+
}, [n, a, B.floating, d.x, d.y]);
|
|
9463
9463
|
return w.useMemo(() => ({
|
|
9464
9464
|
...d,
|
|
9465
9465
|
update: R,
|
|
9466
9466
|
refs: Q,
|
|
9467
|
-
elements:
|
|
9467
|
+
elements: B,
|
|
9468
9468
|
floatingStyles: q
|
|
9469
|
-
}), [d, R, Q,
|
|
9469
|
+
}), [d, R, Q, B, q]);
|
|
9470
9470
|
}
|
|
9471
9471
|
const yw = (e) => {
|
|
9472
9472
|
function t(n) {
|
|
@@ -9555,16 +9555,16 @@ var qo = "Popper", [Zc, Uc] = An(qo), [Rw, jc] = Zc(qo), Bc = (e) => {
|
|
|
9555
9555
|
return /* @__PURE__ */ h(Rw, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
9556
9556
|
};
|
|
9557
9557
|
Bc.displayName = qo;
|
|
9558
|
-
var
|
|
9558
|
+
var Hc = "PopperAnchor", Vc = w.forwardRef(
|
|
9559
9559
|
(e, t) => {
|
|
9560
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e, s = jc(
|
|
9560
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, s = jc(Hc, n), i = w.useRef(null), a = we(t, i), c = w.useRef(null);
|
|
9561
9561
|
return w.useEffect(() => {
|
|
9562
9562
|
const l = c.current;
|
|
9563
9563
|
c.current = r?.current || i.current, l !== c.current && s.onAnchorChange(c.current);
|
|
9564
9564
|
}), r ? null : /* @__PURE__ */ h(be.div, { ...o, ref: a });
|
|
9565
9565
|
}
|
|
9566
9566
|
);
|
|
9567
|
-
|
|
9567
|
+
Vc.displayName = Hc;
|
|
9568
9568
|
var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
|
|
9569
9569
|
(e, t) => {
|
|
9570
9570
|
const {
|
|
@@ -9582,15 +9582,15 @@ var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
|
|
|
9582
9582
|
updatePositionStrategy: m = "optimized",
|
|
9583
9583
|
onPlaced: p,
|
|
9584
9584
|
...f
|
|
9585
|
-
} = e, y = jc(Qo, n), [b, _] = w.useState(null), v = we(t, (ce) => _(ce)), [E, S] = w.useState(null), I = Aw(E), x = I?.width ?? 0, T = I?.height ?? 0,
|
|
9586
|
-
padding:
|
|
9587
|
-
boundary:
|
|
9585
|
+
} = e, y = jc(Qo, n), [b, _] = w.useState(null), v = we(t, (ce) => _(ce)), [E, S] = w.useState(null), I = Aw(E), x = I?.width ?? 0, T = I?.height ?? 0, k = r + (s !== "center" ? "-" + s : ""), M = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, j = Array.isArray(l) ? l : [l], O = j.length > 0, R = {
|
|
9586
|
+
padding: M,
|
|
9587
|
+
boundary: j.filter(Mw),
|
|
9588
9588
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
9589
|
-
altBoundary:
|
|
9590
|
-
}, { refs: L, floatingStyles: Q, placement:
|
|
9589
|
+
altBoundary: O
|
|
9590
|
+
}, { refs: L, floatingStyles: Q, placement: B, isPositioned: q, middlewareData: D } = vw({
|
|
9591
9591
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
9592
9592
|
strategy: "fixed",
|
|
9593
|
-
placement:
|
|
9593
|
+
placement: k,
|
|
9594
9594
|
whileElementsMounted: (...ce) => qy(...ce, {
|
|
9595
9595
|
animationFrame: m === "always"
|
|
9596
9596
|
}),
|
|
@@ -9617,11 +9617,11 @@ var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
|
|
|
9617
9617
|
kw({ arrowWidth: x, arrowHeight: T }),
|
|
9618
9618
|
g && Cw({ strategy: "referenceHidden", ...R })
|
|
9619
9619
|
]
|
|
9620
|
-
}), [
|
|
9620
|
+
}), [N, ie] = Jc(B), Ie = Je(p);
|
|
9621
9621
|
yt(() => {
|
|
9622
9622
|
q && Ie?.();
|
|
9623
9623
|
}, [q, Ie]);
|
|
9624
|
-
const ze =
|
|
9624
|
+
const ze = D.arrow?.x, me = D.arrow?.y, Ee = D.arrow?.centerOffset !== 0, [kt, qe] = w.useState();
|
|
9625
9625
|
return yt(() => {
|
|
9626
9626
|
b && qe(window.getComputedStyle(b).zIndex);
|
|
9627
9627
|
}, [b]), /* @__PURE__ */ h(
|
|
@@ -9636,13 +9636,13 @@ var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
|
|
|
9636
9636
|
minWidth: "max-content",
|
|
9637
9637
|
zIndex: kt,
|
|
9638
9638
|
"--radix-popper-transform-origin": [
|
|
9639
|
-
|
|
9640
|
-
|
|
9639
|
+
D.transformOrigin?.x,
|
|
9640
|
+
D.transformOrigin?.y
|
|
9641
9641
|
].join(" "),
|
|
9642
9642
|
// hide the content if using the hide middleware and should be hidden
|
|
9643
9643
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
9644
9644
|
// as if the PopperContent isn't there at all
|
|
9645
|
-
...
|
|
9645
|
+
...D.hide?.referenceHidden && {
|
|
9646
9646
|
visibility: "hidden",
|
|
9647
9647
|
pointerEvents: "none"
|
|
9648
9648
|
}
|
|
@@ -9652,7 +9652,7 @@ var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
|
|
|
9652
9652
|
Ow,
|
|
9653
9653
|
{
|
|
9654
9654
|
scope: n,
|
|
9655
|
-
placedSide:
|
|
9655
|
+
placedSide: N,
|
|
9656
9656
|
onArrowChange: S,
|
|
9657
9657
|
arrowX: ze,
|
|
9658
9658
|
arrowY: me,
|
|
@@ -9660,7 +9660,7 @@ var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
|
|
|
9660
9660
|
children: /* @__PURE__ */ h(
|
|
9661
9661
|
be.div,
|
|
9662
9662
|
{
|
|
9663
|
-
"data-side":
|
|
9663
|
+
"data-side": N,
|
|
9664
9664
|
"data-align": ie,
|
|
9665
9665
|
...f,
|
|
9666
9666
|
ref: v,
|
|
@@ -9746,7 +9746,7 @@ function Jc(e) {
|
|
|
9746
9746
|
const [t, n = "center"] = e.split("-");
|
|
9747
9747
|
return [t, n];
|
|
9748
9748
|
}
|
|
9749
|
-
var Kc = Bc, Dw =
|
|
9749
|
+
var Kc = Bc, Dw = Vc, $w = Wc, Lw = Yc, zw = "Portal", Xc = w.forwardRef((e, t) => {
|
|
9750
9750
|
const { container: n, ...r } = e, [o, s] = w.useState(!1);
|
|
9751
9751
|
yt(() => s(!0), []);
|
|
9752
9752
|
const i = n || o && globalThis?.document?.body;
|
|
@@ -9817,10 +9817,10 @@ function Uw(e) {
|
|
|
9817
9817
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
9818
9818
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
9819
9819
|
}
|
|
9820
|
-
var so = "rovingFocusGroup.onEntryFocus", jw = { bubbles: !1, cancelable: !0 }, On = "RovingFocusGroup", [Oo, qc, Bw] = Nc(On), [
|
|
9820
|
+
var so = "rovingFocusGroup.onEntryFocus", jw = { bubbles: !1, cancelable: !0 }, On = "RovingFocusGroup", [Oo, qc, Bw] = Nc(On), [Hw, Qc] = An(
|
|
9821
9821
|
On,
|
|
9822
9822
|
[Bw]
|
|
9823
|
-
), [
|
|
9823
|
+
), [Vw, Ww] = Hw(On), el = w.forwardRef(
|
|
9824
9824
|
(e, t) => /* @__PURE__ */ h(Oo.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ h(Oo.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ h(Gw, { ...e, ref: t }) }) })
|
|
9825
9825
|
);
|
|
9826
9826
|
el.displayName = On;
|
|
@@ -9847,7 +9847,7 @@ var Gw = w.forwardRef((e, t) => {
|
|
|
9847
9847
|
if (T)
|
|
9848
9848
|
return T.addEventListener(so, v), () => T.removeEventListener(so, v);
|
|
9849
9849
|
}, [v]), /* @__PURE__ */ h(
|
|
9850
|
-
|
|
9850
|
+
Vw,
|
|
9851
9851
|
{
|
|
9852
9852
|
scope: n,
|
|
9853
9853
|
orientation: r,
|
|
@@ -9875,23 +9875,23 @@ var Gw = w.forwardRef((e, t) => {
|
|
|
9875
9875
|
...u,
|
|
9876
9876
|
ref: m,
|
|
9877
9877
|
style: { outline: "none", ...e.style },
|
|
9878
|
-
onMouseDown:
|
|
9878
|
+
onMouseDown: G(e.onMouseDown, () => {
|
|
9879
9879
|
S.current = !0;
|
|
9880
9880
|
}),
|
|
9881
|
-
onFocus:
|
|
9882
|
-
const
|
|
9883
|
-
if (T.target === T.currentTarget &&
|
|
9884
|
-
const
|
|
9885
|
-
if (T.currentTarget.dispatchEvent(
|
|
9886
|
-
const
|
|
9881
|
+
onFocus: G(e.onFocus, (T) => {
|
|
9882
|
+
const k = !S.current;
|
|
9883
|
+
if (T.target === T.currentTarget && k && !b) {
|
|
9884
|
+
const M = new CustomEvent(so, jw);
|
|
9885
|
+
if (T.currentTarget.dispatchEvent(M), !M.defaultPrevented) {
|
|
9886
|
+
const j = E().filter((B) => B.focusable), O = j.find((B) => B.active), R = j.find((B) => B.id === f), Q = [O, R, ...j].filter(
|
|
9887
9887
|
Boolean
|
|
9888
|
-
).map((
|
|
9888
|
+
).map((B) => B.ref.current);
|
|
9889
9889
|
rl(Q, d);
|
|
9890
9890
|
}
|
|
9891
9891
|
}
|
|
9892
9892
|
S.current = !1;
|
|
9893
9893
|
}),
|
|
9894
|
-
onBlur:
|
|
9894
|
+
onBlur: G(e.onBlur, () => _(!1))
|
|
9895
9895
|
}
|
|
9896
9896
|
)
|
|
9897
9897
|
}
|
|
@@ -9923,11 +9923,11 @@ var Gw = w.forwardRef((e, t) => {
|
|
|
9923
9923
|
"data-orientation": d.orientation,
|
|
9924
9924
|
...a,
|
|
9925
9925
|
ref: t,
|
|
9926
|
-
onMouseDown:
|
|
9926
|
+
onMouseDown: G(e.onMouseDown, (y) => {
|
|
9927
9927
|
r ? d.onItemFocus(l) : y.preventDefault();
|
|
9928
9928
|
}),
|
|
9929
|
-
onFocus:
|
|
9930
|
-
onKeyDown:
|
|
9929
|
+
onFocus: G(e.onFocus, () => d.onItemFocus(l)),
|
|
9930
|
+
onKeyDown: G(e.onKeyDown, (y) => {
|
|
9931
9931
|
if (y.key === "Tab" && y.shiftKey) {
|
|
9932
9932
|
d.onItemShiftTab();
|
|
9933
9933
|
return;
|
|
@@ -9986,7 +9986,7 @@ var qw = el, Qw = nl, e_ = function(e) {
|
|
|
9986
9986
|
return null;
|
|
9987
9987
|
var t = Array.isArray(e) ? e[0] : e;
|
|
9988
9988
|
return t.ownerDocument.body;
|
|
9989
|
-
}, Lt = /* @__PURE__ */ new WeakMap(),
|
|
9989
|
+
}, Lt = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Vn = {}, ao = 0, ol = function(e) {
|
|
9990
9990
|
return e && (e.host || ol(e.parentNode));
|
|
9991
9991
|
}, t_ = function(e, t) {
|
|
9992
9992
|
return t.map(function(n) {
|
|
@@ -9999,8 +9999,8 @@ var qw = el, Qw = nl, e_ = function(e) {
|
|
|
9999
9999
|
});
|
|
10000
10000
|
}, n_ = function(e, t, n, r) {
|
|
10001
10001
|
var o = t_(t, Array.isArray(e) ? e : [e]);
|
|
10002
|
-
|
|
10003
|
-
var s =
|
|
10002
|
+
Vn[n] || (Vn[n] = /* @__PURE__ */ new WeakMap());
|
|
10003
|
+
var s = Vn[n], i = [], a = /* @__PURE__ */ new Set(), c = new Set(o), l = function(u) {
|
|
10004
10004
|
!u || a.has(u) || (a.add(u), l(u.parentNode));
|
|
10005
10005
|
};
|
|
10006
10006
|
o.forEach(l);
|
|
@@ -10011,7 +10011,7 @@ var qw = el, Qw = nl, e_ = function(e) {
|
|
|
10011
10011
|
else
|
|
10012
10012
|
try {
|
|
10013
10013
|
var m = g.getAttribute(r), p = m !== null && m !== "false", f = (Lt.get(g) || 0) + 1, y = (s.get(g) || 0) + 1;
|
|
10014
|
-
Lt.set(g, f), s.set(g, y), i.push(g), f === 1 && p &&
|
|
10014
|
+
Lt.set(g, f), s.set(g, y), i.push(g), f === 1 && p && Hn.set(g, !0), y === 1 && g.setAttribute(n, "true"), p || g.setAttribute(r, "true");
|
|
10015
10015
|
} catch (b) {
|
|
10016
10016
|
console.error("aria-hidden: cannot operate on ", g, b);
|
|
10017
10017
|
}
|
|
@@ -10020,8 +10020,8 @@ var qw = el, Qw = nl, e_ = function(e) {
|
|
|
10020
10020
|
return d(t), a.clear(), ao++, function() {
|
|
10021
10021
|
i.forEach(function(u) {
|
|
10022
10022
|
var g = Lt.get(u) - 1, m = s.get(u) - 1;
|
|
10023
|
-
Lt.set(u, g), s.set(u, m), g || (
|
|
10024
|
-
}), ao--, ao || (Lt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(),
|
|
10023
|
+
Lt.set(u, g), s.set(u, m), g || (Hn.has(u) || u.removeAttribute(r), Hn.delete(u)), m || u.removeAttribute(n);
|
|
10024
|
+
}), ao--, ao || (Lt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Vn = {});
|
|
10025
10025
|
};
|
|
10026
10026
|
}, r_ = function(e, t, n) {
|
|
10027
10027
|
n === void 0 && (n = "data-aria-hidden");
|
|
@@ -10056,7 +10056,7 @@ function io(e, t) {
|
|
|
10056
10056
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
10057
10057
|
}
|
|
10058
10058
|
function i_(e, t) {
|
|
10059
|
-
var n =
|
|
10059
|
+
var n = H(function() {
|
|
10060
10060
|
return {
|
|
10061
10061
|
// value
|
|
10062
10062
|
value: e,
|
|
@@ -10432,18 +10432,18 @@ function L_(e) {
|
|
|
10432
10432
|
var b = Gn(f), _ = n.current, v = "deltaX" in f ? f.deltaX : _[0] - b[0], E = "deltaY" in f ? f.deltaY : _[1] - b[1], S, I = f.target, x = Math.abs(v) > Math.abs(E) ? "h" : "v";
|
|
10433
10433
|
if ("touches" in f && x === "h" && I.type === "range")
|
|
10434
10434
|
return !1;
|
|
10435
|
-
var T = window.getSelection(),
|
|
10436
|
-
if (
|
|
10435
|
+
var T = window.getSelection(), k = T && T.anchorNode, M = k ? k === I || k.contains(I) : !1;
|
|
10436
|
+
if (M)
|
|
10437
10437
|
return !1;
|
|
10438
|
-
var
|
|
10439
|
-
if (!
|
|
10438
|
+
var j = La(x, I);
|
|
10439
|
+
if (!j)
|
|
10440
10440
|
return !0;
|
|
10441
|
-
if (
|
|
10441
|
+
if (j ? S = x : (S = x === "v" ? "h" : "v", j = La(x, I)), !j)
|
|
10442
10442
|
return !1;
|
|
10443
10443
|
if (!r.current && "changedTouches" in f && (v || E) && (r.current = S), !S)
|
|
10444
10444
|
return !0;
|
|
10445
|
-
var
|
|
10446
|
-
return M_(
|
|
10445
|
+
var O = r.current || S;
|
|
10446
|
+
return M_(O, y, f, O === "h" ? v : E);
|
|
10447
10447
|
}, []), c = w.useCallback(function(f) {
|
|
10448
10448
|
var y = f;
|
|
10449
10449
|
if (!(!Ft.length || Ft[Ft.length - 1] !== s)) {
|
|
@@ -10510,8 +10510,8 @@ var Po = ["Enter", " "], Z_ = ["ArrowDown", "PageUp", "Home"], pl = ["ArrowUp",
|
|
|
10510
10510
|
}, B_ = {
|
|
10511
10511
|
ltr: ["ArrowLeft"],
|
|
10512
10512
|
rtl: ["ArrowRight"]
|
|
10513
|
-
}, Nn = "Menu", [bn,
|
|
10514
|
-
|
|
10513
|
+
}, Nn = "Menu", [bn, H_, V_] = Nc(Nn), [Mt, ml] = An(Nn, [
|
|
10514
|
+
V_,
|
|
10515
10515
|
Uc,
|
|
10516
10516
|
Qc
|
|
10517
10517
|
]), Pn = Uc(), hl = Qc(), [gl, Et] = Mt(Nn), [W_, Mn] = Mt(Nn), vl = (e) => {
|
|
@@ -10579,7 +10579,7 @@ var Re = "MenuContent", [J_, ns] = Mt(Re), wl = w.forwardRef(
|
|
|
10579
10579
|
trapFocus: n.open,
|
|
10580
10580
|
disableOutsidePointerEvents: n.open,
|
|
10581
10581
|
disableOutsideScroll: !0,
|
|
10582
|
-
onFocusOutside:
|
|
10582
|
+
onFocusOutside: G(
|
|
10583
10583
|
e.onFocusOutside,
|
|
10584
10584
|
(s) => s.preventDefault(),
|
|
10585
10585
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -10618,48 +10618,48 @@ var Re = "MenuContent", [J_, ns] = Mt(Re), wl = w.forwardRef(
|
|
|
10618
10618
|
onDismiss: m,
|
|
10619
10619
|
disableOutsideScroll: p,
|
|
10620
10620
|
...f
|
|
10621
|
-
} = e, y = Et(Re, n), b = Mn(Re, n), _ = Pn(n), v = hl(n), E =
|
|
10622
|
-
const ie =
|
|
10621
|
+
} = e, y = Et(Re, n), b = Mn(Re, n), _ = Pn(n), v = hl(n), E = H_(n), [S, I] = w.useState(null), x = w.useRef(null), T = we(t, x, y.onContentChange), k = w.useRef(0), M = w.useRef(""), j = w.useRef(0), O = w.useRef(null), R = w.useRef("right"), L = w.useRef(0), Q = p ? fl : w.Fragment, B = p ? { as: q_, allowPinchZoom: !0 } : void 0, q = (N) => {
|
|
10622
|
+
const ie = M.current + N, Ie = E().filter((ce) => !ce.disabled), ze = document.activeElement, me = Ie.find((ce) => ce.ref.current === ze)?.textValue, Ee = Ie.map((ce) => ce.textValue), kt = uE(Ee, ie, me), qe = Ie.find((ce) => ce.textValue === kt)?.ref.current;
|
|
10623
10623
|
(function ce(St) {
|
|
10624
|
-
|
|
10624
|
+
M.current = St, window.clearTimeout(k.current), St !== "" && (k.current = window.setTimeout(() => ce(""), 1e3));
|
|
10625
10625
|
})(ie), qe && setTimeout(() => qe.focus());
|
|
10626
10626
|
};
|
|
10627
|
-
w.useEffect(() => () => window.clearTimeout(
|
|
10628
|
-
const
|
|
10627
|
+
w.useEffect(() => () => window.clearTimeout(k.current), []), sw();
|
|
10628
|
+
const D = w.useCallback((N) => R.current === O.current?.side && fE(N, O.current?.area), []);
|
|
10629
10629
|
return /* @__PURE__ */ h(
|
|
10630
10630
|
J_,
|
|
10631
10631
|
{
|
|
10632
10632
|
scope: n,
|
|
10633
|
-
searchRef:
|
|
10633
|
+
searchRef: M,
|
|
10634
10634
|
onItemEnter: w.useCallback(
|
|
10635
|
-
(
|
|
10636
|
-
|
|
10635
|
+
(N) => {
|
|
10636
|
+
D(N) && N.preventDefault();
|
|
10637
10637
|
},
|
|
10638
|
-
[
|
|
10638
|
+
[D]
|
|
10639
10639
|
),
|
|
10640
10640
|
onItemLeave: w.useCallback(
|
|
10641
|
-
(
|
|
10642
|
-
|
|
10641
|
+
(N) => {
|
|
10642
|
+
D(N) || (x.current?.focus(), I(null));
|
|
10643
10643
|
},
|
|
10644
|
-
[
|
|
10644
|
+
[D]
|
|
10645
10645
|
),
|
|
10646
10646
|
onTriggerLeave: w.useCallback(
|
|
10647
|
-
(
|
|
10648
|
-
|
|
10647
|
+
(N) => {
|
|
10648
|
+
D(N) && N.preventDefault();
|
|
10649
10649
|
},
|
|
10650
|
-
[
|
|
10650
|
+
[D]
|
|
10651
10651
|
),
|
|
10652
|
-
pointerGraceTimerRef:
|
|
10653
|
-
onPointerGraceIntentChange: w.useCallback((
|
|
10654
|
-
|
|
10652
|
+
pointerGraceTimerRef: j,
|
|
10653
|
+
onPointerGraceIntentChange: w.useCallback((N) => {
|
|
10654
|
+
O.current = N;
|
|
10655
10655
|
}, []),
|
|
10656
|
-
children: /* @__PURE__ */ h(Q, { ...
|
|
10656
|
+
children: /* @__PURE__ */ h(Q, { ...B, children: /* @__PURE__ */ h(
|
|
10657
10657
|
$c,
|
|
10658
10658
|
{
|
|
10659
10659
|
asChild: !0,
|
|
10660
10660
|
trapped: o,
|
|
10661
|
-
onMountAutoFocus:
|
|
10662
|
-
|
|
10661
|
+
onMountAutoFocus: G(s, (N) => {
|
|
10662
|
+
N.preventDefault(), x.current?.focus({ preventScroll: !0 });
|
|
10663
10663
|
}),
|
|
10664
10664
|
onUnmountAutoFocus: i,
|
|
10665
10665
|
children: /* @__PURE__ */ h(
|
|
@@ -10682,8 +10682,8 @@ var Re = "MenuContent", [J_, ns] = Mt(Re), wl = w.forwardRef(
|
|
|
10682
10682
|
loop: r,
|
|
10683
10683
|
currentTabStopId: S,
|
|
10684
10684
|
onCurrentTabStopIdChange: I,
|
|
10685
|
-
onEntryFocus:
|
|
10686
|
-
b.isUsingKeyboardRef.current ||
|
|
10685
|
+
onEntryFocus: G(c, (N) => {
|
|
10686
|
+
b.isUsingKeyboardRef.current || N.preventDefault();
|
|
10687
10687
|
}),
|
|
10688
10688
|
preventScrollOnEntryFocus: !0,
|
|
10689
10689
|
children: /* @__PURE__ */ h(
|
|
@@ -10698,25 +10698,25 @@ var Re = "MenuContent", [J_, ns] = Mt(Re), wl = w.forwardRef(
|
|
|
10698
10698
|
...f,
|
|
10699
10699
|
ref: T,
|
|
10700
10700
|
style: { outline: "none", ...f.style },
|
|
10701
|
-
onKeyDown:
|
|
10702
|
-
const Ie =
|
|
10703
|
-
Ie && (
|
|
10701
|
+
onKeyDown: G(f.onKeyDown, (N) => {
|
|
10702
|
+
const Ie = N.target.closest("[data-radix-menu-content]") === N.currentTarget, ze = N.ctrlKey || N.altKey || N.metaKey, me = N.key.length === 1;
|
|
10703
|
+
Ie && (N.key === "Tab" && N.preventDefault(), !ze && me && q(N.key));
|
|
10704
10704
|
const Ee = x.current;
|
|
10705
|
-
if (
|
|
10706
|
-
|
|
10705
|
+
if (N.target !== Ee || !U_.includes(N.key)) return;
|
|
10706
|
+
N.preventDefault();
|
|
10707
10707
|
const qe = E().filter((ce) => !ce.disabled).map((ce) => ce.ref.current);
|
|
10708
|
-
pl.includes(
|
|
10708
|
+
pl.includes(N.key) && qe.reverse(), cE(qe);
|
|
10709
10709
|
}),
|
|
10710
|
-
onBlur:
|
|
10711
|
-
|
|
10710
|
+
onBlur: G(e.onBlur, (N) => {
|
|
10711
|
+
N.currentTarget.contains(N.target) || (window.clearTimeout(k.current), M.current = "");
|
|
10712
10712
|
}),
|
|
10713
|
-
onPointerMove:
|
|
10713
|
+
onPointerMove: G(
|
|
10714
10714
|
e.onPointerMove,
|
|
10715
|
-
wn((
|
|
10716
|
-
const ie =
|
|
10717
|
-
if (
|
|
10718
|
-
const ze =
|
|
10719
|
-
R.current = ze, L.current =
|
|
10715
|
+
wn((N) => {
|
|
10716
|
+
const ie = N.target, Ie = L.current !== N.clientX;
|
|
10717
|
+
if (N.currentTarget.contains(ie) && Ie) {
|
|
10718
|
+
const ze = N.clientX > L.current ? "right" : "left";
|
|
10719
|
+
R.current = ze, L.current = N.clientX;
|
|
10720
10720
|
}
|
|
10721
10721
|
})
|
|
10722
10722
|
)
|
|
@@ -10762,14 +10762,14 @@ var br = "MenuItem", Za = "menu.itemSelect", Mr = w.forwardRef(
|
|
|
10762
10762
|
...o,
|
|
10763
10763
|
ref: c,
|
|
10764
10764
|
disabled: n,
|
|
10765
|
-
onClick:
|
|
10765
|
+
onClick: G(e.onClick, d),
|
|
10766
10766
|
onPointerDown: (u) => {
|
|
10767
10767
|
e.onPointerDown?.(u), l.current = !0;
|
|
10768
10768
|
},
|
|
10769
|
-
onPointerUp:
|
|
10769
|
+
onPointerUp: G(e.onPointerUp, (u) => {
|
|
10770
10770
|
l.current || u.currentTarget?.click();
|
|
10771
10771
|
}),
|
|
10772
|
-
onKeyDown:
|
|
10772
|
+
onKeyDown: G(e.onKeyDown, (u) => {
|
|
10773
10773
|
const g = a.searchRef.current !== "";
|
|
10774
10774
|
n || g && u.key === " " || Po.includes(u.key) && (u.currentTarget.click(), u.preventDefault());
|
|
10775
10775
|
})
|
|
@@ -10799,18 +10799,18 @@ var El = w.forwardRef(
|
|
|
10799
10799
|
"data-disabled": r ? "" : void 0,
|
|
10800
10800
|
...s,
|
|
10801
10801
|
ref: l,
|
|
10802
|
-
onPointerMove:
|
|
10802
|
+
onPointerMove: G(
|
|
10803
10803
|
e.onPointerMove,
|
|
10804
10804
|
wn((p) => {
|
|
10805
10805
|
r ? i.onItemLeave(p) : (i.onItemEnter(p), p.defaultPrevented || p.currentTarget.focus({ preventScroll: !0 }));
|
|
10806
10806
|
})
|
|
10807
10807
|
),
|
|
10808
|
-
onPointerLeave:
|
|
10808
|
+
onPointerLeave: G(
|
|
10809
10809
|
e.onPointerLeave,
|
|
10810
10810
|
wn((p) => i.onItemLeave(p))
|
|
10811
10811
|
),
|
|
10812
|
-
onFocus:
|
|
10813
|
-
onBlur:
|
|
10812
|
+
onFocus: G(e.onFocus, () => u(!0)),
|
|
10813
|
+
onBlur: G(e.onBlur, () => u(!1))
|
|
10814
10814
|
}
|
|
10815
10815
|
) })
|
|
10816
10816
|
}
|
|
@@ -10827,7 +10827,7 @@ var El = w.forwardRef(
|
|
|
10827
10827
|
...o,
|
|
10828
10828
|
ref: t,
|
|
10829
10829
|
"data-state": is(n),
|
|
10830
|
-
onSelect:
|
|
10830
|
+
onSelect: G(
|
|
10831
10831
|
o.onSelect,
|
|
10832
10832
|
() => r?.(wr(n) ? !0 : !n),
|
|
10833
10833
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -10859,7 +10859,7 @@ var Il = "MenuRadioItem", Tl = w.forwardRef(
|
|
|
10859
10859
|
...r,
|
|
10860
10860
|
ref: t,
|
|
10861
10861
|
"data-state": is(s),
|
|
10862
|
-
onSelect:
|
|
10862
|
+
onSelect: G(
|
|
10863
10863
|
r.onSelect,
|
|
10864
10864
|
() => o.onValueChange?.(n),
|
|
10865
10865
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -10962,7 +10962,7 @@ var rn = "MenuSubTrigger", kl = w.forwardRef(
|
|
|
10962
10962
|
onClick: (u) => {
|
|
10963
10963
|
e.onClick?.(u), !(e.disabled || u.defaultPrevented) && (u.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
10964
10964
|
},
|
|
10965
|
-
onPointerMove:
|
|
10965
|
+
onPointerMove: G(
|
|
10966
10966
|
e.onPointerMove,
|
|
10967
10967
|
wn((u) => {
|
|
10968
10968
|
s.onItemEnter(u), !u.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
@@ -10970,7 +10970,7 @@ var rn = "MenuSubTrigger", kl = w.forwardRef(
|
|
|
10970
10970
|
}, 100));
|
|
10971
10971
|
})
|
|
10972
10972
|
),
|
|
10973
|
-
onPointerLeave:
|
|
10973
|
+
onPointerLeave: G(
|
|
10974
10974
|
e.onPointerLeave,
|
|
10975
10975
|
wn((u) => {
|
|
10976
10976
|
d();
|
|
@@ -10998,7 +10998,7 @@ var rn = "MenuSubTrigger", kl = w.forwardRef(
|
|
|
10998
10998
|
}
|
|
10999
10999
|
})
|
|
11000
11000
|
),
|
|
11001
|
-
onKeyDown:
|
|
11001
|
+
onKeyDown: G(e.onKeyDown, (u) => {
|
|
11002
11002
|
const g = s.searchRef.current !== "";
|
|
11003
11003
|
e.disabled || g && u.key === " " || j_[r.dir].includes(u.key) && (n.onOpenChange(!0), n.content?.focus(), u.preventDefault());
|
|
11004
11004
|
})
|
|
@@ -11026,13 +11026,13 @@ var Dl = "MenuSubContent", $l = w.forwardRef(
|
|
|
11026
11026
|
i.isUsingKeyboardRef.current && c.current?.focus(), d.preventDefault();
|
|
11027
11027
|
},
|
|
11028
11028
|
onCloseAutoFocus: (d) => d.preventDefault(),
|
|
11029
|
-
onFocusOutside:
|
|
11029
|
+
onFocusOutside: G(e.onFocusOutside, (d) => {
|
|
11030
11030
|
d.target !== a.trigger && s.onOpenChange(!1);
|
|
11031
11031
|
}),
|
|
11032
|
-
onEscapeKeyDown:
|
|
11032
|
+
onEscapeKeyDown: G(e.onEscapeKeyDown, (d) => {
|
|
11033
11033
|
i.onClose(), d.preventDefault();
|
|
11034
11034
|
}),
|
|
11035
|
-
onKeyDown:
|
|
11035
|
+
onKeyDown: G(e.onKeyDown, (d) => {
|
|
11036
11036
|
const u = d.currentTarget.contains(d.target), g = B_[i.dir].includes(d.key);
|
|
11037
11037
|
u && g && (s.onOpenChange(!1), a.trigger?.focus(), d.preventDefault());
|
|
11038
11038
|
})
|
|
@@ -11134,10 +11134,10 @@ var Zl = "DropdownMenuTrigger", Ul = w.forwardRef(
|
|
|
11134
11134
|
disabled: r,
|
|
11135
11135
|
...o,
|
|
11136
11136
|
ref: Nr(t, s.triggerRef),
|
|
11137
|
-
onPointerDown:
|
|
11137
|
+
onPointerDown: G(e.onPointerDown, (a) => {
|
|
11138
11138
|
!r && a.button === 0 && a.ctrlKey === !1 && (s.onOpenToggle(), s.open || a.preventDefault());
|
|
11139
11139
|
}),
|
|
11140
|
-
onKeyDown:
|
|
11140
|
+
onKeyDown: G(e.onKeyDown, (a) => {
|
|
11141
11141
|
r || (["Enter", " "].includes(a.key) && s.onOpenToggle(), a.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(a.key) && a.preventDefault());
|
|
11142
11142
|
})
|
|
11143
11143
|
}
|
|
@@ -11150,7 +11150,7 @@ var NE = "DropdownMenuPortal", jl = (e) => {
|
|
|
11150
11150
|
return /* @__PURE__ */ h(hE, { ...r, ...n });
|
|
11151
11151
|
};
|
|
11152
11152
|
jl.displayName = NE;
|
|
11153
|
-
var Bl = "DropdownMenuContent",
|
|
11153
|
+
var Bl = "DropdownMenuContent", Hl = w.forwardRef(
|
|
11154
11154
|
(e, t) => {
|
|
11155
11155
|
const { __scopeDropdownMenu: n, ...r } = e, o = zl(Bl, n), s = he(n), i = w.useRef(!1);
|
|
11156
11156
|
return /* @__PURE__ */ h(
|
|
@@ -11161,10 +11161,10 @@ var Bl = "DropdownMenuContent", Vl = w.forwardRef(
|
|
|
11161
11161
|
...s,
|
|
11162
11162
|
...r,
|
|
11163
11163
|
ref: t,
|
|
11164
|
-
onCloseAutoFocus:
|
|
11164
|
+
onCloseAutoFocus: G(e.onCloseAutoFocus, (a) => {
|
|
11165
11165
|
i.current || o.triggerRef.current?.focus(), i.current = !1, a.preventDefault();
|
|
11166
11166
|
}),
|
|
11167
|
-
onInteractOutside:
|
|
11167
|
+
onInteractOutside: G(e.onInteractOutside, (a) => {
|
|
11168
11168
|
const c = a.detail.originalEvent, l = c.button === 0 && c.ctrlKey === !0, d = c.button === 2 || l;
|
|
11169
11169
|
(!o.modal || d) && (i.current = !0);
|
|
11170
11170
|
}),
|
|
@@ -11180,7 +11180,7 @@ var Bl = "DropdownMenuContent", Vl = w.forwardRef(
|
|
|
11180
11180
|
);
|
|
11181
11181
|
}
|
|
11182
11182
|
);
|
|
11183
|
-
|
|
11183
|
+
Hl.displayName = Bl;
|
|
11184
11184
|
var PE = "DropdownMenuGroup", ME = w.forwardRef(
|
|
11185
11185
|
(e, t) => {
|
|
11186
11186
|
const { __scopeDropdownMenu: n, ...r } = e, o = he(n);
|
|
@@ -11188,13 +11188,13 @@ var PE = "DropdownMenuGroup", ME = w.forwardRef(
|
|
|
11188
11188
|
}
|
|
11189
11189
|
);
|
|
11190
11190
|
ME.displayName = PE;
|
|
11191
|
-
var kE = "DropdownMenuLabel",
|
|
11191
|
+
var kE = "DropdownMenuLabel", Vl = w.forwardRef(
|
|
11192
11192
|
(e, t) => {
|
|
11193
11193
|
const { __scopeDropdownMenu: n, ...r } = e, o = he(n);
|
|
11194
11194
|
return /* @__PURE__ */ h(yE, { ...o, ...r, ref: t });
|
|
11195
11195
|
}
|
|
11196
11196
|
);
|
|
11197
|
-
|
|
11197
|
+
Vl.displayName = kE;
|
|
11198
11198
|
var DE = "DropdownMenuItem", Wl = w.forwardRef(
|
|
11199
11199
|
(e, t) => {
|
|
11200
11200
|
const { __scopeDropdownMenu: n, ...r } = e, o = he(n);
|
|
@@ -11222,18 +11222,18 @@ var jE = "DropdownMenuItemIndicator", BE = w.forwardRef((e, t) => {
|
|
|
11222
11222
|
return /* @__PURE__ */ h(SE, { ...o, ...r, ref: t });
|
|
11223
11223
|
});
|
|
11224
11224
|
BE.displayName = jE;
|
|
11225
|
-
var
|
|
11225
|
+
var HE = "DropdownMenuSeparator", Gl = w.forwardRef((e, t) => {
|
|
11226
11226
|
const { __scopeDropdownMenu: n, ...r } = e, o = he(n);
|
|
11227
11227
|
return /* @__PURE__ */ h(CE, { ...o, ...r, ref: t });
|
|
11228
11228
|
});
|
|
11229
|
-
Gl.displayName =
|
|
11230
|
-
var
|
|
11229
|
+
Gl.displayName = HE;
|
|
11230
|
+
var VE = "DropdownMenuArrow", WE = w.forwardRef(
|
|
11231
11231
|
(e, t) => {
|
|
11232
11232
|
const { __scopeDropdownMenu: n, ...r } = e, o = he(n);
|
|
11233
11233
|
return /* @__PURE__ */ h(xE, { ...o, ...r, ref: t });
|
|
11234
11234
|
}
|
|
11235
11235
|
);
|
|
11236
|
-
WE.displayName =
|
|
11236
|
+
WE.displayName = VE;
|
|
11237
11237
|
var GE = (e) => {
|
|
11238
11238
|
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i = he(t), [a, c] = Xo({
|
|
11239
11239
|
prop: r,
|
|
@@ -11267,7 +11267,7 @@ var JE = "DropdownMenuSubContent", Jl = w.forwardRef((e, t) => {
|
|
|
11267
11267
|
);
|
|
11268
11268
|
});
|
|
11269
11269
|
Jl.displayName = JE;
|
|
11270
|
-
var KE = Fl, XE = Ul, Kl = jl, qE =
|
|
11270
|
+
var KE = Fl, XE = Ul, Kl = jl, qE = Hl, QE = Vl, Ua = Wl, eS = Gl, tS = GE, nS = Yl, rS = Jl;
|
|
11271
11271
|
const ja = (e) => {
|
|
11272
11272
|
if (typeof e == "string")
|
|
11273
11273
|
return e;
|
|
@@ -11281,11 +11281,11 @@ const ja = (e) => {
|
|
|
11281
11281
|
return "Element";
|
|
11282
11282
|
};
|
|
11283
11283
|
const oS = "z-100 rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2 prose prose-dark", sS = "z-[60] rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2 mx-3", aS = U("flex items-center flex-row justify-between", "w-full", "m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1", "rounded-md border border-transparent", "text-left text-base select-none cursor-pointer", "outline-hidden focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline", "disabled:cursor-not-allowed disabled:text-copy-medium", "data-highlighted:bg-surface-lighter data-highlighted:border-border-medium data-highlighted:underline", "data-[state=open]:bg-surface-lighter"), iS = (e) => e ? e.startsWith("top") ? "top" : e.startsWith("left") ? "left" : e.startsWith("right") ? "right" : "bottom" : "bottom", cS = (e) => !e || e.endsWith("-start") ? "start" : e.endsWith("-end") ? "end" : "center", Dr = ({ trigger: e, children: t, label: n = "Open menu", defaultPlacement: r = "bottom-start", onOpenChange: o, mode: s = "system", focusMode: i = "system", sideOffset: a = 10, modal: c = !0 }) => {
|
|
11284
|
-
const [l, d] =
|
|
11284
|
+
const [l, d] = H(!1), [u, g] = H(void 0), m = ja(e) === "Button" || ja(e) === "ButtonIcon", p = m ? {
|
|
11285
11285
|
noInternalClick: m,
|
|
11286
11286
|
focusMode: i,
|
|
11287
11287
|
mode: s
|
|
11288
|
-
} : {}, f =
|
|
11288
|
+
} : {}, f = W(null), y = e ? /* @__PURE__ */ ni(e, {
|
|
11289
11289
|
...p,
|
|
11290
11290
|
"aria-label": n,
|
|
11291
11291
|
ref: f
|
|
@@ -11341,7 +11341,7 @@ const Xl = ({ label: e, icon: t, children: n, disabled: r = !1, sideOffset: o =
|
|
|
11341
11341
|
})
|
|
11342
11342
|
]
|
|
11343
11343
|
}),
|
|
11344
|
-
/* @__PURE__ */ h(
|
|
11344
|
+
/* @__PURE__ */ h(Vu, {
|
|
11345
11345
|
className: "ml-2",
|
|
11346
11346
|
size: "size-3",
|
|
11347
11347
|
monotone: !0
|
|
@@ -11518,10 +11518,10 @@ const uS = (e) => {
|
|
|
11518
11518
|
dispatch: r,
|
|
11519
11519
|
setChatId: o,
|
|
11520
11520
|
setInitialMessages: s
|
|
11521
|
-
} = de(Le), [i, a] = Ke(), [c, l] =
|
|
11522
|
-
key:
|
|
11521
|
+
} = de(Le), [i, a] = Ke(), [c, l] = H(!1), [d, u] = H(!1), [g, m] = et({
|
|
11522
|
+
key: He + mu,
|
|
11523
11523
|
initialValue: ""
|
|
11524
|
-
}), [p, f] =
|
|
11524
|
+
}), [p, f] = H(!1), y = (_) => {
|
|
11525
11525
|
o(ht()), s([]), r({
|
|
11526
11526
|
type: Wt,
|
|
11527
11527
|
payload: {
|
|
@@ -11556,8 +11556,8 @@ const uS = (e) => {
|
|
|
11556
11556
|
{
|
|
11557
11557
|
toggleLabel: "Don't show this again",
|
|
11558
11558
|
toggleName: "reasoning-disclosure",
|
|
11559
|
-
maxHeight:
|
|
11560
|
-
noCancelAction:
|
|
11559
|
+
maxHeight: Ht() ? "large" : "medium",
|
|
11560
|
+
noCancelAction: Ht(),
|
|
11561
11561
|
toggleChecked: p,
|
|
11562
11562
|
onToggleChange: (_) => f(_),
|
|
11563
11563
|
showConfirmation: c,
|
|
@@ -11649,7 +11649,7 @@ const uS = (e) => {
|
|
|
11649
11649
|
);
|
|
11650
11650
|
};
|
|
11651
11651
|
function mS(e) {
|
|
11652
|
-
const [t, n] =
|
|
11652
|
+
const [t, n] = H(
|
|
11653
11653
|
() => Ba()
|
|
11654
11654
|
);
|
|
11655
11655
|
return Z(() => {
|
|
@@ -11770,7 +11770,7 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
11770
11770
|
" ",
|
|
11771
11771
|
or(Mo)
|
|
11772
11772
|
] })
|
|
11773
|
-
] }), cs = 1200, eu = 200 * 1024, TS = 0.85,
|
|
11773
|
+
] }), cs = 1200, eu = 200 * 1024, TS = 0.85, Ha = 0.5, AS = 0.1, RS = ["image/jpeg", "image/webp"], OS = ["image/png", "image/jpeg", "image/webp"], tu = (e) => OS.includes(e.type), NS = (e, t, n = cs) => {
|
|
11774
11774
|
if (e <= n && t <= n)
|
|
11775
11775
|
return { width: e, height: t };
|
|
11776
11776
|
const r = e / t;
|
|
@@ -11817,10 +11817,10 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
11817
11817
|
i,
|
|
11818
11818
|
c,
|
|
11819
11819
|
l ? d : 1
|
|
11820
|
-
), u.size <= t || d <=
|
|
11820
|
+
), u.size <= t || d <= Ha)
|
|
11821
11821
|
break;
|
|
11822
11822
|
d -= AS;
|
|
11823
|
-
} while (d >=
|
|
11823
|
+
} while (d >= Ha);
|
|
11824
11824
|
if (u.size >= e.size)
|
|
11825
11825
|
return e;
|
|
11826
11826
|
const m = {
|
|
@@ -11837,10 +11837,10 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
11837
11837
|
}
|
|
11838
11838
|
}, $S = async (e, t = eu, n = cs) => await Promise.all(
|
|
11839
11839
|
e.map((o) => tu(o) ? DS(o, t, n) : Promise.resolve(o))
|
|
11840
|
-
), nu = 24, LS = 500, ru = 1, zS = 5, FS = nu * ru,
|
|
11840
|
+
), nu = 24, LS = 500, ru = 1, zS = 5, FS = nu * ru, Va = zS * nu, ZS = "ready", US = "streaming", jS = "error", BS = "submitted", Yn = (e) => {
|
|
11841
11841
|
e.current && (e.current.style.height = `${FS}px`);
|
|
11842
|
-
},
|
|
11843
|
-
const { user: e, getAccessToken: t } = $e(), n = gr(ar.ADDON.ATTACHMENTS), r = gr(ar.ADDON.REASONING), { allowedModels: o } = ko(), [s, i] =
|
|
11842
|
+
}, HS = () => {
|
|
11843
|
+
const { user: e, getAccessToken: t } = $e(), n = gr(ar.ADDON.ATTACHMENTS), r = gr(ar.ADDON.REASONING), { allowedModels: o } = ko(), [s, i] = H(null), [a, c] = H(!1), [l, d] = H(!1), {
|
|
11844
11844
|
state: { oledMode: u }
|
|
11845
11845
|
} = de(En), {
|
|
11846
11846
|
dispatch: g,
|
|
@@ -11856,12 +11856,12 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
11856
11856
|
} = de(Le), { state: E, dispatch: S } = de(Do), { data: I } = bt({
|
|
11857
11857
|
user: e?.username,
|
|
11858
11858
|
getAccessToken: t
|
|
11859
|
-
}), x =
|
|
11859
|
+
}), x = W(null), T = W(null), k = W(!1), M = W(0), j = W(0), O = W(null), R = W(null), L = id(), [Q, B] = Ke(), q = xS({
|
|
11860
11860
|
oledMode: u,
|
|
11861
|
-
placeholderColor: Q(
|
|
11862
|
-
}),
|
|
11863
|
-
onFinish: (
|
|
11864
|
-
const ue =
|
|
11861
|
+
placeholderColor: Q(B.Placeholder)
|
|
11862
|
+
}), D = r && I?.showReasoningButton, { setMessages: N, status: ie, id: Ie, sendMessage: ze, input: me, setInput: Ee, messages: kt } = wt({
|
|
11863
|
+
onFinish: (Y) => {
|
|
11864
|
+
const ue = Y.message?.metadata;
|
|
11865
11865
|
ue?.tokenUsage && g({
|
|
11866
11866
|
type: lc,
|
|
11867
11867
|
payload: {
|
|
@@ -11869,14 +11869,14 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
11869
11869
|
}
|
|
11870
11870
|
});
|
|
11871
11871
|
}
|
|
11872
|
-
}), qe = mS(!!kt.length), ce =
|
|
11873
|
-
(
|
|
11874
|
-
Ee(
|
|
11872
|
+
}), qe = mS(!!kt.length), ce = J(
|
|
11873
|
+
(Y) => {
|
|
11874
|
+
Ee(Y.target.value);
|
|
11875
11875
|
},
|
|
11876
11876
|
[Ee]
|
|
11877
|
-
), St =
|
|
11878
|
-
(
|
|
11879
|
-
if (
|
|
11877
|
+
), St = J(
|
|
11878
|
+
(Y, fe) => {
|
|
11879
|
+
if (Y.preventDefault(), me.trim()) {
|
|
11880
11880
|
const ue = {
|
|
11881
11881
|
/**
|
|
11882
11882
|
* Include dynamic values that change during runtime. Static values like
|
|
@@ -11907,34 +11907,34 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
11907
11907
|
I?.model,
|
|
11908
11908
|
o
|
|
11909
11909
|
]
|
|
11910
|
-
), kn =
|
|
11911
|
-
async (
|
|
11912
|
-
|
|
11910
|
+
), kn = J(
|
|
11911
|
+
async (Y) => {
|
|
11912
|
+
Y === ZS && g({
|
|
11913
11913
|
type: Rt,
|
|
11914
11914
|
payload: {
|
|
11915
11915
|
loading: !1,
|
|
11916
11916
|
streaming: !1
|
|
11917
11917
|
}
|
|
11918
|
-
}),
|
|
11918
|
+
}), Y === BS && g({
|
|
11919
11919
|
type: Rt,
|
|
11920
11920
|
payload: {
|
|
11921
11921
|
loading: !0,
|
|
11922
11922
|
streaming: !1
|
|
11923
11923
|
}
|
|
11924
|
-
}),
|
|
11924
|
+
}), Y === US && g({
|
|
11925
11925
|
type: Rt,
|
|
11926
11926
|
payload: {
|
|
11927
11927
|
loading: !1,
|
|
11928
11928
|
streaming: !0
|
|
11929
11929
|
}
|
|
11930
|
-
}),
|
|
11930
|
+
}), Y === jS && setTimeout(() => {
|
|
11931
11931
|
f || (g({
|
|
11932
11932
|
type: Rt,
|
|
11933
11933
|
payload: {
|
|
11934
11934
|
loading: !1,
|
|
11935
11935
|
streaming: !1
|
|
11936
11936
|
}
|
|
11937
|
-
}),
|
|
11937
|
+
}), N((fe) => [
|
|
11938
11938
|
...fe,
|
|
11939
11939
|
{
|
|
11940
11940
|
id: ht(),
|
|
@@ -11944,26 +11944,26 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
11944
11944
|
]));
|
|
11945
11945
|
}, 1e3);
|
|
11946
11946
|
},
|
|
11947
|
-
[g,
|
|
11947
|
+
[g, N, f]
|
|
11948
11948
|
);
|
|
11949
11949
|
Z(() => {
|
|
11950
11950
|
ie && kn(ie);
|
|
11951
11951
|
}, [ie, kn]), Z(() => {
|
|
11952
11952
|
I?.sendOnEnter !== void 0 && d(I.sendOnEnter);
|
|
11953
11953
|
}, [I]);
|
|
11954
|
-
const Xt =
|
|
11954
|
+
const Xt = J(() => {
|
|
11955
11955
|
if (!R.current)
|
|
11956
11956
|
return;
|
|
11957
11957
|
R.current.style.height = "auto";
|
|
11958
|
-
const
|
|
11959
|
-
if (
|
|
11960
|
-
R.current.style.height = `${
|
|
11958
|
+
const Y = R.current.scrollHeight;
|
|
11959
|
+
if (Y > Va) {
|
|
11960
|
+
R.current.style.height = `${Va}px`, R.current.style.overflowY = "scroll";
|
|
11961
11961
|
return;
|
|
11962
11962
|
}
|
|
11963
|
-
R.current.style.height = `${
|
|
11964
|
-
}, []), $r = async (
|
|
11965
|
-
if (
|
|
11966
|
-
const fe = s ? Array.from(s) : [], ue = Array.from(
|
|
11963
|
+
R.current.style.height = `${Y}px`, R.current.style.overflowY = "hidden";
|
|
11964
|
+
}, []), $r = async (Y) => {
|
|
11965
|
+
if (Y.preventDefault(), Y.target.files && Y.target.files.length > 0) {
|
|
11966
|
+
const fe = s ? Array.from(s) : [], ue = Array.from(Y.target.files), $t = [...fe];
|
|
11967
11967
|
let Ct = !1;
|
|
11968
11968
|
for (const Oe of ue) {
|
|
11969
11969
|
const zr = "." + Oe.name.split(".").pop()?.toLowerCase();
|
|
@@ -11995,22 +11995,22 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
11995
11995
|
}
|
|
11996
11996
|
}, Lr = () => {
|
|
11997
11997
|
T.current && T.current.click();
|
|
11998
|
-
}, Dt = (
|
|
11998
|
+
}, Dt = (Y) => {
|
|
11999
11999
|
if (!s)
|
|
12000
12000
|
return;
|
|
12001
12001
|
const fe = new DataTransfer();
|
|
12002
12002
|
Array.from(s).forEach((ue) => {
|
|
12003
|
-
ue !==
|
|
12003
|
+
ue !== Y && fe.items.add(ue);
|
|
12004
12004
|
}), fe.files.length === 0 ? i(null) : i(fe.files), g({
|
|
12005
12005
|
type: mn,
|
|
12006
12006
|
payload: {
|
|
12007
12007
|
attachments: fe.files.length
|
|
12008
12008
|
}
|
|
12009
12009
|
}), T.current && (T.current.value = "");
|
|
12010
|
-
}, iu =
|
|
12010
|
+
}, iu = J(() => {
|
|
12011
12011
|
T.current && (T.current.value = ""), i(null);
|
|
12012
|
-
}, []), us = async (
|
|
12013
|
-
|
|
12012
|
+
}, []), us = async (Y) => {
|
|
12013
|
+
Y.preventDefault(), Yn(R);
|
|
12014
12014
|
const fe = await t();
|
|
12015
12015
|
let ue;
|
|
12016
12016
|
if (s && s.length > 0) {
|
|
@@ -12019,7 +12019,7 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12019
12019
|
), Ct = new DataTransfer();
|
|
12020
12020
|
$t.forEach((xt) => Ct.items.add(xt)), ue = Ct.files;
|
|
12021
12021
|
}
|
|
12022
|
-
St(
|
|
12022
|
+
St(Y, {
|
|
12023
12023
|
headers: {
|
|
12024
12024
|
"Content-Type": "application/json",
|
|
12025
12025
|
authorization: `Bearer ${fe}`,
|
|
@@ -12030,10 +12030,10 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12030
12030
|
},
|
|
12031
12031
|
files: ue
|
|
12032
12032
|
}), iu();
|
|
12033
|
-
}, cu = (
|
|
12034
|
-
Xt(), ce(
|
|
12033
|
+
}, cu = (Y) => {
|
|
12034
|
+
Xt(), ce(Y);
|
|
12035
12035
|
};
|
|
12036
|
-
return
|
|
12036
|
+
return Ho([
|
|
12037
12037
|
[
|
|
12038
12038
|
"mod+K",
|
|
12039
12039
|
() => {
|
|
@@ -12042,27 +12042,27 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12042
12042
|
]
|
|
12043
12043
|
]), Z(() => {
|
|
12044
12044
|
if (E.prompt !== "") {
|
|
12045
|
-
const
|
|
12046
|
-
|
|
12045
|
+
const Y = E.prompt.endsWith(":") && !E.prompt.endsWith(": ") ? E.prompt + " " : E.prompt;
|
|
12046
|
+
Y.indexOf(hs) !== -1 ? navigator.clipboard.readText().then((ue) => {
|
|
12047
12047
|
const Ct = ue.startsWith("http://") || ue.startsWith("https://") ? ue : `"""${ue}"""`;
|
|
12048
|
-
|
|
12049
|
-
}) : (
|
|
12048
|
+
j.current = Date.now(), Ee(Y.replace(hs, Ct));
|
|
12049
|
+
}) : (j.current = Date.now(), Ee(Y)), !We() && R.current && R.current.focus(), S({
|
|
12050
12050
|
type: Ya
|
|
12051
12051
|
});
|
|
12052
12052
|
}
|
|
12053
12053
|
}, [E, S, Ee]), Z(() => {
|
|
12054
|
-
if (
|
|
12055
|
-
|
|
12054
|
+
if (k.current === !1) {
|
|
12055
|
+
k.current = !0, !me && Yn(R);
|
|
12056
12056
|
return;
|
|
12057
12057
|
}
|
|
12058
|
-
y > 0 && y !==
|
|
12058
|
+
y > 0 && y !== M.current ? (M.current = y, setTimeout(() => {
|
|
12059
12059
|
if (R.current) {
|
|
12060
|
-
const
|
|
12061
|
-
!me && !
|
|
12060
|
+
const Y = Date.now() - j.current < 600;
|
|
12061
|
+
!me && !Y && Yn(R), R.current.focus();
|
|
12062
12062
|
}
|
|
12063
12063
|
}, LS)) : p === !1 && !me && (Yn(R), !We() && R.current && R.current.focus());
|
|
12064
12064
|
}, [y, p, me]), Z(() => {
|
|
12065
|
-
Date.now() -
|
|
12065
|
+
Date.now() - j.current < 200 && me && requestAnimationFrame(() => {
|
|
12066
12066
|
Xt();
|
|
12067
12067
|
});
|
|
12068
12068
|
}, [me, Xt]), Z(() => {
|
|
@@ -12084,7 +12084,7 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12084
12084
|
children: /* @__PURE__ */ h("p", { className: "m-0", children: x.current })
|
|
12085
12085
|
}
|
|
12086
12086
|
),
|
|
12087
|
-
/* @__PURE__ */ h("div", { className: q.wrapper, ref:
|
|
12087
|
+
/* @__PURE__ */ h("div", { className: q.wrapper, ref: O, children: /* @__PURE__ */ z("form", { onSubmit: us, children: [
|
|
12088
12088
|
/* @__PURE__ */ h("div", { id: L, className: "sr-only", children: oi }),
|
|
12089
12089
|
/* @__PURE__ */ z("div", { className: "relative pb-3 sm:pb-0", children: [
|
|
12090
12090
|
/* @__PURE__ */ h(
|
|
@@ -12124,8 +12124,8 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12124
12124
|
mb,
|
|
12125
12125
|
{
|
|
12126
12126
|
className: U("order-1 sm:mr-2", {
|
|
12127
|
-
"mr-3":
|
|
12128
|
-
"mr-4": !
|
|
12127
|
+
"mr-3": D,
|
|
12128
|
+
"mr-4": !D
|
|
12129
12129
|
})
|
|
12130
12130
|
}
|
|
12131
12131
|
),
|
|
@@ -12133,8 +12133,8 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12133
12133
|
dS,
|
|
12134
12134
|
{
|
|
12135
12135
|
className: U("order-2 sm:mr-2", {
|
|
12136
|
-
"mr-3":
|
|
12137
|
-
"mr-4": !
|
|
12136
|
+
"mr-3": D,
|
|
12137
|
+
"mr-4": !D
|
|
12138
12138
|
})
|
|
12139
12139
|
}
|
|
12140
12140
|
),
|
|
@@ -12142,32 +12142,32 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12142
12142
|
pb,
|
|
12143
12143
|
{
|
|
12144
12144
|
className: U("order-3 sm:mr-2", {
|
|
12145
|
-
"mr-3":
|
|
12146
|
-
"mr-4": !
|
|
12145
|
+
"mr-3": D,
|
|
12146
|
+
"mr-4": !D
|
|
12147
12147
|
}),
|
|
12148
12148
|
onClick: Lr
|
|
12149
12149
|
}
|
|
12150
12150
|
),
|
|
12151
|
-
|
|
12151
|
+
D && /* @__PURE__ */ h(fS, { className: U("order-4 mr-3 sm:mr-2") }),
|
|
12152
12152
|
/* @__PURE__ */ h(
|
|
12153
12153
|
Fb,
|
|
12154
12154
|
{
|
|
12155
12155
|
className: U("order-5 mr-3 sm:mr-2", {
|
|
12156
|
-
"mr-3":
|
|
12157
|
-
"mr-4": !
|
|
12156
|
+
"mr-3": D,
|
|
12157
|
+
"mr-4": !D
|
|
12158
12158
|
})
|
|
12159
12159
|
}
|
|
12160
12160
|
)
|
|
12161
12161
|
] })
|
|
12162
12162
|
] }) })
|
|
12163
12163
|
] });
|
|
12164
|
-
}, Jn = "--sassy-bottom",
|
|
12164
|
+
}, Jn = "--sassy-bottom", VS = ({ isComponent: e }) => {
|
|
12165
12165
|
const {
|
|
12166
12166
|
state: { loading: t, streaming: n, restoring: r }
|
|
12167
12167
|
} = de(Le), {
|
|
12168
12168
|
state: { footerHeight: o, footerPosition: s, fullScreen: i },
|
|
12169
12169
|
dispatch: a
|
|
12170
|
-
} = de(En), [c] =
|
|
12170
|
+
} = de(En), [c] = H(
|
|
12171
12171
|
() => gs[Math.floor(Math.random() * gs.length)]
|
|
12172
12172
|
), l = Ae(() => We(), []), d = Ae(() => Gd(), []), { messages: u } = wt(), [g, m] = si(), [p, f] = Ke(), y = ny(d), { height: b } = qv(), { height: _ } = Qv(), v = d ? 0 : b - _, E = Ae(() => {
|
|
12173
12173
|
const S = l ? bu : d ? wu : qa;
|
|
@@ -12240,7 +12240,7 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12240
12240
|
}
|
|
12241
12241
|
),
|
|
12242
12242
|
children: /* @__PURE__ */ z("div", { className: fo({ fullScreen: i }), children: [
|
|
12243
|
-
/* @__PURE__ */ h(
|
|
12243
|
+
/* @__PURE__ */ h(HS, {}),
|
|
12244
12244
|
/* @__PURE__ */ h(
|
|
12245
12245
|
"div",
|
|
12246
12246
|
{
|
|
@@ -12276,7 +12276,7 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12276
12276
|
state: { privateChat: n },
|
|
12277
12277
|
setChatId: r,
|
|
12278
12278
|
setInitialMessages: o
|
|
12279
|
-
} = de(Le), { getAccessToken: s, user: i } = $e(), { status: a } = wt(), { allowedModels: c, status: l } = ko(), [d, u] = Ke(), [g, m] =
|
|
12279
|
+
} = de(Le), { getAccessToken: s, user: i } = $e(), { status: a } = wt(), { allowedModels: c, status: l } = ko(), [d, u] = Ke(), [g, m] = H(!1), p = J(() => {
|
|
12280
12280
|
g || (zv(), m(!0));
|
|
12281
12281
|
}, [g]), {
|
|
12282
12282
|
isSuccess: f,
|
|
@@ -12287,8 +12287,8 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12287
12287
|
getAccessToken: s
|
|
12288
12288
|
}), _ = Ae(() => {
|
|
12289
12289
|
if (ds(c, l)) {
|
|
12290
|
-
const
|
|
12291
|
-
(L) =>
|
|
12290
|
+
const O = _u(c), R = uo.filter(
|
|
12291
|
+
(L) => O.includes(
|
|
12292
12292
|
L.id
|
|
12293
12293
|
)
|
|
12294
12294
|
);
|
|
@@ -12298,17 +12298,17 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12298
12298
|
}, [c, l]), v = Ae(() => ds(c, l) ? xu(c) : /* @__PURE__ */ new Map(), [c, l]), E = Ae(() => {
|
|
12299
12299
|
if (!b?.useNestedModelSelection)
|
|
12300
12300
|
return !1;
|
|
12301
|
-
for (const
|
|
12302
|
-
if (
|
|
12301
|
+
for (const O of v.values())
|
|
12302
|
+
if (O.length > 1)
|
|
12303
12303
|
return !0;
|
|
12304
12304
|
return !1;
|
|
12305
|
-
}, [b?.useNestedModelSelection, v]), S = async (
|
|
12305
|
+
}, [b?.useNestedModelSelection, v]), S = async (O) => {
|
|
12306
12306
|
try {
|
|
12307
|
-
r(ht()), o([]),
|
|
12308
|
-
provider:
|
|
12307
|
+
r(ht()), o([]), O !== b?.provider && (await fs({
|
|
12308
|
+
provider: O,
|
|
12309
12309
|
accessToken: await s(),
|
|
12310
12310
|
username: i?.username || ""
|
|
12311
|
-
}), y(), await fr(`${vs} ${
|
|
12311
|
+
}), y(), await fr(`${vs} ${O}`, {
|
|
12312
12312
|
containerId: "toggle-provider"
|
|
12313
12313
|
})), t({
|
|
12314
12314
|
type: Wt,
|
|
@@ -12318,18 +12318,18 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12318
12318
|
});
|
|
12319
12319
|
} catch {
|
|
12320
12320
|
}
|
|
12321
|
-
}, I = async (
|
|
12321
|
+
}, I = async (O, R) => {
|
|
12322
12322
|
try {
|
|
12323
|
-
if (r(ht()), o([]),
|
|
12323
|
+
if (r(ht()), o([]), O !== b?.provider || R !== b?.model) {
|
|
12324
12324
|
await fs({
|
|
12325
|
-
provider:
|
|
12325
|
+
provider: O,
|
|
12326
12326
|
model: R,
|
|
12327
12327
|
accessToken: await s(),
|
|
12328
12328
|
username: i?.username || ""
|
|
12329
12329
|
}), y();
|
|
12330
12330
|
const L = Ur[R] || R;
|
|
12331
12331
|
await fr(
|
|
12332
|
-
`${vs} ${
|
|
12332
|
+
`${vs} ${O} (${L})`,
|
|
12333
12333
|
{
|
|
12334
12334
|
containerId: "toggle-provider"
|
|
12335
12335
|
}
|
|
@@ -12344,8 +12344,8 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12344
12344
|
} catch {
|
|
12345
12345
|
}
|
|
12346
12346
|
}, x = b && f, T = x && _.find(
|
|
12347
|
-
(
|
|
12348
|
-
)?.icon || _[0]?.icon,
|
|
12347
|
+
(O) => b.provider === O.id
|
|
12348
|
+
)?.icon || _[0]?.icon, k = Ae(() => !b?.useNestedModelSelection || !b?.model || !c || !Xa(b.model, c) ? null : Ur[b.model] || b.model, [b?.useNestedModelSelection, b?.model, c]), M = /* @__PURE__ */ h(ut, { children: /* @__PURE__ */ z(
|
|
12349
12349
|
Dr,
|
|
12350
12350
|
{
|
|
12351
12351
|
mode: "light",
|
|
@@ -12371,15 +12371,15 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12371
12371
|
defaultPlacement: "top-start",
|
|
12372
12372
|
children: [
|
|
12373
12373
|
/* @__PURE__ */ h(_r, { children: "Providers" }),
|
|
12374
|
-
x && _.map((
|
|
12375
|
-
const R = v.get(
|
|
12376
|
-
return E && R.length > 1 ? /* @__PURE__ */ z(Xl, { label:
|
|
12374
|
+
x && _.map((O) => {
|
|
12375
|
+
const R = v.get(O.id) || [];
|
|
12376
|
+
return E && R.length > 1 ? /* @__PURE__ */ z(Xl, { label: O.label, children: [
|
|
12377
12377
|
/* @__PURE__ */ z(
|
|
12378
12378
|
_r,
|
|
12379
12379
|
{
|
|
12380
|
-
...
|
|
12380
|
+
...O.icon && !We() && { icon: /* @__PURE__ */ h(O.icon, {}) },
|
|
12381
12381
|
children: [
|
|
12382
|
-
|
|
12382
|
+
O.label,
|
|
12383
12383
|
" Models"
|
|
12384
12384
|
]
|
|
12385
12385
|
}
|
|
@@ -12387,21 +12387,21 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12387
12387
|
R.map((Q) => /* @__PURE__ */ h(
|
|
12388
12388
|
Me,
|
|
12389
12389
|
{
|
|
12390
|
-
selected: b.provider ===
|
|
12390
|
+
selected: b.provider === O.id && b.model === Q,
|
|
12391
12391
|
label: Ur[Q] || Q,
|
|
12392
|
-
onClick: () => I(
|
|
12392
|
+
onClick: () => I(O.id, Q)
|
|
12393
12393
|
},
|
|
12394
12394
|
Q
|
|
12395
12395
|
))
|
|
12396
|
-
] },
|
|
12396
|
+
] }, O.id) : /* @__PURE__ */ h(
|
|
12397
12397
|
Me,
|
|
12398
12398
|
{
|
|
12399
|
-
selected: b.provider ===
|
|
12400
|
-
label:
|
|
12401
|
-
icon: /* @__PURE__ */ h(
|
|
12402
|
-
onClick: () => S(
|
|
12399
|
+
selected: b.provider === O.id,
|
|
12400
|
+
label: O.label,
|
|
12401
|
+
icon: /* @__PURE__ */ h(O.icon, {}),
|
|
12402
|
+
onClick: () => S(O.id)
|
|
12403
12403
|
},
|
|
12404
|
-
|
|
12404
|
+
O.id
|
|
12405
12405
|
);
|
|
12406
12406
|
})
|
|
12407
12407
|
]
|
|
@@ -12415,55 +12415,55 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12415
12415
|
mode: "light",
|
|
12416
12416
|
placement: "right",
|
|
12417
12417
|
className: e,
|
|
12418
|
-
trigger:
|
|
12418
|
+
trigger: M
|
|
12419
12419
|
}
|
|
12420
12420
|
),
|
|
12421
|
-
|
|
12421
|
+
k && /* @__PURE__ */ h(
|
|
12422
12422
|
"span",
|
|
12423
12423
|
{
|
|
12424
12424
|
className: U(
|
|
12425
12425
|
"text-sm sm:text-xs font-medium select-none",
|
|
12426
12426
|
d(u.Header)
|
|
12427
12427
|
),
|
|
12428
|
-
children:
|
|
12428
|
+
children: k
|
|
12429
12429
|
}
|
|
12430
12430
|
)
|
|
12431
|
-
] }) : /* @__PURE__ */ h("div", { className: e, children:
|
|
12431
|
+
] }) : /* @__PURE__ */ h("div", { className: e, children: M });
|
|
12432
12432
|
}, GS = ot(
|
|
12433
12433
|
() => import(
|
|
12434
12434
|
/* webpackChunkName: "modal-chunk" */
|
|
12435
|
-
"./ProfileEntry.
|
|
12435
|
+
"./ProfileEntry.8-BhqMWc.js"
|
|
12436
12436
|
).then((e) => ({
|
|
12437
12437
|
default: e.Profile
|
|
12438
12438
|
}))
|
|
12439
12439
|
), YS = ot(
|
|
12440
12440
|
() => import(
|
|
12441
12441
|
/* webpackChunkName: "modal-chunk" */
|
|
12442
|
-
"./SettingsEntry.
|
|
12442
|
+
"./SettingsEntry.BfQY7V1X.js"
|
|
12443
12443
|
).then((e) => ({
|
|
12444
12444
|
default: e.SettingsPanel
|
|
12445
12445
|
}))
|
|
12446
12446
|
), JS = ot(
|
|
12447
12447
|
() => import(
|
|
12448
12448
|
/* webpackChunkName: "modal-chunk" */
|
|
12449
|
-
"./HistoryEntry.
|
|
12449
|
+
"./HistoryEntry.m8eQcBA5.js"
|
|
12450
12450
|
).then((e) => ({
|
|
12451
12451
|
default: e.HistoryPanel
|
|
12452
12452
|
}))
|
|
12453
12453
|
), KS = ot(
|
|
12454
12454
|
() => import(
|
|
12455
12455
|
/* webpackChunkName: "modal-chunk" */
|
|
12456
|
-
"./AboutEntry.
|
|
12456
|
+
"./AboutEntry.YWAyYLjf.js"
|
|
12457
12457
|
).then((e) => ({ default: e.About }))
|
|
12458
12458
|
), XS = ot(
|
|
12459
12459
|
() => import(
|
|
12460
12460
|
/* webpackChunkName: "modal-chunk" */
|
|
12461
|
-
"./UsageEntry.
|
|
12461
|
+
"./UsageEntry.CzN_8YVL.js"
|
|
12462
12462
|
).then((e) => ({ default: e.Usage }))
|
|
12463
12463
|
), qS = ot(
|
|
12464
12464
|
() => import(
|
|
12465
12465
|
/* webpackChunkName: "modal-chunk" */
|
|
12466
|
-
"./MemoriesEntry.
|
|
12466
|
+
"./MemoriesEntry.Dp9urYHa.js"
|
|
12467
12467
|
).then((e) => ({ default: e.default }))
|
|
12468
12468
|
), QS = ({
|
|
12469
12469
|
open: e,
|
|
@@ -12503,47 +12503,47 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12503
12503
|
} = de(En), { logout: n, getAccessToken: r, user: o } = $e(), s = Iu(), [i, a] = Ke(), { data: c, isSuccess: l } = bt({
|
|
12504
12504
|
user: o?.username,
|
|
12505
12505
|
getAccessToken: r
|
|
12506
|
-
}), [d, u] =
|
|
12506
|
+
}), [d, u] = H(null), [g, m] = H(!1), [p, f] = H(!1), [y, b] = H(!1), _ = gr(ar.TOOL.MEMORIES);
|
|
12507
12507
|
Z(() => {
|
|
12508
12508
|
l && c && _ && b(c?.useMemory ?? !1);
|
|
12509
12509
|
}, [l, c, _]);
|
|
12510
|
-
const v =
|
|
12510
|
+
const v = J(() => {
|
|
12511
12511
|
p || Promise.all([
|
|
12512
12512
|
import(
|
|
12513
12513
|
/* webpackChunkName: "modal-chunk" */
|
|
12514
|
-
"./ProfileEntry.
|
|
12514
|
+
"./ProfileEntry.8-BhqMWc.js"
|
|
12515
12515
|
),
|
|
12516
12516
|
import(
|
|
12517
12517
|
/* webpackChunkName: "modal-chunk" */
|
|
12518
|
-
"./SettingsEntry.
|
|
12518
|
+
"./SettingsEntry.BfQY7V1X.js"
|
|
12519
12519
|
),
|
|
12520
12520
|
import(
|
|
12521
12521
|
/* webpackChunkName: "modal-chunk" */
|
|
12522
|
-
"./HistoryEntry.
|
|
12522
|
+
"./HistoryEntry.m8eQcBA5.js"
|
|
12523
12523
|
),
|
|
12524
12524
|
import(
|
|
12525
12525
|
/* webpackChunkName: "modal-chunk" */
|
|
12526
|
-
"./AboutEntry.
|
|
12526
|
+
"./AboutEntry.YWAyYLjf.js"
|
|
12527
12527
|
),
|
|
12528
12528
|
import(
|
|
12529
12529
|
/* webpackChunkName: "modal-chunk" */
|
|
12530
|
-
"./UsageEntry.
|
|
12530
|
+
"./UsageEntry.CzN_8YVL.js"
|
|
12531
12531
|
)
|
|
12532
12532
|
]).finally(() => f(!0));
|
|
12533
|
-
}, [p]), E =
|
|
12534
|
-
u(
|
|
12535
|
-
}, []), S =
|
|
12533
|
+
}, [p]), E = J((k) => {
|
|
12534
|
+
u(k);
|
|
12535
|
+
}, []), S = J(() => {
|
|
12536
12536
|
u(null);
|
|
12537
|
-
}, []), I =
|
|
12537
|
+
}, []), I = J(() => {
|
|
12538
12538
|
E("settings");
|
|
12539
12539
|
}, [E]);
|
|
12540
12540
|
Ac("openSettings", I);
|
|
12541
12541
|
const x = () => {
|
|
12542
12542
|
m(!g);
|
|
12543
|
-
}, T =
|
|
12543
|
+
}, T = J(() => {
|
|
12544
12544
|
s.clear(), n();
|
|
12545
12545
|
}, [n, s]);
|
|
12546
|
-
return
|
|
12546
|
+
return Ho(
|
|
12547
12547
|
[
|
|
12548
12548
|
[
|
|
12549
12549
|
"mod+,",
|
|
@@ -12684,9 +12684,9 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
|
|
|
12684
12684
|
] });
|
|
12685
12685
|
};
|
|
12686
12686
|
function n0() {
|
|
12687
|
-
const e =
|
|
12687
|
+
const e = W(null), [t, n] = H(!1);
|
|
12688
12688
|
return {
|
|
12689
|
-
ref:
|
|
12689
|
+
ref: J((o) => {
|
|
12690
12690
|
typeof IntersectionObserver < "u" && (o && !e.current ? e.current = new IntersectionObserver((s) => n(s.some((i) => i.isIntersecting))) : e.current?.disconnect(), o ? e.current?.observe(o) : n(!1));
|
|
12691
12691
|
}, []),
|
|
12692
12692
|
inViewport: t
|
|
@@ -12786,18 +12786,18 @@ const Wa = "av-spinner", ou = ({ spinnerRef: e, mode: t = "system", type: n = "c
|
|
|
12786
12786
|
]
|
|
12787
12787
|
});
|
|
12788
12788
|
}, o0 = ot(
|
|
12789
|
-
() => import("./Bubble.
|
|
12789
|
+
() => import("./Bubble.MXxGhdx0.js").then((e) => ({ default: e.Bubble }))
|
|
12790
12790
|
), ls = (e) => /* @__PURE__ */ h(ir, { fallback: /* @__PURE__ */ h("span", { className: "inline-block" }), children: /* @__PURE__ */ h(o0, { ...e }) });
|
|
12791
12791
|
ls.displayName = "AsyncBubble";
|
|
12792
12792
|
const Ga = 1, s0 = 150, a0 = ot(
|
|
12793
12793
|
() => import(
|
|
12794
12794
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
12795
|
-
"./ChatBubbleAssistant.
|
|
12795
|
+
"./ChatBubbleAssistant.BjZa9CVT.js"
|
|
12796
12796
|
)
|
|
12797
12797
|
), i0 = ot(
|
|
12798
12798
|
() => import(
|
|
12799
12799
|
/* webpackChunkName: "LazyMessageUser" */
|
|
12800
|
-
"./ChatBubbleUser.
|
|
12800
|
+
"./ChatBubbleUser.BvDGQWGU.js"
|
|
12801
12801
|
)
|
|
12802
12802
|
), c0 = Ze.memo(
|
|
12803
12803
|
({
|
|
@@ -12808,7 +12808,7 @@ const Ga = 1, s0 = 150, a0 = ot(
|
|
|
12808
12808
|
isLastAssistantMessage: o = !1,
|
|
12809
12809
|
status: s
|
|
12810
12810
|
}) => {
|
|
12811
|
-
const [i, a] =
|
|
12811
|
+
const [i, a] = H(!0), c = W(Date.now()), [l] = H(
|
|
12812
12812
|
() => o && (s === "streaming" || s === "submitted")
|
|
12813
12813
|
);
|
|
12814
12814
|
return Z(() => {
|
|
@@ -12889,18 +12889,18 @@ const su = Ze.forwardRef((e, t) => {
|
|
|
12889
12889
|
});
|
|
12890
12890
|
su.displayName = "MessagesList";
|
|
12891
12891
|
const d0 = () => {
|
|
12892
|
-
const { isAuthenticated: e } = $e(), { ref: t, inViewport: n } = n0(), r =
|
|
12892
|
+
const { isAuthenticated: e } = $e(), { ref: t, inViewport: n } = n0(), r = W(null), o = W(null), s = W(null), i = W(null), [a, c] = H(0), {
|
|
12893
12893
|
state: { footerPosition: l, footerHeight: d, footerOffset: u, oledMode: g }
|
|
12894
12894
|
} = de(En), {
|
|
12895
12895
|
state: { loading: m, streaming: p }
|
|
12896
|
-
} = de(Le), { messages: f } = wt(), y =
|
|
12896
|
+
} = de(Le), { messages: f } = wt(), y = W(0), b = W(!1), _ = W(0), v = W(0), { data: E, isSuccess: S } = Tu(), I = Au({
|
|
12897
12897
|
isAuthenticated: e,
|
|
12898
12898
|
oledMode: g,
|
|
12899
12899
|
extraClass: "rounded-b-md relative border-b-16 border-transparent"
|
|
12900
|
-
}),
|
|
12900
|
+
}), x = Ht() ? "mt-4" : "", T = J(() => {
|
|
12901
12901
|
if (a > 0 && r.current) {
|
|
12902
|
-
const { scrollHeight:
|
|
12903
|
-
if (
|
|
12902
|
+
const { scrollHeight: M, clientHeight: j } = r.current;
|
|
12903
|
+
if (M - a < j && i.current) {
|
|
12904
12904
|
i.current.scrollIntoView({
|
|
12905
12905
|
behavior: "smooth",
|
|
12906
12906
|
block: "start"
|
|
@@ -12919,7 +12919,7 @@ const d0 = () => {
|
|
|
12919
12919
|
behavior: "smooth",
|
|
12920
12920
|
block: "end"
|
|
12921
12921
|
});
|
|
12922
|
-
}, [a]),
|
|
12922
|
+
}, [a]), k = J(() => {
|
|
12923
12923
|
i.current && i.current.scrollIntoView({
|
|
12924
12924
|
behavior: "smooth",
|
|
12925
12925
|
block: "start"
|
|
@@ -12927,23 +12927,32 @@ const d0 = () => {
|
|
|
12927
12927
|
}, []);
|
|
12928
12928
|
return Z(() => {
|
|
12929
12929
|
if (m && f && f.length > 0 && r.current) {
|
|
12930
|
-
const
|
|
12931
|
-
c(
|
|
12930
|
+
const M = r.current.clientHeight;
|
|
12931
|
+
_.current = r.current.scrollHeight, v.current = M, c(M);
|
|
12932
12932
|
}
|
|
12933
12933
|
}, [m, f]), Z(() => {
|
|
12934
12934
|
(!f || f.length === 0) && c(0);
|
|
12935
12935
|
}, [f]), Z(() => {
|
|
12936
|
-
|
|
12937
|
-
|
|
12936
|
+
if (b.current && !p && !m && a > 0 && r.current) {
|
|
12937
|
+
const j = r.current.scrollHeight - _.current, O = Math.max(
|
|
12938
|
+
0,
|
|
12939
|
+
v.current - j
|
|
12940
|
+
);
|
|
12941
|
+
c(O);
|
|
12942
|
+
}
|
|
12943
|
+
b.current = p;
|
|
12944
|
+
}, [p, m, a]), Z(() => {
|
|
12945
|
+
m && f && f.length > 0 && k();
|
|
12946
|
+
}, [m, k, f]), Z(() => {
|
|
12938
12947
|
y.current = l === sn ? d + u + Qa + Ru + 15 : 0;
|
|
12939
12948
|
}, [l, d, u]), /* @__PURE__ */ z(ut, { children: [
|
|
12940
|
-
/* @__PURE__ */ z("div", { className:
|
|
12949
|
+
/* @__PURE__ */ z("div", { className: I, ref: r, children: [
|
|
12941
12950
|
/* @__PURE__ */ h(
|
|
12942
12951
|
wd,
|
|
12943
12952
|
{
|
|
12944
|
-
className:
|
|
12945
|
-
isCapabilitiesSuccess:
|
|
12946
|
-
capabilities:
|
|
12953
|
+
className: x,
|
|
12954
|
+
isCapabilitiesSuccess: S,
|
|
12955
|
+
capabilities: E
|
|
12947
12956
|
}
|
|
12948
12957
|
),
|
|
12949
12958
|
/* @__PURE__ */ h(su, { ref: i }),
|
|
@@ -12954,7 +12963,7 @@ const d0 = () => {
|
|
|
12954
12963
|
{
|
|
12955
12964
|
ref: o,
|
|
12956
12965
|
style: { height: a > 0 ? `${a}px` : void 0 },
|
|
12957
|
-
className: U({
|
|
12966
|
+
className: U("av-spacer", {
|
|
12958
12967
|
"pt-20": f && f.length > 1 && a === 0
|
|
12959
12968
|
})
|
|
12960
12969
|
}
|
|
@@ -12965,7 +12974,7 @@ const d0 = () => {
|
|
|
12965
12974
|
{
|
|
12966
12975
|
show: !n && l === sn && !m && !p,
|
|
12967
12976
|
bottom: y.current,
|
|
12968
|
-
onClick:
|
|
12977
|
+
onClick: T
|
|
12969
12978
|
}
|
|
12970
12979
|
)
|
|
12971
12980
|
] });
|
|
@@ -12974,17 +12983,17 @@ function au({
|
|
|
12974
12983
|
isComponent: e = !1,
|
|
12975
12984
|
headerHeight: t = 0
|
|
12976
12985
|
}) {
|
|
12977
|
-
const { user: n, getAccessToken: r } = $e(), [o, s] =
|
|
12978
|
-
key:
|
|
12986
|
+
const { user: n, getAccessToken: r } = $e(), [o, s] = H(`${ps}px`), [i, a] = si(), [c, l] = H(ht()), [d, u] = H([]), [g] = et({
|
|
12987
|
+
key: He + Du,
|
|
12979
12988
|
initialValue: ""
|
|
12980
12989
|
}), [m] = et({
|
|
12981
|
-
key:
|
|
12990
|
+
key: He + ku,
|
|
12982
12991
|
initialValue: ms
|
|
12983
12992
|
}), [p] = et({
|
|
12984
|
-
key:
|
|
12993
|
+
key: He + zu,
|
|
12985
12994
|
initialValue: on.DESC
|
|
12986
12995
|
}), [f] = et({
|
|
12987
|
-
key:
|
|
12996
|
+
key: He + Fu,
|
|
12988
12997
|
initialValue: on.ASC
|
|
12989
12998
|
}), [y] = et({
|
|
12990
12999
|
key: $u,
|
|
@@ -13000,8 +13009,8 @@ function au({
|
|
|
13000
13009
|
fullScreen: !1,
|
|
13001
13010
|
themeMode: Ou
|
|
13002
13011
|
}), []), [v, E] = Dn(_d, _), S = Ae(() => {
|
|
13003
|
-
const
|
|
13004
|
-
return
|
|
13012
|
+
const B = We(), q = Yd();
|
|
13013
|
+
return B && q ? "mt-1" : "mt-5";
|
|
13005
13014
|
}, []), x = {
|
|
13006
13015
|
searchString: g,
|
|
13007
13016
|
sortedCell: m,
|
|
@@ -13014,13 +13023,13 @@ function au({
|
|
|
13014
13023
|
return p;
|
|
13015
13024
|
}
|
|
13016
13025
|
})()
|
|
13017
|
-
}, [T,
|
|
13026
|
+
}, [T, k] = Dn(
|
|
13018
13027
|
Uv,
|
|
13019
13028
|
x
|
|
13020
|
-
), [
|
|
13029
|
+
), [M, j] = Dn(jv, {
|
|
13021
13030
|
prompt: "",
|
|
13022
13031
|
lastTriggeredTimestamp: 0
|
|
13023
|
-
}), [
|
|
13032
|
+
}), [O, R] = Dn(Zv, {
|
|
13024
13033
|
provider: "",
|
|
13025
13034
|
// OpenAI, Anthropic, etc.
|
|
13026
13035
|
privateChat: !1,
|
|
@@ -13078,15 +13087,15 @@ function au({
|
|
|
13078
13087
|
});
|
|
13079
13088
|
}, [L]), Z(() => {
|
|
13080
13089
|
try {
|
|
13081
|
-
const
|
|
13082
|
-
|
|
13090
|
+
const B = sessionStorage.getItem("sw-toggle-pending");
|
|
13091
|
+
B && (B === "enabled" ? fr(Ad, { containerId: "toggle-save" }) : B === "disabled" && fr(Rd, {
|
|
13083
13092
|
containerId: "toggle-save"
|
|
13084
13093
|
}), sessionStorage.removeItem("sw-toggle-pending"));
|
|
13085
13094
|
} catch {
|
|
13086
13095
|
}
|
|
13087
13096
|
}, []), _n(() => {
|
|
13088
13097
|
if (v.footerPosition === "FOOTER_BOTTOM") {
|
|
13089
|
-
const
|
|
13098
|
+
const B = S === "mt-1" ? 4 : 20, q = `calc(${a.height}px + ${B}px)`;
|
|
13090
13099
|
s(
|
|
13091
13100
|
`calc(100svh - ${t}px - ${q} - ${v.footerHeight}px - ${v.footerOffset}px - ${Qa}px)`
|
|
13092
13101
|
);
|
|
@@ -13106,17 +13115,17 @@ function au({
|
|
|
13106
13115
|
{
|
|
13107
13116
|
value: {
|
|
13108
13117
|
state: T,
|
|
13109
|
-
dispatch:
|
|
13118
|
+
dispatch: k
|
|
13110
13119
|
},
|
|
13111
13120
|
children: /* @__PURE__ */ h(En.Provider, { value: { state: v, dispatch: E }, children: /* @__PURE__ */ h(
|
|
13112
13121
|
Do.Provider,
|
|
13113
13122
|
{
|
|
13114
|
-
value: { state:
|
|
13123
|
+
value: { state: M, dispatch: j },
|
|
13115
13124
|
children: /* @__PURE__ */ h(
|
|
13116
13125
|
Le.Provider,
|
|
13117
13126
|
{
|
|
13118
13127
|
value: {
|
|
13119
|
-
state:
|
|
13128
|
+
state: O,
|
|
13120
13129
|
dispatch: R,
|
|
13121
13130
|
setChatId: l,
|
|
13122
13131
|
setInitialMessages: u
|
|
@@ -13160,7 +13169,7 @@ function au({
|
|
|
13160
13169
|
children: /* @__PURE__ */ h(d0, {})
|
|
13161
13170
|
}
|
|
13162
13171
|
),
|
|
13163
|
-
/* @__PURE__ */ h(
|
|
13172
|
+
/* @__PURE__ */ h(VS, { isComponent: e })
|
|
13164
13173
|
]
|
|
13165
13174
|
}
|
|
13166
13175
|
)
|
|
@@ -13192,7 +13201,7 @@ export {
|
|
|
13192
13201
|
Lb as Toggle,
|
|
13193
13202
|
_0 as debounce,
|
|
13194
13203
|
rv as getDefaultExportFromCjs,
|
|
13195
|
-
|
|
13204
|
+
Ht as isProbablyMobile,
|
|
13196
13205
|
S0 as numberFormatter,
|
|
13197
13206
|
C0 as obfuscate,
|
|
13198
13207
|
E0 as pluralize,
|