@versini/sassysaint 5.5.3 → 5.5.4
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/{LazyApp.QsJz23b9.js → LazyApp.S1jb7TzH.js} +547 -533
- package/dist/chunks/{LazyHeader.B13GX_MA.js → LazyHeader.D0icfQlF.js} +4 -4
- package/dist/chunks/{LazyMarkdownWithExtra.BJeytb8a.js → LazyMarkdownWithExtra.bYTTz3hR.js} +2 -2
- package/dist/chunks/{LazyMessageAssistant.BSHGsDRn.js → LazyMessageAssistant.TR65WoZU.js} +4 -4
- package/dist/chunks/{index.gS3otlF2.js → index.CzDghV-_.js} +2 -2
- package/dist/chunks/{index.BpKSgAc6.js → index.DDfeTSEr.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as v, jsx as
|
|
2
|
-
import { g as Te, ACTION_RESTORE as we, ACTION_MESSAGE as
|
|
3
|
-
import { AppContext as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsxs as v, jsx as n, Fragment as G } from "react/jsx-runtime";
|
|
2
|
+
import { g as Te, ACTION_RESTORE as we, ACTION_MESSAGE as B, ROLE_ASSISTANT as A, ACTION_RESET as _e, ACTION_MODEL as ie, ACTION_ENGINE as ne, ACTION_STREAMING as se, ACTION_SORT as Ne, ACTION_SEARCH as Ce, ACTION_SET_TAGS as de, ACTION_RESET_TAGS as ce, ACTION_TOGGLE_TAG as le, un as z, ROLE_SYSTEM as Ee, ROLE_INTERNAL as j, ROLE_HIDDEN as Se, DEFAULT_AI_ENGINE as L, STATS_SEPARATOR as Y, CLIPBOARD_TAG as J, TYPE_QUESTION as Ie, C as ge, SEND as Re, ERROR_MESSAGE as Be, ROLE_USER as $, L as Ae, j as Me, isLastMessageFromRole as Le, getMessageContaintWrapperClass as Oe, O as ze, MessagesContainerHeader as Ue, _ as Ve, LOCAL_STORAGE_PREFIX as Q, LOCAL_STORAGE_SEARCH as De, LOCAL_STORAGE_SORT as $e } from "./index.CzDghV-_.js";
|
|
3
|
+
import { AppContext as M, TagsContext as F, restCall as He, Fe as Ge, NewChatButton as je, serviceCall as me, SERVICE_TYPES as ue, E as X, HistoryContext as Fe, f as Pe } from "./index.DDfeTSEr.js";
|
|
4
|
+
import R, { useRef as _, useEffect as k, useCallback as H, useState as N, useMemo as We, useContext as I, lazy as Ke, Suspense as Z, useLayoutEffect as qe, useReducer as V } from "react";
|
|
5
|
+
import s from "clsx";
|
|
6
6
|
const Ye = ({
|
|
7
7
|
className: e,
|
|
8
8
|
viewBox: t,
|
|
@@ -19,14 +19,14 @@ const Ye = ({
|
|
|
19
19
|
title: r || "Down",
|
|
20
20
|
...o,
|
|
21
21
|
children: [
|
|
22
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ n(
|
|
23
23
|
"path",
|
|
24
24
|
{
|
|
25
25
|
opacity: a ? "1" : "0.4",
|
|
26
26
|
d: "M160 370.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V370.7l-32 32-32-32z"
|
|
27
27
|
}
|
|
28
28
|
),
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ n("path", { d: "M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 402.7 54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z" })
|
|
30
30
|
]
|
|
31
31
|
}
|
|
32
32
|
);
|
|
@@ -44,15 +44,15 @@ function Je(e) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
function Qe(e, t) {
|
|
47
|
-
const { alt: r, ctrl: a, meta: o, mod: i, shift: l, key:
|
|
48
|
-
if (r !==
|
|
47
|
+
const { alt: r, ctrl: a, meta: o, mod: i, shift: l, key: d } = e, { altKey: c, ctrlKey: m, metaKey: u, shiftKey: b, key: g } = t;
|
|
48
|
+
if (r !== c)
|
|
49
49
|
return !1;
|
|
50
50
|
if (i) {
|
|
51
|
-
if (!
|
|
51
|
+
if (!m && !u)
|
|
52
52
|
return !1;
|
|
53
|
-
} else if (a !==
|
|
53
|
+
} else if (a !== m || o !== u)
|
|
54
54
|
return !1;
|
|
55
|
-
return l !== b ? !1 : !!(
|
|
55
|
+
return l !== b ? !1 : !!(d && (g.toLowerCase() === d.toLowerCase() || t.code.replace("Key", "").toLowerCase() === d.toLowerCase()));
|
|
56
56
|
}
|
|
57
57
|
function Xe(e) {
|
|
58
58
|
return (t) => Qe(Je(e), t);
|
|
@@ -66,7 +66,7 @@ function Ze(e) {
|
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
function et() {
|
|
69
|
-
const e =
|
|
69
|
+
const e = _(!1);
|
|
70
70
|
return k(() => (e.current = !0, () => {
|
|
71
71
|
e.current = !1;
|
|
72
72
|
}), []), H(() => e.current, []);
|
|
@@ -82,10 +82,10 @@ const tt = {
|
|
|
82
82
|
right: 0
|
|
83
83
|
};
|
|
84
84
|
function rt(e) {
|
|
85
|
-
const t = et(), r =
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
a.current && t() && i(
|
|
85
|
+
const t = et(), r = _(0), a = _(null), [o, i] = N(tt), l = We(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
|
86
|
+
const c = d[0];
|
|
87
|
+
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
88
|
+
a.current && t() && i(c.contentRect);
|
|
89
89
|
}));
|
|
90
90
|
}), [t]);
|
|
91
91
|
return k(() => (a.current && (l == null || l.observe(a.current, e)), () => {
|
|
@@ -109,7 +109,7 @@ function it() {
|
|
|
109
109
|
return D(ot);
|
|
110
110
|
}
|
|
111
111
|
const nt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ee = { randomUUID: nt };
|
|
112
|
-
function
|
|
112
|
+
function P(e, t, r) {
|
|
113
113
|
if (ee.randomUUID && !t && !e)
|
|
114
114
|
return ee.randomUUID();
|
|
115
115
|
e = e || {};
|
|
@@ -136,35 +136,35 @@ const st = (e, t) => {
|
|
|
136
136
|
tags: e.tags
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
if ((t == null ? void 0 : t.type) ===
|
|
139
|
+
if ((t == null ? void 0 : t.type) === B) {
|
|
140
140
|
const r = t.payload.message.role, a = t.payload.message.content, o = t.payload.message.name, i = t.payload.message.processingTime, l = t.payload.message.messageId;
|
|
141
141
|
if (r !== "") {
|
|
142
|
-
const
|
|
142
|
+
const d = {
|
|
143
143
|
role: r,
|
|
144
144
|
content: a,
|
|
145
145
|
name: o,
|
|
146
146
|
processingTime: i,
|
|
147
147
|
messageId: l
|
|
148
148
|
};
|
|
149
|
-
if (r ===
|
|
150
|
-
const
|
|
151
|
-
(
|
|
149
|
+
if (r === A) {
|
|
150
|
+
const c = e.messages.findIndex(
|
|
151
|
+
(m) => m.message.messageId === l
|
|
152
152
|
);
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
153
|
+
if (c !== -1) {
|
|
154
|
+
const m = e.messages.map((u, b) => b === c ? {
|
|
155
155
|
message: {
|
|
156
|
-
...
|
|
157
|
-
content: `${
|
|
156
|
+
...u.message,
|
|
157
|
+
content: `${u.message.content}${a}`,
|
|
158
158
|
processingTime: i,
|
|
159
159
|
name: o
|
|
160
160
|
}
|
|
161
|
-
} :
|
|
161
|
+
} : u);
|
|
162
162
|
return {
|
|
163
163
|
id: e.id,
|
|
164
164
|
model: e.model,
|
|
165
165
|
usage: e.usage,
|
|
166
166
|
isComponent: e.isComponent,
|
|
167
|
-
messages:
|
|
167
|
+
messages: m,
|
|
168
168
|
engine: e.engine,
|
|
169
169
|
tags: e.tags
|
|
170
170
|
};
|
|
@@ -180,14 +180,14 @@ const st = (e, t) => {
|
|
|
180
180
|
messages: [
|
|
181
181
|
...e.messages,
|
|
182
182
|
{
|
|
183
|
-
message:
|
|
183
|
+
message: d
|
|
184
184
|
}
|
|
185
185
|
]
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
return (t == null ? void 0 : t.type) === _e ? {
|
|
190
|
-
id:
|
|
190
|
+
id: P(),
|
|
191
191
|
model: e.model,
|
|
192
192
|
engine: e.engine,
|
|
193
193
|
usage: 0,
|
|
@@ -211,7 +211,7 @@ const st = (e, t) => {
|
|
|
211
211
|
} : e;
|
|
212
212
|
}, dt = (e, t) => {
|
|
213
213
|
switch (t == null ? void 0 : t.type) {
|
|
214
|
-
case
|
|
214
|
+
case Ce:
|
|
215
215
|
return {
|
|
216
216
|
searchString: t.payload.searchString,
|
|
217
217
|
sortedCell: e.sortedCell,
|
|
@@ -246,6 +246,220 @@ const st = (e, t) => {
|
|
|
246
246
|
default:
|
|
247
247
|
return e;
|
|
248
248
|
}
|
|
249
|
+
}, O = (e, t) => {
|
|
250
|
+
e({
|
|
251
|
+
type: se,
|
|
252
|
+
payload: {
|
|
253
|
+
streaming: t
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}, te = (e) => {
|
|
257
|
+
O(e, !1), e({
|
|
258
|
+
type: B,
|
|
259
|
+
payload: {
|
|
260
|
+
message: {
|
|
261
|
+
role: j,
|
|
262
|
+
content: Be
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}, lt = () => {
|
|
267
|
+
const { state: e, dispatch: t } = I(M), { state: r, dispatch: a } = I(F), [o, i] = N(""), { getAccessToken: l, user: d } = z(), c = _(null), m = _(
|
|
268
|
+
null
|
|
269
|
+
);
|
|
270
|
+
k(() => {
|
|
271
|
+
(async () => {
|
|
272
|
+
var g;
|
|
273
|
+
if (!e || e.messages.length === 0) {
|
|
274
|
+
(g = m == null ? void 0 : m.current) == null || g.cancel();
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
const b = e.messages[e.messages.length - 1];
|
|
278
|
+
if (!(e.messages.length === 0 || b.message.role === A || b.message.role === Ee || b.message.role === j || b.message.role === Se))
|
|
279
|
+
try {
|
|
280
|
+
const h = await He({
|
|
281
|
+
accessToken: await l(),
|
|
282
|
+
name: "generate",
|
|
283
|
+
data: {
|
|
284
|
+
messages: e.messages,
|
|
285
|
+
model: e.engine || L,
|
|
286
|
+
user: (d == null ? void 0 : d.username) || "",
|
|
287
|
+
id: e.id,
|
|
288
|
+
usage: e.usage
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
if (h && h.ok) {
|
|
292
|
+
const p = P();
|
|
293
|
+
m.current = h.body.getReader();
|
|
294
|
+
const f = new TextDecoder();
|
|
295
|
+
for (; ; ) {
|
|
296
|
+
O(t, !0);
|
|
297
|
+
const { done: C, value: E } = await m.current.read();
|
|
298
|
+
if (C) {
|
|
299
|
+
O(t, !1);
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
302
|
+
const x = f.decode(E, { stream: !0 }), T = x.indexOf(Y);
|
|
303
|
+
if (T !== -1) {
|
|
304
|
+
const S = x.substring(0, T), w = JSON.parse(
|
|
305
|
+
x.substring(T + Y.length)
|
|
306
|
+
);
|
|
307
|
+
t({
|
|
308
|
+
type: ie,
|
|
309
|
+
payload: {
|
|
310
|
+
model: w.model,
|
|
311
|
+
usage: w.usage
|
|
312
|
+
}
|
|
313
|
+
}), t({
|
|
314
|
+
type: B,
|
|
315
|
+
payload: {
|
|
316
|
+
message: {
|
|
317
|
+
content: S,
|
|
318
|
+
role: A,
|
|
319
|
+
messageId: p,
|
|
320
|
+
processingTime: w.processingTime,
|
|
321
|
+
name: w.name
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}), O(t, !1);
|
|
325
|
+
break;
|
|
326
|
+
} else
|
|
327
|
+
t({
|
|
328
|
+
type: B,
|
|
329
|
+
payload: {
|
|
330
|
+
message: {
|
|
331
|
+
content: x,
|
|
332
|
+
role: A,
|
|
333
|
+
messageId: p
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
} else
|
|
339
|
+
te(t);
|
|
340
|
+
} catch (h) {
|
|
341
|
+
console.error(h), te(t);
|
|
342
|
+
}
|
|
343
|
+
})();
|
|
344
|
+
}, [e == null ? void 0 : e.messages]);
|
|
345
|
+
const u = async (b) => {
|
|
346
|
+
b.preventDefault(), t({
|
|
347
|
+
type: B,
|
|
348
|
+
payload: {
|
|
349
|
+
message: {
|
|
350
|
+
role: $,
|
|
351
|
+
content: o
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}), i("");
|
|
355
|
+
};
|
|
356
|
+
return k(() => {
|
|
357
|
+
if (r.tag !== "") {
|
|
358
|
+
const b = r.tag.endsWith(":") && !r.tag.endsWith(": ") ? r.tag + " " : r.tag;
|
|
359
|
+
b.indexOf(J) !== -1 ? navigator.clipboard.readText().then((h) => {
|
|
360
|
+
i(b.replace(J, h));
|
|
361
|
+
}) : i(b), c.current && c.current.focus(), a({
|
|
362
|
+
type: ce
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
}, [r, a]), k(() => {
|
|
366
|
+
e && e.usage === 0 && e.messages.length === 0 && c.current && c.current.focus();
|
|
367
|
+
}, [e]), /* @__PURE__ */ n(G, { children: /* @__PURE__ */ n("form", { className: "mt-2", onSubmit: u, children: /* @__PURE__ */ n(
|
|
368
|
+
Ge,
|
|
369
|
+
{
|
|
370
|
+
mode: "dark",
|
|
371
|
+
focusMode: "light",
|
|
372
|
+
ref: c,
|
|
373
|
+
name: "chat-input",
|
|
374
|
+
label: Ie,
|
|
375
|
+
helperText: "Press ENTER to add a new line",
|
|
376
|
+
helperTextOnFocus: !0,
|
|
377
|
+
required: !0,
|
|
378
|
+
value: o,
|
|
379
|
+
onChange: (b) => i(b.target.value),
|
|
380
|
+
onKeyDown: Ze([["mod+Enter", u]]),
|
|
381
|
+
leftElement: /* @__PURE__ */ n(je, {}),
|
|
382
|
+
rightElement: /* @__PURE__ */ n(
|
|
383
|
+
ge,
|
|
384
|
+
{
|
|
385
|
+
disabled: e == null ? void 0 : e.streaming,
|
|
386
|
+
noBorder: !0,
|
|
387
|
+
type: "submit",
|
|
388
|
+
mode: "light",
|
|
389
|
+
focusMode: "light",
|
|
390
|
+
children: Re
|
|
391
|
+
}
|
|
392
|
+
)
|
|
393
|
+
}
|
|
394
|
+
) }) });
|
|
395
|
+
}, gt = () => {
|
|
396
|
+
const { dispatch: e, state: t } = I(F), { getAccessToken: r, user: a } = z(), [o, i] = N({
|
|
397
|
+
loaded: !1
|
|
398
|
+
}), l = "mt-2 flex justify-center rounded-md", d = (c, m) => {
|
|
399
|
+
c.preventDefault(), e({
|
|
400
|
+
type: le,
|
|
401
|
+
payload: {
|
|
402
|
+
tag: m
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
return k(() => {
|
|
407
|
+
if (!a) {
|
|
408
|
+
i({
|
|
409
|
+
loaded: !1
|
|
410
|
+
});
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
o.loaded || (async () => {
|
|
414
|
+
try {
|
|
415
|
+
const c = await me({
|
|
416
|
+
accessToken: await r(),
|
|
417
|
+
type: ue.GET_USER_PREFERENCES,
|
|
418
|
+
params: {
|
|
419
|
+
user: a.username
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
c.status === 200 && (e({
|
|
423
|
+
type: de,
|
|
424
|
+
payload: {
|
|
425
|
+
tags: c.data.tags || []
|
|
426
|
+
}
|
|
427
|
+
}), i({
|
|
428
|
+
loaded: !0
|
|
429
|
+
}));
|
|
430
|
+
} catch {
|
|
431
|
+
}
|
|
432
|
+
})();
|
|
433
|
+
}, [a]), /* @__PURE__ */ n(G, { children: /* @__PURE__ */ n(Ae, { alignHorizontal: "center", columnGap: 2, children: o && o.loaded && t.tags && t.tags.map((c) => c.enabled && c.label && c.content && /* @__PURE__ */ n(Me, { children: /* @__PURE__ */ n("div", { className: l, children: /* @__PURE__ */ n(
|
|
434
|
+
ge,
|
|
435
|
+
{
|
|
436
|
+
noBorder: !0,
|
|
437
|
+
mode: "dark",
|
|
438
|
+
focusMode: "light",
|
|
439
|
+
size: "small",
|
|
440
|
+
onClick: (m) => d(m, c.content),
|
|
441
|
+
children: c.label
|
|
442
|
+
}
|
|
443
|
+
) }) }, `tag-button-${c.slot}`)) }) });
|
|
444
|
+
}, mt = () => {
|
|
445
|
+
const { state: e } = I(M), t = _(!1), [r, a] = N("top-[245px]");
|
|
446
|
+
return k(() => {
|
|
447
|
+
e && (!t.current && e.streaming && a("bottom-10"), t.current = !!e.streaming);
|
|
448
|
+
}, [e]), k(() => {
|
|
449
|
+
e && e.messages.length === 0 && a("top-[245px]"), e && !e.streaming && e.messages.length > 0 && a("bottom-10");
|
|
450
|
+
}, [e]), /* @__PURE__ */ v(
|
|
451
|
+
"footer",
|
|
452
|
+
{
|
|
453
|
+
className: s(
|
|
454
|
+
"md:mx-auto md:max-w-4xl w-11/12 fixed left-1/2 transform -translate-x-1/2 z-1000",
|
|
455
|
+
r
|
|
456
|
+
),
|
|
457
|
+
children: [
|
|
458
|
+
/* @__PURE__ */ n(gt, {}),
|
|
459
|
+
/* @__PURE__ */ n(lt, {})
|
|
460
|
+
]
|
|
461
|
+
}
|
|
462
|
+
);
|
|
249
463
|
};
|
|
250
464
|
/*!
|
|
251
465
|
@versini/ui-bubble v2.0.11
|
|
@@ -260,29 +474,29 @@ try {
|
|
|
260
474
|
});
|
|
261
475
|
} catch {
|
|
262
476
|
}
|
|
263
|
-
const
|
|
477
|
+
const ut = "av-bubble", re = "av-button", W = "icon", ht = "button", bt = "link", pt = ({
|
|
264
478
|
type: e,
|
|
265
479
|
size: t,
|
|
266
480
|
labelRight: r,
|
|
267
481
|
labelLeft: a,
|
|
268
482
|
align: o
|
|
269
483
|
}) => {
|
|
270
|
-
const i = "text-sm font-medium max-h-8 py-0 px-2", l = "text-base font-medium max-h-9 py-1 px-3",
|
|
484
|
+
const i = "text-sm font-medium max-h-8 py-0 px-2", l = "text-base font-medium max-h-9 py-1 px-3", d = "text-lg font-medium max-h-12 py-2 px-4";
|
|
271
485
|
switch (e) {
|
|
272
|
-
case
|
|
273
|
-
return
|
|
486
|
+
case ht:
|
|
487
|
+
return s({
|
|
274
488
|
[i]: t === "small",
|
|
275
489
|
[l]: t === "medium",
|
|
276
|
-
[
|
|
490
|
+
[d]: t === "large"
|
|
277
491
|
});
|
|
278
|
-
case
|
|
279
|
-
return
|
|
492
|
+
case bt:
|
|
493
|
+
return s("text-center", {
|
|
280
494
|
[i]: t === "small",
|
|
281
495
|
[l]: t === "medium",
|
|
282
|
-
[
|
|
496
|
+
[d]: t === "large"
|
|
283
497
|
});
|
|
284
498
|
case W:
|
|
285
|
-
return
|
|
499
|
+
return s("inline-flex items-center", {
|
|
286
500
|
"justify-center": o === "center",
|
|
287
501
|
"justify-start": o === "left",
|
|
288
502
|
"justify-end": o === "right",
|
|
@@ -294,7 +508,7 @@ const lt = "av-bubble", te = "av-button", W = "icon", gt = "button", mt = "link"
|
|
|
294
508
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
295
509
|
});
|
|
296
510
|
}
|
|
297
|
-
},
|
|
511
|
+
}, yt = ({
|
|
298
512
|
mode: e,
|
|
299
513
|
noBackground: t,
|
|
300
514
|
noTruncate: r,
|
|
@@ -302,13 +516,13 @@ const lt = "av-bubble", te = "av-button", W = "icon", gt = "button", mt = "link"
|
|
|
302
516
|
radius: o
|
|
303
517
|
}) => {
|
|
304
518
|
if (t)
|
|
305
|
-
return
|
|
519
|
+
return s("not-prose", {
|
|
306
520
|
"rounded-full": o === "large",
|
|
307
521
|
"rounded-md": o === "medium",
|
|
308
522
|
"rounded-sm": o === "small"
|
|
309
523
|
});
|
|
310
524
|
if (a === "primary")
|
|
311
|
-
return
|
|
525
|
+
return s("not-prose", {
|
|
312
526
|
"rounded-full": o === "large",
|
|
313
527
|
"rounded-md": o === "medium",
|
|
314
528
|
"rounded-sm": o === "small",
|
|
@@ -319,7 +533,7 @@ const lt = "av-bubble", te = "av-button", W = "icon", gt = "button", mt = "link"
|
|
|
319
533
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
|
|
320
534
|
});
|
|
321
535
|
if (a === "secondary")
|
|
322
|
-
return
|
|
536
|
+
return s("not-prose", {
|
|
323
537
|
"rounded-full": o === "large",
|
|
324
538
|
"rounded-md": o === "medium",
|
|
325
539
|
"rounded-sm": o === "small",
|
|
@@ -330,7 +544,7 @@ const lt = "av-bubble", te = "av-button", W = "icon", gt = "button", mt = "link"
|
|
|
330
544
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
|
|
331
545
|
});
|
|
332
546
|
if (a === "danger")
|
|
333
|
-
return
|
|
547
|
+
return s("not-prose", {
|
|
334
548
|
"rounded-full": o === "large",
|
|
335
549
|
"rounded-md": o === "medium",
|
|
336
550
|
"rounded-sm": o === "small",
|
|
@@ -341,7 +555,7 @@ const lt = "av-bubble", te = "av-button", W = "icon", gt = "button", mt = "link"
|
|
|
341
555
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
342
556
|
});
|
|
343
557
|
if (a === "selected")
|
|
344
|
-
return
|
|
558
|
+
return s("not-prose", {
|
|
345
559
|
"rounded-full": o === "large",
|
|
346
560
|
"rounded-md": o === "medium",
|
|
347
561
|
"rounded-sm": o === "small",
|
|
@@ -351,7 +565,7 @@ const lt = "av-bubble", te = "av-button", W = "icon", gt = "button", mt = "link"
|
|
|
351
565
|
"bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
|
|
352
566
|
"bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
|
|
353
567
|
});
|
|
354
|
-
},
|
|
568
|
+
}, ft = ({
|
|
355
569
|
mode: e,
|
|
356
570
|
disabled: t,
|
|
357
571
|
variant: r
|
|
@@ -359,34 +573,34 @@ const lt = "av-bubble", te = "av-button", W = "icon", gt = "button", mt = "link"
|
|
|
359
573
|
if (t)
|
|
360
574
|
return "";
|
|
361
575
|
if (r === "primary")
|
|
362
|
-
return
|
|
576
|
+
return s("hover:text-copy-light-hover", {
|
|
363
577
|
"hover:bg-action-dark-hover": e === "dark",
|
|
364
578
|
"hover:bg-action-light-hover": e === "light",
|
|
365
579
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
366
580
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
367
581
|
});
|
|
368
582
|
if (r === "secondary")
|
|
369
|
-
return
|
|
583
|
+
return s("hover:text-copy-light-hover", {
|
|
370
584
|
"hover:bg-action-dark-hover": e === "light",
|
|
371
585
|
"hover:bg-action-light-hover": e === "dark",
|
|
372
586
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
373
587
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
374
588
|
});
|
|
375
589
|
if (r === "danger")
|
|
376
|
-
return
|
|
590
|
+
return s("hover:text-copy-light-hover", {
|
|
377
591
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
378
592
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
379
593
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
380
594
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
381
595
|
});
|
|
382
596
|
if (r === "selected")
|
|
383
|
-
return
|
|
597
|
+
return s("hover:text-copy-light-hover", {
|
|
384
598
|
"hover:bg-action-selected-dark-hover": e === "dark",
|
|
385
599
|
"hover:bg-action-selected-light-hover": e === "light",
|
|
386
600
|
"hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
|
|
387
601
|
"hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
|
|
388
602
|
});
|
|
389
|
-
},
|
|
603
|
+
}, vt = ({
|
|
390
604
|
mode: e,
|
|
391
605
|
disabled: t,
|
|
392
606
|
variant: r
|
|
@@ -394,34 +608,34 @@ const lt = "av-bubble", te = "av-button", W = "icon", gt = "button", mt = "link"
|
|
|
394
608
|
if (t)
|
|
395
609
|
return "";
|
|
396
610
|
if (r === "primary")
|
|
397
|
-
return
|
|
611
|
+
return s("active:text-copy-light-active", {
|
|
398
612
|
"active:bg-action-dark-active": e === "dark",
|
|
399
613
|
"active:bg-action-light-active": e === "light",
|
|
400
614
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
401
615
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
402
616
|
});
|
|
403
617
|
if (r === "secondary")
|
|
404
|
-
return
|
|
618
|
+
return s("active:text-copy-light-active", {
|
|
405
619
|
"active:bg-action-dark-active": e === "light",
|
|
406
620
|
"active:bg-action-light-active": e === "dark",
|
|
407
621
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
408
622
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
409
623
|
});
|
|
410
624
|
if (r === "danger")
|
|
411
|
-
return
|
|
625
|
+
return s("active:text-copy-lighter-active", {
|
|
412
626
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
413
627
|
"active:bg-action-danger-light-active": e === "light",
|
|
414
628
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
415
629
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
416
630
|
});
|
|
417
631
|
if (r === "selected")
|
|
418
|
-
return
|
|
632
|
+
return s("active:text-copy-lighter-active", {
|
|
419
633
|
"active:bg-action-selected-dark-active": e === "dark",
|
|
420
634
|
"active:bg-action-selected-light-active": e === "light",
|
|
421
635
|
"active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
|
|
422
636
|
"active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
|
|
423
637
|
});
|
|
424
|
-
},
|
|
638
|
+
}, kt = ({
|
|
425
639
|
mode: e,
|
|
426
640
|
noBorder: t,
|
|
427
641
|
variant: r
|
|
@@ -429,36 +643,36 @@ const lt = "av-bubble", te = "av-button", W = "icon", gt = "button", mt = "link"
|
|
|
429
643
|
if (t)
|
|
430
644
|
return "border border-transparent";
|
|
431
645
|
if (r === "primary")
|
|
432
|
-
return
|
|
646
|
+
return s("border", {
|
|
433
647
|
"border-border-dark": e === "dark",
|
|
434
648
|
"border-border-accent": e === "light",
|
|
435
649
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
436
650
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
437
651
|
});
|
|
438
652
|
if (r === "secondary")
|
|
439
|
-
return
|
|
653
|
+
return s("border", {
|
|
440
654
|
"border-border-dark": e === "light",
|
|
441
655
|
"border-border-accent": e === "dark",
|
|
442
656
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
443
657
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
444
658
|
});
|
|
445
659
|
if (r === "danger")
|
|
446
|
-
return
|
|
660
|
+
return s("border", {
|
|
447
661
|
"border-border-danger-dark": e === "dark",
|
|
448
662
|
"border-border-danger-medium": e === "light",
|
|
449
663
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
450
664
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
451
665
|
});
|
|
452
666
|
if (r === "selected")
|
|
453
|
-
return
|
|
667
|
+
return s("border", {
|
|
454
668
|
"border-border-selected-dark": e === "dark",
|
|
455
669
|
"border-border-selected-medium": e === "light",
|
|
456
670
|
"border-border-selected-dark dark:border-border-selected-medium": e === "system",
|
|
457
671
|
"border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
|
|
458
672
|
});
|
|
459
|
-
},
|
|
673
|
+
}, xt = ({
|
|
460
674
|
focusMode: e
|
|
461
|
-
}) =>
|
|
675
|
+
}) => s("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
462
676
|
"focus:outline-focus-dark": e === "dark",
|
|
463
677
|
"focus:outline-focus-light": e === "light",
|
|
464
678
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
@@ -471,58 +685,58 @@ const lt = "av-bubble", te = "av-button", W = "icon", gt = "button", mt = "link"
|
|
|
471
685
|
focusMode: o,
|
|
472
686
|
disabled: i,
|
|
473
687
|
fullWidth: l,
|
|
474
|
-
size:
|
|
475
|
-
noBorder:
|
|
476
|
-
labelRight:
|
|
477
|
-
labelLeft:
|
|
688
|
+
size: d,
|
|
689
|
+
noBorder: c,
|
|
690
|
+
labelRight: m,
|
|
691
|
+
labelLeft: u,
|
|
478
692
|
noBackground: b,
|
|
479
693
|
variant: g,
|
|
480
|
-
noTruncate:
|
|
694
|
+
noTruncate: h,
|
|
481
695
|
align: p,
|
|
482
696
|
radius: f
|
|
483
|
-
}) => (g || (g = "primary"), r ?
|
|
484
|
-
|
|
485
|
-
|
|
697
|
+
}) => (g || (g = "primary"), r ? s(re, t) : s(
|
|
698
|
+
re,
|
|
699
|
+
yt({
|
|
486
700
|
mode: a,
|
|
487
701
|
variant: g,
|
|
488
702
|
noBackground: b,
|
|
489
|
-
noTruncate:
|
|
703
|
+
noTruncate: h,
|
|
490
704
|
radius: f
|
|
491
705
|
}),
|
|
492
|
-
|
|
706
|
+
pt({
|
|
493
707
|
type: e,
|
|
494
|
-
size:
|
|
495
|
-
labelRight:
|
|
496
|
-
labelLeft:
|
|
708
|
+
size: d,
|
|
709
|
+
labelRight: m,
|
|
710
|
+
labelLeft: u,
|
|
497
711
|
align: p
|
|
498
712
|
}),
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
713
|
+
kt({ mode: a, variant: g, noBorder: c }),
|
|
714
|
+
xt({ focusMode: o }),
|
|
715
|
+
ft({ mode: a, variant: g, disabled: i }),
|
|
716
|
+
vt({ mode: a, variant: g, disabled: i }),
|
|
503
717
|
{
|
|
504
718
|
"w-full": l,
|
|
505
719
|
"disabled:cursor-not-allowed disabled:opacity-50": i
|
|
506
720
|
},
|
|
507
721
|
t
|
|
508
|
-
)),
|
|
722
|
+
)), Tt = (e, t, r) => {
|
|
509
723
|
var a;
|
|
510
724
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
511
|
-
}, K =
|
|
725
|
+
}, K = R.forwardRef((e, t) => {
|
|
512
726
|
const { onClick: r, noInternalClick: a = !1, ...o } = e;
|
|
513
|
-
return /* @__PURE__ */
|
|
727
|
+
return /* @__PURE__ */ n(
|
|
514
728
|
"button",
|
|
515
729
|
{
|
|
516
730
|
ref: t,
|
|
517
731
|
onClick: (i) => {
|
|
518
|
-
|
|
732
|
+
Tt(i, a, r);
|
|
519
733
|
},
|
|
520
734
|
...o
|
|
521
735
|
}
|
|
522
736
|
);
|
|
523
737
|
});
|
|
524
738
|
K.displayName = "BaseButton";
|
|
525
|
-
const be =
|
|
739
|
+
const be = R.forwardRef(
|
|
526
740
|
({
|
|
527
741
|
children: e,
|
|
528
742
|
disabled: t = !1,
|
|
@@ -531,17 +745,17 @@ const be = S.forwardRef(
|
|
|
531
745
|
fullWidth: o = !1,
|
|
532
746
|
className: i,
|
|
533
747
|
type: l = "button",
|
|
534
|
-
raw:
|
|
535
|
-
noBorder:
|
|
536
|
-
"aria-label":
|
|
537
|
-
label:
|
|
748
|
+
raw: d = !1,
|
|
749
|
+
noBorder: c = !1,
|
|
750
|
+
"aria-label": m,
|
|
751
|
+
label: u,
|
|
538
752
|
size: b = "medium",
|
|
539
753
|
labelRight: g,
|
|
540
|
-
labelLeft:
|
|
754
|
+
labelLeft: h,
|
|
541
755
|
noBackground: p = !1,
|
|
542
756
|
align: f = "center",
|
|
543
|
-
radius:
|
|
544
|
-
...
|
|
757
|
+
radius: C = "large",
|
|
758
|
+
...E
|
|
545
759
|
}, x) => {
|
|
546
760
|
const T = he({
|
|
547
761
|
type: W,
|
|
@@ -549,20 +763,20 @@ const be = S.forwardRef(
|
|
|
549
763
|
focusMode: a,
|
|
550
764
|
fullWidth: o,
|
|
551
765
|
disabled: t,
|
|
552
|
-
raw:
|
|
766
|
+
raw: d,
|
|
553
767
|
className: i,
|
|
554
|
-
noBorder:
|
|
768
|
+
noBorder: c,
|
|
555
769
|
size: b,
|
|
556
770
|
labelRight: g,
|
|
557
|
-
labelLeft:
|
|
771
|
+
labelLeft: h,
|
|
558
772
|
noBackground: p,
|
|
559
773
|
align: f,
|
|
560
|
-
radius:
|
|
561
|
-
}),
|
|
562
|
-
"text-copy-accent-dark": r === "light" && !
|
|
563
|
-
"text-copy-light": r === "dark" && !
|
|
564
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
565
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
774
|
+
radius: C
|
|
775
|
+
}), S = s({
|
|
776
|
+
"text-copy-accent-dark": r === "light" && !d,
|
|
777
|
+
"text-copy-light": r === "dark" && !d,
|
|
778
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
|
|
779
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !d
|
|
566
780
|
});
|
|
567
781
|
return /* @__PURE__ */ v(
|
|
568
782
|
K,
|
|
@@ -571,12 +785,12 @@ const be = S.forwardRef(
|
|
|
571
785
|
className: T,
|
|
572
786
|
disabled: t,
|
|
573
787
|
type: l,
|
|
574
|
-
"aria-label":
|
|
575
|
-
...
|
|
788
|
+
"aria-label": m || u,
|
|
789
|
+
...E,
|
|
576
790
|
children: [
|
|
577
|
-
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
g && /* @__PURE__ */
|
|
791
|
+
h && /* @__PURE__ */ n("span", { className: "pr-2", children: h }),
|
|
792
|
+
/* @__PURE__ */ n("div", { className: S, children: e }),
|
|
793
|
+
g && /* @__PURE__ */ n("span", { className: "pl-2", children: g })
|
|
580
794
|
]
|
|
581
795
|
}
|
|
582
796
|
);
|
|
@@ -596,7 +810,7 @@ try {
|
|
|
596
810
|
});
|
|
597
811
|
} catch {
|
|
598
812
|
}
|
|
599
|
-
const
|
|
813
|
+
const wt = R.forwardRef(
|
|
600
814
|
({
|
|
601
815
|
children: e,
|
|
602
816
|
disabled: t = !1,
|
|
@@ -605,40 +819,40 @@ const kt = S.forwardRef(
|
|
|
605
819
|
fullWidth: o = !1,
|
|
606
820
|
className: i,
|
|
607
821
|
type: l = "button",
|
|
608
|
-
raw:
|
|
609
|
-
noBorder:
|
|
610
|
-
"aria-label":
|
|
611
|
-
label:
|
|
822
|
+
raw: d = !1,
|
|
823
|
+
noBorder: c = !1,
|
|
824
|
+
"aria-label": m,
|
|
825
|
+
label: u,
|
|
612
826
|
size: b = "medium",
|
|
613
827
|
labelRight: g,
|
|
614
|
-
labelLeft:
|
|
828
|
+
labelLeft: h,
|
|
615
829
|
noBackground: p = !1,
|
|
616
830
|
align: f = "center",
|
|
617
|
-
active:
|
|
618
|
-
radius:
|
|
831
|
+
active: C = !1,
|
|
832
|
+
radius: E = "large",
|
|
619
833
|
...x
|
|
620
834
|
}, T) => {
|
|
621
|
-
const
|
|
835
|
+
const S = he({
|
|
622
836
|
type: W,
|
|
623
837
|
mode: r,
|
|
624
838
|
focusMode: a,
|
|
625
839
|
fullWidth: o,
|
|
626
840
|
disabled: t,
|
|
627
|
-
raw:
|
|
841
|
+
raw: d,
|
|
628
842
|
className: i,
|
|
629
|
-
noBorder:
|
|
843
|
+
noBorder: c,
|
|
630
844
|
size: b,
|
|
631
845
|
labelRight: g,
|
|
632
|
-
labelLeft:
|
|
846
|
+
labelLeft: h,
|
|
633
847
|
noBackground: p,
|
|
634
848
|
align: f,
|
|
635
|
-
radius:
|
|
636
|
-
}), w =
|
|
637
|
-
"text-copy-accent-dark": r === "light" && !
|
|
638
|
-
"text-copy-light": r === "dark" && !
|
|
639
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
640
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
641
|
-
}), U =
|
|
849
|
+
radius: E
|
|
850
|
+
}), w = s({
|
|
851
|
+
"text-copy-accent-dark": r === "light" && !d,
|
|
852
|
+
"text-copy-light": r === "dark" && !d,
|
|
853
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
|
|
854
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !d
|
|
855
|
+
}), U = C ? s(
|
|
642
856
|
"relative",
|
|
643
857
|
"focus-within:static",
|
|
644
858
|
"focus-within:after:border-transparent",
|
|
@@ -655,25 +869,25 @@ const kt = S.forwardRef(
|
|
|
655
869
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
656
870
|
}
|
|
657
871
|
) : "";
|
|
658
|
-
return /* @__PURE__ */
|
|
872
|
+
return /* @__PURE__ */ n("div", { className: U, children: /* @__PURE__ */ v(
|
|
659
873
|
K,
|
|
660
874
|
{
|
|
661
875
|
ref: T,
|
|
662
|
-
className:
|
|
876
|
+
className: S,
|
|
663
877
|
disabled: t,
|
|
664
878
|
type: l,
|
|
665
|
-
"aria-label":
|
|
879
|
+
"aria-label": m || u,
|
|
666
880
|
...x,
|
|
667
881
|
children: [
|
|
668
|
-
|
|
669
|
-
/* @__PURE__ */
|
|
670
|
-
g && /* @__PURE__ */
|
|
882
|
+
h && /* @__PURE__ */ n("span", { className: "pr-2", children: h }),
|
|
883
|
+
/* @__PURE__ */ n("div", { className: w, children: e }),
|
|
884
|
+
g && /* @__PURE__ */ n("span", { className: "pl-2", children: g })
|
|
671
885
|
]
|
|
672
886
|
}
|
|
673
887
|
) });
|
|
674
888
|
}
|
|
675
889
|
);
|
|
676
|
-
|
|
890
|
+
wt.displayName = "ButtonSort";
|
|
677
891
|
const pe = ({
|
|
678
892
|
children: e,
|
|
679
893
|
fill: t,
|
|
@@ -682,26 +896,26 @@ const pe = ({
|
|
|
682
896
|
defaultViewBox: o,
|
|
683
897
|
size: i,
|
|
684
898
|
title: l,
|
|
685
|
-
semantic:
|
|
686
|
-
...
|
|
899
|
+
semantic: d = !1,
|
|
900
|
+
...c
|
|
687
901
|
}) => {
|
|
688
|
-
const
|
|
902
|
+
const m = s(i, a);
|
|
689
903
|
return /* @__PURE__ */ v(G, { children: [
|
|
690
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ n(
|
|
691
905
|
"svg",
|
|
692
906
|
{
|
|
693
907
|
xmlns: "http://www.w3.org/2000/svg",
|
|
694
|
-
className:
|
|
908
|
+
className: m,
|
|
695
909
|
viewBox: r || o,
|
|
696
910
|
fill: t || "currentColor",
|
|
697
911
|
role: "img",
|
|
698
|
-
"aria-hidden": !
|
|
912
|
+
"aria-hidden": !d,
|
|
699
913
|
focusable: !1,
|
|
700
|
-
...
|
|
914
|
+
...c,
|
|
701
915
|
children: e
|
|
702
916
|
}
|
|
703
917
|
),
|
|
704
|
-
l &&
|
|
918
|
+
l && d && /* @__PURE__ */ n("span", { className: "sr-only", children: l })
|
|
705
919
|
] });
|
|
706
920
|
};
|
|
707
921
|
/*!
|
|
@@ -717,7 +931,7 @@ try {
|
|
|
717
931
|
});
|
|
718
932
|
} catch {
|
|
719
933
|
}
|
|
720
|
-
const
|
|
934
|
+
const _t = ({
|
|
721
935
|
className: e,
|
|
722
936
|
viewBox: t,
|
|
723
937
|
title: r,
|
|
@@ -733,23 +947,23 @@ const xt = ({
|
|
|
733
947
|
title: r || "Copied",
|
|
734
948
|
...o,
|
|
735
949
|
children: [
|
|
736
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ n(
|
|
737
951
|
"path",
|
|
738
952
|
{
|
|
739
953
|
opacity: "0.4",
|
|
740
954
|
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"
|
|
741
955
|
}
|
|
742
956
|
),
|
|
743
|
-
/* @__PURE__ */
|
|
957
|
+
/* @__PURE__ */ n("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" })
|
|
744
958
|
]
|
|
745
959
|
}
|
|
746
|
-
),
|
|
960
|
+
), Nt = ({
|
|
747
961
|
className: e,
|
|
748
962
|
viewBox: t,
|
|
749
963
|
title: r,
|
|
750
964
|
monotone: a,
|
|
751
965
|
...o
|
|
752
|
-
}) => /* @__PURE__ */
|
|
966
|
+
}) => /* @__PURE__ */ n(
|
|
753
967
|
pe,
|
|
754
968
|
{
|
|
755
969
|
defaultViewBox: "0 0 512 512",
|
|
@@ -758,7 +972,7 @@ const xt = ({
|
|
|
758
972
|
className: e,
|
|
759
973
|
title: r || "Copy",
|
|
760
974
|
...o,
|
|
761
|
-
children: /* @__PURE__ */
|
|
975
|
+
children: /* @__PURE__ */ n("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" })
|
|
762
976
|
}
|
|
763
977
|
);
|
|
764
978
|
/*!
|
|
@@ -774,35 +988,35 @@ try {
|
|
|
774
988
|
});
|
|
775
989
|
} catch {
|
|
776
990
|
}
|
|
777
|
-
const
|
|
991
|
+
const Ct = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", Et = ({ kind: e }) => s({
|
|
778
992
|
"bg-surface-lighter dark:bg-surface-dark": e === "left",
|
|
779
993
|
"bg-surface-accent": e === "right"
|
|
780
|
-
}),
|
|
994
|
+
}), St = ({ kind: e }) => s(
|
|
781
995
|
"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",
|
|
782
996
|
{
|
|
783
997
|
"text-copy-lighter": e === "right"
|
|
784
998
|
}
|
|
785
|
-
),
|
|
999
|
+
), It = ({ kind: e }) => s("rounded-b-xl", {
|
|
786
1000
|
"rounded-tr-xl": e === "left",
|
|
787
1001
|
"rounded-tl-xl": e === "right"
|
|
788
|
-
}),
|
|
1002
|
+
}), Rt = ({
|
|
789
1003
|
kind: e,
|
|
790
1004
|
className: t
|
|
791
1005
|
}) => {
|
|
792
|
-
const r =
|
|
793
|
-
|
|
1006
|
+
const r = s(
|
|
1007
|
+
ut,
|
|
794
1008
|
"flex items-start",
|
|
795
1009
|
{
|
|
796
1010
|
"flex-row-reverse": e === "right"
|
|
797
1011
|
},
|
|
798
1012
|
t
|
|
799
|
-
), a =
|
|
1013
|
+
), a = s(
|
|
800
1014
|
"flex flex-col empty:hidden",
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
), o = "pr-2 pt-1 text-end text-xs text-copy-light", i =
|
|
1015
|
+
Ct(),
|
|
1016
|
+
St({ kind: e }),
|
|
1017
|
+
Et({ kind: e }),
|
|
1018
|
+
It({ kind: e })
|
|
1019
|
+
), o = "pr-2 pt-1 text-end text-xs text-copy-light", i = s("flex flex-col-reverse gap-2 sm:flex-row", {
|
|
806
1020
|
"ml-2": e === "left",
|
|
807
1021
|
"mr-2": e === "right"
|
|
808
1022
|
});
|
|
@@ -812,7 +1026,7 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
812
1026
|
footer: o,
|
|
813
1027
|
copyButton: i
|
|
814
1028
|
};
|
|
815
|
-
},
|
|
1029
|
+
}, Bt = ({
|
|
816
1030
|
children: e,
|
|
817
1031
|
kind: t = "left",
|
|
818
1032
|
className: r,
|
|
@@ -820,66 +1034,66 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
820
1034
|
rawFooter: o,
|
|
821
1035
|
copyToClipboard: i,
|
|
822
1036
|
copyToClipboardFocusMode: l = "system",
|
|
823
|
-
copyToClipboardMode:
|
|
1037
|
+
copyToClipboardMode: d = "system"
|
|
824
1038
|
}) => {
|
|
825
|
-
const [
|
|
826
|
-
|
|
1039
|
+
const [c, m] = N(!1), u = Rt({ kind: t, className: r }), b = !!i && (typeof i == "function" || typeof i == "string" || typeof e == "string"), g = () => {
|
|
1040
|
+
m(!0), typeof i == "function" ? i(e) : typeof i == "string" ? navigator.clipboard.writeText(i) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
827
1041
|
};
|
|
828
1042
|
return k(() => {
|
|
829
|
-
let
|
|
830
|
-
return
|
|
831
|
-
|
|
1043
|
+
let h;
|
|
1044
|
+
return c && (h = window.setTimeout(() => {
|
|
1045
|
+
m(!1);
|
|
832
1046
|
}, 3e3)), () => {
|
|
833
|
-
clearTimeout(
|
|
1047
|
+
clearTimeout(h);
|
|
834
1048
|
};
|
|
835
|
-
}, [
|
|
1049
|
+
}, [c]), /* @__PURE__ */ v("div", { className: u.wrapper, children: [
|
|
836
1050
|
/* @__PURE__ */ v("div", { children: [
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
a && Object.keys(a).map((
|
|
839
|
-
|
|
1051
|
+
/* @__PURE__ */ n("div", { className: u.main, children: e }),
|
|
1052
|
+
a && Object.keys(a).map((h) => a[h] ? /* @__PURE__ */ n("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: u.footer, children: [
|
|
1053
|
+
h,
|
|
840
1054
|
": ",
|
|
841
|
-
a[
|
|
842
|
-
] }) }, `-${
|
|
1055
|
+
a[h]
|
|
1056
|
+
] }) }, `-${h}`) : null),
|
|
843
1057
|
o && o
|
|
844
1058
|
] }),
|
|
845
|
-
b && /* @__PURE__ */
|
|
1059
|
+
b && /* @__PURE__ */ n("div", { className: u.copyButton, children: /* @__PURE__ */ n(
|
|
846
1060
|
be,
|
|
847
1061
|
{
|
|
848
1062
|
noBorder: !0,
|
|
849
1063
|
noBackground: !0,
|
|
850
1064
|
size: "small",
|
|
851
|
-
mode:
|
|
1065
|
+
mode: d,
|
|
852
1066
|
focusMode: l,
|
|
853
|
-
label:
|
|
1067
|
+
label: c ? "Copied to clipboard" : "Copy to clipboard",
|
|
854
1068
|
onClick: g,
|
|
855
|
-
disabled:
|
|
856
|
-
children:
|
|
1069
|
+
disabled: c,
|
|
1070
|
+
children: c ? /* @__PURE__ */ n(_t, { size: "size-3" }) : /* @__PURE__ */ n(Nt, { size: "size-3" })
|
|
857
1071
|
}
|
|
858
1072
|
) })
|
|
859
1073
|
] });
|
|
860
|
-
},
|
|
1074
|
+
}, ae = "av-button", ye = "icon", fe = "button", At = "link", Mt = ({
|
|
861
1075
|
type: e,
|
|
862
1076
|
size: t,
|
|
863
1077
|
labelRight: r,
|
|
864
1078
|
labelLeft: a,
|
|
865
1079
|
align: o
|
|
866
1080
|
}) => {
|
|
867
|
-
const i = "text-sm font-medium max-h-8 py-0 px-2", l = "text-base font-medium max-h-9 py-1 px-3",
|
|
1081
|
+
const i = "text-sm font-medium max-h-8 py-0 px-2", l = "text-base font-medium max-h-9 py-1 px-3", d = "text-lg font-medium max-h-12 py-2 px-4";
|
|
868
1082
|
switch (e) {
|
|
869
1083
|
case fe:
|
|
870
|
-
return
|
|
1084
|
+
return s({
|
|
871
1085
|
[i]: t === "small",
|
|
872
1086
|
[l]: t === "medium",
|
|
873
|
-
[
|
|
1087
|
+
[d]: t === "large"
|
|
874
1088
|
});
|
|
875
|
-
case
|
|
876
|
-
return
|
|
1089
|
+
case At:
|
|
1090
|
+
return s("text-center", {
|
|
877
1091
|
[i]: t === "small",
|
|
878
1092
|
[l]: t === "medium",
|
|
879
|
-
[
|
|
1093
|
+
[d]: t === "large"
|
|
880
1094
|
});
|
|
881
1095
|
case ye:
|
|
882
|
-
return
|
|
1096
|
+
return s("inline-flex items-center", {
|
|
883
1097
|
"justify-center": o === "center",
|
|
884
1098
|
"justify-start": o === "left",
|
|
885
1099
|
"justify-end": o === "right",
|
|
@@ -891,7 +1105,7 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
891
1105
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
892
1106
|
});
|
|
893
1107
|
}
|
|
894
|
-
},
|
|
1108
|
+
}, Lt = ({
|
|
895
1109
|
mode: e,
|
|
896
1110
|
noBackground: t,
|
|
897
1111
|
noTruncate: r,
|
|
@@ -899,13 +1113,13 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
899
1113
|
radius: o
|
|
900
1114
|
}) => {
|
|
901
1115
|
if (t)
|
|
902
|
-
return
|
|
1116
|
+
return s("not-prose", {
|
|
903
1117
|
"rounded-full": o === "large",
|
|
904
1118
|
"rounded-md": o === "medium",
|
|
905
1119
|
"rounded-sm": o === "small"
|
|
906
1120
|
});
|
|
907
1121
|
if (a === "primary")
|
|
908
|
-
return
|
|
1122
|
+
return s("not-prose", {
|
|
909
1123
|
"rounded-full": o === "large",
|
|
910
1124
|
"rounded-md": o === "medium",
|
|
911
1125
|
"rounded-sm": o === "small",
|
|
@@ -916,7 +1130,7 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
916
1130
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
|
|
917
1131
|
});
|
|
918
1132
|
if (a === "secondary")
|
|
919
|
-
return
|
|
1133
|
+
return s("not-prose", {
|
|
920
1134
|
"rounded-full": o === "large",
|
|
921
1135
|
"rounded-md": o === "medium",
|
|
922
1136
|
"rounded-sm": o === "small",
|
|
@@ -927,7 +1141,7 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
927
1141
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
|
|
928
1142
|
});
|
|
929
1143
|
if (a === "danger")
|
|
930
|
-
return
|
|
1144
|
+
return s("not-prose", {
|
|
931
1145
|
"rounded-full": o === "large",
|
|
932
1146
|
"rounded-md": o === "medium",
|
|
933
1147
|
"rounded-sm": o === "small",
|
|
@@ -938,7 +1152,7 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
938
1152
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
939
1153
|
});
|
|
940
1154
|
if (a === "selected")
|
|
941
|
-
return
|
|
1155
|
+
return s("not-prose", {
|
|
942
1156
|
"rounded-full": o === "large",
|
|
943
1157
|
"rounded-md": o === "medium",
|
|
944
1158
|
"rounded-sm": o === "small",
|
|
@@ -948,7 +1162,7 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
948
1162
|
"bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
|
|
949
1163
|
"bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
|
|
950
1164
|
});
|
|
951
|
-
},
|
|
1165
|
+
}, Ot = ({
|
|
952
1166
|
mode: e,
|
|
953
1167
|
disabled: t,
|
|
954
1168
|
variant: r
|
|
@@ -956,34 +1170,34 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
956
1170
|
if (t)
|
|
957
1171
|
return "";
|
|
958
1172
|
if (r === "primary")
|
|
959
|
-
return
|
|
1173
|
+
return s("hover:text-copy-light-hover", {
|
|
960
1174
|
"hover:bg-action-dark-hover": e === "dark",
|
|
961
1175
|
"hover:bg-action-light-hover": e === "light",
|
|
962
1176
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
963
1177
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
964
1178
|
});
|
|
965
1179
|
if (r === "secondary")
|
|
966
|
-
return
|
|
1180
|
+
return s("hover:text-copy-light-hover", {
|
|
967
1181
|
"hover:bg-action-dark-hover": e === "light",
|
|
968
1182
|
"hover:bg-action-light-hover": e === "dark",
|
|
969
1183
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
970
1184
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
971
1185
|
});
|
|
972
1186
|
if (r === "danger")
|
|
973
|
-
return
|
|
1187
|
+
return s("hover:text-copy-light-hover", {
|
|
974
1188
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
975
1189
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
976
1190
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
977
1191
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
978
1192
|
});
|
|
979
1193
|
if (r === "selected")
|
|
980
|
-
return
|
|
1194
|
+
return s("hover:text-copy-light-hover", {
|
|
981
1195
|
"hover:bg-action-selected-dark-hover": e === "dark",
|
|
982
1196
|
"hover:bg-action-selected-light-hover": e === "light",
|
|
983
1197
|
"hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
|
|
984
1198
|
"hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
|
|
985
1199
|
});
|
|
986
|
-
},
|
|
1200
|
+
}, zt = ({
|
|
987
1201
|
mode: e,
|
|
988
1202
|
disabled: t,
|
|
989
1203
|
variant: r
|
|
@@ -991,34 +1205,34 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
991
1205
|
if (t)
|
|
992
1206
|
return "";
|
|
993
1207
|
if (r === "primary")
|
|
994
|
-
return
|
|
1208
|
+
return s("active:text-copy-light-active", {
|
|
995
1209
|
"active:bg-action-dark-active": e === "dark",
|
|
996
1210
|
"active:bg-action-light-active": e === "light",
|
|
997
1211
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
998
1212
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
999
1213
|
});
|
|
1000
1214
|
if (r === "secondary")
|
|
1001
|
-
return
|
|
1215
|
+
return s("active:text-copy-light-active", {
|
|
1002
1216
|
"active:bg-action-dark-active": e === "light",
|
|
1003
1217
|
"active:bg-action-light-active": e === "dark",
|
|
1004
1218
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
1005
1219
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
1006
1220
|
});
|
|
1007
1221
|
if (r === "danger")
|
|
1008
|
-
return
|
|
1222
|
+
return s("active:text-copy-lighter-active", {
|
|
1009
1223
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
1010
1224
|
"active:bg-action-danger-light-active": e === "light",
|
|
1011
1225
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
1012
1226
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
1013
1227
|
});
|
|
1014
1228
|
if (r === "selected")
|
|
1015
|
-
return
|
|
1229
|
+
return s("active:text-copy-lighter-active", {
|
|
1016
1230
|
"active:bg-action-selected-dark-active": e === "dark",
|
|
1017
1231
|
"active:bg-action-selected-light-active": e === "light",
|
|
1018
1232
|
"active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
|
|
1019
1233
|
"active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
|
|
1020
1234
|
});
|
|
1021
|
-
},
|
|
1235
|
+
}, Ut = ({
|
|
1022
1236
|
mode: e,
|
|
1023
1237
|
noBorder: t,
|
|
1024
1238
|
variant: r
|
|
@@ -1026,36 +1240,36 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
1026
1240
|
if (t)
|
|
1027
1241
|
return "border border-transparent";
|
|
1028
1242
|
if (r === "primary")
|
|
1029
|
-
return
|
|
1243
|
+
return s("border", {
|
|
1030
1244
|
"border-border-dark": e === "dark",
|
|
1031
1245
|
"border-border-accent": e === "light",
|
|
1032
1246
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
1033
1247
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
1034
1248
|
});
|
|
1035
1249
|
if (r === "secondary")
|
|
1036
|
-
return
|
|
1250
|
+
return s("border", {
|
|
1037
1251
|
"border-border-dark": e === "light",
|
|
1038
1252
|
"border-border-accent": e === "dark",
|
|
1039
1253
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
1040
1254
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
1041
1255
|
});
|
|
1042
1256
|
if (r === "danger")
|
|
1043
|
-
return
|
|
1257
|
+
return s("border", {
|
|
1044
1258
|
"border-border-danger-dark": e === "dark",
|
|
1045
1259
|
"border-border-danger-medium": e === "light",
|
|
1046
1260
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
1047
1261
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
1048
1262
|
});
|
|
1049
1263
|
if (r === "selected")
|
|
1050
|
-
return
|
|
1264
|
+
return s("border", {
|
|
1051
1265
|
"border-border-selected-dark": e === "dark",
|
|
1052
1266
|
"border-border-selected-medium": e === "light",
|
|
1053
1267
|
"border-border-selected-dark dark:border-border-selected-medium": e === "system",
|
|
1054
1268
|
"border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
|
|
1055
1269
|
});
|
|
1056
|
-
},
|
|
1270
|
+
}, Vt = ({
|
|
1057
1271
|
focusMode: e
|
|
1058
|
-
}) =>
|
|
1272
|
+
}) => s("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
1059
1273
|
"focus:outline-focus-dark": e === "dark",
|
|
1060
1274
|
"focus:outline-focus-light": e === "light",
|
|
1061
1275
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
@@ -1068,58 +1282,58 @@ const wt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", _t = ({ kind: e }) =>
|
|
|
1068
1282
|
focusMode: o,
|
|
1069
1283
|
disabled: i,
|
|
1070
1284
|
fullWidth: l,
|
|
1071
|
-
size:
|
|
1072
|
-
noBorder:
|
|
1073
|
-
labelRight:
|
|
1074
|
-
labelLeft:
|
|
1285
|
+
size: d,
|
|
1286
|
+
noBorder: c,
|
|
1287
|
+
labelRight: m,
|
|
1288
|
+
labelLeft: u,
|
|
1075
1289
|
noBackground: b,
|
|
1076
1290
|
variant: g,
|
|
1077
|
-
noTruncate:
|
|
1291
|
+
noTruncate: h,
|
|
1078
1292
|
align: p,
|
|
1079
1293
|
radius: f
|
|
1080
|
-
}) => (g || (g = "primary"), r ?
|
|
1081
|
-
|
|
1082
|
-
|
|
1294
|
+
}) => (g || (g = "primary"), r ? s(ae, t) : s(
|
|
1295
|
+
ae,
|
|
1296
|
+
Lt({
|
|
1083
1297
|
mode: a,
|
|
1084
1298
|
variant: g,
|
|
1085
1299
|
noBackground: b,
|
|
1086
|
-
noTruncate:
|
|
1300
|
+
noTruncate: h,
|
|
1087
1301
|
radius: f
|
|
1088
1302
|
}),
|
|
1089
|
-
|
|
1303
|
+
Mt({
|
|
1090
1304
|
type: e,
|
|
1091
|
-
size:
|
|
1092
|
-
labelRight:
|
|
1093
|
-
labelLeft:
|
|
1305
|
+
size: d,
|
|
1306
|
+
labelRight: m,
|
|
1307
|
+
labelLeft: u,
|
|
1094
1308
|
align: p
|
|
1095
1309
|
}),
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1310
|
+
Ut({ mode: a, variant: g, noBorder: c }),
|
|
1311
|
+
Vt({ focusMode: o }),
|
|
1312
|
+
Ot({ mode: a, variant: g, disabled: i }),
|
|
1313
|
+
zt({ mode: a, variant: g, disabled: i }),
|
|
1100
1314
|
{
|
|
1101
1315
|
"w-full": l,
|
|
1102
1316
|
"disabled:cursor-not-allowed disabled:opacity-50": i
|
|
1103
1317
|
},
|
|
1104
1318
|
t
|
|
1105
|
-
)),
|
|
1319
|
+
)), Dt = (e, t, r) => {
|
|
1106
1320
|
var a;
|
|
1107
1321
|
!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);
|
|
1108
|
-
}, q =
|
|
1322
|
+
}, q = R.forwardRef((e, t) => {
|
|
1109
1323
|
const { onClick: r, noInternalClick: a = !1, ...o } = e;
|
|
1110
|
-
return /* @__PURE__ */
|
|
1324
|
+
return /* @__PURE__ */ n(
|
|
1111
1325
|
"button",
|
|
1112
1326
|
{
|
|
1113
1327
|
ref: t,
|
|
1114
1328
|
onClick: (i) => {
|
|
1115
|
-
|
|
1329
|
+
Dt(i, a, r);
|
|
1116
1330
|
},
|
|
1117
1331
|
...o
|
|
1118
1332
|
}
|
|
1119
1333
|
);
|
|
1120
1334
|
});
|
|
1121
1335
|
q.displayName = "BaseButton";
|
|
1122
|
-
const ke =
|
|
1336
|
+
const ke = R.forwardRef(
|
|
1123
1337
|
({
|
|
1124
1338
|
children: e,
|
|
1125
1339
|
disabled: t = !1,
|
|
@@ -1128,31 +1342,31 @@ const ke = S.forwardRef(
|
|
|
1128
1342
|
fullWidth: o = !1,
|
|
1129
1343
|
className: i,
|
|
1130
1344
|
size: l = "medium",
|
|
1131
|
-
raw:
|
|
1132
|
-
noBorder:
|
|
1133
|
-
variant:
|
|
1134
|
-
noTruncate:
|
|
1345
|
+
raw: d = !1,
|
|
1346
|
+
noBorder: c = !1,
|
|
1347
|
+
variant: m = "primary",
|
|
1348
|
+
noTruncate: u = !1,
|
|
1135
1349
|
radius: b = "large",
|
|
1136
1350
|
...g
|
|
1137
|
-
},
|
|
1351
|
+
}, h) => {
|
|
1138
1352
|
const p = ve({
|
|
1139
1353
|
type: fe,
|
|
1140
1354
|
mode: r,
|
|
1141
1355
|
focusMode: a,
|
|
1142
1356
|
fullWidth: o,
|
|
1143
1357
|
disabled: t,
|
|
1144
|
-
raw:
|
|
1358
|
+
raw: d,
|
|
1145
1359
|
className: i,
|
|
1146
1360
|
size: l,
|
|
1147
|
-
noBorder:
|
|
1148
|
-
variant:
|
|
1149
|
-
noTruncate:
|
|
1361
|
+
noBorder: c,
|
|
1362
|
+
variant: m,
|
|
1363
|
+
noTruncate: u,
|
|
1150
1364
|
radius: b
|
|
1151
1365
|
});
|
|
1152
|
-
return /* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ n(
|
|
1153
1367
|
q,
|
|
1154
1368
|
{
|
|
1155
|
-
ref:
|
|
1369
|
+
ref: h,
|
|
1156
1370
|
className: p,
|
|
1157
1371
|
disabled: t,
|
|
1158
1372
|
...g,
|
|
@@ -1175,7 +1389,7 @@ try {
|
|
|
1175
1389
|
});
|
|
1176
1390
|
} catch {
|
|
1177
1391
|
}
|
|
1178
|
-
const
|
|
1392
|
+
const $t = R.forwardRef(
|
|
1179
1393
|
({
|
|
1180
1394
|
children: e,
|
|
1181
1395
|
disabled: t = !1,
|
|
@@ -1184,40 +1398,40 @@ const Ut = S.forwardRef(
|
|
|
1184
1398
|
fullWidth: o = !1,
|
|
1185
1399
|
className: i,
|
|
1186
1400
|
type: l = "button",
|
|
1187
|
-
raw:
|
|
1188
|
-
noBorder:
|
|
1189
|
-
"aria-label":
|
|
1190
|
-
label:
|
|
1401
|
+
raw: d = !1,
|
|
1402
|
+
noBorder: c = !1,
|
|
1403
|
+
"aria-label": m,
|
|
1404
|
+
label: u,
|
|
1191
1405
|
size: b = "medium",
|
|
1192
1406
|
labelRight: g,
|
|
1193
|
-
labelLeft:
|
|
1407
|
+
labelLeft: h,
|
|
1194
1408
|
noBackground: p = !1,
|
|
1195
1409
|
align: f = "center",
|
|
1196
|
-
active:
|
|
1197
|
-
radius:
|
|
1410
|
+
active: C = !1,
|
|
1411
|
+
radius: E = "large",
|
|
1198
1412
|
...x
|
|
1199
1413
|
}, T) => {
|
|
1200
|
-
const
|
|
1414
|
+
const S = ve({
|
|
1201
1415
|
type: ye,
|
|
1202
1416
|
mode: r,
|
|
1203
1417
|
focusMode: a,
|
|
1204
1418
|
fullWidth: o,
|
|
1205
1419
|
disabled: t,
|
|
1206
|
-
raw:
|
|
1420
|
+
raw: d,
|
|
1207
1421
|
className: i,
|
|
1208
|
-
noBorder:
|
|
1422
|
+
noBorder: c,
|
|
1209
1423
|
size: b,
|
|
1210
1424
|
labelRight: g,
|
|
1211
|
-
labelLeft:
|
|
1425
|
+
labelLeft: h,
|
|
1212
1426
|
noBackground: p,
|
|
1213
1427
|
align: f,
|
|
1214
|
-
radius:
|
|
1215
|
-
}), w =
|
|
1216
|
-
"text-copy-accent-dark": r === "light" && !
|
|
1217
|
-
"text-copy-light": r === "dark" && !
|
|
1218
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
1219
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
1220
|
-
}), U =
|
|
1428
|
+
radius: E
|
|
1429
|
+
}), w = s({
|
|
1430
|
+
"text-copy-accent-dark": r === "light" && !d,
|
|
1431
|
+
"text-copy-light": r === "dark" && !d,
|
|
1432
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
|
|
1433
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !d
|
|
1434
|
+
}), U = C ? s(
|
|
1221
1435
|
"relative",
|
|
1222
1436
|
"focus-within:static",
|
|
1223
1437
|
"focus-within:after:border-transparent",
|
|
@@ -1234,28 +1448,28 @@ const Ut = S.forwardRef(
|
|
|
1234
1448
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
1235
1449
|
}
|
|
1236
1450
|
) : "";
|
|
1237
|
-
return /* @__PURE__ */
|
|
1451
|
+
return /* @__PURE__ */ n("div", { className: U, children: /* @__PURE__ */ v(
|
|
1238
1452
|
q,
|
|
1239
1453
|
{
|
|
1240
1454
|
ref: T,
|
|
1241
|
-
className:
|
|
1455
|
+
className: S,
|
|
1242
1456
|
disabled: t,
|
|
1243
1457
|
type: l,
|
|
1244
|
-
"aria-label":
|
|
1458
|
+
"aria-label": m || u,
|
|
1245
1459
|
...x,
|
|
1246
1460
|
children: [
|
|
1247
|
-
|
|
1248
|
-
/* @__PURE__ */
|
|
1249
|
-
g && /* @__PURE__ */
|
|
1461
|
+
h && /* @__PURE__ */ n("span", { className: "pr-2", children: h }),
|
|
1462
|
+
/* @__PURE__ */ n("div", { className: w, children: e }),
|
|
1463
|
+
g && /* @__PURE__ */ n("span", { className: "pl-2", children: g })
|
|
1250
1464
|
]
|
|
1251
1465
|
}
|
|
1252
1466
|
) });
|
|
1253
1467
|
}
|
|
1254
1468
|
);
|
|
1255
|
-
|
|
1256
|
-
const
|
|
1469
|
+
$t.displayName = "ButtonSort";
|
|
1470
|
+
const Ht = 200, Gt = ({
|
|
1257
1471
|
string: e,
|
|
1258
|
-
idealLength: t =
|
|
1472
|
+
idealLength: t = Ht
|
|
1259
1473
|
}) => {
|
|
1260
1474
|
if (e.length <= t)
|
|
1261
1475
|
return { string: e, isTruncated: !1 };
|
|
@@ -1266,30 +1480,30 @@ const Vt = 200, Dt = ({
|
|
|
1266
1480
|
string: e.slice(0, t + r),
|
|
1267
1481
|
isTruncated: !0
|
|
1268
1482
|
};
|
|
1269
|
-
},
|
|
1483
|
+
}, jt = ({
|
|
1270
1484
|
children: e,
|
|
1271
1485
|
length: t = 200,
|
|
1272
1486
|
mode: r = "system",
|
|
1273
1487
|
focusMode: a = "system"
|
|
1274
1488
|
}) => {
|
|
1275
|
-
const [o, i] =
|
|
1489
|
+
const [o, i] = N(!1);
|
|
1276
1490
|
if (typeof e != "string")
|
|
1277
1491
|
return e;
|
|
1278
|
-
const { string: l, isTruncated:
|
|
1492
|
+
const { string: l, isTruncated: d } = Gt({
|
|
1279
1493
|
string: e,
|
|
1280
1494
|
idealLength: t
|
|
1281
1495
|
});
|
|
1282
1496
|
return /* @__PURE__ */ v("span", { style: { wordBreak: "break-word" }, children: [
|
|
1283
1497
|
o ? e : l,
|
|
1284
|
-
|
|
1498
|
+
d && /* @__PURE__ */ n(
|
|
1285
1499
|
ke,
|
|
1286
1500
|
{
|
|
1287
1501
|
mode: r,
|
|
1288
1502
|
focusMode: a,
|
|
1289
1503
|
className: "ml-2",
|
|
1290
1504
|
size: "small",
|
|
1291
|
-
onClick: (
|
|
1292
|
-
|
|
1505
|
+
onClick: (c) => {
|
|
1506
|
+
c.preventDefault(), i(!o);
|
|
1293
1507
|
},
|
|
1294
1508
|
children: o ? "less..." : "more..."
|
|
1295
1509
|
}
|
|
@@ -1309,302 +1523,105 @@ try {
|
|
|
1309
1523
|
});
|
|
1310
1524
|
} catch {
|
|
1311
1525
|
}
|
|
1312
|
-
const
|
|
1526
|
+
const oe = Ke(
|
|
1313
1527
|
() => import(
|
|
1314
1528
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
1315
|
-
"./LazyMessageAssistant.
|
|
1529
|
+
"./LazyMessageAssistant.TR65WoZU.js"
|
|
1316
1530
|
).then((e) => e.LazyMessageAssistant)
|
|
1317
|
-
),
|
|
1318
|
-
const { state: e } =
|
|
1531
|
+
), Ft = () => {
|
|
1532
|
+
const { state: e } = I(M);
|
|
1319
1533
|
return /* @__PURE__ */ v("div", { className: "space-y-6 mt-2", children: [
|
|
1320
1534
|
e && e.messages.length > 0 && e.messages.map((t, r) => {
|
|
1321
1535
|
const { role: a, content: o, name: i, processingTime: l } = t.message;
|
|
1322
|
-
return (a ===
|
|
1323
|
-
|
|
1536
|
+
return (a === A || a === j) && o ? /* @__PURE__ */ n(Z, { fallback: /* @__PURE__ */ n("span", {}), children: /* @__PURE__ */ n(
|
|
1537
|
+
oe,
|
|
1324
1538
|
{
|
|
1325
1539
|
name: i,
|
|
1326
1540
|
processingTime: l,
|
|
1327
1541
|
children: o
|
|
1328
1542
|
}
|
|
1329
|
-
) }, `${r}-${a}`) : a === $ && o ? /* @__PURE__ */
|
|
1330
|
-
|
|
1543
|
+
) }, `${r}-${a}`) : a === $ && o ? /* @__PURE__ */ n(
|
|
1544
|
+
Bt,
|
|
1331
1545
|
{
|
|
1332
1546
|
kind: "right",
|
|
1333
1547
|
copyToClipboard: o,
|
|
1334
1548
|
copyToClipboardFocusMode: "light",
|
|
1335
|
-
children: /* @__PURE__ */
|
|
1549
|
+
children: /* @__PURE__ */ n(jt, { mode: "light", focusMode: "light", children: o })
|
|
1336
1550
|
},
|
|
1337
1551
|
`${r}-${a}`
|
|
1338
1552
|
) : null;
|
|
1339
1553
|
}),
|
|
1340
|
-
|
|
1554
|
+
Le($, e) && /* @__PURE__ */ n(Z, { fallback: /* @__PURE__ */ n("span", {}), children: /* @__PURE__ */ n(oe, { loading: !0 }) })
|
|
1341
1555
|
] });
|
|
1342
|
-
},
|
|
1343
|
-
const { isAuthenticated: e } =
|
|
1344
|
-
const
|
|
1345
|
-
if (
|
|
1346
|
-
const { scrollHeight: b, clientHeight: g, scrollTop:
|
|
1347
|
-
|
|
1556
|
+
}, Pt = () => {
|
|
1557
|
+
const { isAuthenticated: e } = z(), { state: t } = I(M), [r, a] = N(!1), [o, i] = rt(), l = Oe(e), d = _(!1), c = H(() => {
|
|
1558
|
+
const u = o.current;
|
|
1559
|
+
if (u) {
|
|
1560
|
+
const { scrollHeight: b, clientHeight: g, scrollTop: h } = u, p = b - g - h;
|
|
1561
|
+
u.scrollBy({
|
|
1348
1562
|
top: p,
|
|
1349
1563
|
behavior: "smooth"
|
|
1350
1564
|
});
|
|
1351
1565
|
}
|
|
1352
|
-
}, [o]),
|
|
1353
|
-
const
|
|
1354
|
-
if (
|
|
1355
|
-
const { scrollTop: b, scrollHeight: g, clientHeight:
|
|
1566
|
+
}, [o]), m = H(() => {
|
|
1567
|
+
const u = o.current;
|
|
1568
|
+
if (u) {
|
|
1569
|
+
const { scrollTop: b, scrollHeight: g, clientHeight: h } = u, p = g > h, f = b + h >= g - 1;
|
|
1356
1570
|
a(p && !f);
|
|
1357
1571
|
}
|
|
1358
1572
|
}, [o]);
|
|
1359
|
-
qe(() => {
|
|
1360
|
-
i && i.width && t && !t.streaming &&
|
|
1361
|
-
}, [i, t,
|
|
1362
|
-
const
|
|
1363
|
-
if (
|
|
1364
|
-
return
|
|
1365
|
-
}, [
|
|
1366
|
-
t && t.streaming &&
|
|
1367
|
-
}, [t,
|
|
1368
|
-
|
|
1369
|
-
return k(() => {
|
|
1370
|
-
t && (!h.current && t.streaming && c(), h.current = !!t.streaming);
|
|
1573
|
+
return qe(() => {
|
|
1574
|
+
i && i.width && t && !t.streaming && m();
|
|
1575
|
+
}, [i, t, m]), k(() => {
|
|
1576
|
+
const u = o.current;
|
|
1577
|
+
if (u)
|
|
1578
|
+
return u.addEventListener("scroll", m), () => u.removeEventListener("scroll", m);
|
|
1579
|
+
}, [m, o]), k(() => {
|
|
1580
|
+
t && t.streaming && m();
|
|
1581
|
+
}, [t, m]), k(() => {
|
|
1582
|
+
t && (!d.current && t.streaming && c(), d.current = !!t.streaming);
|
|
1371
1583
|
}, [t, c]), /* @__PURE__ */ v("div", { className: l, ref: o, children: [
|
|
1372
|
-
r && /* @__PURE__ */
|
|
1373
|
-
|
|
1584
|
+
r && /* @__PURE__ */ n("div", { className: "bottom-44 z-40 fixed left-1/2 transform -translate-x-1/2", children: /* @__PURE__ */ n(
|
|
1585
|
+
ze,
|
|
1374
1586
|
{
|
|
1375
1587
|
className: "bg-white hover:bg-white active:bg-slate-400",
|
|
1376
1588
|
size: "medium",
|
|
1377
1589
|
mode: "dark",
|
|
1378
1590
|
onClick: c,
|
|
1379
|
-
children: /* @__PURE__ */
|
|
1591
|
+
children: /* @__PURE__ */ n(Ye, { monotone: !0, size: "size-3", className: "text-copy-dark" })
|
|
1380
1592
|
}
|
|
1381
1593
|
) }),
|
|
1382
|
-
/* @__PURE__ */
|
|
1383
|
-
/* @__PURE__ */
|
|
1594
|
+
/* @__PURE__ */ n(Ue, {}),
|
|
1595
|
+
/* @__PURE__ */ n(Ft, {})
|
|
1384
1596
|
] });
|
|
1385
|
-
}, L = (e, t) => {
|
|
1386
|
-
e({
|
|
1387
|
-
type: se,
|
|
1388
|
-
payload: {
|
|
1389
|
-
streaming: t
|
|
1390
|
-
}
|
|
1391
|
-
});
|
|
1392
|
-
}, oe = (e) => {
|
|
1393
|
-
L(e, !1), e({
|
|
1394
|
-
type: R,
|
|
1395
|
-
payload: {
|
|
1396
|
-
message: {
|
|
1397
|
-
role: j,
|
|
1398
|
-
content: Oe
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
});
|
|
1402
|
-
}, jt = () => {
|
|
1403
|
-
const { state: e, dispatch: t } = A(z), { state: r, dispatch: a } = A(P), [o, i] = I(""), { getAccessToken: l, user: c } = O(), n = C(null), h = C(
|
|
1404
|
-
null
|
|
1405
|
-
);
|
|
1406
|
-
k(() => {
|
|
1407
|
-
(async () => {
|
|
1408
|
-
var g;
|
|
1409
|
-
if (!e || e.messages.length === 0) {
|
|
1410
|
-
(g = h == null ? void 0 : h.current) == null || g.cancel();
|
|
1411
|
-
return;
|
|
1412
|
-
}
|
|
1413
|
-
const b = e.messages[e.messages.length - 1];
|
|
1414
|
-
if (!(e.messages.length === 0 || b.message.role === B || b.message.role === Be || b.message.role === j || b.message.role === Ae))
|
|
1415
|
-
try {
|
|
1416
|
-
const u = await He({
|
|
1417
|
-
accessToken: await l(),
|
|
1418
|
-
name: "generate",
|
|
1419
|
-
data: {
|
|
1420
|
-
messages: e.messages,
|
|
1421
|
-
model: e.engine || M,
|
|
1422
|
-
user: (c == null ? void 0 : c.username) || "",
|
|
1423
|
-
id: e.id,
|
|
1424
|
-
usage: e.usage
|
|
1425
|
-
}
|
|
1426
|
-
});
|
|
1427
|
-
if (u && u.ok) {
|
|
1428
|
-
const p = F();
|
|
1429
|
-
h.current = u.body.getReader();
|
|
1430
|
-
const f = new TextDecoder();
|
|
1431
|
-
for (; ; ) {
|
|
1432
|
-
L(t, !0);
|
|
1433
|
-
const { done: _, value: N } = await h.current.read();
|
|
1434
|
-
if (_) {
|
|
1435
|
-
L(t, !1);
|
|
1436
|
-
break;
|
|
1437
|
-
}
|
|
1438
|
-
const x = f.decode(N, { stream: !0 }), T = x.indexOf(Y);
|
|
1439
|
-
if (T !== -1) {
|
|
1440
|
-
const E = x.substring(0, T), w = JSON.parse(
|
|
1441
|
-
x.substring(T + Y.length)
|
|
1442
|
-
);
|
|
1443
|
-
t({
|
|
1444
|
-
type: ie,
|
|
1445
|
-
payload: {
|
|
1446
|
-
model: w.model,
|
|
1447
|
-
usage: w.usage
|
|
1448
|
-
}
|
|
1449
|
-
}), t({
|
|
1450
|
-
type: R,
|
|
1451
|
-
payload: {
|
|
1452
|
-
message: {
|
|
1453
|
-
content: E,
|
|
1454
|
-
role: B,
|
|
1455
|
-
messageId: p,
|
|
1456
|
-
processingTime: w.processingTime,
|
|
1457
|
-
name: w.name
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
}), L(t, !1);
|
|
1461
|
-
break;
|
|
1462
|
-
} else
|
|
1463
|
-
t({
|
|
1464
|
-
type: R,
|
|
1465
|
-
payload: {
|
|
1466
|
-
message: {
|
|
1467
|
-
content: x,
|
|
1468
|
-
role: B,
|
|
1469
|
-
messageId: p
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
});
|
|
1473
|
-
}
|
|
1474
|
-
} else
|
|
1475
|
-
oe(t);
|
|
1476
|
-
} catch (u) {
|
|
1477
|
-
console.error(u), oe(t);
|
|
1478
|
-
}
|
|
1479
|
-
})();
|
|
1480
|
-
}, [e == null ? void 0 : e.messages]);
|
|
1481
|
-
const m = async (b) => {
|
|
1482
|
-
b.preventDefault(), t({
|
|
1483
|
-
type: R,
|
|
1484
|
-
payload: {
|
|
1485
|
-
message: {
|
|
1486
|
-
role: $,
|
|
1487
|
-
content: o
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
}), i("");
|
|
1491
|
-
};
|
|
1492
|
-
return k(() => {
|
|
1493
|
-
if (r.tag !== "") {
|
|
1494
|
-
const b = r.tag.endsWith(":") && !r.tag.endsWith(": ") ? r.tag + " " : r.tag;
|
|
1495
|
-
b.indexOf(J) !== -1 ? navigator.clipboard.readText().then((u) => {
|
|
1496
|
-
i(b.replace(J, u));
|
|
1497
|
-
}) : i(b), n.current && n.current.focus(), a({
|
|
1498
|
-
type: ce
|
|
1499
|
-
});
|
|
1500
|
-
}
|
|
1501
|
-
}, [r, a]), k(() => {
|
|
1502
|
-
e && e.usage === 0 && e.messages.length === 0 && n.current && n.current.focus();
|
|
1503
|
-
}, [e]), /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s("form", { className: "mt-2", onSubmit: m, children: /* @__PURE__ */ s(
|
|
1504
|
-
Ge,
|
|
1505
|
-
{
|
|
1506
|
-
mode: "dark",
|
|
1507
|
-
focusMode: "light",
|
|
1508
|
-
ref: n,
|
|
1509
|
-
name: "chat-input",
|
|
1510
|
-
label: Me,
|
|
1511
|
-
helperText: "Press ENTER to add a new line",
|
|
1512
|
-
helperTextOnFocus: !0,
|
|
1513
|
-
required: !0,
|
|
1514
|
-
value: o,
|
|
1515
|
-
onChange: (b) => i(b.target.value),
|
|
1516
|
-
onKeyDown: Ze([["mod+Enter", m]]),
|
|
1517
|
-
leftElement: /* @__PURE__ */ s(je, {}),
|
|
1518
|
-
rightElement: /* @__PURE__ */ s(
|
|
1519
|
-
ge,
|
|
1520
|
-
{
|
|
1521
|
-
disabled: e == null ? void 0 : e.streaming,
|
|
1522
|
-
noBorder: !0,
|
|
1523
|
-
type: "submit",
|
|
1524
|
-
mode: "light",
|
|
1525
|
-
focusMode: "light",
|
|
1526
|
-
children: Le
|
|
1527
|
-
}
|
|
1528
|
-
)
|
|
1529
|
-
}
|
|
1530
|
-
) }) });
|
|
1531
|
-
}, Pt = () => {
|
|
1532
|
-
const { dispatch: e, state: t } = A(P), { getAccessToken: r, user: a } = O(), [o, i] = I({
|
|
1533
|
-
loaded: !1
|
|
1534
|
-
}), l = "mt-2 flex justify-center rounded-md", c = (n, h) => {
|
|
1535
|
-
n.preventDefault(), e({
|
|
1536
|
-
type: le,
|
|
1537
|
-
payload: {
|
|
1538
|
-
tag: h
|
|
1539
|
-
}
|
|
1540
|
-
});
|
|
1541
|
-
};
|
|
1542
|
-
return k(() => {
|
|
1543
|
-
if (!a) {
|
|
1544
|
-
i({
|
|
1545
|
-
loaded: !1
|
|
1546
|
-
});
|
|
1547
|
-
return;
|
|
1548
|
-
}
|
|
1549
|
-
o.loaded || (async () => {
|
|
1550
|
-
try {
|
|
1551
|
-
const n = await me({
|
|
1552
|
-
accessToken: await r(),
|
|
1553
|
-
type: ue.GET_USER_PREFERENCES,
|
|
1554
|
-
params: {
|
|
1555
|
-
user: a.username
|
|
1556
|
-
}
|
|
1557
|
-
});
|
|
1558
|
-
n.status === 200 && (e({
|
|
1559
|
-
type: de,
|
|
1560
|
-
payload: {
|
|
1561
|
-
tags: n.data.tags || []
|
|
1562
|
-
}
|
|
1563
|
-
}), i({
|
|
1564
|
-
loaded: !0
|
|
1565
|
-
}));
|
|
1566
|
-
} catch {
|
|
1567
|
-
}
|
|
1568
|
-
})();
|
|
1569
|
-
}, [a]), /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(ze, { alignHorizontal: "center", columnGap: 2, children: o && o.loaded && t.tags && t.tags.map((n) => n.enabled && n.label && n.content && /* @__PURE__ */ s(Ue, { children: /* @__PURE__ */ s("div", { className: l, children: /* @__PURE__ */ s(
|
|
1570
|
-
ge,
|
|
1571
|
-
{
|
|
1572
|
-
noBorder: !0,
|
|
1573
|
-
mode: "dark",
|
|
1574
|
-
focusMode: "light",
|
|
1575
|
-
size: "small",
|
|
1576
|
-
onClick: (h) => c(h, n.content),
|
|
1577
|
-
children: n.label
|
|
1578
|
-
}
|
|
1579
|
-
) }) }, `tag-button-${n.slot}`)) }) });
|
|
1580
1597
|
};
|
|
1581
1598
|
function xe({ isComponent: e = !1 }) {
|
|
1582
|
-
const t =
|
|
1599
|
+
const t = _(!1), { getAccessToken: r, user: a } = z(), [o] = X({
|
|
1583
1600
|
key: Q + De,
|
|
1584
1601
|
initialValue: ""
|
|
1585
1602
|
}), [i] = X({
|
|
1586
1603
|
key: Q + $e,
|
|
1587
|
-
initialValue:
|
|
1588
|
-
}), [l,
|
|
1589
|
-
id:
|
|
1590
|
-
model:
|
|
1591
|
-
engine:
|
|
1604
|
+
initialValue: Pe.ASC
|
|
1605
|
+
}), [l, d] = V(st, {
|
|
1606
|
+
id: P(),
|
|
1607
|
+
model: L,
|
|
1608
|
+
engine: L,
|
|
1592
1609
|
usage: 0,
|
|
1593
1610
|
messages: [],
|
|
1594
1611
|
tags: [],
|
|
1595
1612
|
isComponent: e
|
|
1596
|
-
}), [
|
|
1613
|
+
}), [c, m] = V(dt, {
|
|
1597
1614
|
searchString: o,
|
|
1598
1615
|
sortedCell: "timestamp",
|
|
1599
1616
|
sortDirection: i
|
|
1600
|
-
}), [
|
|
1617
|
+
}), [u, b] = V(ct, {
|
|
1601
1618
|
tag: "",
|
|
1602
1619
|
tags: []
|
|
1603
|
-
}), [g,
|
|
1620
|
+
}), [g, h] = N({
|
|
1604
1621
|
version: "",
|
|
1605
1622
|
models: [],
|
|
1606
1623
|
plugins: [],
|
|
1607
|
-
engine:
|
|
1624
|
+
engine: L,
|
|
1608
1625
|
engines: []
|
|
1609
1626
|
});
|
|
1610
1627
|
return k(() => {
|
|
@@ -1618,7 +1635,7 @@ function xe({ isComponent: e = !1 }) {
|
|
|
1618
1635
|
user: a == null ? void 0 : a.username
|
|
1619
1636
|
}
|
|
1620
1637
|
});
|
|
1621
|
-
t.current = !1, p.status === 200 && (
|
|
1638
|
+
t.current = !1, p.status === 200 && (h(p.data), d({
|
|
1622
1639
|
type: ne,
|
|
1623
1640
|
payload: {
|
|
1624
1641
|
engine: p.data.engine
|
|
@@ -1633,23 +1650,20 @@ function xe({ isComponent: e = !1 }) {
|
|
|
1633
1650
|
var f;
|
|
1634
1651
|
(f = document.getElementById("root")) == null || f.classList.replace("app-hidden", "fadeIn");
|
|
1635
1652
|
}, 500);
|
|
1636
|
-
}), /* @__PURE__ */
|
|
1637
|
-
|
|
1653
|
+
}), /* @__PURE__ */ n(M.Provider, { value: { state: l, dispatch: d, serverStats: g }, children: /* @__PURE__ */ n(
|
|
1654
|
+
Fe.Provider,
|
|
1638
1655
|
{
|
|
1639
1656
|
value: {
|
|
1640
|
-
state:
|
|
1641
|
-
dispatch:
|
|
1657
|
+
state: c,
|
|
1658
|
+
dispatch: m
|
|
1642
1659
|
},
|
|
1643
1660
|
children: /* @__PURE__ */ v(
|
|
1644
|
-
|
|
1661
|
+
F.Provider,
|
|
1645
1662
|
{
|
|
1646
|
-
value: { state:
|
|
1663
|
+
value: { state: u, dispatch: b },
|
|
1647
1664
|
children: [
|
|
1648
|
-
/* @__PURE__ */
|
|
1649
|
-
/* @__PURE__ */
|
|
1650
|
-
/* @__PURE__ */ s(Pt, {}),
|
|
1651
|
-
/* @__PURE__ */ s(jt, {})
|
|
1652
|
-
] })
|
|
1665
|
+
/* @__PURE__ */ n(Ve, { className: "max-h-[calc(100svh_-_163px)]", children: /* @__PURE__ */ n(Pt, {}) }),
|
|
1666
|
+
/* @__PURE__ */ n(mt, {})
|
|
1653
1667
|
]
|
|
1654
1668
|
}
|
|
1655
1669
|
)
|
|
@@ -1657,8 +1671,8 @@ function xe({ isComponent: e = !1 }) {
|
|
|
1657
1671
|
) });
|
|
1658
1672
|
}
|
|
1659
1673
|
xe.displayName = "App";
|
|
1660
|
-
const
|
|
1674
|
+
const Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: xe }, Symbol.toStringTag, { value: "Module" }));
|
|
1661
1675
|
export {
|
|
1662
|
-
|
|
1663
|
-
|
|
1676
|
+
Qt as LazyApp,
|
|
1677
|
+
Bt as ae
|
|
1664
1678
|
};
|