@versini/sassysaint 5.5.36 → 5.5.38
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.BlUmPPu5.js +5146 -0
- package/dist/chunks/{HeaderToolbar.Bl593kjm.js → HeaderToolbar.DHwLK60v.js} +811 -870
- package/dist/chunks/{MarkdownWithExtra.C77dR_xZ.js → MarkdownWithExtra.B-KLqPB2.js} +191 -198
- package/dist/chunks/{MessageAssistant.C195TBiV.js → MessageAssistant.Dp5F7VuZ.js} +6 -6
- package/dist/chunks/{index.vR4obSnv.js → index.WqjiLYC2.js} +309 -317
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/dist/chunks/App.C6-zUIj9.js +0 -4095
|
@@ -1,4095 +0,0 @@
|
|
|
1
|
-
import { jsxs as x, jsx as i, Fragment as Ae } from "react/jsx-runtime";
|
|
2
|
-
import { g as me, ACTION_RESTORE as qr, ACTION_MESSAGE as ye, ROLE_ASSISTANT as ve, ACTION_RESET as ft, ACTION_MODEL as ir, ACTION_STREAMING as cr, ACTION_SORT as Kr, ACTION_SEARCH as Jr, ACTION_RESET_PROMPT as lr, ACTION_TOGGLE_PROMPT as dr, DEFAULT_AI_ENGINE as ke, P as Oe, un as Ee, ENGINE_ANTHROPIC as He, ENGINE_OPENAI as zt, PROMPT_CLASSNAME as Yr, PROMPT_EDITABLE_AREA_CLASSNAME as Zr, ROLE_SYSTEM as Xr, ROLE_INTERNAL as pt, ROLE_HIDDEN as Qr, STATS_SEPARATOR as $t, CLIPBOARD_PROMPT as Dt, TYPE_QUESTION as ea, ERROR_MESSAGE as ta, ROLE_USER as et, FOOTER_DISCLAIMER as ra, isLastMessageFromRole as aa, getMessageContaintWrapperClass as na, Logo as oa, getMainPaddingClass as Vt, r as sa, LOCAL_STORAGE_PREFIX as Pt, LOCAL_STORAGE_SEARCH as ia, LOCAL_STORAGE_SORT as ca } from "./index.vR4obSnv.js";
|
|
3
|
-
import l from "clsx";
|
|
4
|
-
import * as tt from "react";
|
|
5
|
-
import A, { useRef as M, useState as q, useCallback as ne, useSyncExternalStore as la, useEffect as D, useMemo as ur, useId as da, useContext as z, createContext as ua, useLayoutEffect as ma, useDebugValue as ga, forwardRef as mr, lazy as gr, Suspense as rt, useReducer as We } from "react";
|
|
6
|
-
import { useFloatingTree as hr, useFloatingNodeId as ha, useListItem as fr, 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 wa, useInteractions as Sa, useMergeRefs as pr, FloatingNode as Ta, FloatingList as Na, FloatingPortal as Ca, FloatingFocusManager as Ra, FloatingTree as Ia } from "@floating-ui/react";
|
|
7
|
-
const La = ({
|
|
8
|
-
className: e,
|
|
9
|
-
viewBox: t,
|
|
10
|
-
title: r,
|
|
11
|
-
monotone: a,
|
|
12
|
-
...n
|
|
13
|
-
}) => /* @__PURE__ */ x(
|
|
14
|
-
me,
|
|
15
|
-
{
|
|
16
|
-
defaultViewBox: "0 0 448 512",
|
|
17
|
-
size: "size-5",
|
|
18
|
-
viewBox: t,
|
|
19
|
-
className: e,
|
|
20
|
-
title: r || "Add",
|
|
21
|
-
...n,
|
|
22
|
-
children: [
|
|
23
|
-
/* @__PURE__ */ i("path", { className: "fa-secondary", opacity: a ? "1" : "0.4", d: "" }),
|
|
24
|
-
/* @__PURE__ */ i(
|
|
25
|
-
"path",
|
|
26
|
-
{
|
|
27
|
-
className: "fa-primary",
|
|
28
|
-
d: "M248 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 160L40 232c-13.3 0-24 10.7-24 24s10.7 24 24 24l160 0 0 160c0 13.3 10.7 24 24 24s24-10.7 24-24l0-160 160 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-160 0 0-160z"
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
), Ut = ({
|
|
34
|
-
className: e,
|
|
35
|
-
viewBox: t,
|
|
36
|
-
title: r,
|
|
37
|
-
monotone: a,
|
|
38
|
-
...n
|
|
39
|
-
}) => /* @__PURE__ */ i(
|
|
40
|
-
me,
|
|
41
|
-
{
|
|
42
|
-
defaultViewBox: "0 0 24 24",
|
|
43
|
-
size: "size-5",
|
|
44
|
-
viewBox: t,
|
|
45
|
-
className: e,
|
|
46
|
-
title: r || "Anthropic",
|
|
47
|
-
...n,
|
|
48
|
-
children: /* @__PURE__ */ i("path", { d: "M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z" })
|
|
49
|
-
}
|
|
50
|
-
), Aa = ({
|
|
51
|
-
className: e,
|
|
52
|
-
viewBox: t,
|
|
53
|
-
title: r,
|
|
54
|
-
monotone: a,
|
|
55
|
-
...n
|
|
56
|
-
}) => /* @__PURE__ */ x(
|
|
57
|
-
me,
|
|
58
|
-
{
|
|
59
|
-
defaultViewBox: "0 0 448 512",
|
|
60
|
-
size: "size-5",
|
|
61
|
-
viewBox: t,
|
|
62
|
-
className: e,
|
|
63
|
-
title: r || "Book",
|
|
64
|
-
...n,
|
|
65
|
-
children: [
|
|
66
|
-
/* @__PURE__ */ i(
|
|
67
|
-
"path",
|
|
68
|
-
{
|
|
69
|
-
className: "fa-secondary",
|
|
70
|
-
opacity: a ? "1" : "0.4",
|
|
71
|
-
d: "M48 88l0 270.7c9.8-4.3 20.6-6.7 32-6.7l312 0c4.4 0 8-3.6 8-8l0-288c0-4.4-3.6-8-8-8L88 48C65.9 48 48 65.9 48 88zm94.3 32.8L160 112l8.8-17.7c2.9-5.9 11.4-5.9 14.3 0L192 112l17.7 8.8c5.9 2.9 5.9 11.4 0 14.3L192 144l-8.8 17.7c-2.9 5.9-11.4 5.9-14.3 0L160 144l-17.7-8.8c-5.9-2.9-5.9-11.4 0-14.3zm82.8 111.8L264 216l16.6-38.8c2.8-6.5 11.9-6.5 14.7 0L312 216l38.8 16.6c6.5 2.8 6.5 11.9 0 14.7L312 264l-16.6 38.8c-2.8 6.5-11.9 6.5-14.7 0L264 264l-38.8-16.6c-6.5-2.8-6.5-11.9 0-14.7z"
|
|
72
|
-
}
|
|
73
|
-
),
|
|
74
|
-
/* @__PURE__ */ i(
|
|
75
|
-
"path",
|
|
76
|
-
{
|
|
77
|
-
className: "fa-primary",
|
|
78
|
-
d: "M0 88C0 39.4 39.4 0 88 0L392 0c30.9 0 56 25.1 56 56l0 288c0 22.3-13.1 41.6-32 50.6l0 69.4 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L80 512c-44.2 0-80-35.8-80-80c0-2.7 .1-5.4 .4-8L0 424 0 88zM80 400c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0 0-64L80 400zM48 358.7c9.8-4.3 20.6-6.7 32-6.7l312 0c4.4 0 8-3.6 8-8l0-288c0-4.4-3.6-8-8-8L88 48C65.9 48 48 65.9 48 88l0 270.7zM160 112l8.8-17.7c2.9-5.9 11.4-5.9 14.3 0L192 112l17.7 8.8c5.9 2.9 5.9 11.4 0 14.3L192 144l-8.8 17.7c-2.9 5.9-11.4 5.9-14.3 0L160 144l-17.7-8.8c-5.9-2.9-5.9-11.4 0-14.3L160 112zM264 216l16.6-38.8c2.8-6.5 11.9-6.5 14.7 0L312 216l38.8 16.6c6.5 2.8 6.5 11.9 0 14.7L312 264l-16.6 38.8c-2.8 6.5-11.9 6.5-14.7 0L264 264l-38.8-16.6c-6.5-2.8-6.5-11.9 0-14.7L264 216z"
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
), Oa = ({
|
|
84
|
-
className: e,
|
|
85
|
-
viewBox: t,
|
|
86
|
-
title: r,
|
|
87
|
-
monotone: a,
|
|
88
|
-
...n
|
|
89
|
-
}) => /* @__PURE__ */ i(
|
|
90
|
-
me,
|
|
91
|
-
{
|
|
92
|
-
defaultViewBox: "0 0 384 512",
|
|
93
|
-
size: "size-5",
|
|
94
|
-
viewBox: t,
|
|
95
|
-
className: e,
|
|
96
|
-
title: r || "Close",
|
|
97
|
-
...n,
|
|
98
|
-
children: /* @__PURE__ */ i("path", { d: "M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z" })
|
|
99
|
-
}
|
|
100
|
-
), Ft = ({
|
|
101
|
-
className: e,
|
|
102
|
-
viewBox: t,
|
|
103
|
-
title: r,
|
|
104
|
-
monotone: a,
|
|
105
|
-
...n
|
|
106
|
-
}) => /* @__PURE__ */ i(
|
|
107
|
-
me,
|
|
108
|
-
{
|
|
109
|
-
defaultViewBox: "0 0 24 24",
|
|
110
|
-
size: "size-5",
|
|
111
|
-
viewBox: t,
|
|
112
|
-
className: e,
|
|
113
|
-
title: r || "OpenAI",
|
|
114
|
-
...n,
|
|
115
|
-
children: /* @__PURE__ */ i("path", { d: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z" })
|
|
116
|
-
}
|
|
117
|
-
), Ba = ({
|
|
118
|
-
className: e,
|
|
119
|
-
viewBox: t,
|
|
120
|
-
title: r,
|
|
121
|
-
monotone: a,
|
|
122
|
-
...n
|
|
123
|
-
}) => /* @__PURE__ */ i(
|
|
124
|
-
me,
|
|
125
|
-
{
|
|
126
|
-
defaultViewBox: "0 0 384 512",
|
|
127
|
-
size: "size-5",
|
|
128
|
-
viewBox: t,
|
|
129
|
-
className: e,
|
|
130
|
-
title: r || "Up",
|
|
131
|
-
...n,
|
|
132
|
-
children: /* @__PURE__ */ i("path", { d: "M209.4 39.4C204.8 34.7 198.6 32 192 32s-12.8 2.7-17.4 7.4l-168 176c-9.2 9.6-8.8 24.8 .8 33.9s24.8 8.8 33.9-.8L168 115.9 168 456c0 13.3 10.7 24 24 24s24-10.7 24-24l0-340.1L342.6 248.6c9.2 9.6 24.3 9.9 33.9 .8s9.9-24.3 .8-33.9l-168-176z" })
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
/*!
|
|
136
|
-
@versini/ui-header v3.0.4
|
|
137
|
-
© 2025 gizmette.com
|
|
138
|
-
*/
|
|
139
|
-
try {
|
|
140
|
-
window.__VERSINI_UI_HEADER__ || (window.__VERSINI_UI_HEADER__ = {
|
|
141
|
-
version: "3.0.4",
|
|
142
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
143
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
144
|
-
license: "MIT"
|
|
145
|
-
});
|
|
146
|
-
} catch {
|
|
147
|
-
}
|
|
148
|
-
const Ma = "av-header", za = ({
|
|
149
|
-
children: e,
|
|
150
|
-
className: t,
|
|
151
|
-
raw: r = !1,
|
|
152
|
-
mode: a = "system",
|
|
153
|
-
noColors: n = !1,
|
|
154
|
-
sticky: o = !1,
|
|
155
|
-
noBorder: s = !1,
|
|
156
|
-
noMargin: c = !1,
|
|
157
|
-
noPadding: g = !1
|
|
158
|
-
}) => {
|
|
159
|
-
const d = l(
|
|
160
|
-
Ma,
|
|
161
|
-
{
|
|
162
|
-
"border-border-accent": a === "dark" && !r && !n && !s,
|
|
163
|
-
"border-border-medium": a === "light" && !r && !n && !s,
|
|
164
|
-
"border-border-accent dark:border-border-medium": a === "alt-system" && !r && !n && !s,
|
|
165
|
-
"border-border-medium dark:border-border-accent": a === "system" && !r && !n && !s,
|
|
166
|
-
"border-b-4": !r && !s,
|
|
167
|
-
"border-transparent": !r && n,
|
|
168
|
-
"bg-surface-dark": a === "dark" && !r && !n,
|
|
169
|
-
"bg-surface-light": a === "light" && !r && !n,
|
|
170
|
-
"bg-surface-dark dark:bg-surface-light": a === "alt-system" && !r && !n,
|
|
171
|
-
"bg-surface-light dark:bg-surface-dark": a === "system" && !r && !n,
|
|
172
|
-
"sticky top-0 z-50": o
|
|
173
|
-
},
|
|
174
|
-
t
|
|
175
|
-
), f = l({
|
|
176
|
-
"mt-0": !c,
|
|
177
|
-
"p-2": !g,
|
|
178
|
-
"flex flex-col w-full md:mx-auto md:max-w-4xl": !r
|
|
179
|
-
});
|
|
180
|
-
return /* @__PURE__ */ i("header", { className: d, children: /* @__PURE__ */ i("div", { className: f, children: e }) });
|
|
181
|
-
};
|
|
182
|
-
function $a(e) {
|
|
183
|
-
const t = e.toLowerCase().split("+").map((o) => o.trim()), r = {
|
|
184
|
-
alt: t.includes("alt"),
|
|
185
|
-
ctrl: t.includes("ctrl"),
|
|
186
|
-
meta: t.includes("meta"),
|
|
187
|
-
mod: t.includes("mod"),
|
|
188
|
-
shift: t.includes("shift")
|
|
189
|
-
}, a = ["alt", "ctrl", "meta", "shift", "mod"], n = t.find((o) => !a.includes(o));
|
|
190
|
-
return {
|
|
191
|
-
...r,
|
|
192
|
-
key: n
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
function Da(e, t) {
|
|
196
|
-
const { alt: r, ctrl: a, meta: n, mod: o, shift: s, key: c } = e, { altKey: g, ctrlKey: d, metaKey: f, shiftKey: m, key: u } = t;
|
|
197
|
-
if (r !== g)
|
|
198
|
-
return !1;
|
|
199
|
-
if (o) {
|
|
200
|
-
if (!d && !f)
|
|
201
|
-
return !1;
|
|
202
|
-
} else if (a !== d || n !== f)
|
|
203
|
-
return !1;
|
|
204
|
-
return s !== m ? !1 : !!(c && (u.toLowerCase() === c.toLowerCase() || t.code.replace("Key", "").toLowerCase() === c.toLowerCase()));
|
|
205
|
-
}
|
|
206
|
-
function Va(e) {
|
|
207
|
-
return (t) => Da($a(e), t);
|
|
208
|
-
}
|
|
209
|
-
function Pa(e) {
|
|
210
|
-
return (t) => {
|
|
211
|
-
const r = "nativeEvent" in t ? t.nativeEvent : t;
|
|
212
|
-
e.forEach(([a, n, o = { preventDefault: !0 }]) => {
|
|
213
|
-
Va(a)(r) && (o.preventDefault && t.preventDefault(), n(r));
|
|
214
|
-
});
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
function Ua() {
|
|
218
|
-
const e = M(null), [t, r] = q(!1);
|
|
219
|
-
return { ref: ne((a) => {
|
|
220
|
-
var n, o;
|
|
221
|
-
typeof IntersectionObserver < "u" && (a && !e.current ? e.current = new IntersectionObserver(
|
|
222
|
-
(s) => r(s.some((c) => c.isIntersecting))
|
|
223
|
-
) : (n = e.current) == null || n.disconnect(), a ? (o = e.current) == null || o.observe(a) : r(!1));
|
|
224
|
-
}, []), inViewport: t };
|
|
225
|
-
}
|
|
226
|
-
function br(e, t) {
|
|
227
|
-
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
228
|
-
}
|
|
229
|
-
const Ht = (e, t) => {
|
|
230
|
-
const r = JSON.stringify(
|
|
231
|
-
typeof t == "function" ? t() : t
|
|
232
|
-
);
|
|
233
|
-
window.localStorage.setItem(e, r), br(e, r);
|
|
234
|
-
}, Fa = (e) => {
|
|
235
|
-
window.localStorage.removeItem(e), br(e, null);
|
|
236
|
-
}, Wt = (e) => window.localStorage.getItem(e), Ha = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
237
|
-
function Gt({
|
|
238
|
-
key: e,
|
|
239
|
-
initialValue: t
|
|
240
|
-
}) {
|
|
241
|
-
const r = la(Ha, () => Wt(e)), a = ne(
|
|
242
|
-
(s) => {
|
|
243
|
-
try {
|
|
244
|
-
const c = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
245
|
-
c == null ? Fa(e) : Ht(e, c);
|
|
246
|
-
} catch (c) {
|
|
247
|
-
console.warn(c);
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
[e, r]
|
|
251
|
-
), n = ne(() => {
|
|
252
|
-
a(t);
|
|
253
|
-
}, [t, a]), o = ne(() => {
|
|
254
|
-
a(null);
|
|
255
|
-
}, [a]);
|
|
256
|
-
return D(() => {
|
|
257
|
-
try {
|
|
258
|
-
Wt(e) === null && typeof t < "u" && Ht(e, t);
|
|
259
|
-
} catch (s) {
|
|
260
|
-
console.warn(s);
|
|
261
|
-
}
|
|
262
|
-
}, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
|
|
263
|
-
}
|
|
264
|
-
function Wa(e) {
|
|
265
|
-
return ur(() => e.every((t) => t == null) ? () => {
|
|
266
|
-
} : (t) => {
|
|
267
|
-
e.forEach((r) => {
|
|
268
|
-
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
269
|
-
});
|
|
270
|
-
}, e);
|
|
271
|
-
}
|
|
272
|
-
function Ga({
|
|
273
|
-
value: e,
|
|
274
|
-
defaultValue: t,
|
|
275
|
-
finalValue: r,
|
|
276
|
-
onChange: a = () => {
|
|
277
|
-
},
|
|
278
|
-
initialControlledDelay: n = 0
|
|
279
|
-
}) {
|
|
280
|
-
const [o, s] = q(!1), [c, g] = q(
|
|
281
|
-
t !== void 0 ? t : r
|
|
282
|
-
), d = (f) => {
|
|
283
|
-
g(f), a == null || a(f);
|
|
284
|
-
};
|
|
285
|
-
return D(() => {
|
|
286
|
-
(async () => e !== void 0 && !o && n > 0 && (await new Promise(
|
|
287
|
-
(f) => setTimeout(f, n)
|
|
288
|
-
), s(!0)))();
|
|
289
|
-
}, [e, n, o]), e !== void 0 ? !o && n > 0 ? ["", a, !0] : [e, a, !0] : [c, d, !1];
|
|
290
|
-
}
|
|
291
|
-
function ja(e) {
|
|
292
|
-
return da();
|
|
293
|
-
}
|
|
294
|
-
/*!
|
|
295
|
-
@versini/ui-table v3.0.11
|
|
296
|
-
© 2025 gizmette.com
|
|
297
|
-
*/
|
|
298
|
-
try {
|
|
299
|
-
window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
|
|
300
|
-
version: "3.0.11",
|
|
301
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
302
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
303
|
-
license: "MIT"
|
|
304
|
-
});
|
|
305
|
-
} catch {
|
|
306
|
-
}
|
|
307
|
-
const Be = "thead", bt = "tfoot", ue = "tbody", be = {
|
|
308
|
-
ASC: "asc",
|
|
309
|
-
DESC: "desc"
|
|
310
|
-
}, qa = ({
|
|
311
|
-
mode: e,
|
|
312
|
-
className: t,
|
|
313
|
-
wrapperClassName: r,
|
|
314
|
-
stickyHeader: a,
|
|
315
|
-
stickyFooter: n
|
|
316
|
-
}) => ({
|
|
317
|
-
wrapper: l(
|
|
318
|
-
"not-prose relative w-full rounded-lg shadow-md",
|
|
319
|
-
{
|
|
320
|
-
"overflow-x-auto": !a && !n,
|
|
321
|
-
"overflow-y-scroll": a || n,
|
|
322
|
-
"bg-surface-darker": e === "dark" || e === "system",
|
|
323
|
-
"bg-surface-light": e === "light" || e === "alt-system",
|
|
324
|
-
"dark:bg-surface-light": e === "system",
|
|
325
|
-
"dark:bg-surface-darker": e === "alt-system",
|
|
326
|
-
"text-copy-light": e === "dark",
|
|
327
|
-
"text-copy-dark": e === "light",
|
|
328
|
-
"text-copy-light dark:text-copy-dark": e === "system",
|
|
329
|
-
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
330
|
-
},
|
|
331
|
-
r
|
|
332
|
-
),
|
|
333
|
-
table: l("my-0 w-full text-left text-sm", t, {
|
|
334
|
-
"text-copy-light": e === "dark",
|
|
335
|
-
"text-copy-dark": e === "light",
|
|
336
|
-
"text-copy-light dark:text-copy-dark": e === "system",
|
|
337
|
-
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
338
|
-
}),
|
|
339
|
-
caption: l("py-2 text-sm font-bold", {
|
|
340
|
-
"text-copy-light": e === "dark",
|
|
341
|
-
"text-copy-dark": e === "light",
|
|
342
|
-
"text-copy-light dark:text-copy-dark": e === "system",
|
|
343
|
-
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
344
|
-
})
|
|
345
|
-
}), Ka = ({
|
|
346
|
-
className: e,
|
|
347
|
-
stickyHeader: t,
|
|
348
|
-
mode: r
|
|
349
|
-
}) => l(
|
|
350
|
-
{
|
|
351
|
-
"sticky top-0 z-10": t,
|
|
352
|
-
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": t && r === "dark",
|
|
353
|
-
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": t && r === "system",
|
|
354
|
-
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": t && r === "light",
|
|
355
|
-
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": t && r === "alt-system"
|
|
356
|
-
},
|
|
357
|
-
e
|
|
358
|
-
), Ja = ({
|
|
359
|
-
className: e,
|
|
360
|
-
stickyFooter: t,
|
|
361
|
-
mode: r
|
|
362
|
-
}) => l(
|
|
363
|
-
{
|
|
364
|
-
"sticky bottom-0 z-10": t,
|
|
365
|
-
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": t && r === "dark",
|
|
366
|
-
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": t && r === "system",
|
|
367
|
-
"shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": t && r === "light",
|
|
368
|
-
"shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": t && r === "alt-system"
|
|
369
|
-
},
|
|
370
|
-
e
|
|
371
|
-
), Ya = ({
|
|
372
|
-
mode: e,
|
|
373
|
-
className: t,
|
|
374
|
-
cellWrapper: r
|
|
375
|
-
}) => r === Be || r === bt ? l(
|
|
376
|
-
{
|
|
377
|
-
"bg-table-head-dark": e === "dark" || e === "system",
|
|
378
|
-
"bg-table-head-light": e === "light" || e === "alt-system",
|
|
379
|
-
"dark:bg-table-head-light": e === "system",
|
|
380
|
-
"dark:bg-table-head-dark": e === "alt-system"
|
|
381
|
-
},
|
|
382
|
-
t
|
|
383
|
-
) : l(
|
|
384
|
-
"border-b last:border-0",
|
|
385
|
-
{
|
|
386
|
-
"border-table-dark": e === "dark" || e === "system",
|
|
387
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even": r === ue && e === "dark",
|
|
388
|
-
"border-table-light": e === "light" || e === "alt-system",
|
|
389
|
-
"odd:bg-table-light-odd even:bg-table-light-even": r === ue && e === "light",
|
|
390
|
-
"dark:border-table-light": e === "system",
|
|
391
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": r === ue && e === "system",
|
|
392
|
-
"dark:border-table-dark": e === "alt-system",
|
|
393
|
-
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": r === ue && e === "alt-system"
|
|
394
|
-
},
|
|
395
|
-
t
|
|
396
|
-
), Za = ({
|
|
397
|
-
cellWrapper: e,
|
|
398
|
-
className: t,
|
|
399
|
-
compact: r,
|
|
400
|
-
mode: a,
|
|
401
|
-
align: n
|
|
402
|
-
}) => ({
|
|
403
|
-
alignClasses: l({
|
|
404
|
-
"flex justify-start text-left": n === "left",
|
|
405
|
-
"flex justify-center text-center": n === "center",
|
|
406
|
-
"flex justify-end text-right": n === "right"
|
|
407
|
-
}),
|
|
408
|
-
mainClasses: l(
|
|
409
|
-
{
|
|
410
|
-
"text-copy-light": a === "dark" || a === "system",
|
|
411
|
-
"text-copy-dark": a === "light" || a === "alt-system",
|
|
412
|
-
"dark:text-copy-dark": a === "system",
|
|
413
|
-
"dark:text-copy-light": a === "alt-system",
|
|
414
|
-
"px-4 py-3": !r && (e === Be || e === bt),
|
|
415
|
-
"p-4": !r && e === ue,
|
|
416
|
-
"px-2 py-1.5": r
|
|
417
|
-
},
|
|
418
|
-
t
|
|
419
|
-
)
|
|
420
|
-
}), Xa = ({
|
|
421
|
-
buttonClassName: e
|
|
422
|
-
}) => l("rounded-none text-sm", e), jt = "av-button", yt = "icon", yr = "button", at = "link", Qa = ({
|
|
423
|
-
type: e,
|
|
424
|
-
size: t,
|
|
425
|
-
labelRight: r,
|
|
426
|
-
labelLeft: a,
|
|
427
|
-
align: n
|
|
428
|
-
}) => {
|
|
429
|
-
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";
|
|
430
|
-
switch (e) {
|
|
431
|
-
case yr:
|
|
432
|
-
case at:
|
|
433
|
-
return l({
|
|
434
|
-
[o]: t === "small",
|
|
435
|
-
[s]: t === "medium",
|
|
436
|
-
[c]: t === "large"
|
|
437
|
-
});
|
|
438
|
-
case yt:
|
|
439
|
-
return l("inline-flex items-center", {
|
|
440
|
-
"justify-center": n === "center",
|
|
441
|
-
"justify-start": n === "left",
|
|
442
|
-
"justify-end": n === "right",
|
|
443
|
-
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
444
|
-
"h-6 px-2": t === "small" && (r || a),
|
|
445
|
-
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
446
|
-
"h-8 px-3": t === "medium" && (r || a),
|
|
447
|
-
"h-12 w-12 p-2": t === "large" && !(r || a),
|
|
448
|
-
"h-12 px-4": t === "large" && (r || a)
|
|
449
|
-
});
|
|
450
|
-
}
|
|
451
|
-
}, en = ({
|
|
452
|
-
type: e,
|
|
453
|
-
size: t,
|
|
454
|
-
labelRight: r,
|
|
455
|
-
labelLeft: a
|
|
456
|
-
}) => {
|
|
457
|
-
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
458
|
-
switch (e) {
|
|
459
|
-
case yr:
|
|
460
|
-
case at:
|
|
461
|
-
return l({
|
|
462
|
-
"text-center": e === at,
|
|
463
|
-
[n]: t === "small",
|
|
464
|
-
[o]: t === "medium",
|
|
465
|
-
[s]: t === "large"
|
|
466
|
-
});
|
|
467
|
-
case yt:
|
|
468
|
-
return l({
|
|
469
|
-
[n]: t === "small" && (r || a),
|
|
470
|
-
[o]: t === "medium" && (r || a),
|
|
471
|
-
[s]: t === "large" && (r || a)
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
}, tn = ({
|
|
475
|
-
mode: e,
|
|
476
|
-
noBackground: t,
|
|
477
|
-
noTruncate: r,
|
|
478
|
-
variant: a
|
|
479
|
-
}) => {
|
|
480
|
-
if (t)
|
|
481
|
-
return "not-prose";
|
|
482
|
-
if (a === "primary")
|
|
483
|
-
return l("not-prose", {
|
|
484
|
-
truncate: !r,
|
|
485
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
486
|
-
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
487
|
-
"dark:text-copy-lighter": e === "system",
|
|
488
|
-
"dark:text-copy-light": e === "alt-system"
|
|
489
|
-
});
|
|
490
|
-
if (a === "secondary")
|
|
491
|
-
return l("not-prose", {
|
|
492
|
-
truncate: !r,
|
|
493
|
-
"text-copy-light": e === "light" || e === "system",
|
|
494
|
-
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
495
|
-
"dark:text-copy-lighter": e === "alt-system",
|
|
496
|
-
"dark:text-copy-light": e === "system"
|
|
497
|
-
});
|
|
498
|
-
if (a === "danger")
|
|
499
|
-
return l("not-prose", {
|
|
500
|
-
truncate: !r,
|
|
501
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
502
|
-
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
503
|
-
"dark:text-copy-lighter": e === "system",
|
|
504
|
-
"dark:text-copy-light": e === "alt-system"
|
|
505
|
-
});
|
|
506
|
-
if (a === "selected")
|
|
507
|
-
return l("not-prose text-copy-lighter", {
|
|
508
|
-
truncate: !r
|
|
509
|
-
});
|
|
510
|
-
}, rn = ({
|
|
511
|
-
mode: e,
|
|
512
|
-
noBackground: t,
|
|
513
|
-
variant: r
|
|
514
|
-
}) => {
|
|
515
|
-
if (!t) {
|
|
516
|
-
if (r === "primary")
|
|
517
|
-
return l({
|
|
518
|
-
"bg-action-dark": e === "dark",
|
|
519
|
-
"bg-action-light": e === "light",
|
|
520
|
-
"bg-action-dark dark:bg-action-light": e === "system",
|
|
521
|
-
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
522
|
-
});
|
|
523
|
-
if (r === "secondary")
|
|
524
|
-
return l({
|
|
525
|
-
"bg-action-dark": e === "light",
|
|
526
|
-
"bg-action-light": e === "dark",
|
|
527
|
-
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
528
|
-
"bg-action-light dark:bg-action-dark": e === "system"
|
|
529
|
-
});
|
|
530
|
-
if (r === "danger")
|
|
531
|
-
return l({
|
|
532
|
-
"bg-action-danger-dark": e === "dark",
|
|
533
|
-
"bg-action-danger-light": e === "light",
|
|
534
|
-
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
535
|
-
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
536
|
-
});
|
|
537
|
-
if (r === "selected")
|
|
538
|
-
return "bg-action-selected-dark";
|
|
539
|
-
}
|
|
540
|
-
}, an = ({
|
|
541
|
-
radius: e
|
|
542
|
-
}) => l({
|
|
543
|
-
"rounded-full": e === "large",
|
|
544
|
-
"rounded-md": e === "medium",
|
|
545
|
-
"rounded-sm": e === "small"
|
|
546
|
-
}), nn = ({
|
|
547
|
-
mode: e,
|
|
548
|
-
disabled: t,
|
|
549
|
-
variant: r
|
|
550
|
-
}) => {
|
|
551
|
-
if (t)
|
|
552
|
-
return "";
|
|
553
|
-
if (r === "primary")
|
|
554
|
-
return l("hover:text-copy-light-hover", {
|
|
555
|
-
"hover:bg-action-dark-hover": e === "dark",
|
|
556
|
-
"hover:bg-action-light-hover": e === "light",
|
|
557
|
-
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
558
|
-
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
559
|
-
});
|
|
560
|
-
if (r === "secondary")
|
|
561
|
-
return l("hover:text-copy-light-hover", {
|
|
562
|
-
"hover:bg-action-dark-hover": e === "light",
|
|
563
|
-
"hover:bg-action-light-hover": e === "dark",
|
|
564
|
-
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
565
|
-
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
566
|
-
});
|
|
567
|
-
if (r === "danger")
|
|
568
|
-
return l("hover:text-copy-light-hover", {
|
|
569
|
-
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
570
|
-
"hover:bg-action-danger-light-hover": e === "light",
|
|
571
|
-
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
572
|
-
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
573
|
-
});
|
|
574
|
-
if (r === "selected")
|
|
575
|
-
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
576
|
-
}, on = ({
|
|
577
|
-
mode: e,
|
|
578
|
-
disabled: t,
|
|
579
|
-
variant: r
|
|
580
|
-
}) => {
|
|
581
|
-
if (t)
|
|
582
|
-
return "";
|
|
583
|
-
if (r === "primary")
|
|
584
|
-
return l("active:text-copy-light-active", {
|
|
585
|
-
"active:bg-action-dark-active": e === "dark",
|
|
586
|
-
"active:bg-action-light-active": e === "light",
|
|
587
|
-
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
588
|
-
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
589
|
-
});
|
|
590
|
-
if (r === "secondary")
|
|
591
|
-
return l("active:text-copy-light-active", {
|
|
592
|
-
"active:bg-action-dark-active": e === "light",
|
|
593
|
-
"active:bg-action-light-active": e === "dark",
|
|
594
|
-
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
595
|
-
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
596
|
-
});
|
|
597
|
-
if (r === "danger")
|
|
598
|
-
return l("active:text-copy-lighter-active", {
|
|
599
|
-
"active:bg-action-danger-dark-active": e === "dark",
|
|
600
|
-
"active:bg-action-danger-light-active": e === "light",
|
|
601
|
-
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
602
|
-
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
603
|
-
});
|
|
604
|
-
if (r === "selected")
|
|
605
|
-
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
606
|
-
}, sn = ({
|
|
607
|
-
mode: e,
|
|
608
|
-
noBorder: t,
|
|
609
|
-
variant: r
|
|
610
|
-
}) => {
|
|
611
|
-
if (t)
|
|
612
|
-
return "border border-transparent";
|
|
613
|
-
if (r === "primary")
|
|
614
|
-
return l("border", {
|
|
615
|
-
"border-border-dark": e === "dark",
|
|
616
|
-
"border-border-accent": e === "light",
|
|
617
|
-
"border-border-dark dark:border-border-accent": e === "system",
|
|
618
|
-
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
619
|
-
});
|
|
620
|
-
if (r === "secondary")
|
|
621
|
-
return l("border", {
|
|
622
|
-
"border-border-dark": e === "light",
|
|
623
|
-
"border-border-accent": e === "dark",
|
|
624
|
-
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
625
|
-
"border-border-accent dark:border-border-dark": e === "system"
|
|
626
|
-
});
|
|
627
|
-
if (r === "danger")
|
|
628
|
-
return l("border", {
|
|
629
|
-
"border-border-danger-dark": e === "dark",
|
|
630
|
-
"border-border-danger-medium": e === "light",
|
|
631
|
-
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
632
|
-
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
633
|
-
});
|
|
634
|
-
if (r === "selected")
|
|
635
|
-
return "border border-border-selected-dark";
|
|
636
|
-
}, cn = ({
|
|
637
|
-
focusMode: e
|
|
638
|
-
}) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
639
|
-
"focus:outline-focus-dark": e === "dark",
|
|
640
|
-
"focus:outline-focus-light": e === "light",
|
|
641
|
-
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
642
|
-
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
643
|
-
}), ln = ({
|
|
644
|
-
type: e,
|
|
645
|
-
className: t,
|
|
646
|
-
raw: r,
|
|
647
|
-
mode: a,
|
|
648
|
-
focusMode: n,
|
|
649
|
-
disabled: o,
|
|
650
|
-
fullWidth: s,
|
|
651
|
-
size: c,
|
|
652
|
-
noBorder: g,
|
|
653
|
-
labelRight: d,
|
|
654
|
-
labelLeft: f,
|
|
655
|
-
noBackground: m,
|
|
656
|
-
variant: u,
|
|
657
|
-
noTruncate: h,
|
|
658
|
-
align: p,
|
|
659
|
-
radius: y
|
|
660
|
-
}) => (u || (u = "primary"), r ? l(jt, t) : l(
|
|
661
|
-
jt,
|
|
662
|
-
tn({
|
|
663
|
-
mode: a,
|
|
664
|
-
variant: u,
|
|
665
|
-
noBackground: m,
|
|
666
|
-
noTruncate: h
|
|
667
|
-
}),
|
|
668
|
-
rn({ mode: a, noBackground: m, variant: u }),
|
|
669
|
-
an({ radius: y }),
|
|
670
|
-
Qa({
|
|
671
|
-
type: e,
|
|
672
|
-
size: c,
|
|
673
|
-
labelRight: d,
|
|
674
|
-
labelLeft: f,
|
|
675
|
-
align: p
|
|
676
|
-
}),
|
|
677
|
-
en({ type: e, size: c, labelRight: d, labelLeft: f }),
|
|
678
|
-
sn({ mode: a, variant: u, noBorder: g }),
|
|
679
|
-
cn({ focusMode: n }),
|
|
680
|
-
nn({ mode: a, variant: u, disabled: o }),
|
|
681
|
-
on({ mode: a, variant: u, disabled: o }),
|
|
682
|
-
{
|
|
683
|
-
"w-full": s,
|
|
684
|
-
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
685
|
-
},
|
|
686
|
-
t
|
|
687
|
-
)), dn = (e, t, r) => {
|
|
688
|
-
var a;
|
|
689
|
-
!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);
|
|
690
|
-
}, vr = A.forwardRef((e, t) => {
|
|
691
|
-
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
692
|
-
return /* @__PURE__ */ i(
|
|
693
|
-
"button",
|
|
694
|
-
{
|
|
695
|
-
ref: t,
|
|
696
|
-
onClick: (o) => {
|
|
697
|
-
dn(o, a, r);
|
|
698
|
-
},
|
|
699
|
-
...n
|
|
700
|
-
}
|
|
701
|
-
);
|
|
702
|
-
});
|
|
703
|
-
vr.displayName = "BaseButton";
|
|
704
|
-
/*!
|
|
705
|
-
@versini/ui-button v4.0.10
|
|
706
|
-
© 2025 gizmette.com
|
|
707
|
-
*/
|
|
708
|
-
try {
|
|
709
|
-
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
710
|
-
version: "4.0.10",
|
|
711
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
712
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
713
|
-
license: "MIT"
|
|
714
|
-
});
|
|
715
|
-
} catch {
|
|
716
|
-
}
|
|
717
|
-
const kr = A.forwardRef(
|
|
718
|
-
({
|
|
719
|
-
children: e,
|
|
720
|
-
disabled: t = !1,
|
|
721
|
-
mode: r = "system",
|
|
722
|
-
focusMode: a = "system",
|
|
723
|
-
fullWidth: n = !1,
|
|
724
|
-
className: o,
|
|
725
|
-
type: s = "button",
|
|
726
|
-
raw: c = !1,
|
|
727
|
-
noBorder: g = !1,
|
|
728
|
-
"aria-label": d,
|
|
729
|
-
label: f,
|
|
730
|
-
size: m = "medium",
|
|
731
|
-
labelRight: u,
|
|
732
|
-
labelLeft: h,
|
|
733
|
-
noBackground: p = !1,
|
|
734
|
-
align: y = "center",
|
|
735
|
-
active: v = !1,
|
|
736
|
-
radius: b = "large",
|
|
737
|
-
..._
|
|
738
|
-
}, w) => {
|
|
739
|
-
const N = ln({
|
|
740
|
-
type: yt,
|
|
741
|
-
mode: r,
|
|
742
|
-
focusMode: a,
|
|
743
|
-
fullWidth: n,
|
|
744
|
-
disabled: t,
|
|
745
|
-
raw: c,
|
|
746
|
-
className: o,
|
|
747
|
-
noBorder: g,
|
|
748
|
-
size: m,
|
|
749
|
-
labelRight: u,
|
|
750
|
-
labelLeft: h,
|
|
751
|
-
noBackground: p,
|
|
752
|
-
align: y,
|
|
753
|
-
radius: b
|
|
754
|
-
}), k = l({
|
|
755
|
-
"text-copy-accent-dark": r === "light" && !c,
|
|
756
|
-
"text-copy-light": r === "dark" && !c,
|
|
757
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
|
|
758
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !c
|
|
759
|
-
}), C = v ? l(
|
|
760
|
-
"relative",
|
|
761
|
-
"focus-within:static",
|
|
762
|
-
"focus-within:after:border-transparent",
|
|
763
|
-
"after:absolute",
|
|
764
|
-
"after:content-['']",
|
|
765
|
-
"after:border-b-2",
|
|
766
|
-
"after:bottom-[-4px]",
|
|
767
|
-
"after:left-0",
|
|
768
|
-
"after:right-0",
|
|
769
|
-
{
|
|
770
|
-
"after:border-table-dark": r === "dark",
|
|
771
|
-
"after:border-table-light": r === "light",
|
|
772
|
-
"after:border-table-dark dark:after:border-table-light": r === "system",
|
|
773
|
-
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
774
|
-
}
|
|
775
|
-
) : "";
|
|
776
|
-
return /* @__PURE__ */ i("div", { className: C, children: /* @__PURE__ */ x(
|
|
777
|
-
vr,
|
|
778
|
-
{
|
|
779
|
-
ref: w,
|
|
780
|
-
className: N,
|
|
781
|
-
disabled: t,
|
|
782
|
-
type: s,
|
|
783
|
-
"aria-label": d || f,
|
|
784
|
-
..._,
|
|
785
|
-
children: [
|
|
786
|
-
h && /* @__PURE__ */ i("span", { className: "pr-2", children: h }),
|
|
787
|
-
/* @__PURE__ */ i("div", { className: k, children: e }),
|
|
788
|
-
u && /* @__PURE__ */ i("span", { className: "pl-2", children: u })
|
|
789
|
-
]
|
|
790
|
-
}
|
|
791
|
-
) });
|
|
792
|
-
}
|
|
793
|
-
);
|
|
794
|
-
kr.displayName = "ButtonSort";
|
|
795
|
-
const vt = ({
|
|
796
|
-
children: e,
|
|
797
|
-
fill: t,
|
|
798
|
-
viewBox: r,
|
|
799
|
-
className: a,
|
|
800
|
-
defaultViewBox: n,
|
|
801
|
-
size: o,
|
|
802
|
-
title: s,
|
|
803
|
-
semantic: c = !1,
|
|
804
|
-
...g
|
|
805
|
-
}) => {
|
|
806
|
-
const d = l(o, a);
|
|
807
|
-
return /* @__PURE__ */ x(Ae, { children: [
|
|
808
|
-
/* @__PURE__ */ i(
|
|
809
|
-
"svg",
|
|
810
|
-
{
|
|
811
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
812
|
-
className: d,
|
|
813
|
-
viewBox: r || n,
|
|
814
|
-
fill: t || "currentColor",
|
|
815
|
-
role: "img",
|
|
816
|
-
"aria-hidden": !c,
|
|
817
|
-
focusable: !1,
|
|
818
|
-
...g,
|
|
819
|
-
children: e
|
|
820
|
-
}
|
|
821
|
-
),
|
|
822
|
-
s && c && /* @__PURE__ */ i("span", { className: "sr-only", children: s })
|
|
823
|
-
] });
|
|
824
|
-
};
|
|
825
|
-
/*!
|
|
826
|
-
@versini/ui-svgicon v4.0.3
|
|
827
|
-
© 2025 gizmette.com
|
|
828
|
-
*/
|
|
829
|
-
try {
|
|
830
|
-
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
831
|
-
version: "4.0.3",
|
|
832
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
833
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
834
|
-
license: "MIT"
|
|
835
|
-
});
|
|
836
|
-
} catch {
|
|
837
|
-
}
|
|
838
|
-
const un = ({
|
|
839
|
-
className: e,
|
|
840
|
-
viewBox: t,
|
|
841
|
-
title: r,
|
|
842
|
-
monotone: a,
|
|
843
|
-
...n
|
|
844
|
-
}) => /* @__PURE__ */ x(
|
|
845
|
-
vt,
|
|
846
|
-
{
|
|
847
|
-
defaultViewBox: "0 0 576 512",
|
|
848
|
-
size: "size-5",
|
|
849
|
-
viewBox: t,
|
|
850
|
-
className: e,
|
|
851
|
-
title: r || "Sort",
|
|
852
|
-
...n,
|
|
853
|
-
children: [
|
|
854
|
-
/* @__PURE__ */ i(
|
|
855
|
-
"path",
|
|
856
|
-
{
|
|
857
|
-
className: "fa-secondary",
|
|
858
|
-
opacity: a ? "1" : "0.4",
|
|
859
|
-
d: "M297.4 137.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L384 141.3 384 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0c6.2-6.2 9.4-14.4 9.4-22.6s-3.1-16.4-9.4-22.6l-96-96C432.4 35.1 424.2 32 416 32s-16.4 3.1-22.6 9.4l-96 96z"
|
|
860
|
-
}
|
|
861
|
-
),
|
|
862
|
-
/* @__PURE__ */ i(
|
|
863
|
-
"path",
|
|
864
|
-
{
|
|
865
|
-
className: "fa-primary",
|
|
866
|
-
d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7 192 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z"
|
|
867
|
-
}
|
|
868
|
-
)
|
|
869
|
-
]
|
|
870
|
-
}
|
|
871
|
-
), mn = ({
|
|
872
|
-
className: e,
|
|
873
|
-
viewBox: t,
|
|
874
|
-
title: r,
|
|
875
|
-
monotone: a,
|
|
876
|
-
...n
|
|
877
|
-
}) => /* @__PURE__ */ x(
|
|
878
|
-
vt,
|
|
879
|
-
{
|
|
880
|
-
defaultViewBox: "0 0 576 512",
|
|
881
|
-
size: "size-5",
|
|
882
|
-
viewBox: t,
|
|
883
|
-
className: e,
|
|
884
|
-
title: r || "Sort Down",
|
|
885
|
-
...n,
|
|
886
|
-
children: [
|
|
887
|
-
/* @__PURE__ */ i(
|
|
888
|
-
"path",
|
|
889
|
-
{
|
|
890
|
-
className: "fa-secondary",
|
|
891
|
-
opacity: a ? "1" : "0.4",
|
|
892
|
-
d: "M288 64c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L320 96c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32z"
|
|
893
|
-
}
|
|
894
|
-
),
|
|
895
|
-
/* @__PURE__ */ i(
|
|
896
|
-
"path",
|
|
897
|
-
{
|
|
898
|
-
className: "fa-primary",
|
|
899
|
-
d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7 160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 301.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z"
|
|
900
|
-
}
|
|
901
|
-
)
|
|
902
|
-
]
|
|
903
|
-
}
|
|
904
|
-
), gn = ({
|
|
905
|
-
className: e,
|
|
906
|
-
viewBox: t,
|
|
907
|
-
title: r,
|
|
908
|
-
monotone: a,
|
|
909
|
-
...n
|
|
910
|
-
}) => /* @__PURE__ */ x(
|
|
911
|
-
vt,
|
|
912
|
-
{
|
|
913
|
-
defaultViewBox: "0 0 576 512",
|
|
914
|
-
size: "size-5",
|
|
915
|
-
viewBox: t,
|
|
916
|
-
className: e,
|
|
917
|
-
title: r || "Sort Up",
|
|
918
|
-
...n,
|
|
919
|
-
children: [
|
|
920
|
-
/* @__PURE__ */ i(
|
|
921
|
-
"path",
|
|
922
|
-
{
|
|
923
|
-
className: "fa-secondary",
|
|
924
|
-
opacity: a ? "1" : "0.4",
|
|
925
|
-
d: "M288 64c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32z"
|
|
926
|
-
}
|
|
927
|
-
),
|
|
928
|
-
/* @__PURE__ */ i(
|
|
929
|
-
"path",
|
|
930
|
-
{
|
|
931
|
-
className: "fa-primary",
|
|
932
|
-
d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3 160 448c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-301.7L63.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32z"
|
|
933
|
-
}
|
|
934
|
-
)
|
|
935
|
-
]
|
|
936
|
-
}
|
|
937
|
-
);
|
|
938
|
-
/*!
|
|
939
|
-
@versini/ui-icons v4.4.2
|
|
940
|
-
© 2025 gizmette.com
|
|
941
|
-
*/
|
|
942
|
-
try {
|
|
943
|
-
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
944
|
-
version: "4.4.2",
|
|
945
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
946
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
947
|
-
license: "MIT"
|
|
948
|
-
});
|
|
949
|
-
} catch {
|
|
950
|
-
}
|
|
951
|
-
const ge = A.createContext({
|
|
952
|
-
mode: "light",
|
|
953
|
-
cellWrapper: "thead",
|
|
954
|
-
stickyHeader: !1,
|
|
955
|
-
stickyFooter: !1,
|
|
956
|
-
compact: !1
|
|
957
|
-
}), gs = ({
|
|
958
|
-
children: e,
|
|
959
|
-
mode: t = "system",
|
|
960
|
-
caption: r,
|
|
961
|
-
compact: a,
|
|
962
|
-
summary: n,
|
|
963
|
-
className: o,
|
|
964
|
-
wrapperClassName: s,
|
|
965
|
-
maxHeight: c,
|
|
966
|
-
stickyHeader: g,
|
|
967
|
-
stickyFooter: d,
|
|
968
|
-
...f
|
|
969
|
-
}) => {
|
|
970
|
-
const m = qa({
|
|
971
|
-
mode: t,
|
|
972
|
-
className: o,
|
|
973
|
-
wrapperClassName: s,
|
|
974
|
-
stickyHeader: g,
|
|
975
|
-
stickyFooter: d
|
|
976
|
-
});
|
|
977
|
-
return /* @__PURE__ */ i(
|
|
978
|
-
ge.Provider,
|
|
979
|
-
{
|
|
980
|
-
value: { mode: t, stickyHeader: g, stickyFooter: d, compact: a },
|
|
981
|
-
children: /* @__PURE__ */ i(
|
|
982
|
-
"div",
|
|
983
|
-
{
|
|
984
|
-
className: m.wrapper,
|
|
985
|
-
...c && {
|
|
986
|
-
style: { maxHeight: c }
|
|
987
|
-
},
|
|
988
|
-
children: /* @__PURE__ */ x("table", { className: m.table, summary: n, ...f, children: [
|
|
989
|
-
r && /* @__PURE__ */ i("caption", { className: m.caption, children: r }),
|
|
990
|
-
e
|
|
991
|
-
] })
|
|
992
|
-
}
|
|
993
|
-
)
|
|
994
|
-
}
|
|
995
|
-
);
|
|
996
|
-
}, hs = ({
|
|
997
|
-
children: e,
|
|
998
|
-
className: t,
|
|
999
|
-
...r
|
|
1000
|
-
}) => {
|
|
1001
|
-
const a = z(ge);
|
|
1002
|
-
a.cellWrapper = Be;
|
|
1003
|
-
const n = Ka({
|
|
1004
|
-
className: t,
|
|
1005
|
-
mode: a.mode,
|
|
1006
|
-
stickyHeader: a.stickyHeader
|
|
1007
|
-
});
|
|
1008
|
-
return /* @__PURE__ */ i("thead", { className: n, ...r, children: e });
|
|
1009
|
-
}, fs = ({
|
|
1010
|
-
children: e,
|
|
1011
|
-
className: t,
|
|
1012
|
-
...r
|
|
1013
|
-
}) => {
|
|
1014
|
-
const a = z(ge);
|
|
1015
|
-
a.cellWrapper = bt;
|
|
1016
|
-
const n = Ja({
|
|
1017
|
-
className: t,
|
|
1018
|
-
mode: a.mode,
|
|
1019
|
-
stickyFooter: a.stickyFooter
|
|
1020
|
-
});
|
|
1021
|
-
return /* @__PURE__ */ i("tfoot", { className: n, ...r, children: e });
|
|
1022
|
-
}, ps = ({ children: e, ...t }) => {
|
|
1023
|
-
const r = z(ge);
|
|
1024
|
-
return r.cellWrapper = ue, /* @__PURE__ */ i("tbody", { ...t, children: e });
|
|
1025
|
-
}, bs = ({
|
|
1026
|
-
children: e,
|
|
1027
|
-
className: t,
|
|
1028
|
-
...r
|
|
1029
|
-
}) => {
|
|
1030
|
-
const a = z(ge), n = Ya({
|
|
1031
|
-
mode: a.mode,
|
|
1032
|
-
cellWrapper: a.cellWrapper,
|
|
1033
|
-
className: t
|
|
1034
|
-
});
|
|
1035
|
-
return /* @__PURE__ */ i("tr", { className: n, ...r, children: e });
|
|
1036
|
-
}, hn = ({
|
|
1037
|
-
children: e,
|
|
1038
|
-
component: t,
|
|
1039
|
-
className: r,
|
|
1040
|
-
align: a,
|
|
1041
|
-
...n
|
|
1042
|
-
}) => {
|
|
1043
|
-
const o = z(ge), s = t || (o.cellWrapper === Be ? "th" : "td"), { mainClasses: c, alignClasses: g } = Za({
|
|
1044
|
-
cellWrapper: o.cellWrapper,
|
|
1045
|
-
className: r,
|
|
1046
|
-
mode: o.mode,
|
|
1047
|
-
compact: o.compact,
|
|
1048
|
-
align: a
|
|
1049
|
-
});
|
|
1050
|
-
return a ? /* @__PURE__ */ i(s, { className: c, ...n, children: /* @__PURE__ */ i("div", { className: g, children: e }) }) : /* @__PURE__ */ i(s, { className: c, ...n, children: e });
|
|
1051
|
-
}, ys = ({
|
|
1052
|
-
align: e,
|
|
1053
|
-
children: t,
|
|
1054
|
-
buttonClassName: r,
|
|
1055
|
-
className: a,
|
|
1056
|
-
component: n,
|
|
1057
|
-
focusMode: o = "alt-system",
|
|
1058
|
-
mode: s = "alt-system",
|
|
1059
|
-
onClick: c,
|
|
1060
|
-
sortDirection: g,
|
|
1061
|
-
sortedCell: d,
|
|
1062
|
-
cellId: f,
|
|
1063
|
-
...m
|
|
1064
|
-
}) => {
|
|
1065
|
-
const u = Xa({ buttonClassName: r });
|
|
1066
|
-
return /* @__PURE__ */ i(
|
|
1067
|
-
hn,
|
|
1068
|
-
{
|
|
1069
|
-
component: n,
|
|
1070
|
-
className: a,
|
|
1071
|
-
role: "columnheader",
|
|
1072
|
-
"aria-sort": g === be.ASC && d === f ? "ascending" : g === be.DESC && d === f ? "descending" : "other",
|
|
1073
|
-
...m,
|
|
1074
|
-
children: /* @__PURE__ */ i(
|
|
1075
|
-
kr,
|
|
1076
|
-
{
|
|
1077
|
-
active: d === f,
|
|
1078
|
-
className: u,
|
|
1079
|
-
onClick: c,
|
|
1080
|
-
align: e,
|
|
1081
|
-
noBorder: !0,
|
|
1082
|
-
focusMode: o,
|
|
1083
|
-
mode: s,
|
|
1084
|
-
fullWidth: !0,
|
|
1085
|
-
labelRight: t,
|
|
1086
|
-
children: g === be.ASC && d === f ? /* @__PURE__ */ i(gn, { className: "size-4", monotone: !0 }) : g === be.DESC && d === f ? /* @__PURE__ */ i(mn, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ i(un, { className: "size-4", monotone: !0 })
|
|
1087
|
-
}
|
|
1088
|
-
)
|
|
1089
|
-
}
|
|
1090
|
-
);
|
|
1091
|
-
}, B = [];
|
|
1092
|
-
for (let e = 0; e < 256; ++e)
|
|
1093
|
-
B.push((e + 256).toString(16).slice(1));
|
|
1094
|
-
function fn(e, t = 0) {
|
|
1095
|
-
return (B[e[t + 0]] + B[e[t + 1]] + B[e[t + 2]] + B[e[t + 3]] + "-" + B[e[t + 4]] + B[e[t + 5]] + "-" + B[e[t + 6]] + B[e[t + 7]] + "-" + B[e[t + 8]] + B[e[t + 9]] + "-" + B[e[t + 10]] + B[e[t + 11]] + B[e[t + 12]] + B[e[t + 13]] + B[e[t + 14]] + B[e[t + 15]]).toLowerCase();
|
|
1096
|
-
}
|
|
1097
|
-
let Ge;
|
|
1098
|
-
const pn = new Uint8Array(16);
|
|
1099
|
-
function bn() {
|
|
1100
|
-
if (!Ge) {
|
|
1101
|
-
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1102
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1103
|
-
Ge = crypto.getRandomValues.bind(crypto);
|
|
1104
|
-
}
|
|
1105
|
-
return Ge(pn);
|
|
1106
|
-
}
|
|
1107
|
-
const yn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), qt = { randomUUID: yn };
|
|
1108
|
-
function kt(e, t, r) {
|
|
1109
|
-
var n;
|
|
1110
|
-
if (qt.randomUUID && !t && !e)
|
|
1111
|
-
return qt.randomUUID();
|
|
1112
|
-
e = e || {};
|
|
1113
|
-
const a = e.random ?? ((n = e.rng) == null ? void 0 : n.call(e)) ?? bn();
|
|
1114
|
-
if (a.length < 16)
|
|
1115
|
-
throw new Error("Random bytes length must be >= 16");
|
|
1116
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, fn(a);
|
|
1117
|
-
}
|
|
1118
|
-
const vn = (e, t) => {
|
|
1119
|
-
if ((t == null ? void 0 : t.type) === qr) {
|
|
1120
|
-
const r = t.payload.messages.map((a) => ({
|
|
1121
|
-
message: {
|
|
1122
|
-
role: a.role,
|
|
1123
|
-
content: a.content,
|
|
1124
|
-
name: a.name,
|
|
1125
|
-
processingTime: a.processingTime
|
|
1126
|
-
}
|
|
1127
|
-
}));
|
|
1128
|
-
return {
|
|
1129
|
-
id: t.payload.id,
|
|
1130
|
-
model: t.payload.model,
|
|
1131
|
-
usage: t.payload.usage,
|
|
1132
|
-
isComponent: e.isComponent,
|
|
1133
|
-
messages: r,
|
|
1134
|
-
engine: e.engine,
|
|
1135
|
-
prompts: e.prompts
|
|
1136
|
-
};
|
|
1137
|
-
}
|
|
1138
|
-
if ((t == null ? void 0 : t.type) === ye) {
|
|
1139
|
-
const r = t.payload.message.role, a = t.payload.message.content, n = t.payload.message.name, o = t.payload.message.processingTime, s = t.payload.message.messageId;
|
|
1140
|
-
if (r !== "") {
|
|
1141
|
-
const c = {
|
|
1142
|
-
role: r,
|
|
1143
|
-
content: a,
|
|
1144
|
-
name: n,
|
|
1145
|
-
processingTime: o,
|
|
1146
|
-
messageId: s
|
|
1147
|
-
};
|
|
1148
|
-
if (r === ve) {
|
|
1149
|
-
const g = e.messages.findIndex(
|
|
1150
|
-
(d) => d.message.messageId === s
|
|
1151
|
-
);
|
|
1152
|
-
if (g !== -1) {
|
|
1153
|
-
const d = e.messages.map((f, m) => m === g ? {
|
|
1154
|
-
message: {
|
|
1155
|
-
...f.message,
|
|
1156
|
-
content: `${f.message.content}${a}`,
|
|
1157
|
-
processingTime: o,
|
|
1158
|
-
name: n
|
|
1159
|
-
}
|
|
1160
|
-
} : f);
|
|
1161
|
-
return {
|
|
1162
|
-
id: e.id,
|
|
1163
|
-
model: e.model,
|
|
1164
|
-
usage: e.usage,
|
|
1165
|
-
isComponent: e.isComponent,
|
|
1166
|
-
messages: d,
|
|
1167
|
-
engine: e.engine,
|
|
1168
|
-
prompts: e.prompts
|
|
1169
|
-
};
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
return {
|
|
1173
|
-
id: e.id,
|
|
1174
|
-
model: e.model,
|
|
1175
|
-
engine: e.engine,
|
|
1176
|
-
prompts: e.prompts,
|
|
1177
|
-
usage: e.usage,
|
|
1178
|
-
isComponent: e.isComponent,
|
|
1179
|
-
messages: [
|
|
1180
|
-
...e.messages,
|
|
1181
|
-
{
|
|
1182
|
-
message: c
|
|
1183
|
-
}
|
|
1184
|
-
]
|
|
1185
|
-
};
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
return (t == null ? void 0 : t.type) === ft ? {
|
|
1189
|
-
id: kt(),
|
|
1190
|
-
model: e.model,
|
|
1191
|
-
engine: e.engine,
|
|
1192
|
-
usage: 0,
|
|
1193
|
-
messages: [],
|
|
1194
|
-
isComponent: e.isComponent,
|
|
1195
|
-
prompts: e.prompts
|
|
1196
|
-
} : (t == null ? void 0 : t.type) === ir ? {
|
|
1197
|
-
id: e.id,
|
|
1198
|
-
model: t.payload.model,
|
|
1199
|
-
engine: e.engine,
|
|
1200
|
-
prompts: e.prompts,
|
|
1201
|
-
usage: t.payload.usage,
|
|
1202
|
-
messages: e.messages,
|
|
1203
|
-
isComponent: e.isComponent
|
|
1204
|
-
} : (t == null ? void 0 : t.type) === cr ? {
|
|
1205
|
-
...e,
|
|
1206
|
-
streaming: t.payload.streaming
|
|
1207
|
-
} : e;
|
|
1208
|
-
}, kn = (e, t) => {
|
|
1209
|
-
switch (t == null ? void 0 : t.type) {
|
|
1210
|
-
case Jr:
|
|
1211
|
-
return {
|
|
1212
|
-
searchString: t.payload.searchString,
|
|
1213
|
-
sortedCell: e.sortedCell,
|
|
1214
|
-
sortDirection: e.sortDirection
|
|
1215
|
-
};
|
|
1216
|
-
case Kr:
|
|
1217
|
-
return {
|
|
1218
|
-
searchString: e.searchString,
|
|
1219
|
-
sortedCell: t.payload.sortedCell,
|
|
1220
|
-
sortDirection: t.payload.sortDirection
|
|
1221
|
-
};
|
|
1222
|
-
default:
|
|
1223
|
-
return e;
|
|
1224
|
-
}
|
|
1225
|
-
}, _n = (e, t) => {
|
|
1226
|
-
switch (t == null ? void 0 : t.type) {
|
|
1227
|
-
case dr:
|
|
1228
|
-
return {
|
|
1229
|
-
prompt: t.payload.prompt,
|
|
1230
|
-
lastTriggeredTimestamp: e.lastTriggeredTimestamp
|
|
1231
|
-
};
|
|
1232
|
-
case lr:
|
|
1233
|
-
return {
|
|
1234
|
-
prompt: "",
|
|
1235
|
-
lastTriggeredTimestamp: (/* @__PURE__ */ new Date()).getTime()
|
|
1236
|
-
};
|
|
1237
|
-
default:
|
|
1238
|
-
return e;
|
|
1239
|
-
}
|
|
1240
|
-
};
|
|
1241
|
-
var Ne = { exports: {} }, je = {};
|
|
1242
|
-
/**
|
|
1243
|
-
* @license React
|
|
1244
|
-
* use-sync-external-store-shim.production.js
|
|
1245
|
-
*
|
|
1246
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1247
|
-
*
|
|
1248
|
-
* This source code is licensed under the MIT license found in the
|
|
1249
|
-
* LICENSE file in the root directory of this source tree.
|
|
1250
|
-
*/
|
|
1251
|
-
var Kt;
|
|
1252
|
-
function En() {
|
|
1253
|
-
if (Kt) return je;
|
|
1254
|
-
Kt = 1;
|
|
1255
|
-
var e = A;
|
|
1256
|
-
function t(m, u) {
|
|
1257
|
-
return m === u && (m !== 0 || 1 / m === 1 / u) || m !== m && u !== u;
|
|
1258
|
-
}
|
|
1259
|
-
var r = typeof Object.is == "function" ? Object.is : t, a = e.useState, n = e.useEffect, o = e.useLayoutEffect, s = e.useDebugValue;
|
|
1260
|
-
function c(m, u) {
|
|
1261
|
-
var h = u(), p = a({ inst: { value: h, getSnapshot: u } }), y = p[0].inst, v = p[1];
|
|
1262
|
-
return o(
|
|
1263
|
-
function() {
|
|
1264
|
-
y.value = h, y.getSnapshot = u, g(y) && v({ inst: y });
|
|
1265
|
-
},
|
|
1266
|
-
[m, h, u]
|
|
1267
|
-
), n(
|
|
1268
|
-
function() {
|
|
1269
|
-
return g(y) && v({ inst: y }), m(function() {
|
|
1270
|
-
g(y) && v({ inst: y });
|
|
1271
|
-
});
|
|
1272
|
-
},
|
|
1273
|
-
[m]
|
|
1274
|
-
), s(h), h;
|
|
1275
|
-
}
|
|
1276
|
-
function g(m) {
|
|
1277
|
-
var u = m.getSnapshot;
|
|
1278
|
-
m = m.value;
|
|
1279
|
-
try {
|
|
1280
|
-
var h = u();
|
|
1281
|
-
return !r(m, h);
|
|
1282
|
-
} catch {
|
|
1283
|
-
return !0;
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
function d(m, u) {
|
|
1287
|
-
return u();
|
|
1288
|
-
}
|
|
1289
|
-
var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : c;
|
|
1290
|
-
return je.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, je;
|
|
1291
|
-
}
|
|
1292
|
-
var qe = {};
|
|
1293
|
-
/**
|
|
1294
|
-
* @license React
|
|
1295
|
-
* use-sync-external-store-shim.development.js
|
|
1296
|
-
*
|
|
1297
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1298
|
-
*
|
|
1299
|
-
* This source code is licensed under the MIT license found in the
|
|
1300
|
-
* LICENSE file in the root directory of this source tree.
|
|
1301
|
-
*/
|
|
1302
|
-
var Jt;
|
|
1303
|
-
function xn() {
|
|
1304
|
-
return Jt || (Jt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1305
|
-
function e(h, p) {
|
|
1306
|
-
return h === p && (h !== 0 || 1 / h === 1 / p) || h !== h && p !== p;
|
|
1307
|
-
}
|
|
1308
|
-
function t(h, p) {
|
|
1309
|
-
f || n.startTransition === void 0 || (f = !0, console.error(
|
|
1310
|
-
"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."
|
|
1311
|
-
));
|
|
1312
|
-
var y = p();
|
|
1313
|
-
if (!m) {
|
|
1314
|
-
var v = p();
|
|
1315
|
-
o(y, v) || (console.error(
|
|
1316
|
-
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
1317
|
-
), m = !0);
|
|
1318
|
-
}
|
|
1319
|
-
v = s({
|
|
1320
|
-
inst: { value: y, getSnapshot: p }
|
|
1321
|
-
});
|
|
1322
|
-
var b = v[0].inst, _ = v[1];
|
|
1323
|
-
return g(
|
|
1324
|
-
function() {
|
|
1325
|
-
b.value = y, b.getSnapshot = p, r(b) && _({ inst: b });
|
|
1326
|
-
},
|
|
1327
|
-
[h, y, p]
|
|
1328
|
-
), c(
|
|
1329
|
-
function() {
|
|
1330
|
-
return r(b) && _({ inst: b }), h(function() {
|
|
1331
|
-
r(b) && _({ inst: b });
|
|
1332
|
-
});
|
|
1333
|
-
},
|
|
1334
|
-
[h]
|
|
1335
|
-
), d(y), y;
|
|
1336
|
-
}
|
|
1337
|
-
function r(h) {
|
|
1338
|
-
var p = h.getSnapshot;
|
|
1339
|
-
h = h.value;
|
|
1340
|
-
try {
|
|
1341
|
-
var y = p();
|
|
1342
|
-
return !o(h, y);
|
|
1343
|
-
} catch {
|
|
1344
|
-
return !0;
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
function a(h, p) {
|
|
1348
|
-
return p();
|
|
1349
|
-
}
|
|
1350
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1351
|
-
var n = A, o = typeof Object.is == "function" ? Object.is : e, s = n.useState, c = n.useEffect, g = n.useLayoutEffect, d = n.useDebugValue, f = !1, m = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
|
|
1352
|
-
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());
|
|
1353
|
-
}()), qe;
|
|
1354
|
-
}
|
|
1355
|
-
var Yt;
|
|
1356
|
-
function wn() {
|
|
1357
|
-
return Yt || (Yt = 1, process.env.NODE_ENV === "production" ? Ne.exports = /* @__PURE__ */ En() : Ne.exports = /* @__PURE__ */ xn()), Ne.exports;
|
|
1358
|
-
}
|
|
1359
|
-
var Sn = /* @__PURE__ */ wn(), Zt = Object.prototype.hasOwnProperty;
|
|
1360
|
-
function nt(e, t) {
|
|
1361
|
-
var r, a;
|
|
1362
|
-
if (e === t) return !0;
|
|
1363
|
-
if (e && t && (r = e.constructor) === t.constructor) {
|
|
1364
|
-
if (r === Date) return e.getTime() === t.getTime();
|
|
1365
|
-
if (r === RegExp) return e.toString() === t.toString();
|
|
1366
|
-
if (r === Array) {
|
|
1367
|
-
if ((a = e.length) === t.length)
|
|
1368
|
-
for (; a-- && nt(e[a], t[a]); ) ;
|
|
1369
|
-
return a === -1;
|
|
1370
|
-
}
|
|
1371
|
-
if (!r || typeof e == "object") {
|
|
1372
|
-
a = 0;
|
|
1373
|
-
for (r in e)
|
|
1374
|
-
if (Zt.call(e, r) && ++a && !Zt.call(t, r) || !(r in t) || !nt(e[r], t[r])) return !1;
|
|
1375
|
-
return Object.keys(t).length === a;
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
return e !== e && t !== t;
|
|
1379
|
-
}
|
|
1380
|
-
const G = /* @__PURE__ */ new WeakMap(), ae = () => {
|
|
1381
|
-
}, P = (
|
|
1382
|
-
/*#__NOINLINE__*/
|
|
1383
|
-
ae()
|
|
1384
|
-
), ot = Object, E = (e) => e === P, j = (e) => typeof e == "function", oe = (e, t) => ({
|
|
1385
|
-
...e,
|
|
1386
|
-
...t
|
|
1387
|
-
}), _r = (e) => j(e.then), Ke = {}, Ce = {}, _t = "undefined", Me = typeof window != _t, st = typeof document != _t, Tn = () => Me && typeof window.requestAnimationFrame != _t, Er = (e, t) => {
|
|
1388
|
-
const r = G.get(e);
|
|
1389
|
-
return [
|
|
1390
|
-
// Getter
|
|
1391
|
-
() => !E(t) && e.get(t) || Ke,
|
|
1392
|
-
// Setter
|
|
1393
|
-
(a) => {
|
|
1394
|
-
if (!E(t)) {
|
|
1395
|
-
const n = e.get(t);
|
|
1396
|
-
t in Ce || (Ce[t] = n), r[5](t, oe(n, a), n || Ke);
|
|
1397
|
-
}
|
|
1398
|
-
},
|
|
1399
|
-
// Subscriber
|
|
1400
|
-
r[6],
|
|
1401
|
-
// Get server cache snapshot
|
|
1402
|
-
() => !E(t) && t in Ce ? Ce[t] : !E(t) && e.get(t) || Ke
|
|
1403
|
-
];
|
|
1404
|
-
};
|
|
1405
|
-
let it = !0;
|
|
1406
|
-
const Nn = () => it, [ct, lt] = Me && window.addEventListener ? [
|
|
1407
|
-
window.addEventListener.bind(window),
|
|
1408
|
-
window.removeEventListener.bind(window)
|
|
1409
|
-
] : [
|
|
1410
|
-
ae,
|
|
1411
|
-
ae
|
|
1412
|
-
], Cn = () => {
|
|
1413
|
-
const e = st && document.visibilityState;
|
|
1414
|
-
return E(e) || e !== "hidden";
|
|
1415
|
-
}, Rn = (e) => (st && document.addEventListener("visibilitychange", e), ct("focus", e), () => {
|
|
1416
|
-
st && document.removeEventListener("visibilitychange", e), lt("focus", e);
|
|
1417
|
-
}), In = (e) => {
|
|
1418
|
-
const t = () => {
|
|
1419
|
-
it = !0, e();
|
|
1420
|
-
}, r = () => {
|
|
1421
|
-
it = !1;
|
|
1422
|
-
};
|
|
1423
|
-
return ct("online", t), ct("offline", r), () => {
|
|
1424
|
-
lt("online", t), lt("offline", r);
|
|
1425
|
-
};
|
|
1426
|
-
}, Ln = {
|
|
1427
|
-
isOnline: Nn,
|
|
1428
|
-
isVisible: Cn
|
|
1429
|
-
}, An = {
|
|
1430
|
-
initFocus: Rn,
|
|
1431
|
-
initReconnect: In
|
|
1432
|
-
}, Xt = !A.useId, _e = !Me || "Deno" in globalThis, On = (e) => Tn() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Je = _e ? D : ma, Ye = typeof navigator < "u" && navigator.connection, Qt = !_e && Ye && ([
|
|
1433
|
-
"slow-2g",
|
|
1434
|
-
"2g"
|
|
1435
|
-
].includes(Ye.effectiveType) || Ye.saveData), Re = /* @__PURE__ */ new WeakMap(), Ze = (e, t) => ot.prototype.toString.call(e) === `[object ${t}]`;
|
|
1436
|
-
let Bn = 0;
|
|
1437
|
-
const dt = (e) => {
|
|
1438
|
-
const t = typeof e, r = Ze(e, "Date"), a = Ze(e, "RegExp"), n = Ze(e, "Object");
|
|
1439
|
-
let o, s;
|
|
1440
|
-
if (ot(e) === e && !r && !a) {
|
|
1441
|
-
if (o = Re.get(e), o) return o;
|
|
1442
|
-
if (o = ++Bn + "~", Re.set(e, o), Array.isArray(e)) {
|
|
1443
|
-
for (o = "@", s = 0; s < e.length; s++)
|
|
1444
|
-
o += dt(e[s]) + ",";
|
|
1445
|
-
Re.set(e, o);
|
|
1446
|
-
}
|
|
1447
|
-
if (n) {
|
|
1448
|
-
o = "#";
|
|
1449
|
-
const c = ot.keys(e).sort();
|
|
1450
|
-
for (; !E(s = c.pop()); )
|
|
1451
|
-
E(e[s]) || (o += s + ":" + dt(e[s]) + ",");
|
|
1452
|
-
Re.set(e, o);
|
|
1453
|
-
}
|
|
1454
|
-
} else
|
|
1455
|
-
o = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
|
|
1456
|
-
return o;
|
|
1457
|
-
}, ze = (e) => {
|
|
1458
|
-
if (j(e))
|
|
1459
|
-
try {
|
|
1460
|
-
e = e();
|
|
1461
|
-
} catch {
|
|
1462
|
-
e = "";
|
|
1463
|
-
}
|
|
1464
|
-
const t = e;
|
|
1465
|
-
return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? dt(e) : "", [
|
|
1466
|
-
e,
|
|
1467
|
-
t
|
|
1468
|
-
];
|
|
1469
|
-
};
|
|
1470
|
-
let Mn = 0;
|
|
1471
|
-
const ut = () => ++Mn, xr = 0, wr = 1, Sr = 2, zn = 3;
|
|
1472
|
-
var pe = {
|
|
1473
|
-
__proto__: null,
|
|
1474
|
-
ERROR_REVALIDATE_EVENT: zn,
|
|
1475
|
-
FOCUS_EVENT: xr,
|
|
1476
|
-
MUTATE_EVENT: Sr,
|
|
1477
|
-
RECONNECT_EVENT: wr
|
|
1478
|
-
};
|
|
1479
|
-
async function Tr(...e) {
|
|
1480
|
-
const [t, r, a, n] = e, o = oe({
|
|
1481
|
-
populateCache: !0,
|
|
1482
|
-
throwOnError: !0
|
|
1483
|
-
}, typeof n == "boolean" ? {
|
|
1484
|
-
revalidate: n
|
|
1485
|
-
} : n || {});
|
|
1486
|
-
let s = o.populateCache;
|
|
1487
|
-
const c = o.rollbackOnError;
|
|
1488
|
-
let g = o.optimisticData;
|
|
1489
|
-
const d = (u) => typeof c == "function" ? c(u) : c !== !1, f = o.throwOnError;
|
|
1490
|
-
if (j(r)) {
|
|
1491
|
-
const u = r, h = [], p = t.keys();
|
|
1492
|
-
for (const y of p)
|
|
1493
|
-
// Skip the special useSWRInfinite and useSWRSubscription keys.
|
|
1494
|
-
!/^\$(inf|sub)\$/.test(y) && u(t.get(y)._k) && h.push(y);
|
|
1495
|
-
return Promise.all(h.map(m));
|
|
1496
|
-
}
|
|
1497
|
-
return m(r);
|
|
1498
|
-
async function m(u) {
|
|
1499
|
-
const [h] = ze(u);
|
|
1500
|
-
if (!h) return;
|
|
1501
|
-
const [p, y] = Er(t, h), [v, b, _, w] = G.get(t), N = () => {
|
|
1502
|
-
const U = v[h];
|
|
1503
|
-
return (j(o.revalidate) ? o.revalidate(p().data, u) : o.revalidate !== !1) && (delete _[h], delete w[h], U && U[0]) ? U[0](Sr).then(() => p().data) : p().data;
|
|
1504
|
-
};
|
|
1505
|
-
if (e.length < 3)
|
|
1506
|
-
return N();
|
|
1507
|
-
let k = a, C;
|
|
1508
|
-
const I = ut();
|
|
1509
|
-
b[h] = [
|
|
1510
|
-
I,
|
|
1511
|
-
0
|
|
1512
|
-
];
|
|
1513
|
-
const R = !E(g), Z = p(), F = Z.data, X = Z._c, K = E(X) ? F : X;
|
|
1514
|
-
if (R && (g = j(g) ? g(K, F) : g, y({
|
|
1515
|
-
data: g,
|
|
1516
|
-
_c: K
|
|
1517
|
-
})), j(k))
|
|
1518
|
-
try {
|
|
1519
|
-
k = k(K);
|
|
1520
|
-
} catch (U) {
|
|
1521
|
-
C = U;
|
|
1522
|
-
}
|
|
1523
|
-
if (k && _r(k))
|
|
1524
|
-
if (k = await k.catch((U) => {
|
|
1525
|
-
C = U;
|
|
1526
|
-
}), I !== b[h][0]) {
|
|
1527
|
-
if (C) throw C;
|
|
1528
|
-
return k;
|
|
1529
|
-
} else C && R && d(C) && (s = !0, y({
|
|
1530
|
-
data: K,
|
|
1531
|
-
_c: P
|
|
1532
|
-
}));
|
|
1533
|
-
if (s && !C)
|
|
1534
|
-
if (j(s)) {
|
|
1535
|
-
const U = s(k, K);
|
|
1536
|
-
y({
|
|
1537
|
-
data: U,
|
|
1538
|
-
error: P,
|
|
1539
|
-
_c: P
|
|
1540
|
-
});
|
|
1541
|
-
} else
|
|
1542
|
-
y({
|
|
1543
|
-
data: k,
|
|
1544
|
-
error: P,
|
|
1545
|
-
_c: P
|
|
1546
|
-
});
|
|
1547
|
-
if (b[h][1] = ut(), Promise.resolve(N()).then(() => {
|
|
1548
|
-
y({
|
|
1549
|
-
_c: P
|
|
1550
|
-
});
|
|
1551
|
-
}), C) {
|
|
1552
|
-
if (f) throw C;
|
|
1553
|
-
return;
|
|
1554
|
-
}
|
|
1555
|
-
return k;
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
const er = (e, t) => {
|
|
1559
|
-
for (const r in e)
|
|
1560
|
-
e[r][0] && e[r][0](t);
|
|
1561
|
-
}, $n = (e, t) => {
|
|
1562
|
-
if (!G.has(e)) {
|
|
1563
|
-
const r = oe(An, t), a = {}, n = Tr.bind(P, e);
|
|
1564
|
-
let o = ae;
|
|
1565
|
-
const s = {}, c = (f, m) => {
|
|
1566
|
-
const u = s[f] || [];
|
|
1567
|
-
return s[f] = u, u.push(m), () => u.splice(u.indexOf(m), 1);
|
|
1568
|
-
}, g = (f, m, u) => {
|
|
1569
|
-
e.set(f, m);
|
|
1570
|
-
const h = s[f];
|
|
1571
|
-
if (h)
|
|
1572
|
-
for (const p of h)
|
|
1573
|
-
p(m, u);
|
|
1574
|
-
}, d = () => {
|
|
1575
|
-
if (!G.has(e) && (G.set(e, [
|
|
1576
|
-
a,
|
|
1577
|
-
{},
|
|
1578
|
-
{},
|
|
1579
|
-
{},
|
|
1580
|
-
n,
|
|
1581
|
-
g,
|
|
1582
|
-
c
|
|
1583
|
-
]), !_e)) {
|
|
1584
|
-
const f = r.initFocus(setTimeout.bind(P, er.bind(P, a, xr))), m = r.initReconnect(setTimeout.bind(P, er.bind(P, a, wr)));
|
|
1585
|
-
o = () => {
|
|
1586
|
-
f && f(), m && m(), G.delete(e);
|
|
1587
|
-
};
|
|
1588
|
-
}
|
|
1589
|
-
};
|
|
1590
|
-
return d(), [
|
|
1591
|
-
e,
|
|
1592
|
-
n,
|
|
1593
|
-
d,
|
|
1594
|
-
o
|
|
1595
|
-
];
|
|
1596
|
-
}
|
|
1597
|
-
return [
|
|
1598
|
-
e,
|
|
1599
|
-
G.get(e)[4]
|
|
1600
|
-
];
|
|
1601
|
-
}, Dn = (e, t, r, a, n) => {
|
|
1602
|
-
const o = r.errorRetryCount, s = n.retryCount, c = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * r.errorRetryInterval;
|
|
1603
|
-
!E(o) && s > o || setTimeout(a, c, n);
|
|
1604
|
-
}, Vn = nt, [Et, Pn] = $n(/* @__PURE__ */ new Map()), Un = oe(
|
|
1605
|
-
{
|
|
1606
|
-
// events
|
|
1607
|
-
onLoadingSlow: ae,
|
|
1608
|
-
onSuccess: ae,
|
|
1609
|
-
onError: ae,
|
|
1610
|
-
onErrorRetry: Dn,
|
|
1611
|
-
onDiscarded: ae,
|
|
1612
|
-
// switches
|
|
1613
|
-
revalidateOnFocus: !0,
|
|
1614
|
-
revalidateOnReconnect: !0,
|
|
1615
|
-
revalidateIfStale: !0,
|
|
1616
|
-
shouldRetryOnError: !0,
|
|
1617
|
-
// timeouts
|
|
1618
|
-
errorRetryInterval: Qt ? 1e4 : 5e3,
|
|
1619
|
-
focusThrottleInterval: 5 * 1e3,
|
|
1620
|
-
dedupingInterval: 2 * 1e3,
|
|
1621
|
-
loadingTimeout: Qt ? 5e3 : 3e3,
|
|
1622
|
-
// providers
|
|
1623
|
-
compare: Vn,
|
|
1624
|
-
isPaused: () => !1,
|
|
1625
|
-
cache: Et,
|
|
1626
|
-
mutate: Pn,
|
|
1627
|
-
fallback: {}
|
|
1628
|
-
},
|
|
1629
|
-
// use web preset by default
|
|
1630
|
-
Ln
|
|
1631
|
-
), Fn = (e, t) => {
|
|
1632
|
-
const r = oe(e, t);
|
|
1633
|
-
if (t) {
|
|
1634
|
-
const { use: a, fallback: n } = e, { use: o, fallback: s } = t;
|
|
1635
|
-
a && o && (r.use = a.concat(o)), n && s && (r.fallback = oe(n, s));
|
|
1636
|
-
}
|
|
1637
|
-
return r;
|
|
1638
|
-
}, Hn = ua({}), Wn = "$inf$", Nr = Me && window.__SWR_DEVTOOLS_USE__, Gn = Nr ? window.__SWR_DEVTOOLS_USE__ : [], jn = () => {
|
|
1639
|
-
Nr && (window.__SWR_DEVTOOLS_REACT__ = A);
|
|
1640
|
-
}, qn = (e) => j(e[1]) ? [
|
|
1641
|
-
e[0],
|
|
1642
|
-
e[1],
|
|
1643
|
-
e[2] || {}
|
|
1644
|
-
] : [
|
|
1645
|
-
e[0],
|
|
1646
|
-
null,
|
|
1647
|
-
(e[1] === null ? e[2] : e[1]) || {}
|
|
1648
|
-
], Kn = () => oe(Un, z(Hn)), xt = (e, t) => {
|
|
1649
|
-
const [r, a] = ze(e), [, , , n] = G.get(Et);
|
|
1650
|
-
if (n[r]) return n[r];
|
|
1651
|
-
const o = t(a);
|
|
1652
|
-
return n[r] = o, o;
|
|
1653
|
-
}, Jn = (e) => (t, r, a) => e(t, r && ((...o) => {
|
|
1654
|
-
const [s] = ze(t), [, , , c] = G.get(Et);
|
|
1655
|
-
if (s.startsWith(Wn))
|
|
1656
|
-
return r(...o);
|
|
1657
|
-
const g = c[s];
|
|
1658
|
-
return E(g) ? r(...o) : (delete c[s], g);
|
|
1659
|
-
}), a), Yn = Gn.concat(Jn), Zn = (e) => function(...r) {
|
|
1660
|
-
const a = Kn(), [n, o, s] = qn(r), c = Fn(a, s);
|
|
1661
|
-
let g = e;
|
|
1662
|
-
const { use: d } = c, f = (d || []).concat(Yn);
|
|
1663
|
-
for (let m = f.length; m--; )
|
|
1664
|
-
g = f[m](g);
|
|
1665
|
-
return g(n, o || c.fetcher || null, c);
|
|
1666
|
-
}, Xn = (e, t, r) => {
|
|
1667
|
-
const a = t[e] || (t[e] = []);
|
|
1668
|
-
return a.push(r), () => {
|
|
1669
|
-
const n = a.indexOf(r);
|
|
1670
|
-
n >= 0 && (a[n] = a[a.length - 1], a.pop());
|
|
1671
|
-
};
|
|
1672
|
-
};
|
|
1673
|
-
jn();
|
|
1674
|
-
const Xe = A.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
|
|
1675
|
-
// and emitting an error.
|
|
1676
|
-
// We assume that this is only for the `use(thenable)` case, not `use(context)`.
|
|
1677
|
-
// https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
|
|
1678
|
-
((e) => {
|
|
1679
|
-
switch (e.status) {
|
|
1680
|
-
case "pending":
|
|
1681
|
-
throw e;
|
|
1682
|
-
case "fulfilled":
|
|
1683
|
-
return e.value;
|
|
1684
|
-
case "rejected":
|
|
1685
|
-
throw e.reason;
|
|
1686
|
-
default:
|
|
1687
|
-
throw e.status = "pending", e.then((t) => {
|
|
1688
|
-
e.status = "fulfilled", e.value = t;
|
|
1689
|
-
}, (t) => {
|
|
1690
|
-
e.status = "rejected", e.reason = t;
|
|
1691
|
-
}), e;
|
|
1692
|
-
}
|
|
1693
|
-
}), Qe = {
|
|
1694
|
-
dedupe: !0
|
|
1695
|
-
}, Qn = (e, t, r) => {
|
|
1696
|
-
const { cache: a, compare: n, suspense: o, fallbackData: s, revalidateOnMount: c, revalidateIfStale: g, refreshInterval: d, refreshWhenHidden: f, refreshWhenOffline: m, keepPreviousData: u } = r, [h, p, y, v] = G.get(a), [b, _] = ze(e), w = M(!1), N = M(!1), k = M(b), C = M(t), I = M(r), R = () => I.current, Z = () => R().isVisible() && R().isOnline(), [F, X, K, U] = Er(a, b), Q = M({}).current, ie = E(s) ? E(r.fallback) ? P : r.fallback[b] : s, he = (S, T) => {
|
|
1697
|
-
for (const $ in Q) {
|
|
1698
|
-
const L = $;
|
|
1699
|
-
if (L === "data") {
|
|
1700
|
-
if (!n(S[L], T[L]) && (!E(S[L]) || !n(Te, T[L])))
|
|
1701
|
-
return !1;
|
|
1702
|
-
} else if (T[L] !== S[L])
|
|
1703
|
-
return !1;
|
|
1704
|
-
}
|
|
1705
|
-
return !0;
|
|
1706
|
-
}, we = ur(() => {
|
|
1707
|
-
const S = !b || !t ? !1 : E(c) ? R().isPaused() || o ? !1 : g !== !1 : c, T = (V) => {
|
|
1708
|
-
const J = oe(V);
|
|
1709
|
-
return delete J._k, S ? {
|
|
1710
|
-
isValidating: !0,
|
|
1711
|
-
isLoading: !0,
|
|
1712
|
-
...J
|
|
1713
|
-
} : J;
|
|
1714
|
-
}, $ = F(), L = U(), W = T($), de = $ === L ? W : T(L);
|
|
1715
|
-
let O = W;
|
|
1716
|
-
return [
|
|
1717
|
-
() => {
|
|
1718
|
-
const V = T(F());
|
|
1719
|
-
return he(V, O) ? (O.data = V.data, O.isLoading = V.isLoading, O.isValidating = V.isValidating, O.error = V.error, O) : (O = V, V);
|
|
1720
|
-
},
|
|
1721
|
-
() => de
|
|
1722
|
-
];
|
|
1723
|
-
}, [
|
|
1724
|
-
a,
|
|
1725
|
-
b
|
|
1726
|
-
]), ee = Sn.useSyncExternalStore(ne(
|
|
1727
|
-
(S) => K(b, (T, $) => {
|
|
1728
|
-
he($, T) || S();
|
|
1729
|
-
}),
|
|
1730
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1731
|
-
[
|
|
1732
|
-
a,
|
|
1733
|
-
b
|
|
1734
|
-
]
|
|
1735
|
-
), we[0], we[1]), te = !w.current, Hr = h[b] && h[b].length > 0, ce = ee.data, le = E(ce) ? ie && _r(ie) ? Xe(ie) : ie : ce, Se = ee.error, Rt = M(le), Te = u ? E(ce) ? Rt.current : ce : le, It = Hr && !E(Se) ? !1 : te && !E(c) ? c : R().isPaused() ? !1 : o ? E(le) ? !1 : g : E(le) || g, Lt = !!(b && t && te && It), Wr = E(ee.isValidating) ? Lt : ee.isValidating, Gr = E(ee.isLoading) ? Lt : ee.isLoading, fe = ne(
|
|
1736
|
-
async (S) => {
|
|
1737
|
-
const T = C.current;
|
|
1738
|
-
if (!b || !T || N.current || R().isPaused())
|
|
1739
|
-
return !1;
|
|
1740
|
-
let $, L, W = !0;
|
|
1741
|
-
const de = S || {}, O = !y[b] || !de.dedupe, V = () => Xt ? !N.current && b === k.current && w.current : b === k.current, J = {
|
|
1742
|
-
isValidating: !1,
|
|
1743
|
-
isLoading: !1
|
|
1744
|
-
}, Ot = () => {
|
|
1745
|
-
X(J);
|
|
1746
|
-
}, Bt = () => {
|
|
1747
|
-
const H = y[b];
|
|
1748
|
-
H && H[1] === L && delete y[b];
|
|
1749
|
-
}, Mt = {
|
|
1750
|
-
isValidating: !0
|
|
1751
|
-
};
|
|
1752
|
-
E(F().data) && (Mt.isLoading = !0);
|
|
1753
|
-
try {
|
|
1754
|
-
if (O && (X(Mt), r.loadingTimeout && E(F().data) && setTimeout(() => {
|
|
1755
|
-
W && V() && R().onLoadingSlow(b, r);
|
|
1756
|
-
}, r.loadingTimeout), y[b] = [
|
|
1757
|
-
T(_),
|
|
1758
|
-
ut()
|
|
1759
|
-
]), [$, L] = y[b], $ = await $, O && setTimeout(Bt, r.dedupingInterval), !y[b] || y[b][1] !== L)
|
|
1760
|
-
return O && V() && R().onDiscarded(b), !1;
|
|
1761
|
-
J.error = P;
|
|
1762
|
-
const H = p[b];
|
|
1763
|
-
if (!E(H) && // case 1
|
|
1764
|
-
(L <= H[0] || // case 2
|
|
1765
|
-
L <= H[1] || // case 3
|
|
1766
|
-
H[1] === 0))
|
|
1767
|
-
return Ot(), O && V() && R().onDiscarded(b), !1;
|
|
1768
|
-
const Y = F().data;
|
|
1769
|
-
J.data = n(Y, $) ? Y : $, O && V() && R().onSuccess($, b, r);
|
|
1770
|
-
} catch (H) {
|
|
1771
|
-
Bt();
|
|
1772
|
-
const Y = R(), { shouldRetryOnError: Ue } = Y;
|
|
1773
|
-
Y.isPaused() || (J.error = H, O && V() && (Y.onError(H, b, Y), (Ue === !0 || j(Ue) && Ue(H)) && (!R().revalidateOnFocus || !R().revalidateOnReconnect || Z()) && Y.onErrorRetry(H, b, Y, (jr) => {
|
|
1774
|
-
const Fe = h[b];
|
|
1775
|
-
Fe && Fe[0] && Fe[0](pe.ERROR_REVALIDATE_EVENT, jr);
|
|
1776
|
-
}, {
|
|
1777
|
-
retryCount: (de.retryCount || 0) + 1,
|
|
1778
|
-
dedupe: !0
|
|
1779
|
-
})));
|
|
1780
|
-
}
|
|
1781
|
-
return W = !1, Ot(), !0;
|
|
1782
|
-
},
|
|
1783
|
-
// `setState` is immutable, and `eventsCallback`, `fnArg`, and
|
|
1784
|
-
// `keyValidating` are depending on `key`, so we can exclude them from
|
|
1785
|
-
// the deps array.
|
|
1786
|
-
//
|
|
1787
|
-
// FIXME:
|
|
1788
|
-
// `fn` and `config` might be changed during the lifecycle,
|
|
1789
|
-
// but they might be changed every render like this.
|
|
1790
|
-
// `useSWR('key', () => fetch('/api/'), { suspense: true })`
|
|
1791
|
-
// So we omit the values from the deps array
|
|
1792
|
-
// even though it might cause unexpected behaviors.
|
|
1793
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1794
|
-
[
|
|
1795
|
-
b,
|
|
1796
|
-
a
|
|
1797
|
-
]
|
|
1798
|
-
), At = ne(
|
|
1799
|
-
// Use callback to make sure `keyRef.current` returns latest result every time
|
|
1800
|
-
(...S) => Tr(a, k.current, ...S),
|
|
1801
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1802
|
-
[]
|
|
1803
|
-
);
|
|
1804
|
-
if (Je(() => {
|
|
1805
|
-
C.current = t, I.current = r, E(ce) || (Rt.current = ce);
|
|
1806
|
-
}), Je(() => {
|
|
1807
|
-
if (!b) return;
|
|
1808
|
-
const S = fe.bind(P, Qe);
|
|
1809
|
-
let T = 0;
|
|
1810
|
-
const L = Xn(b, h, (W, de = {}) => {
|
|
1811
|
-
if (W == pe.FOCUS_EVENT) {
|
|
1812
|
-
const O = Date.now();
|
|
1813
|
-
R().revalidateOnFocus && O > T && Z() && (T = O + R().focusThrottleInterval, S());
|
|
1814
|
-
} else if (W == pe.RECONNECT_EVENT)
|
|
1815
|
-
R().revalidateOnReconnect && Z() && S();
|
|
1816
|
-
else {
|
|
1817
|
-
if (W == pe.MUTATE_EVENT)
|
|
1818
|
-
return fe();
|
|
1819
|
-
if (W == pe.ERROR_REVALIDATE_EVENT)
|
|
1820
|
-
return fe(de);
|
|
1821
|
-
}
|
|
1822
|
-
});
|
|
1823
|
-
return N.current = !1, k.current = b, w.current = !0, X({
|
|
1824
|
-
_k: _
|
|
1825
|
-
}), It && (E(le) || _e ? S() : On(S)), () => {
|
|
1826
|
-
N.current = !0, L();
|
|
1827
|
-
};
|
|
1828
|
-
}, [
|
|
1829
|
-
b
|
|
1830
|
-
]), Je(() => {
|
|
1831
|
-
let S;
|
|
1832
|
-
function T() {
|
|
1833
|
-
const L = j(d) ? d(F().data) : d;
|
|
1834
|
-
L && S !== -1 && (S = setTimeout($, L));
|
|
1835
|
-
}
|
|
1836
|
-
function $() {
|
|
1837
|
-
!F().error && (f || R().isVisible()) && (m || R().isOnline()) ? fe(Qe).then(T) : T();
|
|
1838
|
-
}
|
|
1839
|
-
return T(), () => {
|
|
1840
|
-
S && (clearTimeout(S), S = -1);
|
|
1841
|
-
};
|
|
1842
|
-
}, [
|
|
1843
|
-
d,
|
|
1844
|
-
f,
|
|
1845
|
-
m,
|
|
1846
|
-
b
|
|
1847
|
-
]), ga(Te), o && E(le) && b) {
|
|
1848
|
-
if (!Xt && _e)
|
|
1849
|
-
throw new Error("Fallback data is required when using Suspense in SSR.");
|
|
1850
|
-
C.current = t, I.current = r, N.current = !1;
|
|
1851
|
-
const S = v[b];
|
|
1852
|
-
if (!E(S)) {
|
|
1853
|
-
const T = At(S);
|
|
1854
|
-
Xe(T);
|
|
1855
|
-
}
|
|
1856
|
-
if (E(Se)) {
|
|
1857
|
-
const T = fe(Qe);
|
|
1858
|
-
E(Te) || (T.status = "fulfilled", T.value = !0), Xe(T);
|
|
1859
|
-
} else
|
|
1860
|
-
throw Se;
|
|
1861
|
-
}
|
|
1862
|
-
return {
|
|
1863
|
-
mutate: At,
|
|
1864
|
-
get data() {
|
|
1865
|
-
return Q.data = !0, Te;
|
|
1866
|
-
},
|
|
1867
|
-
get error() {
|
|
1868
|
-
return Q.error = !0, Se;
|
|
1869
|
-
},
|
|
1870
|
-
get isValidating() {
|
|
1871
|
-
return Q.isValidating = !0, Wr;
|
|
1872
|
-
},
|
|
1873
|
-
get isLoading() {
|
|
1874
|
-
return Q.isLoading = !0, Gr;
|
|
1875
|
-
}
|
|
1876
|
-
};
|
|
1877
|
-
}, eo = Zn(Qn), re = {
|
|
1878
|
-
GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
|
|
1879
|
-
location(latitude: $latitude, longitude: $longitude) {
|
|
1880
|
-
country
|
|
1881
|
-
state
|
|
1882
|
-
city
|
|
1883
|
-
displayName
|
|
1884
|
-
}
|
|
1885
|
-
}`,
|
|
1886
|
-
GET_CHATS: `query GetChats(
|
|
1887
|
-
$user: String!,
|
|
1888
|
-
$searchString: String,
|
|
1889
|
-
$limit: Float,
|
|
1890
|
-
$direction: String,
|
|
1891
|
-
$truncateSize: Float) {
|
|
1892
|
-
chats(
|
|
1893
|
-
user: $user,
|
|
1894
|
-
searchString: $searchString,
|
|
1895
|
-
limit: $limit,
|
|
1896
|
-
direction: $direction,
|
|
1897
|
-
truncateSize: $truncateSize) {
|
|
1898
|
-
timestamp
|
|
1899
|
-
id
|
|
1900
|
-
model
|
|
1901
|
-
messages {
|
|
1902
|
-
content
|
|
1903
|
-
}
|
|
1904
|
-
}
|
|
1905
|
-
}`,
|
|
1906
|
-
GET_CHATS_STATS: `query GetChatsStats($user: String!) {
|
|
1907
|
-
chatsStats(user: $user) {
|
|
1908
|
-
totalChats
|
|
1909
|
-
averageProcessingTimes
|
|
1910
|
-
}
|
|
1911
|
-
}`,
|
|
1912
|
-
GET_CHAT: `query GetChatById($id: String!) {
|
|
1913
|
-
chatById(id: $id) {
|
|
1914
|
-
model
|
|
1915
|
-
usage
|
|
1916
|
-
messages {
|
|
1917
|
-
content
|
|
1918
|
-
role
|
|
1919
|
-
name
|
|
1920
|
-
processingTime
|
|
1921
|
-
}
|
|
1922
|
-
}
|
|
1923
|
-
}`,
|
|
1924
|
-
DELETE_CHAT: `mutation DeleteChat(
|
|
1925
|
-
$id: String!,
|
|
1926
|
-
$userId: String!) {
|
|
1927
|
-
deleteChat(
|
|
1928
|
-
id: $id,
|
|
1929
|
-
user: $userId) {
|
|
1930
|
-
id
|
|
1931
|
-
}
|
|
1932
|
-
}`,
|
|
1933
|
-
GET_SERVER_CAPABILITIES: `query GetServerCapabilities {
|
|
1934
|
-
getServerCapabilities {
|
|
1935
|
-
version
|
|
1936
|
-
models
|
|
1937
|
-
plugins
|
|
1938
|
-
engines
|
|
1939
|
-
runningMode
|
|
1940
|
-
}
|
|
1941
|
-
}`,
|
|
1942
|
-
GET_USER_PREFERENCES: `query GetUserPreferences($user: String!) {
|
|
1943
|
-
getUserPreferences(user: $user) {
|
|
1944
|
-
instructions
|
|
1945
|
-
location
|
|
1946
|
-
engine
|
|
1947
|
-
tags {
|
|
1948
|
-
enabled
|
|
1949
|
-
slot
|
|
1950
|
-
label
|
|
1951
|
-
content
|
|
1952
|
-
}
|
|
1953
|
-
}
|
|
1954
|
-
}`,
|
|
1955
|
-
SET_USER_PREFERENCES: `mutation SetUserPreferences(
|
|
1956
|
-
$user: String!,
|
|
1957
|
-
$instructions: String,
|
|
1958
|
-
$location: String,
|
|
1959
|
-
$engine: String,
|
|
1960
|
-
$tags: [TagIn]) {
|
|
1961
|
-
setUserPreferences(
|
|
1962
|
-
user: $user,
|
|
1963
|
-
instructions: $instructions,
|
|
1964
|
-
location: $location,
|
|
1965
|
-
engine: $engine,
|
|
1966
|
-
tags: $tags)
|
|
1967
|
-
}`
|
|
1968
|
-
}, xe = {
|
|
1969
|
-
GET_LOCATION: {
|
|
1970
|
-
schema: re.GET_LOCATION,
|
|
1971
|
-
method: "location"
|
|
1972
|
-
},
|
|
1973
|
-
GET_CHATS: {
|
|
1974
|
-
schema: re.GET_CHATS,
|
|
1975
|
-
method: "chats"
|
|
1976
|
-
},
|
|
1977
|
-
GET_CHATS_STATS: {
|
|
1978
|
-
schema: re.GET_CHATS_STATS,
|
|
1979
|
-
method: "chatsStats"
|
|
1980
|
-
},
|
|
1981
|
-
GET_CHAT: {
|
|
1982
|
-
schema: re.GET_CHAT,
|
|
1983
|
-
method: "chatById"
|
|
1984
|
-
},
|
|
1985
|
-
DELETE_CHAT: {
|
|
1986
|
-
schema: re.DELETE_CHAT,
|
|
1987
|
-
method: "deleteChat"
|
|
1988
|
-
},
|
|
1989
|
-
GET_SERVER_CAPABILITIES: {
|
|
1990
|
-
schema: re.GET_SERVER_CAPABILITIES,
|
|
1991
|
-
method: "getServerCapabilities"
|
|
1992
|
-
},
|
|
1993
|
-
GET_USER_PREFERENCES: {
|
|
1994
|
-
schema: re.GET_USER_PREFERENCES,
|
|
1995
|
-
method: "getUserPreferences"
|
|
1996
|
-
},
|
|
1997
|
-
SET_USER_PREFERENCES: {
|
|
1998
|
-
schema: re.SET_USER_PREFERENCES,
|
|
1999
|
-
method: "setUserPreferences"
|
|
2000
|
-
}
|
|
2001
|
-
}, Cr = process.env.PUBLIC_SASSY_API_SERVER_URL, to = async ({
|
|
2002
|
-
query: e,
|
|
2003
|
-
data: t,
|
|
2004
|
-
headers: r = {}
|
|
2005
|
-
}) => await fetch(`${Cr}/graphql`, {
|
|
2006
|
-
method: "POST",
|
|
2007
|
-
credentials: "include",
|
|
2008
|
-
headers: {
|
|
2009
|
-
...r,
|
|
2010
|
-
"Content-Type": "application/json",
|
|
2011
|
-
Accept: "application/json"
|
|
2012
|
-
},
|
|
2013
|
-
body: JSON.stringify({
|
|
2014
|
-
query: e,
|
|
2015
|
-
variables: t
|
|
2016
|
-
})
|
|
2017
|
-
}), Rr = async ({
|
|
2018
|
-
accessToken: e,
|
|
2019
|
-
type: t,
|
|
2020
|
-
params: r = {}
|
|
2021
|
-
}) => {
|
|
2022
|
-
const a = t != null && t.data ? t.data(r) : r;
|
|
2023
|
-
try {
|
|
2024
|
-
const n = `Bearer ${e}`, o = await to({
|
|
2025
|
-
headers: {
|
|
2026
|
-
authorization: n
|
|
2027
|
-
},
|
|
2028
|
-
query: t.schema,
|
|
2029
|
-
data: a
|
|
2030
|
-
});
|
|
2031
|
-
if (o.status !== 200)
|
|
2032
|
-
return { status: o.status, data: [] };
|
|
2033
|
-
const { data: s, errors: c } = await o.json();
|
|
2034
|
-
return {
|
|
2035
|
-
status: o.status,
|
|
2036
|
-
data: s[t.method],
|
|
2037
|
-
errors: c
|
|
2038
|
-
};
|
|
2039
|
-
} catch (n) {
|
|
2040
|
-
return console.error(n), { status: 500, data: [] };
|
|
2041
|
-
}
|
|
2042
|
-
}, ro = async ({
|
|
2043
|
-
accessToken: e,
|
|
2044
|
-
name: t,
|
|
2045
|
-
data: r,
|
|
2046
|
-
method: a = "POST"
|
|
2047
|
-
}) => {
|
|
2048
|
-
const n = `Bearer ${e}`;
|
|
2049
|
-
return await fetch(`${Cr}/api/${t}`, {
|
|
2050
|
-
method: a,
|
|
2051
|
-
credentials: "include",
|
|
2052
|
-
headers: {
|
|
2053
|
-
"Content-Type": "application/json",
|
|
2054
|
-
authorization: n
|
|
2055
|
-
},
|
|
2056
|
-
body: JSON.stringify(r)
|
|
2057
|
-
});
|
|
2058
|
-
}, $e = ({
|
|
2059
|
-
fetcher: e,
|
|
2060
|
-
scope: t,
|
|
2061
|
-
keys: r,
|
|
2062
|
-
swrOptions: a,
|
|
2063
|
-
getAccessToken: n
|
|
2064
|
-
}) => {
|
|
2065
|
-
const { data: o, error: s, isLoading: c, mutate: g } = eo(
|
|
2066
|
-
[t, ...r],
|
|
2067
|
-
(d) => e(d, n),
|
|
2068
|
-
{ ...a }
|
|
2069
|
-
);
|
|
2070
|
-
return { data: o, error: s, isLoading: c, mutate: g };
|
|
2071
|
-
}, De = async ({
|
|
2072
|
-
getAccessToken: e,
|
|
2073
|
-
type: t,
|
|
2074
|
-
params: r
|
|
2075
|
-
}) => {
|
|
2076
|
-
const a = await e(), n = await Rr({
|
|
2077
|
-
accessToken: a,
|
|
2078
|
-
type: t,
|
|
2079
|
-
params: r
|
|
2080
|
-
});
|
|
2081
|
-
if (n.status === 200 && n.errors === void 0)
|
|
2082
|
-
return n.data;
|
|
2083
|
-
throw new Error("An error occurred while fetching the data.");
|
|
2084
|
-
}, Ir = async ([e, t], r) => De({
|
|
2085
|
-
getAccessToken: r,
|
|
2086
|
-
type: xe.GET_USER_PREFERENCES,
|
|
2087
|
-
params: {
|
|
2088
|
-
user: t
|
|
2089
|
-
}
|
|
2090
|
-
}), Lr = ({
|
|
2091
|
-
keys: e,
|
|
2092
|
-
getAccessToken: t
|
|
2093
|
-
}) => $e({
|
|
2094
|
-
fetcher: Ir,
|
|
2095
|
-
scope: "/preferences",
|
|
2096
|
-
keys: e,
|
|
2097
|
-
swrOptions: { keepPreviousData: !0 },
|
|
2098
|
-
getAccessToken: t
|
|
2099
|
-
}), ao = ({
|
|
2100
|
-
keys: e,
|
|
2101
|
-
getAccessToken: t
|
|
2102
|
-
}) => {
|
|
2103
|
-
xt(
|
|
2104
|
-
["/preferences", ...e],
|
|
2105
|
-
(r) => Ir(r, t)
|
|
2106
|
-
);
|
|
2107
|
-
}, no = async ([e, t], r) => De({
|
|
2108
|
-
getAccessToken: r,
|
|
2109
|
-
type: xe.GET_CHATS_STATS,
|
|
2110
|
-
params: {
|
|
2111
|
-
user: t
|
|
2112
|
-
}
|
|
2113
|
-
}), vs = ({
|
|
2114
|
-
keys: e,
|
|
2115
|
-
getAccessToken: t
|
|
2116
|
-
}) => $e({
|
|
2117
|
-
fetcher: no,
|
|
2118
|
-
scope: "/stats",
|
|
2119
|
-
keys: e,
|
|
2120
|
-
getAccessToken: t
|
|
2121
|
-
}), Ar = async ([e, t, r, a], n) => De({
|
|
2122
|
-
getAccessToken: n,
|
|
2123
|
-
type: xe.GET_CHATS,
|
|
2124
|
-
params: {
|
|
2125
|
-
user: t,
|
|
2126
|
-
searchString: r,
|
|
2127
|
-
direction: a,
|
|
2128
|
-
limit: 1,
|
|
2129
|
-
truncateSize: 100
|
|
2130
|
-
}
|
|
2131
|
-
}), ks = ({
|
|
2132
|
-
keys: e,
|
|
2133
|
-
getAccessToken: t
|
|
2134
|
-
}) => $e({
|
|
2135
|
-
fetcher: Ar,
|
|
2136
|
-
scope: "/history",
|
|
2137
|
-
keys: e,
|
|
2138
|
-
getAccessToken: t,
|
|
2139
|
-
swrOptions: {
|
|
2140
|
-
keepPreviousData: !0,
|
|
2141
|
-
dedupingInterval: 1e4
|
|
2142
|
-
}
|
|
2143
|
-
}), oo = ({
|
|
2144
|
-
keys: e,
|
|
2145
|
-
getAccessToken: t
|
|
2146
|
-
}) => {
|
|
2147
|
-
xt(["/history", ...e], (r) => Ar(r, t));
|
|
2148
|
-
}, Or = async ([e], t) => De({
|
|
2149
|
-
getAccessToken: t,
|
|
2150
|
-
type: xe.GET_SERVER_CAPABILITIES
|
|
2151
|
-
}), _s = ({
|
|
2152
|
-
getAccessToken: e
|
|
2153
|
-
}) => $e({
|
|
2154
|
-
fetcher: Or,
|
|
2155
|
-
scope: "/capabilities",
|
|
2156
|
-
keys: [],
|
|
2157
|
-
getAccessToken: e
|
|
2158
|
-
}), so = ({
|
|
2159
|
-
getAccessToken: e
|
|
2160
|
-
}) => {
|
|
2161
|
-
xt(["/capabilities"], (t) => Or(t, e));
|
|
2162
|
-
}, io = "z-20", co = "z-10", se = A.createContext({
|
|
2163
|
-
state: {
|
|
2164
|
-
id: "",
|
|
2165
|
-
model: ke,
|
|
2166
|
-
engine: ke,
|
|
2167
|
-
usage: 0,
|
|
2168
|
-
messages: [],
|
|
2169
|
-
isComponent: !1,
|
|
2170
|
-
prompts: []
|
|
2171
|
-
},
|
|
2172
|
-
dispatch: () => {
|
|
2173
|
-
},
|
|
2174
|
-
serverStats: {
|
|
2175
|
-
version: "",
|
|
2176
|
-
models: [],
|
|
2177
|
-
plugins: [],
|
|
2178
|
-
engines: []
|
|
2179
|
-
}
|
|
2180
|
-
}), lo = A.createContext({
|
|
2181
|
-
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
|
2182
|
-
dispatch: () => {
|
|
2183
|
-
}
|
|
2184
|
-
}), Ve = A.createContext({
|
|
2185
|
-
state: { prompt: "", lastTriggeredTimestamp: 0 },
|
|
2186
|
-
dispatch: () => {
|
|
2187
|
-
}
|
|
2188
|
-
}), uo = ({
|
|
2189
|
-
className: e
|
|
2190
|
-
}) => {
|
|
2191
|
-
const { state: t, dispatch: r } = z(se), a = M(null), n = M(!1), o = (s) => {
|
|
2192
|
-
s.preventDefault(), r({
|
|
2193
|
-
type: ft
|
|
2194
|
-
});
|
|
2195
|
-
};
|
|
2196
|
-
return D(() => {
|
|
2197
|
-
var s;
|
|
2198
|
-
(t == null ? void 0 : t.streaming) === !0 && !n.current && a.current && (n.current = !0, a.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (n.current = !1, (s = a.current) == null || s.blur());
|
|
2199
|
-
}, [t]), /* @__PURE__ */ i(
|
|
2200
|
-
Oe,
|
|
2201
|
-
{
|
|
2202
|
-
className: e,
|
|
2203
|
-
noBorder: !0,
|
|
2204
|
-
radius: "small",
|
|
2205
|
-
mode: "dark",
|
|
2206
|
-
focusMode: "light",
|
|
2207
|
-
label: "New Chat",
|
|
2208
|
-
ref: a,
|
|
2209
|
-
onClick: o,
|
|
2210
|
-
children: t != null && t.streaming ? /* @__PURE__ */ i(Oa, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ i(La, { size: "size-4", monotone: !0 })
|
|
2211
|
-
}
|
|
2212
|
-
);
|
|
2213
|
-
}, mt = tt.createContext({
|
|
2214
|
-
getItemProps: () => ({}),
|
|
2215
|
-
activeIndex: null,
|
|
2216
|
-
/* v8 ignore next 2 */
|
|
2217
|
-
setActiveIndex: () => {
|
|
2218
|
-
},
|
|
2219
|
-
setHasFocusInside: () => {
|
|
2220
|
-
},
|
|
2221
|
-
isOpen: !1
|
|
2222
|
-
}), tr = (e) => {
|
|
2223
|
-
if (typeof e == "string")
|
|
2224
|
-
return e;
|
|
2225
|
-
if (typeof e == "function")
|
|
2226
|
-
return e.displayName || e.name || "Component";
|
|
2227
|
-
if (typeof e == "object" && e !== null && "type" in e) {
|
|
2228
|
-
const t = e.type;
|
|
2229
|
-
if (typeof t == "function" || typeof t == "object")
|
|
2230
|
-
return t.displayName || t.name || "Component";
|
|
2231
|
-
}
|
|
2232
|
-
return "Element";
|
|
2233
|
-
}, Br = mr(
|
|
2234
|
-
({
|
|
2235
|
-
trigger: e,
|
|
2236
|
-
children: t,
|
|
2237
|
-
label: r = "Open menu",
|
|
2238
|
-
defaultPlacement: a = "bottom-start",
|
|
2239
|
-
onOpenChange: n,
|
|
2240
|
-
mode: o = "system",
|
|
2241
|
-
focusMode: s = "system",
|
|
2242
|
-
...c
|
|
2243
|
-
}, g) => {
|
|
2244
|
-
const [d, f] = q(!1), [m, u] = q(!1), [h, p] = q(null), y = M([]), v = M([]), b = z(mt), _ = hr(), w = ha(), N = fr(), { floatingStyles: k, refs: C, context: I } = fa({
|
|
2245
|
-
nodeId: w,
|
|
2246
|
-
open: d,
|
|
2247
|
-
onOpenChange: (te) => {
|
|
2248
|
-
f(te), n == null || n(te);
|
|
2249
|
-
},
|
|
2250
|
-
placement: a,
|
|
2251
|
-
strategy: "fixed",
|
|
2252
|
-
middleware: [pa({ mainAxis: 10 }), ba(), ya()],
|
|
2253
|
-
whileElementsMounted: va
|
|
2254
|
-
}), R = ka(I, {
|
|
2255
|
-
event: "mousedown",
|
|
2256
|
-
toggle: !0,
|
|
2257
|
-
ignoreMouse: !1
|
|
2258
|
-
}), Z = _a(I, { role: "menu" }), F = Ea(I, { bubbles: !0 }), X = xa(I, {
|
|
2259
|
-
listRef: y,
|
|
2260
|
-
activeIndex: h,
|
|
2261
|
-
nested: !1,
|
|
2262
|
-
onNavigate: p,
|
|
2263
|
-
loop: !0
|
|
2264
|
-
}), K = wa(I, {
|
|
2265
|
-
listRef: v,
|
|
2266
|
-
onMatch: d ? p : void 0,
|
|
2267
|
-
activeIndex: h
|
|
2268
|
-
}), { getReferenceProps: U, getFloatingProps: Q, getItemProps: ie } = Sa([R, Z, F, X, K]), he = tr(e) === "Button" || tr(e) === "ButtonIcon", we = he ? {
|
|
2269
|
-
noInternalClick: he,
|
|
2270
|
-
focusMode: s,
|
|
2271
|
-
mode: o
|
|
2272
|
-
} : {}, ee = A.cloneElement(
|
|
2273
|
-
e,
|
|
2274
|
-
{
|
|
2275
|
-
...we,
|
|
2276
|
-
"aria-label": r,
|
|
2277
|
-
"data-open": d ? "" : void 0,
|
|
2278
|
-
"data-focus-inside": m ? "" : void 0,
|
|
2279
|
-
ref: pr([C.setReference, N.ref, g]),
|
|
2280
|
-
...U(
|
|
2281
|
-
b.getItemProps({
|
|
2282
|
-
...c
|
|
2283
|
-
})
|
|
2284
|
-
)
|
|
2285
|
-
}
|
|
2286
|
-
);
|
|
2287
|
-
return D(() => {
|
|
2288
|
-
if (!_)
|
|
2289
|
-
return;
|
|
2290
|
-
function te() {
|
|
2291
|
-
f(!1), n == null || n(!1);
|
|
2292
|
-
}
|
|
2293
|
-
return _.events.on("click", te), () => {
|
|
2294
|
-
_.events.off("click", te);
|
|
2295
|
-
};
|
|
2296
|
-
}, [_, n]), D(() => {
|
|
2297
|
-
d && _ && _.events.emit("menuopen", { nodeId: w });
|
|
2298
|
-
}, [_, d, w]), /* @__PURE__ */ x(Ta, { id: w, children: [
|
|
2299
|
-
ee,
|
|
2300
|
-
/* @__PURE__ */ i(
|
|
2301
|
-
mt.Provider,
|
|
2302
|
-
{
|
|
2303
|
-
value: {
|
|
2304
|
-
activeIndex: h,
|
|
2305
|
-
setActiveIndex: p,
|
|
2306
|
-
getItemProps: ie,
|
|
2307
|
-
setHasFocusInside: u,
|
|
2308
|
-
isOpen: d
|
|
2309
|
-
},
|
|
2310
|
-
children: /* @__PURE__ */ i(Na, { elementsRef: y, labelsRef: v, children: d && /* @__PURE__ */ i(Ca, { children: /* @__PURE__ */ i(
|
|
2311
|
-
Ra,
|
|
2312
|
-
{
|
|
2313
|
-
context: I,
|
|
2314
|
-
modal: !1,
|
|
2315
|
-
initialFocus: 0,
|
|
2316
|
-
returnFocus: !0,
|
|
2317
|
-
children: /* @__PURE__ */ i(
|
|
2318
|
-
"div",
|
|
2319
|
-
{
|
|
2320
|
-
ref: C.setFloating,
|
|
2321
|
-
className: "rounded-md bg-surface-light shadow-sm shadow-border-dark outline-none p-4 sm:p-2",
|
|
2322
|
-
style: k,
|
|
2323
|
-
...Q(),
|
|
2324
|
-
children: t
|
|
2325
|
-
}
|
|
2326
|
-
)
|
|
2327
|
-
}
|
|
2328
|
-
) }) })
|
|
2329
|
-
}
|
|
2330
|
-
)
|
|
2331
|
-
] });
|
|
2332
|
-
}
|
|
2333
|
-
), wt = mr((e, t) => /* @__PURE__ */ i(Ia, { children: /* @__PURE__ */ i(Br, { ...e, ref: t }) }));
|
|
2334
|
-
wt.displayName = "Menu";
|
|
2335
|
-
Br.displayName = "MenuComponent";
|
|
2336
|
-
const Le = tt.forwardRef(
|
|
2337
|
-
({
|
|
2338
|
-
label: e,
|
|
2339
|
-
disabled: t,
|
|
2340
|
-
icon: r,
|
|
2341
|
-
raw: a = !1,
|
|
2342
|
-
children: n,
|
|
2343
|
-
ignoreClick: o = !1,
|
|
2344
|
-
selected: s = !1,
|
|
2345
|
-
...c
|
|
2346
|
-
}, g) => {
|
|
2347
|
-
let d = "";
|
|
2348
|
-
const f = tt.useContext(mt), m = fr({ label: t ? null : e }), u = hr(), h = pr([m.ref, g]);
|
|
2349
|
-
if (a && n)
|
|
2350
|
-
return /* @__PURE__ */ i(
|
|
2351
|
-
"div",
|
|
2352
|
-
{
|
|
2353
|
-
role: "menuitem",
|
|
2354
|
-
...f.getItemProps({
|
|
2355
|
-
onClick(y) {
|
|
2356
|
-
var v;
|
|
2357
|
-
o || ((v = c.onClick) == null || v.call(c, y), u == null || u.events.emit("click"));
|
|
2358
|
-
}
|
|
2359
|
-
}),
|
|
2360
|
-
children: n
|
|
2361
|
-
}
|
|
2362
|
-
);
|
|
2363
|
-
r && (d = "pl-2");
|
|
2364
|
-
const p = l(
|
|
2365
|
-
"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",
|
|
2366
|
-
{
|
|
2367
|
-
"bg-surface-medium text-copy-lighter font-bold": !t && s,
|
|
2368
|
-
"bg-none": !t && !s,
|
|
2369
|
-
"focus:text-copy-dark": s
|
|
2370
|
-
}
|
|
2371
|
-
);
|
|
2372
|
-
return /* @__PURE__ */ x(
|
|
2373
|
-
"button",
|
|
2374
|
-
{
|
|
2375
|
-
...c,
|
|
2376
|
-
ref: h,
|
|
2377
|
-
role: "menuitem",
|
|
2378
|
-
className: p,
|
|
2379
|
-
tabIndex: 0,
|
|
2380
|
-
disabled: t,
|
|
2381
|
-
...f.getItemProps({
|
|
2382
|
-
onClick(y) {
|
|
2383
|
-
var v;
|
|
2384
|
-
o || ((v = c.onClick) == null || v.call(c, y), u == null || u.events.emit("click"));
|
|
2385
|
-
},
|
|
2386
|
-
onFocus(y) {
|
|
2387
|
-
var v;
|
|
2388
|
-
(v = c.onFocus) == null || v.call(c, y), f.setHasFocusInside(!0);
|
|
2389
|
-
}
|
|
2390
|
-
}),
|
|
2391
|
-
children: [
|
|
2392
|
-
r,
|
|
2393
|
-
e && /* @__PURE__ */ i("span", { className: d, children: e })
|
|
2394
|
-
]
|
|
2395
|
-
}
|
|
2396
|
-
);
|
|
2397
|
-
}
|
|
2398
|
-
);
|
|
2399
|
-
Le.displayName = "MenuItem";
|
|
2400
|
-
const Es = ({ className: e, ...t }) => {
|
|
2401
|
-
const r = l(e, "my-1 border-t border-border-medium");
|
|
2402
|
-
return /* @__PURE__ */ i("div", { className: r, ...t });
|
|
2403
|
-
}, Mr = ({
|
|
2404
|
-
className: e,
|
|
2405
|
-
...t
|
|
2406
|
-
}) => {
|
|
2407
|
-
const r = l(e, "py-1 px-2 text-sm text-copy-medium");
|
|
2408
|
-
return /* @__PURE__ */ i("div", { className: r, ...t });
|
|
2409
|
-
};
|
|
2410
|
-
/*!
|
|
2411
|
-
@versini/ui-menu v3.2.5
|
|
2412
|
-
© 2025 gizmette.com
|
|
2413
|
-
*/
|
|
2414
|
-
try {
|
|
2415
|
-
window.__VERSINI_UI_MENU__ || (window.__VERSINI_UI_MENU__ = {
|
|
2416
|
-
version: "3.2.5",
|
|
2417
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
2418
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2419
|
-
license: "MIT"
|
|
2420
|
-
});
|
|
2421
|
-
} catch {
|
|
2422
|
-
}
|
|
2423
|
-
const mo = (e) => {
|
|
2424
|
-
for (let t = 0; t < e.length; t++)
|
|
2425
|
-
if (e[t].enabled)
|
|
2426
|
-
return !0;
|
|
2427
|
-
return !1;
|
|
2428
|
-
}, go = ({
|
|
2429
|
-
className: e,
|
|
2430
|
-
defaultPlacement: t = "top-start"
|
|
2431
|
-
}) => {
|
|
2432
|
-
const { dispatch: r } = z(Ve), { getAccessToken: a, user: n } = Ee(), {
|
|
2433
|
-
data: o,
|
|
2434
|
-
error: s,
|
|
2435
|
-
isLoading: c
|
|
2436
|
-
} = Lr({
|
|
2437
|
-
keys: [n == null ? void 0 : n.username],
|
|
2438
|
-
getAccessToken: a
|
|
2439
|
-
}), g = (d, f) => {
|
|
2440
|
-
d.preventDefault(), r({
|
|
2441
|
-
type: dr,
|
|
2442
|
-
payload: {
|
|
2443
|
-
prompt: f
|
|
2444
|
-
}
|
|
2445
|
-
});
|
|
2446
|
-
};
|
|
2447
|
-
return s || c ? null : o && o.tags && mo(o.tags) && /* @__PURE__ */ x(
|
|
2448
|
-
wt,
|
|
2449
|
-
{
|
|
2450
|
-
mode: "dark",
|
|
2451
|
-
focusMode: "light",
|
|
2452
|
-
trigger: /* @__PURE__ */ i(Oe, { className: e, noBorder: !0, label: "Prompts", children: /* @__PURE__ */ i(Aa, { size: "size-4" }) }),
|
|
2453
|
-
defaultPlacement: t,
|
|
2454
|
-
children: [
|
|
2455
|
-
/* @__PURE__ */ i(Mr, { children: "Prompts" }),
|
|
2456
|
-
o && o.tags && o.tags.map((d) => d.enabled && d.label && d.content && /* @__PURE__ */ i(
|
|
2457
|
-
Le,
|
|
2458
|
-
{
|
|
2459
|
-
label: d.label,
|
|
2460
|
-
onClick: (f) => g(f, d.content)
|
|
2461
|
-
},
|
|
2462
|
-
`prompt-button-${d.slot}`
|
|
2463
|
-
))
|
|
2464
|
-
]
|
|
2465
|
-
}
|
|
2466
|
-
);
|
|
2467
|
-
}, ho = ({
|
|
2468
|
-
className: e
|
|
2469
|
-
}) => {
|
|
2470
|
-
const { state: t } = z(se);
|
|
2471
|
-
return /* @__PURE__ */ i(
|
|
2472
|
-
Oe,
|
|
2473
|
-
{
|
|
2474
|
-
className: e,
|
|
2475
|
-
disabled: t == null ? void 0 : t.streaming,
|
|
2476
|
-
label: "Send",
|
|
2477
|
-
noBorder: !0,
|
|
2478
|
-
type: "submit",
|
|
2479
|
-
mode: "light",
|
|
2480
|
-
focusMode: "light",
|
|
2481
|
-
children: /* @__PURE__ */ i(Ba, { size: "size-4" })
|
|
2482
|
-
}
|
|
2483
|
-
);
|
|
2484
|
-
}, fo = ({
|
|
2485
|
-
className: e
|
|
2486
|
-
}) => {
|
|
2487
|
-
const { state: t, dispatch: r } = z(se), { getAccessToken: a, user: n } = Ee(), {
|
|
2488
|
-
data: o,
|
|
2489
|
-
error: s,
|
|
2490
|
-
isLoading: c,
|
|
2491
|
-
mutate: g
|
|
2492
|
-
} = Lr({
|
|
2493
|
-
keys: [n == null ? void 0 : n.username],
|
|
2494
|
-
getAccessToken: a
|
|
2495
|
-
}), d = async (f) => {
|
|
2496
|
-
try {
|
|
2497
|
-
await Rr({
|
|
2498
|
-
accessToken: await a(),
|
|
2499
|
-
type: xe.SET_USER_PREFERENCES,
|
|
2500
|
-
params: {
|
|
2501
|
-
user: n == null ? void 0 : n.username,
|
|
2502
|
-
engine: f
|
|
2503
|
-
}
|
|
2504
|
-
}), g({ ...o }), t && (t == null ? void 0 : t.messages.length) > 0 && r({
|
|
2505
|
-
type: ft
|
|
2506
|
-
});
|
|
2507
|
-
} catch {
|
|
2508
|
-
}
|
|
2509
|
-
};
|
|
2510
|
-
return s || c ? null : o && /* @__PURE__ */ x(
|
|
2511
|
-
wt,
|
|
2512
|
-
{
|
|
2513
|
-
mode: "dark",
|
|
2514
|
-
focusMode: "light",
|
|
2515
|
-
trigger: /* @__PURE__ */ i(Oe, { className: e, noBorder: !0, label: "Engines", children: o && o.engine === He ? /* @__PURE__ */ i(Ut, { size: "size-4 sm:size-5" }) : /* @__PURE__ */ i(Ft, { size: "size-4 sm:size-5" }) }),
|
|
2516
|
-
defaultPlacement: "top-start",
|
|
2517
|
-
children: [
|
|
2518
|
-
/* @__PURE__ */ i(Mr, { children: "Engines" }),
|
|
2519
|
-
/* @__PURE__ */ i(
|
|
2520
|
-
Le,
|
|
2521
|
-
{
|
|
2522
|
-
selected: o && o.engine === zt,
|
|
2523
|
-
label: "OpenAI",
|
|
2524
|
-
icon: /* @__PURE__ */ i(Ft, {}),
|
|
2525
|
-
onClick: () => d(zt)
|
|
2526
|
-
}
|
|
2527
|
-
),
|
|
2528
|
-
/* @__PURE__ */ i(
|
|
2529
|
-
Le,
|
|
2530
|
-
{
|
|
2531
|
-
selected: o && o.engine === He,
|
|
2532
|
-
label: "Anthropic",
|
|
2533
|
-
icon: /* @__PURE__ */ i(Ut, {}),
|
|
2534
|
-
onClick: () => d(He)
|
|
2535
|
-
}
|
|
2536
|
-
)
|
|
2537
|
-
]
|
|
2538
|
-
}
|
|
2539
|
-
);
|
|
2540
|
-
}, po = () => l(
|
|
2541
|
-
"relative rounded-md text-base h-auto min-w-28 overflow-hidden pt-2"
|
|
2542
|
-
), rr = () => l("bg-surface-darker"), bo = () => l("text-copy-lighter caret-copy-light"), yo = () => l(
|
|
2543
|
-
"has-[.av-prompt-editable:focus]:outline",
|
|
2544
|
-
"has-[.av-prompt-editable:focus]:outline-2",
|
|
2545
|
-
"has-[.av-prompt-editable:focus]:outline-offset-2",
|
|
2546
|
-
"has-[.av-prompt-editable:focus]:outline-focus-light"
|
|
2547
|
-
), vo = () => l(
|
|
2548
|
-
"peer",
|
|
2549
|
-
"text-base resize-none overflow-hidden w-full text-inherit outline-none",
|
|
2550
|
-
"h-6 pr-2 pl-4"
|
|
2551
|
-
), ko = ({ className: e }) => {
|
|
2552
|
-
const t = l(
|
|
2553
|
-
Yr,
|
|
2554
|
-
po(),
|
|
2555
|
-
rr(),
|
|
2556
|
-
bo(),
|
|
2557
|
-
yo(),
|
|
2558
|
-
e
|
|
2559
|
-
), r = l(
|
|
2560
|
-
Zr,
|
|
2561
|
-
vo(),
|
|
2562
|
-
rr()
|
|
2563
|
-
);
|
|
2564
|
-
return {
|
|
2565
|
-
wrapper: t,
|
|
2566
|
-
textArea: r
|
|
2567
|
-
};
|
|
2568
|
-
}, _o = ({
|
|
2569
|
-
className: e,
|
|
2570
|
-
label: t,
|
|
2571
|
-
value: r,
|
|
2572
|
-
defaultValue: a,
|
|
2573
|
-
onChange: n,
|
|
2574
|
-
onSubmit: o,
|
|
2575
|
-
ref: s,
|
|
2576
|
-
...c
|
|
2577
|
-
}) => {
|
|
2578
|
-
const { state: m } = z(se), { state: u } = z(Ve), h = M(null), p = M(null), y = Wa([s, p]), v = ja(), b = ko({
|
|
2579
|
-
className: e
|
|
2580
|
-
}), [_, w] = Ga({
|
|
2581
|
-
value: r,
|
|
2582
|
-
initialControlledDelay: 20,
|
|
2583
|
-
defaultValue: a,
|
|
2584
|
-
onChange: (I) => {
|
|
2585
|
-
n && n({
|
|
2586
|
-
target: {
|
|
2587
|
-
value: I
|
|
2588
|
-
}
|
|
2589
|
-
});
|
|
2590
|
-
}
|
|
2591
|
-
}), N = ne(() => {
|
|
2592
|
-
if (!p.current)
|
|
2593
|
-
return;
|
|
2594
|
-
p.current.style.height = "auto";
|
|
2595
|
-
const I = p.current.scrollHeight;
|
|
2596
|
-
if (I > 120) {
|
|
2597
|
-
p.current.style.height = "120px", p.current.style.overflowY = "scroll";
|
|
2598
|
-
return;
|
|
2599
|
-
}
|
|
2600
|
-
p.current.style.height = `${I}px`, p.current.style.overflowY = "hidden";
|
|
2601
|
-
}, [120]), k = (I) => {
|
|
2602
|
-
p.current && (p.current.style.height = "24px"), o(I, _), w("");
|
|
2603
|
-
}, C = (I) => {
|
|
2604
|
-
w(I.target.value), N();
|
|
2605
|
-
};
|
|
2606
|
-
return D(() => {
|
|
2607
|
-
m && m.usage === 0 && m.messages.length === 0 && p.current && (p.current.style.height = "24px");
|
|
2608
|
-
}, [m]), D(() => {
|
|
2609
|
-
u.lastTriggeredTimestamp && setTimeout(() => {
|
|
2610
|
-
N();
|
|
2611
|
-
}, 100);
|
|
2612
|
-
}, [u.lastTriggeredTimestamp, N]), /* @__PURE__ */ i(
|
|
2613
|
-
"div",
|
|
2614
|
-
{
|
|
2615
|
-
className: b.wrapper,
|
|
2616
|
-
ref: h,
|
|
2617
|
-
...c,
|
|
2618
|
-
children: /* @__PURE__ */ x("form", { onSubmit: k, children: [
|
|
2619
|
-
/* @__PURE__ */ i("div", { id: v, className: "sr-only", children: t }),
|
|
2620
|
-
/* @__PURE__ */ i("div", { className: "relative", children: /* @__PURE__ */ i(
|
|
2621
|
-
"textarea",
|
|
2622
|
-
{
|
|
2623
|
-
required: !0,
|
|
2624
|
-
rows: 1,
|
|
2625
|
-
ref: y,
|
|
2626
|
-
placeholder: "Type your question here.",
|
|
2627
|
-
translate: "no",
|
|
2628
|
-
onChange: C,
|
|
2629
|
-
value: _,
|
|
2630
|
-
onKeyDown: Pa([["mod+Enter", k]]),
|
|
2631
|
-
className: b.textArea,
|
|
2632
|
-
"aria-labelledby": v
|
|
2633
|
-
}
|
|
2634
|
-
) }),
|
|
2635
|
-
/* @__PURE__ */ x("div", { className: "p-2 flex items-center", children: [
|
|
2636
|
-
/* @__PURE__ */ i(ho, { className: "order-4 ml-auto" }),
|
|
2637
|
-
/* @__PURE__ */ i(uo, { className: "order-1 mr-2" }),
|
|
2638
|
-
/* @__PURE__ */ i(fo, { className: "order-2 mr-2" }),
|
|
2639
|
-
/* @__PURE__ */ i(go, { className: "order-3 mr-2" })
|
|
2640
|
-
] })
|
|
2641
|
-
] })
|
|
2642
|
-
}
|
|
2643
|
-
);
|
|
2644
|
-
}, Ie = (e, t) => {
|
|
2645
|
-
e({
|
|
2646
|
-
type: cr,
|
|
2647
|
-
payload: {
|
|
2648
|
-
streaming: t
|
|
2649
|
-
}
|
|
2650
|
-
});
|
|
2651
|
-
}, ar = (e) => {
|
|
2652
|
-
Ie(e, !1), e({
|
|
2653
|
-
type: ye,
|
|
2654
|
-
payload: {
|
|
2655
|
-
message: {
|
|
2656
|
-
role: pt,
|
|
2657
|
-
content: ta
|
|
2658
|
-
}
|
|
2659
|
-
}
|
|
2660
|
-
});
|
|
2661
|
-
}, Eo = () => {
|
|
2662
|
-
const { state: e, dispatch: t } = z(se), { state: r, dispatch: a } = z(Ve), [n, o] = q(""), { getAccessToken: s, user: c } = Ee(), g = M(null), d = M(
|
|
2663
|
-
null
|
|
2664
|
-
);
|
|
2665
|
-
D(() => {
|
|
2666
|
-
(async () => {
|
|
2667
|
-
var u;
|
|
2668
|
-
if (!e || e.messages.length === 0) {
|
|
2669
|
-
(u = d == null ? void 0 : d.current) == null || u.cancel();
|
|
2670
|
-
return;
|
|
2671
|
-
}
|
|
2672
|
-
const m = e.messages[e.messages.length - 1];
|
|
2673
|
-
if (!(e.messages.length === 0 || m.message.role === ve || m.message.role === Xr || m.message.role === pt || m.message.role === Qr))
|
|
2674
|
-
try {
|
|
2675
|
-
const h = await ro({
|
|
2676
|
-
accessToken: await s(),
|
|
2677
|
-
name: "generate",
|
|
2678
|
-
data: {
|
|
2679
|
-
messages: e.messages,
|
|
2680
|
-
model: e.engine || ke,
|
|
2681
|
-
user: (c == null ? void 0 : c.username) || "",
|
|
2682
|
-
id: e.id,
|
|
2683
|
-
usage: e.usage
|
|
2684
|
-
}
|
|
2685
|
-
});
|
|
2686
|
-
if (h && h.ok) {
|
|
2687
|
-
const p = kt();
|
|
2688
|
-
d.current = h.body.getReader();
|
|
2689
|
-
const y = new TextDecoder();
|
|
2690
|
-
for (; ; ) {
|
|
2691
|
-
Ie(t, !0);
|
|
2692
|
-
const { done: v, value: b } = await d.current.read();
|
|
2693
|
-
if (v) {
|
|
2694
|
-
Ie(t, !1);
|
|
2695
|
-
break;
|
|
2696
|
-
}
|
|
2697
|
-
const _ = y.decode(b, { stream: !0 }), w = _.indexOf($t);
|
|
2698
|
-
if (w !== -1) {
|
|
2699
|
-
const N = _.substring(0, w), k = JSON.parse(
|
|
2700
|
-
_.substring(w + $t.length)
|
|
2701
|
-
);
|
|
2702
|
-
t({
|
|
2703
|
-
type: ir,
|
|
2704
|
-
payload: {
|
|
2705
|
-
model: k.model,
|
|
2706
|
-
usage: k.usage
|
|
2707
|
-
}
|
|
2708
|
-
}), t({
|
|
2709
|
-
type: ye,
|
|
2710
|
-
payload: {
|
|
2711
|
-
message: {
|
|
2712
|
-
content: N,
|
|
2713
|
-
role: ve,
|
|
2714
|
-
messageId: p,
|
|
2715
|
-
processingTime: k.processingTime,
|
|
2716
|
-
name: k.name
|
|
2717
|
-
}
|
|
2718
|
-
}
|
|
2719
|
-
}), Ie(t, !1);
|
|
2720
|
-
break;
|
|
2721
|
-
} else
|
|
2722
|
-
t({
|
|
2723
|
-
type: ye,
|
|
2724
|
-
payload: {
|
|
2725
|
-
message: {
|
|
2726
|
-
content: _,
|
|
2727
|
-
role: ve,
|
|
2728
|
-
messageId: p
|
|
2729
|
-
}
|
|
2730
|
-
}
|
|
2731
|
-
});
|
|
2732
|
-
}
|
|
2733
|
-
} else
|
|
2734
|
-
ar(t);
|
|
2735
|
-
} catch (h) {
|
|
2736
|
-
console.error(h), ar(t);
|
|
2737
|
-
}
|
|
2738
|
-
})();
|
|
2739
|
-
}, [e == null ? void 0 : e.messages]);
|
|
2740
|
-
const f = async (m) => {
|
|
2741
|
-
m.preventDefault(), t({
|
|
2742
|
-
type: ye,
|
|
2743
|
-
payload: {
|
|
2744
|
-
message: {
|
|
2745
|
-
role: et,
|
|
2746
|
-
content: n
|
|
2747
|
-
}
|
|
2748
|
-
}
|
|
2749
|
-
}), o("");
|
|
2750
|
-
};
|
|
2751
|
-
return D(() => {
|
|
2752
|
-
if (r.prompt !== "") {
|
|
2753
|
-
const m = r.prompt.endsWith(":") && !r.prompt.endsWith(": ") ? r.prompt + " " : r.prompt;
|
|
2754
|
-
m.indexOf(Dt) !== -1 ? navigator.clipboard.readText().then((h) => {
|
|
2755
|
-
o(m.replace(Dt, h));
|
|
2756
|
-
}) : o(m), g.current && g.current.focus(), a({
|
|
2757
|
-
type: lr
|
|
2758
|
-
});
|
|
2759
|
-
}
|
|
2760
|
-
}, [r, a]), D(() => {
|
|
2761
|
-
e && e.usage === 0 && e.messages.length === 0 && (o(""), g.current && g.current.focus());
|
|
2762
|
-
}, [e]), D(() => {
|
|
2763
|
-
(e == null ? void 0 : e.streaming) === !1 && g.current && g.current.focus();
|
|
2764
|
-
}, [e]), /* @__PURE__ */ i(Ae, { children: /* @__PURE__ */ i(
|
|
2765
|
-
_o,
|
|
2766
|
-
{
|
|
2767
|
-
label: ea,
|
|
2768
|
-
onSubmit: f,
|
|
2769
|
-
ref: g,
|
|
2770
|
-
value: n,
|
|
2771
|
-
onChange: (m) => o(m.target.value)
|
|
2772
|
-
}
|
|
2773
|
-
) });
|
|
2774
|
-
}, xo = () => {
|
|
2775
|
-
const { state: e } = z(se), t = M(!1), r = window.innerWidth < 403, [a, n] = q(
|
|
2776
|
-
r ? "bottom-4" : "top-[245px]"
|
|
2777
|
-
);
|
|
2778
|
-
return D(() => {
|
|
2779
|
-
r || e && (!t.current && e.streaming && n("bottom-4"), t.current = !!e.streaming);
|
|
2780
|
-
}, [e, r]), D(() => {
|
|
2781
|
-
r || (e && e.messages.length === 0 && n("top-[245px]"), e && !e.streaming && e.messages.length > 0 && n("bottom-4"));
|
|
2782
|
-
}, [e, r]), /* @__PURE__ */ x(
|
|
2783
|
-
"footer",
|
|
2784
|
-
{
|
|
2785
|
-
className: l(
|
|
2786
|
-
"px-2 sm:px-0 md:mx-auto md:max-w-4xl w-full fixed left-1/2 transform -translate-x-1/2",
|
|
2787
|
-
io,
|
|
2788
|
-
a
|
|
2789
|
-
),
|
|
2790
|
-
children: [
|
|
2791
|
-
/* @__PURE__ */ i(Eo, {}),
|
|
2792
|
-
/* @__PURE__ */ i("div", { className: "w-full text-center text-xs text-copy-lighter pt-2", children: ra })
|
|
2793
|
-
]
|
|
2794
|
-
}
|
|
2795
|
-
);
|
|
2796
|
-
}, wo = ({ show: e }) => e ? /* @__PURE__ */ i(
|
|
2797
|
-
"div",
|
|
2798
|
-
{
|
|
2799
|
-
className: l(
|
|
2800
|
-
co,
|
|
2801
|
-
"bottom-44 fixed left-1/2 transform -translate-x-1/2"
|
|
2802
|
-
),
|
|
2803
|
-
children: /* @__PURE__ */ i(
|
|
2804
|
-
"button",
|
|
2805
|
-
{
|
|
2806
|
-
className: "av-button not-prose truncate text-copy-light rounded-full inline-flex items-center justify-center h-8 w-8 p-1 border border-transparent focus:outline focus:outline-2 focus:outline-offset-2 focus:outline-focus-dark dark:focus:outline-focus-light disabled:opacity-50 dark:bg-slate-50 bg-slate-500 disabled:cursor-auto",
|
|
2807
|
-
disabled: !0,
|
|
2808
|
-
type: "button",
|
|
2809
|
-
"aria-label": "Scroll to bottom",
|
|
2810
|
-
children: /* @__PURE__ */ i("div", { className: "text-copy-light", children: /* @__PURE__ */ i(
|
|
2811
|
-
"svg",
|
|
2812
|
-
{
|
|
2813
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2814
|
-
className: "size-4 dark:text-copy-dark text-copy-lighter",
|
|
2815
|
-
viewBox: "0 0 384 512",
|
|
2816
|
-
fill: "currentColor",
|
|
2817
|
-
role: "img",
|
|
2818
|
-
"aria-hidden": "true",
|
|
2819
|
-
focusable: "false",
|
|
2820
|
-
children: /* @__PURE__ */ i("path", { d: "M174.6 472.6c4.5 4.7 10.8 7.4 17.4 7.4s12.8-2.7 17.4-7.4l168-176c9.2-9.6 8.8-24.8-.8-33.9s-24.8-8.8-33.9 .8L216 396.1 216 56c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 340.1L41.4 263.4c-9.2-9.6-24.3-9.9-33.9-.8s-9.9 24.3-.8 33.9l168 176z" })
|
|
2821
|
-
}
|
|
2822
|
-
) })
|
|
2823
|
-
}
|
|
2824
|
-
)
|
|
2825
|
-
}
|
|
2826
|
-
) : null;
|
|
2827
|
-
/*!
|
|
2828
|
-
@versini/ui-bubble v3.1.7
|
|
2829
|
-
© 2025 gizmette.com
|
|
2830
|
-
*/
|
|
2831
|
-
try {
|
|
2832
|
-
window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
|
|
2833
|
-
version: "3.1.7",
|
|
2834
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
2835
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2836
|
-
license: "MIT"
|
|
2837
|
-
});
|
|
2838
|
-
} catch {
|
|
2839
|
-
}
|
|
2840
|
-
const So = "av-bubble", nr = "av-button", Pe = "icon", zr = "button", gt = "link", To = ({
|
|
2841
|
-
type: e,
|
|
2842
|
-
size: t,
|
|
2843
|
-
labelRight: r,
|
|
2844
|
-
labelLeft: a,
|
|
2845
|
-
align: n
|
|
2846
|
-
}) => {
|
|
2847
|
-
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";
|
|
2848
|
-
switch (e) {
|
|
2849
|
-
case zr:
|
|
2850
|
-
case gt:
|
|
2851
|
-
return l({
|
|
2852
|
-
[o]: t === "small",
|
|
2853
|
-
[s]: t === "medium",
|
|
2854
|
-
[c]: t === "large"
|
|
2855
|
-
});
|
|
2856
|
-
case Pe:
|
|
2857
|
-
return l("inline-flex items-center", {
|
|
2858
|
-
"justify-center": n === "center",
|
|
2859
|
-
"justify-start": n === "left",
|
|
2860
|
-
"justify-end": n === "right",
|
|
2861
|
-
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
2862
|
-
"h-6 px-2": t === "small" && (r || a),
|
|
2863
|
-
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
2864
|
-
"h-8 px-3": t === "medium" && (r || a),
|
|
2865
|
-
"h-12 w-12 p-2": t === "large" && !(r || a),
|
|
2866
|
-
"h-12 px-4": t === "large" && (r || a)
|
|
2867
|
-
});
|
|
2868
|
-
}
|
|
2869
|
-
}, No = ({
|
|
2870
|
-
type: e,
|
|
2871
|
-
size: t,
|
|
2872
|
-
labelRight: r,
|
|
2873
|
-
labelLeft: a
|
|
2874
|
-
}) => {
|
|
2875
|
-
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
2876
|
-
switch (e) {
|
|
2877
|
-
case zr:
|
|
2878
|
-
case gt:
|
|
2879
|
-
return l({
|
|
2880
|
-
"text-center": e === gt,
|
|
2881
|
-
[n]: t === "small",
|
|
2882
|
-
[o]: t === "medium",
|
|
2883
|
-
[s]: t === "large"
|
|
2884
|
-
});
|
|
2885
|
-
case Pe:
|
|
2886
|
-
return l({
|
|
2887
|
-
[n]: t === "small" && (r || a),
|
|
2888
|
-
[o]: t === "medium" && (r || a),
|
|
2889
|
-
[s]: t === "large" && (r || a)
|
|
2890
|
-
});
|
|
2891
|
-
}
|
|
2892
|
-
}, Co = ({
|
|
2893
|
-
mode: e,
|
|
2894
|
-
noBackground: t,
|
|
2895
|
-
noTruncate: r,
|
|
2896
|
-
variant: a
|
|
2897
|
-
}) => {
|
|
2898
|
-
if (t)
|
|
2899
|
-
return "not-prose";
|
|
2900
|
-
if (a === "primary")
|
|
2901
|
-
return l("not-prose", {
|
|
2902
|
-
truncate: !r,
|
|
2903
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
2904
|
-
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
2905
|
-
"dark:text-copy-lighter": e === "system",
|
|
2906
|
-
"dark:text-copy-light": e === "alt-system"
|
|
2907
|
-
});
|
|
2908
|
-
if (a === "secondary")
|
|
2909
|
-
return l("not-prose", {
|
|
2910
|
-
truncate: !r,
|
|
2911
|
-
"text-copy-light": e === "light" || e === "system",
|
|
2912
|
-
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
2913
|
-
"dark:text-copy-lighter": e === "alt-system",
|
|
2914
|
-
"dark:text-copy-light": e === "system"
|
|
2915
|
-
});
|
|
2916
|
-
if (a === "danger")
|
|
2917
|
-
return l("not-prose", {
|
|
2918
|
-
truncate: !r,
|
|
2919
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
2920
|
-
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
2921
|
-
"dark:text-copy-lighter": e === "system",
|
|
2922
|
-
"dark:text-copy-light": e === "alt-system"
|
|
2923
|
-
});
|
|
2924
|
-
if (a === "selected")
|
|
2925
|
-
return l("not-prose text-copy-lighter", {
|
|
2926
|
-
truncate: !r
|
|
2927
|
-
});
|
|
2928
|
-
}, Ro = ({
|
|
2929
|
-
mode: e,
|
|
2930
|
-
noBackground: t,
|
|
2931
|
-
variant: r
|
|
2932
|
-
}) => {
|
|
2933
|
-
if (!t) {
|
|
2934
|
-
if (r === "primary")
|
|
2935
|
-
return l({
|
|
2936
|
-
"bg-action-dark": e === "dark",
|
|
2937
|
-
"bg-action-light": e === "light",
|
|
2938
|
-
"bg-action-dark dark:bg-action-light": e === "system",
|
|
2939
|
-
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
2940
|
-
});
|
|
2941
|
-
if (r === "secondary")
|
|
2942
|
-
return l({
|
|
2943
|
-
"bg-action-dark": e === "light",
|
|
2944
|
-
"bg-action-light": e === "dark",
|
|
2945
|
-
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
2946
|
-
"bg-action-light dark:bg-action-dark": e === "system"
|
|
2947
|
-
});
|
|
2948
|
-
if (r === "danger")
|
|
2949
|
-
return l({
|
|
2950
|
-
"bg-action-danger-dark": e === "dark",
|
|
2951
|
-
"bg-action-danger-light": e === "light",
|
|
2952
|
-
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
2953
|
-
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
2954
|
-
});
|
|
2955
|
-
if (r === "selected")
|
|
2956
|
-
return "bg-action-selected-dark";
|
|
2957
|
-
}
|
|
2958
|
-
}, Io = ({
|
|
2959
|
-
radius: e
|
|
2960
|
-
}) => l({
|
|
2961
|
-
"rounded-full": e === "large",
|
|
2962
|
-
"rounded-md": e === "medium",
|
|
2963
|
-
"rounded-sm": e === "small"
|
|
2964
|
-
}), Lo = ({
|
|
2965
|
-
mode: e,
|
|
2966
|
-
disabled: t,
|
|
2967
|
-
variant: r
|
|
2968
|
-
}) => {
|
|
2969
|
-
if (t)
|
|
2970
|
-
return "";
|
|
2971
|
-
if (r === "primary")
|
|
2972
|
-
return l("hover:text-copy-light-hover", {
|
|
2973
|
-
"hover:bg-action-dark-hover": e === "dark",
|
|
2974
|
-
"hover:bg-action-light-hover": e === "light",
|
|
2975
|
-
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
2976
|
-
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
2977
|
-
});
|
|
2978
|
-
if (r === "secondary")
|
|
2979
|
-
return l("hover:text-copy-light-hover", {
|
|
2980
|
-
"hover:bg-action-dark-hover": e === "light",
|
|
2981
|
-
"hover:bg-action-light-hover": e === "dark",
|
|
2982
|
-
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
2983
|
-
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
2984
|
-
});
|
|
2985
|
-
if (r === "danger")
|
|
2986
|
-
return l("hover:text-copy-light-hover", {
|
|
2987
|
-
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
2988
|
-
"hover:bg-action-danger-light-hover": e === "light",
|
|
2989
|
-
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
2990
|
-
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
2991
|
-
});
|
|
2992
|
-
if (r === "selected")
|
|
2993
|
-
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
2994
|
-
}, Ao = ({
|
|
2995
|
-
mode: e,
|
|
2996
|
-
disabled: t,
|
|
2997
|
-
variant: r
|
|
2998
|
-
}) => {
|
|
2999
|
-
if (t)
|
|
3000
|
-
return "";
|
|
3001
|
-
if (r === "primary")
|
|
3002
|
-
return l("active:text-copy-light-active", {
|
|
3003
|
-
"active:bg-action-dark-active": e === "dark",
|
|
3004
|
-
"active:bg-action-light-active": e === "light",
|
|
3005
|
-
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
3006
|
-
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
3007
|
-
});
|
|
3008
|
-
if (r === "secondary")
|
|
3009
|
-
return l("active:text-copy-light-active", {
|
|
3010
|
-
"active:bg-action-dark-active": e === "light",
|
|
3011
|
-
"active:bg-action-light-active": e === "dark",
|
|
3012
|
-
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
3013
|
-
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
3014
|
-
});
|
|
3015
|
-
if (r === "danger")
|
|
3016
|
-
return l("active:text-copy-lighter-active", {
|
|
3017
|
-
"active:bg-action-danger-dark-active": e === "dark",
|
|
3018
|
-
"active:bg-action-danger-light-active": e === "light",
|
|
3019
|
-
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
3020
|
-
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
3021
|
-
});
|
|
3022
|
-
if (r === "selected")
|
|
3023
|
-
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
3024
|
-
}, Oo = ({
|
|
3025
|
-
mode: e,
|
|
3026
|
-
noBorder: t,
|
|
3027
|
-
variant: r
|
|
3028
|
-
}) => {
|
|
3029
|
-
if (t)
|
|
3030
|
-
return "border border-transparent";
|
|
3031
|
-
if (r === "primary")
|
|
3032
|
-
return l("border", {
|
|
3033
|
-
"border-border-dark": e === "dark",
|
|
3034
|
-
"border-border-accent": e === "light",
|
|
3035
|
-
"border-border-dark dark:border-border-accent": e === "system",
|
|
3036
|
-
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
3037
|
-
});
|
|
3038
|
-
if (r === "secondary")
|
|
3039
|
-
return l("border", {
|
|
3040
|
-
"border-border-dark": e === "light",
|
|
3041
|
-
"border-border-accent": e === "dark",
|
|
3042
|
-
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
3043
|
-
"border-border-accent dark:border-border-dark": e === "system"
|
|
3044
|
-
});
|
|
3045
|
-
if (r === "danger")
|
|
3046
|
-
return l("border", {
|
|
3047
|
-
"border-border-danger-dark": e === "dark",
|
|
3048
|
-
"border-border-danger-medium": e === "light",
|
|
3049
|
-
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
3050
|
-
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
3051
|
-
});
|
|
3052
|
-
if (r === "selected")
|
|
3053
|
-
return "border border-border-selected-dark";
|
|
3054
|
-
}, Bo = ({
|
|
3055
|
-
focusMode: e
|
|
3056
|
-
}) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
3057
|
-
"focus:outline-focus-dark": e === "dark",
|
|
3058
|
-
"focus:outline-focus-light": e === "light",
|
|
3059
|
-
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3060
|
-
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3061
|
-
}), $r = ({
|
|
3062
|
-
type: e,
|
|
3063
|
-
className: t,
|
|
3064
|
-
raw: r,
|
|
3065
|
-
mode: a,
|
|
3066
|
-
focusMode: n,
|
|
3067
|
-
disabled: o,
|
|
3068
|
-
fullWidth: s,
|
|
3069
|
-
size: c,
|
|
3070
|
-
noBorder: g,
|
|
3071
|
-
labelRight: d,
|
|
3072
|
-
labelLeft: f,
|
|
3073
|
-
noBackground: m,
|
|
3074
|
-
variant: u,
|
|
3075
|
-
noTruncate: h,
|
|
3076
|
-
align: p,
|
|
3077
|
-
radius: y
|
|
3078
|
-
}) => (u || (u = "primary"), r ? l(nr, t) : l(
|
|
3079
|
-
nr,
|
|
3080
|
-
Co({
|
|
3081
|
-
mode: a,
|
|
3082
|
-
variant: u,
|
|
3083
|
-
noBackground: m,
|
|
3084
|
-
noTruncate: h
|
|
3085
|
-
}),
|
|
3086
|
-
Ro({ mode: a, noBackground: m, variant: u }),
|
|
3087
|
-
Io({ radius: y }),
|
|
3088
|
-
To({
|
|
3089
|
-
type: e,
|
|
3090
|
-
size: c,
|
|
3091
|
-
labelRight: d,
|
|
3092
|
-
labelLeft: f,
|
|
3093
|
-
align: p
|
|
3094
|
-
}),
|
|
3095
|
-
No({ type: e, size: c, labelRight: d, labelLeft: f }),
|
|
3096
|
-
Oo({ mode: a, variant: u, noBorder: g }),
|
|
3097
|
-
Bo({ focusMode: n }),
|
|
3098
|
-
Lo({ mode: a, variant: u, disabled: o }),
|
|
3099
|
-
Ao({ mode: a, variant: u, disabled: o }),
|
|
3100
|
-
{
|
|
3101
|
-
"w-full": s,
|
|
3102
|
-
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
3103
|
-
},
|
|
3104
|
-
t
|
|
3105
|
-
)), Mo = (e, t, r) => {
|
|
3106
|
-
var a;
|
|
3107
|
-
!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);
|
|
3108
|
-
}, St = A.forwardRef((e, t) => {
|
|
3109
|
-
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
3110
|
-
return /* @__PURE__ */ i(
|
|
3111
|
-
"button",
|
|
3112
|
-
{
|
|
3113
|
-
ref: t,
|
|
3114
|
-
onClick: (o) => {
|
|
3115
|
-
Mo(o, a, r);
|
|
3116
|
-
},
|
|
3117
|
-
...n
|
|
3118
|
-
}
|
|
3119
|
-
);
|
|
3120
|
-
});
|
|
3121
|
-
St.displayName = "BaseButton";
|
|
3122
|
-
const Dr = A.forwardRef(
|
|
3123
|
-
({
|
|
3124
|
-
children: e,
|
|
3125
|
-
disabled: t = !1,
|
|
3126
|
-
mode: r = "system",
|
|
3127
|
-
focusMode: a = "system",
|
|
3128
|
-
fullWidth: n = !1,
|
|
3129
|
-
className: o,
|
|
3130
|
-
type: s = "button",
|
|
3131
|
-
raw: c = !1,
|
|
3132
|
-
noBorder: g = !1,
|
|
3133
|
-
"aria-label": d,
|
|
3134
|
-
label: f,
|
|
3135
|
-
size: m = "medium",
|
|
3136
|
-
labelRight: u,
|
|
3137
|
-
labelLeft: h,
|
|
3138
|
-
noBackground: p = !1,
|
|
3139
|
-
align: y = "center",
|
|
3140
|
-
radius: v = "large",
|
|
3141
|
-
variant: b = "primary",
|
|
3142
|
-
..._
|
|
3143
|
-
}, w) => {
|
|
3144
|
-
const N = $r({
|
|
3145
|
-
type: Pe,
|
|
3146
|
-
mode: r,
|
|
3147
|
-
focusMode: a,
|
|
3148
|
-
fullWidth: n,
|
|
3149
|
-
disabled: t,
|
|
3150
|
-
raw: c,
|
|
3151
|
-
className: o,
|
|
3152
|
-
noBorder: g,
|
|
3153
|
-
size: m,
|
|
3154
|
-
labelRight: u,
|
|
3155
|
-
labelLeft: h,
|
|
3156
|
-
noBackground: p,
|
|
3157
|
-
align: y,
|
|
3158
|
-
radius: v,
|
|
3159
|
-
variant: b
|
|
3160
|
-
}), k = l({
|
|
3161
|
-
"text-copy-accent-dark": (r === "light" || r === "alt-system") && !c,
|
|
3162
|
-
"text-copy-light": (r === "dark" || r === "system") && !c,
|
|
3163
|
-
"dark:text-copy-light": r === "alt-system" && !c,
|
|
3164
|
-
"dark:text-copy-accent-dark": r === "system" && !c
|
|
3165
|
-
});
|
|
3166
|
-
return /* @__PURE__ */ x(
|
|
3167
|
-
St,
|
|
3168
|
-
{
|
|
3169
|
-
ref: w,
|
|
3170
|
-
className: N,
|
|
3171
|
-
disabled: t,
|
|
3172
|
-
type: s,
|
|
3173
|
-
"aria-label": d || f,
|
|
3174
|
-
..._,
|
|
3175
|
-
children: [
|
|
3176
|
-
h && /* @__PURE__ */ i("span", { className: "pr-2", children: h }),
|
|
3177
|
-
/* @__PURE__ */ i("div", { className: k, children: e }),
|
|
3178
|
-
u && /* @__PURE__ */ i("span", { className: "pl-2", children: u })
|
|
3179
|
-
]
|
|
3180
|
-
}
|
|
3181
|
-
);
|
|
3182
|
-
}
|
|
3183
|
-
);
|
|
3184
|
-
Dr.displayName = "ButtonIcon";
|
|
3185
|
-
/*!
|
|
3186
|
-
@versini/ui-button v4.0.10
|
|
3187
|
-
© 2025 gizmette.com
|
|
3188
|
-
*/
|
|
3189
|
-
try {
|
|
3190
|
-
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
3191
|
-
version: "4.0.10",
|
|
3192
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
3193
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
3194
|
-
license: "MIT"
|
|
3195
|
-
});
|
|
3196
|
-
} catch {
|
|
3197
|
-
}
|
|
3198
|
-
const zo = A.forwardRef(
|
|
3199
|
-
({
|
|
3200
|
-
children: e,
|
|
3201
|
-
disabled: t = !1,
|
|
3202
|
-
mode: r = "system",
|
|
3203
|
-
focusMode: a = "system",
|
|
3204
|
-
fullWidth: n = !1,
|
|
3205
|
-
className: o,
|
|
3206
|
-
type: s = "button",
|
|
3207
|
-
raw: c = !1,
|
|
3208
|
-
noBorder: g = !1,
|
|
3209
|
-
"aria-label": d,
|
|
3210
|
-
label: f,
|
|
3211
|
-
size: m = "medium",
|
|
3212
|
-
labelRight: u,
|
|
3213
|
-
labelLeft: h,
|
|
3214
|
-
noBackground: p = !1,
|
|
3215
|
-
align: y = "center",
|
|
3216
|
-
active: v = !1,
|
|
3217
|
-
radius: b = "large",
|
|
3218
|
-
..._
|
|
3219
|
-
}, w) => {
|
|
3220
|
-
const N = $r({
|
|
3221
|
-
type: Pe,
|
|
3222
|
-
mode: r,
|
|
3223
|
-
focusMode: a,
|
|
3224
|
-
fullWidth: n,
|
|
3225
|
-
disabled: t,
|
|
3226
|
-
raw: c,
|
|
3227
|
-
className: o,
|
|
3228
|
-
noBorder: g,
|
|
3229
|
-
size: m,
|
|
3230
|
-
labelRight: u,
|
|
3231
|
-
labelLeft: h,
|
|
3232
|
-
noBackground: p,
|
|
3233
|
-
align: y,
|
|
3234
|
-
radius: b
|
|
3235
|
-
}), k = l({
|
|
3236
|
-
"text-copy-accent-dark": r === "light" && !c,
|
|
3237
|
-
"text-copy-light": r === "dark" && !c,
|
|
3238
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
|
|
3239
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !c
|
|
3240
|
-
}), C = v ? l(
|
|
3241
|
-
"relative",
|
|
3242
|
-
"focus-within:static",
|
|
3243
|
-
"focus-within:after:border-transparent",
|
|
3244
|
-
"after:absolute",
|
|
3245
|
-
"after:content-['']",
|
|
3246
|
-
"after:border-b-2",
|
|
3247
|
-
"after:bottom-[-4px]",
|
|
3248
|
-
"after:left-0",
|
|
3249
|
-
"after:right-0",
|
|
3250
|
-
{
|
|
3251
|
-
"after:border-table-dark": r === "dark",
|
|
3252
|
-
"after:border-table-light": r === "light",
|
|
3253
|
-
"after:border-table-dark dark:after:border-table-light": r === "system",
|
|
3254
|
-
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
3255
|
-
}
|
|
3256
|
-
) : "";
|
|
3257
|
-
return /* @__PURE__ */ i("div", { className: C, children: /* @__PURE__ */ x(
|
|
3258
|
-
St,
|
|
3259
|
-
{
|
|
3260
|
-
ref: w,
|
|
3261
|
-
className: N,
|
|
3262
|
-
disabled: t,
|
|
3263
|
-
type: s,
|
|
3264
|
-
"aria-label": d || f,
|
|
3265
|
-
..._,
|
|
3266
|
-
children: [
|
|
3267
|
-
h && /* @__PURE__ */ i("span", { className: "pr-2", children: h }),
|
|
3268
|
-
/* @__PURE__ */ i("div", { className: k, children: e }),
|
|
3269
|
-
u && /* @__PURE__ */ i("span", { className: "pl-2", children: u })
|
|
3270
|
-
]
|
|
3271
|
-
}
|
|
3272
|
-
) });
|
|
3273
|
-
}
|
|
3274
|
-
);
|
|
3275
|
-
zo.displayName = "ButtonSort";
|
|
3276
|
-
const Vr = ({
|
|
3277
|
-
children: e,
|
|
3278
|
-
fill: t,
|
|
3279
|
-
viewBox: r,
|
|
3280
|
-
className: a,
|
|
3281
|
-
defaultViewBox: n,
|
|
3282
|
-
size: o,
|
|
3283
|
-
title: s,
|
|
3284
|
-
semantic: c = !1,
|
|
3285
|
-
...g
|
|
3286
|
-
}) => {
|
|
3287
|
-
const d = l(o, a);
|
|
3288
|
-
return /* @__PURE__ */ x(Ae, { children: [
|
|
3289
|
-
/* @__PURE__ */ i(
|
|
3290
|
-
"svg",
|
|
3291
|
-
{
|
|
3292
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3293
|
-
className: d,
|
|
3294
|
-
viewBox: r || n,
|
|
3295
|
-
fill: t || "currentColor",
|
|
3296
|
-
role: "img",
|
|
3297
|
-
"aria-hidden": !c,
|
|
3298
|
-
focusable: !1,
|
|
3299
|
-
...g,
|
|
3300
|
-
children: e
|
|
3301
|
-
}
|
|
3302
|
-
),
|
|
3303
|
-
s && c && /* @__PURE__ */ i("span", { className: "sr-only", children: s })
|
|
3304
|
-
] });
|
|
3305
|
-
};
|
|
3306
|
-
/*!
|
|
3307
|
-
@versini/ui-svgicon v4.0.3
|
|
3308
|
-
© 2025 gizmette.com
|
|
3309
|
-
*/
|
|
3310
|
-
try {
|
|
3311
|
-
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
3312
|
-
version: "4.0.3",
|
|
3313
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
3314
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
3315
|
-
license: "MIT"
|
|
3316
|
-
});
|
|
3317
|
-
} catch {
|
|
3318
|
-
}
|
|
3319
|
-
const $o = ({
|
|
3320
|
-
className: e,
|
|
3321
|
-
viewBox: t,
|
|
3322
|
-
title: r,
|
|
3323
|
-
monotone: a,
|
|
3324
|
-
...n
|
|
3325
|
-
}) => /* @__PURE__ */ x(
|
|
3326
|
-
Vr,
|
|
3327
|
-
{
|
|
3328
|
-
defaultViewBox: "0 0 448 512",
|
|
3329
|
-
size: "size-5",
|
|
3330
|
-
viewBox: t,
|
|
3331
|
-
className: e,
|
|
3332
|
-
title: r || "Copied",
|
|
3333
|
-
...n,
|
|
3334
|
-
children: [
|
|
3335
|
-
/* @__PURE__ */ i(
|
|
3336
|
-
"path",
|
|
3337
|
-
{
|
|
3338
|
-
className: "fa-secondary",
|
|
3339
|
-
opacity: "0.4",
|
|
3340
|
-
d: "M0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96zM104 256c0-6.1 2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l47 47c37-37 74-74 111-111c4.7-4.7 10.8-7 17-7s12.3 2.3 17 7c2.3 2.3 4.1 5 5.3 7.9c.6 1.5 1 2.9 1.3 4.4c.2 1.1 .3 2.2 .3 2.2c.1 1.2 .1 1.2 .1 2.5c-.1 1.5-.1 1.9-.1 2.3c-.1 .7-.2 1.5-.3 2.2c-.3 1.5-.7 3-1.3 4.4c-1.2 2.9-2.9 5.6-5.3 7.9c-42.7 42.7-85.3 85.3-128 128c-4.7 4.7-10.8 7-17 7s-12.3-2.3-17-7c-21.3-21.3-42.7-42.7-64-64c-4.7-4.7-7-10.8-7-17z"
|
|
3341
|
-
}
|
|
3342
|
-
),
|
|
3343
|
-
/* @__PURE__ */ i(
|
|
3344
|
-
"path",
|
|
3345
|
-
{
|
|
3346
|
-
className: "fa-primary",
|
|
3347
|
-
d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z"
|
|
3348
|
-
}
|
|
3349
|
-
)
|
|
3350
|
-
]
|
|
3351
|
-
}
|
|
3352
|
-
), Do = ({
|
|
3353
|
-
className: e,
|
|
3354
|
-
viewBox: t,
|
|
3355
|
-
title: r,
|
|
3356
|
-
monotone: a,
|
|
3357
|
-
...n
|
|
3358
|
-
}) => /* @__PURE__ */ i(
|
|
3359
|
-
Vr,
|
|
3360
|
-
{
|
|
3361
|
-
defaultViewBox: "0 0 512 512",
|
|
3362
|
-
size: "size-5",
|
|
3363
|
-
viewBox: t,
|
|
3364
|
-
className: e,
|
|
3365
|
-
title: r || "Copy",
|
|
3366
|
-
...n,
|
|
3367
|
-
children: /* @__PURE__ */ i("path", { d: "M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z" })
|
|
3368
|
-
}
|
|
3369
|
-
);
|
|
3370
|
-
/*!
|
|
3371
|
-
@versini/ui-icons v4.4.2
|
|
3372
|
-
© 2025 gizmette.com
|
|
3373
|
-
*/
|
|
3374
|
-
try {
|
|
3375
|
-
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
3376
|
-
version: "4.4.2",
|
|
3377
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
3378
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
3379
|
-
license: "MIT"
|
|
3380
|
-
});
|
|
3381
|
-
} catch {
|
|
3382
|
-
}
|
|
3383
|
-
const Vo = ({
|
|
3384
|
-
kind: e,
|
|
3385
|
-
noMaxWidth: t
|
|
3386
|
-
}) => l("p-4", {
|
|
3387
|
-
"max-w-xs sm:max-w-md md:max-w-2xl": !t,
|
|
3388
|
-
"lg:max-w-3xl": e === "left" && !t
|
|
3389
|
-
}), Po = ({ kind: e }) => l({
|
|
3390
|
-
"bg-surface-lighter dark:bg-surface-dark": e === "left",
|
|
3391
|
-
"bg-surface-accent": e === "right"
|
|
3392
|
-
}), Uo = ({ kind: e }) => l(
|
|
3393
|
-
"prose prose-dark dark:prose-lighter prose-p:my-3 prose-blockquote:my-3 prose-ol:my-3 prose-ul:my-3 prose-ul:prose-li:marker:text-black",
|
|
3394
|
-
{
|
|
3395
|
-
"text-copy-lighter": e === "right"
|
|
3396
|
-
}
|
|
3397
|
-
), Fo = ({ kind: e }) => l("rounded-b-xl", {
|
|
3398
|
-
"rounded-tr-xl": e === "left",
|
|
3399
|
-
"rounded-tl-xl": e === "right"
|
|
3400
|
-
}), Ho = ({
|
|
3401
|
-
kind: e,
|
|
3402
|
-
className: t,
|
|
3403
|
-
noMaxWidth: r
|
|
3404
|
-
}) => {
|
|
3405
|
-
const a = l(
|
|
3406
|
-
So,
|
|
3407
|
-
"flex items-start",
|
|
3408
|
-
{
|
|
3409
|
-
"flex-row-reverse": e === "right"
|
|
3410
|
-
},
|
|
3411
|
-
t
|
|
3412
|
-
), n = l(
|
|
3413
|
-
"flex flex-col empty:hidden",
|
|
3414
|
-
Vo({ kind: e, noMaxWidth: r }),
|
|
3415
|
-
Uo({ kind: e }),
|
|
3416
|
-
Po({ kind: e }),
|
|
3417
|
-
Fo({ kind: e })
|
|
3418
|
-
), o = "pr-2 pt-1 text-end text-xs text-copy-light", s = l("flex flex-col-reverse gap-2 sm:flex-row", {
|
|
3419
|
-
"ml-2": e === "left",
|
|
3420
|
-
"mr-2": e === "right"
|
|
3421
|
-
});
|
|
3422
|
-
return {
|
|
3423
|
-
wrapper: a,
|
|
3424
|
-
main: n,
|
|
3425
|
-
footer: o,
|
|
3426
|
-
copyButton: s
|
|
3427
|
-
};
|
|
3428
|
-
}, Wo = ({
|
|
3429
|
-
children: e,
|
|
3430
|
-
kind: t = "left",
|
|
3431
|
-
className: r,
|
|
3432
|
-
footer: a,
|
|
3433
|
-
rawFooter: n,
|
|
3434
|
-
copyToClipboard: o,
|
|
3435
|
-
copyToClipboardFocusMode: s = "system",
|
|
3436
|
-
copyToClipboardMode: c = "system",
|
|
3437
|
-
noMaxWidth: g = !1
|
|
3438
|
-
}) => {
|
|
3439
|
-
const [d, f] = q(!1), m = Ho({ kind: t, className: r, noMaxWidth: g }), u = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), h = () => {
|
|
3440
|
-
f(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
3441
|
-
};
|
|
3442
|
-
return D(() => {
|
|
3443
|
-
let p;
|
|
3444
|
-
return d && (p = window.setTimeout(() => {
|
|
3445
|
-
f(!1);
|
|
3446
|
-
}, 3e3)), () => {
|
|
3447
|
-
clearTimeout(p);
|
|
3448
|
-
};
|
|
3449
|
-
}, [d]), /* @__PURE__ */ x("div", { className: m.wrapper, children: [
|
|
3450
|
-
/* @__PURE__ */ x("div", { children: [
|
|
3451
|
-
/* @__PURE__ */ i("div", { className: m.main, children: e }),
|
|
3452
|
-
a && Object.keys(a).map((p) => a[p] ? /* @__PURE__ */ i("div", { className: "prose-p:m-0", children: /* @__PURE__ */ x("p", { className: m.footer, children: [
|
|
3453
|
-
p,
|
|
3454
|
-
": ",
|
|
3455
|
-
a[p]
|
|
3456
|
-
] }) }, `-${p}`) : null),
|
|
3457
|
-
n && n
|
|
3458
|
-
] }),
|
|
3459
|
-
u && /* @__PURE__ */ i("div", { className: m.copyButton, children: /* @__PURE__ */ i(
|
|
3460
|
-
Dr,
|
|
3461
|
-
{
|
|
3462
|
-
noBorder: !0,
|
|
3463
|
-
noBackground: !0,
|
|
3464
|
-
size: "small",
|
|
3465
|
-
mode: c,
|
|
3466
|
-
focusMode: s,
|
|
3467
|
-
label: d ? "Copied to clipboard" : "Copy to clipboard",
|
|
3468
|
-
onClick: h,
|
|
3469
|
-
disabled: d,
|
|
3470
|
-
children: d ? /* @__PURE__ */ i($o, { size: "size-3" }) : /* @__PURE__ */ i(Do, { size: "size-3" })
|
|
3471
|
-
}
|
|
3472
|
-
) })
|
|
3473
|
-
] });
|
|
3474
|
-
}, or = "av-button", Tt = "icon", Nt = "button", ht = "link", Go = ({
|
|
3475
|
-
type: e,
|
|
3476
|
-
size: t,
|
|
3477
|
-
labelRight: r,
|
|
3478
|
-
labelLeft: a,
|
|
3479
|
-
align: n
|
|
3480
|
-
}) => {
|
|
3481
|
-
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";
|
|
3482
|
-
switch (e) {
|
|
3483
|
-
case Nt:
|
|
3484
|
-
case ht:
|
|
3485
|
-
return l({
|
|
3486
|
-
[o]: t === "small",
|
|
3487
|
-
[s]: t === "medium",
|
|
3488
|
-
[c]: t === "large"
|
|
3489
|
-
});
|
|
3490
|
-
case Tt:
|
|
3491
|
-
return l("inline-flex items-center", {
|
|
3492
|
-
"justify-center": n === "center",
|
|
3493
|
-
"justify-start": n === "left",
|
|
3494
|
-
"justify-end": n === "right",
|
|
3495
|
-
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
3496
|
-
"h-6 px-2": t === "small" && (r || a),
|
|
3497
|
-
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
3498
|
-
"h-8 px-3": t === "medium" && (r || a),
|
|
3499
|
-
"h-12 w-12 p-2": t === "large" && !(r || a),
|
|
3500
|
-
"h-12 px-4": t === "large" && (r || a)
|
|
3501
|
-
});
|
|
3502
|
-
}
|
|
3503
|
-
}, jo = ({
|
|
3504
|
-
type: e,
|
|
3505
|
-
size: t,
|
|
3506
|
-
labelRight: r,
|
|
3507
|
-
labelLeft: a
|
|
3508
|
-
}) => {
|
|
3509
|
-
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
3510
|
-
switch (e) {
|
|
3511
|
-
case Nt:
|
|
3512
|
-
case ht:
|
|
3513
|
-
return l({
|
|
3514
|
-
"text-center": e === ht,
|
|
3515
|
-
[n]: t === "small",
|
|
3516
|
-
[o]: t === "medium",
|
|
3517
|
-
[s]: t === "large"
|
|
3518
|
-
});
|
|
3519
|
-
case Tt:
|
|
3520
|
-
return l({
|
|
3521
|
-
[n]: t === "small" && (r || a),
|
|
3522
|
-
[o]: t === "medium" && (r || a),
|
|
3523
|
-
[s]: t === "large" && (r || a)
|
|
3524
|
-
});
|
|
3525
|
-
}
|
|
3526
|
-
}, qo = ({
|
|
3527
|
-
mode: e,
|
|
3528
|
-
noBackground: t,
|
|
3529
|
-
noTruncate: r,
|
|
3530
|
-
variant: a
|
|
3531
|
-
}) => {
|
|
3532
|
-
if (t)
|
|
3533
|
-
return "not-prose";
|
|
3534
|
-
if (a === "primary")
|
|
3535
|
-
return l("not-prose", {
|
|
3536
|
-
truncate: !r,
|
|
3537
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
3538
|
-
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
3539
|
-
"dark:text-copy-lighter": e === "system",
|
|
3540
|
-
"dark:text-copy-light": e === "alt-system"
|
|
3541
|
-
});
|
|
3542
|
-
if (a === "secondary")
|
|
3543
|
-
return l("not-prose", {
|
|
3544
|
-
truncate: !r,
|
|
3545
|
-
"text-copy-light": e === "light" || e === "system",
|
|
3546
|
-
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
3547
|
-
"dark:text-copy-lighter": e === "alt-system",
|
|
3548
|
-
"dark:text-copy-light": e === "system"
|
|
3549
|
-
});
|
|
3550
|
-
if (a === "danger")
|
|
3551
|
-
return l("not-prose", {
|
|
3552
|
-
truncate: !r,
|
|
3553
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
3554
|
-
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
3555
|
-
"dark:text-copy-lighter": e === "system",
|
|
3556
|
-
"dark:text-copy-light": e === "alt-system"
|
|
3557
|
-
});
|
|
3558
|
-
if (a === "selected")
|
|
3559
|
-
return l("not-prose text-copy-lighter", {
|
|
3560
|
-
truncate: !r
|
|
3561
|
-
});
|
|
3562
|
-
}, Ko = ({
|
|
3563
|
-
mode: e,
|
|
3564
|
-
noBackground: t,
|
|
3565
|
-
variant: r
|
|
3566
|
-
}) => {
|
|
3567
|
-
if (!t) {
|
|
3568
|
-
if (r === "primary")
|
|
3569
|
-
return l({
|
|
3570
|
-
"bg-action-dark": e === "dark",
|
|
3571
|
-
"bg-action-light": e === "light",
|
|
3572
|
-
"bg-action-dark dark:bg-action-light": e === "system",
|
|
3573
|
-
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
3574
|
-
});
|
|
3575
|
-
if (r === "secondary")
|
|
3576
|
-
return l({
|
|
3577
|
-
"bg-action-dark": e === "light",
|
|
3578
|
-
"bg-action-light": e === "dark",
|
|
3579
|
-
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
3580
|
-
"bg-action-light dark:bg-action-dark": e === "system"
|
|
3581
|
-
});
|
|
3582
|
-
if (r === "danger")
|
|
3583
|
-
return l({
|
|
3584
|
-
"bg-action-danger-dark": e === "dark",
|
|
3585
|
-
"bg-action-danger-light": e === "light",
|
|
3586
|
-
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
3587
|
-
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
3588
|
-
});
|
|
3589
|
-
if (r === "selected")
|
|
3590
|
-
return "bg-action-selected-dark";
|
|
3591
|
-
}
|
|
3592
|
-
}, Jo = ({
|
|
3593
|
-
radius: e
|
|
3594
|
-
}) => l({
|
|
3595
|
-
"rounded-full": e === "large",
|
|
3596
|
-
"rounded-md": e === "medium",
|
|
3597
|
-
"rounded-sm": e === "small"
|
|
3598
|
-
}), Yo = ({
|
|
3599
|
-
mode: e,
|
|
3600
|
-
disabled: t,
|
|
3601
|
-
variant: r
|
|
3602
|
-
}) => {
|
|
3603
|
-
if (t)
|
|
3604
|
-
return "";
|
|
3605
|
-
if (r === "primary")
|
|
3606
|
-
return l("hover:text-copy-light-hover", {
|
|
3607
|
-
"hover:bg-action-dark-hover": e === "dark",
|
|
3608
|
-
"hover:bg-action-light-hover": e === "light",
|
|
3609
|
-
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
3610
|
-
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
3611
|
-
});
|
|
3612
|
-
if (r === "secondary")
|
|
3613
|
-
return l("hover:text-copy-light-hover", {
|
|
3614
|
-
"hover:bg-action-dark-hover": e === "light",
|
|
3615
|
-
"hover:bg-action-light-hover": e === "dark",
|
|
3616
|
-
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
3617
|
-
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
3618
|
-
});
|
|
3619
|
-
if (r === "danger")
|
|
3620
|
-
return l("hover:text-copy-light-hover", {
|
|
3621
|
-
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
3622
|
-
"hover:bg-action-danger-light-hover": e === "light",
|
|
3623
|
-
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
3624
|
-
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
3625
|
-
});
|
|
3626
|
-
if (r === "selected")
|
|
3627
|
-
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
3628
|
-
}, Zo = ({
|
|
3629
|
-
mode: e,
|
|
3630
|
-
disabled: t,
|
|
3631
|
-
variant: r
|
|
3632
|
-
}) => {
|
|
3633
|
-
if (t)
|
|
3634
|
-
return "";
|
|
3635
|
-
if (r === "primary")
|
|
3636
|
-
return l("active:text-copy-light-active", {
|
|
3637
|
-
"active:bg-action-dark-active": e === "dark",
|
|
3638
|
-
"active:bg-action-light-active": e === "light",
|
|
3639
|
-
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
3640
|
-
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
3641
|
-
});
|
|
3642
|
-
if (r === "secondary")
|
|
3643
|
-
return l("active:text-copy-light-active", {
|
|
3644
|
-
"active:bg-action-dark-active": e === "light",
|
|
3645
|
-
"active:bg-action-light-active": e === "dark",
|
|
3646
|
-
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
3647
|
-
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
3648
|
-
});
|
|
3649
|
-
if (r === "danger")
|
|
3650
|
-
return l("active:text-copy-lighter-active", {
|
|
3651
|
-
"active:bg-action-danger-dark-active": e === "dark",
|
|
3652
|
-
"active:bg-action-danger-light-active": e === "light",
|
|
3653
|
-
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
3654
|
-
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
3655
|
-
});
|
|
3656
|
-
if (r === "selected")
|
|
3657
|
-
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
3658
|
-
}, Xo = ({
|
|
3659
|
-
mode: e,
|
|
3660
|
-
noBorder: t,
|
|
3661
|
-
variant: r
|
|
3662
|
-
}) => {
|
|
3663
|
-
if (t)
|
|
3664
|
-
return "border border-transparent";
|
|
3665
|
-
if (r === "primary")
|
|
3666
|
-
return l("border", {
|
|
3667
|
-
"border-border-dark": e === "dark",
|
|
3668
|
-
"border-border-accent": e === "light",
|
|
3669
|
-
"border-border-dark dark:border-border-accent": e === "system",
|
|
3670
|
-
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
3671
|
-
});
|
|
3672
|
-
if (r === "secondary")
|
|
3673
|
-
return l("border", {
|
|
3674
|
-
"border-border-dark": e === "light",
|
|
3675
|
-
"border-border-accent": e === "dark",
|
|
3676
|
-
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
3677
|
-
"border-border-accent dark:border-border-dark": e === "system"
|
|
3678
|
-
});
|
|
3679
|
-
if (r === "danger")
|
|
3680
|
-
return l("border", {
|
|
3681
|
-
"border-border-danger-dark": e === "dark",
|
|
3682
|
-
"border-border-danger-medium": e === "light",
|
|
3683
|
-
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
3684
|
-
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
3685
|
-
});
|
|
3686
|
-
if (r === "selected")
|
|
3687
|
-
return "border border-border-selected-dark";
|
|
3688
|
-
}, Qo = ({
|
|
3689
|
-
focusMode: e
|
|
3690
|
-
}) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
3691
|
-
"focus:outline-focus-dark": e === "dark",
|
|
3692
|
-
"focus:outline-focus-light": e === "light",
|
|
3693
|
-
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3694
|
-
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3695
|
-
}), Pr = ({
|
|
3696
|
-
type: e,
|
|
3697
|
-
className: t,
|
|
3698
|
-
raw: r,
|
|
3699
|
-
mode: a,
|
|
3700
|
-
focusMode: n,
|
|
3701
|
-
disabled: o,
|
|
3702
|
-
fullWidth: s,
|
|
3703
|
-
size: c,
|
|
3704
|
-
noBorder: g,
|
|
3705
|
-
labelRight: d,
|
|
3706
|
-
labelLeft: f,
|
|
3707
|
-
noBackground: m,
|
|
3708
|
-
variant: u,
|
|
3709
|
-
noTruncate: h,
|
|
3710
|
-
align: p,
|
|
3711
|
-
radius: y
|
|
3712
|
-
}) => (u || (u = "primary"), r ? l(or, t) : l(
|
|
3713
|
-
or,
|
|
3714
|
-
qo({
|
|
3715
|
-
mode: a,
|
|
3716
|
-
variant: u,
|
|
3717
|
-
noBackground: m,
|
|
3718
|
-
noTruncate: h
|
|
3719
|
-
}),
|
|
3720
|
-
Ko({ mode: a, noBackground: m, variant: u }),
|
|
3721
|
-
Jo({ radius: y }),
|
|
3722
|
-
Go({
|
|
3723
|
-
type: e,
|
|
3724
|
-
size: c,
|
|
3725
|
-
labelRight: d,
|
|
3726
|
-
labelLeft: f,
|
|
3727
|
-
align: p
|
|
3728
|
-
}),
|
|
3729
|
-
jo({ type: e, size: c, labelRight: d, labelLeft: f }),
|
|
3730
|
-
Xo({ mode: a, variant: u, noBorder: g }),
|
|
3731
|
-
Qo({ focusMode: n }),
|
|
3732
|
-
Yo({ mode: a, variant: u, disabled: o }),
|
|
3733
|
-
Zo({ mode: a, variant: u, disabled: o }),
|
|
3734
|
-
{
|
|
3735
|
-
"w-full": s,
|
|
3736
|
-
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
3737
|
-
},
|
|
3738
|
-
t
|
|
3739
|
-
)), es = (e, t, r) => {
|
|
3740
|
-
var a;
|
|
3741
|
-
!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);
|
|
3742
|
-
}, Ct = A.forwardRef((e, t) => {
|
|
3743
|
-
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
3744
|
-
return /* @__PURE__ */ i(
|
|
3745
|
-
"button",
|
|
3746
|
-
{
|
|
3747
|
-
ref: t,
|
|
3748
|
-
onClick: (o) => {
|
|
3749
|
-
es(o, a, r);
|
|
3750
|
-
},
|
|
3751
|
-
...n
|
|
3752
|
-
}
|
|
3753
|
-
);
|
|
3754
|
-
});
|
|
3755
|
-
Ct.displayName = "BaseButton";
|
|
3756
|
-
const Ur = A.forwardRef(
|
|
3757
|
-
({
|
|
3758
|
-
children: e,
|
|
3759
|
-
disabled: t = !1,
|
|
3760
|
-
mode: r = "system",
|
|
3761
|
-
focusMode: a = "system",
|
|
3762
|
-
fullWidth: n = !1,
|
|
3763
|
-
className: o,
|
|
3764
|
-
size: s = "medium",
|
|
3765
|
-
raw: c = !1,
|
|
3766
|
-
noBorder: g = !1,
|
|
3767
|
-
variant: d = "primary",
|
|
3768
|
-
noTruncate: f = !1,
|
|
3769
|
-
radius: m = "large",
|
|
3770
|
-
...u
|
|
3771
|
-
}, h) => {
|
|
3772
|
-
const p = Pr({
|
|
3773
|
-
type: Nt,
|
|
3774
|
-
mode: r,
|
|
3775
|
-
focusMode: a,
|
|
3776
|
-
fullWidth: n,
|
|
3777
|
-
disabled: t,
|
|
3778
|
-
raw: c,
|
|
3779
|
-
className: o,
|
|
3780
|
-
size: s,
|
|
3781
|
-
noBorder: g,
|
|
3782
|
-
variant: d,
|
|
3783
|
-
noTruncate: f,
|
|
3784
|
-
radius: m
|
|
3785
|
-
});
|
|
3786
|
-
return /* @__PURE__ */ i(
|
|
3787
|
-
Ct,
|
|
3788
|
-
{
|
|
3789
|
-
ref: h,
|
|
3790
|
-
className: p,
|
|
3791
|
-
disabled: t,
|
|
3792
|
-
...u,
|
|
3793
|
-
children: e
|
|
3794
|
-
}
|
|
3795
|
-
);
|
|
3796
|
-
}
|
|
3797
|
-
);
|
|
3798
|
-
Ur.displayName = "Button";
|
|
3799
|
-
/*!
|
|
3800
|
-
@versini/ui-button v4.0.10
|
|
3801
|
-
© 2025 gizmette.com
|
|
3802
|
-
*/
|
|
3803
|
-
try {
|
|
3804
|
-
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
3805
|
-
version: "4.0.10",
|
|
3806
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
3807
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
3808
|
-
license: "MIT"
|
|
3809
|
-
});
|
|
3810
|
-
} catch {
|
|
3811
|
-
}
|
|
3812
|
-
const ts = A.forwardRef(
|
|
3813
|
-
({
|
|
3814
|
-
children: e,
|
|
3815
|
-
disabled: t = !1,
|
|
3816
|
-
mode: r = "system",
|
|
3817
|
-
focusMode: a = "system",
|
|
3818
|
-
fullWidth: n = !1,
|
|
3819
|
-
className: o,
|
|
3820
|
-
type: s = "button",
|
|
3821
|
-
raw: c = !1,
|
|
3822
|
-
noBorder: g = !1,
|
|
3823
|
-
"aria-label": d,
|
|
3824
|
-
label: f,
|
|
3825
|
-
size: m = "medium",
|
|
3826
|
-
labelRight: u,
|
|
3827
|
-
labelLeft: h,
|
|
3828
|
-
noBackground: p = !1,
|
|
3829
|
-
align: y = "center",
|
|
3830
|
-
active: v = !1,
|
|
3831
|
-
radius: b = "large",
|
|
3832
|
-
..._
|
|
3833
|
-
}, w) => {
|
|
3834
|
-
const N = Pr({
|
|
3835
|
-
type: Tt,
|
|
3836
|
-
mode: r,
|
|
3837
|
-
focusMode: a,
|
|
3838
|
-
fullWidth: n,
|
|
3839
|
-
disabled: t,
|
|
3840
|
-
raw: c,
|
|
3841
|
-
className: o,
|
|
3842
|
-
noBorder: g,
|
|
3843
|
-
size: m,
|
|
3844
|
-
labelRight: u,
|
|
3845
|
-
labelLeft: h,
|
|
3846
|
-
noBackground: p,
|
|
3847
|
-
align: y,
|
|
3848
|
-
radius: b
|
|
3849
|
-
}), k = l({
|
|
3850
|
-
"text-copy-accent-dark": r === "light" && !c,
|
|
3851
|
-
"text-copy-light": r === "dark" && !c,
|
|
3852
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
|
|
3853
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !c
|
|
3854
|
-
}), C = v ? l(
|
|
3855
|
-
"relative",
|
|
3856
|
-
"focus-within:static",
|
|
3857
|
-
"focus-within:after:border-transparent",
|
|
3858
|
-
"after:absolute",
|
|
3859
|
-
"after:content-['']",
|
|
3860
|
-
"after:border-b-2",
|
|
3861
|
-
"after:bottom-[-4px]",
|
|
3862
|
-
"after:left-0",
|
|
3863
|
-
"after:right-0",
|
|
3864
|
-
{
|
|
3865
|
-
"after:border-table-dark": r === "dark",
|
|
3866
|
-
"after:border-table-light": r === "light",
|
|
3867
|
-
"after:border-table-dark dark:after:border-table-light": r === "system",
|
|
3868
|
-
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
3869
|
-
}
|
|
3870
|
-
) : "";
|
|
3871
|
-
return /* @__PURE__ */ i("div", { className: C, children: /* @__PURE__ */ x(
|
|
3872
|
-
Ct,
|
|
3873
|
-
{
|
|
3874
|
-
ref: w,
|
|
3875
|
-
className: N,
|
|
3876
|
-
disabled: t,
|
|
3877
|
-
type: s,
|
|
3878
|
-
"aria-label": d || f,
|
|
3879
|
-
..._,
|
|
3880
|
-
children: [
|
|
3881
|
-
h && /* @__PURE__ */ i("span", { className: "pr-2", children: h }),
|
|
3882
|
-
/* @__PURE__ */ i("div", { className: k, children: e }),
|
|
3883
|
-
u && /* @__PURE__ */ i("span", { className: "pl-2", children: u })
|
|
3884
|
-
]
|
|
3885
|
-
}
|
|
3886
|
-
) });
|
|
3887
|
-
}
|
|
3888
|
-
);
|
|
3889
|
-
ts.displayName = "ButtonSort";
|
|
3890
|
-
const rs = 200, as = ({
|
|
3891
|
-
string: e,
|
|
3892
|
-
idealLength: t = rs
|
|
3893
|
-
}) => {
|
|
3894
|
-
if (e.length <= t)
|
|
3895
|
-
return { string: e, isTruncated: !1 };
|
|
3896
|
-
if (e.charAt(t) === " ")
|
|
3897
|
-
return { string: e.slice(0, t), isTruncated: !0 };
|
|
3898
|
-
const r = e.slice(t).search(" ");
|
|
3899
|
-
return {
|
|
3900
|
-
string: e.slice(0, t + r),
|
|
3901
|
-
isTruncated: !0
|
|
3902
|
-
};
|
|
3903
|
-
}, ns = ({
|
|
3904
|
-
children: e,
|
|
3905
|
-
length: t = 200,
|
|
3906
|
-
mode: r = "system",
|
|
3907
|
-
focusMode: a = "system"
|
|
3908
|
-
}) => {
|
|
3909
|
-
const [n, o] = q(!1);
|
|
3910
|
-
if (typeof e != "string")
|
|
3911
|
-
return e;
|
|
3912
|
-
const { string: s, isTruncated: c } = as({
|
|
3913
|
-
string: e,
|
|
3914
|
-
idealLength: t
|
|
3915
|
-
});
|
|
3916
|
-
return /* @__PURE__ */ x("span", { style: { wordBreak: "break-word" }, children: [
|
|
3917
|
-
n ? e : s,
|
|
3918
|
-
c && /* @__PURE__ */ i(
|
|
3919
|
-
Ur,
|
|
3920
|
-
{
|
|
3921
|
-
mode: r,
|
|
3922
|
-
focusMode: a,
|
|
3923
|
-
className: "ml-2",
|
|
3924
|
-
size: "small",
|
|
3925
|
-
onClick: (g) => {
|
|
3926
|
-
g.preventDefault(), o(!n);
|
|
3927
|
-
},
|
|
3928
|
-
children: n ? "less..." : "more..."
|
|
3929
|
-
}
|
|
3930
|
-
)
|
|
3931
|
-
] });
|
|
3932
|
-
};
|
|
3933
|
-
/*!
|
|
3934
|
-
@versini/ui-truncate v3.0.10
|
|
3935
|
-
© 2025 gizmette.com
|
|
3936
|
-
*/
|
|
3937
|
-
try {
|
|
3938
|
-
window.__VERSINI_UI_TRUNCATE__ || (window.__VERSINI_UI_TRUNCATE__ = {
|
|
3939
|
-
version: "3.0.10",
|
|
3940
|
-
buildTime: "01/14/2025 10:39 AM EST",
|
|
3941
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
3942
|
-
license: "MIT"
|
|
3943
|
-
});
|
|
3944
|
-
} catch {
|
|
3945
|
-
}
|
|
3946
|
-
const sr = gr(
|
|
3947
|
-
() => import(
|
|
3948
|
-
/* webpackChunkName: "LazyMessageAssistant" */
|
|
3949
|
-
"./MessageAssistant.C195TBiV.js"
|
|
3950
|
-
).then((e) => e.MessageAssistant)
|
|
3951
|
-
), os = () => {
|
|
3952
|
-
const { state: e } = z(se);
|
|
3953
|
-
return /* @__PURE__ */ x("div", { className: "space-y-6 mt-2 @container", children: [
|
|
3954
|
-
e && e.messages.length > 0 && e.messages.map((t, r) => {
|
|
3955
|
-
const { role: a, content: n, name: o, processingTime: s } = t.message;
|
|
3956
|
-
return (a === ve || a === pt) && n ? /* @__PURE__ */ i(rt, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(sr, { name: o, processingTime: s, children: n }) }, `${r}-${a}`) : a === et && n ? /* @__PURE__ */ i(
|
|
3957
|
-
Wo,
|
|
3958
|
-
{
|
|
3959
|
-
kind: "right",
|
|
3960
|
-
copyToClipboard: n,
|
|
3961
|
-
copyToClipboardFocusMode: "light",
|
|
3962
|
-
children: /* @__PURE__ */ i(ns, { mode: "light", focusMode: "light", children: n })
|
|
3963
|
-
},
|
|
3964
|
-
`${r}-${a}`
|
|
3965
|
-
) : null;
|
|
3966
|
-
}),
|
|
3967
|
-
aa(et, e) && /* @__PURE__ */ i(rt, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(sr, { loading: !0 }) })
|
|
3968
|
-
] });
|
|
3969
|
-
}, ss = () => {
|
|
3970
|
-
const { isAuthenticated: e } = Ee(), { ref: t, inViewport: r } = Ua(), a = na({
|
|
3971
|
-
isAuthenticated: e,
|
|
3972
|
-
extraClass: "rounded-b-md"
|
|
3973
|
-
});
|
|
3974
|
-
return /* @__PURE__ */ x(Ae, { children: [
|
|
3975
|
-
/* @__PURE__ */ x("div", { className: a, children: [
|
|
3976
|
-
/* @__PURE__ */ i(oa, {}),
|
|
3977
|
-
/* @__PURE__ */ i(os, {}),
|
|
3978
|
-
/* @__PURE__ */ i("div", { ref: t })
|
|
3979
|
-
] }),
|
|
3980
|
-
/* @__PURE__ */ i(wo, { show: !r })
|
|
3981
|
-
] });
|
|
3982
|
-
}, is = gr(
|
|
3983
|
-
() => import(
|
|
3984
|
-
/* webpackChunkName: "LazyHeader" */
|
|
3985
|
-
"./HeaderToolbar.Bl593kjm.js"
|
|
3986
|
-
)
|
|
3987
|
-
);
|
|
3988
|
-
function Fr({ isComponent: e = !1 }) {
|
|
3989
|
-
const { user: t, getAccessToken: r } = Ee(), [a] = Gt({
|
|
3990
|
-
key: Pt + ia,
|
|
3991
|
-
initialValue: ""
|
|
3992
|
-
}), [n] = Gt({
|
|
3993
|
-
key: Pt + ca,
|
|
3994
|
-
initialValue: be.ASC
|
|
3995
|
-
}), [o, s] = We(vn, {
|
|
3996
|
-
id: kt(),
|
|
3997
|
-
model: ke,
|
|
3998
|
-
engine: ke,
|
|
3999
|
-
usage: 0,
|
|
4000
|
-
messages: [],
|
|
4001
|
-
prompts: [],
|
|
4002
|
-
isComponent: e
|
|
4003
|
-
}), [c, g] = We(kn, {
|
|
4004
|
-
searchString: a,
|
|
4005
|
-
sortedCell: "timestamp",
|
|
4006
|
-
sortDirection: n
|
|
4007
|
-
}), [d, f] = We(_n, {
|
|
4008
|
-
prompt: "",
|
|
4009
|
-
lastTriggeredTimestamp: 0
|
|
4010
|
-
});
|
|
4011
|
-
return oo({
|
|
4012
|
-
keys: [
|
|
4013
|
-
t == null ? void 0 : t.username,
|
|
4014
|
-
c.searchString,
|
|
4015
|
-
c.sortDirection
|
|
4016
|
-
],
|
|
4017
|
-
getAccessToken: r
|
|
4018
|
-
}), so({ getAccessToken: r }), ao({ keys: [t == null ? void 0 : t.username], getAccessToken: r }), D(() => {
|
|
4019
|
-
var u;
|
|
4020
|
-
(u = document.getElementById("logo")) == null || u.classList.add("fadeOut"), setTimeout(() => {
|
|
4021
|
-
var h;
|
|
4022
|
-
(h = document.getElementById("root")) == null || h.classList.replace("app-hidden", "fadeIn");
|
|
4023
|
-
}, 500);
|
|
4024
|
-
}), /* @__PURE__ */ i(se.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ i(
|
|
4025
|
-
lo.Provider,
|
|
4026
|
-
{
|
|
4027
|
-
value: {
|
|
4028
|
-
state: c,
|
|
4029
|
-
dispatch: g
|
|
4030
|
-
},
|
|
4031
|
-
children: /* @__PURE__ */ x(
|
|
4032
|
-
Ve.Provider,
|
|
4033
|
-
{
|
|
4034
|
-
value: { state: d, dispatch: f },
|
|
4035
|
-
children: [
|
|
4036
|
-
/* @__PURE__ */ i(
|
|
4037
|
-
za,
|
|
4038
|
-
{
|
|
4039
|
-
noColors: !0,
|
|
4040
|
-
noMargin: !0,
|
|
4041
|
-
noPadding: !0,
|
|
4042
|
-
noBorder: !0,
|
|
4043
|
-
className: Vt({
|
|
4044
|
-
extraClass: "mt-5"
|
|
4045
|
-
}),
|
|
4046
|
-
children: /* @__PURE__ */ i(rt, { fallback: /* @__PURE__ */ i("div", {}), children: /* @__PURE__ */ i(is, {}) })
|
|
4047
|
-
}
|
|
4048
|
-
),
|
|
4049
|
-
/* @__PURE__ */ i(
|
|
4050
|
-
sa,
|
|
4051
|
-
{
|
|
4052
|
-
className: Vt({
|
|
4053
|
-
extraClass: "max-h-[calc(100svh_-_250px)]"
|
|
4054
|
-
}),
|
|
4055
|
-
noMargin: !0,
|
|
4056
|
-
noPadding: !0,
|
|
4057
|
-
children: /* @__PURE__ */ i(ss, {})
|
|
4058
|
-
}
|
|
4059
|
-
),
|
|
4060
|
-
/* @__PURE__ */ i(xo, {})
|
|
4061
|
-
]
|
|
4062
|
-
}
|
|
4063
|
-
)
|
|
4064
|
-
}
|
|
4065
|
-
) });
|
|
4066
|
-
}
|
|
4067
|
-
Fr.displayName = "App";
|
|
4068
|
-
const xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Fr }, Symbol.toStringTag, { value: "Module" }));
|
|
4069
|
-
export {
|
|
4070
|
-
xs as App,
|
|
4071
|
-
se as AppContext,
|
|
4072
|
-
Gt as E,
|
|
4073
|
-
lo as HistoryContext,
|
|
4074
|
-
Es as P,
|
|
4075
|
-
Le as R,
|
|
4076
|
-
xe as SERVICE_TYPES,
|
|
4077
|
-
fs as be,
|
|
4078
|
-
be as f,
|
|
4079
|
-
gs as ge,
|
|
4080
|
-
hs as he,
|
|
4081
|
-
ja as i,
|
|
4082
|
-
Ft as i$1,
|
|
4083
|
-
hn as ie,
|
|
4084
|
-
Wo as le,
|
|
4085
|
-
ps as me,
|
|
4086
|
-
wt as me$1,
|
|
4087
|
-
Ut as p,
|
|
4088
|
-
Rr as serviceCall,
|
|
4089
|
-
bs as ue,
|
|
4090
|
-
ks as useChatsHistory,
|
|
4091
|
-
_s as useServerCapabilities,
|
|
4092
|
-
vs as useUserChatStats,
|
|
4093
|
-
Lr as useUserPreferences,
|
|
4094
|
-
ys as ye
|
|
4095
|
-
};
|