@versini/sassysaint 4.1.0 → 4.2.0
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.C-MlCVQG.js +570 -0
- package/dist/chunks/LazyHeader.CpW4p3Sk.js +1438 -0
- package/dist/chunks/{LazyMarkdownWithExtra.B_VU-4Vs.js → LazyMarkdownWithExtra.ewFAuyG5.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.C7EB2M7r.js → LazyMessageAssistant.Brog9qTL.js} +4 -4
- package/dist/chunks/{index.7JJYsiGN.BMY0Ig6p.js → index.7JJYsiGN.DsnJzdm4.js} +1 -1
- package/dist/chunks/{index.iWfWxGn2.js → index.BvXbpfqe.js} +5 -5
- package/dist/chunks/useLocalStorage.DJIqD2i3.js +1000 -0
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/dist/chunks/App.8LsHfy0z.js +0 -866
- package/dist/chunks/LazyHeader.D_ViNWrh.js +0 -1279
- package/dist/chunks/useLocalStorage.ChFZVshd.js +0 -681
|
@@ -1,681 +0,0 @@
|
|
|
1
|
-
import { jsxs as _, Fragment as M, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import m from "clsx";
|
|
3
|
-
import w, { useContext as k, useSyncExternalStore as W, useCallback as S, useEffect as P } from "react";
|
|
4
|
-
import { A as U, i as F, f as q, S as j, MODEL_GPT4 as J } from "./index.iWfWxGn2.js";
|
|
5
|
-
const Q = (e) => {
|
|
6
|
-
let a = "";
|
|
7
|
-
if (typeof e == "number" || typeof e == "string")
|
|
8
|
-
a = "m-" + e;
|
|
9
|
-
else {
|
|
10
|
-
const t = [];
|
|
11
|
-
(e == null ? void 0 : e.t) !== void 0 && t.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && t.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && t.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && t.push(`ml-${e.l}`), a = t.join(" ");
|
|
12
|
-
}
|
|
13
|
-
return a;
|
|
14
|
-
}, v = ({
|
|
15
|
-
children: e,
|
|
16
|
-
fill: a,
|
|
17
|
-
viewBox: t,
|
|
18
|
-
className: s,
|
|
19
|
-
defaultViewBox: r,
|
|
20
|
-
defaultClassName: o,
|
|
21
|
-
spacing: d,
|
|
22
|
-
title: c,
|
|
23
|
-
semantic: i = !1,
|
|
24
|
-
...n
|
|
25
|
-
}) => {
|
|
26
|
-
const h = Q(d), b = m(
|
|
27
|
-
h,
|
|
28
|
-
s || o
|
|
29
|
-
);
|
|
30
|
-
return /* @__PURE__ */ _(M, { children: [
|
|
31
|
-
/* @__PURE__ */ l(
|
|
32
|
-
"svg",
|
|
33
|
-
{
|
|
34
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
35
|
-
className: b,
|
|
36
|
-
viewBox: t || r,
|
|
37
|
-
fill: a || "currentColor",
|
|
38
|
-
role: "img",
|
|
39
|
-
"aria-hidden": !i,
|
|
40
|
-
focusable: !1,
|
|
41
|
-
...n,
|
|
42
|
-
children: e
|
|
43
|
-
}
|
|
44
|
-
),
|
|
45
|
-
c && i && /* @__PURE__ */ l("span", { className: "sr-only", children: c })
|
|
46
|
-
] });
|
|
47
|
-
};
|
|
48
|
-
/*!
|
|
49
|
-
@versini/ui-private v1.4.8
|
|
50
|
-
© 2024 gizmette.com
|
|
51
|
-
*/
|
|
52
|
-
try {
|
|
53
|
-
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
54
|
-
version: "1.4.8",
|
|
55
|
-
buildTime: "08/25/2024 02:12 PM EDT",
|
|
56
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
57
|
-
license: "MIT"
|
|
58
|
-
});
|
|
59
|
-
} catch {
|
|
60
|
-
}
|
|
61
|
-
/*!
|
|
62
|
-
@versini/ui-icons v1.11.0
|
|
63
|
-
© 2024 gizmette.com
|
|
64
|
-
*/
|
|
65
|
-
try {
|
|
66
|
-
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
67
|
-
version: "1.11.0",
|
|
68
|
-
buildTime: "08/25/2024 02:12 PM EDT",
|
|
69
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
70
|
-
license: "MIT"
|
|
71
|
-
});
|
|
72
|
-
} catch {
|
|
73
|
-
}
|
|
74
|
-
const Y = ({
|
|
75
|
-
className: e,
|
|
76
|
-
viewBox: a,
|
|
77
|
-
spacing: t,
|
|
78
|
-
title: s,
|
|
79
|
-
monotone: r,
|
|
80
|
-
...o
|
|
81
|
-
}) => /* @__PURE__ */ _(
|
|
82
|
-
v,
|
|
83
|
-
{
|
|
84
|
-
defaultViewBox: "0 0 576 512",
|
|
85
|
-
defaultClassName: "size-5",
|
|
86
|
-
viewBox: a,
|
|
87
|
-
className: e,
|
|
88
|
-
spacing: t,
|
|
89
|
-
title: s || "Sort",
|
|
90
|
-
...o,
|
|
91
|
-
children: [
|
|
92
|
-
/* @__PURE__ */ l(
|
|
93
|
-
"path",
|
|
94
|
-
{
|
|
95
|
-
opacity: r ? "1" : "0.4",
|
|
96
|
-
d: "M393.4 41.4c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L448 141.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V141.3l-41.4 41.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96z"
|
|
97
|
-
}
|
|
98
|
-
),
|
|
99
|
-
/* @__PURE__ */ l("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
), K = ({
|
|
103
|
-
className: e,
|
|
104
|
-
viewBox: a,
|
|
105
|
-
spacing: t,
|
|
106
|
-
title: s,
|
|
107
|
-
monotone: r,
|
|
108
|
-
...o
|
|
109
|
-
}) => /* @__PURE__ */ _(
|
|
110
|
-
v,
|
|
111
|
-
{
|
|
112
|
-
defaultViewBox: "0 0 576 512",
|
|
113
|
-
defaultClassName: "size-5",
|
|
114
|
-
viewBox: a,
|
|
115
|
-
className: e,
|
|
116
|
-
spacing: t,
|
|
117
|
-
title: s || "Sort Down",
|
|
118
|
-
...o,
|
|
119
|
-
children: [
|
|
120
|
-
/* @__PURE__ */ l(
|
|
121
|
-
"path",
|
|
122
|
-
{
|
|
123
|
-
opacity: r ? "1" : "0.4",
|
|
124
|
-
d: "M288 448c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32z"
|
|
125
|
-
}
|
|
126
|
-
),
|
|
127
|
-
/* @__PURE__ */ l("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V365.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z" })
|
|
128
|
-
]
|
|
129
|
-
}
|
|
130
|
-
), X = ({
|
|
131
|
-
className: e,
|
|
132
|
-
viewBox: a,
|
|
133
|
-
spacing: t,
|
|
134
|
-
title: s,
|
|
135
|
-
monotone: r,
|
|
136
|
-
...o
|
|
137
|
-
}) => /* @__PURE__ */ _(
|
|
138
|
-
v,
|
|
139
|
-
{
|
|
140
|
-
defaultViewBox: "0 0 576 512",
|
|
141
|
-
defaultClassName: "size-5",
|
|
142
|
-
viewBox: a,
|
|
143
|
-
className: e,
|
|
144
|
-
spacing: t,
|
|
145
|
-
title: s || "Sort Up",
|
|
146
|
-
...o,
|
|
147
|
-
children: [
|
|
148
|
-
/* @__PURE__ */ l(
|
|
149
|
-
"path",
|
|
150
|
-
{
|
|
151
|
-
opacity: r ? "1" : "0.4",
|
|
152
|
-
d: "M288 64c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32z"
|
|
153
|
-
}
|
|
154
|
-
),
|
|
155
|
-
/* @__PURE__ */ l("path", { d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3L63.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32z" })
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
), I = w.forwardRef(
|
|
159
|
-
({
|
|
160
|
-
children: e,
|
|
161
|
-
disabled: a = !1,
|
|
162
|
-
mode: t = "system",
|
|
163
|
-
focusMode: s = "system",
|
|
164
|
-
fullWidth: r = !1,
|
|
165
|
-
className: o,
|
|
166
|
-
type: d = "button",
|
|
167
|
-
raw: c = !1,
|
|
168
|
-
noBorder: i = !1,
|
|
169
|
-
"aria-label": n,
|
|
170
|
-
label: h,
|
|
171
|
-
size: b = "medium",
|
|
172
|
-
labelRight: p,
|
|
173
|
-
labelLeft: x,
|
|
174
|
-
spacing: B,
|
|
175
|
-
noBackground: z = !1,
|
|
176
|
-
align: L = "center",
|
|
177
|
-
active: V = !1,
|
|
178
|
-
...O
|
|
179
|
-
}, G) => {
|
|
180
|
-
const $ = U({
|
|
181
|
-
type: q,
|
|
182
|
-
mode: t,
|
|
183
|
-
focusMode: s,
|
|
184
|
-
fullWidth: r,
|
|
185
|
-
disabled: a,
|
|
186
|
-
raw: c,
|
|
187
|
-
className: o,
|
|
188
|
-
noBorder: i,
|
|
189
|
-
size: b,
|
|
190
|
-
labelRight: p,
|
|
191
|
-
labelLeft: x,
|
|
192
|
-
spacing: B,
|
|
193
|
-
noBackground: z,
|
|
194
|
-
align: L
|
|
195
|
-
}), R = m({
|
|
196
|
-
"text-copy-accent-dark": t === "light" && !c,
|
|
197
|
-
"text-copy-light": t === "dark" && !c,
|
|
198
|
-
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !c,
|
|
199
|
-
"text-copy-light dark:text-copy-accent-dark": t === "system" && !c
|
|
200
|
-
}), D = V ? m(
|
|
201
|
-
"relative",
|
|
202
|
-
"focus-within:static",
|
|
203
|
-
"focus-within:after:border-transparent",
|
|
204
|
-
"after:absolute",
|
|
205
|
-
"after:content-['']",
|
|
206
|
-
"after:border-b-2",
|
|
207
|
-
"after:bottom-[-4px]",
|
|
208
|
-
"after:left-0",
|
|
209
|
-
"after:right-0",
|
|
210
|
-
{
|
|
211
|
-
"after:border-table-dark": t === "dark",
|
|
212
|
-
"after:border-table-light": t === "light",
|
|
213
|
-
"after:border-table-dark dark:after:border-table-light": t === "system",
|
|
214
|
-
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
|
215
|
-
}
|
|
216
|
-
) : "";
|
|
217
|
-
return /* @__PURE__ */ l("div", { className: D, children: /* @__PURE__ */ _(
|
|
218
|
-
F,
|
|
219
|
-
{
|
|
220
|
-
ref: G,
|
|
221
|
-
className: $,
|
|
222
|
-
disabled: a,
|
|
223
|
-
type: d,
|
|
224
|
-
"aria-label": n || h,
|
|
225
|
-
...O,
|
|
226
|
-
children: [
|
|
227
|
-
x && /* @__PURE__ */ l("span", { className: "pr-2", children: x }),
|
|
228
|
-
/* @__PURE__ */ l("div", { className: R, children: e }),
|
|
229
|
-
p && /* @__PURE__ */ l("span", { className: "pl-2", children: p })
|
|
230
|
-
]
|
|
231
|
-
}
|
|
232
|
-
) });
|
|
233
|
-
}
|
|
234
|
-
);
|
|
235
|
-
I.displayName = "ButtonSort";
|
|
236
|
-
const y = w.createContext({
|
|
237
|
-
mode: "light",
|
|
238
|
-
cellWrapper: "thead",
|
|
239
|
-
stickyHeader: !1,
|
|
240
|
-
stickyFooter: !1,
|
|
241
|
-
compact: !1
|
|
242
|
-
}), N = "thead", C = "tfoot", u = "tbody", f = {
|
|
243
|
-
ASC: "asc",
|
|
244
|
-
DESC: "desc"
|
|
245
|
-
}, Z = ({
|
|
246
|
-
mode: e,
|
|
247
|
-
className: a,
|
|
248
|
-
wrapperClassName: t,
|
|
249
|
-
stickyHeader: s,
|
|
250
|
-
stickyFooter: r,
|
|
251
|
-
spacing: o
|
|
252
|
-
}) => ({
|
|
253
|
-
wrapper: m(
|
|
254
|
-
"not-prose relative w-full rounded-lg shadow-md",
|
|
255
|
-
j(o),
|
|
256
|
-
{
|
|
257
|
-
"overflow-x-auto": !s && !r,
|
|
258
|
-
"overflow-y-scroll": s || r,
|
|
259
|
-
"bg-surface-darker text-copy-light": e === "dark",
|
|
260
|
-
"bg-surface-light text-copy-dark": e === "light",
|
|
261
|
-
"bg-surface-darker text-copy-light dark:bg-surface-light dark:text-copy-dark": e === "system",
|
|
262
|
-
"bg-surface-light text-copy-dark dark:bg-surface-darker dark:text-copy-light": e === "alt-system"
|
|
263
|
-
},
|
|
264
|
-
t
|
|
265
|
-
),
|
|
266
|
-
table: m("my-0 w-full text-left text-sm", a, {
|
|
267
|
-
"text-copy-light": e === "dark",
|
|
268
|
-
"text-copy-dark": e === "light",
|
|
269
|
-
"text-copy-light dark:text-copy-dark": e === "system",
|
|
270
|
-
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
271
|
-
}),
|
|
272
|
-
caption: m("py-2 text-sm font-bold", {
|
|
273
|
-
"text-copy-light": e === "dark",
|
|
274
|
-
"text-copy-dark": e === "light",
|
|
275
|
-
"text-copy-light dark:text-copy-dark": e === "system",
|
|
276
|
-
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
277
|
-
})
|
|
278
|
-
}), ee = ({
|
|
279
|
-
className: e,
|
|
280
|
-
stickyHeader: a,
|
|
281
|
-
mode: t
|
|
282
|
-
}) => m(e, {
|
|
283
|
-
"sticky top-0 z-10": a,
|
|
284
|
-
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": a && t === "dark",
|
|
285
|
-
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": a && t === "system",
|
|
286
|
-
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": a && t === "light",
|
|
287
|
-
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": a && t === "alt-system"
|
|
288
|
-
}), te = ({
|
|
289
|
-
className: e,
|
|
290
|
-
stickyFooter: a,
|
|
291
|
-
mode: t
|
|
292
|
-
}) => m(e, {
|
|
293
|
-
"sticky bottom-0 z-10": a,
|
|
294
|
-
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": a && t === "dark",
|
|
295
|
-
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": a && t === "system",
|
|
296
|
-
"shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": a && t === "light",
|
|
297
|
-
"shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": a && t === "alt-system"
|
|
298
|
-
}), ae = ({
|
|
299
|
-
mode: e,
|
|
300
|
-
className: a,
|
|
301
|
-
cellWrapper: t
|
|
302
|
-
}) => t === N || t === C ? m({
|
|
303
|
-
"bg-table-head-dark": e === "dark",
|
|
304
|
-
"bg-table-head-light": e === "light",
|
|
305
|
-
"bg-table-head-dark dark:bg-table-head-light": e === "system",
|
|
306
|
-
"bg-table-head-light dark:bg-table-head-dark": e === "alt-system"
|
|
307
|
-
}) : m("border-b last:border-0", a, {
|
|
308
|
-
"border-table-dark": e === "dark",
|
|
309
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even": t === u && e === "dark",
|
|
310
|
-
"border-table-light": e === "light",
|
|
311
|
-
"odd:bg-table-light-odd even:bg-table-light-even": t === u && e === "light",
|
|
312
|
-
"border-table-dark dark:border-table-light": e === "system",
|
|
313
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === u && e === "system",
|
|
314
|
-
"border-table-light dark:border-table-dark": e === "alt-system",
|
|
315
|
-
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === u && e === "alt-system"
|
|
316
|
-
}), se = ({
|
|
317
|
-
cellWrapper: e,
|
|
318
|
-
className: a,
|
|
319
|
-
compact: t,
|
|
320
|
-
mode: s
|
|
321
|
-
}) => m(a, {
|
|
322
|
-
"text-copy-light": s === "dark",
|
|
323
|
-
"text-copy-dark": s === "light",
|
|
324
|
-
"text-copy-light dark:text-copy-dark": s === "system",
|
|
325
|
-
"text-copy-dark dark:text-copy-light": s === "alt-system",
|
|
326
|
-
"px-4 py-3": !t && (e === N || e === C),
|
|
327
|
-
"p-4": !t && e === u,
|
|
328
|
-
"px-4 py-1": t
|
|
329
|
-
}), he = ({
|
|
330
|
-
children: e,
|
|
331
|
-
mode: a = "system",
|
|
332
|
-
caption: t,
|
|
333
|
-
compact: s,
|
|
334
|
-
summary: r,
|
|
335
|
-
className: o,
|
|
336
|
-
wrapperClassName: d,
|
|
337
|
-
maxHeight: c,
|
|
338
|
-
stickyHeader: i,
|
|
339
|
-
stickyFooter: n,
|
|
340
|
-
spacing: h,
|
|
341
|
-
...b
|
|
342
|
-
}) => {
|
|
343
|
-
const p = Z({
|
|
344
|
-
mode: a,
|
|
345
|
-
className: o,
|
|
346
|
-
wrapperClassName: d,
|
|
347
|
-
stickyHeader: i,
|
|
348
|
-
stickyFooter: n,
|
|
349
|
-
spacing: h
|
|
350
|
-
});
|
|
351
|
-
return /* @__PURE__ */ l(
|
|
352
|
-
y.Provider,
|
|
353
|
-
{
|
|
354
|
-
value: { mode: a, stickyHeader: i, stickyFooter: n, compact: s },
|
|
355
|
-
children: /* @__PURE__ */ l(
|
|
356
|
-
"div",
|
|
357
|
-
{
|
|
358
|
-
className: p.wrapper,
|
|
359
|
-
...c && {
|
|
360
|
-
style: { maxHeight: c }
|
|
361
|
-
},
|
|
362
|
-
children: /* @__PURE__ */ _("table", { className: p.table, summary: r, ...b, children: [
|
|
363
|
-
t && /* @__PURE__ */ l("caption", { className: p.caption, children: t }),
|
|
364
|
-
e
|
|
365
|
-
] })
|
|
366
|
-
}
|
|
367
|
-
)
|
|
368
|
-
}
|
|
369
|
-
);
|
|
370
|
-
}, pe = ({
|
|
371
|
-
children: e,
|
|
372
|
-
className: a,
|
|
373
|
-
...t
|
|
374
|
-
}) => {
|
|
375
|
-
const s = k(y);
|
|
376
|
-
s.cellWrapper = N;
|
|
377
|
-
const r = ee({
|
|
378
|
-
className: a,
|
|
379
|
-
mode: s.mode,
|
|
380
|
-
stickyHeader: s.stickyHeader
|
|
381
|
-
});
|
|
382
|
-
return /* @__PURE__ */ l("thead", { className: r, ...t, children: e });
|
|
383
|
-
}, ge = ({
|
|
384
|
-
children: e,
|
|
385
|
-
className: a,
|
|
386
|
-
...t
|
|
387
|
-
}) => {
|
|
388
|
-
const s = k(y);
|
|
389
|
-
s.cellWrapper = C;
|
|
390
|
-
const r = te({
|
|
391
|
-
className: a,
|
|
392
|
-
mode: s.mode,
|
|
393
|
-
stickyFooter: s.stickyFooter
|
|
394
|
-
});
|
|
395
|
-
return /* @__PURE__ */ l("tfoot", { className: r, ...t, children: e });
|
|
396
|
-
}, ue = ({ children: e, ...a }) => {
|
|
397
|
-
const t = k(y);
|
|
398
|
-
return t.cellWrapper = u, /* @__PURE__ */ l("tbody", { ...a, children: e });
|
|
399
|
-
}, _e = ({
|
|
400
|
-
children: e,
|
|
401
|
-
className: a,
|
|
402
|
-
...t
|
|
403
|
-
}) => {
|
|
404
|
-
const s = k(y), r = ae({
|
|
405
|
-
mode: s.mode,
|
|
406
|
-
cellWrapper: s.cellWrapper,
|
|
407
|
-
className: a
|
|
408
|
-
});
|
|
409
|
-
return /* @__PURE__ */ l("tr", { className: r, ...t, children: e });
|
|
410
|
-
}, re = ({
|
|
411
|
-
children: e,
|
|
412
|
-
component: a,
|
|
413
|
-
className: t,
|
|
414
|
-
...s
|
|
415
|
-
}) => {
|
|
416
|
-
const r = k(y), o = a || (r.cellWrapper === N ? "th" : "td"), d = se({
|
|
417
|
-
cellWrapper: r.cellWrapper,
|
|
418
|
-
className: t,
|
|
419
|
-
mode: r.mode,
|
|
420
|
-
compact: r.compact
|
|
421
|
-
});
|
|
422
|
-
return /* @__PURE__ */ l(o, { className: d, ...s, children: e });
|
|
423
|
-
}, ye = ({
|
|
424
|
-
align: e,
|
|
425
|
-
children: a,
|
|
426
|
-
className: t,
|
|
427
|
-
component: s,
|
|
428
|
-
focusMode: r = "alt-system",
|
|
429
|
-
mode: o = "alt-system",
|
|
430
|
-
onClick: d,
|
|
431
|
-
sortDirection: c,
|
|
432
|
-
sortedCell: i,
|
|
433
|
-
cellId: n,
|
|
434
|
-
...h
|
|
435
|
-
}) => /* @__PURE__ */ l(
|
|
436
|
-
re,
|
|
437
|
-
{
|
|
438
|
-
component: s,
|
|
439
|
-
className: t,
|
|
440
|
-
role: "columnheader",
|
|
441
|
-
"aria-sort": c === f.ASC && i === n ? "ascending" : c === f.DESC && i === n ? "descending" : "other",
|
|
442
|
-
...h,
|
|
443
|
-
children: /* @__PURE__ */ l(
|
|
444
|
-
I,
|
|
445
|
-
{
|
|
446
|
-
active: i === n,
|
|
447
|
-
className: "rounded-none text-sm",
|
|
448
|
-
onClick: d,
|
|
449
|
-
align: e,
|
|
450
|
-
noBorder: !0,
|
|
451
|
-
focusMode: r,
|
|
452
|
-
mode: o,
|
|
453
|
-
fullWidth: !0,
|
|
454
|
-
labelRight: a,
|
|
455
|
-
children: c === f.ASC && i === n ? /* @__PURE__ */ l(X, { className: "size-4", monotone: !0 }) : c === f.DESC && i === n ? /* @__PURE__ */ l(K, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ l(Y, { className: "size-4", monotone: !0 })
|
|
456
|
-
}
|
|
457
|
-
)
|
|
458
|
-
}
|
|
459
|
-
), g = {
|
|
460
|
-
GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
|
|
461
|
-
location(latitude: $latitude, longitude: $longitude) {
|
|
462
|
-
country
|
|
463
|
-
state
|
|
464
|
-
city
|
|
465
|
-
displayName
|
|
466
|
-
}
|
|
467
|
-
}`,
|
|
468
|
-
GET_CHATS: `query GetChats($userId: String!) {
|
|
469
|
-
chats(user: $userId) {
|
|
470
|
-
timestamp
|
|
471
|
-
id
|
|
472
|
-
messages {
|
|
473
|
-
content
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
}`,
|
|
477
|
-
GET_CHATS_STATS: `query GetChatsStats($userId: String!) {
|
|
478
|
-
chatsStats(user: $userId) {
|
|
479
|
-
totalChats
|
|
480
|
-
averageProcessingTimes
|
|
481
|
-
}
|
|
482
|
-
}`,
|
|
483
|
-
GET_CHAT: `query GetChatById($id: String!) {
|
|
484
|
-
chatById(id: $id) {
|
|
485
|
-
model
|
|
486
|
-
usage
|
|
487
|
-
messages {
|
|
488
|
-
content
|
|
489
|
-
role
|
|
490
|
-
name
|
|
491
|
-
processingTime
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
}`,
|
|
495
|
-
DELETE_CHAT: `mutation DeleteChat($id: String!, $userId: String!) {
|
|
496
|
-
deleteChat(id: $id, user: $userId) {
|
|
497
|
-
timestamp
|
|
498
|
-
id
|
|
499
|
-
messages {
|
|
500
|
-
content
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
}`,
|
|
504
|
-
ABOUT: `query About {
|
|
505
|
-
about {
|
|
506
|
-
version
|
|
507
|
-
models
|
|
508
|
-
plugins
|
|
509
|
-
}
|
|
510
|
-
}`
|
|
511
|
-
}, be = {
|
|
512
|
-
GET_LOCATION: {
|
|
513
|
-
schema: g.GET_LOCATION,
|
|
514
|
-
method: "location",
|
|
515
|
-
data: (e) => ({
|
|
516
|
-
latitude: e.latitude,
|
|
517
|
-
longitude: e.longitude
|
|
518
|
-
})
|
|
519
|
-
},
|
|
520
|
-
GET_CHATS: {
|
|
521
|
-
schema: g.GET_CHATS,
|
|
522
|
-
method: "chats",
|
|
523
|
-
data: (e) => ({
|
|
524
|
-
userId: e.userId
|
|
525
|
-
})
|
|
526
|
-
},
|
|
527
|
-
GET_CHATS_STATS: {
|
|
528
|
-
schema: g.GET_CHATS_STATS,
|
|
529
|
-
method: "chatsStats",
|
|
530
|
-
data: (e) => ({
|
|
531
|
-
userId: e.userId
|
|
532
|
-
})
|
|
533
|
-
},
|
|
534
|
-
GET_CHAT: {
|
|
535
|
-
schema: g.GET_CHAT,
|
|
536
|
-
method: "chatById",
|
|
537
|
-
data: (e) => ({
|
|
538
|
-
id: e.id
|
|
539
|
-
})
|
|
540
|
-
},
|
|
541
|
-
DELETE_CHAT: {
|
|
542
|
-
schema: g.DELETE_CHAT,
|
|
543
|
-
method: "deleteChat",
|
|
544
|
-
data: (e) => ({
|
|
545
|
-
id: e.id,
|
|
546
|
-
userId: e.userId
|
|
547
|
-
})
|
|
548
|
-
},
|
|
549
|
-
ABOUT: {
|
|
550
|
-
schema: g.ABOUT,
|
|
551
|
-
method: "about",
|
|
552
|
-
data: () => ({})
|
|
553
|
-
}
|
|
554
|
-
}, H = process.env.PUBLIC_SASSY_API_SERVER_URL, oe = async ({
|
|
555
|
-
query: e,
|
|
556
|
-
data: a,
|
|
557
|
-
headers: t = {}
|
|
558
|
-
}) => await fetch(`${H}/graphql`, {
|
|
559
|
-
method: "POST",
|
|
560
|
-
credentials: "include",
|
|
561
|
-
headers: {
|
|
562
|
-
...t,
|
|
563
|
-
"Content-Type": "application/json",
|
|
564
|
-
Accept: "application/json"
|
|
565
|
-
},
|
|
566
|
-
body: JSON.stringify({
|
|
567
|
-
query: e,
|
|
568
|
-
variables: a
|
|
569
|
-
})
|
|
570
|
-
}), ke = async ({
|
|
571
|
-
accessToken: e,
|
|
572
|
-
type: a,
|
|
573
|
-
params: t = {}
|
|
574
|
-
}) => {
|
|
575
|
-
const s = a != null && a.data ? a.data(t) : t;
|
|
576
|
-
try {
|
|
577
|
-
const r = `Bearer ${e}`, o = await oe({
|
|
578
|
-
headers: {
|
|
579
|
-
authorization: r
|
|
580
|
-
},
|
|
581
|
-
query: a.schema,
|
|
582
|
-
data: s
|
|
583
|
-
});
|
|
584
|
-
if (o.status !== 200)
|
|
585
|
-
return { status: o.status, data: [] };
|
|
586
|
-
const { data: d, errors: c } = await o.json();
|
|
587
|
-
return {
|
|
588
|
-
status: o.status,
|
|
589
|
-
data: d[a.method],
|
|
590
|
-
errors: c
|
|
591
|
-
};
|
|
592
|
-
} catch (r) {
|
|
593
|
-
return console.error(r), { status: 500, data: [] };
|
|
594
|
-
}
|
|
595
|
-
}, fe = async ({
|
|
596
|
-
accessToken: e,
|
|
597
|
-
name: a,
|
|
598
|
-
data: t,
|
|
599
|
-
method: s = "POST"
|
|
600
|
-
}) => {
|
|
601
|
-
const r = `Bearer ${e}`;
|
|
602
|
-
return await fetch(`${H}/api/${a}`, {
|
|
603
|
-
method: s,
|
|
604
|
-
credentials: "include",
|
|
605
|
-
headers: {
|
|
606
|
-
"Content-Type": "application/json",
|
|
607
|
-
authorization: r
|
|
608
|
-
},
|
|
609
|
-
body: JSON.stringify(t)
|
|
610
|
-
});
|
|
611
|
-
}, we = w.createContext({
|
|
612
|
-
state: {
|
|
613
|
-
id: "",
|
|
614
|
-
model: J,
|
|
615
|
-
usage: 0,
|
|
616
|
-
messages: [],
|
|
617
|
-
isComponent: !1
|
|
618
|
-
},
|
|
619
|
-
dispatch: () => {
|
|
620
|
-
},
|
|
621
|
-
serverStats: { version: "", models: [], plugins: [] }
|
|
622
|
-
}), Ne = w.createContext({
|
|
623
|
-
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
|
624
|
-
dispatch: () => {
|
|
625
|
-
}
|
|
626
|
-
});
|
|
627
|
-
function A(e, a) {
|
|
628
|
-
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: a }));
|
|
629
|
-
}
|
|
630
|
-
const T = (e, a) => {
|
|
631
|
-
const t = JSON.stringify(
|
|
632
|
-
typeof a == "function" ? a() : a
|
|
633
|
-
);
|
|
634
|
-
window.localStorage.setItem(e, t), A(e, t);
|
|
635
|
-
}, le = (e) => {
|
|
636
|
-
window.localStorage.removeItem(e), A(e, null);
|
|
637
|
-
}, E = (e) => window.localStorage.getItem(e), ce = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
638
|
-
function xe({
|
|
639
|
-
key: e,
|
|
640
|
-
initialValue: a
|
|
641
|
-
}) {
|
|
642
|
-
const t = W(ce, () => E(e)), s = S(
|
|
643
|
-
(d) => {
|
|
644
|
-
try {
|
|
645
|
-
const c = typeof d == "function" ? d(JSON.parse(t)) : d;
|
|
646
|
-
c == null ? le(e) : T(e, c);
|
|
647
|
-
} catch (c) {
|
|
648
|
-
console.warn(c);
|
|
649
|
-
}
|
|
650
|
-
},
|
|
651
|
-
[e, t]
|
|
652
|
-
), r = S(() => {
|
|
653
|
-
s(a);
|
|
654
|
-
}, [a, s]), o = S(() => {
|
|
655
|
-
s(null);
|
|
656
|
-
}, [s]);
|
|
657
|
-
return P(() => {
|
|
658
|
-
try {
|
|
659
|
-
E(e) === null && typeof a < "u" && T(e, a);
|
|
660
|
-
} catch (d) {
|
|
661
|
-
console.warn(d);
|
|
662
|
-
}
|
|
663
|
-
}, [e, a]), [t ? JSON.parse(t) : null, s, r, o];
|
|
664
|
-
}
|
|
665
|
-
export {
|
|
666
|
-
we as AppContext,
|
|
667
|
-
xe as E,
|
|
668
|
-
Ne as HistoryContext,
|
|
669
|
-
re as J,
|
|
670
|
-
be as SERVICE_TYPES,
|
|
671
|
-
pe as at,
|
|
672
|
-
ye as ct,
|
|
673
|
-
he as et,
|
|
674
|
-
v as g,
|
|
675
|
-
f as k,
|
|
676
|
-
_e as lt,
|
|
677
|
-
fe as restCall,
|
|
678
|
-
ge as rt,
|
|
679
|
-
ke as serviceCall,
|
|
680
|
-
ue as st
|
|
681
|
-
};
|