@versini/sassysaint 8.39.4 → 8.39.6
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.4uuqc2gW.js → AboutChangelog.a2Bzn4Eo.js} +2 -2
- package/dist/chunks/{AboutEntry.DEXtlc2D.js → AboutEntry.DxPtaPEk.js} +5 -5
- package/dist/chunks/{App.DLqGmfek.js → App.ql9isVIc.js} +166 -166
- package/dist/chunks/{Chart.DqBsG3S0.js → Chart.CwNra_YH.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.36RmgPOi.js → ChatBubbleAssistant.CQbS8Zq_.js} +3 -3
- package/dist/chunks/{HistoryEntry.-djMdZ5t.js → HistoryEntry.Cxmb9IYc.js} +2 -2
- package/dist/chunks/{LNWAZHJI.h_rKLNTy.js → LNWAZHJI.BSA9TPhT.js} +1 -1
- package/dist/chunks/{ProfileEntry.hC-mRukT.js → ProfileEntry.B2zkafi7.js} +2 -2
- package/dist/chunks/{SettingsEntry.vgcJ35_E.js → SettingsEntry.naNpxEMO.js} +2 -2
- package/dist/chunks/{UsageEntry.0S_oclaD.js → UsageEntry.sGs1a2k3.js} +3 -3
- package/dist/chunks/{index.CuAabbCz.js → index.B3qDmkDC.js} +2 -2
- package/dist/chunks/{index.DXs2bUf7.js → index.B5E1cHaY.js} +1 -1
- package/dist/chunks/{index.CwmqrHgC.js → index.C-cxhR4V.js} +2 -2
- package/dist/chunks/{index.9GFuvWBb.js → index.Cz-TQ0No.js} +3 -3
- package/dist/chunks/{index.BmONlv9D.js → index.DN-9K8gb.js} +1 -1
- package/dist/chunks/{index.DrNt1Eax.js → index.EgVuydNA.js} +1 -1
- package/dist/chunks/{useMarkdown.DBVy5Jqw.js → useMarkdown.2uVXEX2E.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as i, jsxs as T, Fragment as me } from "react/jsx-runtime";
|
2
|
-
import { Subscribable as yo, pendingThenable as _a, resolveEnabled as
|
2
|
+
import { Subscribable as yo, pendingThenable as _a, resolveEnabled as ke, shallowEqualObjects as Er, resolveStaleTime as gt, noop as _r, isServer as Sr, isValidTimeout as Sa, focusManager as bo, fetchState as vo, replaceData as Ta, notifyManager as xs, timeUntilStale as wo, shouldThrowError as ko, useQueryClient as Eo, I as ae, ACTION_SORT as _o, ACTION_SEARCH as So, ACTION_RESET_PROMPT as Cs, ACTION_TOGGLE_PROMPT as Is, isProbablyiPhone as Ee, ue as xe, DEFAULT_ICON_ACTION_SIZE as Te, isTauri as Wt, n as Ve, L as Rs, j as yt, C as xa, LOCAL_STORAGE_PREFIX as Kt, LOCAL_STORAGE_PRIVATE_DISCLOSURE as To, LOCAL_STORAGE_REASONING_DISCLOSURE as xo, TOAST_CHAT_SAVED as Co, PROMPT_CLASSNAME as Io, PROMPT_EDITABLE_AREA_CLASSNAME as Ro, ERROR_MESSAGE as Ao, ROLE_INTERNAL as Tr, CLIPBOARD_PROMPT as Ca, isProbablyMobile as Ge, INPUT_PLACEHOLDER_TEXT_MOBILE as Ia, INPUT_PLACEHOLDER_TEXT_ENTER as Ra, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as Aa, FOOTER_DISCLAIMERS as Na, INPUT_BOTTOM_OFFSET_EXTRA as No, INPUT_BOTTOM_OFFSET_IPHONE as Oo, INPUT_BOTTOM_OFFSET as As, TOAST_PROVIDER_CHANGED as $o, LOG_OUT as Oa, getMessageContaintWrapperClass as Po, UI_FOOTER_BUFFER as Ns, UI_BUTTON_SCROLL_BUFFER as Mo, Logo as Lo, UI_DEFAULT_MAIN_HEIGHT as $a, APP_CLASSNAME as Do, getMainPaddingClass as Pa, r as Bo, LOCAL_STORAGE_SORT as Uo, LOCAL_STORAGE_SEARCH as Vo } from "./index.C-cxhR4V.js";
|
3
3
|
import * as Y from "react";
|
4
|
-
import Z, { useEffect as N, useRef as R, useState as
|
4
|
+
import Z, { useEffect as N, useRef as R, useState as z, useCallback as W, useSyncExternalStore as Ho, useMemo as he, useId as Gr, useContext as X, useLayoutEffect as Ne, createContext as Jr, useDebugValue as zo, forwardRef as Os, Suspense as $s, lazy as it, useReducer as St } from "react";
|
5
5
|
import p from "clsx";
|
6
6
|
import { computePosition as Fo, offset as Ps, flip as Ms, shift as Ls, arrow as Wo, useMergeRefs as qr, FloatingPortal as Ds, FloatingOverlay as Ko, FloatingFocusManager as Bs, useFloating as Us, useClick as Vs, useDismiss as Hs, useRole as zs, useInteractions as Fs, FloatingTree as jo, useFloatingTree as Ws, useFloatingNodeId as Go, useListItem as Ks, autoUpdate as Jo, useListNavigation as qo, useTypeahead as Yo, FloatingNode as Qo, FloatingList as Xo } from "@floating-ui/react";
|
7
7
|
var Zo = class extends yo {
|
@@ -55,7 +55,7 @@ var Zo = class extends yo {
|
|
55
55
|
}
|
56
56
|
setOptions(e) {
|
57
57
|
const t = this.options, r = this.#e;
|
58
|
-
if (this.options = this.#r.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof
|
58
|
+
if (this.options = this.#r.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof ke(this.options.enabled, this.#e) != "boolean")
|
59
59
|
throw new Error(
|
60
60
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
61
61
|
);
|
@@ -70,9 +70,9 @@ var Zo = class extends yo {
|
|
70
70
|
r,
|
71
71
|
this.options,
|
72
72
|
t
|
73
|
-
) && this.#l(), this.updateResult(), a && (this.#e !== r ||
|
73
|
+
) && this.#l(), this.updateResult(), a && (this.#e !== r || ke(this.options.enabled, this.#e) !== ke(t.enabled, this.#e) || gt(this.options.staleTime, this.#e) !== gt(t.staleTime, this.#e)) && this.#g();
|
74
74
|
const s = this.#y();
|
75
|
-
a && (this.#e !== r ||
|
75
|
+
a && (this.#e !== r || ke(this.options.enabled, this.#e) !== ke(t.enabled, this.#e) || s !== this.#n) && this.#b(s);
|
76
76
|
}
|
77
77
|
getOptimisticResult(e) {
|
78
78
|
const t = this.#r.getQueryCache().build(this.#r, e), r = this.createResult(t, e);
|
@@ -132,7 +132,7 @@ var Zo = class extends yo {
|
|
132
132
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#e) : this.options.refetchInterval) ?? !1;
|
133
133
|
}
|
134
134
|
#b(e) {
|
135
|
-
this.#k(), this.#n = e, !(Sr ||
|
135
|
+
this.#k(), this.#n = e, !(Sr || ke(this.options.enabled, this.#e) === !1 || !Sa(this.#n) || this.#n === 0) && (this.#c = setInterval(() => {
|
136
136
|
(this.options.refetchIntervalInBackground || bo.isFocused()) && this.#l();
|
137
137
|
}, this.#n));
|
138
138
|
}
|
@@ -205,7 +205,7 @@ var Zo = class extends yo {
|
|
205
205
|
isStale: Yr(e, t),
|
206
206
|
refetch: this.refetch,
|
207
207
|
promise: this.#a,
|
208
|
-
isEnabled:
|
208
|
+
isEnabled: ke(t.enabled, e) !== !1
|
209
209
|
};
|
210
210
|
if (this.options.experimental_prefetchInRender) {
|
211
211
|
const E = (A) => {
|
@@ -271,23 +271,23 @@ var Zo = class extends yo {
|
|
271
271
|
}
|
272
272
|
};
|
273
273
|
function ei(e, t) {
|
274
|
-
return
|
274
|
+
return ke(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
|
275
275
|
}
|
276
276
|
function Ma(e, t) {
|
277
277
|
return ei(e, t) || e.state.data !== void 0 && xr(e, t, t.refetchOnMount);
|
278
278
|
}
|
279
279
|
function xr(e, t, r) {
|
280
|
-
if (
|
280
|
+
if (ke(t.enabled, e) !== !1 && gt(t.staleTime, e) !== "static") {
|
281
281
|
const a = typeof r == "function" ? r(e) : r;
|
282
282
|
return a === "always" || a !== !1 && Yr(e, t);
|
283
283
|
}
|
284
284
|
return !1;
|
285
285
|
}
|
286
286
|
function La(e, t, r, a) {
|
287
|
-
return (e !== t ||
|
287
|
+
return (e !== t || ke(a.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Yr(e, r);
|
288
288
|
}
|
289
289
|
function Yr(e, t) {
|
290
|
-
return
|
290
|
+
return ke(t.enabled, e) !== !1 && e.isStaleByTime(gt(t.staleTime, e));
|
291
291
|
}
|
292
292
|
function ti(e, t) {
|
293
293
|
return !Er(e.getCurrentResult(), t);
|
@@ -1020,7 +1020,7 @@ function Qr(e, t = ["INPUT", "TEXTAREA", "SELECT"], r = !1) {
|
|
1020
1020
|
}, [e, t, r]);
|
1021
1021
|
}
|
1022
1022
|
function Fi() {
|
1023
|
-
const e = R(null), [t, r] =
|
1023
|
+
const e = R(null), [t, r] = z(!1);
|
1024
1024
|
return { ref: W((a) => {
|
1025
1025
|
var s, n;
|
1026
1026
|
typeof IntersectionObserver < "u" && (a && !e.current ? e.current = new IntersectionObserver(
|
@@ -1083,7 +1083,7 @@ const Gi = {
|
|
1083
1083
|
right: 0
|
1084
1084
|
};
|
1085
1085
|
function Js(e) {
|
1086
|
-
const t = Wi(), r = R(0), a = R(null), [s, n] =
|
1086
|
+
const t = Wi(), r = R(0), a = R(null), [s, n] = z(Gi), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
1087
1087
|
const l = c[0];
|
1088
1088
|
l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
1089
1089
|
a.current && t() && n(l.contentRect);
|
@@ -1102,7 +1102,7 @@ function Va(e, t) {
|
|
1102
1102
|
}), () => window.removeEventListener(e, t)), [e, t]);
|
1103
1103
|
}
|
1104
1104
|
function qi() {
|
1105
|
-
const [e, t] =
|
1105
|
+
const [e, t] = z({
|
1106
1106
|
width: 0,
|
1107
1107
|
height: 0
|
1108
1108
|
}), r = W(() => {
|
@@ -1114,7 +1114,7 @@ function qi() {
|
|
1114
1114
|
return Va("resize", r), Va("orientationchange", r), N(r, []), e;
|
1115
1115
|
}
|
1116
1116
|
function Yi() {
|
1117
|
-
const [e, t] =
|
1117
|
+
const [e, t] = z({
|
1118
1118
|
width: 0,
|
1119
1119
|
height: 0
|
1120
1120
|
}), r = W(() => {
|
@@ -1497,7 +1497,7 @@ const hc = {
|
|
1497
1497
|
right: 0
|
1498
1498
|
};
|
1499
1499
|
function rr(e) {
|
1500
|
-
const t = dc(), r = R(0), a = R(null), [s, n] =
|
1500
|
+
const t = dc(), r = R(0), a = R(null), [s, n] = z(hc), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
1501
1501
|
const l = c[0];
|
1502
1502
|
l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
1503
1503
|
a.current && t() && n(l.contentRect);
|
@@ -1562,15 +1562,15 @@ const Tt = {
|
|
1562
1562
|
radius: w,
|
1563
1563
|
variant: b,
|
1564
1564
|
animated: S
|
1565
|
-
}), k = oc({ mode: r, raw: c, iconClassName: x, variant: b }), E = ic({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = rr(), [O, K] = rr(), [M, G] = rr(),
|
1565
|
+
}), k = oc({ mode: r, raw: c, iconClassName: x, variant: b }), E = ic({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = rr(), [O, K] = rr(), [M, G] = rr(), Q = R(0), U = R(null), D = R(null), q = uc([C, U]);
|
1566
1566
|
return Ne(() => {
|
1567
|
-
M && M.current && S && (
|
1567
|
+
M && M.current && S && (Q.current = G.width + mc[d] + (l ? 0 : fc), U.current && !U.current.style.width && (U.current.style.width = `${Tt[d]}px`));
|
1568
1568
|
}, [G, M, d, l, S]), Ne(() => {
|
1569
1569
|
if (U && U.current && S) {
|
1570
|
-
let
|
1571
|
-
h && _ && A.width > 0 ?
|
1570
|
+
let F = Tt[d];
|
1571
|
+
h && _ && A.width > 0 ? F = A.width + Q.current : f && O && K.width > 0 && (F = K.width + Q.current), D.current && clearTimeout(D.current), F !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${F}px`, F > Tt[d] && (D.current = setTimeout(() => {
|
1572
1572
|
_.current && h && (_.current.style.opacity = "1"), O.current && f && (O.current.style.opacity = "1"), D.current = null;
|
1573
|
-
}, pc * 0.8))),
|
1573
|
+
}, pc * 0.8))), F === Tt[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
|
1574
1574
|
}
|
1575
1575
|
}, [
|
1576
1576
|
A,
|
@@ -1988,7 +1988,7 @@ const lt = Z.createContext({
|
|
1988
1988
|
className: t,
|
1989
1989
|
...r
|
1990
1990
|
}) => {
|
1991
|
-
const a =
|
1991
|
+
const a = X(lt);
|
1992
1992
|
a.cellWrapper = Qt;
|
1993
1993
|
const s = wc({
|
1994
1994
|
className: t,
|
@@ -2001,7 +2001,7 @@ const lt = Z.createContext({
|
|
2001
2001
|
className: t,
|
2002
2002
|
...r
|
2003
2003
|
}) => {
|
2004
|
-
const a =
|
2004
|
+
const a = X(lt);
|
2005
2005
|
a.cellWrapper = ea;
|
2006
2006
|
const s = kc({
|
2007
2007
|
className: t,
|
@@ -2010,14 +2010,14 @@ const lt = Z.createContext({
|
|
2010
2010
|
});
|
2011
2011
|
return /* @__PURE__ */ i("tfoot", { className: s, ...r, children: e });
|
2012
2012
|
}, Xm = ({ children: e, ...t }) => {
|
2013
|
-
const r =
|
2013
|
+
const r = X(lt);
|
2014
2014
|
return r.cellWrapper = rt, /* @__PURE__ */ i("tbody", { ...t, children: e });
|
2015
2015
|
}, Zm = ({
|
2016
2016
|
children: e,
|
2017
2017
|
className: t,
|
2018
2018
|
...r
|
2019
2019
|
}) => {
|
2020
|
-
const a =
|
2020
|
+
const a = X(lt), s = Ec({
|
2021
2021
|
mode: a.mode,
|
2022
2022
|
cellWrapper: a.cellWrapper,
|
2023
2023
|
className: t
|
@@ -2030,7 +2030,7 @@ const lt = Z.createContext({
|
|
2030
2030
|
align: a,
|
2031
2031
|
...s
|
2032
2032
|
}) => {
|
2033
|
-
const n =
|
2033
|
+
const n = X(lt), o = t || (n.cellWrapper === Qt ? "th" : "td"), { mainClasses: c, alignClasses: l } = _c({
|
2034
2034
|
cellWrapper: n.cellWrapper,
|
2035
2035
|
className: r,
|
2036
2036
|
mode: n.mode,
|
@@ -2218,7 +2218,7 @@ const Je = "FOOTER_BOTTOM", Gt = "FOOTER_TOP", pt = "APP_SET_FOOTER_POSITION", Z
|
|
2218
2218
|
default:
|
2219
2219
|
return e;
|
2220
2220
|
}
|
2221
|
-
},
|
2221
|
+
}, ve = {
|
2222
2222
|
GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
|
2223
2223
|
location(latitude: $latitude, longitude: $longitude) {
|
2224
2224
|
country
|
@@ -2356,47 +2356,47 @@ const Je = "FOOTER_BOTTOM", Gt = "FOOTER_TOP", pt = "APP_SET_FOOTER_POSITION", Z
|
|
2356
2356
|
}`
|
2357
2357
|
}, He = {
|
2358
2358
|
GET_LOCATION: {
|
2359
|
-
schema:
|
2359
|
+
schema: ve.GET_LOCATION,
|
2360
2360
|
method: "location"
|
2361
2361
|
},
|
2362
2362
|
GET_CHATS: {
|
2363
|
-
schema:
|
2363
|
+
schema: ve.GET_CHATS,
|
2364
2364
|
method: "chats"
|
2365
2365
|
},
|
2366
2366
|
GET_CHATS_STATS: {
|
2367
|
-
schema:
|
2367
|
+
schema: ve.GET_CHATS_STATS,
|
2368
2368
|
method: "chatsStats"
|
2369
2369
|
},
|
2370
2370
|
GET_CHAT: {
|
2371
|
-
schema:
|
2371
|
+
schema: ve.GET_CHAT,
|
2372
2372
|
method: "chatById"
|
2373
2373
|
},
|
2374
2374
|
DELETE_CHAT: {
|
2375
|
-
schema:
|
2375
|
+
schema: ve.DELETE_CHAT,
|
2376
2376
|
method: "deleteChat"
|
2377
2377
|
},
|
2378
2378
|
SAVE_CHAT: {
|
2379
|
-
schema:
|
2379
|
+
schema: ve.SAVE_CHAT,
|
2380
2380
|
method: "saveChat"
|
2381
2381
|
},
|
2382
2382
|
GET_SERVER_CAPABILITIES: {
|
2383
|
-
schema:
|
2383
|
+
schema: ve.GET_SERVER_CAPABILITIES,
|
2384
2384
|
method: "getServerCapabilities"
|
2385
2385
|
},
|
2386
2386
|
GET_CHANGELOGS: {
|
2387
|
-
schema:
|
2387
|
+
schema: ve.GET_CHANGELOGS,
|
2388
2388
|
method: "getChangelogs"
|
2389
2389
|
},
|
2390
2390
|
GET_USER_PREFERENCES: {
|
2391
|
-
schema:
|
2391
|
+
schema: ve.GET_USER_PREFERENCES,
|
2392
2392
|
method: "getUserPreferences"
|
2393
2393
|
},
|
2394
2394
|
SET_USER_PREFERENCES: {
|
2395
|
-
schema:
|
2395
|
+
schema: ve.SET_USER_PREFERENCES,
|
2396
2396
|
method: "setUserPreferences"
|
2397
2397
|
},
|
2398
2398
|
GET_USAGE: {
|
2399
|
-
schema:
|
2399
|
+
schema: ve.GET_USAGE,
|
2400
2400
|
method: "usage"
|
2401
2401
|
}
|
2402
2402
|
}, ta = process.env.PUBLIC_SASSY_API_SERVER_URL, Jt = async ({
|
@@ -4124,7 +4124,7 @@ const rs = (e, t) => {
|
|
4124
4124
|
null,
|
4125
4125
|
(e[1] === null ? e[2] : e[1]) || {}
|
4126
4126
|
], ad = () => {
|
4127
|
-
const e =
|
4127
|
+
const e = X(Xl);
|
4128
4128
|
return he(() => Ue(Yl, e), [
|
4129
4129
|
e
|
4130
4130
|
]);
|
@@ -4171,7 +4171,7 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4171
4171
|
}), hr = {
|
4172
4172
|
dedupe: !0
|
4173
4173
|
}, as = Promise.resolve(de), cd = (e, t, r) => {
|
4174
|
-
const { cache: a, compare: s, suspense: n, fallbackData: o, revalidateOnMount: c, revalidateIfStale: l, refreshInterval: u, refreshWhenHidden: m, refreshWhenOffline: d, keepPreviousData: h } = r, [f, y, g, w] = Ae.get(a), [b, x] = na(e), S = R(!1), P = R(!1), C = R(b), v = R(t), k = R(r), E = () => k.current, I = () => E().isVisible() && E().isOnline(), [_, A, O, K] = Sn(a, b), M = R({}).current, G = j(o) ? j(r.fallback) ? de : r.fallback[b] : o,
|
4174
|
+
const { cache: a, compare: s, suspense: n, fallbackData: o, revalidateOnMount: c, revalidateIfStale: l, refreshInterval: u, refreshWhenHidden: m, refreshWhenOffline: d, keepPreviousData: h } = r, [f, y, g, w] = Ae.get(a), [b, x] = na(e), S = R(!1), P = R(!1), C = R(b), v = R(t), k = R(r), E = () => k.current, I = () => E().isVisible() && E().isOnline(), [_, A, O, K] = Sn(a, b), M = R({}).current, G = j(o) ? j(r.fallback) ? de : r.fallback[b] : o, Q = ($, B) => {
|
4175
4175
|
for (const H in M) {
|
4176
4176
|
const L = H;
|
4177
4177
|
if (L === "data") {
|
@@ -4194,7 +4194,7 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4194
4194
|
return [
|
4195
4195
|
() => {
|
4196
4196
|
const ee = B(_());
|
4197
|
-
return
|
4197
|
+
return Q(ee, re) ? (re.data = ee.data, re.isLoading = ee.isLoading, re.isValidating = ee.isValidating, re.error = ee.error, re) : (re = ee, ee);
|
4198
4198
|
},
|
4199
4199
|
() => ce
|
4200
4200
|
];
|
@@ -4203,14 +4203,14 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4203
4203
|
b
|
4204
4204
|
]), D = $l.useSyncExternalStore(W(
|
4205
4205
|
($) => O(b, (B, H) => {
|
4206
|
-
|
4206
|
+
Q(H, B) || $();
|
4207
4207
|
}),
|
4208
4208
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
4209
4209
|
[
|
4210
4210
|
a,
|
4211
4211
|
b
|
4212
4212
|
]
|
4213
|
-
), U[0], U[1]), q = !S.current,
|
4213
|
+
), U[0], U[1]), q = !S.current, F = f[b] && f[b].length > 0, ye = D.data, fe = j(ye) ? G && _n(G) ? ur(G) : G : ye, $e = D.error, Fe = R(fe), Pe = h ? j(ye) ? j(Fe.current) ? fe : Fe.current : ye : fe, Xe = F && !j($e) ? !1 : q && !j(c) ? c : E().isPaused() ? !1 : n ? j(fe) ? !1 : l : j(fe) || l, be = !!(b && t && q && Xe), We = j(D.isValidating) ? be : D.isValidating, J = j(D.isLoading) ? be : D.isLoading, te = W(
|
4214
4214
|
async ($) => {
|
4215
4215
|
const B = v.current;
|
4216
4216
|
if (!b || !B || P.current || E().isPaused())
|
@@ -4280,7 +4280,7 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4280
4280
|
[]
|
4281
4281
|
);
|
4282
4282
|
if (cr(() => {
|
4283
|
-
v.current = t, k.current = r, j(
|
4283
|
+
v.current = t, k.current = r, j(ye) || (Fe.current = ye);
|
4284
4284
|
}), cr(() => {
|
4285
4285
|
if (!b) return;
|
4286
4286
|
const $ = te.bind(de, hr);
|
@@ -4374,7 +4374,7 @@ function ns(e, t) {
|
|
4374
4374
|
return t != null ? ud(e, t) : e;
|
4375
4375
|
}
|
4376
4376
|
function hd(e) {
|
4377
|
-
const [t, r] =
|
4377
|
+
const [t, r] = z(e);
|
4378
4378
|
return N(() => {
|
4379
4379
|
Nr(e, t) || r(e);
|
4380
4380
|
}, [e, t]), t;
|
@@ -4400,7 +4400,7 @@ function md({
|
|
4400
4400
|
keepLastMessageOnError: b = !0,
|
4401
4401
|
experimental_throttle: x
|
4402
4402
|
} = {}) {
|
4403
|
-
const [S] =
|
4403
|
+
const [S] = z(g), P = t ?? S, C = typeof e == "string" ? [e, P] : P, v = hd(r ?? []), k = he(
|
4404
4404
|
() => sr(v),
|
4405
4405
|
[v]
|
4406
4406
|
), { data: E, mutate: I } = Rt(
|
@@ -4415,7 +4415,7 @@ function md({
|
|
4415
4415
|
N(() => {
|
4416
4416
|
K.current = A;
|
4417
4417
|
}, [A]);
|
4418
|
-
const { data: M = "ready", mutate: G } = Rt([C, "status"], null), { data:
|
4418
|
+
const { data: M = "ready", mutate: G } = Rt([C, "status"], null), { data: Q = void 0, mutate: U } = Rt([C, "error"], null), D = R(null), q = R({
|
4419
4419
|
credentials: h,
|
4420
4420
|
headers: f,
|
4421
4421
|
body: y
|
@@ -4427,7 +4427,7 @@ function md({
|
|
4427
4427
|
body: y
|
4428
4428
|
};
|
4429
4429
|
}, [h, f, y]);
|
4430
|
-
const
|
4430
|
+
const F = W(
|
4431
4431
|
async (V, $ = "generate") => {
|
4432
4432
|
var B, H;
|
4433
4433
|
G("submitted"), U(void 0);
|
@@ -4518,7 +4518,7 @@ function md({
|
|
4518
4518
|
originalMessageCount: ne,
|
4519
4519
|
maxSteps: c,
|
4520
4520
|
messages: re
|
4521
|
-
}) && await
|
4521
|
+
}) && await F({ messages: re });
|
4522
4522
|
},
|
4523
4523
|
[
|
4524
4524
|
I,
|
@@ -4544,7 +4544,7 @@ function md({
|
|
4544
4544
|
x,
|
4545
4545
|
P
|
4546
4546
|
]
|
4547
|
-
),
|
4547
|
+
), ye = W(
|
4548
4548
|
async (V, {
|
4549
4549
|
data: $,
|
4550
4550
|
headers: B,
|
@@ -4561,29 +4561,29 @@ function md({
|
|
4561
4561
|
experimental_attachments: re.length > 0 ? re : void 0,
|
4562
4562
|
parts: bn(V)
|
4563
4563
|
});
|
4564
|
-
return
|
4564
|
+
return F({ messages: ee, headers: B, body: H, data: $ });
|
4565
4565
|
},
|
4566
|
-
[
|
4566
|
+
[F, g]
|
4567
4567
|
), fe = W(
|
4568
4568
|
async ({ data: V, headers: $, body: B } = {}) => {
|
4569
4569
|
const H = _.current;
|
4570
4570
|
if (H.length === 0)
|
4571
4571
|
return null;
|
4572
4572
|
const L = H[H.length - 1];
|
4573
|
-
return
|
4573
|
+
return F({
|
4574
4574
|
messages: L.role === "assistant" ? H.slice(0, -1) : H,
|
4575
4575
|
headers: $,
|
4576
4576
|
body: B,
|
4577
4577
|
data: V
|
4578
4578
|
});
|
4579
4579
|
},
|
4580
|
-
[
|
4580
|
+
[F]
|
4581
4581
|
), $e = W(() => {
|
4582
4582
|
D.current && (D.current.abort(), D.current = null);
|
4583
4583
|
}, []), Fe = W(async () => {
|
4584
4584
|
const V = _.current;
|
4585
|
-
|
4586
|
-
}, [
|
4585
|
+
F({ messages: V }, "resume");
|
4586
|
+
}, [F]), Pe = W(
|
4587
4587
|
(V) => {
|
4588
4588
|
typeof V == "function" && (V = V(_.current));
|
4589
4589
|
const $ = sr(V);
|
@@ -4595,10 +4595,10 @@ function md({
|
|
4595
4595
|
typeof V == "function" && (V = V(K.current)), O(V, !1), K.current = V;
|
4596
4596
|
},
|
4597
4597
|
[O]
|
4598
|
-
), [
|
4598
|
+
), [be, We] = z(a), J = W(
|
4599
4599
|
async (V, $ = {}, B) => {
|
4600
4600
|
var H;
|
4601
|
-
if ((H = V?.preventDefault) == null || H.call(V), !
|
4601
|
+
if ((H = V?.preventDefault) == null || H.call(V), !be && !$.allowEmptySubmit)
|
4602
4602
|
return;
|
4603
4603
|
B && (q.current = {
|
4604
4604
|
...q.current,
|
@@ -4611,17 +4611,17 @@ function md({
|
|
4611
4611
|
id: g(),
|
4612
4612
|
createdAt: /* @__PURE__ */ new Date(),
|
4613
4613
|
role: "user",
|
4614
|
-
content:
|
4614
|
+
content: be,
|
4615
4615
|
experimental_attachments: L.length > 0 ? L : void 0,
|
4616
|
-
parts: [{ type: "text", text:
|
4616
|
+
parts: [{ type: "text", text: be }]
|
4617
4617
|
}),
|
4618
4618
|
headers: $.headers,
|
4619
4619
|
body: $.body,
|
4620
4620
|
data: $.data
|
4621
4621
|
};
|
4622
|
-
|
4622
|
+
F(ce), We("");
|
4623
4623
|
},
|
4624
|
-
[
|
4624
|
+
[be, g, F]
|
4625
4625
|
), te = (V) => {
|
4626
4626
|
We(V.target.value);
|
4627
4627
|
}, ie = W(
|
@@ -4640,9 +4640,9 @@ function md({
|
|
4640
4640
|
), M === "submitted" || M === "streaming")
|
4641
4641
|
return;
|
4642
4642
|
const H = B[B.length - 1];
|
4643
|
-
vn(H) &&
|
4643
|
+
vn(H) && F({ messages: B });
|
4644
4644
|
},
|
4645
|
-
[I, M,
|
4645
|
+
[I, M, F]
|
4646
4646
|
);
|
4647
4647
|
return {
|
4648
4648
|
messages: E ?? [],
|
@@ -4650,12 +4650,12 @@ function md({
|
|
4650
4650
|
setMessages: Pe,
|
4651
4651
|
data: A,
|
4652
4652
|
setData: Xe,
|
4653
|
-
error:
|
4654
|
-
append:
|
4653
|
+
error: Q,
|
4654
|
+
append: ye,
|
4655
4655
|
reload: fe,
|
4656
4656
|
stop: $e,
|
4657
4657
|
experimental_resume: Fe,
|
4658
|
-
input:
|
4658
|
+
input: be,
|
4659
4659
|
setInput: We,
|
4660
4660
|
handleInputChange: te,
|
4661
4661
|
handleSubmit: J,
|
@@ -4671,7 +4671,7 @@ const os = () => ({
|
|
4671
4671
|
onToolCall: /* @__PURE__ */ new Set()
|
4672
4672
|
}), In = Jr(null);
|
4673
4673
|
function Qe(e = {}) {
|
4674
|
-
const t =
|
4674
|
+
const t = X(In);
|
4675
4675
|
if (!t)
|
4676
4676
|
throw new Error("useAiChat must be used within a AiChatProvider");
|
4677
4677
|
const r = R(e);
|
@@ -4739,7 +4739,7 @@ const is = ({
|
|
4739
4739
|
containerId: e,
|
4740
4740
|
...t
|
4741
4741
|
}) => {
|
4742
|
-
const [r, a] =
|
4742
|
+
const [r, a] = z(At);
|
4743
4743
|
return N(() => {
|
4744
4744
|
if (!At) {
|
4745
4745
|
const s = async () => {
|
@@ -4758,9 +4758,9 @@ const is = ({
|
|
4758
4758
|
}
|
4759
4759
|
}, []), r && fr ? /* @__PURE__ */ i(fr, { containerId: e, ...t }) : null;
|
4760
4760
|
}, pd = () => {
|
4761
|
-
const [e, t] =
|
4761
|
+
const [e, t] = z(!1), [r, a] = z(!1);
|
4762
4762
|
N(() => {
|
4763
|
-
if (!
|
4763
|
+
if (!Ee() || !window.visualViewport)
|
4764
4764
|
return;
|
4765
4765
|
const o = window.visualViewport, c = window.innerHeight, l = 150, u = () => {
|
4766
4766
|
const d = c - o.height > l;
|
@@ -4772,7 +4772,7 @@ const is = ({
|
|
4772
4772
|
}, []);
|
4773
4773
|
const s = (o) => {
|
4774
4774
|
a(o);
|
4775
|
-
}, n =
|
4775
|
+
}, n = Ee() && r && e;
|
4776
4776
|
return {
|
4777
4777
|
isVirtualKeyboardVisible: e,
|
4778
4778
|
isInputFocused: r,
|
@@ -4783,7 +4783,7 @@ const is = ({
|
|
4783
4783
|
const t = pd();
|
4784
4784
|
return /* @__PURE__ */ i(Rn.Provider, { value: t, children: e });
|
4785
4785
|
}, An = () => {
|
4786
|
-
const e =
|
4786
|
+
const e = X(Rn);
|
4787
4787
|
if (e === void 0)
|
4788
4788
|
throw new Error(
|
4789
4789
|
"useVirtualKeyboardContext must be used within a VirtualKeyboardProvider"
|
@@ -4942,7 +4942,7 @@ const is = ({
|
|
4942
4942
|
state: { prompt: "", lastTriggeredTimestamp: 0 },
|
4943
4943
|
dispatch: () => {
|
4944
4944
|
}
|
4945
|
-
}),
|
4945
|
+
}), _e = Z.createContext({
|
4946
4946
|
state: {
|
4947
4947
|
provider: wd,
|
4948
4948
|
privateChat: !1,
|
@@ -5036,12 +5036,12 @@ class ze extends Error {
|
|
5036
5036
|
}
|
5037
5037
|
}
|
5038
5038
|
se(ze, "code", "ERR_JOSE_GENERIC");
|
5039
|
-
class
|
5039
|
+
class we extends ze {
|
5040
5040
|
constructor(t, r, a = "unspecified", s = "unspecified") {
|
5041
5041
|
super(t, { cause: { claim: a, reason: s, payload: r } }), se(this, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED"), se(this, "claim"), se(this, "reason"), se(this, "payload"), this.claim = a, this.reason = s, this.payload = r;
|
5042
5042
|
}
|
5043
5043
|
}
|
5044
|
-
se(
|
5044
|
+
se(we, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED");
|
5045
5045
|
let Vr = class extends ze {
|
5046
5046
|
constructor(t, r, a = "unspecified", s = "unspecified") {
|
5047
5047
|
super(t, { cause: { claim: a, reason: s, payload: r } }), se(this, "code", "ERR_JWT_EXPIRED"), se(this, "claim"), se(this, "reason"), se(this, "payload"), this.claim = a, this.reason = s, this.payload = r;
|
@@ -5770,18 +5770,18 @@ function fu(e, t, r = {}) {
|
|
5770
5770
|
throw new da("JWT Claims Set must be a top-level JSON object");
|
5771
5771
|
const { typ: s } = r;
|
5772
5772
|
if (s && (typeof e.typ != "string" || ds(e.typ) !== ds(s)))
|
5773
|
-
throw new
|
5773
|
+
throw new we('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
5774
5774
|
const { requiredClaims: n = [], issuer: o, subject: c, audience: l, maxTokenAge: u } = r, m = [...n];
|
5775
5775
|
u !== void 0 && m.push("iat"), l !== void 0 && m.push("aud"), c !== void 0 && m.push("sub"), o !== void 0 && m.push("iss");
|
5776
5776
|
for (const y of new Set(m.reverse()))
|
5777
5777
|
if (!(y in a))
|
5778
|
-
throw new
|
5778
|
+
throw new we(`missing required "${y}" claim`, a, y, "missing");
|
5779
5779
|
if (o && !(Array.isArray(o) ? o : [o]).includes(a.iss))
|
5780
|
-
throw new
|
5780
|
+
throw new we('unexpected "iss" claim value', a, "iss", "check_failed");
|
5781
5781
|
if (c && a.sub !== c)
|
5782
|
-
throw new
|
5782
|
+
throw new we('unexpected "sub" claim value', a, "sub", "check_failed");
|
5783
5783
|
if (l && !mu(a.aud, typeof l == "string" ? [l] : l))
|
5784
|
-
throw new
|
5784
|
+
throw new we('unexpected "aud" claim value', a, "aud", "check_failed");
|
5785
5785
|
let d;
|
5786
5786
|
switch (typeof r.clockTolerance) {
|
5787
5787
|
case "string":
|
@@ -5798,16 +5798,16 @@ function fu(e, t, r = {}) {
|
|
5798
5798
|
}
|
5799
5799
|
const { currentDate: h } = r, f = lu(h || /* @__PURE__ */ new Date());
|
5800
5800
|
if ((a.iat !== void 0 || u) && typeof a.iat != "number")
|
5801
|
-
throw new
|
5801
|
+
throw new we('"iat" claim must be a number', a, "iat", "invalid");
|
5802
5802
|
if (a.nbf !== void 0) {
|
5803
5803
|
if (typeof a.nbf != "number")
|
5804
|
-
throw new
|
5804
|
+
throw new we('"nbf" claim must be a number', a, "nbf", "invalid");
|
5805
5805
|
if (a.nbf > f + d)
|
5806
|
-
throw new
|
5806
|
+
throw new we('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
|
5807
5807
|
}
|
5808
5808
|
if (a.exp !== void 0) {
|
5809
5809
|
if (typeof a.exp != "number")
|
5810
|
-
throw new
|
5810
|
+
throw new we('"exp" claim must be a number', a, "exp", "invalid");
|
5811
5811
|
if (a.exp <= f - d)
|
5812
5812
|
throw new Vr('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
5813
5813
|
}
|
@@ -5816,7 +5816,7 @@ function fu(e, t, r = {}) {
|
|
5816
5816
|
if (y - d > g)
|
5817
5817
|
throw new Vr('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
5818
5818
|
if (y < 0 - d)
|
5819
|
-
throw new
|
5819
|
+
throw new we('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
|
5820
5820
|
}
|
5821
5821
|
return a;
|
5822
5822
|
}
|
@@ -5878,7 +5878,7 @@ function wu(e, t, r) {
|
|
5878
5878
|
}, [e, r, t]), a;
|
5879
5879
|
}
|
5880
5880
|
function ku(e, t) {
|
5881
|
-
const [r, a] =
|
5881
|
+
const [r, a] = z(!1), s = R(null), n = R(null), o = W(() => {
|
5882
5882
|
a((l) => (!l && (!s.current || s.current === -1) && (s.current = window.setInterval(n.current, t)), !0));
|
5883
5883
|
}, [t]), c = W(() => {
|
5884
5884
|
a(!1), window.clearInterval(s.current || -1), s.current = -1;
|
@@ -5932,7 +5932,7 @@ const Ot = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Eu = (
|
|
5932
5932
|
}) => {
|
5933
5933
|
const l = wu(() => {
|
5934
5934
|
g.stop(), y(!1);
|
5935
|
-
}), u = R(null), m = R(null), [d, h] =
|
5935
|
+
}), u = R(null), m = R(null), [d, h] = z(!1), [f, y] = z(!1), g = ku(() => {
|
5936
5936
|
y(!1);
|
5937
5937
|
}, Cu), w = Tu({
|
5938
5938
|
mode: a,
|
@@ -6067,7 +6067,7 @@ const Ru = ({
|
|
6067
6067
|
dispatch: s,
|
6068
6068
|
setChatId: n,
|
6069
6069
|
setInitialMessages: o
|
6070
|
-
} =
|
6070
|
+
} = X(_e), { id: c, setInput: l, stop: u } = Qe(), m = R(null), d = R(!1), h = W(() => {
|
6071
6071
|
n(Be()), o([]), l(""), s({
|
6072
6072
|
type: Ye,
|
6073
6073
|
payload: {
|
@@ -6129,7 +6129,7 @@ const Ru = ({
|
|
6129
6129
|
g.preventDefault(), h();
|
6130
6130
|
};
|
6131
6131
|
return N(() => {
|
6132
|
-
|
6132
|
+
Ee() || ((r === !0 || a === !0) && !d.current && m.current && (d.current = !0, m.current.focus()), r === !1 && d.current && (d.current = !1));
|
6133
6133
|
}, [r, a]), /* @__PURE__ */ i(
|
6134
6134
|
Oe,
|
6135
6135
|
{
|
@@ -6517,7 +6517,7 @@ const Ku = {
|
|
6517
6517
|
right: 0
|
6518
6518
|
};
|
6519
6519
|
function gr(e) {
|
6520
|
-
const t = Fu(), r = R(0), a = R(null), [s, n] =
|
6520
|
+
const t = Fu(), r = R(0), a = R(null), [s, n] = z(Ku), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
6521
6521
|
const l = c[0];
|
6522
6522
|
l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
6523
6523
|
a.current && t() && n(l.contentRect);
|
@@ -6582,15 +6582,15 @@ const Pt = {
|
|
6582
6582
|
radius: w,
|
6583
6583
|
variant: b,
|
6584
6584
|
animated: S
|
6585
|
-
}), k = Uu({ mode: r, raw: c, iconClassName: x, variant: b }), E = Vu({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = gr(), [O, K] = gr(), [M, G] = gr(),
|
6585
|
+
}), k = Uu({ mode: r, raw: c, iconClassName: x, variant: b }), E = Vu({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = gr(), [O, K] = gr(), [M, G] = gr(), Q = R(0), U = R(null), D = R(null), q = Wu([C, U]);
|
6586
6586
|
return Ne(() => {
|
6587
|
-
M && M.current && S && (
|
6587
|
+
M && M.current && S && (Q.current = G.width + ju[d] + (l ? 0 : Gu), U.current && !U.current.style.width && (U.current.style.width = `${Pt[d]}px`));
|
6588
6588
|
}, [G, M, d, l, S]), Ne(() => {
|
6589
6589
|
if (U && U.current && S) {
|
6590
|
-
let
|
6591
|
-
h && _ && A.width > 0 ?
|
6590
|
+
let F = Pt[d];
|
6591
|
+
h && _ && A.width > 0 ? F = A.width + Q.current : f && O && K.width > 0 && (F = K.width + Q.current), D.current && clearTimeout(D.current), F !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${F}px`, F > Pt[d] && (D.current = setTimeout(() => {
|
6592
6592
|
_.current && h && (_.current.style.opacity = "1"), O.current && f && (O.current.style.opacity = "1"), D.current = null;
|
6593
|
-
}, Ju * 0.8))),
|
6593
|
+
}, Ju * 0.8))), F === Pt[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
|
6594
6594
|
}
|
6595
6595
|
}, [
|
6596
6596
|
A,
|
@@ -6913,7 +6913,7 @@ const je = "panel", Mt = "messagebox", sh = ({
|
|
6913
6913
|
animationType: u = nh,
|
6914
6914
|
maxWidth: m = "medium"
|
6915
6915
|
}) => {
|
6916
|
-
const d = R(""), [h, f] =
|
6916
|
+
const d = R(""), [h, f] = z(
|
6917
6917
|
l ? u === gs ? { opacity: 0 } : {
|
6918
6918
|
transform: "translateY(-100vh)"
|
6919
6919
|
} : {}
|
@@ -7032,7 +7032,7 @@ const qe = ({
|
|
7032
7032
|
dispatch: a,
|
7033
7033
|
setChatId: s,
|
7034
7034
|
setInitialMessages: n
|
7035
|
-
} =
|
7035
|
+
} = X(_e), [o, c] = z(!1), [l, u] = z(!1), [m, d] = jt({
|
7036
7036
|
key: Kt + To,
|
7037
7037
|
initialValue: ""
|
7038
7038
|
}), h = (y) => {
|
@@ -7143,7 +7143,7 @@ const qe = ({
|
|
7143
7143
|
focusMode: o = "system",
|
7144
7144
|
...c
|
7145
7145
|
}, l) => {
|
7146
|
-
const [u, m] =
|
7146
|
+
const [u, m] = z(!1), [d, h] = z(!1), [f, y] = z(null), g = R([]), w = R([]), b = X(Fr), x = Ws(), S = Go(), P = Ks(), { floatingStyles: C, refs: v, context: k } = Us({
|
7147
7147
|
nodeId: S,
|
7148
7148
|
open: u,
|
7149
7149
|
onOpenChange: (q) => {
|
@@ -7167,8 +7167,8 @@ const qe = ({
|
|
7167
7167
|
listRef: w,
|
7168
7168
|
onMatch: u ? y : void 0,
|
7169
7169
|
activeIndex: f
|
7170
|
-
}), { getReferenceProps: K, getFloatingProps: M, getItemProps: G } = Fs([E, I, _, A, O]),
|
7171
|
-
noInternalClick:
|
7170
|
+
}), { getReferenceProps: K, getFloatingProps: M, getItemProps: G } = Fs([E, I, _, A, O]), Q = ys(e) === "Button" || ys(e) === "ButtonIcon", U = Q ? {
|
7171
|
+
noInternalClick: Q,
|
7172
7172
|
focusMode: o,
|
7173
7173
|
mode: n
|
7174
7174
|
} : {}, D = Z.cloneElement(
|
@@ -7414,7 +7414,7 @@ const dh = (e) => {
|
|
7414
7414
|
className: e,
|
7415
7415
|
defaultPlacement: t = "top-start"
|
7416
7416
|
}) => {
|
7417
|
-
const { dispatch: r, setChatId: a, setInitialMessages: s } =
|
7417
|
+
const { dispatch: r, setChatId: a, setInitialMessages: s } = X(_e), { dispatch: n } = X(ca), { getAccessToken: o, user: c } = Ve(), { data: l, isSuccess: u } = Xt({
|
7418
7418
|
user: c?.username,
|
7419
7419
|
getAccessToken: o
|
7420
7420
|
}), m = (f, y, g) => {
|
@@ -7493,7 +7493,7 @@ const dh = (e) => {
|
|
7493
7493
|
dispatch: a,
|
7494
7494
|
setChatId: s,
|
7495
7495
|
setInitialMessages: n
|
7496
|
-
} =
|
7496
|
+
} = X(_e), [o, c] = z(!1), [l, u] = z(!1), [m, d] = jt({
|
7497
7497
|
key: Kt + xo,
|
7498
7498
|
initialValue: ""
|
7499
7499
|
}), h = (y) => {
|
@@ -7571,7 +7571,7 @@ const dh = (e) => {
|
|
7571
7571
|
] });
|
7572
7572
|
};
|
7573
7573
|
let yr = null, br = null;
|
7574
|
-
const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = async () => (br || (br = import("./index.
|
7574
|
+
const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = async () => (br || (br = import("./index.C-cxhR4V.js").then((e) => e.utilities)), br), hh = async () => {
|
7575
7575
|
try {
|
7576
7576
|
await Promise.all([eo(), to()]);
|
7577
7577
|
} catch {
|
@@ -7598,14 +7598,14 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
7598
7598
|
const { user: t, getAccessToken: r } = Ve(), {
|
7599
7599
|
dispatch: a,
|
7600
7600
|
state: { tokenUsage: s, provider: n, privateChat: o }
|
7601
|
-
} =
|
7601
|
+
} = X(_e), { messages: c, id: l } = Qe(), { state: u } = X(ia), { refetch: m } = Nn({
|
7602
7602
|
enabled: !1,
|
7603
7603
|
user: t?.username || "",
|
7604
7604
|
searchString: u.searchString,
|
7605
7605
|
sortDirection: u.sortDirection,
|
7606
7606
|
sortedCell: u.sortedCell,
|
7607
7607
|
getAccessToken: r
|
7608
|
-
}), [d, h] =
|
7608
|
+
}), [d, h] = z(!1), [f, y] = z(!1), g = async () => {
|
7609
7609
|
try {
|
7610
7610
|
if (l && c && n) {
|
7611
7611
|
const b = c.filter(({ content: x }) => x).map(({ role: x, content: S, id: P }) => ({
|
@@ -7682,7 +7682,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
7682
7682
|
}) => {
|
7683
7683
|
const {
|
7684
7684
|
state: { loading: t, streaming: r }
|
7685
|
-
} =
|
7685
|
+
} = X(_e);
|
7686
7686
|
return /* @__PURE__ */ i(
|
7687
7687
|
Oe,
|
7688
7688
|
{
|
@@ -7805,10 +7805,10 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
7805
7805
|
] }), oo = 24, Sh = 500, io = 2, Th = 5, xh = oo * io, vs = Th * oo, Ch = "ready", Ih = "streaming", Rh = "error", Ah = "submitted", Lt = (e) => {
|
7806
7806
|
e.current && (e.current.style.height = `${xh}px`);
|
7807
7807
|
}, Nh = () => {
|
7808
|
-
const { user: e, getAccessToken: t } = Ve(), { setInputFocus: r } = An(), [a, s] =
|
7808
|
+
const { user: e, getAccessToken: t } = Ve(), { setInputFocus: r } = An(), [a, s] = z(!1), [n, o] = z(null), [c, l] = z(!1), [u, m] = z(!1), {
|
7809
7809
|
dispatch: d,
|
7810
7810
|
state: { reasoning: h, streaming: f, aborted: y, lastResetTimestamp: g, attachments: w }
|
7811
|
-
} =
|
7811
|
+
} = X(_e), { state: b, dispatch: x } = X(ca), { state: S } = X(ia), { refetch: P } = Nn({
|
7812
7812
|
enabled: !1,
|
7813
7813
|
user: e?.username || "",
|
7814
7814
|
searchString: S.searchString,
|
@@ -7823,11 +7823,11 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
7823
7823
|
}), {
|
7824
7824
|
input: M,
|
7825
7825
|
setInput: G,
|
7826
|
-
handleInputChange:
|
7826
|
+
handleInputChange: Q,
|
7827
7827
|
handleSubmit: U,
|
7828
7828
|
setMessages: D,
|
7829
7829
|
status: q,
|
7830
|
-
id:
|
7830
|
+
id: F
|
7831
7831
|
} = Qe({
|
7832
7832
|
onFinish: (J, { usage: te }) => {
|
7833
7833
|
P(), d({
|
@@ -7837,7 +7837,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
7837
7837
|
}
|
7838
7838
|
});
|
7839
7839
|
}
|
7840
|
-
}),
|
7840
|
+
}), ye = W(
|
7841
7841
|
async (J) => {
|
7842
7842
|
J === Ch && d({
|
7843
7843
|
type: at,
|
@@ -7877,8 +7877,8 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
7877
7877
|
[d, D, y]
|
7878
7878
|
);
|
7879
7879
|
N(() => {
|
7880
|
-
q &&
|
7881
|
-
}, [q,
|
7880
|
+
q && ye(q);
|
7881
|
+
}, [q, ye]), N(() => {
|
7882
7882
|
C?.sendOnEnter !== void 0 && m(C.sendOnEnter);
|
7883
7883
|
}, [C]);
|
7884
7884
|
const fe = W(() => {
|
@@ -7939,7 +7939,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
7939
7939
|
}), k.current && (k.current.value = "");
|
7940
7940
|
}, Xe = W(() => {
|
7941
7941
|
k.current && (k.current.value = ""), o(null);
|
7942
|
-
}, []),
|
7942
|
+
}, []), be = async (J) => {
|
7943
7943
|
J.preventDefault(), Lt(A);
|
7944
7944
|
const te = await t();
|
7945
7945
|
let ie;
|
@@ -7953,7 +7953,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
7953
7953
|
headers: {
|
7954
7954
|
"Content-Type": "application/json",
|
7955
7955
|
authorization: `Bearer ${te}`,
|
7956
|
-
[Rd]:
|
7956
|
+
[Rd]: F
|
7957
7957
|
},
|
7958
7958
|
body: {
|
7959
7959
|
reasoning: h
|
@@ -7961,13 +7961,13 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
7961
7961
|
experimental_attachments: ie
|
7962
7962
|
}), Xe();
|
7963
7963
|
}, We = (J) => {
|
7964
|
-
fe(),
|
7964
|
+
fe(), Q(J);
|
7965
7965
|
};
|
7966
7966
|
return Qr([
|
7967
7967
|
[
|
7968
7968
|
"mod+K",
|
7969
7969
|
() => {
|
7970
|
-
A && A.current && !
|
7970
|
+
A && A.current && !Ee() && A.current.focus();
|
7971
7971
|
}
|
7972
7972
|
]
|
7973
7973
|
]), N(() => {
|
@@ -7976,7 +7976,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
7976
7976
|
J.indexOf(Ca) !== -1 ? navigator.clipboard.readText().then((ie) => {
|
7977
7977
|
const $ = ie.startsWith("http://") || ie.startsWith("https://") ? ie : `"""${ie}"""`;
|
7978
7978
|
G(J.replace(Ca, $));
|
7979
|
-
}) : G(J), !
|
7979
|
+
}) : G(J), !Ee() && A.current && A.current.focus(), x({
|
7980
7980
|
type: Cs
|
7981
7981
|
});
|
7982
7982
|
}
|
@@ -7987,7 +7987,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
7987
7987
|
}
|
7988
7988
|
g > 0 && g !== I.current ? (I.current = g, setTimeout(() => {
|
7989
7989
|
A.current && (!M && Lt(A), A.current.focus());
|
7990
|
-
}, Sh)) : f === !1 && !M && (Lt(A), !
|
7990
|
+
}, Sh)) : f === !1 && !M && (Lt(A), !Ee() && A.current && A.current.focus());
|
7991
7991
|
}, [g, f, M]), N(() => {
|
7992
7992
|
b.lastTriggeredTimestamp && setTimeout(() => {
|
7993
7993
|
fe();
|
@@ -8018,7 +8018,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
8018
8018
|
children: /* @__PURE__ */ i("p", { className: "m-0", children: v.current })
|
8019
8019
|
}
|
8020
8020
|
),
|
8021
|
-
/* @__PURE__ */ i("div", { className: K.wrapper, ref: _, children: /* @__PURE__ */ T("form", { onSubmit:
|
8021
|
+
/* @__PURE__ */ i("div", { className: K.wrapper, ref: _, children: /* @__PURE__ */ T("form", { onSubmit: be, children: [
|
8022
8022
|
/* @__PURE__ */ i("div", { id: O, className: "sr-only", children: Ge() ? Ia : u ? Ra : Aa }),
|
8023
8023
|
/* @__PURE__ */ T("div", { className: "relative", children: [
|
8024
8024
|
/* @__PURE__ */ i(
|
@@ -8032,13 +8032,13 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
8032
8032
|
onChange: We,
|
8033
8033
|
value: M,
|
8034
8034
|
onKeyDown: Hi([
|
8035
|
-
[u ? "enter" : "mod+Enter",
|
8035
|
+
[u ? "enter" : "mod+Enter", be]
|
8036
8036
|
]),
|
8037
8037
|
onFocus: () => {
|
8038
|
-
|
8038
|
+
Ee() && (document.body.setAttribute("data-input-focused", "true"), r(!0));
|
8039
8039
|
},
|
8040
8040
|
onBlur: () => {
|
8041
|
-
|
8041
|
+
Ee() && (document.body.removeAttribute("data-input-focused"), r(!1));
|
8042
8042
|
},
|
8043
8043
|
className: K.textArea,
|
8044
8044
|
"aria-labelledby": O
|
@@ -8080,12 +8080,12 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
8080
8080
|
}, mt = "--sassy-bottom", Oh = ({ isComponent: e }) => {
|
8081
8081
|
const {
|
8082
8082
|
state: { loading: t, streaming: r, restoring: a }
|
8083
|
-
} =
|
8083
|
+
} = X(_e), {
|
8084
8084
|
state: { footerHeight: s, footerPosition: n },
|
8085
8085
|
dispatch: o
|
8086
|
-
} =
|
8086
|
+
} = X(la), [c] = z(
|
8087
8087
|
() => Na[Math.floor(Math.random() * Na.length)]
|
8088
|
-
), { messages: l } = Qe(), { height: u } = qi(), { height: m } = Yi(), [d, h] = Js(), f = he(() =>
|
8088
|
+
), { messages: l } = Qe(), { height: u } = qi(), { height: m } = Yi(), [d, h] = Js(), f = he(() => Ee(), []), y = u - m, g = he(() => {
|
8089
8089
|
const w = f ? Oo : As;
|
8090
8090
|
return y > 0 && y < 100 ? No : w;
|
8091
8091
|
}, [y, f]);
|
@@ -8196,7 +8196,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
8196
8196
|
state: { privateChat: r },
|
8197
8197
|
setChatId: a,
|
8198
8198
|
setInitialMessages: s
|
8199
|
-
} =
|
8199
|
+
} = X(_e), { getAccessToken: n, user: o } = Ve(), { status: c } = Qe(), [l, u] = z(!1), m = W(() => {
|
8200
8200
|
l || (hh(), u(!0));
|
8201
8201
|
}, [l]), { isSuccess: d, refetch: h, data: f } = Xt({
|
8202
8202
|
user: o?.username,
|
@@ -8267,21 +8267,21 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
8267
8267
|
}
|
8268
8268
|
) : /* @__PURE__ */ i("div", { className: e, children: b });
|
8269
8269
|
}, Ph = it(
|
8270
|
-
() => import("./ProfileEntry.
|
8270
|
+
() => import("./ProfileEntry.B2zkafi7.js").then((e) => ({
|
8271
8271
|
default: e.Profile
|
8272
8272
|
}))
|
8273
8273
|
), Mh = it(
|
8274
|
-
() => import("./SettingsEntry.
|
8274
|
+
() => import("./SettingsEntry.naNpxEMO.js").then((e) => ({
|
8275
8275
|
default: e.SettingsPanel
|
8276
8276
|
}))
|
8277
8277
|
), Lh = it(
|
8278
|
-
() => import("./HistoryEntry
|
8278
|
+
() => import("./HistoryEntry.Cxmb9IYc.js").then((e) => ({
|
8279
8279
|
default: e.HistoryPanel
|
8280
8280
|
}))
|
8281
8281
|
), Dh = it(
|
8282
|
-
() => import("./AboutEntry.
|
8282
|
+
() => import("./AboutEntry.DxPtaPEk.js").then((e) => ({ default: e.About }))
|
8283
8283
|
), Bh = it(
|
8284
|
-
() => import("./UsageEntry.
|
8284
|
+
() => import("./UsageEntry.sGs1a2k3.js").then((e) => ({ default: e.Usage }))
|
8285
8285
|
), Uh = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ i($s, { fallback: /* @__PURE__ */ i("div", {}), children: (() => {
|
8286
8286
|
switch (e) {
|
8287
8287
|
case "profile":
|
@@ -8300,8 +8300,8 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
|
|
8300
8300
|
})() }) : null, Vh = ({
|
8301
8301
|
isComponent: e = !1
|
8302
8302
|
}) => {
|
8303
|
-
const { logout: t, getAccessToken: r } = Ve(), [a, s] =
|
8304
|
-
u || (import("./ProfileEntry.
|
8303
|
+
const { logout: t, getAccessToken: r } = Ve(), [a, s] = z(null), [n, o] = z(!1), [c, l] = z(!1), [u, m] = z(!1), d = W(() => {
|
8304
|
+
u || (import("./ProfileEntry.B2zkafi7.js"), import("./SettingsEntry.naNpxEMO.js"), import("./HistoryEntry.Cxmb9IYc.js"), import("./AboutEntry.DxPtaPEk.js"), import("./UsageEntry.sGs1a2k3.js"), m(!0));
|
8305
8305
|
}, [u]), h = W((w) => {
|
8306
8306
|
s(w);
|
8307
8307
|
}, []), f = W(() => {
|
@@ -8866,7 +8866,7 @@ const am = {
|
|
8866
8866
|
right: 0
|
8867
8867
|
};
|
8868
8868
|
function wr(e) {
|
8869
|
-
const t = tm(), r = R(0), a = R(null), [s, n] =
|
8869
|
+
const t = tm(), r = R(0), a = R(null), [s, n] = z(am), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
8870
8870
|
const l = c[0];
|
8871
8871
|
l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
8872
8872
|
a.current && t() && n(l.contentRect);
|
@@ -8931,15 +8931,15 @@ const Bt = {
|
|
8931
8931
|
radius: w,
|
8932
8932
|
variant: b,
|
8933
8933
|
animated: S
|
8934
|
-
}), k = Qh({ mode: r, raw: c, iconClassName: x, variant: b }), E = Xh({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = wr(), [O, K] = wr(), [M, G] = wr(),
|
8934
|
+
}), k = Qh({ mode: r, raw: c, iconClassName: x, variant: b }), E = Xh({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = wr(), [O, K] = wr(), [M, G] = wr(), Q = R(0), U = R(null), D = R(null), q = rm([C, U]);
|
8935
8935
|
return Ne(() => {
|
8936
|
-
M && M.current && S && (
|
8936
|
+
M && M.current && S && (Q.current = G.width + sm[d] + (l ? 0 : nm), U.current && !U.current.style.width && (U.current.style.width = `${Bt[d]}px`));
|
8937
8937
|
}, [G, M, d, l, S]), Ne(() => {
|
8938
8938
|
if (U && U.current && S) {
|
8939
|
-
let
|
8940
|
-
h && _ && A.width > 0 ?
|
8939
|
+
let F = Bt[d];
|
8940
|
+
h && _ && A.width > 0 ? F = A.width + Q.current : f && O && K.width > 0 && (F = K.width + Q.current), D.current && clearTimeout(D.current), F !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${F}px`, F > Bt[d] && (D.current = setTimeout(() => {
|
8941
8941
|
_.current && h && (_.current.style.opacity = "1"), O.current && f && (O.current.style.opacity = "1"), D.current = null;
|
8942
|
-
}, om * 0.8))),
|
8942
|
+
}, om * 0.8))), F === Bt[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
|
8943
8943
|
}
|
8944
8944
|
}, [
|
8945
8945
|
A,
|
@@ -9239,7 +9239,7 @@ const dm = ({ kind: e, noMaxWidth: t }) => p("px-4 py-2", {
|
|
9239
9239
|
noMaxWidth: u = !1,
|
9240
9240
|
tail: m = !1
|
9241
9241
|
}) => {
|
9242
|
-
const [d, h] =
|
9242
|
+
const [d, h] = z(!1), f = fm({
|
9243
9243
|
kind: t,
|
9244
9244
|
className: r,
|
9245
9245
|
contentClassName: a,
|
@@ -9752,7 +9752,7 @@ const Am = {
|
|
9752
9752
|
right: 0
|
9753
9753
|
};
|
9754
9754
|
function kr(e) {
|
9755
|
-
const t = Im(), r = R(0), a = R(null), [s, n] =
|
9755
|
+
const t = Im(), r = R(0), a = R(null), [s, n] = z(Am), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
9756
9756
|
const l = c[0];
|
9757
9757
|
l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
9758
9758
|
a.current && t() && n(l.contentRect);
|
@@ -9817,15 +9817,15 @@ const Ut = {
|
|
9817
9817
|
radius: w,
|
9818
9818
|
variant: b,
|
9819
9819
|
animated: S
|
9820
|
-
}), k = Tm({ mode: r, raw: c, iconClassName: x, variant: b }), E = xm({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = kr(), [O, K] = kr(), [M, G] = kr(),
|
9820
|
+
}), k = Tm({ mode: r, raw: c, iconClassName: x, variant: b }), E = xm({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = kr(), [O, K] = kr(), [M, G] = kr(), Q = R(0), U = R(null), D = R(null), q = Rm([C, U]);
|
9821
9821
|
return Ne(() => {
|
9822
|
-
M && M.current && S && (
|
9822
|
+
M && M.current && S && (Q.current = G.width + Nm[d] + (l ? 0 : Om), U.current && !U.current.style.width && (U.current.style.width = `${Ut[d]}px`));
|
9823
9823
|
}, [G, M, d, l, S]), Ne(() => {
|
9824
9824
|
if (U && U.current && S) {
|
9825
|
-
let
|
9826
|
-
h && _ && A.width > 0 ?
|
9825
|
+
let F = Ut[d];
|
9826
|
+
h && _ && A.width > 0 ? F = A.width + Q.current : f && O && K.width > 0 && (F = K.width + Q.current), D.current && clearTimeout(D.current), F !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${F}px`, F > Ut[d] && (D.current = setTimeout(() => {
|
9827
9827
|
_.current && h && (_.current.style.opacity = "1"), O.current && f && (O.current.style.opacity = "1"), D.current = null;
|
9828
|
-
}, $m * 0.8))),
|
9828
|
+
}, $m * 0.8))), F === Ut[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
|
9829
9829
|
}
|
9830
9830
|
}, [
|
9831
9831
|
A,
|
@@ -9962,7 +9962,7 @@ const Mm = 200, Lm = ({
|
|
9962
9962
|
mode: r = "system",
|
9963
9963
|
focusMode: a = "system"
|
9964
9964
|
}) => {
|
9965
|
-
const [s, n] =
|
9965
|
+
const [s, n] = z(!1);
|
9966
9966
|
if (typeof e != "string")
|
9967
9967
|
return e;
|
9968
9968
|
const { string: o, isTruncated: c } = Lm({
|
@@ -10012,7 +10012,7 @@ const Bm = ({ content: e }) => /* @__PURE__ */ i(
|
|
10012
10012
|
), Ts = 1, Um = 150, Vm = it(
|
10013
10013
|
() => import(
|
10014
10014
|
/* webpackChunkName: "LazyMessageAssistant" */
|
10015
|
-
"./ChatBubbleAssistant.
|
10015
|
+
"./ChatBubbleAssistant.CQbS8Zq_.js"
|
10016
10016
|
)
|
10017
10017
|
), Hm = Z.memo(
|
10018
10018
|
({
|
@@ -10023,22 +10023,22 @@ const Bm = ({ content: e }) => /* @__PURE__ */ i(
|
|
10023
10023
|
isLastAssistantMessage: s = !1,
|
10024
10024
|
status: n
|
10025
10025
|
}) => {
|
10026
|
-
const
|
10027
|
-
|
10028
|
-
|
10026
|
+
const [o, c] = z(!0), l = R(Date.now()), [u] = z(
|
10027
|
+
() => s && (n === "streaming" || n === "submitted")
|
10028
|
+
);
|
10029
10029
|
return N(() => {
|
10030
|
-
if (s &&
|
10031
|
-
const d = Date.now() -
|
10030
|
+
if (s && o && t && t.trim().length >= Ts) {
|
10031
|
+
const d = Date.now() - l.current, h = Um - d;
|
10032
10032
|
if (h > 0) {
|
10033
10033
|
const f = setTimeout(
|
10034
|
-
() =>
|
10034
|
+
() => c(!1),
|
10035
10035
|
h
|
10036
10036
|
);
|
10037
10037
|
return () => clearTimeout(f);
|
10038
10038
|
}
|
10039
|
-
|
10039
|
+
c(!1);
|
10040
10040
|
}
|
10041
|
-
}, [t,
|
10041
|
+
}, [t, o, s]), e === On && t ? /* @__PURE__ */ i(Bm, { content: t }) : (e === qt || e === Tr) && s && (n === "submitted" || n === "streaming") && o ? /* @__PURE__ */ i(ya, { tail: !0, children: /* @__PURE__ */ i(ho, { type: "dots" }) }) : (e === qt || e === Tr) && t && t.trim().length >= Ts ? /* @__PURE__ */ i($s, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(
|
10042
10042
|
Vm,
|
10043
10043
|
{
|
10044
10044
|
role: e,
|
@@ -10046,7 +10046,7 @@ const Bm = ({ content: e }) => /* @__PURE__ */ i(
|
|
10046
10046
|
annotations: r,
|
10047
10047
|
toolName: a,
|
10048
10048
|
isLastAssistantMessage: s,
|
10049
|
-
smooth:
|
10049
|
+
smooth: u
|
10050
10050
|
}
|
10051
10051
|
) }) : null;
|
10052
10052
|
}
|
@@ -10089,13 +10089,13 @@ const Bm = ({ content: e }) => /* @__PURE__ */ i(
|
|
10089
10089
|
}, Fm = () => {
|
10090
10090
|
const { isAuthenticated: e } = Ve(), { ref: t, inViewport: r } = Fi(), a = R(null), s = R(null), { isVirtualKeyboardActive: n } = An(), {
|
10091
10091
|
state: { footerPosition: o, footerHeight: c, footerOffset: l }
|
10092
|
-
} =
|
10092
|
+
} = X(la), {
|
10093
10093
|
state: { loading: u }
|
10094
|
-
} =
|
10094
|
+
} = X(_e), { messages: m } = Qe(), d = R(0), h = Po({
|
10095
10095
|
isAuthenticated: e,
|
10096
10096
|
extraClass: "rounded-b-md relative border-b-16 border-slate-900"
|
10097
10097
|
}), y = (!m || m.length === 0) && // no current chat session OR no messages
|
10098
|
-
|
10098
|
+
Ee() && // AND isProbablyiPhone() is true
|
10099
10099
|
n ? "iphone-logo-conditional" : Ge() ? "mt-4" : "", g = W(() => {
|
10100
10100
|
s.current && s.current.scrollIntoView({
|
10101
10101
|
behavior: "smooth",
|
@@ -10127,14 +10127,14 @@ function go({
|
|
10127
10127
|
isComponent: e = !1,
|
10128
10128
|
headerHeight: t = 0
|
10129
10129
|
}) {
|
10130
|
-
const { user: r, getAccessToken: a } = Ve(), [s, n] =
|
10130
|
+
const { user: r, getAccessToken: a } = Ve(), [s, n] = z(`${$a}px`), [o, c] = Js(), [l, u] = z(Be()), [m, d] = z([]), [h] = jt({
|
10131
10131
|
key: Kt + Vo,
|
10132
10132
|
initialValue: ""
|
10133
10133
|
}), [f] = jt({
|
10134
10134
|
key: Kt + Uo,
|
10135
10135
|
initialValue: ft.ASC
|
10136
10136
|
}), y = he(() => {
|
10137
|
-
const E =
|
10137
|
+
const E = Ee();
|
10138
10138
|
return {
|
10139
10139
|
footerPosition: E ? Je : Gt,
|
10140
10140
|
footerHeight: 0,
|
@@ -10193,7 +10193,7 @@ function go({
|
|
10193
10193
|
{
|
10194
10194
|
value: { state: S, dispatch: P },
|
10195
10195
|
children: /* @__PURE__ */ i(
|
10196
|
-
|
10196
|
+
_e.Provider,
|
10197
10197
|
{
|
10198
10198
|
value: {
|
10199
10199
|
state: C,
|
@@ -10270,7 +10270,7 @@ export {
|
|
10270
10270
|
Hh as ButtonScroll,
|
10271
10271
|
tn as CHAT_SET_PROVIDER,
|
10272
10272
|
at as CHAT_SET_STATUS,
|
10273
|
-
|
10273
|
+
_e as ChatContext,
|
10274
10274
|
qe as ConfirmationPanel,
|
10275
10275
|
qm as De,
|
10276
10276
|
jt as E,
|