@versini/sassysaint 5.5.8 → 5.5.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.DeVrt9BH.js → LazyApp.CFM3xjO9.js} +61 -61
- package/dist/chunks/{LazyHeader.B5IF4pQz.js → LazyHeader.DmyF2sJC.js} +1162 -1185
- package/dist/chunks/{LazyMarkdownWithExtra.B2nAtq4p.js → LazyMarkdownWithExtra.8KBaWeLe.js} +8 -8
- package/dist/chunks/{LazyMessageAssistant.DCB_SFcK.js → LazyMessageAssistant.DLY895fQ.js} +4 -4
- package/dist/chunks/{index.CKvmD6Gi.js → index.CFKzlMOQ.js} +18 -15
- package/dist/chunks/{index.DMnfO73f.js → index.DPKX3b_X.js} +57 -57
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { g as z, R as
|
|
3
|
-
import { AppContext as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useFloatingTree as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as o, jsxs as k, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { g as z, R as L, CARDS as E, renderDataAsList as ce, pluralize as pe, ABOUT_TITLE as Bt, L as H, j as R, C as F, un as Z, LOCAL_STORAGE_PREFIX as ue, LOCAL_STORAGE_SORT as Ot, O as X, ACTION_RESET as Ze, ACTION_RESTORE as Vt, ACTION_SORT as $e, LOCAL_STORAGE_SEARCH as $t, ye as Ne, ACTION_SEARCH as Dt, debounce as Ft, HISTORY_TITLE as Ht, M as Gt, z as De, DEFAULT_AI_ENGINE as le, numberFormatter as Ut, durationFormatter as Qe, NA as jt, ROLE_ASSISTANT as Kt, extractAverage as Wt, GPT4_MAX_TOKENS as Yt, PROFILE_TITLE as qt, TAGS_DESCRIPTION as Zt, ACTION_SET_TAGS as Qt, LOCAL_STORAGE_ENGINE_TOGGLE as Xe, LOCAL_STORAGE_CHAT_DETAILS as Xt, SETTINGS_TITLE as Jt, ENGINE_OPENAI as ne, ENGINE_ANTHROPIC as Q, APP_NAME as er, ACTION_ENGINE as Je, getCurrentGeoLocation as tr, LOG_OUT as Fe } from "./index.CFKzlMOQ.js";
|
|
3
|
+
import { AppContext as ge, HistoryContext as et, E as me, ce as rr, se as or, he as xe, be as ar, oe as D, ge as nr, ne as sr, serviceCall as V, SERVICE_TYPES as $, f as Y, TagsContext as ir, Fe as He, NewChatButton as cr } from "./index.DPKX3b_X.js";
|
|
4
|
+
import * as g from "react";
|
|
5
|
+
import I, { useId as Ae, forwardRef as tt, useState as S, useRef as J, useContext as P, useEffect as G } from "react";
|
|
6
|
+
import w from "clsx";
|
|
7
|
+
import { useFloatingTree as rt, useFloatingNodeId as lr, useListItem as ot, useFloating as at, offset as dr, flip as ur, shift as mr, autoUpdate as hr, useClick as nt, useRole as st, useDismiss as it, useListNavigation as gr, useTypeahead as fr, useInteractions as ct, useMergeRefs as Me, FloatingNode as pr, FloatingList as br, FloatingPortal as lt, FloatingFocusManager as dt, FloatingTree as vr, FloatingOverlay as yr } from "@floating-ui/react";
|
|
8
|
+
const ut = ({
|
|
9
9
|
className: e,
|
|
10
10
|
viewBox: t,
|
|
11
11
|
title: r,
|
|
@@ -22,13 +22,13 @@ const ht = ({
|
|
|
22
22
|
...n,
|
|
23
23
|
children: /* @__PURE__ */ o("path", { d: "m147.487 0l70.081 175.78H256L185.919 0zM66.183 106.221l23.98-61.774l23.98 61.774zM70.07 0L0 175.78h39.18l14.33-36.914h73.308l14.328 36.914h39.179L110.255 0z" })
|
|
24
24
|
}
|
|
25
|
-
),
|
|
25
|
+
), kr = ({
|
|
26
26
|
className: e,
|
|
27
27
|
viewBox: t,
|
|
28
28
|
title: r,
|
|
29
29
|
monotone: a,
|
|
30
30
|
...n
|
|
31
|
-
}) => /* @__PURE__ */
|
|
31
|
+
}) => /* @__PURE__ */ k(
|
|
32
32
|
z,
|
|
33
33
|
{
|
|
34
34
|
defaultViewBox: "0 0 512 512",
|
|
@@ -48,39 +48,13 @@ const ht = ({
|
|
|
48
48
|
/* @__PURE__ */ o("path", { d: "M32 0H192c17.7 0 32 14.3 32 32s-14.3 32-32 32H109.3L342.6 297.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3V192c0 17.7-14.3 32-32 32s-32-14.3-32-32V32C0 14.3 14.3 0 32 0z" })
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
|
-
),
|
|
52
|
-
className: e,
|
|
53
|
-
viewBox: t,
|
|
54
|
-
title: r,
|
|
55
|
-
monotone: a,
|
|
56
|
-
...n
|
|
57
|
-
}) => /* @__PURE__ */ y(
|
|
58
|
-
z,
|
|
59
|
-
{
|
|
60
|
-
defaultViewBox: "0 0 448 512",
|
|
61
|
-
size: "size-5",
|
|
62
|
-
viewBox: t,
|
|
63
|
-
className: e,
|
|
64
|
-
title: r || "Chart",
|
|
65
|
-
...n,
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ o(
|
|
68
|
-
"path",
|
|
69
|
-
{
|
|
70
|
-
opacity: a ? "1" : "0.4",
|
|
71
|
-
d: "M160 80c0-26.5 21.5-48 48-48h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V80z"
|
|
72
|
-
}
|
|
73
|
-
),
|
|
74
|
-
/* @__PURE__ */ o("path", { d: "M368 96c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V144c0-26.5-21.5-48-48-48H368zM48 224c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48H48z" })
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
), Tr = ({
|
|
51
|
+
), wr = ({
|
|
78
52
|
className: e,
|
|
79
53
|
viewBox: t,
|
|
80
54
|
title: r,
|
|
81
55
|
monotone: a,
|
|
82
56
|
...n
|
|
83
|
-
}) => /* @__PURE__ */
|
|
57
|
+
}) => /* @__PURE__ */ k(
|
|
84
58
|
z,
|
|
85
59
|
{
|
|
86
60
|
defaultViewBox: "0 0 448 512",
|
|
@@ -100,13 +74,13 @@ const ht = ({
|
|
|
100
74
|
/* @__PURE__ */ o("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8z" })
|
|
101
75
|
]
|
|
102
76
|
}
|
|
103
|
-
),
|
|
77
|
+
), Tr = ({
|
|
104
78
|
className: e,
|
|
105
79
|
viewBox: t,
|
|
106
80
|
title: r,
|
|
107
81
|
monotone: a,
|
|
108
82
|
...n
|
|
109
|
-
}) => /* @__PURE__ */
|
|
83
|
+
}) => /* @__PURE__ */ k(
|
|
110
84
|
z,
|
|
111
85
|
{
|
|
112
86
|
defaultViewBox: "0 0 512 512",
|
|
@@ -126,13 +100,13 @@ const ht = ({
|
|
|
126
100
|
/* @__PURE__ */ o("path", { d: "M392.4 21.7L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0zM339.7 74.3L172.4 241.7c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3z" })
|
|
127
101
|
]
|
|
128
102
|
}
|
|
129
|
-
),
|
|
103
|
+
), xr = ({
|
|
130
104
|
className: e,
|
|
131
105
|
viewBox: t,
|
|
132
106
|
title: r,
|
|
133
107
|
monotone: a,
|
|
134
108
|
...n
|
|
135
|
-
}) => /* @__PURE__ */
|
|
109
|
+
}) => /* @__PURE__ */ k(
|
|
136
110
|
z,
|
|
137
111
|
{
|
|
138
112
|
defaultViewBox: "0 0 512 512",
|
|
@@ -152,13 +126,13 @@ const ht = ({
|
|
|
152
126
|
/* @__PURE__ */ o("path", { d: "M256 128c13.3 0 24 10.7 24 24v94.1l65 65c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72c-4.5-4.5-7-10.6-7-17V152c0-13.3 10.7-24 24-24z" })
|
|
153
127
|
]
|
|
154
128
|
}
|
|
155
|
-
),
|
|
129
|
+
), Cr = ({
|
|
156
130
|
className: e,
|
|
157
131
|
viewBox: t,
|
|
158
132
|
title: r,
|
|
159
133
|
monotone: a,
|
|
160
134
|
...n
|
|
161
|
-
}) => /* @__PURE__ */
|
|
135
|
+
}) => /* @__PURE__ */ k(
|
|
162
136
|
z,
|
|
163
137
|
{
|
|
164
138
|
defaultViewBox: "0 0 512 512",
|
|
@@ -178,7 +152,7 @@ const ht = ({
|
|
|
178
152
|
/* @__PURE__ */ o("path", { d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM192 248c0-13.3 10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h24V272H216c-13.3 0-24-10.7-24-24z" })
|
|
179
153
|
]
|
|
180
154
|
}
|
|
181
|
-
),
|
|
155
|
+
), mt = ({
|
|
182
156
|
className: e,
|
|
183
157
|
viewBox: t,
|
|
184
158
|
title: r,
|
|
@@ -201,13 +175,13 @@ const ht = ({
|
|
|
201
175
|
}
|
|
202
176
|
)
|
|
203
177
|
}
|
|
204
|
-
),
|
|
178
|
+
), Nr = ({
|
|
205
179
|
className: e,
|
|
206
180
|
viewBox: t,
|
|
207
181
|
title: r,
|
|
208
182
|
monotone: a,
|
|
209
183
|
...n
|
|
210
|
-
}) => /* @__PURE__ */
|
|
184
|
+
}) => /* @__PURE__ */ k(
|
|
211
185
|
z,
|
|
212
186
|
{
|
|
213
187
|
defaultViewBox: "0 0 576 512",
|
|
@@ -227,13 +201,13 @@ const ht = ({
|
|
|
227
201
|
/* @__PURE__ */ o("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
|
|
228
202
|
]
|
|
229
203
|
}
|
|
230
|
-
),
|
|
204
|
+
), Er = ({
|
|
231
205
|
className: e,
|
|
232
206
|
viewBox: t,
|
|
233
207
|
title: r,
|
|
234
208
|
monotone: a,
|
|
235
209
|
...n
|
|
236
|
-
}) => /* @__PURE__ */
|
|
210
|
+
}) => /* @__PURE__ */ k(
|
|
237
211
|
z,
|
|
238
212
|
{
|
|
239
213
|
defaultViewBox: "0 0 512 512",
|
|
@@ -253,7 +227,7 @@ const ht = ({
|
|
|
253
227
|
/* @__PURE__ */ o("path", { d: "M64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H64zm32 64H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z" })
|
|
254
228
|
]
|
|
255
229
|
}
|
|
256
|
-
),
|
|
230
|
+
), Ir = ({
|
|
257
231
|
className: e,
|
|
258
232
|
viewBox: t,
|
|
259
233
|
title: r,
|
|
@@ -270,11 +244,44 @@ const ht = ({
|
|
|
270
244
|
...n,
|
|
271
245
|
children: /* @__PURE__ */ o("path", { d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" })
|
|
272
246
|
}
|
|
247
|
+
), Sr = ({
|
|
248
|
+
className: e,
|
|
249
|
+
viewBox: t,
|
|
250
|
+
title: r,
|
|
251
|
+
monotone: a,
|
|
252
|
+
...n
|
|
253
|
+
}) => /* @__PURE__ */ k(
|
|
254
|
+
z,
|
|
255
|
+
{
|
|
256
|
+
defaultViewBox: "0 0 512 512",
|
|
257
|
+
size: "size-5",
|
|
258
|
+
viewBox: t,
|
|
259
|
+
className: e,
|
|
260
|
+
title: r || "Sliders",
|
|
261
|
+
...n,
|
|
262
|
+
children: [
|
|
263
|
+
/* @__PURE__ */ o(
|
|
264
|
+
"path",
|
|
265
|
+
{
|
|
266
|
+
className: "fa-secondary",
|
|
267
|
+
opacity: a ? "1" : "0.4",
|
|
268
|
+
d: "M128 416a32 32 0 1 0 64 0 32 32 0 1 0 -64 0zM160 96a32 32 0 1 0 64 0 32 32 0 1 0 -64 0zM320 256a32 32 0 1 0 64 0 32 32 0 1 0 -64 0z"
|
|
269
|
+
}
|
|
270
|
+
),
|
|
271
|
+
/* @__PURE__ */ o(
|
|
272
|
+
"path",
|
|
273
|
+
{
|
|
274
|
+
className: "fa-primary",
|
|
275
|
+
d: "M0 416c0 13.3 10.7 24 24 24l59.7 0c10.2 32.5 40.5 56 76.3 56s66.1-23.5 76.3-56L488 440c13.3 0 24-10.7 24-24s-10.7-24-24-24l-251.7 0c-10.2-32.5-40.5-56-76.3-56s-66.1 23.5-76.3 56L24 392c-13.3 0-24 10.7-24 24zm128 0a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32-80c-35.8 0-66.1 23.5-76.3 56L24 232c-13.3 0-24 10.7-24 24s10.7 24 24 24l251.7 0c10.2 32.5 40.5 56 76.3 56s66.1-23.5 76.3-56l59.7 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-59.7 0c-10.2-32.5-40.5-56-76.3-56zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm76.3-56C258.1 39.5 227.8 16 192 16s-66.1 23.5-76.3 56L24 72C10.7 72 0 82.7 0 96s10.7 24 24 24l91.7 0c10.2 32.5 40.5 56 76.3 56s66.1-23.5 76.3-56L488 120c13.3 0 24-10.7 24-24s-10.7-24-24-24L268.3 72z"
|
|
276
|
+
}
|
|
277
|
+
)
|
|
278
|
+
]
|
|
279
|
+
}
|
|
273
280
|
);
|
|
274
|
-
function
|
|
281
|
+
function de(e) {
|
|
275
282
|
return Ae();
|
|
276
283
|
}
|
|
277
|
-
const Ee =
|
|
284
|
+
const Ee = g.createContext({
|
|
278
285
|
getItemProps: () => ({}),
|
|
279
286
|
activeIndex: null,
|
|
280
287
|
/* v8 ignore next 2 */
|
|
@@ -283,7 +290,7 @@ const Ee = f.createContext({
|
|
|
283
290
|
setHasFocusInside: () => {
|
|
284
291
|
},
|
|
285
292
|
isOpen: !1
|
|
286
|
-
}),
|
|
293
|
+
}), Ge = (e) => {
|
|
287
294
|
if (typeof e == "string")
|
|
288
295
|
return e;
|
|
289
296
|
if (typeof e == "function")
|
|
@@ -294,97 +301,97 @@ const Ee = f.createContext({
|
|
|
294
301
|
return t.displayName || t.name || "Component";
|
|
295
302
|
}
|
|
296
303
|
return "Element";
|
|
297
|
-
},
|
|
304
|
+
}, ht = tt(
|
|
298
305
|
({
|
|
299
306
|
trigger: e,
|
|
300
307
|
children: t,
|
|
301
308
|
label: r = "Open menu",
|
|
302
309
|
defaultPlacement: a = "bottom-start",
|
|
303
310
|
onOpenChange: n,
|
|
304
|
-
mode:
|
|
305
|
-
focusMode:
|
|
311
|
+
mode: s = "system",
|
|
312
|
+
focusMode: i = "system",
|
|
306
313
|
...c
|
|
307
|
-
},
|
|
308
|
-
const [l,
|
|
309
|
-
nodeId:
|
|
314
|
+
}, m) => {
|
|
315
|
+
const [l, d] = S(!1), [f, p] = S(!1), [b, h] = S(null), u = J([]), v = J([]), T = P(Ee), x = rt(), y = lr(), N = ot(), { floatingStyles: A, refs: B, context: _ } = at({
|
|
316
|
+
nodeId: y,
|
|
310
317
|
open: l,
|
|
311
|
-
onOpenChange: (
|
|
312
|
-
|
|
318
|
+
onOpenChange: (ae) => {
|
|
319
|
+
d(ae), n == null || n(ae);
|
|
313
320
|
},
|
|
314
321
|
placement: a,
|
|
315
322
|
strategy: "fixed",
|
|
316
|
-
middleware: [
|
|
317
|
-
whileElementsMounted:
|
|
318
|
-
}),
|
|
323
|
+
middleware: [dr({ mainAxis: 10 }), ur(), mr()],
|
|
324
|
+
whileElementsMounted: hr
|
|
325
|
+
}), C = nt(_, {
|
|
319
326
|
event: "mousedown",
|
|
320
327
|
toggle: !0,
|
|
321
328
|
ignoreMouse: !1
|
|
322
|
-
}),
|
|
323
|
-
listRef:
|
|
324
|
-
activeIndex:
|
|
329
|
+
}), U = st(_, { role: "menu" }), j = it(_, { bubbles: !0 }), K = gr(_, {
|
|
330
|
+
listRef: u,
|
|
331
|
+
activeIndex: b,
|
|
325
332
|
nested: !1,
|
|
326
|
-
onNavigate:
|
|
333
|
+
onNavigate: h,
|
|
327
334
|
loop: !0
|
|
328
|
-
}),
|
|
335
|
+
}), re = fr(_, {
|
|
329
336
|
listRef: v,
|
|
330
|
-
onMatch: l ?
|
|
331
|
-
activeIndex:
|
|
332
|
-
}), { getReferenceProps:
|
|
333
|
-
noInternalClick:
|
|
334
|
-
focusMode:
|
|
335
|
-
mode:
|
|
336
|
-
} : {},
|
|
337
|
+
onMatch: l ? h : void 0,
|
|
338
|
+
activeIndex: b
|
|
339
|
+
}), { getReferenceProps: oe, getFloatingProps: Te, getItemProps: O } = ct([C, U, j, K, re]), Ve = Ge(e) === "Button" || Ge(e) === "ButtonIcon", Lt = Ve ? {
|
|
340
|
+
noInternalClick: Ve,
|
|
341
|
+
focusMode: i,
|
|
342
|
+
mode: s
|
|
343
|
+
} : {}, Pt = I.cloneElement(
|
|
337
344
|
e,
|
|
338
345
|
{
|
|
339
|
-
...
|
|
346
|
+
...Lt,
|
|
340
347
|
"aria-label": r,
|
|
341
348
|
"data-open": l ? "" : void 0,
|
|
342
|
-
"data-focus-inside":
|
|
343
|
-
ref: Me([
|
|
344
|
-
...
|
|
345
|
-
|
|
349
|
+
"data-focus-inside": f ? "" : void 0,
|
|
350
|
+
ref: Me([B.setReference, N.ref, m]),
|
|
351
|
+
...oe(
|
|
352
|
+
T.getItemProps({
|
|
346
353
|
...c
|
|
347
354
|
})
|
|
348
355
|
)
|
|
349
356
|
}
|
|
350
357
|
);
|
|
351
358
|
return G(() => {
|
|
352
|
-
if (!
|
|
359
|
+
if (!x)
|
|
353
360
|
return;
|
|
354
|
-
function
|
|
355
|
-
|
|
361
|
+
function ae() {
|
|
362
|
+
d(!1), n == null || n(!1);
|
|
356
363
|
}
|
|
357
|
-
return
|
|
358
|
-
|
|
364
|
+
return x.events.on("click", ae), () => {
|
|
365
|
+
x.events.off("click", ae);
|
|
359
366
|
};
|
|
360
|
-
}, [
|
|
361
|
-
l &&
|
|
362
|
-
}, [
|
|
363
|
-
|
|
367
|
+
}, [x, n]), G(() => {
|
|
368
|
+
l && x && x.events.emit("menuopen", { nodeId: y });
|
|
369
|
+
}, [x, l, y]), /* @__PURE__ */ k(pr, { id: y, children: [
|
|
370
|
+
Pt,
|
|
364
371
|
/* @__PURE__ */ o(
|
|
365
372
|
Ee.Provider,
|
|
366
373
|
{
|
|
367
374
|
value: {
|
|
368
|
-
activeIndex:
|
|
369
|
-
setActiveIndex:
|
|
375
|
+
activeIndex: b,
|
|
376
|
+
setActiveIndex: h,
|
|
370
377
|
getItemProps: O,
|
|
371
|
-
setHasFocusInside:
|
|
378
|
+
setHasFocusInside: p,
|
|
372
379
|
isOpen: l
|
|
373
380
|
},
|
|
374
|
-
children: /* @__PURE__ */ o(
|
|
375
|
-
|
|
381
|
+
children: /* @__PURE__ */ o(br, { elementsRef: u, labelsRef: v, children: l && /* @__PURE__ */ o(lt, { children: /* @__PURE__ */ o(
|
|
382
|
+
dt,
|
|
376
383
|
{
|
|
377
|
-
context:
|
|
384
|
+
context: _,
|
|
378
385
|
modal: !1,
|
|
379
386
|
initialFocus: 0,
|
|
380
387
|
returnFocus: !0,
|
|
381
388
|
children: /* @__PURE__ */ o(
|
|
382
389
|
"div",
|
|
383
390
|
{
|
|
384
|
-
ref:
|
|
391
|
+
ref: B.setFloating,
|
|
385
392
|
className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
|
|
386
|
-
style:
|
|
387
|
-
...
|
|
393
|
+
style: A,
|
|
394
|
+
...Te(),
|
|
388
395
|
children: t
|
|
389
396
|
}
|
|
390
397
|
)
|
|
@@ -394,73 +401,73 @@ const Ee = f.createContext({
|
|
|
394
401
|
)
|
|
395
402
|
] });
|
|
396
403
|
}
|
|
397
|
-
), Ie =
|
|
404
|
+
), Ie = tt((e, t) => /* @__PURE__ */ o(vr, { children: /* @__PURE__ */ o(ht, { ...e, ref: t }) }));
|
|
398
405
|
Ie.displayName = "Menu";
|
|
399
|
-
|
|
400
|
-
const
|
|
406
|
+
ht.displayName = "MenuComponent";
|
|
407
|
+
const W = g.forwardRef(
|
|
401
408
|
({
|
|
402
409
|
label: e,
|
|
403
410
|
disabled: t,
|
|
404
411
|
icon: r,
|
|
405
412
|
raw: a = !1,
|
|
406
413
|
children: n,
|
|
407
|
-
ignoreClick:
|
|
408
|
-
...
|
|
414
|
+
ignoreClick: s = !1,
|
|
415
|
+
...i
|
|
409
416
|
}, c) => {
|
|
410
|
-
let
|
|
411
|
-
const l =
|
|
417
|
+
let m = "";
|
|
418
|
+
const l = g.useContext(Ee), d = ot({ label: t ? null : e }), f = rt(), p = Me([d.ref, c]);
|
|
412
419
|
return a && n ? /* @__PURE__ */ o(
|
|
413
420
|
"div",
|
|
414
421
|
{
|
|
415
422
|
role: "menuitem",
|
|
416
423
|
...l.getItemProps({
|
|
417
|
-
onClick(
|
|
418
|
-
var
|
|
419
|
-
|
|
424
|
+
onClick(b) {
|
|
425
|
+
var h;
|
|
426
|
+
s || ((h = i.onClick) == null || h.call(i, b), f == null || f.events.emit("click"));
|
|
420
427
|
}
|
|
421
428
|
}),
|
|
422
429
|
children: n
|
|
423
430
|
}
|
|
424
|
-
) : (r && (
|
|
431
|
+
) : (r && (m = "pl-2"), /* @__PURE__ */ k(
|
|
425
432
|
"button",
|
|
426
433
|
{
|
|
427
|
-
...
|
|
428
|
-
ref:
|
|
434
|
+
...i,
|
|
435
|
+
ref: p,
|
|
429
436
|
role: "menuitem",
|
|
430
437
|
className: "m-0 flex w-full rounded-md border border-transparent bg-none px-2 py-2 text-left text-base outline-none focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium sm:py-1",
|
|
431
438
|
tabIndex: 0,
|
|
432
439
|
disabled: t,
|
|
433
440
|
...l.getItemProps({
|
|
434
|
-
onClick(
|
|
435
|
-
var
|
|
436
|
-
|
|
441
|
+
onClick(b) {
|
|
442
|
+
var h;
|
|
443
|
+
s || ((h = i.onClick) == null || h.call(i, b), f == null || f.events.emit("click"));
|
|
437
444
|
},
|
|
438
|
-
onFocus(
|
|
439
|
-
var
|
|
440
|
-
(
|
|
445
|
+
onFocus(b) {
|
|
446
|
+
var h;
|
|
447
|
+
(h = i.onFocus) == null || h.call(i, b), l.setHasFocusInside(!0);
|
|
441
448
|
}
|
|
442
449
|
}),
|
|
443
450
|
children: [
|
|
444
451
|
r,
|
|
445
|
-
e && /* @__PURE__ */ o("span", { className:
|
|
452
|
+
e && /* @__PURE__ */ o("span", { className: m, children: e })
|
|
446
453
|
]
|
|
447
454
|
}
|
|
448
455
|
));
|
|
449
456
|
}
|
|
450
457
|
);
|
|
451
|
-
|
|
458
|
+
W.displayName = "MenuItem";
|
|
452
459
|
const _r = ({ className: e, ...t }) => {
|
|
453
|
-
const r =
|
|
460
|
+
const r = w(e, "my-1 border-t border-border-medium");
|
|
454
461
|
return /* @__PURE__ */ o("div", { className: r, ...t });
|
|
455
462
|
};
|
|
456
463
|
/*!
|
|
457
|
-
@versini/ui-menu v2.0.
|
|
458
|
-
©
|
|
464
|
+
@versini/ui-menu v2.0.7
|
|
465
|
+
© 2025 gizmette.com
|
|
459
466
|
*/
|
|
460
467
|
try {
|
|
461
468
|
window.__VERSINI_UI_MENU__ || (window.__VERSINI_UI_MENU__ = {
|
|
462
|
-
version: "2.0.
|
|
463
|
-
buildTime: "
|
|
469
|
+
version: "2.0.7",
|
|
470
|
+
buildTime: "01/01/2025 07:31 PM EST",
|
|
464
471
|
homepage: "https://github.com/aversini/ui-components",
|
|
465
472
|
license: "MIT"
|
|
466
473
|
});
|
|
@@ -482,31 +489,31 @@ try {
|
|
|
482
489
|
const Rr = "av-togglegroup", Ar = "av-togglegroup-item-wrapper", Mr = "av-togglegroup-item";
|
|
483
490
|
function ze(e, t = []) {
|
|
484
491
|
let r = [];
|
|
485
|
-
function a(
|
|
486
|
-
const c =
|
|
487
|
-
r = [...r,
|
|
488
|
-
const l = (
|
|
489
|
-
var
|
|
490
|
-
const { scope:
|
|
491
|
-
return /* @__PURE__ */ o(v.Provider, { value:
|
|
492
|
+
function a(s, i) {
|
|
493
|
+
const c = g.createContext(i), m = r.length;
|
|
494
|
+
r = [...r, i];
|
|
495
|
+
const l = (f) => {
|
|
496
|
+
var p;
|
|
497
|
+
const { scope: b, children: h, ...u } = f, v = ((p = b == null ? void 0 : b[e]) == null ? void 0 : p[m]) || c, T = g.useMemo(() => u, Object.values(u));
|
|
498
|
+
return /* @__PURE__ */ o(v.Provider, { value: T, children: h });
|
|
492
499
|
};
|
|
493
|
-
l.displayName =
|
|
494
|
-
function
|
|
495
|
-
var
|
|
496
|
-
const
|
|
497
|
-
if (
|
|
498
|
-
if (
|
|
499
|
-
throw new Error(`\`${
|
|
500
|
+
l.displayName = s + "Provider";
|
|
501
|
+
function d(f, p) {
|
|
502
|
+
var b;
|
|
503
|
+
const h = ((b = p == null ? void 0 : p[e]) == null ? void 0 : b[m]) || c, u = g.useContext(h);
|
|
504
|
+
if (u) return u;
|
|
505
|
+
if (i !== void 0) return i;
|
|
506
|
+
throw new Error(`\`${f}\` must be used within \`${s}\``);
|
|
500
507
|
}
|
|
501
|
-
return [l,
|
|
508
|
+
return [l, d];
|
|
502
509
|
}
|
|
503
510
|
const n = () => {
|
|
504
|
-
const
|
|
505
|
-
return function(
|
|
506
|
-
const c = (
|
|
507
|
-
return
|
|
508
|
-
() => ({ [`__scope${e}`]: { ...
|
|
509
|
-
[
|
|
511
|
+
const s = r.map((i) => g.createContext(i));
|
|
512
|
+
return function(i) {
|
|
513
|
+
const c = (i == null ? void 0 : i[e]) || s;
|
|
514
|
+
return g.useMemo(
|
|
515
|
+
() => ({ [`__scope${e}`]: { ...i, [e]: c } }),
|
|
516
|
+
[i, c]
|
|
510
517
|
);
|
|
511
518
|
};
|
|
512
519
|
};
|
|
@@ -521,72 +528,72 @@ function zr(...e) {
|
|
|
521
528
|
scopeName: n.scopeName
|
|
522
529
|
}));
|
|
523
530
|
return function(n) {
|
|
524
|
-
const
|
|
525
|
-
const l = c(n)[`__scope${
|
|
526
|
-
return { ...
|
|
531
|
+
const s = a.reduce((i, { useScope: c, scopeName: m }) => {
|
|
532
|
+
const l = c(n)[`__scope${m}`];
|
|
533
|
+
return { ...i, ...l };
|
|
527
534
|
}, {});
|
|
528
|
-
return
|
|
535
|
+
return g.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
529
536
|
};
|
|
530
537
|
};
|
|
531
538
|
return r.scopeName = t.scopeName, r;
|
|
532
539
|
}
|
|
533
|
-
function
|
|
540
|
+
function Ue(e, t) {
|
|
534
541
|
if (typeof e == "function")
|
|
535
542
|
return e(t);
|
|
536
543
|
e != null && (e.current = t);
|
|
537
544
|
}
|
|
538
|
-
function
|
|
545
|
+
function gt(...e) {
|
|
539
546
|
return (t) => {
|
|
540
547
|
let r = !1;
|
|
541
548
|
const a = e.map((n) => {
|
|
542
|
-
const
|
|
543
|
-
return !r && typeof
|
|
549
|
+
const s = Ue(n, t);
|
|
550
|
+
return !r && typeof s == "function" && (r = !0), s;
|
|
544
551
|
});
|
|
545
552
|
if (r)
|
|
546
553
|
return () => {
|
|
547
554
|
for (let n = 0; n < a.length; n++) {
|
|
548
|
-
const
|
|
549
|
-
typeof
|
|
555
|
+
const s = a[n];
|
|
556
|
+
typeof s == "function" ? s() : Ue(e[n], null);
|
|
550
557
|
}
|
|
551
558
|
};
|
|
552
559
|
};
|
|
553
560
|
}
|
|
554
561
|
function Se(...e) {
|
|
555
|
-
return
|
|
562
|
+
return g.useCallback(gt(...e), e);
|
|
556
563
|
}
|
|
557
|
-
var
|
|
558
|
-
const { children: r, ...a } = e, n =
|
|
559
|
-
if (
|
|
560
|
-
const
|
|
561
|
-
return /* @__PURE__ */ o(_e, { ...a, ref: t, children:
|
|
564
|
+
var be = g.forwardRef((e, t) => {
|
|
565
|
+
const { children: r, ...a } = e, n = g.Children.toArray(r), s = n.find(Pr);
|
|
566
|
+
if (s) {
|
|
567
|
+
const i = s.props.children, c = n.map((m) => m === s ? g.Children.count(i) > 1 ? g.Children.only(null) : g.isValidElement(i) ? i.props.children : null : m);
|
|
568
|
+
return /* @__PURE__ */ o(_e, { ...a, ref: t, children: g.isValidElement(i) ? g.cloneElement(i, void 0, c) : null });
|
|
562
569
|
}
|
|
563
570
|
return /* @__PURE__ */ o(_e, { ...a, ref: t, children: r });
|
|
564
571
|
});
|
|
565
|
-
|
|
566
|
-
var _e =
|
|
572
|
+
be.displayName = "Slot";
|
|
573
|
+
var _e = g.forwardRef((e, t) => {
|
|
567
574
|
const { children: r, ...a } = e;
|
|
568
|
-
if (
|
|
575
|
+
if (g.isValidElement(r)) {
|
|
569
576
|
const n = Or(r);
|
|
570
|
-
return
|
|
577
|
+
return g.cloneElement(r, {
|
|
571
578
|
...Br(a, r.props),
|
|
572
579
|
// @ts-ignore
|
|
573
|
-
ref: t ?
|
|
580
|
+
ref: t ? gt(t, n) : n
|
|
574
581
|
});
|
|
575
582
|
}
|
|
576
|
-
return
|
|
583
|
+
return g.Children.count(r) > 1 ? g.Children.only(null) : null;
|
|
577
584
|
});
|
|
578
585
|
_e.displayName = "SlotClone";
|
|
579
|
-
var Lr = ({ children: e }) => /* @__PURE__ */ o(
|
|
586
|
+
var Lr = ({ children: e }) => /* @__PURE__ */ o(M, { children: e });
|
|
580
587
|
function Pr(e) {
|
|
581
|
-
return
|
|
588
|
+
return g.isValidElement(e) && e.type === Lr;
|
|
582
589
|
}
|
|
583
590
|
function Br(e, t) {
|
|
584
591
|
const r = { ...t };
|
|
585
592
|
for (const a in t) {
|
|
586
|
-
const n = e[a],
|
|
587
|
-
/^on[A-Z]/.test(a) ? n &&
|
|
588
|
-
|
|
589
|
-
} : n && (r[a] = n) : a === "style" ? r[a] = { ...n, ...
|
|
593
|
+
const n = e[a], s = t[a];
|
|
594
|
+
/^on[A-Z]/.test(a) ? n && s ? r[a] = (...i) => {
|
|
595
|
+
s(...i), n(...i);
|
|
596
|
+
} : n && (r[a] = n) : a === "style" ? r[a] = { ...n, ...s } : a === "className" && (r[a] = [n, s].filter(Boolean).join(" "));
|
|
590
597
|
}
|
|
591
598
|
return { ...e, ...r };
|
|
592
599
|
}
|
|
@@ -595,7 +602,7 @@ function Or(e) {
|
|
|
595
602
|
let a = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, n = a && "isReactWarning" in a && a.isReactWarning;
|
|
596
603
|
return n ? e.ref : (a = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = a && "isReactWarning" in a && a.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
597
604
|
}
|
|
598
|
-
var
|
|
605
|
+
var Vr = [
|
|
599
606
|
"a",
|
|
600
607
|
"button",
|
|
601
608
|
"div",
|
|
@@ -612,235 +619,235 @@ var Dr = [
|
|
|
612
619
|
"span",
|
|
613
620
|
"svg",
|
|
614
621
|
"ul"
|
|
615
|
-
],
|
|
616
|
-
const r =
|
|
617
|
-
const { asChild:
|
|
618
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(c, { ...
|
|
622
|
+
], he = Vr.reduce((e, t) => {
|
|
623
|
+
const r = g.forwardRef((a, n) => {
|
|
624
|
+
const { asChild: s, ...i } = a, c = s ? be : t;
|
|
625
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(c, { ...i, ref: n });
|
|
619
626
|
});
|
|
620
627
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
621
628
|
}, {});
|
|
622
|
-
function
|
|
629
|
+
function q(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
623
630
|
return function(a) {
|
|
624
631
|
if (e == null || e(a), r === !1 || !a.defaultPrevented)
|
|
625
632
|
return t == null ? void 0 : t(a);
|
|
626
633
|
};
|
|
627
634
|
}
|
|
628
|
-
function
|
|
629
|
-
const t = e + "CollectionProvider", [r, a] = ze(t), [n,
|
|
635
|
+
function $r(e) {
|
|
636
|
+
const t = e + "CollectionProvider", [r, a] = ze(t), [n, s] = r(
|
|
630
637
|
t,
|
|
631
638
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
632
|
-
),
|
|
633
|
-
const { scope:
|
|
634
|
-
return /* @__PURE__ */ o(n, { scope:
|
|
639
|
+
), i = (b) => {
|
|
640
|
+
const { scope: h, children: u } = b, v = I.useRef(null), T = I.useRef(/* @__PURE__ */ new Map()).current;
|
|
641
|
+
return /* @__PURE__ */ o(n, { scope: h, itemMap: T, collectionRef: v, children: u });
|
|
635
642
|
};
|
|
636
|
-
|
|
637
|
-
const c = e + "CollectionSlot",
|
|
638
|
-
(
|
|
639
|
-
const { scope:
|
|
640
|
-
return /* @__PURE__ */ o(
|
|
643
|
+
i.displayName = t;
|
|
644
|
+
const c = e + "CollectionSlot", m = I.forwardRef(
|
|
645
|
+
(b, h) => {
|
|
646
|
+
const { scope: u, children: v } = b, T = s(c, u), x = Se(h, T.collectionRef);
|
|
647
|
+
return /* @__PURE__ */ o(be, { ref: x, children: v });
|
|
641
648
|
}
|
|
642
649
|
);
|
|
643
|
-
|
|
644
|
-
const l = e + "CollectionItemSlot",
|
|
645
|
-
(
|
|
646
|
-
const { scope:
|
|
647
|
-
return
|
|
650
|
+
m.displayName = c;
|
|
651
|
+
const l = e + "CollectionItemSlot", d = "data-radix-collection-item", f = I.forwardRef(
|
|
652
|
+
(b, h) => {
|
|
653
|
+
const { scope: u, children: v, ...T } = b, x = I.useRef(null), y = Se(h, x), N = s(l, u);
|
|
654
|
+
return I.useEffect(() => (N.itemMap.set(x, { ref: x, ...T }), () => void N.itemMap.delete(x))), /* @__PURE__ */ o(be, { [d]: "", ref: y, children: v });
|
|
648
655
|
}
|
|
649
656
|
);
|
|
650
|
-
|
|
651
|
-
function b
|
|
652
|
-
const
|
|
653
|
-
return
|
|
654
|
-
const
|
|
655
|
-
if (!
|
|
656
|
-
const v = Array.from(
|
|
657
|
-
return Array.from(
|
|
658
|
-
(
|
|
657
|
+
f.displayName = l;
|
|
658
|
+
function p(b) {
|
|
659
|
+
const h = s(e + "CollectionConsumer", b);
|
|
660
|
+
return I.useCallback(() => {
|
|
661
|
+
const u = h.collectionRef.current;
|
|
662
|
+
if (!u) return [];
|
|
663
|
+
const v = Array.from(u.querySelectorAll(`[${d}]`));
|
|
664
|
+
return Array.from(h.itemMap.values()).sort(
|
|
665
|
+
(T, x) => v.indexOf(T.ref.current) - v.indexOf(x.ref.current)
|
|
659
666
|
);
|
|
660
|
-
}, [
|
|
667
|
+
}, [h.collectionRef, h.itemMap]);
|
|
661
668
|
}
|
|
662
669
|
return [
|
|
663
|
-
{ Provider:
|
|
664
|
-
|
|
670
|
+
{ Provider: i, Slot: m, ItemSlot: f },
|
|
671
|
+
p,
|
|
665
672
|
a
|
|
666
673
|
];
|
|
667
674
|
}
|
|
668
|
-
var
|
|
669
|
-
}, Fr =
|
|
675
|
+
var Dr = globalThis != null && globalThis.document ? g.useLayoutEffect : () => {
|
|
676
|
+
}, Fr = g.useId || (() => {
|
|
670
677
|
}), Hr = 0;
|
|
671
678
|
function Gr(e) {
|
|
672
|
-
const [t, r] =
|
|
673
|
-
return
|
|
679
|
+
const [t, r] = g.useState(Fr());
|
|
680
|
+
return Dr(() => {
|
|
674
681
|
r((a) => a ?? String(Hr++));
|
|
675
682
|
}, [e]), t ? `radix-${t}` : "";
|
|
676
683
|
}
|
|
677
684
|
function Le(e) {
|
|
678
|
-
const t =
|
|
679
|
-
return
|
|
685
|
+
const t = g.useRef(e);
|
|
686
|
+
return g.useEffect(() => {
|
|
680
687
|
t.current = e;
|
|
681
|
-
}),
|
|
688
|
+
}), g.useMemo(() => (...r) => {
|
|
682
689
|
var a;
|
|
683
690
|
return (a = t.current) == null ? void 0 : a.call(t, ...r);
|
|
684
691
|
}, []);
|
|
685
692
|
}
|
|
686
|
-
function
|
|
693
|
+
function ye({
|
|
687
694
|
prop: e,
|
|
688
695
|
defaultProp: t,
|
|
689
696
|
onChange: r = () => {
|
|
690
697
|
}
|
|
691
698
|
}) {
|
|
692
|
-
const [a, n] = Ur({ defaultProp: t, onChange: r }),
|
|
699
|
+
const [a, n] = Ur({ defaultProp: t, onChange: r }), s = e !== void 0, i = s ? e : a, c = Le(r), m = g.useCallback(
|
|
693
700
|
(l) => {
|
|
694
|
-
if (
|
|
695
|
-
const
|
|
696
|
-
|
|
701
|
+
if (s) {
|
|
702
|
+
const d = typeof l == "function" ? l(e) : l;
|
|
703
|
+
d !== e && c(d);
|
|
697
704
|
} else
|
|
698
705
|
n(l);
|
|
699
706
|
},
|
|
700
|
-
[
|
|
707
|
+
[s, e, n, c]
|
|
701
708
|
);
|
|
702
|
-
return [
|
|
709
|
+
return [i, m];
|
|
703
710
|
}
|
|
704
711
|
function Ur({
|
|
705
712
|
defaultProp: e,
|
|
706
713
|
onChange: t
|
|
707
714
|
}) {
|
|
708
|
-
const r =
|
|
709
|
-
return
|
|
710
|
-
n.current !== a && (
|
|
711
|
-
}, [a, n,
|
|
715
|
+
const r = g.useState(e), [a] = r, n = g.useRef(a), s = Le(t);
|
|
716
|
+
return g.useEffect(() => {
|
|
717
|
+
n.current !== a && (s(a), n.current = a);
|
|
718
|
+
}, [a, n, s]), r;
|
|
712
719
|
}
|
|
713
|
-
var jr =
|
|
714
|
-
function
|
|
715
|
-
const t =
|
|
720
|
+
var jr = g.createContext(void 0);
|
|
721
|
+
function ft(e) {
|
|
722
|
+
const t = g.useContext(jr);
|
|
716
723
|
return e || t || "ltr";
|
|
717
724
|
}
|
|
718
|
-
var
|
|
719
|
-
|
|
725
|
+
var Ce = "rovingFocusGroup.onEntryFocus", Kr = { bubbles: !1, cancelable: !0 }, ke = "RovingFocusGroup", [Re, pt, Wr] = $r(ke), [Yr, bt] = ze(
|
|
726
|
+
ke,
|
|
720
727
|
[Wr]
|
|
721
|
-
), [qr, Zr] = Yr(
|
|
728
|
+
), [qr, Zr] = Yr(ke), vt = g.forwardRef(
|
|
722
729
|
(e, t) => /* @__PURE__ */ o(Re.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Re.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Qr, { ...e, ref: t }) }) })
|
|
723
730
|
);
|
|
724
|
-
|
|
725
|
-
var Qr =
|
|
731
|
+
vt.displayName = ke;
|
|
732
|
+
var Qr = g.forwardRef((e, t) => {
|
|
726
733
|
const {
|
|
727
734
|
__scopeRovingFocusGroup: r,
|
|
728
735
|
orientation: a,
|
|
729
736
|
loop: n = !1,
|
|
730
|
-
dir:
|
|
731
|
-
currentTabStopId:
|
|
737
|
+
dir: s,
|
|
738
|
+
currentTabStopId: i,
|
|
732
739
|
defaultCurrentTabStopId: c,
|
|
733
|
-
onCurrentTabStopIdChange:
|
|
740
|
+
onCurrentTabStopIdChange: m,
|
|
734
741
|
onEntryFocus: l,
|
|
735
|
-
preventScrollOnEntryFocus:
|
|
736
|
-
...
|
|
737
|
-
} = e,
|
|
738
|
-
prop:
|
|
742
|
+
preventScrollOnEntryFocus: d = !1,
|
|
743
|
+
...f
|
|
744
|
+
} = e, p = g.useRef(null), b = Se(t, p), h = ft(s), [u = null, v] = ye({
|
|
745
|
+
prop: i,
|
|
739
746
|
defaultProp: c,
|
|
740
|
-
onChange:
|
|
741
|
-
}), [
|
|
742
|
-
return
|
|
743
|
-
const
|
|
744
|
-
if (
|
|
745
|
-
return
|
|
746
|
-
}, [
|
|
747
|
+
onChange: m
|
|
748
|
+
}), [T, x] = g.useState(!1), y = Le(l), N = pt(r), A = g.useRef(!1), [B, _] = g.useState(0);
|
|
749
|
+
return g.useEffect(() => {
|
|
750
|
+
const C = p.current;
|
|
751
|
+
if (C)
|
|
752
|
+
return C.addEventListener(Ce, y), () => C.removeEventListener(Ce, y);
|
|
753
|
+
}, [y]), /* @__PURE__ */ o(
|
|
747
754
|
qr,
|
|
748
755
|
{
|
|
749
756
|
scope: r,
|
|
750
757
|
orientation: a,
|
|
751
|
-
dir:
|
|
758
|
+
dir: h,
|
|
752
759
|
loop: n,
|
|
753
|
-
currentTabStopId:
|
|
754
|
-
onItemFocus:
|
|
755
|
-
(
|
|
760
|
+
currentTabStopId: u,
|
|
761
|
+
onItemFocus: g.useCallback(
|
|
762
|
+
(C) => v(C),
|
|
756
763
|
[v]
|
|
757
764
|
),
|
|
758
|
-
onItemShiftTab:
|
|
759
|
-
onFocusableItemAdd:
|
|
760
|
-
() =>
|
|
765
|
+
onItemShiftTab: g.useCallback(() => x(!0), []),
|
|
766
|
+
onFocusableItemAdd: g.useCallback(
|
|
767
|
+
() => _((C) => C + 1),
|
|
761
768
|
[]
|
|
762
769
|
),
|
|
763
|
-
onFocusableItemRemove:
|
|
764
|
-
() =>
|
|
770
|
+
onFocusableItemRemove: g.useCallback(
|
|
771
|
+
() => _((C) => C - 1),
|
|
765
772
|
[]
|
|
766
773
|
),
|
|
767
774
|
children: /* @__PURE__ */ o(
|
|
768
|
-
|
|
775
|
+
he.div,
|
|
769
776
|
{
|
|
770
|
-
tabIndex:
|
|
777
|
+
tabIndex: T || B === 0 ? -1 : 0,
|
|
771
778
|
"data-orientation": a,
|
|
772
|
-
...
|
|
773
|
-
ref:
|
|
779
|
+
...f,
|
|
780
|
+
ref: b,
|
|
774
781
|
style: { outline: "none", ...e.style },
|
|
775
|
-
onMouseDown:
|
|
776
|
-
|
|
782
|
+
onMouseDown: q(e.onMouseDown, () => {
|
|
783
|
+
A.current = !0;
|
|
777
784
|
}),
|
|
778
|
-
onFocus:
|
|
779
|
-
const
|
|
780
|
-
if (
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
783
|
-
const
|
|
785
|
+
onFocus: q(e.onFocus, (C) => {
|
|
786
|
+
const U = !A.current;
|
|
787
|
+
if (C.target === C.currentTarget && U && !T) {
|
|
788
|
+
const j = new CustomEvent(Ce, Kr);
|
|
789
|
+
if (C.currentTarget.dispatchEvent(j), !j.defaultPrevented) {
|
|
790
|
+
const K = N().filter((O) => O.focusable), re = K.find((O) => O.active), oe = K.find((O) => O.id === u), Te = [re, oe, ...K].filter(
|
|
784
791
|
Boolean
|
|
785
792
|
).map((O) => O.ref.current);
|
|
786
|
-
|
|
793
|
+
wt(Te, d);
|
|
787
794
|
}
|
|
788
795
|
}
|
|
789
|
-
|
|
796
|
+
A.current = !1;
|
|
790
797
|
}),
|
|
791
|
-
onBlur:
|
|
798
|
+
onBlur: q(e.onBlur, () => x(!1))
|
|
792
799
|
}
|
|
793
800
|
)
|
|
794
801
|
}
|
|
795
802
|
);
|
|
796
|
-
}),
|
|
803
|
+
}), yt = "RovingFocusGroupItem", kt = g.forwardRef(
|
|
797
804
|
(e, t) => {
|
|
798
805
|
const {
|
|
799
806
|
__scopeRovingFocusGroup: r,
|
|
800
807
|
focusable: a = !0,
|
|
801
808
|
active: n = !1,
|
|
802
|
-
tabStopId:
|
|
803
|
-
...
|
|
804
|
-
} = e, c = Gr(),
|
|
805
|
-
return
|
|
809
|
+
tabStopId: s,
|
|
810
|
+
...i
|
|
811
|
+
} = e, c = Gr(), m = s || c, l = Zr(yt, r), d = l.currentTabStopId === m, f = pt(r), { onFocusableItemAdd: p, onFocusableItemRemove: b } = l;
|
|
812
|
+
return g.useEffect(() => {
|
|
806
813
|
if (a)
|
|
807
|
-
return
|
|
808
|
-
}, [a,
|
|
814
|
+
return p(), () => b();
|
|
815
|
+
}, [a, p, b]), /* @__PURE__ */ o(
|
|
809
816
|
Re.ItemSlot,
|
|
810
817
|
{
|
|
811
818
|
scope: r,
|
|
812
|
-
id:
|
|
819
|
+
id: m,
|
|
813
820
|
focusable: a,
|
|
814
821
|
active: n,
|
|
815
822
|
children: /* @__PURE__ */ o(
|
|
816
|
-
|
|
823
|
+
he.span,
|
|
817
824
|
{
|
|
818
|
-
tabIndex:
|
|
825
|
+
tabIndex: d ? 0 : -1,
|
|
819
826
|
"data-orientation": l.orientation,
|
|
820
|
-
...
|
|
827
|
+
...i,
|
|
821
828
|
ref: t,
|
|
822
|
-
onMouseDown:
|
|
823
|
-
a ? l.onItemFocus(
|
|
829
|
+
onMouseDown: q(e.onMouseDown, (h) => {
|
|
830
|
+
a ? l.onItemFocus(m) : h.preventDefault();
|
|
824
831
|
}),
|
|
825
|
-
onFocus:
|
|
826
|
-
onKeyDown:
|
|
827
|
-
if (
|
|
832
|
+
onFocus: q(e.onFocus, () => l.onItemFocus(m)),
|
|
833
|
+
onKeyDown: q(e.onKeyDown, (h) => {
|
|
834
|
+
if (h.key === "Tab" && h.shiftKey) {
|
|
828
835
|
l.onItemShiftTab();
|
|
829
836
|
return;
|
|
830
837
|
}
|
|
831
|
-
if (
|
|
832
|
-
const
|
|
833
|
-
if (
|
|
834
|
-
if (
|
|
835
|
-
|
|
836
|
-
let v =
|
|
837
|
-
if (
|
|
838
|
-
else if (
|
|
839
|
-
|
|
840
|
-
const
|
|
841
|
-
v = l.loop ? to(v,
|
|
838
|
+
if (h.target !== h.currentTarget) return;
|
|
839
|
+
const u = eo(h, l.orientation, l.dir);
|
|
840
|
+
if (u !== void 0) {
|
|
841
|
+
if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
|
|
842
|
+
h.preventDefault();
|
|
843
|
+
let v = f().filter((T) => T.focusable).map((T) => T.ref.current);
|
|
844
|
+
if (u === "last") v.reverse();
|
|
845
|
+
else if (u === "prev" || u === "next") {
|
|
846
|
+
u === "prev" && v.reverse();
|
|
847
|
+
const T = v.indexOf(h.currentTarget);
|
|
848
|
+
v = l.loop ? to(v, T + 1) : v.slice(T + 1);
|
|
842
849
|
}
|
|
843
|
-
setTimeout(() =>
|
|
850
|
+
setTimeout(() => wt(v));
|
|
844
851
|
}
|
|
845
852
|
})
|
|
846
853
|
}
|
|
@@ -849,7 +856,7 @@ var Qr = f.forwardRef((e, t) => {
|
|
|
849
856
|
);
|
|
850
857
|
}
|
|
851
858
|
);
|
|
852
|
-
|
|
859
|
+
kt.displayName = yt;
|
|
853
860
|
var Xr = {
|
|
854
861
|
ArrowLeft: "prev",
|
|
855
862
|
ArrowUp: "prev",
|
|
@@ -868,7 +875,7 @@ function eo(e, t, r) {
|
|
|
868
875
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a)))
|
|
869
876
|
return Xr[a];
|
|
870
877
|
}
|
|
871
|
-
function
|
|
878
|
+
function wt(e, t = !1) {
|
|
872
879
|
const r = document.activeElement;
|
|
873
880
|
for (const a of e)
|
|
874
881
|
if (a === r || (a.focus({ preventScroll: t }), document.activeElement !== r)) return;
|
|
@@ -876,168 +883,168 @@ function Tt(e, t = !1) {
|
|
|
876
883
|
function to(e, t) {
|
|
877
884
|
return e.map((r, a) => e[(t + a) % e.length]);
|
|
878
885
|
}
|
|
879
|
-
var ro =
|
|
880
|
-
const { pressed: r, defaultPressed: a = !1, onPressedChange: n, ...
|
|
886
|
+
var ro = vt, oo = kt, ao = "Toggle", Tt = g.forwardRef((e, t) => {
|
|
887
|
+
const { pressed: r, defaultPressed: a = !1, onPressedChange: n, ...s } = e, [i = !1, c] = ye({
|
|
881
888
|
prop: r,
|
|
882
889
|
onChange: n,
|
|
883
890
|
defaultProp: a
|
|
884
891
|
});
|
|
885
892
|
return /* @__PURE__ */ o(
|
|
886
|
-
|
|
893
|
+
he.button,
|
|
887
894
|
{
|
|
888
895
|
type: "button",
|
|
889
|
-
"aria-pressed":
|
|
890
|
-
"data-state":
|
|
896
|
+
"aria-pressed": i,
|
|
897
|
+
"data-state": i ? "on" : "off",
|
|
891
898
|
"data-disabled": e.disabled ? "" : void 0,
|
|
892
|
-
...
|
|
899
|
+
...s,
|
|
893
900
|
ref: t,
|
|
894
|
-
onClick:
|
|
895
|
-
e.disabled || c(!
|
|
901
|
+
onClick: q(e.onClick, () => {
|
|
902
|
+
e.disabled || c(!i);
|
|
896
903
|
})
|
|
897
904
|
}
|
|
898
905
|
);
|
|
899
906
|
});
|
|
900
|
-
|
|
901
|
-
var
|
|
902
|
-
|
|
903
|
-
]),
|
|
907
|
+
Tt.displayName = ao;
|
|
908
|
+
var ee = "ToggleGroup", [xt, ma] = ze(ee, [
|
|
909
|
+
bt
|
|
910
|
+
]), Ct = bt(), Pe = I.forwardRef((e, t) => {
|
|
904
911
|
const { type: r, ...a } = e;
|
|
905
912
|
if (r === "single")
|
|
906
913
|
return /* @__PURE__ */ o(no, { ...a, ref: t });
|
|
907
914
|
if (r === "multiple")
|
|
908
915
|
return /* @__PURE__ */ o(so, { ...a, ref: t });
|
|
909
|
-
throw new Error(`Missing prop \`type\` expected on \`${
|
|
916
|
+
throw new Error(`Missing prop \`type\` expected on \`${ee}\``);
|
|
910
917
|
});
|
|
911
|
-
Pe.displayName =
|
|
912
|
-
var [
|
|
918
|
+
Pe.displayName = ee;
|
|
919
|
+
var [Nt, Et] = xt(ee), no = I.forwardRef((e, t) => {
|
|
913
920
|
const {
|
|
914
921
|
value: r,
|
|
915
922
|
defaultValue: a,
|
|
916
923
|
onValueChange: n = () => {
|
|
917
924
|
},
|
|
918
|
-
...
|
|
919
|
-
} = e, [
|
|
925
|
+
...s
|
|
926
|
+
} = e, [i, c] = ye({
|
|
920
927
|
prop: r,
|
|
921
928
|
defaultProp: a,
|
|
922
929
|
onChange: n
|
|
923
930
|
});
|
|
924
931
|
return /* @__PURE__ */ o(
|
|
925
|
-
|
|
932
|
+
Nt,
|
|
926
933
|
{
|
|
927
934
|
scope: e.__scopeToggleGroup,
|
|
928
935
|
type: "single",
|
|
929
|
-
value:
|
|
936
|
+
value: i ? [i] : [],
|
|
930
937
|
onItemActivate: c,
|
|
931
|
-
onItemDeactivate:
|
|
932
|
-
children: /* @__PURE__ */ o(
|
|
938
|
+
onItemDeactivate: I.useCallback(() => c(""), [c]),
|
|
939
|
+
children: /* @__PURE__ */ o(It, { ...s, ref: t })
|
|
933
940
|
}
|
|
934
941
|
);
|
|
935
|
-
}), so =
|
|
942
|
+
}), so = I.forwardRef((e, t) => {
|
|
936
943
|
const {
|
|
937
944
|
value: r,
|
|
938
945
|
defaultValue: a,
|
|
939
946
|
onValueChange: n = () => {
|
|
940
947
|
},
|
|
941
|
-
...
|
|
942
|
-
} = e, [
|
|
948
|
+
...s
|
|
949
|
+
} = e, [i = [], c] = ye({
|
|
943
950
|
prop: r,
|
|
944
951
|
defaultProp: a,
|
|
945
952
|
onChange: n
|
|
946
|
-
}),
|
|
947
|
-
(
|
|
953
|
+
}), m = I.useCallback(
|
|
954
|
+
(d) => c((f = []) => [...f, d]),
|
|
948
955
|
[c]
|
|
949
|
-
), l =
|
|
950
|
-
(
|
|
956
|
+
), l = I.useCallback(
|
|
957
|
+
(d) => c((f = []) => f.filter((p) => p !== d)),
|
|
951
958
|
[c]
|
|
952
959
|
);
|
|
953
960
|
return /* @__PURE__ */ o(
|
|
954
|
-
|
|
961
|
+
Nt,
|
|
955
962
|
{
|
|
956
963
|
scope: e.__scopeToggleGroup,
|
|
957
964
|
type: "multiple",
|
|
958
|
-
value:
|
|
959
|
-
onItemActivate:
|
|
965
|
+
value: i,
|
|
966
|
+
onItemActivate: m,
|
|
960
967
|
onItemDeactivate: l,
|
|
961
|
-
children: /* @__PURE__ */ o(
|
|
968
|
+
children: /* @__PURE__ */ o(It, { ...s, ref: t })
|
|
962
969
|
}
|
|
963
970
|
);
|
|
964
971
|
});
|
|
965
|
-
Pe.displayName =
|
|
966
|
-
var [io, co] = xt(
|
|
972
|
+
Pe.displayName = ee;
|
|
973
|
+
var [io, co] = xt(ee), It = I.forwardRef(
|
|
967
974
|
(e, t) => {
|
|
968
975
|
const {
|
|
969
976
|
__scopeToggleGroup: r,
|
|
970
977
|
disabled: a = !1,
|
|
971
978
|
rovingFocus: n = !0,
|
|
972
|
-
orientation:
|
|
973
|
-
dir:
|
|
979
|
+
orientation: s,
|
|
980
|
+
dir: i,
|
|
974
981
|
loop: c = !0,
|
|
975
|
-
...
|
|
976
|
-
} = e, l =
|
|
982
|
+
...m
|
|
983
|
+
} = e, l = Ct(r), d = ft(i), f = { role: "group", dir: d, ...m };
|
|
977
984
|
return /* @__PURE__ */ o(io, { scope: r, rovingFocus: n, disabled: a, children: n ? /* @__PURE__ */ o(
|
|
978
985
|
ro,
|
|
979
986
|
{
|
|
980
987
|
asChild: !0,
|
|
981
988
|
...l,
|
|
982
|
-
orientation:
|
|
983
|
-
dir:
|
|
989
|
+
orientation: s,
|
|
990
|
+
dir: d,
|
|
984
991
|
loop: c,
|
|
985
|
-
children: /* @__PURE__ */ o(
|
|
992
|
+
children: /* @__PURE__ */ o(he.div, { ...f, ref: t })
|
|
986
993
|
}
|
|
987
|
-
) : /* @__PURE__ */ o(
|
|
994
|
+
) : /* @__PURE__ */ o(he.div, { ...f, ref: t }) });
|
|
988
995
|
}
|
|
989
|
-
),
|
|
996
|
+
), ve = "ToggleGroupItem", St = I.forwardRef(
|
|
990
997
|
(e, t) => {
|
|
991
|
-
const r =
|
|
998
|
+
const r = Et(ve, e.__scopeToggleGroup), a = co(ve, e.__scopeToggleGroup), n = Ct(e.__scopeToggleGroup), s = r.value.includes(e.value), i = a.disabled || e.disabled, c = { ...e, pressed: s, disabled: i }, m = I.useRef(null);
|
|
992
999
|
return a.rovingFocus ? /* @__PURE__ */ o(
|
|
993
1000
|
oo,
|
|
994
1001
|
{
|
|
995
1002
|
asChild: !0,
|
|
996
1003
|
...n,
|
|
997
|
-
focusable: !
|
|
998
|
-
active:
|
|
999
|
-
ref:
|
|
1000
|
-
children: /* @__PURE__ */ o(
|
|
1004
|
+
focusable: !i,
|
|
1005
|
+
active: s,
|
|
1006
|
+
ref: m,
|
|
1007
|
+
children: /* @__PURE__ */ o(je, { ...c, ref: t })
|
|
1001
1008
|
}
|
|
1002
|
-
) : /* @__PURE__ */ o(
|
|
1009
|
+
) : /* @__PURE__ */ o(je, { ...c, ref: t });
|
|
1003
1010
|
}
|
|
1004
1011
|
);
|
|
1005
|
-
|
|
1006
|
-
var
|
|
1012
|
+
St.displayName = ve;
|
|
1013
|
+
var je = I.forwardRef(
|
|
1007
1014
|
(e, t) => {
|
|
1008
|
-
const { __scopeToggleGroup: r, value: a, ...n } = e,
|
|
1015
|
+
const { __scopeToggleGroup: r, value: a, ...n } = e, s = Et(ve, r), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, c = s.type === "single" ? i : void 0;
|
|
1009
1016
|
return /* @__PURE__ */ o(
|
|
1010
|
-
|
|
1017
|
+
Tt,
|
|
1011
1018
|
{
|
|
1012
1019
|
...c,
|
|
1013
1020
|
...n,
|
|
1014
1021
|
ref: t,
|
|
1015
|
-
onPressedChange: (
|
|
1016
|
-
|
|
1022
|
+
onPressedChange: (m) => {
|
|
1023
|
+
m ? s.onItemActivate(a) : s.onItemDeactivate(a);
|
|
1017
1024
|
}
|
|
1018
1025
|
}
|
|
1019
1026
|
);
|
|
1020
1027
|
}
|
|
1021
|
-
), lo = Pe, uo =
|
|
1022
|
-
const
|
|
1028
|
+
), lo = Pe, uo = St;
|
|
1029
|
+
const _t = I.createContext({
|
|
1023
1030
|
size: "medium",
|
|
1024
1031
|
focusMode: "system",
|
|
1025
1032
|
mode: "system"
|
|
1026
|
-
}), mo = ({ focusMode: e }) =>
|
|
1033
|
+
}), mo = ({ focusMode: e }) => w("focus:outline", "focus:outline-2", "focus:outline-offset", {
|
|
1027
1034
|
"focus:outline-focus-light": e === "light",
|
|
1028
1035
|
"focus:outline-focus-dark": e === "dark",
|
|
1029
1036
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1030
1037
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1031
|
-
}), ho = ({ mode: e }) =>
|
|
1038
|
+
}), ho = ({ mode: e }) => w({
|
|
1032
1039
|
"data-[state=on]:bg-surface-medium": e === "dark",
|
|
1033
1040
|
"data-[state=on]:bg-surface-lightest": e === "light",
|
|
1034
1041
|
"data-[state=on]:bg-surface-lightest dark:data-[state=on]:bg-surface-medium": e === "system",
|
|
1035
1042
|
"data-[state=on]:bg-surface-medium dark:data-[state=on]:bg-surface-lightest": e === "alt-system"
|
|
1036
|
-
}), go = ({ size: e }) =>
|
|
1043
|
+
}), go = ({ size: e }) => w({
|
|
1037
1044
|
"h-5 px-2": e === "small",
|
|
1038
1045
|
"h-6 px-3": e === "medium",
|
|
1039
1046
|
"h-7 px-4": e === "large"
|
|
1040
|
-
}), fo = ({ mode: e }) =>
|
|
1047
|
+
}), fo = ({ mode: e }) => w(
|
|
1041
1048
|
Ar,
|
|
1042
1049
|
"px-1",
|
|
1043
1050
|
"relative",
|
|
@@ -1057,7 +1064,7 @@ const At = E.createContext({
|
|
|
1057
1064
|
size: r
|
|
1058
1065
|
}) => ({
|
|
1059
1066
|
wrapperClass: fo({ mode: t }),
|
|
1060
|
-
itemClass:
|
|
1067
|
+
itemClass: w(
|
|
1061
1068
|
Mr,
|
|
1062
1069
|
"flex items-center justify-center bg-transparent",
|
|
1063
1070
|
"rounded-sm",
|
|
@@ -1069,7 +1076,7 @@ const At = E.createContext({
|
|
|
1069
1076
|
}), bo = ({
|
|
1070
1077
|
mode: e,
|
|
1071
1078
|
className: t
|
|
1072
|
-
}) =>
|
|
1079
|
+
}) => w(
|
|
1073
1080
|
Rr,
|
|
1074
1081
|
"inline-flex p-1",
|
|
1075
1082
|
"rounded-sm",
|
|
@@ -1086,18 +1093,18 @@ const At = E.createContext({
|
|
|
1086
1093
|
onValueChange: r,
|
|
1087
1094
|
disabled: a,
|
|
1088
1095
|
mode: n = "system",
|
|
1089
|
-
focusMode:
|
|
1090
|
-
size:
|
|
1096
|
+
focusMode: s = "system",
|
|
1097
|
+
size: i = "medium",
|
|
1091
1098
|
defaultValue: c,
|
|
1092
|
-
className:
|
|
1099
|
+
className: m,
|
|
1093
1100
|
...l
|
|
1094
1101
|
}) => {
|
|
1095
|
-
const
|
|
1096
|
-
return /* @__PURE__ */ o(
|
|
1102
|
+
const d = bo({ mode: n, className: m }), f = { size: i, focusMode: s, mode: n };
|
|
1103
|
+
return /* @__PURE__ */ o(_t.Provider, { value: f, children: /* @__PURE__ */ o(
|
|
1097
1104
|
lo,
|
|
1098
1105
|
{
|
|
1099
1106
|
disabled: a,
|
|
1100
|
-
className:
|
|
1107
|
+
className: d,
|
|
1101
1108
|
value: t,
|
|
1102
1109
|
defaultValue: c,
|
|
1103
1110
|
onValueChange: r,
|
|
@@ -1107,57 +1114,57 @@ const At = E.createContext({
|
|
|
1107
1114
|
}
|
|
1108
1115
|
) });
|
|
1109
1116
|
}, yo = ({ value: e, disabled: t }) => {
|
|
1110
|
-
const { size: r, focusMode: a, mode: n } =
|
|
1117
|
+
const { size: r, focusMode: a, mode: n } = P(_t), { itemClass: s, wrapperClass: i } = po({
|
|
1111
1118
|
focusMode: a,
|
|
1112
1119
|
mode: n,
|
|
1113
1120
|
size: r
|
|
1114
1121
|
});
|
|
1115
|
-
return /* @__PURE__ */ o("div", { className:
|
|
1122
|
+
return /* @__PURE__ */ o("div", { className: i, children: /* @__PURE__ */ o(
|
|
1116
1123
|
uo,
|
|
1117
1124
|
{
|
|
1118
1125
|
disabled: t,
|
|
1119
|
-
className:
|
|
1126
|
+
className: s,
|
|
1120
1127
|
value: e,
|
|
1121
1128
|
children: e
|
|
1122
1129
|
}
|
|
1123
1130
|
) });
|
|
1124
1131
|
};
|
|
1125
1132
|
/*!
|
|
1126
|
-
@versini/ui-panel v1.2.
|
|
1127
|
-
©
|
|
1133
|
+
@versini/ui-panel v1.2.14
|
|
1134
|
+
© 2025 gizmette.com
|
|
1128
1135
|
*/
|
|
1129
1136
|
try {
|
|
1130
1137
|
window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
|
|
1131
|
-
version: "1.2.
|
|
1132
|
-
buildTime: "
|
|
1138
|
+
version: "1.2.14",
|
|
1139
|
+
buildTime: "01/01/2025 07:31 PM EST",
|
|
1133
1140
|
homepage: "https://github.com/aversini/ui-components",
|
|
1134
1141
|
license: "MIT"
|
|
1135
1142
|
});
|
|
1136
1143
|
} catch {
|
|
1137
1144
|
}
|
|
1138
|
-
const
|
|
1145
|
+
const Ke = "av-messagebox", We = "av-panel", Ye = "av-button", Be = "icon", ko = "button", wo = "link", To = ({
|
|
1139
1146
|
type: e,
|
|
1140
1147
|
size: t,
|
|
1141
1148
|
labelRight: r,
|
|
1142
1149
|
labelLeft: a,
|
|
1143
1150
|
align: n
|
|
1144
1151
|
}) => {
|
|
1145
|
-
const
|
|
1152
|
+
const s = "text-sm font-medium max-h-8 py-0 px-2", i = "text-base font-medium max-h-9 py-1 px-3", c = "text-lg font-medium max-h-12 py-2 px-4";
|
|
1146
1153
|
switch (e) {
|
|
1147
1154
|
case ko:
|
|
1148
|
-
return
|
|
1149
|
-
[
|
|
1150
|
-
[
|
|
1155
|
+
return w({
|
|
1156
|
+
[s]: t === "small",
|
|
1157
|
+
[i]: t === "medium",
|
|
1151
1158
|
[c]: t === "large"
|
|
1152
1159
|
});
|
|
1153
1160
|
case wo:
|
|
1154
|
-
return
|
|
1155
|
-
[
|
|
1156
|
-
[
|
|
1161
|
+
return w("text-center", {
|
|
1162
|
+
[s]: t === "small",
|
|
1163
|
+
[i]: t === "medium",
|
|
1157
1164
|
[c]: t === "large"
|
|
1158
1165
|
});
|
|
1159
1166
|
case Be:
|
|
1160
|
-
return
|
|
1167
|
+
return w("inline-flex items-center", {
|
|
1161
1168
|
"justify-center": n === "center",
|
|
1162
1169
|
"justify-start": n === "left",
|
|
1163
1170
|
"justify-end": n === "right",
|
|
@@ -1169,7 +1176,7 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1169
1176
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
1170
1177
|
});
|
|
1171
1178
|
}
|
|
1172
|
-
},
|
|
1179
|
+
}, xo = ({
|
|
1173
1180
|
mode: e,
|
|
1174
1181
|
noBackground: t,
|
|
1175
1182
|
noTruncate: r,
|
|
@@ -1177,13 +1184,13 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1177
1184
|
radius: n
|
|
1178
1185
|
}) => {
|
|
1179
1186
|
if (t)
|
|
1180
|
-
return
|
|
1187
|
+
return w("not-prose", {
|
|
1181
1188
|
"rounded-full": n === "large",
|
|
1182
1189
|
"rounded-md": n === "medium",
|
|
1183
1190
|
"rounded-sm": n === "small"
|
|
1184
1191
|
});
|
|
1185
1192
|
if (a === "primary")
|
|
1186
|
-
return
|
|
1193
|
+
return w("not-prose", {
|
|
1187
1194
|
"rounded-full": n === "large",
|
|
1188
1195
|
"rounded-md": n === "medium",
|
|
1189
1196
|
"rounded-sm": n === "small",
|
|
@@ -1194,7 +1201,7 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1194
1201
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
|
|
1195
1202
|
});
|
|
1196
1203
|
if (a === "secondary")
|
|
1197
|
-
return
|
|
1204
|
+
return w("not-prose", {
|
|
1198
1205
|
"rounded-full": n === "large",
|
|
1199
1206
|
"rounded-md": n === "medium",
|
|
1200
1207
|
"rounded-sm": n === "small",
|
|
@@ -1205,7 +1212,7 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1205
1212
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
|
|
1206
1213
|
});
|
|
1207
1214
|
if (a === "danger")
|
|
1208
|
-
return
|
|
1215
|
+
return w("not-prose", {
|
|
1209
1216
|
"rounded-full": n === "large",
|
|
1210
1217
|
"rounded-md": n === "medium",
|
|
1211
1218
|
"rounded-sm": n === "small",
|
|
@@ -1216,7 +1223,7 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1216
1223
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
1217
1224
|
});
|
|
1218
1225
|
if (a === "selected")
|
|
1219
|
-
return
|
|
1226
|
+
return w("not-prose", {
|
|
1220
1227
|
"rounded-full": n === "large",
|
|
1221
1228
|
"rounded-md": n === "medium",
|
|
1222
1229
|
"rounded-sm": n === "small",
|
|
@@ -1226,7 +1233,7 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1226
1233
|
"bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
|
|
1227
1234
|
"bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
|
|
1228
1235
|
});
|
|
1229
|
-
},
|
|
1236
|
+
}, Co = ({
|
|
1230
1237
|
mode: e,
|
|
1231
1238
|
disabled: t,
|
|
1232
1239
|
variant: r
|
|
@@ -1234,34 +1241,34 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1234
1241
|
if (t)
|
|
1235
1242
|
return "";
|
|
1236
1243
|
if (r === "primary")
|
|
1237
|
-
return
|
|
1244
|
+
return w("hover:text-copy-light-hover", {
|
|
1238
1245
|
"hover:bg-action-dark-hover": e === "dark",
|
|
1239
1246
|
"hover:bg-action-light-hover": e === "light",
|
|
1240
1247
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
1241
1248
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
1242
1249
|
});
|
|
1243
1250
|
if (r === "secondary")
|
|
1244
|
-
return
|
|
1251
|
+
return w("hover:text-copy-light-hover", {
|
|
1245
1252
|
"hover:bg-action-dark-hover": e === "light",
|
|
1246
1253
|
"hover:bg-action-light-hover": e === "dark",
|
|
1247
1254
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
1248
1255
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
1249
1256
|
});
|
|
1250
1257
|
if (r === "danger")
|
|
1251
|
-
return
|
|
1258
|
+
return w("hover:text-copy-light-hover", {
|
|
1252
1259
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
1253
1260
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
1254
1261
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
1255
1262
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
1256
1263
|
});
|
|
1257
1264
|
if (r === "selected")
|
|
1258
|
-
return
|
|
1265
|
+
return w("hover:text-copy-light-hover", {
|
|
1259
1266
|
"hover:bg-action-selected-dark-hover": e === "dark",
|
|
1260
1267
|
"hover:bg-action-selected-light-hover": e === "light",
|
|
1261
1268
|
"hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
|
|
1262
1269
|
"hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
|
|
1263
1270
|
});
|
|
1264
|
-
},
|
|
1271
|
+
}, No = ({
|
|
1265
1272
|
mode: e,
|
|
1266
1273
|
disabled: t,
|
|
1267
1274
|
variant: r
|
|
@@ -1269,28 +1276,28 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1269
1276
|
if (t)
|
|
1270
1277
|
return "";
|
|
1271
1278
|
if (r === "primary")
|
|
1272
|
-
return
|
|
1279
|
+
return w("active:text-copy-light-active", {
|
|
1273
1280
|
"active:bg-action-dark-active": e === "dark",
|
|
1274
1281
|
"active:bg-action-light-active": e === "light",
|
|
1275
1282
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
1276
1283
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
1277
1284
|
});
|
|
1278
1285
|
if (r === "secondary")
|
|
1279
|
-
return
|
|
1286
|
+
return w("active:text-copy-light-active", {
|
|
1280
1287
|
"active:bg-action-dark-active": e === "light",
|
|
1281
1288
|
"active:bg-action-light-active": e === "dark",
|
|
1282
1289
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
1283
1290
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
1284
1291
|
});
|
|
1285
1292
|
if (r === "danger")
|
|
1286
|
-
return
|
|
1293
|
+
return w("active:text-copy-lighter-active", {
|
|
1287
1294
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
1288
1295
|
"active:bg-action-danger-light-active": e === "light",
|
|
1289
1296
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
1290
1297
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
1291
1298
|
});
|
|
1292
1299
|
if (r === "selected")
|
|
1293
|
-
return
|
|
1300
|
+
return w("active:text-copy-lighter-active", {
|
|
1294
1301
|
"active:bg-action-selected-dark-active": e === "dark",
|
|
1295
1302
|
"active:bg-action-selected-light-active": e === "light",
|
|
1296
1303
|
"active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
|
|
@@ -1304,28 +1311,28 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1304
1311
|
if (t)
|
|
1305
1312
|
return "border border-transparent";
|
|
1306
1313
|
if (r === "primary")
|
|
1307
|
-
return
|
|
1314
|
+
return w("border", {
|
|
1308
1315
|
"border-border-dark": e === "dark",
|
|
1309
1316
|
"border-border-accent": e === "light",
|
|
1310
1317
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
1311
1318
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
1312
1319
|
});
|
|
1313
1320
|
if (r === "secondary")
|
|
1314
|
-
return
|
|
1321
|
+
return w("border", {
|
|
1315
1322
|
"border-border-dark": e === "light",
|
|
1316
1323
|
"border-border-accent": e === "dark",
|
|
1317
1324
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
1318
1325
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
1319
1326
|
});
|
|
1320
1327
|
if (r === "danger")
|
|
1321
|
-
return
|
|
1328
|
+
return w("border", {
|
|
1322
1329
|
"border-border-danger-dark": e === "dark",
|
|
1323
1330
|
"border-border-danger-medium": e === "light",
|
|
1324
1331
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
1325
1332
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
1326
1333
|
});
|
|
1327
1334
|
if (r === "selected")
|
|
1328
|
-
return
|
|
1335
|
+
return w("border", {
|
|
1329
1336
|
"border-border-selected-dark": e === "dark",
|
|
1330
1337
|
"border-border-selected-medium": e === "light",
|
|
1331
1338
|
"border-border-selected-dark dark:border-border-selected-medium": e === "system",
|
|
@@ -1333,187 +1340,187 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1333
1340
|
});
|
|
1334
1341
|
}, Io = ({
|
|
1335
1342
|
focusMode: e
|
|
1336
|
-
}) =>
|
|
1343
|
+
}) => w("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
1337
1344
|
"focus:outline-focus-dark": e === "dark",
|
|
1338
1345
|
"focus:outline-focus-light": e === "light",
|
|
1339
1346
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1340
1347
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1341
|
-
}),
|
|
1348
|
+
}), Rt = ({
|
|
1342
1349
|
type: e,
|
|
1343
1350
|
className: t,
|
|
1344
1351
|
raw: r,
|
|
1345
1352
|
mode: a,
|
|
1346
1353
|
focusMode: n,
|
|
1347
|
-
disabled:
|
|
1348
|
-
fullWidth:
|
|
1354
|
+
disabled: s,
|
|
1355
|
+
fullWidth: i,
|
|
1349
1356
|
size: c,
|
|
1350
|
-
noBorder:
|
|
1357
|
+
noBorder: m,
|
|
1351
1358
|
labelRight: l,
|
|
1352
|
-
labelLeft:
|
|
1353
|
-
noBackground:
|
|
1354
|
-
variant:
|
|
1355
|
-
noTruncate:
|
|
1356
|
-
align:
|
|
1357
|
-
radius:
|
|
1358
|
-
}) => (
|
|
1359
|
-
|
|
1360
|
-
|
|
1359
|
+
labelLeft: d,
|
|
1360
|
+
noBackground: f,
|
|
1361
|
+
variant: p,
|
|
1362
|
+
noTruncate: b,
|
|
1363
|
+
align: h,
|
|
1364
|
+
radius: u
|
|
1365
|
+
}) => (p || (p = "primary"), r ? w(Ye, t) : w(
|
|
1366
|
+
Ye,
|
|
1367
|
+
xo({
|
|
1361
1368
|
mode: a,
|
|
1362
|
-
variant:
|
|
1363
|
-
noBackground:
|
|
1364
|
-
noTruncate:
|
|
1365
|
-
radius:
|
|
1369
|
+
variant: p,
|
|
1370
|
+
noBackground: f,
|
|
1371
|
+
noTruncate: b,
|
|
1372
|
+
radius: u
|
|
1366
1373
|
}),
|
|
1367
|
-
|
|
1374
|
+
To({
|
|
1368
1375
|
type: e,
|
|
1369
1376
|
size: c,
|
|
1370
1377
|
labelRight: l,
|
|
1371
|
-
labelLeft:
|
|
1372
|
-
align:
|
|
1378
|
+
labelLeft: d,
|
|
1379
|
+
align: h
|
|
1373
1380
|
}),
|
|
1374
|
-
Eo({ mode: a, variant:
|
|
1381
|
+
Eo({ mode: a, variant: p, noBorder: m }),
|
|
1375
1382
|
Io({ focusMode: n }),
|
|
1376
|
-
|
|
1377
|
-
|
|
1383
|
+
Co({ mode: a, variant: p, disabled: s }),
|
|
1384
|
+
No({ mode: a, variant: p, disabled: s }),
|
|
1378
1385
|
{
|
|
1379
|
-
"w-full":
|
|
1380
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
|
1386
|
+
"w-full": i,
|
|
1387
|
+
"disabled:cursor-not-allowed disabled:opacity-50": s
|
|
1381
1388
|
},
|
|
1382
1389
|
t
|
|
1383
1390
|
)), So = (e, t, r) => {
|
|
1384
1391
|
var a;
|
|
1385
1392
|
!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);
|
|
1386
|
-
}, Oe =
|
|
1393
|
+
}, Oe = I.forwardRef((e, t) => {
|
|
1387
1394
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
1388
1395
|
return /* @__PURE__ */ o(
|
|
1389
1396
|
"button",
|
|
1390
1397
|
{
|
|
1391
1398
|
ref: t,
|
|
1392
|
-
onClick: (
|
|
1393
|
-
So(
|
|
1399
|
+
onClick: (s) => {
|
|
1400
|
+
So(s, a, r);
|
|
1394
1401
|
},
|
|
1395
1402
|
...n
|
|
1396
1403
|
}
|
|
1397
1404
|
);
|
|
1398
1405
|
});
|
|
1399
1406
|
Oe.displayName = "BaseButton";
|
|
1400
|
-
const
|
|
1407
|
+
const At = I.forwardRef(
|
|
1401
1408
|
({
|
|
1402
1409
|
children: e,
|
|
1403
1410
|
disabled: t = !1,
|
|
1404
1411
|
mode: r = "system",
|
|
1405
1412
|
focusMode: a = "system",
|
|
1406
1413
|
fullWidth: n = !1,
|
|
1407
|
-
className:
|
|
1408
|
-
type:
|
|
1414
|
+
className: s,
|
|
1415
|
+
type: i = "button",
|
|
1409
1416
|
raw: c = !1,
|
|
1410
|
-
noBorder:
|
|
1417
|
+
noBorder: m = !1,
|
|
1411
1418
|
"aria-label": l,
|
|
1412
|
-
label:
|
|
1413
|
-
size:
|
|
1414
|
-
labelRight:
|
|
1415
|
-
labelLeft:
|
|
1416
|
-
noBackground:
|
|
1417
|
-
align:
|
|
1419
|
+
label: d,
|
|
1420
|
+
size: f = "medium",
|
|
1421
|
+
labelRight: p,
|
|
1422
|
+
labelLeft: b,
|
|
1423
|
+
noBackground: h = !1,
|
|
1424
|
+
align: u = "center",
|
|
1418
1425
|
radius: v = "large",
|
|
1419
|
-
...
|
|
1420
|
-
},
|
|
1421
|
-
const
|
|
1426
|
+
...T
|
|
1427
|
+
}, x) => {
|
|
1428
|
+
const y = Rt({
|
|
1422
1429
|
type: Be,
|
|
1423
1430
|
mode: r,
|
|
1424
1431
|
focusMode: a,
|
|
1425
1432
|
fullWidth: n,
|
|
1426
1433
|
disabled: t,
|
|
1427
1434
|
raw: c,
|
|
1428
|
-
className:
|
|
1429
|
-
noBorder:
|
|
1430
|
-
size:
|
|
1431
|
-
labelRight:
|
|
1432
|
-
labelLeft:
|
|
1433
|
-
noBackground:
|
|
1434
|
-
align:
|
|
1435
|
+
className: s,
|
|
1436
|
+
noBorder: m,
|
|
1437
|
+
size: f,
|
|
1438
|
+
labelRight: p,
|
|
1439
|
+
labelLeft: b,
|
|
1440
|
+
noBackground: h,
|
|
1441
|
+
align: u,
|
|
1435
1442
|
radius: v
|
|
1436
|
-
}),
|
|
1443
|
+
}), N = w({
|
|
1437
1444
|
"text-copy-accent-dark": r === "light" && !c,
|
|
1438
1445
|
"text-copy-light": r === "dark" && !c,
|
|
1439
1446
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
|
|
1440
1447
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !c
|
|
1441
1448
|
});
|
|
1442
|
-
return /* @__PURE__ */
|
|
1449
|
+
return /* @__PURE__ */ k(
|
|
1443
1450
|
Oe,
|
|
1444
1451
|
{
|
|
1445
|
-
ref:
|
|
1446
|
-
className:
|
|
1452
|
+
ref: x,
|
|
1453
|
+
className: y,
|
|
1447
1454
|
disabled: t,
|
|
1448
|
-
type:
|
|
1449
|
-
"aria-label": l ||
|
|
1450
|
-
...
|
|
1455
|
+
type: i,
|
|
1456
|
+
"aria-label": l || d,
|
|
1457
|
+
...T,
|
|
1451
1458
|
children: [
|
|
1452
|
-
|
|
1453
|
-
/* @__PURE__ */ o("div", { className:
|
|
1454
|
-
|
|
1459
|
+
b && /* @__PURE__ */ o("span", { className: "pr-2", children: b }),
|
|
1460
|
+
/* @__PURE__ */ o("div", { className: N, children: e }),
|
|
1461
|
+
p && /* @__PURE__ */ o("span", { className: "pl-2", children: p })
|
|
1455
1462
|
]
|
|
1456
1463
|
}
|
|
1457
1464
|
);
|
|
1458
1465
|
}
|
|
1459
1466
|
);
|
|
1460
|
-
|
|
1467
|
+
At.displayName = "ButtonIcon";
|
|
1461
1468
|
/*!
|
|
1462
|
-
@versini/ui-button v3.2.
|
|
1463
|
-
©
|
|
1469
|
+
@versini/ui-button v3.2.1
|
|
1470
|
+
© 2025 gizmette.com
|
|
1464
1471
|
*/
|
|
1465
1472
|
try {
|
|
1466
1473
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
1467
|
-
version: "3.2.
|
|
1468
|
-
buildTime: "
|
|
1474
|
+
version: "3.2.1",
|
|
1475
|
+
buildTime: "01/01/2025 07:31 PM EST",
|
|
1469
1476
|
homepage: "https://github.com/aversini/ui-components",
|
|
1470
1477
|
license: "MIT"
|
|
1471
1478
|
});
|
|
1472
1479
|
} catch {
|
|
1473
1480
|
}
|
|
1474
|
-
const _o =
|
|
1481
|
+
const _o = I.forwardRef(
|
|
1475
1482
|
({
|
|
1476
1483
|
children: e,
|
|
1477
1484
|
disabled: t = !1,
|
|
1478
1485
|
mode: r = "system",
|
|
1479
1486
|
focusMode: a = "system",
|
|
1480
1487
|
fullWidth: n = !1,
|
|
1481
|
-
className:
|
|
1482
|
-
type:
|
|
1488
|
+
className: s,
|
|
1489
|
+
type: i = "button",
|
|
1483
1490
|
raw: c = !1,
|
|
1484
|
-
noBorder:
|
|
1491
|
+
noBorder: m = !1,
|
|
1485
1492
|
"aria-label": l,
|
|
1486
|
-
label:
|
|
1487
|
-
size:
|
|
1488
|
-
labelRight:
|
|
1489
|
-
labelLeft:
|
|
1490
|
-
noBackground:
|
|
1491
|
-
align:
|
|
1493
|
+
label: d,
|
|
1494
|
+
size: f = "medium",
|
|
1495
|
+
labelRight: p,
|
|
1496
|
+
labelLeft: b,
|
|
1497
|
+
noBackground: h = !1,
|
|
1498
|
+
align: u = "center",
|
|
1492
1499
|
active: v = !1,
|
|
1493
|
-
radius:
|
|
1494
|
-
...
|
|
1495
|
-
},
|
|
1496
|
-
const
|
|
1500
|
+
radius: T = "large",
|
|
1501
|
+
...x
|
|
1502
|
+
}, y) => {
|
|
1503
|
+
const N = Rt({
|
|
1497
1504
|
type: Be,
|
|
1498
1505
|
mode: r,
|
|
1499
1506
|
focusMode: a,
|
|
1500
1507
|
fullWidth: n,
|
|
1501
1508
|
disabled: t,
|
|
1502
1509
|
raw: c,
|
|
1503
|
-
className:
|
|
1504
|
-
noBorder:
|
|
1505
|
-
size:
|
|
1506
|
-
labelRight:
|
|
1507
|
-
labelLeft:
|
|
1508
|
-
noBackground:
|
|
1509
|
-
align:
|
|
1510
|
-
radius:
|
|
1511
|
-
}),
|
|
1510
|
+
className: s,
|
|
1511
|
+
noBorder: m,
|
|
1512
|
+
size: f,
|
|
1513
|
+
labelRight: p,
|
|
1514
|
+
labelLeft: b,
|
|
1515
|
+
noBackground: h,
|
|
1516
|
+
align: u,
|
|
1517
|
+
radius: T
|
|
1518
|
+
}), A = w({
|
|
1512
1519
|
"text-copy-accent-dark": r === "light" && !c,
|
|
1513
1520
|
"text-copy-light": r === "dark" && !c,
|
|
1514
1521
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
|
|
1515
1522
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !c
|
|
1516
|
-
}),
|
|
1523
|
+
}), B = v ? w(
|
|
1517
1524
|
"relative",
|
|
1518
1525
|
"focus-within:static",
|
|
1519
1526
|
"focus-within:after:border-transparent",
|
|
@@ -1530,19 +1537,19 @@ const _o = E.forwardRef(
|
|
|
1530
1537
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
1531
1538
|
}
|
|
1532
1539
|
) : "";
|
|
1533
|
-
return /* @__PURE__ */ o("div", { className:
|
|
1540
|
+
return /* @__PURE__ */ o("div", { className: B, children: /* @__PURE__ */ k(
|
|
1534
1541
|
Oe,
|
|
1535
1542
|
{
|
|
1536
|
-
ref:
|
|
1537
|
-
className:
|
|
1543
|
+
ref: y,
|
|
1544
|
+
className: N,
|
|
1538
1545
|
disabled: t,
|
|
1539
|
-
type:
|
|
1540
|
-
"aria-label": l ||
|
|
1541
|
-
...
|
|
1546
|
+
type: i,
|
|
1547
|
+
"aria-label": l || d,
|
|
1548
|
+
...x,
|
|
1542
1549
|
children: [
|
|
1543
|
-
|
|
1544
|
-
/* @__PURE__ */ o("div", { className:
|
|
1545
|
-
|
|
1550
|
+
b && /* @__PURE__ */ o("span", { className: "pr-2", children: b }),
|
|
1551
|
+
/* @__PURE__ */ o("div", { className: A, children: e }),
|
|
1552
|
+
p && /* @__PURE__ */ o("span", { className: "pl-2", children: p })
|
|
1546
1553
|
]
|
|
1547
1554
|
}
|
|
1548
1555
|
) });
|
|
@@ -1555,13 +1562,13 @@ const Ro = ({
|
|
|
1555
1562
|
viewBox: r,
|
|
1556
1563
|
className: a,
|
|
1557
1564
|
defaultViewBox: n,
|
|
1558
|
-
size:
|
|
1559
|
-
title:
|
|
1565
|
+
size: s,
|
|
1566
|
+
title: i,
|
|
1560
1567
|
semantic: c = !1,
|
|
1561
|
-
...
|
|
1568
|
+
...m
|
|
1562
1569
|
}) => {
|
|
1563
|
-
const l =
|
|
1564
|
-
return /* @__PURE__ */
|
|
1570
|
+
const l = w(s, a);
|
|
1571
|
+
return /* @__PURE__ */ k(M, { children: [
|
|
1565
1572
|
/* @__PURE__ */ o(
|
|
1566
1573
|
"svg",
|
|
1567
1574
|
{
|
|
@@ -1572,21 +1579,21 @@ const Ro = ({
|
|
|
1572
1579
|
role: "img",
|
|
1573
1580
|
"aria-hidden": !c,
|
|
1574
1581
|
focusable: !1,
|
|
1575
|
-
...
|
|
1582
|
+
...m,
|
|
1576
1583
|
children: e
|
|
1577
1584
|
}
|
|
1578
1585
|
),
|
|
1579
|
-
|
|
1586
|
+
i && c && /* @__PURE__ */ o("span", { className: "sr-only", children: i })
|
|
1580
1587
|
] });
|
|
1581
1588
|
};
|
|
1582
1589
|
/*!
|
|
1583
1590
|
@versini/ui-svgicon v3.0.2
|
|
1584
|
-
©
|
|
1591
|
+
© 2025 gizmette.com
|
|
1585
1592
|
*/
|
|
1586
1593
|
try {
|
|
1587
1594
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
1588
1595
|
version: "3.0.2",
|
|
1589
|
-
buildTime: "
|
|
1596
|
+
buildTime: "01/01/2025 07:31 PM EST",
|
|
1590
1597
|
homepage: "https://github.com/aversini/ui-components",
|
|
1591
1598
|
license: "MIT"
|
|
1592
1599
|
});
|
|
@@ -1611,49 +1618,49 @@ const Ao = ({
|
|
|
1611
1618
|
}
|
|
1612
1619
|
);
|
|
1613
1620
|
/*!
|
|
1614
|
-
@versini/ui-icons v3.0
|
|
1615
|
-
©
|
|
1621
|
+
@versini/ui-icons v3.1.0
|
|
1622
|
+
© 2025 gizmette.com
|
|
1616
1623
|
*/
|
|
1617
1624
|
try {
|
|
1618
1625
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
1619
|
-
version: "3.0
|
|
1620
|
-
buildTime: "
|
|
1626
|
+
version: "3.1.0",
|
|
1627
|
+
buildTime: "01/01/2025 07:31 PM EST",
|
|
1621
1628
|
homepage: "https://github.com/aversini/ui-components",
|
|
1622
1629
|
license: "MIT"
|
|
1623
1630
|
});
|
|
1624
1631
|
} catch {
|
|
1625
1632
|
}
|
|
1626
|
-
const
|
|
1633
|
+
const Mt = g.createContext(null);
|
|
1627
1634
|
function Mo({
|
|
1628
1635
|
initialOpen: e = !1,
|
|
1629
1636
|
open: t,
|
|
1630
1637
|
onOpenChange: r
|
|
1631
1638
|
} = {}) {
|
|
1632
|
-
const [a, n] =
|
|
1639
|
+
const [a, n] = g.useState(e), [s, i] = g.useState(), [c, m] = g.useState(), l = t ?? a, d = r ?? n, f = at({
|
|
1633
1640
|
open: l,
|
|
1634
|
-
onOpenChange:
|
|
1635
|
-
}),
|
|
1641
|
+
onOpenChange: d
|
|
1642
|
+
}), p = f.context, b = nt(p, {
|
|
1636
1643
|
enabled: t == null
|
|
1637
|
-
}),
|
|
1644
|
+
}), h = it(p, {
|
|
1638
1645
|
outsidePress: !1,
|
|
1639
1646
|
outsidePressEvent: "mousedown"
|
|
1640
|
-
}),
|
|
1641
|
-
return
|
|
1647
|
+
}), u = st(p), v = ct([b, h, u]);
|
|
1648
|
+
return g.useMemo(
|
|
1642
1649
|
() => ({
|
|
1643
1650
|
open: l,
|
|
1644
|
-
setOpen:
|
|
1651
|
+
setOpen: d,
|
|
1645
1652
|
...v,
|
|
1646
|
-
...
|
|
1647
|
-
labelId:
|
|
1653
|
+
...f,
|
|
1654
|
+
labelId: s,
|
|
1648
1655
|
descriptionId: c,
|
|
1649
|
-
setLabelId:
|
|
1650
|
-
setDescriptionId:
|
|
1656
|
+
setLabelId: i,
|
|
1657
|
+
setDescriptionId: m
|
|
1651
1658
|
}),
|
|
1652
|
-
[l,
|
|
1659
|
+
[l, d, v, f, s, c]
|
|
1653
1660
|
);
|
|
1654
1661
|
}
|
|
1655
|
-
const
|
|
1656
|
-
const e =
|
|
1662
|
+
const we = () => {
|
|
1663
|
+
const e = g.useContext(Mt);
|
|
1657
1664
|
if (e == null)
|
|
1658
1665
|
throw new Error("Modal components must be wrapped in <Modal />");
|
|
1659
1666
|
return e;
|
|
@@ -1663,94 +1670,94 @@ function zo({
|
|
|
1663
1670
|
...t
|
|
1664
1671
|
}) {
|
|
1665
1672
|
const r = Mo(t);
|
|
1666
|
-
return /* @__PURE__ */ o(
|
|
1673
|
+
return /* @__PURE__ */ o(Mt.Provider, { value: r, children: e });
|
|
1667
1674
|
}
|
|
1668
|
-
const Lo =
|
|
1669
|
-
const { context: r, ...a } =
|
|
1675
|
+
const Lo = g.forwardRef(function(e, t) {
|
|
1676
|
+
const { context: r, ...a } = we(), n = Me([a.refs.setFloating, t]);
|
|
1670
1677
|
if (!r.open)
|
|
1671
1678
|
return null;
|
|
1672
|
-
const { overlayBackground:
|
|
1673
|
-
[`${
|
|
1674
|
-
"bg-black sm:bg-black/[.8]": !
|
|
1679
|
+
const { overlayBackground: s, ...i } = e, c = w("grid place-items-center", {
|
|
1680
|
+
[`${s}`]: s,
|
|
1681
|
+
"bg-black sm:bg-black/[.8]": !s
|
|
1675
1682
|
});
|
|
1676
|
-
return /* @__PURE__ */ o(
|
|
1683
|
+
return /* @__PURE__ */ o(lt, { children: /* @__PURE__ */ o(yr, { className: c, lockScroll: !0, children: /* @__PURE__ */ o(dt, { context: r, children: /* @__PURE__ */ o(
|
|
1677
1684
|
"div",
|
|
1678
1685
|
{
|
|
1679
1686
|
ref: n,
|
|
1680
1687
|
"aria-labelledby": a.labelId,
|
|
1681
1688
|
"aria-describedby": a.descriptionId,
|
|
1682
|
-
...a.getFloatingProps(
|
|
1683
|
-
children:
|
|
1689
|
+
...a.getFloatingProps(i),
|
|
1690
|
+
children: i.children
|
|
1684
1691
|
}
|
|
1685
1692
|
) }) }) });
|
|
1686
|
-
}), Po =
|
|
1687
|
-
const { setLabelId: a } =
|
|
1688
|
-
return
|
|
1689
|
-
}), Bo =
|
|
1690
|
-
const { setDescriptionId: a } =
|
|
1691
|
-
return
|
|
1692
|
-
}), Oo =
|
|
1693
|
-
const { setOpen: r } =
|
|
1694
|
-
return /* @__PURE__ */ o("div", { className: n, children:
|
|
1693
|
+
}), Po = g.forwardRef(function({ children: e, ...t }, r) {
|
|
1694
|
+
const { setLabelId: a } = we(), n = Ae();
|
|
1695
|
+
return g.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ o("h1", { ...t, ref: r, id: n, children: e });
|
|
1696
|
+
}), Bo = g.forwardRef(function({ children: e, ...t }, r) {
|
|
1697
|
+
const { setDescriptionId: a } = we(), n = Ae();
|
|
1698
|
+
return g.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ o("div", { ...t, ref: r, id: n, children: e });
|
|
1699
|
+
}), Oo = g.forwardRef(function(e, t) {
|
|
1700
|
+
const { setOpen: r } = we(), { trigger: a, className: n, ...s } = e, i = g.useCallback(() => r(!1), [r]);
|
|
1701
|
+
return /* @__PURE__ */ o("div", { className: n, children: g.cloneElement(a, {
|
|
1695
1702
|
ref: t,
|
|
1696
|
-
onClick:
|
|
1697
|
-
...
|
|
1703
|
+
onClick: i,
|
|
1704
|
+
...s
|
|
1698
1705
|
}) });
|
|
1699
1706
|
});
|
|
1700
1707
|
/*!
|
|
1701
1708
|
@versini/ui-modal v1.1.7
|
|
1702
|
-
©
|
|
1709
|
+
© 2025 gizmette.com
|
|
1703
1710
|
*/
|
|
1704
1711
|
try {
|
|
1705
1712
|
window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
|
|
1706
1713
|
version: "1.1.7",
|
|
1707
|
-
buildTime: "
|
|
1714
|
+
buildTime: "01/01/2025 07:31 PM EST",
|
|
1708
1715
|
homepage: "https://github.com/aversini/ui-components",
|
|
1709
1716
|
license: "MIT"
|
|
1710
1717
|
});
|
|
1711
1718
|
} catch {
|
|
1712
1719
|
}
|
|
1713
|
-
const
|
|
1720
|
+
const se = "panel", fe = "messagebox", Vo = ({
|
|
1714
1721
|
className: e,
|
|
1715
1722
|
kind: t,
|
|
1716
1723
|
borderMode: r
|
|
1717
1724
|
}) => ({
|
|
1718
|
-
main:
|
|
1719
|
-
[`${
|
|
1720
|
-
[`${
|
|
1721
|
-
[`${
|
|
1722
|
-
[`${
|
|
1725
|
+
main: w("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
1726
|
+
[`${We} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === se,
|
|
1727
|
+
[`${We} w-full sm:w-[95%] md:max-w-2xl`]: t === se && !e,
|
|
1728
|
+
[`${Ke} rounded-lg border-2`]: t === fe,
|
|
1729
|
+
[`${Ke} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === fe && !e,
|
|
1723
1730
|
[`${e}`]: !!e,
|
|
1724
|
-
"sm:border-border-dark": r === "dark" && t ===
|
|
1725
|
-
"sm:border-border-accent": r === "light" && t ===
|
|
1726
|
-
"border-border-dark": r === "dark" && t ===
|
|
1727
|
-
"border-border-accent": r === "light" && t ===
|
|
1731
|
+
"sm:border-border-dark": r === "dark" && t === se,
|
|
1732
|
+
"sm:border-border-accent": r === "light" && t === se,
|
|
1733
|
+
"border-border-dark": r === "dark" && t === fe,
|
|
1734
|
+
"border-border-accent": r === "light" && t === fe
|
|
1728
1735
|
}),
|
|
1729
1736
|
content: "flex flex-col py-2 sm:py-4 sm:px-4 px-2 overflow-y-auto",
|
|
1730
1737
|
footer: "flex flex-grow flex-col sm:p-4 p-2",
|
|
1731
1738
|
header: "sm:p-4 mb-0 p-2",
|
|
1732
1739
|
close: "sm:p-4 p-2"
|
|
1733
|
-
}),
|
|
1740
|
+
}), te = ({
|
|
1734
1741
|
open: e,
|
|
1735
1742
|
onOpenChange: t,
|
|
1736
1743
|
title: r,
|
|
1737
1744
|
children: a,
|
|
1738
1745
|
footer: n,
|
|
1739
|
-
borderMode:
|
|
1740
|
-
kind:
|
|
1746
|
+
borderMode: s = "light",
|
|
1747
|
+
kind: i = se,
|
|
1741
1748
|
className: c
|
|
1742
1749
|
}) => {
|
|
1743
|
-
const
|
|
1744
|
-
return G(() => (e && (
|
|
1745
|
-
e && (document.title =
|
|
1746
|
-
}), [r, e]), /* @__PURE__ */ o(
|
|
1747
|
-
/* @__PURE__ */
|
|
1750
|
+
const m = J(""), l = Vo({ className: c, kind: i, borderMode: s });
|
|
1751
|
+
return G(() => (e && (m.current = document.title, document.title = `${r} | ${m.current}`), () => {
|
|
1752
|
+
e && (document.title = m.current);
|
|
1753
|
+
}), [r, e]), /* @__PURE__ */ o(M, { children: e && /* @__PURE__ */ o(zo, { open: e, onOpenChange: t, children: /* @__PURE__ */ k(Lo, { className: l.main, children: [
|
|
1754
|
+
/* @__PURE__ */ k("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
1748
1755
|
/* @__PURE__ */ o(
|
|
1749
1756
|
Oo,
|
|
1750
1757
|
{
|
|
1751
1758
|
className: l.close,
|
|
1752
1759
|
trigger: /* @__PURE__ */ o(
|
|
1753
|
-
|
|
1760
|
+
At,
|
|
1754
1761
|
{
|
|
1755
1762
|
mode: "dark",
|
|
1756
1763
|
focusMode: "light",
|
|
@@ -1766,123 +1773,54 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
1766
1773
|
/* @__PURE__ */ o(Bo, { className: l.content, children: a }),
|
|
1767
1774
|
n && /* @__PURE__ */ o("div", { className: l.footer, children: n })
|
|
1768
1775
|
] }) }) });
|
|
1769
|
-
},
|
|
1770
|
-
const t = (e == null ? void 0 : e.plugins) || [], r = (e == null ? void 0 : e.version) || "", a = (e == null ? void 0 : e.models) || [], n =
|
|
1771
|
-
return /* @__PURE__ */
|
|
1776
|
+
}, $o = ({ stats: e }) => {
|
|
1777
|
+
const t = (e == null ? void 0 : e.plugins) || [], r = (e == null ? void 0 : e.version) || "", a = (e == null ? void 0 : e.models) || [], n = de(), s = de();
|
|
1778
|
+
return /* @__PURE__ */ k(M, { children: [
|
|
1772
1779
|
/* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ o(
|
|
1773
|
-
|
|
1780
|
+
L,
|
|
1774
1781
|
{
|
|
1775
|
-
header:
|
|
1782
|
+
header: E.ABOUT.TITLE_CLIENT,
|
|
1776
1783
|
className: "prose-dark dark:prose-lighter",
|
|
1777
|
-
children:
|
|
1778
|
-
[
|
|
1779
|
-
[
|
|
1784
|
+
children: ce(n, {
|
|
1785
|
+
[E.ABOUT.VERSION]: "5.18.0",
|
|
1786
|
+
[E.ABOUT.BUILD_TIMESTAMP]: "01/02/2025 10:16 AM EST"
|
|
1780
1787
|
})
|
|
1781
1788
|
}
|
|
1782
1789
|
) }),
|
|
1783
1790
|
/* @__PURE__ */ o(
|
|
1784
|
-
|
|
1791
|
+
L,
|
|
1785
1792
|
{
|
|
1786
|
-
header:
|
|
1793
|
+
header: E.ABOUT.TITLE_SERVER,
|
|
1787
1794
|
className: "prose-dark dark:prose-lighter",
|
|
1788
|
-
children:
|
|
1789
|
-
[
|
|
1790
|
-
[
|
|
1791
|
-
[
|
|
1795
|
+
children: ce(s, {
|
|
1796
|
+
[E.ABOUT.VERSION]: r,
|
|
1797
|
+
[pe(E.ABOUT.ENGINE, a.length)]: /* @__PURE__ */ o(M, { children: a.map((i) => /* @__PURE__ */ o("div", { className: "text-right", children: i }, i)) }),
|
|
1798
|
+
[pe(E.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ o(M, { children: t.map((i) => /* @__PURE__ */ o("div", { className: "text-right", children: i }, i)) })
|
|
1792
1799
|
})
|
|
1793
1800
|
}
|
|
1794
1801
|
)
|
|
1795
1802
|
] });
|
|
1796
|
-
},
|
|
1797
|
-
open: e,
|
|
1798
|
-
onOpenChange: t
|
|
1799
|
-
}) => {
|
|
1800
|
-
const { serverStats: r } = B(ie);
|
|
1801
|
-
return /* @__PURE__ */ o(q, { open: e, onOpenChange: t, title: Dt, children: /* @__PURE__ */ o(Vo, { stats: r }) });
|
|
1802
|
-
}, Fo = (e) => Qe(e), Ho = (e) => {
|
|
1803
|
-
if (!e || e.length === 0)
|
|
1804
|
-
return $t;
|
|
1805
|
-
const t = e.filter(
|
|
1806
|
-
(r) => {
|
|
1807
|
-
var a, n;
|
|
1808
|
-
return ((a = r == null ? void 0 : r.message) == null ? void 0 : a.role) === Ft && typeof ((n = r == null ? void 0 : r.message) == null ? void 0 : n.processingTime) == "number";
|
|
1809
|
-
}
|
|
1810
|
-
).map((r) => r.message.processingTime);
|
|
1811
|
-
return Ht({
|
|
1812
|
-
data: t,
|
|
1813
|
-
formatter: Fo
|
|
1814
|
-
});
|
|
1815
|
-
}, Go = ({
|
|
1816
|
-
isAuthenticated: e,
|
|
1817
|
-
stats: t
|
|
1818
|
-
}) => {
|
|
1819
|
-
const { state: r } = B(ie), a = Gt - Number(r == null ? void 0 : r.usage), n = ae(), i = ae();
|
|
1820
|
-
return e ? /* @__PURE__ */ y(R, { children: [
|
|
1821
|
-
r && r.messages.length > 0 && /* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ o(
|
|
1822
|
-
P,
|
|
1823
|
-
{
|
|
1824
|
-
header: N.CURRENT_STATISTICS.TITLE,
|
|
1825
|
-
className: "prose-dark dark:prose-lighter",
|
|
1826
|
-
children: oe(n, {
|
|
1827
|
-
[N.CURRENT_STATISTICS.MODEL_NAME]: (r == null ? void 0 : r.model) || te,
|
|
1828
|
-
[N.CURRENT_STATISTICS.TOKENS_USED]: r == null ? void 0 : r.usage,
|
|
1829
|
-
[N.CURRENT_STATISTICS.REMAINING_TOKENS]: Vt.format(a),
|
|
1830
|
-
[N.CURRENT_STATISTICS.PROCESSING_TIME]: Ho(r == null ? void 0 : r.messages)
|
|
1831
|
-
})
|
|
1832
|
-
}
|
|
1833
|
-
) }),
|
|
1834
|
-
/* @__PURE__ */ o(
|
|
1835
|
-
P,
|
|
1836
|
-
{
|
|
1837
|
-
header: N.MAIN_STATISTICS.TITLE,
|
|
1838
|
-
className: "prose-dark dark:prose-lighter",
|
|
1839
|
-
children: oe(i, {
|
|
1840
|
-
[he(N.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
|
|
1841
|
-
[N.MAIN_STATISTICS.PROCESSING_TIME]: Qe(
|
|
1842
|
-
t.averageProcessingTimes
|
|
1843
|
-
)
|
|
1844
|
-
})
|
|
1845
|
-
}
|
|
1846
|
-
)
|
|
1847
|
-
] }) : null;
|
|
1848
|
-
}, Uo = ({
|
|
1803
|
+
}, Do = ({
|
|
1849
1804
|
open: e,
|
|
1850
1805
|
onOpenChange: t
|
|
1851
1806
|
}) => {
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
}), { isAuthenticated: n, getAccessToken: i, user: s } = Y();
|
|
1856
|
-
return G(() => {
|
|
1857
|
-
!e || !s || (async () => {
|
|
1858
|
-
try {
|
|
1859
|
-
const c = await D({
|
|
1860
|
-
accessToken: await i(),
|
|
1861
|
-
type: V.GET_CHATS_STATS,
|
|
1862
|
-
params: {
|
|
1863
|
-
userId: s.username
|
|
1864
|
-
}
|
|
1865
|
-
});
|
|
1866
|
-
c.status === 200 && a(c.data);
|
|
1867
|
-
} catch {
|
|
1868
|
-
}
|
|
1869
|
-
})();
|
|
1870
|
-
}, [e, i, s]), /* @__PURE__ */ o(q, { open: e, onOpenChange: t, title: Xe, children: /* @__PURE__ */ o(Go, { isAuthenticated: n, stats: r }) });
|
|
1871
|
-
}, Pt = ({
|
|
1807
|
+
const { serverStats: r } = P(ge);
|
|
1808
|
+
return /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: Bt, children: /* @__PURE__ */ o($o, { stats: r }) });
|
|
1809
|
+
}, zt = ({
|
|
1872
1810
|
showConfirmation: e,
|
|
1873
1811
|
setShowConfirmation: t,
|
|
1874
1812
|
action: r,
|
|
1875
1813
|
children: a,
|
|
1876
1814
|
customStrings: n
|
|
1877
1815
|
}) => /* @__PURE__ */ o(
|
|
1878
|
-
|
|
1816
|
+
te,
|
|
1879
1817
|
{
|
|
1880
1818
|
kind: "messagebox",
|
|
1881
1819
|
open: e,
|
|
1882
1820
|
onOpenChange: t,
|
|
1883
1821
|
title: n.title,
|
|
1884
|
-
footer: /* @__PURE__ */
|
|
1885
|
-
/* @__PURE__ */ o(
|
|
1822
|
+
footer: /* @__PURE__ */ k(H, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
1823
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ o(
|
|
1886
1824
|
F,
|
|
1887
1825
|
{
|
|
1888
1826
|
mode: "dark",
|
|
@@ -1894,7 +1832,7 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
1894
1832
|
children: n.cancelAction
|
|
1895
1833
|
}
|
|
1896
1834
|
) }),
|
|
1897
|
-
/* @__PURE__ */ o(
|
|
1835
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ o(
|
|
1898
1836
|
F,
|
|
1899
1837
|
{
|
|
1900
1838
|
mode: "dark",
|
|
@@ -1909,19 +1847,19 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
1909
1847
|
] }),
|
|
1910
1848
|
children: a
|
|
1911
1849
|
}
|
|
1912
|
-
),
|
|
1850
|
+
), Fo = async (e, t, r, a) => {
|
|
1913
1851
|
try {
|
|
1914
|
-
const n = await
|
|
1852
|
+
const n = await V({
|
|
1915
1853
|
accessToken: a,
|
|
1916
|
-
type:
|
|
1854
|
+
type: $.GET_CHAT,
|
|
1917
1855
|
params: {
|
|
1918
1856
|
id: e.id
|
|
1919
1857
|
}
|
|
1920
1858
|
});
|
|
1921
1859
|
n.status === 200 && (t({
|
|
1922
|
-
type:
|
|
1860
|
+
type: Ze
|
|
1923
1861
|
}), t({
|
|
1924
|
-
type:
|
|
1862
|
+
type: Vt,
|
|
1925
1863
|
payload: {
|
|
1926
1864
|
id: e.id,
|
|
1927
1865
|
model: n.data.model,
|
|
@@ -1931,57 +1869,57 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
1931
1869
|
}), r(!1));
|
|
1932
1870
|
} catch {
|
|
1933
1871
|
}
|
|
1934
|
-
},
|
|
1872
|
+
}, Ho = ({
|
|
1935
1873
|
filteredHistory: e,
|
|
1936
1874
|
setFilteredHistory: t,
|
|
1937
1875
|
dispatch: r,
|
|
1938
1876
|
onOpenChange: a
|
|
1939
1877
|
}) => {
|
|
1940
|
-
var
|
|
1941
|
-
const { user: n, getAccessToken:
|
|
1878
|
+
var h;
|
|
1879
|
+
const { user: n, getAccessToken: s } = Z(), i = J({
|
|
1942
1880
|
id: 0,
|
|
1943
1881
|
timestamp: "",
|
|
1944
1882
|
message: ""
|
|
1945
|
-
}), [c,
|
|
1946
|
-
key:
|
|
1883
|
+
}), [c, m] = S(!1), { state: l, dispatch: d } = P(et), [, f] = me({
|
|
1884
|
+
key: ue + Ot,
|
|
1947
1885
|
initialValue: l.sortDirection
|
|
1948
|
-
}),
|
|
1886
|
+
}), p = (u) => {
|
|
1949
1887
|
switch (l.sortDirection) {
|
|
1950
|
-
case
|
|
1951
|
-
|
|
1952
|
-
type:
|
|
1888
|
+
case Y.ASC:
|
|
1889
|
+
f(Y.DESC), d({
|
|
1890
|
+
type: $e,
|
|
1953
1891
|
payload: {
|
|
1954
|
-
sortedCell:
|
|
1955
|
-
sortDirection:
|
|
1892
|
+
sortedCell: u,
|
|
1893
|
+
sortDirection: Y.DESC
|
|
1956
1894
|
}
|
|
1957
1895
|
});
|
|
1958
1896
|
break;
|
|
1959
1897
|
default:
|
|
1960
|
-
|
|
1961
|
-
type:
|
|
1898
|
+
f(Y.ASC), d({
|
|
1899
|
+
type: $e,
|
|
1962
1900
|
payload: {
|
|
1963
|
-
sortedCell:
|
|
1964
|
-
sortDirection:
|
|
1901
|
+
sortedCell: u,
|
|
1902
|
+
sortDirection: Y.ASC
|
|
1965
1903
|
}
|
|
1966
1904
|
});
|
|
1967
1905
|
break;
|
|
1968
1906
|
}
|
|
1969
1907
|
};
|
|
1970
|
-
return /* @__PURE__ */
|
|
1971
|
-
/* @__PURE__ */
|
|
1972
|
-
|
|
1908
|
+
return /* @__PURE__ */ k(M, { children: [
|
|
1909
|
+
/* @__PURE__ */ k(
|
|
1910
|
+
zt,
|
|
1973
1911
|
{
|
|
1974
1912
|
showConfirmation: c,
|
|
1975
|
-
setShowConfirmation:
|
|
1913
|
+
setShowConfirmation: m,
|
|
1976
1914
|
action: async () => {
|
|
1977
|
-
const
|
|
1915
|
+
const u = i.current;
|
|
1978
1916
|
try {
|
|
1979
|
-
const v = await
|
|
1980
|
-
accessToken: await
|
|
1981
|
-
type:
|
|
1917
|
+
const v = await V({
|
|
1918
|
+
accessToken: await s(),
|
|
1919
|
+
type: $.DELETE_CHAT,
|
|
1982
1920
|
params: {
|
|
1983
1921
|
userId: (n == null ? void 0 : n.username) || "",
|
|
1984
|
-
id:
|
|
1922
|
+
id: u.id,
|
|
1985
1923
|
limit: 1,
|
|
1986
1924
|
searchString: l.searchString,
|
|
1987
1925
|
direction: l.sortDirection,
|
|
@@ -1999,32 +1937,32 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
1999
1937
|
},
|
|
2000
1938
|
children: [
|
|
2001
1939
|
/* @__PURE__ */ o("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
|
2002
|
-
/* @__PURE__ */
|
|
2003
|
-
/* @__PURE__ */
|
|
1940
|
+
/* @__PURE__ */ k("ul", { className: "m-0", children: [
|
|
1941
|
+
/* @__PURE__ */ k("li", { children: [
|
|
2004
1942
|
"Timestamp:",
|
|
2005
1943
|
" ",
|
|
2006
|
-
/* @__PURE__ */ o("span", { className: "text-lg", children:
|
|
1944
|
+
/* @__PURE__ */ o("span", { className: "text-lg", children: i.current && i.current.timestamp })
|
|
2007
1945
|
] }),
|
|
2008
|
-
/* @__PURE__ */
|
|
1946
|
+
/* @__PURE__ */ k("li", { children: [
|
|
2009
1947
|
"First message:",
|
|
2010
1948
|
" ",
|
|
2011
|
-
/* @__PURE__ */ o("span", { className: "text-lg", children: (
|
|
1949
|
+
/* @__PURE__ */ o("span", { className: "text-lg", children: (h = i.current) == null ? void 0 : h.message })
|
|
2012
1950
|
] })
|
|
2013
1951
|
] })
|
|
2014
1952
|
]
|
|
2015
1953
|
}
|
|
2016
1954
|
),
|
|
2017
|
-
/* @__PURE__ */
|
|
2018
|
-
|
|
1955
|
+
/* @__PURE__ */ k(
|
|
1956
|
+
rr,
|
|
2019
1957
|
{
|
|
2020
1958
|
stickyHeader: !0,
|
|
2021
1959
|
stickyFooter: !0,
|
|
2022
1960
|
compact: !0,
|
|
2023
1961
|
wrapperClassName: "max-h-[60vh] min-h-[60vh]",
|
|
2024
1962
|
children: [
|
|
2025
|
-
/* @__PURE__ */ o(
|
|
1963
|
+
/* @__PURE__ */ o(or, { children: /* @__PURE__ */ k(xe, { children: [
|
|
2026
1964
|
/* @__PURE__ */ o(
|
|
2027
|
-
|
|
1965
|
+
ar,
|
|
2028
1966
|
{
|
|
2029
1967
|
buttonClassName: "text-xs sm:text-sm",
|
|
2030
1968
|
cellId: "timestamp",
|
|
@@ -2032,81 +1970,81 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2032
1970
|
sortDirection: l.sortDirection,
|
|
2033
1971
|
sortedCell: l.sortedCell,
|
|
2034
1972
|
onClick: () => {
|
|
2035
|
-
|
|
1973
|
+
p("timestamp");
|
|
2036
1974
|
},
|
|
2037
1975
|
children: "Date"
|
|
2038
1976
|
}
|
|
2039
1977
|
),
|
|
2040
|
-
/* @__PURE__ */ o(
|
|
2041
|
-
/* @__PURE__ */ o(
|
|
2042
|
-
/* @__PURE__ */ o(
|
|
1978
|
+
/* @__PURE__ */ o(D, { className: "text-xs sm:text-sm", children: "First message" }),
|
|
1979
|
+
/* @__PURE__ */ o(D, { className: "text-xs sm:text-sm", children: "Model" }),
|
|
1980
|
+
/* @__PURE__ */ o(D, { className: "text-xs sm:text-sm text-right", children: "Actions" })
|
|
2043
1981
|
] }) }),
|
|
2044
|
-
/* @__PURE__ */ o(
|
|
2045
|
-
var
|
|
2046
|
-
return ((
|
|
1982
|
+
/* @__PURE__ */ o(nr, { children: e.data.map((u, v) => {
|
|
1983
|
+
var T, x;
|
|
1984
|
+
return ((T = u == null ? void 0 : u.messages) == null ? void 0 : T.length) > 0 ? /* @__PURE__ */ k(xe, { children: [
|
|
2047
1985
|
/* @__PURE__ */ o(
|
|
2048
|
-
|
|
1986
|
+
D,
|
|
2049
1987
|
{
|
|
2050
1988
|
component: "th",
|
|
2051
1989
|
scope: "row",
|
|
2052
1990
|
className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
|
2053
|
-
children:
|
|
1991
|
+
children: u.timestamp
|
|
2054
1992
|
}
|
|
2055
1993
|
),
|
|
2056
1994
|
/* @__PURE__ */ o(
|
|
2057
|
-
|
|
1995
|
+
D,
|
|
2058
1996
|
{
|
|
2059
1997
|
className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
|
|
2060
1998
|
style: {
|
|
2061
1999
|
wordBreak: "break-word"
|
|
2062
2000
|
},
|
|
2063
|
-
children:
|
|
2001
|
+
children: u.messages.length > 0 ? (x = u.messages[0]) == null ? void 0 : x.content : ""
|
|
2064
2002
|
}
|
|
2065
2003
|
),
|
|
2066
|
-
/* @__PURE__ */ o(
|
|
2067
|
-
|
|
2068
|
-
|
|
2004
|
+
/* @__PURE__ */ o(D, { component: "th", scope: "row", className: "text-gray-400", children: /* @__PURE__ */ k(H, { alignHorizontal: "center", children: [
|
|
2005
|
+
u.model && u.model.startsWith("claude") && /* @__PURE__ */ o(ut, { size: "size-4 sm:size-5" }),
|
|
2006
|
+
u.model && u.model.startsWith("gpt") && /* @__PURE__ */ o(mt, { size: "size-4 sm:size-5" })
|
|
2069
2007
|
] }) }),
|
|
2070
|
-
/* @__PURE__ */ o(
|
|
2008
|
+
/* @__PURE__ */ o(D, { className: "px-2", children: /* @__PURE__ */ k("div", { className: "flex justify-end gap-2", children: [
|
|
2071
2009
|
/* @__PURE__ */ o(
|
|
2072
|
-
|
|
2010
|
+
X,
|
|
2073
2011
|
{
|
|
2074
2012
|
focusMode: "alt-system",
|
|
2075
2013
|
noBorder: !0,
|
|
2076
2014
|
label: "Restore chat",
|
|
2077
2015
|
onClick: async () => {
|
|
2078
|
-
const
|
|
2079
|
-
|
|
2080
|
-
|
|
2016
|
+
const y = await s();
|
|
2017
|
+
Fo(
|
|
2018
|
+
u,
|
|
2081
2019
|
r,
|
|
2082
2020
|
a,
|
|
2083
|
-
|
|
2021
|
+
y
|
|
2084
2022
|
);
|
|
2085
2023
|
},
|
|
2086
|
-
children: /* @__PURE__ */ o(
|
|
2024
|
+
children: /* @__PURE__ */ o(Er, { size: "size-3", monotone: !0 })
|
|
2087
2025
|
}
|
|
2088
2026
|
),
|
|
2089
2027
|
/* @__PURE__ */ o(
|
|
2090
|
-
|
|
2028
|
+
X,
|
|
2091
2029
|
{
|
|
2092
2030
|
focusMode: "alt-system",
|
|
2093
2031
|
noBorder: !0,
|
|
2094
2032
|
label: "Delete chat",
|
|
2095
2033
|
onClick: () => {
|
|
2096
|
-
var
|
|
2097
|
-
|
|
2098
|
-
id:
|
|
2099
|
-
timestamp:
|
|
2100
|
-
message:
|
|
2101
|
-
},
|
|
2034
|
+
var y;
|
|
2035
|
+
i.current = {
|
|
2036
|
+
id: u.id,
|
|
2037
|
+
timestamp: u.timestamp,
|
|
2038
|
+
message: u.messages.length > 0 ? (y = u.messages[0]) == null ? void 0 : y.content : ""
|
|
2039
|
+
}, m(!c);
|
|
2102
2040
|
},
|
|
2103
|
-
children: /* @__PURE__ */ o("div", { className: "text-red-400", children: /* @__PURE__ */ o(
|
|
2041
|
+
children: /* @__PURE__ */ o("div", { className: "text-red-400", children: /* @__PURE__ */ o(wr, { size: "size-3", monotone: !0 }) })
|
|
2104
2042
|
}
|
|
2105
2043
|
)
|
|
2106
2044
|
] }) })
|
|
2107
|
-
] }, `${
|
|
2045
|
+
] }, `${E.HISTORY.TITLE}-${u.id}-${v}`) : null;
|
|
2108
2046
|
}) }),
|
|
2109
|
-
/* @__PURE__ */ o(
|
|
2047
|
+
/* @__PURE__ */ o(sr, { children: /* @__PURE__ */ o(xe, { children: /* @__PURE__ */ o(D, { colSpan: 4, children: /* @__PURE__ */ o("div", { children: pe(
|
|
2110
2048
|
`${e.data.length} chat`,
|
|
2111
2049
|
e.data.length
|
|
2112
2050
|
) }) }) }) })
|
|
@@ -2114,18 +2052,18 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2114
2052
|
}
|
|
2115
2053
|
)
|
|
2116
2054
|
] });
|
|
2117
|
-
},
|
|
2055
|
+
}, qe = async ({
|
|
2118
2056
|
searchString: e,
|
|
2119
2057
|
username: t,
|
|
2120
2058
|
accessToken: r,
|
|
2121
|
-
direction: a =
|
|
2059
|
+
direction: a = Y.ASC
|
|
2122
2060
|
}) => {
|
|
2123
2061
|
if (!t)
|
|
2124
2062
|
return [];
|
|
2125
2063
|
try {
|
|
2126
|
-
const n = await
|
|
2064
|
+
const n = await V({
|
|
2127
2065
|
accessToken: r,
|
|
2128
|
-
type:
|
|
2066
|
+
type: $.GET_CHATS,
|
|
2129
2067
|
params: {
|
|
2130
2068
|
userId: t,
|
|
2131
2069
|
searchString: e,
|
|
@@ -2140,63 +2078,63 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2140
2078
|
return [];
|
|
2141
2079
|
}
|
|
2142
2080
|
return [];
|
|
2143
|
-
},
|
|
2144
|
-
const { isAuthenticated: t, getAccessToken: r, user: a } =
|
|
2145
|
-
key:
|
|
2081
|
+
}, Go = ({ onOpenChange: e }) => {
|
|
2082
|
+
const { isAuthenticated: t, getAccessToken: r, user: a } = Z(), n = J(null), s = J(!1), { dispatch: i } = P(ge), { state: c, dispatch: m } = P(et), [, l] = me({
|
|
2083
|
+
key: ue + $t,
|
|
2146
2084
|
initialValue: c.searchString
|
|
2147
|
-
}), [
|
|
2085
|
+
}), [d, f] = S({
|
|
2148
2086
|
data: [],
|
|
2149
2087
|
sortedDirection: c.sortDirection
|
|
2150
|
-
}),
|
|
2151
|
-
const v = await r(),
|
|
2152
|
-
searchString:
|
|
2088
|
+
}), p = async (u) => {
|
|
2089
|
+
const v = await r(), T = await qe({
|
|
2090
|
+
searchString: u,
|
|
2153
2091
|
username: a == null ? void 0 : a.username,
|
|
2154
2092
|
accessToken: v,
|
|
2155
2093
|
direction: c.sortDirection
|
|
2156
2094
|
});
|
|
2157
|
-
|
|
2158
|
-
data:
|
|
2095
|
+
f({
|
|
2096
|
+
data: T,
|
|
2159
2097
|
sortedDirection: c.sortDirection
|
|
2160
|
-
}), l(
|
|
2161
|
-
type:
|
|
2162
|
-
payload: { searchString:
|
|
2098
|
+
}), l(u), m({
|
|
2099
|
+
type: Dt,
|
|
2100
|
+
payload: { searchString: u }
|
|
2163
2101
|
});
|
|
2164
|
-
},
|
|
2165
|
-
|
|
2166
|
-
}, 500),
|
|
2167
|
-
|
|
2102
|
+
}, b = Ft((u) => {
|
|
2103
|
+
p(u.target.value);
|
|
2104
|
+
}, 500), h = async (u) => {
|
|
2105
|
+
u.preventDefault();
|
|
2168
2106
|
};
|
|
2169
2107
|
return G(() => {
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
const
|
|
2108
|
+
s.current || (async () => {
|
|
2109
|
+
s.current = !0;
|
|
2110
|
+
const u = await r(), v = await qe({
|
|
2173
2111
|
searchString: c.searchString,
|
|
2174
2112
|
username: a == null ? void 0 : a.username,
|
|
2175
|
-
accessToken:
|
|
2113
|
+
accessToken: u,
|
|
2176
2114
|
direction: c.sortDirection
|
|
2177
2115
|
});
|
|
2178
|
-
|
|
2116
|
+
f({
|
|
2179
2117
|
data: v,
|
|
2180
2118
|
sortedDirection: c.sortDirection
|
|
2181
2119
|
});
|
|
2182
2120
|
})();
|
|
2183
2121
|
}), G(() => {
|
|
2184
|
-
if (c.sortDirection !==
|
|
2185
|
-
const
|
|
2122
|
+
if (c.sortDirection !== d.sortedDirection) {
|
|
2123
|
+
const u = [...d.data].sort((v, T) => {
|
|
2186
2124
|
if (c.sortedCell === "timestamp") {
|
|
2187
|
-
const
|
|
2188
|
-
return c.sortDirection ===
|
|
2125
|
+
const x = new Date(v[c.sortedCell]).getTime(), y = new Date(T[c.sortedCell]).getTime();
|
|
2126
|
+
return c.sortDirection === Y.ASC ? x - y : y - x;
|
|
2189
2127
|
}
|
|
2190
2128
|
return 0;
|
|
2191
2129
|
});
|
|
2192
|
-
|
|
2193
|
-
data:
|
|
2130
|
+
f({
|
|
2131
|
+
data: u,
|
|
2194
2132
|
sortedDirection: c.sortDirection
|
|
2195
2133
|
});
|
|
2196
2134
|
}
|
|
2197
|
-
}, [
|
|
2198
|
-
/* @__PURE__ */ o("form", { autoComplete: "off", onSubmit:
|
|
2199
|
-
|
|
2135
|
+
}, [d, c]), t ? d && d.data && /* @__PURE__ */ k(M, { children: [
|
|
2136
|
+
/* @__PURE__ */ o("form", { autoComplete: "off", onSubmit: h, children: /* @__PURE__ */ o(
|
|
2137
|
+
Ne,
|
|
2200
2138
|
{
|
|
2201
2139
|
autoCapitalize: "off",
|
|
2202
2140
|
autoComplete: "off",
|
|
@@ -2207,7 +2145,7 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2207
2145
|
mode: "dark",
|
|
2208
2146
|
name: "Search",
|
|
2209
2147
|
label: "Search",
|
|
2210
|
-
onChange:
|
|
2148
|
+
onChange: b,
|
|
2211
2149
|
className: "mt-2 mb-2",
|
|
2212
2150
|
...c.searchString && {
|
|
2213
2151
|
rightElement: /* @__PURE__ */ o(
|
|
@@ -2220,8 +2158,8 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2220
2158
|
noBorder: !0,
|
|
2221
2159
|
size: "small",
|
|
2222
2160
|
onClick: () => {
|
|
2223
|
-
var
|
|
2224
|
-
|
|
2161
|
+
var u;
|
|
2162
|
+
p(""), (u = n.current) != null && u.value && (n.current.value = "", n.current.focus());
|
|
2225
2163
|
},
|
|
2226
2164
|
children: "Reset"
|
|
2227
2165
|
}
|
|
@@ -2230,19 +2168,119 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2230
2168
|
}
|
|
2231
2169
|
) }),
|
|
2232
2170
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ o(
|
|
2233
|
-
|
|
2171
|
+
Ho,
|
|
2234
2172
|
{
|
|
2235
|
-
filteredHistory:
|
|
2236
|
-
setFilteredHistory:
|
|
2237
|
-
dispatch:
|
|
2173
|
+
filteredHistory: d,
|
|
2174
|
+
setFilteredHistory: f,
|
|
2175
|
+
dispatch: i,
|
|
2238
2176
|
onOpenChange: e
|
|
2239
2177
|
}
|
|
2240
2178
|
) })
|
|
2241
2179
|
] }) : null;
|
|
2180
|
+
}, Uo = ({
|
|
2181
|
+
open: e,
|
|
2182
|
+
onOpenChange: t
|
|
2183
|
+
}) => /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: Ht, children: /* @__PURE__ */ o(Go, { onOpenChange: t }) }), jo = (e) => Qe(e), Ko = (e) => {
|
|
2184
|
+
if (!e || e.length === 0)
|
|
2185
|
+
return jt;
|
|
2186
|
+
const t = e.filter(
|
|
2187
|
+
(r) => {
|
|
2188
|
+
var a, n;
|
|
2189
|
+
return ((a = r == null ? void 0 : r.message) == null ? void 0 : a.role) === Kt && typeof ((n = r == null ? void 0 : r.message) == null ? void 0 : n.processingTime) == "number";
|
|
2190
|
+
}
|
|
2191
|
+
).map((r) => r.message.processingTime);
|
|
2192
|
+
return Wt({
|
|
2193
|
+
data: t,
|
|
2194
|
+
formatter: jo
|
|
2195
|
+
});
|
|
2196
|
+
}, Wo = ({ stats: e }) => {
|
|
2197
|
+
const { isAuthenticated: t, user: r, registeringForPasskey: a, authenticationType: n } = Z(), { state: s } = P(ge), i = Yt - Number(s == null ? void 0 : s.usage), c = de(), m = de(), l = de(), d = (r == null ? void 0 : r.username) || "";
|
|
2198
|
+
return t && d ? /* @__PURE__ */ k(M, { children: [
|
|
2199
|
+
/* @__PURE__ */ o(
|
|
2200
|
+
L,
|
|
2201
|
+
{
|
|
2202
|
+
header: E.PREFERENCES.TITLE,
|
|
2203
|
+
className: "prose-dark dark:prose-lighter",
|
|
2204
|
+
children: ce(c, {
|
|
2205
|
+
[E.PREFERENCES.NAME]: d,
|
|
2206
|
+
[E.PREFERENCES.EMAIL]: (r == null ? void 0 : r.email) || ""
|
|
2207
|
+
})
|
|
2208
|
+
}
|
|
2209
|
+
),
|
|
2210
|
+
n !== Gt.PASSKEY && /* @__PURE__ */ k(
|
|
2211
|
+
L,
|
|
2212
|
+
{
|
|
2213
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
2214
|
+
header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */ k(H, { columnGap: 3, alignVertical: "center", children: [
|
|
2215
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ o(De, { size: "size-8" }) }),
|
|
2216
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ o("div", { children: E.PREFERENCES.PASSKEY_TITLE }) })
|
|
2217
|
+
] }) }),
|
|
2218
|
+
children: [
|
|
2219
|
+
/* @__PURE__ */ o("p", { children: E.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
2220
|
+
/* @__PURE__ */ o(
|
|
2221
|
+
X,
|
|
2222
|
+
{
|
|
2223
|
+
size: "small",
|
|
2224
|
+
className: "mt-2",
|
|
2225
|
+
onClick: a,
|
|
2226
|
+
labelLeft: E.PREFERENCES.PASSKEY_BUTTON,
|
|
2227
|
+
children: /* @__PURE__ */ o(De, { size: "size-5", monotone: !0 })
|
|
2228
|
+
}
|
|
2229
|
+
)
|
|
2230
|
+
]
|
|
2231
|
+
}
|
|
2232
|
+
),
|
|
2233
|
+
/* @__PURE__ */ o(
|
|
2234
|
+
L,
|
|
2235
|
+
{
|
|
2236
|
+
header: E.CURRENT_STATISTICS.TITLE,
|
|
2237
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
2238
|
+
children: ce(m, {
|
|
2239
|
+
[E.CURRENT_STATISTICS.MODEL_NAME]: (s == null ? void 0 : s.model) || le,
|
|
2240
|
+
[E.CURRENT_STATISTICS.TOKENS_USED]: s == null ? void 0 : s.usage,
|
|
2241
|
+
[E.CURRENT_STATISTICS.REMAINING_TOKENS]: Ut.format(i),
|
|
2242
|
+
[E.CURRENT_STATISTICS.PROCESSING_TIME]: Ko(s == null ? void 0 : s.messages)
|
|
2243
|
+
})
|
|
2244
|
+
}
|
|
2245
|
+
),
|
|
2246
|
+
/* @__PURE__ */ o(
|
|
2247
|
+
L,
|
|
2248
|
+
{
|
|
2249
|
+
header: E.MAIN_STATISTICS.TITLE,
|
|
2250
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
2251
|
+
children: ce(l, {
|
|
2252
|
+
[pe(E.MAIN_STATISTICS.TOTAL, e.totalChats)]: e.totalChats,
|
|
2253
|
+
[E.MAIN_STATISTICS.PROCESSING_TIME]: Qe(
|
|
2254
|
+
e.averageProcessingTimes
|
|
2255
|
+
)
|
|
2256
|
+
})
|
|
2257
|
+
}
|
|
2258
|
+
)
|
|
2259
|
+
] }) : null;
|
|
2242
2260
|
}, Yo = ({
|
|
2243
2261
|
open: e,
|
|
2244
2262
|
onOpenChange: t
|
|
2245
|
-
}) =>
|
|
2263
|
+
}) => {
|
|
2264
|
+
const [r, a] = S({
|
|
2265
|
+
averageProcessingTimes: 0,
|
|
2266
|
+
totalChats: 0
|
|
2267
|
+
}), { getAccessToken: n, user: s } = Z();
|
|
2268
|
+
return G(() => {
|
|
2269
|
+
!e || !s || (async () => {
|
|
2270
|
+
try {
|
|
2271
|
+
const i = await V({
|
|
2272
|
+
accessToken: await n(),
|
|
2273
|
+
type: $.GET_CHATS_STATS,
|
|
2274
|
+
params: {
|
|
2275
|
+
userId: s.username
|
|
2276
|
+
}
|
|
2277
|
+
});
|
|
2278
|
+
i.status === 200 && a(i.data);
|
|
2279
|
+
} catch {
|
|
2280
|
+
}
|
|
2281
|
+
})();
|
|
2282
|
+
}, [e, n, s]), /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: qt, children: /* @__PURE__ */ o(Wo, { stats: r }) });
|
|
2283
|
+
};
|
|
2246
2284
|
/*!
|
|
2247
2285
|
@versini/ui-toggle v2.0.5
|
|
2248
2286
|
© 2024 gizmette.com
|
|
@@ -2256,9 +2294,9 @@ try {
|
|
|
2256
2294
|
});
|
|
2257
2295
|
} catch {
|
|
2258
2296
|
}
|
|
2259
|
-
const qo = "av-toggle", Zo = () =>
|
|
2297
|
+
const qo = "av-toggle", Zo = () => w("peer", "h-6", "w-11", "rounded-full"), Qo = ({
|
|
2260
2298
|
focusMode: e
|
|
2261
|
-
}) =>
|
|
2299
|
+
}) => w(
|
|
2262
2300
|
"peer-focus:outline",
|
|
2263
2301
|
"peer-focus:outline-2",
|
|
2264
2302
|
"peer-focus:outline-offset-2",
|
|
@@ -2268,14 +2306,14 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2268
2306
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
|
2269
2307
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
|
2270
2308
|
}
|
|
2271
|
-
), Xo = () =>
|
|
2309
|
+
), Xo = () => w(
|
|
2272
2310
|
"peer-checked:after:translate-x-full",
|
|
2273
2311
|
// background color when checked
|
|
2274
2312
|
"peer-checked:bg-violet-500",
|
|
2275
2313
|
// knob circle and border color when checked
|
|
2276
2314
|
"peer-checked:after:bg-white",
|
|
2277
2315
|
"peer-checked:after:border-white"
|
|
2278
|
-
), Jo = () =>
|
|
2316
|
+
), Jo = () => w(
|
|
2279
2317
|
"after:left-[2px]",
|
|
2280
2318
|
"after:top-[2px]",
|
|
2281
2319
|
"after:border",
|
|
@@ -2290,7 +2328,7 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2290
2328
|
), ea = ({
|
|
2291
2329
|
mode: e,
|
|
2292
2330
|
noBorder: t
|
|
2293
|
-
}) =>
|
|
2331
|
+
}) => w({
|
|
2294
2332
|
border: !t,
|
|
2295
2333
|
"border-border-dark bg-surface-medium": e === "light",
|
|
2296
2334
|
"border-border-light bg-surface-darker": e === "dark",
|
|
@@ -2299,12 +2337,12 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2299
2337
|
}), ta = ({
|
|
2300
2338
|
mode: e,
|
|
2301
2339
|
labelHidden: t
|
|
2302
|
-
}) => t ? "sr-only" :
|
|
2340
|
+
}) => t ? "sr-only" : w("ml-2 text-sm", {
|
|
2303
2341
|
"text-copy-dark": e === "light",
|
|
2304
2342
|
"text-copy-lighter": e === "dark",
|
|
2305
2343
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
|
2306
2344
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
|
2307
|
-
}), ra = ({ className: e }) =>
|
|
2345
|
+
}), ra = ({ className: e }) => w(
|
|
2308
2346
|
qo,
|
|
2309
2347
|
"relative flex cursor-pointer items-center",
|
|
2310
2348
|
e
|
|
@@ -2315,7 +2353,7 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2315
2353
|
className: a,
|
|
2316
2354
|
noBorder: n
|
|
2317
2355
|
}) => ({
|
|
2318
|
-
toggle:
|
|
2356
|
+
toggle: w(
|
|
2319
2357
|
Zo(),
|
|
2320
2358
|
ea({ mode: e, noBorder: n }),
|
|
2321
2359
|
Qo({ focusMode: t }),
|
|
@@ -2325,27 +2363,27 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2325
2363
|
label: ta({ mode: e, labelHidden: r }),
|
|
2326
2364
|
input: "peer sr-only",
|
|
2327
2365
|
wrapper: ra({ className: a })
|
|
2328
|
-
}),
|
|
2366
|
+
}), ie = ({
|
|
2329
2367
|
checked: e = !1,
|
|
2330
2368
|
onChange: t,
|
|
2331
2369
|
label: r,
|
|
2332
2370
|
labelHidden: a = !1,
|
|
2333
2371
|
name: n,
|
|
2334
|
-
mode:
|
|
2335
|
-
focusMode:
|
|
2372
|
+
mode: s = "system",
|
|
2373
|
+
focusMode: i = "system",
|
|
2336
2374
|
className: c,
|
|
2337
|
-
noBorder:
|
|
2375
|
+
noBorder: m = !1
|
|
2338
2376
|
}) => {
|
|
2339
2377
|
const l = oa({
|
|
2340
|
-
mode:
|
|
2341
|
-
focusMode:
|
|
2378
|
+
mode: s,
|
|
2379
|
+
focusMode: i,
|
|
2342
2380
|
labelHidden: a,
|
|
2343
2381
|
className: c,
|
|
2344
|
-
noBorder:
|
|
2345
|
-
}),
|
|
2346
|
-
t == null || t(
|
|
2382
|
+
noBorder: m
|
|
2383
|
+
}), d = (f) => {
|
|
2384
|
+
t == null || t(f.target.checked);
|
|
2347
2385
|
};
|
|
2348
|
-
return /* @__PURE__ */
|
|
2386
|
+
return /* @__PURE__ */ k("label", { className: l.wrapper, children: [
|
|
2349
2387
|
/* @__PURE__ */ o(
|
|
2350
2388
|
"input",
|
|
2351
2389
|
{
|
|
@@ -2353,7 +2391,7 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2353
2391
|
checked: e,
|
|
2354
2392
|
type: "checkbox",
|
|
2355
2393
|
className: l.input,
|
|
2356
|
-
onChange:
|
|
2394
|
+
onChange: d
|
|
2357
2395
|
}
|
|
2358
2396
|
),
|
|
2359
2397
|
/* @__PURE__ */ o("div", { className: l.toggle }),
|
|
@@ -2363,122 +2401,282 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2363
2401
|
open: e,
|
|
2364
2402
|
onOpenChange: t
|
|
2365
2403
|
}) => {
|
|
2366
|
-
const {
|
|
2404
|
+
const { state: r, dispatch: a } = P(ir), { getAccessToken: n, user: s } = Z(), [i, c] = S({
|
|
2405
|
+
tags: [...r.tags]
|
|
2406
|
+
}), m = ({
|
|
2407
|
+
slot: d,
|
|
2408
|
+
checked: f,
|
|
2409
|
+
label: p,
|
|
2410
|
+
content: b
|
|
2411
|
+
}) => {
|
|
2412
|
+
c((h) => {
|
|
2413
|
+
const u = h.tags, v = {
|
|
2414
|
+
slot: d,
|
|
2415
|
+
label: p,
|
|
2416
|
+
content: b,
|
|
2417
|
+
enabled: f
|
|
2418
|
+
}, T = u.findIndex((x) => x.slot === d);
|
|
2419
|
+
return T === -1 ? {
|
|
2420
|
+
...h,
|
|
2421
|
+
tags: [...u, { ...v, slot: d }]
|
|
2422
|
+
} : (u[T] = v, {
|
|
2423
|
+
...h,
|
|
2424
|
+
tags: [...u]
|
|
2425
|
+
});
|
|
2426
|
+
});
|
|
2427
|
+
}, l = async (d) => {
|
|
2428
|
+
d.preventDefault();
|
|
2429
|
+
try {
|
|
2430
|
+
await V({
|
|
2431
|
+
accessToken: await n(),
|
|
2432
|
+
type: $.SET_USER_PREFERENCES,
|
|
2433
|
+
params: {
|
|
2434
|
+
user: s == null ? void 0 : s.username,
|
|
2435
|
+
tags: i.tags
|
|
2436
|
+
}
|
|
2437
|
+
}), a({
|
|
2438
|
+
type: Qt,
|
|
2439
|
+
payload: {
|
|
2440
|
+
tags: i.tags
|
|
2441
|
+
}
|
|
2442
|
+
});
|
|
2443
|
+
} catch {
|
|
2444
|
+
}
|
|
2445
|
+
};
|
|
2446
|
+
return /* @__PURE__ */ k(
|
|
2447
|
+
te,
|
|
2448
|
+
{
|
|
2449
|
+
open: e,
|
|
2450
|
+
onOpenChange: t,
|
|
2451
|
+
title: "Tags",
|
|
2452
|
+
footer: /* @__PURE__ */ k(
|
|
2453
|
+
H,
|
|
2454
|
+
{
|
|
2455
|
+
columnGap: 2,
|
|
2456
|
+
alignHorizontal: "flex-end",
|
|
2457
|
+
className: "pb-8 sm:pb-0",
|
|
2458
|
+
children: [
|
|
2459
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ o(
|
|
2460
|
+
F,
|
|
2461
|
+
{
|
|
2462
|
+
mode: "dark",
|
|
2463
|
+
variant: "secondary",
|
|
2464
|
+
focusMode: "light",
|
|
2465
|
+
onClick: () => {
|
|
2466
|
+
t(!1);
|
|
2467
|
+
},
|
|
2468
|
+
children: "Cancel"
|
|
2469
|
+
}
|
|
2470
|
+
) }),
|
|
2471
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ o(
|
|
2472
|
+
F,
|
|
2473
|
+
{
|
|
2474
|
+
mode: "dark",
|
|
2475
|
+
variant: "danger",
|
|
2476
|
+
focusMode: "light",
|
|
2477
|
+
onClick: async (d) => {
|
|
2478
|
+
t(!1), await l(d);
|
|
2479
|
+
},
|
|
2480
|
+
children: "Save"
|
|
2481
|
+
}
|
|
2482
|
+
) })
|
|
2483
|
+
]
|
|
2484
|
+
}
|
|
2485
|
+
),
|
|
2486
|
+
children: [
|
|
2487
|
+
/* @__PURE__ */ o("p", { children: Zt }),
|
|
2488
|
+
i.tags && i.tags.map((d) => /* @__PURE__ */ k(
|
|
2489
|
+
L,
|
|
2490
|
+
{
|
|
2491
|
+
header: `Tag ${d.slot + 1}`,
|
|
2492
|
+
className: "prose-dark dark:prose-lighter mb-2",
|
|
2493
|
+
children: [
|
|
2494
|
+
/* @__PURE__ */ k(H, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
|
|
2495
|
+
/* @__PURE__ */ o(R, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
|
|
2496
|
+
Ne,
|
|
2497
|
+
{
|
|
2498
|
+
label: "Label",
|
|
2499
|
+
name: `tag${d.slot}-label`,
|
|
2500
|
+
value: d.label,
|
|
2501
|
+
onChange: (f) => {
|
|
2502
|
+
m({
|
|
2503
|
+
slot: d.slot,
|
|
2504
|
+
checked: d.enabled,
|
|
2505
|
+
label: f.target.value,
|
|
2506
|
+
content: d.content
|
|
2507
|
+
});
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
) }),
|
|
2511
|
+
/* @__PURE__ */ o(R, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
|
|
2512
|
+
Ne,
|
|
2513
|
+
{
|
|
2514
|
+
label: "Content",
|
|
2515
|
+
name: `tag${d.slot}-content`,
|
|
2516
|
+
value: d.content,
|
|
2517
|
+
onChange: (f) => {
|
|
2518
|
+
m({
|
|
2519
|
+
slot: d.slot,
|
|
2520
|
+
checked: d.enabled,
|
|
2521
|
+
label: d.label,
|
|
2522
|
+
content: f.target.value
|
|
2523
|
+
});
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
) })
|
|
2527
|
+
] }),
|
|
2528
|
+
/* @__PURE__ */ o(
|
|
2529
|
+
ie,
|
|
2530
|
+
{
|
|
2531
|
+
className: "mt-2",
|
|
2532
|
+
noBorder: !0,
|
|
2533
|
+
label: "Enabled",
|
|
2534
|
+
name: d.slot.toString(),
|
|
2535
|
+
onChange: (f) => {
|
|
2536
|
+
m({
|
|
2537
|
+
slot: d.slot,
|
|
2538
|
+
checked: f,
|
|
2539
|
+
label: d.label,
|
|
2540
|
+
content: d.content
|
|
2541
|
+
});
|
|
2542
|
+
},
|
|
2543
|
+
checked: d.enabled
|
|
2544
|
+
}
|
|
2545
|
+
)
|
|
2546
|
+
]
|
|
2547
|
+
},
|
|
2548
|
+
`tag-slot-${d.slot}`
|
|
2549
|
+
))
|
|
2550
|
+
]
|
|
2551
|
+
}
|
|
2552
|
+
);
|
|
2553
|
+
}, na = ({
|
|
2554
|
+
open: e,
|
|
2555
|
+
onOpenChange: t
|
|
2556
|
+
}) => {
|
|
2557
|
+
const { dispatch: r } = P(ge), { getAccessToken: a, user: n } = Z(), [s, i] = S(!1), [c, m] = S({
|
|
2367
2558
|
loaded: !1,
|
|
2368
2559
|
instructions: "",
|
|
2369
2560
|
loadingLocation: !1,
|
|
2370
2561
|
location: "",
|
|
2371
|
-
engine:
|
|
2372
|
-
}), [
|
|
2373
|
-
key:
|
|
2562
|
+
engine: le
|
|
2563
|
+
}), [l, d] = me({
|
|
2564
|
+
key: ue + Xe,
|
|
2565
|
+
initialValue: !1
|
|
2566
|
+
}), [f, p] = me({
|
|
2567
|
+
key: ue + Xt,
|
|
2374
2568
|
initialValue: !1
|
|
2375
|
-
}),
|
|
2376
|
-
|
|
2569
|
+
}), b = (y) => {
|
|
2570
|
+
p(y);
|
|
2571
|
+
}, h = async (y) => {
|
|
2572
|
+
y.preventDefault();
|
|
2377
2573
|
try {
|
|
2378
|
-
await
|
|
2574
|
+
await V({
|
|
2379
2575
|
accessToken: await a(),
|
|
2380
|
-
type:
|
|
2576
|
+
type: $.SET_USER_PREFERENCES,
|
|
2381
2577
|
params: {
|
|
2382
2578
|
user: n == null ? void 0 : n.username,
|
|
2383
|
-
instructions:
|
|
2384
|
-
location:
|
|
2385
|
-
engine:
|
|
2579
|
+
instructions: c.instructions,
|
|
2580
|
+
location: c.location,
|
|
2581
|
+
engine: c.engine
|
|
2386
2582
|
}
|
|
2387
2583
|
}), r({
|
|
2388
|
-
type:
|
|
2584
|
+
type: Je,
|
|
2389
2585
|
payload: {
|
|
2390
|
-
engine:
|
|
2586
|
+
engine: c.engine
|
|
2391
2587
|
}
|
|
2392
2588
|
});
|
|
2393
2589
|
} catch {
|
|
2394
2590
|
}
|
|
2395
2591
|
}, u = async () => {
|
|
2396
|
-
|
|
2397
|
-
...
|
|
2592
|
+
m((y) => ({
|
|
2593
|
+
...y,
|
|
2398
2594
|
location: "...",
|
|
2399
2595
|
loadingLocation: !0
|
|
2400
2596
|
}));
|
|
2401
2597
|
try {
|
|
2402
|
-
const
|
|
2598
|
+
const y = Date.now(), N = await tr(), A = await V({
|
|
2403
2599
|
accessToken: await a(),
|
|
2404
|
-
type:
|
|
2600
|
+
type: $.GET_LOCATION,
|
|
2405
2601
|
params: {
|
|
2406
|
-
latitude:
|
|
2407
|
-
longitude:
|
|
2602
|
+
latitude: N.latitude,
|
|
2603
|
+
longitude: N.longitude
|
|
2408
2604
|
}
|
|
2409
|
-
}),
|
|
2410
|
-
if (
|
|
2411
|
-
const { city:
|
|
2412
|
-
|
|
2413
|
-
...
|
|
2605
|
+
}), _ = Date.now() - y;
|
|
2606
|
+
if (_ < 2e3 && await new Promise((C) => setTimeout(C, 2e3 - _)), A.status === 200) {
|
|
2607
|
+
const { city: C, state: U, country: j, displayName: K } = A.data, re = C && U && j ? `${C}, ${U}, ${j}` : K;
|
|
2608
|
+
m((oe) => ({
|
|
2609
|
+
...oe,
|
|
2414
2610
|
loaded: !0,
|
|
2415
|
-
location:
|
|
2611
|
+
location: re,
|
|
2416
2612
|
loadingLocation: !1
|
|
2417
2613
|
}));
|
|
2418
2614
|
} else
|
|
2419
|
-
|
|
2420
|
-
...
|
|
2615
|
+
m((C) => ({
|
|
2616
|
+
...C,
|
|
2421
2617
|
loaded: !0,
|
|
2422
2618
|
location: "",
|
|
2423
2619
|
loadingLocation: !1
|
|
2424
2620
|
}));
|
|
2425
2621
|
} catch {
|
|
2426
2622
|
}
|
|
2427
|
-
},
|
|
2428
|
-
|
|
2429
|
-
...
|
|
2430
|
-
engine:
|
|
2623
|
+
}, v = (y) => {
|
|
2624
|
+
m((N) => ({
|
|
2625
|
+
...N,
|
|
2626
|
+
engine: y ? ne : Q
|
|
2431
2627
|
}));
|
|
2432
|
-
},
|
|
2433
|
-
|
|
2434
|
-
...
|
|
2435
|
-
engine:
|
|
2628
|
+
}, T = (y) => {
|
|
2629
|
+
m((N) => ({
|
|
2630
|
+
...N,
|
|
2631
|
+
engine: y ? Q : ne
|
|
2436
2632
|
}));
|
|
2633
|
+
}, x = () => {
|
|
2634
|
+
i(!s);
|
|
2437
2635
|
};
|
|
2438
2636
|
return G(() => {
|
|
2439
2637
|
if (!e || !n) {
|
|
2440
|
-
|
|
2638
|
+
m({
|
|
2441
2639
|
loaded: !1,
|
|
2442
2640
|
loadingLocation: !1,
|
|
2443
2641
|
instructions: "",
|
|
2444
2642
|
location: "",
|
|
2445
|
-
engine:
|
|
2643
|
+
engine: le
|
|
2446
2644
|
});
|
|
2447
2645
|
return;
|
|
2448
2646
|
}
|
|
2449
2647
|
(async () => {
|
|
2450
2648
|
try {
|
|
2451
|
-
const
|
|
2649
|
+
const y = await V({
|
|
2452
2650
|
accessToken: await a(),
|
|
2453
|
-
type:
|
|
2651
|
+
type: $.GET_USER_PREFERENCES,
|
|
2454
2652
|
params: {
|
|
2455
2653
|
user: n.username
|
|
2456
2654
|
}
|
|
2457
2655
|
});
|
|
2458
|
-
|
|
2459
|
-
...
|
|
2656
|
+
y.status === 200 && m((N) => ({
|
|
2657
|
+
...N,
|
|
2460
2658
|
loaded: !0,
|
|
2461
|
-
instructions:
|
|
2462
|
-
location:
|
|
2463
|
-
engine:
|
|
2659
|
+
instructions: y.data.instructions || "",
|
|
2660
|
+
location: y.data.location || "",
|
|
2661
|
+
engine: y.data.engine || le
|
|
2464
2662
|
}));
|
|
2465
2663
|
} catch {
|
|
2466
2664
|
}
|
|
2467
2665
|
})();
|
|
2468
|
-
}, [n, e]), /* @__PURE__ */ o(
|
|
2469
|
-
|
|
2666
|
+
}, [n, e]), /* @__PURE__ */ o(
|
|
2667
|
+
te,
|
|
2470
2668
|
{
|
|
2471
2669
|
open: e,
|
|
2472
2670
|
onOpenChange: t,
|
|
2473
|
-
title:
|
|
2474
|
-
footer: /* @__PURE__ */
|
|
2671
|
+
title: Jt,
|
|
2672
|
+
footer: /* @__PURE__ */ k(
|
|
2475
2673
|
H,
|
|
2476
2674
|
{
|
|
2477
2675
|
columnGap: 2,
|
|
2478
2676
|
alignHorizontal: "flex-end",
|
|
2479
2677
|
className: "pb-8 sm:pb-0",
|
|
2480
2678
|
children: [
|
|
2481
|
-
/* @__PURE__ */ o(
|
|
2679
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ o(
|
|
2482
2680
|
F,
|
|
2483
2681
|
{
|
|
2484
2682
|
mode: "dark",
|
|
@@ -2490,14 +2688,14 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2490
2688
|
children: "Cancel"
|
|
2491
2689
|
}
|
|
2492
2690
|
) }),
|
|
2493
|
-
/* @__PURE__ */ o(
|
|
2691
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ o(
|
|
2494
2692
|
F,
|
|
2495
2693
|
{
|
|
2496
2694
|
mode: "dark",
|
|
2497
2695
|
variant: "danger",
|
|
2498
2696
|
focusMode: "light",
|
|
2499
|
-
onClick: async (
|
|
2500
|
-
t(!1), await
|
|
2697
|
+
onClick: async (y) => {
|
|
2698
|
+
t(!1), await h(y);
|
|
2501
2699
|
},
|
|
2502
2700
|
children: "Save"
|
|
2503
2701
|
}
|
|
@@ -2505,60 +2703,83 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2505
2703
|
]
|
|
2506
2704
|
}
|
|
2507
2705
|
),
|
|
2508
|
-
children: /* @__PURE__ */
|
|
2509
|
-
/* @__PURE__ */
|
|
2510
|
-
|
|
2706
|
+
children: /* @__PURE__ */ k(M, { children: [
|
|
2707
|
+
s && /* @__PURE__ */ o(aa, { open: s, onOpenChange: i }),
|
|
2708
|
+
/* @__PURE__ */ k(
|
|
2709
|
+
L,
|
|
2511
2710
|
{
|
|
2512
|
-
header:
|
|
2711
|
+
header: E.SETTINGS_ENGINE.TITLE,
|
|
2513
2712
|
className: "prose-dark dark:prose-lighter",
|
|
2514
2713
|
children: [
|
|
2515
|
-
/* @__PURE__ */ o("p", { children: "Select the AI engine that will be used to generate responses." }),
|
|
2714
|
+
/* @__PURE__ */ o("p", { className: "text-xs", children: "Select the AI engine that will be used to generate responses." }),
|
|
2516
2715
|
/* @__PURE__ */ o(
|
|
2517
|
-
|
|
2716
|
+
ie,
|
|
2518
2717
|
{
|
|
2519
2718
|
noBorder: !0,
|
|
2520
|
-
label:
|
|
2521
|
-
name:
|
|
2522
|
-
onChange:
|
|
2523
|
-
checked:
|
|
2719
|
+
label: ne,
|
|
2720
|
+
name: ne,
|
|
2721
|
+
onChange: v,
|
|
2722
|
+
checked: c.engine === ne
|
|
2524
2723
|
}
|
|
2525
2724
|
),
|
|
2526
2725
|
/* @__PURE__ */ o(
|
|
2527
|
-
|
|
2726
|
+
ie,
|
|
2528
2727
|
{
|
|
2529
2728
|
className: "mt-2",
|
|
2530
2729
|
noBorder: !0,
|
|
2531
|
-
label:
|
|
2532
|
-
name:
|
|
2533
|
-
onChange:
|
|
2534
|
-
checked:
|
|
2730
|
+
label: Q,
|
|
2731
|
+
name: Q,
|
|
2732
|
+
onChange: T,
|
|
2733
|
+
checked: c.engine === Q
|
|
2535
2734
|
}
|
|
2536
2735
|
),
|
|
2537
|
-
/* @__PURE__ */ o("p", { className: "text-xs", children: "
|
|
2736
|
+
/* @__PURE__ */ o("p", { className: "text-xs", children: "This option introduces a new menu at the top of the screen, enabling you to quickly switch between engines." }),
|
|
2538
2737
|
/* @__PURE__ */ o(
|
|
2539
|
-
|
|
2738
|
+
ie,
|
|
2540
2739
|
{
|
|
2541
2740
|
className: "mt-2",
|
|
2542
2741
|
noBorder: !0,
|
|
2543
|
-
label: "Show Quick Engine Toggle",
|
|
2742
|
+
label: "Show Quick Engine Toggle Menu",
|
|
2544
2743
|
name: "show-toggle-engine-menu",
|
|
2545
|
-
onChange:
|
|
2546
|
-
checked:
|
|
2744
|
+
onChange: d,
|
|
2745
|
+
checked: l
|
|
2547
2746
|
}
|
|
2548
2747
|
),
|
|
2549
|
-
/* @__PURE__ */ o("p", { className: "text-xs", children: "This option
|
|
2748
|
+
/* @__PURE__ */ o("p", { className: "text-xs", children: "This option adds individual statistics for each messages under their respective bubbles, such as processing time, model name, and more." }),
|
|
2749
|
+
/* @__PURE__ */ o(
|
|
2750
|
+
ie,
|
|
2751
|
+
{
|
|
2752
|
+
className: "mt-2",
|
|
2753
|
+
noBorder: !0,
|
|
2754
|
+
label: "Show Message Statistics",
|
|
2755
|
+
name: "show-message-statistics",
|
|
2756
|
+
onChange: b,
|
|
2757
|
+
checked: f
|
|
2758
|
+
}
|
|
2759
|
+
),
|
|
2760
|
+
/* @__PURE__ */ o("h3", { className: "border-b-2 border-slate-400", children: "Tags" }),
|
|
2761
|
+
/* @__PURE__ */ o(
|
|
2762
|
+
X,
|
|
2763
|
+
{
|
|
2764
|
+
className: "mt-2",
|
|
2765
|
+
size: "small",
|
|
2766
|
+
onClick: x,
|
|
2767
|
+
labelLeft: "Edit Custom Tags",
|
|
2768
|
+
children: /* @__PURE__ */ o(Tr, { size: "size-3", monotone: !0 })
|
|
2769
|
+
}
|
|
2770
|
+
)
|
|
2550
2771
|
]
|
|
2551
2772
|
}
|
|
2552
2773
|
),
|
|
2553
|
-
/* @__PURE__ */
|
|
2554
|
-
|
|
2774
|
+
/* @__PURE__ */ k(
|
|
2775
|
+
L,
|
|
2555
2776
|
{
|
|
2556
2777
|
header: "Custom Instructions",
|
|
2557
2778
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
2558
2779
|
children: [
|
|
2559
|
-
/* @__PURE__ */
|
|
2780
|
+
/* @__PURE__ */ k("p", { children: [
|
|
2560
2781
|
"What would you like ",
|
|
2561
|
-
/* @__PURE__ */ o("em", { children:
|
|
2782
|
+
/* @__PURE__ */ o("em", { children: er }),
|
|
2562
2783
|
" to know about you to provide better responses?"
|
|
2563
2784
|
] }),
|
|
2564
2785
|
/* @__PURE__ */ o(
|
|
@@ -2570,12 +2791,12 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2570
2791
|
autoCorrect: "off",
|
|
2571
2792
|
name: "customInstructions",
|
|
2572
2793
|
label: "Custom Instructions",
|
|
2573
|
-
value:
|
|
2574
|
-
onChange: (
|
|
2575
|
-
|
|
2576
|
-
...
|
|
2794
|
+
value: c.instructions,
|
|
2795
|
+
onChange: (y) => {
|
|
2796
|
+
m((N) => ({
|
|
2797
|
+
...N,
|
|
2577
2798
|
loaded: !0,
|
|
2578
|
-
instructions:
|
|
2799
|
+
instructions: y.target.value
|
|
2579
2800
|
}));
|
|
2580
2801
|
},
|
|
2581
2802
|
helperText: "Press ENTER to add a new line."
|
|
@@ -2584,8 +2805,8 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2584
2805
|
]
|
|
2585
2806
|
}
|
|
2586
2807
|
),
|
|
2587
|
-
/* @__PURE__ */
|
|
2588
|
-
|
|
2808
|
+
/* @__PURE__ */ k(
|
|
2809
|
+
L,
|
|
2589
2810
|
{
|
|
2590
2811
|
header: "Location",
|
|
2591
2812
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
@@ -2597,12 +2818,12 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2597
2818
|
mode: "alt-system",
|
|
2598
2819
|
name: "location",
|
|
2599
2820
|
label: "Location",
|
|
2600
|
-
value:
|
|
2601
|
-
onChange: (
|
|
2602
|
-
|
|
2603
|
-
...
|
|
2821
|
+
value: c.location,
|
|
2822
|
+
onChange: (y) => {
|
|
2823
|
+
m((N) => ({
|
|
2824
|
+
...N,
|
|
2604
2825
|
loaded: !0,
|
|
2605
|
-
location:
|
|
2826
|
+
location: y.target.value
|
|
2606
2827
|
}));
|
|
2607
2828
|
},
|
|
2608
2829
|
helperText: "Enter your location or press auto-detect."
|
|
@@ -2614,9 +2835,9 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2614
2835
|
className: "mt-2",
|
|
2615
2836
|
size: "small",
|
|
2616
2837
|
noBorder: !0,
|
|
2617
|
-
disabled:
|
|
2838
|
+
disabled: c.loadingLocation,
|
|
2618
2839
|
onClick: u,
|
|
2619
|
-
children:
|
|
2840
|
+
children: c.loadingLocation ? "Detecting..." : "Auto-detect"
|
|
2620
2841
|
}
|
|
2621
2842
|
)
|
|
2622
2843
|
]
|
|
@@ -2624,274 +2845,30 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2624
2845
|
)
|
|
2625
2846
|
] })
|
|
2626
2847
|
}
|
|
2627
|
-
) });
|
|
2628
|
-
}, na = ({
|
|
2629
|
-
open: e,
|
|
2630
|
-
onOpenChange: t
|
|
2631
|
-
}) => {
|
|
2632
|
-
const { state: r, dispatch: a } = B(cr), { getAccessToken: n, user: i } = Y(), [s, c] = I({
|
|
2633
|
-
tags: [...r.tags]
|
|
2634
|
-
}), g = ({
|
|
2635
|
-
slot: u,
|
|
2636
|
-
checked: p,
|
|
2637
|
-
label: b,
|
|
2638
|
-
content: h
|
|
2639
|
-
}) => {
|
|
2640
|
-
c((m) => {
|
|
2641
|
-
const d = m.tags, v = {
|
|
2642
|
-
slot: u,
|
|
2643
|
-
label: b,
|
|
2644
|
-
content: h,
|
|
2645
|
-
enabled: p
|
|
2646
|
-
}, C = d.findIndex((w) => w.slot === u);
|
|
2647
|
-
return C === -1 ? {
|
|
2648
|
-
...m,
|
|
2649
|
-
tags: [...d, { ...v, slot: u }]
|
|
2650
|
-
} : (d[C] = v, {
|
|
2651
|
-
...m,
|
|
2652
|
-
tags: [...d]
|
|
2653
|
-
});
|
|
2654
|
-
});
|
|
2655
|
-
}, l = async (u) => {
|
|
2656
|
-
u.preventDefault();
|
|
2657
|
-
try {
|
|
2658
|
-
await D({
|
|
2659
|
-
accessToken: await n(),
|
|
2660
|
-
type: V.SET_USER_PREFERENCES,
|
|
2661
|
-
params: {
|
|
2662
|
-
user: i == null ? void 0 : i.username,
|
|
2663
|
-
tags: s.tags
|
|
2664
|
-
}
|
|
2665
|
-
}), a({
|
|
2666
|
-
type: Jt,
|
|
2667
|
-
payload: {
|
|
2668
|
-
tags: s.tags
|
|
2669
|
-
}
|
|
2670
|
-
});
|
|
2671
|
-
} catch {
|
|
2672
|
-
}
|
|
2673
|
-
};
|
|
2674
|
-
return /* @__PURE__ */ y(
|
|
2675
|
-
q,
|
|
2676
|
-
{
|
|
2677
|
-
open: e,
|
|
2678
|
-
onOpenChange: t,
|
|
2679
|
-
title: "Tags",
|
|
2680
|
-
footer: /* @__PURE__ */ y(
|
|
2681
|
-
H,
|
|
2682
|
-
{
|
|
2683
|
-
columnGap: 2,
|
|
2684
|
-
alignHorizontal: "flex-end",
|
|
2685
|
-
className: "pb-8 sm:pb-0",
|
|
2686
|
-
children: [
|
|
2687
|
-
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
|
|
2688
|
-
F,
|
|
2689
|
-
{
|
|
2690
|
-
mode: "dark",
|
|
2691
|
-
variant: "secondary",
|
|
2692
|
-
focusMode: "light",
|
|
2693
|
-
onClick: () => {
|
|
2694
|
-
t(!1);
|
|
2695
|
-
},
|
|
2696
|
-
children: "Cancel"
|
|
2697
|
-
}
|
|
2698
|
-
) }),
|
|
2699
|
-
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
|
|
2700
|
-
F,
|
|
2701
|
-
{
|
|
2702
|
-
mode: "dark",
|
|
2703
|
-
variant: "danger",
|
|
2704
|
-
focusMode: "light",
|
|
2705
|
-
onClick: async (u) => {
|
|
2706
|
-
t(!1), await l(u);
|
|
2707
|
-
},
|
|
2708
|
-
children: "Save"
|
|
2709
|
-
}
|
|
2710
|
-
) })
|
|
2711
|
-
]
|
|
2712
|
-
}
|
|
2713
|
-
),
|
|
2714
|
-
children: [
|
|
2715
|
-
/* @__PURE__ */ o("p", { children: Xt }),
|
|
2716
|
-
s.tags && s.tags.map((u) => /* @__PURE__ */ y(
|
|
2717
|
-
P,
|
|
2718
|
-
{
|
|
2719
|
-
header: `Tag ${u.slot + 1}`,
|
|
2720
|
-
className: "prose-dark dark:prose-lighter mb-2",
|
|
2721
|
-
children: [
|
|
2722
|
-
/* @__PURE__ */ y(H, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
|
|
2723
|
-
/* @__PURE__ */ o(_, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
|
|
2724
|
-
xe,
|
|
2725
|
-
{
|
|
2726
|
-
label: "Label",
|
|
2727
|
-
name: `tag${u.slot}-label`,
|
|
2728
|
-
value: u.label,
|
|
2729
|
-
onChange: (p) => {
|
|
2730
|
-
g({
|
|
2731
|
-
slot: u.slot,
|
|
2732
|
-
checked: u.enabled,
|
|
2733
|
-
label: p.target.value,
|
|
2734
|
-
content: u.content
|
|
2735
|
-
});
|
|
2736
|
-
}
|
|
2737
|
-
}
|
|
2738
|
-
) }),
|
|
2739
|
-
/* @__PURE__ */ o(_, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
|
|
2740
|
-
xe,
|
|
2741
|
-
{
|
|
2742
|
-
label: "Content",
|
|
2743
|
-
name: `tag${u.slot}-content`,
|
|
2744
|
-
value: u.content,
|
|
2745
|
-
onChange: (p) => {
|
|
2746
|
-
g({
|
|
2747
|
-
slot: u.slot,
|
|
2748
|
-
checked: u.enabled,
|
|
2749
|
-
label: u.label,
|
|
2750
|
-
content: p.target.value
|
|
2751
|
-
});
|
|
2752
|
-
}
|
|
2753
|
-
}
|
|
2754
|
-
) })
|
|
2755
|
-
] }),
|
|
2756
|
-
/* @__PURE__ */ o(
|
|
2757
|
-
re,
|
|
2758
|
-
{
|
|
2759
|
-
className: "mt-2",
|
|
2760
|
-
noBorder: !0,
|
|
2761
|
-
label: "Enabled",
|
|
2762
|
-
name: u.slot.toString(),
|
|
2763
|
-
onChange: (p) => {
|
|
2764
|
-
g({
|
|
2765
|
-
slot: u.slot,
|
|
2766
|
-
checked: p,
|
|
2767
|
-
label: u.label,
|
|
2768
|
-
content: u.content
|
|
2769
|
-
});
|
|
2770
|
-
},
|
|
2771
|
-
checked: u.enabled
|
|
2772
|
-
}
|
|
2773
|
-
)
|
|
2774
|
-
]
|
|
2775
|
-
},
|
|
2776
|
-
`tag-slot-${u.slot}`
|
|
2777
|
-
))
|
|
2778
|
-
]
|
|
2779
|
-
}
|
|
2780
2848
|
);
|
|
2781
|
-
},
|
|
2782
|
-
const {
|
|
2783
|
-
key:
|
|
2849
|
+
}, ha = () => {
|
|
2850
|
+
const { state: e, dispatch: t, serverStats: r } = P(ge), [a, n] = S((e == null ? void 0 : e.engine) || le), [s, i] = S(!1), [c, m] = S(!1), [l, d] = S(!1), [f, p] = S(!1), [b, h] = S(!1), [u] = me({
|
|
2851
|
+
key: ue + Xe,
|
|
2784
2852
|
initialValue: !1
|
|
2785
|
-
}),
|
|
2786
|
-
i(
|
|
2787
|
-
},
|
|
2788
|
-
|
|
2789
|
-
}, m = () => {
|
|
2790
|
-
l(!g);
|
|
2791
|
-
};
|
|
2792
|
-
return e && p ? /* @__PURE__ */ y(R, { children: [
|
|
2793
|
-
s && /* @__PURE__ */ o(
|
|
2794
|
-
aa,
|
|
2795
|
-
{
|
|
2796
|
-
open: s,
|
|
2797
|
-
onOpenChange: c
|
|
2798
|
-
}
|
|
2799
|
-
),
|
|
2800
|
-
g && /* @__PURE__ */ o(na, { open: g, onOpenChange: l }),
|
|
2801
|
-
/* @__PURE__ */ y(
|
|
2802
|
-
P,
|
|
2803
|
-
{
|
|
2804
|
-
header: N.PREFERENCES.TITLE,
|
|
2805
|
-
className: "prose-dark dark:prose-lighter",
|
|
2806
|
-
children: [
|
|
2807
|
-
oe(u, {
|
|
2808
|
-
[N.PREFERENCES.NAME]: p,
|
|
2809
|
-
[N.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
|
|
2810
|
-
[N.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ o(
|
|
2811
|
-
re,
|
|
2812
|
-
{
|
|
2813
|
-
noBorder: !0,
|
|
2814
|
-
labelHidden: !0,
|
|
2815
|
-
label: N.PREFERENCES.ENGINE_DETAILS,
|
|
2816
|
-
name: N.PREFERENCES.ENGINE_DETAILS,
|
|
2817
|
-
onChange: b,
|
|
2818
|
-
checked: n
|
|
2819
|
-
}
|
|
2820
|
-
)
|
|
2821
|
-
}),
|
|
2822
|
-
/* @__PURE__ */ o(
|
|
2823
|
-
K,
|
|
2824
|
-
{
|
|
2825
|
-
className: "mt-2",
|
|
2826
|
-
size: "small",
|
|
2827
|
-
onClick: h,
|
|
2828
|
-
labelLeft: "Engine Fine Tuning",
|
|
2829
|
-
children: /* @__PURE__ */ o(Ge, { size: "size-3", monotone: !0 })
|
|
2830
|
-
}
|
|
2831
|
-
),
|
|
2832
|
-
/* @__PURE__ */ o(
|
|
2833
|
-
K,
|
|
2834
|
-
{
|
|
2835
|
-
className: "mt-2 ml-2",
|
|
2836
|
-
size: "small",
|
|
2837
|
-
onClick: m,
|
|
2838
|
-
labelLeft: "Tags",
|
|
2839
|
-
children: /* @__PURE__ */ o(Ge, { size: "size-3", monotone: !0 })
|
|
2840
|
-
}
|
|
2841
|
-
)
|
|
2842
|
-
]
|
|
2843
|
-
}
|
|
2844
|
-
),
|
|
2845
|
-
a !== tr.PASSKEY && /* @__PURE__ */ y(
|
|
2846
|
-
P,
|
|
2847
|
-
{
|
|
2848
|
-
className: "prose-dark dark:prose-lighter mt-4",
|
|
2849
|
-
header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */ y(H, { columnGap: 3, alignVertical: "center", children: [
|
|
2850
|
-
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o($e, { size: "size-8" }) }),
|
|
2851
|
-
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o("div", { children: N.PREFERENCES.PASSKEY_TITLE }) })
|
|
2852
|
-
] }) }),
|
|
2853
|
-
children: [
|
|
2854
|
-
/* @__PURE__ */ o("p", { children: N.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
2855
|
-
/* @__PURE__ */ o(
|
|
2856
|
-
K,
|
|
2857
|
-
{
|
|
2858
|
-
size: "small",
|
|
2859
|
-
className: "mt-2",
|
|
2860
|
-
onClick: r,
|
|
2861
|
-
labelLeft: N.PREFERENCES.PASSKEY_BUTTON,
|
|
2862
|
-
children: /* @__PURE__ */ o($e, { size: "size-5", monotone: !0 })
|
|
2863
|
-
}
|
|
2864
|
-
)
|
|
2865
|
-
]
|
|
2866
|
-
}
|
|
2867
|
-
)
|
|
2868
|
-
] }) : null;
|
|
2869
|
-
}, ia = ({
|
|
2870
|
-
open: e,
|
|
2871
|
-
onOpenChange: t
|
|
2872
|
-
}) => /* @__PURE__ */ o(q, { open: e, onOpenChange: t, title: rr, children: /* @__PURE__ */ o(sa, {}) }), fa = () => {
|
|
2873
|
-
const { state: e, dispatch: t, serverStats: r } = B(ie), [a, n] = I((e == null ? void 0 : e.engine) || te), [i, s] = I(!1), [c, g] = I(!1), [l, u] = I(!1), [p, b] = I(!1), [h, m] = I(!1), [d] = ce({
|
|
2874
|
-
key: se + et,
|
|
2875
|
-
initialValue: !1
|
|
2876
|
-
}), { logout: v, getAccessToken: C, user: w } = Y(), T = () => {
|
|
2877
|
-
s(!i);
|
|
2878
|
-
}, S = () => {
|
|
2879
|
-
g(!c);
|
|
2880
|
-
}, M = () => {
|
|
2881
|
-
u(!l);
|
|
2882
|
-
}, L = () => {
|
|
2883
|
-
b(!p);
|
|
2853
|
+
}), { logout: v, getAccessToken: T, user: x } = Z(), y = () => {
|
|
2854
|
+
i(!s);
|
|
2855
|
+
}, N = () => {
|
|
2856
|
+
m(!c);
|
|
2884
2857
|
}, A = () => {
|
|
2885
|
-
|
|
2858
|
+
d(!l);
|
|
2859
|
+
}, B = () => {
|
|
2860
|
+
p(!f);
|
|
2861
|
+
}, _ = () => {
|
|
2862
|
+
h(!b);
|
|
2886
2863
|
};
|
|
2887
2864
|
return G(() => {
|
|
2888
2865
|
e && e.engine && e.engine !== a && n(e.engine);
|
|
2889
|
-
}, [e, a]), /* @__PURE__ */
|
|
2866
|
+
}, [e, a]), /* @__PURE__ */ k(M, { children: [
|
|
2890
2867
|
/* @__PURE__ */ o(
|
|
2891
|
-
|
|
2868
|
+
zt,
|
|
2892
2869
|
{
|
|
2893
|
-
showConfirmation:
|
|
2894
|
-
setShowConfirmation:
|
|
2870
|
+
showConfirmation: b,
|
|
2871
|
+
setShowConfirmation: h,
|
|
2895
2872
|
action: v,
|
|
2896
2873
|
customStrings: {
|
|
2897
2874
|
confirmAction: Fe,
|
|
@@ -2901,101 +2878,101 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2901
2878
|
children: /* @__PURE__ */ o("p", { children: "Are you sure you want to log out?" })
|
|
2902
2879
|
}
|
|
2903
2880
|
),
|
|
2904
|
-
/* @__PURE__ */ o(
|
|
2905
|
-
/* @__PURE__ */ o(
|
|
2906
|
-
/* @__PURE__ */ o(
|
|
2907
|
-
/* @__PURE__ */ o(
|
|
2908
|
-
/* @__PURE__ */ o("div", { className: "sticky top-0 bg-slate-900 py-4", children: /* @__PURE__ */
|
|
2909
|
-
/* @__PURE__ */ o(
|
|
2910
|
-
/* @__PURE__ */ o(
|
|
2911
|
-
|
|
2881
|
+
/* @__PURE__ */ o(Yo, { open: s, onOpenChange: i }),
|
|
2882
|
+
/* @__PURE__ */ o(na, { open: c, onOpenChange: m }),
|
|
2883
|
+
/* @__PURE__ */ o(Uo, { open: l, onOpenChange: d }),
|
|
2884
|
+
/* @__PURE__ */ o(Do, { open: f, onOpenChange: p }),
|
|
2885
|
+
/* @__PURE__ */ o("div", { className: "sticky top-0 bg-slate-900 py-4", children: /* @__PURE__ */ k(H, { alignHorizontal: "space-between", alignVertical: "center", children: [
|
|
2886
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ o(cr, { mode: "dark", radius: "large" }) }),
|
|
2887
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ k(H, { children: [
|
|
2888
|
+
u && r && /* @__PURE__ */ o(R, { children: /* @__PURE__ */ o(
|
|
2912
2889
|
Ie,
|
|
2913
2890
|
{
|
|
2914
2891
|
mode: "dark",
|
|
2915
2892
|
focusMode: "light",
|
|
2916
|
-
trigger: /* @__PURE__ */ o(
|
|
2893
|
+
trigger: /* @__PURE__ */ o(X, { className: "mr-2", children: e && e.engine === Q ? /* @__PURE__ */ o(ut, {}) : /* @__PURE__ */ o(mt, {}) }),
|
|
2917
2894
|
defaultPlacement: "bottom-start",
|
|
2918
|
-
children: /* @__PURE__ */ o(
|
|
2895
|
+
children: /* @__PURE__ */ o(W, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ o(
|
|
2919
2896
|
vo,
|
|
2920
2897
|
{
|
|
2921
2898
|
size: "small",
|
|
2922
2899
|
mode: "dark",
|
|
2923
2900
|
focusMode: "light",
|
|
2924
2901
|
value: a,
|
|
2925
|
-
onValueChange: async (
|
|
2926
|
-
if (
|
|
2902
|
+
onValueChange: async (C) => {
|
|
2903
|
+
if (C)
|
|
2927
2904
|
try {
|
|
2928
|
-
await
|
|
2929
|
-
accessToken: await
|
|
2930
|
-
type:
|
|
2905
|
+
await V({
|
|
2906
|
+
accessToken: await T(),
|
|
2907
|
+
type: $.SET_USER_PREFERENCES,
|
|
2931
2908
|
params: {
|
|
2932
|
-
user:
|
|
2933
|
-
engine:
|
|
2909
|
+
user: x == null ? void 0 : x.username,
|
|
2910
|
+
engine: C
|
|
2934
2911
|
}
|
|
2935
2912
|
}), t({
|
|
2936
|
-
type:
|
|
2913
|
+
type: Je,
|
|
2937
2914
|
payload: {
|
|
2938
|
-
engine:
|
|
2915
|
+
engine: C
|
|
2939
2916
|
}
|
|
2940
2917
|
}), t({
|
|
2941
|
-
type:
|
|
2918
|
+
type: Ze
|
|
2942
2919
|
});
|
|
2943
2920
|
} catch {
|
|
2944
2921
|
}
|
|
2945
2922
|
},
|
|
2946
|
-
children: r && r.engines.map((
|
|
2923
|
+
children: r && r.engines.map((C) => /* @__PURE__ */ o(yo, { value: C }, C))
|
|
2947
2924
|
}
|
|
2948
2925
|
) })
|
|
2949
2926
|
}
|
|
2950
2927
|
) }),
|
|
2951
|
-
/* @__PURE__ */ o(
|
|
2928
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ k(
|
|
2952
2929
|
Ie,
|
|
2953
2930
|
{
|
|
2954
2931
|
mode: "dark",
|
|
2955
2932
|
focusMode: "light",
|
|
2956
|
-
trigger: /* @__PURE__ */ o(
|
|
2933
|
+
trigger: /* @__PURE__ */ o(X, { children: /* @__PURE__ */ o(Ir, {}) }),
|
|
2957
2934
|
defaultPlacement: "bottom-end",
|
|
2958
2935
|
children: [
|
|
2959
2936
|
/* @__PURE__ */ o(
|
|
2960
|
-
|
|
2937
|
+
W,
|
|
2961
2938
|
{
|
|
2962
2939
|
label: "Profile",
|
|
2963
|
-
onClick:
|
|
2964
|
-
icon: /* @__PURE__ */ o(
|
|
2940
|
+
onClick: y,
|
|
2941
|
+
icon: /* @__PURE__ */ o(Nr, {})
|
|
2965
2942
|
}
|
|
2966
2943
|
),
|
|
2967
2944
|
/* @__PURE__ */ o(
|
|
2968
|
-
|
|
2945
|
+
W,
|
|
2969
2946
|
{
|
|
2970
|
-
label:
|
|
2971
|
-
onClick:
|
|
2972
|
-
icon: /* @__PURE__ */ o(
|
|
2947
|
+
label: "Settings",
|
|
2948
|
+
onClick: N,
|
|
2949
|
+
icon: /* @__PURE__ */ o(Sr, {})
|
|
2973
2950
|
}
|
|
2974
2951
|
),
|
|
2975
2952
|
/* @__PURE__ */ o(
|
|
2976
|
-
|
|
2953
|
+
W,
|
|
2977
2954
|
{
|
|
2978
2955
|
label: "History",
|
|
2979
|
-
onClick:
|
|
2980
|
-
icon: /* @__PURE__ */ o(
|
|
2956
|
+
onClick: A,
|
|
2957
|
+
icon: /* @__PURE__ */ o(xr, {})
|
|
2981
2958
|
}
|
|
2982
2959
|
),
|
|
2983
2960
|
/* @__PURE__ */ o(
|
|
2984
|
-
|
|
2961
|
+
W,
|
|
2985
2962
|
{
|
|
2986
2963
|
label: "About",
|
|
2987
|
-
onClick:
|
|
2988
|
-
icon: /* @__PURE__ */ o(
|
|
2964
|
+
onClick: B,
|
|
2965
|
+
icon: /* @__PURE__ */ o(Cr, {})
|
|
2989
2966
|
}
|
|
2990
2967
|
),
|
|
2991
|
-
e && e.id && !e.isComponent && /* @__PURE__ */
|
|
2968
|
+
e && e.id && !e.isComponent && /* @__PURE__ */ k(M, { children: [
|
|
2992
2969
|
/* @__PURE__ */ o(_r, {}),
|
|
2993
2970
|
/* @__PURE__ */ o(
|
|
2994
|
-
|
|
2971
|
+
W,
|
|
2995
2972
|
{
|
|
2996
2973
|
label: "Log out",
|
|
2997
|
-
onClick:
|
|
2998
|
-
icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(
|
|
2974
|
+
onClick: _,
|
|
2975
|
+
icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(kr, { monotone: !0 }) })
|
|
2999
2976
|
}
|
|
3000
2977
|
)
|
|
3001
2978
|
] })
|
|
@@ -3007,5 +2984,5 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
3007
2984
|
] });
|
|
3008
2985
|
};
|
|
3009
2986
|
export {
|
|
3010
|
-
|
|
2987
|
+
ha as default
|
|
3011
2988
|
};
|