@versini/sassysaint 5.1.3 → 5.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{App.Da6BVUYy.js → App.BoAAv1ef.js} +418 -400
- package/dist/chunks/{LazyHeader.rYQgZPSI.js → LazyHeader.CdRVwfYZ.js} +783 -731
- package/dist/chunks/{LazyMarkdownWithExtra.8gJ4kHmJ.js → LazyMarkdownWithExtra.BRbTgvZL.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.CDMHbVPp.js → LazyMessageAssistant.cqGNC6SU.js} +8 -8
- package/dist/chunks/{index.lZ9DXn26.js → index.B6C-bgBL.js} +186 -202
- package/dist/chunks/{index.BuZgDoDD.js → index.CYw7R4Su.js} +904 -866
- package/dist/chunks/{index.BV7w1tBT.B-qjwzFk.js → index.jf7dGfT1.C4ay3jrh.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { g as _, D as I, CARDS as
|
|
3
|
-
import * as
|
|
4
|
-
import re, { forwardRef as
|
|
5
|
-
import {
|
|
1
|
+
import { jsxs as u, jsx as o, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { g as _, D as I, CARDS as y, renderDataAsList as Z, pluralize as ne, AppContext as Q, ABOUT_TITLE as qe, DEFAULT_AI_ENGINE as he, numberFormatter as Qe, durationFormatter as Me, NA as et, ROLE_ASSISTANT as tt, extractAverage as at, GPT4_MAX_TOKENS as ot, rn as j, STATS as Le, b as pe, j as $, R as z, HistoryContext as Be, LOCAL_STORAGE_PREFIX as V, LOCAL_STORAGE_SORT as nt, O as F, ACTION_RESET as rt, ACTION_RESTORE as it, truncate as st, ACTION_SORT as ie, LOCAL_STORAGE_SEARCH as lt, me as ct, ACTION_SEARCH as dt, HISTORY_TITLE as ut, ENGINE_OPENAI as se, ENGINE_ANTHROPIC as le, ACTION_ENGINE as ht, getCurrentGeoLocation as mt, LOCAL_STORAGE_TAG_SUMMARIZE as ye, LOCAL_STORAGE_TAG_PROOFREAD as ke, LOCAL_STORAGE_TAG_REPHRASE as Te, TAG_CONTENT as ce, TAGS as de, LOCAL_STORAGE_CHAT_DETAILS as gt, G as pt, v as Ce, PROFILE_TITLE as ft, LOG_OUT as Ne } from "./index.CYw7R4Su.js";
|
|
3
|
+
import * as me from "react";
|
|
4
|
+
import re, { forwardRef as Oe, useState as E, useRef as J, useContext as M, useEffect as H, Suspense as bt, lazy as vt, useId as yt, useMemo as kt } from "react";
|
|
5
|
+
import { serviceCall as B, SERVICE_TYPES as O, E as G, f as S, ce as Tt, ge as Ct, me as ue, ie as R, ue as Nt, be as Et, he as wt, we as Ee } from "./index.B6C-bgBL.js";
|
|
6
6
|
import f from "clsx";
|
|
7
|
-
import { useFloatingTree as
|
|
8
|
-
const
|
|
7
|
+
import { useFloatingTree as He, useFloatingNodeId as xt, useListItem as De, useFloating as It, offset as St, flip as _t, shift as At, autoUpdate as Rt, useClick as Mt, useRole as Lt, useDismiss as Bt, useListNavigation as Ot, useTypeahead as Ht, useInteractions as Dt, useMergeRefs as Pe, FloatingNode as Pt, FloatingList as zt, FloatingPortal as Vt, FloatingFocusManager as Ft, FloatingTree as Gt } from "@floating-ui/react";
|
|
8
|
+
const Ut = ({
|
|
9
9
|
className: e,
|
|
10
10
|
viewBox: t,
|
|
11
11
|
spacing: a,
|
|
12
|
-
title:
|
|
13
|
-
monotone:
|
|
12
|
+
title: n,
|
|
13
|
+
monotone: r,
|
|
14
14
|
...i
|
|
15
|
-
}) => /* @__PURE__ */
|
|
15
|
+
}) => /* @__PURE__ */ u(
|
|
16
16
|
_,
|
|
17
17
|
{
|
|
18
18
|
defaultViewBox: "0 0 512 512",
|
|
@@ -20,27 +20,27 @@ const Vt = ({
|
|
|
20
20
|
viewBox: t,
|
|
21
21
|
className: e,
|
|
22
22
|
spacing: a,
|
|
23
|
-
title:
|
|
23
|
+
title: n || "Back",
|
|
24
24
|
...i,
|
|
25
25
|
children: [
|
|
26
26
|
/* @__PURE__ */ o(
|
|
27
27
|
"path",
|
|
28
28
|
{
|
|
29
|
-
opacity:
|
|
29
|
+
opacity: r ? "1" : "0.4",
|
|
30
30
|
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"
|
|
31
31
|
}
|
|
32
32
|
),
|
|
33
33
|
/* @__PURE__ */ o("path", { d: "M32 0H192c17.7 0 32 14.3 32 32s-14.3 32-32 32H109.3L342.6 297.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3V192c0 17.7-14.3 32-32 32s-32-14.3-32-32V32C0 14.3 14.3 0 32 0z" })
|
|
34
34
|
]
|
|
35
35
|
}
|
|
36
|
-
),
|
|
36
|
+
), $t = ({
|
|
37
37
|
className: e,
|
|
38
38
|
viewBox: t,
|
|
39
39
|
spacing: a,
|
|
40
|
-
title:
|
|
41
|
-
monotone:
|
|
40
|
+
title: n,
|
|
41
|
+
monotone: r,
|
|
42
42
|
...i
|
|
43
|
-
}) => /* @__PURE__ */
|
|
43
|
+
}) => /* @__PURE__ */ u(
|
|
44
44
|
_,
|
|
45
45
|
{
|
|
46
46
|
defaultViewBox: "0 0 448 512",
|
|
@@ -48,27 +48,27 @@ const Vt = ({
|
|
|
48
48
|
viewBox: t,
|
|
49
49
|
className: e,
|
|
50
50
|
spacing: a,
|
|
51
|
-
title:
|
|
51
|
+
title: n || "Chart",
|
|
52
52
|
...i,
|
|
53
53
|
children: [
|
|
54
54
|
/* @__PURE__ */ o(
|
|
55
55
|
"path",
|
|
56
56
|
{
|
|
57
|
-
opacity:
|
|
57
|
+
opacity: r ? "1" : "0.4",
|
|
58
58
|
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"
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
61
|
/* @__PURE__ */ o("path", { d: "M368 96c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V144c0-26.5-21.5-48-48-48H368zM48 224c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48H48z" })
|
|
62
62
|
]
|
|
63
63
|
}
|
|
64
|
-
),
|
|
64
|
+
), jt = ({
|
|
65
65
|
className: e,
|
|
66
66
|
viewBox: t,
|
|
67
67
|
spacing: a,
|
|
68
|
-
title:
|
|
69
|
-
monotone:
|
|
68
|
+
title: n,
|
|
69
|
+
monotone: r,
|
|
70
70
|
...i
|
|
71
|
-
}) => /* @__PURE__ */
|
|
71
|
+
}) => /* @__PURE__ */ u(
|
|
72
72
|
_,
|
|
73
73
|
{
|
|
74
74
|
defaultViewBox: "0 0 448 512",
|
|
@@ -76,27 +76,27 @@ const Vt = ({
|
|
|
76
76
|
viewBox: t,
|
|
77
77
|
className: e,
|
|
78
78
|
spacing: a,
|
|
79
|
-
title:
|
|
79
|
+
title: n || "Delete",
|
|
80
80
|
...i,
|
|
81
81
|
children: [
|
|
82
82
|
/* @__PURE__ */ o(
|
|
83
83
|
"path",
|
|
84
84
|
{
|
|
85
|
-
opacity:
|
|
85
|
+
opacity: r ? "1" : "0.4",
|
|
86
86
|
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"
|
|
87
87
|
}
|
|
88
88
|
),
|
|
89
89
|
/* @__PURE__ */ o("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8z" })
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
|
-
),
|
|
92
|
+
), we = ({
|
|
93
93
|
className: e,
|
|
94
94
|
viewBox: t,
|
|
95
95
|
spacing: a,
|
|
96
|
-
title:
|
|
97
|
-
monotone:
|
|
96
|
+
title: n,
|
|
97
|
+
monotone: r,
|
|
98
98
|
...i
|
|
99
|
-
}) => /* @__PURE__ */
|
|
99
|
+
}) => /* @__PURE__ */ u(
|
|
100
100
|
_,
|
|
101
101
|
{
|
|
102
102
|
defaultViewBox: "0 0 512 512",
|
|
@@ -104,27 +104,27 @@ const Vt = ({
|
|
|
104
104
|
viewBox: t,
|
|
105
105
|
className: e,
|
|
106
106
|
spacing: a,
|
|
107
|
-
title:
|
|
107
|
+
title: n || "Edit",
|
|
108
108
|
...i,
|
|
109
109
|
children: [
|
|
110
110
|
/* @__PURE__ */ o(
|
|
111
111
|
"path",
|
|
112
112
|
{
|
|
113
|
-
opacity:
|
|
113
|
+
opacity: r ? "1" : "0.4",
|
|
114
114
|
d: "M0 160c0-53 43-96 96-96h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32 14.3-32 32V416c0 17.7 14.3 32 32 32H352c17.7 0 32-14.3 32-32V320c0-17.7 14.3-32 32-32s32 14.3 32 32v96c0 53-43 96-96 96H96c-53 0-96-43-96-96V160z"
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
117
|
/* @__PURE__ */ o("path", { d: "M392.4 21.7L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0zM339.7 74.3L172.4 241.7c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3z" })
|
|
118
118
|
]
|
|
119
119
|
}
|
|
120
|
-
),
|
|
120
|
+
), Wt = ({
|
|
121
121
|
className: e,
|
|
122
122
|
viewBox: t,
|
|
123
123
|
spacing: a,
|
|
124
|
-
title:
|
|
125
|
-
monotone:
|
|
124
|
+
title: n,
|
|
125
|
+
monotone: r,
|
|
126
126
|
...i
|
|
127
|
-
}) => /* @__PURE__ */
|
|
127
|
+
}) => /* @__PURE__ */ u(
|
|
128
128
|
_,
|
|
129
129
|
{
|
|
130
130
|
defaultViewBox: "0 0 512 512",
|
|
@@ -132,27 +132,27 @@ const Vt = ({
|
|
|
132
132
|
viewBox: t,
|
|
133
133
|
className: e,
|
|
134
134
|
spacing: a,
|
|
135
|
-
title:
|
|
135
|
+
title: n || "History",
|
|
136
136
|
...i,
|
|
137
137
|
children: [
|
|
138
138
|
/* @__PURE__ */ o(
|
|
139
139
|
"path",
|
|
140
140
|
{
|
|
141
|
-
opacity:
|
|
141
|
+
opacity: r ? "1" : "0.4",
|
|
142
142
|
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"
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
145
|
/* @__PURE__ */ o("path", { d: "M256 128c13.3 0 24 10.7 24 24v94.1l65 65c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72c-4.5-4.5-7-10.6-7-17V152c0-13.3 10.7-24 24-24z" })
|
|
146
146
|
]
|
|
147
147
|
}
|
|
148
|
-
),
|
|
148
|
+
), Yt = ({
|
|
149
149
|
className: e,
|
|
150
150
|
viewBox: t,
|
|
151
151
|
spacing: a,
|
|
152
|
-
title:
|
|
153
|
-
monotone:
|
|
152
|
+
title: n,
|
|
153
|
+
monotone: r,
|
|
154
154
|
...i
|
|
155
|
-
}) => /* @__PURE__ */
|
|
155
|
+
}) => /* @__PURE__ */ u(
|
|
156
156
|
_,
|
|
157
157
|
{
|
|
158
158
|
defaultViewBox: "0 0 512 512",
|
|
@@ -160,7 +160,7 @@ const Vt = ({
|
|
|
160
160
|
viewBox: t,
|
|
161
161
|
className: e,
|
|
162
162
|
spacing: a,
|
|
163
|
-
title:
|
|
163
|
+
title: n || "Info",
|
|
164
164
|
...i,
|
|
165
165
|
children: [
|
|
166
166
|
/* @__PURE__ */ o(
|
|
@@ -173,14 +173,14 @@ const Vt = ({
|
|
|
173
173
|
/* @__PURE__ */ o("path", { d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM192 248c0-13.3 10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h24V272H216c-13.3 0-24-10.7-24-24z" })
|
|
174
174
|
]
|
|
175
175
|
}
|
|
176
|
-
),
|
|
176
|
+
), Kt = ({
|
|
177
177
|
className: e,
|
|
178
178
|
viewBox: t,
|
|
179
179
|
spacing: a,
|
|
180
|
-
title:
|
|
181
|
-
monotone:
|
|
180
|
+
title: n,
|
|
181
|
+
monotone: r,
|
|
182
182
|
...i
|
|
183
|
-
}) => /* @__PURE__ */
|
|
183
|
+
}) => /* @__PURE__ */ u(
|
|
184
184
|
_,
|
|
185
185
|
{
|
|
186
186
|
defaultViewBox: "0 0 576 512",
|
|
@@ -188,7 +188,7 @@ const Vt = ({
|
|
|
188
188
|
viewBox: t,
|
|
189
189
|
className: e,
|
|
190
190
|
spacing: a,
|
|
191
|
-
title:
|
|
191
|
+
title: n || "Profile",
|
|
192
192
|
...i,
|
|
193
193
|
children: [
|
|
194
194
|
/* @__PURE__ */ o(
|
|
@@ -201,14 +201,14 @@ const Vt = ({
|
|
|
201
201
|
/* @__PURE__ */ o("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
|
|
202
202
|
]
|
|
203
203
|
}
|
|
204
|
-
),
|
|
204
|
+
), Xt = ({
|
|
205
205
|
className: e,
|
|
206
206
|
viewBox: t,
|
|
207
207
|
spacing: a,
|
|
208
|
-
title:
|
|
209
|
-
monotone:
|
|
208
|
+
title: n,
|
|
209
|
+
monotone: r,
|
|
210
210
|
...i
|
|
211
|
-
}) => /* @__PURE__ */
|
|
211
|
+
}) => /* @__PURE__ */ u(
|
|
212
212
|
_,
|
|
213
213
|
{
|
|
214
214
|
defaultViewBox: "0 0 512 512",
|
|
@@ -216,25 +216,25 @@ const Vt = ({
|
|
|
216
216
|
viewBox: t,
|
|
217
217
|
className: e,
|
|
218
218
|
spacing: a,
|
|
219
|
-
title:
|
|
219
|
+
title: n || "Restore",
|
|
220
220
|
...i,
|
|
221
221
|
children: [
|
|
222
222
|
/* @__PURE__ */ o(
|
|
223
223
|
"path",
|
|
224
224
|
{
|
|
225
|
-
opacity:
|
|
225
|
+
opacity: r ? "1" : "0.4",
|
|
226
226
|
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"
|
|
227
227
|
}
|
|
228
228
|
),
|
|
229
229
|
/* @__PURE__ */ o("path", { d: "M64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H64zm32 64H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z" })
|
|
230
230
|
]
|
|
231
231
|
}
|
|
232
|
-
),
|
|
232
|
+
), Zt = ({
|
|
233
233
|
className: e,
|
|
234
234
|
viewBox: t,
|
|
235
235
|
spacing: a,
|
|
236
|
-
title:
|
|
237
|
-
monotone:
|
|
236
|
+
title: n,
|
|
237
|
+
monotone: r,
|
|
238
238
|
...i
|
|
239
239
|
}) => /* @__PURE__ */ o(
|
|
240
240
|
_,
|
|
@@ -244,11 +244,11 @@ const Vt = ({
|
|
|
244
244
|
viewBox: t,
|
|
245
245
|
className: e,
|
|
246
246
|
spacing: a,
|
|
247
|
-
title:
|
|
247
|
+
title: n || "Settings",
|
|
248
248
|
...i,
|
|
249
249
|
children: /* @__PURE__ */ o("path", { d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" })
|
|
250
250
|
}
|
|
251
|
-
),
|
|
251
|
+
), ge = me.createContext({
|
|
252
252
|
getItemProps: () => ({}),
|
|
253
253
|
activeIndex: null,
|
|
254
254
|
/* v8 ignore next 2 */
|
|
@@ -257,7 +257,7 @@ const Vt = ({
|
|
|
257
257
|
setHasFocusInside: () => {
|
|
258
258
|
},
|
|
259
259
|
isOpen: !1
|
|
260
|
-
}),
|
|
260
|
+
}), xe = (e) => {
|
|
261
261
|
if (typeof e == "string")
|
|
262
262
|
return e;
|
|
263
263
|
if (typeof e == "function")
|
|
@@ -268,84 +268,84 @@ const Vt = ({
|
|
|
268
268
|
return t.displayName || t.name || "Component";
|
|
269
269
|
}
|
|
270
270
|
return "Element";
|
|
271
|
-
},
|
|
271
|
+
}, ze = Oe(
|
|
272
272
|
({
|
|
273
273
|
trigger: e,
|
|
274
274
|
children: t,
|
|
275
275
|
label: a = "Open menu",
|
|
276
|
-
defaultPlacement:
|
|
277
|
-
onOpenChange:
|
|
276
|
+
defaultPlacement: n = "bottom-start",
|
|
277
|
+
onOpenChange: r,
|
|
278
278
|
spacing: i,
|
|
279
|
-
mode:
|
|
280
|
-
focusMode:
|
|
281
|
-
...
|
|
279
|
+
mode: s = "system",
|
|
280
|
+
focusMode: c = "system",
|
|
281
|
+
...m
|
|
282
282
|
}, d) => {
|
|
283
|
-
const [
|
|
284
|
-
nodeId:
|
|
285
|
-
open:
|
|
286
|
-
onOpenChange: (
|
|
287
|
-
|
|
283
|
+
const [h, l] = E(!1), [g, v] = E(!1), [b, T] = E(null), C = J([]), p = J([]), k = M(ge), N = He(), w = xt(), L = De(), { floatingStyles: W, refs: te, context: A } = It({
|
|
284
|
+
nodeId: w,
|
|
285
|
+
open: h,
|
|
286
|
+
onOpenChange: (K) => {
|
|
287
|
+
l(K), r == null || r(K);
|
|
288
288
|
},
|
|
289
|
-
placement:
|
|
289
|
+
placement: n,
|
|
290
290
|
strategy: "fixed",
|
|
291
|
-
middleware: [
|
|
292
|
-
whileElementsMounted:
|
|
293
|
-
}),
|
|
291
|
+
middleware: [St({ mainAxis: 10 }), _t(), At()],
|
|
292
|
+
whileElementsMounted: Rt
|
|
293
|
+
}), ae = Mt(A, {
|
|
294
294
|
event: "mousedown",
|
|
295
295
|
toggle: !0,
|
|
296
296
|
ignoreMouse: !1
|
|
297
|
-
}),
|
|
298
|
-
listRef:
|
|
299
|
-
activeIndex:
|
|
297
|
+
}), Y = Lt(A, { role: "menu" }), $e = Bt(A, { bubbles: !0 }), je = Ot(A, {
|
|
298
|
+
listRef: C,
|
|
299
|
+
activeIndex: b,
|
|
300
300
|
nested: !1,
|
|
301
|
-
onNavigate:
|
|
301
|
+
onNavigate: T,
|
|
302
302
|
loop: !0
|
|
303
|
-
}),
|
|
304
|
-
listRef:
|
|
305
|
-
onMatch:
|
|
306
|
-
activeIndex:
|
|
307
|
-
}), { getReferenceProps:
|
|
308
|
-
noInternalClick:
|
|
309
|
-
focusMode:
|
|
310
|
-
mode:
|
|
303
|
+
}), We = Ht(A, {
|
|
304
|
+
listRef: p,
|
|
305
|
+
onMatch: h ? T : void 0,
|
|
306
|
+
activeIndex: b
|
|
307
|
+
}), { getReferenceProps: Ye, getFloatingProps: Ke, getItemProps: Xe } = Dt([ae, Y, $e, je, We]), ve = xe(e) === "Button" || xe(e) === "ButtonIcon", Ze = ve ? {
|
|
308
|
+
noInternalClick: ve,
|
|
309
|
+
focusMode: c,
|
|
310
|
+
mode: s,
|
|
311
311
|
spacing: i
|
|
312
|
-
} : {},
|
|
313
|
-
...
|
|
312
|
+
} : {}, Je = re.cloneElement(e, {
|
|
313
|
+
...Ze,
|
|
314
314
|
"aria-label": a,
|
|
315
|
-
"data-open":
|
|
316
|
-
"data-focus-inside":
|
|
317
|
-
ref:
|
|
318
|
-
...
|
|
319
|
-
|
|
320
|
-
...
|
|
315
|
+
"data-open": h ? "" : void 0,
|
|
316
|
+
"data-focus-inside": g ? "" : void 0,
|
|
317
|
+
ref: Pe([te.setReference, L.ref, d]),
|
|
318
|
+
...Ye(
|
|
319
|
+
k.getItemProps({
|
|
320
|
+
...m
|
|
321
321
|
})
|
|
322
322
|
)
|
|
323
323
|
});
|
|
324
|
-
return
|
|
324
|
+
return H(() => {
|
|
325
325
|
if (!N)
|
|
326
326
|
return;
|
|
327
|
-
function
|
|
328
|
-
|
|
327
|
+
function K() {
|
|
328
|
+
l(!1), r == null || r(!1);
|
|
329
329
|
}
|
|
330
|
-
return N.events.on("click",
|
|
331
|
-
N.events.off("click",
|
|
330
|
+
return N.events.on("click", K), () => {
|
|
331
|
+
N.events.off("click", K);
|
|
332
332
|
};
|
|
333
|
-
}, [N,
|
|
334
|
-
|
|
335
|
-
}, [N,
|
|
336
|
-
|
|
333
|
+
}, [N, r]), H(() => {
|
|
334
|
+
h && N && N.events.emit("menuopen", { nodeId: w });
|
|
335
|
+
}, [N, h, w]), /* @__PURE__ */ u(Pt, { id: w, children: [
|
|
336
|
+
Je,
|
|
337
337
|
/* @__PURE__ */ o(
|
|
338
|
-
|
|
338
|
+
ge.Provider,
|
|
339
339
|
{
|
|
340
340
|
value: {
|
|
341
|
-
activeIndex:
|
|
342
|
-
setActiveIndex:
|
|
343
|
-
getItemProps:
|
|
344
|
-
setHasFocusInside:
|
|
345
|
-
isOpen:
|
|
341
|
+
activeIndex: b,
|
|
342
|
+
setActiveIndex: T,
|
|
343
|
+
getItemProps: Xe,
|
|
344
|
+
setHasFocusInside: v,
|
|
345
|
+
isOpen: h
|
|
346
346
|
},
|
|
347
|
-
children: /* @__PURE__ */ o(
|
|
348
|
-
|
|
347
|
+
children: /* @__PURE__ */ o(zt, { elementsRef: C, labelsRef: p, children: h && /* @__PURE__ */ o(Vt, { children: /* @__PURE__ */ o(
|
|
348
|
+
Ft,
|
|
349
349
|
{
|
|
350
350
|
context: A,
|
|
351
351
|
modal: !1,
|
|
@@ -354,10 +354,10 @@ const Vt = ({
|
|
|
354
354
|
children: /* @__PURE__ */ o(
|
|
355
355
|
"div",
|
|
356
356
|
{
|
|
357
|
-
ref:
|
|
357
|
+
ref: te.setFloating,
|
|
358
358
|
className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
|
|
359
|
-
style:
|
|
360
|
-
...
|
|
359
|
+
style: W,
|
|
360
|
+
...Ke(),
|
|
361
361
|
children: t
|
|
362
362
|
}
|
|
363
363
|
)
|
|
@@ -367,28 +367,28 @@ const Vt = ({
|
|
|
367
367
|
)
|
|
368
368
|
] });
|
|
369
369
|
}
|
|
370
|
-
),
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
const i =
|
|
375
|
-
return /* @__PURE__ */
|
|
370
|
+
), Ve = Oe((e, t) => /* @__PURE__ */ o(Gt, { children: /* @__PURE__ */ o(ze, { ...e, ref: t }) }));
|
|
371
|
+
Ve.displayName = "Menu";
|
|
372
|
+
ze.displayName = "MenuComponent";
|
|
373
|
+
const P = me.forwardRef(({ label: e, disabled: t, icon: a, ...n }, r) => {
|
|
374
|
+
const i = me.useContext(ge), s = De({ label: t ? null : e }), c = He();
|
|
375
|
+
return /* @__PURE__ */ u(
|
|
376
376
|
"button",
|
|
377
377
|
{
|
|
378
|
-
...
|
|
379
|
-
ref:
|
|
378
|
+
...n,
|
|
379
|
+
ref: Pe([s.ref, r]),
|
|
380
380
|
role: "menuitem",
|
|
381
381
|
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",
|
|
382
382
|
tabIndex: 0,
|
|
383
383
|
disabled: t,
|
|
384
384
|
...i.getItemProps({
|
|
385
|
-
onClick(
|
|
385
|
+
onClick(m) {
|
|
386
386
|
var d;
|
|
387
|
-
(d =
|
|
387
|
+
(d = n.onClick) == null || d.call(n, m), c == null || c.events.emit("click");
|
|
388
388
|
},
|
|
389
|
-
onFocus(
|
|
389
|
+
onFocus(m) {
|
|
390
390
|
var d;
|
|
391
|
-
(d =
|
|
391
|
+
(d = n.onFocus) == null || d.call(n, m), i.setHasFocusInside(!0);
|
|
392
392
|
}
|
|
393
393
|
}),
|
|
394
394
|
children: [
|
|
@@ -398,8 +398,8 @@ const D = de.forwardRef(({ label: e, disabled: t, icon: a, ...r }, n) => {
|
|
|
398
398
|
}
|
|
399
399
|
);
|
|
400
400
|
});
|
|
401
|
-
|
|
402
|
-
const
|
|
401
|
+
P.displayName = "MenuItem";
|
|
402
|
+
const Jt = ({ className: e, ...t }) => {
|
|
403
403
|
const a = f(e, "my-1 border-t border-border-medium");
|
|
404
404
|
return /* @__PURE__ */ o("div", { className: a, ...t });
|
|
405
405
|
};
|
|
@@ -417,19 +417,19 @@ try {
|
|
|
417
417
|
} catch {
|
|
418
418
|
}
|
|
419
419
|
/*!
|
|
420
|
-
@versini/ui-panel v1.0.
|
|
420
|
+
@versini/ui-panel v1.0.12
|
|
421
421
|
© 2024 gizmette.com
|
|
422
422
|
*/
|
|
423
423
|
try {
|
|
424
424
|
window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
|
|
425
|
-
version: "1.0.
|
|
426
|
-
buildTime: "
|
|
425
|
+
version: "1.0.12",
|
|
426
|
+
buildTime: "10/02/2024 06:10 PM EDT",
|
|
427
427
|
homepage: "https://github.com/aversini/ui-components",
|
|
428
428
|
license: "MIT"
|
|
429
429
|
});
|
|
430
430
|
} catch {
|
|
431
431
|
}
|
|
432
|
-
const
|
|
432
|
+
const Ie = "av-messagebox", Se = "av-panel", _e = "av-button", qt = (e) => {
|
|
433
433
|
let t = "";
|
|
434
434
|
if (typeof e == "number" || typeof e == "string")
|
|
435
435
|
t = "m-" + e;
|
|
@@ -438,49 +438,49 @@ const we = "av-messagebox", Ee = "av-panel", Se = "av-button", Xt = (e) => {
|
|
|
438
438
|
(e == null ? void 0 : e.t) !== void 0 && a.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && a.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && a.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && a.push(`ml-${e.l}`), t = a.join(" ");
|
|
439
439
|
}
|
|
440
440
|
return t;
|
|
441
|
-
},
|
|
441
|
+
}, fe = "icon", Qt = "button", ea = "link", ta = ({
|
|
442
442
|
type: e,
|
|
443
443
|
size: t,
|
|
444
444
|
labelRight: a,
|
|
445
|
-
labelLeft:
|
|
446
|
-
align:
|
|
445
|
+
labelLeft: n,
|
|
446
|
+
align: r
|
|
447
447
|
}) => {
|
|
448
|
-
const i = "text-sm font-medium max-h-8 py-0",
|
|
448
|
+
const i = "text-sm font-medium max-h-8 py-0", s = "text-base font-medium max-h-9 py-1", c = "text-lg font-medium max-h-12 py-2";
|
|
449
449
|
switch (e) {
|
|
450
|
-
case
|
|
450
|
+
case Qt:
|
|
451
451
|
return f("px-4", {
|
|
452
452
|
[i]: t === "small",
|
|
453
|
-
[
|
|
454
|
-
[
|
|
453
|
+
[s]: t === "medium",
|
|
454
|
+
[c]: t === "large"
|
|
455
455
|
});
|
|
456
|
-
case
|
|
456
|
+
case ea:
|
|
457
457
|
return f("px-4 text-center", {
|
|
458
458
|
[i]: t === "small",
|
|
459
|
-
[
|
|
460
|
-
[
|
|
459
|
+
[s]: t === "medium",
|
|
460
|
+
[c]: t === "large"
|
|
461
461
|
});
|
|
462
|
-
case
|
|
462
|
+
case fe:
|
|
463
463
|
return f("inline-flex items-center", {
|
|
464
|
-
"justify-center":
|
|
465
|
-
"justify-start":
|
|
466
|
-
"justify-end":
|
|
467
|
-
"h-6 w-6 p-0": t === "small" && !(a ||
|
|
468
|
-
"h-6 px-4 text-sm font-medium": t === "small" && (a ||
|
|
469
|
-
"h-8 w-8 p-1": t === "medium" && !(a ||
|
|
470
|
-
"h-8 px-4 text-base font-medium": t === "medium" && (a ||
|
|
471
|
-
"h-12 w-12 p-2": t === "large" && !(a ||
|
|
472
|
-
"h-12 px-4 text-lg font-medium": t === "large" && (a ||
|
|
464
|
+
"justify-center": r === "center",
|
|
465
|
+
"justify-start": r === "left",
|
|
466
|
+
"justify-end": r === "right",
|
|
467
|
+
"h-6 w-6 p-0": t === "small" && !(a || n),
|
|
468
|
+
"h-6 px-4 text-sm font-medium": t === "small" && (a || n),
|
|
469
|
+
"h-8 w-8 p-1": t === "medium" && !(a || n),
|
|
470
|
+
"h-8 px-4 text-base font-medium": t === "medium" && (a || n),
|
|
471
|
+
"h-12 w-12 p-2": t === "large" && !(a || n),
|
|
472
|
+
"h-12 px-4 text-lg font-medium": t === "large" && (a || n)
|
|
473
473
|
});
|
|
474
474
|
}
|
|
475
|
-
},
|
|
475
|
+
}, aa = ({
|
|
476
476
|
mode: e,
|
|
477
477
|
noBackground: t,
|
|
478
478
|
noTruncate: a,
|
|
479
|
-
variant:
|
|
479
|
+
variant: n
|
|
480
480
|
}) => {
|
|
481
481
|
if (t)
|
|
482
482
|
return "not-prose rounded-full";
|
|
483
|
-
if (
|
|
483
|
+
if (n === "primary")
|
|
484
484
|
return f("not-prose rounded-full", {
|
|
485
485
|
truncate: !a,
|
|
486
486
|
"bg-action-dark text-copy-light": e === "dark",
|
|
@@ -488,7 +488,7 @@ const we = "av-messagebox", Ee = "av-panel", Se = "av-button", Xt = (e) => {
|
|
|
488
488
|
"bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "system",
|
|
489
489
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
|
|
490
490
|
});
|
|
491
|
-
if (
|
|
491
|
+
if (n === "secondary")
|
|
492
492
|
return f("not-prose rounded-full", {
|
|
493
493
|
truncate: !a,
|
|
494
494
|
"bg-action-dark text-copy-light": e === "light",
|
|
@@ -496,7 +496,7 @@ const we = "av-messagebox", Ee = "av-panel", Se = "av-button", Xt = (e) => {
|
|
|
496
496
|
"bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "alt-system",
|
|
497
497
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
|
|
498
498
|
});
|
|
499
|
-
if (
|
|
499
|
+
if (n === "danger")
|
|
500
500
|
return f("not-prose rounded-full", {
|
|
501
501
|
truncate: !a,
|
|
502
502
|
"bg-action-danger-dark text-copy-light": e === "dark",
|
|
@@ -504,7 +504,7 @@ const we = "av-messagebox", Ee = "av-panel", Se = "av-button", Xt = (e) => {
|
|
|
504
504
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
505
505
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
506
506
|
});
|
|
507
|
-
},
|
|
507
|
+
}, oa = ({
|
|
508
508
|
mode: e,
|
|
509
509
|
disabled: t,
|
|
510
510
|
variant: a
|
|
@@ -532,7 +532,7 @@ const we = "av-messagebox", Ee = "av-panel", Se = "av-button", Xt = (e) => {
|
|
|
532
532
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
533
533
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
534
534
|
});
|
|
535
|
-
},
|
|
535
|
+
}, na = ({
|
|
536
536
|
mode: e,
|
|
537
537
|
disabled: t,
|
|
538
538
|
variant: a
|
|
@@ -560,7 +560,7 @@ const we = "av-messagebox", Ee = "av-panel", Se = "av-button", Xt = (e) => {
|
|
|
560
560
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
561
561
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
562
562
|
});
|
|
563
|
-
},
|
|
563
|
+
}, ra = ({
|
|
564
564
|
mode: e,
|
|
565
565
|
noBorder: t,
|
|
566
566
|
variant: a
|
|
@@ -588,120 +588,120 @@ const we = "av-messagebox", Ee = "av-panel", Se = "av-button", Xt = (e) => {
|
|
|
588
588
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
589
589
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
590
590
|
});
|
|
591
|
-
},
|
|
591
|
+
}, ia = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
592
592
|
"focus:outline-focus-dark": e === "dark",
|
|
593
593
|
"focus:outline-focus-light": e === "light",
|
|
594
594
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
595
595
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
596
|
-
}),
|
|
596
|
+
}), Fe = ({
|
|
597
597
|
type: e,
|
|
598
598
|
className: t,
|
|
599
599
|
raw: a,
|
|
600
|
-
mode:
|
|
601
|
-
focusMode:
|
|
600
|
+
mode: n,
|
|
601
|
+
focusMode: r,
|
|
602
602
|
disabled: i,
|
|
603
|
-
fullWidth:
|
|
604
|
-
size:
|
|
605
|
-
noBorder:
|
|
603
|
+
fullWidth: s,
|
|
604
|
+
size: c,
|
|
605
|
+
noBorder: m,
|
|
606
606
|
labelRight: d,
|
|
607
|
-
labelLeft:
|
|
608
|
-
spacing:
|
|
609
|
-
noBackground:
|
|
610
|
-
variant:
|
|
611
|
-
noTruncate:
|
|
612
|
-
align:
|
|
613
|
-
}) => (
|
|
614
|
-
|
|
607
|
+
labelLeft: h,
|
|
608
|
+
spacing: l,
|
|
609
|
+
noBackground: g,
|
|
610
|
+
variant: v,
|
|
611
|
+
noTruncate: b,
|
|
612
|
+
align: T
|
|
613
|
+
}) => (v || (v = "primary"), a ? f(_e, t) : f(
|
|
614
|
+
_e,
|
|
615
615
|
t,
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
616
|
+
qt(l),
|
|
617
|
+
aa({ mode: n, variant: v, noBackground: g, noTruncate: b }),
|
|
618
|
+
ta({ type: e, size: c, labelRight: d, labelLeft: h, align: T }),
|
|
619
|
+
ra({ mode: n, variant: v, noBorder: m }),
|
|
620
|
+
ia({ focusMode: r }),
|
|
621
|
+
oa({ mode: n, variant: v, disabled: i }),
|
|
622
|
+
na({ mode: n, variant: v, disabled: i }),
|
|
623
623
|
{
|
|
624
|
-
"w-full":
|
|
624
|
+
"w-full": s,
|
|
625
625
|
"disabled:cursor-not-allowed disabled:opacity-50": i
|
|
626
626
|
}
|
|
627
|
-
)),
|
|
628
|
-
var
|
|
629
|
-
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((
|
|
630
|
-
},
|
|
631
|
-
const { onClick: a, noInternalClick:
|
|
627
|
+
)), sa = (e, t, a) => {
|
|
628
|
+
var n;
|
|
629
|
+
!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 a == "function" && a(e);
|
|
630
|
+
}, be = re.forwardRef((e, t) => {
|
|
631
|
+
const { onClick: a, noInternalClick: n = !1, ...r } = e;
|
|
632
632
|
return /* @__PURE__ */ o(
|
|
633
633
|
"button",
|
|
634
634
|
{
|
|
635
635
|
ref: t,
|
|
636
636
|
onClick: (i) => {
|
|
637
|
-
|
|
637
|
+
sa(i, n, a);
|
|
638
638
|
},
|
|
639
|
-
...
|
|
639
|
+
...r
|
|
640
640
|
}
|
|
641
641
|
);
|
|
642
642
|
});
|
|
643
|
-
|
|
644
|
-
const
|
|
643
|
+
be.displayName = "BaseButton";
|
|
644
|
+
const Ge = re.forwardRef(
|
|
645
645
|
({
|
|
646
646
|
children: e,
|
|
647
647
|
disabled: t = !1,
|
|
648
648
|
mode: a = "system",
|
|
649
|
-
focusMode:
|
|
650
|
-
fullWidth:
|
|
649
|
+
focusMode: n = "system",
|
|
650
|
+
fullWidth: r = !1,
|
|
651
651
|
className: i,
|
|
652
|
-
type:
|
|
653
|
-
raw:
|
|
654
|
-
noBorder:
|
|
652
|
+
type: s = "button",
|
|
653
|
+
raw: c = !1,
|
|
654
|
+
noBorder: m = !1,
|
|
655
655
|
"aria-label": d,
|
|
656
|
-
label:
|
|
657
|
-
size:
|
|
658
|
-
labelRight:
|
|
659
|
-
labelLeft:
|
|
660
|
-
spacing:
|
|
661
|
-
noBackground:
|
|
662
|
-
align:
|
|
663
|
-
...
|
|
664
|
-
},
|
|
665
|
-
const N =
|
|
666
|
-
type:
|
|
656
|
+
label: h,
|
|
657
|
+
size: l = "medium",
|
|
658
|
+
labelRight: g,
|
|
659
|
+
labelLeft: v,
|
|
660
|
+
spacing: b,
|
|
661
|
+
noBackground: T = !1,
|
|
662
|
+
align: C = "center",
|
|
663
|
+
...p
|
|
664
|
+
}, k) => {
|
|
665
|
+
const N = Fe({
|
|
666
|
+
type: fe,
|
|
667
667
|
mode: a,
|
|
668
|
-
focusMode:
|
|
669
|
-
fullWidth:
|
|
668
|
+
focusMode: n,
|
|
669
|
+
fullWidth: r,
|
|
670
670
|
disabled: t,
|
|
671
|
-
raw:
|
|
671
|
+
raw: c,
|
|
672
672
|
className: i,
|
|
673
|
-
noBorder:
|
|
674
|
-
size:
|
|
675
|
-
labelRight:
|
|
676
|
-
labelLeft:
|
|
677
|
-
spacing:
|
|
678
|
-
noBackground:
|
|
679
|
-
align:
|
|
680
|
-
}),
|
|
681
|
-
"text-copy-accent-dark": a === "light" && !
|
|
682
|
-
"text-copy-light": a === "dark" && !
|
|
683
|
-
"text-copy-accent-dark dark:text-copy-light": a === "alt-system" && !
|
|
684
|
-
"text-copy-light dark:text-copy-accent-dark": a === "system" && !
|
|
673
|
+
noBorder: m,
|
|
674
|
+
size: l,
|
|
675
|
+
labelRight: g,
|
|
676
|
+
labelLeft: v,
|
|
677
|
+
spacing: b,
|
|
678
|
+
noBackground: T,
|
|
679
|
+
align: C
|
|
680
|
+
}), w = f({
|
|
681
|
+
"text-copy-accent-dark": a === "light" && !c,
|
|
682
|
+
"text-copy-light": a === "dark" && !c,
|
|
683
|
+
"text-copy-accent-dark dark:text-copy-light": a === "alt-system" && !c,
|
|
684
|
+
"text-copy-light dark:text-copy-accent-dark": a === "system" && !c
|
|
685
685
|
});
|
|
686
|
-
return /* @__PURE__ */
|
|
687
|
-
|
|
686
|
+
return /* @__PURE__ */ u(
|
|
687
|
+
be,
|
|
688
688
|
{
|
|
689
|
-
ref:
|
|
689
|
+
ref: k,
|
|
690
690
|
className: N,
|
|
691
691
|
disabled: t,
|
|
692
|
-
type:
|
|
693
|
-
"aria-label": d ||
|
|
694
|
-
...
|
|
692
|
+
type: s,
|
|
693
|
+
"aria-label": d || h,
|
|
694
|
+
...p,
|
|
695
695
|
children: [
|
|
696
|
-
|
|
697
|
-
/* @__PURE__ */ o("div", { className:
|
|
698
|
-
|
|
696
|
+
v && /* @__PURE__ */ o("span", { className: "pr-2", children: v }),
|
|
697
|
+
/* @__PURE__ */ o("div", { className: w, children: e }),
|
|
698
|
+
g && /* @__PURE__ */ o("span", { className: "pl-2", children: g })
|
|
699
699
|
]
|
|
700
700
|
}
|
|
701
701
|
);
|
|
702
702
|
}
|
|
703
703
|
);
|
|
704
|
-
|
|
704
|
+
Ge.displayName = "ButtonIcon";
|
|
705
705
|
/*!
|
|
706
706
|
@versini/ui-button v1.1.10
|
|
707
707
|
© 2024 gizmette.com
|
|
@@ -709,55 +709,55 @@ Pe.displayName = "ButtonIcon";
|
|
|
709
709
|
try {
|
|
710
710
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
711
711
|
version: "1.1.10",
|
|
712
|
-
buildTime: "
|
|
712
|
+
buildTime: "10/02/2024 06:10 PM EDT",
|
|
713
713
|
homepage: "https://github.com/aversini/ui-components",
|
|
714
714
|
license: "MIT"
|
|
715
715
|
});
|
|
716
716
|
} catch {
|
|
717
717
|
}
|
|
718
|
-
const
|
|
718
|
+
const la = re.forwardRef(
|
|
719
719
|
({
|
|
720
720
|
children: e,
|
|
721
721
|
disabled: t = !1,
|
|
722
722
|
mode: a = "system",
|
|
723
|
-
focusMode:
|
|
724
|
-
fullWidth:
|
|
723
|
+
focusMode: n = "system",
|
|
724
|
+
fullWidth: r = !1,
|
|
725
725
|
className: i,
|
|
726
|
-
type:
|
|
727
|
-
raw:
|
|
728
|
-
noBorder:
|
|
726
|
+
type: s = "button",
|
|
727
|
+
raw: c = !1,
|
|
728
|
+
noBorder: m = !1,
|
|
729
729
|
"aria-label": d,
|
|
730
|
-
label:
|
|
731
|
-
size:
|
|
732
|
-
labelRight:
|
|
733
|
-
labelLeft:
|
|
734
|
-
spacing:
|
|
735
|
-
noBackground:
|
|
736
|
-
align:
|
|
737
|
-
active:
|
|
738
|
-
...
|
|
730
|
+
label: h,
|
|
731
|
+
size: l = "medium",
|
|
732
|
+
labelRight: g,
|
|
733
|
+
labelLeft: v,
|
|
734
|
+
spacing: b,
|
|
735
|
+
noBackground: T = !1,
|
|
736
|
+
align: C = "center",
|
|
737
|
+
active: p = !1,
|
|
738
|
+
...k
|
|
739
739
|
}, N) => {
|
|
740
|
-
const
|
|
741
|
-
type:
|
|
740
|
+
const w = Fe({
|
|
741
|
+
type: fe,
|
|
742
742
|
mode: a,
|
|
743
|
-
focusMode:
|
|
744
|
-
fullWidth:
|
|
743
|
+
focusMode: n,
|
|
744
|
+
fullWidth: r,
|
|
745
745
|
disabled: t,
|
|
746
|
-
raw:
|
|
746
|
+
raw: c,
|
|
747
747
|
className: i,
|
|
748
|
-
noBorder:
|
|
749
|
-
size:
|
|
750
|
-
labelRight:
|
|
751
|
-
labelLeft:
|
|
752
|
-
spacing:
|
|
753
|
-
noBackground:
|
|
754
|
-
align:
|
|
755
|
-
}),
|
|
756
|
-
"text-copy-accent-dark": a === "light" && !
|
|
757
|
-
"text-copy-light": a === "dark" && !
|
|
758
|
-
"text-copy-accent-dark dark:text-copy-light": a === "alt-system" && !
|
|
759
|
-
"text-copy-light dark:text-copy-accent-dark": a === "system" && !
|
|
760
|
-
}),
|
|
748
|
+
noBorder: m,
|
|
749
|
+
size: l,
|
|
750
|
+
labelRight: g,
|
|
751
|
+
labelLeft: v,
|
|
752
|
+
spacing: b,
|
|
753
|
+
noBackground: T,
|
|
754
|
+
align: C
|
|
755
|
+
}), L = f({
|
|
756
|
+
"text-copy-accent-dark": a === "light" && !c,
|
|
757
|
+
"text-copy-light": a === "dark" && !c,
|
|
758
|
+
"text-copy-accent-dark dark:text-copy-light": a === "alt-system" && !c,
|
|
759
|
+
"text-copy-light dark:text-copy-accent-dark": a === "system" && !c
|
|
760
|
+
}), W = p ? f(
|
|
761
761
|
"relative",
|
|
762
762
|
"focus-within:static",
|
|
763
763
|
"focus-within:after:border-transparent",
|
|
@@ -774,26 +774,26 @@ const na = re.forwardRef(
|
|
|
774
774
|
"after:border-table-light dark:after:border-table-dark": a === "alt-system"
|
|
775
775
|
}
|
|
776
776
|
) : "";
|
|
777
|
-
return /* @__PURE__ */ o("div", { className:
|
|
778
|
-
|
|
777
|
+
return /* @__PURE__ */ o("div", { className: W, children: /* @__PURE__ */ u(
|
|
778
|
+
be,
|
|
779
779
|
{
|
|
780
780
|
ref: N,
|
|
781
|
-
className:
|
|
781
|
+
className: w,
|
|
782
782
|
disabled: t,
|
|
783
|
-
type:
|
|
784
|
-
"aria-label": d ||
|
|
785
|
-
...
|
|
783
|
+
type: s,
|
|
784
|
+
"aria-label": d || h,
|
|
785
|
+
...k,
|
|
786
786
|
children: [
|
|
787
|
-
|
|
788
|
-
/* @__PURE__ */ o("div", { className:
|
|
789
|
-
|
|
787
|
+
v && /* @__PURE__ */ o("span", { className: "pr-2", children: v }),
|
|
788
|
+
/* @__PURE__ */ o("div", { className: L, children: e }),
|
|
789
|
+
g && /* @__PURE__ */ o("span", { className: "pl-2", children: g })
|
|
790
790
|
]
|
|
791
791
|
}
|
|
792
792
|
) });
|
|
793
793
|
}
|
|
794
794
|
);
|
|
795
|
-
|
|
796
|
-
const
|
|
795
|
+
la.displayName = "ButtonSort";
|
|
796
|
+
const ca = (e) => {
|
|
797
797
|
let t = "";
|
|
798
798
|
if (typeof e == "number" || typeof e == "string")
|
|
799
799
|
t = "m-" + e;
|
|
@@ -802,38 +802,38 @@ const ia = (e) => {
|
|
|
802
802
|
(e == null ? void 0 : e.t) !== void 0 && a.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && a.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && a.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && a.push(`ml-${e.l}`), t = a.join(" ");
|
|
803
803
|
}
|
|
804
804
|
return t;
|
|
805
|
-
},
|
|
805
|
+
}, da = ({
|
|
806
806
|
children: e,
|
|
807
807
|
fill: t,
|
|
808
808
|
viewBox: a,
|
|
809
|
-
className:
|
|
810
|
-
defaultViewBox:
|
|
809
|
+
className: n,
|
|
810
|
+
defaultViewBox: r,
|
|
811
811
|
defaultClassName: i,
|
|
812
|
-
spacing:
|
|
813
|
-
title:
|
|
814
|
-
semantic:
|
|
812
|
+
spacing: s,
|
|
813
|
+
title: c,
|
|
814
|
+
semantic: m = !1,
|
|
815
815
|
...d
|
|
816
816
|
}) => {
|
|
817
|
-
const
|
|
818
|
-
|
|
819
|
-
|
|
817
|
+
const h = ca(s), l = f(
|
|
818
|
+
h,
|
|
819
|
+
n || i
|
|
820
820
|
);
|
|
821
|
-
return /* @__PURE__ */
|
|
821
|
+
return /* @__PURE__ */ u(x, { children: [
|
|
822
822
|
/* @__PURE__ */ o(
|
|
823
823
|
"svg",
|
|
824
824
|
{
|
|
825
825
|
xmlns: "http://www.w3.org/2000/svg",
|
|
826
|
-
className:
|
|
827
|
-
viewBox: a ||
|
|
826
|
+
className: l,
|
|
827
|
+
viewBox: a || r,
|
|
828
828
|
fill: t || "currentColor",
|
|
829
829
|
role: "img",
|
|
830
|
-
"aria-hidden": !
|
|
830
|
+
"aria-hidden": !m,
|
|
831
831
|
focusable: !1,
|
|
832
832
|
...d,
|
|
833
833
|
children: e
|
|
834
834
|
}
|
|
835
835
|
),
|
|
836
|
-
|
|
836
|
+
c && m && /* @__PURE__ */ o("span", { className: "sr-only", children: c })
|
|
837
837
|
] });
|
|
838
838
|
};
|
|
839
839
|
/*!
|
|
@@ -843,226 +843,226 @@ const ia = (e) => {
|
|
|
843
843
|
try {
|
|
844
844
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
845
845
|
version: "1.4.17",
|
|
846
|
-
buildTime: "
|
|
846
|
+
buildTime: "10/02/2024 06:10 PM EDT",
|
|
847
847
|
homepage: "https://github.com/aversini/ui-components",
|
|
848
848
|
license: "MIT"
|
|
849
849
|
});
|
|
850
850
|
} catch {
|
|
851
851
|
}
|
|
852
|
-
const
|
|
852
|
+
const ua = ({
|
|
853
853
|
className: e,
|
|
854
854
|
viewBox: t,
|
|
855
855
|
spacing: a,
|
|
856
|
-
title:
|
|
857
|
-
monotone:
|
|
856
|
+
title: n,
|
|
857
|
+
monotone: r,
|
|
858
858
|
...i
|
|
859
859
|
}) => /* @__PURE__ */ o(
|
|
860
|
-
|
|
860
|
+
da,
|
|
861
861
|
{
|
|
862
862
|
defaultViewBox: "0 0 384 512",
|
|
863
863
|
defaultClassName: "size-5",
|
|
864
864
|
viewBox: t,
|
|
865
865
|
className: e,
|
|
866
866
|
spacing: a,
|
|
867
|
-
title:
|
|
867
|
+
title: n || "Close",
|
|
868
868
|
...i,
|
|
869
869
|
children: /* @__PURE__ */ o("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" })
|
|
870
870
|
}
|
|
871
871
|
);
|
|
872
872
|
/*!
|
|
873
|
-
@versini/ui-icons v1.
|
|
873
|
+
@versini/ui-icons v1.14.0
|
|
874
874
|
© 2024 gizmette.com
|
|
875
875
|
*/
|
|
876
876
|
try {
|
|
877
877
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
878
|
-
version: "1.
|
|
879
|
-
buildTime: "
|
|
878
|
+
version: "1.14.0",
|
|
879
|
+
buildTime: "10/02/2024 06:10 PM EDT",
|
|
880
880
|
homepage: "https://github.com/aversini/ui-components",
|
|
881
881
|
license: "MIT"
|
|
882
882
|
});
|
|
883
883
|
} catch {
|
|
884
884
|
}
|
|
885
|
-
const
|
|
885
|
+
const X = "panel", oe = "messagebox", ha = ({
|
|
886
886
|
className: e,
|
|
887
887
|
kind: t,
|
|
888
888
|
borderMode: a
|
|
889
889
|
}) => ({
|
|
890
890
|
main: f("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
891
|
-
[`${
|
|
892
|
-
[`${
|
|
893
|
-
[`${
|
|
894
|
-
[`${
|
|
891
|
+
[`${Se} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === X,
|
|
892
|
+
[`${Se} w-full sm:w-[95%] md:max-w-2xl`]: t === X && !e,
|
|
893
|
+
[`${Ie} rounded-lg border-2`]: t === oe,
|
|
894
|
+
[`${Ie} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === oe && !e,
|
|
895
895
|
[`${e}`]: !!e,
|
|
896
|
-
"sm:border-border-dark": a === "dark" && t ===
|
|
897
|
-
"sm:border-border-accent": a === "light" && t ===
|
|
898
|
-
"border-border-dark": a === "dark" && t ===
|
|
899
|
-
"border-border-accent": a === "light" && t ===
|
|
896
|
+
"sm:border-border-dark": a === "dark" && t === X,
|
|
897
|
+
"sm:border-border-accent": a === "light" && t === X,
|
|
898
|
+
"border-border-dark": a === "dark" && t === oe,
|
|
899
|
+
"border-border-accent": a === "light" && t === oe
|
|
900
900
|
}),
|
|
901
|
-
content: "flex flex-
|
|
901
|
+
content: "flex flex-col py-2 sm:py-4 sm:px-4 px-2 overflow-y-auto",
|
|
902
902
|
footer: "flex flex-grow flex-col sm:p-4 p-2",
|
|
903
903
|
header: "sm:p-4 mb-0 p-2",
|
|
904
904
|
close: "sm:p-4 p-2"
|
|
905
|
-
}),
|
|
906
|
-
() => import("./index.
|
|
905
|
+
}), ee = (e) => vt(
|
|
906
|
+
() => import("./index.jf7dGfT1.C4ay3jrh.js").then((t) => ({
|
|
907
907
|
default: t[e]
|
|
908
908
|
}))
|
|
909
|
-
),
|
|
909
|
+
), ma = ee("Modal"), ga = ee("ModalClose"), pa = ee("ModalContent"), fa = ee("ModalDescription"), ba = ee("ModalHeading"), D = ({
|
|
910
910
|
open: e,
|
|
911
911
|
onOpenChange: t,
|
|
912
912
|
title: a,
|
|
913
|
-
children:
|
|
914
|
-
footer:
|
|
913
|
+
children: n,
|
|
914
|
+
footer: r,
|
|
915
915
|
borderMode: i = "light",
|
|
916
|
-
kind:
|
|
917
|
-
className:
|
|
916
|
+
kind: s = X,
|
|
917
|
+
className: c
|
|
918
918
|
}) => {
|
|
919
|
-
const
|
|
920
|
-
return
|
|
921
|
-
e && (document.title =
|
|
922
|
-
}), [a, e]), /* @__PURE__ */ o(
|
|
923
|
-
/* @__PURE__ */
|
|
919
|
+
const m = J(""), d = ha({ className: c, kind: s, borderMode: i });
|
|
920
|
+
return H(() => (e && (m.current = document.title, document.title = `${a} | ${m.current}`), () => {
|
|
921
|
+
e && (document.title = m.current);
|
|
922
|
+
}), [a, e]), /* @__PURE__ */ o(bt, { fallback: /* @__PURE__ */ o("div", {}), children: e && /* @__PURE__ */ o(ma, { open: e, onOpenChange: t, children: /* @__PURE__ */ u(pa, { className: d.main, children: [
|
|
923
|
+
/* @__PURE__ */ u("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
924
924
|
/* @__PURE__ */ o(
|
|
925
|
-
|
|
925
|
+
ga,
|
|
926
926
|
{
|
|
927
927
|
className: d.close,
|
|
928
928
|
trigger: /* @__PURE__ */ o(
|
|
929
|
-
|
|
929
|
+
Ge,
|
|
930
930
|
{
|
|
931
931
|
mode: "dark",
|
|
932
932
|
focusMode: "light",
|
|
933
933
|
noBorder: !0,
|
|
934
934
|
label: "Close",
|
|
935
|
-
children: /* @__PURE__ */ o(
|
|
935
|
+
children: /* @__PURE__ */ o(ua, {})
|
|
936
936
|
}
|
|
937
937
|
)
|
|
938
938
|
}
|
|
939
939
|
),
|
|
940
|
-
/* @__PURE__ */ o(
|
|
940
|
+
/* @__PURE__ */ o(ba, { className: d.header, children: a })
|
|
941
941
|
] }),
|
|
942
|
-
/* @__PURE__ */ o(
|
|
943
|
-
|
|
942
|
+
/* @__PURE__ */ o(fa, { className: d.content, children: n }),
|
|
943
|
+
r && /* @__PURE__ */ o("div", { className: d.footer, children: r })
|
|
944
944
|
] }) }) });
|
|
945
945
|
};
|
|
946
|
-
function
|
|
947
|
-
return
|
|
946
|
+
function q(e) {
|
|
947
|
+
return yt();
|
|
948
948
|
}
|
|
949
|
-
const
|
|
950
|
-
const t = (e == null ? void 0 : e.plugins) || [], a = (e == null ? void 0 : e.version) || "",
|
|
951
|
-
return /* @__PURE__ */
|
|
949
|
+
const va = ({ stats: e }) => {
|
|
950
|
+
const t = (e == null ? void 0 : e.plugins) || [], a = (e == null ? void 0 : e.version) || "", n = (e == null ? void 0 : e.models) || [], r = q(), i = q();
|
|
951
|
+
return /* @__PURE__ */ u(x, { children: [
|
|
952
952
|
/* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ o(
|
|
953
953
|
I,
|
|
954
954
|
{
|
|
955
|
-
header:
|
|
955
|
+
header: y.ABOUT.TITLE_CLIENT,
|
|
956
956
|
className: "prose-dark dark:prose-lighter",
|
|
957
|
-
children:
|
|
958
|
-
[
|
|
959
|
-
[
|
|
957
|
+
children: Z(r, {
|
|
958
|
+
[y.ABOUT.VERSION]: "5.0.0",
|
|
959
|
+
[y.ABOUT.BUILD_TIMESTAMP]: "10/03/2024 11:36 AM EDT"
|
|
960
960
|
})
|
|
961
961
|
}
|
|
962
962
|
) }),
|
|
963
963
|
/* @__PURE__ */ o(
|
|
964
964
|
I,
|
|
965
965
|
{
|
|
966
|
-
header:
|
|
966
|
+
header: y.ABOUT.TITLE_SERVER,
|
|
967
967
|
className: "prose-dark dark:prose-lighter",
|
|
968
|
-
children:
|
|
969
|
-
[
|
|
970
|
-
[
|
|
971
|
-
[
|
|
968
|
+
children: Z(i, {
|
|
969
|
+
[y.ABOUT.VERSION]: a,
|
|
970
|
+
[ne(y.ABOUT.ENGINE, n.length)]: /* @__PURE__ */ o(x, { children: n.map((s) => /* @__PURE__ */ o("div", { className: "text-right", children: s }, s)) }),
|
|
971
|
+
[ne(y.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ o(x, { children: t.map((s) => /* @__PURE__ */ o("div", { className: "text-right", children: s }, s)) })
|
|
972
972
|
})
|
|
973
973
|
}
|
|
974
974
|
)
|
|
975
975
|
] });
|
|
976
|
-
},
|
|
976
|
+
}, ya = ({
|
|
977
977
|
open: e,
|
|
978
978
|
onOpenChange: t
|
|
979
979
|
}) => {
|
|
980
|
-
const { serverStats: a } =
|
|
981
|
-
return /* @__PURE__ */ o(
|
|
982
|
-
},
|
|
980
|
+
const { serverStats: a } = M(Q);
|
|
981
|
+
return /* @__PURE__ */ o(D, { open: e, onOpenChange: t, title: qe, children: /* @__PURE__ */ o(va, { stats: a }) });
|
|
982
|
+
}, ka = (e) => Me(e), Ta = (e) => {
|
|
983
983
|
if (!e || e.length === 0)
|
|
984
|
-
return
|
|
984
|
+
return et;
|
|
985
985
|
const t = e.filter(
|
|
986
986
|
(a) => {
|
|
987
|
-
var
|
|
988
|
-
return ((
|
|
987
|
+
var n, r;
|
|
988
|
+
return ((n = a == null ? void 0 : a.message) == null ? void 0 : n.role) === tt && typeof ((r = a == null ? void 0 : a.message) == null ? void 0 : r.processingTime) == "number";
|
|
989
989
|
}
|
|
990
990
|
).map((a) => a.message.processingTime);
|
|
991
|
-
return
|
|
991
|
+
return at({
|
|
992
992
|
data: t,
|
|
993
|
-
formatter:
|
|
993
|
+
formatter: ka
|
|
994
994
|
});
|
|
995
|
-
},
|
|
995
|
+
}, Ca = ({
|
|
996
996
|
isAuthenticated: e,
|
|
997
997
|
stats: t
|
|
998
998
|
}) => {
|
|
999
|
-
const { state: a } =
|
|
1000
|
-
return e ? /* @__PURE__ */
|
|
999
|
+
const { state: a } = M(Q), n = ot - Number(a == null ? void 0 : a.usage), r = q(), i = q();
|
|
1000
|
+
return e ? /* @__PURE__ */ u(x, { children: [
|
|
1001
1001
|
a && a.messages.length > 0 && /* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ o(
|
|
1002
1002
|
I,
|
|
1003
1003
|
{
|
|
1004
|
-
header:
|
|
1004
|
+
header: y.CURRENT_STATISTICS.TITLE,
|
|
1005
1005
|
className: "prose-dark dark:prose-lighter",
|
|
1006
|
-
children:
|
|
1007
|
-
[
|
|
1008
|
-
[
|
|
1009
|
-
[
|
|
1010
|
-
[
|
|
1006
|
+
children: Z(r, {
|
|
1007
|
+
[y.CURRENT_STATISTICS.MODEL_NAME]: (a == null ? void 0 : a.model) || he,
|
|
1008
|
+
[y.CURRENT_STATISTICS.TOKENS_USED]: a == null ? void 0 : a.usage,
|
|
1009
|
+
[y.CURRENT_STATISTICS.REMAINING_TOKENS]: Qe.format(n),
|
|
1010
|
+
[y.CURRENT_STATISTICS.PROCESSING_TIME]: Ta(a == null ? void 0 : a.messages)
|
|
1011
1011
|
})
|
|
1012
1012
|
}
|
|
1013
1013
|
) }),
|
|
1014
1014
|
/* @__PURE__ */ o(
|
|
1015
1015
|
I,
|
|
1016
1016
|
{
|
|
1017
|
-
header:
|
|
1017
|
+
header: y.MAIN_STATISTICS.TITLE,
|
|
1018
1018
|
className: "prose-dark dark:prose-lighter",
|
|
1019
|
-
children:
|
|
1020
|
-
[
|
|
1021
|
-
[
|
|
1019
|
+
children: Z(i, {
|
|
1020
|
+
[ne(y.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
|
|
1021
|
+
[y.MAIN_STATISTICS.PROCESSING_TIME]: Me(
|
|
1022
1022
|
t.averageProcessingTimes
|
|
1023
1023
|
)
|
|
1024
1024
|
})
|
|
1025
1025
|
}
|
|
1026
1026
|
)
|
|
1027
1027
|
] }) : null;
|
|
1028
|
-
},
|
|
1028
|
+
}, Na = ({
|
|
1029
1029
|
open: e,
|
|
1030
1030
|
onOpenChange: t
|
|
1031
1031
|
}) => {
|
|
1032
|
-
const [a,
|
|
1032
|
+
const [a, n] = E({
|
|
1033
1033
|
averageProcessingTimes: 0,
|
|
1034
1034
|
totalChats: 0
|
|
1035
|
-
}), { isAuthenticated:
|
|
1036
|
-
return
|
|
1037
|
-
!e || !
|
|
1035
|
+
}), { isAuthenticated: r, getAccessToken: i, user: s } = j();
|
|
1036
|
+
return H(() => {
|
|
1037
|
+
!e || !s || (async () => {
|
|
1038
1038
|
try {
|
|
1039
|
-
const
|
|
1039
|
+
const c = await B({
|
|
1040
1040
|
accessToken: await i(),
|
|
1041
|
-
type:
|
|
1041
|
+
type: O.GET_CHATS_STATS,
|
|
1042
1042
|
params: {
|
|
1043
|
-
userId:
|
|
1043
|
+
userId: s.username
|
|
1044
1044
|
}
|
|
1045
1045
|
});
|
|
1046
|
-
|
|
1046
|
+
c.status === 200 && n(c.data);
|
|
1047
1047
|
} catch {
|
|
1048
1048
|
}
|
|
1049
1049
|
})();
|
|
1050
|
-
}, [e, i,
|
|
1051
|
-
},
|
|
1050
|
+
}, [e, i, s]), /* @__PURE__ */ o(D, { open: e, onOpenChange: t, title: Le, children: /* @__PURE__ */ o(Ca, { isAuthenticated: r, stats: a }) });
|
|
1051
|
+
}, Ue = ({
|
|
1052
1052
|
showConfirmation: e,
|
|
1053
1053
|
setShowConfirmation: t,
|
|
1054
1054
|
action: a,
|
|
1055
|
-
children:
|
|
1056
|
-
customStrings:
|
|
1055
|
+
children: n,
|
|
1056
|
+
customStrings: r
|
|
1057
1057
|
}) => /* @__PURE__ */ o(
|
|
1058
|
-
|
|
1058
|
+
D,
|
|
1059
1059
|
{
|
|
1060
1060
|
kind: "messagebox",
|
|
1061
1061
|
open: e,
|
|
1062
1062
|
onOpenChange: t,
|
|
1063
|
-
title:
|
|
1064
|
-
footer: /* @__PURE__ */
|
|
1065
|
-
/* @__PURE__ */ o(
|
|
1063
|
+
title: r.title,
|
|
1064
|
+
footer: /* @__PURE__ */ u(pe, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
1065
|
+
/* @__PURE__ */ o($, { children: /* @__PURE__ */ o(
|
|
1066
1066
|
z,
|
|
1067
1067
|
{
|
|
1068
1068
|
mode: "dark",
|
|
@@ -1071,10 +1071,10 @@ const pa = ({ stats: e }) => {
|
|
|
1071
1071
|
onClick: () => {
|
|
1072
1072
|
t(!1);
|
|
1073
1073
|
},
|
|
1074
|
-
children:
|
|
1074
|
+
children: r.cancelAction
|
|
1075
1075
|
}
|
|
1076
1076
|
) }),
|
|
1077
|
-
/* @__PURE__ */ o(
|
|
1077
|
+
/* @__PURE__ */ o($, { children: /* @__PURE__ */ o(
|
|
1078
1078
|
z,
|
|
1079
1079
|
{
|
|
1080
1080
|
mode: "dark",
|
|
@@ -1083,128 +1083,128 @@ const pa = ({ stats: e }) => {
|
|
|
1083
1083
|
onClick: () => {
|
|
1084
1084
|
t(!1), a();
|
|
1085
1085
|
},
|
|
1086
|
-
children:
|
|
1086
|
+
children: r.confirmAction
|
|
1087
1087
|
}
|
|
1088
1088
|
) })
|
|
1089
1089
|
] }),
|
|
1090
|
-
children:
|
|
1090
|
+
children: n
|
|
1091
1091
|
}
|
|
1092
1092
|
);
|
|
1093
|
-
var
|
|
1094
|
-
return
|
|
1095
|
-
},
|
|
1096
|
-
var a =
|
|
1097
|
-
return
|
|
1098
|
-
var i = !0,
|
|
1099
|
-
i &&
|
|
1093
|
+
var Ea = typeof window < "u", wa = function(e, t) {
|
|
1094
|
+
return Ea ? 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);
|
|
1095
|
+
}, xa = function(e, t) {
|
|
1096
|
+
var a = E(wa(e)), n = a[0], r = a[1];
|
|
1097
|
+
return H(function() {
|
|
1098
|
+
var i = !0, s = window.matchMedia(e), c = function() {
|
|
1099
|
+
i && r(!!s.matches);
|
|
1100
1100
|
};
|
|
1101
|
-
return
|
|
1102
|
-
i = !1,
|
|
1101
|
+
return s.addEventListener("change", c), r(s.matches), function() {
|
|
1102
|
+
i = !1, s.removeEventListener("change", c);
|
|
1103
1103
|
};
|
|
1104
|
-
}, [e]),
|
|
1104
|
+
}, [e]), n;
|
|
1105
1105
|
};
|
|
1106
|
-
const
|
|
1106
|
+
const Ia = async (e, t, a, n) => {
|
|
1107
1107
|
try {
|
|
1108
|
-
const
|
|
1109
|
-
accessToken:
|
|
1110
|
-
type:
|
|
1108
|
+
const r = await B({
|
|
1109
|
+
accessToken: n,
|
|
1110
|
+
type: O.GET_CHAT,
|
|
1111
1111
|
params: {
|
|
1112
1112
|
id: e.id
|
|
1113
1113
|
}
|
|
1114
1114
|
});
|
|
1115
|
-
|
|
1116
|
-
type:
|
|
1115
|
+
r.status === 200 && (t({
|
|
1116
|
+
type: rt
|
|
1117
1117
|
}), t({
|
|
1118
|
-
type:
|
|
1118
|
+
type: it,
|
|
1119
1119
|
payload: {
|
|
1120
1120
|
id: e.id,
|
|
1121
|
-
model:
|
|
1122
|
-
usage:
|
|
1123
|
-
messages:
|
|
1121
|
+
model: r.data.model,
|
|
1122
|
+
usage: r.data.usage,
|
|
1123
|
+
messages: r.data.messages
|
|
1124
1124
|
}
|
|
1125
1125
|
}), a(!1));
|
|
1126
1126
|
} catch {
|
|
1127
1127
|
}
|
|
1128
|
-
},
|
|
1128
|
+
}, Ae = (e) => {
|
|
1129
1129
|
const t = e[0];
|
|
1130
|
-
return
|
|
1131
|
-
},
|
|
1130
|
+
return st(t == null ? void 0 : t.content, 100);
|
|
1131
|
+
}, Sa = ({
|
|
1132
1132
|
filteredHistory: e,
|
|
1133
1133
|
setFilteredHistory: t,
|
|
1134
1134
|
dispatch: a,
|
|
1135
|
-
onOpenChange:
|
|
1135
|
+
onOpenChange: n
|
|
1136
1136
|
}) => {
|
|
1137
|
-
var
|
|
1138
|
-
const { user:
|
|
1137
|
+
var C;
|
|
1138
|
+
const { user: r, getAccessToken: i } = j(), s = J({
|
|
1139
1139
|
id: 0,
|
|
1140
1140
|
timestamp: "",
|
|
1141
1141
|
message: ""
|
|
1142
|
-
}), [
|
|
1143
|
-
key:
|
|
1144
|
-
initialValue:
|
|
1145
|
-
}),
|
|
1146
|
-
(
|
|
1147
|
-
switch (
|
|
1142
|
+
}), [c, m] = E(!1), d = xa("(min-width: 480px)"), { state: h, dispatch: l } = M(Be), [, g] = G({
|
|
1143
|
+
key: V + nt,
|
|
1144
|
+
initialValue: h.sortDirection
|
|
1145
|
+
}), v = e.data.sort(
|
|
1146
|
+
(p, k) => {
|
|
1147
|
+
switch (h.sortedCell) {
|
|
1148
1148
|
case "timestamp":
|
|
1149
|
-
if (
|
|
1150
|
-
return new Date(
|
|
1151
|
-
if (
|
|
1152
|
-
return new Date(
|
|
1149
|
+
if (h.sortDirection === S.ASC)
|
|
1150
|
+
return new Date(p[h.sortedCell]).getTime() - new Date(k[h.sortedCell]).getTime();
|
|
1151
|
+
if (h.sortDirection === S.DESC)
|
|
1152
|
+
return new Date(k[h.sortedCell]).getTime() - new Date(p[h.sortedCell]).getTime();
|
|
1153
1153
|
break;
|
|
1154
1154
|
default:
|
|
1155
1155
|
return 0;
|
|
1156
1156
|
}
|
|
1157
1157
|
return 0;
|
|
1158
1158
|
}
|
|
1159
|
-
),
|
|
1160
|
-
switch (
|
|
1159
|
+
), b = (p) => {
|
|
1160
|
+
switch (h.sortDirection) {
|
|
1161
1161
|
case !1:
|
|
1162
|
-
|
|
1162
|
+
g(S.ASC), l({
|
|
1163
1163
|
type: ie,
|
|
1164
1164
|
payload: {
|
|
1165
|
-
sortedCell:
|
|
1166
|
-
sortDirection:
|
|
1165
|
+
sortedCell: p,
|
|
1166
|
+
sortDirection: S.ASC
|
|
1167
1167
|
}
|
|
1168
1168
|
});
|
|
1169
1169
|
break;
|
|
1170
|
-
case
|
|
1171
|
-
|
|
1170
|
+
case S.ASC:
|
|
1171
|
+
g(S.DESC), l({
|
|
1172
1172
|
type: ie,
|
|
1173
1173
|
payload: {
|
|
1174
|
-
sortedCell:
|
|
1175
|
-
sortDirection:
|
|
1174
|
+
sortedCell: p,
|
|
1175
|
+
sortDirection: S.DESC
|
|
1176
1176
|
}
|
|
1177
1177
|
});
|
|
1178
1178
|
break;
|
|
1179
1179
|
default:
|
|
1180
|
-
|
|
1180
|
+
g(S.ASC), l({
|
|
1181
1181
|
type: ie,
|
|
1182
1182
|
payload: {
|
|
1183
|
-
sortedCell:
|
|
1184
|
-
sortDirection:
|
|
1183
|
+
sortedCell: p,
|
|
1184
|
+
sortDirection: S.ASC
|
|
1185
1185
|
}
|
|
1186
1186
|
});
|
|
1187
1187
|
break;
|
|
1188
1188
|
}
|
|
1189
1189
|
};
|
|
1190
|
-
return /* @__PURE__ */
|
|
1191
|
-
/* @__PURE__ */
|
|
1192
|
-
|
|
1190
|
+
return /* @__PURE__ */ u(x, { children: [
|
|
1191
|
+
/* @__PURE__ */ u(
|
|
1192
|
+
Ue,
|
|
1193
1193
|
{
|
|
1194
|
-
showConfirmation:
|
|
1195
|
-
setShowConfirmation:
|
|
1194
|
+
showConfirmation: c,
|
|
1195
|
+
setShowConfirmation: m,
|
|
1196
1196
|
action: async () => {
|
|
1197
|
-
const
|
|
1197
|
+
const p = s.current;
|
|
1198
1198
|
try {
|
|
1199
|
-
const
|
|
1199
|
+
const k = await B({
|
|
1200
1200
|
accessToken: await i(),
|
|
1201
|
-
type:
|
|
1201
|
+
type: O.DELETE_CHAT,
|
|
1202
1202
|
params: {
|
|
1203
|
-
userId: (
|
|
1204
|
-
id:
|
|
1203
|
+
userId: (r == null ? void 0 : r.username) || "",
|
|
1204
|
+
id: p.id
|
|
1205
1205
|
}
|
|
1206
1206
|
});
|
|
1207
|
-
|
|
1207
|
+
k.status === 200 && t({ data: k.data });
|
|
1208
1208
|
} catch {
|
|
1209
1209
|
}
|
|
1210
1210
|
},
|
|
@@ -1215,33 +1215,33 @@ const wa = async (e, t, a, r) => {
|
|
|
1215
1215
|
},
|
|
1216
1216
|
children: [
|
|
1217
1217
|
/* @__PURE__ */ o("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
|
1218
|
-
/* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
1218
|
+
/* @__PURE__ */ u("ul", { className: "m-0", children: [
|
|
1219
|
+
/* @__PURE__ */ u("li", { children: [
|
|
1220
1220
|
"Timestamp:",
|
|
1221
1221
|
" ",
|
|
1222
|
-
/* @__PURE__ */ o("span", { className: "text-lg", children:
|
|
1222
|
+
/* @__PURE__ */ o("span", { className: "text-lg", children: s.current && s.current.timestamp })
|
|
1223
1223
|
] }),
|
|
1224
|
-
/* @__PURE__ */
|
|
1224
|
+
/* @__PURE__ */ u("li", { children: [
|
|
1225
1225
|
"First message:",
|
|
1226
1226
|
" ",
|
|
1227
|
-
/* @__PURE__ */ o("span", { className: "text-lg", children: (
|
|
1227
|
+
/* @__PURE__ */ o("span", { className: "text-lg", children: (C = s.current) == null ? void 0 : C.message })
|
|
1228
1228
|
] })
|
|
1229
1229
|
] })
|
|
1230
1230
|
]
|
|
1231
1231
|
}
|
|
1232
1232
|
),
|
|
1233
|
-
/* @__PURE__ */
|
|
1234
|
-
/* @__PURE__ */ o(
|
|
1233
|
+
/* @__PURE__ */ u(Tt, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
|
|
1234
|
+
/* @__PURE__ */ o(Ct, { children: /* @__PURE__ */ u(ue, { children: [
|
|
1235
1235
|
d && /* @__PURE__ */ o(R, { className: "sr-only", children: "Row" }),
|
|
1236
1236
|
/* @__PURE__ */ o(
|
|
1237
|
-
|
|
1237
|
+
Nt,
|
|
1238
1238
|
{
|
|
1239
1239
|
cellId: "timestamp",
|
|
1240
1240
|
align: "left",
|
|
1241
|
-
sortDirection:
|
|
1242
|
-
sortedCell:
|
|
1241
|
+
sortDirection: h.sortDirection,
|
|
1242
|
+
sortedCell: h.sortedCell,
|
|
1243
1243
|
onClick: () => {
|
|
1244
|
-
|
|
1244
|
+
b("timestamp");
|
|
1245
1245
|
},
|
|
1246
1246
|
children: "Date"
|
|
1247
1247
|
}
|
|
@@ -1249,112 +1249,112 @@ const wa = async (e, t, a, r) => {
|
|
|
1249
1249
|
/* @__PURE__ */ o(R, { children: "First message" }),
|
|
1250
1250
|
/* @__PURE__ */ o(R, { className: "text-right", children: "Actions" })
|
|
1251
1251
|
] }) }),
|
|
1252
|
-
/* @__PURE__ */ o(
|
|
1252
|
+
/* @__PURE__ */ o(Et, { children: v.map((p, k) => {
|
|
1253
1253
|
var N;
|
|
1254
|
-
return ((N =
|
|
1255
|
-
d && /* @__PURE__ */ o(R, { children:
|
|
1254
|
+
return ((N = p == null ? void 0 : p.messages) == null ? void 0 : N.length) > 0 ? /* @__PURE__ */ u(ue, { children: [
|
|
1255
|
+
d && /* @__PURE__ */ o(R, { children: k + 1 }),
|
|
1256
1256
|
/* @__PURE__ */ o(
|
|
1257
1257
|
R,
|
|
1258
1258
|
{
|
|
1259
1259
|
component: "th",
|
|
1260
1260
|
scope: "row",
|
|
1261
1261
|
className: "font-medium text-gray-400 sm:whitespace-nowrap",
|
|
1262
|
-
children:
|
|
1262
|
+
children: p.timestamp
|
|
1263
1263
|
}
|
|
1264
1264
|
),
|
|
1265
|
-
/* @__PURE__ */ o(R, { className: "max-w-[100px] text-white sm:max-w-full", children:
|
|
1266
|
-
/* @__PURE__ */ o(R, { children: /* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ o(R, { className: "max-w-[100px] text-white sm:max-w-full", children: Ae(p.messages) }),
|
|
1266
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ u("div", { className: "flex justify-end gap-2", children: [
|
|
1267
1267
|
/* @__PURE__ */ o(
|
|
1268
|
-
|
|
1268
|
+
F,
|
|
1269
1269
|
{
|
|
1270
1270
|
focusMode: "alt-system",
|
|
1271
1271
|
noBorder: !0,
|
|
1272
1272
|
label: "Restore chat",
|
|
1273
1273
|
onClick: async () => {
|
|
1274
|
-
const
|
|
1275
|
-
|
|
1276
|
-
|
|
1274
|
+
const w = await i();
|
|
1275
|
+
Ia(
|
|
1276
|
+
p,
|
|
1277
1277
|
a,
|
|
1278
|
-
|
|
1279
|
-
|
|
1278
|
+
n,
|
|
1279
|
+
w
|
|
1280
1280
|
);
|
|
1281
1281
|
},
|
|
1282
|
-
children: /* @__PURE__ */ o(
|
|
1282
|
+
children: /* @__PURE__ */ o(Xt, { className: "h-3 w-3", monotone: !0 })
|
|
1283
1283
|
}
|
|
1284
1284
|
),
|
|
1285
1285
|
/* @__PURE__ */ o(
|
|
1286
|
-
|
|
1286
|
+
F,
|
|
1287
1287
|
{
|
|
1288
1288
|
focusMode: "alt-system",
|
|
1289
1289
|
noBorder: !0,
|
|
1290
1290
|
label: "Delete chat",
|
|
1291
1291
|
onClick: () => {
|
|
1292
|
-
|
|
1293
|
-
id:
|
|
1294
|
-
timestamp:
|
|
1295
|
-
message:
|
|
1296
|
-
},
|
|
1292
|
+
s.current = {
|
|
1293
|
+
id: p.id,
|
|
1294
|
+
timestamp: p.timestamp,
|
|
1295
|
+
message: Ae(p.messages)
|
|
1296
|
+
}, m(!c);
|
|
1297
1297
|
},
|
|
1298
|
-
children: /* @__PURE__ */ o("div", { className: "text-red-400", children: /* @__PURE__ */ o(
|
|
1298
|
+
children: /* @__PURE__ */ o("div", { className: "text-red-400", children: /* @__PURE__ */ o(jt, { className: "h-3 w-3", monotone: !0 }) })
|
|
1299
1299
|
}
|
|
1300
1300
|
)
|
|
1301
1301
|
] }) })
|
|
1302
|
-
] }, `${
|
|
1302
|
+
] }, `${y.HISTORY.TITLE}-${p.id}-${k}`) : null;
|
|
1303
1303
|
}) }),
|
|
1304
|
-
/* @__PURE__ */ o(
|
|
1304
|
+
/* @__PURE__ */ o(wt, { children: /* @__PURE__ */ o(ue, { children: /* @__PURE__ */ o(R, { colSpan: 4, children: /* @__PURE__ */ o("div", { children: ne(
|
|
1305
1305
|
`${e.data.length} chat`,
|
|
1306
1306
|
e.data.length
|
|
1307
1307
|
) }) }) }) })
|
|
1308
1308
|
] })
|
|
1309
1309
|
] });
|
|
1310
1310
|
};
|
|
1311
|
-
function
|
|
1311
|
+
function Re(e, t) {
|
|
1312
1312
|
return t ? e.filter(
|
|
1313
1313
|
(a) => a.messages.some(
|
|
1314
|
-
(
|
|
1314
|
+
(n) => n.content !== null && n.content.toLowerCase().includes(t.toLowerCase())
|
|
1315
1315
|
)
|
|
1316
1316
|
) : e;
|
|
1317
1317
|
}
|
|
1318
|
-
const
|
|
1318
|
+
const _a = ({
|
|
1319
1319
|
onOpenChange: e,
|
|
1320
1320
|
historyData: t
|
|
1321
1321
|
}) => {
|
|
1322
|
-
const { isAuthenticated: a } =
|
|
1323
|
-
key:
|
|
1322
|
+
const { isAuthenticated: a } = j(), n = J(null), { dispatch: r } = M(Q), { state: i, dispatch: s } = M(Be), [, c] = G({
|
|
1323
|
+
key: V + lt,
|
|
1324
1324
|
initialValue: i.searchString
|
|
1325
|
-
}),
|
|
1326
|
-
data:
|
|
1327
|
-
}),
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1330
|
-
data:
|
|
1331
|
-
}),
|
|
1332
|
-
type:
|
|
1333
|
-
payload: { searchString:
|
|
1325
|
+
}), m = kt(() => t, [t]), [d, h] = E({
|
|
1326
|
+
data: m
|
|
1327
|
+
}), l = (b) => {
|
|
1328
|
+
const T = Re(m, b);
|
|
1329
|
+
h({
|
|
1330
|
+
data: T
|
|
1331
|
+
}), c(b), s({
|
|
1332
|
+
type: dt,
|
|
1333
|
+
payload: { searchString: b }
|
|
1334
1334
|
});
|
|
1335
|
-
},
|
|
1336
|
-
|
|
1337
|
-
},
|
|
1338
|
-
|
|
1335
|
+
}, g = (b) => {
|
|
1336
|
+
l(b.target.value);
|
|
1337
|
+
}, v = async (b) => {
|
|
1338
|
+
b.preventDefault();
|
|
1339
1339
|
};
|
|
1340
|
-
return
|
|
1341
|
-
const
|
|
1340
|
+
return H(() => {
|
|
1341
|
+
const b = Re(
|
|
1342
1342
|
t,
|
|
1343
1343
|
i.searchString
|
|
1344
1344
|
);
|
|
1345
|
-
|
|
1346
|
-
data:
|
|
1345
|
+
h({
|
|
1346
|
+
data: b
|
|
1347
1347
|
});
|
|
1348
|
-
}, [t, i.searchString]), a ? d && d.data && /* @__PURE__ */
|
|
1349
|
-
/* @__PURE__ */ o("form", { autoComplete: "off", onSubmit:
|
|
1350
|
-
|
|
1348
|
+
}, [t, i.searchString]), a ? d && d.data && /* @__PURE__ */ u(x, { children: [
|
|
1349
|
+
/* @__PURE__ */ o("form", { autoComplete: "off", onSubmit: v, children: /* @__PURE__ */ o(
|
|
1350
|
+
ct,
|
|
1351
1351
|
{
|
|
1352
|
-
ref:
|
|
1352
|
+
ref: n,
|
|
1353
1353
|
defaultValue: i.searchString,
|
|
1354
1354
|
focusMode: "light",
|
|
1355
1355
|
name: "Search",
|
|
1356
1356
|
label: "Search",
|
|
1357
|
-
onChange:
|
|
1357
|
+
onChange: g,
|
|
1358
1358
|
spacing: { t: 2, b: 2 },
|
|
1359
1359
|
...i.searchString && {
|
|
1360
1360
|
rightElement: /* @__PURE__ */ o(
|
|
@@ -1365,8 +1365,8 @@ const Sa = ({
|
|
|
1365
1365
|
noBorder: !0,
|
|
1366
1366
|
size: "small",
|
|
1367
1367
|
onClick: () => {
|
|
1368
|
-
var
|
|
1369
|
-
|
|
1368
|
+
var b;
|
|
1369
|
+
l(""), (b = n.current) != null && b.value && (n.current.value = "", n.current.focus());
|
|
1370
1370
|
},
|
|
1371
1371
|
children: "Reset"
|
|
1372
1372
|
}
|
|
@@ -1375,20 +1375,20 @@ const Sa = ({
|
|
|
1375
1375
|
}
|
|
1376
1376
|
) }),
|
|
1377
1377
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ o(
|
|
1378
|
-
|
|
1378
|
+
Sa,
|
|
1379
1379
|
{
|
|
1380
1380
|
filteredHistory: d,
|
|
1381
|
-
setFilteredHistory:
|
|
1382
|
-
dispatch:
|
|
1381
|
+
setFilteredHistory: h,
|
|
1382
|
+
dispatch: r,
|
|
1383
1383
|
onOpenChange: e
|
|
1384
1384
|
}
|
|
1385
1385
|
) })
|
|
1386
1386
|
] }) : null;
|
|
1387
|
-
},
|
|
1387
|
+
}, Aa = ({
|
|
1388
1388
|
open: e,
|
|
1389
1389
|
onOpenChange: t,
|
|
1390
1390
|
historyData: a
|
|
1391
|
-
}) => /* @__PURE__ */ o(
|
|
1391
|
+
}) => /* @__PURE__ */ o(D, { open: e, onOpenChange: t, title: ut, children: /* @__PURE__ */ o(_a, { onOpenChange: t, historyData: a }) });
|
|
1392
1392
|
/*!
|
|
1393
1393
|
@versini/ui-toggle v1.0.7
|
|
1394
1394
|
© 2024 gizmette.com
|
|
@@ -1402,7 +1402,7 @@ try {
|
|
|
1402
1402
|
});
|
|
1403
1403
|
} catch {
|
|
1404
1404
|
}
|
|
1405
|
-
const
|
|
1405
|
+
const Ra = "av-toggle", Ma = (e) => {
|
|
1406
1406
|
let t = "";
|
|
1407
1407
|
if (typeof e == "number" || typeof e == "string")
|
|
1408
1408
|
t = "m-" + e;
|
|
@@ -1411,7 +1411,7 @@ const Ia = "av-toggle", _a = (e) => {
|
|
|
1411
1411
|
(e == null ? void 0 : e.t) !== void 0 && a.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && a.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && a.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && a.push(`ml-${e.l}`), t = a.join(" ");
|
|
1412
1412
|
}
|
|
1413
1413
|
return t;
|
|
1414
|
-
},
|
|
1414
|
+
}, La = () => f("peer", "h-6", "w-11", "rounded-full"), Ba = ({
|
|
1415
1415
|
focusMode: e
|
|
1416
1416
|
}) => f(
|
|
1417
1417
|
"peer-focus:outline",
|
|
@@ -1423,14 +1423,14 @@ const Ia = "av-toggle", _a = (e) => {
|
|
|
1423
1423
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
|
1424
1424
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
|
1425
1425
|
}
|
|
1426
|
-
),
|
|
1426
|
+
), Oa = () => f(
|
|
1427
1427
|
"peer-checked:after:translate-x-full",
|
|
1428
1428
|
// background color when checked
|
|
1429
1429
|
"peer-checked:bg-violet-500",
|
|
1430
1430
|
// knob circle and border color when checked
|
|
1431
1431
|
"peer-checked:after:bg-white",
|
|
1432
1432
|
"peer-checked:after:border-white"
|
|
1433
|
-
),
|
|
1433
|
+
), Ha = () => f(
|
|
1434
1434
|
"after:left-[2px]",
|
|
1435
1435
|
"after:top-[2px]",
|
|
1436
1436
|
"after:border",
|
|
@@ -1442,7 +1442,7 @@ const Ia = "av-toggle", _a = (e) => {
|
|
|
1442
1442
|
"after:rounded-full",
|
|
1443
1443
|
"after:transition-all",
|
|
1444
1444
|
"after:content-['']"
|
|
1445
|
-
),
|
|
1445
|
+
), Da = ({
|
|
1446
1446
|
mode: e,
|
|
1447
1447
|
noBorder: t
|
|
1448
1448
|
}) => f({
|
|
@@ -1451,7 +1451,7 @@ const Ia = "av-toggle", _a = (e) => {
|
|
|
1451
1451
|
"border-border-light bg-surface-darker": e === "dark",
|
|
1452
1452
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
|
1453
1453
|
"border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
|
1454
|
-
}),
|
|
1454
|
+
}), Pa = ({
|
|
1455
1455
|
mode: e,
|
|
1456
1456
|
labelHidden: t
|
|
1457
1457
|
}) => t ? "sr-only" : f("ml-2 text-sm", {
|
|
@@ -1459,153 +1459,172 @@ const Ia = "av-toggle", _a = (e) => {
|
|
|
1459
1459
|
"text-copy-lighter": e === "dark",
|
|
1460
1460
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
|
1461
1461
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
|
1462
|
-
}),
|
|
1463
|
-
|
|
1462
|
+
}), za = ({ spacing: e }) => f(
|
|
1463
|
+
Ra,
|
|
1464
1464
|
"relative flex cursor-pointer items-center",
|
|
1465
|
-
|
|
1466
|
-
),
|
|
1465
|
+
Ma(e)
|
|
1466
|
+
), Va = ({
|
|
1467
1467
|
mode: e,
|
|
1468
1468
|
focusMode: t,
|
|
1469
1469
|
labelHidden: a,
|
|
1470
|
-
spacing:
|
|
1471
|
-
noBorder:
|
|
1470
|
+
spacing: n,
|
|
1471
|
+
noBorder: r
|
|
1472
1472
|
}) => ({
|
|
1473
1473
|
toggle: f(
|
|
1474
|
-
Aa(),
|
|
1475
|
-
Ba({ mode: e, noBorder: n }),
|
|
1476
|
-
Ra({ focusMode: t }),
|
|
1477
1474
|
La(),
|
|
1478
|
-
|
|
1475
|
+
Da({ mode: e, noBorder: r }),
|
|
1476
|
+
Ba({ focusMode: t }),
|
|
1477
|
+
Ha(),
|
|
1478
|
+
Oa()
|
|
1479
1479
|
),
|
|
1480
|
-
label:
|
|
1480
|
+
label: Pa({ mode: e, labelHidden: a }),
|
|
1481
1481
|
input: "peer sr-only",
|
|
1482
|
-
wrapper:
|
|
1483
|
-
}),
|
|
1482
|
+
wrapper: za({ spacing: n })
|
|
1483
|
+
}), U = ({
|
|
1484
1484
|
checked: e = !1,
|
|
1485
1485
|
onChange: t,
|
|
1486
1486
|
label: a,
|
|
1487
|
-
labelHidden:
|
|
1488
|
-
name:
|
|
1487
|
+
labelHidden: n = !1,
|
|
1488
|
+
name: r,
|
|
1489
1489
|
mode: i = "system",
|
|
1490
|
-
focusMode:
|
|
1491
|
-
spacing:
|
|
1492
|
-
noBorder:
|
|
1490
|
+
focusMode: s = "system",
|
|
1491
|
+
spacing: c,
|
|
1492
|
+
noBorder: m = !1
|
|
1493
1493
|
}) => {
|
|
1494
|
-
const d =
|
|
1494
|
+
const d = Va({
|
|
1495
1495
|
mode: i,
|
|
1496
|
-
focusMode:
|
|
1497
|
-
labelHidden:
|
|
1498
|
-
spacing:
|
|
1499
|
-
noBorder:
|
|
1500
|
-
}),
|
|
1501
|
-
t == null || t(
|
|
1496
|
+
focusMode: s,
|
|
1497
|
+
labelHidden: n,
|
|
1498
|
+
spacing: c,
|
|
1499
|
+
noBorder: m
|
|
1500
|
+
}), h = (l) => {
|
|
1501
|
+
t == null || t(l.target.checked);
|
|
1502
1502
|
};
|
|
1503
|
-
return /* @__PURE__ */
|
|
1503
|
+
return /* @__PURE__ */ u("label", { className: d.wrapper, children: [
|
|
1504
1504
|
/* @__PURE__ */ o(
|
|
1505
1505
|
"input",
|
|
1506
1506
|
{
|
|
1507
|
-
name:
|
|
1507
|
+
name: r,
|
|
1508
1508
|
checked: e,
|
|
1509
1509
|
type: "checkbox",
|
|
1510
1510
|
className: d.input,
|
|
1511
|
-
onChange:
|
|
1511
|
+
onChange: h
|
|
1512
1512
|
}
|
|
1513
1513
|
),
|
|
1514
1514
|
/* @__PURE__ */ o("div", { className: d.toggle }),
|
|
1515
1515
|
/* @__PURE__ */ o("span", { className: d.label, children: a })
|
|
1516
1516
|
] });
|
|
1517
|
-
},
|
|
1517
|
+
}, Fa = ({
|
|
1518
1518
|
open: e,
|
|
1519
1519
|
onOpenChange: t
|
|
1520
1520
|
}) => {
|
|
1521
|
-
const {
|
|
1521
|
+
const { dispatch: a } = M(Q), { getAccessToken: n, user: r } = j(), [i, s] = E({
|
|
1522
1522
|
loaded: !1,
|
|
1523
1523
|
content: "",
|
|
1524
1524
|
loadingLocation: !1,
|
|
1525
|
-
location: ""
|
|
1526
|
-
|
|
1527
|
-
|
|
1525
|
+
location: "",
|
|
1526
|
+
engine: he
|
|
1527
|
+
}), c = async (l) => {
|
|
1528
|
+
l.preventDefault();
|
|
1528
1529
|
try {
|
|
1529
|
-
await
|
|
1530
|
-
accessToken: await
|
|
1531
|
-
type:
|
|
1530
|
+
await B({
|
|
1531
|
+
accessToken: await n(),
|
|
1532
|
+
type: O.SET_USER_PREFERENCES,
|
|
1532
1533
|
params: {
|
|
1533
1534
|
user: r == null ? void 0 : r.username,
|
|
1534
|
-
instructions:
|
|
1535
|
-
location:
|
|
1535
|
+
instructions: i.content,
|
|
1536
|
+
location: i.location,
|
|
1537
|
+
engine: i.engine
|
|
1538
|
+
}
|
|
1539
|
+
}), a({
|
|
1540
|
+
type: ht,
|
|
1541
|
+
payload: {
|
|
1542
|
+
engine: i.engine
|
|
1536
1543
|
}
|
|
1537
1544
|
});
|
|
1538
1545
|
} catch {
|
|
1539
1546
|
}
|
|
1540
|
-
},
|
|
1541
|
-
|
|
1542
|
-
...
|
|
1547
|
+
}, m = async () => {
|
|
1548
|
+
s((l) => ({
|
|
1549
|
+
...l,
|
|
1543
1550
|
location: "...",
|
|
1544
1551
|
loadingLocation: !0
|
|
1545
1552
|
}));
|
|
1546
1553
|
try {
|
|
1547
|
-
const
|
|
1548
|
-
accessToken: await
|
|
1549
|
-
type:
|
|
1554
|
+
const l = Date.now(), g = await mt(), v = await B({
|
|
1555
|
+
accessToken: await n(),
|
|
1556
|
+
type: O.GET_LOCATION,
|
|
1550
1557
|
params: {
|
|
1551
|
-
latitude:
|
|
1552
|
-
longitude:
|
|
1558
|
+
latitude: g.latitude,
|
|
1559
|
+
longitude: g.longitude
|
|
1553
1560
|
}
|
|
1554
|
-
}),
|
|
1555
|
-
if (
|
|
1556
|
-
const { city:
|
|
1557
|
-
|
|
1558
|
-
...
|
|
1561
|
+
}), T = Date.now() - l;
|
|
1562
|
+
if (T < 2e3 && await new Promise((C) => setTimeout(C, 2e3 - T)), v.status === 200) {
|
|
1563
|
+
const { city: C, state: p, country: k, displayName: N } = v.data, w = C && p && k ? `${C}, ${p}, ${k}` : N;
|
|
1564
|
+
s((L) => ({
|
|
1565
|
+
...L,
|
|
1559
1566
|
loaded: !0,
|
|
1560
|
-
location:
|
|
1567
|
+
location: w,
|
|
1561
1568
|
loadingLocation: !1
|
|
1562
1569
|
}));
|
|
1563
1570
|
} else
|
|
1564
|
-
|
|
1565
|
-
...
|
|
1571
|
+
s((C) => ({
|
|
1572
|
+
...C,
|
|
1566
1573
|
loaded: !0,
|
|
1567
1574
|
location: "",
|
|
1568
1575
|
loadingLocation: !1
|
|
1569
1576
|
}));
|
|
1570
1577
|
} catch {
|
|
1571
1578
|
}
|
|
1579
|
+
}, d = (l) => {
|
|
1580
|
+
s((g) => ({
|
|
1581
|
+
...g,
|
|
1582
|
+
engine: l ? se : le
|
|
1583
|
+
}));
|
|
1584
|
+
}, h = (l) => {
|
|
1585
|
+
s((g) => ({
|
|
1586
|
+
...g,
|
|
1587
|
+
engine: l ? le : se
|
|
1588
|
+
}));
|
|
1572
1589
|
};
|
|
1573
|
-
return
|
|
1590
|
+
return H(() => {
|
|
1574
1591
|
if (!e || !r) {
|
|
1575
|
-
|
|
1592
|
+
s({
|
|
1576
1593
|
loaded: !1,
|
|
1577
1594
|
loadingLocation: !1,
|
|
1578
1595
|
content: "",
|
|
1579
|
-
location: ""
|
|
1596
|
+
location: "",
|
|
1597
|
+
engine: he
|
|
1580
1598
|
});
|
|
1581
1599
|
return;
|
|
1582
1600
|
}
|
|
1583
1601
|
(async () => {
|
|
1584
1602
|
try {
|
|
1585
|
-
const
|
|
1586
|
-
accessToken: await
|
|
1587
|
-
type:
|
|
1603
|
+
const l = await B({
|
|
1604
|
+
accessToken: await n(),
|
|
1605
|
+
type: O.GET_USER_PREFERENCES,
|
|
1588
1606
|
params: {
|
|
1589
1607
|
user: r.username
|
|
1590
1608
|
}
|
|
1591
1609
|
});
|
|
1592
|
-
|
|
1593
|
-
...
|
|
1610
|
+
l.status === 200 && s((g) => ({
|
|
1611
|
+
...g,
|
|
1594
1612
|
loaded: !0,
|
|
1595
|
-
content:
|
|
1596
|
-
location:
|
|
1613
|
+
content: l.data.instructions,
|
|
1614
|
+
location: l.data.location,
|
|
1615
|
+
engine: l.data.engine
|
|
1597
1616
|
}));
|
|
1598
1617
|
} catch {
|
|
1599
1618
|
}
|
|
1600
1619
|
})();
|
|
1601
|
-
}, [r, e]), /* @__PURE__ */ o(
|
|
1602
|
-
|
|
1620
|
+
}, [r, e]), /* @__PURE__ */ o(x, { children: i.loaded && /* @__PURE__ */ o(
|
|
1621
|
+
D,
|
|
1603
1622
|
{
|
|
1604
1623
|
open: e,
|
|
1605
1624
|
onOpenChange: t,
|
|
1606
1625
|
title: "Engine Fine Tuning",
|
|
1607
|
-
footer: /* @__PURE__ */
|
|
1608
|
-
/* @__PURE__ */ o(
|
|
1626
|
+
footer: /* @__PURE__ */ u(pe, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
1627
|
+
/* @__PURE__ */ o($, { children: /* @__PURE__ */ o(
|
|
1609
1628
|
z,
|
|
1610
1629
|
{
|
|
1611
1630
|
mode: "dark",
|
|
@@ -1617,29 +1636,62 @@ const Ia = "av-toggle", _a = (e) => {
|
|
|
1617
1636
|
children: "Cancel"
|
|
1618
1637
|
}
|
|
1619
1638
|
) }),
|
|
1620
|
-
/* @__PURE__ */ o(
|
|
1639
|
+
/* @__PURE__ */ o($, { children: /* @__PURE__ */ o(
|
|
1621
1640
|
z,
|
|
1622
1641
|
{
|
|
1623
1642
|
mode: "dark",
|
|
1624
1643
|
variant: "danger",
|
|
1625
1644
|
focusMode: "light",
|
|
1626
|
-
onClick: async (
|
|
1627
|
-
t(!1), await c(
|
|
1645
|
+
onClick: async (l) => {
|
|
1646
|
+
t(!1), await c(l);
|
|
1628
1647
|
},
|
|
1629
1648
|
children: "Save"
|
|
1630
1649
|
}
|
|
1631
1650
|
) })
|
|
1632
1651
|
] }),
|
|
1633
|
-
children: [
|
|
1634
|
-
/* @__PURE__ */
|
|
1652
|
+
children: /* @__PURE__ */ u(x, { children: [
|
|
1653
|
+
/* @__PURE__ */ u(
|
|
1635
1654
|
I,
|
|
1636
1655
|
{
|
|
1656
|
+
header: "AI Engine",
|
|
1657
|
+
className: "prose-dark dark:prose-lighter",
|
|
1658
|
+
children: [
|
|
1659
|
+
/* @__PURE__ */ o("p", { children: "Select the AI engine that will be used to generate responses." }),
|
|
1660
|
+
/* @__PURE__ */ o(
|
|
1661
|
+
U,
|
|
1662
|
+
{
|
|
1663
|
+
noBorder: !0,
|
|
1664
|
+
label: "OpenAI",
|
|
1665
|
+
name: "OpenAI",
|
|
1666
|
+
onChange: d,
|
|
1667
|
+
checked: i.engine === se
|
|
1668
|
+
}
|
|
1669
|
+
),
|
|
1670
|
+
/* @__PURE__ */ o(
|
|
1671
|
+
U,
|
|
1672
|
+
{
|
|
1673
|
+
spacing: { t: 2 },
|
|
1674
|
+
noBorder: !0,
|
|
1675
|
+
label: "Anthropic",
|
|
1676
|
+
name: "Anthropic",
|
|
1677
|
+
onChange: h,
|
|
1678
|
+
checked: i.engine === le
|
|
1679
|
+
}
|
|
1680
|
+
),
|
|
1681
|
+
/* @__PURE__ */ o("p", { className: "text-xs", children: "NOTE: Anthropic is currently in beta and may not be as accurate as OpenAI. It also cannot take advantage yet of internal helper tools such as the OpenWeather or Google Images plugin." })
|
|
1682
|
+
]
|
|
1683
|
+
}
|
|
1684
|
+
),
|
|
1685
|
+
/* @__PURE__ */ u(
|
|
1686
|
+
I,
|
|
1687
|
+
{
|
|
1688
|
+
spacing: { t: 4 },
|
|
1637
1689
|
header: "Custom Instructions",
|
|
1638
1690
|
className: "prose-dark dark:prose-lighter",
|
|
1639
1691
|
children: [
|
|
1640
1692
|
/* @__PURE__ */ o("p", { children: "What would you like Sassy Saint to know about you to provide better responses?" }),
|
|
1641
1693
|
/* @__PURE__ */ o(
|
|
1642
|
-
|
|
1694
|
+
Ee,
|
|
1643
1695
|
{
|
|
1644
1696
|
mode: "alt-system",
|
|
1645
1697
|
autoCapitalize: "off",
|
|
@@ -1647,12 +1699,12 @@ const Ia = "av-toggle", _a = (e) => {
|
|
|
1647
1699
|
autoCorrect: "off",
|
|
1648
1700
|
name: "customInstructions",
|
|
1649
1701
|
label: "Custom Instructions",
|
|
1650
|
-
value:
|
|
1651
|
-
onChange: (
|
|
1652
|
-
|
|
1653
|
-
...
|
|
1702
|
+
value: i.content,
|
|
1703
|
+
onChange: (l) => {
|
|
1704
|
+
s((g) => ({
|
|
1705
|
+
...g,
|
|
1654
1706
|
loaded: !0,
|
|
1655
|
-
content:
|
|
1707
|
+
content: l.target.value
|
|
1656
1708
|
}));
|
|
1657
1709
|
},
|
|
1658
1710
|
helperText: "Press ENTER to add a new line."
|
|
@@ -1661,7 +1713,7 @@ const Ia = "av-toggle", _a = (e) => {
|
|
|
1661
1713
|
]
|
|
1662
1714
|
}
|
|
1663
1715
|
),
|
|
1664
|
-
/* @__PURE__ */
|
|
1716
|
+
/* @__PURE__ */ u(
|
|
1665
1717
|
I,
|
|
1666
1718
|
{
|
|
1667
1719
|
header: "Location",
|
|
@@ -1670,17 +1722,17 @@ const Ia = "av-toggle", _a = (e) => {
|
|
|
1670
1722
|
children: [
|
|
1671
1723
|
/* @__PURE__ */ o("p", { children: "You can share your location to receive customized responses based on your area." }),
|
|
1672
1724
|
/* @__PURE__ */ o(
|
|
1673
|
-
|
|
1725
|
+
Ee,
|
|
1674
1726
|
{
|
|
1675
1727
|
mode: "alt-system",
|
|
1676
1728
|
name: "location",
|
|
1677
1729
|
label: "Location",
|
|
1678
|
-
value:
|
|
1679
|
-
onChange: (
|
|
1680
|
-
|
|
1681
|
-
...
|
|
1730
|
+
value: i.location,
|
|
1731
|
+
onChange: (l) => {
|
|
1732
|
+
s((g) => ({
|
|
1733
|
+
...g,
|
|
1682
1734
|
loaded: !0,
|
|
1683
|
-
location:
|
|
1735
|
+
location: l.target.value
|
|
1684
1736
|
}));
|
|
1685
1737
|
},
|
|
1686
1738
|
helperText: "Enter your location or press auto-detect."
|
|
@@ -1692,284 +1744,284 @@ const Ia = "av-toggle", _a = (e) => {
|
|
|
1692
1744
|
spacing: { t: 2 },
|
|
1693
1745
|
size: "small",
|
|
1694
1746
|
noBorder: !0,
|
|
1695
|
-
disabled:
|
|
1696
|
-
onClick:
|
|
1697
|
-
children:
|
|
1747
|
+
disabled: i.loadingLocation,
|
|
1748
|
+
onClick: m,
|
|
1749
|
+
children: i.loadingLocation ? "Detecting..." : "Auto-detect"
|
|
1698
1750
|
}
|
|
1699
1751
|
)
|
|
1700
1752
|
]
|
|
1701
1753
|
}
|
|
1702
1754
|
)
|
|
1703
|
-
]
|
|
1755
|
+
] })
|
|
1704
1756
|
}
|
|
1705
1757
|
) });
|
|
1706
|
-
},
|
|
1758
|
+
}, Ga = ({
|
|
1707
1759
|
open: e,
|
|
1708
1760
|
onOpenChange: t
|
|
1709
1761
|
}) => {
|
|
1710
|
-
const [a,
|
|
1711
|
-
key:
|
|
1762
|
+
const [a, n] = G({
|
|
1763
|
+
key: V + ye,
|
|
1712
1764
|
initialValue: !1
|
|
1713
|
-
}), [
|
|
1714
|
-
key:
|
|
1765
|
+
}), [r, i] = G({
|
|
1766
|
+
key: V + ke,
|
|
1715
1767
|
initialValue: !1
|
|
1716
|
-
}), [
|
|
1717
|
-
key:
|
|
1768
|
+
}), [s, c] = G({
|
|
1769
|
+
key: V + Te,
|
|
1718
1770
|
initialValue: !1
|
|
1719
|
-
}),
|
|
1720
|
-
|
|
1721
|
-
}, d = (
|
|
1722
|
-
i(
|
|
1723
|
-
},
|
|
1724
|
-
l
|
|
1771
|
+
}), m = (l) => {
|
|
1772
|
+
n(l);
|
|
1773
|
+
}, d = (l) => {
|
|
1774
|
+
i(l);
|
|
1775
|
+
}, h = (l) => {
|
|
1776
|
+
c(l);
|
|
1725
1777
|
};
|
|
1726
|
-
return /* @__PURE__ */ o(
|
|
1727
|
-
/* @__PURE__ */ o("p", { children:
|
|
1778
|
+
return /* @__PURE__ */ o(D, { open: e, onOpenChange: t, title: "Tags", children: /* @__PURE__ */ u(I, { header: y.TAGS.TITLE, className: "prose-dark dark:prose-lighter", children: [
|
|
1779
|
+
/* @__PURE__ */ o("p", { children: y.TAGS.DESCRIPTION }),
|
|
1728
1780
|
/* @__PURE__ */ o(
|
|
1729
|
-
|
|
1781
|
+
U,
|
|
1730
1782
|
{
|
|
1731
1783
|
noBorder: !0,
|
|
1732
|
-
label:
|
|
1733
|
-
name:
|
|
1734
|
-
onChange:
|
|
1784
|
+
label: ce[de.SUMMARIZE_ARTICLE].label,
|
|
1785
|
+
name: ye,
|
|
1786
|
+
onChange: m,
|
|
1735
1787
|
checked: a
|
|
1736
1788
|
}
|
|
1737
1789
|
),
|
|
1738
1790
|
/* @__PURE__ */ o(
|
|
1739
|
-
|
|
1791
|
+
U,
|
|
1740
1792
|
{
|
|
1741
1793
|
spacing: { t: 2 },
|
|
1742
1794
|
noBorder: !0,
|
|
1743
|
-
label:
|
|
1744
|
-
name:
|
|
1795
|
+
label: ce[de.PROOFREAD_CONTENT].label,
|
|
1796
|
+
name: ke,
|
|
1745
1797
|
onChange: d,
|
|
1746
|
-
checked:
|
|
1798
|
+
checked: r
|
|
1747
1799
|
}
|
|
1748
1800
|
),
|
|
1749
1801
|
/* @__PURE__ */ o(
|
|
1750
|
-
|
|
1802
|
+
U,
|
|
1751
1803
|
{
|
|
1752
1804
|
spacing: { t: 2 },
|
|
1753
1805
|
noBorder: !0,
|
|
1754
|
-
label:
|
|
1755
|
-
name:
|
|
1756
|
-
onChange:
|
|
1757
|
-
checked:
|
|
1806
|
+
label: ce[de.REPHRASE_CONTENT].label,
|
|
1807
|
+
name: Te,
|
|
1808
|
+
onChange: h,
|
|
1809
|
+
checked: s
|
|
1758
1810
|
}
|
|
1759
1811
|
)
|
|
1760
1812
|
] }) });
|
|
1761
|
-
},
|
|
1762
|
-
const { isAuthenticated: e, user: t, registeringForPasskey: a, authenticationType:
|
|
1763
|
-
key:
|
|
1813
|
+
}, Ua = () => {
|
|
1814
|
+
const { isAuthenticated: e, user: t, registeringForPasskey: a, authenticationType: n } = j(), [r, i] = G({
|
|
1815
|
+
key: V + gt,
|
|
1764
1816
|
initialValue: !1
|
|
1765
|
-
}), [
|
|
1766
|
-
i(
|
|
1767
|
-
},
|
|
1768
|
-
|
|
1769
|
-
},
|
|
1770
|
-
d(!
|
|
1817
|
+
}), [s, c] = E(!1), [m, d] = E(!1), h = q(), l = (t == null ? void 0 : t.username) || "", g = (T) => {
|
|
1818
|
+
i(T);
|
|
1819
|
+
}, v = () => {
|
|
1820
|
+
c(!s);
|
|
1821
|
+
}, b = () => {
|
|
1822
|
+
d(!m);
|
|
1771
1823
|
};
|
|
1772
|
-
return e &&
|
|
1773
|
-
|
|
1774
|
-
|
|
1824
|
+
return e && l ? /* @__PURE__ */ u(x, { children: [
|
|
1825
|
+
s && /* @__PURE__ */ o(
|
|
1826
|
+
Fa,
|
|
1775
1827
|
{
|
|
1776
|
-
open:
|
|
1777
|
-
onOpenChange:
|
|
1828
|
+
open: s,
|
|
1829
|
+
onOpenChange: c
|
|
1778
1830
|
}
|
|
1779
1831
|
),
|
|
1780
|
-
|
|
1781
|
-
/* @__PURE__ */
|
|
1832
|
+
m && /* @__PURE__ */ o(Ga, { open: m, onOpenChange: d }),
|
|
1833
|
+
/* @__PURE__ */ u(
|
|
1782
1834
|
I,
|
|
1783
1835
|
{
|
|
1784
|
-
header:
|
|
1836
|
+
header: y.PREFERENCES.TITLE,
|
|
1785
1837
|
className: "prose-dark dark:prose-lighter",
|
|
1786
1838
|
children: [
|
|
1787
|
-
|
|
1788
|
-
[
|
|
1789
|
-
[
|
|
1790
|
-
[
|
|
1791
|
-
|
|
1839
|
+
Z(h, {
|
|
1840
|
+
[y.PREFERENCES.NAME]: l,
|
|
1841
|
+
[y.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
|
|
1842
|
+
[y.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ o(
|
|
1843
|
+
U,
|
|
1792
1844
|
{
|
|
1793
1845
|
noBorder: !0,
|
|
1794
1846
|
labelHidden: !0,
|
|
1795
|
-
label:
|
|
1796
|
-
name:
|
|
1797
|
-
onChange:
|
|
1798
|
-
checked:
|
|
1847
|
+
label: y.PREFERENCES.ENGINE_DETAILS,
|
|
1848
|
+
name: y.PREFERENCES.ENGINE_DETAILS,
|
|
1849
|
+
onChange: g,
|
|
1850
|
+
checked: r
|
|
1799
1851
|
}
|
|
1800
1852
|
)
|
|
1801
1853
|
}),
|
|
1802
1854
|
/* @__PURE__ */ o(
|
|
1803
|
-
|
|
1855
|
+
F,
|
|
1804
1856
|
{
|
|
1805
1857
|
spacing: { t: 2 },
|
|
1806
1858
|
size: "small",
|
|
1807
|
-
onClick:
|
|
1859
|
+
onClick: v,
|
|
1808
1860
|
labelLeft: "Engine Fine Tuning",
|
|
1809
|
-
children: /* @__PURE__ */ o(
|
|
1861
|
+
children: /* @__PURE__ */ o(we, { className: "size-3", monotone: !0 })
|
|
1810
1862
|
}
|
|
1811
1863
|
),
|
|
1812
1864
|
/* @__PURE__ */ o(
|
|
1813
|
-
|
|
1865
|
+
F,
|
|
1814
1866
|
{
|
|
1815
1867
|
spacing: { t: 2, l: 2 },
|
|
1816
1868
|
size: "small",
|
|
1817
|
-
onClick:
|
|
1869
|
+
onClick: b,
|
|
1818
1870
|
labelLeft: "Tags",
|
|
1819
|
-
children: /* @__PURE__ */ o(
|
|
1871
|
+
children: /* @__PURE__ */ o(we, { className: "size-3", monotone: !0 })
|
|
1820
1872
|
}
|
|
1821
1873
|
)
|
|
1822
1874
|
]
|
|
1823
1875
|
}
|
|
1824
1876
|
),
|
|
1825
|
-
|
|
1877
|
+
n !== pt.PASSKEY && /* @__PURE__ */ u(
|
|
1826
1878
|
I,
|
|
1827
1879
|
{
|
|
1828
1880
|
spacing: { t: 4 },
|
|
1829
1881
|
className: "prose-dark dark:prose-lighter",
|
|
1830
|
-
header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */
|
|
1831
|
-
/* @__PURE__ */ o(
|
|
1832
|
-
/* @__PURE__ */ o(
|
|
1882
|
+
header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */ u(pe, { columnGap: 3, alignVertical: "center", children: [
|
|
1883
|
+
/* @__PURE__ */ o($, { children: /* @__PURE__ */ o(Ce, { className: "size-8" }) }),
|
|
1884
|
+
/* @__PURE__ */ o($, { children: /* @__PURE__ */ o("div", { children: y.PREFERENCES.PASSKEY_TITLE }) })
|
|
1833
1885
|
] }) }),
|
|
1834
1886
|
children: [
|
|
1835
|
-
/* @__PURE__ */ o("p", { children:
|
|
1887
|
+
/* @__PURE__ */ o("p", { children: y.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
1836
1888
|
/* @__PURE__ */ o(
|
|
1837
|
-
|
|
1889
|
+
F,
|
|
1838
1890
|
{
|
|
1839
1891
|
size: "small",
|
|
1840
1892
|
spacing: { t: 2 },
|
|
1841
1893
|
onClick: a,
|
|
1842
|
-
labelLeft:
|
|
1843
|
-
children: /* @__PURE__ */ o(
|
|
1894
|
+
labelLeft: y.PREFERENCES.PASSKEY_BUTTON,
|
|
1895
|
+
children: /* @__PURE__ */ o(Ce, { className: "size-5", monotone: !0 })
|
|
1844
1896
|
}
|
|
1845
1897
|
)
|
|
1846
1898
|
]
|
|
1847
1899
|
}
|
|
1848
1900
|
)
|
|
1849
1901
|
] }) : null;
|
|
1850
|
-
},
|
|
1902
|
+
}, $a = ({
|
|
1851
1903
|
open: e,
|
|
1852
1904
|
onOpenChange: t
|
|
1853
|
-
}) => /* @__PURE__ */ o(
|
|
1854
|
-
const { state: e } =
|
|
1905
|
+
}) => /* @__PURE__ */ o(D, { open: e, onOpenChange: t, title: ft, children: /* @__PURE__ */ o(Ua, {}) }), Ja = () => {
|
|
1906
|
+
const { state: e } = M(Q), [t, a] = E(!1), [n, r] = E(!1), [i, s] = E(!1), [c, m] = E(!1), [d, h] = E([]), [l, g] = E(!1), [v, b] = E({
|
|
1855
1907
|
done: !1,
|
|
1856
1908
|
progress: !1,
|
|
1857
1909
|
timestamp: Date.now()
|
|
1858
|
-
}), { logout:
|
|
1910
|
+
}), { logout: T, getAccessToken: C, user: p } = j(), k = () => {
|
|
1859
1911
|
a(!t);
|
|
1860
1912
|
}, N = () => {
|
|
1861
|
-
|
|
1862
|
-
},
|
|
1863
|
-
|
|
1864
|
-
},
|
|
1865
|
-
|
|
1866
|
-
},
|
|
1867
|
-
const
|
|
1868
|
-
if (A && !(!
|
|
1869
|
-
|
|
1913
|
+
r(!n);
|
|
1914
|
+
}, w = () => {
|
|
1915
|
+
s(!i);
|
|
1916
|
+
}, L = () => {
|
|
1917
|
+
m(!c);
|
|
1918
|
+
}, W = async (A) => {
|
|
1919
|
+
const ae = Date.now();
|
|
1920
|
+
if (A && !(!p || !e || v.progress || v.done === !0 && ae - v.timestamp < 5e3)) {
|
|
1921
|
+
b({
|
|
1870
1922
|
done: !0,
|
|
1871
1923
|
progress: !0,
|
|
1872
|
-
timestamp:
|
|
1924
|
+
timestamp: ae
|
|
1873
1925
|
});
|
|
1874
1926
|
try {
|
|
1875
|
-
const
|
|
1876
|
-
accessToken: await
|
|
1877
|
-
type:
|
|
1927
|
+
const Y = await B({
|
|
1928
|
+
accessToken: await C(),
|
|
1929
|
+
type: O.GET_CHATS,
|
|
1878
1930
|
params: {
|
|
1879
|
-
userId:
|
|
1931
|
+
userId: p.username
|
|
1880
1932
|
}
|
|
1881
1933
|
});
|
|
1882
|
-
|
|
1934
|
+
Y.status === 200 && (h(Y.data), b({
|
|
1883
1935
|
done: !0,
|
|
1884
1936
|
progress: !1,
|
|
1885
1937
|
timestamp: Date.now()
|
|
1886
1938
|
}));
|
|
1887
1939
|
} catch {
|
|
1888
|
-
|
|
1940
|
+
b({
|
|
1889
1941
|
done: !0,
|
|
1890
1942
|
progress: !1,
|
|
1891
1943
|
timestamp: Date.now()
|
|
1892
1944
|
});
|
|
1893
1945
|
}
|
|
1894
1946
|
}
|
|
1895
|
-
},
|
|
1896
|
-
|
|
1947
|
+
}, te = () => {
|
|
1948
|
+
g(!l);
|
|
1897
1949
|
};
|
|
1898
|
-
return /* @__PURE__ */
|
|
1950
|
+
return /* @__PURE__ */ u(x, { children: [
|
|
1899
1951
|
/* @__PURE__ */ o(
|
|
1900
|
-
|
|
1952
|
+
Ue,
|
|
1901
1953
|
{
|
|
1902
|
-
showConfirmation:
|
|
1903
|
-
setShowConfirmation:
|
|
1904
|
-
action:
|
|
1954
|
+
showConfirmation: l,
|
|
1955
|
+
setShowConfirmation: g,
|
|
1956
|
+
action: T,
|
|
1905
1957
|
customStrings: {
|
|
1906
|
-
confirmAction:
|
|
1958
|
+
confirmAction: Ne,
|
|
1907
1959
|
cancelAction: "Cancel",
|
|
1908
|
-
title:
|
|
1960
|
+
title: Ne
|
|
1909
1961
|
},
|
|
1910
1962
|
children: /* @__PURE__ */ o("p", { children: "Are you sure you want to log out?" })
|
|
1911
1963
|
}
|
|
1912
1964
|
),
|
|
1913
|
-
/* @__PURE__ */ o(
|
|
1914
|
-
/* @__PURE__ */ o(
|
|
1965
|
+
/* @__PURE__ */ o($a, { open: t, onOpenChange: a }),
|
|
1966
|
+
/* @__PURE__ */ o(Na, { open: n, onOpenChange: r }),
|
|
1915
1967
|
/* @__PURE__ */ o(
|
|
1916
|
-
|
|
1968
|
+
Aa,
|
|
1917
1969
|
{
|
|
1918
1970
|
open: i,
|
|
1919
|
-
onOpenChange:
|
|
1971
|
+
onOpenChange: s,
|
|
1920
1972
|
historyData: d
|
|
1921
1973
|
}
|
|
1922
1974
|
),
|
|
1923
|
-
/* @__PURE__ */ o(
|
|
1924
|
-
/* @__PURE__ */ o("div", { className: "relative", children: /* @__PURE__ */ o("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */
|
|
1925
|
-
|
|
1975
|
+
/* @__PURE__ */ o(ya, { open: c, onOpenChange: m }),
|
|
1976
|
+
/* @__PURE__ */ o("div", { className: "relative", children: /* @__PURE__ */ o("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ u(
|
|
1977
|
+
Ve,
|
|
1926
1978
|
{
|
|
1927
1979
|
mode: "dark",
|
|
1928
1980
|
focusMode: "light",
|
|
1929
|
-
trigger: /* @__PURE__ */ o(
|
|
1981
|
+
trigger: /* @__PURE__ */ o(F, { children: /* @__PURE__ */ o(Zt, {}) }),
|
|
1930
1982
|
defaultPlacement: "bottom-end",
|
|
1931
|
-
onOpenChange:
|
|
1983
|
+
onOpenChange: W,
|
|
1932
1984
|
children: [
|
|
1933
1985
|
/* @__PURE__ */ o(
|
|
1934
|
-
|
|
1986
|
+
P,
|
|
1935
1987
|
{
|
|
1936
1988
|
label: "Profile",
|
|
1937
|
-
onClick:
|
|
1938
|
-
icon: /* @__PURE__ */ o(
|
|
1989
|
+
onClick: k,
|
|
1990
|
+
icon: /* @__PURE__ */ o(Kt, {})
|
|
1939
1991
|
}
|
|
1940
1992
|
),
|
|
1941
1993
|
/* @__PURE__ */ o(
|
|
1942
|
-
|
|
1994
|
+
P,
|
|
1943
1995
|
{
|
|
1944
|
-
label:
|
|
1996
|
+
label: Le,
|
|
1945
1997
|
onClick: N,
|
|
1946
|
-
icon: /* @__PURE__ */ o(
|
|
1998
|
+
icon: /* @__PURE__ */ o($t, {})
|
|
1947
1999
|
}
|
|
1948
2000
|
),
|
|
1949
2001
|
/* @__PURE__ */ o(
|
|
1950
|
-
|
|
2002
|
+
P,
|
|
1951
2003
|
{
|
|
1952
2004
|
label: "History",
|
|
1953
|
-
onClick:
|
|
1954
|
-
icon: /* @__PURE__ */ o(
|
|
2005
|
+
onClick: w,
|
|
2006
|
+
icon: /* @__PURE__ */ o(Wt, {})
|
|
1955
2007
|
}
|
|
1956
2008
|
),
|
|
1957
2009
|
/* @__PURE__ */ o(
|
|
1958
|
-
|
|
2010
|
+
P,
|
|
1959
2011
|
{
|
|
1960
2012
|
label: "About",
|
|
1961
|
-
onClick:
|
|
1962
|
-
icon: /* @__PURE__ */ o(
|
|
2013
|
+
onClick: L,
|
|
2014
|
+
icon: /* @__PURE__ */ o(Yt, {})
|
|
1963
2015
|
}
|
|
1964
2016
|
),
|
|
1965
|
-
e && e.id && !e.isComponent && /* @__PURE__ */
|
|
1966
|
-
/* @__PURE__ */ o(
|
|
2017
|
+
e && e.id && !e.isComponent && /* @__PURE__ */ u(x, { children: [
|
|
2018
|
+
/* @__PURE__ */ o(Jt, {}),
|
|
1967
2019
|
/* @__PURE__ */ o(
|
|
1968
|
-
|
|
2020
|
+
P,
|
|
1969
2021
|
{
|
|
1970
2022
|
label: "Log out",
|
|
1971
|
-
onClick:
|
|
1972
|
-
icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(
|
|
2023
|
+
onClick: te,
|
|
2024
|
+
icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(Ut, { monotone: !0 }) })
|
|
1973
2025
|
}
|
|
1974
2026
|
)
|
|
1975
2027
|
] })
|
|
@@ -1979,5 +2031,5 @@ const Ia = "av-toggle", _a = (e) => {
|
|
|
1979
2031
|
] });
|
|
1980
2032
|
};
|
|
1981
2033
|
export {
|
|
1982
|
-
|
|
2034
|
+
Ja as default
|
|
1983
2035
|
};
|