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