@versini/sassysaint 1.0.6 → 1.0.7
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.DpwMzH8A.js → App.CD16NP9z.js} +22 -22
- package/dist/chunks/{LazyHeader.C1RUIYBp.js → LazyHeader.C2wdIAfr.js} +155 -155
- package/dist/chunks/{LazyMarkdownWithExtra.BlxpnMyE.js → LazyMarkdownWithExtra.D8tHsQkl.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.CpqGU5k9.js → LazyMessageAssistant.BsRJpVww.js} +4 -4
- package/dist/chunks/index.DgZgswqQ.js +3949 -0
- package/dist/chunks/{index.DruzEDnN.CTTNEhUa.js → index.DruzEDnN.6FKRzVGI.js} +1 -1
- package/dist/chunks/{useLocalStorage.CRw27Sp5.js → useLocalStorage.D3_0xm5E.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +4 -4
- package/dist/chunks/index.BKyjC-Gq.js +0 -3466
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as c, jsx as t, Fragment as w } from "react/jsx-runtime";
|
|
2
|
-
import { O, i$1 as Le, N as De, p as Oe, o as _e, g as A, N$1 as _, CARDS as C, renderDataAsList as P, pluralize as q, ABOUT_TITLE as ze, MODEL_GPT4 as Be, numberFormatter as Ve, durationFormatter as fe, NA as Pe, ROLE_ASSISTANT as Fe, extractAverage as $e, GPT4_MAX_TOKENS as Ge,
|
|
2
|
+
import { O, i$1 as Le, N as De, p as Oe, o as _e, g as A, N$1 as _, CARDS as C, renderDataAsList as P, pluralize as q, ABOUT_TITLE as ze, MODEL_GPT4 as Be, numberFormatter as Ve, durationFormatter as fe, NA as Pe, ROLE_ASSISTANT as Fe, extractAverage as $e, GPT4_MAX_TOKENS as Ge, _n as G, STATS as ge, b as W, j as M, x as Q, LOCAL_STORAGE_PREFIX as Z, LOCAL_STORAGE_SORT as Ue, ACTION_RESET as je, ACTION_RESTORE as Ke, truncate as Ye, ACTION_SORT as ne, LOCAL_STORAGE_SEARCH as Je, G as We, ACTION_SEARCH as Xe, HISTORY_TITLE as qe, LOCAL_STORAGE_CHAT_DETAILS as Qe, LOCAL_STORAGE_LOCATION as Ze, J as et, f$2 as tt, ACTION_LOCATION as le, getCurrentGeoLocation as st, convertLatitudeToDMS as at, convertLongitudeToDMS as nt, PROFILE_TITLE as rt, LOG_OUT as de } from "./index.DgZgswqQ.js";
|
|
3
3
|
import * as ce from "react";
|
|
4
4
|
import ot, { forwardRef as Ce, useState as T, useRef as F, useContext as R, useEffect as L, Suspense as ct, lazy as it, useId as lt } from "react";
|
|
5
|
-
import { g as dt, AppContext as U, serviceCall as te, SERVICE_TYPES as se, HistoryContext as Ne, E as ee, k as v, et as ut, at as mt, lt as
|
|
5
|
+
import { g as dt, AppContext as U, serviceCall as te, SERVICE_TYPES as se, HistoryContext as Ne, E as ee, k as v, et as ut, at as mt, lt as re, J as H, ct as ht, st as pt, rt as ft } from "./useLocalStorage.D3_0xm5E.js";
|
|
6
6
|
import E from "clsx";
|
|
7
7
|
import { useFloatingTree as Te, useFloatingNodeId as gt, useListItem as ye, useFloating as Ct, offset as Nt, flip as Tt, shift as yt, autoUpdate as bt, useClick as St, useRole as wt, useDismiss as Et, useListNavigation as kt, useTypeahead as xt, useInteractions as vt, useMergeRefs as be, FloatingNode as At, FloatingList as It, FloatingPortal as Ht, FloatingFocusManager as Mt, FloatingTree as Rt } from "@floating-ui/react";
|
|
8
8
|
const ie = ce.createContext({
|
|
@@ -30,24 +30,24 @@ const ie = ce.createContext({
|
|
|
30
30
|
trigger: e,
|
|
31
31
|
children: s,
|
|
32
32
|
label: a = "Open menu",
|
|
33
|
-
defaultPlacement:
|
|
34
|
-
onOpenChange:
|
|
33
|
+
defaultPlacement: n = "bottom-start",
|
|
34
|
+
onOpenChange: r,
|
|
35
35
|
spacing: o,
|
|
36
36
|
mode: l = "system",
|
|
37
37
|
focusMode: d = "system",
|
|
38
38
|
...u
|
|
39
39
|
}, f) => {
|
|
40
|
-
const [N, m] = T(!1), [y, b] = T(!1), [S, p] = T(null), k = F([]), i = F([]), h = R(ie), g = Te(), x = gt(), z = ye(), { floatingStyles: ae, refs:
|
|
40
|
+
const [N, m] = T(!1), [y, b] = T(!1), [S, p] = T(null), k = F([]), i = F([]), h = R(ie), g = Te(), x = gt(), z = ye(), { floatingStyles: ae, refs: Y, context: I } = Ct({
|
|
41
41
|
nodeId: x,
|
|
42
42
|
open: N,
|
|
43
43
|
onOpenChange: (V) => {
|
|
44
|
-
m(V),
|
|
44
|
+
m(V), r == null || r(V);
|
|
45
45
|
},
|
|
46
|
-
placement:
|
|
46
|
+
placement: n,
|
|
47
47
|
strategy: "fixed",
|
|
48
48
|
middleware: [Nt({ mainAxis: 10 }), Tt(), yt()],
|
|
49
49
|
whileElementsMounted: bt
|
|
50
|
-
}),
|
|
50
|
+
}), J = St(I, {
|
|
51
51
|
event: "mousedown",
|
|
52
52
|
toggle: !0,
|
|
53
53
|
ignoreMouse: !1
|
|
@@ -61,7 +61,7 @@ const ie = ce.createContext({
|
|
|
61
61
|
listRef: i,
|
|
62
62
|
onMatch: N ? p : void 0,
|
|
63
63
|
activeIndex: S
|
|
64
|
-
}), { getReferenceProps: Ae, getFloatingProps: Ie, getItemProps: He } = vt([
|
|
64
|
+
}), { getReferenceProps: Ae, getFloatingProps: Ie, getItemProps: He } = vt([J, B, ke, xe, ve]), Me = ue(e) === "Button" || ue(e) === "ButtonIcon", Re = ot.cloneElement(e, {
|
|
65
65
|
mode: l,
|
|
66
66
|
focusMode: d,
|
|
67
67
|
spacing: o,
|
|
@@ -69,7 +69,7 @@ const ie = ce.createContext({
|
|
|
69
69
|
"aria-label": a,
|
|
70
70
|
"data-open": N ? "" : void 0,
|
|
71
71
|
"data-focus-inside": y ? "" : void 0,
|
|
72
|
-
ref: be([
|
|
72
|
+
ref: be([Y.setReference, z.ref, f]),
|
|
73
73
|
...Ae(
|
|
74
74
|
h.getItemProps({
|
|
75
75
|
...u
|
|
@@ -80,12 +80,12 @@ const ie = ce.createContext({
|
|
|
80
80
|
if (!g)
|
|
81
81
|
return;
|
|
82
82
|
function V() {
|
|
83
|
-
m(!1),
|
|
83
|
+
m(!1), r == null || r(!1);
|
|
84
84
|
}
|
|
85
85
|
return g.events.on("click", V), () => {
|
|
86
86
|
g.events.off("click", V);
|
|
87
87
|
};
|
|
88
|
-
}, [g,
|
|
88
|
+
}, [g, r]), L(() => {
|
|
89
89
|
N && g && g.events.emit("menuopen", { nodeId: x });
|
|
90
90
|
}, [g, N, x]), /* @__PURE__ */ c(At, { id: x, children: [
|
|
91
91
|
Re,
|
|
@@ -109,7 +109,7 @@ const ie = ce.createContext({
|
|
|
109
109
|
children: /* @__PURE__ */ t(
|
|
110
110
|
"div",
|
|
111
111
|
{
|
|
112
|
-
ref:
|
|
112
|
+
ref: Y.setFloating,
|
|
113
113
|
className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
|
|
114
114
|
style: ae,
|
|
115
115
|
...Ie(),
|
|
@@ -125,13 +125,13 @@ const ie = ce.createContext({
|
|
|
125
125
|
), we = Ce((e, s) => /* @__PURE__ */ t(Rt, { children: /* @__PURE__ */ t(Se, { ...e, ref: s }) }));
|
|
126
126
|
we.displayName = "Menu";
|
|
127
127
|
Se.displayName = "MenuComponent";
|
|
128
|
-
const D = ce.forwardRef(({ label: e, disabled: s, icon: a, ...
|
|
128
|
+
const D = ce.forwardRef(({ label: e, disabled: s, icon: a, ...n }, r) => {
|
|
129
129
|
const o = ce.useContext(ie), l = ye({ label: s ? null : e }), d = Te();
|
|
130
130
|
return /* @__PURE__ */ c(
|
|
131
131
|
"button",
|
|
132
132
|
{
|
|
133
|
-
...
|
|
134
|
-
ref: be([l.ref,
|
|
133
|
+
...n,
|
|
134
|
+
ref: be([l.ref, r]),
|
|
135
135
|
role: "menuitem",
|
|
136
136
|
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",
|
|
137
137
|
tabIndex: 0,
|
|
@@ -139,11 +139,11 @@ const D = ce.forwardRef(({ label: e, disabled: s, icon: a, ...r }, n) => {
|
|
|
139
139
|
...o.getItemProps({
|
|
140
140
|
onClick(u) {
|
|
141
141
|
var f;
|
|
142
|
-
(f =
|
|
142
|
+
(f = n.onClick) == null || f.call(n, u), d == null || d.events.emit("click");
|
|
143
143
|
},
|
|
144
144
|
onFocus(u) {
|
|
145
145
|
var f;
|
|
146
|
-
(f =
|
|
146
|
+
(f = n.onFocus) == null || f.call(n, u), o.setHasFocusInside(!0);
|
|
147
147
|
}
|
|
148
148
|
}),
|
|
149
149
|
children: [
|
|
@@ -161,8 +161,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
161
161
|
className: e,
|
|
162
162
|
viewBox: s,
|
|
163
163
|
spacing: a,
|
|
164
|
-
title:
|
|
165
|
-
monotone:
|
|
164
|
+
title: n,
|
|
165
|
+
monotone: r,
|
|
166
166
|
...o
|
|
167
167
|
}) => /* @__PURE__ */ t(
|
|
168
168
|
dt,
|
|
@@ -172,21 +172,21 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
172
172
|
viewBox: s,
|
|
173
173
|
className: e,
|
|
174
174
|
spacing: a,
|
|
175
|
-
title:
|
|
175
|
+
title: n || "Close",
|
|
176
176
|
...o,
|
|
177
177
|
children: /* @__PURE__ */ t("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" })
|
|
178
178
|
}
|
|
179
|
-
),
|
|
179
|
+
), X = "panel", oe = "messagebox", Ot = ({
|
|
180
180
|
kind: e,
|
|
181
181
|
borderMode: s
|
|
182
182
|
}) => ({
|
|
183
183
|
main: E(
|
|
184
184
|
"prose prose-lighter flex flex-col bg-surface-medium md:max-w-2xl",
|
|
185
185
|
{
|
|
186
|
-
[`${Le} h-full min-h-[95%] w-full sm:h-auto sm:min-h-[10rem] sm:w-[95%] sm:rounded-lg sm:border-2`]: e ===
|
|
186
|
+
[`${Le} h-full min-h-[95%] w-full sm:h-auto sm:min-h-[10rem] sm:w-[95%] sm:rounded-lg sm:border-2`]: e === X,
|
|
187
187
|
[`${De} w-[95%] rounded-lg border-2 sm:w-[50%]`]: e === oe,
|
|
188
|
-
"sm:border-border-dark": s === "dark" && e ===
|
|
189
|
-
"sm:border-border-accent": s === "light" && e ===
|
|
188
|
+
"sm:border-border-dark": s === "dark" && e === X,
|
|
189
|
+
"sm:border-border-accent": s === "light" && e === X,
|
|
190
190
|
"border-border-dark": s === "dark" && e === oe,
|
|
191
191
|
"border-border-accent": s === "light" && e === oe
|
|
192
192
|
}
|
|
@@ -196,17 +196,17 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
196
196
|
header: "p-4 mb-0",
|
|
197
197
|
close: "p-4"
|
|
198
198
|
}), j = (e) => it(
|
|
199
|
-
() => import("./index.DruzEDnN.
|
|
199
|
+
() => import("./index.DruzEDnN.6FKRzVGI.js").then((s) => ({
|
|
200
200
|
default: s[e]
|
|
201
201
|
}))
|
|
202
|
-
), _t = j("Modal"), zt = j("ModalClose"), Bt = j("ModalContent"), Vt = j("ModalDescription"), Pt = j("ModalHeading"),
|
|
202
|
+
), _t = j("Modal"), zt = j("ModalClose"), Bt = j("ModalContent"), Vt = j("ModalDescription"), Pt = j("ModalHeading"), K = ({
|
|
203
203
|
open: e,
|
|
204
204
|
onOpenChange: s,
|
|
205
205
|
title: a,
|
|
206
|
-
children:
|
|
207
|
-
footer:
|
|
206
|
+
children: n,
|
|
207
|
+
footer: r,
|
|
208
208
|
borderMode: o = "light",
|
|
209
|
-
kind: l =
|
|
209
|
+
kind: l = X
|
|
210
210
|
}) => {
|
|
211
211
|
const d = F(""), u = Ot({ kind: l, borderMode: o });
|
|
212
212
|
return L(() => (e && (d.current = document.title, document.title = `${a} | ${d.current}`), () => {
|
|
@@ -231,8 +231,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
231
231
|
),
|
|
232
232
|
/* @__PURE__ */ t(Pt, { className: u.header, children: a })
|
|
233
233
|
] }),
|
|
234
|
-
/* @__PURE__ */ t(Vt, { className: u.content, children:
|
|
235
|
-
|
|
234
|
+
/* @__PURE__ */ t(Vt, { className: u.content, children: n }),
|
|
235
|
+
r && /* @__PURE__ */ t("div", { className: u.footer, children: r })
|
|
236
236
|
] }) }) });
|
|
237
237
|
}, Ft = () => E("peer", "h-6", "w-11", "rounded-full"), $t = ({
|
|
238
238
|
focusMode: e
|
|
@@ -274,7 +274,7 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
274
274
|
"border-border-light bg-surface-darker": e === "dark",
|
|
275
275
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
|
276
276
|
"border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
|
277
|
-
}),
|
|
277
|
+
}), Kt = ({
|
|
278
278
|
mode: e,
|
|
279
279
|
labelHidden: s
|
|
280
280
|
}) => s ? "sr-only" : E("ml-2 text-sm", {
|
|
@@ -282,42 +282,42 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
282
282
|
"text-copy-lighter": e === "dark",
|
|
283
283
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
|
284
284
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
|
285
|
-
}),
|
|
285
|
+
}), Yt = ({ spacing: e }) => E(
|
|
286
286
|
Oe,
|
|
287
287
|
"relative flex cursor-pointer items-center",
|
|
288
288
|
_e(e)
|
|
289
|
-
),
|
|
289
|
+
), Jt = ({
|
|
290
290
|
mode: e,
|
|
291
291
|
focusMode: s,
|
|
292
292
|
labelHidden: a,
|
|
293
|
-
spacing:
|
|
294
|
-
noBorder:
|
|
293
|
+
spacing: n,
|
|
294
|
+
noBorder: r
|
|
295
295
|
}) => ({
|
|
296
296
|
toggle: E(
|
|
297
297
|
Ft(),
|
|
298
|
-
jt({ mode: e, noBorder:
|
|
298
|
+
jt({ mode: e, noBorder: r }),
|
|
299
299
|
$t({ focusMode: s }),
|
|
300
300
|
Ut(),
|
|
301
301
|
Gt()
|
|
302
302
|
),
|
|
303
|
-
label:
|
|
303
|
+
label: Kt({ mode: e, labelHidden: a }),
|
|
304
304
|
input: "peer sr-only",
|
|
305
|
-
wrapper:
|
|
306
|
-
}),
|
|
305
|
+
wrapper: Yt({ spacing: n })
|
|
306
|
+
}), Wt = ({
|
|
307
307
|
checked: e = !1,
|
|
308
308
|
onChange: s,
|
|
309
309
|
label: a,
|
|
310
|
-
labelHidden:
|
|
311
|
-
name:
|
|
310
|
+
labelHidden: n = !1,
|
|
311
|
+
name: r,
|
|
312
312
|
mode: o = "system",
|
|
313
313
|
focusMode: l = "system",
|
|
314
314
|
spacing: d,
|
|
315
315
|
noBorder: u = !1
|
|
316
316
|
}) => {
|
|
317
|
-
const f =
|
|
317
|
+
const f = Jt({
|
|
318
318
|
mode: o,
|
|
319
319
|
focusMode: l,
|
|
320
|
-
labelHidden:
|
|
320
|
+
labelHidden: n,
|
|
321
321
|
spacing: d,
|
|
322
322
|
noBorder: u
|
|
323
323
|
}), N = (m) => {
|
|
@@ -327,7 +327,7 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
327
327
|
/* @__PURE__ */ t(
|
|
328
328
|
"input",
|
|
329
329
|
{
|
|
330
|
-
name:
|
|
330
|
+
name: r,
|
|
331
331
|
checked: e,
|
|
332
332
|
type: "checkbox",
|
|
333
333
|
className: f.input,
|
|
@@ -337,12 +337,12 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
337
337
|
/* @__PURE__ */ t("div", { className: f.toggle }),
|
|
338
338
|
/* @__PURE__ */ t("span", { className: f.label, children: a })
|
|
339
339
|
] });
|
|
340
|
-
},
|
|
340
|
+
}, Xt = ({
|
|
341
341
|
className: e,
|
|
342
342
|
viewBox: s,
|
|
343
343
|
spacing: a,
|
|
344
|
-
title:
|
|
345
|
-
monotone:
|
|
344
|
+
title: n,
|
|
345
|
+
monotone: r,
|
|
346
346
|
...o
|
|
347
347
|
}) => /* @__PURE__ */ c(
|
|
348
348
|
A,
|
|
@@ -352,13 +352,13 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
352
352
|
viewBox: s,
|
|
353
353
|
className: e,
|
|
354
354
|
spacing: a,
|
|
355
|
-
title:
|
|
355
|
+
title: n || "Back",
|
|
356
356
|
...o,
|
|
357
357
|
children: [
|
|
358
358
|
/* @__PURE__ */ t(
|
|
359
359
|
"path",
|
|
360
360
|
{
|
|
361
|
-
opacity:
|
|
361
|
+
opacity: r ? "1" : "0.4",
|
|
362
362
|
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"
|
|
363
363
|
}
|
|
364
364
|
),
|
|
@@ -369,8 +369,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
369
369
|
className: e,
|
|
370
370
|
viewBox: s,
|
|
371
371
|
spacing: a,
|
|
372
|
-
title:
|
|
373
|
-
monotone:
|
|
372
|
+
title: n,
|
|
373
|
+
monotone: r,
|
|
374
374
|
...o
|
|
375
375
|
}) => /* @__PURE__ */ c(
|
|
376
376
|
A,
|
|
@@ -380,13 +380,13 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
380
380
|
viewBox: s,
|
|
381
381
|
className: e,
|
|
382
382
|
spacing: a,
|
|
383
|
-
title:
|
|
383
|
+
title: n || "Chart",
|
|
384
384
|
...o,
|
|
385
385
|
children: [
|
|
386
386
|
/* @__PURE__ */ t(
|
|
387
387
|
"path",
|
|
388
388
|
{
|
|
389
|
-
opacity:
|
|
389
|
+
opacity: r ? "1" : "0.4",
|
|
390
390
|
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"
|
|
391
391
|
}
|
|
392
392
|
),
|
|
@@ -397,8 +397,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
397
397
|
className: e,
|
|
398
398
|
viewBox: s,
|
|
399
399
|
spacing: a,
|
|
400
|
-
title:
|
|
401
|
-
monotone:
|
|
400
|
+
title: n,
|
|
401
|
+
monotone: r,
|
|
402
402
|
...o
|
|
403
403
|
}) => /* @__PURE__ */ c(
|
|
404
404
|
A,
|
|
@@ -408,13 +408,13 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
408
408
|
viewBox: s,
|
|
409
409
|
className: e,
|
|
410
410
|
spacing: a,
|
|
411
|
-
title:
|
|
411
|
+
title: n || "Delete",
|
|
412
412
|
...o,
|
|
413
413
|
children: [
|
|
414
414
|
/* @__PURE__ */ t(
|
|
415
415
|
"path",
|
|
416
416
|
{
|
|
417
|
-
opacity:
|
|
417
|
+
opacity: r ? "1" : "0.4",
|
|
418
418
|
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"
|
|
419
419
|
}
|
|
420
420
|
),
|
|
@@ -425,8 +425,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
425
425
|
className: e,
|
|
426
426
|
viewBox: s,
|
|
427
427
|
spacing: a,
|
|
428
|
-
title:
|
|
429
|
-
monotone:
|
|
428
|
+
title: n,
|
|
429
|
+
monotone: r,
|
|
430
430
|
...o
|
|
431
431
|
}) => /* @__PURE__ */ c(
|
|
432
432
|
A,
|
|
@@ -436,13 +436,13 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
436
436
|
viewBox: s,
|
|
437
437
|
className: e,
|
|
438
438
|
spacing: a,
|
|
439
|
-
title:
|
|
439
|
+
title: n || "History",
|
|
440
440
|
...o,
|
|
441
441
|
children: [
|
|
442
442
|
/* @__PURE__ */ t(
|
|
443
443
|
"path",
|
|
444
444
|
{
|
|
445
|
-
opacity:
|
|
445
|
+
opacity: r ? "1" : "0.4",
|
|
446
446
|
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"
|
|
447
447
|
}
|
|
448
448
|
),
|
|
@@ -453,8 +453,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
453
453
|
className: e,
|
|
454
454
|
viewBox: s,
|
|
455
455
|
spacing: a,
|
|
456
|
-
title:
|
|
457
|
-
monotone:
|
|
456
|
+
title: n,
|
|
457
|
+
monotone: r,
|
|
458
458
|
...o
|
|
459
459
|
}) => /* @__PURE__ */ c(
|
|
460
460
|
A,
|
|
@@ -464,7 +464,7 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
464
464
|
viewBox: s,
|
|
465
465
|
className: e,
|
|
466
466
|
spacing: a,
|
|
467
|
-
title:
|
|
467
|
+
title: n || "Info",
|
|
468
468
|
...o,
|
|
469
469
|
children: [
|
|
470
470
|
/* @__PURE__ */ t(
|
|
@@ -481,8 +481,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
481
481
|
className: e,
|
|
482
482
|
viewBox: s,
|
|
483
483
|
spacing: a,
|
|
484
|
-
title:
|
|
485
|
-
monotone:
|
|
484
|
+
title: n,
|
|
485
|
+
monotone: r,
|
|
486
486
|
...o
|
|
487
487
|
}) => /* @__PURE__ */ c(
|
|
488
488
|
A,
|
|
@@ -492,7 +492,7 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
492
492
|
viewBox: s,
|
|
493
493
|
className: e,
|
|
494
494
|
spacing: a,
|
|
495
|
-
title:
|
|
495
|
+
title: n || "Profile",
|
|
496
496
|
...o,
|
|
497
497
|
children: [
|
|
498
498
|
/* @__PURE__ */ t(
|
|
@@ -509,8 +509,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
509
509
|
className: e,
|
|
510
510
|
viewBox: s,
|
|
511
511
|
spacing: a,
|
|
512
|
-
title:
|
|
513
|
-
monotone:
|
|
512
|
+
title: n,
|
|
513
|
+
monotone: r,
|
|
514
514
|
...o
|
|
515
515
|
}) => /* @__PURE__ */ c(
|
|
516
516
|
A,
|
|
@@ -520,14 +520,14 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
520
520
|
viewBox: s,
|
|
521
521
|
className: e,
|
|
522
522
|
spacing: a,
|
|
523
|
-
title:
|
|
523
|
+
title: n || "Refresh",
|
|
524
524
|
...o,
|
|
525
525
|
children: [
|
|
526
526
|
/* @__PURE__ */ t(
|
|
527
527
|
"path",
|
|
528
528
|
{
|
|
529
529
|
className: "fa-secondary",
|
|
530
|
-
opacity:
|
|
530
|
+
opacity: r ? "1" : "0.4",
|
|
531
531
|
d: "M80 396.9V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V320c0-17.7 14.3-32 32-32H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H125.6l17.2 17.1c62.5 62.5 163.8 62.5 226.3 0c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.5 87.5-229.3 87.5-316.7 0L80 396.9z"
|
|
532
532
|
}
|
|
533
533
|
),
|
|
@@ -544,8 +544,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
544
544
|
className: e,
|
|
545
545
|
viewBox: s,
|
|
546
546
|
spacing: a,
|
|
547
|
-
title:
|
|
548
|
-
monotone:
|
|
547
|
+
title: n,
|
|
548
|
+
monotone: r,
|
|
549
549
|
...o
|
|
550
550
|
}) => /* @__PURE__ */ c(
|
|
551
551
|
A,
|
|
@@ -555,13 +555,13 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
555
555
|
viewBox: s,
|
|
556
556
|
className: e,
|
|
557
557
|
spacing: a,
|
|
558
|
-
title:
|
|
558
|
+
title: n || "Restore",
|
|
559
559
|
...o,
|
|
560
560
|
children: [
|
|
561
561
|
/* @__PURE__ */ t(
|
|
562
562
|
"path",
|
|
563
563
|
{
|
|
564
|
-
opacity:
|
|
564
|
+
opacity: r ? "1" : "0.4",
|
|
565
565
|
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"
|
|
566
566
|
}
|
|
567
567
|
),
|
|
@@ -572,8 +572,8 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
572
572
|
className: e,
|
|
573
573
|
viewBox: s,
|
|
574
574
|
spacing: a,
|
|
575
|
-
title:
|
|
576
|
-
monotone:
|
|
575
|
+
title: n,
|
|
576
|
+
monotone: r,
|
|
577
577
|
...o
|
|
578
578
|
}) => /* @__PURE__ */ t(
|
|
579
579
|
A,
|
|
@@ -583,7 +583,7 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
583
583
|
viewBox: s,
|
|
584
584
|
className: e,
|
|
585
585
|
spacing: a,
|
|
586
|
-
title:
|
|
586
|
+
title: n || "Settings",
|
|
587
587
|
...o,
|
|
588
588
|
children: /* @__PURE__ */ t("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" })
|
|
589
589
|
}
|
|
@@ -591,17 +591,17 @@ const Lt = ({ className: e, ...s }) => {
|
|
|
591
591
|
function $(e) {
|
|
592
592
|
return lt();
|
|
593
593
|
}
|
|
594
|
-
const
|
|
595
|
-
const s = (e == null ? void 0 : e.plugins) || [], a = (e == null ? void 0 : e.version) || "",
|
|
594
|
+
const ns = ({ stats: e }) => {
|
|
595
|
+
const s = (e == null ? void 0 : e.plugins) || [], a = (e == null ? void 0 : e.version) || "", n = (e == null ? void 0 : e.models) || [], r = $(), o = $();
|
|
596
596
|
return /* @__PURE__ */ c(w, { children: [
|
|
597
597
|
/* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(
|
|
598
598
|
_,
|
|
599
599
|
{
|
|
600
600
|
header: C.ABOUT.TITLE_CLIENT,
|
|
601
601
|
className: "prose-dark dark:prose-lighter",
|
|
602
|
-
children: P(
|
|
603
|
-
[C.ABOUT.VERSION]: "3.4.
|
|
604
|
-
[C.ABOUT.BUILD_TIMESTAMP]: "07/
|
|
602
|
+
children: P(r, {
|
|
603
|
+
[C.ABOUT.VERSION]: "3.4.1",
|
|
604
|
+
[C.ABOUT.BUILD_TIMESTAMP]: "07/16/2024 07:36 PM EDT"
|
|
605
605
|
})
|
|
606
606
|
}
|
|
607
607
|
) }),
|
|
@@ -612,25 +612,25 @@ const rs = ({ stats: e }) => {
|
|
|
612
612
|
className: "prose-dark dark:prose-lighter",
|
|
613
613
|
children: P(o, {
|
|
614
614
|
[C.ABOUT.VERSION]: a,
|
|
615
|
-
[q(C.ABOUT.ENGINE,
|
|
615
|
+
[q(C.ABOUT.ENGINE, n.length)]: /* @__PURE__ */ t(w, { children: n.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) }),
|
|
616
616
|
[q(C.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ t(w, { children: s.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) })
|
|
617
617
|
})
|
|
618
618
|
}
|
|
619
619
|
)
|
|
620
620
|
] });
|
|
621
|
-
},
|
|
621
|
+
}, rs = ({
|
|
622
622
|
open: e,
|
|
623
623
|
onOpenChange: s
|
|
624
624
|
}) => {
|
|
625
625
|
const { serverStats: a } = R(U);
|
|
626
|
-
return /* @__PURE__ */ t(
|
|
626
|
+
return /* @__PURE__ */ t(K, { open: e, onOpenChange: s, title: ze, children: /* @__PURE__ */ t(ns, { stats: a }) });
|
|
627
627
|
}, os = (e) => fe(e), cs = (e) => {
|
|
628
628
|
if (!e || e.length === 0)
|
|
629
629
|
return Pe;
|
|
630
630
|
const s = e.filter(
|
|
631
631
|
(a) => {
|
|
632
|
-
var
|
|
633
|
-
return ((
|
|
632
|
+
var n, r;
|
|
633
|
+
return ((n = a == null ? void 0 : a.message) == null ? void 0 : n.role) === Fe && typeof ((r = a == null ? void 0 : a.message) == null ? void 0 : r.processingTime) == "number";
|
|
634
634
|
}
|
|
635
635
|
).map((a) => a.message.processingTime);
|
|
636
636
|
return $e({
|
|
@@ -641,17 +641,17 @@ const rs = ({ stats: e }) => {
|
|
|
641
641
|
isAuthenticated: e,
|
|
642
642
|
stats: s
|
|
643
643
|
}) => {
|
|
644
|
-
const { state: a } = R(U),
|
|
644
|
+
const { state: a } = R(U), n = Ge - Number(a == null ? void 0 : a.usage), r = $(), o = $();
|
|
645
645
|
return e ? /* @__PURE__ */ c(w, { children: [
|
|
646
646
|
a && a.messages.length > 0 && /* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(
|
|
647
647
|
_,
|
|
648
648
|
{
|
|
649
649
|
header: C.CURRENT_STATISTICS.TITLE,
|
|
650
650
|
className: "prose-dark dark:prose-lighter",
|
|
651
|
-
children: P(
|
|
651
|
+
children: P(r, {
|
|
652
652
|
[C.CURRENT_STATISTICS.MODEL_NAME]: (a == null ? void 0 : a.model) || Be,
|
|
653
653
|
[C.CURRENT_STATISTICS.TOKENS_USED]: a == null ? void 0 : a.usage,
|
|
654
|
-
[C.CURRENT_STATISTICS.REMAINING_TOKENS]: Ve.format(
|
|
654
|
+
[C.CURRENT_STATISTICS.REMAINING_TOKENS]: Ve.format(n),
|
|
655
655
|
[C.CURRENT_STATISTICS.PROCESSING_TIME]: cs(a == null ? void 0 : a.messages)
|
|
656
656
|
})
|
|
657
657
|
}
|
|
@@ -674,10 +674,10 @@ const rs = ({ stats: e }) => {
|
|
|
674
674
|
open: e,
|
|
675
675
|
onOpenChange: s
|
|
676
676
|
}) => {
|
|
677
|
-
const [a,
|
|
677
|
+
const [a, n] = T({
|
|
678
678
|
averageProcessingTimes: 0,
|
|
679
679
|
totalChats: 0
|
|
680
|
-
}), { isAuthenticated:
|
|
680
|
+
}), { isAuthenticated: r, getAccessToken: o, user: l } = G();
|
|
681
681
|
return L(() => {
|
|
682
682
|
!e || !l || (async () => {
|
|
683
683
|
try {
|
|
@@ -688,25 +688,25 @@ const rs = ({ stats: e }) => {
|
|
|
688
688
|
userId: l.username
|
|
689
689
|
}
|
|
690
690
|
});
|
|
691
|
-
d.status === 200 &&
|
|
691
|
+
d.status === 200 && n(d.data);
|
|
692
692
|
} catch {
|
|
693
693
|
}
|
|
694
694
|
})();
|
|
695
|
-
}, [e, o, l]), /* @__PURE__ */ t(
|
|
695
|
+
}, [e, o, l]), /* @__PURE__ */ t(K, { open: e, onOpenChange: s, title: ge, children: /* @__PURE__ */ t(is, { isAuthenticated: r, stats: a }) });
|
|
696
696
|
}, Ee = ({
|
|
697
697
|
showConfirmation: e,
|
|
698
698
|
setShowConfirmation: s,
|
|
699
699
|
action: a,
|
|
700
|
-
children:
|
|
701
|
-
customStrings:
|
|
700
|
+
children: n,
|
|
701
|
+
customStrings: r
|
|
702
702
|
}) => /* @__PURE__ */ t(
|
|
703
|
-
|
|
703
|
+
K,
|
|
704
704
|
{
|
|
705
705
|
kind: "messagebox",
|
|
706
706
|
open: e,
|
|
707
707
|
onOpenChange: s,
|
|
708
|
-
title:
|
|
709
|
-
footer: /* @__PURE__ */ c(
|
|
708
|
+
title: r.title,
|
|
709
|
+
footer: /* @__PURE__ */ c(W, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
710
710
|
/* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(
|
|
711
711
|
Q,
|
|
712
712
|
{
|
|
@@ -716,7 +716,7 @@ const rs = ({ stats: e }) => {
|
|
|
716
716
|
onClick: () => {
|
|
717
717
|
s(!1);
|
|
718
718
|
},
|
|
719
|
-
children:
|
|
719
|
+
children: r.cancelAction
|
|
720
720
|
}
|
|
721
721
|
) }),
|
|
722
722
|
/* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(
|
|
@@ -728,57 +728,57 @@ const rs = ({ stats: e }) => {
|
|
|
728
728
|
onClick: () => {
|
|
729
729
|
s(!1), a();
|
|
730
730
|
},
|
|
731
|
-
children:
|
|
731
|
+
children: r.confirmAction
|
|
732
732
|
}
|
|
733
733
|
) })
|
|
734
734
|
] }),
|
|
735
|
-
children:
|
|
735
|
+
children: n
|
|
736
736
|
}
|
|
737
737
|
);
|
|
738
738
|
var ds = typeof window < "u", us = function(e, s) {
|
|
739
739
|
return ds ? 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);
|
|
740
740
|
}, ms = function(e, s) {
|
|
741
|
-
var a = T(us(e)),
|
|
741
|
+
var a = T(us(e)), n = a[0], r = a[1];
|
|
742
742
|
return L(function() {
|
|
743
743
|
var o = !0, l = window.matchMedia(e), d = function() {
|
|
744
|
-
o &&
|
|
744
|
+
o && r(!!l.matches);
|
|
745
745
|
};
|
|
746
|
-
return l.addEventListener("change", d),
|
|
746
|
+
return l.addEventListener("change", d), r(l.matches), function() {
|
|
747
747
|
o = !1, l.removeEventListener("change", d);
|
|
748
748
|
};
|
|
749
|
-
}, [e]),
|
|
749
|
+
}, [e]), n;
|
|
750
750
|
};
|
|
751
|
-
const hs = async (e, s, a,
|
|
751
|
+
const hs = async (e, s, a, n) => {
|
|
752
752
|
try {
|
|
753
|
-
const
|
|
754
|
-
accessToken:
|
|
753
|
+
const r = await te({
|
|
754
|
+
accessToken: n,
|
|
755
755
|
type: se.GET_CHAT,
|
|
756
756
|
params: {
|
|
757
757
|
id: e.id
|
|
758
758
|
}
|
|
759
759
|
});
|
|
760
|
-
|
|
760
|
+
r.status === 200 && (s({
|
|
761
761
|
type: je
|
|
762
762
|
}), s({
|
|
763
|
-
type:
|
|
763
|
+
type: Ke,
|
|
764
764
|
payload: {
|
|
765
765
|
id: e.id,
|
|
766
|
-
model:
|
|
767
|
-
usage:
|
|
768
|
-
messages:
|
|
766
|
+
model: r.data.model,
|
|
767
|
+
usage: r.data.usage,
|
|
768
|
+
messages: r.data.messages
|
|
769
769
|
}
|
|
770
770
|
}), a(!1));
|
|
771
771
|
} catch {
|
|
772
772
|
}
|
|
773
773
|
}, he = (e) => {
|
|
774
774
|
const s = e[0];
|
|
775
|
-
return
|
|
775
|
+
return Ye(s == null ? void 0 : s.content, 100);
|
|
776
776
|
}, ps = ({
|
|
777
777
|
filteredHistory: e,
|
|
778
778
|
setFilteredHistory: s,
|
|
779
779
|
setFullHistory: a,
|
|
780
|
-
dispatch:
|
|
781
|
-
onOpenChange:
|
|
780
|
+
dispatch: n,
|
|
781
|
+
onOpenChange: r
|
|
782
782
|
}) => {
|
|
783
783
|
var i;
|
|
784
784
|
const { user: o, getAccessToken: l } = G(), d = F({
|
|
@@ -806,7 +806,7 @@ const hs = async (e, s, a, r) => {
|
|
|
806
806
|
switch (m.sortDirection) {
|
|
807
807
|
case !1:
|
|
808
808
|
b(v.ASC), y({
|
|
809
|
-
type:
|
|
809
|
+
type: ne,
|
|
810
810
|
payload: {
|
|
811
811
|
sortedCell: h,
|
|
812
812
|
sortDirection: v.ASC
|
|
@@ -815,7 +815,7 @@ const hs = async (e, s, a, r) => {
|
|
|
815
815
|
break;
|
|
816
816
|
case v.ASC:
|
|
817
817
|
b(v.DESC), y({
|
|
818
|
-
type:
|
|
818
|
+
type: ne,
|
|
819
819
|
payload: {
|
|
820
820
|
sortedCell: h,
|
|
821
821
|
sortDirection: v.DESC
|
|
@@ -824,7 +824,7 @@ const hs = async (e, s, a, r) => {
|
|
|
824
824
|
break;
|
|
825
825
|
default:
|
|
826
826
|
b(v.ASC), y({
|
|
827
|
-
type:
|
|
827
|
+
type: ne,
|
|
828
828
|
payload: {
|
|
829
829
|
sortedCell: h,
|
|
830
830
|
sortDirection: v.ASC
|
|
@@ -877,7 +877,7 @@ const hs = async (e, s, a, r) => {
|
|
|
877
877
|
}
|
|
878
878
|
),
|
|
879
879
|
/* @__PURE__ */ c(ut, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
|
|
880
|
-
/* @__PURE__ */ t(mt, { children: /* @__PURE__ */ c(
|
|
880
|
+
/* @__PURE__ */ t(mt, { children: /* @__PURE__ */ c(re, { children: [
|
|
881
881
|
N && /* @__PURE__ */ t(H, { className: "sr-only", children: "Row" }),
|
|
882
882
|
/* @__PURE__ */ t(
|
|
883
883
|
ht,
|
|
@@ -897,7 +897,7 @@ const hs = async (e, s, a, r) => {
|
|
|
897
897
|
] }) }),
|
|
898
898
|
/* @__PURE__ */ t(pt, { children: S.map((h, g) => {
|
|
899
899
|
var x;
|
|
900
|
-
return ((x = h == null ? void 0 : h.messages) == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ c(
|
|
900
|
+
return ((x = h == null ? void 0 : h.messages) == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ c(re, { children: [
|
|
901
901
|
N && /* @__PURE__ */ t(H, { children: g + 1 }),
|
|
902
902
|
/* @__PURE__ */ t(
|
|
903
903
|
H,
|
|
@@ -920,8 +920,8 @@ const hs = async (e, s, a, r) => {
|
|
|
920
920
|
const z = await l();
|
|
921
921
|
hs(
|
|
922
922
|
h,
|
|
923
|
-
r,
|
|
924
923
|
n,
|
|
924
|
+
r,
|
|
925
925
|
z
|
|
926
926
|
);
|
|
927
927
|
},
|
|
@@ -947,7 +947,7 @@ const hs = async (e, s, a, r) => {
|
|
|
947
947
|
] }) })
|
|
948
948
|
] }, `${C.HISTORY.TITLE}-${h.id}-${g}`) : null;
|
|
949
949
|
}) }),
|
|
950
|
-
/* @__PURE__ */ t(ft, { children: /* @__PURE__ */ t(
|
|
950
|
+
/* @__PURE__ */ t(ft, { children: /* @__PURE__ */ t(re, { children: /* @__PURE__ */ t(H, { colSpan: 4, children: /* @__PURE__ */ t("div", { children: q(
|
|
951
951
|
`${e.data.length} chat`,
|
|
952
952
|
e.data.length
|
|
953
953
|
) }) }) }) })
|
|
@@ -957,7 +957,7 @@ const hs = async (e, s, a, r) => {
|
|
|
957
957
|
function pe(e, s) {
|
|
958
958
|
return s ? e.filter(
|
|
959
959
|
(a) => a.messages.some(
|
|
960
|
-
(
|
|
960
|
+
(n) => n.content !== null && n.content.toLowerCase().includes(s.toLowerCase())
|
|
961
961
|
)
|
|
962
962
|
) : e;
|
|
963
963
|
}
|
|
@@ -965,8 +965,8 @@ const fs = ({
|
|
|
965
965
|
onOpenChange: e,
|
|
966
966
|
historyData: s
|
|
967
967
|
}) => {
|
|
968
|
-
const { isAuthenticated: a } = G(),
|
|
969
|
-
key: Z +
|
|
968
|
+
const { isAuthenticated: a } = G(), n = F(null), { dispatch: r } = R(U), { state: o, dispatch: l } = R(Ne), [, d] = ee({
|
|
969
|
+
key: Z + Je,
|
|
970
970
|
initialValue: o.searchString
|
|
971
971
|
}), [u, f] = T(s), [N, m] = T({
|
|
972
972
|
data: u
|
|
@@ -975,7 +975,7 @@ const fs = ({
|
|
|
975
975
|
m({
|
|
976
976
|
data: k
|
|
977
977
|
}), d(p), l({
|
|
978
|
-
type:
|
|
978
|
+
type: Xe,
|
|
979
979
|
payload: { searchString: p }
|
|
980
980
|
});
|
|
981
981
|
}, b = (p) => {
|
|
@@ -993,9 +993,9 @@ const fs = ({
|
|
|
993
993
|
});
|
|
994
994
|
}, [u, o.searchString]), a ? N && N.data && /* @__PURE__ */ c(w, { children: [
|
|
995
995
|
/* @__PURE__ */ t("form", { autoComplete: "off", onSubmit: S, children: /* @__PURE__ */ t(
|
|
996
|
-
|
|
996
|
+
We,
|
|
997
997
|
{
|
|
998
|
-
ref:
|
|
998
|
+
ref: n,
|
|
999
999
|
defaultValue: o.searchString,
|
|
1000
1000
|
focusMode: "light",
|
|
1001
1001
|
name: "Search",
|
|
@@ -1012,7 +1012,7 @@ const fs = ({
|
|
|
1012
1012
|
size: "small",
|
|
1013
1013
|
onClick: () => {
|
|
1014
1014
|
var p;
|
|
1015
|
-
y(""), (p =
|
|
1015
|
+
y(""), (p = n.current) != null && p.value && (n.current.value = "", n.current.focus());
|
|
1016
1016
|
},
|
|
1017
1017
|
children: "Reset"
|
|
1018
1018
|
}
|
|
@@ -1026,7 +1026,7 @@ const fs = ({
|
|
|
1026
1026
|
filteredHistory: N,
|
|
1027
1027
|
setFilteredHistory: m,
|
|
1028
1028
|
setFullHistory: f,
|
|
1029
|
-
dispatch:
|
|
1029
|
+
dispatch: r,
|
|
1030
1030
|
onOpenChange: e
|
|
1031
1031
|
}
|
|
1032
1032
|
) })
|
|
@@ -1035,8 +1035,8 @@ const fs = ({
|
|
|
1035
1035
|
open: e,
|
|
1036
1036
|
onOpenChange: s,
|
|
1037
1037
|
historyData: a
|
|
1038
|
-
}) => /* @__PURE__ */ t(
|
|
1039
|
-
const { isAuthenticated: e, user: s, registeringForPasskey: a, authenticationType:
|
|
1038
|
+
}) => /* @__PURE__ */ t(K, { open: e, onOpenChange: s, title: qe, children: /* @__PURE__ */ t(fs, { onOpenChange: s, historyData: a }) }), Cs = () => {
|
|
1039
|
+
const { isAuthenticated: e, user: s, registeringForPasskey: a, authenticationType: n } = G(), [r, o] = ee({
|
|
1040
1040
|
key: Z + Qe,
|
|
1041
1041
|
initialValue: !1
|
|
1042
1042
|
}), [, l, d] = ee({
|
|
@@ -1073,7 +1073,7 @@ const fs = ({
|
|
|
1073
1073
|
}, [u]);
|
|
1074
1074
|
const k = (i) => {
|
|
1075
1075
|
if (i != null && i.city && (i != null && i.country) && (i != null && i.region))
|
|
1076
|
-
return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(
|
|
1076
|
+
return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(W, { alignVertical: "center", columnGap: 4, children: [
|
|
1077
1077
|
/* @__PURE__ */ c(M, { children: [
|
|
1078
1078
|
/* @__PURE__ */ c("div", { className: "text-right", children: [
|
|
1079
1079
|
i.city,
|
|
@@ -1093,8 +1093,8 @@ const fs = ({
|
|
|
1093
1093
|
}
|
|
1094
1094
|
) })
|
|
1095
1095
|
] }) });
|
|
1096
|
-
const h = at(i == null ? void 0 : i.latitude), g =
|
|
1097
|
-
return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(
|
|
1096
|
+
const h = at(i == null ? void 0 : i.latitude), g = nt(i == null ? void 0 : i.longitude);
|
|
1097
|
+
return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(W, { alignVertical: "center", columnGap: 4, children: [
|
|
1098
1098
|
/* @__PURE__ */ c(M, { children: [
|
|
1099
1099
|
/* @__PURE__ */ t("div", { children: h }),
|
|
1100
1100
|
/* @__PURE__ */ t("div", { children: g })
|
|
@@ -1120,26 +1120,26 @@ const fs = ({
|
|
|
1120
1120
|
[C.PREFERENCES.NAME]: b,
|
|
1121
1121
|
// [CARDS.PREFERENCES.EMAIL]: endUser.email,
|
|
1122
1122
|
[C.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ t(
|
|
1123
|
-
|
|
1123
|
+
Wt,
|
|
1124
1124
|
{
|
|
1125
1125
|
noBorder: !0,
|
|
1126
1126
|
labelHidden: !0,
|
|
1127
1127
|
label: C.PREFERENCES.ENGINE_DETAILS,
|
|
1128
1128
|
name: C.PREFERENCES.ENGINE_DETAILS,
|
|
1129
1129
|
onChange: S,
|
|
1130
|
-
checked:
|
|
1130
|
+
checked: r
|
|
1131
1131
|
}
|
|
1132
1132
|
),
|
|
1133
1133
|
[C.PREFERENCES.LOCATION]: k(m == null ? void 0 : m.location)
|
|
1134
1134
|
})
|
|
1135
1135
|
}
|
|
1136
1136
|
),
|
|
1137
|
-
|
|
1137
|
+
n !== et.PASSKEY && /* @__PURE__ */ c(
|
|
1138
1138
|
_,
|
|
1139
1139
|
{
|
|
1140
1140
|
spacing: { t: 4 },
|
|
1141
1141
|
className: "prose-dark dark:prose-lighter",
|
|
1142
|
-
header: /* @__PURE__ */ t("h2", { className: "m-0", children: /* @__PURE__ */ c(
|
|
1142
|
+
header: /* @__PURE__ */ t("h2", { className: "m-0", children: /* @__PURE__ */ c(W, { columnGap: 3, alignVertical: "center", children: [
|
|
1143
1143
|
/* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(tt, { className: "size-6 text-center" }) }),
|
|
1144
1144
|
/* @__PURE__ */ t(M, { children: /* @__PURE__ */ t("div", { children: "Passkey" }) })
|
|
1145
1145
|
] }) }),
|
|
@@ -1153,26 +1153,26 @@ const fs = ({
|
|
|
1153
1153
|
}, Ns = ({
|
|
1154
1154
|
open: e,
|
|
1155
1155
|
onOpenChange: s
|
|
1156
|
-
}) => /* @__PURE__ */ t(
|
|
1157
|
-
const { state: e } = R(U), [s, a] = T(!1), [
|
|
1156
|
+
}) => /* @__PURE__ */ t(K, { open: e, onOpenChange: s, title: rt, children: /* @__PURE__ */ t(Cs, {}) }), ks = () => {
|
|
1157
|
+
const { state: e } = R(U), [s, a] = T(!1), [n, r] = T(!1), [o, l] = T(!1), [d, u] = T(!1), [f, N] = T([]), [m, y] = T(!1), [b, S] = T({
|
|
1158
1158
|
done: !1,
|
|
1159
1159
|
progress: !1,
|
|
1160
1160
|
timestamp: Date.now()
|
|
1161
1161
|
}), { logout: p, getAccessToken: k, user: i } = G(), h = () => {
|
|
1162
1162
|
a(!s);
|
|
1163
1163
|
}, g = () => {
|
|
1164
|
-
|
|
1164
|
+
r(!n);
|
|
1165
1165
|
}, x = () => {
|
|
1166
1166
|
l(!o);
|
|
1167
1167
|
}, z = () => {
|
|
1168
1168
|
u(!d);
|
|
1169
1169
|
}, ae = async (I) => {
|
|
1170
|
-
const
|
|
1171
|
-
if (I && !(!i || !e || b.progress || b.done === !0 &&
|
|
1170
|
+
const J = Date.now();
|
|
1171
|
+
if (I && !(!i || !e || b.progress || b.done === !0 && J - b.timestamp < 5e3)) {
|
|
1172
1172
|
S({
|
|
1173
1173
|
done: !0,
|
|
1174
1174
|
progress: !0,
|
|
1175
|
-
timestamp:
|
|
1175
|
+
timestamp: J
|
|
1176
1176
|
});
|
|
1177
1177
|
try {
|
|
1178
1178
|
const B = await te({
|
|
@@ -1195,7 +1195,7 @@ const fs = ({
|
|
|
1195
1195
|
});
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
|
-
},
|
|
1198
|
+
}, Y = () => {
|
|
1199
1199
|
y(!m);
|
|
1200
1200
|
};
|
|
1201
1201
|
return /* @__PURE__ */ c(w, { children: [
|
|
@@ -1214,7 +1214,7 @@ const fs = ({
|
|
|
1214
1214
|
}
|
|
1215
1215
|
),
|
|
1216
1216
|
/* @__PURE__ */ t(Ns, { open: s, onOpenChange: a }),
|
|
1217
|
-
/* @__PURE__ */ t(ls, { open:
|
|
1217
|
+
/* @__PURE__ */ t(ls, { open: n, onOpenChange: r }),
|
|
1218
1218
|
/* @__PURE__ */ t(
|
|
1219
1219
|
gs,
|
|
1220
1220
|
{
|
|
@@ -1223,7 +1223,7 @@ const fs = ({
|
|
|
1223
1223
|
historyData: f
|
|
1224
1224
|
}
|
|
1225
1225
|
),
|
|
1226
|
-
/* @__PURE__ */ t(
|
|
1226
|
+
/* @__PURE__ */ t(rs, { open: d, onOpenChange: u }),
|
|
1227
1227
|
/* @__PURE__ */ t("div", { className: "relative", children: /* @__PURE__ */ t("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ c(
|
|
1228
1228
|
we,
|
|
1229
1229
|
{
|
|
@@ -1271,8 +1271,8 @@ const fs = ({
|
|
|
1271
1271
|
D,
|
|
1272
1272
|
{
|
|
1273
1273
|
label: "Log out",
|
|
1274
|
-
onClick:
|
|
1275
|
-
icon: /* @__PURE__ */ t("div", { className: "text-red-700", children: /* @__PURE__ */ t(
|
|
1274
|
+
onClick: Y,
|
|
1275
|
+
icon: /* @__PURE__ */ t("div", { className: "text-red-700", children: /* @__PURE__ */ t(Xt, { monotone: !0 }) })
|
|
1276
1276
|
}
|
|
1277
1277
|
)
|
|
1278
1278
|
] })
|