@versini/sassysaint 8.124.0 → 8.126.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AboutChangelog.Cx_wPJ7Z.js → AboutChangelog.y8yfq4eS.js} +2 -2
- package/dist/chunks/{AboutEntry.DmNrMr5s.js → AboutEntry.CLzuzflL.js} +8 -8
- package/dist/chunks/{App.BzXfTo0l.js → App.-eg2aIep.js} +812 -801
- package/dist/chunks/{BubbleActions.Ce6tfTUh.js → BubbleActions.BC6bPZml.js} +3 -3
- package/dist/chunks/{ButtonIconDelete.jHkJLbpb.js → ButtonIconDelete.Zl-ctgi7.js} +19 -18
- package/dist/chunks/{Chart._j38jx2j.js → Chart.C7v4Yrhp.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.CkQRnSQt.js → ChatBubbleAssistant.CCq0_B58.js} +5 -5
- package/dist/chunks/{ChatBubbleUser.DMJbYD3z.js → ChatBubbleUser.C7gtc_kh.js} +4 -4
- package/dist/chunks/{GenericPanel.DmIVt33k.js → GenericPanel.7LMc775H.js} +1 -1
- package/dist/chunks/{HistoryEntry.Cq6AUyXj.js → HistoryEntry.Bz7a6Bem.js} +87 -87
- package/dist/chunks/{LoginEntry.X1jBcMKD.js → LoginEntry.DJ-wqr-L.js} +4 -4
- package/dist/chunks/{LogoEntry.C2Nrhfij.js → LogoEntry.ByusSkIJ.js} +1 -1
- package/dist/chunks/{MemoriesEntry.BljMJwoe.js → MemoriesEntry.uaGNQRyj.js} +6 -6
- package/dist/chunks/{ProfileEntry.vB7iyiQe.js → ProfileEntry.CFjS5ztM.js} +6 -6
- package/dist/chunks/{SettingsEntry.WDa-6Ahy.js → SettingsEntry.DK9QZ6yj.js} +6 -6
- package/dist/chunks/{UsageEntry.CAtBTMVV.js → UsageEntry.BzzbV0A4.js} +6 -6
- package/dist/chunks/{_baseUniq.BzsifY_A.js → _baseUniq.DhlKnES5.js} +1 -1
- package/dist/chunks/{arc.B3lKcxnQ.js → arc.Brcc_IEk.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.BFw7ZYGi.js → architecture-U656AL7Q.DVFE0hfZ.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.DW4_F9jT.js → architectureDiagram-VXUJARFQ.BkSp89fJ.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.99a2hvnj.js → blockDiagram-VD42YOAC.DgYdp655.js} +5 -5
- package/dist/chunks/{browser.CqPCGHhZ.js → browser.rKkdZBWz.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.myMIBFPP.js → c4Diagram-YG6GDRKO.BkIthKAj.js} +2 -2
- package/dist/chunks/{channel.Dkod3nLl.js → channel.I_BBDI4B.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.C0KRn8vY.js → chunk-4BX2VUAB.CZ7Tfv3P.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.Dw_54Cwl.js → chunk-55IACEB6.pDWAxI0Z.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.CQQl7odk.js → chunk-B4BG7PRW.Ck9Icqbf.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.DtwHmQbD.js → chunk-DI55MBZ5.8YRqD3_g.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.Dw-3jbfc.js → chunk-FMBD7UC4.CyMr_Cq0.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.DRzByK1N.js → chunk-QN33PNHL.MozVXw7l.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.CCoztZwn.js → chunk-QZHKN3VN.8ZHjN_iq.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.DUj8ncNV.js → chunk-TZMSLE5B.B_Tdnqcw.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.cwLdwiQY.js → classDiagram-2ON5EDUG.BvpFy8VU.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.cwLdwiQY.js → classDiagram-v2-WZHVMYZB.BvpFy8VU.js} +2 -2
- package/dist/chunks/{clone.DlO4Hr4-.js → clone.CX-h_mcE.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.B_u1DhXJ.js → cose-bilkent-S5V4N54A.DijTCPsU.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.TBSnBVmF.js → dagre-6UL2VRFP.ZkBOdsiV.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.DLpLnaMT.js → diagram-PSM6KHXK.qhgEGMkh.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.iJhCSncs.js → diagram-QEK2KX5R.CCxEDYzq.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.DzTERqf6.js → diagram-S2PKOQOG.ByybMnvg.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.CWynsTWD.js → erDiagram-Q2GNP2WA.Bq0QQAzQ.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.CUp4f8Ee.js → flowDiagram-NV44I4VS.C5jeV11l.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.BwMInK9h.js → ganttDiagram-JELNMOA3.CX3m_XBd.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.DBVb1BdV.js → gitGraph-F6HP7TQM.DyP7zKA-.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.j-nQ2JMn.js → gitGraphDiagram-NY62KEGX.Dqs6kEPo.js} +4 -4
- package/dist/chunks/{graph.BYpjTE9p.js → graph.BmSU3EQ3.js} +2 -2
- package/dist/chunks/{index.CRokoEy5.js → index.9qGP0oyh.js} +1 -1
- package/dist/chunks/{index.CSlM5RvZ.js → index.BS9UqT8G.js} +1 -1
- package/dist/chunks/{index.TAyzxG2x.js → index.Bg-ureJQ.js} +1 -1
- package/dist/chunks/{index.BFB2eeJO.js → index.ByXLoznH.js} +1 -1
- package/dist/chunks/{index.DsvBmOFD.js → index.DI6YPuXQ.js} +1 -1
- package/dist/chunks/{index.7rI3Zh6S.js → index.DR8JSq3p.js} +3 -3
- package/dist/chunks/{index.DGtZMa5X.js → index.D_hdJ3yp.js} +1 -1
- package/dist/chunks/{index.Cm_5g9xp.js → index.KoZIit7c.js} +2 -2
- package/dist/chunks/{index.C6m5EDTb.js → index.kUAkaVxN.js} +3 -3
- package/dist/chunks/{index.C09rfIPz.js → index.wNocmUkc.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.BgH6c6De.js → info-NVLQJR56.DSYjsQhb.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.BZPdtfIu.js → infoDiagram-WHAUD3N6.B_QWKiGD.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.D315Q2BL.js → journeyDiagram-XKPGCS4Q.D13NM_jI.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.BCjgsWf5.js → kanban-definition-3W4ZIXB7.BW2fJXMb.js} +2 -2
- package/dist/chunks/{layout.9eeN3x8q.js → layout.DXFZfI_v.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.CoF1zxxn.js → mermaid-parser.core.oWEsV7Vh.js} +10 -10
- package/dist/chunks/{min.Db-v_EbW.js → min.ZBTOF0du.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.Gn_j5hFa.js → mindmap-definition-VGOIOE7T.ClyuQGjj.js} +3 -3
- package/dist/chunks/{packet-BFZMPI3H.C7CPhtVD.js → packet-BFZMPI3H.B8xdKVKJ.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.DPOlEPeF.js → pie-7BOR55EZ.DGxeR5Vn.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.H9WpXELq.js → pieDiagram-ADFJNKIX.LXBSnOeX.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.CRrm72Te.js → quadrantDiagram-AYHSOK5B.sUnuK7as.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.BTlYEVpC.js → radar-NHE76QYJ.CLksGj06.js} +1 -1
- package/dist/chunks/{rehype-mermaid.Ho-bmgDt.js → rehype-mermaid.hijL8KJp.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.CoxuILcQ.js → requirementDiagram-UZGBJVZJ.j3hFwP4f.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.CQ35FCEw.js → sankeyDiagram-TZEHDZUN.CHWynfNM.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.Dimfha52.js → sequenceDiagram-WL72ISMW.BerTw6Wd.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.DHY9BdZ2.js → stateDiagram-FKZM4ZOC.DM9qYL-8.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.BIeOiDVI.js → stateDiagram-v2-4FDKWEC3.BlSmrHnJ.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.rQIKlqdA.js → timeline-definition-IT6M3QCI.CN63yk_o.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.DDkoXxdM.js → treemap-KMMF4GRG.DrHkuc0q.js} +1 -1
- package/dist/chunks/{useMarkdown.DZkkRI9v.js → useMarkdown.CabEGOKb.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.Jw3wJAbf.js → xychartDiagram-PRI3JC2R.C6yY1ILk.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
|
-
import { jsx as g, jsxs as
|
|
2
|
-
import { ACTION_SORT as Eu, ACTION_SEARCH as Su, ACTION_RESET_PROMPT as ei, ACTION_TOGGLE_PROMPT as ti, LOCAL_STORAGE_PREFIX as Te, LOCAL_STORAGE_CHAT_ID as nr, n as Ue, useChat as Cu, DEFAULT_ICON_ACTION_SIZE as Qe, isTauri as hn, useUserPreferences as bt, serverUrl as ni, useEntitlements as Zo, useSaveChat as xu, LOCAL_STORAGE_PRIVATE_DISCLOSURE as Tu, F as Bt, LOCAL_STORAGE_REASONING_DISCLOSURE as Iu, useQueryClient as ri, graphQLRequest as
|
|
1
|
+
import { jsx as g, jsxs as L, Fragment as rt } from "react/jsx-runtime";
|
|
2
|
+
import { ACTION_SORT as Eu, ACTION_SEARCH as Su, ACTION_RESET_PROMPT as ei, ACTION_TOGGLE_PROMPT as ti, LOCAL_STORAGE_PREFIX as Te, LOCAL_STORAGE_CHAT_ID as nr, n as Ue, useChat as Cu, DEFAULT_ICON_ACTION_SIZE as Qe, isTauri as hn, useUserPreferences as bt, serverUrl as ni, useEntitlements as Zo, useSaveChat as xu, LOCAL_STORAGE_PRIVATE_DISCLOSURE as Tu, F as Bt, LOCAL_STORAGE_REASONING_DISCLOSURE as Iu, useQueryClient as ri, graphQLRequest as Hr, CHATS_QUERY_KEY as gs, SERVICE_TYPES as Vr, PROMPT_EDITABLE_AREA_CLASSNAME as Au, PROMPT_CLASSNAME as Ru, X as oi, ERROR_MESSAGE as Ou, o as Gt, n$1 as fr, v as Nu, INPUT_BOTTOM_OFFSET_IPHONE as Mu, INPUT_BOTTOM_OFFSET_IPAD as ku, INPUT_BOTTOM_OFFSET as si, INPUT_BOTTOM_OFFSET_EXTRA as Wr, getLayoutPaddingClass as yo, canEvaluateModels as vs, W as Pu, a as Du, i as $u, s as Lu, x as zu, p as Gr, setNewProvider as ys, LOCAL_STORAGE_KEYWORD_MATCH_ALL as Fu, LOCAL_STORAGE_HISTORY_WITH_MEDIA_ONLY as Zu, LOCAL_STORAGE_HISTORY_WITH_SHARED_ONLY as Uu, useChatsHistory as Bu, y as bo, useServerCapabilities as ju, getMessageContaintWrapperClass as Hu, UI_FOOTER_BUFFER as ai, UI_BUTTON_SCROLL_BUFFER as Vu, UI_DEFAULT_MAIN_HEIGHT as bs, Z as Wu, applyOledMode as Gu, UI_DEFAULT_MAIN_HEIGHT_IPHONE as Yu, V as Ju, LOCAL_STORAGE_SORT as Ku, LOCAL_STORAGE_SEARCH as qu, LOCAL_STORAGE_OLED_MODE as Xu, LOCAL_STORAGE_FULL_SCREEN as Qu, LOCAL_STORAGE_SORT_TIMESTAMP as ed, LOCAL_STORAGE_SORT_TOKEN_USAGE as td } from "./index.KoZIit7c.js";
|
|
3
3
|
import * as w from "react";
|
|
4
|
-
import We, { useSyncExternalStore as rr, useCallback as H, useEffect as U, useRef as
|
|
5
|
-
import { SortDirections as jt, ChatContext as Be, ButtonIcon as Yt, useTheme as je, IconAddLight as nd, IconCloseLight as rd, IconEditLight as od, Button as fn, IconLockedLight as sd, IconUnlockedLight as ad, IconSelected as id, IconUnSelected as cd, IconNext as ld, PromptsContext as Uo, IconBookSparklesLight as ud, IconRewrite as dd, IconProofread as fd, IconMagic as pd, IconLightBulbLight as md, IconSendLight as hd, CARDS as he, IconUploadLight as gd, INPUT_PLACEHOLDER_TEXT_IN_SESSION as ui, INPUT_PLACEHOLDER_TEXT_MORNING as vd, INPUT_PLACEHOLDER_TEXT_TODAY as yd, INPUT_PLACEHOLDER_TEXT_AFTERNOON as bd, INPUT_PLACEHOLDER_TEXT_EVENING as wd, INPUT_PLACEHOLDER_TEXT_NIGHT as _d, INPUT_PLACEHOLDER_TEXT_DEFAULT as Ed, IconClose as Sd, AppContext as An, useUniqueId as Cd, CLIPBOARD_PROMPT as ws, FOOTER_DISCLAIMERS as _s, useResizeObserver as di, APP_SET_FOOTER_HEIGHT as xd, FOOTER_TOP as
|
|
4
|
+
import We, { useSyncExternalStore as rr, useCallback as H, useEffect as U, useRef as G, useState as Z, createContext as ii, useContext as ue, useMemo as Me, useId as ci, useLayoutEffect as In, cloneElement as li, Suspense as wo, lazy as wt, useReducer as Un } from "react";
|
|
5
|
+
import { SortDirections as jt, ChatContext as Be, ButtonIcon as Yt, useTheme as je, IconAddLight as nd, IconCloseLight as rd, IconEditLight as od, Button as fn, IconLockedLight as sd, IconUnlockedLight as ad, IconSelected as id, IconUnSelected as cd, IconNext as ld, PromptsContext as Uo, IconBookSparklesLight as ud, IconRewrite as dd, IconProofread as fd, IconMagic as pd, IconLightBulbLight as md, IconSendLight as hd, CARDS as he, IconUploadLight as gd, INPUT_PLACEHOLDER_TEXT_IN_SESSION as ui, INPUT_PLACEHOLDER_TEXT_MORNING as vd, INPUT_PLACEHOLDER_TEXT_TODAY as yd, INPUT_PLACEHOLDER_TEXT_AFTERNOON as bd, INPUT_PLACEHOLDER_TEXT_EVENING as wd, INPUT_PLACEHOLDER_TEXT_NIGHT as _d, INPUT_PLACEHOLDER_TEXT_DEFAULT as Ed, IconClose as Sd, AppContext as An, useUniqueId as Cd, CLIPBOARD_PROMPT as ws, FOOTER_DISCLAIMERS as _s, useResizeObserver as di, APP_SET_FOOTER_HEIGHT as xd, FOOTER_TOP as _o, FOOTER_BOTTOM as pn, APP_SET_FOOTER_POSITION as Yr, IconOpenAI as Td, IconAnthropic as Id, IconGoogleGemini as Ad, TOAST_PROVIDER_CHANGED as Es, HistoryContext as fi, LOG_OUT as Ss, IconProfile as Rd, IconSliders as Od, IconHistory as Nd, IconEditUser as Md, IconChart as kd, IconInfo as Pd, IconBack as Dd, IconSettings as $d, Logo as Ld, appReducer as zd, APP_SET_OLED_MODE as Fd, APP_SET_FULL_SCREEN as Zd, APP_SET_THEME_PALETTE as Ud, APP_CLASSNAME as Bd } from "./LogoEntry.ByusSkIJ.js";
|
|
6
6
|
import $, { clsx as dt } from "clsx";
|
|
7
7
|
import { useFloatingParentNodeId as jd, FloatingTree as Hd, useMergeRefs as Vd, FloatingNode as Wd, FloatingPortal as Gd, FloatingOverlay as Yd, FloatingFocusManager as Jd, useFloatingNodeId as Kd, useFloating as qd, useClick as Xd, useDismiss as Qd, useRole as ef, useInteractions as tf } from "@floating-ui/react";
|
|
8
8
|
import * as pi from "react-dom";
|
|
@@ -136,7 +136,7 @@ Error message: ${vi(t)}`,
|
|
|
136
136
|
static isInstance(e) {
|
|
137
137
|
return ft.hasMarker(e, _i);
|
|
138
138
|
}
|
|
139
|
-
}, Ei = "AI_TypeValidationError", Si = `vercel.ai.error.${Ei}`, pf = Symbol.for(Si), ks, Ps, Kt = class
|
|
139
|
+
}, Ei = "AI_TypeValidationError", Si = `vercel.ai.error.${Ei}`, pf = Symbol.for(Si), ks, Ps, Kt = class Eo extends (Ps = ft, ks = pf, Ps) {
|
|
140
140
|
constructor({ value: t, cause: n }) {
|
|
141
141
|
super({
|
|
142
142
|
name: Ei,
|
|
@@ -162,7 +162,7 @@ Error message: ${vi(n)}`,
|
|
|
162
162
|
value: t,
|
|
163
163
|
cause: n
|
|
164
164
|
}) {
|
|
165
|
-
return
|
|
165
|
+
return Eo.isInstance(n) && n.value === t ? n : new Eo({ value: t, cause: n });
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
function C(e, t, n) {
|
|
@@ -246,7 +246,7 @@ function q(e, t, n) {
|
|
|
246
246
|
configurable: !0
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function xr(e, t, n) {
|
|
250
250
|
Object.defineProperty(e, t, {
|
|
251
251
|
value: n,
|
|
252
252
|
writable: !0,
|
|
@@ -259,7 +259,7 @@ function sn(e) {
|
|
|
259
259
|
}
|
|
260
260
|
const Ti = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
|
|
261
261
|
};
|
|
262
|
-
function
|
|
262
|
+
function pr(e) {
|
|
263
263
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
264
264
|
}
|
|
265
265
|
const gf = Bo(() => {
|
|
@@ -272,14 +272,14 @@ const gf = Bo(() => {
|
|
|
272
272
|
return !1;
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
function
|
|
276
|
-
if (
|
|
275
|
+
function mr(e) {
|
|
276
|
+
if (pr(e) === !1)
|
|
277
277
|
return !1;
|
|
278
278
|
const t = e.constructor;
|
|
279
279
|
if (t === void 0)
|
|
280
280
|
return !0;
|
|
281
281
|
const n = t.prototype;
|
|
282
|
-
return !(
|
|
282
|
+
return !(pr(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
283
283
|
}
|
|
284
284
|
const vf = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
285
285
|
function Rn(e) {
|
|
@@ -289,7 +289,7 @@ function kt(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 k(e) {
|
|
293
293
|
const t = e;
|
|
294
294
|
if (!t)
|
|
295
295
|
return {};
|
|
@@ -339,13 +339,13 @@ function _f(e, t) {
|
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
341
|
function Ef(e, t) {
|
|
342
|
-
if (!
|
|
342
|
+
if (!mr(t))
|
|
343
343
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
344
344
|
const n = {
|
|
345
345
|
...e._zod.def,
|
|
346
346
|
get shape() {
|
|
347
347
|
const r = { ...e._zod.def.shape, ...t };
|
|
348
|
-
return
|
|
348
|
+
return xr(this, "shape", r), r;
|
|
349
349
|
},
|
|
350
350
|
checks: []
|
|
351
351
|
// delete existing checks
|
|
@@ -357,7 +357,7 @@ function Sf(e, t) {
|
|
|
357
357
|
...e._zod.def,
|
|
358
358
|
get shape() {
|
|
359
359
|
const n = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
360
|
-
return
|
|
360
|
+
return xr(this, "shape", n), n;
|
|
361
361
|
},
|
|
362
362
|
catchall: t._zod.def.catchall,
|
|
363
363
|
checks: []
|
|
@@ -728,7 +728,7 @@ const Qf = (e) => {
|
|
|
728
728
|
continue: !t.abort
|
|
729
729
|
});
|
|
730
730
|
};
|
|
731
|
-
}),
|
|
731
|
+
}), Tr = /* @__PURE__ */ C("$ZodCheckStringFormat", (e, t) => {
|
|
732
732
|
var n, r;
|
|
733
733
|
Se.init(e, t), e._zod.onattach.push((o) => {
|
|
734
734
|
const s = o._zod.bag;
|
|
@@ -746,7 +746,7 @@ const Qf = (e) => {
|
|
|
746
746
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
747
747
|
});
|
|
748
748
|
}), dp = /* @__PURE__ */ C("$ZodCheckRegex", (e, t) => {
|
|
749
|
-
|
|
749
|
+
Tr.init(e, t), e._zod.check = (n) => {
|
|
750
750
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
751
751
|
origin: "string",
|
|
752
752
|
code: "invalid_format",
|
|
@@ -758,9 +758,9 @@ const Qf = (e) => {
|
|
|
758
758
|
});
|
|
759
759
|
};
|
|
760
760
|
}), fp = /* @__PURE__ */ C("$ZodCheckLowerCase", (e, t) => {
|
|
761
|
-
t.pattern ?? (t.pattern = op),
|
|
761
|
+
t.pattern ?? (t.pattern = op), Tr.init(e, t);
|
|
762
762
|
}), pp = /* @__PURE__ */ C("$ZodCheckUpperCase", (e, t) => {
|
|
763
|
-
t.pattern ?? (t.pattern = sp),
|
|
763
|
+
t.pattern ?? (t.pattern = sp), Tr.init(e, t);
|
|
764
764
|
}), mp = /* @__PURE__ */ C("$ZodCheckIncludes", (e, t) => {
|
|
765
765
|
Se.init(e, t);
|
|
766
766
|
const n = Rn(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
@@ -917,7 +917,7 @@ const bp = {
|
|
|
917
917
|
}), n;
|
|
918
918
|
};
|
|
919
919
|
}), oe = /* @__PURE__ */ C("$ZodStringFormat", (e, t) => {
|
|
920
|
-
|
|
920
|
+
Tr.init(e, t), Wo.init(e, t);
|
|
921
921
|
}), wp = /* @__PURE__ */ C("$ZodGUID", (e, t) => {
|
|
922
922
|
t.pattern ?? (t.pattern = Ff), oe.init(e, t);
|
|
923
923
|
}), _p = /* @__PURE__ */ C("$ZodUUID", (e, t) => {
|
|
@@ -1274,7 +1274,7 @@ const qp = /* @__PURE__ */ C("$ZodObject", (e, t) => {
|
|
|
1274
1274
|
return (_, y) => b(u, _, y);
|
|
1275
1275
|
};
|
|
1276
1276
|
let o;
|
|
1277
|
-
const s =
|
|
1277
|
+
const s = pr, i = !Ci.jitless, c = i && gf.value, l = t.catchall;
|
|
1278
1278
|
let d;
|
|
1279
1279
|
e._zod.parse = (u, h) => {
|
|
1280
1280
|
d ?? (d = n.value);
|
|
@@ -1389,7 +1389,7 @@ const Zi = /* @__PURE__ */ C("$ZodUnion", (e, t) => {
|
|
|
1389
1389
|
});
|
|
1390
1390
|
e._zod.parse = (o, s) => {
|
|
1391
1391
|
const i = o.value;
|
|
1392
|
-
if (!
|
|
1392
|
+
if (!pr(i))
|
|
1393
1393
|
return o.issues.push({
|
|
1394
1394
|
code: "invalid_type",
|
|
1395
1395
|
expected: "object",
|
|
@@ -1412,15 +1412,15 @@ const Zi = /* @__PURE__ */ C("$ZodUnion", (e, t) => {
|
|
|
1412
1412
|
return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([c, l]) => Fs(n, c, l)) : Fs(n, s, i);
|
|
1413
1413
|
};
|
|
1414
1414
|
});
|
|
1415
|
-
function
|
|
1415
|
+
function So(e, t) {
|
|
1416
1416
|
if (e === t)
|
|
1417
1417
|
return { valid: !0, data: e };
|
|
1418
1418
|
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
1419
1419
|
return { valid: !0, data: e };
|
|
1420
|
-
if (
|
|
1420
|
+
if (mr(e) && mr(t)) {
|
|
1421
1421
|
const n = Object.keys(t), r = Object.keys(e).filter((s) => n.indexOf(s) !== -1), o = { ...e, ...t };
|
|
1422
1422
|
for (const s of r) {
|
|
1423
|
-
const i =
|
|
1423
|
+
const i = So(e[s], t[s]);
|
|
1424
1424
|
if (!i.valid)
|
|
1425
1425
|
return {
|
|
1426
1426
|
valid: !1,
|
|
@@ -1435,7 +1435,7 @@ function Eo(e, t) {
|
|
|
1435
1435
|
return { valid: !1, mergeErrorPath: [] };
|
|
1436
1436
|
const n = [];
|
|
1437
1437
|
for (let r = 0; r < e.length; r++) {
|
|
1438
|
-
const o = e[r], s = t[r], i =
|
|
1438
|
+
const o = e[r], s = t[r], i = So(o, s);
|
|
1439
1439
|
if (!i.valid)
|
|
1440
1440
|
return {
|
|
1441
1441
|
valid: !1,
|
|
@@ -1450,7 +1450,7 @@ function Eo(e, t) {
|
|
|
1450
1450
|
function Fs(e, t, n) {
|
|
1451
1451
|
if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), mn(e))
|
|
1452
1452
|
return e;
|
|
1453
|
-
const r =
|
|
1453
|
+
const r = So(t.value, n.value);
|
|
1454
1454
|
if (!r.valid)
|
|
1455
1455
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
|
|
1456
1456
|
return e.value = r.data, e;
|
|
@@ -1458,7 +1458,7 @@ function Fs(e, t, n) {
|
|
|
1458
1458
|
const em = /* @__PURE__ */ C("$ZodRecord", (e, t) => {
|
|
1459
1459
|
te.init(e, t), e._zod.parse = (n, r) => {
|
|
1460
1460
|
const o = n.value;
|
|
1461
|
-
if (!
|
|
1461
|
+
if (!mr(o))
|
|
1462
1462
|
return n.issues.push({
|
|
1463
1463
|
expected: "record",
|
|
1464
1464
|
code: "invalid_type",
|
|
@@ -1682,7 +1682,7 @@ const an = /* @__PURE__ */ mm();
|
|
|
1682
1682
|
function hm(e, t) {
|
|
1683
1683
|
return new e({
|
|
1684
1684
|
type: "string",
|
|
1685
|
-
...
|
|
1685
|
+
...k(t)
|
|
1686
1686
|
});
|
|
1687
1687
|
}
|
|
1688
1688
|
function gm(e, t) {
|
|
@@ -1691,7 +1691,7 @@ function gm(e, t) {
|
|
|
1691
1691
|
format: "email",
|
|
1692
1692
|
check: "string_format",
|
|
1693
1693
|
abort: !1,
|
|
1694
|
-
...
|
|
1694
|
+
...k(t)
|
|
1695
1695
|
});
|
|
1696
1696
|
}
|
|
1697
1697
|
function Vs(e, t) {
|
|
@@ -1700,7 +1700,7 @@ function Vs(e, t) {
|
|
|
1700
1700
|
format: "guid",
|
|
1701
1701
|
check: "string_format",
|
|
1702
1702
|
abort: !1,
|
|
1703
|
-
...
|
|
1703
|
+
...k(t)
|
|
1704
1704
|
});
|
|
1705
1705
|
}
|
|
1706
1706
|
function vm(e, t) {
|
|
@@ -1709,7 +1709,7 @@ function vm(e, t) {
|
|
|
1709
1709
|
format: "uuid",
|
|
1710
1710
|
check: "string_format",
|
|
1711
1711
|
abort: !1,
|
|
1712
|
-
...
|
|
1712
|
+
...k(t)
|
|
1713
1713
|
});
|
|
1714
1714
|
}
|
|
1715
1715
|
function ym(e, t) {
|
|
@@ -1719,7 +1719,7 @@ function ym(e, t) {
|
|
|
1719
1719
|
check: "string_format",
|
|
1720
1720
|
abort: !1,
|
|
1721
1721
|
version: "v4",
|
|
1722
|
-
...
|
|
1722
|
+
...k(t)
|
|
1723
1723
|
});
|
|
1724
1724
|
}
|
|
1725
1725
|
function bm(e, t) {
|
|
@@ -1729,7 +1729,7 @@ function bm(e, t) {
|
|
|
1729
1729
|
check: "string_format",
|
|
1730
1730
|
abort: !1,
|
|
1731
1731
|
version: "v6",
|
|
1732
|
-
...
|
|
1732
|
+
...k(t)
|
|
1733
1733
|
});
|
|
1734
1734
|
}
|
|
1735
1735
|
function wm(e, t) {
|
|
@@ -1739,7 +1739,7 @@ function wm(e, t) {
|
|
|
1739
1739
|
check: "string_format",
|
|
1740
1740
|
abort: !1,
|
|
1741
1741
|
version: "v7",
|
|
1742
|
-
...
|
|
1742
|
+
...k(t)
|
|
1743
1743
|
});
|
|
1744
1744
|
}
|
|
1745
1745
|
function _m(e, t) {
|
|
@@ -1748,7 +1748,7 @@ function _m(e, t) {
|
|
|
1748
1748
|
format: "url",
|
|
1749
1749
|
check: "string_format",
|
|
1750
1750
|
abort: !1,
|
|
1751
|
-
...
|
|
1751
|
+
...k(t)
|
|
1752
1752
|
});
|
|
1753
1753
|
}
|
|
1754
1754
|
function Em(e, t) {
|
|
@@ -1757,7 +1757,7 @@ function Em(e, t) {
|
|
|
1757
1757
|
format: "emoji",
|
|
1758
1758
|
check: "string_format",
|
|
1759
1759
|
abort: !1,
|
|
1760
|
-
...
|
|
1760
|
+
...k(t)
|
|
1761
1761
|
});
|
|
1762
1762
|
}
|
|
1763
1763
|
function Sm(e, t) {
|
|
@@ -1766,7 +1766,7 @@ function Sm(e, t) {
|
|
|
1766
1766
|
format: "nanoid",
|
|
1767
1767
|
check: "string_format",
|
|
1768
1768
|
abort: !1,
|
|
1769
|
-
...
|
|
1769
|
+
...k(t)
|
|
1770
1770
|
});
|
|
1771
1771
|
}
|
|
1772
1772
|
function Cm(e, t) {
|
|
@@ -1775,7 +1775,7 @@ function Cm(e, t) {
|
|
|
1775
1775
|
format: "cuid",
|
|
1776
1776
|
check: "string_format",
|
|
1777
1777
|
abort: !1,
|
|
1778
|
-
...
|
|
1778
|
+
...k(t)
|
|
1779
1779
|
});
|
|
1780
1780
|
}
|
|
1781
1781
|
function xm(e, t) {
|
|
@@ -1784,7 +1784,7 @@ function xm(e, t) {
|
|
|
1784
1784
|
format: "cuid2",
|
|
1785
1785
|
check: "string_format",
|
|
1786
1786
|
abort: !1,
|
|
1787
|
-
...
|
|
1787
|
+
...k(t)
|
|
1788
1788
|
});
|
|
1789
1789
|
}
|
|
1790
1790
|
function Tm(e, t) {
|
|
@@ -1793,7 +1793,7 @@ function Tm(e, t) {
|
|
|
1793
1793
|
format: "ulid",
|
|
1794
1794
|
check: "string_format",
|
|
1795
1795
|
abort: !1,
|
|
1796
|
-
...
|
|
1796
|
+
...k(t)
|
|
1797
1797
|
});
|
|
1798
1798
|
}
|
|
1799
1799
|
function Im(e, t) {
|
|
@@ -1802,7 +1802,7 @@ function Im(e, t) {
|
|
|
1802
1802
|
format: "xid",
|
|
1803
1803
|
check: "string_format",
|
|
1804
1804
|
abort: !1,
|
|
1805
|
-
...
|
|
1805
|
+
...k(t)
|
|
1806
1806
|
});
|
|
1807
1807
|
}
|
|
1808
1808
|
function Am(e, t) {
|
|
@@ -1811,7 +1811,7 @@ function Am(e, t) {
|
|
|
1811
1811
|
format: "ksuid",
|
|
1812
1812
|
check: "string_format",
|
|
1813
1813
|
abort: !1,
|
|
1814
|
-
...
|
|
1814
|
+
...k(t)
|
|
1815
1815
|
});
|
|
1816
1816
|
}
|
|
1817
1817
|
function Rm(e, t) {
|
|
@@ -1820,7 +1820,7 @@ function Rm(e, t) {
|
|
|
1820
1820
|
format: "ipv4",
|
|
1821
1821
|
check: "string_format",
|
|
1822
1822
|
abort: !1,
|
|
1823
|
-
...
|
|
1823
|
+
...k(t)
|
|
1824
1824
|
});
|
|
1825
1825
|
}
|
|
1826
1826
|
function Om(e, t) {
|
|
@@ -1829,7 +1829,7 @@ function Om(e, t) {
|
|
|
1829
1829
|
format: "ipv6",
|
|
1830
1830
|
check: "string_format",
|
|
1831
1831
|
abort: !1,
|
|
1832
|
-
...
|
|
1832
|
+
...k(t)
|
|
1833
1833
|
});
|
|
1834
1834
|
}
|
|
1835
1835
|
function Nm(e, t) {
|
|
@@ -1838,7 +1838,7 @@ function Nm(e, t) {
|
|
|
1838
1838
|
format: "cidrv4",
|
|
1839
1839
|
check: "string_format",
|
|
1840
1840
|
abort: !1,
|
|
1841
|
-
...
|
|
1841
|
+
...k(t)
|
|
1842
1842
|
});
|
|
1843
1843
|
}
|
|
1844
1844
|
function Mm(e, t) {
|
|
@@ -1847,7 +1847,7 @@ function Mm(e, t) {
|
|
|
1847
1847
|
format: "cidrv6",
|
|
1848
1848
|
check: "string_format",
|
|
1849
1849
|
abort: !1,
|
|
1850
|
-
...
|
|
1850
|
+
...k(t)
|
|
1851
1851
|
});
|
|
1852
1852
|
}
|
|
1853
1853
|
function km(e, t) {
|
|
@@ -1856,7 +1856,7 @@ function km(e, t) {
|
|
|
1856
1856
|
format: "base64",
|
|
1857
1857
|
check: "string_format",
|
|
1858
1858
|
abort: !1,
|
|
1859
|
-
...
|
|
1859
|
+
...k(t)
|
|
1860
1860
|
});
|
|
1861
1861
|
}
|
|
1862
1862
|
function Pm(e, t) {
|
|
@@ -1865,7 +1865,7 @@ function Pm(e, t) {
|
|
|
1865
1865
|
format: "base64url",
|
|
1866
1866
|
check: "string_format",
|
|
1867
1867
|
abort: !1,
|
|
1868
|
-
...
|
|
1868
|
+
...k(t)
|
|
1869
1869
|
});
|
|
1870
1870
|
}
|
|
1871
1871
|
function Dm(e, t) {
|
|
@@ -1874,7 +1874,7 @@ function Dm(e, t) {
|
|
|
1874
1874
|
format: "e164",
|
|
1875
1875
|
check: "string_format",
|
|
1876
1876
|
abort: !1,
|
|
1877
|
-
...
|
|
1877
|
+
...k(t)
|
|
1878
1878
|
});
|
|
1879
1879
|
}
|
|
1880
1880
|
function $m(e, t) {
|
|
@@ -1883,7 +1883,7 @@ function $m(e, t) {
|
|
|
1883
1883
|
format: "jwt",
|
|
1884
1884
|
check: "string_format",
|
|
1885
1885
|
abort: !1,
|
|
1886
|
-
...
|
|
1886
|
+
...k(t)
|
|
1887
1887
|
});
|
|
1888
1888
|
}
|
|
1889
1889
|
function Lm(e, t) {
|
|
@@ -1894,7 +1894,7 @@ function Lm(e, t) {
|
|
|
1894
1894
|
offset: !1,
|
|
1895
1895
|
local: !1,
|
|
1896
1896
|
precision: null,
|
|
1897
|
-
...
|
|
1897
|
+
...k(t)
|
|
1898
1898
|
});
|
|
1899
1899
|
}
|
|
1900
1900
|
function zm(e, t) {
|
|
@@ -1902,7 +1902,7 @@ function zm(e, t) {
|
|
|
1902
1902
|
type: "string",
|
|
1903
1903
|
format: "date",
|
|
1904
1904
|
check: "string_format",
|
|
1905
|
-
...
|
|
1905
|
+
...k(t)
|
|
1906
1906
|
});
|
|
1907
1907
|
}
|
|
1908
1908
|
function Fm(e, t) {
|
|
@@ -1911,7 +1911,7 @@ function Fm(e, t) {
|
|
|
1911
1911
|
format: "time",
|
|
1912
1912
|
check: "string_format",
|
|
1913
1913
|
precision: null,
|
|
1914
|
-
...
|
|
1914
|
+
...k(t)
|
|
1915
1915
|
});
|
|
1916
1916
|
}
|
|
1917
1917
|
function Zm(e, t) {
|
|
@@ -1919,14 +1919,14 @@ function Zm(e, t) {
|
|
|
1919
1919
|
type: "string",
|
|
1920
1920
|
format: "duration",
|
|
1921
1921
|
check: "string_format",
|
|
1922
|
-
...
|
|
1922
|
+
...k(t)
|
|
1923
1923
|
});
|
|
1924
1924
|
}
|
|
1925
1925
|
function Um(e, t) {
|
|
1926
1926
|
return new e({
|
|
1927
1927
|
type: "number",
|
|
1928
1928
|
checks: [],
|
|
1929
|
-
...
|
|
1929
|
+
...k(t)
|
|
1930
1930
|
});
|
|
1931
1931
|
}
|
|
1932
1932
|
function Bm(e, t) {
|
|
@@ -1935,19 +1935,19 @@ function Bm(e, t) {
|
|
|
1935
1935
|
check: "number_format",
|
|
1936
1936
|
abort: !1,
|
|
1937
1937
|
format: "safeint",
|
|
1938
|
-
...
|
|
1938
|
+
...k(t)
|
|
1939
1939
|
});
|
|
1940
1940
|
}
|
|
1941
1941
|
function jm(e, t) {
|
|
1942
1942
|
return new e({
|
|
1943
1943
|
type: "boolean",
|
|
1944
|
-
...
|
|
1944
|
+
...k(t)
|
|
1945
1945
|
});
|
|
1946
1946
|
}
|
|
1947
1947
|
function Hm(e, t) {
|
|
1948
1948
|
return new e({
|
|
1949
1949
|
type: "null",
|
|
1950
|
-
...
|
|
1950
|
+
...k(t)
|
|
1951
1951
|
});
|
|
1952
1952
|
}
|
|
1953
1953
|
function Vm(e) {
|
|
@@ -1958,21 +1958,21 @@ function Vm(e) {
|
|
|
1958
1958
|
function Wm(e, t) {
|
|
1959
1959
|
return new e({
|
|
1960
1960
|
type: "never",
|
|
1961
|
-
...
|
|
1961
|
+
...k(t)
|
|
1962
1962
|
});
|
|
1963
1963
|
}
|
|
1964
1964
|
function Ws(e, t) {
|
|
1965
1965
|
return new $i({
|
|
1966
1966
|
check: "less_than",
|
|
1967
|
-
...
|
|
1967
|
+
...k(t),
|
|
1968
1968
|
value: e,
|
|
1969
1969
|
inclusive: !1
|
|
1970
1970
|
});
|
|
1971
1971
|
}
|
|
1972
|
-
function
|
|
1972
|
+
function Jr(e, t) {
|
|
1973
1973
|
return new $i({
|
|
1974
1974
|
check: "less_than",
|
|
1975
|
-
...
|
|
1975
|
+
...k(t),
|
|
1976
1976
|
value: e,
|
|
1977
1977
|
inclusive: !0
|
|
1978
1978
|
});
|
|
@@ -1980,15 +1980,15 @@ function Yr(e, t) {
|
|
|
1980
1980
|
function Gs(e, t) {
|
|
1981
1981
|
return new Li({
|
|
1982
1982
|
check: "greater_than",
|
|
1983
|
-
...
|
|
1983
|
+
...k(t),
|
|
1984
1984
|
value: e,
|
|
1985
1985
|
inclusive: !1
|
|
1986
1986
|
});
|
|
1987
1987
|
}
|
|
1988
|
-
function
|
|
1988
|
+
function Kr(e, t) {
|
|
1989
1989
|
return new Li({
|
|
1990
1990
|
check: "greater_than",
|
|
1991
|
-
...
|
|
1991
|
+
...k(t),
|
|
1992
1992
|
value: e,
|
|
1993
1993
|
inclusive: !0
|
|
1994
1994
|
});
|
|
@@ -1996,28 +1996,28 @@ function Jr(e, t) {
|
|
|
1996
1996
|
function Ys(e, t) {
|
|
1997
1997
|
return new ap({
|
|
1998
1998
|
check: "multiple_of",
|
|
1999
|
-
...
|
|
1999
|
+
...k(t),
|
|
2000
2000
|
value: e
|
|
2001
2001
|
});
|
|
2002
2002
|
}
|
|
2003
2003
|
function Bi(e, t) {
|
|
2004
2004
|
return new cp({
|
|
2005
2005
|
check: "max_length",
|
|
2006
|
-
...
|
|
2006
|
+
...k(t),
|
|
2007
2007
|
maximum: e
|
|
2008
2008
|
});
|
|
2009
2009
|
}
|
|
2010
|
-
function
|
|
2010
|
+
function hr(e, t) {
|
|
2011
2011
|
return new lp({
|
|
2012
2012
|
check: "min_length",
|
|
2013
|
-
...
|
|
2013
|
+
...k(t),
|
|
2014
2014
|
minimum: e
|
|
2015
2015
|
});
|
|
2016
2016
|
}
|
|
2017
2017
|
function ji(e, t) {
|
|
2018
2018
|
return new up({
|
|
2019
2019
|
check: "length_equals",
|
|
2020
|
-
...
|
|
2020
|
+
...k(t),
|
|
2021
2021
|
length: e
|
|
2022
2022
|
});
|
|
2023
2023
|
}
|
|
@@ -2025,7 +2025,7 @@ function Gm(e, t) {
|
|
|
2025
2025
|
return new dp({
|
|
2026
2026
|
check: "string_format",
|
|
2027
2027
|
format: "regex",
|
|
2028
|
-
...
|
|
2028
|
+
...k(t),
|
|
2029
2029
|
pattern: e
|
|
2030
2030
|
});
|
|
2031
2031
|
}
|
|
@@ -2033,21 +2033,21 @@ function Ym(e) {
|
|
|
2033
2033
|
return new fp({
|
|
2034
2034
|
check: "string_format",
|
|
2035
2035
|
format: "lowercase",
|
|
2036
|
-
...
|
|
2036
|
+
...k(e)
|
|
2037
2037
|
});
|
|
2038
2038
|
}
|
|
2039
2039
|
function Jm(e) {
|
|
2040
2040
|
return new pp({
|
|
2041
2041
|
check: "string_format",
|
|
2042
2042
|
format: "uppercase",
|
|
2043
|
-
...
|
|
2043
|
+
...k(e)
|
|
2044
2044
|
});
|
|
2045
2045
|
}
|
|
2046
2046
|
function Km(e, t) {
|
|
2047
2047
|
return new mp({
|
|
2048
2048
|
check: "string_format",
|
|
2049
2049
|
format: "includes",
|
|
2050
|
-
...
|
|
2050
|
+
...k(t),
|
|
2051
2051
|
includes: e
|
|
2052
2052
|
});
|
|
2053
2053
|
}
|
|
@@ -2055,7 +2055,7 @@ function qm(e, t) {
|
|
|
2055
2055
|
return new hp({
|
|
2056
2056
|
check: "string_format",
|
|
2057
2057
|
format: "starts_with",
|
|
2058
|
-
...
|
|
2058
|
+
...k(t),
|
|
2059
2059
|
prefix: e
|
|
2060
2060
|
});
|
|
2061
2061
|
}
|
|
@@ -2063,7 +2063,7 @@ function Xm(e, t) {
|
|
|
2063
2063
|
return new gp({
|
|
2064
2064
|
check: "string_format",
|
|
2065
2065
|
format: "ends_with",
|
|
2066
|
-
...
|
|
2066
|
+
...k(t),
|
|
2067
2067
|
suffix: e
|
|
2068
2068
|
});
|
|
2069
2069
|
}
|
|
@@ -2092,11 +2092,11 @@ function rh(e, t, n) {
|
|
|
2092
2092
|
// get element() {
|
|
2093
2093
|
// return element;
|
|
2094
2094
|
// },
|
|
2095
|
-
...
|
|
2095
|
+
...k(n)
|
|
2096
2096
|
});
|
|
2097
2097
|
}
|
|
2098
2098
|
function oh(e, t, n) {
|
|
2099
|
-
const r =
|
|
2099
|
+
const r = k(n);
|
|
2100
2100
|
return r.abort ?? (r.abort = !0), new e({
|
|
2101
2101
|
type: "custom",
|
|
2102
2102
|
check: "custom",
|
|
@@ -2109,7 +2109,7 @@ function sh(e, t, n) {
|
|
|
2109
2109
|
type: "custom",
|
|
2110
2110
|
check: "custom",
|
|
2111
2111
|
fn: t,
|
|
2112
|
-
...
|
|
2112
|
+
...k(n)
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
2115
2115
|
class Js {
|
|
@@ -2671,9 +2671,9 @@ const hh = (e, t) => {
|
|
|
2671
2671
|
// enumerable: false,
|
|
2672
2672
|
}
|
|
2673
2673
|
});
|
|
2674
|
-
},
|
|
2674
|
+
}, Ir = C("ZodError", hh, {
|
|
2675
2675
|
Parent: Error
|
|
2676
|
-
}), gh = /* @__PURE__ */ Af(
|
|
2676
|
+
}), gh = /* @__PURE__ */ Af(Ir), vh = /* @__PURE__ */ Rf(Ir), yh = /* @__PURE__ */ Oi(Ir), Hi = /* @__PURE__ */ Ni(Ir), se = /* @__PURE__ */ C("ZodType", (e, t) => (te.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(
|
|
2677
2677
|
{
|
|
2678
2678
|
...t,
|
|
2679
2679
|
checks: [
|
|
@@ -2698,7 +2698,7 @@ const hh = (e, t) => {
|
|
|
2698
2698
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Vi = /* @__PURE__ */ C("_ZodString", (e, t) => {
|
|
2699
2699
|
Wo.init(e, t), se.init(e, t);
|
|
2700
2700
|
const n = e._zod.bag;
|
|
2701
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(Gm(...r)), e.includes = (...r) => e.check(Km(...r)), e.startsWith = (...r) => e.check(qm(...r)), e.endsWith = (...r) => e.check(Xm(...r)), e.min = (...r) => e.check(
|
|
2701
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(Gm(...r)), e.includes = (...r) => e.check(Km(...r)), e.startsWith = (...r) => e.check(qm(...r)), e.endsWith = (...r) => e.check(Xm(...r)), e.min = (...r) => e.check(hr(...r)), e.max = (...r) => e.check(Bi(...r)), e.length = (...r) => e.check(ji(...r)), e.nonempty = (...r) => e.check(hr(1, ...r)), e.lowercase = (r) => e.check(Ym(r)), e.uppercase = (r) => e.check(Jm(r)), e.trim = () => e.check(eh()), e.normalize = (...r) => e.check(Qm(...r)), e.toLowerCase = () => e.check(th()), e.toUpperCase = () => e.check(nh());
|
|
2702
2702
|
}), bh = /* @__PURE__ */ C("ZodString", (e, t) => {
|
|
2703
2703
|
Wo.init(e, t), Vi.init(e, t), e.email = (n) => e.check(gm(wh, n)), e.url = (n) => e.check(_m(_h, n)), e.jwt = (n) => e.check($m($h, n)), e.emoji = (n) => e.check(Em(Eh, n)), e.guid = (n) => e.check(Vs(Ks, n)), e.uuid = (n) => e.check(vm(Hn, n)), e.uuidv4 = (n) => e.check(ym(Hn, n)), e.uuidv6 = (n) => e.check(bm(Hn, n)), e.uuidv7 = (n) => e.check(wm(Hn, n)), e.nanoid = (n) => e.check(Sm(Sh, n)), e.guid = (n) => e.check(Vs(Ks, n)), e.cuid = (n) => e.check(Cm(Ch, n)), e.cuid2 = (n) => e.check(xm(xh, n)), e.ulid = (n) => e.check(Tm(Th, n)), e.base64 = (n) => e.check(km(kh, n)), e.base64url = (n) => e.check(Pm(Ph, n)), e.xid = (n) => e.check(Im(Ih, n)), e.ksuid = (n) => e.check(Am(Ah, n)), e.ipv4 = (n) => e.check(Rm(Rh, n)), e.ipv6 = (n) => e.check(Om(Oh, n)), e.cidrv4 = (n) => e.check(Nm(Nh, n)), e.cidrv6 = (n) => e.check(Mm(Mh, n)), e.e164 = (n) => e.check(Dm(Dh, n)), e.datetime = (n) => e.check(ch(n)), e.date = (n) => e.check(uh(n)), e.time = (n) => e.check(fh(n)), e.duration = (n) => e.check(mh(n));
|
|
2704
2704
|
});
|
|
@@ -2746,7 +2746,7 @@ const ae = /* @__PURE__ */ C("ZodStringFormat", (e, t) => {
|
|
|
2746
2746
|
}), $h = /* @__PURE__ */ C("ZodJWT", (e, t) => {
|
|
2747
2747
|
Hp.init(e, t), ae.init(e, t);
|
|
2748
2748
|
}), Wi = /* @__PURE__ */ C("ZodNumber", (e, t) => {
|
|
2749
|
-
Fi.init(e, t), se.init(e, t), e.gt = (r, o) => e.check(Gs(r, o)), e.gte = (r, o) => e.check(
|
|
2749
|
+
Fi.init(e, t), se.init(e, t), e.gt = (r, o) => e.check(Gs(r, o)), e.gte = (r, o) => e.check(Kr(r, o)), e.min = (r, o) => e.check(Kr(r, o)), e.lt = (r, o) => e.check(Ws(r, o)), e.lte = (r, o) => e.check(Jr(r, o)), e.max = (r, o) => e.check(Jr(r, o)), e.int = (r) => e.check(qs(r)), e.safe = (r) => e.check(qs(r)), e.positive = (r) => e.check(Gs(0, r)), e.nonnegative = (r) => e.check(Kr(0, r)), e.negative = (r) => e.check(Ws(0, r)), e.nonpositive = (r) => e.check(Jr(0, r)), e.multipleOf = (r, o) => e.check(Ys(r, o)), e.step = (r, o) => e.check(Ys(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
|
});
|
|
@@ -2784,7 +2784,7 @@ function Gi(e) {
|
|
|
2784
2784
|
return Wm(jh, e);
|
|
2785
2785
|
}
|
|
2786
2786
|
const Hh = /* @__PURE__ */ C("ZodArray", (e, t) => {
|
|
2787
|
-
Kp.init(e, t), se.init(e, t), e.element = t.element, e.min = (n, r) => e.check(
|
|
2787
|
+
Kp.init(e, t), se.init(e, t), e.element = t.element, e.min = (n, r) => e.check(hr(n, r)), e.nonempty = (n) => e.check(hr(1, n)), e.max = (n, r) => e.check(Bi(n, r)), e.length = (n, r) => e.check(ji(n, r)), e.unwrap = () => e.element;
|
|
2788
2788
|
});
|
|
2789
2789
|
function en(e, t) {
|
|
2790
2790
|
return rh(Hh, e, t);
|
|
@@ -2796,9 +2796,9 @@ function ee(e, t) {
|
|
|
2796
2796
|
const n = {
|
|
2797
2797
|
type: "object",
|
|
2798
2798
|
get shape() {
|
|
2799
|
-
return
|
|
2799
|
+
return xr(this, "shape", { ...e }), this.shape;
|
|
2800
2800
|
},
|
|
2801
|
-
...
|
|
2801
|
+
...k(t)
|
|
2802
2802
|
};
|
|
2803
2803
|
return new Yi(n);
|
|
2804
2804
|
}
|
|
@@ -2806,10 +2806,10 @@ function ne(e, t) {
|
|
|
2806
2806
|
return new Yi({
|
|
2807
2807
|
type: "object",
|
|
2808
2808
|
get shape() {
|
|
2809
|
-
return
|
|
2809
|
+
return xr(this, "shape", { ...e }), this.shape;
|
|
2810
2810
|
},
|
|
2811
2811
|
catchall: Gi(),
|
|
2812
|
-
...
|
|
2812
|
+
...k(t)
|
|
2813
2813
|
});
|
|
2814
2814
|
}
|
|
2815
2815
|
const Ji = /* @__PURE__ */ C("ZodUnion", (e, t) => {
|
|
@@ -2819,7 +2819,7 @@ function be(e, t) {
|
|
|
2819
2819
|
return new Ji({
|
|
2820
2820
|
type: "union",
|
|
2821
2821
|
options: e,
|
|
2822
|
-
...
|
|
2822
|
+
...k(t)
|
|
2823
2823
|
});
|
|
2824
2824
|
}
|
|
2825
2825
|
const Vh = /* @__PURE__ */ C("ZodDiscriminatedUnion", (e, t) => {
|
|
@@ -2830,7 +2830,7 @@ function Wh(e, t, n) {
|
|
|
2830
2830
|
type: "union",
|
|
2831
2831
|
options: t,
|
|
2832
2832
|
discriminator: e,
|
|
2833
|
-
...
|
|
2833
|
+
...k(n)
|
|
2834
2834
|
});
|
|
2835
2835
|
}
|
|
2836
2836
|
const Gh = /* @__PURE__ */ C("ZodIntersection", (e, t) => {
|
|
@@ -2851,10 +2851,10 @@ function yn(e, t, n) {
|
|
|
2851
2851
|
type: "record",
|
|
2852
2852
|
keyType: e,
|
|
2853
2853
|
valueType: t,
|
|
2854
|
-
...
|
|
2854
|
+
...k(n)
|
|
2855
2855
|
});
|
|
2856
2856
|
}
|
|
2857
|
-
const
|
|
2857
|
+
const Co = /* @__PURE__ */ C("ZodEnum", (e, t) => {
|
|
2858
2858
|
tm.init(e, t), se.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
2859
2859
|
const n = new Set(Object.keys(t.entries));
|
|
2860
2860
|
e.extract = (r, o) => {
|
|
@@ -2864,10 +2864,10 @@ const So = /* @__PURE__ */ C("ZodEnum", (e, t) => {
|
|
|
2864
2864
|
s[i] = t.entries[i];
|
|
2865
2865
|
else
|
|
2866
2866
|
throw new Error(`Key ${i} not found in enum`);
|
|
2867
|
-
return new
|
|
2867
|
+
return new Co({
|
|
2868
2868
|
...t,
|
|
2869
2869
|
checks: [],
|
|
2870
|
-
...
|
|
2870
|
+
...k(o),
|
|
2871
2871
|
entries: s
|
|
2872
2872
|
});
|
|
2873
2873
|
}, e.exclude = (r, o) => {
|
|
@@ -2877,20 +2877,20 @@ const So = /* @__PURE__ */ C("ZodEnum", (e, t) => {
|
|
|
2877
2877
|
delete s[i];
|
|
2878
2878
|
else
|
|
2879
2879
|
throw new Error(`Key ${i} not found in enum`);
|
|
2880
|
-
return new
|
|
2880
|
+
return new Co({
|
|
2881
2881
|
...t,
|
|
2882
2882
|
checks: [],
|
|
2883
|
-
...
|
|
2883
|
+
...k(o),
|
|
2884
2884
|
entries: s
|
|
2885
2885
|
});
|
|
2886
2886
|
};
|
|
2887
2887
|
});
|
|
2888
2888
|
function Ki(e, t) {
|
|
2889
2889
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
2890
|
-
return new
|
|
2890
|
+
return new Co({
|
|
2891
2891
|
type: "enum",
|
|
2892
2892
|
entries: n,
|
|
2893
|
-
...
|
|
2893
|
+
...k(t)
|
|
2894
2894
|
});
|
|
2895
2895
|
}
|
|
2896
2896
|
const Kh = /* @__PURE__ */ C("ZodLiteral", (e, t) => {
|
|
@@ -2906,7 +2906,7 @@ function F(e, t) {
|
|
|
2906
2906
|
return new Kh({
|
|
2907
2907
|
type: "literal",
|
|
2908
2908
|
values: Array.isArray(e) ? e : [e],
|
|
2909
|
-
...
|
|
2909
|
+
...k(t)
|
|
2910
2910
|
});
|
|
2911
2911
|
}
|
|
2912
2912
|
const qh = /* @__PURE__ */ C("ZodTransform", (e, t) => {
|
|
@@ -2978,7 +2978,7 @@ function og(e, t) {
|
|
|
2978
2978
|
return new Xi({
|
|
2979
2979
|
type: "nonoptional",
|
|
2980
2980
|
innerType: e,
|
|
2981
|
-
...
|
|
2981
|
+
...k(t)
|
|
2982
2982
|
});
|
|
2983
2983
|
}
|
|
2984
2984
|
const sg = /* @__PURE__ */ C("ZodCatch", (e, t) => {
|
|
@@ -3047,7 +3047,7 @@ function mg(e) {
|
|
|
3047
3047
|
}, e(n.value, n)));
|
|
3048
3048
|
return t;
|
|
3049
3049
|
}
|
|
3050
|
-
function
|
|
3050
|
+
function gr(e, t = {
|
|
3051
3051
|
error: `Input not instance of ${e.name}`
|
|
3052
3052
|
}) {
|
|
3053
3053
|
const n = new Go({
|
|
@@ -3055,7 +3055,7 @@ function hr(e, t = {
|
|
|
3055
3055
|
check: "custom",
|
|
3056
3056
|
fn: (r) => r instanceof e,
|
|
3057
3057
|
abort: !0,
|
|
3058
|
-
...
|
|
3058
|
+
...k(t)
|
|
3059
3059
|
});
|
|
3060
3060
|
return n._zod.bag.Class = e, n;
|
|
3061
3061
|
}
|
|
@@ -3068,14 +3068,14 @@ class ta 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 qr(e) {
|
|
3072
3072
|
}
|
|
3073
3073
|
function hg(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 = qr, onError: n = qr, onRetry: r = qr, onComment: o } = e;
|
|
3079
3079
|
let s = "", i = !0, a, c = "", l = "";
|
|
3080
3080
|
function d(f) {
|
|
3081
3081
|
const v = i ? f.replace(/^\xEF\xBB\xBF/, "") : f, [b, _] = gg(`${s}${v}`);
|
|
@@ -3443,7 +3443,7 @@ function Dg(e) {
|
|
|
3443
3443
|
const: e.value
|
|
3444
3444
|
};
|
|
3445
3445
|
}
|
|
3446
|
-
var
|
|
3446
|
+
var Xr = void 0, De = {
|
|
3447
3447
|
/**
|
|
3448
3448
|
* `c` was changed to `[cC]` to replicate /i flag
|
|
3449
3449
|
*/
|
|
@@ -3465,10 +3465,10 @@ var qr = void 0, De = {
|
|
|
3465
3465
|
* Fix in Zod:
|
|
3466
3466
|
* https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
|
|
3467
3467
|
*/
|
|
3468
|
-
emoji: () => (
|
|
3468
|
+
emoji: () => (Xr === void 0 && (Xr = RegExp(
|
|
3469
3469
|
"^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
|
|
3470
3470
|
"u"
|
|
3471
|
-
)),
|
|
3471
|
+
)), Xr),
|
|
3472
3472
|
/**
|
|
3473
3473
|
* Unused
|
|
3474
3474
|
*/
|
|
@@ -3532,7 +3532,7 @@ function rc(e, t) {
|
|
|
3532
3532
|
case "startsWith":
|
|
3533
3533
|
ve(
|
|
3534
3534
|
n,
|
|
3535
|
-
RegExp(`^${
|
|
3535
|
+
RegExp(`^${Qr(r.value, t)}`),
|
|
3536
3536
|
r.message,
|
|
3537
3537
|
t
|
|
3538
3538
|
);
|
|
@@ -3540,7 +3540,7 @@ function rc(e, t) {
|
|
|
3540
3540
|
case "endsWith":
|
|
3541
3541
|
ve(
|
|
3542
3542
|
n,
|
|
3543
|
-
RegExp(`${
|
|
3543
|
+
RegExp(`${Qr(r.value, t)}$`),
|
|
3544
3544
|
r.message,
|
|
3545
3545
|
t
|
|
3546
3546
|
);
|
|
@@ -3563,7 +3563,7 @@ function rc(e, t) {
|
|
|
3563
3563
|
case "includes": {
|
|
3564
3564
|
ve(
|
|
3565
3565
|
n,
|
|
3566
|
-
RegExp(
|
|
3566
|
+
RegExp(Qr(r.value, t)),
|
|
3567
3567
|
r.message,
|
|
3568
3568
|
t
|
|
3569
3569
|
);
|
|
@@ -3612,7 +3612,7 @@ function rc(e, t) {
|
|
|
3612
3612
|
}
|
|
3613
3613
|
return n;
|
|
3614
3614
|
}
|
|
3615
|
-
function
|
|
3615
|
+
function Qr(e, t) {
|
|
3616
3616
|
return t.patternStrategy === "escape" ? Lg(e) : e;
|
|
3617
3617
|
}
|
|
3618
3618
|
var $g = new Set(
|
|
@@ -3766,7 +3766,7 @@ function Ug() {
|
|
|
3766
3766
|
type: "null"
|
|
3767
3767
|
};
|
|
3768
3768
|
}
|
|
3769
|
-
var
|
|
3769
|
+
var xo = {
|
|
3770
3770
|
ZodString: "string",
|
|
3771
3771
|
ZodNumber: "number",
|
|
3772
3772
|
ZodBigInt: "integer",
|
|
@@ -3776,10 +3776,10 @@ var Co = {
|
|
|
3776
3776
|
function Bg(e, t) {
|
|
3777
3777
|
const n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
|
|
3778
3778
|
if (n.every(
|
|
3779
|
-
(r) => r._def.typeName in
|
|
3779
|
+
(r) => r._def.typeName in xo && (!r._def.checks || !r._def.checks.length)
|
|
3780
3780
|
)) {
|
|
3781
3781
|
const r = n.reduce((o, s) => {
|
|
3782
|
-
const i =
|
|
3782
|
+
const i = xo[s._def.typeName];
|
|
3783
3783
|
return i && !o.includes(i) ? [...o, i] : o;
|
|
3784
3784
|
}, []);
|
|
3785
3785
|
return {
|
|
@@ -3844,7 +3844,7 @@ function Hg(e, t) {
|
|
|
3844
3844
|
) && (!e.innerType._def.checks || !e.innerType._def.checks.length))
|
|
3845
3845
|
return {
|
|
3846
3846
|
type: [
|
|
3847
|
-
|
|
3847
|
+
xo[e.innerType._def.typeName],
|
|
3848
3848
|
"null"
|
|
3849
3849
|
]
|
|
3850
3850
|
};
|
|
@@ -4181,16 +4181,16 @@ var sv = (e, t) => {
|
|
|
4181
4181
|
}
|
|
4182
4182
|
};
|
|
4183
4183
|
return c.$schema = "http://json-schema.org/draft-07/schema#", c;
|
|
4184
|
-
},
|
|
4184
|
+
}, To = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
|
|
4185
4185
|
function lv(e) {
|
|
4186
4186
|
let t;
|
|
4187
4187
|
return () => (t == null && (t = e()), t);
|
|
4188
4188
|
}
|
|
4189
|
-
function
|
|
4189
|
+
function Ar(e, {
|
|
4190
4190
|
validate: t
|
|
4191
4191
|
} = {}) {
|
|
4192
4192
|
return {
|
|
4193
|
-
[
|
|
4193
|
+
[To]: !0,
|
|
4194
4194
|
_type: void 0,
|
|
4195
4195
|
// should never be used directly
|
|
4196
4196
|
get jsonSchema() {
|
|
@@ -4200,13 +4200,13 @@ function Ir(e, {
|
|
|
4200
4200
|
};
|
|
4201
4201
|
}
|
|
4202
4202
|
function uv(e) {
|
|
4203
|
-
return typeof e == "object" && e !== null &&
|
|
4203
|
+
return typeof e == "object" && e !== null && To in e && e[To] === !0 && "jsonSchema" in e && "validate" in e;
|
|
4204
4204
|
}
|
|
4205
4205
|
function Yo(e) {
|
|
4206
|
-
return e == null ?
|
|
4206
|
+
return e == null ? Ar({ properties: {}, additionalProperties: !1 }) : uv(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? sc(e) : dv(e) : e();
|
|
4207
4207
|
}
|
|
4208
4208
|
function dv(e) {
|
|
4209
|
-
return
|
|
4209
|
+
return Ar(
|
|
4210
4210
|
() => e["~standard"].jsonSchema.input({
|
|
4211
4211
|
target: "draft-07"
|
|
4212
4212
|
}),
|
|
@@ -4227,7 +4227,7 @@ function dv(e) {
|
|
|
4227
4227
|
function fv(e, t) {
|
|
4228
4228
|
var n;
|
|
4229
4229
|
const r = (n = void 0) != null ? n : !1;
|
|
4230
|
-
return
|
|
4230
|
+
return Ar(
|
|
4231
4231
|
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
4232
4232
|
() => cv(e, {
|
|
4233
4233
|
$refStrategy: r ? "root" : "none"
|
|
@@ -4243,7 +4243,7 @@ function fv(e, t) {
|
|
|
4243
4243
|
function pv(e, t) {
|
|
4244
4244
|
var n;
|
|
4245
4245
|
const r = (n = void 0) != null ? n : !1;
|
|
4246
|
-
return
|
|
4246
|
+
return Ar(
|
|
4247
4247
|
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
4248
4248
|
() => ec(
|
|
4249
4249
|
ah(e, {
|
|
@@ -4351,8 +4351,8 @@ var vv = Object.defineProperty, yv = (e, t) => {
|
|
|
4351
4351
|
cc = bv;
|
|
4352
4352
|
var ca = "6.0.27", lc = be([
|
|
4353
4353
|
R(),
|
|
4354
|
-
|
|
4355
|
-
|
|
4354
|
+
gr(Uint8Array),
|
|
4355
|
+
gr(ArrayBuffer),
|
|
4356
4356
|
Qi(
|
|
4357
4357
|
// Buffer might not be available in some environments such as CloudFlare:
|
|
4358
4358
|
(e) => {
|
|
@@ -4370,34 +4370,34 @@ var ca = "6.0.27", lc = be([
|
|
|
4370
4370
|
yn(R(), wn.optional()),
|
|
4371
4371
|
en(wn)
|
|
4372
4372
|
])
|
|
4373
|
-
),
|
|
4373
|
+
), J = yn(
|
|
4374
4374
|
R(),
|
|
4375
4375
|
yn(R(), wn.optional())
|
|
4376
4376
|
), uc = ee({
|
|
4377
4377
|
type: F("text"),
|
|
4378
4378
|
text: R(),
|
|
4379
|
-
providerOptions:
|
|
4379
|
+
providerOptions: J.optional()
|
|
4380
4380
|
}), wv = ee({
|
|
4381
4381
|
type: F("image"),
|
|
4382
|
-
image: be([lc,
|
|
4382
|
+
image: be([lc, gr(URL)]),
|
|
4383
4383
|
mediaType: R().optional(),
|
|
4384
|
-
providerOptions:
|
|
4384
|
+
providerOptions: J.optional()
|
|
4385
4385
|
}), dc = ee({
|
|
4386
4386
|
type: F("file"),
|
|
4387
|
-
data: be([lc,
|
|
4387
|
+
data: be([lc, gr(URL)]),
|
|
4388
4388
|
filename: R().optional(),
|
|
4389
4389
|
mediaType: R(),
|
|
4390
|
-
providerOptions:
|
|
4390
|
+
providerOptions: J.optional()
|
|
4391
4391
|
}), _v = ee({
|
|
4392
4392
|
type: F("reasoning"),
|
|
4393
4393
|
text: R(),
|
|
4394
|
-
providerOptions:
|
|
4394
|
+
providerOptions: J.optional()
|
|
4395
4395
|
}), Ev = ee({
|
|
4396
4396
|
type: F("tool-call"),
|
|
4397
4397
|
toolCallId: R(),
|
|
4398
4398
|
toolName: R(),
|
|
4399
4399
|
input: Ge(),
|
|
4400
|
-
providerOptions:
|
|
4400
|
+
providerOptions: J.optional(),
|
|
4401
4401
|
providerExecuted: ye().optional()
|
|
4402
4402
|
}), Sv = Wh(
|
|
4403
4403
|
"type",
|
|
@@ -4405,27 +4405,27 @@ var ca = "6.0.27", lc = be([
|
|
|
4405
4405
|
ee({
|
|
4406
4406
|
type: F("text"),
|
|
4407
4407
|
value: R(),
|
|
4408
|
-
providerOptions:
|
|
4408
|
+
providerOptions: J.optional()
|
|
4409
4409
|
}),
|
|
4410
4410
|
ee({
|
|
4411
4411
|
type: F("json"),
|
|
4412
4412
|
value: wn,
|
|
4413
|
-
providerOptions:
|
|
4413
|
+
providerOptions: J.optional()
|
|
4414
4414
|
}),
|
|
4415
4415
|
ee({
|
|
4416
4416
|
type: F("execution-denied"),
|
|
4417
4417
|
reason: R().optional(),
|
|
4418
|
-
providerOptions:
|
|
4418
|
+
providerOptions: J.optional()
|
|
4419
4419
|
}),
|
|
4420
4420
|
ee({
|
|
4421
4421
|
type: F("error-text"),
|
|
4422
4422
|
value: R(),
|
|
4423
|
-
providerOptions:
|
|
4423
|
+
providerOptions: J.optional()
|
|
4424
4424
|
}),
|
|
4425
4425
|
ee({
|
|
4426
4426
|
type: F("error-json"),
|
|
4427
4427
|
value: wn,
|
|
4428
|
-
providerOptions:
|
|
4428
|
+
providerOptions: J.optional()
|
|
4429
4429
|
}),
|
|
4430
4430
|
ee({
|
|
4431
4431
|
type: F("content"),
|
|
@@ -4434,7 +4434,7 @@ var ca = "6.0.27", lc = be([
|
|
|
4434
4434
|
ee({
|
|
4435
4435
|
type: F("text"),
|
|
4436
4436
|
text: R(),
|
|
4437
|
-
providerOptions:
|
|
4437
|
+
providerOptions: J.optional()
|
|
4438
4438
|
}),
|
|
4439
4439
|
ee({
|
|
4440
4440
|
type: F("media"),
|
|
@@ -4446,37 +4446,37 @@ var ca = "6.0.27", lc = be([
|
|
|
4446
4446
|
data: R(),
|
|
4447
4447
|
mediaType: R(),
|
|
4448
4448
|
filename: R().optional(),
|
|
4449
|
-
providerOptions:
|
|
4449
|
+
providerOptions: J.optional()
|
|
4450
4450
|
}),
|
|
4451
4451
|
ee({
|
|
4452
4452
|
type: F("file-url"),
|
|
4453
4453
|
url: R(),
|
|
4454
|
-
providerOptions:
|
|
4454
|
+
providerOptions: J.optional()
|
|
4455
4455
|
}),
|
|
4456
4456
|
ee({
|
|
4457
4457
|
type: F("file-id"),
|
|
4458
4458
|
fileId: be([R(), yn(R(), R())]),
|
|
4459
|
-
providerOptions:
|
|
4459
|
+
providerOptions: J.optional()
|
|
4460
4460
|
}),
|
|
4461
4461
|
ee({
|
|
4462
4462
|
type: F("image-data"),
|
|
4463
4463
|
data: R(),
|
|
4464
4464
|
mediaType: R(),
|
|
4465
|
-
providerOptions:
|
|
4465
|
+
providerOptions: J.optional()
|
|
4466
4466
|
}),
|
|
4467
4467
|
ee({
|
|
4468
4468
|
type: F("image-url"),
|
|
4469
4469
|
url: R(),
|
|
4470
|
-
providerOptions:
|
|
4470
|
+
providerOptions: J.optional()
|
|
4471
4471
|
}),
|
|
4472
4472
|
ee({
|
|
4473
4473
|
type: F("image-file-id"),
|
|
4474
4474
|
fileId: be([R(), yn(R(), R())]),
|
|
4475
|
-
providerOptions:
|
|
4475
|
+
providerOptions: J.optional()
|
|
4476
4476
|
}),
|
|
4477
4477
|
ee({
|
|
4478
4478
|
type: F("custom"),
|
|
4479
|
-
providerOptions:
|
|
4479
|
+
providerOptions: J.optional()
|
|
4480
4480
|
})
|
|
4481
4481
|
])
|
|
4482
4482
|
)
|
|
@@ -4487,7 +4487,7 @@ var ca = "6.0.27", lc = be([
|
|
|
4487
4487
|
toolCallId: R(),
|
|
4488
4488
|
toolName: R(),
|
|
4489
4489
|
output: Sv,
|
|
4490
|
-
providerOptions:
|
|
4490
|
+
providerOptions: J.optional()
|
|
4491
4491
|
}), Cv = ee({
|
|
4492
4492
|
type: F("tool-approval-request"),
|
|
4493
4493
|
approvalId: R(),
|
|
@@ -4501,7 +4501,7 @@ var ca = "6.0.27", lc = be([
|
|
|
4501
4501
|
{
|
|
4502
4502
|
role: F("system"),
|
|
4503
4503
|
content: R(),
|
|
4504
|
-
providerOptions:
|
|
4504
|
+
providerOptions: J.optional()
|
|
4505
4505
|
}
|
|
4506
4506
|
), Iv = ee({
|
|
4507
4507
|
role: F("user"),
|
|
@@ -4509,7 +4509,7 @@ var ca = "6.0.27", lc = be([
|
|
|
4509
4509
|
R(),
|
|
4510
4510
|
en(be([uc, wv, dc]))
|
|
4511
4511
|
]),
|
|
4512
|
-
providerOptions:
|
|
4512
|
+
providerOptions: J.optional()
|
|
4513
4513
|
}), Av = ee({
|
|
4514
4514
|
role: F("assistant"),
|
|
4515
4515
|
content: be([
|
|
@@ -4525,11 +4525,11 @@ var ca = "6.0.27", lc = be([
|
|
|
4525
4525
|
])
|
|
4526
4526
|
)
|
|
4527
4527
|
]),
|
|
4528
|
-
providerOptions:
|
|
4528
|
+
providerOptions: J.optional()
|
|
4529
4529
|
}), Rv = ee({
|
|
4530
4530
|
role: F("tool"),
|
|
4531
4531
|
content: en(be([fc, xv])),
|
|
4532
|
-
providerOptions:
|
|
4532
|
+
providerOptions: J.optional()
|
|
4533
4533
|
});
|
|
4534
4534
|
be([
|
|
4535
4535
|
Tv,
|
|
@@ -5079,18 +5079,18 @@ var Lv = lv(
|
|
|
5079
5079
|
ne({
|
|
5080
5080
|
type: F("text-start"),
|
|
5081
5081
|
id: R(),
|
|
5082
|
-
providerMetadata:
|
|
5082
|
+
providerMetadata: J.optional()
|
|
5083
5083
|
}),
|
|
5084
5084
|
ne({
|
|
5085
5085
|
type: F("text-delta"),
|
|
5086
5086
|
id: R(),
|
|
5087
5087
|
delta: R(),
|
|
5088
|
-
providerMetadata:
|
|
5088
|
+
providerMetadata: J.optional()
|
|
5089
5089
|
}),
|
|
5090
5090
|
ne({
|
|
5091
5091
|
type: F("text-end"),
|
|
5092
5092
|
id: R(),
|
|
5093
|
-
providerMetadata:
|
|
5093
|
+
providerMetadata: J.optional()
|
|
5094
5094
|
}),
|
|
5095
5095
|
ne({
|
|
5096
5096
|
type: F("error"),
|
|
@@ -5115,7 +5115,7 @@ var Lv = lv(
|
|
|
5115
5115
|
toolName: R(),
|
|
5116
5116
|
input: Ge(),
|
|
5117
5117
|
providerExecuted: ye().optional(),
|
|
5118
|
-
providerMetadata:
|
|
5118
|
+
providerMetadata: J.optional(),
|
|
5119
5119
|
dynamic: ye().optional(),
|
|
5120
5120
|
title: R().optional()
|
|
5121
5121
|
}),
|
|
@@ -5125,7 +5125,7 @@ var Lv = lv(
|
|
|
5125
5125
|
toolName: R(),
|
|
5126
5126
|
input: Ge(),
|
|
5127
5127
|
providerExecuted: ye().optional(),
|
|
5128
|
-
providerMetadata:
|
|
5128
|
+
providerMetadata: J.optional(),
|
|
5129
5129
|
dynamic: ye().optional(),
|
|
5130
5130
|
errorText: R(),
|
|
5131
5131
|
title: R().optional()
|
|
@@ -5157,25 +5157,25 @@ var Lv = lv(
|
|
|
5157
5157
|
ne({
|
|
5158
5158
|
type: F("reasoning-start"),
|
|
5159
5159
|
id: R(),
|
|
5160
|
-
providerMetadata:
|
|
5160
|
+
providerMetadata: J.optional()
|
|
5161
5161
|
}),
|
|
5162
5162
|
ne({
|
|
5163
5163
|
type: F("reasoning-delta"),
|
|
5164
5164
|
id: R(),
|
|
5165
5165
|
delta: R(),
|
|
5166
|
-
providerMetadata:
|
|
5166
|
+
providerMetadata: J.optional()
|
|
5167
5167
|
}),
|
|
5168
5168
|
ne({
|
|
5169
5169
|
type: F("reasoning-end"),
|
|
5170
5170
|
id: R(),
|
|
5171
|
-
providerMetadata:
|
|
5171
|
+
providerMetadata: J.optional()
|
|
5172
5172
|
}),
|
|
5173
5173
|
ne({
|
|
5174
5174
|
type: F("source-url"),
|
|
5175
5175
|
sourceId: R(),
|
|
5176
5176
|
url: R(),
|
|
5177
5177
|
title: R().optional(),
|
|
5178
|
-
providerMetadata:
|
|
5178
|
+
providerMetadata: J.optional()
|
|
5179
5179
|
}),
|
|
5180
5180
|
ne({
|
|
5181
5181
|
type: F("source-document"),
|
|
@@ -5183,13 +5183,13 @@ var Lv = lv(
|
|
|
5183
5183
|
mediaType: R(),
|
|
5184
5184
|
title: R(),
|
|
5185
5185
|
filename: R().optional(),
|
|
5186
|
-
providerMetadata:
|
|
5186
|
+
providerMetadata: J.optional()
|
|
5187
5187
|
}),
|
|
5188
5188
|
ne({
|
|
5189
5189
|
type: F("file"),
|
|
5190
5190
|
url: R(),
|
|
5191
5191
|
mediaType: R(),
|
|
5192
|
-
providerMetadata:
|
|
5192
|
+
providerMetadata: J.optional()
|
|
5193
5193
|
}),
|
|
5194
5194
|
ne({
|
|
5195
5195
|
type: Qi(
|
|
@@ -5237,14 +5237,14 @@ var Lv = lv(
|
|
|
5237
5237
|
function zv(e) {
|
|
5238
5238
|
return e.type.startsWith("data-");
|
|
5239
5239
|
}
|
|
5240
|
-
function
|
|
5240
|
+
function Io(e) {
|
|
5241
5241
|
return e.type.startsWith("tool-");
|
|
5242
5242
|
}
|
|
5243
5243
|
function Fv(e) {
|
|
5244
5244
|
return e.type === "dynamic-tool";
|
|
5245
5245
|
}
|
|
5246
|
-
function
|
|
5247
|
-
return
|
|
5246
|
+
function Ao(e) {
|
|
5247
|
+
return Io(e) || Fv(e);
|
|
5248
5248
|
}
|
|
5249
5249
|
function la(e) {
|
|
5250
5250
|
return e.type.split("-").slice(1).join("-");
|
|
@@ -5280,7 +5280,7 @@ function Uv({
|
|
|
5280
5280
|
await r(async ({ state: l, write: d }) => {
|
|
5281
5281
|
var u, h, p, m;
|
|
5282
5282
|
function f(y) {
|
|
5283
|
-
const S = l.message.parts.filter(
|
|
5283
|
+
const S = l.message.parts.filter(Ao).find(
|
|
5284
5284
|
(x) => x.toolCallId === y
|
|
5285
5285
|
);
|
|
5286
5286
|
if (S == null)
|
|
@@ -5292,7 +5292,7 @@ function Uv({
|
|
|
5292
5292
|
function v(y) {
|
|
5293
5293
|
var E;
|
|
5294
5294
|
const S = l.message.parts.find(
|
|
5295
|
-
(O) =>
|
|
5295
|
+
(O) => Io(O) && O.toolCallId === y.toolCallId
|
|
5296
5296
|
), x = y, T = S;
|
|
5297
5297
|
S != null ? (S.state = y.state, T.input = x.input, T.output = x.output, T.errorText = x.errorText, T.rawInput = x.rawInput, T.preliminary = x.preliminary, y.title !== void 0 && (T.title = y.title), T.providerExecuted = (E = x.providerExecuted) != null ? E : S.providerExecuted, x.providerMetadata != null && S.state === "input-available" && (S.callProviderMetadata = x.providerMetadata)) : l.message.parts.push({
|
|
5298
5298
|
type: `tool-${y.toolName}`,
|
|
@@ -5311,7 +5311,7 @@ function Uv({
|
|
|
5311
5311
|
function b(y) {
|
|
5312
5312
|
var E, S;
|
|
5313
5313
|
const x = l.message.parts.find(
|
|
5314
|
-
(
|
|
5314
|
+
(P) => P.type === "dynamic-tool" && P.toolCallId === y.toolCallId
|
|
5315
5315
|
), T = y, O = x;
|
|
5316
5316
|
x != null ? (x.state = y.state, O.toolName = y.toolName, O.input = T.input, O.output = T.output, O.errorText = T.errorText, O.rawInput = (E = T.rawInput) != null ? E : O.rawInput, O.preliminary = T.preliminary, y.title !== void 0 && (O.title = y.title), O.providerExecuted = (S = T.providerExecuted) != null ? S : x.providerExecuted, T.providerMetadata != null && x.state === "input-available" && (x.callProviderMetadata = T.providerMetadata)) : l.message.parts.push({
|
|
5317
5317
|
type: "dynamic-tool",
|
|
@@ -5407,7 +5407,7 @@ function Uv({
|
|
|
5407
5407
|
break;
|
|
5408
5408
|
}
|
|
5409
5409
|
case "tool-input-start": {
|
|
5410
|
-
const y = l.message.parts.filter(
|
|
5410
|
+
const y = l.message.parts.filter(Io);
|
|
5411
5411
|
l.partialToolCalls[a.toolCallId] = {
|
|
5412
5412
|
text: "",
|
|
5413
5413
|
toolName: a.toolName,
|
|
@@ -5858,7 +5858,7 @@ var Vv = class {
|
|
|
5858
5858
|
reason: p
|
|
5859
5859
|
}) => this.jobExecutor.run(async () => {
|
|
5860
5860
|
var m, f;
|
|
5861
|
-
const v = this.state.messages, b = v[v.length - 1], _ = (y) =>
|
|
5861
|
+
const v = this.state.messages, b = v[v.length - 1], _ = (y) => Ao(y) && y.state === "approval-requested" && y.approval.id === u ? {
|
|
5862
5862
|
...y,
|
|
5863
5863
|
state: "approval-responded",
|
|
5864
5864
|
approval: { id: u, approved: h, reason: p }
|
|
@@ -5878,7 +5878,7 @@ var Vv = class {
|
|
|
5878
5878
|
errorText: f
|
|
5879
5879
|
}) => this.jobExecutor.run(async () => {
|
|
5880
5880
|
var v, b;
|
|
5881
|
-
const _ = this.state.messages, y = _[_.length - 1], E = (S) =>
|
|
5881
|
+
const _ = this.state.messages, y = _[_.length - 1], E = (S) => Ao(S) && S.toolCallId === p ? { ...S, state: u, output: m, errorText: f } : S;
|
|
5882
5882
|
this.state.replaceMessage(_.length - 1, {
|
|
5883
5883
|
...y,
|
|
5884
5884
|
parts: y.parts.map(E)
|
|
@@ -6031,15 +6031,15 @@ for (let e = 0; e < 256; ++e)
|
|
|
6031
6031
|
function Gv(e, t = 0) {
|
|
6032
6032
|
return (pe[e[t + 0]] + pe[e[t + 1]] + pe[e[t + 2]] + pe[e[t + 3]] + "-" + pe[e[t + 4]] + pe[e[t + 5]] + "-" + pe[e[t + 6]] + pe[e[t + 7]] + "-" + pe[e[t + 8]] + pe[e[t + 9]] + "-" + pe[e[t + 10]] + pe[e[t + 11]] + pe[e[t + 12]] + pe[e[t + 13]] + pe[e[t + 14]] + pe[e[t + 15]]).toLowerCase();
|
|
6033
6033
|
}
|
|
6034
|
-
let
|
|
6034
|
+
let eo;
|
|
6035
6035
|
const Yv = new Uint8Array(16);
|
|
6036
6036
|
function Jv() {
|
|
6037
|
-
if (!
|
|
6037
|
+
if (!eo) {
|
|
6038
6038
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
6039
6039
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
6040
|
-
|
|
6040
|
+
eo = crypto.getRandomValues.bind(crypto);
|
|
6041
6041
|
}
|
|
6042
|
-
return
|
|
6042
|
+
return eo(Yv);
|
|
6043
6043
|
}
|
|
6044
6044
|
const Kv = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ua = { randomUUID: Kv };
|
|
6045
6045
|
function qv(e, t, n) {
|
|
@@ -6052,7 +6052,7 @@ function qv(e, t, n) {
|
|
|
6052
6052
|
function ht(e, t, n) {
|
|
6053
6053
|
return ua.randomUUID && !e ? ua.randomUUID() : qv(e);
|
|
6054
6054
|
}
|
|
6055
|
-
const Ot = "CHAT_SET_STATUS", mc = "CHAT_SET_USAGE", _n = "CHAT_SET_ATTACHMENTS",
|
|
6055
|
+
const Ot = "CHAT_SET_STATUS", mc = "CHAT_SET_USAGE", _n = "CHAT_SET_ATTACHMENTS", or = "CHAT_SET_PRIVATE", hc = "CHAT_SET_PROVIDER", qt = "CHAT_RESET", Xv = "CHAT_SCROLL_TO_BOTTOM", Qv = (e, t) => {
|
|
6056
6056
|
switch (t.type) {
|
|
6057
6057
|
case mc:
|
|
6058
6058
|
return {
|
|
@@ -6064,7 +6064,7 @@ const Ot = "CHAT_SET_STATUS", mc = "CHAT_SET_USAGE", _n = "CHAT_SET_ATTACHMENTS"
|
|
|
6064
6064
|
...e,
|
|
6065
6065
|
attachments: t.payload.attachments
|
|
6066
6066
|
};
|
|
6067
|
-
case
|
|
6067
|
+
case or:
|
|
6068
6068
|
return {
|
|
6069
6069
|
...e,
|
|
6070
6070
|
privateChat: t.payload.privateChat
|
|
@@ -6157,9 +6157,9 @@ const Ot = "CHAT_SET_STATUS", mc = "CHAT_SET_USAGE", _n = "CHAT_SET_ATTACHMENTS"
|
|
|
6157
6157
|
return e;
|
|
6158
6158
|
}
|
|
6159
6159
|
};
|
|
6160
|
-
var
|
|
6160
|
+
var to, da;
|
|
6161
6161
|
function ny() {
|
|
6162
|
-
if (da) return
|
|
6162
|
+
if (da) return to;
|
|
6163
6163
|
da = 1;
|
|
6164
6164
|
function e(t, n) {
|
|
6165
6165
|
if (typeof t != "function")
|
|
@@ -6173,7 +6173,7 @@ function ny() {
|
|
|
6173
6173
|
}, l);
|
|
6174
6174
|
};
|
|
6175
6175
|
}
|
|
6176
|
-
return
|
|
6176
|
+
return to = e, to;
|
|
6177
6177
|
}
|
|
6178
6178
|
var ry = /* @__PURE__ */ ny();
|
|
6179
6179
|
const oy = /* @__PURE__ */ gv(ry);
|
|
@@ -6188,9 +6188,9 @@ var gc = (e, t, n) => {
|
|
|
6188
6188
|
function sy(e, t) {
|
|
6189
6189
|
return t != null ? oy(e, t) : e;
|
|
6190
6190
|
}
|
|
6191
|
-
var Oe,
|
|
6191
|
+
var Oe, sr, ar, cn, ln, un, Zt, Ro, Oo, ay = class {
|
|
6192
6192
|
constructor(e = []) {
|
|
6193
|
-
Ve(this, Oe, void 0), Ve(this,
|
|
6193
|
+
Ve(this, Oe, void 0), Ve(this, sr, "ready"), Ve(this, ar, void 0), Ve(this, cn, /* @__PURE__ */ new Set()), Ve(this, ln, /* @__PURE__ */ new Set()), Ve(this, un, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
|
|
6194
6194
|
it(this, Oe, re(this, Oe).concat(t)), re(this, Zt).call(this);
|
|
6195
6195
|
}, this.popMessage = () => {
|
|
6196
6196
|
it(this, Oe, re(this, Oe).slice(0, -1)), re(this, Zt).call(this);
|
|
@@ -6219,16 +6219,16 @@ var Oe, or, sr, cn, ln, un, Zt, Ro, Oo, ay = class {
|
|
|
6219
6219
|
}), it(this, Oe, e);
|
|
6220
6220
|
}
|
|
6221
6221
|
get status() {
|
|
6222
|
-
return re(this,
|
|
6222
|
+
return re(this, sr);
|
|
6223
6223
|
}
|
|
6224
6224
|
set status(e) {
|
|
6225
|
-
it(this,
|
|
6225
|
+
it(this, sr, e), re(this, Ro).call(this);
|
|
6226
6226
|
}
|
|
6227
6227
|
get error() {
|
|
6228
|
-
return re(this,
|
|
6228
|
+
return re(this, ar);
|
|
6229
6229
|
}
|
|
6230
6230
|
set error(e) {
|
|
6231
|
-
it(this,
|
|
6231
|
+
it(this, ar, e), re(this, Oo).call(this);
|
|
6232
6232
|
}
|
|
6233
6233
|
get messages() {
|
|
6234
6234
|
return re(this, Oe);
|
|
@@ -6238,8 +6238,8 @@ var Oe, or, sr, cn, ln, un, Zt, Ro, Oo, ay = class {
|
|
|
6238
6238
|
}
|
|
6239
6239
|
};
|
|
6240
6240
|
Oe = /* @__PURE__ */ new WeakMap();
|
|
6241
|
-
or = /* @__PURE__ */ new WeakMap();
|
|
6242
6241
|
sr = /* @__PURE__ */ new WeakMap();
|
|
6242
|
+
ar = /* @__PURE__ */ new WeakMap();
|
|
6243
6243
|
cn = /* @__PURE__ */ new WeakMap();
|
|
6244
6244
|
ln = /* @__PURE__ */ new WeakMap();
|
|
6245
6245
|
un = /* @__PURE__ */ new WeakMap();
|
|
@@ -6258,7 +6258,7 @@ function iy({
|
|
|
6258
6258
|
resume: t = !1,
|
|
6259
6259
|
...n
|
|
6260
6260
|
} = {}) {
|
|
6261
|
-
const r =
|
|
6261
|
+
const r = G(
|
|
6262
6262
|
"chat" in n ? {} : {
|
|
6263
6263
|
onToolCall: n.onToolCall,
|
|
6264
6264
|
onData: n.onData,
|
|
@@ -6296,7 +6296,7 @@ function iy({
|
|
|
6296
6296
|
var p, m, f;
|
|
6297
6297
|
return (f = (m = (p = r.current).sendAutomaticallyWhen) == null ? void 0 : m.call(p, h)) != null ? f : !1;
|
|
6298
6298
|
}
|
|
6299
|
-
}, s =
|
|
6299
|
+
}, s = G(
|
|
6300
6300
|
"chat" in n ? n.chat : new fa(o)
|
|
6301
6301
|
);
|
|
6302
6302
|
("chat" in n && n.chat !== s.current || "id" in n && s.current.id !== n.id) && (s.current = "chat" in n ? n.chat : new fa(o));
|
|
@@ -6354,7 +6354,7 @@ function _t(e = {}) {
|
|
|
6354
6354
|
const t = ue(vc);
|
|
6355
6355
|
if (!t)
|
|
6356
6356
|
throw new Error("useAiChat must be used within a AiChatProvider");
|
|
6357
|
-
const n =
|
|
6357
|
+
const n = G(e);
|
|
6358
6358
|
return U(() => {
|
|
6359
6359
|
n.current = e;
|
|
6360
6360
|
}, [e]), U(() => {
|
|
@@ -6372,7 +6372,7 @@ function cy({
|
|
|
6372
6372
|
children: e,
|
|
6373
6373
|
value: t
|
|
6374
6374
|
}) {
|
|
6375
|
-
const n =
|
|
6375
|
+
const n = G(pa()), [r, o] = Z("");
|
|
6376
6376
|
U(() => {
|
|
6377
6377
|
n.current = pa();
|
|
6378
6378
|
}, [t]);
|
|
@@ -6417,7 +6417,7 @@ function cy({
|
|
|
6417
6417
|
const ly = ({ chatId: e }) => {
|
|
6418
6418
|
const { messages: t } = _t(), {
|
|
6419
6419
|
state: { privateChat: n }
|
|
6420
|
-
} = ue(Be), r =
|
|
6420
|
+
} = ue(Be), r = G(e), o = G(!1);
|
|
6421
6421
|
return U(() => {
|
|
6422
6422
|
const s = r.current !== e, i = t.length > 0;
|
|
6423
6423
|
s && !i ? (window.localStorage.removeItem(
|
|
@@ -6430,7 +6430,7 @@ const ly = ({ chatId: e }) => {
|
|
|
6430
6430
|
), r.current = e;
|
|
6431
6431
|
}, [e, t.length, n]), null;
|
|
6432
6432
|
};
|
|
6433
|
-
let Vn = !1,
|
|
6433
|
+
let Vn = !1, no = null;
|
|
6434
6434
|
const ma = ({
|
|
6435
6435
|
containerId: e,
|
|
6436
6436
|
...t
|
|
@@ -6444,7 +6444,7 @@ const ma = ({
|
|
|
6444
6444
|
/* webpackChunkName: "toast-react-toastify" */
|
|
6445
6445
|
"./index.ri2Dr1rJ.js"
|
|
6446
6446
|
);
|
|
6447
|
-
|
|
6447
|
+
no = i, Vn = !0, r(!0);
|
|
6448
6448
|
} catch (i) {
|
|
6449
6449
|
console.error("Failed to load ToastContainer:", i);
|
|
6450
6450
|
}
|
|
@@ -6455,7 +6455,7 @@ const ma = ({
|
|
|
6455
6455
|
window.removeEventListener("toast-request", s);
|
|
6456
6456
|
};
|
|
6457
6457
|
}
|
|
6458
|
-
}, []), n &&
|
|
6458
|
+
}, []), n && no ? /* @__PURE__ */ g(no, { containerId: e, ...t }) : null;
|
|
6459
6459
|
}, uy = 1e3, dy = ({
|
|
6460
6460
|
currentChatId: e,
|
|
6461
6461
|
setChatId: t,
|
|
@@ -6618,7 +6618,7 @@ function Ko(e, t = [
|
|
|
6618
6618
|
n
|
|
6619
6619
|
]);
|
|
6620
6620
|
}
|
|
6621
|
-
const _y = ["top", "right", "bottom", "left"], gt = Math.min, xe = Math.max,
|
|
6621
|
+
const _y = ["top", "right", "bottom", "left"], gt = Math.min, xe = Math.max, vr = Math.round, Wn = Math.floor, Xe = (e) => ({
|
|
6622
6622
|
x: e,
|
|
6623
6623
|
y: e
|
|
6624
6624
|
}), Ey = {
|
|
@@ -6659,10 +6659,10 @@ function xy(e, t, n) {
|
|
|
6659
6659
|
n === void 0 && (n = !1);
|
|
6660
6660
|
const r = tn(e), o = Qo(e), s = Xo(o);
|
|
6661
6661
|
let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
6662
|
-
return t.reference[s] > t.floating[s] && (i =
|
|
6662
|
+
return t.reference[s] > t.floating[s] && (i = yr(i)), [i, yr(i)];
|
|
6663
6663
|
}
|
|
6664
6664
|
function Ty(e) {
|
|
6665
|
-
const t =
|
|
6665
|
+
const t = yr(e);
|
|
6666
6666
|
return [Mo(e), t, Mo(t)];
|
|
6667
6667
|
}
|
|
6668
6668
|
function Mo(e) {
|
|
@@ -6686,7 +6686,7 @@ function Oy(e, t, n, r) {
|
|
|
6686
6686
|
let s = Ry(st(e), n === "start", r);
|
|
6687
6687
|
return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(Mo)))), s;
|
|
6688
6688
|
}
|
|
6689
|
-
function
|
|
6689
|
+
function yr(e) {
|
|
6690
6690
|
return e.replace(/left|right|bottom|top/g, (t) => Ey[t]);
|
|
6691
6691
|
}
|
|
6692
6692
|
function Ny(e) {
|
|
@@ -6706,7 +6706,7 @@ function bc(e) {
|
|
|
6706
6706
|
left: e
|
|
6707
6707
|
};
|
|
6708
6708
|
}
|
|
6709
|
-
function
|
|
6709
|
+
function br(e) {
|
|
6710
6710
|
const {
|
|
6711
6711
|
x: t,
|
|
6712
6712
|
y: n,
|
|
@@ -6849,7 +6849,7 @@ async function En(e, t) {
|
|
|
6849
6849
|
elementContext: u = "floating",
|
|
6850
6850
|
altBoundary: h = !1,
|
|
6851
6851
|
padding: p = 0
|
|
6852
|
-
} = ot(t, e), m = bc(p), v = a[h ? u === "floating" ? "reference" : "floating" : u], b =
|
|
6852
|
+
} = ot(t, e), m = bc(p), v = a[h ? u === "floating" ? "reference" : "floating" : u], b = br(await s.getClippingRect({
|
|
6853
6853
|
element: (n = await (s.isElement == null ? void 0 : s.isElement(v))) == null || n ? v : v.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
|
|
6854
6854
|
boundary: l,
|
|
6855
6855
|
rootBoundary: d,
|
|
@@ -6865,7 +6865,7 @@ async function En(e, t) {
|
|
|
6865
6865
|
} : {
|
|
6866
6866
|
x: 1,
|
|
6867
6867
|
y: 1
|
|
6868
|
-
}, S =
|
|
6868
|
+
}, S = br(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
6869
6869
|
elements: a,
|
|
6870
6870
|
rect: _,
|
|
6871
6871
|
offsetParent: y,
|
|
@@ -6902,17 +6902,17 @@ const ky = (e) => ({
|
|
|
6902
6902
|
}, p = Qo(o), m = Xo(p), f = await i.getDimensions(l), v = p === "y", b = v ? "top" : "left", _ = v ? "bottom" : "right", y = v ? "clientHeight" : "clientWidth", E = s.reference[m] + s.reference[p] - h[p] - s.floating[m], S = h[p] - s.reference[p], x = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
|
|
6903
6903
|
let T = x ? x[y] : 0;
|
|
6904
6904
|
(!T || !await (i.isElement == null ? void 0 : i.isElement(x))) && (T = a.floating[y] || s.floating[m]);
|
|
6905
|
-
const O = E / 2 - S / 2,
|
|
6905
|
+
const O = E / 2 - S / 2, P = T / 2 - f[m] / 2 - 1, D = gt(u[b], P), z = gt(u[_], P), I = D, M = T - f[m] - z, A = T / 2 - f[m] / 2 + O, V = No(I, A, M), Y = !c.arrow && tn(o) != null && A !== V && s.reference[m] / 2 - (A < I ? D : z) - f[m] / 2 < 0, Q = Y ? A < I ? A - I : A - M : 0;
|
|
6906
6906
|
return {
|
|
6907
6907
|
[p]: h[p] + Q,
|
|
6908
6908
|
data: {
|
|
6909
|
-
[p]:
|
|
6910
|
-
centerOffset:
|
|
6911
|
-
...
|
|
6909
|
+
[p]: V,
|
|
6910
|
+
centerOffset: A - V - Q,
|
|
6911
|
+
...Y && {
|
|
6912
6912
|
alignmentOffset: Q
|
|
6913
6913
|
}
|
|
6914
6914
|
},
|
|
6915
|
-
reset:
|
|
6915
|
+
reset: Y
|
|
6916
6916
|
};
|
|
6917
6917
|
}
|
|
6918
6918
|
}), Py = function(e) {
|
|
@@ -6939,57 +6939,57 @@ const ky = (e) => ({
|
|
|
6939
6939
|
} = ot(e, t);
|
|
6940
6940
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
6941
6941
|
return {};
|
|
6942
|
-
const b = st(o), _ = Ke(a), y = st(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), S = h || (y || !f ? [
|
|
6942
|
+
const b = st(o), _ = Ke(a), y = st(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), S = h || (y || !f ? [yr(a)] : Ty(a)), x = m !== "none";
|
|
6943
6943
|
!h && x && S.push(...Oy(a, f, m, E));
|
|
6944
|
-
const T = [a, ...S], O = await En(t, v),
|
|
6945
|
-
let
|
|
6946
|
-
if (d &&
|
|
6947
|
-
const
|
|
6948
|
-
|
|
6944
|
+
const T = [a, ...S], O = await En(t, v), P = [];
|
|
6945
|
+
let D = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
6946
|
+
if (d && P.push(O[b]), u) {
|
|
6947
|
+
const A = xy(o, i, E);
|
|
6948
|
+
P.push(O[A[0]], O[A[1]]);
|
|
6949
6949
|
}
|
|
6950
|
-
if (
|
|
6950
|
+
if (D = [...D, {
|
|
6951
6951
|
placement: o,
|
|
6952
|
-
overflows:
|
|
6953
|
-
}], !
|
|
6954
|
-
var
|
|
6955
|
-
const
|
|
6956
|
-
if (
|
|
6952
|
+
overflows: P
|
|
6953
|
+
}], !P.every((A) => A <= 0)) {
|
|
6954
|
+
var z, I;
|
|
6955
|
+
const A = (((z = s.flip) == null ? void 0 : z.index) || 0) + 1, V = T[A];
|
|
6956
|
+
if (V && (!(u === "alignment" ? _ !== Ke(V) : !1) || // We leave the current main axis only if every placement on that axis
|
|
6957
6957
|
// overflows the main axis.
|
|
6958
|
-
|
|
6958
|
+
D.every((B) => Ke(B.placement) === _ ? B.overflows[0] > 0 : !0)))
|
|
6959
6959
|
return {
|
|
6960
6960
|
data: {
|
|
6961
|
-
index:
|
|
6962
|
-
overflows:
|
|
6961
|
+
index: A,
|
|
6962
|
+
overflows: D
|
|
6963
6963
|
},
|
|
6964
6964
|
reset: {
|
|
6965
|
-
placement:
|
|
6965
|
+
placement: V
|
|
6966
6966
|
}
|
|
6967
6967
|
};
|
|
6968
|
-
let
|
|
6969
|
-
if (!
|
|
6968
|
+
let Y = (I = D.filter((Q) => Q.overflows[0] <= 0).sort((Q, B) => Q.overflows[1] - B.overflows[1])[0]) == null ? void 0 : I.placement;
|
|
6969
|
+
if (!Y)
|
|
6970
6970
|
switch (p) {
|
|
6971
6971
|
case "bestFit": {
|
|
6972
|
-
var
|
|
6973
|
-
const Q = (
|
|
6972
|
+
var M;
|
|
6973
|
+
const Q = (M = D.filter((B) => {
|
|
6974
6974
|
if (x) {
|
|
6975
|
-
const
|
|
6976
|
-
return
|
|
6975
|
+
const N = Ke(B.placement);
|
|
6976
|
+
return N === _ || // Create a bias to the `y` side axis due to horizontal
|
|
6977
6977
|
// reading directions favoring greater width.
|
|
6978
|
-
|
|
6978
|
+
N === "y";
|
|
6979
6979
|
}
|
|
6980
6980
|
return !0;
|
|
6981
|
-
}).map((B) => [B.placement, B.overflows.filter((
|
|
6982
|
-
Q && (
|
|
6981
|
+
}).map((B) => [B.placement, B.overflows.filter((N) => N > 0).reduce((N, ce) => N + ce, 0)]).sort((B, N) => B[1] - N[1])[0]) == null ? void 0 : M[0];
|
|
6982
|
+
Q && (Y = Q);
|
|
6983
6983
|
break;
|
|
6984
6984
|
}
|
|
6985
6985
|
case "initialPlacement":
|
|
6986
|
-
|
|
6986
|
+
Y = a;
|
|
6987
6987
|
break;
|
|
6988
6988
|
}
|
|
6989
|
-
if (o !==
|
|
6989
|
+
if (o !== Y)
|
|
6990
6990
|
return {
|
|
6991
6991
|
reset: {
|
|
6992
|
-
placement:
|
|
6992
|
+
placement: Y
|
|
6993
6993
|
}
|
|
6994
6994
|
};
|
|
6995
6995
|
}
|
|
@@ -7221,16 +7221,16 @@ const Ly = function(e) {
|
|
|
7221
7221
|
const _ = f - d.top - d.bottom, y = m - d.left - d.right, E = gt(f - d[v], _), S = gt(m - d[b], y), x = !t.middlewareData.shift;
|
|
7222
7222
|
let T = E, O = S;
|
|
7223
7223
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (O = y), (r = t.middlewareData.shift) != null && r.enabled.y && (T = _), x && !h) {
|
|
7224
|
-
const
|
|
7225
|
-
p ? O = m - 2 * (
|
|
7224
|
+
const D = xe(d.left, 0), z = xe(d.right, 0), I = xe(d.top, 0), M = xe(d.bottom, 0);
|
|
7225
|
+
p ? O = m - 2 * (D !== 0 || z !== 0 ? D + z : xe(d.left, d.right)) : T = f - 2 * (I !== 0 || M !== 0 ? I + M : xe(d.top, d.bottom));
|
|
7226
7226
|
}
|
|
7227
7227
|
await c({
|
|
7228
7228
|
...t,
|
|
7229
7229
|
availableWidth: O,
|
|
7230
7230
|
availableHeight: T
|
|
7231
7231
|
});
|
|
7232
|
-
const
|
|
7233
|
-
return m !==
|
|
7232
|
+
const P = await i.getDimensions(a.floating);
|
|
7233
|
+
return m !== P.width || f !== P.height ? {
|
|
7234
7234
|
reset: {
|
|
7235
7235
|
rects: !0
|
|
7236
7236
|
}
|
|
@@ -7238,7 +7238,7 @@ const Ly = function(e) {
|
|
|
7238
7238
|
}
|
|
7239
7239
|
};
|
|
7240
7240
|
};
|
|
7241
|
-
function
|
|
7241
|
+
function Rr() {
|
|
7242
7242
|
return typeof window < "u";
|
|
7243
7243
|
}
|
|
7244
7244
|
function nn(e) {
|
|
@@ -7253,16 +7253,16 @@ function nt(e) {
|
|
|
7253
7253
|
return (t = (_c(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
7254
7254
|
}
|
|
7255
7255
|
function _c(e) {
|
|
7256
|
-
return
|
|
7256
|
+
return Rr() ? e instanceof Node || e instanceof Ie(e).Node : !1;
|
|
7257
7257
|
}
|
|
7258
7258
|
function Fe(e) {
|
|
7259
|
-
return
|
|
7259
|
+
return Rr() ? e instanceof Element || e instanceof Ie(e).Element : !1;
|
|
7260
7260
|
}
|
|
7261
7261
|
function et(e) {
|
|
7262
|
-
return
|
|
7262
|
+
return Rr() ? e instanceof HTMLElement || e instanceof Ie(e).HTMLElement : !1;
|
|
7263
7263
|
}
|
|
7264
7264
|
function _a(e) {
|
|
7265
|
-
return !
|
|
7265
|
+
return !Rr() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Ie(e).ShadowRoot;
|
|
7266
7266
|
}
|
|
7267
7267
|
const Uy = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
7268
7268
|
function kn(e) {
|
|
@@ -7279,7 +7279,7 @@ function jy(e) {
|
|
|
7279
7279
|
return By.has(nn(e));
|
|
7280
7280
|
}
|
|
7281
7281
|
const Hy = [":popover-open", ":modal"];
|
|
7282
|
-
function
|
|
7282
|
+
function Or(e) {
|
|
7283
7283
|
return Hy.some((t) => {
|
|
7284
7284
|
try {
|
|
7285
7285
|
return e.matches(t);
|
|
@@ -7298,7 +7298,7 @@ function Yy(e) {
|
|
|
7298
7298
|
for (; et(t) && !Xt(t); ) {
|
|
7299
7299
|
if (es(t))
|
|
7300
7300
|
return t;
|
|
7301
|
-
if (
|
|
7301
|
+
if (Or(t))
|
|
7302
7302
|
return null;
|
|
7303
7303
|
t = vt(t);
|
|
7304
7304
|
}
|
|
@@ -7314,7 +7314,7 @@ function Xt(e) {
|
|
|
7314
7314
|
function Ze(e) {
|
|
7315
7315
|
return Ie(e).getComputedStyle(e);
|
|
7316
7316
|
}
|
|
7317
|
-
function
|
|
7317
|
+
function Nr(e) {
|
|
7318
7318
|
return Fe(e) ? {
|
|
7319
7319
|
scrollLeft: e.scrollLeft,
|
|
7320
7320
|
scrollTop: e.scrollTop
|
|
@@ -7355,7 +7355,7 @@ function ko(e) {
|
|
|
7355
7355
|
function Sc(e) {
|
|
7356
7356
|
const t = Ze(e);
|
|
7357
7357
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
7358
|
-
const o = et(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a =
|
|
7358
|
+
const o = et(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = vr(n) !== s || vr(r) !== i;
|
|
7359
7359
|
return a && (n = s, r = i), {
|
|
7360
7360
|
width: n,
|
|
7361
7361
|
height: r,
|
|
@@ -7374,7 +7374,7 @@ function Ht(e) {
|
|
|
7374
7374
|
height: o,
|
|
7375
7375
|
$: s
|
|
7376
7376
|
} = Sc(t);
|
|
7377
|
-
let i = (s ?
|
|
7377
|
+
let i = (s ? vr(n.width) : n.width) / r, a = (s ? vr(n.height) : n.height) / o;
|
|
7378
7378
|
return (!i || !Number.isFinite(i)) && (i = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
7379
7379
|
x: i,
|
|
7380
7380
|
y: a
|
|
@@ -7406,19 +7406,19 @@ function Mt(e, t, n, r) {
|
|
|
7406
7406
|
c *= v.x, l *= v.y, d *= v.x, u *= v.y, c += y, l += E, m = Ie(f), f = ko(m);
|
|
7407
7407
|
}
|
|
7408
7408
|
}
|
|
7409
|
-
return
|
|
7409
|
+
return br({
|
|
7410
7410
|
width: d,
|
|
7411
7411
|
height: u,
|
|
7412
7412
|
x: c,
|
|
7413
7413
|
y: l
|
|
7414
7414
|
});
|
|
7415
7415
|
}
|
|
7416
|
-
function
|
|
7417
|
-
const n =
|
|
7416
|
+
function Mr(e, t) {
|
|
7417
|
+
const n = Nr(e).scrollLeft;
|
|
7418
7418
|
return t ? t.left + n : Mt(nt(e)).left + n;
|
|
7419
7419
|
}
|
|
7420
7420
|
function xc(e, t) {
|
|
7421
|
-
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft -
|
|
7421
|
+
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - Mr(e, n), o = n.top + t.scrollTop;
|
|
7422
7422
|
return {
|
|
7423
7423
|
x: r,
|
|
7424
7424
|
y: o
|
|
@@ -7431,7 +7431,7 @@ function Xy(e) {
|
|
|
7431
7431
|
offsetParent: r,
|
|
7432
7432
|
strategy: o
|
|
7433
7433
|
} = e;
|
|
7434
|
-
const s = o === "fixed", i = nt(r), a = t ?
|
|
7434
|
+
const s = o === "fixed", i = nt(r), a = t ? Or(t.floating) : !1;
|
|
7435
7435
|
if (r === i || a && s)
|
|
7436
7436
|
return n;
|
|
7437
7437
|
let c = {
|
|
@@ -7439,7 +7439,7 @@ function Xy(e) {
|
|
|
7439
7439
|
scrollTop: 0
|
|
7440
7440
|
}, l = Xe(1);
|
|
7441
7441
|
const d = Xe(0), u = et(r);
|
|
7442
|
-
if ((u || !u && !s) && ((nn(r) !== "body" || kn(i)) && (c =
|
|
7442
|
+
if ((u || !u && !s) && ((nn(r) !== "body" || kn(i)) && (c = Nr(r)), et(r))) {
|
|
7443
7443
|
const p = Mt(r);
|
|
7444
7444
|
l = Ht(r), d.x = p.x + r.clientLeft, d.y = p.y + r.clientTop;
|
|
7445
7445
|
}
|
|
@@ -7455,8 +7455,8 @@ function Qy(e) {
|
|
|
7455
7455
|
return Array.from(e.getClientRects());
|
|
7456
7456
|
}
|
|
7457
7457
|
function eb(e) {
|
|
7458
|
-
const t = nt(e), n =
|
|
7459
|
-
let i = -n.scrollLeft +
|
|
7458
|
+
const t = nt(e), n = Nr(e), r = e.ownerDocument.body, o = xe(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = xe(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
7459
|
+
let i = -n.scrollLeft + Mr(e);
|
|
7460
7460
|
const a = -n.scrollTop;
|
|
7461
7461
|
return Ze(r).direction === "rtl" && (i += xe(t.clientWidth, r.clientWidth) - o), {
|
|
7462
7462
|
width: o,
|
|
@@ -7474,7 +7474,7 @@ function tb(e, t) {
|
|
|
7474
7474
|
const d = ts();
|
|
7475
7475
|
(!d || d && t === "fixed") && (a = o.offsetLeft, c = o.offsetTop);
|
|
7476
7476
|
}
|
|
7477
|
-
const l =
|
|
7477
|
+
const l = Mr(r);
|
|
7478
7478
|
if (l <= 0) {
|
|
7479
7479
|
const d = r.ownerDocument, u = d.body, h = getComputedStyle(u), p = d.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, m = Math.abs(r.clientWidth - u.clientWidth - p);
|
|
7480
7480
|
m <= Ea && (s -= m);
|
|
@@ -7513,7 +7513,7 @@ function Sa(e, t, n) {
|
|
|
7513
7513
|
height: t.height
|
|
7514
7514
|
};
|
|
7515
7515
|
}
|
|
7516
|
-
return
|
|
7516
|
+
return br(r);
|
|
7517
7517
|
}
|
|
7518
7518
|
function Tc(e, t) {
|
|
7519
7519
|
const n = vt(e);
|
|
@@ -7539,7 +7539,7 @@ function sb(e) {
|
|
|
7539
7539
|
rootBoundary: r,
|
|
7540
7540
|
strategy: o
|
|
7541
7541
|
} = e;
|
|
7542
|
-
const i = [...n === "clippingAncestors" ?
|
|
7542
|
+
const i = [...n === "clippingAncestors" ? Or(t) ? [] : ob(t, this._c) : [].concat(n), r], a = i[0], c = i.reduce((l, d) => {
|
|
7543
7543
|
const u = Sa(t, d, o);
|
|
7544
7544
|
return l.top = xe(u.top, l.top), l.right = gt(u.right, l.right), l.bottom = gt(u.bottom, l.bottom), l.left = xe(u.left, l.left), l;
|
|
7545
7545
|
}, Sa(t, a, o));
|
|
@@ -7568,10 +7568,10 @@ function ib(e, t, n) {
|
|
|
7568
7568
|
};
|
|
7569
7569
|
const c = Xe(0);
|
|
7570
7570
|
function l() {
|
|
7571
|
-
c.x =
|
|
7571
|
+
c.x = Mr(o);
|
|
7572
7572
|
}
|
|
7573
7573
|
if (r || !r && !s)
|
|
7574
|
-
if ((nn(t) !== "body" || kn(o)) && (a =
|
|
7574
|
+
if ((nn(t) !== "body" || kn(o)) && (a = Nr(t)), r) {
|
|
7575
7575
|
const p = Mt(t, !0, s, t);
|
|
7576
7576
|
c.x = p.x + t.clientLeft, c.y = p.y + t.clientTop;
|
|
7577
7577
|
} else o && l();
|
|
@@ -7584,7 +7584,7 @@ function ib(e, t, n) {
|
|
|
7584
7584
|
height: i.height
|
|
7585
7585
|
};
|
|
7586
7586
|
}
|
|
7587
|
-
function
|
|
7587
|
+
function ro(e) {
|
|
7588
7588
|
return Ze(e).position === "static";
|
|
7589
7589
|
}
|
|
7590
7590
|
function Ca(e, t) {
|
|
@@ -7597,21 +7597,21 @@ function Ca(e, t) {
|
|
|
7597
7597
|
}
|
|
7598
7598
|
function Ic(e, t) {
|
|
7599
7599
|
const n = Ie(e);
|
|
7600
|
-
if (
|
|
7600
|
+
if (Or(e))
|
|
7601
7601
|
return n;
|
|
7602
7602
|
if (!et(e)) {
|
|
7603
7603
|
let o = vt(e);
|
|
7604
7604
|
for (; o && !Xt(o); ) {
|
|
7605
|
-
if (Fe(o) && !
|
|
7605
|
+
if (Fe(o) && !ro(o))
|
|
7606
7606
|
return o;
|
|
7607
7607
|
o = vt(o);
|
|
7608
7608
|
}
|
|
7609
7609
|
return n;
|
|
7610
7610
|
}
|
|
7611
7611
|
let r = Ca(e, t);
|
|
7612
|
-
for (; r && jy(r) &&
|
|
7612
|
+
for (; r && jy(r) && ro(r); )
|
|
7613
7613
|
r = Ca(r, t);
|
|
7614
|
-
return r && Xt(r) &&
|
|
7614
|
+
return r && Xt(r) && ro(r) && !es(r) ? n : r || Yy(e) || n;
|
|
7615
7615
|
}
|
|
7616
7616
|
const cb = async function(e) {
|
|
7617
7617
|
const t = this.getOffsetParent || Ic, n = this.getDimensions, r = await n(e.floating);
|
|
@@ -7743,7 +7743,7 @@ const xa = [
|
|
|
7743
7743
|
"touchstart"
|
|
7744
7744
|
];
|
|
7745
7745
|
function gb(e, t, n) {
|
|
7746
|
-
const r =
|
|
7746
|
+
const r = G(null);
|
|
7747
7747
|
return U(() => {
|
|
7748
7748
|
const o = (s) => {
|
|
7749
7749
|
const i = s ? s.target : void 0;
|
|
@@ -7762,7 +7762,7 @@ function gb(e, t, n) {
|
|
|
7762
7762
|
]), r;
|
|
7763
7763
|
}
|
|
7764
7764
|
function vb(e, t) {
|
|
7765
|
-
const [n, r] = Z(!1), o =
|
|
7765
|
+
const [n, r] = Z(!1), o = G(null), s = G(null), i = H(() => {
|
|
7766
7766
|
r((c) => (!c && (!o.current || o.current === -1) && (o.current = window.setInterval(s.current, t)), !0));
|
|
7767
7767
|
}, [
|
|
7768
7768
|
t
|
|
@@ -7813,7 +7813,7 @@ const yb = "av-tooltip", bb = "av-tooltip-arrow", Gn = (e, t = "px") => typeof e
|
|
|
7813
7813
|
}), Tb = 5e3, Ib = ({ trigger: e, label: t, placement: n = "top", mode: r = "system", animationDuration: o = 300, delay: s = 0, className: i, tooltipClassName: a, arrowClassName: c }) => {
|
|
7814
7814
|
const l = gb(() => {
|
|
7815
7815
|
y.stop(), v(!1);
|
|
7816
|
-
}), d =
|
|
7816
|
+
}), d = G(null), u = G(null), h = G(null), [p, m] = Z(!1), [f, v] = Z(!1), [b, _] = Z(!1), y = vb(() => {
|
|
7817
7817
|
v(!1);
|
|
7818
7818
|
}, Tb), E = Cb({
|
|
7819
7819
|
mode: r,
|
|
@@ -7824,7 +7824,7 @@ const yb = "av-tooltip", bb = "av-tooltip-arrow", Gn = (e, t = "px") => typeof e
|
|
|
7824
7824
|
animationDuration: o
|
|
7825
7825
|
}), x = H(async () => {
|
|
7826
7826
|
if (l.current && d.current && u.current) {
|
|
7827
|
-
const { x:
|
|
7827
|
+
const { x: D, y: z, middlewareData: I, placement: M } = await Mc(l.current, d.current, {
|
|
7828
7828
|
placement: n,
|
|
7829
7829
|
middleware: [
|
|
7830
7830
|
Rc(10),
|
|
@@ -7841,22 +7841,22 @@ const yb = "av-tooltip", bb = "av-tooltip-arrow", Gn = (e, t = "px") => typeof e
|
|
|
7841
7841
|
]
|
|
7842
7842
|
});
|
|
7843
7843
|
d?.current?.style && Object.assign(d.current.style, {
|
|
7844
|
-
left: Gn(
|
|
7845
|
-
top: Gn(
|
|
7844
|
+
left: Gn(D),
|
|
7845
|
+
top: Gn(z),
|
|
7846
7846
|
...S
|
|
7847
7847
|
});
|
|
7848
|
-
const
|
|
7848
|
+
const A = {
|
|
7849
7849
|
top: "bottom",
|
|
7850
7850
|
right: "left",
|
|
7851
7851
|
bottom: "top",
|
|
7852
7852
|
left: "right"
|
|
7853
|
-
}[
|
|
7853
|
+
}[M.split("-")[0]];
|
|
7854
7854
|
u?.current?.style && Object.assign(u.current.style, {
|
|
7855
7855
|
left: Gn(I.arrow?.x),
|
|
7856
7856
|
top: Gn(I.arrow?.y),
|
|
7857
7857
|
right: "",
|
|
7858
7858
|
bottom: "",
|
|
7859
|
-
[
|
|
7859
|
+
[A]: "-4px"
|
|
7860
7860
|
}), _(!0);
|
|
7861
7861
|
}
|
|
7862
7862
|
}, [
|
|
@@ -7878,18 +7878,18 @@ const yb = "av-tooltip", bb = "av-tooltip-arrow", Gn = (e, t = "px") => typeof e
|
|
|
7878
7878
|
f || (s > 0 ? h.current = setTimeout(() => {
|
|
7879
7879
|
m(!0), h.current = null;
|
|
7880
7880
|
}, s) : m(!0));
|
|
7881
|
-
},
|
|
7881
|
+
}, P = () => {
|
|
7882
7882
|
h.current && (clearTimeout(h.current), h.current = null), f || m(!1);
|
|
7883
7883
|
};
|
|
7884
|
-
return /* @__PURE__ */
|
|
7884
|
+
return /* @__PURE__ */ L("div", {
|
|
7885
7885
|
className: E.wrapper,
|
|
7886
7886
|
ref: l,
|
|
7887
7887
|
onMouseEnter: O,
|
|
7888
|
-
onMouseLeave:
|
|
7888
|
+
onMouseLeave: P,
|
|
7889
7889
|
onClick: T,
|
|
7890
7890
|
children: [
|
|
7891
7891
|
e,
|
|
7892
|
-
p && /* @__PURE__ */
|
|
7892
|
+
p && /* @__PURE__ */ L("div", {
|
|
7893
7893
|
role: "tooltip",
|
|
7894
7894
|
ref: d,
|
|
7895
7895
|
className: E.tooltip,
|
|
@@ -7906,7 +7906,7 @@ const yb = "av-tooltip", bb = "av-tooltip-arrow", Gn = (e, t = "px") => typeof e
|
|
|
7906
7906
|
})
|
|
7907
7907
|
]
|
|
7908
7908
|
});
|
|
7909
|
-
},
|
|
7909
|
+
}, kr = ({
|
|
7910
7910
|
trigger: e,
|
|
7911
7911
|
className: t,
|
|
7912
7912
|
...n
|
|
@@ -7942,7 +7942,7 @@ const yb = "av-tooltip", bb = "av-tooltip-arrow", Gn = (e, t = "px") => typeof e
|
|
|
7942
7942
|
className: o
|
|
7943
7943
|
};
|
|
7944
7944
|
return /* @__PURE__ */ g(
|
|
7945
|
-
|
|
7945
|
+
kr,
|
|
7946
7946
|
{
|
|
7947
7947
|
label: e,
|
|
7948
7948
|
mode: "light",
|
|
@@ -7990,7 +7990,7 @@ const Rb = ({
|
|
|
7990
7990
|
dispatch: s,
|
|
7991
7991
|
setChatId: i,
|
|
7992
7992
|
setInitialMessages: a
|
|
7993
|
-
} = ue(Be), { id: c, setInput: l, stop: d } = _t(), u =
|
|
7993
|
+
} = ue(Be), { id: c, setInput: l, stop: d } = _t(), u = G(null), h = G(!1), [p, m] = je(), { data: f, isSuccess: v } = bt({
|
|
7994
7994
|
user: n?.username,
|
|
7995
7995
|
getAccessToken: t
|
|
7996
7996
|
}), b = p(m.NewChat), _ = H(() => {
|
|
@@ -8082,14 +8082,14 @@ const Rb = ({
|
|
|
8082
8082
|
}
|
|
8083
8083
|
);
|
|
8084
8084
|
};
|
|
8085
|
-
let
|
|
8086
|
-
const Pc = async () => (
|
|
8085
|
+
let oo = null, so = null;
|
|
8086
|
+
const Pc = async () => (oo || (oo = import(
|
|
8087
8087
|
/* webpackChunkName: "toast-react-toastify" */
|
|
8088
8088
|
"./index.ri2Dr1rJ.js"
|
|
8089
|
-
)),
|
|
8089
|
+
)), oo), Dc = async () => (so || (so = import(
|
|
8090
8090
|
/* webpackChunkName: "toast-utilities" */
|
|
8091
|
-
"./index.
|
|
8092
|
-
).then((e) => e.utilities)),
|
|
8091
|
+
"./index.KoZIit7c.js"
|
|
8092
|
+
).then((e) => e.utilities)), so), Ob = async () => {
|
|
8093
8093
|
try {
|
|
8094
8094
|
await Promise.all([Pc(), Dc()]);
|
|
8095
8095
|
} catch {
|
|
@@ -8155,7 +8155,7 @@ function Pb({ initialOpen: e = !1, open: t, onOpenChange: n, initialFocus: r } =
|
|
|
8155
8155
|
h
|
|
8156
8156
|
]);
|
|
8157
8157
|
}
|
|
8158
|
-
const
|
|
8158
|
+
const Pr = () => {
|
|
8159
8159
|
const e = ue(Lc);
|
|
8160
8160
|
if (e == null)
|
|
8161
8161
|
throw new Error("Modal components must be wrapped in <Modal />");
|
|
@@ -8178,7 +8178,7 @@ function Db(e) {
|
|
|
8178
8178
|
});
|
|
8179
8179
|
}
|
|
8180
8180
|
function $b({ ref: e, overlayBackground: t, ...n }) {
|
|
8181
|
-
const { context: r, nodeId: o, ...s } =
|
|
8181
|
+
const { context: r, nodeId: o, ...s } = Pr(), i = Vd([
|
|
8182
8182
|
s.refs.setFloating,
|
|
8183
8183
|
e
|
|
8184
8184
|
]);
|
|
@@ -8209,7 +8209,7 @@ function $b({ ref: e, overlayBackground: t, ...n }) {
|
|
|
8209
8209
|
});
|
|
8210
8210
|
}
|
|
8211
8211
|
function Lb({ children: e, ref: t, ...n }) {
|
|
8212
|
-
const { setLabelId: r } =
|
|
8212
|
+
const { setLabelId: r } = Pr(), o = ci();
|
|
8213
8213
|
return In(() => (r(o), () => r(void 0)), [
|
|
8214
8214
|
o,
|
|
8215
8215
|
r
|
|
@@ -8221,7 +8221,7 @@ function Lb({ children: e, ref: t, ...n }) {
|
|
|
8221
8221
|
});
|
|
8222
8222
|
}
|
|
8223
8223
|
function zb({ children: e, ref: t, ...n }) {
|
|
8224
|
-
const { setDescriptionId: r } =
|
|
8224
|
+
const { setDescriptionId: r } = Pr(), o = ci();
|
|
8225
8225
|
return In(() => (r(o), () => r(void 0)), [
|
|
8226
8226
|
o,
|
|
8227
8227
|
r
|
|
@@ -8233,7 +8233,7 @@ function zb({ children: e, ref: t, ...n }) {
|
|
|
8233
8233
|
});
|
|
8234
8234
|
}
|
|
8235
8235
|
function Fb({ ref: e, trigger: t, className: n, ...r }) {
|
|
8236
|
-
const { setOpen: o } =
|
|
8236
|
+
const { setOpen: o } = Pr(), s = H(() => o(!1), [
|
|
8237
8237
|
o
|
|
8238
8238
|
]);
|
|
8239
8239
|
return /* @__PURE__ */ g("div", {
|
|
@@ -8402,7 +8402,7 @@ const Ra = ({ blurEffect: e }) => $("absolute left-0 right-0 z-20 backdrop-brigh
|
|
|
8402
8402
|
/* inlined export .NONE */
|
|
8403
8403
|
"none"
|
|
8404
8404
|
), initialFocus: p }) => {
|
|
8405
|
-
const m =
|
|
8405
|
+
const m = G(""), [f, v] = Z(c ? l === /* inlined export .ANIMATION_FADE */
|
|
8406
8406
|
"fade" ? {
|
|
8407
8407
|
opacity: 0
|
|
8408
8408
|
} : {
|
|
@@ -8454,10 +8454,10 @@ const Ra = ({ blurEffect: e }) => $("absolute left-0 right-0 z-20 backdrop-brigh
|
|
|
8454
8454
|
style: {
|
|
8455
8455
|
...f
|
|
8456
8456
|
},
|
|
8457
|
-
children: /* @__PURE__ */
|
|
8457
|
+
children: /* @__PURE__ */ L(zb, {
|
|
8458
8458
|
className: b.innerWrapper,
|
|
8459
8459
|
children: [
|
|
8460
|
-
/* @__PURE__ */
|
|
8460
|
+
/* @__PURE__ */ L("div", {
|
|
8461
8461
|
className: b.header,
|
|
8462
8462
|
children: [
|
|
8463
8463
|
/* @__PURE__ */ g(Fb, {
|
|
@@ -8506,7 +8506,7 @@ const Ra = ({ blurEffect: e }) => $("absolute left-0 right-0 z-20 backdrop-brigh
|
|
|
8506
8506
|
})
|
|
8507
8507
|
});
|
|
8508
8508
|
};
|
|
8509
|
-
const
|
|
8509
|
+
const ao = 50, Oa = 120;
|
|
8510
8510
|
let Ye = null, Yn = 0;
|
|
8511
8511
|
const Bb = () => {
|
|
8512
8512
|
if (typeof window > "u" || Ye && document.body.contains(Ye))
|
|
@@ -8524,7 +8524,7 @@ const Bb = () => {
|
|
|
8524
8524
|
}, jb = () => {
|
|
8525
8525
|
Ye && document.body && document.body.contains(Ye) && document.body.removeChild(Ye), Ye = null;
|
|
8526
8526
|
}, Hb = () => {
|
|
8527
|
-
const e =
|
|
8527
|
+
const e = G(/* @__PURE__ */ new Set());
|
|
8528
8528
|
U(() => {
|
|
8529
8529
|
Yn++;
|
|
8530
8530
|
try {
|
|
@@ -8541,7 +8541,7 @@ const Bb = () => {
|
|
|
8541
8541
|
const t = H(() => {
|
|
8542
8542
|
try {
|
|
8543
8543
|
if (navigator?.vibrate) {
|
|
8544
|
-
navigator.vibrate(
|
|
8544
|
+
navigator.vibrate(ao);
|
|
8545
8545
|
return;
|
|
8546
8546
|
}
|
|
8547
8547
|
Ye?.click();
|
|
@@ -8554,7 +8554,7 @@ const Bb = () => {
|
|
|
8554
8554
|
if (navigator?.vibrate && r > 1) {
|
|
8555
8555
|
const o = [];
|
|
8556
8556
|
for (let s = 0; s < r; s++)
|
|
8557
|
-
o.push(
|
|
8557
|
+
o.push(ao), s < r - 1 && o.push(Oa - ao);
|
|
8558
8558
|
navigator.vibrate(o);
|
|
8559
8559
|
return;
|
|
8560
8560
|
}
|
|
@@ -8662,7 +8662,7 @@ const Vb = "av-toggle", Wb = ({ narrow: e }) => $(
|
|
|
8662
8662
|
subLabel: !!p
|
|
8663
8663
|
}), v = (_) => {
|
|
8664
8664
|
u || m(1), t?.(_.target.checked);
|
|
8665
|
-
}, b = p ? /* @__PURE__ */
|
|
8665
|
+
}, b = p ? /* @__PURE__ */ L("span", {
|
|
8666
8666
|
className: "flex flex-col gap-0.5",
|
|
8667
8667
|
children: [
|
|
8668
8668
|
/* @__PURE__ */ g("span", {
|
|
@@ -8678,11 +8678,11 @@ const Vb = "av-toggle", Wb = ({ narrow: e }) => $(
|
|
|
8678
8678
|
className: f.label,
|
|
8679
8679
|
children: n
|
|
8680
8680
|
});
|
|
8681
|
-
return /* @__PURE__ */
|
|
8681
|
+
return /* @__PURE__ */ L("label", {
|
|
8682
8682
|
className: f.wrapper,
|
|
8683
8683
|
children: [
|
|
8684
8684
|
h === "left" && b,
|
|
8685
|
-
/* @__PURE__ */
|
|
8685
|
+
/* @__PURE__ */ L("div", {
|
|
8686
8686
|
className: f.toggleWrapper,
|
|
8687
8687
|
children: [
|
|
8688
8688
|
/* @__PURE__ */ g("input", {
|
|
@@ -8735,7 +8735,7 @@ const Vb = "av-toggle", Wb = ({ narrow: e }) => $(
|
|
|
8735
8735
|
toggleChecked: h,
|
|
8736
8736
|
onToggleChange: p
|
|
8737
8737
|
}) => {
|
|
8738
|
-
const m =
|
|
8738
|
+
const m = G(null), f = /* @__PURE__ */ L("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
|
|
8739
8739
|
/* @__PURE__ */ g("div", { className: "box-border max-w-full basis-auto", children: !s && /* @__PURE__ */ g(
|
|
8740
8740
|
tw,
|
|
8741
8741
|
{
|
|
@@ -8758,7 +8758,7 @@ const Vb = "av-toggle", Wb = ({ narrow: e }) => $(
|
|
|
8758
8758
|
children: o.confirmAction
|
|
8759
8759
|
}
|
|
8760
8760
|
) })
|
|
8761
|
-
] }), v = d ? /* @__PURE__ */
|
|
8761
|
+
] }), v = d ? /* @__PURE__ */ L("div", { className: "flex flex-wrap justify-between items-center gap-x-2", children: [
|
|
8762
8762
|
/* @__PURE__ */ g("div", { className: "box-border max-w-full basis-auto grow", children: /* @__PURE__ */ g(
|
|
8763
8763
|
ew,
|
|
8764
8764
|
{
|
|
@@ -8796,71 +8796,82 @@ const Vb = "av-toggle", Wb = ({ narrow: e }) => $(
|
|
|
8796
8796
|
const { getAccessToken: t, user: n } = Ue(), {
|
|
8797
8797
|
state: { privateChat: r, provider: o, tokenUsage: s },
|
|
8798
8798
|
dispatch: i
|
|
8799
|
-
} = ue(Be), { messages: a, id: c } = _t(), { mutateAsync: l } = xu({ getAccessToken: t }), [d, u] = je(), [h, p] = Z(!1), [m, f] = Z(!1), [v, b] = Ne({
|
|
8799
|
+
} = ue(Be), { messages: a, id: c } = _t(), { mutateAsync: l } = xu({ getAccessToken: t }), [d, u] = je(), [h, p] = Z(!1), [m, f] = Z(!1), [v, b] = Z(!1), [_, y] = Ne({
|
|
8800
8800
|
key: Te + Tu,
|
|
8801
8801
|
initialValue: ""
|
|
8802
|
-
}),
|
|
8802
|
+
}), E = Vt(Bt.TOOL.MEMORIES), S = Vt(Bt.ADDON.SHARE_CHAT), { data: x, isSuccess: T } = bt({
|
|
8803
8803
|
user: n?.username,
|
|
8804
8804
|
getAccessToken: t
|
|
8805
|
-
}),
|
|
8805
|
+
}), O = async () => {
|
|
8806
8806
|
try {
|
|
8807
8807
|
if (!c || !o)
|
|
8808
8808
|
return;
|
|
8809
|
-
|
|
8809
|
+
b(!0);
|
|
8810
|
+
const I = !r;
|
|
8810
8811
|
if (!a || a.length === 0) {
|
|
8811
8812
|
i({
|
|
8812
|
-
type:
|
|
8813
|
+
type: or,
|
|
8813
8814
|
payload: {
|
|
8814
|
-
privateChat:
|
|
8815
|
+
privateChat: I
|
|
8815
8816
|
}
|
|
8816
8817
|
});
|
|
8817
8818
|
return;
|
|
8818
8819
|
}
|
|
8819
|
-
let
|
|
8820
|
-
!
|
|
8821
|
-
(
|
|
8822
|
-
) : !1).map((
|
|
8823
|
-
role:
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
8820
|
+
let M = [];
|
|
8821
|
+
!I && a && a.length > 0 && (M = a.filter((A) => A.parts && A.parts.length > 0 ? A.parts.some(
|
|
8822
|
+
(V) => V.type === "text" && V.text?.trim()
|
|
8823
|
+
) : "content" in A && typeof A.content == "string" ? A.content.trim() !== "" : !1).map((A) => A.parts && A.parts.length > 0 ? {
|
|
8824
|
+
role: A.role,
|
|
8825
|
+
content: A.parts.filter((V) => V.type === "text").map((V) => V.text).join("") || "",
|
|
8826
|
+
id: A.id
|
|
8827
|
+
} : {
|
|
8828
|
+
role: A.role,
|
|
8829
|
+
content: "content" in A && typeof A.content == "string" ? A.content : "",
|
|
8830
|
+
id: A.id
|
|
8831
|
+
})), i({
|
|
8832
|
+
type: or,
|
|
8833
|
+
payload: {
|
|
8834
|
+
privateChat: I
|
|
8835
|
+
}
|
|
8836
|
+
}), await l({
|
|
8828
8837
|
userId: n?.username || "",
|
|
8829
8838
|
id: c,
|
|
8830
|
-
messages:
|
|
8839
|
+
messages: M,
|
|
8831
8840
|
provider: o,
|
|
8832
8841
|
tokenUsage: s,
|
|
8833
|
-
privateChat:
|
|
8834
|
-
}), i({
|
|
8835
|
-
type: Ao,
|
|
8836
|
-
payload: {
|
|
8837
|
-
privateChat: A
|
|
8838
|
-
}
|
|
8842
|
+
privateChat: I
|
|
8839
8843
|
});
|
|
8840
8844
|
} catch {
|
|
8841
|
-
|
|
8845
|
+
i({
|
|
8846
|
+
type: or,
|
|
8847
|
+
payload: {
|
|
8848
|
+
privateChat: r
|
|
8849
|
+
}
|
|
8850
|
+
}), await Nb("Failed to toggle privacy. Please try again.", {
|
|
8842
8851
|
containerId: "toggle-privacy"
|
|
8843
8852
|
});
|
|
8853
|
+
} finally {
|
|
8854
|
+
b(!1);
|
|
8844
8855
|
}
|
|
8845
|
-
},
|
|
8846
|
-
|
|
8847
|
-
},
|
|
8848
|
-
if (
|
|
8856
|
+
}, P = (I) => {
|
|
8857
|
+
I && I.preventDefault(), !r && !_ ? f(!0) : O();
|
|
8858
|
+
}, z = ((I) => {
|
|
8859
|
+
if (I.length === 0)
|
|
8849
8860
|
return "";
|
|
8850
|
-
if (
|
|
8851
|
-
return `${
|
|
8852
|
-
if (
|
|
8853
|
-
return `${
|
|
8854
|
-
const
|
|
8855
|
-
return `${
|
|
8861
|
+
if (I.length === 1)
|
|
8862
|
+
return `${I[0]}.`;
|
|
8863
|
+
if (I.length === 2)
|
|
8864
|
+
return `${I[0]}, ${I[1]}.`;
|
|
8865
|
+
const M = I[I.length - 1];
|
|
8866
|
+
return `${I.slice(0, -1).join(", ")}, and ${M}.`;
|
|
8856
8867
|
})(
|
|
8857
8868
|
[
|
|
8858
8869
|
"In Private Mode, your messages will not be saved to your chat history",
|
|
8859
|
-
|
|
8860
|
-
|
|
8861
|
-
].filter((
|
|
8870
|
+
E ? "Memories will be disabled" : null,
|
|
8871
|
+
S ? "you will not be able to share your chat with others" : null
|
|
8872
|
+
].filter((I) => !!I)
|
|
8862
8873
|
);
|
|
8863
|
-
return /* @__PURE__ */
|
|
8874
|
+
return /* @__PURE__ */ L(rt, { children: [
|
|
8864
8875
|
m && /* @__PURE__ */ g(
|
|
8865
8876
|
Qt,
|
|
8866
8877
|
{
|
|
@@ -8869,19 +8880,19 @@ const Vb = "av-toggle", Wb = ({ narrow: e }) => $(
|
|
|
8869
8880
|
maxHeight: "large",
|
|
8870
8881
|
noCancelAction: Jt(),
|
|
8871
8882
|
toggleChecked: h,
|
|
8872
|
-
onToggleChange: (
|
|
8883
|
+
onToggleChange: (I) => p(I),
|
|
8873
8884
|
showConfirmation: m,
|
|
8874
8885
|
setShowConfirmation: f,
|
|
8875
8886
|
action: () => {
|
|
8876
|
-
h &&
|
|
8887
|
+
h && y("true"), O();
|
|
8877
8888
|
},
|
|
8878
8889
|
customStrings: {
|
|
8879
8890
|
confirmAction: "Continue",
|
|
8880
8891
|
cancelAction: "Cancel",
|
|
8881
8892
|
title: "Private Chat"
|
|
8882
8893
|
},
|
|
8883
|
-
children: /* @__PURE__ */
|
|
8884
|
-
/* @__PURE__ */ g("li", { children:
|
|
8894
|
+
children: /* @__PURE__ */ L("ul", { children: [
|
|
8895
|
+
/* @__PURE__ */ g("li", { children: z }),
|
|
8885
8896
|
/* @__PURE__ */ g("li", { children: "You can toggle privacy on and off at any time during your conversation." }),
|
|
8886
8897
|
/* @__PURE__ */ g("li", { children: "If you refresh your browser, the setting will revert to the default (non-private) chat." })
|
|
8887
8898
|
] })
|
|
@@ -8895,9 +8906,9 @@ const Vb = "av-toggle", Wb = ({ narrow: e }) => $(
|
|
|
8895
8906
|
placement: "top",
|
|
8896
8907
|
className: e,
|
|
8897
8908
|
buttonClassName: "text-sm",
|
|
8898
|
-
disabled: !(
|
|
8909
|
+
disabled: !(T && x) || v,
|
|
8899
8910
|
background: r,
|
|
8900
|
-
onClick:
|
|
8911
|
+
onClick: P,
|
|
8901
8912
|
variant: r ? "danger" : "secondary",
|
|
8902
8913
|
animated: !0,
|
|
8903
8914
|
children: r ? /* @__PURE__ */ g(sd, { size: Qe }) : /* @__PURE__ */ g(
|
|
@@ -8911,7 +8922,7 @@ const Vb = "av-toggle", Wb = ({ narrow: e }) => $(
|
|
|
8911
8922
|
)
|
|
8912
8923
|
] });
|
|
8913
8924
|
};
|
|
8914
|
-
function
|
|
8925
|
+
function K(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
8915
8926
|
return function(o) {
|
|
8916
8927
|
if (e?.(o), n === !1 || !o.defaultPrevented)
|
|
8917
8928
|
return t?.(o);
|
|
@@ -8922,7 +8933,7 @@ function Ma(e, t) {
|
|
|
8922
8933
|
return e(t);
|
|
8923
8934
|
e != null && (e.current = t);
|
|
8924
8935
|
}
|
|
8925
|
-
function
|
|
8936
|
+
function Dr(...e) {
|
|
8926
8937
|
return (t) => {
|
|
8927
8938
|
let n = !1;
|
|
8928
8939
|
const r = e.map((o) => {
|
|
@@ -8939,7 +8950,7 @@ function Pr(...e) {
|
|
|
8939
8950
|
};
|
|
8940
8951
|
}
|
|
8941
8952
|
function Ee(...e) {
|
|
8942
|
-
return w.useCallback(
|
|
8953
|
+
return w.useCallback(Dr(...e), e);
|
|
8943
8954
|
}
|
|
8944
8955
|
function Pn(e, t = []) {
|
|
8945
8956
|
let n = [];
|
|
@@ -9038,7 +9049,7 @@ function aw(e) {
|
|
|
9038
9049
|
return typeof e == "function";
|
|
9039
9050
|
}
|
|
9040
9051
|
// @__NO_SIDE_EFFECTS__
|
|
9041
|
-
function
|
|
9052
|
+
function wr(e) {
|
|
9042
9053
|
const t = /* @__PURE__ */ iw(e), n = w.forwardRef((r, o) => {
|
|
9043
9054
|
const { children: s, ...i } = r, a = w.Children.toArray(s), c = a.find(lw);
|
|
9044
9055
|
if (c) {
|
|
@@ -9055,7 +9066,7 @@ function iw(e) {
|
|
|
9055
9066
|
const { children: o, ...s } = n;
|
|
9056
9067
|
if (w.isValidElement(o)) {
|
|
9057
9068
|
const i = dw(o), a = uw(s, o.props);
|
|
9058
|
-
return o.type !== w.Fragment && (a.ref = r ?
|
|
9069
|
+
return o.type !== w.Fragment && (a.ref = r ? Dr(r, i) : i), w.cloneElement(o, a);
|
|
9059
9070
|
}
|
|
9060
9071
|
return w.Children.count(o) > 1 ? w.Children.only(null) : null;
|
|
9061
9072
|
});
|
|
@@ -9099,7 +9110,7 @@ var fw = [
|
|
|
9099
9110
|
"svg",
|
|
9100
9111
|
"ul"
|
|
9101
9112
|
], we = fw.reduce((e, t) => {
|
|
9102
|
-
const n = /* @__PURE__ */
|
|
9113
|
+
const n = /* @__PURE__ */ wr(`Primitive.${t}`), r = w.forwardRef((o, s) => {
|
|
9103
9114
|
const { asChild: i, ...a } = o, c = i ? n : t;
|
|
9104
9115
|
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ g(c, { ...a, ref: s });
|
|
9105
9116
|
});
|
|
@@ -9117,14 +9128,14 @@ function Fc(e) {
|
|
|
9117
9128
|
return /* @__PURE__ */ g(o, { scope: v, itemMap: y, collectionRef: _, children: b });
|
|
9118
9129
|
};
|
|
9119
9130
|
i.displayName = t;
|
|
9120
|
-
const a = e + "CollectionSlot", c = /* @__PURE__ */
|
|
9131
|
+
const a = e + "CollectionSlot", c = /* @__PURE__ */ wr(a), l = We.forwardRef(
|
|
9121
9132
|
(f, v) => {
|
|
9122
9133
|
const { scope: b, children: _ } = f, y = s(a, b), E = Ee(v, y.collectionRef);
|
|
9123
9134
|
return /* @__PURE__ */ g(c, { ref: E, children: _ });
|
|
9124
9135
|
}
|
|
9125
9136
|
);
|
|
9126
9137
|
l.displayName = a;
|
|
9127
|
-
const d = e + "CollectionItemSlot", u = "data-radix-collection-item", h = /* @__PURE__ */
|
|
9138
|
+
const d = e + "CollectionItemSlot", u = "data-radix-collection-item", h = /* @__PURE__ */ wr(d), p = We.forwardRef(
|
|
9128
9139
|
(f, v) => {
|
|
9129
9140
|
const { scope: b, children: _, ...y } = f, E = We.useRef(null), S = Ee(v, E), x = s(d, b);
|
|
9130
9141
|
return We.useEffect(() => (x.itemMap.set(E, { ref: E, ...y }), () => {
|
|
@@ -9185,11 +9196,11 @@ var hw = "DismissableLayer", Do = "dismissableLayer.update", gw = "dismissableLa
|
|
|
9185
9196
|
onDismiss: a,
|
|
9186
9197
|
...c
|
|
9187
9198
|
} = e, l = w.useContext(Uc), [d, u] = w.useState(null), h = d?.ownerDocument ?? globalThis?.document, [, p] = w.useState({}), m = Ee(t, (T) => u(T)), f = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), b = f.indexOf(v), _ = d ? f.indexOf(d) : -1, y = l.layersWithOutsidePointerEventsDisabled.size > 0, E = _ >= b, S = ww((T) => {
|
|
9188
|
-
const O = T.target,
|
|
9189
|
-
!E ||
|
|
9199
|
+
const O = T.target, P = [...l.branches].some((D) => D.contains(O));
|
|
9200
|
+
!E || P || (o?.(T), i?.(T), T.defaultPrevented || a?.());
|
|
9190
9201
|
}, h), x = _w((T) => {
|
|
9191
9202
|
const O = T.target;
|
|
9192
|
-
[...l.branches].some((
|
|
9203
|
+
[...l.branches].some((D) => D.contains(O)) || (s?.(T), i?.(T), T.defaultPrevented || a?.());
|
|
9193
9204
|
}, h);
|
|
9194
9205
|
return mw((T) => {
|
|
9195
9206
|
_ === l.layers.size - 1 && (r?.(T), !T.defaultPrevented && a && (T.preventDefault(), a()));
|
|
@@ -9212,9 +9223,9 @@ var hw = "DismissableLayer", Do = "dismissableLayer.update", gw = "dismissableLa
|
|
|
9212
9223
|
pointerEvents: y ? E ? "auto" : "none" : void 0,
|
|
9213
9224
|
...e.style
|
|
9214
9225
|
},
|
|
9215
|
-
onFocusCapture:
|
|
9216
|
-
onBlurCapture:
|
|
9217
|
-
onPointerDownCapture:
|
|
9226
|
+
onFocusCapture: K(e.onFocusCapture, x.onFocusCapture),
|
|
9227
|
+
onBlurCapture: K(e.onBlurCapture, x.onBlurCapture),
|
|
9228
|
+
onPointerDownCapture: K(
|
|
9218
9229
|
e.onPointerDownCapture,
|
|
9219
9230
|
S.onPointerDownCapture
|
|
9220
9231
|
)
|
|
@@ -9286,12 +9297,12 @@ function jc(e, t, n, { discrete: r }) {
|
|
|
9286
9297
|
const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
9287
9298
|
t && o.addEventListener(e, t, { once: !0 }), r ? zc(o, s) : o.dispatchEvent(s);
|
|
9288
9299
|
}
|
|
9289
|
-
var
|
|
9300
|
+
var io = 0;
|
|
9290
9301
|
function Ew() {
|
|
9291
9302
|
w.useEffect(() => {
|
|
9292
9303
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
9293
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Da()), document.body.insertAdjacentElement("beforeend", e[1] ?? Da()),
|
|
9294
|
-
|
|
9304
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Da()), document.body.insertAdjacentElement("beforeend", e[1] ?? Da()), io++, () => {
|
|
9305
|
+
io === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), io--;
|
|
9295
9306
|
};
|
|
9296
9307
|
}, []);
|
|
9297
9308
|
}
|
|
@@ -9299,7 +9310,7 @@ function Da() {
|
|
|
9299
9310
|
const e = document.createElement("span");
|
|
9300
9311
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
9301
9312
|
}
|
|
9302
|
-
var
|
|
9313
|
+
var co = "focusScope.autoFocusOnMount", lo = "focusScope.autoFocusOnUnmount", $a = { bubbles: !1, cancelable: !0 }, Sw = "FocusScope", Hc = w.forwardRef((e, t) => {
|
|
9303
9314
|
const {
|
|
9304
9315
|
loop: n = !1,
|
|
9305
9316
|
trapped: r = !1,
|
|
@@ -9341,13 +9352,13 @@ var io = "focusScope.autoFocusOnMount", co = "focusScope.autoFocusOnUnmount", $a
|
|
|
9341
9352
|
za.add(p);
|
|
9342
9353
|
const f = document.activeElement;
|
|
9343
9354
|
if (!a.contains(f)) {
|
|
9344
|
-
const b = new CustomEvent(
|
|
9345
|
-
a.addEventListener(
|
|
9355
|
+
const b = new CustomEvent(co, $a);
|
|
9356
|
+
a.addEventListener(co, l), a.dispatchEvent(b), b.defaultPrevented || (Cw(Rw(Vc(a)), { select: !0 }), document.activeElement === f && ct(a));
|
|
9346
9357
|
}
|
|
9347
9358
|
return () => {
|
|
9348
|
-
a.removeEventListener(
|
|
9349
|
-
const b = new CustomEvent(
|
|
9350
|
-
a.addEventListener(
|
|
9359
|
+
a.removeEventListener(co, l), setTimeout(() => {
|
|
9360
|
+
const b = new CustomEvent(lo, $a);
|
|
9361
|
+
a.addEventListener(lo, d), a.dispatchEvent(b), b.defaultPrevented || ct(f ?? document.body, { select: !0 }), a.removeEventListener(lo, d), za.remove(p);
|
|
9351
9362
|
}, 0);
|
|
9352
9363
|
};
|
|
9353
9364
|
}
|
|
@@ -9436,8 +9447,8 @@ function Cn(e) {
|
|
|
9436
9447
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
9437
9448
|
}
|
|
9438
9449
|
var Mw = typeof document < "u", kw = function() {
|
|
9439
|
-
},
|
|
9440
|
-
function
|
|
9450
|
+
}, ir = Mw ? In : kw;
|
|
9451
|
+
function _r(e, t) {
|
|
9441
9452
|
if (e === t)
|
|
9442
9453
|
return !0;
|
|
9443
9454
|
if (typeof e != typeof t)
|
|
@@ -9449,7 +9460,7 @@ function wr(e, t) {
|
|
|
9449
9460
|
if (Array.isArray(e)) {
|
|
9450
9461
|
if (n = e.length, n !== t.length) return !1;
|
|
9451
9462
|
for (r = n; r-- !== 0; )
|
|
9452
|
-
if (!
|
|
9463
|
+
if (!_r(e[r], t[r]))
|
|
9453
9464
|
return !1;
|
|
9454
9465
|
return !0;
|
|
9455
9466
|
}
|
|
@@ -9460,7 +9471,7 @@ function wr(e, t) {
|
|
|
9460
9471
|
return !1;
|
|
9461
9472
|
for (r = n; r-- !== 0; ) {
|
|
9462
9473
|
const s = o[r];
|
|
9463
|
-
if (!(s === "_owner" && e.$$typeof) && !
|
|
9474
|
+
if (!(s === "_owner" && e.$$typeof) && !_r(e[s], t[s]))
|
|
9464
9475
|
return !1;
|
|
9465
9476
|
}
|
|
9466
9477
|
return !0;
|
|
@@ -9474,9 +9485,9 @@ function Za(e, t) {
|
|
|
9474
9485
|
const n = Wc(e);
|
|
9475
9486
|
return Math.round(t * n) / n;
|
|
9476
9487
|
}
|
|
9477
|
-
function
|
|
9488
|
+
function uo(e) {
|
|
9478
9489
|
const t = w.useRef(e);
|
|
9479
|
-
return
|
|
9490
|
+
return ir(() => {
|
|
9480
9491
|
t.current = e;
|
|
9481
9492
|
}), t;
|
|
9482
9493
|
}
|
|
@@ -9502,12 +9513,12 @@ function Pw(e) {
|
|
|
9502
9513
|
middlewareData: {},
|
|
9503
9514
|
isPositioned: !1
|
|
9504
9515
|
}), [h, p] = w.useState(r);
|
|
9505
|
-
|
|
9516
|
+
_r(h, r) || p(r);
|
|
9506
9517
|
const [m, f] = w.useState(null), [v, b] = w.useState(null), _ = w.useCallback((B) => {
|
|
9507
9518
|
B !== x.current && (x.current = B, f(B));
|
|
9508
9519
|
}, []), y = w.useCallback((B) => {
|
|
9509
9520
|
B !== T.current && (T.current = B, b(B));
|
|
9510
|
-
}, []), E = s || m, S = i || v, x = w.useRef(null), T = w.useRef(null), O = w.useRef(d),
|
|
9521
|
+
}, []), E = s || m, S = i || v, x = w.useRef(null), T = w.useRef(null), O = w.useRef(d), P = c != null, D = uo(c), z = uo(o), I = uo(l), M = w.useCallback(() => {
|
|
9511
9522
|
if (!x.current || !T.current)
|
|
9512
9523
|
return;
|
|
9513
9524
|
const B = {
|
|
@@ -9515,42 +9526,42 @@ function Pw(e) {
|
|
|
9515
9526
|
strategy: n,
|
|
9516
9527
|
middleware: h
|
|
9517
9528
|
};
|
|
9518
|
-
|
|
9529
|
+
z.current && (B.platform = z.current), Mc(x.current, T.current, B).then((N) => {
|
|
9519
9530
|
const ce = {
|
|
9520
|
-
...
|
|
9531
|
+
...N,
|
|
9521
9532
|
// The floating element's position may be recomputed while it's closed
|
|
9522
9533
|
// but still mounted (such as when transitioning out). To ensure
|
|
9523
9534
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
9524
9535
|
// setting it to `true` when `open === false` (must be specified).
|
|
9525
9536
|
isPositioned: I.current !== !1
|
|
9526
9537
|
};
|
|
9527
|
-
|
|
9538
|
+
A.current && !_r(O.current, ce) && (O.current = ce, pi.flushSync(() => {
|
|
9528
9539
|
u(ce);
|
|
9529
9540
|
}));
|
|
9530
9541
|
});
|
|
9531
|
-
}, [h, t, n,
|
|
9532
|
-
|
|
9542
|
+
}, [h, t, n, z, I]);
|
|
9543
|
+
ir(() => {
|
|
9533
9544
|
l === !1 && O.current.isPositioned && (O.current.isPositioned = !1, u((B) => ({
|
|
9534
9545
|
...B,
|
|
9535
9546
|
isPositioned: !1
|
|
9536
9547
|
})));
|
|
9537
9548
|
}, [l]);
|
|
9538
|
-
const
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
}), []),
|
|
9549
|
+
const A = w.useRef(!1);
|
|
9550
|
+
ir(() => (A.current = !0, () => {
|
|
9551
|
+
A.current = !1;
|
|
9552
|
+
}), []), ir(() => {
|
|
9542
9553
|
if (E && (x.current = E), S && (T.current = S), E && S) {
|
|
9543
|
-
if (
|
|
9544
|
-
return
|
|
9545
|
-
|
|
9554
|
+
if (D.current)
|
|
9555
|
+
return D.current(E, S, M);
|
|
9556
|
+
M();
|
|
9546
9557
|
}
|
|
9547
|
-
}, [E, S,
|
|
9548
|
-
const
|
|
9558
|
+
}, [E, S, M, D, P]);
|
|
9559
|
+
const V = w.useMemo(() => ({
|
|
9549
9560
|
reference: x,
|
|
9550
9561
|
floating: T,
|
|
9551
9562
|
setReference: _,
|
|
9552
9563
|
setFloating: y
|
|
9553
|
-
}), [_, y]),
|
|
9564
|
+
}), [_, y]), Y = w.useMemo(() => ({
|
|
9554
9565
|
reference: E,
|
|
9555
9566
|
floating: S
|
|
9556
9567
|
}), [E, S]), Q = w.useMemo(() => {
|
|
@@ -9559,28 +9570,28 @@ function Pw(e) {
|
|
|
9559
9570
|
left: 0,
|
|
9560
9571
|
top: 0
|
|
9561
9572
|
};
|
|
9562
|
-
if (!
|
|
9573
|
+
if (!Y.floating)
|
|
9563
9574
|
return B;
|
|
9564
|
-
const
|
|
9575
|
+
const N = Za(Y.floating, d.x), ce = Za(Y.floating, d.y);
|
|
9565
9576
|
return a ? {
|
|
9566
9577
|
...B,
|
|
9567
|
-
transform: "translate(" +
|
|
9568
|
-
...Wc(
|
|
9578
|
+
transform: "translate(" + N + "px, " + ce + "px)",
|
|
9579
|
+
...Wc(Y.floating) >= 1.5 && {
|
|
9569
9580
|
willChange: "transform"
|
|
9570
9581
|
}
|
|
9571
9582
|
} : {
|
|
9572
9583
|
position: n,
|
|
9573
|
-
left:
|
|
9584
|
+
left: N,
|
|
9574
9585
|
top: ce
|
|
9575
9586
|
};
|
|
9576
|
-
}, [n, a,
|
|
9587
|
+
}, [n, a, Y.floating, d.x, d.y]);
|
|
9577
9588
|
return w.useMemo(() => ({
|
|
9578
9589
|
...d,
|
|
9579
|
-
update:
|
|
9580
|
-
refs:
|
|
9581
|
-
elements:
|
|
9590
|
+
update: M,
|
|
9591
|
+
refs: V,
|
|
9592
|
+
elements: Y,
|
|
9582
9593
|
floatingStyles: Q
|
|
9583
|
-
}), [d,
|
|
9594
|
+
}), [d, M, V, Y, Q]);
|
|
9584
9595
|
}
|
|
9585
9596
|
const Dw = (e) => {
|
|
9586
9597
|
function t(n) {
|
|
@@ -9696,15 +9707,15 @@ var ss = "PopperContent", [Gw, Yw] = Yc(ss), el = w.forwardRef(
|
|
|
9696
9707
|
updatePositionStrategy: p = "optimized",
|
|
9697
9708
|
onPlaced: m,
|
|
9698
9709
|
...f
|
|
9699
|
-
} = e, v = Kc(ss, n), [b, _] = w.useState(null), y = Ee(t, (ie) => _(ie)), [E, S] = w.useState(null), x = Vw(E), T = x?.width ?? 0, O = x?.height ?? 0,
|
|
9700
|
-
padding:
|
|
9701
|
-
boundary:
|
|
9710
|
+
} = e, v = Kc(ss, n), [b, _] = w.useState(null), y = Ee(t, (ie) => _(ie)), [E, S] = w.useState(null), x = Vw(E), T = x?.width ?? 0, O = x?.height ?? 0, P = r + (s !== "center" ? "-" + s : ""), D = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, z = Array.isArray(l) ? l : [l], I = z.length > 0, M = {
|
|
9711
|
+
padding: D,
|
|
9712
|
+
boundary: z.filter(Kw),
|
|
9702
9713
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
9703
9714
|
altBoundary: I
|
|
9704
|
-
}, { refs:
|
|
9715
|
+
}, { refs: A, floatingStyles: V, placement: Y, isPositioned: Q, middlewareData: B } = Pw({
|
|
9705
9716
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
9706
9717
|
strategy: "fixed",
|
|
9707
|
-
placement:
|
|
9718
|
+
placement: P,
|
|
9708
9719
|
whileElementsMounted: (...ie) => fb(...ie, {
|
|
9709
9720
|
animationFrame: p === "always"
|
|
9710
9721
|
}),
|
|
@@ -9717,21 +9728,21 @@ var ss = "PopperContent", [Gw, Yw] = Yc(ss), el = w.forwardRef(
|
|
|
9717
9728
|
mainAxis: !0,
|
|
9718
9729
|
crossAxis: !1,
|
|
9719
9730
|
limiter: u === "partial" ? zw() : void 0,
|
|
9720
|
-
...
|
|
9731
|
+
...M
|
|
9721
9732
|
}),
|
|
9722
|
-
c && Fw({ ...
|
|
9733
|
+
c && Fw({ ...M }),
|
|
9723
9734
|
Zw({
|
|
9724
|
-
...
|
|
9725
|
-
apply: ({ elements: ie, rects: St, availableWidth:
|
|
9726
|
-
const { width: on, height:
|
|
9727
|
-
Dt.setProperty("--radix-popper-available-width", `${
|
|
9735
|
+
...M,
|
|
9736
|
+
apply: ({ elements: ie, rects: St, availableWidth: Zr, availableHeight: Zn }) => {
|
|
9737
|
+
const { width: on, height: Ur } = St.reference, Dt = ie.floating.style;
|
|
9738
|
+
Dt.setProperty("--radix-popper-available-width", `${Zr}px`), Dt.setProperty("--radix-popper-available-height", `${Zn}px`), Dt.setProperty("--radix-popper-anchor-width", `${on}px`), Dt.setProperty("--radix-popper-anchor-height", `${Ur}px`);
|
|
9728
9739
|
}
|
|
9729
9740
|
}),
|
|
9730
9741
|
E && Bw({ element: E, padding: a }),
|
|
9731
9742
|
qw({ arrowWidth: T, arrowHeight: O }),
|
|
9732
|
-
h && Uw({ strategy: "referenceHidden", ...
|
|
9743
|
+
h && Uw({ strategy: "referenceHidden", ...M })
|
|
9733
9744
|
]
|
|
9734
|
-
}), [
|
|
9745
|
+
}), [N, ce] = rl(Y), _e = tt(m);
|
|
9735
9746
|
yt(() => {
|
|
9736
9747
|
Q && _e?.();
|
|
9737
9748
|
}, [Q, _e]);
|
|
@@ -9741,11 +9752,11 @@ var ss = "PopperContent", [Gw, Yw] = Yc(ss), el = w.forwardRef(
|
|
|
9741
9752
|
}, [b]), /* @__PURE__ */ g(
|
|
9742
9753
|
"div",
|
|
9743
9754
|
{
|
|
9744
|
-
ref:
|
|
9755
|
+
ref: A.setFloating,
|
|
9745
9756
|
"data-radix-popper-content-wrapper": "",
|
|
9746
9757
|
style: {
|
|
9747
|
-
...
|
|
9748
|
-
transform: Q ?
|
|
9758
|
+
...V,
|
|
9759
|
+
transform: Q ? V.transform : "translate(0, -200%)",
|
|
9749
9760
|
// keep off the page when measuring
|
|
9750
9761
|
minWidth: "max-content",
|
|
9751
9762
|
zIndex: Re,
|
|
@@ -9766,7 +9777,7 @@ var ss = "PopperContent", [Gw, Yw] = Yc(ss), el = w.forwardRef(
|
|
|
9766
9777
|
Gw,
|
|
9767
9778
|
{
|
|
9768
9779
|
scope: n,
|
|
9769
|
-
placedSide:
|
|
9780
|
+
placedSide: N,
|
|
9770
9781
|
onArrowChange: S,
|
|
9771
9782
|
arrowX: He,
|
|
9772
9783
|
arrowY: at,
|
|
@@ -9774,7 +9785,7 @@ var ss = "PopperContent", [Gw, Yw] = Yc(ss), el = w.forwardRef(
|
|
|
9774
9785
|
children: /* @__PURE__ */ g(
|
|
9775
9786
|
we.div,
|
|
9776
9787
|
{
|
|
9777
|
-
"data-side":
|
|
9788
|
+
"data-side": N,
|
|
9778
9789
|
"data-align": ce,
|
|
9779
9790
|
...f,
|
|
9780
9791
|
ref: y,
|
|
@@ -9931,7 +9942,7 @@ function o_(e) {
|
|
|
9931
9942
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
9932
9943
|
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);
|
|
9933
9944
|
}
|
|
9934
|
-
var
|
|
9945
|
+
var fo = "rovingFocusGroup.onEntryFocus", s_ = { bubbles: !1, cancelable: !0 }, $n = "RovingFocusGroup", [$o, al, a_] = Fc($n), [i_, il] = Pn(
|
|
9935
9946
|
$n,
|
|
9936
9947
|
[a_]
|
|
9937
9948
|
), [c_, l_] = i_($n), cl = w.forwardRef(
|
|
@@ -9959,7 +9970,7 @@ var u_ = w.forwardRef((e, t) => {
|
|
|
9959
9970
|
return w.useEffect(() => {
|
|
9960
9971
|
const O = h.current;
|
|
9961
9972
|
if (O)
|
|
9962
|
-
return O.addEventListener(
|
|
9973
|
+
return O.addEventListener(fo, y), () => O.removeEventListener(fo, y);
|
|
9963
9974
|
}, [y]), /* @__PURE__ */ g(
|
|
9964
9975
|
c_,
|
|
9965
9976
|
{
|
|
@@ -9989,23 +10000,23 @@ var u_ = w.forwardRef((e, t) => {
|
|
|
9989
10000
|
...u,
|
|
9990
10001
|
ref: p,
|
|
9991
10002
|
style: { outline: "none", ...e.style },
|
|
9992
|
-
onMouseDown:
|
|
10003
|
+
onMouseDown: K(e.onMouseDown, () => {
|
|
9993
10004
|
S.current = !0;
|
|
9994
10005
|
}),
|
|
9995
|
-
onFocus:
|
|
9996
|
-
const
|
|
9997
|
-
if (O.target === O.currentTarget &&
|
|
9998
|
-
const
|
|
9999
|
-
if (O.currentTarget.dispatchEvent(
|
|
10000
|
-
const
|
|
10006
|
+
onFocus: K(e.onFocus, (O) => {
|
|
10007
|
+
const P = !S.current;
|
|
10008
|
+
if (O.target === O.currentTarget && P && !b) {
|
|
10009
|
+
const D = new CustomEvent(fo, s_);
|
|
10010
|
+
if (O.currentTarget.dispatchEvent(D), !D.defaultPrevented) {
|
|
10011
|
+
const z = E().filter((Y) => Y.focusable), I = z.find((Y) => Y.active), M = z.find((Y) => Y.id === f), V = [I, M, ...z].filter(
|
|
10001
10012
|
Boolean
|
|
10002
|
-
).map((
|
|
10003
|
-
dl(
|
|
10013
|
+
).map((Y) => Y.ref.current);
|
|
10014
|
+
dl(V, d);
|
|
10004
10015
|
}
|
|
10005
10016
|
}
|
|
10006
10017
|
S.current = !1;
|
|
10007
10018
|
}),
|
|
10008
|
-
onBlur:
|
|
10019
|
+
onBlur: K(e.onBlur, () => _(!1))
|
|
10009
10020
|
}
|
|
10010
10021
|
)
|
|
10011
10022
|
}
|
|
@@ -10037,11 +10048,11 @@ var u_ = w.forwardRef((e, t) => {
|
|
|
10037
10048
|
"data-orientation": d.orientation,
|
|
10038
10049
|
...a,
|
|
10039
10050
|
ref: t,
|
|
10040
|
-
onMouseDown:
|
|
10051
|
+
onMouseDown: K(e.onMouseDown, (v) => {
|
|
10041
10052
|
r ? d.onItemFocus(l) : v.preventDefault();
|
|
10042
10053
|
}),
|
|
10043
|
-
onFocus:
|
|
10044
|
-
onKeyDown:
|
|
10054
|
+
onFocus: K(e.onFocus, () => d.onItemFocus(l)),
|
|
10055
|
+
onKeyDown: K(e.onKeyDown, (v) => {
|
|
10045
10056
|
if (v.key === "Tab" && v.shiftKey) {
|
|
10046
10057
|
d.onItemShiftTab();
|
|
10047
10058
|
return;
|
|
@@ -10100,7 +10111,7 @@ var h_ = cl, g_ = ul, v_ = function(e) {
|
|
|
10100
10111
|
return null;
|
|
10101
10112
|
var t = Array.isArray(e) ? e[0] : e;
|
|
10102
10113
|
return t.ownerDocument.body;
|
|
10103
|
-
}, Lt = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakMap(), qn = {},
|
|
10114
|
+
}, Lt = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakMap(), qn = {}, po = 0, fl = function(e) {
|
|
10104
10115
|
return e && (e.host || fl(e.parentNode));
|
|
10105
10116
|
}, y_ = function(e, t) {
|
|
10106
10117
|
return t.map(function(n) {
|
|
@@ -10131,11 +10142,11 @@ var h_ = cl, g_ = ul, v_ = function(e) {
|
|
|
10131
10142
|
}
|
|
10132
10143
|
});
|
|
10133
10144
|
};
|
|
10134
|
-
return d(t), a.clear(),
|
|
10145
|
+
return d(t), a.clear(), po++, function() {
|
|
10135
10146
|
i.forEach(function(u) {
|
|
10136
10147
|
var h = Lt.get(u) - 1, p = s.get(u) - 1;
|
|
10137
10148
|
Lt.set(u, h), s.set(u, p), h || (Kn.has(u) || u.removeAttribute(r), Kn.delete(u)), p || u.removeAttribute(n);
|
|
10138
|
-
}),
|
|
10149
|
+
}), po--, po || (Lt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakMap(), qn = {});
|
|
10139
10150
|
};
|
|
10140
10151
|
}, w_ = function(e, t, n) {
|
|
10141
10152
|
n === void 0 && (n = "data-aria-hidden");
|
|
@@ -10165,8 +10176,8 @@ function __(e, t, n) {
|
|
|
10165
10176
|
(s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
|
|
10166
10177
|
return e.concat(s || Array.prototype.slice.call(t));
|
|
10167
10178
|
}
|
|
10168
|
-
var
|
|
10169
|
-
function
|
|
10179
|
+
var cr = "right-scroll-bar-position", lr = "width-before-scroll-bar", E_ = "with-scroll-bars-hidden", S_ = "--removed-body-scroll-bar-size";
|
|
10180
|
+
function mo(e, t) {
|
|
10170
10181
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
10171
10182
|
}
|
|
10172
10183
|
function C_(e, t) {
|
|
@@ -10194,7 +10205,7 @@ var x_ = typeof window < "u" ? w.useLayoutEffect : w.useEffect, Ua = /* @__PURE_
|
|
|
10194
10205
|
function T_(e, t) {
|
|
10195
10206
|
var n = C_(null, function(r) {
|
|
10196
10207
|
return e.forEach(function(o) {
|
|
10197
|
-
return
|
|
10208
|
+
return mo(o, r);
|
|
10198
10209
|
});
|
|
10199
10210
|
});
|
|
10200
10211
|
return x_(function() {
|
|
@@ -10202,9 +10213,9 @@ function T_(e, t) {
|
|
|
10202
10213
|
if (r) {
|
|
10203
10214
|
var o = new Set(r), s = new Set(e), i = n.current;
|
|
10204
10215
|
o.forEach(function(a) {
|
|
10205
|
-
s.has(a) ||
|
|
10216
|
+
s.has(a) || mo(a, null);
|
|
10206
10217
|
}), s.forEach(function(a) {
|
|
10207
|
-
o.has(a) ||
|
|
10218
|
+
o.has(a) || mo(a, i);
|
|
10208
10219
|
});
|
|
10209
10220
|
}
|
|
10210
10221
|
Ua.set(n, e);
|
|
@@ -10286,12 +10297,12 @@ ml.isSideCarExport = !0;
|
|
|
10286
10297
|
function O_(e, t) {
|
|
10287
10298
|
return e.useMedium(t), ml;
|
|
10288
10299
|
}
|
|
10289
|
-
var hl = R_(),
|
|
10290
|
-
},
|
|
10300
|
+
var hl = R_(), ho = function() {
|
|
10301
|
+
}, $r = w.forwardRef(function(e, t) {
|
|
10291
10302
|
var n = w.useRef(null), r = w.useState({
|
|
10292
|
-
onScrollCapture:
|
|
10293
|
-
onWheelCapture:
|
|
10294
|
-
onTouchMoveCapture:
|
|
10303
|
+
onScrollCapture: ho,
|
|
10304
|
+
onWheelCapture: ho,
|
|
10305
|
+
onTouchMoveCapture: ho
|
|
10295
10306
|
}), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, l = e.removeScrollBar, d = e.enabled, u = e.shards, h = e.sideCar, p = e.noRelative, m = e.noIsolation, f = e.inert, v = e.allowPinchZoom, b = e.as, _ = b === void 0 ? "div" : b, y = e.gapMode, E = pl(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, x = T_([n, t]), T = Je(Je({}, E), o);
|
|
10296
10307
|
return w.createElement(
|
|
10297
10308
|
w.Fragment,
|
|
@@ -10300,14 +10311,14 @@ var hl = R_(), mo = function() {
|
|
|
10300
10311
|
i ? w.cloneElement(w.Children.only(a), Je(Je({}, T), { ref: x })) : w.createElement(_, Je({}, T, { className: c, ref: x }), a)
|
|
10301
10312
|
);
|
|
10302
10313
|
});
|
|
10303
|
-
|
|
10314
|
+
$r.defaultProps = {
|
|
10304
10315
|
enabled: !0,
|
|
10305
10316
|
removeScrollBar: !0,
|
|
10306
10317
|
inert: !1
|
|
10307
10318
|
};
|
|
10308
|
-
|
|
10309
|
-
fullWidth:
|
|
10310
|
-
zeroRight:
|
|
10319
|
+
$r.classNames = {
|
|
10320
|
+
fullWidth: lr,
|
|
10321
|
+
zeroRight: cr
|
|
10311
10322
|
};
|
|
10312
10323
|
var N_ = function() {
|
|
10313
10324
|
if (typeof __webpack_nonce__ < "u")
|
|
@@ -10358,11 +10369,11 @@ var D_ = function() {
|
|
|
10358
10369
|
top: 0,
|
|
10359
10370
|
right: 0,
|
|
10360
10371
|
gap: 0
|
|
10361
|
-
},
|
|
10372
|
+
}, go = function(e) {
|
|
10362
10373
|
return parseInt(e || "", 10) || 0;
|
|
10363
10374
|
}, z_ = function(e) {
|
|
10364
10375
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
10365
|
-
return [
|
|
10376
|
+
return [go(n), go(r), go(o)];
|
|
10366
10377
|
}, F_ = function(e) {
|
|
10367
10378
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
10368
10379
|
return L_;
|
|
@@ -10397,19 +10408,19 @@ var D_ = function() {
|
|
|
10397
10408
|
].filter(Boolean).join(""), `
|
|
10398
10409
|
}
|
|
10399
10410
|
|
|
10400
|
-
.`).concat(
|
|
10411
|
+
.`).concat(cr, ` {
|
|
10401
10412
|
right: `).concat(a, "px ").concat(r, `;
|
|
10402
10413
|
}
|
|
10403
10414
|
|
|
10404
|
-
.`).concat(
|
|
10415
|
+
.`).concat(lr, ` {
|
|
10405
10416
|
margin-right: `).concat(a, "px ").concat(r, `;
|
|
10406
10417
|
}
|
|
10407
10418
|
|
|
10408
|
-
.`).concat(
|
|
10419
|
+
.`).concat(cr, " .").concat(cr, ` {
|
|
10409
10420
|
right: 0 `).concat(r, `;
|
|
10410
10421
|
}
|
|
10411
10422
|
|
|
10412
|
-
.`).concat(
|
|
10423
|
+
.`).concat(lr, " .").concat(lr, ` {
|
|
10413
10424
|
margin-right: 0 `).concat(r, `;
|
|
10414
10425
|
}
|
|
10415
10426
|
|
|
@@ -10546,13 +10557,13 @@ function eE(e) {
|
|
|
10546
10557
|
var b = Qn(f), _ = n.current, y = "deltaX" in f ? f.deltaX : _[0] - b[0], E = "deltaY" in f ? f.deltaY : _[1] - b[1], S, x = f.target, T = Math.abs(y) > Math.abs(E) ? "h" : "v";
|
|
10547
10558
|
if ("touches" in f && T === "h" && x.type === "range")
|
|
10548
10559
|
return !1;
|
|
10549
|
-
var O = window.getSelection(),
|
|
10550
|
-
if (
|
|
10560
|
+
var O = window.getSelection(), P = O && O.anchorNode, D = P ? P === x || P.contains(x) : !1;
|
|
10561
|
+
if (D)
|
|
10551
10562
|
return !1;
|
|
10552
|
-
var
|
|
10553
|
-
if (!
|
|
10563
|
+
var z = ja(T, x);
|
|
10564
|
+
if (!z)
|
|
10554
10565
|
return !0;
|
|
10555
|
-
if (
|
|
10566
|
+
if (z ? S = T : (S = T === "v" ? "h" : "v", z = ja(T, x)), !z)
|
|
10556
10567
|
return !1;
|
|
10557
10568
|
if (!r.current && "changedTouches" in f && (y || E) && (r.current = S), !S)
|
|
10558
10569
|
return !0;
|
|
@@ -10615,9 +10626,9 @@ function tE(e) {
|
|
|
10615
10626
|
}
|
|
10616
10627
|
const nE = O_(hl, eE);
|
|
10617
10628
|
var wl = w.forwardRef(function(e, t) {
|
|
10618
|
-
return w.createElement(
|
|
10629
|
+
return w.createElement($r, Je({}, e, { ref: t, sideCar: nE }));
|
|
10619
10630
|
});
|
|
10620
|
-
wl.classNames =
|
|
10631
|
+
wl.classNames = $r.classNames;
|
|
10621
10632
|
var zo = ["Enter", " "], rE = ["ArrowDown", "PageUp", "Home"], _l = ["ArrowUp", "PageDown", "End"], oE = [...rE, ..._l], sE = {
|
|
10622
10633
|
ltr: [...zo, "ArrowRight"],
|
|
10623
10634
|
rtl: [...zo, "ArrowLeft"]
|
|
@@ -10693,7 +10704,7 @@ var ke = "MenuContent", [fE, cs] = Pt(ke), Al = w.forwardRef(
|
|
|
10693
10704
|
trapFocus: n.open,
|
|
10694
10705
|
disableOutsidePointerEvents: n.open,
|
|
10695
10706
|
disableOutsideScroll: !0,
|
|
10696
|
-
onFocusOutside:
|
|
10707
|
+
onFocusOutside: K(
|
|
10697
10708
|
e.onFocusOutside,
|
|
10698
10709
|
(s) => s.preventDefault(),
|
|
10699
10710
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -10715,7 +10726,7 @@ var ke = "MenuContent", [fE, cs] = Pt(ke), Al = w.forwardRef(
|
|
|
10715
10726
|
onDismiss: () => n.onOpenChange(!1)
|
|
10716
10727
|
}
|
|
10717
10728
|
);
|
|
10718
|
-
}), hE = /* @__PURE__ */
|
|
10729
|
+
}), hE = /* @__PURE__ */ wr("MenuContent.ScrollLock"), ls = w.forwardRef(
|
|
10719
10730
|
(e, t) => {
|
|
10720
10731
|
const {
|
|
10721
10732
|
__scopeMenu: n,
|
|
@@ -10732,48 +10743,48 @@ var ke = "MenuContent", [fE, cs] = Pt(ke), Al = w.forwardRef(
|
|
|
10732
10743
|
onDismiss: p,
|
|
10733
10744
|
disableOutsideScroll: m,
|
|
10734
10745
|
...f
|
|
10735
|
-
} = e, v = Et(ke, n), b = Fn(ke, n), _ = zn(n), y = Sl(n), E = iE(n), [S, x] = w.useState(null), T = w.useRef(null), O = Ee(t, T, v.onContentChange),
|
|
10736
|
-
const ce =
|
|
10746
|
+
} = e, v = Et(ke, n), b = Fn(ke, n), _ = zn(n), y = Sl(n), E = iE(n), [S, x] = w.useState(null), T = w.useRef(null), O = Ee(t, T, v.onContentChange), P = w.useRef(0), D = w.useRef(""), z = w.useRef(0), I = w.useRef(null), M = w.useRef("right"), A = w.useRef(0), V = m ? wl : w.Fragment, Y = m ? { as: hE, allowPinchZoom: !0 } : void 0, Q = (N) => {
|
|
10747
|
+
const ce = D.current + N, _e = E().filter((ie) => !ie.disabled), He = document.activeElement, at = _e.find((ie) => ie.ref.current === He)?.textValue, me = _e.map((ie) => ie.textValue), Re = IE(me, ce, at), Ce = _e.find((ie) => ie.textValue === Re)?.ref.current;
|
|
10737
10748
|
(function ie(St) {
|
|
10738
|
-
|
|
10749
|
+
D.current = St, window.clearTimeout(P.current), St !== "" && (P.current = window.setTimeout(() => ie(""), 1e3));
|
|
10739
10750
|
})(ce), Ce && setTimeout(() => Ce.focus());
|
|
10740
10751
|
};
|
|
10741
|
-
w.useEffect(() => () => window.clearTimeout(
|
|
10742
|
-
const B = w.useCallback((
|
|
10752
|
+
w.useEffect(() => () => window.clearTimeout(P.current), []), Ew();
|
|
10753
|
+
const B = w.useCallback((N) => M.current === I.current?.side && RE(N, I.current?.area), []);
|
|
10743
10754
|
return /* @__PURE__ */ g(
|
|
10744
10755
|
fE,
|
|
10745
10756
|
{
|
|
10746
10757
|
scope: n,
|
|
10747
|
-
searchRef:
|
|
10758
|
+
searchRef: D,
|
|
10748
10759
|
onItemEnter: w.useCallback(
|
|
10749
|
-
(
|
|
10750
|
-
B(
|
|
10760
|
+
(N) => {
|
|
10761
|
+
B(N) && N.preventDefault();
|
|
10751
10762
|
},
|
|
10752
10763
|
[B]
|
|
10753
10764
|
),
|
|
10754
10765
|
onItemLeave: w.useCallback(
|
|
10755
|
-
(
|
|
10756
|
-
B(
|
|
10766
|
+
(N) => {
|
|
10767
|
+
B(N) || (T.current?.focus(), x(null));
|
|
10757
10768
|
},
|
|
10758
10769
|
[B]
|
|
10759
10770
|
),
|
|
10760
10771
|
onTriggerLeave: w.useCallback(
|
|
10761
|
-
(
|
|
10762
|
-
B(
|
|
10772
|
+
(N) => {
|
|
10773
|
+
B(N) && N.preventDefault();
|
|
10763
10774
|
},
|
|
10764
10775
|
[B]
|
|
10765
10776
|
),
|
|
10766
|
-
pointerGraceTimerRef:
|
|
10767
|
-
onPointerGraceIntentChange: w.useCallback((
|
|
10768
|
-
I.current =
|
|
10777
|
+
pointerGraceTimerRef: z,
|
|
10778
|
+
onPointerGraceIntentChange: w.useCallback((N) => {
|
|
10779
|
+
I.current = N;
|
|
10769
10780
|
}, []),
|
|
10770
|
-
children: /* @__PURE__ */ g(
|
|
10781
|
+
children: /* @__PURE__ */ g(V, { ...Y, children: /* @__PURE__ */ g(
|
|
10771
10782
|
Hc,
|
|
10772
10783
|
{
|
|
10773
10784
|
asChild: !0,
|
|
10774
10785
|
trapped: o,
|
|
10775
|
-
onMountAutoFocus:
|
|
10776
|
-
|
|
10786
|
+
onMountAutoFocus: K(s, (N) => {
|
|
10787
|
+
N.preventDefault(), T.current?.focus({ preventScroll: !0 });
|
|
10777
10788
|
}),
|
|
10778
10789
|
onUnmountAutoFocus: i,
|
|
10779
10790
|
children: /* @__PURE__ */ g(
|
|
@@ -10796,8 +10807,8 @@ var ke = "MenuContent", [fE, cs] = Pt(ke), Al = w.forwardRef(
|
|
|
10796
10807
|
loop: r,
|
|
10797
10808
|
currentTabStopId: S,
|
|
10798
10809
|
onCurrentTabStopIdChange: x,
|
|
10799
|
-
onEntryFocus:
|
|
10800
|
-
b.isUsingKeyboardRef.current ||
|
|
10810
|
+
onEntryFocus: K(c, (N) => {
|
|
10811
|
+
b.isUsingKeyboardRef.current || N.preventDefault();
|
|
10801
10812
|
}),
|
|
10802
10813
|
preventScrollOnEntryFocus: !0,
|
|
10803
10814
|
children: /* @__PURE__ */ g(
|
|
@@ -10812,25 +10823,25 @@ var ke = "MenuContent", [fE, cs] = Pt(ke), Al = w.forwardRef(
|
|
|
10812
10823
|
...f,
|
|
10813
10824
|
ref: O,
|
|
10814
10825
|
style: { outline: "none", ...f.style },
|
|
10815
|
-
onKeyDown:
|
|
10816
|
-
const _e =
|
|
10817
|
-
_e && (
|
|
10826
|
+
onKeyDown: K(f.onKeyDown, (N) => {
|
|
10827
|
+
const _e = N.target.closest("[data-radix-menu-content]") === N.currentTarget, He = N.ctrlKey || N.altKey || N.metaKey, at = N.key.length === 1;
|
|
10828
|
+
_e && (N.key === "Tab" && N.preventDefault(), !He && at && Q(N.key));
|
|
10818
10829
|
const me = T.current;
|
|
10819
|
-
if (
|
|
10820
|
-
|
|
10830
|
+
if (N.target !== me || !oE.includes(N.key)) return;
|
|
10831
|
+
N.preventDefault();
|
|
10821
10832
|
const Ce = E().filter((ie) => !ie.disabled).map((ie) => ie.ref.current);
|
|
10822
|
-
_l.includes(
|
|
10833
|
+
_l.includes(N.key) && Ce.reverse(), xE(Ce);
|
|
10823
10834
|
}),
|
|
10824
|
-
onBlur:
|
|
10825
|
-
|
|
10835
|
+
onBlur: K(e.onBlur, (N) => {
|
|
10836
|
+
N.currentTarget.contains(N.target) || (window.clearTimeout(P.current), D.current = "");
|
|
10826
10837
|
}),
|
|
10827
|
-
onPointerMove:
|
|
10838
|
+
onPointerMove: K(
|
|
10828
10839
|
e.onPointerMove,
|
|
10829
|
-
Tn((
|
|
10830
|
-
const ce =
|
|
10831
|
-
if (
|
|
10832
|
-
const He =
|
|
10833
|
-
|
|
10840
|
+
Tn((N) => {
|
|
10841
|
+
const ce = N.target, _e = A.current !== N.clientX;
|
|
10842
|
+
if (N.currentTarget.contains(ce) && _e) {
|
|
10843
|
+
const He = N.clientX > A.current ? "right" : "left";
|
|
10844
|
+
M.current = He, A.current = N.clientX;
|
|
10834
10845
|
}
|
|
10835
10846
|
})
|
|
10836
10847
|
)
|
|
@@ -10861,9 +10872,9 @@ var vE = "MenuLabel", Rl = w.forwardRef(
|
|
|
10861
10872
|
}
|
|
10862
10873
|
);
|
|
10863
10874
|
Rl.displayName = vE;
|
|
10864
|
-
var
|
|
10875
|
+
var Er = "MenuItem", Wa = "menu.itemSelect", Lr = w.forwardRef(
|
|
10865
10876
|
(e, t) => {
|
|
10866
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, s = w.useRef(null), i = Fn(
|
|
10877
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, s = w.useRef(null), i = Fn(Er, e.__scopeMenu), a = cs(Er, e.__scopeMenu), c = Ee(t, s), l = w.useRef(!1), d = () => {
|
|
10867
10878
|
const u = s.current;
|
|
10868
10879
|
if (!n && u) {
|
|
10869
10880
|
const h = new CustomEvent(Wa, { bubbles: !0, cancelable: !0 });
|
|
@@ -10876,14 +10887,14 @@ var _r = "MenuItem", Wa = "menu.itemSelect", $r = w.forwardRef(
|
|
|
10876
10887
|
...o,
|
|
10877
10888
|
ref: c,
|
|
10878
10889
|
disabled: n,
|
|
10879
|
-
onClick:
|
|
10890
|
+
onClick: K(e.onClick, d),
|
|
10880
10891
|
onPointerDown: (u) => {
|
|
10881
10892
|
e.onPointerDown?.(u), l.current = !0;
|
|
10882
10893
|
},
|
|
10883
|
-
onPointerUp:
|
|
10894
|
+
onPointerUp: K(e.onPointerUp, (u) => {
|
|
10884
10895
|
l.current || u.currentTarget?.click();
|
|
10885
10896
|
}),
|
|
10886
|
-
onKeyDown:
|
|
10897
|
+
onKeyDown: K(e.onKeyDown, (u) => {
|
|
10887
10898
|
const h = a.searchRef.current !== "";
|
|
10888
10899
|
n || h && u.key === " " || zo.includes(u.key) && (u.currentTarget.click(), u.preventDefault());
|
|
10889
10900
|
})
|
|
@@ -10891,10 +10902,10 @@ var _r = "MenuItem", Wa = "menu.itemSelect", $r = w.forwardRef(
|
|
|
10891
10902
|
);
|
|
10892
10903
|
}
|
|
10893
10904
|
);
|
|
10894
|
-
|
|
10905
|
+
Lr.displayName = Er;
|
|
10895
10906
|
var Ol = w.forwardRef(
|
|
10896
10907
|
(e, t) => {
|
|
10897
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = cs(
|
|
10908
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = cs(Er, n), a = Sl(n), c = w.useRef(null), l = Ee(t, c), [d, u] = w.useState(!1), [h, p] = w.useState("");
|
|
10898
10909
|
return w.useEffect(() => {
|
|
10899
10910
|
const m = c.current;
|
|
10900
10911
|
m && p((m.textContent ?? "").trim());
|
|
@@ -10913,18 +10924,18 @@ var Ol = w.forwardRef(
|
|
|
10913
10924
|
"data-disabled": r ? "" : void 0,
|
|
10914
10925
|
...s,
|
|
10915
10926
|
ref: l,
|
|
10916
|
-
onPointerMove:
|
|
10927
|
+
onPointerMove: K(
|
|
10917
10928
|
e.onPointerMove,
|
|
10918
10929
|
Tn((m) => {
|
|
10919
10930
|
r ? i.onItemLeave(m) : (i.onItemEnter(m), m.defaultPrevented || m.currentTarget.focus({ preventScroll: !0 }));
|
|
10920
10931
|
})
|
|
10921
10932
|
),
|
|
10922
|
-
onPointerLeave:
|
|
10933
|
+
onPointerLeave: K(
|
|
10923
10934
|
e.onPointerLeave,
|
|
10924
10935
|
Tn((m) => i.onItemLeave(m))
|
|
10925
10936
|
),
|
|
10926
|
-
onFocus:
|
|
10927
|
-
onBlur:
|
|
10937
|
+
onFocus: K(e.onFocus, () => u(!0)),
|
|
10938
|
+
onBlur: K(e.onBlur, () => u(!1))
|
|
10928
10939
|
}
|
|
10929
10940
|
) })
|
|
10930
10941
|
}
|
|
@@ -10934,16 +10945,16 @@ var Ol = w.forwardRef(
|
|
|
10934
10945
|
(e, t) => {
|
|
10935
10946
|
const { checked: n = !1, onCheckedChange: r, ...o } = e;
|
|
10936
10947
|
return /* @__PURE__ */ g($l, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ g(
|
|
10937
|
-
|
|
10948
|
+
Lr,
|
|
10938
10949
|
{
|
|
10939
10950
|
role: "menuitemcheckbox",
|
|
10940
|
-
"aria-checked":
|
|
10951
|
+
"aria-checked": Sr(n) ? "mixed" : n,
|
|
10941
10952
|
...o,
|
|
10942
10953
|
ref: t,
|
|
10943
10954
|
"data-state": ps(n),
|
|
10944
|
-
onSelect:
|
|
10955
|
+
onSelect: K(
|
|
10945
10956
|
o.onSelect,
|
|
10946
|
-
() => r?.(
|
|
10957
|
+
() => r?.(Sr(n) ? !0 : !n),
|
|
10947
10958
|
{ checkForDefaultPrevented: !1 }
|
|
10948
10959
|
)
|
|
10949
10960
|
}
|
|
@@ -10966,14 +10977,14 @@ var Pl = "MenuRadioItem", Dl = w.forwardRef(
|
|
|
10966
10977
|
(e, t) => {
|
|
10967
10978
|
const { value: n, ...r } = e, o = wE(Pl, e.__scopeMenu), s = n === o.value;
|
|
10968
10979
|
return /* @__PURE__ */ g($l, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ g(
|
|
10969
|
-
|
|
10980
|
+
Lr,
|
|
10970
10981
|
{
|
|
10971
10982
|
role: "menuitemradio",
|
|
10972
10983
|
"aria-checked": s,
|
|
10973
10984
|
...r,
|
|
10974
10985
|
ref: t,
|
|
10975
10986
|
"data-state": ps(s),
|
|
10976
|
-
onSelect:
|
|
10987
|
+
onSelect: K(
|
|
10977
10988
|
r.onSelect,
|
|
10978
10989
|
() => o.onValueChange?.(n),
|
|
10979
10990
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -10992,7 +11003,7 @@ var ds = "MenuItemIndicator", [$l, _E] = Pt(
|
|
|
10992
11003
|
return /* @__PURE__ */ g(
|
|
10993
11004
|
Dn,
|
|
10994
11005
|
{
|
|
10995
|
-
present: r ||
|
|
11006
|
+
present: r || Sr(s.checked) || s.checked === !0,
|
|
10996
11007
|
children: /* @__PURE__ */ g(
|
|
10997
11008
|
we.span,
|
|
10998
11009
|
{
|
|
@@ -11072,11 +11083,11 @@ var dn = "MenuSubTrigger", Bl = w.forwardRef(
|
|
|
11072
11083
|
"aria-controls": o.contentId,
|
|
11073
11084
|
"data-state": Vl(n.open),
|
|
11074
11085
|
...e,
|
|
11075
|
-
ref:
|
|
11086
|
+
ref: Dr(t, o.onTriggerChange),
|
|
11076
11087
|
onClick: (u) => {
|
|
11077
11088
|
e.onClick?.(u), !(e.disabled || u.defaultPrevented) && (u.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
11078
11089
|
},
|
|
11079
|
-
onPointerMove:
|
|
11090
|
+
onPointerMove: K(
|
|
11080
11091
|
e.onPointerMove,
|
|
11081
11092
|
Tn((u) => {
|
|
11082
11093
|
s.onItemEnter(u), !u.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
@@ -11084,7 +11095,7 @@ var dn = "MenuSubTrigger", Bl = w.forwardRef(
|
|
|
11084
11095
|
}, 100));
|
|
11085
11096
|
})
|
|
11086
11097
|
),
|
|
11087
|
-
onPointerLeave:
|
|
11098
|
+
onPointerLeave: K(
|
|
11088
11099
|
e.onPointerLeave,
|
|
11089
11100
|
Tn((u) => {
|
|
11090
11101
|
d();
|
|
@@ -11112,7 +11123,7 @@ var dn = "MenuSubTrigger", Bl = w.forwardRef(
|
|
|
11112
11123
|
}
|
|
11113
11124
|
})
|
|
11114
11125
|
),
|
|
11115
|
-
onKeyDown:
|
|
11126
|
+
onKeyDown: K(e.onKeyDown, (u) => {
|
|
11116
11127
|
const h = s.searchRef.current !== "";
|
|
11117
11128
|
e.disabled || h && u.key === " " || sE[r.dir].includes(u.key) && (n.onOpenChange(!0), n.content?.focus(), u.preventDefault());
|
|
11118
11129
|
})
|
|
@@ -11140,13 +11151,13 @@ var jl = "MenuSubContent", Hl = w.forwardRef(
|
|
|
11140
11151
|
i.isUsingKeyboardRef.current && c.current?.focus(), d.preventDefault();
|
|
11141
11152
|
},
|
|
11142
11153
|
onCloseAutoFocus: (d) => d.preventDefault(),
|
|
11143
|
-
onFocusOutside:
|
|
11154
|
+
onFocusOutside: K(e.onFocusOutside, (d) => {
|
|
11144
11155
|
d.target !== a.trigger && s.onOpenChange(!1);
|
|
11145
11156
|
}),
|
|
11146
|
-
onEscapeKeyDown:
|
|
11157
|
+
onEscapeKeyDown: K(e.onEscapeKeyDown, (d) => {
|
|
11147
11158
|
i.onClose(), d.preventDefault();
|
|
11148
11159
|
}),
|
|
11149
|
-
onKeyDown:
|
|
11160
|
+
onKeyDown: K(e.onKeyDown, (d) => {
|
|
11150
11161
|
const u = d.currentTarget.contains(d.target), h = aE[i.dir].includes(d.key);
|
|
11151
11162
|
u && h && (s.onOpenChange(!1), a.trigger?.focus(), d.preventDefault());
|
|
11152
11163
|
})
|
|
@@ -11158,11 +11169,11 @@ Hl.displayName = jl;
|
|
|
11158
11169
|
function Vl(e) {
|
|
11159
11170
|
return e ? "open" : "closed";
|
|
11160
11171
|
}
|
|
11161
|
-
function
|
|
11172
|
+
function Sr(e) {
|
|
11162
11173
|
return e === "indeterminate";
|
|
11163
11174
|
}
|
|
11164
11175
|
function ps(e) {
|
|
11165
|
-
return
|
|
11176
|
+
return Sr(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
11166
11177
|
}
|
|
11167
11178
|
function xE(e) {
|
|
11168
11179
|
const t = document.activeElement;
|
|
@@ -11198,10 +11209,10 @@ function RE(e, t) {
|
|
|
11198
11209
|
function Tn(e) {
|
|
11199
11210
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
11200
11211
|
}
|
|
11201
|
-
var OE = xl, NE = as, ME = Il, kE = Al, PE = us, DE = Rl, $E =
|
|
11202
|
-
|
|
11212
|
+
var OE = xl, NE = as, ME = Il, kE = Al, PE = us, DE = Rl, $E = Lr, LE = Nl, zE = kl, FE = Dl, ZE = Ll, UE = zl, BE = Fl, jE = Ul, HE = Bl, VE = Hl, zr = "DropdownMenu", [WE] = Pn(
|
|
11213
|
+
zr,
|
|
11203
11214
|
[El]
|
|
11204
|
-
), ge = El(), [GE, Wl] = WE(
|
|
11215
|
+
), ge = El(), [GE, Wl] = WE(zr), Gl = (e) => {
|
|
11205
11216
|
const {
|
|
11206
11217
|
__scopeDropdownMenu: t,
|
|
11207
11218
|
children: n,
|
|
@@ -11214,7 +11225,7 @@ var OE = xl, NE = as, ME = Il, kE = Al, PE = us, DE = Rl, $E = $r, LE = Nl, zE =
|
|
|
11214
11225
|
prop: o,
|
|
11215
11226
|
defaultProp: s ?? !1,
|
|
11216
11227
|
onChange: i,
|
|
11217
|
-
caller:
|
|
11228
|
+
caller: zr
|
|
11218
11229
|
});
|
|
11219
11230
|
return /* @__PURE__ */ g(
|
|
11220
11231
|
GE,
|
|
@@ -11231,7 +11242,7 @@ var OE = xl, NE = as, ME = Il, kE = Al, PE = us, DE = Rl, $E = $r, LE = Nl, zE =
|
|
|
11231
11242
|
}
|
|
11232
11243
|
);
|
|
11233
11244
|
};
|
|
11234
|
-
Gl.displayName =
|
|
11245
|
+
Gl.displayName = zr;
|
|
11235
11246
|
var Yl = "DropdownMenuTrigger", Jl = w.forwardRef(
|
|
11236
11247
|
(e, t) => {
|
|
11237
11248
|
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Wl(Yl, n), i = ge(n);
|
|
@@ -11247,11 +11258,11 @@ var Yl = "DropdownMenuTrigger", Jl = w.forwardRef(
|
|
|
11247
11258
|
"data-disabled": r ? "" : void 0,
|
|
11248
11259
|
disabled: r,
|
|
11249
11260
|
...o,
|
|
11250
|
-
ref:
|
|
11251
|
-
onPointerDown:
|
|
11261
|
+
ref: Dr(t, s.triggerRef),
|
|
11262
|
+
onPointerDown: K(e.onPointerDown, (a) => {
|
|
11252
11263
|
!r && a.button === 0 && a.ctrlKey === !1 && (s.onOpenToggle(), s.open || a.preventDefault());
|
|
11253
11264
|
}),
|
|
11254
|
-
onKeyDown:
|
|
11265
|
+
onKeyDown: K(e.onKeyDown, (a) => {
|
|
11255
11266
|
r || (["Enter", " "].includes(a.key) && s.onOpenToggle(), a.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(a.key) && a.preventDefault());
|
|
11256
11267
|
})
|
|
11257
11268
|
}
|
|
@@ -11275,10 +11286,10 @@ var ql = "DropdownMenuContent", Xl = w.forwardRef(
|
|
|
11275
11286
|
...s,
|
|
11276
11287
|
...r,
|
|
11277
11288
|
ref: t,
|
|
11278
|
-
onCloseAutoFocus:
|
|
11289
|
+
onCloseAutoFocus: K(e.onCloseAutoFocus, (a) => {
|
|
11279
11290
|
i.current || o.triggerRef.current?.focus(), i.current = !1, a.preventDefault();
|
|
11280
11291
|
}),
|
|
11281
|
-
onInteractOutside:
|
|
11292
|
+
onInteractOutside: K(e.onInteractOutside, (a) => {
|
|
11282
11293
|
const c = a.detail.originalEvent, l = c.button === 0 && c.ctrlKey === !0, d = c.button === 2 || l;
|
|
11283
11294
|
(!o.modal || d) && (i.current = !0);
|
|
11284
11295
|
}),
|
|
@@ -11393,17 +11404,17 @@ const Ya = (e) => {
|
|
|
11393
11404
|
return t.displayName || t.name || "Component";
|
|
11394
11405
|
}
|
|
11395
11406
|
return "Element";
|
|
11396
|
-
}, _S = "z-100 rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2 prose prose-dark", ES = "z-[60] rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2 mx-3", SS = $("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"), CS = (e) => e ? e.startsWith("top") ? "top" : e.startsWith("left") ? "left" : e.startsWith("right") ? "right" : "bottom" : "bottom", xS = (e) => !e || e.endsWith("-start") ? "start" : e.endsWith("-end") ? "end" : "center",
|
|
11407
|
+
}, _S = "z-100 rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2 prose prose-dark", ES = "z-[60] rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2 mx-3", SS = $("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"), CS = (e) => e ? e.startsWith("top") ? "top" : e.startsWith("left") ? "left" : e.startsWith("right") ? "right" : "bottom" : "bottom", xS = (e) => !e || e.endsWith("-start") ? "start" : e.endsWith("-end") ? "end" : "center", Fr = ({ 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 }) => {
|
|
11397
11408
|
const [l, d] = Z(!1), [u, h] = Z(void 0), p = Ya(e) === "Button" || Ya(e) === "ButtonIcon", m = p ? {
|
|
11398
11409
|
noInternalClick: p,
|
|
11399
11410
|
focusMode: i,
|
|
11400
11411
|
mode: s
|
|
11401
|
-
} : {}, f =
|
|
11412
|
+
} : {}, f = G(null), v = e ? /* @__PURE__ */ li(e, {
|
|
11402
11413
|
...m,
|
|
11403
11414
|
"aria-label": n,
|
|
11404
11415
|
ref: f
|
|
11405
11416
|
}) : null;
|
|
11406
|
-
return /* @__PURE__ */
|
|
11417
|
+
return /* @__PURE__ */ L(pS, {
|
|
11407
11418
|
onOpenChange: (_) => {
|
|
11408
11419
|
if (d(_), o?.(_), _ && f.current) {
|
|
11409
11420
|
const y = f.current.closest("dialog");
|
|
@@ -11437,14 +11448,14 @@ const Ya = (e) => {
|
|
|
11437
11448
|
]
|
|
11438
11449
|
});
|
|
11439
11450
|
};
|
|
11440
|
-
|
|
11441
|
-
const su = ({ label: e, icon: t, children: n, disabled: r = !1, sideOffset: o = 2, alignOffset: s = -4 }) => /* @__PURE__ */
|
|
11451
|
+
Fr.displayName = "DropdownMenu";
|
|
11452
|
+
const su = ({ label: e, icon: t, children: n, disabled: r = !1, sideOffset: o = 2, alignOffset: s = -4 }) => /* @__PURE__ */ L(yS, {
|
|
11442
11453
|
children: [
|
|
11443
|
-
/* @__PURE__ */
|
|
11454
|
+
/* @__PURE__ */ L(bS, {
|
|
11444
11455
|
className: SS,
|
|
11445
11456
|
disabled: r,
|
|
11446
11457
|
children: [
|
|
11447
|
-
/* @__PURE__ */
|
|
11458
|
+
/* @__PURE__ */ L("span", {
|
|
11448
11459
|
className: "flex items-center",
|
|
11449
11460
|
children: [
|
|
11450
11461
|
t,
|
|
@@ -11481,9 +11492,9 @@ const au = ({ className: e, ...t }) => {
|
|
|
11481
11492
|
});
|
|
11482
11493
|
};
|
|
11483
11494
|
au.displayName = "DropdownMenuSeparator";
|
|
11484
|
-
const
|
|
11495
|
+
const Cr = ({ className: e, icon: t, children: n, ...r }) => {
|
|
11485
11496
|
const o = $(e, "pt-1 pb-2 mb-2", "text-sm text-copy-dark font-bold", "border-b border-border-medium", t && "flex items-center");
|
|
11486
|
-
return /* @__PURE__ */
|
|
11497
|
+
return /* @__PURE__ */ L(gS, {
|
|
11487
11498
|
className: o,
|
|
11488
11499
|
...r,
|
|
11489
11500
|
children: [
|
|
@@ -11495,7 +11506,7 @@ const Sr = ({ className: e, icon: t, children: n, ...r }) => {
|
|
|
11495
11506
|
]
|
|
11496
11507
|
});
|
|
11497
11508
|
};
|
|
11498
|
-
|
|
11509
|
+
Cr.displayName = "DropdownMenuGroupLabel";
|
|
11499
11510
|
const TS = $("flex flex-row items-center", "w-full", "m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1", "rounded-md border border-transparent", "text-left text-base 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-disabled:cursor-not-allowed data-disabled:text-copy-medium"), ze = ({ label: e, disabled: t, icon: n, raw: r = !1, children: o, ignoreClick: s = !1, selected: i, onSelect: a, onClick: c, onFocus: l, onMouseEnter: d, ...u }) => {
|
|
11500
11511
|
let h = "";
|
|
11501
11512
|
if (r && o)
|
|
@@ -11512,7 +11523,7 @@ const TS = $("flex flex-row items-center", "w-full", "m-0 first:mt-0 mt-2 sm:mt-
|
|
|
11512
11523
|
const p = $(TS, {
|
|
11513
11524
|
"bg-none": !t && !i
|
|
11514
11525
|
});
|
|
11515
|
-
return /* @__PURE__ */
|
|
11526
|
+
return /* @__PURE__ */ L(Ga, {
|
|
11516
11527
|
className: p,
|
|
11517
11528
|
disabled: t,
|
|
11518
11529
|
onSelect: (f) => {
|
|
@@ -11563,8 +11574,8 @@ const IS = (e) => {
|
|
|
11563
11574
|
prompt: f
|
|
11564
11575
|
}
|
|
11565
11576
|
});
|
|
11566
|
-
}, p = u && d && d.tags && IS(d.tags), m = /* @__PURE__ */
|
|
11567
|
-
|
|
11577
|
+
}, p = u && d && d.tags && IS(d.tags), m = /* @__PURE__ */ L(
|
|
11578
|
+
Fr,
|
|
11568
11579
|
{
|
|
11569
11580
|
mode: "light",
|
|
11570
11581
|
focusMode: "light",
|
|
@@ -11587,7 +11598,7 @@ const IS = (e) => {
|
|
|
11587
11598
|
),
|
|
11588
11599
|
defaultPlacement: t,
|
|
11589
11600
|
children: [
|
|
11590
|
-
/* @__PURE__ */ g(
|
|
11601
|
+
/* @__PURE__ */ g(Cr, { children: "Prompts" }),
|
|
11591
11602
|
p && d.tags.map((f) => {
|
|
11592
11603
|
let v = null;
|
|
11593
11604
|
switch (f.slot) {
|
|
@@ -11618,7 +11629,7 @@ const IS = (e) => {
|
|
|
11618
11629
|
}
|
|
11619
11630
|
);
|
|
11620
11631
|
return p ? /* @__PURE__ */ g(
|
|
11621
|
-
|
|
11632
|
+
kr,
|
|
11622
11633
|
{
|
|
11623
11634
|
label: "Prompts",
|
|
11624
11635
|
mode: "light",
|
|
@@ -11652,7 +11663,7 @@ const IS = (e) => {
|
|
|
11652
11663
|
}, b = (_) => {
|
|
11653
11664
|
_ && _.preventDefault(), !t && !h ? l(!0) : n > 0 ? u(!d) : v();
|
|
11654
11665
|
};
|
|
11655
|
-
return /* @__PURE__ */
|
|
11666
|
+
return /* @__PURE__ */ L(rt, { children: [
|
|
11656
11667
|
d && /* @__PURE__ */ g(
|
|
11657
11668
|
Qt,
|
|
11658
11669
|
{
|
|
@@ -11686,7 +11697,7 @@ const IS = (e) => {
|
|
|
11686
11697
|
cancelAction: "Cancel",
|
|
11687
11698
|
title: "Reasoning Chat"
|
|
11688
11699
|
},
|
|
11689
|
-
children: /* @__PURE__ */
|
|
11700
|
+
children: /* @__PURE__ */ L("ul", { children: [
|
|
11690
11701
|
/* @__PURE__ */ g("li", { children: 'Your chat session will use "reasoning" model capabilities.' }),
|
|
11691
11702
|
/* @__PURE__ */ g("li", { children: "Response times will increase. Be patient." }),
|
|
11692
11703
|
/* @__PURE__ */ g("li", { children: "If you refresh your browser, the setting will revert to the default (non-reasoning) chat." })
|
|
@@ -11784,12 +11795,12 @@ const IS = (e) => {
|
|
|
11784
11795
|
if (!(!t || c)) {
|
|
11785
11796
|
p(!0);
|
|
11786
11797
|
try {
|
|
11787
|
-
const
|
|
11788
|
-
accessToken:
|
|
11789
|
-
type:
|
|
11798
|
+
const z = await r(), M = (await Hr({
|
|
11799
|
+
accessToken: z,
|
|
11800
|
+
type: Vr.SHARE_STATUS,
|
|
11790
11801
|
params: { chatId: t }
|
|
11791
11802
|
})).data;
|
|
11792
|
-
|
|
11803
|
+
M?.success && M.shared && M.url && l(M.url);
|
|
11793
11804
|
} catch {
|
|
11794
11805
|
} finally {
|
|
11795
11806
|
p(!1);
|
|
@@ -11801,17 +11812,17 @@ const IS = (e) => {
|
|
|
11801
11812
|
if (!(!t || !n || c)) {
|
|
11802
11813
|
u(!0), b(null);
|
|
11803
11814
|
try {
|
|
11804
|
-
const
|
|
11805
|
-
accessToken:
|
|
11806
|
-
type:
|
|
11815
|
+
const z = await r(), M = (await Hr({
|
|
11816
|
+
accessToken: z,
|
|
11817
|
+
type: Vr.SHARE_CHAT,
|
|
11807
11818
|
params: {
|
|
11808
11819
|
chatId: t,
|
|
11809
11820
|
messages: n.map(kS)
|
|
11810
11821
|
}
|
|
11811
11822
|
})).data;
|
|
11812
|
-
|
|
11823
|
+
M?.success && M.url ? (l(M.url), await E.invalidateQueries({
|
|
11813
11824
|
queryKey: [gs]
|
|
11814
|
-
})) : b(
|
|
11825
|
+
})) : b(M?.error || he.SHARE.ERROR_MESSAGE);
|
|
11815
11826
|
} catch {
|
|
11816
11827
|
b(he.SHARE.ERROR_MESSAGE);
|
|
11817
11828
|
} finally {
|
|
@@ -11826,20 +11837,20 @@ const IS = (e) => {
|
|
|
11826
11837
|
const I = document.createElement("textarea");
|
|
11827
11838
|
I.value = c, document.body.appendChild(I), I.select(), document.execCommand("copy"), document.body.removeChild(I), y(!0), setTimeout(() => y(!1), 2e3);
|
|
11828
11839
|
}
|
|
11829
|
-
}, [c]),
|
|
11840
|
+
}, [c]), P = H(() => {
|
|
11830
11841
|
c && NS(c);
|
|
11831
|
-
}, [c]),
|
|
11842
|
+
}, [c]), D = H(async () => {
|
|
11832
11843
|
if (!(!t || !c)) {
|
|
11833
11844
|
f(!0), b(null);
|
|
11834
11845
|
try {
|
|
11835
|
-
const
|
|
11836
|
-
accessToken:
|
|
11837
|
-
type:
|
|
11846
|
+
const z = await r(), M = (await Hr({
|
|
11847
|
+
accessToken: z,
|
|
11848
|
+
type: Vr.DELETE_SHARED_CHAT,
|
|
11838
11849
|
params: { chatId: t }
|
|
11839
11850
|
})).data;
|
|
11840
|
-
|
|
11851
|
+
M?.success !== !1 ? (l(null), await E.invalidateQueries({
|
|
11841
11852
|
queryKey: [gs]
|
|
11842
|
-
})) : b(
|
|
11853
|
+
})) : b(M?.error || he.SHARE.DELETE_SHARE_FAILED);
|
|
11843
11854
|
} catch {
|
|
11844
11855
|
b(he.SHARE.DELETE_SHARE_FAILED);
|
|
11845
11856
|
} finally {
|
|
@@ -11847,8 +11858,8 @@ const IS = (e) => {
|
|
|
11847
11858
|
}
|
|
11848
11859
|
}
|
|
11849
11860
|
}, [t, r, E, c]);
|
|
11850
|
-
return /* @__PURE__ */
|
|
11851
|
-
/* @__PURE__ */
|
|
11861
|
+
return /* @__PURE__ */ L(rt, { children: [
|
|
11862
|
+
/* @__PURE__ */ L(
|
|
11852
11863
|
Qt,
|
|
11853
11864
|
{
|
|
11854
11865
|
maxHeight: "large",
|
|
@@ -11868,9 +11879,9 @@ const IS = (e) => {
|
|
|
11868
11879
|
c && /* @__PURE__ */ g("p", { children: he.SHARE.CONFIRM_MESSAGE_ALREADY_SHARED }),
|
|
11869
11880
|
h && !c && /* @__PURE__ */ g("p", { children: he.SHARE.CHECKING_MESSAGE }),
|
|
11870
11881
|
v && /* @__PURE__ */ g("p", { className: "mt-2 text-copy-error-light", children: v }),
|
|
11871
|
-
c && /* @__PURE__ */
|
|
11882
|
+
c && /* @__PURE__ */ L("div", { className: "mt-4 space-y-3", children: [
|
|
11872
11883
|
/* @__PURE__ */ g("pre", { className: "text-xs font-mono whitespace-pre-wrap break-all", children: c }),
|
|
11873
|
-
/* @__PURE__ */
|
|
11884
|
+
/* @__PURE__ */ L("div", { className: "flex flex-wrap gap-2", children: [
|
|
11874
11885
|
/* @__PURE__ */ g(
|
|
11875
11886
|
fn,
|
|
11876
11887
|
{
|
|
@@ -11888,7 +11899,7 @@ const IS = (e) => {
|
|
|
11888
11899
|
focusMode: "light",
|
|
11889
11900
|
size: "small",
|
|
11890
11901
|
variant: "secondary",
|
|
11891
|
-
onClick:
|
|
11902
|
+
onClick: P,
|
|
11892
11903
|
children: he.SHARE.OPEN_IN_NEW_TAB
|
|
11893
11904
|
}
|
|
11894
11905
|
),
|
|
@@ -11899,7 +11910,7 @@ const IS = (e) => {
|
|
|
11899
11910
|
focusMode: "light",
|
|
11900
11911
|
size: "small",
|
|
11901
11912
|
variant: "danger",
|
|
11902
|
-
onClick:
|
|
11913
|
+
onClick: D,
|
|
11903
11914
|
disabled: m,
|
|
11904
11915
|
children: he.SHARE.DELETE_SHARE
|
|
11905
11916
|
}
|
|
@@ -11962,7 +11973,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
11962
11973
|
...LS,
|
|
11963
11974
|
...zS,
|
|
11964
11975
|
...$S
|
|
11965
|
-
], Fo = 400 * 1024, FS = "text/plain",
|
|
11976
|
+
], Fo = 400 * 1024, FS = "text/plain", ur = (e) => {
|
|
11966
11977
|
if (e === 0)
|
|
11967
11978
|
return "0 Bytes";
|
|
11968
11979
|
const t = 1024, n = ["Bytes", "KB", "MB", "GB"], r = Math.floor(Math.log(e) / Math.log(t));
|
|
@@ -12014,16 +12025,16 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12014
12025
|
}), GS = ({
|
|
12015
12026
|
files: e,
|
|
12016
12027
|
clearFile: t
|
|
12017
|
-
}) => e && e.length > 0 && /* @__PURE__ */
|
|
12018
|
-
/* @__PURE__ */ g("div", { className: "flex flex-wrap gap-2", children: Array.from(e).map((n, r) => /* @__PURE__ */
|
|
12028
|
+
}) => e && e.length > 0 && /* @__PURE__ */ L("div", { className: "px-4 py-2", children: [
|
|
12029
|
+
/* @__PURE__ */ g("div", { className: "flex flex-wrap gap-2", children: Array.from(e).map((n, r) => /* @__PURE__ */ L(
|
|
12019
12030
|
"div",
|
|
12020
12031
|
{
|
|
12021
12032
|
className: "inline-flex items-center bg-surface-dark text-copy-lighter text-xs px-2 py-1 rounded-md",
|
|
12022
12033
|
children: [
|
|
12023
12034
|
/* @__PURE__ */ g("span", { className: "max-w-37 truncate", children: n.name }),
|
|
12024
|
-
/* @__PURE__ */
|
|
12035
|
+
/* @__PURE__ */ L("span", { className: "mx-1 text-copy-medium", children: [
|
|
12025
12036
|
"(",
|
|
12026
|
-
|
|
12037
|
+
ur(n.size),
|
|
12027
12038
|
")"
|
|
12028
12039
|
] }),
|
|
12029
12040
|
/* @__PURE__ */ g(
|
|
@@ -12043,12 +12054,12 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12043
12054
|
},
|
|
12044
12055
|
`${n.name}-${r}`
|
|
12045
12056
|
)) }),
|
|
12046
|
-
/* @__PURE__ */
|
|
12057
|
+
/* @__PURE__ */ L("div", { className: "text-xs text-copy-medium mt-1 pl-1", children: [
|
|
12047
12058
|
"Total: ",
|
|
12048
|
-
|
|
12059
|
+
ur(iu(Array.from(e))),
|
|
12049
12060
|
" /",
|
|
12050
12061
|
" ",
|
|
12051
|
-
|
|
12062
|
+
ur(Fo)
|
|
12052
12063
|
] })
|
|
12053
12064
|
] }), ms = 1200, cu = 200 * 1024, YS = 0.85, Ka = 0.5, JS = 0.1, KS = ["image/jpeg", "image/webp"], qS = ["image/png", "image/jpeg", "image/webp"], lu = (e) => qS.includes(e.type), XS = (e, t, n = ms) => {
|
|
12054
12065
|
if (e <= n && t <= n)
|
|
@@ -12136,12 +12147,12 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12136
12147
|
} = ue(Be), { state: E, dispatch: S } = ue(Uo), { data: x, isSuccess: T } = bt({
|
|
12137
12148
|
user: e?.username,
|
|
12138
12149
|
getAccessToken: t
|
|
12139
|
-
}), O =
|
|
12150
|
+
}), O = G(null), P = G(null), D = G(!1), z = G(0), I = G(0), M = G(null), A = G(null), V = Cd(), [Y, Q] = je(), B = WS({
|
|
12140
12151
|
oledMode: u,
|
|
12141
|
-
placeholderColor:
|
|
12142
|
-
}),
|
|
12143
|
-
onFinish: (
|
|
12144
|
-
const de =
|
|
12152
|
+
placeholderColor: Y(Q.Placeholder)
|
|
12153
|
+
}), N = r && x?.showReasoningButton, { setMessages: ce, status: _e, id: He, sendMessage: at, input: me, setInput: Re, messages: Ce } = _t({
|
|
12154
|
+
onFinish: (W) => {
|
|
12155
|
+
const de = W.message?.metadata;
|
|
12145
12156
|
de?.tokenUsage && h({
|
|
12146
12157
|
type: mc,
|
|
12147
12158
|
payload: {
|
|
@@ -12150,13 +12161,13 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12150
12161
|
});
|
|
12151
12162
|
}
|
|
12152
12163
|
}), ie = DS(!!Ce.length), St = H(
|
|
12153
|
-
(
|
|
12154
|
-
Re(
|
|
12164
|
+
(W) => {
|
|
12165
|
+
Re(W.target.value);
|
|
12155
12166
|
},
|
|
12156
12167
|
[Re]
|
|
12157
|
-
),
|
|
12158
|
-
(
|
|
12159
|
-
if (
|
|
12168
|
+
), Zr = H(
|
|
12169
|
+
(W, fe) => {
|
|
12170
|
+
if (W.preventDefault(), me.trim()) {
|
|
12160
12171
|
const de = {
|
|
12161
12172
|
/**
|
|
12162
12173
|
* Include dynamic values that change during runtime. Static values like
|
|
@@ -12188,26 +12199,26 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12188
12199
|
o
|
|
12189
12200
|
]
|
|
12190
12201
|
), Zn = H(
|
|
12191
|
-
async (
|
|
12192
|
-
|
|
12202
|
+
async (W) => {
|
|
12203
|
+
W === iC && h({
|
|
12193
12204
|
type: Ot,
|
|
12194
12205
|
payload: {
|
|
12195
12206
|
loading: !1,
|
|
12196
12207
|
streaming: !1
|
|
12197
12208
|
}
|
|
12198
|
-
}),
|
|
12209
|
+
}), W === uC && h({
|
|
12199
12210
|
type: Ot,
|
|
12200
12211
|
payload: {
|
|
12201
12212
|
loading: !0,
|
|
12202
12213
|
streaming: !1
|
|
12203
12214
|
}
|
|
12204
|
-
}),
|
|
12215
|
+
}), W === cC && h({
|
|
12205
12216
|
type: Ot,
|
|
12206
12217
|
payload: {
|
|
12207
12218
|
loading: !1,
|
|
12208
12219
|
streaming: !0
|
|
12209
12220
|
}
|
|
12210
|
-
}),
|
|
12221
|
+
}), W === lC && setTimeout(() => {
|
|
12211
12222
|
f || (h({
|
|
12212
12223
|
type: Ot,
|
|
12213
12224
|
payload: {
|
|
@@ -12232,40 +12243,40 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12232
12243
|
x?.sendOnEnter !== void 0 && d(x.sendOnEnter);
|
|
12233
12244
|
}, [x]);
|
|
12234
12245
|
const on = H(() => {
|
|
12235
|
-
if (!
|
|
12246
|
+
if (!A.current)
|
|
12236
12247
|
return;
|
|
12237
|
-
|
|
12238
|
-
const
|
|
12239
|
-
if (
|
|
12240
|
-
|
|
12248
|
+
A.current.style.height = "auto";
|
|
12249
|
+
const W = A.current.scrollHeight;
|
|
12250
|
+
if (W > qa) {
|
|
12251
|
+
A.current.style.height = `${qa}px`, A.current.style.overflowY = "scroll";
|
|
12241
12252
|
return;
|
|
12242
12253
|
}
|
|
12243
|
-
|
|
12244
|
-
}, []),
|
|
12245
|
-
if (
|
|
12246
|
-
const fe = s ? Array.from(s) : [], de = Array.from(
|
|
12254
|
+
A.current.style.height = `${W}px`, A.current.style.overflowY = "hidden";
|
|
12255
|
+
}, []), Ur = async (W) => {
|
|
12256
|
+
if (W.preventDefault(), W.target.files && W.target.files.length > 0) {
|
|
12257
|
+
const fe = s ? Array.from(s) : [], de = Array.from(W.target.files), $t = [...fe];
|
|
12247
12258
|
let Ct = !1;
|
|
12248
12259
|
for (const Pe of de) {
|
|
12249
|
-
const
|
|
12250
|
-
It.includes(
|
|
12251
|
-
(
|
|
12260
|
+
const Br = "." + Pe.name.split(".").pop()?.toLowerCase();
|
|
12261
|
+
It.includes(Br) ? $t.some(
|
|
12262
|
+
(jr) => jr.name === Pe.name && jr.size === Pe.size && jr.lastModified === Pe.lastModified
|
|
12252
12263
|
) || $t.push(Pe) : Ct = !0;
|
|
12253
12264
|
}
|
|
12254
|
-
if (
|
|
12265
|
+
if (P.current && (P.current.value = ""), Ct) {
|
|
12255
12266
|
const Pe = It.length > 1 ? `${It.slice(0, -1).join(", ")} and ${It[It.length - 1]}` : It[0];
|
|
12256
12267
|
O.current = `Only ${Pe} files are allowed.`, c(!0);
|
|
12257
12268
|
return;
|
|
12258
12269
|
}
|
|
12259
12270
|
const xt = await rC($t);
|
|
12260
12271
|
if (iu(xt) > Fo) {
|
|
12261
|
-
O.current = `Total file size exceeds the limit of ${
|
|
12272
|
+
O.current = `Total file size exceeds the limit of ${ur(
|
|
12262
12273
|
Fo
|
|
12263
12274
|
)}.`, c(!0);
|
|
12264
12275
|
return;
|
|
12265
12276
|
}
|
|
12266
12277
|
if (xt.length > 0) {
|
|
12267
12278
|
const Pe = new DataTransfer();
|
|
12268
|
-
xt.forEach((
|
|
12279
|
+
xt.forEach((Br) => Pe.items.add(Br)), i(Pe.files), h({
|
|
12269
12280
|
type: _n,
|
|
12270
12281
|
payload: {
|
|
12271
12282
|
attachments: Pe.files.length
|
|
@@ -12274,23 +12285,23 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12274
12285
|
}
|
|
12275
12286
|
}
|
|
12276
12287
|
}, Dt = () => {
|
|
12277
|
-
|
|
12278
|
-
}, gu = (
|
|
12288
|
+
P.current && P.current.click();
|
|
12289
|
+
}, gu = (W) => {
|
|
12279
12290
|
if (!s)
|
|
12280
12291
|
return;
|
|
12281
12292
|
const fe = new DataTransfer();
|
|
12282
12293
|
Array.from(s).forEach((de) => {
|
|
12283
|
-
de !==
|
|
12294
|
+
de !== W && fe.items.add(de);
|
|
12284
12295
|
}), fe.files.length === 0 ? i(null) : i(fe.files), h({
|
|
12285
12296
|
type: _n,
|
|
12286
12297
|
payload: {
|
|
12287
12298
|
attachments: fe.files.length
|
|
12288
12299
|
}
|
|
12289
|
-
}),
|
|
12300
|
+
}), P.current && (P.current.value = "");
|
|
12290
12301
|
}, vu = H(() => {
|
|
12291
|
-
|
|
12292
|
-
}, []), hs = async (
|
|
12293
|
-
|
|
12302
|
+
P.current && (P.current.value = ""), i(null);
|
|
12303
|
+
}, []), hs = async (W) => {
|
|
12304
|
+
W.preventDefault(), er(A);
|
|
12294
12305
|
const fe = await t();
|
|
12295
12306
|
let de;
|
|
12296
12307
|
if (s && s.length > 0) {
|
|
@@ -12299,7 +12310,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12299
12310
|
), Ct = new DataTransfer();
|
|
12300
12311
|
$t.forEach((xt) => Ct.items.add(xt)), de = Ct.files;
|
|
12301
12312
|
}
|
|
12302
|
-
|
|
12313
|
+
Zr(W, {
|
|
12303
12314
|
headers: {
|
|
12304
12315
|
"Content-Type": "application/json",
|
|
12305
12316
|
authorization: `Bearer ${fe}`,
|
|
@@ -12310,46 +12321,46 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12310
12321
|
},
|
|
12311
12322
|
files: de
|
|
12312
12323
|
}), vu();
|
|
12313
|
-
}, yu = (
|
|
12314
|
-
on(), St(
|
|
12324
|
+
}, yu = (W) => {
|
|
12325
|
+
on(), St(W);
|
|
12315
12326
|
};
|
|
12316
12327
|
Ko([
|
|
12317
12328
|
[
|
|
12318
12329
|
"mod+K",
|
|
12319
12330
|
() => {
|
|
12320
|
-
|
|
12331
|
+
A && A.current && !qe() && A.current.focus();
|
|
12321
12332
|
}
|
|
12322
12333
|
]
|
|
12323
12334
|
]), U(() => {
|
|
12324
12335
|
if (E.prompt !== "") {
|
|
12325
|
-
const
|
|
12326
|
-
|
|
12336
|
+
const W = E.prompt.endsWith(":") && !E.prompt.endsWith(": ") ? E.prompt + " " : E.prompt;
|
|
12337
|
+
W.indexOf(ws) !== -1 ? navigator.clipboard.readText().then((de) => {
|
|
12327
12338
|
const Ct = de.startsWith("http://") || de.startsWith("https://") ? de : `"""${de}"""`;
|
|
12328
|
-
I.current = Date.now(), Re(
|
|
12329
|
-
}) : (I.current = Date.now(), Re(
|
|
12339
|
+
I.current = Date.now(), Re(W.replace(ws, Ct));
|
|
12340
|
+
}) : (I.current = Date.now(), Re(W)), !qe() && A.current && A.current.focus(), S({
|
|
12330
12341
|
type: ei
|
|
12331
12342
|
});
|
|
12332
12343
|
}
|
|
12333
12344
|
}, [E, S, Re]), U(() => {
|
|
12334
|
-
if (
|
|
12335
|
-
|
|
12345
|
+
if (D.current === !1) {
|
|
12346
|
+
D.current = !0, !me && er(A);
|
|
12336
12347
|
return;
|
|
12337
12348
|
}
|
|
12338
|
-
v > 0 && v !==
|
|
12339
|
-
if (
|
|
12340
|
-
const
|
|
12341
|
-
!me && !
|
|
12349
|
+
v > 0 && v !== z.current ? (z.current = v, setTimeout(() => {
|
|
12350
|
+
if (A.current) {
|
|
12351
|
+
const W = Date.now() - I.current < 600;
|
|
12352
|
+
!me && !W && er(A), A.current.focus();
|
|
12342
12353
|
}
|
|
12343
|
-
}, oC)) : m === !1 && !me && (er(
|
|
12354
|
+
}, oC)) : m === !1 && !me && (er(A), !qe() && A.current && A.current.focus());
|
|
12344
12355
|
}, [v, m, me]), U(() => {
|
|
12345
12356
|
Date.now() - I.current < 200 && me && requestAnimationFrame(() => {
|
|
12346
12357
|
on();
|
|
12347
12358
|
});
|
|
12348
12359
|
}, [me, on]), U(() => {
|
|
12349
|
-
b === 0 && (
|
|
12360
|
+
b === 0 && (P.current && (P.current.value = ""), i(null));
|
|
12350
12361
|
}, [b]);
|
|
12351
|
-
const bu = Vt(Bt.ADDON.SHARE_CHAT), wu = Ce && Ce.some((
|
|
12352
|
-
return /* @__PURE__ */
|
|
12362
|
+
const bu = Vt(Bt.ADDON.SHARE_CHAT), wu = Ce && Ce.some((W) => W.role === fr) && Ce.some((W) => W.role === Gt), _u = bu && T && x?.allowChatSharing && wu;
|
|
12363
|
+
return /* @__PURE__ */ L(rt, { children: [
|
|
12353
12364
|
/* @__PURE__ */ g(
|
|
12354
12365
|
Qt,
|
|
12355
12366
|
{
|
|
@@ -12366,15 +12377,15 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12366
12377
|
children: /* @__PURE__ */ g("p", { className: "m-0", children: O.current })
|
|
12367
12378
|
}
|
|
12368
12379
|
),
|
|
12369
|
-
/* @__PURE__ */ g("div", { className: B.wrapper, ref:
|
|
12370
|
-
/* @__PURE__ */ g("div", { id:
|
|
12371
|
-
/* @__PURE__ */
|
|
12380
|
+
/* @__PURE__ */ g("div", { className: B.wrapper, ref: M, children: /* @__PURE__ */ L("form", { onSubmit: hs, children: [
|
|
12381
|
+
/* @__PURE__ */ g("div", { id: V, className: "sr-only", children: ui }),
|
|
12382
|
+
/* @__PURE__ */ L("div", { className: "relative pb-3 sm:pb-0", children: [
|
|
12372
12383
|
/* @__PURE__ */ g(
|
|
12373
12384
|
"textarea",
|
|
12374
12385
|
{
|
|
12375
12386
|
required: !0,
|
|
12376
12387
|
rows: du,
|
|
12377
|
-
ref:
|
|
12388
|
+
ref: A,
|
|
12378
12389
|
placeholder: ie,
|
|
12379
12390
|
translate: "no",
|
|
12380
12391
|
onChange: yu,
|
|
@@ -12383,15 +12394,15 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12383
12394
|
[l ? "enter" : "mod+Enter", hs]
|
|
12384
12395
|
]),
|
|
12385
12396
|
className: B.textArea,
|
|
12386
|
-
"aria-labelledby":
|
|
12397
|
+
"aria-labelledby": V
|
|
12387
12398
|
}
|
|
12388
12399
|
),
|
|
12389
12400
|
/* @__PURE__ */ g(
|
|
12390
12401
|
"input",
|
|
12391
12402
|
{
|
|
12392
12403
|
type: "file",
|
|
12393
|
-
ref:
|
|
12394
|
-
onChange:
|
|
12404
|
+
ref: P,
|
|
12405
|
+
onChange: Ur,
|
|
12395
12406
|
className: "hidden",
|
|
12396
12407
|
multiple: !0,
|
|
12397
12408
|
accept: It.join(","),
|
|
@@ -12400,14 +12411,14 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12400
12411
|
)
|
|
12401
12412
|
] }),
|
|
12402
12413
|
/* @__PURE__ */ g(GS, { files: s, clearFile: gu }),
|
|
12403
|
-
/* @__PURE__ */
|
|
12414
|
+
/* @__PURE__ */ L("div", { className: "p-2 flex items-center", children: [
|
|
12404
12415
|
/* @__PURE__ */ g(OS, { className: "order-7 ml-auto" }),
|
|
12405
12416
|
/* @__PURE__ */ g(
|
|
12406
12417
|
Rb,
|
|
12407
12418
|
{
|
|
12408
12419
|
className: $("order-1 sm:mr-2", {
|
|
12409
|
-
"mr-3":
|
|
12410
|
-
"mr-4": !
|
|
12420
|
+
"mr-3": N,
|
|
12421
|
+
"mr-4": !N
|
|
12411
12422
|
})
|
|
12412
12423
|
}
|
|
12413
12424
|
),
|
|
@@ -12415,8 +12426,8 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12415
12426
|
AS,
|
|
12416
12427
|
{
|
|
12417
12428
|
className: $("order-2 sm:mr-2", {
|
|
12418
|
-
"mr-3":
|
|
12419
|
-
"mr-4": !
|
|
12429
|
+
"mr-3": N,
|
|
12430
|
+
"mr-4": !N
|
|
12420
12431
|
})
|
|
12421
12432
|
}
|
|
12422
12433
|
),
|
|
@@ -12424,19 +12435,19 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12424
12435
|
Ab,
|
|
12425
12436
|
{
|
|
12426
12437
|
className: $("order-3 sm:mr-2", {
|
|
12427
|
-
"mr-3":
|
|
12428
|
-
"mr-4": !
|
|
12438
|
+
"mr-3": N,
|
|
12439
|
+
"mr-4": !N
|
|
12429
12440
|
}),
|
|
12430
12441
|
onClick: Dt
|
|
12431
12442
|
}
|
|
12432
12443
|
),
|
|
12433
|
-
|
|
12444
|
+
N && /* @__PURE__ */ g(RS, { className: $("order-4 mr-3 sm:mr-2") }),
|
|
12434
12445
|
/* @__PURE__ */ g(
|
|
12435
12446
|
nw,
|
|
12436
12447
|
{
|
|
12437
12448
|
className: $("order-5 mr-3 sm:mr-2", {
|
|
12438
|
-
"mr-3":
|
|
12439
|
-
"mr-4": !
|
|
12449
|
+
"mr-3": N,
|
|
12450
|
+
"mr-4": !N
|
|
12440
12451
|
})
|
|
12441
12452
|
}
|
|
12442
12453
|
),
|
|
@@ -12444,8 +12455,8 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12444
12455
|
PS,
|
|
12445
12456
|
{
|
|
12446
12457
|
className: $("order-6 mr-3 sm:mr-2", {
|
|
12447
|
-
"mr-3":
|
|
12448
|
-
"mr-4": !
|
|
12458
|
+
"mr-3": N,
|
|
12459
|
+
"mr-4": !N
|
|
12449
12460
|
}),
|
|
12450
12461
|
chatId: He,
|
|
12451
12462
|
messages: Ce,
|
|
@@ -12465,7 +12476,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12465
12476
|
() => _s[Math.floor(Math.random() * _s.length)]
|
|
12466
12477
|
), l = Me(() => qe(), []), d = Me(() => af(), []), { messages: u } = _t(), [h, p] = di(), [m, f] = je(), v = gy(d), { height: b } = fy(), { height: _ } = py(), y = d ? 0 : b - _, E = Me(() => {
|
|
12467
12478
|
const S = l ? Mu : d ? ku : si;
|
|
12468
|
-
return l ? y > 70 && y < 500 ?
|
|
12479
|
+
return l ? y > 70 && y < 500 ? Wr / 2 : S : d ? v ? Wr : S : y > 0 && y < 100 ? Wr : S;
|
|
12469
12480
|
}, [y, l, d, v]);
|
|
12470
12481
|
return U(() => {
|
|
12471
12482
|
o !== p.height && a({
|
|
@@ -12478,11 +12489,11 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12478
12489
|
if (!h || !h.current)
|
|
12479
12490
|
return;
|
|
12480
12491
|
const S = h?.current?.style.getPropertyValue(tr);
|
|
12481
|
-
if (s ===
|
|
12492
|
+
if (s === _o && (t && !n || r) && S !== `${E}px` && (h.current.style.setProperty(
|
|
12482
12493
|
tr,
|
|
12483
12494
|
`${E}px`
|
|
12484
12495
|
), a({
|
|
12485
|
-
type:
|
|
12496
|
+
type: Yr,
|
|
12486
12497
|
payload: {
|
|
12487
12498
|
footerPosition: pn,
|
|
12488
12499
|
footerOffset: E
|
|
@@ -12491,7 +12502,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12491
12502
|
tr,
|
|
12492
12503
|
`${E}px`
|
|
12493
12504
|
), a({
|
|
12494
|
-
type:
|
|
12505
|
+
type: Yr,
|
|
12495
12506
|
payload: {
|
|
12496
12507
|
footerPosition: pn,
|
|
12497
12508
|
footerOffset: E
|
|
@@ -12502,9 +12513,9 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12502
12513
|
tr,
|
|
12503
12514
|
`${x}px`
|
|
12504
12515
|
), a({
|
|
12505
|
-
type:
|
|
12516
|
+
type: Yr,
|
|
12506
12517
|
payload: {
|
|
12507
|
-
footerPosition:
|
|
12518
|
+
footerPosition: _o,
|
|
12508
12519
|
footerOffset: Number(x)
|
|
12509
12520
|
}
|
|
12510
12521
|
}));
|
|
@@ -12533,7 +12544,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12533
12544
|
"transition-all duration-300 ease-in-out": d
|
|
12534
12545
|
}
|
|
12535
12546
|
),
|
|
12536
|
-
children: /* @__PURE__ */
|
|
12547
|
+
children: /* @__PURE__ */ L("div", { className: yo({ fullScreen: i }), children: [
|
|
12537
12548
|
/* @__PURE__ */ g(dC, {}),
|
|
12538
12549
|
/* @__PURE__ */ g(
|
|
12539
12550
|
"div",
|
|
@@ -12548,7 +12559,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12548
12559
|
] })
|
|
12549
12560
|
}
|
|
12550
12561
|
);
|
|
12551
|
-
},
|
|
12562
|
+
}, vo = [
|
|
12552
12563
|
{
|
|
12553
12564
|
id: Du,
|
|
12554
12565
|
label: "OpenAI",
|
|
@@ -12581,14 +12592,14 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12581
12592
|
getAccessToken: s
|
|
12582
12593
|
}), _ = Me(() => {
|
|
12583
12594
|
if (vs(c, l)) {
|
|
12584
|
-
const I = Pu(c),
|
|
12585
|
-
(
|
|
12586
|
-
|
|
12595
|
+
const I = Pu(c), M = vo.filter(
|
|
12596
|
+
(A) => I.includes(
|
|
12597
|
+
A.id
|
|
12587
12598
|
)
|
|
12588
12599
|
);
|
|
12589
|
-
return
|
|
12600
|
+
return M.length > 0 ? M : vo;
|
|
12590
12601
|
}
|
|
12591
|
-
return
|
|
12602
|
+
return vo;
|
|
12592
12603
|
}, [c, l]), y = Me(() => vs(c, l) ? zu(c) : /* @__PURE__ */ new Map(), [c, l]), E = Me(() => {
|
|
12593
12604
|
if (!b?.useNestedModelSelection)
|
|
12594
12605
|
return !1;
|
|
@@ -12612,18 +12623,18 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12612
12623
|
});
|
|
12613
12624
|
} catch {
|
|
12614
12625
|
}
|
|
12615
|
-
}, x = async (I,
|
|
12626
|
+
}, x = async (I, M) => {
|
|
12616
12627
|
try {
|
|
12617
|
-
if (r(ht()), o([]), I !== b?.provider ||
|
|
12628
|
+
if (r(ht()), o([]), I !== b?.provider || M !== b?.model) {
|
|
12618
12629
|
await ys({
|
|
12619
12630
|
provider: I,
|
|
12620
|
-
model:
|
|
12631
|
+
model: M,
|
|
12621
12632
|
accessToken: await s(),
|
|
12622
12633
|
username: i?.username || ""
|
|
12623
12634
|
}), v();
|
|
12624
|
-
const
|
|
12635
|
+
const A = Gr[M] || M;
|
|
12625
12636
|
await Ia(
|
|
12626
|
-
`${Es} ${I} (${
|
|
12637
|
+
`${Es} ${I} (${A})`,
|
|
12627
12638
|
{
|
|
12628
12639
|
containerId: "toggle-provider"
|
|
12629
12640
|
}
|
|
@@ -12639,8 +12650,8 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12639
12650
|
}
|
|
12640
12651
|
}, T = b && f, O = T && _.find(
|
|
12641
12652
|
(I) => b.provider === I.id
|
|
12642
|
-
)?.icon || _[0]?.icon,
|
|
12643
|
-
|
|
12653
|
+
)?.icon || _[0]?.icon, P = Me(() => !b?.useNestedModelSelection || !b?.model || !c || !oi(b.model, c) ? null : Gr[b.model] || b.model, [b?.useNestedModelSelection, b?.model, c]), D = /* @__PURE__ */ g(rt, { children: /* @__PURE__ */ L(
|
|
12654
|
+
Fr,
|
|
12644
12655
|
{
|
|
12645
12656
|
mode: "light",
|
|
12646
12657
|
focusMode: "light",
|
|
@@ -12665,12 +12676,12 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12665
12676
|
),
|
|
12666
12677
|
defaultPlacement: "top-start",
|
|
12667
12678
|
children: [
|
|
12668
|
-
/* @__PURE__ */ g(
|
|
12679
|
+
/* @__PURE__ */ g(Cr, { children: "Providers" }),
|
|
12669
12680
|
T && _.map((I) => {
|
|
12670
|
-
const
|
|
12671
|
-
return E &&
|
|
12672
|
-
/* @__PURE__ */
|
|
12673
|
-
|
|
12681
|
+
const M = y.get(I.id) || [];
|
|
12682
|
+
return E && M.length > 1 ? /* @__PURE__ */ L(su, { label: I.label, children: [
|
|
12683
|
+
/* @__PURE__ */ L(
|
|
12684
|
+
Cr,
|
|
12674
12685
|
{
|
|
12675
12686
|
...I.icon && !qe() && { icon: /* @__PURE__ */ g(I.icon, {}) },
|
|
12676
12687
|
children: [
|
|
@@ -12679,14 +12690,14 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12679
12690
|
]
|
|
12680
12691
|
}
|
|
12681
12692
|
),
|
|
12682
|
-
|
|
12693
|
+
M.map((V) => /* @__PURE__ */ g(
|
|
12683
12694
|
ze,
|
|
12684
12695
|
{
|
|
12685
|
-
selected: b.provider === I.id && b.model ===
|
|
12686
|
-
label:
|
|
12687
|
-
onClick: () => x(I.id,
|
|
12696
|
+
selected: b.provider === I.id && b.model === V,
|
|
12697
|
+
label: Gr[V] || V,
|
|
12698
|
+
onClick: () => x(I.id, V)
|
|
12688
12699
|
},
|
|
12689
|
-
|
|
12700
|
+
V
|
|
12690
12701
|
))
|
|
12691
12702
|
] }, I.id) : /* @__PURE__ */ g(
|
|
12692
12703
|
ze,
|
|
@@ -12702,63 +12713,63 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12702
12713
|
]
|
|
12703
12714
|
}
|
|
12704
12715
|
) });
|
|
12705
|
-
return T ? /* @__PURE__ */
|
|
12716
|
+
return T ? /* @__PURE__ */ L("div", { className: "flex items-center", children: [
|
|
12706
12717
|
/* @__PURE__ */ g(
|
|
12707
|
-
|
|
12718
|
+
kr,
|
|
12708
12719
|
{
|
|
12709
12720
|
label: "Toggle Providers",
|
|
12710
12721
|
mode: "light",
|
|
12711
12722
|
placement: "right",
|
|
12712
12723
|
className: e,
|
|
12713
|
-
trigger:
|
|
12724
|
+
trigger: D
|
|
12714
12725
|
}
|
|
12715
12726
|
),
|
|
12716
|
-
|
|
12727
|
+
P && /* @__PURE__ */ g(
|
|
12717
12728
|
"span",
|
|
12718
12729
|
{
|
|
12719
12730
|
className: $(
|
|
12720
12731
|
"text-sm sm:text-xs font-medium select-none",
|
|
12721
12732
|
d(u.Header)
|
|
12722
12733
|
),
|
|
12723
|
-
children:
|
|
12734
|
+
children: P
|
|
12724
12735
|
}
|
|
12725
12736
|
)
|
|
12726
|
-
] }) : /* @__PURE__ */ g("div", { className: e, children:
|
|
12737
|
+
] }) : /* @__PURE__ */ g("div", { className: e, children: D });
|
|
12727
12738
|
}, mC = wt(
|
|
12728
12739
|
() => import(
|
|
12729
12740
|
/* webpackChunkName: "modal-chunk" */
|
|
12730
|
-
"./ProfileEntry.
|
|
12741
|
+
"./ProfileEntry.CFjS5ztM.js"
|
|
12731
12742
|
).then((e) => ({
|
|
12732
12743
|
default: e.Profile
|
|
12733
12744
|
}))
|
|
12734
12745
|
), hC = wt(
|
|
12735
12746
|
() => import(
|
|
12736
12747
|
/* webpackChunkName: "modal-chunk" */
|
|
12737
|
-
"./SettingsEntry.
|
|
12748
|
+
"./SettingsEntry.DK9QZ6yj.js"
|
|
12738
12749
|
).then((e) => ({
|
|
12739
12750
|
default: e.SettingsPanel
|
|
12740
12751
|
}))
|
|
12741
12752
|
), gC = wt(
|
|
12742
12753
|
() => import(
|
|
12743
12754
|
/* webpackChunkName: "modal-chunk" */
|
|
12744
|
-
"./HistoryEntry.
|
|
12755
|
+
"./HistoryEntry.Bz7a6Bem.js"
|
|
12745
12756
|
).then((e) => ({
|
|
12746
12757
|
default: e.HistoryPanel
|
|
12747
12758
|
}))
|
|
12748
12759
|
), vC = wt(
|
|
12749
12760
|
() => import(
|
|
12750
12761
|
/* webpackChunkName: "modal-chunk" */
|
|
12751
|
-
"./AboutEntry.
|
|
12762
|
+
"./AboutEntry.CLzuzflL.js"
|
|
12752
12763
|
).then((e) => ({ default: e.About }))
|
|
12753
12764
|
), yC = wt(
|
|
12754
12765
|
() => import(
|
|
12755
12766
|
/* webpackChunkName: "modal-chunk" */
|
|
12756
|
-
"./UsageEntry.
|
|
12767
|
+
"./UsageEntry.BzzbV0A4.js"
|
|
12757
12768
|
).then((e) => ({ default: e.Usage }))
|
|
12758
12769
|
), bC = wt(
|
|
12759
12770
|
() => import(
|
|
12760
12771
|
/* webpackChunkName: "modal-chunk" */
|
|
12761
|
-
"./MemoriesEntry.
|
|
12772
|
+
"./MemoriesEntry.uaGNQRyj.js"
|
|
12762
12773
|
).then((e) => ({ default: e.default }))
|
|
12763
12774
|
), wC = ({
|
|
12764
12775
|
open: e,
|
|
@@ -12778,7 +12789,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12778
12789
|
return document.documentElement.dataset.modalTint = "darker", document.body.dataset.modalTint = "darker", () => {
|
|
12779
12790
|
delete document.documentElement.dataset.modalTint, delete document.body.dataset.modalTint;
|
|
12780
12791
|
};
|
|
12781
|
-
}, [t]), t ? /* @__PURE__ */ g(
|
|
12792
|
+
}, [t]), t ? /* @__PURE__ */ g(wo, { fallback: /* @__PURE__ */ g("div", {}), children: (() => {
|
|
12782
12793
|
switch (e) {
|
|
12783
12794
|
case "profile":
|
|
12784
12795
|
return /* @__PURE__ */ g(mC, { open: t, onOpenChange: n });
|
|
@@ -12818,7 +12829,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12818
12829
|
user: s?.username || "",
|
|
12819
12830
|
searchString: n.searchString || "",
|
|
12820
12831
|
sortDirection: n.sortDirection || jt.DESC,
|
|
12821
|
-
sortedCell: n.sortedCell ||
|
|
12832
|
+
sortedCell: n.sortedCell || bo,
|
|
12822
12833
|
getAccessToken: o,
|
|
12823
12834
|
keywordMatchAll: x,
|
|
12824
12835
|
withMediaOnly: T,
|
|
@@ -12826,40 +12837,40 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12826
12837
|
}), U(() => {
|
|
12827
12838
|
d && l && S && _(l?.useMemory ?? !1);
|
|
12828
12839
|
}, [d, l, S]);
|
|
12829
|
-
const
|
|
12840
|
+
const P = H(() => {
|
|
12830
12841
|
f || Promise.all([
|
|
12831
12842
|
import(
|
|
12832
12843
|
/* webpackChunkName: "modal-chunk" */
|
|
12833
|
-
"./ProfileEntry.
|
|
12844
|
+
"./ProfileEntry.CFjS5ztM.js"
|
|
12834
12845
|
),
|
|
12835
12846
|
import(
|
|
12836
12847
|
/* webpackChunkName: "modal-chunk" */
|
|
12837
|
-
"./SettingsEntry.
|
|
12848
|
+
"./SettingsEntry.DK9QZ6yj.js"
|
|
12838
12849
|
),
|
|
12839
12850
|
import(
|
|
12840
12851
|
/* webpackChunkName: "modal-chunk" */
|
|
12841
|
-
"./HistoryEntry.
|
|
12852
|
+
"./HistoryEntry.Bz7a6Bem.js"
|
|
12842
12853
|
),
|
|
12843
12854
|
import(
|
|
12844
12855
|
/* webpackChunkName: "modal-chunk" */
|
|
12845
|
-
"./AboutEntry.
|
|
12856
|
+
"./AboutEntry.CLzuzflL.js"
|
|
12846
12857
|
),
|
|
12847
12858
|
import(
|
|
12848
12859
|
/* webpackChunkName: "modal-chunk" */
|
|
12849
|
-
"./UsageEntry.
|
|
12860
|
+
"./UsageEntry.BzzbV0A4.js"
|
|
12850
12861
|
)
|
|
12851
12862
|
]).finally(() => v(!0));
|
|
12852
|
-
}, [f]),
|
|
12853
|
-
h(
|
|
12854
|
-
}, []),
|
|
12863
|
+
}, [f]), D = H((V) => {
|
|
12864
|
+
h(V);
|
|
12865
|
+
}, []), z = H(() => {
|
|
12855
12866
|
h(null);
|
|
12856
12867
|
}, []), I = H(() => {
|
|
12857
|
-
|
|
12858
|
-
}, [
|
|
12868
|
+
D("settings");
|
|
12869
|
+
}, [D]);
|
|
12859
12870
|
kc("openSettings", I);
|
|
12860
|
-
const
|
|
12871
|
+
const M = () => {
|
|
12861
12872
|
m(!p);
|
|
12862
|
-
},
|
|
12873
|
+
}, A = H(() => {
|
|
12863
12874
|
i.clear(), r();
|
|
12864
12875
|
}, [r, i]);
|
|
12865
12876
|
return Ko(
|
|
@@ -12867,7 +12878,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12867
12878
|
[
|
|
12868
12879
|
"mod+,",
|
|
12869
12880
|
() => {
|
|
12870
|
-
hn() &&
|
|
12881
|
+
hn() && D("settings");
|
|
12871
12882
|
}
|
|
12872
12883
|
]
|
|
12873
12884
|
],
|
|
@@ -12877,13 +12888,13 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12877
12888
|
* focus.
|
|
12878
12889
|
*/
|
|
12879
12890
|
[]
|
|
12880
|
-
), /* @__PURE__ */
|
|
12891
|
+
), /* @__PURE__ */ L(rt, { children: [
|
|
12881
12892
|
/* @__PURE__ */ g(
|
|
12882
12893
|
Qt,
|
|
12883
12894
|
{
|
|
12884
12895
|
showConfirmation: p,
|
|
12885
12896
|
setShowConfirmation: m,
|
|
12886
|
-
action:
|
|
12897
|
+
action: A,
|
|
12887
12898
|
customStrings: {
|
|
12888
12899
|
confirmAction: Ss,
|
|
12889
12900
|
cancelAction: "Cancel",
|
|
@@ -12897,7 +12908,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12897
12908
|
{
|
|
12898
12909
|
type: u,
|
|
12899
12910
|
open: u !== null,
|
|
12900
|
-
onOpenChange:
|
|
12911
|
+
onOpenChange: z
|
|
12901
12912
|
}
|
|
12902
12913
|
),
|
|
12903
12914
|
/* @__PURE__ */ g(
|
|
@@ -12907,16 +12918,16 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12907
12918
|
"bg-surface-darker": !t,
|
|
12908
12919
|
"bg-surface-darker/95 dark:bg-surface-darker": t
|
|
12909
12920
|
}),
|
|
12910
|
-
children: /* @__PURE__ */
|
|
12921
|
+
children: /* @__PURE__ */ L("div", { className: "flex flex-wrap justify-between items-center", children: [
|
|
12911
12922
|
/* @__PURE__ */ g("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ g(pC, { className: "mr-2" }) }),
|
|
12912
12923
|
/* @__PURE__ */ g("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ g(
|
|
12913
|
-
|
|
12924
|
+
kr,
|
|
12914
12925
|
{
|
|
12915
12926
|
label: "Profile, Settings, etc.",
|
|
12916
12927
|
mode: "light",
|
|
12917
12928
|
placement: "left",
|
|
12918
|
-
trigger: /* @__PURE__ */
|
|
12919
|
-
|
|
12929
|
+
trigger: /* @__PURE__ */ L(
|
|
12930
|
+
Fr,
|
|
12920
12931
|
{
|
|
12921
12932
|
mode: "light",
|
|
12922
12933
|
focusMode: "light",
|
|
@@ -12927,8 +12938,8 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12927
12938
|
noBackground: !0,
|
|
12928
12939
|
mode: "light",
|
|
12929
12940
|
label: "Settings",
|
|
12930
|
-
onMouseEnter:
|
|
12931
|
-
onFocus:
|
|
12941
|
+
onMouseEnter: P,
|
|
12942
|
+
onFocus: P,
|
|
12932
12943
|
children: /* @__PURE__ */ g($d, { className: a(c.Header) })
|
|
12933
12944
|
}
|
|
12934
12945
|
),
|
|
@@ -12938,7 +12949,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12938
12949
|
ze,
|
|
12939
12950
|
{
|
|
12940
12951
|
label: "Profile",
|
|
12941
|
-
onClick: () =>
|
|
12952
|
+
onClick: () => D("profile"),
|
|
12942
12953
|
icon: /* @__PURE__ */ g(Rd, {})
|
|
12943
12954
|
}
|
|
12944
12955
|
),
|
|
@@ -12946,7 +12957,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12946
12957
|
ze,
|
|
12947
12958
|
{
|
|
12948
12959
|
label: "Settings",
|
|
12949
|
-
onClick: () =>
|
|
12960
|
+
onClick: () => D("settings"),
|
|
12950
12961
|
icon: /* @__PURE__ */ g(Od, {})
|
|
12951
12962
|
}
|
|
12952
12963
|
),
|
|
@@ -12954,7 +12965,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12954
12965
|
ze,
|
|
12955
12966
|
{
|
|
12956
12967
|
label: "History",
|
|
12957
|
-
onClick: () =>
|
|
12968
|
+
onClick: () => D("history"),
|
|
12958
12969
|
onMouseEnter: () => E(!0),
|
|
12959
12970
|
icon: /* @__PURE__ */ g(Nd, {})
|
|
12960
12971
|
}
|
|
@@ -12963,7 +12974,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12963
12974
|
ze,
|
|
12964
12975
|
{
|
|
12965
12976
|
label: "Memories",
|
|
12966
|
-
onClick: () =>
|
|
12977
|
+
onClick: () => D("memories"),
|
|
12967
12978
|
icon: /* @__PURE__ */ g(Md, {})
|
|
12968
12979
|
}
|
|
12969
12980
|
),
|
|
@@ -12971,7 +12982,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12971
12982
|
ze,
|
|
12972
12983
|
{
|
|
12973
12984
|
label: "Usage",
|
|
12974
|
-
onClick: () =>
|
|
12985
|
+
onClick: () => D("usage"),
|
|
12975
12986
|
icon: /* @__PURE__ */ g(kd, {})
|
|
12976
12987
|
}
|
|
12977
12988
|
),
|
|
@@ -12979,17 +12990,17 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
12979
12990
|
ze,
|
|
12980
12991
|
{
|
|
12981
12992
|
label: "About",
|
|
12982
|
-
onClick: () =>
|
|
12993
|
+
onClick: () => D("about"),
|
|
12983
12994
|
icon: /* @__PURE__ */ g(Pd, {})
|
|
12984
12995
|
}
|
|
12985
12996
|
),
|
|
12986
|
-
!e && /* @__PURE__ */
|
|
12997
|
+
!e && /* @__PURE__ */ L(rt, { children: [
|
|
12987
12998
|
/* @__PURE__ */ g(au, {}),
|
|
12988
12999
|
/* @__PURE__ */ g(
|
|
12989
13000
|
ze,
|
|
12990
13001
|
{
|
|
12991
13002
|
label: "Log out",
|
|
12992
|
-
onClick:
|
|
13003
|
+
onClick: M,
|
|
12993
13004
|
icon: /* @__PURE__ */ g("div", { className: "text-copy-error-dark", children: /* @__PURE__ */ g(Dd, { monotone: !0 }) })
|
|
12994
13005
|
}
|
|
12995
13006
|
)
|
|
@@ -13005,7 +13016,7 @@ const $S = [".png", ".jpg", ".jpeg", ".webp"], LS = [".pdf", ".txt"], zS = [
|
|
|
13005
13016
|
] });
|
|
13006
13017
|
};
|
|
13007
13018
|
function SC() {
|
|
13008
|
-
const e =
|
|
13019
|
+
const e = G(null), [t, n] = Z(!1);
|
|
13009
13020
|
return {
|
|
13010
13021
|
ref: H((o) => {
|
|
13011
13022
|
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));
|
|
@@ -13060,7 +13071,7 @@ const CC = ({
|
|
|
13060
13071
|
)
|
|
13061
13072
|
}
|
|
13062
13073
|
) : null;
|
|
13063
|
-
const
|
|
13074
|
+
const dr = "av-bubble", xC = ({ kind: e, noMaxWidth: t }) => $("px-4 py-2", {
|
|
13064
13075
|
"max-w-xs sm:max-w-md md:max-w-2xl": !t,
|
|
13065
13076
|
"lg:max-w-3xl": e === "left" && !t
|
|
13066
13077
|
}), TC = ({ kind: e, gradient: t }) => t ? t === "light" ? $({
|
|
@@ -13079,7 +13090,7 @@ const ur = "av-bubble", xC = ({ kind: e, noMaxWidth: t }) => $("px-4 py-2", {
|
|
|
13079
13090
|
"text-copy-lighter": e === "right"
|
|
13080
13091
|
}), AC = ({ kind: e, tail: t }) => {
|
|
13081
13092
|
if (t)
|
|
13082
|
-
return $(`${
|
|
13093
|
+
return $(`${dr}-${e}-tail`, "rounded-3xl", "relative", "before:content-['']", "before:w-3", "before:h-2", "before:absolute", "before:bottom-0", {
|
|
13083
13094
|
"last-bubble-right:before:right-0.5 last-bubble-right:before:border-l-8 last-bubble-right:before:border-l-surface-accent last-bubble-right:before:rounded-bl-[100%]": e === "right",
|
|
13084
13095
|
"last-bubble-left:before:left-0.5 last-bubble-left:before:border-r-8 last-bubble-left:before:border-r-surface-light last-bubble-left:dark:before:border-r-surface-dark last-bubble-left:before:rounded-br-[100%]": e === "left"
|
|
13085
13096
|
});
|
|
@@ -13089,9 +13100,9 @@ const ur = "av-bubble", xC = ({ kind: e, noMaxWidth: t }) => $("px-4 py-2", {
|
|
|
13089
13100
|
"rounded-tl-xl": e === "right"
|
|
13090
13101
|
});
|
|
13091
13102
|
}, RC = ({ kind: e, className: t, contentClassName: n, footerClassName: r, noMaxWidth: o, tail: s, gradient: i }) => {
|
|
13092
|
-
const a = $(
|
|
13103
|
+
const a = $(dr, `${dr}-${e}`, "flex items-start", {
|
|
13093
13104
|
"flex-row-reverse": e === "right"
|
|
13094
|
-
}, t), c = $(`${
|
|
13105
|
+
}, t), c = $(`${dr}-content`, "flex flex-col empty:hidden", xC({
|
|
13095
13106
|
kind: e,
|
|
13096
13107
|
noMaxWidth: o
|
|
13097
13108
|
}), IC({
|
|
@@ -13124,10 +13135,10 @@ const ur = "av-bubble", xC = ({ kind: e, noMaxWidth: t }) => $("px-4 py-2", {
|
|
|
13124
13135
|
tail: l,
|
|
13125
13136
|
gradient: d
|
|
13126
13137
|
});
|
|
13127
|
-
return /* @__PURE__ */
|
|
13138
|
+
return /* @__PURE__ */ L("div", {
|
|
13128
13139
|
className: u.wrapper,
|
|
13129
13140
|
children: [
|
|
13130
|
-
/* @__PURE__ */
|
|
13141
|
+
/* @__PURE__ */ L("div", {
|
|
13131
13142
|
children: [
|
|
13132
13143
|
/* @__PURE__ */ g("div", {
|
|
13133
13144
|
className: u.main,
|
|
@@ -13145,7 +13156,7 @@ const ur = "av-bubble", xC = ({ kind: e, noMaxWidth: t }) => $("px-4 py-2", {
|
|
|
13145
13156
|
})
|
|
13146
13157
|
}, `footer-empty-${p}`) : NC(h) ? /* @__PURE__ */ g("div", {
|
|
13147
13158
|
className: "prose-p:m-0",
|
|
13148
|
-
children: /* @__PURE__ */
|
|
13159
|
+
children: /* @__PURE__ */ L("p", {
|
|
13149
13160
|
className: u.footer,
|
|
13150
13161
|
children: [
|
|
13151
13162
|
h.key,
|
|
@@ -13182,12 +13193,12 @@ const Xa = "av-spinner", pu = ({ spinnerRef: e, mode: t = "system", type: n = "c
|
|
|
13182
13193
|
"fill-copy-dark dark:fill-copy-accent": t === "system",
|
|
13183
13194
|
"fill-copy-accent dark:fill-copy-dark": t === "alt-system"
|
|
13184
13195
|
});
|
|
13185
|
-
return /* @__PURE__ */
|
|
13196
|
+
return /* @__PURE__ */ L("div", {
|
|
13186
13197
|
ref: e,
|
|
13187
13198
|
className: o,
|
|
13188
13199
|
role: "status",
|
|
13189
13200
|
children: [
|
|
13190
|
-
n === "dots" && /* @__PURE__ */
|
|
13201
|
+
n === "dots" && /* @__PURE__ */ L("svg", {
|
|
13191
13202
|
className: "h-8 w-8",
|
|
13192
13203
|
children: [
|
|
13193
13204
|
/* @__PURE__ */ g("circle", {
|
|
@@ -13219,12 +13230,12 @@ const Xa = "av-spinner", pu = ({ spinnerRef: e, mode: t = "system", type: n = "c
|
|
|
13219
13230
|
}, Qa = 1, MC = 150, kC = wt(
|
|
13220
13231
|
() => import(
|
|
13221
13232
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
13222
|
-
"./ChatBubbleAssistant.
|
|
13233
|
+
"./ChatBubbleAssistant.CCq0_B58.js"
|
|
13223
13234
|
)
|
|
13224
13235
|
), PC = wt(
|
|
13225
13236
|
() => import(
|
|
13226
13237
|
/* webpackChunkName: "LazyMessageUser" */
|
|
13227
|
-
"./ChatBubbleUser.
|
|
13238
|
+
"./ChatBubbleUser.C7gtc_kh.js"
|
|
13228
13239
|
)
|
|
13229
13240
|
), DC = We.memo(
|
|
13230
13241
|
({
|
|
@@ -13237,7 +13248,7 @@ const Xa = "av-spinner", pu = ({ spinnerRef: e, mode: t = "system", type: n = "c
|
|
|
13237
13248
|
messageIndex: i,
|
|
13238
13249
|
messages: a
|
|
13239
13250
|
}) => {
|
|
13240
|
-
const [c, l] = Z(!0), d =
|
|
13251
|
+
const [c, l] = Z(!0), d = G(Date.now()), [u] = Z(
|
|
13241
13252
|
() => o && (s === "streaming" || s === "submitted")
|
|
13242
13253
|
);
|
|
13243
13254
|
return U(() => {
|
|
@@ -13252,7 +13263,7 @@ const Xa = "av-spinner", pu = ({ spinnerRef: e, mode: t = "system", type: n = "c
|
|
|
13252
13263
|
}
|
|
13253
13264
|
l(!1);
|
|
13254
13265
|
}
|
|
13255
|
-
}, [t, c, o]), e ===
|
|
13266
|
+
}, [t, c, o]), e === fr && t ? /* @__PURE__ */ g(wo, { fallback: /* @__PURE__ */ g("span", {}), children: /* @__PURE__ */ g(PC, { content: t }) }) : e === Gt && o && (s === "submitted" || s === "streaming") && c ? /* @__PURE__ */ g(fu, { tail: !0, children: /* @__PURE__ */ g(pu, { type: "dots" }) }) : e === Gt && t && t.trim().length >= Qa ? /* @__PURE__ */ g(wo, { fallback: /* @__PURE__ */ g("span", {}), children: /* @__PURE__ */ g(
|
|
13256
13267
|
kC,
|
|
13257
13268
|
{
|
|
13258
13269
|
role: e,
|
|
@@ -13290,17 +13301,17 @@ function LC(e) {
|
|
|
13290
13301
|
}
|
|
13291
13302
|
}
|
|
13292
13303
|
const mu = We.forwardRef((e, t) => {
|
|
13293
|
-
const { messages: n, status: r } = _t(), o = n ? n.map((c, l) => c.role === Gt ? l : -1).filter((c) => c !== -1).pop() : -1, s = n && n.length > 0 ? n[n.length - 1] : null, i = (r === "submitted" || r === "streaming") && s?.role ===
|
|
13304
|
+
const { messages: n, status: r } = _t(), o = n ? n.map((c, l) => c.role === Gt ? l : -1).filter((c) => c !== -1).pop() : -1, s = n && n.length > 0 ? n[n.length - 1] : null, i = (r === "submitted" || r === "streaming") && s?.role === fr, a = (() => {
|
|
13294
13305
|
if (!n)
|
|
13295
13306
|
return -1;
|
|
13296
|
-
const c = [...n].reverse().findIndex((l) => l.role ===
|
|
13307
|
+
const c = [...n].reverse().findIndex((l) => l.role === fr);
|
|
13297
13308
|
return c === -1 ? -1 : n.length - 1 - c;
|
|
13298
13309
|
})();
|
|
13299
|
-
return n && n.length > 0 ? /* @__PURE__ */
|
|
13310
|
+
return n && n.length > 0 ? /* @__PURE__ */ L("div", { className: "space-y-6 mt-2 @container", children: [
|
|
13300
13311
|
n?.map((c, l) => {
|
|
13301
13312
|
let d;
|
|
13302
13313
|
const u = `${l}-${c.role}`, h = $C(c), p = LC(c), m = c.role === Gt && l === o, f = l === a;
|
|
13303
|
-
return /* @__PURE__ */
|
|
13314
|
+
return /* @__PURE__ */ L(We.Fragment, { children: [
|
|
13304
13315
|
f && /* @__PURE__ */ g("div", { ref: t, className: "new-message-marker" }),
|
|
13305
13316
|
/* @__PURE__ */ g(
|
|
13306
13317
|
DC,
|
|
@@ -13322,18 +13333,18 @@ const mu = We.forwardRef((e, t) => {
|
|
|
13322
13333
|
});
|
|
13323
13334
|
mu.displayName = "MessagesList";
|
|
13324
13335
|
const zC = () => {
|
|
13325
|
-
const { isAuthenticated: e } = Ue(), { ref: t, inViewport: n } = SC(), r =
|
|
13336
|
+
const { isAuthenticated: e } = Ue(), { ref: t, inViewport: n } = SC(), r = G(null), o = G(null), s = G(null), i = G(null), [a, c] = Z(0), {
|
|
13326
13337
|
state: { footerPosition: l, footerHeight: d, footerOffset: u, oledMode: h }
|
|
13327
13338
|
} = ue(An), {
|
|
13328
13339
|
state: { loading: p, streaming: m, scrollToBottomTrigger: f }
|
|
13329
|
-
} = ue(Be), { messages: v } = _t(), b =
|
|
13340
|
+
} = ue(Be), { messages: v } = _t(), b = G(0), _ = G(!1), y = G(0), E = G(0), S = G(0), { data: x, isSuccess: T } = ju(), O = Hu({
|
|
13330
13341
|
isAuthenticated: e,
|
|
13331
13342
|
oledMode: h,
|
|
13332
13343
|
extraClass: "rounded-b-md relative border-b-16 border-transparent"
|
|
13333
|
-
}),
|
|
13344
|
+
}), P = Jt() ? "mt-4" : "", D = H(() => {
|
|
13334
13345
|
if (a > 0 && r.current) {
|
|
13335
|
-
const { scrollHeight: I, clientHeight:
|
|
13336
|
-
if (I - a <
|
|
13346
|
+
const { scrollHeight: I, clientHeight: M } = r.current;
|
|
13347
|
+
if (I - a < M && i.current) {
|
|
13337
13348
|
i.current.scrollIntoView({
|
|
13338
13349
|
behavior: "smooth",
|
|
13339
13350
|
block: "start"
|
|
@@ -13352,7 +13363,7 @@ const zC = () => {
|
|
|
13352
13363
|
behavior: "smooth",
|
|
13353
13364
|
block: "end"
|
|
13354
13365
|
});
|
|
13355
|
-
}, [a]),
|
|
13366
|
+
}, [a]), z = H(() => {
|
|
13356
13367
|
i.current && i.current.scrollIntoView({
|
|
13357
13368
|
behavior: "smooth",
|
|
13358
13369
|
block: "start"
|
|
@@ -13367,25 +13378,25 @@ const zC = () => {
|
|
|
13367
13378
|
(!v || v.length === 0) && c(0);
|
|
13368
13379
|
}, [v]), U(() => {
|
|
13369
13380
|
if (_.current && !m && !p && a > 0 && r.current) {
|
|
13370
|
-
const
|
|
13381
|
+
const M = r.current.scrollHeight - y.current, A = Math.max(
|
|
13371
13382
|
0,
|
|
13372
|
-
E.current -
|
|
13383
|
+
E.current - M
|
|
13373
13384
|
);
|
|
13374
|
-
c(
|
|
13385
|
+
c(A);
|
|
13375
13386
|
}
|
|
13376
13387
|
_.current = m;
|
|
13377
13388
|
}, [m, p, a]), U(() => {
|
|
13378
|
-
p && v && v.length > 0 &&
|
|
13379
|
-
}, [p,
|
|
13380
|
-
f > 0 && f !== S.current && (S.current = f,
|
|
13381
|
-
}, [f,
|
|
13389
|
+
p && v && v.length > 0 && z();
|
|
13390
|
+
}, [p, z, v]), U(() => {
|
|
13391
|
+
f > 0 && f !== S.current && (S.current = f, D());
|
|
13392
|
+
}, [f, D]), U(() => {
|
|
13382
13393
|
b.current = l === pn ? d + u + ai + Vu + 15 : 0;
|
|
13383
|
-
}, [l, d, u]), /* @__PURE__ */
|
|
13384
|
-
/* @__PURE__ */
|
|
13394
|
+
}, [l, d, u]), /* @__PURE__ */ L(rt, { children: [
|
|
13395
|
+
/* @__PURE__ */ L("div", { className: O, ref: r, children: [
|
|
13385
13396
|
/* @__PURE__ */ g(
|
|
13386
13397
|
Ld,
|
|
13387
13398
|
{
|
|
13388
|
-
className:
|
|
13399
|
+
className: P,
|
|
13389
13400
|
isCapabilitiesSuccess: T,
|
|
13390
13401
|
capabilities: x
|
|
13391
13402
|
}
|
|
@@ -13409,7 +13420,7 @@ const zC = () => {
|
|
|
13409
13420
|
{
|
|
13410
13421
|
show: !n && l === pn && !p && !m,
|
|
13411
13422
|
bottom: b.current,
|
|
13412
|
-
onClick:
|
|
13423
|
+
onClick: D
|
|
13413
13424
|
}
|
|
13414
13425
|
)
|
|
13415
13426
|
] });
|
|
@@ -13423,7 +13434,7 @@ function hu({
|
|
|
13423
13434
|
initialValue: ""
|
|
13424
13435
|
}), [p] = Ne({
|
|
13425
13436
|
key: Te + Ku,
|
|
13426
|
-
initialValue:
|
|
13437
|
+
initialValue: bo
|
|
13427
13438
|
}), [m] = Ne({
|
|
13428
13439
|
key: Te + ed,
|
|
13429
13440
|
initialValue: jt.DESC
|
|
@@ -13437,15 +13448,15 @@ function hu({
|
|
|
13437
13448
|
key: Qu,
|
|
13438
13449
|
initialValue: !1
|
|
13439
13450
|
}), _ = Me(() => ({
|
|
13440
|
-
footerPosition:
|
|
13451
|
+
footerPosition: _o,
|
|
13441
13452
|
footerHeight: 0,
|
|
13442
13453
|
footerOffset: qe() ? si : 0,
|
|
13443
13454
|
oledMode: !1,
|
|
13444
13455
|
fullScreen: !1,
|
|
13445
13456
|
themeMode: Wu
|
|
13446
13457
|
}), []), [y, E] = Un(zd, _), S = Me(() => {
|
|
13447
|
-
const
|
|
13448
|
-
return
|
|
13458
|
+
const Y = qe(), Q = cf();
|
|
13459
|
+
return Y && Q ? "mt-1" : "mt-5";
|
|
13449
13460
|
}, []), T = {
|
|
13450
13461
|
searchString: h,
|
|
13451
13462
|
sortedCell: p,
|
|
@@ -13453,18 +13464,18 @@ function hu({
|
|
|
13453
13464
|
switch (p) {
|
|
13454
13465
|
case Ju:
|
|
13455
13466
|
return f;
|
|
13456
|
-
case
|
|
13467
|
+
case bo:
|
|
13457
13468
|
default:
|
|
13458
13469
|
return m;
|
|
13459
13470
|
}
|
|
13460
13471
|
})()
|
|
13461
|
-
}, [O,
|
|
13472
|
+
}, [O, P] = Un(
|
|
13462
13473
|
ey,
|
|
13463
13474
|
T
|
|
13464
|
-
), [
|
|
13475
|
+
), [D, z] = Un(ty, {
|
|
13465
13476
|
prompt: "",
|
|
13466
13477
|
lastTriggeredTimestamp: 0
|
|
13467
|
-
}), [I,
|
|
13478
|
+
}), [I, M] = Un(Qv, {
|
|
13468
13479
|
provider: "",
|
|
13469
13480
|
// OpenAI, Anthropic, etc.
|
|
13470
13481
|
privateChat: !1,
|
|
@@ -13479,10 +13490,10 @@ function hu({
|
|
|
13479
13490
|
lastResetTimestamp: 0,
|
|
13480
13491
|
scrollToBottomTrigger: 0,
|
|
13481
13492
|
restoredTimestamp: ""
|
|
13482
|
-
}), { data:
|
|
13493
|
+
}), { data: A } = bt({
|
|
13483
13494
|
user: n?.username,
|
|
13484
13495
|
getAccessToken: r
|
|
13485
|
-
}),
|
|
13496
|
+
}), V = Me(() => new Jo({
|
|
13486
13497
|
api: `${ni}/api/generate`,
|
|
13487
13498
|
// Only include static values in transport body.
|
|
13488
13499
|
body: {
|
|
@@ -13493,7 +13504,7 @@ function hu({
|
|
|
13493
13504
|
currentChatId: c,
|
|
13494
13505
|
setChatId: l,
|
|
13495
13506
|
setInitialMessages: u,
|
|
13496
|
-
dispatchChat:
|
|
13507
|
+
dispatchChat: M,
|
|
13497
13508
|
lastResetTimestamp: I.lastResetTimestamp
|
|
13498
13509
|
}), U(() => {
|
|
13499
13510
|
document.getElementById("root")?.classList.replace("app-hidden", "fadeIn");
|
|
@@ -13508,20 +13519,20 @@ function hu({
|
|
|
13508
13519
|
payload: { fullScreen: b }
|
|
13509
13520
|
});
|
|
13510
13521
|
}, [b]), U(() => {
|
|
13511
|
-
|
|
13522
|
+
A?.themePalette && E({
|
|
13512
13523
|
type: Ud,
|
|
13513
|
-
payload: { themePalette:
|
|
13524
|
+
payload: { themePalette: A.themePalette }
|
|
13514
13525
|
});
|
|
13515
|
-
}, [
|
|
13516
|
-
|
|
13526
|
+
}, [A]), U(() => {
|
|
13527
|
+
A && A.provider && M({
|
|
13517
13528
|
type: hc,
|
|
13518
13529
|
payload: {
|
|
13519
|
-
provider:
|
|
13530
|
+
provider: A.provider
|
|
13520
13531
|
}
|
|
13521
13532
|
});
|
|
13522
|
-
}, [
|
|
13533
|
+
}, [A]), In(() => {
|
|
13523
13534
|
if (y.footerPosition === "FOOTER_BOTTOM") {
|
|
13524
|
-
const
|
|
13535
|
+
const Y = S === "mt-1" ? 4 : 20, Q = `calc(${a.height}px + ${Y}px)`;
|
|
13525
13536
|
s(
|
|
13526
13537
|
`calc(100svh - ${t}px - ${Q} - ${y.footerHeight}px - ${y.footerOffset}px - ${ai}px)`
|
|
13527
13538
|
);
|
|
@@ -13541,28 +13552,28 @@ function hu({
|
|
|
13541
13552
|
{
|
|
13542
13553
|
value: {
|
|
13543
13554
|
state: O,
|
|
13544
|
-
dispatch:
|
|
13555
|
+
dispatch: P
|
|
13545
13556
|
},
|
|
13546
13557
|
children: /* @__PURE__ */ g(An.Provider, { value: { state: y, dispatch: E }, children: /* @__PURE__ */ g(
|
|
13547
13558
|
Uo.Provider,
|
|
13548
13559
|
{
|
|
13549
|
-
value: { state:
|
|
13560
|
+
value: { state: D, dispatch: z },
|
|
13550
13561
|
children: /* @__PURE__ */ g(
|
|
13551
13562
|
Be.Provider,
|
|
13552
13563
|
{
|
|
13553
13564
|
value: {
|
|
13554
13565
|
state: I,
|
|
13555
|
-
dispatch:
|
|
13566
|
+
dispatch: M,
|
|
13556
13567
|
setChatId: l,
|
|
13557
13568
|
setInitialMessages: u
|
|
13558
13569
|
},
|
|
13559
|
-
children: /* @__PURE__ */
|
|
13570
|
+
children: /* @__PURE__ */ L(
|
|
13560
13571
|
cy,
|
|
13561
13572
|
{
|
|
13562
13573
|
value: {
|
|
13563
13574
|
id: c,
|
|
13564
13575
|
messages: d,
|
|
13565
|
-
transport:
|
|
13576
|
+
transport: V,
|
|
13566
13577
|
experimental_throttle: 300,
|
|
13567
13578
|
generateId() {
|
|
13568
13579
|
return ht();
|
|
@@ -13570,7 +13581,7 @@ function hu({
|
|
|
13570
13581
|
},
|
|
13571
13582
|
children: [
|
|
13572
13583
|
/* @__PURE__ */ g(ly, { chatId: c }),
|
|
13573
|
-
/* @__PURE__ */
|
|
13584
|
+
/* @__PURE__ */ L("div", { className: Bd, children: [
|
|
13574
13585
|
/* @__PURE__ */ g(ma, { containerId: "toggle-save" }),
|
|
13575
13586
|
/* @__PURE__ */ g(ma, { containerId: "toggle-provider" })
|
|
13576
13587
|
] }),
|
|
@@ -13578,7 +13589,7 @@ function hu({
|
|
|
13578
13589
|
"header",
|
|
13579
13590
|
{
|
|
13580
13591
|
ref: i,
|
|
13581
|
-
className:
|
|
13592
|
+
className: yo({
|
|
13582
13593
|
extraClass: S,
|
|
13583
13594
|
fullScreen: b
|
|
13584
13595
|
}),
|
|
@@ -13588,7 +13599,7 @@ function hu({
|
|
|
13588
13599
|
/* @__PURE__ */ g(
|
|
13589
13600
|
"main",
|
|
13590
13601
|
{
|
|
13591
|
-
className:
|
|
13602
|
+
className: yo({ fullScreen: b }),
|
|
13592
13603
|
style: {
|
|
13593
13604
|
height: o
|
|
13594
13605
|
},
|
|
@@ -13618,13 +13629,13 @@ export {
|
|
|
13618
13629
|
_n as CHAT_SET_ATTACHMENTS,
|
|
13619
13630
|
Ot as CHAT_SET_STATUS,
|
|
13620
13631
|
Qt as ConfirmationPanel,
|
|
13621
|
-
|
|
13622
|
-
|
|
13632
|
+
Fr as DropdownMenu,
|
|
13633
|
+
Cr as DropdownMenuGroupLabel,
|
|
13623
13634
|
ze as DropdownMenuItem,
|
|
13624
13635
|
su as DropdownMenuSub,
|
|
13625
13636
|
ma as LazyToastContainerWrapper,
|
|
13626
13637
|
Ub as Panel,
|
|
13627
|
-
|
|
13638
|
+
kr as ResponsiveTooltip,
|
|
13628
13639
|
ew as Toggle,
|
|
13629
13640
|
YC as debounce,
|
|
13630
13641
|
gv as getDefaultExportFromCjs,
|