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