@versini/sassysaint 5.5.31 → 5.5.32
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/{App.3S5z9eA2.js → App.Df2lQC7R.js} +619 -608
- package/dist/chunks/{HeaderToolbar.BL6VBjoM.js → HeaderToolbar.ClkzdP_R.js} +4 -4
- package/dist/chunks/{MarkdownWithExtra.CZf_39jQ.js → MarkdownWithExtra.Dtxi1OCx.js} +2 -2
- package/dist/chunks/{MessageAssistant.Dc4io3BJ.js → MessageAssistant.BCLp8Epo.js} +3 -3
- package/dist/chunks/{index.jHs4IE9w.js → index.kTiw0vKw.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as x, jsx as i, Fragment as Oe } from "react/jsx-runtime";
|
|
2
|
-
import { g as ie, ACTION_RESTORE as Kr, ACTION_MESSAGE as ye, ROLE_ASSISTANT as ve, ACTION_RESET as
|
|
2
|
+
import { g as ie, ACTION_RESTORE as Kr, ACTION_MESSAGE as ye, ROLE_ASSISTANT as ve, ACTION_RESET as ft, ACTION_MODEL as cr, ACTION_STREAMING as lr, ACTION_SORT as Jr, ACTION_SEARCH as Yr, ACTION_RESET_PROMPT as dr, ACTION_TOGGLE_PROMPT as ur, DEFAULT_AI_ENGINE as ke, P as Ee, un as xe, ENGINE_ANTHROPIC as He, ENGINE_OPENAI as $t, PROMPT_CLASSNAME as Zr, PROMPT_EDITABLE_AREA_CLASSNAME as Xr, ROLE_SYSTEM as Qr, ROLE_INTERNAL as pt, ROLE_HIDDEN as ea, STATS_SEPARATOR as Dt, CLIPBOARD_PROMPT as Vt, TYPE_QUESTION as ta, APP_NAME as ra, ERROR_MESSAGE as aa, ROLE_USER as et, isLastMessageFromRole as na, getMessageContaintWrapperClass as oa, Logo as sa, getMainPaddingClass as Pt, r as ia, LOCAL_STORAGE_PREFIX as Ut, LOCAL_STORAGE_SEARCH as ca, LOCAL_STORAGE_SORT as la } from "./index.kTiw0vKw.js";
|
|
3
3
|
import l from "clsx";
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
4
|
+
import * as tt from "react";
|
|
5
|
+
import M, { useRef as O, useEffect as A, useCallback as K, useSyncExternalStore as da, useMemo as bt, useState as W, useId as ua, useContext as B, createContext as ma, useLayoutEffect as mr, useDebugValue as ga, forwardRef as gr, lazy as hr, Suspense as rt, useReducer as We } from "react";
|
|
6
6
|
import { useFloatingTree as fr, useFloatingNodeId as ha, useListItem as pr, useFloating as fa, offset as pa, flip as ba, shift as ya, autoUpdate as va, useClick as ka, useRole as _a, useDismiss as Ea, useListNavigation as xa, useTypeahead as Sa, useInteractions as wa, useMergeRefs as br, FloatingNode as Ta, FloatingList as Na, FloatingPortal as Ca, FloatingFocusManager as Ra, FloatingTree as Ia } from "@floating-ui/react";
|
|
7
7
|
const La = ({
|
|
8
8
|
className: e,
|
|
@@ -171,9 +171,9 @@ const za = "av-header", $a = ({
|
|
|
171
171
|
sticky: o = !1,
|
|
172
172
|
noBorder: s = !1,
|
|
173
173
|
noMargin: c = !1,
|
|
174
|
-
noPadding:
|
|
174
|
+
noPadding: g = !1
|
|
175
175
|
}) => {
|
|
176
|
-
const
|
|
176
|
+
const d = l(
|
|
177
177
|
za,
|
|
178
178
|
{
|
|
179
179
|
"border-border-accent": a === "dark" && !r && !n && !s,
|
|
@@ -189,12 +189,12 @@ const za = "av-header", $a = ({
|
|
|
189
189
|
"sticky top-0 z-50": o
|
|
190
190
|
},
|
|
191
191
|
t
|
|
192
|
-
),
|
|
192
|
+
), h = l({
|
|
193
193
|
"mt-0": !c,
|
|
194
|
-
"p-2": !
|
|
194
|
+
"p-2": !g,
|
|
195
195
|
"flex flex-col w-full md:mx-auto md:max-w-4xl": !r
|
|
196
196
|
});
|
|
197
|
-
return /* @__PURE__ */ i("header", { className:
|
|
197
|
+
return /* @__PURE__ */ i("header", { className: d, children: /* @__PURE__ */ i("div", { className: h, children: e }) });
|
|
198
198
|
};
|
|
199
199
|
function Da(e) {
|
|
200
200
|
const t = e.toLowerCase().split("+").map((o) => o.trim()), r = {
|
|
@@ -210,15 +210,15 @@ function Da(e) {
|
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
function Va(e, t) {
|
|
213
|
-
const { alt: r, ctrl: a, meta: n, mod: o, shift: s, key: c } = e, { altKey:
|
|
214
|
-
if (r !==
|
|
213
|
+
const { alt: r, ctrl: a, meta: n, mod: o, shift: s, key: c } = e, { altKey: g, ctrlKey: d, metaKey: h, shiftKey: m, key: u } = t;
|
|
214
|
+
if (r !== g)
|
|
215
215
|
return !1;
|
|
216
216
|
if (o) {
|
|
217
|
-
if (!
|
|
217
|
+
if (!d && !h)
|
|
218
218
|
return !1;
|
|
219
|
-
} else if (a !==
|
|
219
|
+
} else if (a !== d || n !== h)
|
|
220
220
|
return !1;
|
|
221
|
-
return s !==
|
|
221
|
+
return s !== m ? !1 : !!(c && (u.toLowerCase() === c.toLowerCase() || t.code.replace("Key", "").toLowerCase() === c.toLowerCase()));
|
|
222
222
|
}
|
|
223
223
|
function Pa(e) {
|
|
224
224
|
return (t) => Va(Da(e), t);
|
|
@@ -232,10 +232,10 @@ function Ua(e) {
|
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
234
|
function Fa() {
|
|
235
|
-
const e =
|
|
235
|
+
const e = O(!1);
|
|
236
236
|
return A(() => (e.current = !0, () => {
|
|
237
237
|
e.current = !1;
|
|
238
|
-
}), []),
|
|
238
|
+
}), []), K(() => e.current, []);
|
|
239
239
|
}
|
|
240
240
|
function yr(e, t) {
|
|
241
241
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
@@ -252,7 +252,7 @@ function jt({
|
|
|
252
252
|
key: e,
|
|
253
253
|
initialValue: t
|
|
254
254
|
}) {
|
|
255
|
-
const r = da(Wa, () => Gt(e)), a =
|
|
255
|
+
const r = da(Wa, () => Gt(e)), a = K(
|
|
256
256
|
(s) => {
|
|
257
257
|
try {
|
|
258
258
|
const c = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
@@ -262,9 +262,9 @@ function jt({
|
|
|
262
262
|
}
|
|
263
263
|
},
|
|
264
264
|
[e, r]
|
|
265
|
-
), n =
|
|
265
|
+
), n = K(() => {
|
|
266
266
|
a(t);
|
|
267
|
-
}, [t, a]), o =
|
|
267
|
+
}, [t, a]), o = K(() => {
|
|
268
268
|
a(null);
|
|
269
269
|
}, [a]);
|
|
270
270
|
return A(() => {
|
|
@@ -276,7 +276,7 @@ function jt({
|
|
|
276
276
|
}, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
|
|
277
277
|
}
|
|
278
278
|
function Ga(e) {
|
|
279
|
-
return
|
|
279
|
+
return bt(() => e.every((t) => t == null) ? () => {
|
|
280
280
|
} : (t) => {
|
|
281
281
|
e.forEach((r) => {
|
|
282
282
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
@@ -294,10 +294,10 @@ const ja = {
|
|
|
294
294
|
right: 0
|
|
295
295
|
};
|
|
296
296
|
function qa(e) {
|
|
297
|
-
const t = Fa(), r =
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
a.current && t() && o(
|
|
297
|
+
const t = Fa(), r = O(0), a = O(null), [n, o] = W(ja), s = bt(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
|
298
|
+
const g = c[0];
|
|
299
|
+
g && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
300
|
+
a.current && t() && o(g.contentRect);
|
|
301
301
|
}));
|
|
302
302
|
}), [t]);
|
|
303
303
|
return A(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
@@ -312,16 +312,16 @@ function Ka({
|
|
|
312
312
|
},
|
|
313
313
|
initialControlledDelay: n = 0
|
|
314
314
|
}) {
|
|
315
|
-
const [o, s] = W(!1), [c,
|
|
315
|
+
const [o, s] = W(!1), [c, g] = W(
|
|
316
316
|
t !== void 0 ? t : r
|
|
317
|
-
),
|
|
318
|
-
|
|
317
|
+
), d = (h) => {
|
|
318
|
+
g(h), a == null || a(h);
|
|
319
319
|
};
|
|
320
320
|
return A(() => {
|
|
321
321
|
(async () => e !== void 0 && !o && n > 0 && (await new Promise(
|
|
322
|
-
(
|
|
322
|
+
(h) => setTimeout(h, n)
|
|
323
323
|
), s(!0)))();
|
|
324
|
-
}, [e, n, o]), e !== void 0 ? !o && n > 0 ? ["", a, !0] : [e, a, !0] : [c,
|
|
324
|
+
}, [e, n, o]), e !== void 0 ? !o && n > 0 ? ["", a, !0] : [e, a, !0] : [c, d, !1];
|
|
325
325
|
}
|
|
326
326
|
function Ja(e) {
|
|
327
327
|
return ua();
|
|
@@ -339,7 +339,7 @@ try {
|
|
|
339
339
|
});
|
|
340
340
|
} catch {
|
|
341
341
|
}
|
|
342
|
-
const Be = "thead",
|
|
342
|
+
const Be = "thead", yt = "tfoot", me = "tbody", be = {
|
|
343
343
|
ASC: "asc",
|
|
344
344
|
DESC: "desc"
|
|
345
345
|
}, Ya = ({
|
|
@@ -407,7 +407,7 @@ const Be = "thead", bt = "tfoot", me = "tbody", be = {
|
|
|
407
407
|
mode: e,
|
|
408
408
|
className: t,
|
|
409
409
|
cellWrapper: r
|
|
410
|
-
}) => r === Be || r ===
|
|
410
|
+
}) => r === Be || r === yt ? l(
|
|
411
411
|
{
|
|
412
412
|
"bg-table-head-dark": e === "dark" || e === "system",
|
|
413
413
|
"bg-table-head-light": e === "light" || e === "alt-system",
|
|
@@ -446,7 +446,7 @@ const Be = "thead", bt = "tfoot", me = "tbody", be = {
|
|
|
446
446
|
"text-copy-dark": a === "light" || a === "alt-system",
|
|
447
447
|
"dark:text-copy-dark": a === "system",
|
|
448
448
|
"dark:text-copy-light": a === "alt-system",
|
|
449
|
-
"px-4 py-3": !r && (e === Be || e ===
|
|
449
|
+
"px-4 py-3": !r && (e === Be || e === yt),
|
|
450
450
|
"p-4": !r && e === me,
|
|
451
451
|
"px-2 py-1.5": r
|
|
452
452
|
},
|
|
@@ -454,7 +454,7 @@ const Be = "thead", bt = "tfoot", me = "tbody", be = {
|
|
|
454
454
|
)
|
|
455
455
|
}), tn = ({
|
|
456
456
|
buttonClassName: e
|
|
457
|
-
}) => l("rounded-none text-sm", e), qt = "av-button",
|
|
457
|
+
}) => l("rounded-none text-sm", e), qt = "av-button", vt = "icon", vr = "button", at = "link", rn = ({
|
|
458
458
|
type: e,
|
|
459
459
|
size: t,
|
|
460
460
|
labelRight: r,
|
|
@@ -464,13 +464,13 @@ const Be = "thead", bt = "tfoot", me = "tbody", be = {
|
|
|
464
464
|
const o = "max-h-8 py-0 px-2", s = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
|
|
465
465
|
switch (e) {
|
|
466
466
|
case vr:
|
|
467
|
-
case
|
|
467
|
+
case at:
|
|
468
468
|
return l({
|
|
469
469
|
[o]: t === "small",
|
|
470
470
|
[s]: t === "medium",
|
|
471
471
|
[c]: t === "large"
|
|
472
472
|
});
|
|
473
|
-
case
|
|
473
|
+
case vt:
|
|
474
474
|
return l("inline-flex items-center", {
|
|
475
475
|
"justify-center": n === "center",
|
|
476
476
|
"justify-start": n === "left",
|
|
@@ -492,14 +492,14 @@ const Be = "thead", bt = "tfoot", me = "tbody", be = {
|
|
|
492
492
|
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
493
493
|
switch (e) {
|
|
494
494
|
case vr:
|
|
495
|
-
case
|
|
495
|
+
case at:
|
|
496
496
|
return l({
|
|
497
|
-
"text-center": e ===
|
|
497
|
+
"text-center": e === at,
|
|
498
498
|
[n]: t === "small",
|
|
499
499
|
[o]: t === "medium",
|
|
500
500
|
[s]: t === "large"
|
|
501
501
|
});
|
|
502
|
-
case
|
|
502
|
+
case vt:
|
|
503
503
|
return l({
|
|
504
504
|
[n]: t === "small" && (r || a),
|
|
505
505
|
[o]: t === "medium" && (r || a),
|
|
@@ -684,36 +684,36 @@ const Be = "thead", bt = "tfoot", me = "tbody", be = {
|
|
|
684
684
|
disabled: o,
|
|
685
685
|
fullWidth: s,
|
|
686
686
|
size: c,
|
|
687
|
-
noBorder:
|
|
688
|
-
labelRight:
|
|
689
|
-
labelLeft:
|
|
690
|
-
noBackground:
|
|
691
|
-
variant:
|
|
687
|
+
noBorder: g,
|
|
688
|
+
labelRight: d,
|
|
689
|
+
labelLeft: h,
|
|
690
|
+
noBackground: m,
|
|
691
|
+
variant: u,
|
|
692
692
|
noTruncate: f,
|
|
693
693
|
align: p,
|
|
694
694
|
radius: b
|
|
695
|
-
}) => (
|
|
695
|
+
}) => (u || (u = "primary"), r ? l(qt, t) : l(
|
|
696
696
|
qt,
|
|
697
697
|
nn({
|
|
698
698
|
mode: a,
|
|
699
|
-
variant:
|
|
700
|
-
noBackground:
|
|
699
|
+
variant: u,
|
|
700
|
+
noBackground: m,
|
|
701
701
|
noTruncate: f
|
|
702
702
|
}),
|
|
703
|
-
on({ mode: a, noBackground:
|
|
703
|
+
on({ mode: a, noBackground: m, variant: u }),
|
|
704
704
|
sn({ radius: b }),
|
|
705
705
|
rn({
|
|
706
706
|
type: e,
|
|
707
707
|
size: c,
|
|
708
|
-
labelRight:
|
|
709
|
-
labelLeft:
|
|
708
|
+
labelRight: d,
|
|
709
|
+
labelLeft: h,
|
|
710
710
|
align: p
|
|
711
711
|
}),
|
|
712
|
-
an({ type: e, size: c, labelRight:
|
|
713
|
-
dn({ mode: a, variant:
|
|
712
|
+
an({ type: e, size: c, labelRight: d, labelLeft: h }),
|
|
713
|
+
dn({ mode: a, variant: u, noBorder: g }),
|
|
714
714
|
un({ focusMode: n }),
|
|
715
|
-
cn({ mode: a, variant:
|
|
716
|
-
ln({ mode: a, variant:
|
|
715
|
+
cn({ mode: a, variant: u, disabled: o }),
|
|
716
|
+
ln({ mode: a, variant: u, disabled: o }),
|
|
717
717
|
{
|
|
718
718
|
"w-full": s,
|
|
719
719
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
@@ -722,7 +722,7 @@ const Be = "thead", bt = "tfoot", me = "tbody", be = {
|
|
|
722
722
|
)), gn = (e, t, r) => {
|
|
723
723
|
var a;
|
|
724
724
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
725
|
-
}, kr =
|
|
725
|
+
}, kr = M.forwardRef((e, t) => {
|
|
726
726
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
727
727
|
return /* @__PURE__ */ i(
|
|
728
728
|
"button",
|
|
@@ -749,7 +749,7 @@ try {
|
|
|
749
749
|
});
|
|
750
750
|
} catch {
|
|
751
751
|
}
|
|
752
|
-
const _r =
|
|
752
|
+
const _r = M.forwardRef(
|
|
753
753
|
({
|
|
754
754
|
children: e,
|
|
755
755
|
disabled: t = !1,
|
|
@@ -759,29 +759,29 @@ const _r = O.forwardRef(
|
|
|
759
759
|
className: o,
|
|
760
760
|
type: s = "button",
|
|
761
761
|
raw: c = !1,
|
|
762
|
-
noBorder:
|
|
763
|
-
"aria-label":
|
|
764
|
-
label:
|
|
765
|
-
size:
|
|
766
|
-
labelRight:
|
|
762
|
+
noBorder: g = !1,
|
|
763
|
+
"aria-label": d,
|
|
764
|
+
label: h,
|
|
765
|
+
size: m = "medium",
|
|
766
|
+
labelRight: u,
|
|
767
767
|
labelLeft: f,
|
|
768
768
|
noBackground: p = !1,
|
|
769
769
|
align: b = "center",
|
|
770
770
|
active: v = !1,
|
|
771
771
|
radius: y = "large",
|
|
772
772
|
..._
|
|
773
|
-
},
|
|
774
|
-
const
|
|
775
|
-
type:
|
|
773
|
+
}, S) => {
|
|
774
|
+
const N = mn({
|
|
775
|
+
type: vt,
|
|
776
776
|
mode: r,
|
|
777
777
|
focusMode: a,
|
|
778
778
|
fullWidth: n,
|
|
779
779
|
disabled: t,
|
|
780
780
|
raw: c,
|
|
781
781
|
className: o,
|
|
782
|
-
noBorder:
|
|
783
|
-
size:
|
|
784
|
-
labelRight:
|
|
782
|
+
noBorder: g,
|
|
783
|
+
size: m,
|
|
784
|
+
labelRight: u,
|
|
785
785
|
labelLeft: f,
|
|
786
786
|
noBackground: p,
|
|
787
787
|
align: b,
|
|
@@ -811,23 +811,23 @@ const _r = O.forwardRef(
|
|
|
811
811
|
return /* @__PURE__ */ i("div", { className: C, children: /* @__PURE__ */ x(
|
|
812
812
|
kr,
|
|
813
813
|
{
|
|
814
|
-
ref:
|
|
815
|
-
className:
|
|
814
|
+
ref: S,
|
|
815
|
+
className: N,
|
|
816
816
|
disabled: t,
|
|
817
817
|
type: s,
|
|
818
|
-
"aria-label":
|
|
818
|
+
"aria-label": d || h,
|
|
819
819
|
..._,
|
|
820
820
|
children: [
|
|
821
821
|
f && /* @__PURE__ */ i("span", { className: "pr-2", children: f }),
|
|
822
822
|
/* @__PURE__ */ i("div", { className: k, children: e }),
|
|
823
|
-
|
|
823
|
+
u && /* @__PURE__ */ i("span", { className: "pl-2", children: u })
|
|
824
824
|
]
|
|
825
825
|
}
|
|
826
826
|
) });
|
|
827
827
|
}
|
|
828
828
|
);
|
|
829
829
|
_r.displayName = "ButtonSort";
|
|
830
|
-
const
|
|
830
|
+
const kt = ({
|
|
831
831
|
children: e,
|
|
832
832
|
fill: t,
|
|
833
833
|
viewBox: r,
|
|
@@ -836,21 +836,21 @@ const vt = ({
|
|
|
836
836
|
size: o,
|
|
837
837
|
title: s,
|
|
838
838
|
semantic: c = !1,
|
|
839
|
-
...
|
|
839
|
+
...g
|
|
840
840
|
}) => {
|
|
841
|
-
const
|
|
841
|
+
const d = l(o, a);
|
|
842
842
|
return /* @__PURE__ */ x(Oe, { children: [
|
|
843
843
|
/* @__PURE__ */ i(
|
|
844
844
|
"svg",
|
|
845
845
|
{
|
|
846
846
|
xmlns: "http://www.w3.org/2000/svg",
|
|
847
|
-
className:
|
|
847
|
+
className: d,
|
|
848
848
|
viewBox: r || n,
|
|
849
849
|
fill: t || "currentColor",
|
|
850
850
|
role: "img",
|
|
851
851
|
"aria-hidden": !c,
|
|
852
852
|
focusable: !1,
|
|
853
|
-
...
|
|
853
|
+
...g,
|
|
854
854
|
children: e
|
|
855
855
|
}
|
|
856
856
|
),
|
|
@@ -877,7 +877,7 @@ const hn = ({
|
|
|
877
877
|
monotone: a,
|
|
878
878
|
...n
|
|
879
879
|
}) => /* @__PURE__ */ x(
|
|
880
|
-
|
|
880
|
+
kt,
|
|
881
881
|
{
|
|
882
882
|
defaultViewBox: "0 0 576 512",
|
|
883
883
|
size: "size-5",
|
|
@@ -910,7 +910,7 @@ const hn = ({
|
|
|
910
910
|
monotone: a,
|
|
911
911
|
...n
|
|
912
912
|
}) => /* @__PURE__ */ x(
|
|
913
|
-
|
|
913
|
+
kt,
|
|
914
914
|
{
|
|
915
915
|
defaultViewBox: "0 0 576 512",
|
|
916
916
|
size: "size-5",
|
|
@@ -943,7 +943,7 @@ const hn = ({
|
|
|
943
943
|
monotone: a,
|
|
944
944
|
...n
|
|
945
945
|
}) => /* @__PURE__ */ x(
|
|
946
|
-
|
|
946
|
+
kt,
|
|
947
947
|
{
|
|
948
948
|
defaultViewBox: "0 0 576 512",
|
|
949
949
|
size: "size-5",
|
|
@@ -983,7 +983,7 @@ try {
|
|
|
983
983
|
});
|
|
984
984
|
} catch {
|
|
985
985
|
}
|
|
986
|
-
const ge =
|
|
986
|
+
const ge = M.createContext({
|
|
987
987
|
mode: "light",
|
|
988
988
|
cellWrapper: "thead",
|
|
989
989
|
stickyHeader: !1,
|
|
@@ -998,30 +998,30 @@ const ge = O.createContext({
|
|
|
998
998
|
className: o,
|
|
999
999
|
wrapperClassName: s,
|
|
1000
1000
|
maxHeight: c,
|
|
1001
|
-
stickyHeader:
|
|
1002
|
-
stickyFooter:
|
|
1003
|
-
...
|
|
1001
|
+
stickyHeader: g,
|
|
1002
|
+
stickyFooter: d,
|
|
1003
|
+
...h
|
|
1004
1004
|
}) => {
|
|
1005
|
-
const
|
|
1005
|
+
const m = Ya({
|
|
1006
1006
|
mode: t,
|
|
1007
1007
|
className: o,
|
|
1008
1008
|
wrapperClassName: s,
|
|
1009
|
-
stickyHeader:
|
|
1010
|
-
stickyFooter:
|
|
1009
|
+
stickyHeader: g,
|
|
1010
|
+
stickyFooter: d
|
|
1011
1011
|
});
|
|
1012
1012
|
return /* @__PURE__ */ i(
|
|
1013
1013
|
ge.Provider,
|
|
1014
1014
|
{
|
|
1015
|
-
value: { mode: t, stickyHeader:
|
|
1015
|
+
value: { mode: t, stickyHeader: g, stickyFooter: d, compact: a },
|
|
1016
1016
|
children: /* @__PURE__ */ i(
|
|
1017
1017
|
"div",
|
|
1018
1018
|
{
|
|
1019
|
-
className:
|
|
1019
|
+
className: m.wrapper,
|
|
1020
1020
|
...c && {
|
|
1021
1021
|
style: { maxHeight: c }
|
|
1022
1022
|
},
|
|
1023
|
-
children: /* @__PURE__ */ x("table", { className:
|
|
1024
|
-
r && /* @__PURE__ */ i("caption", { className:
|
|
1023
|
+
children: /* @__PURE__ */ x("table", { className: m.table, summary: n, ...h, children: [
|
|
1024
|
+
r && /* @__PURE__ */ i("caption", { className: m.caption, children: r }),
|
|
1025
1025
|
e
|
|
1026
1026
|
] })
|
|
1027
1027
|
}
|
|
@@ -1033,7 +1033,7 @@ const ge = O.createContext({
|
|
|
1033
1033
|
className: t,
|
|
1034
1034
|
...r
|
|
1035
1035
|
}) => {
|
|
1036
|
-
const a =
|
|
1036
|
+
const a = B(ge);
|
|
1037
1037
|
a.cellWrapper = Be;
|
|
1038
1038
|
const n = Za({
|
|
1039
1039
|
className: t,
|
|
@@ -1046,8 +1046,8 @@ const ge = O.createContext({
|
|
|
1046
1046
|
className: t,
|
|
1047
1047
|
...r
|
|
1048
1048
|
}) => {
|
|
1049
|
-
const a =
|
|
1050
|
-
a.cellWrapper =
|
|
1049
|
+
const a = B(ge);
|
|
1050
|
+
a.cellWrapper = yt;
|
|
1051
1051
|
const n = Xa({
|
|
1052
1052
|
className: t,
|
|
1053
1053
|
mode: a.mode,
|
|
@@ -1055,14 +1055,14 @@ const ge = O.createContext({
|
|
|
1055
1055
|
});
|
|
1056
1056
|
return /* @__PURE__ */ i("tfoot", { className: n, ...r, children: e });
|
|
1057
1057
|
}, ys = ({ children: e, ...t }) => {
|
|
1058
|
-
const r =
|
|
1058
|
+
const r = B(ge);
|
|
1059
1059
|
return r.cellWrapper = me, /* @__PURE__ */ i("tbody", { ...t, children: e });
|
|
1060
1060
|
}, vs = ({
|
|
1061
1061
|
children: e,
|
|
1062
1062
|
className: t,
|
|
1063
1063
|
...r
|
|
1064
1064
|
}) => {
|
|
1065
|
-
const a =
|
|
1065
|
+
const a = B(ge), n = Qa({
|
|
1066
1066
|
mode: a.mode,
|
|
1067
1067
|
cellWrapper: a.cellWrapper,
|
|
1068
1068
|
className: t
|
|
@@ -1075,14 +1075,14 @@ const ge = O.createContext({
|
|
|
1075
1075
|
align: a,
|
|
1076
1076
|
...n
|
|
1077
1077
|
}) => {
|
|
1078
|
-
const o =
|
|
1078
|
+
const o = B(ge), s = t || (o.cellWrapper === Be ? "th" : "td"), { mainClasses: c, alignClasses: g } = en({
|
|
1079
1079
|
cellWrapper: o.cellWrapper,
|
|
1080
1080
|
className: r,
|
|
1081
1081
|
mode: o.mode,
|
|
1082
1082
|
compact: o.compact,
|
|
1083
1083
|
align: a
|
|
1084
1084
|
});
|
|
1085
|
-
return a ? /* @__PURE__ */ i(s, { className: c, ...n, children: /* @__PURE__ */ i("div", { className:
|
|
1085
|
+
return a ? /* @__PURE__ */ i(s, { className: c, ...n, children: /* @__PURE__ */ i("div", { className: g, children: e }) }) : /* @__PURE__ */ i(s, { className: c, ...n, children: e });
|
|
1086
1086
|
}, ks = ({
|
|
1087
1087
|
align: e,
|
|
1088
1088
|
children: t,
|
|
@@ -1092,25 +1092,25 @@ const ge = O.createContext({
|
|
|
1092
1092
|
focusMode: o = "alt-system",
|
|
1093
1093
|
mode: s = "alt-system",
|
|
1094
1094
|
onClick: c,
|
|
1095
|
-
sortDirection:
|
|
1096
|
-
sortedCell:
|
|
1097
|
-
cellId:
|
|
1098
|
-
...
|
|
1095
|
+
sortDirection: g,
|
|
1096
|
+
sortedCell: d,
|
|
1097
|
+
cellId: h,
|
|
1098
|
+
...m
|
|
1099
1099
|
}) => {
|
|
1100
|
-
const
|
|
1100
|
+
const u = tn({ buttonClassName: r });
|
|
1101
1101
|
return /* @__PURE__ */ i(
|
|
1102
1102
|
bn,
|
|
1103
1103
|
{
|
|
1104
1104
|
component: n,
|
|
1105
1105
|
className: a,
|
|
1106
1106
|
role: "columnheader",
|
|
1107
|
-
"aria-sort":
|
|
1108
|
-
...
|
|
1107
|
+
"aria-sort": g === be.ASC && d === h ? "ascending" : g === be.DESC && d === h ? "descending" : "other",
|
|
1108
|
+
...m,
|
|
1109
1109
|
children: /* @__PURE__ */ i(
|
|
1110
1110
|
_r,
|
|
1111
1111
|
{
|
|
1112
|
-
active:
|
|
1113
|
-
className:
|
|
1112
|
+
active: d === h,
|
|
1113
|
+
className: u,
|
|
1114
1114
|
onClick: c,
|
|
1115
1115
|
align: e,
|
|
1116
1116
|
noBorder: !0,
|
|
@@ -1118,29 +1118,29 @@ const ge = O.createContext({
|
|
|
1118
1118
|
mode: s,
|
|
1119
1119
|
fullWidth: !0,
|
|
1120
1120
|
labelRight: t,
|
|
1121
|
-
children:
|
|
1121
|
+
children: g === be.ASC && d === h ? /* @__PURE__ */ i(pn, { className: "size-4", monotone: !0 }) : g === be.DESC && d === h ? /* @__PURE__ */ i(fn, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ i(hn, { className: "size-4", monotone: !0 })
|
|
1122
1122
|
}
|
|
1123
1123
|
)
|
|
1124
1124
|
}
|
|
1125
1125
|
);
|
|
1126
|
-
},
|
|
1126
|
+
}, $ = [];
|
|
1127
1127
|
for (let e = 0; e < 256; ++e)
|
|
1128
|
-
|
|
1128
|
+
$.push((e + 256).toString(16).slice(1));
|
|
1129
1129
|
function yn(e, t = 0) {
|
|
1130
|
-
return (
|
|
1130
|
+
return ($[e[t + 0]] + $[e[t + 1]] + $[e[t + 2]] + $[e[t + 3]] + "-" + $[e[t + 4]] + $[e[t + 5]] + "-" + $[e[t + 6]] + $[e[t + 7]] + "-" + $[e[t + 8]] + $[e[t + 9]] + "-" + $[e[t + 10]] + $[e[t + 11]] + $[e[t + 12]] + $[e[t + 13]] + $[e[t + 14]] + $[e[t + 15]]).toLowerCase();
|
|
1131
1131
|
}
|
|
1132
|
-
let
|
|
1132
|
+
let Ge;
|
|
1133
1133
|
const vn = new Uint8Array(16);
|
|
1134
1134
|
function kn() {
|
|
1135
|
-
if (!
|
|
1135
|
+
if (!Ge) {
|
|
1136
1136
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1137
1137
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1138
|
-
|
|
1138
|
+
Ge = crypto.getRandomValues.bind(crypto);
|
|
1139
1139
|
}
|
|
1140
|
-
return
|
|
1140
|
+
return Ge(vn);
|
|
1141
1141
|
}
|
|
1142
1142
|
const _n = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Kt = { randomUUID: _n };
|
|
1143
|
-
function
|
|
1143
|
+
function _t(e, t, r) {
|
|
1144
1144
|
var n;
|
|
1145
1145
|
if (Kt.randomUUID && !t && !e)
|
|
1146
1146
|
return Kt.randomUUID();
|
|
@@ -1181,24 +1181,24 @@ const En = (e, t) => {
|
|
|
1181
1181
|
messageId: s
|
|
1182
1182
|
};
|
|
1183
1183
|
if (r === ve) {
|
|
1184
|
-
const
|
|
1185
|
-
(
|
|
1184
|
+
const g = e.messages.findIndex(
|
|
1185
|
+
(d) => d.message.messageId === s
|
|
1186
1186
|
);
|
|
1187
|
-
if (
|
|
1188
|
-
const
|
|
1187
|
+
if (g !== -1) {
|
|
1188
|
+
const d = e.messages.map((h, m) => m === g ? {
|
|
1189
1189
|
message: {
|
|
1190
|
-
...
|
|
1191
|
-
content: `${
|
|
1190
|
+
...h.message,
|
|
1191
|
+
content: `${h.message.content}${a}`,
|
|
1192
1192
|
processingTime: o,
|
|
1193
1193
|
name: n
|
|
1194
1194
|
}
|
|
1195
|
-
} :
|
|
1195
|
+
} : h);
|
|
1196
1196
|
return {
|
|
1197
1197
|
id: e.id,
|
|
1198
1198
|
model: e.model,
|
|
1199
1199
|
usage: e.usage,
|
|
1200
1200
|
isComponent: e.isComponent,
|
|
1201
|
-
messages:
|
|
1201
|
+
messages: d,
|
|
1202
1202
|
engine: e.engine,
|
|
1203
1203
|
prompts: e.prompts
|
|
1204
1204
|
};
|
|
@@ -1220,8 +1220,8 @@ const En = (e, t) => {
|
|
|
1220
1220
|
};
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
|
-
return (t == null ? void 0 : t.type) ===
|
|
1224
|
-
id:
|
|
1223
|
+
return (t == null ? void 0 : t.type) === ft ? {
|
|
1224
|
+
id: _t(),
|
|
1225
1225
|
model: e.model,
|
|
1226
1226
|
engine: e.engine,
|
|
1227
1227
|
usage: 0,
|
|
@@ -1261,17 +1261,19 @@ const En = (e, t) => {
|
|
|
1261
1261
|
switch (t == null ? void 0 : t.type) {
|
|
1262
1262
|
case ur:
|
|
1263
1263
|
return {
|
|
1264
|
-
prompt: t.payload.prompt
|
|
1264
|
+
prompt: t.payload.prompt,
|
|
1265
|
+
lastTriggeredTimestamp: e.lastTriggeredTimestamp
|
|
1265
1266
|
};
|
|
1266
1267
|
case dr:
|
|
1267
1268
|
return {
|
|
1268
|
-
prompt: ""
|
|
1269
|
+
prompt: "",
|
|
1270
|
+
lastTriggeredTimestamp: (/* @__PURE__ */ new Date()).getTime()
|
|
1269
1271
|
};
|
|
1270
1272
|
default:
|
|
1271
1273
|
return e;
|
|
1272
1274
|
}
|
|
1273
1275
|
};
|
|
1274
|
-
var Ce = { exports: {} },
|
|
1276
|
+
var Ce = { exports: {} }, je = {};
|
|
1275
1277
|
/**
|
|
1276
1278
|
* @license React
|
|
1277
1279
|
* use-sync-external-store-shim.production.js
|
|
@@ -1283,46 +1285,46 @@ var Ce = { exports: {} }, Ge = {};
|
|
|
1283
1285
|
*/
|
|
1284
1286
|
var Jt;
|
|
1285
1287
|
function wn() {
|
|
1286
|
-
if (Jt) return
|
|
1288
|
+
if (Jt) return je;
|
|
1287
1289
|
Jt = 1;
|
|
1288
|
-
var e =
|
|
1289
|
-
function t(
|
|
1290
|
-
return
|
|
1290
|
+
var e = M;
|
|
1291
|
+
function t(m, u) {
|
|
1292
|
+
return m === u && (m !== 0 || 1 / m === 1 / u) || m !== m && u !== u;
|
|
1291
1293
|
}
|
|
1292
1294
|
var r = typeof Object.is == "function" ? Object.is : t, a = e.useState, n = e.useEffect, o = e.useLayoutEffect, s = e.useDebugValue;
|
|
1293
|
-
function c(
|
|
1294
|
-
var f =
|
|
1295
|
+
function c(m, u) {
|
|
1296
|
+
var f = u(), p = a({ inst: { value: f, getSnapshot: u } }), b = p[0].inst, v = p[1];
|
|
1295
1297
|
return o(
|
|
1296
1298
|
function() {
|
|
1297
|
-
b.value = f, b.getSnapshot =
|
|
1299
|
+
b.value = f, b.getSnapshot = u, g(b) && v({ inst: b });
|
|
1298
1300
|
},
|
|
1299
|
-
[
|
|
1301
|
+
[m, f, u]
|
|
1300
1302
|
), n(
|
|
1301
1303
|
function() {
|
|
1302
|
-
return
|
|
1303
|
-
|
|
1304
|
+
return g(b) && v({ inst: b }), m(function() {
|
|
1305
|
+
g(b) && v({ inst: b });
|
|
1304
1306
|
});
|
|
1305
1307
|
},
|
|
1306
|
-
[
|
|
1308
|
+
[m]
|
|
1307
1309
|
), s(f), f;
|
|
1308
1310
|
}
|
|
1309
|
-
function m
|
|
1310
|
-
var
|
|
1311
|
-
|
|
1311
|
+
function g(m) {
|
|
1312
|
+
var u = m.getSnapshot;
|
|
1313
|
+
m = m.value;
|
|
1312
1314
|
try {
|
|
1313
|
-
var f =
|
|
1314
|
-
return !r(
|
|
1315
|
+
var f = u();
|
|
1316
|
+
return !r(m, f);
|
|
1315
1317
|
} catch {
|
|
1316
1318
|
return !0;
|
|
1317
1319
|
}
|
|
1318
1320
|
}
|
|
1319
|
-
function
|
|
1320
|
-
return
|
|
1321
|
+
function d(m, u) {
|
|
1322
|
+
return u();
|
|
1321
1323
|
}
|
|
1322
|
-
var
|
|
1323
|
-
return
|
|
1324
|
+
var h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : c;
|
|
1325
|
+
return je.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : h, je;
|
|
1324
1326
|
}
|
|
1325
|
-
var
|
|
1327
|
+
var qe = {};
|
|
1326
1328
|
/**
|
|
1327
1329
|
* @license React
|
|
1328
1330
|
* use-sync-external-store-shim.development.js
|
|
@@ -1339,21 +1341,21 @@ function Tn() {
|
|
|
1339
1341
|
return f === p && (f !== 0 || 1 / f === 1 / p) || f !== f && p !== p;
|
|
1340
1342
|
}
|
|
1341
1343
|
function t(f, p) {
|
|
1342
|
-
|
|
1344
|
+
h || n.startTransition === void 0 || (h = !0, console.error(
|
|
1343
1345
|
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
1344
1346
|
));
|
|
1345
1347
|
var b = p();
|
|
1346
|
-
if (!
|
|
1348
|
+
if (!m) {
|
|
1347
1349
|
var v = p();
|
|
1348
1350
|
o(b, v) || (console.error(
|
|
1349
1351
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
1350
|
-
),
|
|
1352
|
+
), m = !0);
|
|
1351
1353
|
}
|
|
1352
1354
|
v = s({
|
|
1353
1355
|
inst: { value: b, getSnapshot: p }
|
|
1354
1356
|
});
|
|
1355
1357
|
var y = v[0].inst, _ = v[1];
|
|
1356
|
-
return
|
|
1358
|
+
return g(
|
|
1357
1359
|
function() {
|
|
1358
1360
|
y.value = b, y.getSnapshot = p, r(y) && _({ inst: y });
|
|
1359
1361
|
},
|
|
@@ -1365,7 +1367,7 @@ function Tn() {
|
|
|
1365
1367
|
});
|
|
1366
1368
|
},
|
|
1367
1369
|
[f]
|
|
1368
|
-
),
|
|
1370
|
+
), d(b), b;
|
|
1369
1371
|
}
|
|
1370
1372
|
function r(f) {
|
|
1371
1373
|
var p = f.getSnapshot;
|
|
@@ -1381,16 +1383,16 @@ function Tn() {
|
|
|
1381
1383
|
return p();
|
|
1382
1384
|
}
|
|
1383
1385
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1384
|
-
var n =
|
|
1385
|
-
|
|
1386
|
-
}()),
|
|
1386
|
+
var n = M, o = typeof Object.is == "function" ? Object.is : e, s = n.useState, c = n.useEffect, g = n.useLayoutEffect, d = n.useDebugValue, h = !1, m = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
|
|
1387
|
+
qe.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1388
|
+
}()), qe;
|
|
1387
1389
|
}
|
|
1388
1390
|
var Zt;
|
|
1389
1391
|
function Nn() {
|
|
1390
1392
|
return Zt || (Zt = 1, process.env.NODE_ENV === "production" ? Ce.exports = /* @__PURE__ */ wn() : Ce.exports = /* @__PURE__ */ Tn()), Ce.exports;
|
|
1391
1393
|
}
|
|
1392
1394
|
var Cn = /* @__PURE__ */ Nn(), Xt = Object.prototype.hasOwnProperty;
|
|
1393
|
-
function
|
|
1395
|
+
function nt(e, t) {
|
|
1394
1396
|
var r, a;
|
|
1395
1397
|
if (e === t) return !0;
|
|
1396
1398
|
if (e && t && (r = e.constructor) === t.constructor) {
|
|
@@ -1398,63 +1400,63 @@ function at(e, t) {
|
|
|
1398
1400
|
if (r === RegExp) return e.toString() === t.toString();
|
|
1399
1401
|
if (r === Array) {
|
|
1400
1402
|
if ((a = e.length) === t.length)
|
|
1401
|
-
for (; a-- &&
|
|
1403
|
+
for (; a-- && nt(e[a], t[a]); ) ;
|
|
1402
1404
|
return a === -1;
|
|
1403
1405
|
}
|
|
1404
1406
|
if (!r || typeof e == "object") {
|
|
1405
1407
|
a = 0;
|
|
1406
1408
|
for (r in e)
|
|
1407
|
-
if (Xt.call(e, r) && ++a && !Xt.call(t, r) || !(r in t) || !
|
|
1409
|
+
if (Xt.call(e, r) && ++a && !Xt.call(t, r) || !(r in t) || !nt(e[r], t[r])) return !1;
|
|
1408
1410
|
return Object.keys(t).length === a;
|
|
1409
1411
|
}
|
|
1410
1412
|
}
|
|
1411
1413
|
return e !== e && t !== t;
|
|
1412
1414
|
}
|
|
1413
|
-
const j = /* @__PURE__ */ new WeakMap(),
|
|
1414
|
-
},
|
|
1415
|
+
const j = /* @__PURE__ */ new WeakMap(), oe = () => {
|
|
1416
|
+
}, P = (
|
|
1415
1417
|
/*#__NOINLINE__*/
|
|
1416
|
-
|
|
1417
|
-
),
|
|
1418
|
+
oe()
|
|
1419
|
+
), ot = Object, E = (e) => e === P, q = (e) => typeof e == "function", se = (e, t) => ({
|
|
1418
1420
|
...e,
|
|
1419
1421
|
...t
|
|
1420
|
-
}), Er = (e) => q(e.then),
|
|
1422
|
+
}), Er = (e) => q(e.then), Ke = {}, Re = {}, Et = "undefined", Me = typeof window != Et, st = typeof document != Et, Rn = () => Me && typeof window.requestAnimationFrame != Et, xr = (e, t) => {
|
|
1421
1423
|
const r = j.get(e);
|
|
1422
1424
|
return [
|
|
1423
1425
|
// Getter
|
|
1424
|
-
() => !E(t) && e.get(t) ||
|
|
1426
|
+
() => !E(t) && e.get(t) || Ke,
|
|
1425
1427
|
// Setter
|
|
1426
1428
|
(a) => {
|
|
1427
1429
|
if (!E(t)) {
|
|
1428
1430
|
const n = e.get(t);
|
|
1429
|
-
t in Re || (Re[t] = n), r[5](t,
|
|
1431
|
+
t in Re || (Re[t] = n), r[5](t, se(n, a), n || Ke);
|
|
1430
1432
|
}
|
|
1431
1433
|
},
|
|
1432
1434
|
// Subscriber
|
|
1433
1435
|
r[6],
|
|
1434
1436
|
// Get server cache snapshot
|
|
1435
|
-
() => !E(t) && t in Re ? Re[t] : !E(t) && e.get(t) ||
|
|
1437
|
+
() => !E(t) && t in Re ? Re[t] : !E(t) && e.get(t) || Ke
|
|
1436
1438
|
];
|
|
1437
1439
|
};
|
|
1438
|
-
let
|
|
1439
|
-
const In = () =>
|
|
1440
|
+
let it = !0;
|
|
1441
|
+
const In = () => it, [ct, lt] = Me && window.addEventListener ? [
|
|
1440
1442
|
window.addEventListener.bind(window),
|
|
1441
1443
|
window.removeEventListener.bind(window)
|
|
1442
1444
|
] : [
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
+
oe,
|
|
1446
|
+
oe
|
|
1445
1447
|
], Ln = () => {
|
|
1446
|
-
const e =
|
|
1448
|
+
const e = st && document.visibilityState;
|
|
1447
1449
|
return E(e) || e !== "hidden";
|
|
1448
|
-
}, An = (e) => (
|
|
1449
|
-
|
|
1450
|
+
}, An = (e) => (st && document.addEventListener("visibilitychange", e), ct("focus", e), () => {
|
|
1451
|
+
st && document.removeEventListener("visibilitychange", e), lt("focus", e);
|
|
1450
1452
|
}), On = (e) => {
|
|
1451
1453
|
const t = () => {
|
|
1452
|
-
|
|
1454
|
+
it = !0, e();
|
|
1453
1455
|
}, r = () => {
|
|
1454
|
-
|
|
1456
|
+
it = !1;
|
|
1455
1457
|
};
|
|
1456
|
-
return
|
|
1457
|
-
|
|
1458
|
+
return ct("online", t), ct("offline", r), () => {
|
|
1459
|
+
lt("online", t), lt("offline", r);
|
|
1458
1460
|
};
|
|
1459
1461
|
}, Bn = {
|
|
1460
1462
|
isOnline: In,
|
|
@@ -1462,26 +1464,26 @@ const In = () => st, [it, ct] = Me && window.addEventListener ? [
|
|
|
1462
1464
|
}, Mn = {
|
|
1463
1465
|
initFocus: An,
|
|
1464
1466
|
initReconnect: On
|
|
1465
|
-
}, Qt = !
|
|
1467
|
+
}, Qt = !M.useId, _e = !Me || "Deno" in globalThis, zn = (e) => Rn() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Je = _e ? A : mr, Ye = typeof navigator < "u" && navigator.connection, er = !_e && Ye && ([
|
|
1466
1468
|
"slow-2g",
|
|
1467
1469
|
"2g"
|
|
1468
|
-
].includes(
|
|
1470
|
+
].includes(Ye.effectiveType) || Ye.saveData), Ie = /* @__PURE__ */ new WeakMap(), Ze = (e, t) => ot.prototype.toString.call(e) === `[object ${t}]`;
|
|
1469
1471
|
let $n = 0;
|
|
1470
|
-
const
|
|
1471
|
-
const t = typeof e, r =
|
|
1472
|
+
const dt = (e) => {
|
|
1473
|
+
const t = typeof e, r = Ze(e, "Date"), a = Ze(e, "RegExp"), n = Ze(e, "Object");
|
|
1472
1474
|
let o, s;
|
|
1473
|
-
if (
|
|
1475
|
+
if (ot(e) === e && !r && !a) {
|
|
1474
1476
|
if (o = Ie.get(e), o) return o;
|
|
1475
1477
|
if (o = ++$n + "~", Ie.set(e, o), Array.isArray(e)) {
|
|
1476
1478
|
for (o = "@", s = 0; s < e.length; s++)
|
|
1477
|
-
o +=
|
|
1479
|
+
o += dt(e[s]) + ",";
|
|
1478
1480
|
Ie.set(e, o);
|
|
1479
1481
|
}
|
|
1480
1482
|
if (n) {
|
|
1481
1483
|
o = "#";
|
|
1482
|
-
const c =
|
|
1484
|
+
const c = ot.keys(e).sort();
|
|
1483
1485
|
for (; !E(s = c.pop()); )
|
|
1484
|
-
E(e[s]) || (o += s + ":" +
|
|
1486
|
+
E(e[s]) || (o += s + ":" + dt(e[s]) + ",");
|
|
1485
1487
|
Ie.set(e, o);
|
|
1486
1488
|
}
|
|
1487
1489
|
} else
|
|
@@ -1495,13 +1497,13 @@ const lt = (e) => {
|
|
|
1495
1497
|
e = "";
|
|
1496
1498
|
}
|
|
1497
1499
|
const t = e;
|
|
1498
|
-
return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ?
|
|
1500
|
+
return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? dt(e) : "", [
|
|
1499
1501
|
e,
|
|
1500
1502
|
t
|
|
1501
1503
|
];
|
|
1502
1504
|
};
|
|
1503
1505
|
let Dn = 0;
|
|
1504
|
-
const
|
|
1506
|
+
const ut = () => ++Dn, Sr = 0, wr = 1, Tr = 2, Vn = 3;
|
|
1505
1507
|
var pe = {
|
|
1506
1508
|
__proto__: null,
|
|
1507
1509
|
ERROR_REVALIDATE_EVENT: Vn,
|
|
@@ -1510,7 +1512,7 @@ var pe = {
|
|
|
1510
1512
|
RECONNECT_EVENT: wr
|
|
1511
1513
|
};
|
|
1512
1514
|
async function Nr(...e) {
|
|
1513
|
-
const [t, r, a, n] = e, o =
|
|
1515
|
+
const [t, r, a, n] = e, o = se({
|
|
1514
1516
|
populateCache: !0,
|
|
1515
1517
|
throwOnError: !0
|
|
1516
1518
|
}, typeof n == "boolean" ? {
|
|
@@ -1518,71 +1520,71 @@ async function Nr(...e) {
|
|
|
1518
1520
|
} : n || {});
|
|
1519
1521
|
let s = o.populateCache;
|
|
1520
1522
|
const c = o.rollbackOnError;
|
|
1521
|
-
let
|
|
1522
|
-
const
|
|
1523
|
+
let g = o.optimisticData;
|
|
1524
|
+
const d = (u) => typeof c == "function" ? c(u) : c !== !1, h = o.throwOnError;
|
|
1523
1525
|
if (q(r)) {
|
|
1524
|
-
const
|
|
1526
|
+
const u = r, f = [], p = t.keys();
|
|
1525
1527
|
for (const b of p)
|
|
1526
1528
|
// Skip the special useSWRInfinite and useSWRSubscription keys.
|
|
1527
|
-
!/^\$(inf|sub)\$/.test(b) &&
|
|
1528
|
-
return Promise.all(f.map(
|
|
1529
|
+
!/^\$(inf|sub)\$/.test(b) && u(t.get(b)._k) && f.push(b);
|
|
1530
|
+
return Promise.all(f.map(m));
|
|
1529
1531
|
}
|
|
1530
|
-
return
|
|
1531
|
-
async function
|
|
1532
|
-
const [f] = ze(
|
|
1532
|
+
return m(r);
|
|
1533
|
+
async function m(u) {
|
|
1534
|
+
const [f] = ze(u);
|
|
1533
1535
|
if (!f) return;
|
|
1534
|
-
const [p, b] = xr(t, f), [v, y, _,
|
|
1536
|
+
const [p, b] = xr(t, f), [v, y, _, S] = j.get(t), N = () => {
|
|
1535
1537
|
const U = v[f];
|
|
1536
|
-
return (q(o.revalidate) ? o.revalidate(p().data,
|
|
1538
|
+
return (q(o.revalidate) ? o.revalidate(p().data, u) : o.revalidate !== !1) && (delete _[f], delete S[f], U && U[0]) ? U[0](Tr).then(() => p().data) : p().data;
|
|
1537
1539
|
};
|
|
1538
1540
|
if (e.length < 3)
|
|
1539
|
-
return
|
|
1541
|
+
return N();
|
|
1540
1542
|
let k = a, C;
|
|
1541
|
-
const
|
|
1543
|
+
const I = ut();
|
|
1542
1544
|
y[f] = [
|
|
1543
|
-
|
|
1545
|
+
I,
|
|
1544
1546
|
0
|
|
1545
1547
|
];
|
|
1546
|
-
const R = !E(
|
|
1547
|
-
if (R && (
|
|
1548
|
-
data:
|
|
1549
|
-
_c:
|
|
1548
|
+
const R = !E(g), Q = p(), F = Q.data, ee = Q._c, J = E(ee) ? F : ee;
|
|
1549
|
+
if (R && (g = q(g) ? g(J, F) : g, b({
|
|
1550
|
+
data: g,
|
|
1551
|
+
_c: J
|
|
1550
1552
|
})), q(k))
|
|
1551
1553
|
try {
|
|
1552
|
-
k = k(
|
|
1554
|
+
k = k(J);
|
|
1553
1555
|
} catch (U) {
|
|
1554
1556
|
C = U;
|
|
1555
1557
|
}
|
|
1556
1558
|
if (k && Er(k))
|
|
1557
1559
|
if (k = await k.catch((U) => {
|
|
1558
1560
|
C = U;
|
|
1559
|
-
}),
|
|
1561
|
+
}), I !== y[f][0]) {
|
|
1560
1562
|
if (C) throw C;
|
|
1561
1563
|
return k;
|
|
1562
|
-
} else C && R &&
|
|
1563
|
-
data:
|
|
1564
|
-
_c:
|
|
1564
|
+
} else C && R && d(C) && (s = !0, b({
|
|
1565
|
+
data: J,
|
|
1566
|
+
_c: P
|
|
1565
1567
|
}));
|
|
1566
1568
|
if (s && !C)
|
|
1567
1569
|
if (q(s)) {
|
|
1568
|
-
const U = s(k,
|
|
1570
|
+
const U = s(k, J);
|
|
1569
1571
|
b({
|
|
1570
1572
|
data: U,
|
|
1571
|
-
error:
|
|
1572
|
-
_c:
|
|
1573
|
+
error: P,
|
|
1574
|
+
_c: P
|
|
1573
1575
|
});
|
|
1574
1576
|
} else
|
|
1575
1577
|
b({
|
|
1576
1578
|
data: k,
|
|
1577
|
-
error:
|
|
1578
|
-
_c:
|
|
1579
|
+
error: P,
|
|
1580
|
+
_c: P
|
|
1579
1581
|
});
|
|
1580
|
-
if (y[f][1] =
|
|
1582
|
+
if (y[f][1] = ut(), Promise.resolve(N()).then(() => {
|
|
1581
1583
|
b({
|
|
1582
|
-
_c:
|
|
1584
|
+
_c: P
|
|
1583
1585
|
});
|
|
1584
1586
|
}), C) {
|
|
1585
|
-
if (
|
|
1587
|
+
if (h) throw C;
|
|
1586
1588
|
return;
|
|
1587
1589
|
}
|
|
1588
1590
|
return k;
|
|
@@ -1593,37 +1595,37 @@ const tr = (e, t) => {
|
|
|
1593
1595
|
e[r][0] && e[r][0](t);
|
|
1594
1596
|
}, Pn = (e, t) => {
|
|
1595
1597
|
if (!j.has(e)) {
|
|
1596
|
-
const r =
|
|
1597
|
-
let o =
|
|
1598
|
-
const s = {}, c = (
|
|
1599
|
-
const
|
|
1600
|
-
return s[
|
|
1601
|
-
},
|
|
1602
|
-
e.set(
|
|
1603
|
-
const f = s[
|
|
1598
|
+
const r = se(Mn, t), a = {}, n = Nr.bind(P, e);
|
|
1599
|
+
let o = oe;
|
|
1600
|
+
const s = {}, c = (h, m) => {
|
|
1601
|
+
const u = s[h] || [];
|
|
1602
|
+
return s[h] = u, u.push(m), () => u.splice(u.indexOf(m), 1);
|
|
1603
|
+
}, g = (h, m, u) => {
|
|
1604
|
+
e.set(h, m);
|
|
1605
|
+
const f = s[h];
|
|
1604
1606
|
if (f)
|
|
1605
1607
|
for (const p of f)
|
|
1606
|
-
p(
|
|
1607
|
-
},
|
|
1608
|
+
p(m, u);
|
|
1609
|
+
}, d = () => {
|
|
1608
1610
|
if (!j.has(e) && (j.set(e, [
|
|
1609
1611
|
a,
|
|
1610
1612
|
{},
|
|
1611
1613
|
{},
|
|
1612
1614
|
{},
|
|
1613
1615
|
n,
|
|
1614
|
-
|
|
1616
|
+
g,
|
|
1615
1617
|
c
|
|
1616
1618
|
]), !_e)) {
|
|
1617
|
-
const
|
|
1619
|
+
const h = r.initFocus(setTimeout.bind(P, tr.bind(P, a, Sr))), m = r.initReconnect(setTimeout.bind(P, tr.bind(P, a, wr)));
|
|
1618
1620
|
o = () => {
|
|
1619
|
-
|
|
1621
|
+
h && h(), m && m(), j.delete(e);
|
|
1620
1622
|
};
|
|
1621
1623
|
}
|
|
1622
1624
|
};
|
|
1623
|
-
return
|
|
1625
|
+
return d(), [
|
|
1624
1626
|
e,
|
|
1625
1627
|
n,
|
|
1626
|
-
|
|
1628
|
+
d,
|
|
1627
1629
|
o
|
|
1628
1630
|
];
|
|
1629
1631
|
}
|
|
@@ -1634,14 +1636,14 @@ const tr = (e, t) => {
|
|
|
1634
1636
|
}, Un = (e, t, r, a, n) => {
|
|
1635
1637
|
const o = r.errorRetryCount, s = n.retryCount, c = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * r.errorRetryInterval;
|
|
1636
1638
|
!E(o) && s > o || setTimeout(a, c, n);
|
|
1637
|
-
}, Fn =
|
|
1639
|
+
}, Fn = nt, [xt, Hn] = Pn(/* @__PURE__ */ new Map()), Wn = se(
|
|
1638
1640
|
{
|
|
1639
1641
|
// events
|
|
1640
|
-
onLoadingSlow:
|
|
1641
|
-
onSuccess:
|
|
1642
|
-
onError:
|
|
1642
|
+
onLoadingSlow: oe,
|
|
1643
|
+
onSuccess: oe,
|
|
1644
|
+
onError: oe,
|
|
1643
1645
|
onErrorRetry: Un,
|
|
1644
|
-
onDiscarded:
|
|
1646
|
+
onDiscarded: oe,
|
|
1645
1647
|
// switches
|
|
1646
1648
|
revalidateOnFocus: !0,
|
|
1647
1649
|
revalidateOnReconnect: !0,
|
|
@@ -1655,21 +1657,21 @@ const tr = (e, t) => {
|
|
|
1655
1657
|
// providers
|
|
1656
1658
|
compare: Fn,
|
|
1657
1659
|
isPaused: () => !1,
|
|
1658
|
-
cache:
|
|
1660
|
+
cache: xt,
|
|
1659
1661
|
mutate: Hn,
|
|
1660
1662
|
fallback: {}
|
|
1661
1663
|
},
|
|
1662
1664
|
// use web preset by default
|
|
1663
1665
|
Bn
|
|
1664
1666
|
), Gn = (e, t) => {
|
|
1665
|
-
const r =
|
|
1667
|
+
const r = se(e, t);
|
|
1666
1668
|
if (t) {
|
|
1667
1669
|
const { use: a, fallback: n } = e, { use: o, fallback: s } = t;
|
|
1668
|
-
a && o && (r.use = a.concat(o)), n && s && (r.fallback =
|
|
1670
|
+
a && o && (r.use = a.concat(o)), n && s && (r.fallback = se(n, s));
|
|
1669
1671
|
}
|
|
1670
1672
|
return r;
|
|
1671
1673
|
}, jn = ma({}), qn = "$inf$", Cr = Me && window.__SWR_DEVTOOLS_USE__, Kn = Cr ? window.__SWR_DEVTOOLS_USE__ : [], Jn = () => {
|
|
1672
|
-
Cr && (window.__SWR_DEVTOOLS_REACT__ =
|
|
1674
|
+
Cr && (window.__SWR_DEVTOOLS_REACT__ = M);
|
|
1673
1675
|
}, Yn = (e) => q(e[1]) ? [
|
|
1674
1676
|
e[0],
|
|
1675
1677
|
e[1],
|
|
@@ -1678,24 +1680,24 @@ const tr = (e, t) => {
|
|
|
1678
1680
|
e[0],
|
|
1679
1681
|
null,
|
|
1680
1682
|
(e[1] === null ? e[2] : e[1]) || {}
|
|
1681
|
-
], Zn = () =>
|
|
1682
|
-
const [r, a] = ze(e), [, , , n] = j.get(
|
|
1683
|
+
], Zn = () => se(Wn, B(jn)), St = (e, t) => {
|
|
1684
|
+
const [r, a] = ze(e), [, , , n] = j.get(xt);
|
|
1683
1685
|
if (n[r]) return n[r];
|
|
1684
1686
|
const o = t(a);
|
|
1685
1687
|
return n[r] = o, o;
|
|
1686
1688
|
}, Xn = (e) => (t, r, a) => e(t, r && ((...o) => {
|
|
1687
|
-
const [s] = ze(t), [, , , c] = j.get(
|
|
1689
|
+
const [s] = ze(t), [, , , c] = j.get(xt);
|
|
1688
1690
|
if (s.startsWith(qn))
|
|
1689
1691
|
return r(...o);
|
|
1690
|
-
const
|
|
1691
|
-
return E(
|
|
1692
|
+
const g = c[s];
|
|
1693
|
+
return E(g) ? r(...o) : (delete c[s], g);
|
|
1692
1694
|
}), a), Qn = Kn.concat(Xn), eo = (e) => function(...r) {
|
|
1693
1695
|
const a = Zn(), [n, o, s] = Yn(r), c = Gn(a, s);
|
|
1694
|
-
let
|
|
1695
|
-
const { use:
|
|
1696
|
-
for (let
|
|
1697
|
-
|
|
1698
|
-
return
|
|
1696
|
+
let g = e;
|
|
1697
|
+
const { use: d } = c, h = (d || []).concat(Qn);
|
|
1698
|
+
for (let m = h.length; m--; )
|
|
1699
|
+
g = h[m](g);
|
|
1700
|
+
return g(n, o || c.fetcher || null, c);
|
|
1699
1701
|
}, to = (e, t, r) => {
|
|
1700
1702
|
const a = t[e] || (t[e] = []);
|
|
1701
1703
|
return a.push(r), () => {
|
|
@@ -1704,7 +1706,7 @@ const tr = (e, t) => {
|
|
|
1704
1706
|
};
|
|
1705
1707
|
};
|
|
1706
1708
|
Jn();
|
|
1707
|
-
const
|
|
1709
|
+
const Xe = M.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
|
|
1708
1710
|
// and emitting an error.
|
|
1709
1711
|
// We assume that this is only for the `use(thenable)` case, not `use(context)`.
|
|
1710
1712
|
// https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
|
|
@@ -1723,89 +1725,89 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
1723
1725
|
e.status = "rejected", e.reason = t;
|
|
1724
1726
|
}), e;
|
|
1725
1727
|
}
|
|
1726
|
-
}),
|
|
1728
|
+
}), Qe = {
|
|
1727
1729
|
dedupe: !0
|
|
1728
1730
|
}, ro = (e, t, r) => {
|
|
1729
|
-
const { cache: a, compare: n, suspense: o, fallbackData: s, revalidateOnMount: c, revalidateIfStale:
|
|
1730
|
-
for (const
|
|
1731
|
-
const
|
|
1732
|
-
if (
|
|
1733
|
-
if (!n(w[
|
|
1731
|
+
const { cache: a, compare: n, suspense: o, fallbackData: s, revalidateOnMount: c, revalidateIfStale: g, refreshInterval: d, refreshWhenHidden: h, refreshWhenOffline: m, keepPreviousData: u } = r, [f, p, b, v] = j.get(a), [y, _] = ze(e), S = O(!1), N = O(!1), k = O(y), C = O(t), I = O(r), R = () => I.current, Q = () => R().isVisible() && R().isOnline(), [F, ee, J, U] = xr(a, y), te = O({}).current, ce = E(s) ? E(r.fallback) ? P : r.fallback[y] : s, he = (w, T) => {
|
|
1732
|
+
for (const D in te) {
|
|
1733
|
+
const L = D;
|
|
1734
|
+
if (L === "data") {
|
|
1735
|
+
if (!n(w[L], T[L]) && (!E(w[L]) || !n(Ne, T[L])))
|
|
1734
1736
|
return !1;
|
|
1735
|
-
} else if (T[
|
|
1737
|
+
} else if (T[L] !== w[L])
|
|
1736
1738
|
return !1;
|
|
1737
1739
|
}
|
|
1738
1740
|
return !0;
|
|
1739
|
-
}, we =
|
|
1740
|
-
const w = !y || !t ? !1 : E(c) ? R().isPaused() || o ? !1 :
|
|
1741
|
-
const
|
|
1742
|
-
return delete
|
|
1741
|
+
}, we = bt(() => {
|
|
1742
|
+
const w = !y || !t ? !1 : E(c) ? R().isPaused() || o ? !1 : g !== !1 : c, T = (V) => {
|
|
1743
|
+
const Y = se(V);
|
|
1744
|
+
return delete Y._k, w ? {
|
|
1743
1745
|
isValidating: !0,
|
|
1744
1746
|
isLoading: !0,
|
|
1745
|
-
...
|
|
1746
|
-
} :
|
|
1747
|
-
},
|
|
1748
|
-
let
|
|
1747
|
+
...Y
|
|
1748
|
+
} : Y;
|
|
1749
|
+
}, D = F(), L = U(), G = T(D), ue = D === L ? G : T(L);
|
|
1750
|
+
let z = G;
|
|
1749
1751
|
return [
|
|
1750
1752
|
() => {
|
|
1751
|
-
const
|
|
1752
|
-
return he(
|
|
1753
|
+
const V = T(F());
|
|
1754
|
+
return he(V, z) ? (z.data = V.data, z.isLoading = V.isLoading, z.isValidating = V.isValidating, z.error = V.error, z) : (z = V, V);
|
|
1753
1755
|
},
|
|
1754
1756
|
() => ue
|
|
1755
1757
|
];
|
|
1756
1758
|
}, [
|
|
1757
1759
|
a,
|
|
1758
1760
|
y
|
|
1759
|
-
]),
|
|
1760
|
-
(w) =>
|
|
1761
|
-
he(
|
|
1761
|
+
]), re = Cn.useSyncExternalStore(K(
|
|
1762
|
+
(w) => J(y, (T, D) => {
|
|
1763
|
+
he(D, T) || w();
|
|
1762
1764
|
}),
|
|
1763
1765
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1764
1766
|
[
|
|
1765
1767
|
a,
|
|
1766
1768
|
y
|
|
1767
1769
|
]
|
|
1768
|
-
), we[0], we[1]),
|
|
1770
|
+
), we[0], we[1]), ae = !S.current, Wr = f[y] && f[y].length > 0, le = re.data, de = E(le) ? ce && Er(ce) ? Xe(ce) : ce : le, Te = re.error, It = O(de), Ne = u ? E(le) ? It.current : le : de, Lt = Wr && !E(Te) ? !1 : ae && !E(c) ? c : R().isPaused() ? !1 : o ? E(de) ? !1 : g : E(de) || g, At = !!(y && t && ae && Lt), Gr = E(re.isValidating) ? At : re.isValidating, jr = E(re.isLoading) ? At : re.isLoading, fe = K(
|
|
1769
1771
|
async (w) => {
|
|
1770
1772
|
const T = C.current;
|
|
1771
|
-
if (!y || !T ||
|
|
1773
|
+
if (!y || !T || N.current || R().isPaused())
|
|
1772
1774
|
return !1;
|
|
1773
|
-
let
|
|
1774
|
-
const ue = w || {},
|
|
1775
|
+
let D, L, G = !0;
|
|
1776
|
+
const ue = w || {}, z = !b[y] || !ue.dedupe, V = () => Qt ? !N.current && y === k.current && S.current : y === k.current, Y = {
|
|
1775
1777
|
isValidating: !1,
|
|
1776
1778
|
isLoading: !1
|
|
1777
1779
|
}, Bt = () => {
|
|
1778
|
-
|
|
1780
|
+
ee(Y);
|
|
1779
1781
|
}, Mt = () => {
|
|
1780
1782
|
const H = b[y];
|
|
1781
|
-
H && H[1] ===
|
|
1783
|
+
H && H[1] === L && delete b[y];
|
|
1782
1784
|
}, zt = {
|
|
1783
1785
|
isValidating: !0
|
|
1784
1786
|
};
|
|
1785
1787
|
E(F().data) && (zt.isLoading = !0);
|
|
1786
1788
|
try {
|
|
1787
|
-
if (
|
|
1788
|
-
G &&
|
|
1789
|
+
if (z && (ee(zt), r.loadingTimeout && E(F().data) && setTimeout(() => {
|
|
1790
|
+
G && V() && R().onLoadingSlow(y, r);
|
|
1789
1791
|
}, r.loadingTimeout), b[y] = [
|
|
1790
1792
|
T(_),
|
|
1791
|
-
|
|
1792
|
-
]), [
|
|
1793
|
-
return
|
|
1794
|
-
|
|
1793
|
+
ut()
|
|
1794
|
+
]), [D, L] = b[y], D = await D, z && setTimeout(Mt, r.dedupingInterval), !b[y] || b[y][1] !== L)
|
|
1795
|
+
return z && V() && R().onDiscarded(y), !1;
|
|
1796
|
+
Y.error = P;
|
|
1795
1797
|
const H = p[y];
|
|
1796
1798
|
if (!E(H) && // case 1
|
|
1797
|
-
(
|
|
1798
|
-
|
|
1799
|
+
(L <= H[0] || // case 2
|
|
1800
|
+
L <= H[1] || // case 3
|
|
1799
1801
|
H[1] === 0))
|
|
1800
|
-
return Bt(),
|
|
1801
|
-
const
|
|
1802
|
-
|
|
1802
|
+
return Bt(), z && V() && R().onDiscarded(y), !1;
|
|
1803
|
+
const Z = F().data;
|
|
1804
|
+
Y.data = n(Z, D) ? Z : D, z && V() && R().onSuccess(D, y, r);
|
|
1803
1805
|
} catch (H) {
|
|
1804
1806
|
Mt();
|
|
1805
|
-
const
|
|
1806
|
-
|
|
1807
|
-
const
|
|
1808
|
-
|
|
1807
|
+
const Z = R(), { shouldRetryOnError: Ue } = Z;
|
|
1808
|
+
Z.isPaused() || (Y.error = H, z && V() && (Z.onError(H, y, Z), (Ue === !0 || q(Ue) && Ue(H)) && (!R().revalidateOnFocus || !R().revalidateOnReconnect || Q()) && Z.onErrorRetry(H, y, Z, (qr) => {
|
|
1809
|
+
const Fe = f[y];
|
|
1810
|
+
Fe && Fe[0] && Fe[0](pe.ERROR_REVALIDATE_EVENT, qr);
|
|
1809
1811
|
}, {
|
|
1810
1812
|
retryCount: (ue.retryCount || 0) + 1,
|
|
1811
1813
|
dedupe: !0
|
|
@@ -1828,24 +1830,24 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
1828
1830
|
y,
|
|
1829
1831
|
a
|
|
1830
1832
|
]
|
|
1831
|
-
), Ot =
|
|
1833
|
+
), Ot = K(
|
|
1832
1834
|
// Use callback to make sure `keyRef.current` returns latest result every time
|
|
1833
1835
|
(...w) => Nr(a, k.current, ...w),
|
|
1834
1836
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1835
1837
|
[]
|
|
1836
1838
|
);
|
|
1837
|
-
if (
|
|
1838
|
-
C.current = t,
|
|
1839
|
-
}),
|
|
1839
|
+
if (Je(() => {
|
|
1840
|
+
C.current = t, I.current = r, E(le) || (It.current = le);
|
|
1841
|
+
}), Je(() => {
|
|
1840
1842
|
if (!y) return;
|
|
1841
|
-
const w = fe.bind(
|
|
1843
|
+
const w = fe.bind(P, Qe);
|
|
1842
1844
|
let T = 0;
|
|
1843
|
-
const
|
|
1845
|
+
const L = to(y, f, (G, ue = {}) => {
|
|
1844
1846
|
if (G == pe.FOCUS_EVENT) {
|
|
1845
|
-
const
|
|
1846
|
-
R().revalidateOnFocus &&
|
|
1847
|
+
const z = Date.now();
|
|
1848
|
+
R().revalidateOnFocus && z > T && Q() && (T = z + R().focusThrottleInterval, w());
|
|
1847
1849
|
} else if (G == pe.RECONNECT_EVENT)
|
|
1848
|
-
R().revalidateOnReconnect &&
|
|
1850
|
+
R().revalidateOnReconnect && Q() && w();
|
|
1849
1851
|
else {
|
|
1850
1852
|
if (G == pe.MUTATE_EVENT)
|
|
1851
1853
|
return fe();
|
|
@@ -1853,61 +1855,61 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
1853
1855
|
return fe(ue);
|
|
1854
1856
|
}
|
|
1855
1857
|
});
|
|
1856
|
-
return
|
|
1858
|
+
return N.current = !1, k.current = y, S.current = !0, ee({
|
|
1857
1859
|
_k: _
|
|
1858
1860
|
}), Lt && (E(de) || _e ? w() : zn(w)), () => {
|
|
1859
|
-
|
|
1861
|
+
N.current = !0, L();
|
|
1860
1862
|
};
|
|
1861
1863
|
}, [
|
|
1862
1864
|
y
|
|
1863
|
-
]),
|
|
1865
|
+
]), Je(() => {
|
|
1864
1866
|
let w;
|
|
1865
1867
|
function T() {
|
|
1866
|
-
const
|
|
1867
|
-
|
|
1868
|
+
const L = q(d) ? d(F().data) : d;
|
|
1869
|
+
L && w !== -1 && (w = setTimeout(D, L));
|
|
1868
1870
|
}
|
|
1869
|
-
function
|
|
1870
|
-
!F().error && (
|
|
1871
|
+
function D() {
|
|
1872
|
+
!F().error && (h || R().isVisible()) && (m || R().isOnline()) ? fe(Qe).then(T) : T();
|
|
1871
1873
|
}
|
|
1872
1874
|
return T(), () => {
|
|
1873
1875
|
w && (clearTimeout(w), w = -1);
|
|
1874
1876
|
};
|
|
1875
1877
|
}, [
|
|
1876
|
-
|
|
1877
|
-
g,
|
|
1878
|
+
d,
|
|
1878
1879
|
h,
|
|
1880
|
+
m,
|
|
1879
1881
|
y
|
|
1880
1882
|
]), ga(Ne), o && E(de) && y) {
|
|
1881
1883
|
if (!Qt && _e)
|
|
1882
1884
|
throw new Error("Fallback data is required when using Suspense in SSR.");
|
|
1883
|
-
C.current = t,
|
|
1885
|
+
C.current = t, I.current = r, N.current = !1;
|
|
1884
1886
|
const w = v[y];
|
|
1885
1887
|
if (!E(w)) {
|
|
1886
1888
|
const T = Ot(w);
|
|
1887
|
-
|
|
1889
|
+
Xe(T);
|
|
1888
1890
|
}
|
|
1889
1891
|
if (E(Te)) {
|
|
1890
|
-
const T = fe(
|
|
1891
|
-
E(Ne) || (T.status = "fulfilled", T.value = !0),
|
|
1892
|
+
const T = fe(Qe);
|
|
1893
|
+
E(Ne) || (T.status = "fulfilled", T.value = !0), Xe(T);
|
|
1892
1894
|
} else
|
|
1893
1895
|
throw Te;
|
|
1894
1896
|
}
|
|
1895
1897
|
return {
|
|
1896
1898
|
mutate: Ot,
|
|
1897
1899
|
get data() {
|
|
1898
|
-
return
|
|
1900
|
+
return te.data = !0, Ne;
|
|
1899
1901
|
},
|
|
1900
1902
|
get error() {
|
|
1901
|
-
return
|
|
1903
|
+
return te.error = !0, Te;
|
|
1902
1904
|
},
|
|
1903
1905
|
get isValidating() {
|
|
1904
|
-
return
|
|
1906
|
+
return te.isValidating = !0, Gr;
|
|
1905
1907
|
},
|
|
1906
1908
|
get isLoading() {
|
|
1907
|
-
return
|
|
1909
|
+
return te.isLoading = !0, jr;
|
|
1908
1910
|
}
|
|
1909
1911
|
};
|
|
1910
|
-
}, ao = eo(ro),
|
|
1912
|
+
}, ao = eo(ro), ne = {
|
|
1911
1913
|
GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
|
|
1912
1914
|
location(latitude: $latitude, longitude: $longitude) {
|
|
1913
1915
|
country
|
|
@@ -2000,35 +2002,35 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2000
2002
|
}`
|
|
2001
2003
|
}, Se = {
|
|
2002
2004
|
GET_LOCATION: {
|
|
2003
|
-
schema:
|
|
2005
|
+
schema: ne.GET_LOCATION,
|
|
2004
2006
|
method: "location"
|
|
2005
2007
|
},
|
|
2006
2008
|
GET_CHATS: {
|
|
2007
|
-
schema:
|
|
2009
|
+
schema: ne.GET_CHATS,
|
|
2008
2010
|
method: "chats"
|
|
2009
2011
|
},
|
|
2010
2012
|
GET_CHATS_STATS: {
|
|
2011
|
-
schema:
|
|
2013
|
+
schema: ne.GET_CHATS_STATS,
|
|
2012
2014
|
method: "chatsStats"
|
|
2013
2015
|
},
|
|
2014
2016
|
GET_CHAT: {
|
|
2015
|
-
schema:
|
|
2017
|
+
schema: ne.GET_CHAT,
|
|
2016
2018
|
method: "chatById"
|
|
2017
2019
|
},
|
|
2018
2020
|
DELETE_CHAT: {
|
|
2019
|
-
schema:
|
|
2021
|
+
schema: ne.DELETE_CHAT,
|
|
2020
2022
|
method: "deleteChat"
|
|
2021
2023
|
},
|
|
2022
2024
|
GET_SERVER_CAPABILITIES: {
|
|
2023
|
-
schema:
|
|
2025
|
+
schema: ne.GET_SERVER_CAPABILITIES,
|
|
2024
2026
|
method: "getServerCapabilities"
|
|
2025
2027
|
},
|
|
2026
2028
|
GET_USER_PREFERENCES: {
|
|
2027
|
-
schema:
|
|
2029
|
+
schema: ne.GET_USER_PREFERENCES,
|
|
2028
2030
|
method: "getUserPreferences"
|
|
2029
2031
|
},
|
|
2030
2032
|
SET_USER_PREFERENCES: {
|
|
2031
|
-
schema:
|
|
2033
|
+
schema: ne.SET_USER_PREFERENCES,
|
|
2032
2034
|
method: "setUserPreferences"
|
|
2033
2035
|
}
|
|
2034
2036
|
}, Rr = process.env.PUBLIC_SASSY_API_SERVER_URL, no = async ({
|
|
@@ -2095,12 +2097,12 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2095
2097
|
swrOptions: a,
|
|
2096
2098
|
getAccessToken: n
|
|
2097
2099
|
}) => {
|
|
2098
|
-
const { data: o, error: s, isLoading: c, mutate:
|
|
2100
|
+
const { data: o, error: s, isLoading: c, mutate: g } = ao(
|
|
2099
2101
|
[t, ...r],
|
|
2100
|
-
(
|
|
2102
|
+
(d) => e(d, n),
|
|
2101
2103
|
{ ...a }
|
|
2102
2104
|
);
|
|
2103
|
-
return { data: o, error: s, isLoading: c, mutate:
|
|
2105
|
+
return { data: o, error: s, isLoading: c, mutate: g };
|
|
2104
2106
|
}, De = async ({
|
|
2105
2107
|
getAccessToken: e,
|
|
2106
2108
|
type: t,
|
|
@@ -2133,7 +2135,7 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2133
2135
|
keys: e,
|
|
2134
2136
|
getAccessToken: t
|
|
2135
2137
|
}) => {
|
|
2136
|
-
|
|
2138
|
+
St(
|
|
2137
2139
|
["/preferences", ...e],
|
|
2138
2140
|
(r) => Lr(r, t)
|
|
2139
2141
|
);
|
|
@@ -2177,7 +2179,7 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2177
2179
|
keys: e,
|
|
2178
2180
|
getAccessToken: t
|
|
2179
2181
|
}) => {
|
|
2180
|
-
|
|
2182
|
+
St(["/history", ...e], (r) => Or(r, t));
|
|
2181
2183
|
}, Br = async ([e], t) => De({
|
|
2182
2184
|
getAccessToken: t,
|
|
2183
2185
|
type: Se.GET_SERVER_CAPABILITIES
|
|
@@ -2191,8 +2193,8 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2191
2193
|
}), lo = ({
|
|
2192
2194
|
getAccessToken: e
|
|
2193
2195
|
}) => {
|
|
2194
|
-
|
|
2195
|
-
}, uo = "z-20", mo = "z-10",
|
|
2196
|
+
St(["/capabilities"], (t) => Br(t, e));
|
|
2197
|
+
}, uo = "z-20", mo = "z-10", X = M.createContext({
|
|
2196
2198
|
state: {
|
|
2197
2199
|
id: "",
|
|
2198
2200
|
model: ke,
|
|
@@ -2210,20 +2212,20 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2210
2212
|
plugins: [],
|
|
2211
2213
|
engines: []
|
|
2212
2214
|
}
|
|
2213
|
-
}), go =
|
|
2215
|
+
}), go = M.createContext({
|
|
2214
2216
|
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
|
2215
2217
|
dispatch: () => {
|
|
2216
2218
|
}
|
|
2217
|
-
}),
|
|
2218
|
-
state: { prompt: "" },
|
|
2219
|
+
}), Ve = M.createContext({
|
|
2220
|
+
state: { prompt: "", lastTriggeredTimestamp: 0 },
|
|
2219
2221
|
dispatch: () => {
|
|
2220
2222
|
}
|
|
2221
2223
|
}), ho = ({
|
|
2222
2224
|
className: e
|
|
2223
2225
|
}) => {
|
|
2224
|
-
const { state: t, dispatch: r } =
|
|
2226
|
+
const { state: t, dispatch: r } = B(X), a = O(null), n = O(!1), o = (s) => {
|
|
2225
2227
|
s.preventDefault(), r({
|
|
2226
|
-
type:
|
|
2228
|
+
type: ft
|
|
2227
2229
|
});
|
|
2228
2230
|
};
|
|
2229
2231
|
return A(() => {
|
|
@@ -2242,7 +2244,7 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2242
2244
|
children: t != null && t.streaming ? /* @__PURE__ */ i(Oa, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ i(La, { size: "size-4", monotone: !0 })
|
|
2243
2245
|
}
|
|
2244
2246
|
);
|
|
2245
|
-
},
|
|
2247
|
+
}, mt = tt.createContext({
|
|
2246
2248
|
getItemProps: () => ({}),
|
|
2247
2249
|
activeIndex: null,
|
|
2248
2250
|
/* v8 ignore next 2 */
|
|
@@ -2272,43 +2274,43 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2272
2274
|
mode: o = "system",
|
|
2273
2275
|
focusMode: s = "system",
|
|
2274
2276
|
...c
|
|
2275
|
-
},
|
|
2276
|
-
const [
|
|
2277
|
-
nodeId:
|
|
2278
|
-
open:
|
|
2279
|
-
onOpenChange: (
|
|
2280
|
-
|
|
2277
|
+
}, g) => {
|
|
2278
|
+
const [d, h] = W(!1), [m, u] = W(!1), [f, p] = W(null), b = O([]), v = O([]), y = B(mt), _ = fr(), S = ha(), N = pr(), { floatingStyles: k, refs: C, context: I } = fa({
|
|
2279
|
+
nodeId: S,
|
|
2280
|
+
open: d,
|
|
2281
|
+
onOpenChange: (ae) => {
|
|
2282
|
+
h(ae), n == null || n(ae);
|
|
2281
2283
|
},
|
|
2282
2284
|
placement: a,
|
|
2283
2285
|
strategy: "fixed",
|
|
2284
2286
|
middleware: [pa({ mainAxis: 10 }), ba(), ya()],
|
|
2285
2287
|
whileElementsMounted: va
|
|
2286
|
-
}), R = ka(
|
|
2288
|
+
}), R = ka(I, {
|
|
2287
2289
|
event: "mousedown",
|
|
2288
2290
|
toggle: !0,
|
|
2289
2291
|
ignoreMouse: !1
|
|
2290
|
-
}),
|
|
2292
|
+
}), Q = _a(I, { role: "menu" }), F = Ea(I, { bubbles: !0 }), ee = xa(I, {
|
|
2291
2293
|
listRef: b,
|
|
2292
2294
|
activeIndex: f,
|
|
2293
2295
|
nested: !1,
|
|
2294
2296
|
onNavigate: p,
|
|
2295
2297
|
loop: !0
|
|
2296
|
-
}),
|
|
2298
|
+
}), J = Sa(I, {
|
|
2297
2299
|
listRef: v,
|
|
2298
|
-
onMatch:
|
|
2300
|
+
onMatch: d ? p : void 0,
|
|
2299
2301
|
activeIndex: f
|
|
2300
|
-
}), { getReferenceProps: U, getFloatingProps:
|
|
2302
|
+
}), { getReferenceProps: U, getFloatingProps: te, getItemProps: ce } = wa([R, Q, F, ee, J]), he = rr(e) === "Button" || rr(e) === "ButtonIcon", we = he ? {
|
|
2301
2303
|
noInternalClick: he,
|
|
2302
2304
|
focusMode: s,
|
|
2303
2305
|
mode: o
|
|
2304
|
-
} : {},
|
|
2306
|
+
} : {}, re = M.cloneElement(
|
|
2305
2307
|
e,
|
|
2306
2308
|
{
|
|
2307
2309
|
...we,
|
|
2308
2310
|
"aria-label": r,
|
|
2309
|
-
"data-open":
|
|
2310
|
-
"data-focus-inside":
|
|
2311
|
-
ref: br([C.setReference,
|
|
2311
|
+
"data-open": d ? "" : void 0,
|
|
2312
|
+
"data-focus-inside": m ? "" : void 0,
|
|
2313
|
+
ref: br([C.setReference, N.ref, g]),
|
|
2312
2314
|
...U(
|
|
2313
2315
|
y.getItemProps({
|
|
2314
2316
|
...c
|
|
@@ -2319,30 +2321,30 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2319
2321
|
return A(() => {
|
|
2320
2322
|
if (!_)
|
|
2321
2323
|
return;
|
|
2322
|
-
function
|
|
2323
|
-
|
|
2324
|
+
function ae() {
|
|
2325
|
+
h(!1), n == null || n(!1);
|
|
2324
2326
|
}
|
|
2325
|
-
return _.events.on("click",
|
|
2326
|
-
_.events.off("click",
|
|
2327
|
+
return _.events.on("click", ae), () => {
|
|
2328
|
+
_.events.off("click", ae);
|
|
2327
2329
|
};
|
|
2328
2330
|
}, [_, n]), A(() => {
|
|
2329
|
-
|
|
2330
|
-
}, [_,
|
|
2331
|
-
|
|
2331
|
+
d && _ && _.events.emit("menuopen", { nodeId: S });
|
|
2332
|
+
}, [_, d, S]), /* @__PURE__ */ x(Ta, { id: S, children: [
|
|
2333
|
+
re,
|
|
2332
2334
|
/* @__PURE__ */ i(
|
|
2333
|
-
|
|
2335
|
+
mt.Provider,
|
|
2334
2336
|
{
|
|
2335
2337
|
value: {
|
|
2336
2338
|
activeIndex: f,
|
|
2337
2339
|
setActiveIndex: p,
|
|
2338
2340
|
getItemProps: ce,
|
|
2339
|
-
setHasFocusInside:
|
|
2340
|
-
isOpen:
|
|
2341
|
+
setHasFocusInside: u,
|
|
2342
|
+
isOpen: d
|
|
2341
2343
|
},
|
|
2342
|
-
children: /* @__PURE__ */ i(Na, { elementsRef: b, labelsRef: v, children:
|
|
2344
|
+
children: /* @__PURE__ */ i(Na, { elementsRef: b, labelsRef: v, children: d && /* @__PURE__ */ i(Ca, { children: /* @__PURE__ */ i(
|
|
2343
2345
|
Ra,
|
|
2344
2346
|
{
|
|
2345
|
-
context:
|
|
2347
|
+
context: I,
|
|
2346
2348
|
modal: !1,
|
|
2347
2349
|
initialFocus: 0,
|
|
2348
2350
|
returnFocus: !0,
|
|
@@ -2352,7 +2354,7 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2352
2354
|
ref: C.setFloating,
|
|
2353
2355
|
className: "rounded-md bg-surface-light shadow-sm shadow-border-dark outline-none p-4 sm:p-2",
|
|
2354
2356
|
style: k,
|
|
2355
|
-
...
|
|
2357
|
+
...te(),
|
|
2356
2358
|
children: t
|
|
2357
2359
|
}
|
|
2358
2360
|
)
|
|
@@ -2365,7 +2367,7 @@ const Ze = O.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2365
2367
|
), wt = gr((e, t) => /* @__PURE__ */ i(Ia, { children: /* @__PURE__ */ i(Mr, { ...e, ref: t }) }));
|
|
2366
2368
|
wt.displayName = "Menu";
|
|
2367
2369
|
Mr.displayName = "MenuComponent";
|
|
2368
|
-
const Ae =
|
|
2370
|
+
const Ae = tt.forwardRef(
|
|
2369
2371
|
({
|
|
2370
2372
|
label: e,
|
|
2371
2373
|
disabled: t,
|
|
@@ -2375,24 +2377,24 @@ const Ae = et.forwardRef(
|
|
|
2375
2377
|
ignoreClick: o = !1,
|
|
2376
2378
|
selected: s = !1,
|
|
2377
2379
|
...c
|
|
2378
|
-
},
|
|
2379
|
-
let
|
|
2380
|
-
const
|
|
2380
|
+
}, g) => {
|
|
2381
|
+
let d = "";
|
|
2382
|
+
const h = tt.useContext(mt), m = pr({ label: t ? null : e }), u = fr(), f = br([m.ref, g]);
|
|
2381
2383
|
if (a && n)
|
|
2382
2384
|
return /* @__PURE__ */ i(
|
|
2383
2385
|
"div",
|
|
2384
2386
|
{
|
|
2385
2387
|
role: "menuitem",
|
|
2386
|
-
...
|
|
2388
|
+
...h.getItemProps({
|
|
2387
2389
|
onClick(b) {
|
|
2388
2390
|
var v;
|
|
2389
|
-
o || ((v = c.onClick) == null || v.call(c, b),
|
|
2391
|
+
o || ((v = c.onClick) == null || v.call(c, b), u == null || u.events.emit("click"));
|
|
2390
2392
|
}
|
|
2391
2393
|
}),
|
|
2392
2394
|
children: n
|
|
2393
2395
|
}
|
|
2394
2396
|
);
|
|
2395
|
-
r && (
|
|
2397
|
+
r && (d = "pl-2");
|
|
2396
2398
|
const p = l(
|
|
2397
2399
|
"m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1 flex w-full rounded-md border border-transparent text-left text-base outline-none focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium",
|
|
2398
2400
|
{
|
|
@@ -2410,19 +2412,19 @@ const Ae = et.forwardRef(
|
|
|
2410
2412
|
className: p,
|
|
2411
2413
|
tabIndex: 0,
|
|
2412
2414
|
disabled: t,
|
|
2413
|
-
...
|
|
2415
|
+
...h.getItemProps({
|
|
2414
2416
|
onClick(b) {
|
|
2415
2417
|
var v;
|
|
2416
|
-
o || ((v = c.onClick) == null || v.call(c, b),
|
|
2418
|
+
o || ((v = c.onClick) == null || v.call(c, b), u == null || u.events.emit("click"));
|
|
2417
2419
|
},
|
|
2418
2420
|
onFocus(b) {
|
|
2419
2421
|
var v;
|
|
2420
|
-
(v = c.onFocus) == null || v.call(c, b),
|
|
2422
|
+
(v = c.onFocus) == null || v.call(c, b), h.setHasFocusInside(!0);
|
|
2421
2423
|
}
|
|
2422
2424
|
}),
|
|
2423
2425
|
children: [
|
|
2424
2426
|
r,
|
|
2425
|
-
e && /* @__PURE__ */ i("span", { className:
|
|
2427
|
+
e && /* @__PURE__ */ i("span", { className: d, children: e })
|
|
2426
2428
|
]
|
|
2427
2429
|
}
|
|
2428
2430
|
);
|
|
@@ -2461,18 +2463,18 @@ const fo = (e) => {
|
|
|
2461
2463
|
className: e,
|
|
2462
2464
|
defaultPlacement: t = "top-start"
|
|
2463
2465
|
}) => {
|
|
2464
|
-
const { dispatch: r } =
|
|
2466
|
+
const { dispatch: r } = B(Ve), { getAccessToken: a, user: n } = xe(), {
|
|
2465
2467
|
data: o,
|
|
2466
2468
|
error: s,
|
|
2467
2469
|
isLoading: c
|
|
2468
2470
|
} = Ar({
|
|
2469
2471
|
keys: [n == null ? void 0 : n.username],
|
|
2470
2472
|
getAccessToken: a
|
|
2471
|
-
}),
|
|
2472
|
-
|
|
2473
|
+
}), g = (d, h) => {
|
|
2474
|
+
d.preventDefault(), r({
|
|
2473
2475
|
type: ur,
|
|
2474
2476
|
payload: {
|
|
2475
|
-
prompt:
|
|
2477
|
+
prompt: h
|
|
2476
2478
|
}
|
|
2477
2479
|
});
|
|
2478
2480
|
};
|
|
@@ -2485,13 +2487,13 @@ const fo = (e) => {
|
|
|
2485
2487
|
defaultPlacement: t,
|
|
2486
2488
|
children: [
|
|
2487
2489
|
/* @__PURE__ */ i(zr, { children: "Prompts" }),
|
|
2488
|
-
o && o.tags && o.tags.map((
|
|
2490
|
+
o && o.tags && o.tags.map((d) => d.enabled && d.label && d.content && /* @__PURE__ */ i(
|
|
2489
2491
|
Ae,
|
|
2490
2492
|
{
|
|
2491
|
-
label:
|
|
2492
|
-
onClick: (
|
|
2493
|
+
label: d.label,
|
|
2494
|
+
onClick: (h) => g(h, d.content)
|
|
2493
2495
|
},
|
|
2494
|
-
`prompt-button-${
|
|
2496
|
+
`prompt-button-${d.slot}`
|
|
2495
2497
|
))
|
|
2496
2498
|
]
|
|
2497
2499
|
}
|
|
@@ -2499,7 +2501,7 @@ const fo = (e) => {
|
|
|
2499
2501
|
}, bo = ({
|
|
2500
2502
|
className: e
|
|
2501
2503
|
}) => {
|
|
2502
|
-
const { state: t } =
|
|
2504
|
+
const { state: t } = B(X);
|
|
2503
2505
|
return /* @__PURE__ */ i(
|
|
2504
2506
|
Ee,
|
|
2505
2507
|
{
|
|
@@ -2515,25 +2517,25 @@ const fo = (e) => {
|
|
|
2515
2517
|
}, yo = ({
|
|
2516
2518
|
className: e
|
|
2517
2519
|
}) => {
|
|
2518
|
-
const { state: t, dispatch: r } =
|
|
2520
|
+
const { state: t, dispatch: r } = B(X), { getAccessToken: a, user: n } = xe(), {
|
|
2519
2521
|
data: o,
|
|
2520
2522
|
error: s,
|
|
2521
2523
|
isLoading: c,
|
|
2522
|
-
mutate:
|
|
2524
|
+
mutate: g
|
|
2523
2525
|
} = Ar({
|
|
2524
2526
|
keys: [n == null ? void 0 : n.username],
|
|
2525
2527
|
getAccessToken: a
|
|
2526
|
-
}),
|
|
2528
|
+
}), d = async (h) => {
|
|
2527
2529
|
try {
|
|
2528
2530
|
await Ir({
|
|
2529
2531
|
accessToken: await a(),
|
|
2530
2532
|
type: Se.SET_USER_PREFERENCES,
|
|
2531
2533
|
params: {
|
|
2532
2534
|
user: n == null ? void 0 : n.username,
|
|
2533
|
-
engine:
|
|
2535
|
+
engine: h
|
|
2534
2536
|
}
|
|
2535
|
-
}),
|
|
2536
|
-
type:
|
|
2537
|
+
}), g({ ...o }), t && (t == null ? void 0 : t.messages.length) > 0 && r({
|
|
2538
|
+
type: ft
|
|
2537
2539
|
});
|
|
2538
2540
|
} catch {
|
|
2539
2541
|
}
|
|
@@ -2543,7 +2545,7 @@ const fo = (e) => {
|
|
|
2543
2545
|
{
|
|
2544
2546
|
mode: "dark",
|
|
2545
2547
|
focusMode: "light",
|
|
2546
|
-
trigger: /* @__PURE__ */ i(Ee, { className: e, children: o && o.engine ===
|
|
2548
|
+
trigger: /* @__PURE__ */ i(Ee, { className: e, children: o && o.engine === He ? /* @__PURE__ */ i(Ft, { size: "size-4" }) : /* @__PURE__ */ i(Ht, { size: "size-4" }) }),
|
|
2547
2549
|
defaultPlacement: "top-start",
|
|
2548
2550
|
children: [
|
|
2549
2551
|
/* @__PURE__ */ i(zr, { children: "Engines" }),
|
|
@@ -2553,16 +2555,16 @@ const fo = (e) => {
|
|
|
2553
2555
|
selected: o && o.engine === $t,
|
|
2554
2556
|
label: "OpenAI",
|
|
2555
2557
|
icon: /* @__PURE__ */ i(Ht, {}),
|
|
2556
|
-
onClick: () =>
|
|
2558
|
+
onClick: () => d($t)
|
|
2557
2559
|
}
|
|
2558
2560
|
),
|
|
2559
2561
|
/* @__PURE__ */ i(
|
|
2560
2562
|
Ae,
|
|
2561
2563
|
{
|
|
2562
|
-
selected: o && o.engine ===
|
|
2564
|
+
selected: o && o.engine === He,
|
|
2563
2565
|
label: "Anthropic",
|
|
2564
2566
|
icon: /* @__PURE__ */ i(Ft, {}),
|
|
2565
|
-
onClick: () =>
|
|
2567
|
+
onClick: () => d(He)
|
|
2566
2568
|
}
|
|
2567
2569
|
)
|
|
2568
2570
|
]
|
|
@@ -2606,53 +2608,61 @@ const fo = (e) => {
|
|
|
2606
2608
|
ref: s,
|
|
2607
2609
|
...c
|
|
2608
2610
|
}) => {
|
|
2609
|
-
const
|
|
2611
|
+
const { state: m } = B(X), { state: u } = B(Ve), f = O(null), p = O(null), b = Ga([s, p]), v = Ja(), y = xo({
|
|
2610
2612
|
className: e
|
|
2611
|
-
}), [
|
|
2613
|
+
}), [_, S] = Ka({
|
|
2612
2614
|
value: r,
|
|
2613
2615
|
initialControlledDelay: 20,
|
|
2614
2616
|
defaultValue: a,
|
|
2615
|
-
onChange: (
|
|
2617
|
+
onChange: (I) => {
|
|
2616
2618
|
n && n({
|
|
2617
2619
|
target: {
|
|
2618
|
-
value:
|
|
2620
|
+
value: I
|
|
2619
2621
|
}
|
|
2620
2622
|
});
|
|
2621
2623
|
}
|
|
2622
|
-
}),
|
|
2623
|
-
|
|
2624
|
-
}, N = (S) => {
|
|
2625
|
-
if (!d.current)
|
|
2624
|
+
}), N = K(() => {
|
|
2625
|
+
if (!p.current)
|
|
2626
2626
|
return;
|
|
2627
|
-
|
|
2628
|
-
const
|
|
2629
|
-
if (
|
|
2630
|
-
|
|
2627
|
+
p.current.style.height = "auto";
|
|
2628
|
+
const I = p.current.scrollHeight;
|
|
2629
|
+
if (I > 120) {
|
|
2630
|
+
p.current.style.height = "120px", p.current.style.overflowY = "scroll";
|
|
2631
2631
|
return;
|
|
2632
2632
|
}
|
|
2633
|
-
|
|
2633
|
+
p.current.style.height = `${I}px`, p.current.style.overflowY = "hidden";
|
|
2634
|
+
}, [120]), k = (I) => {
|
|
2635
|
+
p.current && (p.current.style.height = "24px"), o(I, _), S("");
|
|
2636
|
+
}, C = (I) => {
|
|
2637
|
+
S(I.target.value), N();
|
|
2634
2638
|
};
|
|
2635
|
-
return
|
|
2639
|
+
return A(() => {
|
|
2640
|
+
m && m.usage === 0 && m.messages.length === 0 && p.current && (p.current.style.height = "24px");
|
|
2641
|
+
}, [m]), A(() => {
|
|
2642
|
+
u.lastTriggeredTimestamp && setTimeout(() => {
|
|
2643
|
+
N();
|
|
2644
|
+
}, 100);
|
|
2645
|
+
}, [u.lastTriggeredTimestamp, N]), /* @__PURE__ */ i(
|
|
2636
2646
|
"div",
|
|
2637
2647
|
{
|
|
2638
|
-
className:
|
|
2639
|
-
ref:
|
|
2648
|
+
className: y.wrapper,
|
|
2649
|
+
ref: f,
|
|
2640
2650
|
...c,
|
|
2641
|
-
children: /* @__PURE__ */ x("form", { onSubmit:
|
|
2642
|
-
/* @__PURE__ */ i("div", { id:
|
|
2651
|
+
children: /* @__PURE__ */ x("form", { onSubmit: k, children: [
|
|
2652
|
+
/* @__PURE__ */ i("div", { id: v, className: "sr-only", children: t }),
|
|
2643
2653
|
/* @__PURE__ */ i("div", { className: "relative", children: /* @__PURE__ */ i(
|
|
2644
2654
|
"textarea",
|
|
2645
2655
|
{
|
|
2646
2656
|
required: !0,
|
|
2647
2657
|
rows: 1,
|
|
2648
|
-
ref:
|
|
2658
|
+
ref: b,
|
|
2649
2659
|
placeholder: "Type your question here.",
|
|
2650
2660
|
translate: "no",
|
|
2651
|
-
onChange:
|
|
2652
|
-
value:
|
|
2653
|
-
onKeyDown: Ua([["mod+Enter",
|
|
2654
|
-
className:
|
|
2655
|
-
"aria-labelledby":
|
|
2661
|
+
onChange: C,
|
|
2662
|
+
value: _,
|
|
2663
|
+
onKeyDown: Ua([["mod+Enter", k]]),
|
|
2664
|
+
className: y.textArea,
|
|
2665
|
+
"aria-labelledby": v
|
|
2656
2666
|
}
|
|
2657
2667
|
) }),
|
|
2658
2668
|
/* @__PURE__ */ x("div", { className: "p-2 flex items-center", children: [
|
|
@@ -2676,24 +2686,24 @@ const fo = (e) => {
|
|
|
2676
2686
|
type: ye,
|
|
2677
2687
|
payload: {
|
|
2678
2688
|
message: {
|
|
2679
|
-
role:
|
|
2689
|
+
role: pt,
|
|
2680
2690
|
content: aa
|
|
2681
2691
|
}
|
|
2682
2692
|
}
|
|
2683
2693
|
});
|
|
2684
2694
|
}, wo = () => {
|
|
2685
|
-
const { state: e, dispatch: t } =
|
|
2695
|
+
const { state: e, dispatch: t } = B(X), { state: r, dispatch: a } = B(Ve), [n, o] = W(""), { getAccessToken: s, user: c } = xe(), g = O(null), d = O(
|
|
2686
2696
|
null
|
|
2687
2697
|
);
|
|
2688
2698
|
A(() => {
|
|
2689
2699
|
(async () => {
|
|
2690
|
-
var
|
|
2700
|
+
var u;
|
|
2691
2701
|
if (!e || e.messages.length === 0) {
|
|
2692
|
-
(
|
|
2702
|
+
(u = d == null ? void 0 : d.current) == null || u.cancel();
|
|
2693
2703
|
return;
|
|
2694
2704
|
}
|
|
2695
|
-
const
|
|
2696
|
-
if (!(e.messages.length === 0 ||
|
|
2705
|
+
const m = e.messages[e.messages.length - 1];
|
|
2706
|
+
if (!(e.messages.length === 0 || m.message.role === ve || m.message.role === Qr || m.message.role === pt || m.message.role === ea))
|
|
2697
2707
|
try {
|
|
2698
2708
|
const f = await oo({
|
|
2699
2709
|
accessToken: await s(),
|
|
@@ -2707,20 +2717,20 @@ const fo = (e) => {
|
|
|
2707
2717
|
}
|
|
2708
2718
|
});
|
|
2709
2719
|
if (f && f.ok) {
|
|
2710
|
-
const p =
|
|
2711
|
-
|
|
2720
|
+
const p = _t();
|
|
2721
|
+
d.current = f.body.getReader();
|
|
2712
2722
|
const b = new TextDecoder();
|
|
2713
2723
|
for (; ; ) {
|
|
2714
2724
|
Le(t, !0);
|
|
2715
|
-
const { done: v, value: y } = await
|
|
2725
|
+
const { done: v, value: y } = await d.current.read();
|
|
2716
2726
|
if (v) {
|
|
2717
2727
|
Le(t, !1);
|
|
2718
2728
|
break;
|
|
2719
2729
|
}
|
|
2720
|
-
const _ = b.decode(y, { stream: !0 }),
|
|
2721
|
-
if (
|
|
2722
|
-
const
|
|
2723
|
-
_.substring(
|
|
2730
|
+
const _ = b.decode(y, { stream: !0 }), S = _.indexOf(Dt);
|
|
2731
|
+
if (S !== -1) {
|
|
2732
|
+
const N = _.substring(0, S), k = JSON.parse(
|
|
2733
|
+
_.substring(S + Dt.length)
|
|
2724
2734
|
);
|
|
2725
2735
|
t({
|
|
2726
2736
|
type: cr,
|
|
@@ -2732,7 +2742,7 @@ const fo = (e) => {
|
|
|
2732
2742
|
type: ye,
|
|
2733
2743
|
payload: {
|
|
2734
2744
|
message: {
|
|
2735
|
-
content:
|
|
2745
|
+
content: N,
|
|
2736
2746
|
role: ve,
|
|
2737
2747
|
messageId: p,
|
|
2738
2748
|
processingTime: k.processingTime,
|
|
@@ -2760,12 +2770,12 @@ const fo = (e) => {
|
|
|
2760
2770
|
}
|
|
2761
2771
|
})();
|
|
2762
2772
|
}, [e == null ? void 0 : e.messages]);
|
|
2763
|
-
const
|
|
2764
|
-
|
|
2773
|
+
const h = async (m) => {
|
|
2774
|
+
m.preventDefault(), t({
|
|
2765
2775
|
type: ye,
|
|
2766
2776
|
payload: {
|
|
2767
2777
|
message: {
|
|
2768
|
-
role:
|
|
2778
|
+
role: et,
|
|
2769
2779
|
content: n
|
|
2770
2780
|
}
|
|
2771
2781
|
}
|
|
@@ -2773,26 +2783,26 @@ const fo = (e) => {
|
|
|
2773
2783
|
};
|
|
2774
2784
|
return A(() => {
|
|
2775
2785
|
if (r.prompt !== "") {
|
|
2776
|
-
const
|
|
2777
|
-
|
|
2778
|
-
o(
|
|
2779
|
-
}) : o(
|
|
2786
|
+
const m = r.prompt.endsWith(":") && !r.prompt.endsWith(": ") ? r.prompt + " " : r.prompt;
|
|
2787
|
+
m.indexOf(Vt) !== -1 ? navigator.clipboard.readText().then((f) => {
|
|
2788
|
+
o(m.replace(Vt, f));
|
|
2789
|
+
}) : o(m), g.current && g.current.focus(), a({
|
|
2780
2790
|
type: dr
|
|
2781
2791
|
});
|
|
2782
2792
|
}
|
|
2783
2793
|
}, [r, a]), A(() => {
|
|
2784
|
-
e && e.usage === 0 && e.messages.length === 0 && (o(""),
|
|
2794
|
+
e && e.usage === 0 && e.messages.length === 0 && (o(""), g.current && g.current.focus());
|
|
2785
2795
|
}, [e]), A(() => {
|
|
2786
|
-
(e == null ? void 0 : e.streaming) === !1 &&
|
|
2796
|
+
(e == null ? void 0 : e.streaming) === !1 && g.current && g.current.focus();
|
|
2787
2797
|
}, [e]), /* @__PURE__ */ x(Oe, { children: [
|
|
2788
2798
|
/* @__PURE__ */ i(
|
|
2789
2799
|
So,
|
|
2790
2800
|
{
|
|
2791
2801
|
label: ta,
|
|
2792
|
-
onSubmit:
|
|
2793
|
-
ref:
|
|
2802
|
+
onSubmit: h,
|
|
2803
|
+
ref: g,
|
|
2794
2804
|
value: n,
|
|
2795
|
-
onChange: (
|
|
2805
|
+
onChange: (m) => o(m.target.value)
|
|
2796
2806
|
}
|
|
2797
2807
|
),
|
|
2798
2808
|
/* @__PURE__ */ x("div", { className: "w-full text-center text-xs text-copy-lighter pt-2", children: [
|
|
@@ -2802,7 +2812,7 @@ const fo = (e) => {
|
|
|
2802
2812
|
] })
|
|
2803
2813
|
] });
|
|
2804
2814
|
}, To = () => {
|
|
2805
|
-
const { state: e } =
|
|
2815
|
+
const { state: e } = B(X), t = O(!1), r = window.innerWidth < 403, [a, n] = W(
|
|
2806
2816
|
r ? "bottom-4" : "top-[245px]"
|
|
2807
2817
|
);
|
|
2808
2818
|
return A(() => {
|
|
@@ -2834,7 +2844,7 @@ try {
|
|
|
2834
2844
|
});
|
|
2835
2845
|
} catch {
|
|
2836
2846
|
}
|
|
2837
|
-
const No = "av-bubble", or = "av-button",
|
|
2847
|
+
const No = "av-bubble", or = "av-button", Pe = "icon", $r = "button", gt = "link", Co = ({
|
|
2838
2848
|
type: e,
|
|
2839
2849
|
size: t,
|
|
2840
2850
|
labelRight: r,
|
|
@@ -2844,13 +2854,13 @@ const No = "av-bubble", or = "av-button", Ve = "icon", $r = "button", mt = "link
|
|
|
2844
2854
|
const o = "max-h-8 py-0 px-2", s = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
|
|
2845
2855
|
switch (e) {
|
|
2846
2856
|
case $r:
|
|
2847
|
-
case
|
|
2857
|
+
case gt:
|
|
2848
2858
|
return l({
|
|
2849
2859
|
[o]: t === "small",
|
|
2850
2860
|
[s]: t === "medium",
|
|
2851
2861
|
[c]: t === "large"
|
|
2852
2862
|
});
|
|
2853
|
-
case
|
|
2863
|
+
case Pe:
|
|
2854
2864
|
return l("inline-flex items-center", {
|
|
2855
2865
|
"justify-center": n === "center",
|
|
2856
2866
|
"justify-start": n === "left",
|
|
@@ -2872,14 +2882,14 @@ const No = "av-bubble", or = "av-button", Ve = "icon", $r = "button", mt = "link
|
|
|
2872
2882
|
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
2873
2883
|
switch (e) {
|
|
2874
2884
|
case $r:
|
|
2875
|
-
case
|
|
2885
|
+
case gt:
|
|
2876
2886
|
return l({
|
|
2877
|
-
"text-center": e ===
|
|
2887
|
+
"text-center": e === gt,
|
|
2878
2888
|
[n]: t === "small",
|
|
2879
2889
|
[o]: t === "medium",
|
|
2880
2890
|
[s]: t === "large"
|
|
2881
2891
|
});
|
|
2882
|
-
case
|
|
2892
|
+
case Pe:
|
|
2883
2893
|
return l({
|
|
2884
2894
|
[n]: t === "small" && (r || a),
|
|
2885
2895
|
[o]: t === "medium" && (r || a),
|
|
@@ -3064,36 +3074,36 @@ const No = "av-bubble", or = "av-button", Ve = "icon", $r = "button", mt = "link
|
|
|
3064
3074
|
disabled: o,
|
|
3065
3075
|
fullWidth: s,
|
|
3066
3076
|
size: c,
|
|
3067
|
-
noBorder:
|
|
3068
|
-
labelRight:
|
|
3069
|
-
labelLeft:
|
|
3070
|
-
noBackground:
|
|
3071
|
-
variant:
|
|
3077
|
+
noBorder: g,
|
|
3078
|
+
labelRight: d,
|
|
3079
|
+
labelLeft: h,
|
|
3080
|
+
noBackground: m,
|
|
3081
|
+
variant: u,
|
|
3072
3082
|
noTruncate: f,
|
|
3073
3083
|
align: p,
|
|
3074
3084
|
radius: b
|
|
3075
|
-
}) => (
|
|
3085
|
+
}) => (u || (u = "primary"), r ? l(or, t) : l(
|
|
3076
3086
|
or,
|
|
3077
3087
|
Io({
|
|
3078
3088
|
mode: a,
|
|
3079
|
-
variant:
|
|
3080
|
-
noBackground:
|
|
3089
|
+
variant: u,
|
|
3090
|
+
noBackground: m,
|
|
3081
3091
|
noTruncate: f
|
|
3082
3092
|
}),
|
|
3083
|
-
Lo({ mode: a, noBackground:
|
|
3093
|
+
Lo({ mode: a, noBackground: m, variant: u }),
|
|
3084
3094
|
Ao({ radius: b }),
|
|
3085
3095
|
Co({
|
|
3086
3096
|
type: e,
|
|
3087
3097
|
size: c,
|
|
3088
|
-
labelRight:
|
|
3089
|
-
labelLeft:
|
|
3098
|
+
labelRight: d,
|
|
3099
|
+
labelLeft: h,
|
|
3090
3100
|
align: p
|
|
3091
3101
|
}),
|
|
3092
|
-
Ro({ type: e, size: c, labelRight:
|
|
3093
|
-
Mo({ mode: a, variant:
|
|
3102
|
+
Ro({ type: e, size: c, labelRight: d, labelLeft: h }),
|
|
3103
|
+
Mo({ mode: a, variant: u, noBorder: g }),
|
|
3094
3104
|
zo({ focusMode: n }),
|
|
3095
|
-
Oo({ mode: a, variant:
|
|
3096
|
-
Bo({ mode: a, variant:
|
|
3105
|
+
Oo({ mode: a, variant: u, disabled: o }),
|
|
3106
|
+
Bo({ mode: a, variant: u, disabled: o }),
|
|
3097
3107
|
{
|
|
3098
3108
|
"w-full": s,
|
|
3099
3109
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
@@ -3102,7 +3112,7 @@ const No = "av-bubble", or = "av-button", Ve = "icon", $r = "button", mt = "link
|
|
|
3102
3112
|
)), $o = (e, t, r) => {
|
|
3103
3113
|
var a;
|
|
3104
3114
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
3105
|
-
}, Tt =
|
|
3115
|
+
}, Tt = M.forwardRef((e, t) => {
|
|
3106
3116
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
3107
3117
|
return /* @__PURE__ */ i(
|
|
3108
3118
|
"button",
|
|
@@ -3116,7 +3126,7 @@ const No = "av-bubble", or = "av-button", Ve = "icon", $r = "button", mt = "link
|
|
|
3116
3126
|
);
|
|
3117
3127
|
});
|
|
3118
3128
|
Tt.displayName = "BaseButton";
|
|
3119
|
-
const Vr =
|
|
3129
|
+
const Vr = M.forwardRef(
|
|
3120
3130
|
({
|
|
3121
3131
|
children: e,
|
|
3122
3132
|
disabled: t = !1,
|
|
@@ -3126,29 +3136,29 @@ const Vr = O.forwardRef(
|
|
|
3126
3136
|
className: o,
|
|
3127
3137
|
type: s = "button",
|
|
3128
3138
|
raw: c = !1,
|
|
3129
|
-
noBorder:
|
|
3130
|
-
"aria-label":
|
|
3131
|
-
label:
|
|
3132
|
-
size:
|
|
3133
|
-
labelRight:
|
|
3139
|
+
noBorder: g = !1,
|
|
3140
|
+
"aria-label": d,
|
|
3141
|
+
label: h,
|
|
3142
|
+
size: m = "medium",
|
|
3143
|
+
labelRight: u,
|
|
3134
3144
|
labelLeft: f,
|
|
3135
3145
|
noBackground: p = !1,
|
|
3136
3146
|
align: b = "center",
|
|
3137
3147
|
radius: v = "large",
|
|
3138
3148
|
variant: y = "primary",
|
|
3139
3149
|
..._
|
|
3140
|
-
},
|
|
3141
|
-
const
|
|
3142
|
-
type:
|
|
3150
|
+
}, S) => {
|
|
3151
|
+
const N = Dr({
|
|
3152
|
+
type: Pe,
|
|
3143
3153
|
mode: r,
|
|
3144
3154
|
focusMode: a,
|
|
3145
3155
|
fullWidth: n,
|
|
3146
3156
|
disabled: t,
|
|
3147
3157
|
raw: c,
|
|
3148
3158
|
className: o,
|
|
3149
|
-
noBorder:
|
|
3150
|
-
size:
|
|
3151
|
-
labelRight:
|
|
3159
|
+
noBorder: g,
|
|
3160
|
+
size: m,
|
|
3161
|
+
labelRight: u,
|
|
3152
3162
|
labelLeft: f,
|
|
3153
3163
|
noBackground: p,
|
|
3154
3164
|
align: b,
|
|
@@ -3163,16 +3173,16 @@ const Vr = O.forwardRef(
|
|
|
3163
3173
|
return /* @__PURE__ */ x(
|
|
3164
3174
|
Tt,
|
|
3165
3175
|
{
|
|
3166
|
-
ref:
|
|
3167
|
-
className:
|
|
3176
|
+
ref: S,
|
|
3177
|
+
className: N,
|
|
3168
3178
|
disabled: t,
|
|
3169
3179
|
type: s,
|
|
3170
|
-
"aria-label":
|
|
3180
|
+
"aria-label": d || h,
|
|
3171
3181
|
..._,
|
|
3172
3182
|
children: [
|
|
3173
3183
|
f && /* @__PURE__ */ i("span", { className: "pr-2", children: f }),
|
|
3174
3184
|
/* @__PURE__ */ i("div", { className: k, children: e }),
|
|
3175
|
-
|
|
3185
|
+
u && /* @__PURE__ */ i("span", { className: "pl-2", children: u })
|
|
3176
3186
|
]
|
|
3177
3187
|
}
|
|
3178
3188
|
);
|
|
@@ -3192,7 +3202,7 @@ try {
|
|
|
3192
3202
|
});
|
|
3193
3203
|
} catch {
|
|
3194
3204
|
}
|
|
3195
|
-
const Do =
|
|
3205
|
+
const Do = M.forwardRef(
|
|
3196
3206
|
({
|
|
3197
3207
|
children: e,
|
|
3198
3208
|
disabled: t = !1,
|
|
@@ -3202,29 +3212,29 @@ const Do = O.forwardRef(
|
|
|
3202
3212
|
className: o,
|
|
3203
3213
|
type: s = "button",
|
|
3204
3214
|
raw: c = !1,
|
|
3205
|
-
noBorder:
|
|
3206
|
-
"aria-label":
|
|
3207
|
-
label:
|
|
3208
|
-
size:
|
|
3209
|
-
labelRight:
|
|
3215
|
+
noBorder: g = !1,
|
|
3216
|
+
"aria-label": d,
|
|
3217
|
+
label: h,
|
|
3218
|
+
size: m = "medium",
|
|
3219
|
+
labelRight: u,
|
|
3210
3220
|
labelLeft: f,
|
|
3211
3221
|
noBackground: p = !1,
|
|
3212
3222
|
align: b = "center",
|
|
3213
3223
|
active: v = !1,
|
|
3214
3224
|
radius: y = "large",
|
|
3215
3225
|
..._
|
|
3216
|
-
},
|
|
3217
|
-
const
|
|
3218
|
-
type:
|
|
3226
|
+
}, S) => {
|
|
3227
|
+
const N = Dr({
|
|
3228
|
+
type: Pe,
|
|
3219
3229
|
mode: r,
|
|
3220
3230
|
focusMode: a,
|
|
3221
3231
|
fullWidth: n,
|
|
3222
3232
|
disabled: t,
|
|
3223
3233
|
raw: c,
|
|
3224
3234
|
className: o,
|
|
3225
|
-
noBorder:
|
|
3226
|
-
size:
|
|
3227
|
-
labelRight:
|
|
3235
|
+
noBorder: g,
|
|
3236
|
+
size: m,
|
|
3237
|
+
labelRight: u,
|
|
3228
3238
|
labelLeft: f,
|
|
3229
3239
|
noBackground: p,
|
|
3230
3240
|
align: b,
|
|
@@ -3254,16 +3264,16 @@ const Do = O.forwardRef(
|
|
|
3254
3264
|
return /* @__PURE__ */ i("div", { className: C, children: /* @__PURE__ */ x(
|
|
3255
3265
|
Tt,
|
|
3256
3266
|
{
|
|
3257
|
-
ref:
|
|
3258
|
-
className:
|
|
3267
|
+
ref: S,
|
|
3268
|
+
className: N,
|
|
3259
3269
|
disabled: t,
|
|
3260
3270
|
type: s,
|
|
3261
|
-
"aria-label":
|
|
3271
|
+
"aria-label": d || h,
|
|
3262
3272
|
..._,
|
|
3263
3273
|
children: [
|
|
3264
3274
|
f && /* @__PURE__ */ i("span", { className: "pr-2", children: f }),
|
|
3265
3275
|
/* @__PURE__ */ i("div", { className: k, children: e }),
|
|
3266
|
-
|
|
3276
|
+
u && /* @__PURE__ */ i("span", { className: "pl-2", children: u })
|
|
3267
3277
|
]
|
|
3268
3278
|
}
|
|
3269
3279
|
) });
|
|
@@ -3279,21 +3289,21 @@ const Pr = ({
|
|
|
3279
3289
|
size: o,
|
|
3280
3290
|
title: s,
|
|
3281
3291
|
semantic: c = !1,
|
|
3282
|
-
...
|
|
3292
|
+
...g
|
|
3283
3293
|
}) => {
|
|
3284
|
-
const
|
|
3294
|
+
const d = l(o, a);
|
|
3285
3295
|
return /* @__PURE__ */ x(Oe, { children: [
|
|
3286
3296
|
/* @__PURE__ */ i(
|
|
3287
3297
|
"svg",
|
|
3288
3298
|
{
|
|
3289
3299
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3290
|
-
className:
|
|
3300
|
+
className: d,
|
|
3291
3301
|
viewBox: r || n,
|
|
3292
3302
|
fill: t || "currentColor",
|
|
3293
3303
|
role: "img",
|
|
3294
3304
|
"aria-hidden": !c,
|
|
3295
3305
|
focusable: !1,
|
|
3296
|
-
...
|
|
3306
|
+
...g,
|
|
3297
3307
|
children: e
|
|
3298
3308
|
}
|
|
3299
3309
|
),
|
|
@@ -3431,29 +3441,29 @@ const Uo = ({
|
|
|
3431
3441
|
copyToClipboard: o,
|
|
3432
3442
|
copyToClipboardFocusMode: s = "system",
|
|
3433
3443
|
copyToClipboardMode: c = "system",
|
|
3434
|
-
noMaxWidth:
|
|
3444
|
+
noMaxWidth: g = !1
|
|
3435
3445
|
}) => {
|
|
3436
|
-
const [
|
|
3437
|
-
|
|
3446
|
+
const [d, h] = W(!1), m = Go({ kind: t, className: r, noMaxWidth: g }), u = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), f = () => {
|
|
3447
|
+
h(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
3438
3448
|
};
|
|
3439
3449
|
return A(() => {
|
|
3440
3450
|
let p;
|
|
3441
|
-
return
|
|
3442
|
-
|
|
3451
|
+
return d && (p = window.setTimeout(() => {
|
|
3452
|
+
h(!1);
|
|
3443
3453
|
}, 3e3)), () => {
|
|
3444
3454
|
clearTimeout(p);
|
|
3445
3455
|
};
|
|
3446
|
-
}, [
|
|
3456
|
+
}, [d]), /* @__PURE__ */ x("div", { className: m.wrapper, children: [
|
|
3447
3457
|
/* @__PURE__ */ x("div", { children: [
|
|
3448
|
-
/* @__PURE__ */ i("div", { className:
|
|
3449
|
-
a && Object.keys(a).map((p) => a[p] ? /* @__PURE__ */ i("div", { className: "prose-p:m-0", children: /* @__PURE__ */ x("p", { className:
|
|
3458
|
+
/* @__PURE__ */ i("div", { className: m.main, children: e }),
|
|
3459
|
+
a && Object.keys(a).map((p) => a[p] ? /* @__PURE__ */ i("div", { className: "prose-p:m-0", children: /* @__PURE__ */ x("p", { className: m.footer, children: [
|
|
3450
3460
|
p,
|
|
3451
3461
|
": ",
|
|
3452
3462
|
a[p]
|
|
3453
3463
|
] }) }, `-${p}`) : null),
|
|
3454
3464
|
n && n
|
|
3455
3465
|
] }),
|
|
3456
|
-
|
|
3466
|
+
u && /* @__PURE__ */ i("div", { className: m.copyButton, children: /* @__PURE__ */ i(
|
|
3457
3467
|
Vr,
|
|
3458
3468
|
{
|
|
3459
3469
|
noBorder: !0,
|
|
@@ -3461,14 +3471,14 @@ const Uo = ({
|
|
|
3461
3471
|
size: "small",
|
|
3462
3472
|
mode: c,
|
|
3463
3473
|
focusMode: s,
|
|
3464
|
-
label:
|
|
3474
|
+
label: d ? "Copied to clipboard" : "Copy to clipboard",
|
|
3465
3475
|
onClick: f,
|
|
3466
|
-
disabled:
|
|
3467
|
-
children:
|
|
3476
|
+
disabled: d,
|
|
3477
|
+
children: d ? /* @__PURE__ */ i(Vo, { size: "size-3" }) : /* @__PURE__ */ i(Po, { size: "size-3" })
|
|
3468
3478
|
}
|
|
3469
3479
|
) })
|
|
3470
3480
|
] });
|
|
3471
|
-
}, sr = "av-button", Nt = "icon", Ct = "button",
|
|
3481
|
+
}, sr = "av-button", Nt = "icon", Ct = "button", ht = "link", qo = ({
|
|
3472
3482
|
type: e,
|
|
3473
3483
|
size: t,
|
|
3474
3484
|
labelRight: r,
|
|
@@ -3478,7 +3488,7 @@ const Uo = ({
|
|
|
3478
3488
|
const o = "max-h-8 py-0 px-2", s = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
|
|
3479
3489
|
switch (e) {
|
|
3480
3490
|
case Ct:
|
|
3481
|
-
case
|
|
3491
|
+
case ht:
|
|
3482
3492
|
return l({
|
|
3483
3493
|
[o]: t === "small",
|
|
3484
3494
|
[s]: t === "medium",
|
|
@@ -3506,9 +3516,9 @@ const Uo = ({
|
|
|
3506
3516
|
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
3507
3517
|
switch (e) {
|
|
3508
3518
|
case Ct:
|
|
3509
|
-
case
|
|
3519
|
+
case ht:
|
|
3510
3520
|
return l({
|
|
3511
|
-
"text-center": e ===
|
|
3521
|
+
"text-center": e === ht,
|
|
3512
3522
|
[n]: t === "small",
|
|
3513
3523
|
[o]: t === "medium",
|
|
3514
3524
|
[s]: t === "large"
|
|
@@ -3698,36 +3708,36 @@ const Uo = ({
|
|
|
3698
3708
|
disabled: o,
|
|
3699
3709
|
fullWidth: s,
|
|
3700
3710
|
size: c,
|
|
3701
|
-
noBorder:
|
|
3702
|
-
labelRight:
|
|
3703
|
-
labelLeft:
|
|
3704
|
-
noBackground:
|
|
3705
|
-
variant:
|
|
3711
|
+
noBorder: g,
|
|
3712
|
+
labelRight: d,
|
|
3713
|
+
labelLeft: h,
|
|
3714
|
+
noBackground: m,
|
|
3715
|
+
variant: u,
|
|
3706
3716
|
noTruncate: f,
|
|
3707
3717
|
align: p,
|
|
3708
3718
|
radius: b
|
|
3709
|
-
}) => (
|
|
3719
|
+
}) => (u || (u = "primary"), r ? l(sr, t) : l(
|
|
3710
3720
|
sr,
|
|
3711
3721
|
Jo({
|
|
3712
3722
|
mode: a,
|
|
3713
|
-
variant:
|
|
3714
|
-
noBackground:
|
|
3723
|
+
variant: u,
|
|
3724
|
+
noBackground: m,
|
|
3715
3725
|
noTruncate: f
|
|
3716
3726
|
}),
|
|
3717
|
-
Yo({ mode: a, noBackground:
|
|
3727
|
+
Yo({ mode: a, noBackground: m, variant: u }),
|
|
3718
3728
|
Zo({ radius: b }),
|
|
3719
3729
|
qo({
|
|
3720
3730
|
type: e,
|
|
3721
3731
|
size: c,
|
|
3722
|
-
labelRight:
|
|
3723
|
-
labelLeft:
|
|
3732
|
+
labelRight: d,
|
|
3733
|
+
labelLeft: h,
|
|
3724
3734
|
align: p
|
|
3725
3735
|
}),
|
|
3726
|
-
Ko({ type: e, size: c, labelRight:
|
|
3727
|
-
es({ mode: a, variant:
|
|
3736
|
+
Ko({ type: e, size: c, labelRight: d, labelLeft: h }),
|
|
3737
|
+
es({ mode: a, variant: u, noBorder: g }),
|
|
3728
3738
|
ts({ focusMode: n }),
|
|
3729
|
-
Xo({ mode: a, variant:
|
|
3730
|
-
Qo({ mode: a, variant:
|
|
3739
|
+
Xo({ mode: a, variant: u, disabled: o }),
|
|
3740
|
+
Qo({ mode: a, variant: u, disabled: o }),
|
|
3731
3741
|
{
|
|
3732
3742
|
"w-full": s,
|
|
3733
3743
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
@@ -3736,7 +3746,7 @@ const Uo = ({
|
|
|
3736
3746
|
)), rs = (e, t, r) => {
|
|
3737
3747
|
var a;
|
|
3738
3748
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
3739
|
-
}, Rt =
|
|
3749
|
+
}, Rt = M.forwardRef((e, t) => {
|
|
3740
3750
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
3741
3751
|
return /* @__PURE__ */ i(
|
|
3742
3752
|
"button",
|
|
@@ -3750,7 +3760,7 @@ const Uo = ({
|
|
|
3750
3760
|
);
|
|
3751
3761
|
});
|
|
3752
3762
|
Rt.displayName = "BaseButton";
|
|
3753
|
-
const Fr =
|
|
3763
|
+
const Fr = M.forwardRef(
|
|
3754
3764
|
({
|
|
3755
3765
|
children: e,
|
|
3756
3766
|
disabled: t = !1,
|
|
@@ -3760,11 +3770,11 @@ const Fr = O.forwardRef(
|
|
|
3760
3770
|
className: o,
|
|
3761
3771
|
size: s = "medium",
|
|
3762
3772
|
raw: c = !1,
|
|
3763
|
-
noBorder:
|
|
3764
|
-
variant:
|
|
3765
|
-
noTruncate:
|
|
3766
|
-
radius:
|
|
3767
|
-
...
|
|
3773
|
+
noBorder: g = !1,
|
|
3774
|
+
variant: d = "primary",
|
|
3775
|
+
noTruncate: h = !1,
|
|
3776
|
+
radius: m = "large",
|
|
3777
|
+
...u
|
|
3768
3778
|
}, f) => {
|
|
3769
3779
|
const p = Ur({
|
|
3770
3780
|
type: Ct,
|
|
@@ -3775,10 +3785,10 @@ const Fr = O.forwardRef(
|
|
|
3775
3785
|
raw: c,
|
|
3776
3786
|
className: o,
|
|
3777
3787
|
size: s,
|
|
3778
|
-
noBorder:
|
|
3779
|
-
variant:
|
|
3780
|
-
noTruncate:
|
|
3781
|
-
radius:
|
|
3788
|
+
noBorder: g,
|
|
3789
|
+
variant: d,
|
|
3790
|
+
noTruncate: h,
|
|
3791
|
+
radius: m
|
|
3782
3792
|
});
|
|
3783
3793
|
return /* @__PURE__ */ i(
|
|
3784
3794
|
Rt,
|
|
@@ -3786,7 +3796,7 @@ const Fr = O.forwardRef(
|
|
|
3786
3796
|
ref: f,
|
|
3787
3797
|
className: p,
|
|
3788
3798
|
disabled: t,
|
|
3789
|
-
...
|
|
3799
|
+
...u,
|
|
3790
3800
|
children: e
|
|
3791
3801
|
}
|
|
3792
3802
|
);
|
|
@@ -3806,7 +3816,7 @@ try {
|
|
|
3806
3816
|
});
|
|
3807
3817
|
} catch {
|
|
3808
3818
|
}
|
|
3809
|
-
const as =
|
|
3819
|
+
const as = M.forwardRef(
|
|
3810
3820
|
({
|
|
3811
3821
|
children: e,
|
|
3812
3822
|
disabled: t = !1,
|
|
@@ -3816,19 +3826,19 @@ const as = O.forwardRef(
|
|
|
3816
3826
|
className: o,
|
|
3817
3827
|
type: s = "button",
|
|
3818
3828
|
raw: c = !1,
|
|
3819
|
-
noBorder:
|
|
3820
|
-
"aria-label":
|
|
3821
|
-
label:
|
|
3822
|
-
size:
|
|
3823
|
-
labelRight:
|
|
3829
|
+
noBorder: g = !1,
|
|
3830
|
+
"aria-label": d,
|
|
3831
|
+
label: h,
|
|
3832
|
+
size: m = "medium",
|
|
3833
|
+
labelRight: u,
|
|
3824
3834
|
labelLeft: f,
|
|
3825
3835
|
noBackground: p = !1,
|
|
3826
3836
|
align: b = "center",
|
|
3827
3837
|
active: v = !1,
|
|
3828
3838
|
radius: y = "large",
|
|
3829
3839
|
..._
|
|
3830
|
-
},
|
|
3831
|
-
const
|
|
3840
|
+
}, S) => {
|
|
3841
|
+
const N = Ur({
|
|
3832
3842
|
type: Nt,
|
|
3833
3843
|
mode: r,
|
|
3834
3844
|
focusMode: a,
|
|
@@ -3836,9 +3846,9 @@ const as = O.forwardRef(
|
|
|
3836
3846
|
disabled: t,
|
|
3837
3847
|
raw: c,
|
|
3838
3848
|
className: o,
|
|
3839
|
-
noBorder:
|
|
3840
|
-
size:
|
|
3841
|
-
labelRight:
|
|
3849
|
+
noBorder: g,
|
|
3850
|
+
size: m,
|
|
3851
|
+
labelRight: u,
|
|
3842
3852
|
labelLeft: f,
|
|
3843
3853
|
noBackground: p,
|
|
3844
3854
|
align: b,
|
|
@@ -3868,16 +3878,16 @@ const as = O.forwardRef(
|
|
|
3868
3878
|
return /* @__PURE__ */ i("div", { className: C, children: /* @__PURE__ */ x(
|
|
3869
3879
|
Rt,
|
|
3870
3880
|
{
|
|
3871
|
-
ref:
|
|
3872
|
-
className:
|
|
3881
|
+
ref: S,
|
|
3882
|
+
className: N,
|
|
3873
3883
|
disabled: t,
|
|
3874
3884
|
type: s,
|
|
3875
|
-
"aria-label":
|
|
3885
|
+
"aria-label": d || h,
|
|
3876
3886
|
..._,
|
|
3877
3887
|
children: [
|
|
3878
3888
|
f && /* @__PURE__ */ i("span", { className: "pr-2", children: f }),
|
|
3879
3889
|
/* @__PURE__ */ i("div", { className: k, children: e }),
|
|
3880
|
-
|
|
3890
|
+
u && /* @__PURE__ */ i("span", { className: "pl-2", children: u })
|
|
3881
3891
|
]
|
|
3882
3892
|
}
|
|
3883
3893
|
) });
|
|
@@ -3919,8 +3929,8 @@ const ns = 200, os = ({
|
|
|
3919
3929
|
focusMode: a,
|
|
3920
3930
|
className: "ml-2",
|
|
3921
3931
|
size: "small",
|
|
3922
|
-
onClick: (
|
|
3923
|
-
|
|
3932
|
+
onClick: (g) => {
|
|
3933
|
+
g.preventDefault(), o(!n);
|
|
3924
3934
|
},
|
|
3925
3935
|
children: n ? "less..." : "more..."
|
|
3926
3936
|
}
|
|
@@ -3943,14 +3953,14 @@ try {
|
|
|
3943
3953
|
const ir = hr(
|
|
3944
3954
|
() => import(
|
|
3945
3955
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
3946
|
-
"./MessageAssistant.
|
|
3956
|
+
"./MessageAssistant.BCLp8Epo.js"
|
|
3947
3957
|
).then((e) => e.MessageAssistant)
|
|
3948
3958
|
), is = () => {
|
|
3949
|
-
const { state: e } =
|
|
3959
|
+
const { state: e } = B(X);
|
|
3950
3960
|
return /* @__PURE__ */ x("div", { className: "space-y-6 mt-2 @container", children: [
|
|
3951
3961
|
e && e.messages.length > 0 && e.messages.map((t, r) => {
|
|
3952
3962
|
const { role: a, content: n, name: o, processingTime: s } = t.message;
|
|
3953
|
-
return (a === ve || a ===
|
|
3963
|
+
return (a === ve || a === pt) && n ? /* @__PURE__ */ i(rt, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(ir, { name: o, processingTime: s, children: n }) }, `${r}-${a}`) : a === et && n ? /* @__PURE__ */ i(
|
|
3954
3964
|
jo,
|
|
3955
3965
|
{
|
|
3956
3966
|
kind: "right",
|
|
@@ -3961,39 +3971,39 @@ const ir = hr(
|
|
|
3961
3971
|
`${r}-${a}`
|
|
3962
3972
|
) : null;
|
|
3963
3973
|
}),
|
|
3964
|
-
na(
|
|
3974
|
+
na(et, e) && /* @__PURE__ */ i(rt, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(ir, { loading: !0 }) })
|
|
3965
3975
|
] });
|
|
3966
3976
|
}, cs = () => {
|
|
3967
|
-
const { isAuthenticated: e } = xe(), { state: t } =
|
|
3977
|
+
const { isAuthenticated: e } = xe(), { state: t } = B(X), [r, a] = W(!1), [n, o] = qa(), s = oa({
|
|
3968
3978
|
isAuthenticated: e,
|
|
3969
3979
|
extraClass: "rounded-b-md"
|
|
3970
|
-
}), c =
|
|
3971
|
-
const
|
|
3972
|
-
if (
|
|
3973
|
-
const { scrollHeight:
|
|
3974
|
-
|
|
3980
|
+
}), c = O(!1), g = K(() => {
|
|
3981
|
+
const h = n.current;
|
|
3982
|
+
if (h) {
|
|
3983
|
+
const { scrollHeight: m, clientHeight: u, scrollTop: f } = h, p = m - u - f;
|
|
3984
|
+
h.scrollBy({
|
|
3975
3985
|
top: p,
|
|
3976
3986
|
behavior: "smooth"
|
|
3977
3987
|
});
|
|
3978
3988
|
}
|
|
3979
|
-
}, [n]),
|
|
3980
|
-
const
|
|
3981
|
-
if (
|
|
3982
|
-
const { scrollTop:
|
|
3989
|
+
}, [n]), d = K(() => {
|
|
3990
|
+
const h = n.current;
|
|
3991
|
+
if (h) {
|
|
3992
|
+
const { scrollTop: m, scrollHeight: u, clientHeight: f } = h, p = u > f, b = m + f >= u - 1;
|
|
3983
3993
|
a(p && !b);
|
|
3984
3994
|
}
|
|
3985
3995
|
}, [n]);
|
|
3986
3996
|
return mr(() => {
|
|
3987
|
-
o && o.width && t && !t.streaming &&
|
|
3988
|
-
}, [o, t,
|
|
3989
|
-
const
|
|
3990
|
-
if (
|
|
3991
|
-
return
|
|
3992
|
-
}, [
|
|
3993
|
-
t && t.streaming &&
|
|
3994
|
-
}, [t,
|
|
3995
|
-
t && (!c.current && t.streaming &&
|
|
3996
|
-
}, [t,
|
|
3997
|
+
o && o.width && t && !t.streaming && d();
|
|
3998
|
+
}, [o, t, d]), A(() => {
|
|
3999
|
+
const h = n.current;
|
|
4000
|
+
if (h)
|
|
4001
|
+
return h.addEventListener("scroll", d), () => h.removeEventListener("scroll", d);
|
|
4002
|
+
}, [d, n]), A(() => {
|
|
4003
|
+
t && t.streaming && d();
|
|
4004
|
+
}, [t, d]), A(() => {
|
|
4005
|
+
t && (!c.current && t.streaming && g(), c.current = !!t.streaming);
|
|
4006
|
+
}, [t, g]), /* @__PURE__ */ x("div", { className: s, ref: n, children: [
|
|
3997
4007
|
r && /* @__PURE__ */ i(
|
|
3998
4008
|
"div",
|
|
3999
4009
|
{
|
|
@@ -4011,7 +4021,7 @@ const ir = hr(
|
|
|
4011
4021
|
noBorder: !0,
|
|
4012
4022
|
size: "medium",
|
|
4013
4023
|
mode: "dark",
|
|
4014
|
-
onClick:
|
|
4024
|
+
onClick: g,
|
|
4015
4025
|
children: /* @__PURE__ */ i(
|
|
4016
4026
|
Ba,
|
|
4017
4027
|
{
|
|
@@ -4030,7 +4040,7 @@ const ir = hr(
|
|
|
4030
4040
|
}, ls = hr(
|
|
4031
4041
|
() => import(
|
|
4032
4042
|
/* webpackChunkName: "LazyHeader" */
|
|
4033
|
-
"./HeaderToolbar.
|
|
4043
|
+
"./HeaderToolbar.ClkzdP_R.js"
|
|
4034
4044
|
)
|
|
4035
4045
|
);
|
|
4036
4046
|
function Hr({ isComponent: e = !1 }) {
|
|
@@ -4040,20 +4050,21 @@ function Hr({ isComponent: e = !1 }) {
|
|
|
4040
4050
|
}), [n] = jt({
|
|
4041
4051
|
key: Ut + la,
|
|
4042
4052
|
initialValue: be.ASC
|
|
4043
|
-
}), [o, s] =
|
|
4044
|
-
id:
|
|
4053
|
+
}), [o, s] = We(En, {
|
|
4054
|
+
id: _t(),
|
|
4045
4055
|
model: ke,
|
|
4046
4056
|
engine: ke,
|
|
4047
4057
|
usage: 0,
|
|
4048
4058
|
messages: [],
|
|
4049
4059
|
prompts: [],
|
|
4050
4060
|
isComponent: e
|
|
4051
|
-
}), [c,
|
|
4061
|
+
}), [c, g] = We(xn, {
|
|
4052
4062
|
searchString: a,
|
|
4053
4063
|
sortedCell: "timestamp",
|
|
4054
4064
|
sortDirection: n
|
|
4055
|
-
}), [
|
|
4056
|
-
prompt: ""
|
|
4065
|
+
}), [d, h] = We(Sn, {
|
|
4066
|
+
prompt: "",
|
|
4067
|
+
lastTriggeredTimestamp: 0
|
|
4057
4068
|
});
|
|
4058
4069
|
return co({
|
|
4059
4070
|
keys: [
|
|
@@ -4063,22 +4074,22 @@ function Hr({ isComponent: e = !1 }) {
|
|
|
4063
4074
|
],
|
|
4064
4075
|
getAccessToken: r
|
|
4065
4076
|
}), lo({ getAccessToken: r }), so({ keys: [t == null ? void 0 : t.username], getAccessToken: r }), A(() => {
|
|
4066
|
-
var
|
|
4067
|
-
(
|
|
4077
|
+
var u;
|
|
4078
|
+
(u = document.getElementById("logo")) == null || u.classList.add("fadeOut"), setTimeout(() => {
|
|
4068
4079
|
var f;
|
|
4069
4080
|
(f = document.getElementById("root")) == null || f.classList.replace("app-hidden", "fadeIn");
|
|
4070
4081
|
}, 500);
|
|
4071
|
-
}), /* @__PURE__ */ i(
|
|
4082
|
+
}), /* @__PURE__ */ i(X.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ i(
|
|
4072
4083
|
go.Provider,
|
|
4073
4084
|
{
|
|
4074
4085
|
value: {
|
|
4075
4086
|
state: c,
|
|
4076
|
-
dispatch:
|
|
4087
|
+
dispatch: g
|
|
4077
4088
|
},
|
|
4078
4089
|
children: /* @__PURE__ */ x(
|
|
4079
|
-
|
|
4090
|
+
Ve.Provider,
|
|
4080
4091
|
{
|
|
4081
|
-
value: { state:
|
|
4092
|
+
value: { state: d, dispatch: h },
|
|
4082
4093
|
children: [
|
|
4083
4094
|
/* @__PURE__ */ i(
|
|
4084
4095
|
$a,
|
|
@@ -4090,7 +4101,7 @@ function Hr({ isComponent: e = !1 }) {
|
|
|
4090
4101
|
className: Pt({
|
|
4091
4102
|
extraClass: "mt-5"
|
|
4092
4103
|
}),
|
|
4093
|
-
children: /* @__PURE__ */ i(
|
|
4104
|
+
children: /* @__PURE__ */ i(rt, { fallback: /* @__PURE__ */ i("div", {}), children: /* @__PURE__ */ i(ls, {}) })
|
|
4094
4105
|
}
|
|
4095
4106
|
),
|
|
4096
4107
|
/* @__PURE__ */ i(
|
|
@@ -4115,7 +4126,7 @@ Hr.displayName = "App";
|
|
|
4115
4126
|
const ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Hr }, Symbol.toStringTag, { value: "Module" }));
|
|
4116
4127
|
export {
|
|
4117
4128
|
ws as App,
|
|
4118
|
-
|
|
4129
|
+
X as AppContext,
|
|
4119
4130
|
jt as E,
|
|
4120
4131
|
go as HistoryContext,
|
|
4121
4132
|
Ss as P,
|