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