@versini/sassysaint 5.2.0 → 5.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{App.DKRoa2tE.js → App.BsbkcIiP.js} +437 -401
- package/dist/chunks/{LazyHeader.QLLnRIqL.js → LazyHeader.eROXpLy0.js} +704 -652
- package/dist/chunks/{LazyMarkdownWithExtra.BtUUOsHs.js → LazyMarkdownWithExtra.u8cRarRr.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.3aYd1Tzp.js → LazyMessageAssistant.Dx3oqsDG.js} +4 -4
- package/dist/chunks/{index.jf7dGfT1.B5RD15ln.js → index.D5p6GpnU.C8lskEhG.js} +11 -11
- package/dist/chunks/{index.CGGeNJS3.js → index.DcfOXJ8N.js} +12 -12
- package/dist/chunks/{index.BbfwgIO_.js → index.y_5fBKAi.js} +125 -125
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +4 -4
|
@@ -1,19 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { g as
|
|
3
|
-
import { serviceCall as H, SERVICE_TYPES as F, E as G, f as D, ce as
|
|
1
|
+
import { jsx as r, jsxs as v, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { g as O, D as P, CARDS as w, renderDataAsList as le, pluralize as fe, AppContext as me, ABOUT_TITLE as Rt, DEFAULT_AI_ENGINE as ie, numberFormatter as Mt, durationFormatter as Qe, NA as Lt, ROLE_ASSISTANT as Ot, extractAverage as Pt, GPT4_MAX_TOKENS as Bt, rn as te, STATS as et, b as Me, j as ee, R as Q, HistoryContext as tt, LOCAL_STORAGE_PREFIX as $, LOCAL_STORAGE_SORT as Dt, O as Y, ACTION_RESET as Vt, ACTION_RESTORE as zt, truncate as $t, ACTION_SORT as Ce, LOCAL_STORAGE_SEARCH as Ht, me as Ft, ACTION_SEARCH as Gt, HISTORY_TITLE as Ut, LOCAL_STORAGE_ENGINE_TOGGLE as ot, ENGINE_OPENAI as Te, ENGINE_ANTHROPIC as pe, ACTION_ENGINE as rt, getCurrentGeoLocation as jt, LOCAL_STORAGE_TAG_SUMMARIZE as ze, LOCAL_STORAGE_TAG_PROOFREAD as $e, LOCAL_STORAGE_TAG_REPHRASE as He, TAG_CONTENT as we, TAGS as Ee, LOCAL_STORAGE_CHAT_DETAILS as Kt, G as Wt, v as Fe, PROFILE_TITLE as Yt, LOG_OUT as Ge } from "./index.y_5fBKAi.js";
|
|
3
|
+
import { serviceCall as H, SERVICE_TYPES as F, E as G, f as D, ce as Zt, ge as qt, me as Ne, ie as z, ue as Xt, be as Jt, he as Qt, we as Ue } from "./index.DcfOXJ8N.js";
|
|
4
4
|
import * as f from "react";
|
|
5
|
-
import I, { useId as
|
|
5
|
+
import I, { useId as eo, forwardRef as nt, useState as S, useRef as ce, useContext as V, useEffect as U, Suspense as to, lazy as oo, useMemo as ro } from "react";
|
|
6
6
|
import C from "clsx";
|
|
7
|
-
import { useFloatingTree as at, useFloatingNodeId as
|
|
8
|
-
const
|
|
7
|
+
import { useFloatingTree as at, useFloatingNodeId as no, useListItem as st, useFloating as ao, offset as so, flip as io, shift as lo, autoUpdate as co, useClick as uo, useRole as mo, useDismiss as ho, useListNavigation as go, useTypeahead as po, useInteractions as fo, useMergeRefs as it, FloatingNode as bo, FloatingList as vo, FloatingPortal as yo, FloatingFocusManager as ko, FloatingTree as Co } from "@floating-ui/react";
|
|
8
|
+
const To = ({
|
|
9
9
|
className: e,
|
|
10
10
|
viewBox: t,
|
|
11
11
|
spacing: o,
|
|
12
12
|
title: n,
|
|
13
13
|
monotone: a,
|
|
14
|
-
...
|
|
14
|
+
...s
|
|
15
|
+
}) => /* @__PURE__ */ r(
|
|
16
|
+
O,
|
|
17
|
+
{
|
|
18
|
+
defaultViewBox: "0 0 256 176",
|
|
19
|
+
defaultClassName: "size-5",
|
|
20
|
+
viewBox: t,
|
|
21
|
+
className: e,
|
|
22
|
+
spacing: o,
|
|
23
|
+
title: n || "Anthropic",
|
|
24
|
+
...s,
|
|
25
|
+
children: /* @__PURE__ */ r("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" })
|
|
26
|
+
}
|
|
27
|
+
), wo = ({
|
|
28
|
+
className: e,
|
|
29
|
+
viewBox: t,
|
|
30
|
+
spacing: o,
|
|
31
|
+
title: n,
|
|
32
|
+
monotone: a,
|
|
33
|
+
...s
|
|
15
34
|
}) => /* @__PURE__ */ v(
|
|
16
|
-
|
|
35
|
+
O,
|
|
17
36
|
{
|
|
18
37
|
defaultViewBox: "0 0 512 512",
|
|
19
38
|
defaultClassName: "size-5",
|
|
@@ -21,7 +40,7 @@ const wo = ({
|
|
|
21
40
|
className: e,
|
|
22
41
|
spacing: o,
|
|
23
42
|
title: n || "Back",
|
|
24
|
-
...
|
|
43
|
+
...s,
|
|
25
44
|
children: [
|
|
26
45
|
/* @__PURE__ */ r(
|
|
27
46
|
"path",
|
|
@@ -39,9 +58,9 @@ const wo = ({
|
|
|
39
58
|
spacing: o,
|
|
40
59
|
title: n,
|
|
41
60
|
monotone: a,
|
|
42
|
-
...
|
|
61
|
+
...s
|
|
43
62
|
}) => /* @__PURE__ */ v(
|
|
44
|
-
|
|
63
|
+
O,
|
|
45
64
|
{
|
|
46
65
|
defaultViewBox: "0 0 448 512",
|
|
47
66
|
defaultClassName: "size-5",
|
|
@@ -49,7 +68,7 @@ const wo = ({
|
|
|
49
68
|
className: e,
|
|
50
69
|
spacing: o,
|
|
51
70
|
title: n || "Chart",
|
|
52
|
-
...
|
|
71
|
+
...s,
|
|
53
72
|
children: [
|
|
54
73
|
/* @__PURE__ */ r(
|
|
55
74
|
"path",
|
|
@@ -67,9 +86,9 @@ const wo = ({
|
|
|
67
86
|
spacing: o,
|
|
68
87
|
title: n,
|
|
69
88
|
monotone: a,
|
|
70
|
-
...
|
|
89
|
+
...s
|
|
71
90
|
}) => /* @__PURE__ */ v(
|
|
72
|
-
|
|
91
|
+
O,
|
|
73
92
|
{
|
|
74
93
|
defaultViewBox: "0 0 448 512",
|
|
75
94
|
defaultClassName: "size-5",
|
|
@@ -77,7 +96,7 @@ const wo = ({
|
|
|
77
96
|
className: e,
|
|
78
97
|
spacing: o,
|
|
79
98
|
title: n || "Delete",
|
|
80
|
-
...
|
|
99
|
+
...s,
|
|
81
100
|
children: [
|
|
82
101
|
/* @__PURE__ */ r(
|
|
83
102
|
"path",
|
|
@@ -89,15 +108,15 @@ const wo = ({
|
|
|
89
108
|
/* @__PURE__ */ r("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" })
|
|
90
109
|
]
|
|
91
110
|
}
|
|
92
|
-
),
|
|
111
|
+
), je = ({
|
|
93
112
|
className: e,
|
|
94
113
|
viewBox: t,
|
|
95
114
|
spacing: o,
|
|
96
115
|
title: n,
|
|
97
116
|
monotone: a,
|
|
98
|
-
...
|
|
117
|
+
...s
|
|
99
118
|
}) => /* @__PURE__ */ v(
|
|
100
|
-
|
|
119
|
+
O,
|
|
101
120
|
{
|
|
102
121
|
defaultViewBox: "0 0 512 512",
|
|
103
122
|
defaultClassName: "size-5",
|
|
@@ -105,7 +124,7 @@ const wo = ({
|
|
|
105
124
|
className: e,
|
|
106
125
|
spacing: o,
|
|
107
126
|
title: n || "Edit",
|
|
108
|
-
...
|
|
127
|
+
...s,
|
|
109
128
|
children: [
|
|
110
129
|
/* @__PURE__ */ r(
|
|
111
130
|
"path",
|
|
@@ -123,9 +142,9 @@ const wo = ({
|
|
|
123
142
|
spacing: o,
|
|
124
143
|
title: n,
|
|
125
144
|
monotone: a,
|
|
126
|
-
...
|
|
145
|
+
...s
|
|
127
146
|
}) => /* @__PURE__ */ v(
|
|
128
|
-
|
|
147
|
+
O,
|
|
129
148
|
{
|
|
130
149
|
defaultViewBox: "0 0 512 512",
|
|
131
150
|
defaultClassName: "size-5",
|
|
@@ -133,7 +152,7 @@ const wo = ({
|
|
|
133
152
|
className: e,
|
|
134
153
|
spacing: o,
|
|
135
154
|
title: n || "History",
|
|
136
|
-
...
|
|
155
|
+
...s,
|
|
137
156
|
children: [
|
|
138
157
|
/* @__PURE__ */ r(
|
|
139
158
|
"path",
|
|
@@ -145,15 +164,15 @@ const wo = ({
|
|
|
145
164
|
/* @__PURE__ */ r("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" })
|
|
146
165
|
]
|
|
147
166
|
}
|
|
148
|
-
),
|
|
167
|
+
), xo = ({
|
|
149
168
|
className: e,
|
|
150
169
|
viewBox: t,
|
|
151
170
|
spacing: o,
|
|
152
171
|
title: n,
|
|
153
172
|
monotone: a,
|
|
154
|
-
...
|
|
173
|
+
...s
|
|
155
174
|
}) => /* @__PURE__ */ v(
|
|
156
|
-
|
|
175
|
+
O,
|
|
157
176
|
{
|
|
158
177
|
defaultViewBox: "0 0 512 512",
|
|
159
178
|
defaultClassName: "size-5",
|
|
@@ -161,7 +180,7 @@ const wo = ({
|
|
|
161
180
|
className: e,
|
|
162
181
|
spacing: o,
|
|
163
182
|
title: n || "Info",
|
|
164
|
-
...
|
|
183
|
+
...s,
|
|
165
184
|
children: [
|
|
166
185
|
/* @__PURE__ */ r(
|
|
167
186
|
"path",
|
|
@@ -173,15 +192,40 @@ const wo = ({
|
|
|
173
192
|
/* @__PURE__ */ r("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" })
|
|
174
193
|
]
|
|
175
194
|
}
|
|
176
|
-
),
|
|
195
|
+
), So = ({
|
|
196
|
+
className: e,
|
|
197
|
+
viewBox: t,
|
|
198
|
+
spacing: o,
|
|
199
|
+
title: n,
|
|
200
|
+
monotone: a,
|
|
201
|
+
...s
|
|
202
|
+
}) => /* @__PURE__ */ r(
|
|
203
|
+
O,
|
|
204
|
+
{
|
|
205
|
+
defaultViewBox: "0 0 24 24",
|
|
206
|
+
defaultClassName: "size-5",
|
|
207
|
+
viewBox: t,
|
|
208
|
+
className: e,
|
|
209
|
+
spacing: o,
|
|
210
|
+
title: n || "OpenAI",
|
|
211
|
+
...s,
|
|
212
|
+
children: /* @__PURE__ */ r(
|
|
213
|
+
"path",
|
|
214
|
+
{
|
|
215
|
+
fill: "currentColor",
|
|
216
|
+
d: "M22.282 9.821a6 6 0 0 0-.516-4.91a6.05 6.05 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a6 6 0 0 0-3.998 2.9a6.05 6.05 0 0 0 .743 7.097a5.98 5.98 0 0 0 .51 4.911a6.05 6.05 0 0 0 6.515 2.9A6 6 0 0 0 13.26 24a6.06 6.06 0 0 0 5.772-4.206a6 6 0 0 0 3.997-2.9a6.06 6.06 0 0 0-.747-7.073M13.26 22.43a4.48 4.48 0 0 1-2.876-1.04l.141-.081l4.779-2.758a.8.8 0 0 0 .392-.681v-6.737l2.02 1.168a.07.07 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494M3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085l4.783 2.759a.77.77 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646M2.34 7.896a4.5 4.5 0 0 1 2.366-1.973V11.6a.77.77 0 0 0 .388.677l5.815 3.354l-2.02 1.168a.08.08 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.08.08 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667m2.01-3.023l-.141-.085l-4.774-2.782a.78.78 0 0 0-.785 0L9.409 9.23V6.897a.07.07 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.8.8 0 0 0-.393.681zm1.097-2.365l2.602-1.5l2.607 1.5v2.999l-2.597 1.5l-2.607-1.5Z"
|
|
217
|
+
}
|
|
218
|
+
)
|
|
219
|
+
}
|
|
220
|
+
), _o = ({
|
|
177
221
|
className: e,
|
|
178
222
|
viewBox: t,
|
|
179
223
|
spacing: o,
|
|
180
224
|
title: n,
|
|
181
225
|
monotone: a,
|
|
182
|
-
...
|
|
226
|
+
...s
|
|
183
227
|
}) => /* @__PURE__ */ v(
|
|
184
|
-
|
|
228
|
+
O,
|
|
185
229
|
{
|
|
186
230
|
defaultViewBox: "0 0 576 512",
|
|
187
231
|
defaultClassName: "size-5",
|
|
@@ -189,7 +233,7 @@ const wo = ({
|
|
|
189
233
|
className: e,
|
|
190
234
|
spacing: o,
|
|
191
235
|
title: n || "Profile",
|
|
192
|
-
...
|
|
236
|
+
...s,
|
|
193
237
|
children: [
|
|
194
238
|
/* @__PURE__ */ r(
|
|
195
239
|
"path",
|
|
@@ -201,15 +245,15 @@ const wo = ({
|
|
|
201
245
|
/* @__PURE__ */ r("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" })
|
|
202
246
|
]
|
|
203
247
|
}
|
|
204
|
-
),
|
|
248
|
+
), Ao = ({
|
|
205
249
|
className: e,
|
|
206
250
|
viewBox: t,
|
|
207
251
|
spacing: o,
|
|
208
252
|
title: n,
|
|
209
253
|
monotone: a,
|
|
210
|
-
...
|
|
254
|
+
...s
|
|
211
255
|
}) => /* @__PURE__ */ v(
|
|
212
|
-
|
|
256
|
+
O,
|
|
213
257
|
{
|
|
214
258
|
defaultViewBox: "0 0 512 512",
|
|
215
259
|
defaultClassName: "size-5",
|
|
@@ -217,7 +261,7 @@ const wo = ({
|
|
|
217
261
|
className: e,
|
|
218
262
|
spacing: o,
|
|
219
263
|
title: n || "Restore",
|
|
220
|
-
...
|
|
264
|
+
...s,
|
|
221
265
|
children: [
|
|
222
266
|
/* @__PURE__ */ r(
|
|
223
267
|
"path",
|
|
@@ -235,9 +279,9 @@ const wo = ({
|
|
|
235
279
|
spacing: o,
|
|
236
280
|
title: n,
|
|
237
281
|
monotone: a,
|
|
238
|
-
...
|
|
282
|
+
...s
|
|
239
283
|
}) => /* @__PURE__ */ r(
|
|
240
|
-
|
|
284
|
+
O,
|
|
241
285
|
{
|
|
242
286
|
defaultViewBox: "0 0 448 512",
|
|
243
287
|
defaultClassName: "size-5",
|
|
@@ -245,14 +289,14 @@ const wo = ({
|
|
|
245
289
|
className: e,
|
|
246
290
|
spacing: o,
|
|
247
291
|
title: n || "Settings",
|
|
248
|
-
...
|
|
292
|
+
...s,
|
|
249
293
|
children: /* @__PURE__ */ r("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" })
|
|
250
294
|
}
|
|
251
295
|
);
|
|
252
296
|
function de(e) {
|
|
253
|
-
return
|
|
297
|
+
return eo();
|
|
254
298
|
}
|
|
255
|
-
const
|
|
299
|
+
const xe = f.createContext({
|
|
256
300
|
getItemProps: () => ({}),
|
|
257
301
|
activeIndex: null,
|
|
258
302
|
/* v8 ignore next 2 */
|
|
@@ -261,7 +305,7 @@ const Se = f.createContext({
|
|
|
261
305
|
setHasFocusInside: () => {
|
|
262
306
|
},
|
|
263
307
|
isOpen: !1
|
|
264
|
-
}),
|
|
308
|
+
}), Ke = (e) => {
|
|
265
309
|
if (typeof e == "string")
|
|
266
310
|
return e;
|
|
267
311
|
if (typeof e == "function")
|
|
@@ -279,46 +323,46 @@ const Se = f.createContext({
|
|
|
279
323
|
label: o = "Open menu",
|
|
280
324
|
defaultPlacement: n = "bottom-start",
|
|
281
325
|
onOpenChange: a,
|
|
282
|
-
spacing:
|
|
283
|
-
mode:
|
|
326
|
+
spacing: s,
|
|
327
|
+
mode: i = "system",
|
|
284
328
|
focusMode: l = "system",
|
|
285
329
|
...h
|
|
286
330
|
}, u) => {
|
|
287
|
-
const [m, g] =
|
|
288
|
-
nodeId:
|
|
331
|
+
const [m, g] = S(!1), [b, d] = S(!1), [c, y] = S(null), T = ce([]), p = ce([]), k = V(xe), E = at(), x = no(), M = st(), { floatingStyles: _, refs: B, context: N } = ao({
|
|
332
|
+
nodeId: x,
|
|
289
333
|
open: m,
|
|
290
334
|
onOpenChange: (ae) => {
|
|
291
335
|
g(ae), a == null || a(ae);
|
|
292
336
|
},
|
|
293
337
|
placement: n,
|
|
294
338
|
strategy: "fixed",
|
|
295
|
-
middleware: [so({ mainAxis: 10 }),
|
|
296
|
-
whileElementsMounted:
|
|
297
|
-
}), re =
|
|
339
|
+
middleware: [so({ mainAxis: 10 }), io(), lo()],
|
|
340
|
+
whileElementsMounted: co
|
|
341
|
+
}), re = uo(N, {
|
|
298
342
|
event: "mousedown",
|
|
299
343
|
toggle: !0,
|
|
300
344
|
ignoreMouse: !1
|
|
301
|
-
}),
|
|
345
|
+
}), J = mo(N, { role: "menu" }), j = ho(N, { bubbles: !0 }), ne = go(N, {
|
|
302
346
|
listRef: T,
|
|
303
347
|
activeIndex: c,
|
|
304
348
|
nested: !1,
|
|
305
349
|
onNavigate: y,
|
|
306
350
|
loop: !0
|
|
307
|
-
}), L =
|
|
351
|
+
}), L = po(N, {
|
|
308
352
|
listRef: p,
|
|
309
353
|
onMatch: m ? y : void 0,
|
|
310
354
|
activeIndex: c
|
|
311
|
-
}), { getReferenceProps: K, getFloatingProps: A, getItemProps:
|
|
312
|
-
noInternalClick:
|
|
355
|
+
}), { getReferenceProps: K, getFloatingProps: A, getItemProps: St } = fo([re, J, j, ne, L]), Ve = Ke(e) === "Button" || Ke(e) === "ButtonIcon", _t = Ve ? {
|
|
356
|
+
noInternalClick: Ve,
|
|
313
357
|
focusMode: l,
|
|
314
|
-
mode:
|
|
315
|
-
spacing:
|
|
358
|
+
mode: i,
|
|
359
|
+
spacing: s
|
|
316
360
|
} : {}, At = I.cloneElement(e, {
|
|
317
|
-
...
|
|
361
|
+
..._t,
|
|
318
362
|
"aria-label": o,
|
|
319
363
|
"data-open": m ? "" : void 0,
|
|
320
364
|
"data-focus-inside": b ? "" : void 0,
|
|
321
|
-
ref:
|
|
365
|
+
ref: it([B.setReference, M.ref, u]),
|
|
322
366
|
...K(
|
|
323
367
|
k.getItemProps({
|
|
324
368
|
...h
|
|
@@ -335,21 +379,21 @@ const Se = f.createContext({
|
|
|
335
379
|
E.events.off("click", ae);
|
|
336
380
|
};
|
|
337
381
|
}, [E, a]), U(() => {
|
|
338
|
-
m && E && E.events.emit("menuopen", { nodeId:
|
|
339
|
-
}, [E, m,
|
|
382
|
+
m && E && E.events.emit("menuopen", { nodeId: x });
|
|
383
|
+
}, [E, m, x]), /* @__PURE__ */ v(bo, { id: x, children: [
|
|
340
384
|
At,
|
|
341
385
|
/* @__PURE__ */ r(
|
|
342
|
-
|
|
386
|
+
xe.Provider,
|
|
343
387
|
{
|
|
344
388
|
value: {
|
|
345
389
|
activeIndex: c,
|
|
346
390
|
setActiveIndex: y,
|
|
347
|
-
getItemProps:
|
|
391
|
+
getItemProps: St,
|
|
348
392
|
setHasFocusInside: d,
|
|
349
393
|
isOpen: m
|
|
350
394
|
},
|
|
351
|
-
children: /* @__PURE__ */ r(
|
|
352
|
-
|
|
395
|
+
children: /* @__PURE__ */ r(vo, { elementsRef: T, labelsRef: p, children: m && /* @__PURE__ */ r(yo, { children: /* @__PURE__ */ r(
|
|
396
|
+
ko,
|
|
353
397
|
{
|
|
354
398
|
context: N,
|
|
355
399
|
modal: !1,
|
|
@@ -358,9 +402,9 @@ const Se = f.createContext({
|
|
|
358
402
|
children: /* @__PURE__ */ r(
|
|
359
403
|
"div",
|
|
360
404
|
{
|
|
361
|
-
ref:
|
|
405
|
+
ref: B.setFloating,
|
|
362
406
|
className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
|
|
363
|
-
style:
|
|
407
|
+
style: _,
|
|
364
408
|
...A(),
|
|
365
409
|
children: t
|
|
366
410
|
}
|
|
@@ -371,8 +415,8 @@ const Se = f.createContext({
|
|
|
371
415
|
)
|
|
372
416
|
] });
|
|
373
417
|
}
|
|
374
|
-
),
|
|
375
|
-
|
|
418
|
+
), Se = nt((e, t) => /* @__PURE__ */ r(Co, { children: /* @__PURE__ */ r(lt, { ...e, ref: t }) }));
|
|
419
|
+
Se.displayName = "Menu";
|
|
376
420
|
lt.displayName = "MenuComponent";
|
|
377
421
|
const W = f.forwardRef(
|
|
378
422
|
({
|
|
@@ -381,10 +425,10 @@ const W = f.forwardRef(
|
|
|
381
425
|
icon: o,
|
|
382
426
|
raw: n = !1,
|
|
383
427
|
children: a,
|
|
384
|
-
ignoreClick:
|
|
385
|
-
...
|
|
428
|
+
ignoreClick: s = !1,
|
|
429
|
+
...i
|
|
386
430
|
}, l) => {
|
|
387
|
-
const h = f.useContext(
|
|
431
|
+
const h = f.useContext(xe), u = st({ label: t ? null : e }), m = at(), g = it([u.ref, l]);
|
|
388
432
|
return n && a ? /* @__PURE__ */ r(
|
|
389
433
|
"div",
|
|
390
434
|
{
|
|
@@ -392,7 +436,7 @@ const W = f.forwardRef(
|
|
|
392
436
|
...h.getItemProps({
|
|
393
437
|
onClick(b) {
|
|
394
438
|
var d;
|
|
395
|
-
|
|
439
|
+
s || ((d = i.onClick) == null || d.call(i, b), m == null || m.events.emit("click"));
|
|
396
440
|
}
|
|
397
441
|
}),
|
|
398
442
|
children: a
|
|
@@ -400,7 +444,7 @@ const W = f.forwardRef(
|
|
|
400
444
|
) : /* @__PURE__ */ v(
|
|
401
445
|
"button",
|
|
402
446
|
{
|
|
403
|
-
...
|
|
447
|
+
...i,
|
|
404
448
|
ref: g,
|
|
405
449
|
role: "menuitem",
|
|
406
450
|
className: "m-0 flex w-full rounded-md border border-transparent bg-none px-3 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",
|
|
@@ -409,11 +453,11 @@ const W = f.forwardRef(
|
|
|
409
453
|
...h.getItemProps({
|
|
410
454
|
onClick(b) {
|
|
411
455
|
var d;
|
|
412
|
-
|
|
456
|
+
s || ((d = i.onClick) == null || d.call(i, b), m == null || m.events.emit("click"));
|
|
413
457
|
},
|
|
414
458
|
onFocus(b) {
|
|
415
459
|
var d;
|
|
416
|
-
(d =
|
|
460
|
+
(d = i.onFocus) == null || d.call(i, b), h.setHasFocusInside(!0);
|
|
417
461
|
}
|
|
418
462
|
}),
|
|
419
463
|
children: [
|
|
@@ -425,7 +469,7 @@ const W = f.forwardRef(
|
|
|
425
469
|
}
|
|
426
470
|
);
|
|
427
471
|
W.displayName = "MenuItem";
|
|
428
|
-
const
|
|
472
|
+
const Mo = ({ className: e, ...t }) => {
|
|
429
473
|
const o = C(e, "my-1 border-t border-border-medium");
|
|
430
474
|
return /* @__PURE__ */ r("div", { className: o, ...t });
|
|
431
475
|
};
|
|
@@ -455,12 +499,12 @@ try {
|
|
|
455
499
|
});
|
|
456
500
|
} catch {
|
|
457
501
|
}
|
|
458
|
-
const
|
|
459
|
-
function
|
|
502
|
+
const Lo = "av-togglegroup", Oo = "av-togglegroup-item-wrapper", Po = "av-togglegroup-item";
|
|
503
|
+
function Le(e, t = []) {
|
|
460
504
|
let o = [];
|
|
461
|
-
function n(
|
|
462
|
-
const l = f.createContext(
|
|
463
|
-
o = [...o,
|
|
505
|
+
function n(s, i) {
|
|
506
|
+
const l = f.createContext(i), h = o.length;
|
|
507
|
+
o = [...o, i];
|
|
464
508
|
function u(g) {
|
|
465
509
|
const { scope: b, children: d, ...c } = g, y = (b == null ? void 0 : b[e][h]) || l, T = f.useMemo(() => c, Object.values(c));
|
|
466
510
|
return /* @__PURE__ */ r(y.Provider, { value: T, children: d });
|
|
@@ -468,24 +512,24 @@ function Me(e, t = []) {
|
|
|
468
512
|
function m(g, b) {
|
|
469
513
|
const d = (b == null ? void 0 : b[e][h]) || l, c = f.useContext(d);
|
|
470
514
|
if (c) return c;
|
|
471
|
-
if (
|
|
472
|
-
throw new Error(`\`${g}\` must be used within \`${
|
|
515
|
+
if (i !== void 0) return i;
|
|
516
|
+
throw new Error(`\`${g}\` must be used within \`${s}\``);
|
|
473
517
|
}
|
|
474
|
-
return u.displayName =
|
|
518
|
+
return u.displayName = s + "Provider", [u, m];
|
|
475
519
|
}
|
|
476
520
|
const a = () => {
|
|
477
|
-
const
|
|
478
|
-
return function(
|
|
479
|
-
const l = (
|
|
521
|
+
const s = o.map((i) => f.createContext(i));
|
|
522
|
+
return function(i) {
|
|
523
|
+
const l = (i == null ? void 0 : i[e]) || s;
|
|
480
524
|
return f.useMemo(
|
|
481
|
-
() => ({ [`__scope${e}`]: { ...
|
|
482
|
-
[
|
|
525
|
+
() => ({ [`__scope${e}`]: { ...i, [e]: l } }),
|
|
526
|
+
[i, l]
|
|
483
527
|
);
|
|
484
528
|
};
|
|
485
529
|
};
|
|
486
|
-
return a.scopeName = e, [n,
|
|
530
|
+
return a.scopeName = e, [n, Bo(a, ...t)];
|
|
487
531
|
}
|
|
488
|
-
function
|
|
532
|
+
function Bo(...e) {
|
|
489
533
|
const t = e[0];
|
|
490
534
|
if (e.length === 1) return t;
|
|
491
535
|
const o = () => {
|
|
@@ -494,66 +538,66 @@ function Oo(...e) {
|
|
|
494
538
|
scopeName: a.scopeName
|
|
495
539
|
}));
|
|
496
540
|
return function(a) {
|
|
497
|
-
const
|
|
541
|
+
const s = n.reduce((i, { useScope: l, scopeName: h }) => {
|
|
498
542
|
const u = l(a)[`__scope${h}`];
|
|
499
|
-
return { ...
|
|
543
|
+
return { ...i, ...u };
|
|
500
544
|
}, {});
|
|
501
|
-
return f.useMemo(() => ({ [`__scope${t.scopeName}`]:
|
|
545
|
+
return f.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
502
546
|
};
|
|
503
547
|
};
|
|
504
548
|
return o.scopeName = t.scopeName, o;
|
|
505
549
|
}
|
|
506
|
-
function
|
|
550
|
+
function Do(e, t) {
|
|
507
551
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
508
552
|
}
|
|
509
|
-
function
|
|
510
|
-
return (t) => e.forEach((o) =>
|
|
553
|
+
function ct(...e) {
|
|
554
|
+
return (t) => e.forEach((o) => Do(o, t));
|
|
511
555
|
}
|
|
512
|
-
function
|
|
513
|
-
return f.useCallback(
|
|
556
|
+
function _e(...e) {
|
|
557
|
+
return f.useCallback(ct(...e), e);
|
|
514
558
|
}
|
|
515
|
-
var
|
|
516
|
-
const { children: o, ...n } = e, a = f.Children.toArray(o),
|
|
517
|
-
if (
|
|
518
|
-
const
|
|
519
|
-
return /* @__PURE__ */ r(
|
|
559
|
+
var be = f.forwardRef((e, t) => {
|
|
560
|
+
const { children: o, ...n } = e, a = f.Children.toArray(o), s = a.find(zo);
|
|
561
|
+
if (s) {
|
|
562
|
+
const i = s.props.children, l = a.map((h) => h === s ? f.Children.count(i) > 1 ? f.Children.only(null) : f.isValidElement(i) ? i.props.children : null : h);
|
|
563
|
+
return /* @__PURE__ */ r(Ae, { ...n, ref: t, children: f.isValidElement(i) ? f.cloneElement(i, void 0, l) : null });
|
|
520
564
|
}
|
|
521
|
-
return /* @__PURE__ */ r(
|
|
565
|
+
return /* @__PURE__ */ r(Ae, { ...n, ref: t, children: o });
|
|
522
566
|
});
|
|
523
|
-
|
|
524
|
-
var
|
|
567
|
+
be.displayName = "Slot";
|
|
568
|
+
var Ae = f.forwardRef((e, t) => {
|
|
525
569
|
const { children: o, ...n } = e;
|
|
526
570
|
if (f.isValidElement(o)) {
|
|
527
|
-
const a =
|
|
571
|
+
const a = Ho(o);
|
|
528
572
|
return f.cloneElement(o, {
|
|
529
573
|
...$o(n, o.props),
|
|
530
574
|
// @ts-ignore
|
|
531
|
-
ref: t ?
|
|
575
|
+
ref: t ? ct(t, a) : a
|
|
532
576
|
});
|
|
533
577
|
}
|
|
534
578
|
return f.Children.count(o) > 1 ? f.Children.only(null) : null;
|
|
535
579
|
});
|
|
536
|
-
|
|
537
|
-
var
|
|
538
|
-
function
|
|
539
|
-
return f.isValidElement(e) && e.type ===
|
|
580
|
+
Ae.displayName = "SlotClone";
|
|
581
|
+
var Vo = ({ children: e }) => /* @__PURE__ */ r(R, { children: e });
|
|
582
|
+
function zo(e) {
|
|
583
|
+
return f.isValidElement(e) && e.type === Vo;
|
|
540
584
|
}
|
|
541
585
|
function $o(e, t) {
|
|
542
586
|
const o = { ...t };
|
|
543
587
|
for (const n in t) {
|
|
544
|
-
const a = e[n],
|
|
545
|
-
/^on[A-Z]/.test(n) ? a &&
|
|
546
|
-
|
|
547
|
-
} : a && (o[n] = a) : n === "style" ? o[n] = { ...a, ...
|
|
588
|
+
const a = e[n], s = t[n];
|
|
589
|
+
/^on[A-Z]/.test(n) ? a && s ? o[n] = (...i) => {
|
|
590
|
+
s(...i), a(...i);
|
|
591
|
+
} : a && (o[n] = a) : n === "style" ? o[n] = { ...a, ...s } : n === "className" && (o[n] = [a, s].filter(Boolean).join(" "));
|
|
548
592
|
}
|
|
549
593
|
return { ...e, ...o };
|
|
550
594
|
}
|
|
551
|
-
function
|
|
595
|
+
function Ho(e) {
|
|
552
596
|
var t, o;
|
|
553
597
|
let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = n && "isReactWarning" in n && n.isReactWarning;
|
|
554
598
|
return a ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, a = n && "isReactWarning" in n && n.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
|
|
555
599
|
}
|
|
556
|
-
var
|
|
600
|
+
var Fo = [
|
|
557
601
|
"a",
|
|
558
602
|
"button",
|
|
559
603
|
"div",
|
|
@@ -570,44 +614,44 @@ var zo = [
|
|
|
570
614
|
"span",
|
|
571
615
|
"svg",
|
|
572
616
|
"ul"
|
|
573
|
-
], ue =
|
|
617
|
+
], ue = Fo.reduce((e, t) => {
|
|
574
618
|
const o = f.forwardRef((n, a) => {
|
|
575
|
-
const { asChild:
|
|
576
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ r(l, { ...
|
|
619
|
+
const { asChild: s, ...i } = n, l = s ? be : t;
|
|
620
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ r(l, { ...i, ref: a });
|
|
577
621
|
});
|
|
578
622
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
579
623
|
}, {});
|
|
580
|
-
function
|
|
624
|
+
function Z(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
|
|
581
625
|
return function(n) {
|
|
582
626
|
if (e == null || e(n), o === !1 || !n.defaultPrevented)
|
|
583
627
|
return t == null ? void 0 : t(n);
|
|
584
628
|
};
|
|
585
629
|
}
|
|
586
|
-
function
|
|
587
|
-
const t = e + "CollectionProvider", [o, n] =
|
|
630
|
+
function Go(e) {
|
|
631
|
+
const t = e + "CollectionProvider", [o, n] = Le(t), [a, s] = o(
|
|
588
632
|
t,
|
|
589
633
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
590
|
-
),
|
|
634
|
+
), i = (d) => {
|
|
591
635
|
const { scope: c, children: y } = d, T = I.useRef(null), p = I.useRef(/* @__PURE__ */ new Map()).current;
|
|
592
636
|
return /* @__PURE__ */ r(a, { scope: c, itemMap: p, collectionRef: T, children: y });
|
|
593
637
|
};
|
|
594
|
-
|
|
638
|
+
i.displayName = t;
|
|
595
639
|
const l = e + "CollectionSlot", h = I.forwardRef(
|
|
596
640
|
(d, c) => {
|
|
597
|
-
const { scope: y, children: T } = d, p =
|
|
598
|
-
return /* @__PURE__ */ r(
|
|
641
|
+
const { scope: y, children: T } = d, p = s(l, y), k = _e(c, p.collectionRef);
|
|
642
|
+
return /* @__PURE__ */ r(be, { ref: k, children: T });
|
|
599
643
|
}
|
|
600
644
|
);
|
|
601
645
|
h.displayName = l;
|
|
602
646
|
const u = e + "CollectionItemSlot", m = "data-radix-collection-item", g = I.forwardRef(
|
|
603
647
|
(d, c) => {
|
|
604
|
-
const { scope: y, children: T, ...p } = d, k = I.useRef(null), E =
|
|
605
|
-
return I.useEffect(() => (
|
|
648
|
+
const { scope: y, children: T, ...p } = d, k = I.useRef(null), E = _e(c, k), x = s(u, y);
|
|
649
|
+
return I.useEffect(() => (x.itemMap.set(k, { ref: k, ...p }), () => void x.itemMap.delete(k))), /* @__PURE__ */ r(be, { [m]: "", ref: E, children: T });
|
|
606
650
|
}
|
|
607
651
|
);
|
|
608
652
|
g.displayName = u;
|
|
609
653
|
function b(d) {
|
|
610
|
-
const c =
|
|
654
|
+
const c = s(e + "CollectionConsumer", d);
|
|
611
655
|
return I.useCallback(() => {
|
|
612
656
|
const y = c.collectionRef.current;
|
|
613
657
|
if (!y) return [];
|
|
@@ -618,21 +662,21 @@ function Ho(e) {
|
|
|
618
662
|
}, [c.collectionRef, c.itemMap]);
|
|
619
663
|
}
|
|
620
664
|
return [
|
|
621
|
-
{ Provider:
|
|
665
|
+
{ Provider: i, Slot: h, ItemSlot: g },
|
|
622
666
|
b,
|
|
623
667
|
n
|
|
624
668
|
];
|
|
625
669
|
}
|
|
626
|
-
var
|
|
627
|
-
},
|
|
628
|
-
}),
|
|
629
|
-
function
|
|
630
|
-
const [t, o] = f.useState(
|
|
631
|
-
return
|
|
632
|
-
o((n) => n ?? String(
|
|
670
|
+
var Uo = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
|
|
671
|
+
}, jo = f.useId || (() => {
|
|
672
|
+
}), Ko = 0;
|
|
673
|
+
function Wo(e) {
|
|
674
|
+
const [t, o] = f.useState(jo());
|
|
675
|
+
return Uo(() => {
|
|
676
|
+
o((n) => n ?? String(Ko++));
|
|
633
677
|
}, [e]), t ? `radix-${t}` : "";
|
|
634
678
|
}
|
|
635
|
-
function
|
|
679
|
+
function Oe(e) {
|
|
636
680
|
const t = f.useRef(e);
|
|
637
681
|
return f.useEffect(() => {
|
|
638
682
|
t.current = e;
|
|
@@ -641,68 +685,68 @@ function Le(e) {
|
|
|
641
685
|
return (n = t.current) == null ? void 0 : n.call(t, ...o);
|
|
642
686
|
}, []);
|
|
643
687
|
}
|
|
644
|
-
function
|
|
688
|
+
function ye({
|
|
645
689
|
prop: e,
|
|
646
690
|
defaultProp: t,
|
|
647
691
|
onChange: o = () => {
|
|
648
692
|
}
|
|
649
693
|
}) {
|
|
650
|
-
const [n, a] =
|
|
694
|
+
const [n, a] = Yo({ defaultProp: t, onChange: o }), s = e !== void 0, i = s ? e : n, l = Oe(o), h = f.useCallback(
|
|
651
695
|
(u) => {
|
|
652
|
-
if (
|
|
696
|
+
if (s) {
|
|
653
697
|
const m = typeof u == "function" ? u(e) : u;
|
|
654
698
|
m !== e && l(m);
|
|
655
699
|
} else
|
|
656
700
|
a(u);
|
|
657
701
|
},
|
|
658
|
-
[
|
|
702
|
+
[s, e, a, l]
|
|
659
703
|
);
|
|
660
|
-
return [
|
|
704
|
+
return [i, h];
|
|
661
705
|
}
|
|
662
|
-
function
|
|
706
|
+
function Yo({
|
|
663
707
|
defaultProp: e,
|
|
664
708
|
onChange: t
|
|
665
709
|
}) {
|
|
666
|
-
const o = f.useState(e), [n] = o, a = f.useRef(n),
|
|
710
|
+
const o = f.useState(e), [n] = o, a = f.useRef(n), s = Oe(t);
|
|
667
711
|
return f.useEffect(() => {
|
|
668
|
-
a.current !== n && (
|
|
669
|
-
}, [n, a,
|
|
712
|
+
a.current !== n && (s(n), a.current = n);
|
|
713
|
+
}, [n, a, s]), o;
|
|
670
714
|
}
|
|
671
|
-
var
|
|
672
|
-
function
|
|
673
|
-
const t = f.useContext(
|
|
715
|
+
var Zo = f.createContext(void 0);
|
|
716
|
+
function dt(e) {
|
|
717
|
+
const t = f.useContext(Zo);
|
|
674
718
|
return e || t || "ltr";
|
|
675
719
|
}
|
|
676
|
-
var Ie = "rovingFocusGroup.onEntryFocus",
|
|
677
|
-
|
|
678
|
-
[
|
|
679
|
-
), [
|
|
680
|
-
(e, t) => /* @__PURE__ */ r(Re.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(Re.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(
|
|
720
|
+
var Ie = "rovingFocusGroup.onEntryFocus", qo = { bubbles: !1, cancelable: !0 }, ke = "RovingFocusGroup", [Re, ut, Xo] = Go(ke), [Jo, mt] = Le(
|
|
721
|
+
ke,
|
|
722
|
+
[Xo]
|
|
723
|
+
), [Qo, er] = Jo(ke), ht = f.forwardRef(
|
|
724
|
+
(e, t) => /* @__PURE__ */ r(Re.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(Re.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(tr, { ...e, ref: t }) }) })
|
|
681
725
|
);
|
|
682
|
-
|
|
683
|
-
var
|
|
726
|
+
ht.displayName = ke;
|
|
727
|
+
var tr = f.forwardRef((e, t) => {
|
|
684
728
|
const {
|
|
685
729
|
__scopeRovingFocusGroup: o,
|
|
686
730
|
orientation: n,
|
|
687
731
|
loop: a = !1,
|
|
688
|
-
dir:
|
|
689
|
-
currentTabStopId:
|
|
732
|
+
dir: s,
|
|
733
|
+
currentTabStopId: i,
|
|
690
734
|
defaultCurrentTabStopId: l,
|
|
691
735
|
onCurrentTabStopIdChange: h,
|
|
692
736
|
onEntryFocus: u,
|
|
693
737
|
preventScrollOnEntryFocus: m = !1,
|
|
694
738
|
...g
|
|
695
|
-
} = e, b = f.useRef(null), d =
|
|
696
|
-
prop:
|
|
739
|
+
} = e, b = f.useRef(null), d = _e(t, b), c = dt(s), [y = null, T] = ye({
|
|
740
|
+
prop: i,
|
|
697
741
|
defaultProp: l,
|
|
698
742
|
onChange: h
|
|
699
|
-
}), [p, k] = f.useState(!1), E =
|
|
743
|
+
}), [p, k] = f.useState(!1), E = Oe(u), x = ut(o), M = f.useRef(!1), [_, B] = f.useState(0);
|
|
700
744
|
return f.useEffect(() => {
|
|
701
745
|
const N = b.current;
|
|
702
746
|
if (N)
|
|
703
747
|
return N.addEventListener(Ie, E), () => N.removeEventListener(Ie, E);
|
|
704
748
|
}, [E]), /* @__PURE__ */ r(
|
|
705
|
-
|
|
749
|
+
Qo,
|
|
706
750
|
{
|
|
707
751
|
scope: o,
|
|
708
752
|
orientation: n,
|
|
@@ -715,51 +759,51 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
715
759
|
),
|
|
716
760
|
onItemShiftTab: f.useCallback(() => k(!0), []),
|
|
717
761
|
onFocusableItemAdd: f.useCallback(
|
|
718
|
-
() =>
|
|
762
|
+
() => B((N) => N + 1),
|
|
719
763
|
[]
|
|
720
764
|
),
|
|
721
765
|
onFocusableItemRemove: f.useCallback(
|
|
722
|
-
() =>
|
|
766
|
+
() => B((N) => N - 1),
|
|
723
767
|
[]
|
|
724
768
|
),
|
|
725
769
|
children: /* @__PURE__ */ r(
|
|
726
770
|
ue.div,
|
|
727
771
|
{
|
|
728
|
-
tabIndex: p ||
|
|
772
|
+
tabIndex: p || _ === 0 ? -1 : 0,
|
|
729
773
|
"data-orientation": n,
|
|
730
774
|
...g,
|
|
731
775
|
ref: d,
|
|
732
776
|
style: { outline: "none", ...e.style },
|
|
733
|
-
onMouseDown:
|
|
777
|
+
onMouseDown: Z(e.onMouseDown, () => {
|
|
734
778
|
M.current = !0;
|
|
735
779
|
}),
|
|
736
|
-
onFocus:
|
|
780
|
+
onFocus: Z(e.onFocus, (N) => {
|
|
737
781
|
const re = !M.current;
|
|
738
782
|
if (N.target === N.currentTarget && re && !p) {
|
|
739
|
-
const
|
|
740
|
-
if (N.currentTarget.dispatchEvent(
|
|
741
|
-
const j =
|
|
783
|
+
const J = new CustomEvent(Ie, qo);
|
|
784
|
+
if (N.currentTarget.dispatchEvent(J), !J.defaultPrevented) {
|
|
785
|
+
const j = x().filter((A) => A.focusable), ne = j.find((A) => A.active), L = j.find((A) => A.id === y), K = [ne, L, ...j].filter(
|
|
742
786
|
Boolean
|
|
743
787
|
).map((A) => A.ref.current);
|
|
744
|
-
|
|
788
|
+
ft(K, m);
|
|
745
789
|
}
|
|
746
790
|
}
|
|
747
791
|
M.current = !1;
|
|
748
792
|
}),
|
|
749
|
-
onBlur:
|
|
793
|
+
onBlur: Z(e.onBlur, () => k(!1))
|
|
750
794
|
}
|
|
751
795
|
)
|
|
752
796
|
}
|
|
753
797
|
);
|
|
754
|
-
}),
|
|
798
|
+
}), gt = "RovingFocusGroupItem", pt = f.forwardRef(
|
|
755
799
|
(e, t) => {
|
|
756
800
|
const {
|
|
757
801
|
__scopeRovingFocusGroup: o,
|
|
758
802
|
focusable: n = !0,
|
|
759
803
|
active: a = !1,
|
|
760
|
-
tabStopId:
|
|
761
|
-
...
|
|
762
|
-
} = e, l =
|
|
804
|
+
tabStopId: s,
|
|
805
|
+
...i
|
|
806
|
+
} = e, l = Wo(), h = s || l, u = er(gt, o), m = u.currentTabStopId === h, g = ut(o), { onFocusableItemAdd: b, onFocusableItemRemove: d } = u;
|
|
763
807
|
return f.useEffect(() => {
|
|
764
808
|
if (n)
|
|
765
809
|
return b(), () => d();
|
|
@@ -775,19 +819,19 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
775
819
|
{
|
|
776
820
|
tabIndex: m ? 0 : -1,
|
|
777
821
|
"data-orientation": u.orientation,
|
|
778
|
-
...
|
|
822
|
+
...i,
|
|
779
823
|
ref: t,
|
|
780
|
-
onMouseDown:
|
|
824
|
+
onMouseDown: Z(e.onMouseDown, (c) => {
|
|
781
825
|
n ? u.onItemFocus(h) : c.preventDefault();
|
|
782
826
|
}),
|
|
783
|
-
onFocus:
|
|
784
|
-
onKeyDown:
|
|
827
|
+
onFocus: Z(e.onFocus, () => u.onItemFocus(h)),
|
|
828
|
+
onKeyDown: Z(e.onKeyDown, (c) => {
|
|
785
829
|
if (c.key === "Tab" && c.shiftKey) {
|
|
786
830
|
u.onItemShiftTab();
|
|
787
831
|
return;
|
|
788
832
|
}
|
|
789
833
|
if (c.target !== c.currentTarget) return;
|
|
790
|
-
const y =
|
|
834
|
+
const y = nr(c, u.orientation, u.dir);
|
|
791
835
|
if (y !== void 0) {
|
|
792
836
|
if (c.metaKey || c.ctrlKey || c.altKey || c.shiftKey) return;
|
|
793
837
|
c.preventDefault();
|
|
@@ -796,9 +840,9 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
796
840
|
else if (y === "prev" || y === "next") {
|
|
797
841
|
y === "prev" && T.reverse();
|
|
798
842
|
const p = T.indexOf(c.currentTarget);
|
|
799
|
-
T = u.loop ?
|
|
843
|
+
T = u.loop ? ar(T, p + 1) : T.slice(p + 1);
|
|
800
844
|
}
|
|
801
|
-
setTimeout(() =>
|
|
845
|
+
setTimeout(() => ft(T));
|
|
802
846
|
}
|
|
803
847
|
})
|
|
804
848
|
}
|
|
@@ -807,8 +851,8 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
807
851
|
);
|
|
808
852
|
}
|
|
809
853
|
);
|
|
810
|
-
|
|
811
|
-
var
|
|
854
|
+
pt.displayName = gt;
|
|
855
|
+
var or = {
|
|
812
856
|
ArrowLeft: "prev",
|
|
813
857
|
ArrowUp: "prev",
|
|
814
858
|
ArrowRight: "next",
|
|
@@ -818,24 +862,24 @@ var er = {
|
|
|
818
862
|
PageDown: "last",
|
|
819
863
|
End: "last"
|
|
820
864
|
};
|
|
821
|
-
function
|
|
865
|
+
function rr(e, t) {
|
|
822
866
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
823
867
|
}
|
|
824
|
-
function
|
|
825
|
-
const n =
|
|
868
|
+
function nr(e, t, o) {
|
|
869
|
+
const n = rr(e.key, o);
|
|
826
870
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(n)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(n)))
|
|
827
|
-
return
|
|
871
|
+
return or[n];
|
|
828
872
|
}
|
|
829
|
-
function
|
|
873
|
+
function ft(e, t = !1) {
|
|
830
874
|
const o = document.activeElement;
|
|
831
875
|
for (const n of e)
|
|
832
876
|
if (n === o || (n.focus({ preventScroll: t }), document.activeElement !== o)) return;
|
|
833
877
|
}
|
|
834
|
-
function
|
|
878
|
+
function ar(e, t) {
|
|
835
879
|
return e.map((o, n) => e[(t + n) % e.length]);
|
|
836
880
|
}
|
|
837
|
-
var
|
|
838
|
-
const { pressed: o, defaultPressed: n = !1, onPressedChange: a, ...
|
|
881
|
+
var sr = ht, ir = pt, lr = "Toggle", bt = f.forwardRef((e, t) => {
|
|
882
|
+
const { pressed: o, defaultPressed: n = !1, onPressedChange: a, ...s } = e, [i = !1, l] = ye({
|
|
839
883
|
prop: o,
|
|
840
884
|
onChange: a,
|
|
841
885
|
defaultProp: n
|
|
@@ -844,60 +888,60 @@ var nr = gt, ar = ft, ir = "Toggle", vt = f.forwardRef((e, t) => {
|
|
|
844
888
|
ue.button,
|
|
845
889
|
{
|
|
846
890
|
type: "button",
|
|
847
|
-
"aria-pressed":
|
|
848
|
-
"data-state":
|
|
891
|
+
"aria-pressed": i,
|
|
892
|
+
"data-state": i ? "on" : "off",
|
|
849
893
|
"data-disabled": e.disabled ? "" : void 0,
|
|
850
|
-
...
|
|
894
|
+
...s,
|
|
851
895
|
ref: t,
|
|
852
|
-
onClick:
|
|
853
|
-
e.disabled || l(!
|
|
896
|
+
onClick: Z(e.onClick, () => {
|
|
897
|
+
e.disabled || l(!i);
|
|
854
898
|
})
|
|
855
899
|
}
|
|
856
900
|
);
|
|
857
901
|
});
|
|
858
|
-
|
|
859
|
-
var oe = "ToggleGroup", [
|
|
860
|
-
|
|
861
|
-
]),
|
|
902
|
+
bt.displayName = lr;
|
|
903
|
+
var oe = "ToggleGroup", [vt, En] = Le(oe, [
|
|
904
|
+
mt
|
|
905
|
+
]), yt = mt(), Pe = I.forwardRef((e, t) => {
|
|
862
906
|
const { type: o, ...n } = e;
|
|
863
907
|
if (o === "single")
|
|
864
|
-
return /* @__PURE__ */ r(
|
|
908
|
+
return /* @__PURE__ */ r(cr, { ...n, ref: t });
|
|
865
909
|
if (o === "multiple")
|
|
866
|
-
return /* @__PURE__ */ r(
|
|
910
|
+
return /* @__PURE__ */ r(dr, { ...n, ref: t });
|
|
867
911
|
throw new Error(`Missing prop \`type\` expected on \`${oe}\``);
|
|
868
912
|
});
|
|
869
|
-
|
|
870
|
-
var [
|
|
913
|
+
Pe.displayName = oe;
|
|
914
|
+
var [kt, Ct] = vt(oe), cr = I.forwardRef((e, t) => {
|
|
871
915
|
const {
|
|
872
916
|
value: o,
|
|
873
917
|
defaultValue: n,
|
|
874
918
|
onValueChange: a = () => {
|
|
875
919
|
},
|
|
876
|
-
...
|
|
877
|
-
} = e, [
|
|
920
|
+
...s
|
|
921
|
+
} = e, [i, l] = ye({
|
|
878
922
|
prop: o,
|
|
879
923
|
defaultProp: n,
|
|
880
924
|
onChange: a
|
|
881
925
|
});
|
|
882
926
|
return /* @__PURE__ */ r(
|
|
883
|
-
|
|
927
|
+
kt,
|
|
884
928
|
{
|
|
885
929
|
scope: e.__scopeToggleGroup,
|
|
886
930
|
type: "single",
|
|
887
|
-
value:
|
|
931
|
+
value: i ? [i] : [],
|
|
888
932
|
onItemActivate: l,
|
|
889
933
|
onItemDeactivate: I.useCallback(() => l(""), [l]),
|
|
890
|
-
children: /* @__PURE__ */ r(
|
|
934
|
+
children: /* @__PURE__ */ r(Tt, { ...s, ref: t })
|
|
891
935
|
}
|
|
892
936
|
);
|
|
893
|
-
}),
|
|
937
|
+
}), dr = I.forwardRef((e, t) => {
|
|
894
938
|
const {
|
|
895
939
|
value: o,
|
|
896
940
|
defaultValue: n,
|
|
897
941
|
onValueChange: a = () => {
|
|
898
942
|
},
|
|
899
|
-
...
|
|
900
|
-
} = e, [
|
|
943
|
+
...s
|
|
944
|
+
} = e, [i = [], l] = ye({
|
|
901
945
|
prop: o,
|
|
902
946
|
defaultProp: n,
|
|
903
947
|
onChange: a
|
|
@@ -909,79 +953,79 @@ var [Ct, Tt] = yt(oe), sr = I.forwardRef((e, t) => {
|
|
|
909
953
|
[l]
|
|
910
954
|
);
|
|
911
955
|
return /* @__PURE__ */ r(
|
|
912
|
-
|
|
956
|
+
kt,
|
|
913
957
|
{
|
|
914
958
|
scope: e.__scopeToggleGroup,
|
|
915
959
|
type: "multiple",
|
|
916
|
-
value:
|
|
960
|
+
value: i,
|
|
917
961
|
onItemActivate: h,
|
|
918
962
|
onItemDeactivate: u,
|
|
919
|
-
children: /* @__PURE__ */ r(
|
|
963
|
+
children: /* @__PURE__ */ r(Tt, { ...s, ref: t })
|
|
920
964
|
}
|
|
921
965
|
);
|
|
922
966
|
});
|
|
923
|
-
|
|
924
|
-
var [
|
|
967
|
+
Pe.displayName = oe;
|
|
968
|
+
var [ur, mr] = vt(oe), Tt = I.forwardRef(
|
|
925
969
|
(e, t) => {
|
|
926
970
|
const {
|
|
927
971
|
__scopeToggleGroup: o,
|
|
928
972
|
disabled: n = !1,
|
|
929
973
|
rovingFocus: a = !0,
|
|
930
|
-
orientation:
|
|
931
|
-
dir:
|
|
974
|
+
orientation: s,
|
|
975
|
+
dir: i,
|
|
932
976
|
loop: l = !0,
|
|
933
977
|
...h
|
|
934
|
-
} = e, u =
|
|
935
|
-
return /* @__PURE__ */ r(
|
|
936
|
-
|
|
978
|
+
} = e, u = yt(o), m = dt(i), g = { role: "group", dir: m, ...h };
|
|
979
|
+
return /* @__PURE__ */ r(ur, { scope: o, rovingFocus: a, disabled: n, children: a ? /* @__PURE__ */ r(
|
|
980
|
+
sr,
|
|
937
981
|
{
|
|
938
982
|
asChild: !0,
|
|
939
983
|
...u,
|
|
940
|
-
orientation:
|
|
984
|
+
orientation: s,
|
|
941
985
|
dir: m,
|
|
942
986
|
loop: l,
|
|
943
987
|
children: /* @__PURE__ */ r(ue.div, { ...g, ref: t })
|
|
944
988
|
}
|
|
945
989
|
) : /* @__PURE__ */ r(ue.div, { ...g, ref: t }) });
|
|
946
990
|
}
|
|
947
|
-
),
|
|
991
|
+
), ve = "ToggleGroupItem", wt = I.forwardRef(
|
|
948
992
|
(e, t) => {
|
|
949
|
-
const o =
|
|
993
|
+
const o = Ct(ve, e.__scopeToggleGroup), n = mr(ve, e.__scopeToggleGroup), a = yt(e.__scopeToggleGroup), s = o.value.includes(e.value), i = n.disabled || e.disabled, l = { ...e, pressed: s, disabled: i }, h = I.useRef(null);
|
|
950
994
|
return n.rovingFocus ? /* @__PURE__ */ r(
|
|
951
|
-
|
|
995
|
+
ir,
|
|
952
996
|
{
|
|
953
997
|
asChild: !0,
|
|
954
998
|
...a,
|
|
955
|
-
focusable: !
|
|
956
|
-
active:
|
|
999
|
+
focusable: !i,
|
|
1000
|
+
active: s,
|
|
957
1001
|
ref: h,
|
|
958
1002
|
children: /* @__PURE__ */ r(We, { ...l, ref: t })
|
|
959
1003
|
}
|
|
960
1004
|
) : /* @__PURE__ */ r(We, { ...l, ref: t });
|
|
961
1005
|
}
|
|
962
1006
|
);
|
|
963
|
-
|
|
1007
|
+
wt.displayName = ve;
|
|
964
1008
|
var We = I.forwardRef(
|
|
965
1009
|
(e, t) => {
|
|
966
|
-
const { __scopeToggleGroup: o, value: n, ...a } = e,
|
|
1010
|
+
const { __scopeToggleGroup: o, value: n, ...a } = e, s = Ct(ve, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, l = s.type === "single" ? i : void 0;
|
|
967
1011
|
return /* @__PURE__ */ r(
|
|
968
|
-
|
|
1012
|
+
bt,
|
|
969
1013
|
{
|
|
970
1014
|
...l,
|
|
971
1015
|
...a,
|
|
972
1016
|
ref: t,
|
|
973
1017
|
onPressedChange: (h) => {
|
|
974
|
-
h ?
|
|
1018
|
+
h ? s.onItemActivate(n) : s.onItemDeactivate(n);
|
|
975
1019
|
}
|
|
976
1020
|
}
|
|
977
1021
|
);
|
|
978
1022
|
}
|
|
979
|
-
),
|
|
980
|
-
const
|
|
1023
|
+
), hr = Pe, gr = wt;
|
|
1024
|
+
const Et = I.createContext({
|
|
981
1025
|
size: "medium",
|
|
982
1026
|
focusMode: "system",
|
|
983
1027
|
mode: "system"
|
|
984
|
-
}),
|
|
1028
|
+
}), pr = (e) => {
|
|
985
1029
|
let t = "";
|
|
986
1030
|
if (typeof e == "number" || typeof e == "string")
|
|
987
1031
|
t = "m-" + e;
|
|
@@ -990,22 +1034,22 @@ const Nt = I.createContext({
|
|
|
990
1034
|
(e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
|
|
991
1035
|
}
|
|
992
1036
|
return t;
|
|
993
|
-
},
|
|
1037
|
+
}, fr = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset", {
|
|
994
1038
|
"focus:outline-focus-light": e === "light",
|
|
995
1039
|
"focus:outline-focus-dark": e === "dark",
|
|
996
1040
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
997
1041
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
998
|
-
}),
|
|
1042
|
+
}), br = ({ mode: e }) => C({
|
|
999
1043
|
"data-[state=on]:bg-surface-medium": e === "dark",
|
|
1000
1044
|
"data-[state=on]:bg-surface-lightest": e === "light",
|
|
1001
1045
|
"data-[state=on]:bg-surface-lightest dark:data-[state=on]:bg-surface-medium": e === "system",
|
|
1002
1046
|
"data-[state=on]:bg-surface-medium dark:data-[state=on]:bg-surface-lightest": e === "alt-system"
|
|
1003
|
-
}),
|
|
1047
|
+
}), vr = ({ size: e }) => C({
|
|
1004
1048
|
"h-5 px-2": e === "small",
|
|
1005
1049
|
"h-6 px-3": e === "medium",
|
|
1006
1050
|
"h-7 px-4": e === "large"
|
|
1007
|
-
}),
|
|
1008
|
-
|
|
1051
|
+
}), yr = ({ mode: e }) => C(
|
|
1052
|
+
Oo,
|
|
1009
1053
|
"px-1",
|
|
1010
1054
|
"relative",
|
|
1011
1055
|
"border-r",
|
|
@@ -1018,27 +1062,27 @@ const Nt = I.createContext({
|
|
|
1018
1062
|
"border-surface-light dark:border-surface-darker": e === "system",
|
|
1019
1063
|
"border-surface-darker dark:border-surface-light": e === "alt-system"
|
|
1020
1064
|
}
|
|
1021
|
-
),
|
|
1065
|
+
), kr = ({
|
|
1022
1066
|
focusMode: e,
|
|
1023
1067
|
mode: t,
|
|
1024
1068
|
size: o
|
|
1025
1069
|
}) => ({
|
|
1026
|
-
wrapperClass:
|
|
1070
|
+
wrapperClass: yr({ mode: t }),
|
|
1027
1071
|
itemClass: C(
|
|
1028
|
-
|
|
1072
|
+
Po,
|
|
1029
1073
|
"flex items-center justify-center bg-transparent",
|
|
1030
1074
|
"rounded-sm",
|
|
1031
1075
|
"transition duration-200 ease",
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1076
|
+
vr({ size: o }),
|
|
1077
|
+
fr({ focusMode: e }),
|
|
1078
|
+
br({ mode: t })
|
|
1035
1079
|
)
|
|
1036
|
-
}),
|
|
1080
|
+
}), Cr = ({
|
|
1037
1081
|
mode: e,
|
|
1038
1082
|
spacing: t
|
|
1039
1083
|
}) => C(
|
|
1040
|
-
|
|
1041
|
-
|
|
1084
|
+
Lo,
|
|
1085
|
+
pr(t),
|
|
1042
1086
|
"inline-flex p-1",
|
|
1043
1087
|
"rounded-sm",
|
|
1044
1088
|
{
|
|
@@ -1047,21 +1091,21 @@ const Nt = I.createContext({
|
|
|
1047
1091
|
"bg-surface-light text-copy-dark dark:bg-surface-darker dark:text-copy-lighter": e === "system",
|
|
1048
1092
|
"bg-surface-darker text-copy-lighter dark:bg-surface-light dark:text-copy-dark": e === "alt-system"
|
|
1049
1093
|
}
|
|
1050
|
-
),
|
|
1094
|
+
), Tr = ({
|
|
1051
1095
|
children: e,
|
|
1052
1096
|
value: t,
|
|
1053
1097
|
onValueChange: o,
|
|
1054
1098
|
disabled: n,
|
|
1055
1099
|
mode: a = "system",
|
|
1056
|
-
focusMode:
|
|
1057
|
-
size:
|
|
1100
|
+
focusMode: s = "system",
|
|
1101
|
+
size: i = "medium",
|
|
1058
1102
|
defaultValue: l,
|
|
1059
1103
|
spacing: h,
|
|
1060
1104
|
...u
|
|
1061
1105
|
}) => {
|
|
1062
|
-
const m =
|
|
1063
|
-
return /* @__PURE__ */ r(
|
|
1064
|
-
|
|
1106
|
+
const m = Cr({ mode: a, spacing: h }), g = { size: i, focusMode: s, mode: a };
|
|
1107
|
+
return /* @__PURE__ */ r(Et.Provider, { value: g, children: /* @__PURE__ */ r(
|
|
1108
|
+
hr,
|
|
1065
1109
|
{
|
|
1066
1110
|
disabled: n,
|
|
1067
1111
|
className: m,
|
|
@@ -1073,36 +1117,36 @@ const Nt = I.createContext({
|
|
|
1073
1117
|
children: e
|
|
1074
1118
|
}
|
|
1075
1119
|
) });
|
|
1076
|
-
},
|
|
1077
|
-
const { size: o, focusMode: n, mode: a } =
|
|
1120
|
+
}, wr = ({ value: e, disabled: t }) => {
|
|
1121
|
+
const { size: o, focusMode: n, mode: a } = V(Et), { itemClass: s, wrapperClass: i } = kr({
|
|
1078
1122
|
focusMode: n,
|
|
1079
1123
|
mode: a,
|
|
1080
1124
|
size: o
|
|
1081
1125
|
});
|
|
1082
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1083
|
-
|
|
1126
|
+
return /* @__PURE__ */ r("div", { className: i, children: /* @__PURE__ */ r(
|
|
1127
|
+
gr,
|
|
1084
1128
|
{
|
|
1085
1129
|
disabled: t,
|
|
1086
|
-
className:
|
|
1130
|
+
className: s,
|
|
1087
1131
|
value: e,
|
|
1088
1132
|
children: e
|
|
1089
1133
|
}
|
|
1090
1134
|
) });
|
|
1091
1135
|
};
|
|
1092
1136
|
/*!
|
|
1093
|
-
@versini/ui-panel v1.0.
|
|
1137
|
+
@versini/ui-panel v1.0.14
|
|
1094
1138
|
© 2024 gizmette.com
|
|
1095
1139
|
*/
|
|
1096
1140
|
try {
|
|
1097
1141
|
window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
|
|
1098
|
-
version: "1.0.
|
|
1099
|
-
buildTime: "10/
|
|
1142
|
+
version: "1.0.14",
|
|
1143
|
+
buildTime: "10/06/2024 10:49 AM EDT",
|
|
1100
1144
|
homepage: "https://github.com/aversini/ui-components",
|
|
1101
1145
|
license: "MIT"
|
|
1102
1146
|
});
|
|
1103
1147
|
} catch {
|
|
1104
1148
|
}
|
|
1105
|
-
const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button",
|
|
1149
|
+
const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Er = (e) => {
|
|
1106
1150
|
let t = "";
|
|
1107
1151
|
if (typeof e == "number" || typeof e == "string")
|
|
1108
1152
|
t = "m-" + e;
|
|
@@ -1111,28 +1155,28 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Tr = (e) => {
|
|
|
1111
1155
|
(e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
|
|
1112
1156
|
}
|
|
1113
1157
|
return t;
|
|
1114
|
-
},
|
|
1158
|
+
}, Be = "icon", Nr = "button", Ir = "link", xr = ({
|
|
1115
1159
|
type: e,
|
|
1116
1160
|
size: t,
|
|
1117
1161
|
labelRight: o,
|
|
1118
1162
|
labelLeft: n,
|
|
1119
1163
|
align: a
|
|
1120
1164
|
}) => {
|
|
1121
|
-
const
|
|
1165
|
+
const s = "text-sm font-medium max-h-8 py-0", i = "text-base font-medium max-h-9 py-1", l = "text-lg font-medium max-h-12 py-2";
|
|
1122
1166
|
switch (e) {
|
|
1123
|
-
case
|
|
1167
|
+
case Nr:
|
|
1124
1168
|
return C("px-4", {
|
|
1125
|
-
[
|
|
1126
|
-
[
|
|
1169
|
+
[s]: t === "small",
|
|
1170
|
+
[i]: t === "medium",
|
|
1127
1171
|
[l]: t === "large"
|
|
1128
1172
|
});
|
|
1129
|
-
case
|
|
1173
|
+
case Ir:
|
|
1130
1174
|
return C("px-4 text-center", {
|
|
1131
|
-
[
|
|
1132
|
-
[
|
|
1175
|
+
[s]: t === "small",
|
|
1176
|
+
[i]: t === "medium",
|
|
1133
1177
|
[l]: t === "large"
|
|
1134
1178
|
});
|
|
1135
|
-
case
|
|
1179
|
+
case Be:
|
|
1136
1180
|
return C("inline-flex items-center", {
|
|
1137
1181
|
"justify-center": a === "center",
|
|
1138
1182
|
"justify-start": a === "left",
|
|
@@ -1145,7 +1189,7 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Tr = (e) => {
|
|
|
1145
1189
|
"h-12 px-4 text-lg font-medium": t === "large" && (o || n)
|
|
1146
1190
|
});
|
|
1147
1191
|
}
|
|
1148
|
-
},
|
|
1192
|
+
}, Sr = ({
|
|
1149
1193
|
mode: e,
|
|
1150
1194
|
noBackground: t,
|
|
1151
1195
|
noTruncate: o,
|
|
@@ -1177,7 +1221,7 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Tr = (e) => {
|
|
|
1177
1221
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
1178
1222
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
1179
1223
|
});
|
|
1180
|
-
},
|
|
1224
|
+
}, _r = ({
|
|
1181
1225
|
mode: e,
|
|
1182
1226
|
disabled: t,
|
|
1183
1227
|
variant: o
|
|
@@ -1205,7 +1249,7 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Tr = (e) => {
|
|
|
1205
1249
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
1206
1250
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
1207
1251
|
});
|
|
1208
|
-
},
|
|
1252
|
+
}, Ar = ({
|
|
1209
1253
|
mode: e,
|
|
1210
1254
|
disabled: t,
|
|
1211
1255
|
variant: o
|
|
@@ -1233,7 +1277,7 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Tr = (e) => {
|
|
|
1233
1277
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
1234
1278
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
1235
1279
|
});
|
|
1236
|
-
},
|
|
1280
|
+
}, Rr = ({
|
|
1237
1281
|
mode: e,
|
|
1238
1282
|
noBorder: t,
|
|
1239
1283
|
variant: o
|
|
@@ -1261,19 +1305,19 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Tr = (e) => {
|
|
|
1261
1305
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
1262
1306
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
1263
1307
|
});
|
|
1264
|
-
},
|
|
1308
|
+
}, Mr = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
1265
1309
|
"focus:outline-focus-dark": e === "dark",
|
|
1266
1310
|
"focus:outline-focus-light": e === "light",
|
|
1267
1311
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1268
1312
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1269
|
-
}),
|
|
1313
|
+
}), Nt = ({
|
|
1270
1314
|
type: e,
|
|
1271
1315
|
className: t,
|
|
1272
1316
|
raw: o,
|
|
1273
1317
|
mode: n,
|
|
1274
1318
|
focusMode: a,
|
|
1275
|
-
disabled:
|
|
1276
|
-
fullWidth:
|
|
1319
|
+
disabled: s,
|
|
1320
|
+
fullWidth: i,
|
|
1277
1321
|
size: l,
|
|
1278
1322
|
noBorder: h,
|
|
1279
1323
|
labelRight: u,
|
|
@@ -1286,18 +1330,18 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Tr = (e) => {
|
|
|
1286
1330
|
}) => (d || (d = "primary"), o ? C(qe, t) : C(
|
|
1287
1331
|
qe,
|
|
1288
1332
|
t,
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1333
|
+
Er(g),
|
|
1334
|
+
Sr({ mode: n, variant: d, noBackground: b, noTruncate: c }),
|
|
1335
|
+
xr({ type: e, size: l, labelRight: u, labelLeft: m, align: y }),
|
|
1336
|
+
Rr({ mode: n, variant: d, noBorder: h }),
|
|
1337
|
+
Mr({ focusMode: a }),
|
|
1338
|
+
_r({ mode: n, variant: d, disabled: s }),
|
|
1339
|
+
Ar({ mode: n, variant: d, disabled: s }),
|
|
1296
1340
|
{
|
|
1297
|
-
"w-full":
|
|
1298
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
|
1341
|
+
"w-full": i,
|
|
1342
|
+
"disabled:cursor-not-allowed disabled:opacity-50": s
|
|
1299
1343
|
}
|
|
1300
|
-
)),
|
|
1344
|
+
)), Lr = (e, t, o) => {
|
|
1301
1345
|
var n;
|
|
1302
1346
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((n = e == null ? void 0 : e.currentTarget) == null ? void 0 : n.focus) == "function" && e.currentTarget.focus(), typeof o == "function" && o(e);
|
|
1303
1347
|
}, De = I.forwardRef((e, t) => {
|
|
@@ -1306,23 +1350,23 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Tr = (e) => {
|
|
|
1306
1350
|
"button",
|
|
1307
1351
|
{
|
|
1308
1352
|
ref: t,
|
|
1309
|
-
onClick: (
|
|
1310
|
-
|
|
1353
|
+
onClick: (s) => {
|
|
1354
|
+
Lr(s, n, o);
|
|
1311
1355
|
},
|
|
1312
1356
|
...a
|
|
1313
1357
|
}
|
|
1314
1358
|
);
|
|
1315
1359
|
});
|
|
1316
1360
|
De.displayName = "BaseButton";
|
|
1317
|
-
const
|
|
1361
|
+
const It = I.forwardRef(
|
|
1318
1362
|
({
|
|
1319
1363
|
children: e,
|
|
1320
1364
|
disabled: t = !1,
|
|
1321
1365
|
mode: o = "system",
|
|
1322
1366
|
focusMode: n = "system",
|
|
1323
1367
|
fullWidth: a = !1,
|
|
1324
|
-
className:
|
|
1325
|
-
type:
|
|
1368
|
+
className: s,
|
|
1369
|
+
type: i = "button",
|
|
1326
1370
|
raw: l = !1,
|
|
1327
1371
|
noBorder: h = !1,
|
|
1328
1372
|
"aria-label": u,
|
|
@@ -1335,14 +1379,14 @@ const St = I.forwardRef(
|
|
|
1335
1379
|
align: T = "center",
|
|
1336
1380
|
...p
|
|
1337
1381
|
}, k) => {
|
|
1338
|
-
const E =
|
|
1339
|
-
type:
|
|
1382
|
+
const E = Nt({
|
|
1383
|
+
type: Be,
|
|
1340
1384
|
mode: o,
|
|
1341
1385
|
focusMode: n,
|
|
1342
1386
|
fullWidth: a,
|
|
1343
1387
|
disabled: t,
|
|
1344
1388
|
raw: l,
|
|
1345
|
-
className:
|
|
1389
|
+
className: s,
|
|
1346
1390
|
noBorder: h,
|
|
1347
1391
|
size: g,
|
|
1348
1392
|
labelRight: b,
|
|
@@ -1350,7 +1394,7 @@ const St = I.forwardRef(
|
|
|
1350
1394
|
spacing: c,
|
|
1351
1395
|
noBackground: y,
|
|
1352
1396
|
align: T
|
|
1353
|
-
}),
|
|
1397
|
+
}), x = C({
|
|
1354
1398
|
"text-copy-accent-dark": o === "light" && !l,
|
|
1355
1399
|
"text-copy-light": o === "dark" && !l,
|
|
1356
1400
|
"text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !l,
|
|
@@ -1362,19 +1406,19 @@ const St = I.forwardRef(
|
|
|
1362
1406
|
ref: k,
|
|
1363
1407
|
className: E,
|
|
1364
1408
|
disabled: t,
|
|
1365
|
-
type:
|
|
1409
|
+
type: i,
|
|
1366
1410
|
"aria-label": u || m,
|
|
1367
1411
|
...p,
|
|
1368
1412
|
children: [
|
|
1369
1413
|
d && /* @__PURE__ */ r("span", { className: "pr-2", children: d }),
|
|
1370
|
-
/* @__PURE__ */ r("div", { className:
|
|
1414
|
+
/* @__PURE__ */ r("div", { className: x, children: e }),
|
|
1371
1415
|
b && /* @__PURE__ */ r("span", { className: "pl-2", children: b })
|
|
1372
1416
|
]
|
|
1373
1417
|
}
|
|
1374
1418
|
);
|
|
1375
1419
|
}
|
|
1376
1420
|
);
|
|
1377
|
-
|
|
1421
|
+
It.displayName = "ButtonIcon";
|
|
1378
1422
|
/*!
|
|
1379
1423
|
@versini/ui-button v1.1.10
|
|
1380
1424
|
© 2024 gizmette.com
|
|
@@ -1382,21 +1426,21 @@ St.displayName = "ButtonIcon";
|
|
|
1382
1426
|
try {
|
|
1383
1427
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
1384
1428
|
version: "1.1.10",
|
|
1385
|
-
buildTime: "10/
|
|
1429
|
+
buildTime: "10/06/2024 10:49 AM EDT",
|
|
1386
1430
|
homepage: "https://github.com/aversini/ui-components",
|
|
1387
1431
|
license: "MIT"
|
|
1388
1432
|
});
|
|
1389
1433
|
} catch {
|
|
1390
1434
|
}
|
|
1391
|
-
const
|
|
1435
|
+
const Or = I.forwardRef(
|
|
1392
1436
|
({
|
|
1393
1437
|
children: e,
|
|
1394
1438
|
disabled: t = !1,
|
|
1395
1439
|
mode: o = "system",
|
|
1396
1440
|
focusMode: n = "system",
|
|
1397
1441
|
fullWidth: a = !1,
|
|
1398
|
-
className:
|
|
1399
|
-
type:
|
|
1442
|
+
className: s,
|
|
1443
|
+
type: i = "button",
|
|
1400
1444
|
raw: l = !1,
|
|
1401
1445
|
noBorder: h = !1,
|
|
1402
1446
|
"aria-label": u,
|
|
@@ -1410,14 +1454,14 @@ const Mr = I.forwardRef(
|
|
|
1410
1454
|
active: p = !1,
|
|
1411
1455
|
...k
|
|
1412
1456
|
}, E) => {
|
|
1413
|
-
const
|
|
1414
|
-
type:
|
|
1457
|
+
const x = Nt({
|
|
1458
|
+
type: Be,
|
|
1415
1459
|
mode: o,
|
|
1416
1460
|
focusMode: n,
|
|
1417
1461
|
fullWidth: a,
|
|
1418
1462
|
disabled: t,
|
|
1419
1463
|
raw: l,
|
|
1420
|
-
className:
|
|
1464
|
+
className: s,
|
|
1421
1465
|
noBorder: h,
|
|
1422
1466
|
size: g,
|
|
1423
1467
|
labelRight: b,
|
|
@@ -1430,7 +1474,7 @@ const Mr = I.forwardRef(
|
|
|
1430
1474
|
"text-copy-light": o === "dark" && !l,
|
|
1431
1475
|
"text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !l,
|
|
1432
1476
|
"text-copy-light dark:text-copy-accent-dark": o === "system" && !l
|
|
1433
|
-
}),
|
|
1477
|
+
}), _ = p ? C(
|
|
1434
1478
|
"relative",
|
|
1435
1479
|
"focus-within:static",
|
|
1436
1480
|
"focus-within:after:border-transparent",
|
|
@@ -1447,13 +1491,13 @@ const Mr = I.forwardRef(
|
|
|
1447
1491
|
"after:border-table-light dark:after:border-table-dark": o === "alt-system"
|
|
1448
1492
|
}
|
|
1449
1493
|
) : "";
|
|
1450
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1494
|
+
return /* @__PURE__ */ r("div", { className: _, children: /* @__PURE__ */ v(
|
|
1451
1495
|
De,
|
|
1452
1496
|
{
|
|
1453
1497
|
ref: E,
|
|
1454
|
-
className:
|
|
1498
|
+
className: x,
|
|
1455
1499
|
disabled: t,
|
|
1456
|
-
type:
|
|
1500
|
+
type: i,
|
|
1457
1501
|
"aria-label": u || m,
|
|
1458
1502
|
...k,
|
|
1459
1503
|
children: [
|
|
@@ -1465,8 +1509,8 @@ const Mr = I.forwardRef(
|
|
|
1465
1509
|
) });
|
|
1466
1510
|
}
|
|
1467
1511
|
);
|
|
1468
|
-
|
|
1469
|
-
const
|
|
1512
|
+
Or.displayName = "ButtonSort";
|
|
1513
|
+
const Pr = (e) => {
|
|
1470
1514
|
let t = "";
|
|
1471
1515
|
if (typeof e == "number" || typeof e == "string")
|
|
1472
1516
|
t = "m-" + e;
|
|
@@ -1475,23 +1519,23 @@ const Lr = (e) => {
|
|
|
1475
1519
|
(e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
|
|
1476
1520
|
}
|
|
1477
1521
|
return t;
|
|
1478
|
-
},
|
|
1522
|
+
}, Br = ({
|
|
1479
1523
|
children: e,
|
|
1480
1524
|
fill: t,
|
|
1481
1525
|
viewBox: o,
|
|
1482
1526
|
className: n,
|
|
1483
1527
|
defaultViewBox: a,
|
|
1484
|
-
defaultClassName:
|
|
1485
|
-
spacing:
|
|
1528
|
+
defaultClassName: s,
|
|
1529
|
+
spacing: i,
|
|
1486
1530
|
title: l,
|
|
1487
1531
|
semantic: h = !1,
|
|
1488
1532
|
...u
|
|
1489
1533
|
}) => {
|
|
1490
|
-
const m =
|
|
1534
|
+
const m = Pr(i), g = C(
|
|
1491
1535
|
m,
|
|
1492
|
-
n ||
|
|
1536
|
+
n || s
|
|
1493
1537
|
);
|
|
1494
|
-
return /* @__PURE__ */ v(
|
|
1538
|
+
return /* @__PURE__ */ v(R, { children: [
|
|
1495
1539
|
/* @__PURE__ */ r(
|
|
1496
1540
|
"svg",
|
|
1497
1541
|
{
|
|
@@ -1516,21 +1560,21 @@ const Lr = (e) => {
|
|
|
1516
1560
|
try {
|
|
1517
1561
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
1518
1562
|
version: "1.4.17",
|
|
1519
|
-
buildTime: "10/
|
|
1563
|
+
buildTime: "10/06/2024 10:48 AM EDT",
|
|
1520
1564
|
homepage: "https://github.com/aversini/ui-components",
|
|
1521
1565
|
license: "MIT"
|
|
1522
1566
|
});
|
|
1523
1567
|
} catch {
|
|
1524
1568
|
}
|
|
1525
|
-
const
|
|
1569
|
+
const Dr = ({
|
|
1526
1570
|
className: e,
|
|
1527
1571
|
viewBox: t,
|
|
1528
1572
|
spacing: o,
|
|
1529
1573
|
title: n,
|
|
1530
1574
|
monotone: a,
|
|
1531
|
-
...
|
|
1575
|
+
...s
|
|
1532
1576
|
}) => /* @__PURE__ */ r(
|
|
1533
|
-
|
|
1577
|
+
Br,
|
|
1534
1578
|
{
|
|
1535
1579
|
defaultViewBox: "0 0 384 512",
|
|
1536
1580
|
defaultClassName: "size-5",
|
|
@@ -1538,36 +1582,36 @@ const Pr = ({
|
|
|
1538
1582
|
className: e,
|
|
1539
1583
|
spacing: o,
|
|
1540
1584
|
title: n || "Close",
|
|
1541
|
-
...
|
|
1585
|
+
...s,
|
|
1542
1586
|
children: /* @__PURE__ */ r("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
|
|
1543
1587
|
}
|
|
1544
1588
|
);
|
|
1545
1589
|
/*!
|
|
1546
|
-
@versini/ui-icons v1.
|
|
1590
|
+
@versini/ui-icons v1.15.1
|
|
1547
1591
|
© 2024 gizmette.com
|
|
1548
1592
|
*/
|
|
1549
1593
|
try {
|
|
1550
1594
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
1551
|
-
version: "1.
|
|
1552
|
-
buildTime: "10/
|
|
1595
|
+
version: "1.15.1",
|
|
1596
|
+
buildTime: "10/06/2024 10:49 AM EDT",
|
|
1553
1597
|
homepage: "https://github.com/aversini/ui-components",
|
|
1554
1598
|
license: "MIT"
|
|
1555
1599
|
});
|
|
1556
1600
|
} catch {
|
|
1557
1601
|
}
|
|
1558
|
-
const
|
|
1602
|
+
const se = "panel", ge = "messagebox", Vr = ({
|
|
1559
1603
|
className: e,
|
|
1560
1604
|
kind: t,
|
|
1561
1605
|
borderMode: o
|
|
1562
1606
|
}) => ({
|
|
1563
1607
|
main: C("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
1564
|
-
[`${Ze} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t ===
|
|
1565
|
-
[`${Ze} w-full sm:w-[95%] md:max-w-2xl`]: t ===
|
|
1608
|
+
[`${Ze} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === se,
|
|
1609
|
+
[`${Ze} w-full sm:w-[95%] md:max-w-2xl`]: t === se && !e,
|
|
1566
1610
|
[`${Ye} rounded-lg border-2`]: t === ge,
|
|
1567
1611
|
[`${Ye} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === ge && !e,
|
|
1568
1612
|
[`${e}`]: !!e,
|
|
1569
|
-
"sm:border-border-dark": o === "dark" && t ===
|
|
1570
|
-
"sm:border-border-accent": o === "light" && t ===
|
|
1613
|
+
"sm:border-border-dark": o === "dark" && t === se,
|
|
1614
|
+
"sm:border-border-accent": o === "light" && t === se,
|
|
1571
1615
|
"border-border-dark": o === "dark" && t === ge,
|
|
1572
1616
|
"border-border-accent": o === "light" && t === ge
|
|
1573
1617
|
}),
|
|
@@ -1575,118 +1619,118 @@ const ie = "panel", ge = "messagebox", Dr = ({
|
|
|
1575
1619
|
footer: "flex flex-grow flex-col sm:p-4 p-2",
|
|
1576
1620
|
header: "sm:p-4 mb-0 p-2",
|
|
1577
1621
|
close: "sm:p-4 p-2"
|
|
1578
|
-
}), he = (e) =>
|
|
1579
|
-
() => import("./index.
|
|
1622
|
+
}), he = (e) => oo(
|
|
1623
|
+
() => import("./index.D5p6GpnU.C8lskEhG.js").then((t) => ({
|
|
1580
1624
|
default: t[e]
|
|
1581
1625
|
}))
|
|
1582
|
-
),
|
|
1626
|
+
), zr = he("Modal"), $r = he("ModalClose"), Hr = he("ModalContent"), Fr = he("ModalDescription"), Gr = he("ModalHeading"), X = ({
|
|
1583
1627
|
open: e,
|
|
1584
1628
|
onOpenChange: t,
|
|
1585
1629
|
title: o,
|
|
1586
1630
|
children: n,
|
|
1587
1631
|
footer: a,
|
|
1588
|
-
borderMode:
|
|
1589
|
-
kind:
|
|
1632
|
+
borderMode: s = "light",
|
|
1633
|
+
kind: i = se,
|
|
1590
1634
|
className: l
|
|
1591
1635
|
}) => {
|
|
1592
|
-
const h = ce(""), u =
|
|
1636
|
+
const h = ce(""), u = Vr({ className: l, kind: i, borderMode: s });
|
|
1593
1637
|
return U(() => (e && (h.current = document.title, document.title = `${o} | ${h.current}`), () => {
|
|
1594
1638
|
e && (document.title = h.current);
|
|
1595
|
-
}), [o, e]), /* @__PURE__ */ r(
|
|
1639
|
+
}), [o, e]), /* @__PURE__ */ r(to, { fallback: /* @__PURE__ */ r("div", {}), children: e && /* @__PURE__ */ r(zr, { open: e, onOpenChange: t, children: /* @__PURE__ */ v(Hr, { className: u.main, children: [
|
|
1596
1640
|
/* @__PURE__ */ v("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
1597
1641
|
/* @__PURE__ */ r(
|
|
1598
1642
|
$r,
|
|
1599
1643
|
{
|
|
1600
1644
|
className: u.close,
|
|
1601
1645
|
trigger: /* @__PURE__ */ r(
|
|
1602
|
-
|
|
1646
|
+
It,
|
|
1603
1647
|
{
|
|
1604
1648
|
mode: "dark",
|
|
1605
1649
|
focusMode: "light",
|
|
1606
1650
|
noBorder: !0,
|
|
1607
1651
|
label: "Close",
|
|
1608
|
-
children: /* @__PURE__ */ r(
|
|
1652
|
+
children: /* @__PURE__ */ r(Dr, {})
|
|
1609
1653
|
}
|
|
1610
1654
|
)
|
|
1611
1655
|
}
|
|
1612
1656
|
),
|
|
1613
|
-
/* @__PURE__ */ r(
|
|
1657
|
+
/* @__PURE__ */ r(Gr, { className: u.header, children: o })
|
|
1614
1658
|
] }),
|
|
1615
|
-
/* @__PURE__ */ r(
|
|
1659
|
+
/* @__PURE__ */ r(Fr, { className: u.content, children: n }),
|
|
1616
1660
|
a && /* @__PURE__ */ r("div", { className: u.footer, children: a })
|
|
1617
1661
|
] }) }) });
|
|
1618
|
-
},
|
|
1619
|
-
const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", n = (e == null ? void 0 : e.models) || [], a = de(),
|
|
1620
|
-
return /* @__PURE__ */ v(
|
|
1662
|
+
}, Ur = ({ stats: e }) => {
|
|
1663
|
+
const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", n = (e == null ? void 0 : e.models) || [], a = de(), s = de();
|
|
1664
|
+
return /* @__PURE__ */ v(R, { children: [
|
|
1621
1665
|
/* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
|
|
1622
|
-
|
|
1666
|
+
P,
|
|
1623
1667
|
{
|
|
1624
1668
|
header: w.ABOUT.TITLE_CLIENT,
|
|
1625
1669
|
className: "prose-dark dark:prose-lighter",
|
|
1626
1670
|
children: le(a, {
|
|
1627
|
-
[w.ABOUT.VERSION]: "5.
|
|
1628
|
-
[w.ABOUT.BUILD_TIMESTAMP]: "10/
|
|
1671
|
+
[w.ABOUT.VERSION]: "5.3.0",
|
|
1672
|
+
[w.ABOUT.BUILD_TIMESTAMP]: "10/06/2024 12:29 PM EDT"
|
|
1629
1673
|
})
|
|
1630
1674
|
}
|
|
1631
1675
|
) }),
|
|
1632
1676
|
/* @__PURE__ */ r(
|
|
1633
|
-
|
|
1677
|
+
P,
|
|
1634
1678
|
{
|
|
1635
1679
|
header: w.ABOUT.TITLE_SERVER,
|
|
1636
1680
|
className: "prose-dark dark:prose-lighter",
|
|
1637
|
-
children: le(
|
|
1681
|
+
children: le(s, {
|
|
1638
1682
|
[w.ABOUT.VERSION]: o,
|
|
1639
|
-
[
|
|
1640
|
-
[
|
|
1683
|
+
[fe(w.ABOUT.ENGINE, n.length)]: /* @__PURE__ */ r(R, { children: n.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) }),
|
|
1684
|
+
[fe(w.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ r(R, { children: t.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) })
|
|
1641
1685
|
})
|
|
1642
1686
|
}
|
|
1643
1687
|
)
|
|
1644
1688
|
] });
|
|
1645
|
-
},
|
|
1689
|
+
}, jr = ({
|
|
1646
1690
|
open: e,
|
|
1647
1691
|
onOpenChange: t
|
|
1648
1692
|
}) => {
|
|
1649
|
-
const { serverStats: o } =
|
|
1650
|
-
return /* @__PURE__ */ r(
|
|
1651
|
-
},
|
|
1693
|
+
const { serverStats: o } = V(me);
|
|
1694
|
+
return /* @__PURE__ */ r(X, { open: e, onOpenChange: t, title: Rt, children: /* @__PURE__ */ r(Ur, { stats: o }) });
|
|
1695
|
+
}, Kr = (e) => Qe(e), Wr = (e) => {
|
|
1652
1696
|
if (!e || e.length === 0)
|
|
1653
|
-
return
|
|
1697
|
+
return Lt;
|
|
1654
1698
|
const t = e.filter(
|
|
1655
1699
|
(o) => {
|
|
1656
1700
|
var n, a;
|
|
1657
|
-
return ((n = o == null ? void 0 : o.message) == null ? void 0 : n.role) ===
|
|
1701
|
+
return ((n = o == null ? void 0 : o.message) == null ? void 0 : n.role) === Ot && typeof ((a = o == null ? void 0 : o.message) == null ? void 0 : a.processingTime) == "number";
|
|
1658
1702
|
}
|
|
1659
1703
|
).map((o) => o.message.processingTime);
|
|
1660
|
-
return
|
|
1704
|
+
return Pt({
|
|
1661
1705
|
data: t,
|
|
1662
|
-
formatter:
|
|
1706
|
+
formatter: Kr
|
|
1663
1707
|
});
|
|
1664
|
-
},
|
|
1708
|
+
}, Yr = ({
|
|
1665
1709
|
isAuthenticated: e,
|
|
1666
1710
|
stats: t
|
|
1667
1711
|
}) => {
|
|
1668
|
-
const { state: o } =
|
|
1669
|
-
return e ? /* @__PURE__ */ v(
|
|
1712
|
+
const { state: o } = V(me), n = Bt - Number(o == null ? void 0 : o.usage), a = de(), s = de();
|
|
1713
|
+
return e ? /* @__PURE__ */ v(R, { children: [
|
|
1670
1714
|
o && o.messages.length > 0 && /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
|
|
1671
|
-
|
|
1715
|
+
P,
|
|
1672
1716
|
{
|
|
1673
1717
|
header: w.CURRENT_STATISTICS.TITLE,
|
|
1674
1718
|
className: "prose-dark dark:prose-lighter",
|
|
1675
1719
|
children: le(a, {
|
|
1676
|
-
[w.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) ||
|
|
1720
|
+
[w.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) || ie,
|
|
1677
1721
|
[w.CURRENT_STATISTICS.TOKENS_USED]: o == null ? void 0 : o.usage,
|
|
1678
|
-
[w.CURRENT_STATISTICS.REMAINING_TOKENS]:
|
|
1679
|
-
[w.CURRENT_STATISTICS.PROCESSING_TIME]:
|
|
1722
|
+
[w.CURRENT_STATISTICS.REMAINING_TOKENS]: Mt.format(n),
|
|
1723
|
+
[w.CURRENT_STATISTICS.PROCESSING_TIME]: Wr(o == null ? void 0 : o.messages)
|
|
1680
1724
|
})
|
|
1681
1725
|
}
|
|
1682
1726
|
) }),
|
|
1683
1727
|
/* @__PURE__ */ r(
|
|
1684
|
-
|
|
1728
|
+
P,
|
|
1685
1729
|
{
|
|
1686
1730
|
header: w.MAIN_STATISTICS.TITLE,
|
|
1687
1731
|
className: "prose-dark dark:prose-lighter",
|
|
1688
|
-
children: le(
|
|
1689
|
-
[
|
|
1732
|
+
children: le(s, {
|
|
1733
|
+
[fe(w.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
|
|
1690
1734
|
[w.MAIN_STATISTICS.PROCESSING_TIME]: Qe(
|
|
1691
1735
|
t.averageProcessingTimes
|
|
1692
1736
|
)
|
|
@@ -1694,29 +1738,29 @@ const ie = "panel", ge = "messagebox", Dr = ({
|
|
|
1694
1738
|
}
|
|
1695
1739
|
)
|
|
1696
1740
|
] }) : null;
|
|
1697
|
-
},
|
|
1741
|
+
}, Zr = ({
|
|
1698
1742
|
open: e,
|
|
1699
1743
|
onOpenChange: t
|
|
1700
1744
|
}) => {
|
|
1701
|
-
const [o, n] =
|
|
1745
|
+
const [o, n] = S({
|
|
1702
1746
|
averageProcessingTimes: 0,
|
|
1703
1747
|
totalChats: 0
|
|
1704
|
-
}), { isAuthenticated: a, getAccessToken:
|
|
1748
|
+
}), { isAuthenticated: a, getAccessToken: s, user: i } = te();
|
|
1705
1749
|
return U(() => {
|
|
1706
|
-
!e || !
|
|
1750
|
+
!e || !i || (async () => {
|
|
1707
1751
|
try {
|
|
1708
1752
|
const l = await H({
|
|
1709
|
-
accessToken: await
|
|
1753
|
+
accessToken: await s(),
|
|
1710
1754
|
type: F.GET_CHATS_STATS,
|
|
1711
1755
|
params: {
|
|
1712
|
-
userId:
|
|
1756
|
+
userId: i.username
|
|
1713
1757
|
}
|
|
1714
1758
|
});
|
|
1715
1759
|
l.status === 200 && n(l.data);
|
|
1716
1760
|
} catch {
|
|
1717
1761
|
}
|
|
1718
1762
|
})();
|
|
1719
|
-
}, [e,
|
|
1763
|
+
}, [e, s, i]), /* @__PURE__ */ r(X, { open: e, onOpenChange: t, title: et, children: /* @__PURE__ */ r(Yr, { isAuthenticated: a, stats: o }) });
|
|
1720
1764
|
}, xt = ({
|
|
1721
1765
|
showConfirmation: e,
|
|
1722
1766
|
setShowConfirmation: t,
|
|
@@ -1724,15 +1768,15 @@ const ie = "panel", ge = "messagebox", Dr = ({
|
|
|
1724
1768
|
children: n,
|
|
1725
1769
|
customStrings: a
|
|
1726
1770
|
}) => /* @__PURE__ */ r(
|
|
1727
|
-
|
|
1771
|
+
X,
|
|
1728
1772
|
{
|
|
1729
1773
|
kind: "messagebox",
|
|
1730
1774
|
open: e,
|
|
1731
1775
|
onOpenChange: t,
|
|
1732
1776
|
title: a.title,
|
|
1733
|
-
footer: /* @__PURE__ */ v(
|
|
1777
|
+
footer: /* @__PURE__ */ v(Me, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
1734
1778
|
/* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(
|
|
1735
|
-
|
|
1779
|
+
Q,
|
|
1736
1780
|
{
|
|
1737
1781
|
mode: "dark",
|
|
1738
1782
|
variant: "secondary",
|
|
@@ -1744,7 +1788,7 @@ const ie = "panel", ge = "messagebox", Dr = ({
|
|
|
1744
1788
|
}
|
|
1745
1789
|
) }),
|
|
1746
1790
|
/* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(
|
|
1747
|
-
|
|
1791
|
+
Q,
|
|
1748
1792
|
{
|
|
1749
1793
|
mode: "dark",
|
|
1750
1794
|
variant: "danger",
|
|
@@ -1759,20 +1803,20 @@ const ie = "panel", ge = "messagebox", Dr = ({
|
|
|
1759
1803
|
children: n
|
|
1760
1804
|
}
|
|
1761
1805
|
);
|
|
1762
|
-
var
|
|
1763
|
-
return
|
|
1764
|
-
},
|
|
1765
|
-
var o =
|
|
1806
|
+
var qr = typeof window < "u", Xr = function(e, t) {
|
|
1807
|
+
return qr ? window.matchMedia(e).matches : (process.env.NODE_ENV !== "production" && console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches."), !1);
|
|
1808
|
+
}, Jr = function(e, t) {
|
|
1809
|
+
var o = S(Xr(e)), n = o[0], a = o[1];
|
|
1766
1810
|
return U(function() {
|
|
1767
|
-
var
|
|
1768
|
-
|
|
1811
|
+
var s = !0, i = window.matchMedia(e), l = function() {
|
|
1812
|
+
s && a(!!i.matches);
|
|
1769
1813
|
};
|
|
1770
|
-
return
|
|
1771
|
-
|
|
1814
|
+
return i.addEventListener("change", l), a(i.matches), function() {
|
|
1815
|
+
s = !1, i.removeEventListener("change", l);
|
|
1772
1816
|
};
|
|
1773
1817
|
}, [e]), n;
|
|
1774
1818
|
};
|
|
1775
|
-
const
|
|
1819
|
+
const Qr = async (e, t, o, n) => {
|
|
1776
1820
|
try {
|
|
1777
1821
|
const a = await H({
|
|
1778
1822
|
accessToken: n,
|
|
@@ -1796,20 +1840,20 @@ const Xr = async (e, t, o, n) => {
|
|
|
1796
1840
|
}
|
|
1797
1841
|
}, Xe = (e) => {
|
|
1798
1842
|
const t = e[0];
|
|
1799
|
-
return
|
|
1800
|
-
},
|
|
1843
|
+
return $t(t == null ? void 0 : t.content, 100);
|
|
1844
|
+
}, en = ({
|
|
1801
1845
|
filteredHistory: e,
|
|
1802
1846
|
setFilteredHistory: t,
|
|
1803
1847
|
dispatch: o,
|
|
1804
1848
|
onOpenChange: n
|
|
1805
1849
|
}) => {
|
|
1806
1850
|
var T;
|
|
1807
|
-
const { user: a, getAccessToken:
|
|
1851
|
+
const { user: a, getAccessToken: s } = te(), i = ce({
|
|
1808
1852
|
id: 0,
|
|
1809
1853
|
timestamp: "",
|
|
1810
1854
|
message: ""
|
|
1811
|
-
}), [l, h] =
|
|
1812
|
-
key:
|
|
1855
|
+
}), [l, h] = S(!1), u = Jr("(min-width: 480px)"), { state: m, dispatch: g } = V(tt), [, b] = G({
|
|
1856
|
+
key: $ + Dt,
|
|
1813
1857
|
initialValue: m.sortDirection
|
|
1814
1858
|
}), d = e.data.sort(
|
|
1815
1859
|
(p, k) => {
|
|
@@ -1829,7 +1873,7 @@ const Xr = async (e, t, o, n) => {
|
|
|
1829
1873
|
switch (m.sortDirection) {
|
|
1830
1874
|
case !1:
|
|
1831
1875
|
b(D.ASC), g({
|
|
1832
|
-
type:
|
|
1876
|
+
type: Ce,
|
|
1833
1877
|
payload: {
|
|
1834
1878
|
sortedCell: p,
|
|
1835
1879
|
sortDirection: D.ASC
|
|
@@ -1838,7 +1882,7 @@ const Xr = async (e, t, o, n) => {
|
|
|
1838
1882
|
break;
|
|
1839
1883
|
case D.ASC:
|
|
1840
1884
|
b(D.DESC), g({
|
|
1841
|
-
type:
|
|
1885
|
+
type: Ce,
|
|
1842
1886
|
payload: {
|
|
1843
1887
|
sortedCell: p,
|
|
1844
1888
|
sortDirection: D.DESC
|
|
@@ -1847,7 +1891,7 @@ const Xr = async (e, t, o, n) => {
|
|
|
1847
1891
|
break;
|
|
1848
1892
|
default:
|
|
1849
1893
|
b(D.ASC), g({
|
|
1850
|
-
type:
|
|
1894
|
+
type: Ce,
|
|
1851
1895
|
payload: {
|
|
1852
1896
|
sortedCell: p,
|
|
1853
1897
|
sortDirection: D.ASC
|
|
@@ -1856,17 +1900,17 @@ const Xr = async (e, t, o, n) => {
|
|
|
1856
1900
|
break;
|
|
1857
1901
|
}
|
|
1858
1902
|
};
|
|
1859
|
-
return /* @__PURE__ */ v(
|
|
1903
|
+
return /* @__PURE__ */ v(R, { children: [
|
|
1860
1904
|
/* @__PURE__ */ v(
|
|
1861
1905
|
xt,
|
|
1862
1906
|
{
|
|
1863
1907
|
showConfirmation: l,
|
|
1864
1908
|
setShowConfirmation: h,
|
|
1865
1909
|
action: async () => {
|
|
1866
|
-
const p =
|
|
1910
|
+
const p = i.current;
|
|
1867
1911
|
try {
|
|
1868
1912
|
const k = await H({
|
|
1869
|
-
accessToken: await
|
|
1913
|
+
accessToken: await s(),
|
|
1870
1914
|
type: F.DELETE_CHAT,
|
|
1871
1915
|
params: {
|
|
1872
1916
|
userId: (a == null ? void 0 : a.username) || "",
|
|
@@ -1888,22 +1932,22 @@ const Xr = async (e, t, o, n) => {
|
|
|
1888
1932
|
/* @__PURE__ */ v("li", { children: [
|
|
1889
1933
|
"Timestamp:",
|
|
1890
1934
|
" ",
|
|
1891
|
-
/* @__PURE__ */ r("span", { className: "text-lg", children:
|
|
1935
|
+
/* @__PURE__ */ r("span", { className: "text-lg", children: i.current && i.current.timestamp })
|
|
1892
1936
|
] }),
|
|
1893
1937
|
/* @__PURE__ */ v("li", { children: [
|
|
1894
1938
|
"First message:",
|
|
1895
1939
|
" ",
|
|
1896
|
-
/* @__PURE__ */ r("span", { className: "text-lg", children: (T =
|
|
1940
|
+
/* @__PURE__ */ r("span", { className: "text-lg", children: (T = i.current) == null ? void 0 : T.message })
|
|
1897
1941
|
] })
|
|
1898
1942
|
] })
|
|
1899
1943
|
]
|
|
1900
1944
|
}
|
|
1901
1945
|
),
|
|
1902
|
-
/* @__PURE__ */ v(
|
|
1903
|
-
/* @__PURE__ */ r(
|
|
1904
|
-
u && /* @__PURE__ */ r(
|
|
1946
|
+
/* @__PURE__ */ v(Zt, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
|
|
1947
|
+
/* @__PURE__ */ r(qt, { children: /* @__PURE__ */ v(Ne, { children: [
|
|
1948
|
+
u && /* @__PURE__ */ r(z, { className: "sr-only", children: "Row" }),
|
|
1905
1949
|
/* @__PURE__ */ r(
|
|
1906
|
-
|
|
1950
|
+
Xt,
|
|
1907
1951
|
{
|
|
1908
1952
|
cellId: "timestamp",
|
|
1909
1953
|
align: "left",
|
|
@@ -1915,15 +1959,15 @@ const Xr = async (e, t, o, n) => {
|
|
|
1915
1959
|
children: "Date"
|
|
1916
1960
|
}
|
|
1917
1961
|
),
|
|
1918
|
-
/* @__PURE__ */ r(
|
|
1919
|
-
/* @__PURE__ */ r(
|
|
1962
|
+
/* @__PURE__ */ r(z, { children: "First message" }),
|
|
1963
|
+
/* @__PURE__ */ r(z, { className: "text-right", children: "Actions" })
|
|
1920
1964
|
] }) }),
|
|
1921
|
-
/* @__PURE__ */ r(
|
|
1965
|
+
/* @__PURE__ */ r(Jt, { children: d.map((p, k) => {
|
|
1922
1966
|
var E;
|
|
1923
1967
|
return ((E = p == null ? void 0 : p.messages) == null ? void 0 : E.length) > 0 ? /* @__PURE__ */ v(Ne, { children: [
|
|
1924
|
-
u && /* @__PURE__ */ r(
|
|
1968
|
+
u && /* @__PURE__ */ r(z, { children: k + 1 }),
|
|
1925
1969
|
/* @__PURE__ */ r(
|
|
1926
|
-
|
|
1970
|
+
z,
|
|
1927
1971
|
{
|
|
1928
1972
|
component: "th",
|
|
1929
1973
|
scope: "row",
|
|
@@ -1931,34 +1975,34 @@ const Xr = async (e, t, o, n) => {
|
|
|
1931
1975
|
children: p.timestamp
|
|
1932
1976
|
}
|
|
1933
1977
|
),
|
|
1934
|
-
/* @__PURE__ */ r(
|
|
1935
|
-
/* @__PURE__ */ r(
|
|
1978
|
+
/* @__PURE__ */ r(z, { className: "max-w-[100px] text-white sm:max-w-full", children: Xe(p.messages) }),
|
|
1979
|
+
/* @__PURE__ */ r(z, { children: /* @__PURE__ */ v("div", { className: "flex justify-end gap-2", children: [
|
|
1936
1980
|
/* @__PURE__ */ r(
|
|
1937
|
-
|
|
1981
|
+
Y,
|
|
1938
1982
|
{
|
|
1939
1983
|
focusMode: "alt-system",
|
|
1940
1984
|
noBorder: !0,
|
|
1941
1985
|
label: "Restore chat",
|
|
1942
1986
|
onClick: async () => {
|
|
1943
|
-
const
|
|
1944
|
-
|
|
1987
|
+
const x = await s();
|
|
1988
|
+
Qr(
|
|
1945
1989
|
p,
|
|
1946
1990
|
o,
|
|
1947
1991
|
n,
|
|
1948
|
-
|
|
1992
|
+
x
|
|
1949
1993
|
);
|
|
1950
1994
|
},
|
|
1951
|
-
children: /* @__PURE__ */ r(
|
|
1995
|
+
children: /* @__PURE__ */ r(Ao, { className: "h-3 w-3", monotone: !0 })
|
|
1952
1996
|
}
|
|
1953
1997
|
),
|
|
1954
1998
|
/* @__PURE__ */ r(
|
|
1955
|
-
|
|
1999
|
+
Y,
|
|
1956
2000
|
{
|
|
1957
2001
|
focusMode: "alt-system",
|
|
1958
2002
|
noBorder: !0,
|
|
1959
2003
|
label: "Delete chat",
|
|
1960
2004
|
onClick: () => {
|
|
1961
|
-
|
|
2005
|
+
i.current = {
|
|
1962
2006
|
id: p.id,
|
|
1963
2007
|
timestamp: p.timestamp,
|
|
1964
2008
|
message: Xe(p.messages)
|
|
@@ -1970,7 +2014,7 @@ const Xr = async (e, t, o, n) => {
|
|
|
1970
2014
|
] }) })
|
|
1971
2015
|
] }, `${w.HISTORY.TITLE}-${p.id}-${k}`) : null;
|
|
1972
2016
|
}) }),
|
|
1973
|
-
/* @__PURE__ */ r(
|
|
2017
|
+
/* @__PURE__ */ r(Qt, { children: /* @__PURE__ */ r(Ne, { children: /* @__PURE__ */ r(z, { colSpan: 4, children: /* @__PURE__ */ r("div", { children: fe(
|
|
1974
2018
|
`${e.data.length} chat`,
|
|
1975
2019
|
e.data.length
|
|
1976
2020
|
) }) }) }) })
|
|
@@ -1984,21 +2028,21 @@ function Je(e, t) {
|
|
|
1984
2028
|
)
|
|
1985
2029
|
) : e;
|
|
1986
2030
|
}
|
|
1987
|
-
const
|
|
2031
|
+
const tn = ({
|
|
1988
2032
|
onOpenChange: e,
|
|
1989
2033
|
historyData: t
|
|
1990
2034
|
}) => {
|
|
1991
|
-
const { isAuthenticated: o } = te(), n = ce(null), { dispatch: a } =
|
|
1992
|
-
key:
|
|
1993
|
-
initialValue:
|
|
1994
|
-
}), h =
|
|
2035
|
+
const { isAuthenticated: o } = te(), n = ce(null), { dispatch: a } = V(me), { state: s, dispatch: i } = V(tt), [, l] = G({
|
|
2036
|
+
key: $ + Ht,
|
|
2037
|
+
initialValue: s.searchString
|
|
2038
|
+
}), h = ro(() => t, [t]), [u, m] = S({
|
|
1995
2039
|
data: h
|
|
1996
2040
|
}), g = (c) => {
|
|
1997
2041
|
const y = Je(h, c);
|
|
1998
2042
|
m({
|
|
1999
2043
|
data: y
|
|
2000
|
-
}), l(c),
|
|
2001
|
-
type:
|
|
2044
|
+
}), l(c), i({
|
|
2045
|
+
type: Gt,
|
|
2002
2046
|
payload: { searchString: c }
|
|
2003
2047
|
});
|
|
2004
2048
|
}, b = (c) => {
|
|
@@ -2009,27 +2053,27 @@ const Qr = ({
|
|
|
2009
2053
|
return U(() => {
|
|
2010
2054
|
const c = Je(
|
|
2011
2055
|
t,
|
|
2012
|
-
|
|
2056
|
+
s.searchString
|
|
2013
2057
|
);
|
|
2014
2058
|
m({
|
|
2015
2059
|
data: c
|
|
2016
2060
|
});
|
|
2017
|
-
}, [t,
|
|
2061
|
+
}, [t, s.searchString]), o ? u && u.data && /* @__PURE__ */ v(R, { children: [
|
|
2018
2062
|
/* @__PURE__ */ r("form", { autoComplete: "off", onSubmit: d, children: /* @__PURE__ */ r(
|
|
2019
|
-
|
|
2063
|
+
Ft,
|
|
2020
2064
|
{
|
|
2021
2065
|
ref: n,
|
|
2022
|
-
defaultValue:
|
|
2066
|
+
defaultValue: s.searchString,
|
|
2023
2067
|
focusMode: "light",
|
|
2024
2068
|
name: "Search",
|
|
2025
2069
|
label: "Search",
|
|
2026
2070
|
onChange: b,
|
|
2027
2071
|
spacing: { t: 2, b: 2 },
|
|
2028
|
-
...
|
|
2072
|
+
...s.searchString && {
|
|
2029
2073
|
rightElement: /* @__PURE__ */ r(
|
|
2030
|
-
|
|
2074
|
+
Q,
|
|
2031
2075
|
{
|
|
2032
|
-
disabled: !
|
|
2076
|
+
disabled: !s.searchString,
|
|
2033
2077
|
mode: "dark",
|
|
2034
2078
|
noBorder: !0,
|
|
2035
2079
|
size: "small",
|
|
@@ -2044,7 +2088,7 @@ const Qr = ({
|
|
|
2044
2088
|
}
|
|
2045
2089
|
) }),
|
|
2046
2090
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ r(
|
|
2047
|
-
|
|
2091
|
+
en,
|
|
2048
2092
|
{
|
|
2049
2093
|
filteredHistory: u,
|
|
2050
2094
|
setFilteredHistory: m,
|
|
@@ -2053,11 +2097,11 @@ const Qr = ({
|
|
|
2053
2097
|
}
|
|
2054
2098
|
) })
|
|
2055
2099
|
] }) : null;
|
|
2056
|
-
},
|
|
2100
|
+
}, on = ({
|
|
2057
2101
|
open: e,
|
|
2058
2102
|
onOpenChange: t,
|
|
2059
2103
|
historyData: o
|
|
2060
|
-
}) => /* @__PURE__ */ r(
|
|
2104
|
+
}) => /* @__PURE__ */ r(X, { open: e, onOpenChange: t, title: Ut, children: /* @__PURE__ */ r(tn, { onOpenChange: t, historyData: o }) });
|
|
2061
2105
|
/*!
|
|
2062
2106
|
@versini/ui-toggle v1.0.7
|
|
2063
2107
|
© 2024 gizmette.com
|
|
@@ -2071,7 +2115,7 @@ try {
|
|
|
2071
2115
|
});
|
|
2072
2116
|
} catch {
|
|
2073
2117
|
}
|
|
2074
|
-
const
|
|
2118
|
+
const rn = "av-toggle", nn = (e) => {
|
|
2075
2119
|
let t = "";
|
|
2076
2120
|
if (typeof e == "number" || typeof e == "string")
|
|
2077
2121
|
t = "m-" + e;
|
|
@@ -2080,7 +2124,7 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2080
2124
|
(e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
|
|
2081
2125
|
}
|
|
2082
2126
|
return t;
|
|
2083
|
-
},
|
|
2127
|
+
}, an = () => C("peer", "h-6", "w-11", "rounded-full"), sn = ({
|
|
2084
2128
|
focusMode: e
|
|
2085
2129
|
}) => C(
|
|
2086
2130
|
"peer-focus:outline",
|
|
@@ -2092,14 +2136,14 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2092
2136
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
|
2093
2137
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
|
2094
2138
|
}
|
|
2095
|
-
),
|
|
2139
|
+
), ln = () => C(
|
|
2096
2140
|
"peer-checked:after:translate-x-full",
|
|
2097
2141
|
// background color when checked
|
|
2098
2142
|
"peer-checked:bg-violet-500",
|
|
2099
2143
|
// knob circle and border color when checked
|
|
2100
2144
|
"peer-checked:after:bg-white",
|
|
2101
2145
|
"peer-checked:after:border-white"
|
|
2102
|
-
),
|
|
2146
|
+
), cn = () => C(
|
|
2103
2147
|
"after:left-[2px]",
|
|
2104
2148
|
"after:top-[2px]",
|
|
2105
2149
|
"after:border",
|
|
@@ -2111,7 +2155,7 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2111
2155
|
"after:rounded-full",
|
|
2112
2156
|
"after:transition-all",
|
|
2113
2157
|
"after:content-['']"
|
|
2114
|
-
),
|
|
2158
|
+
), dn = ({
|
|
2115
2159
|
mode: e,
|
|
2116
2160
|
noBorder: t
|
|
2117
2161
|
}) => C({
|
|
@@ -2120,7 +2164,7 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2120
2164
|
"border-border-light bg-surface-darker": e === "dark",
|
|
2121
2165
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
|
2122
2166
|
"border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
|
2123
|
-
}),
|
|
2167
|
+
}), un = ({
|
|
2124
2168
|
mode: e,
|
|
2125
2169
|
labelHidden: t
|
|
2126
2170
|
}) => t ? "sr-only" : C("ml-2 text-sm", {
|
|
@@ -2128,11 +2172,11 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2128
2172
|
"text-copy-lighter": e === "dark",
|
|
2129
2173
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
|
2130
2174
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
|
2131
|
-
}),
|
|
2132
|
-
|
|
2175
|
+
}), mn = ({ spacing: e }) => C(
|
|
2176
|
+
rn,
|
|
2133
2177
|
"relative flex cursor-pointer items-center",
|
|
2134
|
-
|
|
2135
|
-
),
|
|
2178
|
+
nn(e)
|
|
2179
|
+
), hn = ({
|
|
2136
2180
|
mode: e,
|
|
2137
2181
|
focusMode: t,
|
|
2138
2182
|
labelHidden: o,
|
|
@@ -2140,29 +2184,29 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2140
2184
|
noBorder: a
|
|
2141
2185
|
}) => ({
|
|
2142
2186
|
toggle: C(
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2187
|
+
an(),
|
|
2188
|
+
dn({ mode: e, noBorder: a }),
|
|
2189
|
+
sn({ focusMode: t }),
|
|
2190
|
+
cn(),
|
|
2191
|
+
ln()
|
|
2148
2192
|
),
|
|
2149
|
-
label:
|
|
2193
|
+
label: un({ mode: e, labelHidden: o }),
|
|
2150
2194
|
input: "peer sr-only",
|
|
2151
|
-
wrapper:
|
|
2152
|
-
}),
|
|
2195
|
+
wrapper: mn({ spacing: n })
|
|
2196
|
+
}), q = ({
|
|
2153
2197
|
checked: e = !1,
|
|
2154
2198
|
onChange: t,
|
|
2155
2199
|
label: o,
|
|
2156
2200
|
labelHidden: n = !1,
|
|
2157
2201
|
name: a,
|
|
2158
|
-
mode:
|
|
2159
|
-
focusMode:
|
|
2202
|
+
mode: s = "system",
|
|
2203
|
+
focusMode: i = "system",
|
|
2160
2204
|
spacing: l,
|
|
2161
2205
|
noBorder: h = !1
|
|
2162
2206
|
}) => {
|
|
2163
|
-
const u =
|
|
2164
|
-
mode:
|
|
2165
|
-
focusMode:
|
|
2207
|
+
const u = hn({
|
|
2208
|
+
mode: s,
|
|
2209
|
+
focusMode: i,
|
|
2166
2210
|
labelHidden: n,
|
|
2167
2211
|
spacing: l,
|
|
2168
2212
|
noBorder: h
|
|
@@ -2183,18 +2227,18 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2183
2227
|
/* @__PURE__ */ r("div", { className: u.toggle }),
|
|
2184
2228
|
/* @__PURE__ */ r("span", { className: u.label, children: o })
|
|
2185
2229
|
] });
|
|
2186
|
-
},
|
|
2230
|
+
}, gn = ({
|
|
2187
2231
|
open: e,
|
|
2188
2232
|
onOpenChange: t
|
|
2189
2233
|
}) => {
|
|
2190
|
-
const { dispatch: o } =
|
|
2234
|
+
const { dispatch: o } = V(me), { getAccessToken: n, user: a } = te(), [s, i] = S({
|
|
2191
2235
|
loaded: !1,
|
|
2192
2236
|
instructions: "",
|
|
2193
2237
|
loadingLocation: !1,
|
|
2194
2238
|
location: "",
|
|
2195
|
-
engine:
|
|
2239
|
+
engine: ie
|
|
2196
2240
|
}), [l, h] = G({
|
|
2197
|
-
key:
|
|
2241
|
+
key: $ + ot,
|
|
2198
2242
|
initialValue: !1
|
|
2199
2243
|
}), u = async (d) => {
|
|
2200
2244
|
d.preventDefault();
|
|
@@ -2204,26 +2248,26 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2204
2248
|
type: F.SET_USER_PREFERENCES,
|
|
2205
2249
|
params: {
|
|
2206
2250
|
user: a == null ? void 0 : a.username,
|
|
2207
|
-
instructions:
|
|
2208
|
-
location:
|
|
2209
|
-
engine:
|
|
2251
|
+
instructions: s.instructions,
|
|
2252
|
+
location: s.location,
|
|
2253
|
+
engine: s.engine
|
|
2210
2254
|
}
|
|
2211
2255
|
}), o({
|
|
2212
2256
|
type: rt,
|
|
2213
2257
|
payload: {
|
|
2214
|
-
engine:
|
|
2258
|
+
engine: s.engine
|
|
2215
2259
|
}
|
|
2216
2260
|
});
|
|
2217
2261
|
} catch {
|
|
2218
2262
|
}
|
|
2219
2263
|
}, m = async () => {
|
|
2220
|
-
|
|
2264
|
+
i((d) => ({
|
|
2221
2265
|
...d,
|
|
2222
2266
|
location: "...",
|
|
2223
2267
|
loadingLocation: !0
|
|
2224
2268
|
}));
|
|
2225
2269
|
try {
|
|
2226
|
-
const d = Date.now(), c = await
|
|
2270
|
+
const d = Date.now(), c = await jt(), y = await H({
|
|
2227
2271
|
accessToken: await n(),
|
|
2228
2272
|
type: F.GET_LOCATION,
|
|
2229
2273
|
params: {
|
|
@@ -2232,15 +2276,15 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2232
2276
|
}
|
|
2233
2277
|
}), p = Date.now() - d;
|
|
2234
2278
|
if (p < 2e3 && await new Promise((k) => setTimeout(k, 2e3 - p)), y.status === 200) {
|
|
2235
|
-
const { city: k, state: E, country:
|
|
2236
|
-
|
|
2237
|
-
...
|
|
2279
|
+
const { city: k, state: E, country: x, displayName: M } = y.data, _ = k && E && x ? `${k}, ${E}, ${x}` : M;
|
|
2280
|
+
i((B) => ({
|
|
2281
|
+
...B,
|
|
2238
2282
|
loaded: !0,
|
|
2239
|
-
location:
|
|
2283
|
+
location: _,
|
|
2240
2284
|
loadingLocation: !1
|
|
2241
2285
|
}));
|
|
2242
2286
|
} else
|
|
2243
|
-
|
|
2287
|
+
i((k) => ({
|
|
2244
2288
|
...k,
|
|
2245
2289
|
loaded: !0,
|
|
2246
2290
|
location: "",
|
|
@@ -2249,24 +2293,24 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2249
2293
|
} catch {
|
|
2250
2294
|
}
|
|
2251
2295
|
}, g = (d) => {
|
|
2252
|
-
|
|
2296
|
+
i((c) => ({
|
|
2253
2297
|
...c,
|
|
2254
|
-
engine: d ?
|
|
2298
|
+
engine: d ? Te : pe
|
|
2255
2299
|
}));
|
|
2256
2300
|
}, b = (d) => {
|
|
2257
|
-
|
|
2301
|
+
i((c) => ({
|
|
2258
2302
|
...c,
|
|
2259
|
-
engine: d ?
|
|
2303
|
+
engine: d ? pe : Te
|
|
2260
2304
|
}));
|
|
2261
2305
|
};
|
|
2262
2306
|
return U(() => {
|
|
2263
2307
|
if (!e || !a) {
|
|
2264
|
-
|
|
2308
|
+
i({
|
|
2265
2309
|
loaded: !1,
|
|
2266
2310
|
loadingLocation: !1,
|
|
2267
2311
|
instructions: "",
|
|
2268
2312
|
location: "",
|
|
2269
|
-
engine:
|
|
2313
|
+
engine: ie
|
|
2270
2314
|
});
|
|
2271
2315
|
return;
|
|
2272
2316
|
}
|
|
@@ -2279,25 +2323,25 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2279
2323
|
user: a.username
|
|
2280
2324
|
}
|
|
2281
2325
|
});
|
|
2282
|
-
d.status === 200 &&
|
|
2326
|
+
d.status === 200 && i((c) => ({
|
|
2283
2327
|
...c,
|
|
2284
2328
|
loaded: !0,
|
|
2285
2329
|
instructions: d.data.instructions || "",
|
|
2286
2330
|
location: d.data.location || "",
|
|
2287
|
-
engine: d.data.engine ||
|
|
2331
|
+
engine: d.data.engine || ie
|
|
2288
2332
|
}));
|
|
2289
2333
|
} catch {
|
|
2290
2334
|
}
|
|
2291
2335
|
})();
|
|
2292
|
-
}, [a, e]), /* @__PURE__ */ r(
|
|
2293
|
-
|
|
2336
|
+
}, [a, e]), /* @__PURE__ */ r(R, { children: s.loaded && /* @__PURE__ */ r(
|
|
2337
|
+
X,
|
|
2294
2338
|
{
|
|
2295
2339
|
open: e,
|
|
2296
2340
|
onOpenChange: t,
|
|
2297
2341
|
title: "Engine Fine Tuning",
|
|
2298
|
-
footer: /* @__PURE__ */ v(
|
|
2342
|
+
footer: /* @__PURE__ */ v(Me, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
2299
2343
|
/* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(
|
|
2300
|
-
|
|
2344
|
+
Q,
|
|
2301
2345
|
{
|
|
2302
2346
|
mode: "dark",
|
|
2303
2347
|
variant: "secondary",
|
|
@@ -2309,7 +2353,7 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2309
2353
|
}
|
|
2310
2354
|
) }),
|
|
2311
2355
|
/* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(
|
|
2312
|
-
|
|
2356
|
+
Q,
|
|
2313
2357
|
{
|
|
2314
2358
|
mode: "dark",
|
|
2315
2359
|
variant: "danger",
|
|
@@ -2321,53 +2365,53 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2321
2365
|
}
|
|
2322
2366
|
) })
|
|
2323
2367
|
] }),
|
|
2324
|
-
children: /* @__PURE__ */ v(
|
|
2368
|
+
children: /* @__PURE__ */ v(R, { children: [
|
|
2325
2369
|
/* @__PURE__ */ v(
|
|
2326
|
-
|
|
2370
|
+
P,
|
|
2327
2371
|
{
|
|
2328
2372
|
header: "AI Engine",
|
|
2329
2373
|
className: "prose-dark dark:prose-lighter",
|
|
2330
2374
|
children: [
|
|
2331
2375
|
/* @__PURE__ */ r("p", { children: "Select the AI engine that will be used to generate responses." }),
|
|
2332
2376
|
/* @__PURE__ */ r(
|
|
2333
|
-
|
|
2377
|
+
q,
|
|
2334
2378
|
{
|
|
2335
2379
|
noBorder: !0,
|
|
2336
2380
|
label: "OpenAI",
|
|
2337
2381
|
name: "OpenAI",
|
|
2338
2382
|
onChange: g,
|
|
2339
|
-
checked:
|
|
2383
|
+
checked: s.engine === Te
|
|
2340
2384
|
}
|
|
2341
2385
|
),
|
|
2342
2386
|
/* @__PURE__ */ r(
|
|
2343
|
-
|
|
2387
|
+
q,
|
|
2344
2388
|
{
|
|
2345
2389
|
spacing: { t: 2 },
|
|
2346
2390
|
noBorder: !0,
|
|
2347
2391
|
label: "Anthropic",
|
|
2348
2392
|
name: "Anthropic",
|
|
2349
2393
|
onChange: b,
|
|
2350
|
-
checked:
|
|
2394
|
+
checked: s.engine === pe
|
|
2351
2395
|
}
|
|
2352
2396
|
),
|
|
2353
2397
|
/* @__PURE__ */ r("p", { className: "text-xs", children: "NOTE: Anthropic is currently in beta and may not be as accurate as OpenAI. It also cannot take advantage yet of internal helper tools such as the OpenWeather or Google Images plugin." }),
|
|
2354
2398
|
/* @__PURE__ */ r(
|
|
2355
|
-
|
|
2399
|
+
q,
|
|
2356
2400
|
{
|
|
2357
2401
|
spacing: { t: 2 },
|
|
2358
2402
|
noBorder: !0,
|
|
2359
|
-
label: "Show Engine Toggle
|
|
2403
|
+
label: "Show Quick Engine Toggle",
|
|
2360
2404
|
name: "show-toggle-engine-menu",
|
|
2361
2405
|
onChange: h,
|
|
2362
2406
|
checked: l
|
|
2363
2407
|
}
|
|
2364
2408
|
),
|
|
2365
|
-
/* @__PURE__ */ r("p", { className: "text-xs", children: "This option
|
|
2409
|
+
/* @__PURE__ */ r("p", { className: "text-xs", children: "This option introduces a new menu on the left side of the screen, enabling you to quickly switch between engines." })
|
|
2366
2410
|
]
|
|
2367
2411
|
}
|
|
2368
2412
|
),
|
|
2369
2413
|
/* @__PURE__ */ v(
|
|
2370
|
-
|
|
2414
|
+
P,
|
|
2371
2415
|
{
|
|
2372
2416
|
spacing: { t: 4 },
|
|
2373
2417
|
header: "Custom Instructions",
|
|
@@ -2375,7 +2419,7 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2375
2419
|
children: [
|
|
2376
2420
|
/* @__PURE__ */ r("p", { children: "What would you like Sassy Saint to know about you to provide better responses?" }),
|
|
2377
2421
|
/* @__PURE__ */ r(
|
|
2378
|
-
|
|
2422
|
+
Ue,
|
|
2379
2423
|
{
|
|
2380
2424
|
mode: "alt-system",
|
|
2381
2425
|
autoCapitalize: "off",
|
|
@@ -2383,9 +2427,9 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2383
2427
|
autoCorrect: "off",
|
|
2384
2428
|
name: "customInstructions",
|
|
2385
2429
|
label: "Custom Instructions",
|
|
2386
|
-
value:
|
|
2430
|
+
value: s.instructions,
|
|
2387
2431
|
onChange: (d) => {
|
|
2388
|
-
|
|
2432
|
+
i((c) => ({
|
|
2389
2433
|
...c,
|
|
2390
2434
|
loaded: !0,
|
|
2391
2435
|
instructions: d.target.value
|
|
@@ -2398,7 +2442,7 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2398
2442
|
}
|
|
2399
2443
|
),
|
|
2400
2444
|
/* @__PURE__ */ v(
|
|
2401
|
-
|
|
2445
|
+
P,
|
|
2402
2446
|
{
|
|
2403
2447
|
header: "Location",
|
|
2404
2448
|
className: "prose-dark dark:prose-lighter",
|
|
@@ -2406,14 +2450,14 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2406
2450
|
children: [
|
|
2407
2451
|
/* @__PURE__ */ r("p", { children: "You can share your location to receive customized responses based on your area." }),
|
|
2408
2452
|
/* @__PURE__ */ r(
|
|
2409
|
-
|
|
2453
|
+
Ue,
|
|
2410
2454
|
{
|
|
2411
2455
|
mode: "alt-system",
|
|
2412
2456
|
name: "location",
|
|
2413
2457
|
label: "Location",
|
|
2414
|
-
value:
|
|
2458
|
+
value: s.location,
|
|
2415
2459
|
onChange: (d) => {
|
|
2416
|
-
|
|
2460
|
+
i((c) => ({
|
|
2417
2461
|
...c,
|
|
2418
2462
|
loaded: !0,
|
|
2419
2463
|
location: d.target.value
|
|
@@ -2423,14 +2467,14 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2423
2467
|
}
|
|
2424
2468
|
),
|
|
2425
2469
|
/* @__PURE__ */ r(
|
|
2426
|
-
|
|
2470
|
+
Q,
|
|
2427
2471
|
{
|
|
2428
2472
|
spacing: { t: 2 },
|
|
2429
2473
|
size: "small",
|
|
2430
2474
|
noBorder: !0,
|
|
2431
|
-
disabled:
|
|
2475
|
+
disabled: s.loadingLocation,
|
|
2432
2476
|
onClick: m,
|
|
2433
|
-
children:
|
|
2477
|
+
children: s.loadingLocation ? "Detecting..." : "Auto-detect"
|
|
2434
2478
|
}
|
|
2435
2479
|
)
|
|
2436
2480
|
]
|
|
@@ -2439,83 +2483,83 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2439
2483
|
] })
|
|
2440
2484
|
}
|
|
2441
2485
|
) });
|
|
2442
|
-
},
|
|
2486
|
+
}, pn = ({
|
|
2443
2487
|
open: e,
|
|
2444
2488
|
onOpenChange: t
|
|
2445
2489
|
}) => {
|
|
2446
2490
|
const [o, n] = G({
|
|
2447
|
-
key:
|
|
2491
|
+
key: $ + ze,
|
|
2448
2492
|
initialValue: !1
|
|
2449
|
-
}), [a,
|
|
2450
|
-
key:
|
|
2493
|
+
}), [a, s] = G({
|
|
2494
|
+
key: $ + $e,
|
|
2451
2495
|
initialValue: !1
|
|
2452
|
-
}), [
|
|
2453
|
-
key:
|
|
2496
|
+
}), [i, l] = G({
|
|
2497
|
+
key: $ + He,
|
|
2454
2498
|
initialValue: !1
|
|
2455
2499
|
}), h = (g) => {
|
|
2456
2500
|
n(g);
|
|
2457
2501
|
}, u = (g) => {
|
|
2458
|
-
|
|
2502
|
+
s(g);
|
|
2459
2503
|
}, m = (g) => {
|
|
2460
2504
|
l(g);
|
|
2461
2505
|
};
|
|
2462
|
-
return /* @__PURE__ */ r(
|
|
2506
|
+
return /* @__PURE__ */ r(X, { open: e, onOpenChange: t, title: "Tags", children: /* @__PURE__ */ v(P, { header: w.TAGS.TITLE, className: "prose-dark dark:prose-lighter", children: [
|
|
2463
2507
|
/* @__PURE__ */ r("p", { children: w.TAGS.DESCRIPTION }),
|
|
2464
2508
|
/* @__PURE__ */ r(
|
|
2465
|
-
|
|
2509
|
+
q,
|
|
2466
2510
|
{
|
|
2467
2511
|
noBorder: !0,
|
|
2468
2512
|
label: we[Ee.SUMMARIZE_ARTICLE].label,
|
|
2469
|
-
name:
|
|
2513
|
+
name: ze,
|
|
2470
2514
|
onChange: h,
|
|
2471
2515
|
checked: o
|
|
2472
2516
|
}
|
|
2473
2517
|
),
|
|
2474
2518
|
/* @__PURE__ */ r(
|
|
2475
|
-
|
|
2519
|
+
q,
|
|
2476
2520
|
{
|
|
2477
2521
|
spacing: { t: 2 },
|
|
2478
2522
|
noBorder: !0,
|
|
2479
2523
|
label: we[Ee.PROOFREAD_CONTENT].label,
|
|
2480
|
-
name:
|
|
2524
|
+
name: $e,
|
|
2481
2525
|
onChange: u,
|
|
2482
2526
|
checked: a
|
|
2483
2527
|
}
|
|
2484
2528
|
),
|
|
2485
2529
|
/* @__PURE__ */ r(
|
|
2486
|
-
|
|
2530
|
+
q,
|
|
2487
2531
|
{
|
|
2488
2532
|
spacing: { t: 2 },
|
|
2489
2533
|
noBorder: !0,
|
|
2490
2534
|
label: we[Ee.REPHRASE_CONTENT].label,
|
|
2491
|
-
name:
|
|
2535
|
+
name: He,
|
|
2492
2536
|
onChange: m,
|
|
2493
|
-
checked:
|
|
2537
|
+
checked: i
|
|
2494
2538
|
}
|
|
2495
2539
|
)
|
|
2496
2540
|
] }) });
|
|
2497
|
-
},
|
|
2498
|
-
const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType: n } = te(), [a,
|
|
2499
|
-
key:
|
|
2541
|
+
}, fn = () => {
|
|
2542
|
+
const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType: n } = te(), [a, s] = G({
|
|
2543
|
+
key: $ + Kt,
|
|
2500
2544
|
initialValue: !1
|
|
2501
|
-
}), [
|
|
2502
|
-
|
|
2545
|
+
}), [i, l] = S(!1), [h, u] = S(!1), m = de(), g = (t == null ? void 0 : t.username) || "", b = (y) => {
|
|
2546
|
+
s(y);
|
|
2503
2547
|
}, d = () => {
|
|
2504
|
-
l(!
|
|
2548
|
+
l(!i);
|
|
2505
2549
|
}, c = () => {
|
|
2506
2550
|
u(!h);
|
|
2507
2551
|
};
|
|
2508
|
-
return e && g ? /* @__PURE__ */ v(
|
|
2509
|
-
|
|
2510
|
-
|
|
2552
|
+
return e && g ? /* @__PURE__ */ v(R, { children: [
|
|
2553
|
+
i && /* @__PURE__ */ r(
|
|
2554
|
+
gn,
|
|
2511
2555
|
{
|
|
2512
|
-
open:
|
|
2556
|
+
open: i,
|
|
2513
2557
|
onOpenChange: l
|
|
2514
2558
|
}
|
|
2515
2559
|
),
|
|
2516
|
-
h && /* @__PURE__ */ r(
|
|
2560
|
+
h && /* @__PURE__ */ r(pn, { open: h, onOpenChange: u }),
|
|
2517
2561
|
/* @__PURE__ */ v(
|
|
2518
|
-
|
|
2562
|
+
P,
|
|
2519
2563
|
{
|
|
2520
2564
|
header: w.PREFERENCES.TITLE,
|
|
2521
2565
|
className: "prose-dark dark:prose-lighter",
|
|
@@ -2524,7 +2568,7 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2524
2568
|
[w.PREFERENCES.NAME]: g,
|
|
2525
2569
|
[w.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
|
|
2526
2570
|
[w.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ r(
|
|
2527
|
-
|
|
2571
|
+
q,
|
|
2528
2572
|
{
|
|
2529
2573
|
noBorder: !0,
|
|
2530
2574
|
labelHidden: !0,
|
|
@@ -2536,75 +2580,75 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2536
2580
|
)
|
|
2537
2581
|
}),
|
|
2538
2582
|
/* @__PURE__ */ r(
|
|
2539
|
-
|
|
2583
|
+
Y,
|
|
2540
2584
|
{
|
|
2541
2585
|
spacing: { t: 2 },
|
|
2542
2586
|
size: "small",
|
|
2543
2587
|
onClick: d,
|
|
2544
2588
|
labelLeft: "Engine Fine Tuning",
|
|
2545
|
-
children: /* @__PURE__ */ r(
|
|
2589
|
+
children: /* @__PURE__ */ r(je, { className: "size-3", monotone: !0 })
|
|
2546
2590
|
}
|
|
2547
2591
|
),
|
|
2548
2592
|
/* @__PURE__ */ r(
|
|
2549
|
-
|
|
2593
|
+
Y,
|
|
2550
2594
|
{
|
|
2551
2595
|
spacing: { t: 2, l: 2 },
|
|
2552
2596
|
size: "small",
|
|
2553
2597
|
onClick: c,
|
|
2554
2598
|
labelLeft: "Tags",
|
|
2555
|
-
children: /* @__PURE__ */ r(
|
|
2599
|
+
children: /* @__PURE__ */ r(je, { className: "size-3", monotone: !0 })
|
|
2556
2600
|
}
|
|
2557
2601
|
)
|
|
2558
2602
|
]
|
|
2559
2603
|
}
|
|
2560
2604
|
),
|
|
2561
|
-
n !==
|
|
2562
|
-
|
|
2605
|
+
n !== Wt.PASSKEY && /* @__PURE__ */ v(
|
|
2606
|
+
P,
|
|
2563
2607
|
{
|
|
2564
2608
|
spacing: { t: 4 },
|
|
2565
2609
|
className: "prose-dark dark:prose-lighter",
|
|
2566
|
-
header: /* @__PURE__ */ r("h2", { className: "m-0", children: /* @__PURE__ */ v(
|
|
2567
|
-
/* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(
|
|
2610
|
+
header: /* @__PURE__ */ r("h2", { className: "m-0", children: /* @__PURE__ */ v(Me, { columnGap: 3, alignVertical: "center", children: [
|
|
2611
|
+
/* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(Fe, { className: "size-8" }) }),
|
|
2568
2612
|
/* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r("div", { children: w.PREFERENCES.PASSKEY_TITLE }) })
|
|
2569
2613
|
] }) }),
|
|
2570
2614
|
children: [
|
|
2571
2615
|
/* @__PURE__ */ r("p", { children: w.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
2572
2616
|
/* @__PURE__ */ r(
|
|
2573
|
-
|
|
2617
|
+
Y,
|
|
2574
2618
|
{
|
|
2575
2619
|
size: "small",
|
|
2576
2620
|
spacing: { t: 2 },
|
|
2577
2621
|
onClick: o,
|
|
2578
2622
|
labelLeft: w.PREFERENCES.PASSKEY_BUTTON,
|
|
2579
|
-
children: /* @__PURE__ */ r(
|
|
2623
|
+
children: /* @__PURE__ */ r(Fe, { className: "size-5", monotone: !0 })
|
|
2580
2624
|
}
|
|
2581
2625
|
)
|
|
2582
2626
|
]
|
|
2583
2627
|
}
|
|
2584
2628
|
)
|
|
2585
2629
|
] }) : null;
|
|
2586
|
-
},
|
|
2630
|
+
}, bn = ({
|
|
2587
2631
|
open: e,
|
|
2588
2632
|
onOpenChange: t
|
|
2589
|
-
}) => /* @__PURE__ */ r(
|
|
2590
|
-
const { state: e, dispatch: t, serverStats: o } =
|
|
2633
|
+
}) => /* @__PURE__ */ r(X, { open: e, onOpenChange: t, title: Yt, children: /* @__PURE__ */ r(fn, {}) }), Nn = () => {
|
|
2634
|
+
const { state: e, dispatch: t, serverStats: o } = V(me), [n, a] = S((e == null ? void 0 : e.engine) || ie), [s, i] = S(!1), [l, h] = S(!1), [u, m] = S(!1), [g, b] = S(!1), [d, c] = S([]), [y, T] = S(!1), [p, k] = S({
|
|
2591
2635
|
done: !1,
|
|
2592
2636
|
progress: !1,
|
|
2593
2637
|
timestamp: Date.now()
|
|
2594
2638
|
}), [E] = G({
|
|
2595
|
-
key:
|
|
2639
|
+
key: $ + ot,
|
|
2596
2640
|
initialValue: !1
|
|
2597
|
-
}), { logout:
|
|
2598
|
-
|
|
2641
|
+
}), { logout: x, getAccessToken: M, user: _ } = te(), B = () => {
|
|
2642
|
+
i(!s);
|
|
2599
2643
|
}, N = () => {
|
|
2600
2644
|
h(!l);
|
|
2601
2645
|
}, re = () => {
|
|
2602
2646
|
m(!u);
|
|
2603
|
-
},
|
|
2647
|
+
}, J = () => {
|
|
2604
2648
|
b(!g);
|
|
2605
2649
|
}, j = async (L) => {
|
|
2606
2650
|
const K = Date.now();
|
|
2607
|
-
if (L && !(!
|
|
2651
|
+
if (L && !(!_ || !e || p.progress || p.done === !0 && K - p.timestamp < 5e3)) {
|
|
2608
2652
|
k({
|
|
2609
2653
|
done: !0,
|
|
2610
2654
|
progress: !0,
|
|
@@ -2615,7 +2659,7 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2615
2659
|
accessToken: await M(),
|
|
2616
2660
|
type: F.GET_CHATS,
|
|
2617
2661
|
params: {
|
|
2618
|
-
userId:
|
|
2662
|
+
userId: _.username
|
|
2619
2663
|
}
|
|
2620
2664
|
});
|
|
2621
2665
|
A.status === 200 && (c(A.data), k({
|
|
@@ -2636,121 +2680,129 @@ const tn = "av-toggle", on = (e) => {
|
|
|
2636
2680
|
};
|
|
2637
2681
|
return U(() => {
|
|
2638
2682
|
e && e.engine && e.engine !== n && a(e.engine);
|
|
2639
|
-
}, [e, n]), /* @__PURE__ */ v(
|
|
2683
|
+
}, [e, n]), /* @__PURE__ */ v(R, { children: [
|
|
2640
2684
|
/* @__PURE__ */ r(
|
|
2641
2685
|
xt,
|
|
2642
2686
|
{
|
|
2643
2687
|
showConfirmation: y,
|
|
2644
2688
|
setShowConfirmation: T,
|
|
2645
|
-
action:
|
|
2689
|
+
action: x,
|
|
2646
2690
|
customStrings: {
|
|
2647
|
-
confirmAction:
|
|
2691
|
+
confirmAction: Ge,
|
|
2648
2692
|
cancelAction: "Cancel",
|
|
2649
|
-
title:
|
|
2693
|
+
title: Ge
|
|
2650
2694
|
},
|
|
2651
2695
|
children: /* @__PURE__ */ r("p", { children: "Are you sure you want to log out?" })
|
|
2652
2696
|
}
|
|
2653
2697
|
),
|
|
2654
|
-
/* @__PURE__ */ r(
|
|
2655
|
-
/* @__PURE__ */ r(
|
|
2698
|
+
/* @__PURE__ */ r(bn, { open: s, onOpenChange: i }),
|
|
2699
|
+
/* @__PURE__ */ r(Zr, { open: l, onOpenChange: h }),
|
|
2656
2700
|
/* @__PURE__ */ r(
|
|
2657
|
-
|
|
2701
|
+
on,
|
|
2658
2702
|
{
|
|
2659
2703
|
open: u,
|
|
2660
2704
|
onOpenChange: m,
|
|
2661
2705
|
historyData: d
|
|
2662
2706
|
}
|
|
2663
2707
|
),
|
|
2664
|
-
/* @__PURE__ */ r(
|
|
2665
|
-
/* @__PURE__ */
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
W,
|
|
2676
|
-
{
|
|
2677
|
-
label: "Profile",
|
|
2678
|
-
onClick: P,
|
|
2679
|
-
icon: /* @__PURE__ */ r(xo, {})
|
|
2680
|
-
}
|
|
2681
|
-
),
|
|
2682
|
-
/* @__PURE__ */ r(
|
|
2683
|
-
W,
|
|
2684
|
-
{
|
|
2685
|
-
label: et,
|
|
2686
|
-
onClick: N,
|
|
2687
|
-
icon: /* @__PURE__ */ r(Eo, {})
|
|
2688
|
-
}
|
|
2689
|
-
),
|
|
2690
|
-
/* @__PURE__ */ r(
|
|
2691
|
-
W,
|
|
2692
|
-
{
|
|
2693
|
-
label: "History",
|
|
2694
|
-
onClick: re,
|
|
2695
|
-
icon: /* @__PURE__ */ r(Io, {})
|
|
2696
|
-
}
|
|
2697
|
-
),
|
|
2698
|
-
/* @__PURE__ */ r(
|
|
2699
|
-
W,
|
|
2708
|
+
/* @__PURE__ */ r(jr, { open: g, onOpenChange: b }),
|
|
2709
|
+
/* @__PURE__ */ v("div", { className: "relative", children: [
|
|
2710
|
+
E && o && /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] left-[-7px]", children: /* @__PURE__ */ r(
|
|
2711
|
+
Se,
|
|
2712
|
+
{
|
|
2713
|
+
mode: "dark",
|
|
2714
|
+
focusMode: "light",
|
|
2715
|
+
trigger: /* @__PURE__ */ r(Y, { children: e && e.engine === pe ? /* @__PURE__ */ r(To, {}) : /* @__PURE__ */ r(So, {}) }),
|
|
2716
|
+
defaultPlacement: "bottom-start",
|
|
2717
|
+
children: /* @__PURE__ */ r(W, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ r(
|
|
2718
|
+
Tr,
|
|
2700
2719
|
{
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2720
|
+
size: "small",
|
|
2721
|
+
mode: "dark",
|
|
2722
|
+
focusMode: "light",
|
|
2723
|
+
value: n,
|
|
2724
|
+
onValueChange: async (L) => {
|
|
2725
|
+
if (L)
|
|
2726
|
+
try {
|
|
2727
|
+
await H({
|
|
2728
|
+
accessToken: await M(),
|
|
2729
|
+
type: F.SET_USER_PREFERENCES,
|
|
2730
|
+
params: {
|
|
2731
|
+
user: _ == null ? void 0 : _.username,
|
|
2732
|
+
engine: L
|
|
2733
|
+
}
|
|
2734
|
+
}), t({
|
|
2735
|
+
type: rt,
|
|
2736
|
+
payload: {
|
|
2737
|
+
engine: L
|
|
2738
|
+
}
|
|
2739
|
+
});
|
|
2740
|
+
} catch {
|
|
2741
|
+
}
|
|
2742
|
+
},
|
|
2743
|
+
children: o && o.engines.map((L) => /* @__PURE__ */ r(wr, { value: L }, L))
|
|
2704
2744
|
}
|
|
2705
|
-
)
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2745
|
+
) })
|
|
2746
|
+
}
|
|
2747
|
+
) }),
|
|
2748
|
+
/* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ v(
|
|
2749
|
+
Se,
|
|
2750
|
+
{
|
|
2751
|
+
mode: "dark",
|
|
2752
|
+
focusMode: "light",
|
|
2753
|
+
trigger: /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(Ro, {}) }),
|
|
2754
|
+
defaultPlacement: "bottom-end",
|
|
2755
|
+
onOpenChange: j,
|
|
2756
|
+
children: [
|
|
2757
|
+
/* @__PURE__ */ r(
|
|
2758
|
+
W,
|
|
2710
2759
|
{
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
value: n,
|
|
2715
|
-
onValueChange: async (L) => {
|
|
2716
|
-
if (L)
|
|
2717
|
-
try {
|
|
2718
|
-
await H({
|
|
2719
|
-
accessToken: await M(),
|
|
2720
|
-
type: F.SET_USER_PREFERENCES,
|
|
2721
|
-
params: {
|
|
2722
|
-
user: R == null ? void 0 : R.username,
|
|
2723
|
-
engine: L
|
|
2724
|
-
}
|
|
2725
|
-
}), t({
|
|
2726
|
-
type: rt,
|
|
2727
|
-
payload: {
|
|
2728
|
-
engine: L
|
|
2729
|
-
}
|
|
2730
|
-
});
|
|
2731
|
-
} catch {
|
|
2732
|
-
}
|
|
2733
|
-
},
|
|
2734
|
-
children: o && o.engines.map((L) => /* @__PURE__ */ r(Cr, { value: L }, L))
|
|
2760
|
+
label: "Profile",
|
|
2761
|
+
onClick: B,
|
|
2762
|
+
icon: /* @__PURE__ */ r(_o, {})
|
|
2735
2763
|
}
|
|
2736
|
-
)
|
|
2737
|
-
] }),
|
|
2738
|
-
e && e.id && !e.isComponent && /* @__PURE__ */ v(_, { children: [
|
|
2739
|
-
/* @__PURE__ */ r(Ke, {}),
|
|
2764
|
+
),
|
|
2740
2765
|
/* @__PURE__ */ r(
|
|
2741
2766
|
W,
|
|
2742
2767
|
{
|
|
2743
|
-
label:
|
|
2744
|
-
onClick:
|
|
2745
|
-
icon: /* @__PURE__ */ r(
|
|
2768
|
+
label: et,
|
|
2769
|
+
onClick: N,
|
|
2770
|
+
icon: /* @__PURE__ */ r(Eo, {})
|
|
2746
2771
|
}
|
|
2747
|
-
)
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2772
|
+
),
|
|
2773
|
+
/* @__PURE__ */ r(
|
|
2774
|
+
W,
|
|
2775
|
+
{
|
|
2776
|
+
label: "History",
|
|
2777
|
+
onClick: re,
|
|
2778
|
+
icon: /* @__PURE__ */ r(Io, {})
|
|
2779
|
+
}
|
|
2780
|
+
),
|
|
2781
|
+
/* @__PURE__ */ r(
|
|
2782
|
+
W,
|
|
2783
|
+
{
|
|
2784
|
+
label: "About",
|
|
2785
|
+
onClick: J,
|
|
2786
|
+
icon: /* @__PURE__ */ r(xo, {})
|
|
2787
|
+
}
|
|
2788
|
+
),
|
|
2789
|
+
e && e.id && !e.isComponent && /* @__PURE__ */ v(R, { children: [
|
|
2790
|
+
/* @__PURE__ */ r(Mo, {}),
|
|
2791
|
+
/* @__PURE__ */ r(
|
|
2792
|
+
W,
|
|
2793
|
+
{
|
|
2794
|
+
label: "Log out",
|
|
2795
|
+
onClick: ne,
|
|
2796
|
+
icon: /* @__PURE__ */ r("div", { className: "text-red-700", children: /* @__PURE__ */ r(wo, { monotone: !0 }) })
|
|
2797
|
+
}
|
|
2798
|
+
)
|
|
2799
|
+
] })
|
|
2800
|
+
]
|
|
2801
|
+
}
|
|
2802
|
+
) })
|
|
2803
|
+
] })
|
|
2752
2804
|
] });
|
|
2753
2805
|
};
|
|
2754
2806
|
export {
|
|
2755
|
-
|
|
2807
|
+
Nn as default
|
|
2756
2808
|
};
|