@versini/sassysaint 5.3.9 → 5.3.11
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.CiWR0jbo.js → App.CGCFh8d3.js} +423 -401
- package/dist/chunks/{LazyHeader.C3UmEKkw.js → LazyHeader.wkfFXKCZ.js} +539 -563
- package/dist/chunks/{LazyMarkdownWithExtra.CA4l-kCG.js → LazyMarkdownWithExtra.CRVtilPm.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.Bq--JTre.js → LazyMessageAssistant.KzZAMNJh.js} +4 -4
- package/dist/chunks/{index.BiQ5lu6V.js → index.BpfSkOWt.js} +70 -63
- package/dist/chunks/{index.DbhB3Iku.js → index.DkEEvxgQ.js} +255 -224
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,9 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { serviceCall as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as i, jsxs as v, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { g as _e, AppContext as $, TagsContext as j, rn as U, ACTION_SET_TAGS as oe, b as Ne, j as we, R as ne, isLastMessageFromRole as ie, O as Ee, TOOLBOX as Y, ACTION_RESET as se, ACTION_TOGGLE_TAG as de, ROLE_ASSISTANT as I, ROLE_INTERNAL as G, ROLE_USER as H, ROLE_SYSTEM as Ie, ROLE_HIDDEN as Ce, DEFAULT_AI_ENGINE as M, STATS_SEPARATOR as q, ACTION_MODEL as le, ACTION_MESSAGE as S, ACTION_RESET_TAGS as ce, TYPE_QUESTION as Se, SEND as Re, ACTION_STREAMING as ge, ERROR_MESSAGE as Be, getMessageContaintWrapperClass as Ae, MessagesContainerHeader as Me, ACTION_SEARCH as Le, ACTION_SORT as Oe, ACTION_RESTORE as $e, ACTION_ENGINE as ue, HistoryContext as Ue, d as ze, AppFooter as Ve, LOCAL_STORAGE_PREFIX as X, LOCAL_STORAGE_SEARCH as De, LOCAL_STORAGE_SORT as He } from "./index.BpfSkOWt.js";
|
|
3
|
+
import { serviceCall as me, SERVICE_TYPES as he, n as je, restCall as Ge, we as Pe, E as J, f as We } from "./index.DkEEvxgQ.js";
|
|
4
|
+
import C, { useContext as R, useState as A, useRef as B, useEffect as _, lazy as Fe, Suspense as Q, useReducer as V } from "react";
|
|
5
5
|
import l from "clsx";
|
|
6
|
-
|
|
6
|
+
const Ke = ({
|
|
7
|
+
className: e,
|
|
8
|
+
viewBox: t,
|
|
9
|
+
spacing: r,
|
|
10
|
+
title: a,
|
|
11
|
+
monotone: n,
|
|
12
|
+
...o
|
|
13
|
+
}) => /* @__PURE__ */ i(
|
|
14
|
+
_e,
|
|
15
|
+
{
|
|
16
|
+
defaultViewBox: "0 0 384 512",
|
|
17
|
+
defaultClassName: "size-5",
|
|
18
|
+
viewBox: t,
|
|
19
|
+
className: e,
|
|
20
|
+
spacing: r,
|
|
21
|
+
title: a || "Close",
|
|
22
|
+
...o,
|
|
23
|
+
children: /* @__PURE__ */ i("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
function Ye(e) {
|
|
7
27
|
const t = e.toLowerCase().split("+").map((o) => o.trim()), r = {
|
|
8
28
|
alt: t.includes("alt"),
|
|
9
29
|
ctrl: t.includes("ctrl"),
|
|
@@ -16,119 +36,121 @@ function Fe(e) {
|
|
|
16
36
|
key: n
|
|
17
37
|
};
|
|
18
38
|
}
|
|
19
|
-
function
|
|
20
|
-
const { alt: r, ctrl: a, meta: n, mod: o, shift: c, key:
|
|
21
|
-
if (r !==
|
|
39
|
+
function qe(e, t) {
|
|
40
|
+
const { alt: r, ctrl: a, meta: n, mod: o, shift: c, key: d } = e, { altKey: m, ctrlKey: g, metaKey: p, shiftKey: u, key: b } = t;
|
|
41
|
+
if (r !== m)
|
|
22
42
|
return !1;
|
|
23
43
|
if (o) {
|
|
24
|
-
if (!g && !
|
|
44
|
+
if (!g && !p)
|
|
25
45
|
return !1;
|
|
26
|
-
} else if (a !== g || n !==
|
|
46
|
+
} else if (a !== g || n !== p)
|
|
27
47
|
return !1;
|
|
28
|
-
return c !==
|
|
48
|
+
return c !== u ? !1 : !!(d && (b.toLowerCase() === d.toLowerCase() || t.code.replace("Key", "").toLowerCase() === d.toLowerCase()));
|
|
29
49
|
}
|
|
30
|
-
function
|
|
31
|
-
return (t) =>
|
|
50
|
+
function Xe(e) {
|
|
51
|
+
return (t) => qe(Ye(e), t);
|
|
32
52
|
}
|
|
33
|
-
function
|
|
53
|
+
function Je(e) {
|
|
34
54
|
return (t) => {
|
|
35
55
|
const r = "nativeEvent" in t ? t.nativeEvent : t;
|
|
36
56
|
e.forEach(([a, n, o = { preventDefault: !0 }]) => {
|
|
37
|
-
|
|
57
|
+
Xe(a)(r) && (o.preventDefault && t.preventDefault(), n(r));
|
|
38
58
|
});
|
|
39
59
|
};
|
|
40
60
|
}
|
|
41
61
|
const f = [];
|
|
42
62
|
for (let e = 0; e < 256; ++e)
|
|
43
63
|
f.push((e + 256).toString(16).slice(1));
|
|
44
|
-
function
|
|
64
|
+
function Qe(e, t = 0) {
|
|
45
65
|
return (f[e[t + 0]] + f[e[t + 1]] + f[e[t + 2]] + f[e[t + 3]] + "-" + f[e[t + 4]] + f[e[t + 5]] + "-" + f[e[t + 6]] + f[e[t + 7]] + "-" + f[e[t + 8]] + f[e[t + 9]] + "-" + f[e[t + 10]] + f[e[t + 11]] + f[e[t + 12]] + f[e[t + 13]] + f[e[t + 14]] + f[e[t + 15]]).toLowerCase();
|
|
46
66
|
}
|
|
47
67
|
let D;
|
|
48
|
-
const
|
|
49
|
-
function
|
|
68
|
+
const Ze = new Uint8Array(16);
|
|
69
|
+
function et() {
|
|
50
70
|
if (!D) {
|
|
51
71
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
52
72
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
53
73
|
D = crypto.getRandomValues.bind(crypto);
|
|
54
74
|
}
|
|
55
|
-
return D(
|
|
75
|
+
return D(Ze);
|
|
56
76
|
}
|
|
57
|
-
const
|
|
58
|
-
function
|
|
77
|
+
const tt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Z = { randomUUID: tt };
|
|
78
|
+
function P(e, t, r) {
|
|
59
79
|
if (Z.randomUUID && !t && !e)
|
|
60
80
|
return Z.randomUUID();
|
|
61
81
|
e = e || {};
|
|
62
|
-
const a = e.random || (e.rng ||
|
|
63
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
82
|
+
const a = e.random || (e.rng || et)();
|
|
83
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Qe(a);
|
|
64
84
|
}
|
|
65
|
-
const
|
|
66
|
-
const { dispatch: e, state: t } =
|
|
85
|
+
const rt = () => {
|
|
86
|
+
const { dispatch: e, state: t } = R($), { dispatch: r, state: a } = R(j), { getAccessToken: n, user: o } = U(), [c, d] = A({
|
|
67
87
|
loaded: !1
|
|
68
|
-
}),
|
|
69
|
-
|
|
70
|
-
type:
|
|
88
|
+
}), m = "mt-2 flex justify-center rounded-md", g = B(null), p = B(!1), u = (s) => {
|
|
89
|
+
s.preventDefault(), e({
|
|
90
|
+
type: se
|
|
71
91
|
});
|
|
72
92
|
};
|
|
73
93
|
_(() => {
|
|
74
|
-
|
|
94
|
+
var s;
|
|
95
|
+
(t == null ? void 0 : t.streaming) === !0 && !p.current && g.current && (p.current = !0, g.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (p.current = !1, (s = g.current) == null || s.blur());
|
|
75
96
|
}, [t]);
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
type:
|
|
97
|
+
const b = (s, h) => {
|
|
98
|
+
s.preventDefault(), r({
|
|
99
|
+
type: de,
|
|
79
100
|
payload: {
|
|
80
|
-
tag:
|
|
101
|
+
tag: h
|
|
81
102
|
}
|
|
82
103
|
});
|
|
83
104
|
};
|
|
84
105
|
return _(() => {
|
|
85
106
|
if (!o) {
|
|
86
|
-
|
|
107
|
+
d({
|
|
87
108
|
loaded: !1
|
|
88
109
|
});
|
|
89
110
|
return;
|
|
90
111
|
}
|
|
91
112
|
c.loaded || (async () => {
|
|
92
113
|
try {
|
|
93
|
-
const
|
|
114
|
+
const s = await me({
|
|
94
115
|
accessToken: await n(),
|
|
95
|
-
type:
|
|
116
|
+
type: he.GET_USER_PREFERENCES,
|
|
96
117
|
params: {
|
|
97
118
|
user: o.username
|
|
98
119
|
}
|
|
99
120
|
});
|
|
100
|
-
|
|
121
|
+
s.status === 200 && (r({
|
|
101
122
|
type: oe,
|
|
102
123
|
payload: {
|
|
103
|
-
tags:
|
|
124
|
+
tags: s.data.tags || []
|
|
104
125
|
}
|
|
105
|
-
}),
|
|
126
|
+
}), d({
|
|
106
127
|
loaded: !0
|
|
107
128
|
}));
|
|
108
129
|
} catch {
|
|
109
130
|
}
|
|
110
131
|
})();
|
|
111
|
-
}, [o]), /* @__PURE__ */ v(
|
|
112
|
-
/* @__PURE__ */ i(
|
|
113
|
-
|
|
132
|
+
}, [o]), /* @__PURE__ */ v(O, { children: [
|
|
133
|
+
/* @__PURE__ */ i(Ne, { alignHorizontal: "center", columnGap: 2, children: c && c.loaded && a.tags && a.tags.map((s) => s.enabled && s.label && s.content && /* @__PURE__ */ i(we, { children: /* @__PURE__ */ i("div", { className: m, children: /* @__PURE__ */ i(
|
|
134
|
+
ne,
|
|
114
135
|
{
|
|
115
136
|
noBorder: !0,
|
|
116
137
|
mode: "dark",
|
|
117
138
|
focusMode: "light",
|
|
118
139
|
size: "small",
|
|
119
|
-
onClick: (
|
|
120
|
-
children:
|
|
140
|
+
onClick: (h) => b(h, s.content),
|
|
141
|
+
children: s.label
|
|
121
142
|
}
|
|
122
|
-
) }) }, `tag-button-${
|
|
123
|
-
|
|
124
|
-
|
|
143
|
+
) }) }, `tag-button-${s.slot}`)) }),
|
|
144
|
+
ie(I, t) && /* @__PURE__ */ i("div", { className: m, children: /* @__PURE__ */ i(
|
|
145
|
+
Ee,
|
|
125
146
|
{
|
|
126
147
|
noBorder: !0,
|
|
127
148
|
mode: "dark",
|
|
128
149
|
focusMode: "light",
|
|
129
150
|
ref: g,
|
|
130
|
-
onClick:
|
|
131
|
-
|
|
151
|
+
onClick: u,
|
|
152
|
+
labelRight: t != null && t.streaming ? Y.ACTION_WHILE_STREAMING.content : Y.ACTION_WHILE_NOT_STREAMING.content,
|
|
153
|
+
children: t != null && t.streaming ? /* @__PURE__ */ i(Ke, { className: "size-4" }) : /* @__PURE__ */ i(je, { className: "size-4" })
|
|
132
154
|
}
|
|
133
155
|
) })
|
|
134
156
|
] });
|
|
@@ -146,7 +168,7 @@ try {
|
|
|
146
168
|
});
|
|
147
169
|
} catch {
|
|
148
170
|
}
|
|
149
|
-
const
|
|
171
|
+
const at = "av-bubble", ee = "av-button", ot = (e) => {
|
|
150
172
|
let t = "";
|
|
151
173
|
if (typeof e == "number" || typeof e == "string")
|
|
152
174
|
t = "m-" + e;
|
|
@@ -155,26 +177,26 @@ const et = "av-bubble", ee = "av-button", tt = (e) => {
|
|
|
155
177
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
156
178
|
}
|
|
157
179
|
return t;
|
|
158
|
-
}, W = "icon",
|
|
180
|
+
}, W = "icon", nt = "button", it = "link", st = ({
|
|
159
181
|
type: e,
|
|
160
182
|
size: t,
|
|
161
183
|
labelRight: r,
|
|
162
184
|
labelLeft: a,
|
|
163
185
|
align: n
|
|
164
186
|
}) => {
|
|
165
|
-
const o = "text-sm font-medium max-h-8 py-0", c = "text-base font-medium max-h-9 py-1",
|
|
187
|
+
const o = "text-sm font-medium max-h-8 py-0", c = "text-base font-medium max-h-9 py-1", d = "text-lg font-medium max-h-12 py-2";
|
|
166
188
|
switch (e) {
|
|
167
|
-
case
|
|
189
|
+
case nt:
|
|
168
190
|
return l("px-4", {
|
|
169
191
|
[o]: t === "small",
|
|
170
192
|
[c]: t === "medium",
|
|
171
|
-
[
|
|
193
|
+
[d]: t === "large"
|
|
172
194
|
});
|
|
173
|
-
case
|
|
195
|
+
case it:
|
|
174
196
|
return l("px-4 text-center", {
|
|
175
197
|
[o]: t === "small",
|
|
176
198
|
[c]: t === "medium",
|
|
177
|
-
[
|
|
199
|
+
[d]: t === "large"
|
|
178
200
|
});
|
|
179
201
|
case W:
|
|
180
202
|
return l("inline-flex items-center", {
|
|
@@ -189,7 +211,7 @@ const et = "av-bubble", ee = "av-button", tt = (e) => {
|
|
|
189
211
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
190
212
|
});
|
|
191
213
|
}
|
|
192
|
-
},
|
|
214
|
+
}, dt = ({
|
|
193
215
|
mode: e,
|
|
194
216
|
noBackground: t,
|
|
195
217
|
noTruncate: r,
|
|
@@ -221,7 +243,7 @@ const et = "av-bubble", ee = "av-button", tt = (e) => {
|
|
|
221
243
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
222
244
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
223
245
|
});
|
|
224
|
-
},
|
|
246
|
+
}, lt = ({
|
|
225
247
|
mode: e,
|
|
226
248
|
disabled: t,
|
|
227
249
|
variant: r
|
|
@@ -249,7 +271,7 @@ const et = "av-bubble", ee = "av-button", tt = (e) => {
|
|
|
249
271
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
250
272
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
251
273
|
});
|
|
252
|
-
},
|
|
274
|
+
}, ct = ({
|
|
253
275
|
mode: e,
|
|
254
276
|
disabled: t,
|
|
255
277
|
variant: r
|
|
@@ -277,7 +299,7 @@ const et = "av-bubble", ee = "av-button", tt = (e) => {
|
|
|
277
299
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
278
300
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
279
301
|
});
|
|
280
|
-
},
|
|
302
|
+
}, gt = ({
|
|
281
303
|
mode: e,
|
|
282
304
|
noBorder: t,
|
|
283
305
|
variant: r
|
|
@@ -305,12 +327,12 @@ const et = "av-bubble", ee = "av-button", tt = (e) => {
|
|
|
305
327
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
306
328
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
307
329
|
});
|
|
308
|
-
},
|
|
330
|
+
}, ut = ({ focusMode: e }) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
309
331
|
"focus:outline-focus-dark": e === "dark",
|
|
310
332
|
"focus:outline-focus-light": e === "light",
|
|
311
333
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
312
334
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
313
|
-
}),
|
|
335
|
+
}), pe = ({
|
|
314
336
|
type: e,
|
|
315
337
|
className: t,
|
|
316
338
|
raw: r,
|
|
@@ -318,47 +340,47 @@ const et = "av-bubble", ee = "av-button", tt = (e) => {
|
|
|
318
340
|
focusMode: n,
|
|
319
341
|
disabled: o,
|
|
320
342
|
fullWidth: c,
|
|
321
|
-
size:
|
|
322
|
-
noBorder:
|
|
343
|
+
size: d,
|
|
344
|
+
noBorder: m,
|
|
323
345
|
labelRight: g,
|
|
324
|
-
labelLeft:
|
|
325
|
-
spacing:
|
|
326
|
-
noBackground:
|
|
327
|
-
variant:
|
|
328
|
-
noTruncate:
|
|
346
|
+
labelLeft: p,
|
|
347
|
+
spacing: u,
|
|
348
|
+
noBackground: b,
|
|
349
|
+
variant: s,
|
|
350
|
+
noTruncate: h,
|
|
329
351
|
align: y
|
|
330
|
-
}) => (
|
|
352
|
+
}) => (s || (s = "primary"), r ? l(ee, t) : l(
|
|
331
353
|
ee,
|
|
332
354
|
t,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
355
|
+
ot(u),
|
|
356
|
+
dt({ mode: a, variant: s, noBackground: b, noTruncate: h }),
|
|
357
|
+
st({ type: e, size: d, labelRight: g, labelLeft: p, align: y }),
|
|
358
|
+
gt({ mode: a, variant: s, noBorder: m }),
|
|
359
|
+
ut({ focusMode: n }),
|
|
360
|
+
lt({ mode: a, variant: s, disabled: o }),
|
|
361
|
+
ct({ mode: a, variant: s, disabled: o }),
|
|
340
362
|
{
|
|
341
363
|
"w-full": c,
|
|
342
364
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
343
365
|
}
|
|
344
|
-
)),
|
|
366
|
+
)), mt = (e, t, r) => {
|
|
345
367
|
var a;
|
|
346
368
|
!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);
|
|
347
|
-
},
|
|
369
|
+
}, F = C.forwardRef((e, t) => {
|
|
348
370
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
349
371
|
return /* @__PURE__ */ i(
|
|
350
372
|
"button",
|
|
351
373
|
{
|
|
352
374
|
ref: t,
|
|
353
375
|
onClick: (o) => {
|
|
354
|
-
|
|
376
|
+
mt(o, a, r);
|
|
355
377
|
},
|
|
356
378
|
...n
|
|
357
379
|
}
|
|
358
380
|
);
|
|
359
381
|
});
|
|
360
|
-
|
|
361
|
-
const
|
|
382
|
+
F.displayName = "BaseButton";
|
|
383
|
+
const be = C.forwardRef(
|
|
362
384
|
({
|
|
363
385
|
children: e,
|
|
364
386
|
disabled: t = !1,
|
|
@@ -367,58 +389,58 @@ const pe = S.forwardRef(
|
|
|
367
389
|
fullWidth: n = !1,
|
|
368
390
|
className: o,
|
|
369
391
|
type: c = "button",
|
|
370
|
-
raw:
|
|
371
|
-
noBorder:
|
|
392
|
+
raw: d = !1,
|
|
393
|
+
noBorder: m = !1,
|
|
372
394
|
"aria-label": g,
|
|
373
|
-
label:
|
|
374
|
-
size:
|
|
375
|
-
labelRight:
|
|
376
|
-
labelLeft:
|
|
377
|
-
spacing:
|
|
395
|
+
label: p,
|
|
396
|
+
size: u = "medium",
|
|
397
|
+
labelRight: b,
|
|
398
|
+
labelLeft: s,
|
|
399
|
+
spacing: h,
|
|
378
400
|
noBackground: y = !1,
|
|
379
401
|
align: N = "center",
|
|
380
402
|
...w
|
|
381
|
-
},
|
|
382
|
-
const
|
|
403
|
+
}, k) => {
|
|
404
|
+
const x = pe({
|
|
383
405
|
type: W,
|
|
384
406
|
mode: r,
|
|
385
407
|
focusMode: a,
|
|
386
408
|
fullWidth: n,
|
|
387
409
|
disabled: t,
|
|
388
|
-
raw:
|
|
410
|
+
raw: d,
|
|
389
411
|
className: o,
|
|
390
|
-
noBorder:
|
|
391
|
-
size:
|
|
392
|
-
labelRight:
|
|
393
|
-
labelLeft:
|
|
394
|
-
spacing:
|
|
412
|
+
noBorder: m,
|
|
413
|
+
size: u,
|
|
414
|
+
labelRight: b,
|
|
415
|
+
labelLeft: s,
|
|
416
|
+
spacing: h,
|
|
395
417
|
noBackground: y,
|
|
396
418
|
align: N
|
|
397
|
-
}),
|
|
398
|
-
"text-copy-accent-dark": r === "light" && !
|
|
399
|
-
"text-copy-light": r === "dark" && !
|
|
400
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
401
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
419
|
+
}), E = l({
|
|
420
|
+
"text-copy-accent-dark": r === "light" && !d,
|
|
421
|
+
"text-copy-light": r === "dark" && !d,
|
|
422
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
|
|
423
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !d
|
|
402
424
|
});
|
|
403
425
|
return /* @__PURE__ */ v(
|
|
404
|
-
|
|
426
|
+
F,
|
|
405
427
|
{
|
|
406
|
-
ref:
|
|
407
|
-
className:
|
|
428
|
+
ref: k,
|
|
429
|
+
className: x,
|
|
408
430
|
disabled: t,
|
|
409
431
|
type: c,
|
|
410
|
-
"aria-label": g ||
|
|
432
|
+
"aria-label": g || p,
|
|
411
433
|
...w,
|
|
412
434
|
children: [
|
|
413
|
-
|
|
414
|
-
/* @__PURE__ */ i("div", { className:
|
|
415
|
-
|
|
435
|
+
s && /* @__PURE__ */ i("span", { className: "pr-2", children: s }),
|
|
436
|
+
/* @__PURE__ */ i("div", { className: E, children: e }),
|
|
437
|
+
b && /* @__PURE__ */ i("span", { className: "pl-2", children: b })
|
|
416
438
|
]
|
|
417
439
|
}
|
|
418
440
|
);
|
|
419
441
|
}
|
|
420
442
|
);
|
|
421
|
-
|
|
443
|
+
be.displayName = "ButtonIcon";
|
|
422
444
|
/*!
|
|
423
445
|
@versini/ui-button v1.1.11
|
|
424
446
|
© 2024 gizmette.com
|
|
@@ -432,7 +454,7 @@ try {
|
|
|
432
454
|
});
|
|
433
455
|
} catch {
|
|
434
456
|
}
|
|
435
|
-
const
|
|
457
|
+
const ht = C.forwardRef(
|
|
436
458
|
({
|
|
437
459
|
children: e,
|
|
438
460
|
disabled: t = !1,
|
|
@@ -441,40 +463,40 @@ const gt = S.forwardRef(
|
|
|
441
463
|
fullWidth: n = !1,
|
|
442
464
|
className: o,
|
|
443
465
|
type: c = "button",
|
|
444
|
-
raw:
|
|
445
|
-
noBorder:
|
|
466
|
+
raw: d = !1,
|
|
467
|
+
noBorder: m = !1,
|
|
446
468
|
"aria-label": g,
|
|
447
|
-
label:
|
|
448
|
-
size:
|
|
449
|
-
labelRight:
|
|
450
|
-
labelLeft:
|
|
451
|
-
spacing:
|
|
469
|
+
label: p,
|
|
470
|
+
size: u = "medium",
|
|
471
|
+
labelRight: b,
|
|
472
|
+
labelLeft: s,
|
|
473
|
+
spacing: h,
|
|
452
474
|
noBackground: y = !1,
|
|
453
475
|
align: N = "center",
|
|
454
476
|
active: w = !1,
|
|
455
|
-
...
|
|
456
|
-
},
|
|
457
|
-
const
|
|
477
|
+
...k
|
|
478
|
+
}, x) => {
|
|
479
|
+
const E = pe({
|
|
458
480
|
type: W,
|
|
459
481
|
mode: r,
|
|
460
482
|
focusMode: a,
|
|
461
483
|
fullWidth: n,
|
|
462
484
|
disabled: t,
|
|
463
|
-
raw:
|
|
485
|
+
raw: d,
|
|
464
486
|
className: o,
|
|
465
|
-
noBorder:
|
|
466
|
-
size:
|
|
467
|
-
labelRight:
|
|
468
|
-
labelLeft:
|
|
469
|
-
spacing:
|
|
487
|
+
noBorder: m,
|
|
488
|
+
size: u,
|
|
489
|
+
labelRight: b,
|
|
490
|
+
labelLeft: s,
|
|
491
|
+
spacing: h,
|
|
470
492
|
noBackground: y,
|
|
471
493
|
align: N
|
|
472
|
-
}),
|
|
473
|
-
"text-copy-accent-dark": r === "light" && !
|
|
474
|
-
"text-copy-light": r === "dark" && !
|
|
475
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
476
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
477
|
-
}),
|
|
494
|
+
}), T = l({
|
|
495
|
+
"text-copy-accent-dark": r === "light" && !d,
|
|
496
|
+
"text-copy-light": r === "dark" && !d,
|
|
497
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
|
|
498
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !d
|
|
499
|
+
}), z = w ? l(
|
|
478
500
|
"relative",
|
|
479
501
|
"focus-within:static",
|
|
480
502
|
"focus-within:after:border-transparent",
|
|
@@ -491,26 +513,26 @@ const gt = S.forwardRef(
|
|
|
491
513
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
492
514
|
}
|
|
493
515
|
) : "";
|
|
494
|
-
return /* @__PURE__ */ i("div", { className:
|
|
495
|
-
|
|
516
|
+
return /* @__PURE__ */ i("div", { className: z, children: /* @__PURE__ */ v(
|
|
517
|
+
F,
|
|
496
518
|
{
|
|
497
|
-
ref:
|
|
498
|
-
className:
|
|
519
|
+
ref: x,
|
|
520
|
+
className: E,
|
|
499
521
|
disabled: t,
|
|
500
522
|
type: c,
|
|
501
|
-
"aria-label": g ||
|
|
502
|
-
...
|
|
523
|
+
"aria-label": g || p,
|
|
524
|
+
...k,
|
|
503
525
|
children: [
|
|
504
|
-
|
|
505
|
-
/* @__PURE__ */ i("div", { className:
|
|
506
|
-
|
|
526
|
+
s && /* @__PURE__ */ i("span", { className: "pr-2", children: s }),
|
|
527
|
+
/* @__PURE__ */ i("div", { className: T, children: e }),
|
|
528
|
+
b && /* @__PURE__ */ i("span", { className: "pl-2", children: b })
|
|
507
529
|
]
|
|
508
530
|
}
|
|
509
531
|
) });
|
|
510
532
|
}
|
|
511
533
|
);
|
|
512
|
-
|
|
513
|
-
const
|
|
534
|
+
ht.displayName = "ButtonSort";
|
|
535
|
+
const pt = (e) => {
|
|
514
536
|
let t = "";
|
|
515
537
|
if (typeof e == "number" || typeof e == "string")
|
|
516
538
|
t = "m-" + e;
|
|
@@ -519,7 +541,7 @@ const ut = (e) => {
|
|
|
519
541
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
520
542
|
}
|
|
521
543
|
return t;
|
|
522
|
-
},
|
|
544
|
+
}, fe = ({
|
|
523
545
|
children: e,
|
|
524
546
|
fill: t,
|
|
525
547
|
viewBox: r,
|
|
@@ -527,30 +549,30 @@ const ut = (e) => {
|
|
|
527
549
|
defaultViewBox: n,
|
|
528
550
|
defaultClassName: o,
|
|
529
551
|
spacing: c,
|
|
530
|
-
title:
|
|
531
|
-
semantic:
|
|
552
|
+
title: d,
|
|
553
|
+
semantic: m = !1,
|
|
532
554
|
...g
|
|
533
555
|
}) => {
|
|
534
|
-
const
|
|
535
|
-
|
|
556
|
+
const p = pt(c), u = l(
|
|
557
|
+
p,
|
|
536
558
|
a || o
|
|
537
559
|
);
|
|
538
|
-
return /* @__PURE__ */ v(
|
|
560
|
+
return /* @__PURE__ */ v(O, { children: [
|
|
539
561
|
/* @__PURE__ */ i(
|
|
540
562
|
"svg",
|
|
541
563
|
{
|
|
542
564
|
xmlns: "http://www.w3.org/2000/svg",
|
|
543
|
-
className:
|
|
565
|
+
className: u,
|
|
544
566
|
viewBox: r || n,
|
|
545
567
|
fill: t || "currentColor",
|
|
546
568
|
role: "img",
|
|
547
|
-
"aria-hidden": !
|
|
569
|
+
"aria-hidden": !m,
|
|
548
570
|
focusable: !1,
|
|
549
571
|
...g,
|
|
550
572
|
children: e
|
|
551
573
|
}
|
|
552
574
|
),
|
|
553
|
-
|
|
575
|
+
d && m && /* @__PURE__ */ i("span", { className: "sr-only", children: d })
|
|
554
576
|
] });
|
|
555
577
|
};
|
|
556
578
|
/*!
|
|
@@ -566,7 +588,7 @@ try {
|
|
|
566
588
|
});
|
|
567
589
|
} catch {
|
|
568
590
|
}
|
|
569
|
-
const
|
|
591
|
+
const bt = ({
|
|
570
592
|
className: e,
|
|
571
593
|
viewBox: t,
|
|
572
594
|
spacing: r,
|
|
@@ -574,7 +596,7 @@ const mt = ({
|
|
|
574
596
|
monotone: n,
|
|
575
597
|
...o
|
|
576
598
|
}) => /* @__PURE__ */ v(
|
|
577
|
-
|
|
599
|
+
fe,
|
|
578
600
|
{
|
|
579
601
|
defaultViewBox: "0 0 448 512",
|
|
580
602
|
defaultClassName: "size-5",
|
|
@@ -594,7 +616,7 @@ const mt = ({
|
|
|
594
616
|
/* @__PURE__ */ i("path", { 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" })
|
|
595
617
|
]
|
|
596
618
|
}
|
|
597
|
-
),
|
|
619
|
+
), ft = ({
|
|
598
620
|
className: e,
|
|
599
621
|
viewBox: t,
|
|
600
622
|
spacing: r,
|
|
@@ -602,7 +624,7 @@ const mt = ({
|
|
|
602
624
|
monotone: n,
|
|
603
625
|
...o
|
|
604
626
|
}) => /* @__PURE__ */ i(
|
|
605
|
-
|
|
627
|
+
fe,
|
|
606
628
|
{
|
|
607
629
|
defaultViewBox: "0 0 512 512",
|
|
608
630
|
defaultClassName: "size-5",
|
|
@@ -627,7 +649,7 @@ try {
|
|
|
627
649
|
});
|
|
628
650
|
} catch {
|
|
629
651
|
}
|
|
630
|
-
const
|
|
652
|
+
const yt = (e) => {
|
|
631
653
|
let t = "";
|
|
632
654
|
if (typeof e == "number" || typeof e == "string")
|
|
633
655
|
t = "m-" + e;
|
|
@@ -636,36 +658,36 @@ const pt = (e) => {
|
|
|
636
658
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
637
659
|
}
|
|
638
660
|
return t;
|
|
639
|
-
},
|
|
661
|
+
}, vt = () => "p-4 sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) => l({
|
|
640
662
|
"bg-surface-lighter dark:bg-surface-dark": e === "left",
|
|
641
663
|
"bg-surface-accent": e === "right"
|
|
642
|
-
}),
|
|
664
|
+
}), xt = ({ kind: e }) => l(
|
|
643
665
|
"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",
|
|
644
666
|
{
|
|
645
667
|
"text-copy-lighter": e === "right"
|
|
646
668
|
}
|
|
647
|
-
),
|
|
669
|
+
), Tt = ({ kind: e }) => l("rounded-b-xl", {
|
|
648
670
|
"rounded-tr-xl": e === "left",
|
|
649
671
|
"rounded-tl-xl": e === "right"
|
|
650
|
-
}),
|
|
672
|
+
}), _t = ({
|
|
651
673
|
kind: e,
|
|
652
674
|
className: t,
|
|
653
675
|
spacing: r
|
|
654
676
|
}) => {
|
|
655
677
|
const a = l(
|
|
656
678
|
t,
|
|
657
|
-
|
|
679
|
+
at,
|
|
658
680
|
"flex items-start",
|
|
659
|
-
|
|
681
|
+
yt(r),
|
|
660
682
|
{
|
|
661
683
|
"flex-row-reverse": e === "right"
|
|
662
684
|
}
|
|
663
685
|
), n = l(
|
|
664
686
|
"flex flex-col empty:hidden",
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
687
|
+
vt(),
|
|
688
|
+
xt({ kind: e }),
|
|
689
|
+
kt({ kind: e }),
|
|
690
|
+
Tt({ kind: e })
|
|
669
691
|
), o = "pr-2 pt-1 text-end text-xs text-copy-light", c = l("flex flex-col-reverse gap-2 sm:flex-row", {
|
|
670
692
|
"ml-2": e === "left",
|
|
671
693
|
"mr-2": e === "right"
|
|
@@ -676,7 +698,7 @@ const pt = (e) => {
|
|
|
676
698
|
footer: o,
|
|
677
699
|
copyButton: c
|
|
678
700
|
};
|
|
679
|
-
},
|
|
701
|
+
}, Nt = ({
|
|
680
702
|
children: e,
|
|
681
703
|
kind: t = "left",
|
|
682
704
|
className: r,
|
|
@@ -684,45 +706,45 @@ const pt = (e) => {
|
|
|
684
706
|
rawFooter: n,
|
|
685
707
|
copyToClipboard: o,
|
|
686
708
|
copyToClipboardFocusMode: c = "system",
|
|
687
|
-
copyToClipboardMode:
|
|
688
|
-
spacing:
|
|
709
|
+
copyToClipboardMode: d = "system",
|
|
710
|
+
spacing: m
|
|
689
711
|
}) => {
|
|
690
|
-
const [g,
|
|
691
|
-
|
|
712
|
+
const [g, p] = A(!1), u = _t({ kind: t, className: r, spacing: m }), b = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), s = () => {
|
|
713
|
+
p(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
692
714
|
};
|
|
693
715
|
return _(() => {
|
|
694
|
-
let
|
|
695
|
-
return g && (
|
|
696
|
-
|
|
716
|
+
let h;
|
|
717
|
+
return g && (h = window.setTimeout(() => {
|
|
718
|
+
p(!1);
|
|
697
719
|
}, 3e3)), () => {
|
|
698
|
-
clearTimeout(
|
|
720
|
+
clearTimeout(h);
|
|
699
721
|
};
|
|
700
|
-
}, [g]), /* @__PURE__ */ v("div", { className:
|
|
722
|
+
}, [g]), /* @__PURE__ */ v("div", { className: u.wrapper, children: [
|
|
701
723
|
/* @__PURE__ */ v("div", { children: [
|
|
702
|
-
/* @__PURE__ */ i("div", { className:
|
|
703
|
-
a && Object.keys(a).map((
|
|
704
|
-
|
|
724
|
+
/* @__PURE__ */ i("div", { className: u.main, children: e }),
|
|
725
|
+
a && Object.keys(a).map((h) => a[h] ? /* @__PURE__ */ i("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: u.footer, children: [
|
|
726
|
+
h,
|
|
705
727
|
": ",
|
|
706
|
-
a[
|
|
707
|
-
] }) }, `-${
|
|
728
|
+
a[h]
|
|
729
|
+
] }) }, `-${h}`) : null),
|
|
708
730
|
n && n
|
|
709
731
|
] }),
|
|
710
|
-
|
|
711
|
-
|
|
732
|
+
b && /* @__PURE__ */ i("div", { className: u.copyButton, children: /* @__PURE__ */ i(
|
|
733
|
+
be,
|
|
712
734
|
{
|
|
713
735
|
noBorder: !0,
|
|
714
736
|
noBackground: !0,
|
|
715
737
|
size: "small",
|
|
716
|
-
mode:
|
|
738
|
+
mode: d,
|
|
717
739
|
focusMode: c,
|
|
718
740
|
label: g ? "Copied to clipboard" : "Copy to clipboard",
|
|
719
|
-
onClick:
|
|
741
|
+
onClick: s,
|
|
720
742
|
disabled: g,
|
|
721
|
-
children: g ? /* @__PURE__ */ i(
|
|
743
|
+
children: g ? /* @__PURE__ */ i(bt, { className: "size-3" }) : /* @__PURE__ */ i(ft, { className: "size-3" })
|
|
722
744
|
}
|
|
723
745
|
) })
|
|
724
746
|
] });
|
|
725
|
-
}, te = "av-button",
|
|
747
|
+
}, te = "av-button", wt = (e) => {
|
|
726
748
|
let t = "";
|
|
727
749
|
if (typeof e == "number" || typeof e == "string")
|
|
728
750
|
t = "m-" + e;
|
|
@@ -731,28 +753,28 @@ const pt = (e) => {
|
|
|
731
753
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
732
754
|
}
|
|
733
755
|
return t;
|
|
734
|
-
},
|
|
756
|
+
}, ye = "icon", ve = "button", Et = "link", It = ({
|
|
735
757
|
type: e,
|
|
736
758
|
size: t,
|
|
737
759
|
labelRight: r,
|
|
738
760
|
labelLeft: a,
|
|
739
761
|
align: n
|
|
740
762
|
}) => {
|
|
741
|
-
const o = "text-sm font-medium max-h-8 py-0", c = "text-base font-medium max-h-9 py-1",
|
|
763
|
+
const o = "text-sm font-medium max-h-8 py-0", c = "text-base font-medium max-h-9 py-1", d = "text-lg font-medium max-h-12 py-2";
|
|
742
764
|
switch (e) {
|
|
743
|
-
case
|
|
765
|
+
case ve:
|
|
744
766
|
return l("px-4", {
|
|
745
767
|
[o]: t === "small",
|
|
746
768
|
[c]: t === "medium",
|
|
747
|
-
[
|
|
769
|
+
[d]: t === "large"
|
|
748
770
|
});
|
|
749
|
-
case
|
|
771
|
+
case Et:
|
|
750
772
|
return l("px-4 text-center", {
|
|
751
773
|
[o]: t === "small",
|
|
752
774
|
[c]: t === "medium",
|
|
753
|
-
[
|
|
775
|
+
[d]: t === "large"
|
|
754
776
|
});
|
|
755
|
-
case
|
|
777
|
+
case ye:
|
|
756
778
|
return l("inline-flex items-center", {
|
|
757
779
|
"justify-center": n === "center",
|
|
758
780
|
"justify-start": n === "left",
|
|
@@ -765,7 +787,7 @@ const pt = (e) => {
|
|
|
765
787
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
766
788
|
});
|
|
767
789
|
}
|
|
768
|
-
},
|
|
790
|
+
}, Ct = ({
|
|
769
791
|
mode: e,
|
|
770
792
|
noBackground: t,
|
|
771
793
|
noTruncate: r,
|
|
@@ -797,7 +819,7 @@ const pt = (e) => {
|
|
|
797
819
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
798
820
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
799
821
|
});
|
|
800
|
-
},
|
|
822
|
+
}, St = ({
|
|
801
823
|
mode: e,
|
|
802
824
|
disabled: t,
|
|
803
825
|
variant: r
|
|
@@ -825,7 +847,7 @@ const pt = (e) => {
|
|
|
825
847
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
826
848
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
827
849
|
});
|
|
828
|
-
},
|
|
850
|
+
}, Rt = ({
|
|
829
851
|
mode: e,
|
|
830
852
|
disabled: t,
|
|
831
853
|
variant: r
|
|
@@ -853,7 +875,7 @@ const pt = (e) => {
|
|
|
853
875
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
854
876
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
855
877
|
});
|
|
856
|
-
},
|
|
878
|
+
}, Bt = ({
|
|
857
879
|
mode: e,
|
|
858
880
|
noBorder: t,
|
|
859
881
|
variant: r
|
|
@@ -881,12 +903,12 @@ const pt = (e) => {
|
|
|
881
903
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
882
904
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
883
905
|
});
|
|
884
|
-
},
|
|
906
|
+
}, At = ({ focusMode: e }) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
885
907
|
"focus:outline-focus-dark": e === "dark",
|
|
886
908
|
"focus:outline-focus-light": e === "light",
|
|
887
909
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
888
910
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
889
|
-
}),
|
|
911
|
+
}), ke = ({
|
|
890
912
|
type: e,
|
|
891
913
|
className: t,
|
|
892
914
|
raw: r,
|
|
@@ -894,47 +916,47 @@ const pt = (e) => {
|
|
|
894
916
|
focusMode: n,
|
|
895
917
|
disabled: o,
|
|
896
918
|
fullWidth: c,
|
|
897
|
-
size:
|
|
898
|
-
noBorder:
|
|
919
|
+
size: d,
|
|
920
|
+
noBorder: m,
|
|
899
921
|
labelRight: g,
|
|
900
|
-
labelLeft:
|
|
901
|
-
spacing:
|
|
902
|
-
noBackground:
|
|
903
|
-
variant:
|
|
904
|
-
noTruncate:
|
|
922
|
+
labelLeft: p,
|
|
923
|
+
spacing: u,
|
|
924
|
+
noBackground: b,
|
|
925
|
+
variant: s,
|
|
926
|
+
noTruncate: h,
|
|
905
927
|
align: y
|
|
906
|
-
}) => (
|
|
928
|
+
}) => (s || (s = "primary"), r ? l(te, t) : l(
|
|
907
929
|
te,
|
|
908
930
|
t,
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
931
|
+
wt(u),
|
|
932
|
+
Ct({ mode: a, variant: s, noBackground: b, noTruncate: h }),
|
|
933
|
+
It({ type: e, size: d, labelRight: g, labelLeft: p, align: y }),
|
|
934
|
+
Bt({ mode: a, variant: s, noBorder: m }),
|
|
935
|
+
At({ focusMode: n }),
|
|
936
|
+
St({ mode: a, variant: s, disabled: o }),
|
|
937
|
+
Rt({ mode: a, variant: s, disabled: o }),
|
|
916
938
|
{
|
|
917
939
|
"w-full": c,
|
|
918
940
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
919
941
|
}
|
|
920
|
-
)),
|
|
942
|
+
)), Mt = (e, t, r) => {
|
|
921
943
|
var a;
|
|
922
944
|
!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);
|
|
923
|
-
},
|
|
945
|
+
}, K = C.forwardRef((e, t) => {
|
|
924
946
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
925
947
|
return /* @__PURE__ */ i(
|
|
926
948
|
"button",
|
|
927
949
|
{
|
|
928
950
|
ref: t,
|
|
929
951
|
onClick: (o) => {
|
|
930
|
-
|
|
952
|
+
Mt(o, a, r);
|
|
931
953
|
},
|
|
932
954
|
...n
|
|
933
955
|
}
|
|
934
956
|
);
|
|
935
957
|
});
|
|
936
|
-
|
|
937
|
-
const
|
|
958
|
+
K.displayName = "BaseButton";
|
|
959
|
+
const xe = C.forwardRef(
|
|
938
960
|
({
|
|
939
961
|
children: e,
|
|
940
962
|
disabled: t = !1,
|
|
@@ -943,40 +965,40 @@ const ke = S.forwardRef(
|
|
|
943
965
|
fullWidth: n = !1,
|
|
944
966
|
className: o,
|
|
945
967
|
size: c = "medium",
|
|
946
|
-
raw:
|
|
947
|
-
noBorder:
|
|
968
|
+
raw: d = !1,
|
|
969
|
+
noBorder: m = !1,
|
|
948
970
|
spacing: g,
|
|
949
|
-
variant:
|
|
950
|
-
noTruncate:
|
|
951
|
-
...
|
|
952
|
-
},
|
|
953
|
-
const
|
|
954
|
-
type:
|
|
971
|
+
variant: p = "primary",
|
|
972
|
+
noTruncate: u = !1,
|
|
973
|
+
...b
|
|
974
|
+
}, s) => {
|
|
975
|
+
const h = ke({
|
|
976
|
+
type: ve,
|
|
955
977
|
mode: r,
|
|
956
978
|
focusMode: a,
|
|
957
979
|
fullWidth: n,
|
|
958
980
|
disabled: t,
|
|
959
|
-
raw:
|
|
981
|
+
raw: d,
|
|
960
982
|
className: o,
|
|
961
983
|
size: c,
|
|
962
|
-
noBorder:
|
|
984
|
+
noBorder: m,
|
|
963
985
|
spacing: g,
|
|
964
|
-
variant:
|
|
965
|
-
noTruncate:
|
|
986
|
+
variant: p,
|
|
987
|
+
noTruncate: u
|
|
966
988
|
});
|
|
967
989
|
return /* @__PURE__ */ i(
|
|
968
|
-
|
|
990
|
+
K,
|
|
969
991
|
{
|
|
970
|
-
ref:
|
|
971
|
-
className:
|
|
992
|
+
ref: s,
|
|
993
|
+
className: h,
|
|
972
994
|
disabled: t,
|
|
973
|
-
...
|
|
995
|
+
...b,
|
|
974
996
|
children: e
|
|
975
997
|
}
|
|
976
998
|
);
|
|
977
999
|
}
|
|
978
1000
|
);
|
|
979
|
-
|
|
1001
|
+
xe.displayName = "Button";
|
|
980
1002
|
/*!
|
|
981
1003
|
@versini/ui-button v1.1.11
|
|
982
1004
|
© 2024 gizmette.com
|
|
@@ -990,7 +1012,7 @@ try {
|
|
|
990
1012
|
});
|
|
991
1013
|
} catch {
|
|
992
1014
|
}
|
|
993
|
-
const
|
|
1015
|
+
const Lt = C.forwardRef(
|
|
994
1016
|
({
|
|
995
1017
|
children: e,
|
|
996
1018
|
disabled: t = !1,
|
|
@@ -999,40 +1021,40 @@ const Bt = S.forwardRef(
|
|
|
999
1021
|
fullWidth: n = !1,
|
|
1000
1022
|
className: o,
|
|
1001
1023
|
type: c = "button",
|
|
1002
|
-
raw:
|
|
1003
|
-
noBorder:
|
|
1024
|
+
raw: d = !1,
|
|
1025
|
+
noBorder: m = !1,
|
|
1004
1026
|
"aria-label": g,
|
|
1005
|
-
label:
|
|
1006
|
-
size:
|
|
1007
|
-
labelRight:
|
|
1008
|
-
labelLeft:
|
|
1009
|
-
spacing:
|
|
1027
|
+
label: p,
|
|
1028
|
+
size: u = "medium",
|
|
1029
|
+
labelRight: b,
|
|
1030
|
+
labelLeft: s,
|
|
1031
|
+
spacing: h,
|
|
1010
1032
|
noBackground: y = !1,
|
|
1011
1033
|
align: N = "center",
|
|
1012
1034
|
active: w = !1,
|
|
1013
|
-
...
|
|
1014
|
-
},
|
|
1015
|
-
const
|
|
1016
|
-
type:
|
|
1035
|
+
...k
|
|
1036
|
+
}, x) => {
|
|
1037
|
+
const E = ke({
|
|
1038
|
+
type: ye,
|
|
1017
1039
|
mode: r,
|
|
1018
1040
|
focusMode: a,
|
|
1019
1041
|
fullWidth: n,
|
|
1020
1042
|
disabled: t,
|
|
1021
|
-
raw:
|
|
1043
|
+
raw: d,
|
|
1022
1044
|
className: o,
|
|
1023
|
-
noBorder:
|
|
1024
|
-
size:
|
|
1025
|
-
labelRight:
|
|
1026
|
-
labelLeft:
|
|
1027
|
-
spacing:
|
|
1045
|
+
noBorder: m,
|
|
1046
|
+
size: u,
|
|
1047
|
+
labelRight: b,
|
|
1048
|
+
labelLeft: s,
|
|
1049
|
+
spacing: h,
|
|
1028
1050
|
noBackground: y,
|
|
1029
1051
|
align: N
|
|
1030
|
-
}),
|
|
1031
|
-
"text-copy-accent-dark": r === "light" && !
|
|
1032
|
-
"text-copy-light": r === "dark" && !
|
|
1033
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
1034
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
1035
|
-
}),
|
|
1052
|
+
}), T = l({
|
|
1053
|
+
"text-copy-accent-dark": r === "light" && !d,
|
|
1054
|
+
"text-copy-light": r === "dark" && !d,
|
|
1055
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
|
|
1056
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !d
|
|
1057
|
+
}), z = w ? l(
|
|
1036
1058
|
"relative",
|
|
1037
1059
|
"focus-within:static",
|
|
1038
1060
|
"focus-within:after:border-transparent",
|
|
@@ -1049,28 +1071,28 @@ const Bt = S.forwardRef(
|
|
|
1049
1071
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
1050
1072
|
}
|
|
1051
1073
|
) : "";
|
|
1052
|
-
return /* @__PURE__ */ i("div", { className:
|
|
1053
|
-
|
|
1074
|
+
return /* @__PURE__ */ i("div", { className: z, children: /* @__PURE__ */ v(
|
|
1075
|
+
K,
|
|
1054
1076
|
{
|
|
1055
|
-
ref:
|
|
1056
|
-
className:
|
|
1077
|
+
ref: x,
|
|
1078
|
+
className: E,
|
|
1057
1079
|
disabled: t,
|
|
1058
1080
|
type: c,
|
|
1059
|
-
"aria-label": g ||
|
|
1060
|
-
...
|
|
1081
|
+
"aria-label": g || p,
|
|
1082
|
+
...k,
|
|
1061
1083
|
children: [
|
|
1062
|
-
|
|
1063
|
-
/* @__PURE__ */ i("div", { className:
|
|
1064
|
-
|
|
1084
|
+
s && /* @__PURE__ */ i("span", { className: "pr-2", children: s }),
|
|
1085
|
+
/* @__PURE__ */ i("div", { className: T, children: e }),
|
|
1086
|
+
b && /* @__PURE__ */ i("span", { className: "pl-2", children: b })
|
|
1065
1087
|
]
|
|
1066
1088
|
}
|
|
1067
1089
|
) });
|
|
1068
1090
|
}
|
|
1069
1091
|
);
|
|
1070
|
-
|
|
1071
|
-
const
|
|
1092
|
+
Lt.displayName = "ButtonSort";
|
|
1093
|
+
const Ot = 200, $t = ({
|
|
1072
1094
|
string: e,
|
|
1073
|
-
idealLength: t =
|
|
1095
|
+
idealLength: t = Ot
|
|
1074
1096
|
}) => {
|
|
1075
1097
|
if (e.length <= t)
|
|
1076
1098
|
return { string: e, isTruncated: !1 };
|
|
@@ -1081,30 +1103,30 @@ const At = 200, Mt = ({
|
|
|
1081
1103
|
string: e.slice(0, t + r),
|
|
1082
1104
|
isTruncated: !0
|
|
1083
1105
|
};
|
|
1084
|
-
},
|
|
1106
|
+
}, Ut = ({
|
|
1085
1107
|
children: e,
|
|
1086
1108
|
length: t = 200,
|
|
1087
1109
|
mode: r = "system",
|
|
1088
1110
|
focusMode: a = "system"
|
|
1089
1111
|
}) => {
|
|
1090
|
-
const [n, o] =
|
|
1112
|
+
const [n, o] = A(!1);
|
|
1091
1113
|
if (typeof e != "string")
|
|
1092
1114
|
return e;
|
|
1093
|
-
const { string: c, isTruncated:
|
|
1115
|
+
const { string: c, isTruncated: d } = $t({
|
|
1094
1116
|
string: e,
|
|
1095
1117
|
idealLength: t
|
|
1096
1118
|
});
|
|
1097
1119
|
return /* @__PURE__ */ v("span", { children: [
|
|
1098
1120
|
n ? e : c,
|
|
1099
|
-
|
|
1100
|
-
|
|
1121
|
+
d && /* @__PURE__ */ i(
|
|
1122
|
+
xe,
|
|
1101
1123
|
{
|
|
1102
1124
|
mode: r,
|
|
1103
1125
|
focusMode: a,
|
|
1104
1126
|
spacing: { l: 2 },
|
|
1105
1127
|
size: "small",
|
|
1106
|
-
onClick: (
|
|
1107
|
-
|
|
1128
|
+
onClick: (m) => {
|
|
1129
|
+
m.preventDefault(), o(!n);
|
|
1108
1130
|
},
|
|
1109
1131
|
children: n ? "less..." : "more..."
|
|
1110
1132
|
}
|
|
@@ -1124,17 +1146,17 @@ try {
|
|
|
1124
1146
|
});
|
|
1125
1147
|
} catch {
|
|
1126
1148
|
}
|
|
1127
|
-
const re =
|
|
1149
|
+
const re = Fe(
|
|
1128
1150
|
() => import(
|
|
1129
1151
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
1130
|
-
"./LazyMessageAssistant.
|
|
1152
|
+
"./LazyMessageAssistant.KzZAMNJh.js"
|
|
1131
1153
|
).then((e) => e.LazyMessageAssistant)
|
|
1132
|
-
),
|
|
1133
|
-
const { state: e } =
|
|
1134
|
-
return /* @__PURE__ */ v(
|
|
1154
|
+
), zt = () => {
|
|
1155
|
+
const { state: e } = R($);
|
|
1156
|
+
return /* @__PURE__ */ v(O, { children: [
|
|
1135
1157
|
e && e.messages.length > 0 && e.messages.map((t, r) => {
|
|
1136
1158
|
const { role: a, content: n, name: o, processingTime: c } = t.message;
|
|
1137
|
-
return (a ===
|
|
1159
|
+
return (a === I || a === G) && n ? /* @__PURE__ */ i(Q, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(
|
|
1138
1160
|
re,
|
|
1139
1161
|
{
|
|
1140
1162
|
name: o,
|
|
@@ -1142,117 +1164,117 @@ const re = Pe(
|
|
|
1142
1164
|
children: n
|
|
1143
1165
|
}
|
|
1144
1166
|
) }, `${r}-${a}`) : a === H && n ? /* @__PURE__ */ i(
|
|
1145
|
-
|
|
1167
|
+
Nt,
|
|
1146
1168
|
{
|
|
1147
1169
|
kind: "right",
|
|
1148
1170
|
copyToClipboard: n,
|
|
1149
1171
|
copyToClipboardFocusMode: "light",
|
|
1150
|
-
children: /* @__PURE__ */ i(
|
|
1172
|
+
children: /* @__PURE__ */ i(Ut, { mode: "light", focusMode: "light", children: n })
|
|
1151
1173
|
},
|
|
1152
1174
|
`${r}-${a}`
|
|
1153
1175
|
) : null;
|
|
1154
1176
|
}),
|
|
1155
|
-
|
|
1177
|
+
ie(H, e) && /* @__PURE__ */ i(Q, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(re, { loading: !0 }) })
|
|
1156
1178
|
] });
|
|
1157
|
-
},
|
|
1179
|
+
}, L = (e, t) => {
|
|
1158
1180
|
e({
|
|
1159
|
-
type:
|
|
1181
|
+
type: ge,
|
|
1160
1182
|
payload: {
|
|
1161
1183
|
streaming: t
|
|
1162
1184
|
}
|
|
1163
1185
|
});
|
|
1164
1186
|
}, ae = (e) => {
|
|
1165
|
-
|
|
1166
|
-
type:
|
|
1187
|
+
L(e, !1), e({
|
|
1188
|
+
type: S,
|
|
1167
1189
|
payload: {
|
|
1168
1190
|
message: {
|
|
1169
|
-
role:
|
|
1170
|
-
content:
|
|
1191
|
+
role: G,
|
|
1192
|
+
content: Be
|
|
1171
1193
|
}
|
|
1172
1194
|
}
|
|
1173
1195
|
});
|
|
1174
|
-
},
|
|
1175
|
-
const { state: e, dispatch: t } =
|
|
1196
|
+
}, Vt = () => {
|
|
1197
|
+
const { state: e, dispatch: t } = R($), { state: r, dispatch: a } = R(j), [n, o] = A(""), { getAccessToken: c, user: d } = U(), m = B(null), g = B(
|
|
1176
1198
|
null
|
|
1177
1199
|
);
|
|
1178
1200
|
_(() => {
|
|
1179
1201
|
(async () => {
|
|
1180
|
-
var
|
|
1202
|
+
var b;
|
|
1181
1203
|
if (!e || e.messages.length === 0) {
|
|
1182
|
-
(
|
|
1204
|
+
(b = g == null ? void 0 : g.current) == null || b.cancel();
|
|
1183
1205
|
return;
|
|
1184
1206
|
}
|
|
1185
1207
|
const u = e.messages[e.messages.length - 1];
|
|
1186
|
-
if (!(e.messages.length === 0 || u.message.role ===
|
|
1208
|
+
if (!(e.messages.length === 0 || u.message.role === I || u.message.role === Ie || u.message.role === G || u.message.role === Ce))
|
|
1187
1209
|
try {
|
|
1188
|
-
const
|
|
1210
|
+
const s = await Ge({
|
|
1189
1211
|
accessToken: await c(),
|
|
1190
1212
|
name: "generate",
|
|
1191
1213
|
data: {
|
|
1192
1214
|
messages: e.messages,
|
|
1193
|
-
model: e.engine ||
|
|
1194
|
-
user: (
|
|
1215
|
+
model: e.engine || M,
|
|
1216
|
+
user: (d == null ? void 0 : d.username) || "",
|
|
1195
1217
|
id: e.id,
|
|
1196
1218
|
usage: e.usage
|
|
1197
1219
|
}
|
|
1198
1220
|
});
|
|
1199
|
-
if (
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1202
|
-
const
|
|
1221
|
+
if (s && s.ok) {
|
|
1222
|
+
const h = P();
|
|
1223
|
+
g.current = s.body.getReader();
|
|
1224
|
+
const y = new TextDecoder();
|
|
1203
1225
|
for (; ; ) {
|
|
1204
|
-
|
|
1205
|
-
const { done:
|
|
1206
|
-
if (
|
|
1207
|
-
|
|
1226
|
+
L(t, !0);
|
|
1227
|
+
const { done: N, value: w } = await g.current.read();
|
|
1228
|
+
if (N) {
|
|
1229
|
+
L(t, !1);
|
|
1208
1230
|
break;
|
|
1209
1231
|
}
|
|
1210
|
-
const k =
|
|
1232
|
+
const k = y.decode(w, { stream: !0 }), x = k.indexOf(q);
|
|
1211
1233
|
if (x !== -1) {
|
|
1212
|
-
const
|
|
1234
|
+
const E = k.substring(0, x), T = JSON.parse(
|
|
1213
1235
|
k.substring(x + q.length)
|
|
1214
1236
|
);
|
|
1215
1237
|
t({
|
|
1216
|
-
type:
|
|
1238
|
+
type: le,
|
|
1217
1239
|
payload: {
|
|
1218
1240
|
model: T.model,
|
|
1219
1241
|
usage: T.usage
|
|
1220
1242
|
}
|
|
1221
1243
|
}), t({
|
|
1222
|
-
type:
|
|
1244
|
+
type: S,
|
|
1223
1245
|
payload: {
|
|
1224
1246
|
message: {
|
|
1225
|
-
content:
|
|
1226
|
-
role:
|
|
1227
|
-
messageId:
|
|
1247
|
+
content: E,
|
|
1248
|
+
role: I,
|
|
1249
|
+
messageId: h,
|
|
1228
1250
|
processingTime: T.processingTime,
|
|
1229
1251
|
name: T.name
|
|
1230
1252
|
}
|
|
1231
1253
|
}
|
|
1232
|
-
}),
|
|
1254
|
+
}), L(t, !1);
|
|
1233
1255
|
break;
|
|
1234
1256
|
} else
|
|
1235
1257
|
t({
|
|
1236
|
-
type:
|
|
1258
|
+
type: S,
|
|
1237
1259
|
payload: {
|
|
1238
1260
|
message: {
|
|
1239
1261
|
content: k,
|
|
1240
|
-
role:
|
|
1241
|
-
messageId:
|
|
1262
|
+
role: I,
|
|
1263
|
+
messageId: h
|
|
1242
1264
|
}
|
|
1243
1265
|
}
|
|
1244
1266
|
});
|
|
1245
1267
|
}
|
|
1246
1268
|
} else
|
|
1247
1269
|
ae(t);
|
|
1248
|
-
} catch (
|
|
1249
|
-
console.error(
|
|
1270
|
+
} catch (s) {
|
|
1271
|
+
console.error(s), ae(t);
|
|
1250
1272
|
}
|
|
1251
1273
|
})();
|
|
1252
1274
|
}, [e == null ? void 0 : e.messages]);
|
|
1253
|
-
const
|
|
1275
|
+
const p = async (u) => {
|
|
1254
1276
|
u.preventDefault(), t({
|
|
1255
|
-
type:
|
|
1277
|
+
type: S,
|
|
1256
1278
|
payload: {
|
|
1257
1279
|
message: {
|
|
1258
1280
|
role: H,
|
|
@@ -1262,67 +1284,67 @@ const re = Pe(
|
|
|
1262
1284
|
}), o("");
|
|
1263
1285
|
};
|
|
1264
1286
|
return _(() => {
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
r.tag !== "" && (o(r.tag), g.current && g.current.focus(), a({
|
|
1268
|
-
type: le
|
|
1287
|
+
r.tag !== "" && (o(r.tag), m.current && m.current.focus(), a({
|
|
1288
|
+
type: ce
|
|
1269
1289
|
}));
|
|
1270
|
-
}, [r, a]),
|
|
1271
|
-
|
|
1290
|
+
}, [r, a]), _(() => {
|
|
1291
|
+
e && e.usage === 0 && e.messages.length === 0 && m.current && m.current.focus();
|
|
1292
|
+
}, [e]), /* @__PURE__ */ i("form", { className: "mt-2", onSubmit: p, children: /* @__PURE__ */ i(
|
|
1293
|
+
Pe,
|
|
1272
1294
|
{
|
|
1273
1295
|
mode: "dark",
|
|
1274
1296
|
focusMode: "light",
|
|
1275
|
-
ref:
|
|
1297
|
+
ref: m,
|
|
1276
1298
|
name: "chat-input",
|
|
1277
|
-
label:
|
|
1299
|
+
label: Se,
|
|
1278
1300
|
helperText: "Press ENTER to add a new line",
|
|
1279
1301
|
helperTextOnFocus: !0,
|
|
1280
1302
|
required: !0,
|
|
1281
1303
|
value: n,
|
|
1282
1304
|
onChange: (u) => o(u.target.value),
|
|
1283
|
-
onKeyDown:
|
|
1305
|
+
onKeyDown: Je([["mod+Enter", p]]),
|
|
1284
1306
|
rightElement: /* @__PURE__ */ i(
|
|
1285
|
-
|
|
1307
|
+
ne,
|
|
1286
1308
|
{
|
|
1287
1309
|
disabled: e == null ? void 0 : e.streaming,
|
|
1288
1310
|
noBorder: !0,
|
|
1289
1311
|
type: "submit",
|
|
1290
1312
|
mode: "light",
|
|
1291
1313
|
focusMode: "light",
|
|
1292
|
-
children:
|
|
1314
|
+
children: Re
|
|
1293
1315
|
}
|
|
1294
1316
|
)
|
|
1295
1317
|
}
|
|
1296
1318
|
) });
|
|
1297
|
-
},
|
|
1298
|
-
const { isAuthenticated: e } =
|
|
1299
|
-
return /* @__PURE__ */ v(
|
|
1319
|
+
}, Dt = () => {
|
|
1320
|
+
const { isAuthenticated: e } = U(), t = Ae(e);
|
|
1321
|
+
return /* @__PURE__ */ v(O, { children: [
|
|
1300
1322
|
/* @__PURE__ */ v("div", { className: t, children: [
|
|
1301
|
-
/* @__PURE__ */ i(
|
|
1302
|
-
/* @__PURE__ */ i(
|
|
1323
|
+
/* @__PURE__ */ i(Me, {}),
|
|
1324
|
+
/* @__PURE__ */ i(zt, {})
|
|
1303
1325
|
] }),
|
|
1304
|
-
/* @__PURE__ */ i(
|
|
1305
|
-
/* @__PURE__ */ i(
|
|
1326
|
+
/* @__PURE__ */ i(rt, {}),
|
|
1327
|
+
/* @__PURE__ */ i(Vt, {})
|
|
1306
1328
|
] });
|
|
1307
|
-
},
|
|
1329
|
+
}, Ht = (e, t) => (t == null ? void 0 : t.type) === de ? {
|
|
1308
1330
|
tags: e.tags,
|
|
1309
1331
|
tag: t.payload.tag
|
|
1310
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1332
|
+
} : (t == null ? void 0 : t.type) === ce ? {
|
|
1311
1333
|
tags: e.tags,
|
|
1312
1334
|
tag: ""
|
|
1313
1335
|
} : (t == null ? void 0 : t.type) === oe ? {
|
|
1314
1336
|
tags: t.payload.tags,
|
|
1315
1337
|
tag: ""
|
|
1316
|
-
} : e,
|
|
1338
|
+
} : e, jt = (e, t) => (t == null ? void 0 : t.type) === Le ? {
|
|
1317
1339
|
searchString: t.payload.searchString,
|
|
1318
1340
|
sortedCell: e.sortedCell,
|
|
1319
1341
|
sortDirection: e.sortDirection
|
|
1320
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1342
|
+
} : (t == null ? void 0 : t.type) === Oe ? {
|
|
1321
1343
|
searchString: e.searchString,
|
|
1322
1344
|
sortedCell: t.payload.sortedCell,
|
|
1323
1345
|
sortDirection: t.payload.sortDirection
|
|
1324
|
-
} : e,
|
|
1325
|
-
if ((t == null ? void 0 : t.type) ===
|
|
1346
|
+
} : e, Gt = (e, t) => {
|
|
1347
|
+
if ((t == null ? void 0 : t.type) === $e) {
|
|
1326
1348
|
const r = t.payload.messages.map((a) => ({
|
|
1327
1349
|
message: {
|
|
1328
1350
|
role: a.role,
|
|
@@ -1341,29 +1363,29 @@ const re = Pe(
|
|
|
1341
1363
|
tags: e.tags
|
|
1342
1364
|
};
|
|
1343
1365
|
}
|
|
1344
|
-
if ((t == null ? void 0 : t.type) ===
|
|
1366
|
+
if ((t == null ? void 0 : t.type) === S) {
|
|
1345
1367
|
const r = t.payload.message.role, a = t.payload.message.content, n = t.payload.message.name, o = t.payload.message.processingTime, c = t.payload.message.messageId;
|
|
1346
1368
|
if (r !== "") {
|
|
1347
|
-
const
|
|
1369
|
+
const d = {
|
|
1348
1370
|
role: r,
|
|
1349
1371
|
content: a,
|
|
1350
1372
|
name: n,
|
|
1351
1373
|
processingTime: o,
|
|
1352
1374
|
messageId: c
|
|
1353
1375
|
};
|
|
1354
|
-
if (r ===
|
|
1355
|
-
const
|
|
1376
|
+
if (r === I) {
|
|
1377
|
+
const m = e.messages.findIndex(
|
|
1356
1378
|
(g) => g.message.messageId === c
|
|
1357
1379
|
);
|
|
1358
|
-
if (
|
|
1359
|
-
const g = e.messages.map((
|
|
1380
|
+
if (m !== -1) {
|
|
1381
|
+
const g = e.messages.map((p, u) => u === m ? {
|
|
1360
1382
|
message: {
|
|
1361
|
-
...
|
|
1362
|
-
content: `${
|
|
1383
|
+
...p.message,
|
|
1384
|
+
content: `${p.message.content}${a}`,
|
|
1363
1385
|
processingTime: o,
|
|
1364
1386
|
name: n
|
|
1365
1387
|
}
|
|
1366
|
-
} :
|
|
1388
|
+
} : p);
|
|
1367
1389
|
return {
|
|
1368
1390
|
id: e.id,
|
|
1369
1391
|
model: e.model,
|
|
@@ -1385,21 +1407,21 @@ const re = Pe(
|
|
|
1385
1407
|
messages: [
|
|
1386
1408
|
...e.messages,
|
|
1387
1409
|
{
|
|
1388
|
-
message:
|
|
1410
|
+
message: d
|
|
1389
1411
|
}
|
|
1390
1412
|
]
|
|
1391
1413
|
};
|
|
1392
1414
|
}
|
|
1393
1415
|
}
|
|
1394
|
-
return (t == null ? void 0 : t.type) ===
|
|
1395
|
-
id:
|
|
1416
|
+
return (t == null ? void 0 : t.type) === se ? {
|
|
1417
|
+
id: P(),
|
|
1396
1418
|
model: e.model,
|
|
1397
1419
|
engine: e.engine,
|
|
1398
1420
|
usage: 0,
|
|
1399
1421
|
messages: [],
|
|
1400
1422
|
isComponent: e.isComponent,
|
|
1401
1423
|
tags: e.tags
|
|
1402
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1424
|
+
} : (t == null ? void 0 : t.type) === le ? {
|
|
1403
1425
|
id: e.id,
|
|
1404
1426
|
model: t.payload.model,
|
|
1405
1427
|
engine: e.engine,
|
|
@@ -1407,91 +1429,91 @@ const re = Pe(
|
|
|
1407
1429
|
usage: t.payload.usage,
|
|
1408
1430
|
messages: e.messages,
|
|
1409
1431
|
isComponent: e.isComponent
|
|
1410
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1432
|
+
} : (t == null ? void 0 : t.type) === ue ? {
|
|
1411
1433
|
...e,
|
|
1412
1434
|
engine: t.payload.engine
|
|
1413
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1435
|
+
} : (t == null ? void 0 : t.type) === ge ? {
|
|
1414
1436
|
...e,
|
|
1415
1437
|
streaming: t.payload.streaming
|
|
1416
1438
|
} : e;
|
|
1417
1439
|
};
|
|
1418
|
-
function
|
|
1419
|
-
const t =
|
|
1420
|
-
key:
|
|
1440
|
+
function Te({ isComponent: e = !1 }) {
|
|
1441
|
+
const t = B(!1), { getAccessToken: r, user: a } = U(), [n] = J({
|
|
1442
|
+
key: X + De,
|
|
1421
1443
|
initialValue: ""
|
|
1422
|
-
}), [o] =
|
|
1423
|
-
key:
|
|
1424
|
-
initialValue:
|
|
1425
|
-
}), [c,
|
|
1426
|
-
id:
|
|
1427
|
-
model:
|
|
1428
|
-
engine:
|
|
1444
|
+
}), [o] = J({
|
|
1445
|
+
key: X + He,
|
|
1446
|
+
initialValue: We.ASC
|
|
1447
|
+
}), [c, d] = V(Gt, {
|
|
1448
|
+
id: P(),
|
|
1449
|
+
model: M,
|
|
1450
|
+
engine: M,
|
|
1429
1451
|
usage: 0,
|
|
1430
1452
|
messages: [],
|
|
1431
1453
|
tags: [],
|
|
1432
1454
|
isComponent: e
|
|
1433
|
-
}), [
|
|
1455
|
+
}), [m, g] = V(jt, {
|
|
1434
1456
|
searchString: n,
|
|
1435
1457
|
sortedCell: "timestamp",
|
|
1436
1458
|
sortDirection: o
|
|
1437
|
-
}), [
|
|
1459
|
+
}), [p, u] = V(Ht, {
|
|
1438
1460
|
tag: ""
|
|
1439
|
-
}), [
|
|
1461
|
+
}), [b, s] = A({
|
|
1440
1462
|
version: "",
|
|
1441
1463
|
models: [],
|
|
1442
1464
|
plugins: [],
|
|
1443
|
-
engine:
|
|
1465
|
+
engine: M,
|
|
1444
1466
|
engines: []
|
|
1445
1467
|
});
|
|
1446
1468
|
return _(() => {
|
|
1447
|
-
|
|
1469
|
+
b.version !== "" || t.current || (async () => {
|
|
1448
1470
|
try {
|
|
1449
1471
|
t.current = !0;
|
|
1450
|
-
const
|
|
1472
|
+
const h = await me({
|
|
1451
1473
|
accessToken: await r(),
|
|
1452
|
-
type:
|
|
1474
|
+
type: he.ABOUT,
|
|
1453
1475
|
params: {
|
|
1454
1476
|
user: a == null ? void 0 : a.username
|
|
1455
1477
|
}
|
|
1456
1478
|
});
|
|
1457
|
-
t.current = !1,
|
|
1458
|
-
type:
|
|
1479
|
+
t.current = !1, h.status === 200 && (s(h.data), d({
|
|
1480
|
+
type: ue,
|
|
1459
1481
|
payload: {
|
|
1460
|
-
engine:
|
|
1482
|
+
engine: h.data.engine
|
|
1461
1483
|
}
|
|
1462
1484
|
}));
|
|
1463
1485
|
} catch {
|
|
1464
1486
|
}
|
|
1465
1487
|
})();
|
|
1466
|
-
}, [
|
|
1467
|
-
var
|
|
1468
|
-
(
|
|
1488
|
+
}, [b, r, a]), _(() => {
|
|
1489
|
+
var h;
|
|
1490
|
+
(h = document.getElementById("logo")) == null || h.classList.add("fadeOut"), setTimeout(() => {
|
|
1469
1491
|
var y;
|
|
1470
1492
|
(y = document.getElementById("root")) == null || y.classList.replace("app-hidden", "fadeIn");
|
|
1471
1493
|
}, 500);
|
|
1472
|
-
}), /* @__PURE__ */ i(
|
|
1473
|
-
|
|
1494
|
+
}), /* @__PURE__ */ i($.Provider, { value: { state: c, dispatch: d, serverStats: b }, children: /* @__PURE__ */ i(
|
|
1495
|
+
Ue.Provider,
|
|
1474
1496
|
{
|
|
1475
1497
|
value: {
|
|
1476
|
-
state:
|
|
1498
|
+
state: m,
|
|
1477
1499
|
dispatch: g
|
|
1478
1500
|
},
|
|
1479
1501
|
children: /* @__PURE__ */ v(
|
|
1480
|
-
|
|
1502
|
+
j.Provider,
|
|
1481
1503
|
{
|
|
1482
|
-
value: { state:
|
|
1504
|
+
value: { state: p, dispatch: u },
|
|
1483
1505
|
children: [
|
|
1484
|
-
/* @__PURE__ */ i(
|
|
1485
|
-
/* @__PURE__ */ i(Ve, { serverStats:
|
|
1506
|
+
/* @__PURE__ */ i(ze, { children: /* @__PURE__ */ i(Dt, {}) }),
|
|
1507
|
+
/* @__PURE__ */ i(Ve, { serverStats: b })
|
|
1486
1508
|
]
|
|
1487
1509
|
}
|
|
1488
1510
|
)
|
|
1489
1511
|
}
|
|
1490
1512
|
) });
|
|
1491
1513
|
}
|
|
1492
|
-
|
|
1493
|
-
const
|
|
1514
|
+
Te.displayName = "App";
|
|
1515
|
+
const qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Te }, Symbol.toStringTag, { value: "Module" }));
|
|
1494
1516
|
export {
|
|
1495
|
-
|
|
1496
|
-
|
|
1517
|
+
qt as App,
|
|
1518
|
+
Nt as le
|
|
1497
1519
|
};
|