@versini/sassysaint 5.1.4 → 5.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{App.DVd22A7h.js → App.68xrhTIC.js} +418 -400
- package/dist/chunks/{LazyHeader.ChGYAocD.js → LazyHeader.DPlhG-1q.js} +687 -635
- package/dist/chunks/{LazyMarkdownWithExtra.oW3Pc5wQ.js → LazyMarkdownWithExtra.o-qNkWIb.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.BcING2GM.js → LazyMessageAssistant.CkSUdQWN.js} +8 -8
- package/dist/chunks/{index.DuOyoYqm.js → index.B6C-bgBL.js} +186 -202
- package/dist/chunks/{index.QOymzv8v.js → index.DaWYWXXP.js} +663 -628
- package/dist/chunks/{index.BV7w1tBT.B-qjwzFk.js → index.jf7dGfT1.C4ay3jrh.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { LOCAL_STORAGE_PREFIX as
|
|
3
|
-
import {
|
|
4
|
-
import S, { useContext as U, useRef as
|
|
1
|
+
import { jsxs as v, Fragment as H, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { AppContext as j, TagsContext as q, LOCAL_STORAGE_PREFIX as M, b as _e, j as G, R as B, TAG_CONTENT as O, TAGS as C, isLastMessageFromRole as de, CANCEL as Ne, CLEAR as we, ACTION_RESET as le, ACTION_TOGGLE_TAG as ce, ROLE_ASSISTANT as I, ROLE_INTERNAL as Z, ROLE_USER as Y, rn as J, ROLE_SYSTEM as Ee, ROLE_HIDDEN as Ce, DEFAULT_AI_ENGINE as z, STATS_SEPARATOR as te, ACTION_MODEL as ge, ACTION_MESSAGE as L, ACTION_RESET_TAGS as ue, TYPE_QUESTION as Ie, SEND as Re, ACTION_STREAMING as me, ERROR_MESSAGE as Se, getMessageContaintWrapperClass as Ae, MessagesContainerHeader as Be, ACTION_SEARCH as Me, ACTION_SORT as Oe, ACTION_RESTORE as Le, ACTION_ENGINE as he, HistoryContext as $e, d as Ue, AppFooter as Ve, LOCAL_STORAGE_SEARCH as ze, LOCAL_STORAGE_SORT as De } from "./index.DaWYWXXP.js";
|
|
3
|
+
import { E as $, restCall as He, we as je, serviceCall as Pe, SERVICE_TYPES as Ge, f as Fe } from "./index.B6C-bgBL.js";
|
|
4
|
+
import S, { useContext as U, useRef as R, useEffect as E, useState as P, lazy as We, Suspense as re, useReducer as F } from "react";
|
|
5
5
|
import s from "clsx";
|
|
6
|
-
var
|
|
7
|
-
for (var
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
return (
|
|
6
|
+
var y = [];
|
|
7
|
+
for (var W = 0; W < 256; ++W)
|
|
8
|
+
y.push((W + 256).toString(16).slice(1));
|
|
9
|
+
function Ye(e, t = 0) {
|
|
10
|
+
return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
|
|
11
11
|
}
|
|
12
|
-
var V,
|
|
13
|
-
function
|
|
12
|
+
var V, qe = new Uint8Array(16);
|
|
13
|
+
function Ze() {
|
|
14
14
|
if (!V && (V = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !V))
|
|
15
15
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
16
|
-
return V(
|
|
16
|
+
return V(qe);
|
|
17
17
|
}
|
|
18
|
-
var
|
|
19
|
-
const
|
|
20
|
-
randomUUID:
|
|
18
|
+
var Je = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
19
|
+
const ae = {
|
|
20
|
+
randomUUID: Je
|
|
21
21
|
};
|
|
22
|
-
function
|
|
23
|
-
if (
|
|
24
|
-
return
|
|
22
|
+
function K(e, t, r) {
|
|
23
|
+
if (ae.randomUUID && !t && !e)
|
|
24
|
+
return ae.randomUUID();
|
|
25
25
|
e = e || {};
|
|
26
|
-
var a = e.random || (e.rng ||
|
|
27
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
26
|
+
var a = e.random || (e.rng || Ze)();
|
|
27
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ye(a);
|
|
28
28
|
}
|
|
29
|
-
const
|
|
30
|
-
const { dispatch: e, state: t } = U(
|
|
31
|
-
key:
|
|
29
|
+
const Ke = () => {
|
|
30
|
+
const { dispatch: e, state: t } = U(j), { dispatch: r } = U(q), a = "mt-2 flex justify-center rounded-md", n = R(null), o = R(!1), [l] = $({
|
|
31
|
+
key: M + "summarize-article",
|
|
32
32
|
initialValue: !1
|
|
33
33
|
}), [d] = $({
|
|
34
|
-
key:
|
|
34
|
+
key: M + "proofread-content",
|
|
35
35
|
initialValue: !1
|
|
36
|
-
}), [
|
|
37
|
-
key:
|
|
36
|
+
}), [b] = $({
|
|
37
|
+
key: M + "rephrase-content",
|
|
38
38
|
initialValue: !1
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
type:
|
|
39
|
+
}), m = (g) => {
|
|
40
|
+
g.preventDefault(), e({
|
|
41
|
+
type: le
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
44
|
E(() => {
|
|
45
45
|
(t == null ? void 0 : t.streaming) === !0 && !o.current && n.current && (o.current = !0, n.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (o.current = !1);
|
|
46
46
|
}, [t]);
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
type:
|
|
47
|
+
const p = (g, c) => {
|
|
48
|
+
g.preventDefault(), r({
|
|
49
|
+
type: ce,
|
|
50
50
|
payload: {
|
|
51
|
-
tag:
|
|
51
|
+
tag: c
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */ i(
|
|
58
|
-
|
|
55
|
+
return /* @__PURE__ */ v(H, { children: [
|
|
56
|
+
/* @__PURE__ */ v(_e, { alignHorizontal: "center", columnGap: 2, children: [
|
|
57
|
+
/* @__PURE__ */ i(G, { children: l && /* @__PURE__ */ i("div", { className: a, children: /* @__PURE__ */ i(
|
|
58
|
+
B,
|
|
59
59
|
{
|
|
60
60
|
noBorder: !0,
|
|
61
61
|
mode: "dark",
|
|
62
62
|
focusMode: "light",
|
|
63
63
|
size: "small",
|
|
64
|
-
onClick: (
|
|
64
|
+
onClick: (g) => p(g, C.SUMMARIZE_ARTICLE),
|
|
65
65
|
children: O[C.SUMMARIZE_ARTICLE].label
|
|
66
66
|
}
|
|
67
67
|
) }) }),
|
|
68
|
-
/* @__PURE__ */ i(
|
|
69
|
-
|
|
68
|
+
/* @__PURE__ */ i(G, { children: d && /* @__PURE__ */ i("div", { className: a, children: /* @__PURE__ */ i(
|
|
69
|
+
B,
|
|
70
70
|
{
|
|
71
71
|
noBorder: !0,
|
|
72
72
|
mode: "dark",
|
|
73
73
|
focusMode: "light",
|
|
74
74
|
size: "small",
|
|
75
|
-
onClick: (
|
|
75
|
+
onClick: (g) => p(g, C.PROOFREAD_CONTENT),
|
|
76
76
|
children: O[C.PROOFREAD_CONTENT].label
|
|
77
77
|
}
|
|
78
78
|
) }) }),
|
|
79
|
-
/* @__PURE__ */ i(
|
|
80
|
-
|
|
79
|
+
/* @__PURE__ */ i(G, { children: b && /* @__PURE__ */ i("div", { className: a, children: /* @__PURE__ */ i(
|
|
80
|
+
B,
|
|
81
81
|
{
|
|
82
82
|
noBorder: !0,
|
|
83
83
|
mode: "dark",
|
|
84
84
|
focusMode: "light",
|
|
85
85
|
size: "small",
|
|
86
|
-
onClick: (
|
|
86
|
+
onClick: (g) => p(g, C.REPHRASE_CONTENT),
|
|
87
87
|
children: O[C.REPHRASE_CONTENT].label
|
|
88
88
|
}
|
|
89
89
|
) }) })
|
|
90
90
|
] }),
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
de(I, t) && /* @__PURE__ */ i("div", { className: a, children: /* @__PURE__ */ i(
|
|
92
|
+
B,
|
|
93
93
|
{
|
|
94
94
|
noBorder: !0,
|
|
95
95
|
mode: "dark",
|
|
96
96
|
focusMode: "light",
|
|
97
97
|
ref: n,
|
|
98
|
-
onClick:
|
|
99
|
-
children: t != null && t.streaming ?
|
|
98
|
+
onClick: m,
|
|
99
|
+
children: t != null && t.streaming ? Ne : we
|
|
100
100
|
}
|
|
101
101
|
) })
|
|
102
102
|
] });
|
|
103
103
|
};
|
|
104
104
|
/*!
|
|
105
|
-
@versini/ui-bubble v1.0.
|
|
105
|
+
@versini/ui-bubble v1.0.11
|
|
106
106
|
© 2024 gizmette.com
|
|
107
107
|
*/
|
|
108
108
|
try {
|
|
109
109
|
window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
|
|
110
|
-
version: "1.0.
|
|
111
|
-
buildTime: "
|
|
110
|
+
version: "1.0.11",
|
|
111
|
+
buildTime: "10/02/2024 09:58 AM EDT",
|
|
112
112
|
homepage: "https://github.com/aversini/ui-components",
|
|
113
113
|
license: "MIT"
|
|
114
114
|
});
|
|
115
115
|
} catch {
|
|
116
116
|
}
|
|
117
|
-
const
|
|
117
|
+
const Qe = "av-bubble", oe = "av-button", Xe = (e) => {
|
|
118
118
|
let t = "";
|
|
119
119
|
if (typeof e == "number" || typeof e == "string")
|
|
120
120
|
t = "m-" + e;
|
|
@@ -123,28 +123,28 @@ const Ke = "av-bubble", ae = "av-button", Qe = (e) => {
|
|
|
123
123
|
(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(" ");
|
|
124
124
|
}
|
|
125
125
|
return t;
|
|
126
|
-
},
|
|
126
|
+
}, Q = "icon", et = "button", tt = "link", rt = ({
|
|
127
127
|
type: e,
|
|
128
128
|
size: t,
|
|
129
129
|
labelRight: r,
|
|
130
130
|
labelLeft: a,
|
|
131
131
|
align: n
|
|
132
132
|
}) => {
|
|
133
|
-
const o = "text-sm font-medium max-h-8 py-0",
|
|
133
|
+
const o = "text-sm font-medium max-h-8 py-0", l = "text-base font-medium max-h-9 py-1", d = "text-lg font-medium max-h-12 py-2";
|
|
134
134
|
switch (e) {
|
|
135
|
-
case
|
|
135
|
+
case et:
|
|
136
136
|
return s("px-4", {
|
|
137
137
|
[o]: t === "small",
|
|
138
|
-
[
|
|
138
|
+
[l]: t === "medium",
|
|
139
139
|
[d]: t === "large"
|
|
140
140
|
});
|
|
141
|
-
case
|
|
141
|
+
case tt:
|
|
142
142
|
return s("px-4 text-center", {
|
|
143
143
|
[o]: t === "small",
|
|
144
|
-
[
|
|
144
|
+
[l]: t === "medium",
|
|
145
145
|
[d]: t === "large"
|
|
146
146
|
});
|
|
147
|
-
case
|
|
147
|
+
case Q:
|
|
148
148
|
return s("inline-flex items-center", {
|
|
149
149
|
"justify-center": n === "center",
|
|
150
150
|
"justify-start": n === "left",
|
|
@@ -157,7 +157,7 @@ const Ke = "av-bubble", ae = "av-button", Qe = (e) => {
|
|
|
157
157
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
},
|
|
160
|
+
}, at = ({
|
|
161
161
|
mode: e,
|
|
162
162
|
noBackground: t,
|
|
163
163
|
noTruncate: r,
|
|
@@ -189,7 +189,7 @@ const Ke = "av-bubble", ae = "av-button", Qe = (e) => {
|
|
|
189
189
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
190
190
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
191
191
|
});
|
|
192
|
-
},
|
|
192
|
+
}, ot = ({
|
|
193
193
|
mode: e,
|
|
194
194
|
disabled: t,
|
|
195
195
|
variant: r
|
|
@@ -217,7 +217,7 @@ const Ke = "av-bubble", ae = "av-button", Qe = (e) => {
|
|
|
217
217
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
218
218
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
219
219
|
});
|
|
220
|
-
},
|
|
220
|
+
}, it = ({
|
|
221
221
|
mode: e,
|
|
222
222
|
disabled: t,
|
|
223
223
|
variant: r
|
|
@@ -245,7 +245,7 @@ const Ke = "av-bubble", ae = "av-button", Qe = (e) => {
|
|
|
245
245
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
246
246
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
247
247
|
});
|
|
248
|
-
},
|
|
248
|
+
}, nt = ({
|
|
249
249
|
mode: e,
|
|
250
250
|
noBorder: t,
|
|
251
251
|
variant: r
|
|
@@ -273,60 +273,60 @@ const Ke = "av-bubble", ae = "av-button", Qe = (e) => {
|
|
|
273
273
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
274
274
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
275
275
|
});
|
|
276
|
-
},
|
|
276
|
+
}, st = ({ focusMode: e }) => s("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
277
277
|
"focus:outline-focus-dark": e === "dark",
|
|
278
278
|
"focus:outline-focus-light": e === "light",
|
|
279
279
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
280
280
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
281
|
-
}),
|
|
281
|
+
}), pe = ({
|
|
282
282
|
type: e,
|
|
283
283
|
className: t,
|
|
284
284
|
raw: r,
|
|
285
285
|
mode: a,
|
|
286
286
|
focusMode: n,
|
|
287
287
|
disabled: o,
|
|
288
|
-
fullWidth:
|
|
288
|
+
fullWidth: l,
|
|
289
289
|
size: d,
|
|
290
|
-
noBorder:
|
|
291
|
-
labelRight:
|
|
292
|
-
labelLeft:
|
|
293
|
-
spacing:
|
|
294
|
-
noBackground:
|
|
295
|
-
variant:
|
|
296
|
-
noTruncate:
|
|
297
|
-
align:
|
|
298
|
-
}) => (
|
|
299
|
-
|
|
290
|
+
noBorder: b,
|
|
291
|
+
labelRight: m,
|
|
292
|
+
labelLeft: p,
|
|
293
|
+
spacing: g,
|
|
294
|
+
noBackground: c,
|
|
295
|
+
variant: u,
|
|
296
|
+
noTruncate: h,
|
|
297
|
+
align: f
|
|
298
|
+
}) => (u || (u = "primary"), r ? s(oe, t) : s(
|
|
299
|
+
oe,
|
|
300
300
|
t,
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
301
|
+
Xe(g),
|
|
302
|
+
at({ mode: a, variant: u, noBackground: c, noTruncate: h }),
|
|
303
|
+
rt({ type: e, size: d, labelRight: m, labelLeft: p, align: f }),
|
|
304
|
+
nt({ mode: a, variant: u, noBorder: b }),
|
|
305
|
+
st({ focusMode: n }),
|
|
306
|
+
ot({ mode: a, variant: u, disabled: o }),
|
|
307
|
+
it({ mode: a, variant: u, disabled: o }),
|
|
308
308
|
{
|
|
309
|
-
"w-full":
|
|
309
|
+
"w-full": l,
|
|
310
310
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
311
311
|
}
|
|
312
|
-
)),
|
|
312
|
+
)), dt = (e, t, r) => {
|
|
313
313
|
var a;
|
|
314
314
|
!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);
|
|
315
|
-
},
|
|
315
|
+
}, X = S.forwardRef((e, t) => {
|
|
316
316
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
317
317
|
return /* @__PURE__ */ i(
|
|
318
318
|
"button",
|
|
319
319
|
{
|
|
320
320
|
ref: t,
|
|
321
321
|
onClick: (o) => {
|
|
322
|
-
|
|
322
|
+
dt(o, a, r);
|
|
323
323
|
},
|
|
324
324
|
...n
|
|
325
325
|
}
|
|
326
326
|
);
|
|
327
327
|
});
|
|
328
|
-
|
|
329
|
-
const
|
|
328
|
+
X.displayName = "BaseButton";
|
|
329
|
+
const be = S.forwardRef(
|
|
330
330
|
({
|
|
331
331
|
children: e,
|
|
332
332
|
disabled: t = !1,
|
|
@@ -334,33 +334,33 @@ const pe = S.forwardRef(
|
|
|
334
334
|
focusMode: a = "system",
|
|
335
335
|
fullWidth: n = !1,
|
|
336
336
|
className: o,
|
|
337
|
-
type:
|
|
337
|
+
type: l = "button",
|
|
338
338
|
raw: d = !1,
|
|
339
|
-
noBorder:
|
|
340
|
-
"aria-label":
|
|
341
|
-
label:
|
|
342
|
-
size:
|
|
343
|
-
labelRight:
|
|
344
|
-
labelLeft:
|
|
345
|
-
spacing:
|
|
346
|
-
noBackground:
|
|
339
|
+
noBorder: b = !1,
|
|
340
|
+
"aria-label": m,
|
|
341
|
+
label: p,
|
|
342
|
+
size: g = "medium",
|
|
343
|
+
labelRight: c,
|
|
344
|
+
labelLeft: u,
|
|
345
|
+
spacing: h,
|
|
346
|
+
noBackground: f = !1,
|
|
347
347
|
align: _ = "center",
|
|
348
348
|
...N
|
|
349
349
|
}, w) => {
|
|
350
|
-
const k =
|
|
351
|
-
type:
|
|
350
|
+
const k = pe({
|
|
351
|
+
type: Q,
|
|
352
352
|
mode: r,
|
|
353
353
|
focusMode: a,
|
|
354
354
|
fullWidth: n,
|
|
355
355
|
disabled: t,
|
|
356
356
|
raw: d,
|
|
357
357
|
className: o,
|
|
358
|
-
noBorder:
|
|
359
|
-
size:
|
|
360
|
-
labelRight:
|
|
361
|
-
labelLeft:
|
|
362
|
-
spacing:
|
|
363
|
-
noBackground:
|
|
358
|
+
noBorder: b,
|
|
359
|
+
size: g,
|
|
360
|
+
labelRight: c,
|
|
361
|
+
labelLeft: u,
|
|
362
|
+
spacing: h,
|
|
363
|
+
noBackground: f,
|
|
364
364
|
align: _
|
|
365
365
|
}), x = s({
|
|
366
366
|
"text-copy-accent-dark": r === "light" && !d,
|
|
@@ -368,25 +368,25 @@ const pe = S.forwardRef(
|
|
|
368
368
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
|
|
369
369
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !d
|
|
370
370
|
});
|
|
371
|
-
return /* @__PURE__ */
|
|
372
|
-
|
|
371
|
+
return /* @__PURE__ */ v(
|
|
372
|
+
X,
|
|
373
373
|
{
|
|
374
374
|
ref: w,
|
|
375
375
|
className: k,
|
|
376
376
|
disabled: t,
|
|
377
|
-
type:
|
|
378
|
-
"aria-label":
|
|
377
|
+
type: l,
|
|
378
|
+
"aria-label": m || p,
|
|
379
379
|
...N,
|
|
380
380
|
children: [
|
|
381
|
-
|
|
381
|
+
u && /* @__PURE__ */ i("span", { className: "pr-2", children: u }),
|
|
382
382
|
/* @__PURE__ */ i("div", { className: x, children: e }),
|
|
383
|
-
|
|
383
|
+
c && /* @__PURE__ */ i("span", { className: "pl-2", children: c })
|
|
384
384
|
]
|
|
385
385
|
}
|
|
386
386
|
);
|
|
387
387
|
}
|
|
388
388
|
);
|
|
389
|
-
|
|
389
|
+
be.displayName = "ButtonIcon";
|
|
390
390
|
/*!
|
|
391
391
|
@versini/ui-button v1.1.10
|
|
392
392
|
© 2024 gizmette.com
|
|
@@ -394,13 +394,13 @@ pe.displayName = "ButtonIcon";
|
|
|
394
394
|
try {
|
|
395
395
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
396
396
|
version: "1.1.10",
|
|
397
|
-
buildTime: "
|
|
397
|
+
buildTime: "10/02/2024 09:57 AM EDT",
|
|
398
398
|
homepage: "https://github.com/aversini/ui-components",
|
|
399
399
|
license: "MIT"
|
|
400
400
|
});
|
|
401
401
|
} catch {
|
|
402
402
|
}
|
|
403
|
-
const
|
|
403
|
+
const lt = S.forwardRef(
|
|
404
404
|
({
|
|
405
405
|
children: e,
|
|
406
406
|
disabled: t = !1,
|
|
@@ -408,36 +408,36 @@ const dt = S.forwardRef(
|
|
|
408
408
|
focusMode: a = "system",
|
|
409
409
|
fullWidth: n = !1,
|
|
410
410
|
className: o,
|
|
411
|
-
type:
|
|
411
|
+
type: l = "button",
|
|
412
412
|
raw: d = !1,
|
|
413
|
-
noBorder:
|
|
414
|
-
"aria-label":
|
|
415
|
-
label:
|
|
416
|
-
size:
|
|
417
|
-
labelRight:
|
|
418
|
-
labelLeft:
|
|
419
|
-
spacing:
|
|
420
|
-
noBackground:
|
|
413
|
+
noBorder: b = !1,
|
|
414
|
+
"aria-label": m,
|
|
415
|
+
label: p,
|
|
416
|
+
size: g = "medium",
|
|
417
|
+
labelRight: c,
|
|
418
|
+
labelLeft: u,
|
|
419
|
+
spacing: h,
|
|
420
|
+
noBackground: f = !1,
|
|
421
421
|
align: _ = "center",
|
|
422
422
|
active: N = !1,
|
|
423
423
|
...w
|
|
424
424
|
}, k) => {
|
|
425
|
-
const x =
|
|
426
|
-
type:
|
|
425
|
+
const x = pe({
|
|
426
|
+
type: Q,
|
|
427
427
|
mode: r,
|
|
428
428
|
focusMode: a,
|
|
429
429
|
fullWidth: n,
|
|
430
430
|
disabled: t,
|
|
431
431
|
raw: d,
|
|
432
432
|
className: o,
|
|
433
|
-
noBorder:
|
|
434
|
-
size:
|
|
435
|
-
labelRight:
|
|
436
|
-
labelLeft:
|
|
437
|
-
spacing:
|
|
438
|
-
noBackground:
|
|
433
|
+
noBorder: b,
|
|
434
|
+
size: g,
|
|
435
|
+
labelRight: c,
|
|
436
|
+
labelLeft: u,
|
|
437
|
+
spacing: h,
|
|
438
|
+
noBackground: f,
|
|
439
439
|
align: _
|
|
440
|
-
}),
|
|
440
|
+
}), A = s({
|
|
441
441
|
"text-copy-accent-dark": r === "light" && !d,
|
|
442
442
|
"text-copy-light": r === "dark" && !d,
|
|
443
443
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
|
|
@@ -459,26 +459,26 @@ const dt = S.forwardRef(
|
|
|
459
459
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
460
460
|
}
|
|
461
461
|
) : "";
|
|
462
|
-
return /* @__PURE__ */ i("div", { className: T, children: /* @__PURE__ */
|
|
463
|
-
|
|
462
|
+
return /* @__PURE__ */ i("div", { className: T, children: /* @__PURE__ */ v(
|
|
463
|
+
X,
|
|
464
464
|
{
|
|
465
465
|
ref: k,
|
|
466
466
|
className: x,
|
|
467
467
|
disabled: t,
|
|
468
|
-
type:
|
|
469
|
-
"aria-label":
|
|
468
|
+
type: l,
|
|
469
|
+
"aria-label": m || p,
|
|
470
470
|
...w,
|
|
471
471
|
children: [
|
|
472
|
-
|
|
473
|
-
/* @__PURE__ */ i("div", { className:
|
|
474
|
-
|
|
472
|
+
u && /* @__PURE__ */ i("span", { className: "pr-2", children: u }),
|
|
473
|
+
/* @__PURE__ */ i("div", { className: A, children: e }),
|
|
474
|
+
c && /* @__PURE__ */ i("span", { className: "pl-2", children: c })
|
|
475
475
|
]
|
|
476
476
|
}
|
|
477
477
|
) });
|
|
478
478
|
}
|
|
479
479
|
);
|
|
480
|
-
|
|
481
|
-
const
|
|
480
|
+
lt.displayName = "ButtonSort";
|
|
481
|
+
const ct = (e) => {
|
|
482
482
|
let t = "";
|
|
483
483
|
if (typeof e == "number" || typeof e == "string")
|
|
484
484
|
t = "m-" + e;
|
|
@@ -487,38 +487,38 @@ const lt = (e) => {
|
|
|
487
487
|
(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(" ");
|
|
488
488
|
}
|
|
489
489
|
return t;
|
|
490
|
-
},
|
|
490
|
+
}, ye = ({
|
|
491
491
|
children: e,
|
|
492
492
|
fill: t,
|
|
493
493
|
viewBox: r,
|
|
494
494
|
className: a,
|
|
495
495
|
defaultViewBox: n,
|
|
496
496
|
defaultClassName: o,
|
|
497
|
-
spacing:
|
|
497
|
+
spacing: l,
|
|
498
498
|
title: d,
|
|
499
|
-
semantic:
|
|
500
|
-
...
|
|
499
|
+
semantic: b = !1,
|
|
500
|
+
...m
|
|
501
501
|
}) => {
|
|
502
|
-
const
|
|
503
|
-
|
|
502
|
+
const p = ct(l), g = s(
|
|
503
|
+
p,
|
|
504
504
|
a || o
|
|
505
505
|
);
|
|
506
|
-
return /* @__PURE__ */
|
|
506
|
+
return /* @__PURE__ */ v(H, { children: [
|
|
507
507
|
/* @__PURE__ */ i(
|
|
508
508
|
"svg",
|
|
509
509
|
{
|
|
510
510
|
xmlns: "http://www.w3.org/2000/svg",
|
|
511
|
-
className:
|
|
511
|
+
className: g,
|
|
512
512
|
viewBox: r || n,
|
|
513
513
|
fill: t || "currentColor",
|
|
514
514
|
role: "img",
|
|
515
|
-
"aria-hidden": !
|
|
515
|
+
"aria-hidden": !b,
|
|
516
516
|
focusable: !1,
|
|
517
|
-
...
|
|
517
|
+
...m,
|
|
518
518
|
children: e
|
|
519
519
|
}
|
|
520
520
|
),
|
|
521
|
-
d &&
|
|
521
|
+
d && b && /* @__PURE__ */ i("span", { className: "sr-only", children: d })
|
|
522
522
|
] });
|
|
523
523
|
};
|
|
524
524
|
/*!
|
|
@@ -528,21 +528,21 @@ const lt = (e) => {
|
|
|
528
528
|
try {
|
|
529
529
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
530
530
|
version: "1.4.17",
|
|
531
|
-
buildTime: "
|
|
531
|
+
buildTime: "10/02/2024 09:57 AM EDT",
|
|
532
532
|
homepage: "https://github.com/aversini/ui-components",
|
|
533
533
|
license: "MIT"
|
|
534
534
|
});
|
|
535
535
|
} catch {
|
|
536
536
|
}
|
|
537
|
-
const
|
|
537
|
+
const gt = ({
|
|
538
538
|
className: e,
|
|
539
539
|
viewBox: t,
|
|
540
540
|
spacing: r,
|
|
541
541
|
title: a,
|
|
542
542
|
monotone: n,
|
|
543
543
|
...o
|
|
544
|
-
}) => /* @__PURE__ */
|
|
545
|
-
|
|
544
|
+
}) => /* @__PURE__ */ v(
|
|
545
|
+
ye,
|
|
546
546
|
{
|
|
547
547
|
defaultViewBox: "0 0 448 512",
|
|
548
548
|
defaultClassName: "size-5",
|
|
@@ -562,7 +562,7 @@ const ct = ({
|
|
|
562
562
|
/* @__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" })
|
|
563
563
|
]
|
|
564
564
|
}
|
|
565
|
-
),
|
|
565
|
+
), ut = ({
|
|
566
566
|
className: e,
|
|
567
567
|
viewBox: t,
|
|
568
568
|
spacing: r,
|
|
@@ -570,7 +570,7 @@ const ct = ({
|
|
|
570
570
|
monotone: n,
|
|
571
571
|
...o
|
|
572
572
|
}) => /* @__PURE__ */ i(
|
|
573
|
-
|
|
573
|
+
ye,
|
|
574
574
|
{
|
|
575
575
|
defaultViewBox: "0 0 512 512",
|
|
576
576
|
defaultClassName: "size-5",
|
|
@@ -583,19 +583,19 @@ const ct = ({
|
|
|
583
583
|
}
|
|
584
584
|
);
|
|
585
585
|
/*!
|
|
586
|
-
@versini/ui-icons v1.
|
|
586
|
+
@versini/ui-icons v1.14.0
|
|
587
587
|
© 2024 gizmette.com
|
|
588
588
|
*/
|
|
589
589
|
try {
|
|
590
590
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
591
|
-
version: "1.
|
|
592
|
-
buildTime: "
|
|
591
|
+
version: "1.14.0",
|
|
592
|
+
buildTime: "10/02/2024 09:57 AM EDT",
|
|
593
593
|
homepage: "https://github.com/aversini/ui-components",
|
|
594
594
|
license: "MIT"
|
|
595
595
|
});
|
|
596
596
|
} catch {
|
|
597
597
|
}
|
|
598
|
-
const
|
|
598
|
+
const mt = (e) => {
|
|
599
599
|
let t = "";
|
|
600
600
|
if (typeof e == "number" || typeof e == "string")
|
|
601
601
|
t = "m-" + e;
|
|
@@ -604,15 +604,15 @@ const ut = (e) => {
|
|
|
604
604
|
(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(" ");
|
|
605
605
|
}
|
|
606
606
|
return t;
|
|
607
|
-
},
|
|
607
|
+
}, ht = () => "p-4 sm:max-w-md md:max-w-2xl", pt = ({ kind: e }) => s({
|
|
608
608
|
"bg-surface-lighter dark:bg-surface-dark": e === "left",
|
|
609
609
|
"bg-surface-accent": e === "right"
|
|
610
|
-
}),
|
|
610
|
+
}), bt = ({ kind: e }) => s(
|
|
611
611
|
"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",
|
|
612
612
|
{
|
|
613
613
|
"text-copy-lighter": e === "right"
|
|
614
614
|
}
|
|
615
|
-
),
|
|
615
|
+
), yt = ({ kind: e }) => s("rounded-b-xl", {
|
|
616
616
|
"rounded-tr-xl": e === "left",
|
|
617
617
|
"rounded-tl-xl": e === "right"
|
|
618
618
|
}), ft = ({
|
|
@@ -622,19 +622,19 @@ const ut = (e) => {
|
|
|
622
622
|
}) => {
|
|
623
623
|
const a = s(
|
|
624
624
|
t,
|
|
625
|
-
|
|
625
|
+
Qe,
|
|
626
626
|
"flex items-start",
|
|
627
|
-
|
|
627
|
+
mt(r),
|
|
628
628
|
{
|
|
629
629
|
"flex-row-reverse": e === "right"
|
|
630
630
|
}
|
|
631
631
|
), n = s(
|
|
632
632
|
"flex flex-col empty:hidden",
|
|
633
|
-
|
|
633
|
+
ht(),
|
|
634
|
+
bt({ kind: e }),
|
|
634
635
|
pt({ kind: e }),
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
), o = "pr-2 pt-1 text-end text-xs text-copy-light", g = s("flex flex-col-reverse gap-2 sm:flex-row", {
|
|
636
|
+
yt({ kind: e })
|
|
637
|
+
), o = "pr-2 pt-1 text-end text-xs text-copy-light", l = s("flex flex-col-reverse gap-2 sm:flex-row", {
|
|
638
638
|
"ml-2": e === "left",
|
|
639
639
|
"mr-2": e === "right"
|
|
640
640
|
});
|
|
@@ -642,55 +642,55 @@ const ut = (e) => {
|
|
|
642
642
|
wrapper: a,
|
|
643
643
|
main: n,
|
|
644
644
|
footer: o,
|
|
645
|
-
copyButton:
|
|
645
|
+
copyButton: l
|
|
646
646
|
};
|
|
647
|
-
},
|
|
647
|
+
}, vt = ({
|
|
648
648
|
children: e,
|
|
649
649
|
kind: t = "left",
|
|
650
650
|
className: r,
|
|
651
651
|
footer: a,
|
|
652
652
|
rawFooter: n,
|
|
653
653
|
copyToClipboard: o,
|
|
654
|
-
copyToClipboardFocusMode:
|
|
654
|
+
copyToClipboardFocusMode: l = "system",
|
|
655
655
|
copyToClipboardMode: d = "system",
|
|
656
|
-
spacing:
|
|
656
|
+
spacing: b
|
|
657
657
|
}) => {
|
|
658
|
-
const [
|
|
659
|
-
|
|
658
|
+
const [m, p] = P(!1), g = ft({ kind: t, className: r, spacing: b }), c = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), u = () => {
|
|
659
|
+
p(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
660
660
|
};
|
|
661
661
|
return E(() => {
|
|
662
|
-
let
|
|
663
|
-
return
|
|
664
|
-
|
|
662
|
+
let h;
|
|
663
|
+
return m && (h = window.setTimeout(() => {
|
|
664
|
+
p(!1);
|
|
665
665
|
}, 3e3)), () => {
|
|
666
|
-
clearTimeout(
|
|
666
|
+
clearTimeout(h);
|
|
667
667
|
};
|
|
668
|
-
}, [
|
|
669
|
-
/* @__PURE__ */
|
|
670
|
-
/* @__PURE__ */ i("div", { className:
|
|
671
|
-
a && Object.keys(a).map((
|
|
672
|
-
|
|
668
|
+
}, [m]), /* @__PURE__ */ v("div", { className: g.wrapper, children: [
|
|
669
|
+
/* @__PURE__ */ v("div", { children: [
|
|
670
|
+
/* @__PURE__ */ i("div", { className: g.main, children: e }),
|
|
671
|
+
a && Object.keys(a).map((h) => a[h] ? /* @__PURE__ */ i("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: g.footer, children: [
|
|
672
|
+
h,
|
|
673
673
|
": ",
|
|
674
|
-
a[
|
|
675
|
-
] }) }, `-${
|
|
674
|
+
a[h]
|
|
675
|
+
] }) }, `-${h}`) : null),
|
|
676
676
|
n && n
|
|
677
677
|
] }),
|
|
678
|
-
|
|
679
|
-
|
|
678
|
+
c && /* @__PURE__ */ i("div", { className: g.copyButton, children: /* @__PURE__ */ i(
|
|
679
|
+
be,
|
|
680
680
|
{
|
|
681
681
|
noBorder: !0,
|
|
682
682
|
noBackground: !0,
|
|
683
683
|
size: "small",
|
|
684
684
|
mode: d,
|
|
685
|
-
focusMode:
|
|
686
|
-
label:
|
|
687
|
-
onClick:
|
|
688
|
-
disabled:
|
|
689
|
-
children:
|
|
685
|
+
focusMode: l,
|
|
686
|
+
label: m ? "Copied to clipboard" : "Copy to clipboard",
|
|
687
|
+
onClick: u,
|
|
688
|
+
disabled: m,
|
|
689
|
+
children: m ? /* @__PURE__ */ i(gt, { className: "size-3" }) : /* @__PURE__ */ i(ut, { className: "size-3" })
|
|
690
690
|
}
|
|
691
691
|
) })
|
|
692
692
|
] });
|
|
693
|
-
},
|
|
693
|
+
}, ie = "av-button", kt = (e) => {
|
|
694
694
|
let t = "";
|
|
695
695
|
if (typeof e == "number" || typeof e == "string")
|
|
696
696
|
t = "m-" + e;
|
|
@@ -699,25 +699,25 @@ const ut = (e) => {
|
|
|
699
699
|
(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(" ");
|
|
700
700
|
}
|
|
701
701
|
return t;
|
|
702
|
-
}, fe = "icon",
|
|
702
|
+
}, fe = "icon", ve = "button", xt = "link", Tt = ({
|
|
703
703
|
type: e,
|
|
704
704
|
size: t,
|
|
705
705
|
labelRight: r,
|
|
706
706
|
labelLeft: a,
|
|
707
707
|
align: n
|
|
708
708
|
}) => {
|
|
709
|
-
const o = "text-sm font-medium max-h-8 py-0",
|
|
709
|
+
const o = "text-sm font-medium max-h-8 py-0", l = "text-base font-medium max-h-9 py-1", d = "text-lg font-medium max-h-12 py-2";
|
|
710
710
|
switch (e) {
|
|
711
|
-
case
|
|
711
|
+
case ve:
|
|
712
712
|
return s("px-4", {
|
|
713
713
|
[o]: t === "small",
|
|
714
|
-
[
|
|
714
|
+
[l]: t === "medium",
|
|
715
715
|
[d]: t === "large"
|
|
716
716
|
});
|
|
717
|
-
case
|
|
717
|
+
case xt:
|
|
718
718
|
return s("px-4 text-center", {
|
|
719
719
|
[o]: t === "small",
|
|
720
|
-
[
|
|
720
|
+
[l]: t === "medium",
|
|
721
721
|
[d]: t === "large"
|
|
722
722
|
});
|
|
723
723
|
case fe:
|
|
@@ -733,7 +733,7 @@ const ut = (e) => {
|
|
|
733
733
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
734
734
|
});
|
|
735
735
|
}
|
|
736
|
-
},
|
|
736
|
+
}, _t = ({
|
|
737
737
|
mode: e,
|
|
738
738
|
noBackground: t,
|
|
739
739
|
noTruncate: r,
|
|
@@ -765,7 +765,7 @@ const ut = (e) => {
|
|
|
765
765
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
766
766
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
767
767
|
});
|
|
768
|
-
},
|
|
768
|
+
}, Nt = ({
|
|
769
769
|
mode: e,
|
|
770
770
|
disabled: t,
|
|
771
771
|
variant: r
|
|
@@ -793,7 +793,7 @@ const ut = (e) => {
|
|
|
793
793
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
794
794
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
795
795
|
});
|
|
796
|
-
},
|
|
796
|
+
}, wt = ({
|
|
797
797
|
mode: e,
|
|
798
798
|
disabled: t,
|
|
799
799
|
variant: r
|
|
@@ -821,7 +821,7 @@ const ut = (e) => {
|
|
|
821
821
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
822
822
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
823
823
|
});
|
|
824
|
-
},
|
|
824
|
+
}, Et = ({
|
|
825
825
|
mode: e,
|
|
826
826
|
noBorder: t,
|
|
827
827
|
variant: r
|
|
@@ -849,60 +849,60 @@ const ut = (e) => {
|
|
|
849
849
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
850
850
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
851
851
|
});
|
|
852
|
-
},
|
|
852
|
+
}, Ct = ({ focusMode: e }) => s("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
853
853
|
"focus:outline-focus-dark": e === "dark",
|
|
854
854
|
"focus:outline-focus-light": e === "light",
|
|
855
855
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
856
856
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
857
|
-
}),
|
|
857
|
+
}), ke = ({
|
|
858
858
|
type: e,
|
|
859
859
|
className: t,
|
|
860
860
|
raw: r,
|
|
861
861
|
mode: a,
|
|
862
862
|
focusMode: n,
|
|
863
863
|
disabled: o,
|
|
864
|
-
fullWidth:
|
|
864
|
+
fullWidth: l,
|
|
865
865
|
size: d,
|
|
866
|
-
noBorder:
|
|
867
|
-
labelRight:
|
|
868
|
-
labelLeft:
|
|
869
|
-
spacing:
|
|
870
|
-
noBackground:
|
|
871
|
-
variant:
|
|
872
|
-
noTruncate:
|
|
873
|
-
align:
|
|
874
|
-
}) => (
|
|
875
|
-
|
|
866
|
+
noBorder: b,
|
|
867
|
+
labelRight: m,
|
|
868
|
+
labelLeft: p,
|
|
869
|
+
spacing: g,
|
|
870
|
+
noBackground: c,
|
|
871
|
+
variant: u,
|
|
872
|
+
noTruncate: h,
|
|
873
|
+
align: f
|
|
874
|
+
}) => (u || (u = "primary"), r ? s(ie, t) : s(
|
|
875
|
+
ie,
|
|
876
876
|
t,
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
877
|
+
kt(g),
|
|
878
|
+
_t({ mode: a, variant: u, noBackground: c, noTruncate: h }),
|
|
879
|
+
Tt({ type: e, size: d, labelRight: m, labelLeft: p, align: f }),
|
|
880
|
+
Et({ mode: a, variant: u, noBorder: b }),
|
|
881
|
+
Ct({ focusMode: n }),
|
|
882
|
+
Nt({ mode: a, variant: u, disabled: o }),
|
|
883
|
+
wt({ mode: a, variant: u, disabled: o }),
|
|
884
884
|
{
|
|
885
|
-
"w-full":
|
|
885
|
+
"w-full": l,
|
|
886
886
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
887
887
|
}
|
|
888
|
-
)),
|
|
888
|
+
)), It = (e, t, r) => {
|
|
889
889
|
var a;
|
|
890
890
|
!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);
|
|
891
|
-
},
|
|
891
|
+
}, ee = S.forwardRef((e, t) => {
|
|
892
892
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
893
893
|
return /* @__PURE__ */ i(
|
|
894
894
|
"button",
|
|
895
895
|
{
|
|
896
896
|
ref: t,
|
|
897
897
|
onClick: (o) => {
|
|
898
|
-
|
|
898
|
+
It(o, a, r);
|
|
899
899
|
},
|
|
900
900
|
...n
|
|
901
901
|
}
|
|
902
902
|
);
|
|
903
903
|
});
|
|
904
|
-
|
|
905
|
-
const
|
|
904
|
+
ee.displayName = "BaseButton";
|
|
905
|
+
const xe = S.forwardRef(
|
|
906
906
|
({
|
|
907
907
|
children: e,
|
|
908
908
|
disabled: t = !1,
|
|
@@ -910,41 +910,41 @@ const ke = S.forwardRef(
|
|
|
910
910
|
focusMode: a = "system",
|
|
911
911
|
fullWidth: n = !1,
|
|
912
912
|
className: o,
|
|
913
|
-
size:
|
|
913
|
+
size: l = "medium",
|
|
914
914
|
raw: d = !1,
|
|
915
|
-
noBorder:
|
|
916
|
-
spacing:
|
|
917
|
-
variant:
|
|
918
|
-
noTruncate:
|
|
919
|
-
...
|
|
920
|
-
},
|
|
921
|
-
const
|
|
922
|
-
type:
|
|
915
|
+
noBorder: b = !1,
|
|
916
|
+
spacing: m,
|
|
917
|
+
variant: p = "primary",
|
|
918
|
+
noTruncate: g = !1,
|
|
919
|
+
...c
|
|
920
|
+
}, u) => {
|
|
921
|
+
const h = ke({
|
|
922
|
+
type: ve,
|
|
923
923
|
mode: r,
|
|
924
924
|
focusMode: a,
|
|
925
925
|
fullWidth: n,
|
|
926
926
|
disabled: t,
|
|
927
927
|
raw: d,
|
|
928
928
|
className: o,
|
|
929
|
-
size:
|
|
930
|
-
noBorder:
|
|
931
|
-
spacing:
|
|
932
|
-
variant:
|
|
933
|
-
noTruncate:
|
|
929
|
+
size: l,
|
|
930
|
+
noBorder: b,
|
|
931
|
+
spacing: m,
|
|
932
|
+
variant: p,
|
|
933
|
+
noTruncate: g
|
|
934
934
|
});
|
|
935
935
|
return /* @__PURE__ */ i(
|
|
936
|
-
|
|
936
|
+
ee,
|
|
937
937
|
{
|
|
938
|
-
ref:
|
|
939
|
-
className:
|
|
938
|
+
ref: u,
|
|
939
|
+
className: h,
|
|
940
940
|
disabled: t,
|
|
941
|
-
...
|
|
941
|
+
...c,
|
|
942
942
|
children: e
|
|
943
943
|
}
|
|
944
944
|
);
|
|
945
945
|
}
|
|
946
946
|
);
|
|
947
|
-
|
|
947
|
+
xe.displayName = "Button";
|
|
948
948
|
/*!
|
|
949
949
|
@versini/ui-button v1.1.10
|
|
950
950
|
© 2024 gizmette.com
|
|
@@ -966,21 +966,21 @@ const Rt = S.forwardRef(
|
|
|
966
966
|
focusMode: a = "system",
|
|
967
967
|
fullWidth: n = !1,
|
|
968
968
|
className: o,
|
|
969
|
-
type:
|
|
969
|
+
type: l = "button",
|
|
970
970
|
raw: d = !1,
|
|
971
|
-
noBorder:
|
|
972
|
-
"aria-label":
|
|
973
|
-
label:
|
|
974
|
-
size:
|
|
975
|
-
labelRight:
|
|
976
|
-
labelLeft:
|
|
977
|
-
spacing:
|
|
978
|
-
noBackground:
|
|
971
|
+
noBorder: b = !1,
|
|
972
|
+
"aria-label": m,
|
|
973
|
+
label: p,
|
|
974
|
+
size: g = "medium",
|
|
975
|
+
labelRight: c,
|
|
976
|
+
labelLeft: u,
|
|
977
|
+
spacing: h,
|
|
978
|
+
noBackground: f = !1,
|
|
979
979
|
align: _ = "center",
|
|
980
980
|
active: N = !1,
|
|
981
981
|
...w
|
|
982
982
|
}, k) => {
|
|
983
|
-
const x =
|
|
983
|
+
const x = ke({
|
|
984
984
|
type: fe,
|
|
985
985
|
mode: r,
|
|
986
986
|
focusMode: a,
|
|
@@ -988,14 +988,14 @@ const Rt = S.forwardRef(
|
|
|
988
988
|
disabled: t,
|
|
989
989
|
raw: d,
|
|
990
990
|
className: o,
|
|
991
|
-
noBorder:
|
|
992
|
-
size:
|
|
993
|
-
labelRight:
|
|
994
|
-
labelLeft:
|
|
995
|
-
spacing:
|
|
996
|
-
noBackground:
|
|
991
|
+
noBorder: b,
|
|
992
|
+
size: g,
|
|
993
|
+
labelRight: c,
|
|
994
|
+
labelLeft: u,
|
|
995
|
+
spacing: h,
|
|
996
|
+
noBackground: f,
|
|
997
997
|
align: _
|
|
998
|
-
}),
|
|
998
|
+
}), A = s({
|
|
999
999
|
"text-copy-accent-dark": r === "light" && !d,
|
|
1000
1000
|
"text-copy-light": r === "dark" && !d,
|
|
1001
1001
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
|
|
@@ -1017,28 +1017,28 @@ const Rt = S.forwardRef(
|
|
|
1017
1017
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
1018
1018
|
}
|
|
1019
1019
|
) : "";
|
|
1020
|
-
return /* @__PURE__ */ i("div", { className: T, children: /* @__PURE__ */
|
|
1021
|
-
|
|
1020
|
+
return /* @__PURE__ */ i("div", { className: T, children: /* @__PURE__ */ v(
|
|
1021
|
+
ee,
|
|
1022
1022
|
{
|
|
1023
1023
|
ref: k,
|
|
1024
1024
|
className: x,
|
|
1025
1025
|
disabled: t,
|
|
1026
|
-
type:
|
|
1027
|
-
"aria-label":
|
|
1026
|
+
type: l,
|
|
1027
|
+
"aria-label": m || p,
|
|
1028
1028
|
...w,
|
|
1029
1029
|
children: [
|
|
1030
|
-
|
|
1031
|
-
/* @__PURE__ */ i("div", { className:
|
|
1032
|
-
|
|
1030
|
+
u && /* @__PURE__ */ i("span", { className: "pr-2", children: u }),
|
|
1031
|
+
/* @__PURE__ */ i("div", { className: A, children: e }),
|
|
1032
|
+
c && /* @__PURE__ */ i("span", { className: "pl-2", children: c })
|
|
1033
1033
|
]
|
|
1034
1034
|
}
|
|
1035
1035
|
) });
|
|
1036
1036
|
}
|
|
1037
1037
|
);
|
|
1038
1038
|
Rt.displayName = "ButtonSort";
|
|
1039
|
-
const
|
|
1039
|
+
const St = 200, At = ({
|
|
1040
1040
|
string: e,
|
|
1041
|
-
idealLength: t =
|
|
1041
|
+
idealLength: t = St
|
|
1042
1042
|
}) => {
|
|
1043
1043
|
if (e.length <= t)
|
|
1044
1044
|
return { string: e, isTruncated: !1 };
|
|
@@ -1055,24 +1055,24 @@ const It = 200, St = ({
|
|
|
1055
1055
|
mode: r = "system",
|
|
1056
1056
|
focusMode: a = "system"
|
|
1057
1057
|
}) => {
|
|
1058
|
-
const [n, o] =
|
|
1058
|
+
const [n, o] = P(!1);
|
|
1059
1059
|
if (typeof e != "string")
|
|
1060
1060
|
return e;
|
|
1061
|
-
const { string:
|
|
1061
|
+
const { string: l, isTruncated: d } = At({
|
|
1062
1062
|
string: e,
|
|
1063
1063
|
idealLength: t
|
|
1064
1064
|
});
|
|
1065
|
-
return /* @__PURE__ */
|
|
1066
|
-
n ? e :
|
|
1065
|
+
return /* @__PURE__ */ v("span", { children: [
|
|
1066
|
+
n ? e : l,
|
|
1067
1067
|
d && /* @__PURE__ */ i(
|
|
1068
|
-
|
|
1068
|
+
xe,
|
|
1069
1069
|
{
|
|
1070
1070
|
mode: r,
|
|
1071
1071
|
focusMode: a,
|
|
1072
1072
|
spacing: { l: 2 },
|
|
1073
1073
|
size: "small",
|
|
1074
|
-
onClick: (
|
|
1075
|
-
|
|
1074
|
+
onClick: (b) => {
|
|
1075
|
+
b.preventDefault(), o(!n);
|
|
1076
1076
|
},
|
|
1077
1077
|
children: n ? "less..." : "more..."
|
|
1078
1078
|
}
|
|
@@ -1092,25 +1092,25 @@ try {
|
|
|
1092
1092
|
});
|
|
1093
1093
|
} catch {
|
|
1094
1094
|
}
|
|
1095
|
-
const
|
|
1095
|
+
const ne = We(
|
|
1096
1096
|
() => import(
|
|
1097
1097
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
1098
|
-
"./LazyMessageAssistant.
|
|
1098
|
+
"./LazyMessageAssistant.CkSUdQWN.js"
|
|
1099
1099
|
).then((e) => e.LazyMessageAssistant)
|
|
1100
1100
|
), Mt = () => {
|
|
1101
|
-
const { state: e } = U(
|
|
1102
|
-
return /* @__PURE__ */
|
|
1101
|
+
const { state: e } = U(j);
|
|
1102
|
+
return /* @__PURE__ */ v(H, { children: [
|
|
1103
1103
|
e && e.messages.length > 0 && e.messages.map((t, r) => {
|
|
1104
|
-
const { role: a, content: n, name: o, processingTime:
|
|
1105
|
-
return (a ===
|
|
1106
|
-
|
|
1104
|
+
const { role: a, content: n, name: o, processingTime: l } = t.message;
|
|
1105
|
+
return (a === I || a === Z) && n ? /* @__PURE__ */ i(re, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(
|
|
1106
|
+
ne,
|
|
1107
1107
|
{
|
|
1108
1108
|
name: o,
|
|
1109
|
-
processingTime:
|
|
1109
|
+
processingTime: l,
|
|
1110
1110
|
children: n
|
|
1111
1111
|
}
|
|
1112
|
-
) }, `${r}-${a}`) : a ===
|
|
1113
|
-
|
|
1112
|
+
) }, `${r}-${a}`) : a === Y && n ? /* @__PURE__ */ i(
|
|
1113
|
+
vt,
|
|
1114
1114
|
{
|
|
1115
1115
|
kind: "right",
|
|
1116
1116
|
copyToClipboard: n,
|
|
@@ -1120,65 +1120,65 @@ const ie = Fe(
|
|
|
1120
1120
|
`${r}-${a}`
|
|
1121
1121
|
) : null;
|
|
1122
1122
|
}),
|
|
1123
|
-
|
|
1123
|
+
de(Y, e) && /* @__PURE__ */ i(re, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(ne, { loading: !0 }) })
|
|
1124
1124
|
] });
|
|
1125
|
-
},
|
|
1125
|
+
}, D = (e, t) => {
|
|
1126
1126
|
e({
|
|
1127
1127
|
type: me,
|
|
1128
1128
|
payload: {
|
|
1129
1129
|
streaming: t
|
|
1130
1130
|
}
|
|
1131
1131
|
});
|
|
1132
|
-
},
|
|
1133
|
-
|
|
1132
|
+
}, se = (e) => {
|
|
1133
|
+
D(e, !1), e({
|
|
1134
1134
|
type: L,
|
|
1135
1135
|
payload: {
|
|
1136
1136
|
message: {
|
|
1137
|
-
role:
|
|
1138
|
-
content:
|
|
1137
|
+
role: Z,
|
|
1138
|
+
content: Se
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
1141
|
});
|
|
1142
|
-
},
|
|
1143
|
-
const { state: e, dispatch: t } = U(
|
|
1142
|
+
}, Ot = () => {
|
|
1143
|
+
const { state: e, dispatch: t } = U(j), { state: r, dispatch: a } = U(q), [n, o] = P(""), { getAccessToken: l, user: d } = J(), b = R(!1), m = R(null), p = R(
|
|
1144
1144
|
null
|
|
1145
1145
|
);
|
|
1146
1146
|
E(() => {
|
|
1147
1147
|
(async () => {
|
|
1148
|
-
var
|
|
1148
|
+
var u;
|
|
1149
1149
|
if (!e || e.messages.length === 0) {
|
|
1150
|
-
(
|
|
1150
|
+
(u = p == null ? void 0 : p.current) == null || u.cancel();
|
|
1151
1151
|
return;
|
|
1152
1152
|
}
|
|
1153
|
-
const
|
|
1154
|
-
if (!(e.messages.length === 0 ||
|
|
1153
|
+
const c = e.messages[e.messages.length - 1];
|
|
1154
|
+
if (!(e.messages.length === 0 || c.message.role === I || c.message.role === Ee || c.message.role === Z || c.message.role === Ce))
|
|
1155
1155
|
try {
|
|
1156
|
-
const
|
|
1157
|
-
accessToken: await
|
|
1156
|
+
const h = await He({
|
|
1157
|
+
accessToken: await l(),
|
|
1158
1158
|
name: "generate",
|
|
1159
1159
|
data: {
|
|
1160
1160
|
messages: e.messages,
|
|
1161
|
-
model:
|
|
1161
|
+
model: e.engine || z,
|
|
1162
1162
|
user: (d == null ? void 0 : d.username) || "",
|
|
1163
1163
|
id: e.id,
|
|
1164
1164
|
usage: e.usage
|
|
1165
1165
|
}
|
|
1166
1166
|
});
|
|
1167
|
-
if (
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1167
|
+
if (h && h.ok) {
|
|
1168
|
+
const f = K();
|
|
1169
|
+
p.current = h.body.getReader();
|
|
1170
1170
|
const _ = new TextDecoder();
|
|
1171
1171
|
for (; ; ) {
|
|
1172
|
-
|
|
1173
|
-
const { done: N, value: w } = await
|
|
1172
|
+
D(t, !0);
|
|
1173
|
+
const { done: N, value: w } = await p.current.read();
|
|
1174
1174
|
if (N) {
|
|
1175
|
-
|
|
1175
|
+
D(t, !1);
|
|
1176
1176
|
break;
|
|
1177
1177
|
}
|
|
1178
|
-
const k = _.decode(w, { stream: !0 }), x = k.indexOf(
|
|
1178
|
+
const k = _.decode(w, { stream: !0 }), x = k.indexOf(te);
|
|
1179
1179
|
if (x !== -1) {
|
|
1180
|
-
const
|
|
1181
|
-
k.substring(x +
|
|
1180
|
+
const A = k.substring(0, x), T = JSON.parse(
|
|
1181
|
+
k.substring(x + te.length)
|
|
1182
1182
|
);
|
|
1183
1183
|
t({
|
|
1184
1184
|
type: ge,
|
|
@@ -1190,14 +1190,14 @@ const ie = Fe(
|
|
|
1190
1190
|
type: L,
|
|
1191
1191
|
payload: {
|
|
1192
1192
|
message: {
|
|
1193
|
-
content:
|
|
1194
|
-
role:
|
|
1195
|
-
messageId:
|
|
1193
|
+
content: A,
|
|
1194
|
+
role: I,
|
|
1195
|
+
messageId: f,
|
|
1196
1196
|
processingTime: T.processingTime,
|
|
1197
1197
|
name: T.name
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
|
-
}),
|
|
1200
|
+
}), D(t, !1);
|
|
1201
1201
|
break;
|
|
1202
1202
|
} else
|
|
1203
1203
|
t({
|
|
@@ -1205,51 +1205,51 @@ const ie = Fe(
|
|
|
1205
1205
|
payload: {
|
|
1206
1206
|
message: {
|
|
1207
1207
|
content: k,
|
|
1208
|
-
role:
|
|
1209
|
-
messageId:
|
|
1208
|
+
role: I,
|
|
1209
|
+
messageId: f
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
1212
|
});
|
|
1213
1213
|
}
|
|
1214
1214
|
} else
|
|
1215
|
-
|
|
1216
|
-
} catch (
|
|
1217
|
-
console.error(
|
|
1215
|
+
se(t);
|
|
1216
|
+
} catch (h) {
|
|
1217
|
+
console.error(h), se(t);
|
|
1218
1218
|
}
|
|
1219
1219
|
})();
|
|
1220
1220
|
}, [e == null ? void 0 : e.messages]);
|
|
1221
|
-
const
|
|
1222
|
-
|
|
1221
|
+
const g = async (c) => {
|
|
1222
|
+
c.preventDefault(), t({
|
|
1223
1223
|
type: L,
|
|
1224
1224
|
payload: {
|
|
1225
1225
|
message: {
|
|
1226
|
-
role:
|
|
1226
|
+
role: Y,
|
|
1227
1227
|
content: n
|
|
1228
1228
|
}
|
|
1229
1229
|
}
|
|
1230
1230
|
}), o("");
|
|
1231
1231
|
};
|
|
1232
1232
|
return E(() => {
|
|
1233
|
-
(e == null ? void 0 : e.streaming) === !1 && !
|
|
1233
|
+
(e == null ? void 0 : e.streaming) === !1 && !b.current && m.current && (b.current = !0, m.current.focus()), (e == null ? void 0 : e.streaming) === !0 && b.current === !0 && (b.current = !1);
|
|
1234
1234
|
}, [e]), E(() => {
|
|
1235
|
-
r.tag !== "" && O[r.tag] && (o(O[r.tag].content),
|
|
1235
|
+
r.tag !== "" && O[r.tag] && (o(O[r.tag].content), m.current && m.current.focus(), a({
|
|
1236
1236
|
type: ue
|
|
1237
1237
|
}));
|
|
1238
|
-
}, [r, a]), /* @__PURE__ */ i("form", { className: "mt-2", onSubmit:
|
|
1239
|
-
|
|
1238
|
+
}, [r, a]), /* @__PURE__ */ i("form", { className: "mt-2", onSubmit: g, children: /* @__PURE__ */ i(
|
|
1239
|
+
je,
|
|
1240
1240
|
{
|
|
1241
1241
|
mode: "dark",
|
|
1242
1242
|
focusMode: "light",
|
|
1243
|
-
ref:
|
|
1243
|
+
ref: m,
|
|
1244
1244
|
name: "chat-input",
|
|
1245
|
-
label:
|
|
1245
|
+
label: Ie,
|
|
1246
1246
|
helperText: "Press ENTER to add a new line",
|
|
1247
1247
|
helperTextOnFocus: !0,
|
|
1248
1248
|
required: !0,
|
|
1249
1249
|
value: n,
|
|
1250
|
-
onChange: (
|
|
1250
|
+
onChange: (c) => o(c.target.value),
|
|
1251
1251
|
rightElement: /* @__PURE__ */ i(
|
|
1252
|
-
|
|
1252
|
+
B,
|
|
1253
1253
|
{
|
|
1254
1254
|
disabled: e == null ? void 0 : e.streaming,
|
|
1255
1255
|
noBorder: !0,
|
|
@@ -1261,30 +1261,30 @@ const ie = Fe(
|
|
|
1261
1261
|
)
|
|
1262
1262
|
}
|
|
1263
1263
|
) });
|
|
1264
|
-
},
|
|
1265
|
-
const { isAuthenticated: e } =
|
|
1266
|
-
return /* @__PURE__ */
|
|
1267
|
-
/* @__PURE__ */
|
|
1264
|
+
}, Lt = () => {
|
|
1265
|
+
const { isAuthenticated: e } = J(), t = Ae(e);
|
|
1266
|
+
return /* @__PURE__ */ v(H, { children: [
|
|
1267
|
+
/* @__PURE__ */ v("div", { className: t, children: [
|
|
1268
1268
|
/* @__PURE__ */ i(Be, {}),
|
|
1269
1269
|
/* @__PURE__ */ i(Mt, {})
|
|
1270
1270
|
] }),
|
|
1271
|
-
/* @__PURE__ */ i(
|
|
1272
|
-
/* @__PURE__ */ i(
|
|
1271
|
+
/* @__PURE__ */ i(Ke, {}),
|
|
1272
|
+
/* @__PURE__ */ i(Ot, {})
|
|
1273
1273
|
] });
|
|
1274
|
-
},
|
|
1274
|
+
}, $t = (e, t) => (t == null ? void 0 : t.type) === ce ? {
|
|
1275
1275
|
tag: t.payload.tag
|
|
1276
1276
|
} : (t == null ? void 0 : t.type) === ue ? {
|
|
1277
1277
|
tag: ""
|
|
1278
|
-
} : e,
|
|
1278
|
+
} : e, Ut = (e, t) => (t == null ? void 0 : t.type) === Me ? {
|
|
1279
1279
|
searchString: t.payload.searchString,
|
|
1280
1280
|
sortedCell: e.sortedCell,
|
|
1281
1281
|
sortDirection: e.sortDirection
|
|
1282
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1282
|
+
} : (t == null ? void 0 : t.type) === Oe ? {
|
|
1283
1283
|
searchString: e.searchString,
|
|
1284
1284
|
sortedCell: t.payload.sortedCell,
|
|
1285
1285
|
sortDirection: t.payload.sortDirection
|
|
1286
|
-
} : e,
|
|
1287
|
-
if ((t == null ? void 0 : t.type) ===
|
|
1286
|
+
} : e, Vt = (e, t) => {
|
|
1287
|
+
if ((t == null ? void 0 : t.type) === Le) {
|
|
1288
1288
|
const r = t.payload.messages.map((a) => ({
|
|
1289
1289
|
message: {
|
|
1290
1290
|
role: a.role,
|
|
@@ -1298,44 +1298,47 @@ const ie = Fe(
|
|
|
1298
1298
|
model: t.payload.model,
|
|
1299
1299
|
usage: t.payload.usage,
|
|
1300
1300
|
isComponent: e.isComponent,
|
|
1301
|
-
messages: r
|
|
1301
|
+
messages: r,
|
|
1302
|
+
engine: e.engine
|
|
1302
1303
|
};
|
|
1303
1304
|
}
|
|
1304
1305
|
if ((t == null ? void 0 : t.type) === L) {
|
|
1305
|
-
const r = t.payload.message.role, a = t.payload.message.content, n = t.payload.message.name, o = t.payload.message.processingTime,
|
|
1306
|
+
const r = t.payload.message.role, a = t.payload.message.content, n = t.payload.message.name, o = t.payload.message.processingTime, l = t.payload.message.messageId;
|
|
1306
1307
|
if (r !== "") {
|
|
1307
1308
|
const d = {
|
|
1308
1309
|
role: r,
|
|
1309
1310
|
content: a,
|
|
1310
1311
|
name: n,
|
|
1311
1312
|
processingTime: o,
|
|
1312
|
-
messageId:
|
|
1313
|
+
messageId: l
|
|
1313
1314
|
};
|
|
1314
|
-
if (r ===
|
|
1315
|
-
const
|
|
1316
|
-
(
|
|
1315
|
+
if (r === I) {
|
|
1316
|
+
const b = e.messages.findIndex(
|
|
1317
|
+
(m) => m.message.messageId === l
|
|
1317
1318
|
);
|
|
1318
|
-
if (
|
|
1319
|
-
const
|
|
1319
|
+
if (b !== -1) {
|
|
1320
|
+
const m = e.messages.map((p, g) => g === b ? {
|
|
1320
1321
|
message: {
|
|
1321
|
-
...
|
|
1322
|
-
content: `${
|
|
1322
|
+
...p.message,
|
|
1323
|
+
content: `${p.message.content}${a}`,
|
|
1323
1324
|
processingTime: o,
|
|
1324
1325
|
name: n
|
|
1325
1326
|
}
|
|
1326
|
-
} :
|
|
1327
|
+
} : p);
|
|
1327
1328
|
return {
|
|
1328
1329
|
id: e.id,
|
|
1329
1330
|
model: e.model,
|
|
1330
1331
|
usage: e.usage,
|
|
1331
1332
|
isComponent: e.isComponent,
|
|
1332
|
-
messages:
|
|
1333
|
+
messages: m,
|
|
1334
|
+
engine: e.engine
|
|
1333
1335
|
};
|
|
1334
1336
|
}
|
|
1335
1337
|
}
|
|
1336
1338
|
return {
|
|
1337
1339
|
id: e.id,
|
|
1338
1340
|
model: e.model,
|
|
1341
|
+
engine: e.engine,
|
|
1339
1342
|
usage: e.usage,
|
|
1340
1343
|
isComponent: e.isComponent,
|
|
1341
1344
|
messages: [
|
|
@@ -1347,88 +1350,103 @@ const ie = Fe(
|
|
|
1347
1350
|
};
|
|
1348
1351
|
}
|
|
1349
1352
|
}
|
|
1350
|
-
return (t == null ? void 0 : t.type) ===
|
|
1351
|
-
id:
|
|
1353
|
+
return (t == null ? void 0 : t.type) === le ? {
|
|
1354
|
+
id: K(),
|
|
1352
1355
|
model: e.model,
|
|
1356
|
+
engine: e.engine,
|
|
1353
1357
|
usage: 0,
|
|
1354
1358
|
messages: [],
|
|
1355
1359
|
isComponent: e.isComponent
|
|
1356
1360
|
} : (t == null ? void 0 : t.type) === ge ? {
|
|
1357
1361
|
id: e.id,
|
|
1358
1362
|
model: t.payload.model,
|
|
1363
|
+
engine: e.engine,
|
|
1359
1364
|
usage: t.payload.usage,
|
|
1360
1365
|
messages: e.messages,
|
|
1361
1366
|
isComponent: e.isComponent
|
|
1367
|
+
} : (t == null ? void 0 : t.type) === he ? {
|
|
1368
|
+
...e,
|
|
1369
|
+
engine: t.payload.engine
|
|
1362
1370
|
} : (t == null ? void 0 : t.type) === me ? {
|
|
1363
1371
|
...e,
|
|
1364
1372
|
streaming: t.payload.streaming
|
|
1365
1373
|
} : e;
|
|
1366
1374
|
};
|
|
1367
|
-
function
|
|
1368
|
-
const t =
|
|
1369
|
-
key:
|
|
1375
|
+
function Te({ isComponent: e = !1 }) {
|
|
1376
|
+
const t = R(!1), { getAccessToken: r, user: a } = J(), [n] = $({
|
|
1377
|
+
key: M + ze,
|
|
1370
1378
|
initialValue: ""
|
|
1371
|
-
}), [
|
|
1372
|
-
key:
|
|
1373
|
-
initialValue:
|
|
1374
|
-
}), [
|
|
1375
|
-
id:
|
|
1376
|
-
model:
|
|
1379
|
+
}), [o] = $({
|
|
1380
|
+
key: M + De,
|
|
1381
|
+
initialValue: Fe.ASC
|
|
1382
|
+
}), [l, d] = F(Vt, {
|
|
1383
|
+
id: K(),
|
|
1384
|
+
model: z,
|
|
1385
|
+
engine: z,
|
|
1377
1386
|
usage: 0,
|
|
1378
1387
|
messages: [],
|
|
1379
1388
|
isComponent: e
|
|
1380
|
-
}), [
|
|
1381
|
-
searchString:
|
|
1389
|
+
}), [b, m] = F(Ut, {
|
|
1390
|
+
searchString: n,
|
|
1382
1391
|
sortedCell: "timestamp",
|
|
1383
|
-
sortDirection:
|
|
1384
|
-
}), [
|
|
1392
|
+
sortDirection: o
|
|
1393
|
+
}), [p, g] = F($t, {
|
|
1385
1394
|
tag: ""
|
|
1386
|
-
}), [c,
|
|
1395
|
+
}), [c, u] = P({
|
|
1387
1396
|
version: "",
|
|
1388
1397
|
models: [],
|
|
1389
|
-
plugins: []
|
|
1398
|
+
plugins: [],
|
|
1399
|
+
engine: z
|
|
1390
1400
|
});
|
|
1391
1401
|
return E(() => {
|
|
1392
1402
|
c.version !== "" || t.current || (async () => {
|
|
1393
1403
|
try {
|
|
1394
1404
|
t.current = !0;
|
|
1395
|
-
const
|
|
1405
|
+
const h = await Pe({
|
|
1396
1406
|
accessToken: await r(),
|
|
1397
|
-
type:
|
|
1407
|
+
type: Ge.ABOUT,
|
|
1408
|
+
params: {
|
|
1409
|
+
user: a == null ? void 0 : a.username
|
|
1410
|
+
}
|
|
1398
1411
|
});
|
|
1399
|
-
t.current = !1,
|
|
1412
|
+
t.current = !1, h.status === 200 && (u(h.data), d({
|
|
1413
|
+
type: he,
|
|
1414
|
+
payload: {
|
|
1415
|
+
engine: h.data.engine
|
|
1416
|
+
}
|
|
1417
|
+
}));
|
|
1400
1418
|
} catch {
|
|
1401
1419
|
}
|
|
1402
1420
|
})();
|
|
1403
|
-
}, [c, r]), E(() => {
|
|
1404
|
-
var
|
|
1405
|
-
(
|
|
1406
|
-
var
|
|
1407
|
-
(
|
|
1421
|
+
}, [c, r, a]), E(() => {
|
|
1422
|
+
var h;
|
|
1423
|
+
(h = document.getElementById("logo")) == null || h.classList.add("fadeOut"), setTimeout(() => {
|
|
1424
|
+
var f;
|
|
1425
|
+
(f = document.getElementById("root")) == null || f.classList.replace("app-hidden", "fadeIn");
|
|
1408
1426
|
}, 500);
|
|
1409
|
-
}), /* @__PURE__ */ i(
|
|
1410
|
-
|
|
1427
|
+
}), /* @__PURE__ */ i(j.Provider, { value: { state: l, dispatch: d, serverStats: c }, children: /* @__PURE__ */ i(
|
|
1428
|
+
$e.Provider,
|
|
1411
1429
|
{
|
|
1412
1430
|
value: {
|
|
1413
|
-
state:
|
|
1414
|
-
dispatch:
|
|
1431
|
+
state: b,
|
|
1432
|
+
dispatch: m
|
|
1415
1433
|
},
|
|
1416
|
-
children: /* @__PURE__ */
|
|
1417
|
-
|
|
1434
|
+
children: /* @__PURE__ */ v(
|
|
1435
|
+
q.Provider,
|
|
1418
1436
|
{
|
|
1419
|
-
value: { state:
|
|
1437
|
+
value: { state: p, dispatch: g },
|
|
1420
1438
|
children: [
|
|
1421
|
-
/* @__PURE__ */ i(
|
|
1422
|
-
/* @__PURE__ */ i(
|
|
1439
|
+
/* @__PURE__ */ i(Ue, { children: /* @__PURE__ */ i(Lt, {}) }),
|
|
1440
|
+
/* @__PURE__ */ i(Ve, { serverStats: c })
|
|
1423
1441
|
]
|
|
1424
1442
|
}
|
|
1425
1443
|
)
|
|
1426
1444
|
}
|
|
1427
1445
|
) });
|
|
1428
1446
|
}
|
|
1429
|
-
|
|
1430
|
-
const
|
|
1447
|
+
Te.displayName = "App";
|
|
1448
|
+
const Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Te }, Symbol.toStringTag, { value: "Module" }));
|
|
1431
1449
|
export {
|
|
1432
|
-
|
|
1433
|
-
|
|
1450
|
+
Gt as App,
|
|
1451
|
+
vt as le
|
|
1434
1452
|
};
|