@versini/sassysaint 5.5.22 → 5.5.24

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.
@@ -0,0 +1,4136 @@
1
+ import { jsxs as I, jsx as d, Fragment as yt } from "react/jsx-runtime";
2
+ import { g as bt, ACTION_RESTORE as $r, ACTION_MESSAGE as xe, ROLE_ASSISTANT as we, ACTION_RESET as rr, ACTION_MODEL as ar, ACTION_STREAMING as nr, ACTION_SORT as Mr, ACTION_SEARCH as Dr, ACTION_RESET_PROMPT as or, ACTION_TOGGLE_PROMPT as sr, DEFAULT_AI_ENGINE as Se, P as ir, un as Me, ROLE_SYSTEM as Vr, ROLE_INTERNAL as vt, ROLE_HIDDEN as zr, STATS_SEPARATOR as Bt, CLIPBOARD_PROMPT as $t, TYPE_QUESTION as Ur, C as cr, SEND as Pr, ERROR_MESSAGE as Hr, ROLE_USER as nt, L as Fr, j as Gr, isLastMessageFromRole as Wr, getMessageContaintWrapperClass as jr, Logo as qr, getMainPaddingClass as Mt, r as Kr, LOCAL_STORAGE_PREFIX as Dt, LOCAL_STORAGE_SEARCH as Jr, LOCAL_STORAGE_SORT as Yr } from "./index.fO85d_Gw.js";
3
+ import c from "clsx";
4
+ import $, { useRef as S, useEffect as L, useCallback as Z, useSyncExternalStore as Xr, useState as G, useMemo as De, useContext as P, useLayoutEffect as fe, useId as Qr, useReducer as Be, createContext as Zr, useDebugValue as ea, lazy as lr, Suspense as ot } from "react";
5
+ const ta = ({
6
+ className: e,
7
+ viewBox: t,
8
+ title: r,
9
+ monotone: a,
10
+ ...n
11
+ }) => /* @__PURE__ */ I(
12
+ bt,
13
+ {
14
+ defaultViewBox: "0 0 448 512",
15
+ size: "size-5",
16
+ viewBox: t,
17
+ className: e,
18
+ title: r || "Add",
19
+ ...n,
20
+ children: [
21
+ /* @__PURE__ */ d("path", { className: "fa-secondary", opacity: a ? "1" : "0.4", d: "" }),
22
+ /* @__PURE__ */ d(
23
+ "path",
24
+ {
25
+ className: "fa-primary",
26
+ d: "M248 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 160L40 232c-13.3 0-24 10.7-24 24s10.7 24 24 24l160 0 0 160c0 13.3 10.7 24 24 24s24-10.7 24-24l0-160 160 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-160 0 0-160z"
27
+ }
28
+ )
29
+ ]
30
+ }
31
+ ), ra = ({
32
+ className: e,
33
+ viewBox: t,
34
+ title: r,
35
+ monotone: a,
36
+ ...n
37
+ }) => /* @__PURE__ */ d(
38
+ bt,
39
+ {
40
+ defaultViewBox: "0 0 384 512",
41
+ size: "size-5",
42
+ viewBox: t,
43
+ className: e,
44
+ title: r || "Close",
45
+ ...n,
46
+ children: /* @__PURE__ */ d("path", { d: "M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z" })
47
+ }
48
+ ), aa = ({
49
+ className: e,
50
+ viewBox: t,
51
+ title: r,
52
+ monotone: a,
53
+ ...n
54
+ }) => /* @__PURE__ */ d(
55
+ bt,
56
+ {
57
+ defaultViewBox: "0 0 384 512",
58
+ size: "size-5",
59
+ viewBox: t,
60
+ className: e,
61
+ title: r || "Down",
62
+ ...n,
63
+ children: /* @__PURE__ */ d("path", { d: "M174.6 472.6c4.5 4.7 10.8 7.4 17.4 7.4s12.8-2.7 17.4-7.4l168-176c9.2-9.6 8.8-24.8-.8-33.9s-24.8-8.8-33.9 .8L216 396.1 216 56c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 340.1L41.4 263.4c-9.2-9.6-24.3-9.9-33.9-.8s-9.9 24.3-.8 33.9l168 176z" })
64
+ }
65
+ );
66
+ /*!
67
+ @versini/ui-header v3.0.0
68
+ © 2025 gizmette.com
69
+ */
70
+ try {
71
+ window.__VERSINI_UI_HEADER__ || (window.__VERSINI_UI_HEADER__ = {
72
+ version: "3.0.0",
73
+ buildTime: "01/03/2025 10:45 AM EST",
74
+ homepage: "https://github.com/aversini/ui-components",
75
+ license: "MIT"
76
+ });
77
+ } catch {
78
+ }
79
+ const na = "av-header", oa = ({
80
+ children: e,
81
+ className: t,
82
+ raw: r = !1,
83
+ mode: a = "system",
84
+ noColors: n = !1,
85
+ sticky: o = !1,
86
+ noBorder: s = !1,
87
+ noMargin: i = !1,
88
+ noPadding: l = !1
89
+ }) => {
90
+ const h = c(
91
+ na,
92
+ {
93
+ "border-border-accent": a === "dark" && !r && !n && !s,
94
+ "border-border-medium": a === "light" && !r && !n && !s,
95
+ "border-border-accent dark:border-border-medium": a === "alt-system" && !r && !n && !s,
96
+ "border-border-medium dark:border-border-accent": a === "system" && !r && !n && !s,
97
+ "border-b-4": !r && !s,
98
+ "border-transparent": !r && n,
99
+ "bg-surface-dark": a === "dark" && !r && !n,
100
+ "bg-surface-light": a === "light" && !r && !n,
101
+ "bg-surface-dark dark:bg-surface-light": a === "alt-system" && !r && !n,
102
+ "bg-surface-light dark:bg-surface-dark": a === "system" && !r && !n,
103
+ "sticky top-0 z-50": o
104
+ },
105
+ t
106
+ ), f = c({
107
+ "mt-0": !i,
108
+ "p-2": !l,
109
+ "flex flex-col w-full md:mx-auto md:max-w-4xl": !r
110
+ });
111
+ return /* @__PURE__ */ d("header", { className: h, children: /* @__PURE__ */ d("div", { className: f, children: e }) });
112
+ };
113
+ function sa(e) {
114
+ const t = e.toLowerCase().split("+").map((o) => o.trim()), r = {
115
+ alt: t.includes("alt"),
116
+ ctrl: t.includes("ctrl"),
117
+ meta: t.includes("meta"),
118
+ mod: t.includes("mod"),
119
+ shift: t.includes("shift")
120
+ }, a = ["alt", "ctrl", "meta", "shift", "mod"], n = t.find((o) => !a.includes(o));
121
+ return {
122
+ ...r,
123
+ key: n
124
+ };
125
+ }
126
+ function ia(e, t) {
127
+ const { alt: r, ctrl: a, meta: n, mod: o, shift: s, key: i } = e, { altKey: l, ctrlKey: h, metaKey: f, shiftKey: g, key: u } = t;
128
+ if (r !== l)
129
+ return !1;
130
+ if (o) {
131
+ if (!h && !f)
132
+ return !1;
133
+ } else if (a !== h || n !== f)
134
+ return !1;
135
+ return s !== g ? !1 : !!(i && (u.toLowerCase() === i.toLowerCase() || t.code.replace("Key", "").toLowerCase() === i.toLowerCase()));
136
+ }
137
+ function ca(e) {
138
+ return (t) => ia(sa(e), t);
139
+ }
140
+ function la(e) {
141
+ return (t) => {
142
+ const r = "nativeEvent" in t ? t.nativeEvent : t;
143
+ e.forEach(([a, n, o = { preventDefault: !0 }]) => {
144
+ ca(a)(r) && (o.preventDefault && t.preventDefault(), n(r));
145
+ });
146
+ };
147
+ }
148
+ function da() {
149
+ const e = S(!1);
150
+ return L(() => (e.current = !0, () => {
151
+ e.current = !1;
152
+ }), []), Z(() => e.current, []);
153
+ }
154
+ function dr(e, t) {
155
+ window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
156
+ }
157
+ const Vt = (e, t) => {
158
+ const r = JSON.stringify(
159
+ typeof t == "function" ? t() : t
160
+ );
161
+ window.localStorage.setItem(e, r), dr(e, r);
162
+ }, ua = (e) => {
163
+ window.localStorage.removeItem(e), dr(e, null);
164
+ }, zt = (e) => window.localStorage.getItem(e), ma = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
165
+ function Ut({
166
+ key: e,
167
+ initialValue: t
168
+ }) {
169
+ const r = Xr(ma, () => zt(e)), a = Z(
170
+ (s) => {
171
+ try {
172
+ const i = typeof s == "function" ? s(JSON.parse(r)) : s;
173
+ i == null ? ua(e) : Vt(e, i);
174
+ } catch (i) {
175
+ console.warn(i);
176
+ }
177
+ },
178
+ [e, r]
179
+ ), n = Z(() => {
180
+ a(t);
181
+ }, [t, a]), o = Z(() => {
182
+ a(null);
183
+ }, [a]);
184
+ return L(() => {
185
+ try {
186
+ zt(e) === null && typeof t < "u" && Vt(e, t);
187
+ } catch (s) {
188
+ console.warn(s);
189
+ }
190
+ }, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
191
+ }
192
+ const ga = {
193
+ x: 0,
194
+ y: 0,
195
+ width: 0,
196
+ height: 0,
197
+ top: 0,
198
+ left: 0,
199
+ bottom: 0,
200
+ right: 0
201
+ };
202
+ function ha(e) {
203
+ const t = da(), r = S(0), a = S(null), [n, o] = G(ga), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
204
+ const l = i[0];
205
+ l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
206
+ a.current && t() && o(l.contentRect);
207
+ }));
208
+ }), [t]);
209
+ return L(() => (a.current && (s == null || s.observe(a.current, e)), () => {
210
+ s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
211
+ }), [s, e]), [a, n];
212
+ }
213
+ /*!
214
+ @versini/ui-table v3.0.4
215
+ © 2025 gizmette.com
216
+ */
217
+ try {
218
+ window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
219
+ version: "3.0.4",
220
+ buildTime: "01/04/2025 04:09 PM EST",
221
+ homepage: "https://github.com/aversini/ui-components",
222
+ license: "MIT"
223
+ });
224
+ } catch {
225
+ }
226
+ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
227
+ ASC: "asc",
228
+ DESC: "desc"
229
+ }, fa = ({
230
+ mode: e,
231
+ className: t,
232
+ wrapperClassName: r,
233
+ stickyHeader: a,
234
+ stickyFooter: n
235
+ }) => ({
236
+ wrapper: c(
237
+ "not-prose relative w-full rounded-lg shadow-md",
238
+ {
239
+ "overflow-x-auto": !a && !n,
240
+ "overflow-y-scroll": a || n,
241
+ "bg-surface-darker": e === "dark" || e === "system",
242
+ "bg-surface-light": e === "light" || e === "alt-system",
243
+ "dark:bg-surface-light": e === "system",
244
+ "dark:bg-surface-darker": e === "alt-system",
245
+ "text-copy-light": e === "dark",
246
+ "text-copy-dark": e === "light",
247
+ "text-copy-light dark:text-copy-dark": e === "system",
248
+ "text-copy-dark dark:text-copy-light": e === "alt-system"
249
+ },
250
+ r
251
+ ),
252
+ table: c("my-0 w-full text-left text-sm", t, {
253
+ "text-copy-light": e === "dark",
254
+ "text-copy-dark": e === "light",
255
+ "text-copy-light dark:text-copy-dark": e === "system",
256
+ "text-copy-dark dark:text-copy-light": e === "alt-system"
257
+ }),
258
+ caption: c("py-2 text-sm font-bold", {
259
+ "text-copy-light": e === "dark",
260
+ "text-copy-dark": e === "light",
261
+ "text-copy-light dark:text-copy-dark": e === "system",
262
+ "text-copy-dark dark:text-copy-light": e === "alt-system"
263
+ })
264
+ }), pa = ({
265
+ className: e,
266
+ stickyHeader: t,
267
+ mode: r
268
+ }) => c(
269
+ {
270
+ "sticky top-0 z-10": t,
271
+ "shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": t && r === "dark",
272
+ "shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": t && r === "system",
273
+ "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": t && r === "light",
274
+ "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": t && r === "alt-system"
275
+ },
276
+ e
277
+ ), ya = ({
278
+ className: e,
279
+ stickyFooter: t,
280
+ mode: r
281
+ }) => c(
282
+ {
283
+ "sticky bottom-0 z-10": t,
284
+ "shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": t && r === "dark",
285
+ "shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": t && r === "system",
286
+ "shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": t && r === "light",
287
+ "shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": t && r === "alt-system"
288
+ },
289
+ e
290
+ ), ba = ({
291
+ mode: e,
292
+ className: t,
293
+ cellWrapper: r
294
+ }) => r === Ve || r === kt ? c(
295
+ {
296
+ "bg-table-head-dark": e === "dark" || e === "system",
297
+ "bg-table-head-light": e === "light" || e === "alt-system",
298
+ "dark:bg-table-head-light": e === "system",
299
+ "dark:bg-table-head-dark": e === "alt-system"
300
+ },
301
+ t
302
+ ) : c(
303
+ "border-b last:border-0",
304
+ {
305
+ "border-table-dark": e === "dark" || e === "system",
306
+ "odd:bg-table-dark-odd even:bg-table-dark-even": r === ye && e === "dark",
307
+ "border-table-light": e === "light" || e === "alt-system",
308
+ "odd:bg-table-light-odd even:bg-table-light-even": r === ye && e === "light",
309
+ "dark:border-table-light": e === "system",
310
+ "odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": r === ye && e === "system",
311
+ "dark:border-table-dark": e === "alt-system",
312
+ "odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": r === ye && e === "alt-system"
313
+ },
314
+ t
315
+ ), va = ({
316
+ cellWrapper: e,
317
+ className: t,
318
+ compact: r,
319
+ mode: a,
320
+ align: n
321
+ }) => ({
322
+ alignClasses: c({
323
+ "flex justify-start text-left": n === "left",
324
+ "flex justify-center text-center": n === "center",
325
+ "flex justify-end text-right": n === "right"
326
+ }),
327
+ mainClasses: c(
328
+ {
329
+ "text-copy-light": a === "dark" || a === "system",
330
+ "text-copy-dark": a === "light" || a === "alt-system",
331
+ "dark:text-copy-dark": a === "system",
332
+ "dark:text-copy-light": a === "alt-system",
333
+ "px-4 py-3": !r && (e === Ve || e === kt),
334
+ "p-4": !r && e === ye,
335
+ "px-2 py-1.5": r
336
+ },
337
+ t
338
+ )
339
+ }), ka = ({
340
+ buttonClassName: e
341
+ }) => c("rounded-none text-sm", e), Pt = "av-button", _t = "icon", ur = "button", st = "link", _a = ({
342
+ type: e,
343
+ size: t,
344
+ labelRight: r,
345
+ labelLeft: a,
346
+ align: n
347
+ }) => {
348
+ const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
349
+ switch (e) {
350
+ case ur:
351
+ case st:
352
+ return c({
353
+ [o]: t === "small",
354
+ [s]: t === "medium",
355
+ [i]: t === "large"
356
+ });
357
+ case _t:
358
+ return c("inline-flex items-center", {
359
+ "justify-center": n === "center",
360
+ "justify-start": n === "left",
361
+ "justify-end": n === "right",
362
+ "h-6 w-6 p-0": t === "small" && !(r || a),
363
+ "h-6 px-2": t === "small" && (r || a),
364
+ "h-8 w-8 p-1": t === "medium" && !(r || a),
365
+ "h-8 px-3": t === "medium" && (r || a),
366
+ "h-12 w-12 p-2": t === "large" && !(r || a),
367
+ "h-12 px-4": t === "large" && (r || a)
368
+ });
369
+ }
370
+ }, Ea = ({
371
+ type: e,
372
+ size: t,
373
+ labelRight: r,
374
+ labelLeft: a
375
+ }) => {
376
+ const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
377
+ switch (e) {
378
+ case ur:
379
+ case st:
380
+ return c({
381
+ "text-center": e === st,
382
+ [n]: t === "small",
383
+ [o]: t === "medium",
384
+ [s]: t === "large"
385
+ });
386
+ case _t:
387
+ return c({
388
+ [n]: t === "small" && (r || a),
389
+ [o]: t === "medium" && (r || a),
390
+ [s]: t === "large" && (r || a)
391
+ });
392
+ }
393
+ }, xa = ({
394
+ mode: e,
395
+ noBackground: t,
396
+ noTruncate: r,
397
+ variant: a
398
+ }) => {
399
+ if (t)
400
+ return "not-prose";
401
+ if (a === "primary")
402
+ return c("not-prose", {
403
+ truncate: !r,
404
+ "text-copy-light": e === "dark" || e === "system",
405
+ "text-copy-lighter": e === "light" || e === "alt-system",
406
+ "dark:text-copy-lighter": e === "system",
407
+ "dark:text-copy-light": e === "alt-system"
408
+ });
409
+ if (a === "secondary")
410
+ return c("not-prose", {
411
+ truncate: !r,
412
+ "text-copy-light": e === "light" || e === "system",
413
+ "text-copy-lighter": e === "dark" || e === "alt-system",
414
+ "dark:text-copy-lighter": e === "alt-system",
415
+ "dark:text-copy-light": e === "system"
416
+ });
417
+ if (a === "danger")
418
+ return c("not-prose", {
419
+ truncate: !r,
420
+ "text-copy-light": e === "dark" || e === "system",
421
+ "text-copy-lighter": e === "light" || e === "alt-system",
422
+ "dark:text-copy-lighter": e === "system",
423
+ "dark:text-copy-light": e === "alt-system"
424
+ });
425
+ if (a === "selected")
426
+ return c("not-prose text-copy-lighter", {
427
+ truncate: !r
428
+ });
429
+ }, wa = ({
430
+ mode: e,
431
+ noBackground: t,
432
+ variant: r
433
+ }) => {
434
+ if (!t) {
435
+ if (r === "primary")
436
+ return c({
437
+ "bg-action-dark": e === "dark",
438
+ "bg-action-light": e === "light",
439
+ "bg-action-dark dark:bg-action-light": e === "system",
440
+ "bg-action-light dark:bg-action-dark": e === "alt-system"
441
+ });
442
+ if (r === "secondary")
443
+ return c({
444
+ "bg-action-dark": e === "light",
445
+ "bg-action-light": e === "dark",
446
+ "bg-action-dark dark:bg-action-light": e === "alt-system",
447
+ "bg-action-light dark:bg-action-dark": e === "system"
448
+ });
449
+ if (r === "danger")
450
+ return c({
451
+ "bg-action-danger-dark": e === "dark",
452
+ "bg-action-danger-light": e === "light",
453
+ "bg-action-danger-dark dark:bg-action-danger-light": e === "system",
454
+ "bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
455
+ });
456
+ if (r === "selected")
457
+ return "bg-action-selected-dark";
458
+ }
459
+ }, Sa = ({
460
+ radius: e
461
+ }) => c({
462
+ "rounded-full": e === "large",
463
+ "rounded-md": e === "medium",
464
+ "rounded-sm": e === "small"
465
+ }), Ta = ({
466
+ mode: e,
467
+ disabled: t,
468
+ variant: r
469
+ }) => {
470
+ if (t)
471
+ return "";
472
+ if (r === "primary")
473
+ return c("hover:text-copy-light-hover", {
474
+ "hover:bg-action-dark-hover": e === "dark",
475
+ "hover:bg-action-light-hover": e === "light",
476
+ "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
477
+ "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
478
+ });
479
+ if (r === "secondary")
480
+ return c("hover:text-copy-light-hover", {
481
+ "hover:bg-action-dark-hover": e === "light",
482
+ "hover:bg-action-light-hover": e === "dark",
483
+ "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
484
+ "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
485
+ });
486
+ if (r === "danger")
487
+ return c("hover:text-copy-light-hover", {
488
+ "hover:bg-action-danger-dark-hover": e === "dark",
489
+ "hover:bg-action-danger-light-hover": e === "light",
490
+ "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
491
+ "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
492
+ });
493
+ if (r === "selected")
494
+ return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
495
+ }, Na = ({
496
+ mode: e,
497
+ disabled: t,
498
+ variant: r
499
+ }) => {
500
+ if (t)
501
+ return "";
502
+ if (r === "primary")
503
+ return c("active:text-copy-light-active", {
504
+ "active:bg-action-dark-active": e === "dark",
505
+ "active:bg-action-light-active": e === "light",
506
+ "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
507
+ "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
508
+ });
509
+ if (r === "secondary")
510
+ return c("active:text-copy-light-active", {
511
+ "active:bg-action-dark-active": e === "light",
512
+ "active:bg-action-light-active": e === "dark",
513
+ "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
514
+ "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
515
+ });
516
+ if (r === "danger")
517
+ return c("active:text-copy-lighter-active", {
518
+ "active:bg-action-danger-dark-active": e === "dark",
519
+ "active:bg-action-danger-light-active": e === "light",
520
+ "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
521
+ "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
522
+ });
523
+ if (r === "selected")
524
+ return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
525
+ }, Ra = ({
526
+ mode: e,
527
+ noBorder: t,
528
+ variant: r
529
+ }) => {
530
+ if (t)
531
+ return "border border-transparent";
532
+ if (r === "primary")
533
+ return c("border", {
534
+ "border-border-dark": e === "dark",
535
+ "border-border-accent": e === "light",
536
+ "border-border-dark dark:border-border-accent": e === "system",
537
+ "border-border-accent dark:border-border-dark": e === "alt-system"
538
+ });
539
+ if (r === "secondary")
540
+ return c("border", {
541
+ "border-border-dark": e === "light",
542
+ "border-border-accent": e === "dark",
543
+ "border-border-dark dark:border-border-accent": e === "alt-system",
544
+ "border-border-accent dark:border-border-dark": e === "system"
545
+ });
546
+ if (r === "danger")
547
+ return c("border", {
548
+ "border-border-danger-dark": e === "dark",
549
+ "border-border-danger-medium": e === "light",
550
+ "border-border-danger-dark dark:border-border-danger-medium": e === "system",
551
+ "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
552
+ });
553
+ if (r === "selected")
554
+ return "border border-border-selected-dark";
555
+ }, Ca = ({
556
+ focusMode: e
557
+ }) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
558
+ "focus:outline-focus-dark": e === "dark",
559
+ "focus:outline-focus-light": e === "light",
560
+ "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
561
+ "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
562
+ }), Ia = ({
563
+ type: e,
564
+ className: t,
565
+ raw: r,
566
+ mode: a,
567
+ focusMode: n,
568
+ disabled: o,
569
+ fullWidth: s,
570
+ size: i,
571
+ noBorder: l,
572
+ labelRight: h,
573
+ labelLeft: f,
574
+ noBackground: g,
575
+ variant: u,
576
+ noTruncate: m,
577
+ align: y,
578
+ radius: b
579
+ }) => (u || (u = "primary"), r ? c(Pt, t) : c(
580
+ Pt,
581
+ xa({
582
+ mode: a,
583
+ variant: u,
584
+ noBackground: g,
585
+ noTruncate: m
586
+ }),
587
+ wa({ mode: a, noBackground: g, variant: u }),
588
+ Sa({ radius: b }),
589
+ _a({
590
+ type: e,
591
+ size: i,
592
+ labelRight: h,
593
+ labelLeft: f,
594
+ align: y
595
+ }),
596
+ Ea({ type: e, size: i, labelRight: h, labelLeft: f }),
597
+ Ra({ mode: a, variant: u, noBorder: l }),
598
+ Ca({ focusMode: n }),
599
+ Ta({ mode: a, variant: u, disabled: o }),
600
+ Na({ mode: a, variant: u, disabled: o }),
601
+ {
602
+ "w-full": s,
603
+ "disabled:cursor-not-allowed disabled:opacity-50": o
604
+ },
605
+ t
606
+ )), Aa = (e, t, r) => {
607
+ var a;
608
+ !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
609
+ }, mr = $.forwardRef((e, t) => {
610
+ const { onClick: r, noInternalClick: a = !1, ...n } = e;
611
+ return /* @__PURE__ */ d(
612
+ "button",
613
+ {
614
+ ref: t,
615
+ onClick: (o) => {
616
+ Aa(o, a, r);
617
+ },
618
+ ...n
619
+ }
620
+ );
621
+ });
622
+ mr.displayName = "BaseButton";
623
+ /*!
624
+ @versini/ui-button v4.0.3
625
+ © 2025 gizmette.com
626
+ */
627
+ try {
628
+ window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
629
+ version: "4.0.3",
630
+ buildTime: "01/04/2025 04:09 PM EST",
631
+ homepage: "https://github.com/aversini/ui-components",
632
+ license: "MIT"
633
+ });
634
+ } catch {
635
+ }
636
+ const gr = $.forwardRef(
637
+ ({
638
+ children: e,
639
+ disabled: t = !1,
640
+ mode: r = "system",
641
+ focusMode: a = "system",
642
+ fullWidth: n = !1,
643
+ className: o,
644
+ type: s = "button",
645
+ raw: i = !1,
646
+ noBorder: l = !1,
647
+ "aria-label": h,
648
+ label: f,
649
+ size: g = "medium",
650
+ labelRight: u,
651
+ labelLeft: m,
652
+ noBackground: y = !1,
653
+ align: b = "center",
654
+ active: k = !1,
655
+ radius: p = "large",
656
+ ...N
657
+ }, A) => {
658
+ const R = Ia({
659
+ type: _t,
660
+ mode: r,
661
+ focusMode: a,
662
+ fullWidth: n,
663
+ disabled: t,
664
+ raw: i,
665
+ className: o,
666
+ noBorder: l,
667
+ size: g,
668
+ labelRight: u,
669
+ labelLeft: m,
670
+ noBackground: y,
671
+ align: b,
672
+ radius: p
673
+ }), E = c({
674
+ "text-copy-accent-dark": r === "light" && !i,
675
+ "text-copy-light": r === "dark" && !i,
676
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
677
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
678
+ }), C = k ? c(
679
+ "relative",
680
+ "focus-within:static",
681
+ "focus-within:after:border-transparent",
682
+ "after:absolute",
683
+ "after:content-['']",
684
+ "after:border-b-2",
685
+ "after:bottom-[-4px]",
686
+ "after:left-0",
687
+ "after:right-0",
688
+ {
689
+ "after:border-table-dark": r === "dark",
690
+ "after:border-table-light": r === "light",
691
+ "after:border-table-dark dark:after:border-table-light": r === "system",
692
+ "after:border-table-light dark:after:border-table-dark": r === "alt-system"
693
+ }
694
+ ) : "";
695
+ return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
696
+ mr,
697
+ {
698
+ ref: A,
699
+ className: R,
700
+ disabled: t,
701
+ type: s,
702
+ "aria-label": h || f,
703
+ ...N,
704
+ children: [
705
+ m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
706
+ /* @__PURE__ */ d("div", { className: E, children: e }),
707
+ u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
708
+ ]
709
+ }
710
+ ) });
711
+ }
712
+ );
713
+ gr.displayName = "ButtonSort";
714
+ const Et = ({
715
+ children: e,
716
+ fill: t,
717
+ viewBox: r,
718
+ className: a,
719
+ defaultViewBox: n,
720
+ size: o,
721
+ title: s,
722
+ semantic: i = !1,
723
+ ...l
724
+ }) => {
725
+ const h = c(o, a);
726
+ return /* @__PURE__ */ I(yt, { children: [
727
+ /* @__PURE__ */ d(
728
+ "svg",
729
+ {
730
+ xmlns: "http://www.w3.org/2000/svg",
731
+ className: h,
732
+ viewBox: r || n,
733
+ fill: t || "currentColor",
734
+ role: "img",
735
+ "aria-hidden": !i,
736
+ focusable: !1,
737
+ ...l,
738
+ children: e
739
+ }
740
+ ),
741
+ s && i && /* @__PURE__ */ d("span", { className: "sr-only", children: s })
742
+ ] });
743
+ };
744
+ /*!
745
+ @versini/ui-svgicon v4.0.0
746
+ © 2025 gizmette.com
747
+ */
748
+ try {
749
+ window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
750
+ version: "4.0.0",
751
+ buildTime: "01/04/2025 04:09 PM EST",
752
+ homepage: "https://github.com/aversini/ui-components",
753
+ license: "MIT"
754
+ });
755
+ } catch {
756
+ }
757
+ const Oa = ({
758
+ className: e,
759
+ viewBox: t,
760
+ title: r,
761
+ monotone: a,
762
+ ...n
763
+ }) => /* @__PURE__ */ I(
764
+ Et,
765
+ {
766
+ defaultViewBox: "0 0 576 512",
767
+ size: "size-5",
768
+ viewBox: t,
769
+ className: e,
770
+ title: r || "Sort",
771
+ ...n,
772
+ children: [
773
+ /* @__PURE__ */ d(
774
+ "path",
775
+ {
776
+ className: "fa-secondary",
777
+ opacity: a ? "1" : "0.4",
778
+ d: "M297.4 137.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L384 141.3 384 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0c6.2-6.2 9.4-14.4 9.4-22.6s-3.1-16.4-9.4-22.6l-96-96C432.4 35.1 424.2 32 416 32s-16.4 3.1-22.6 9.4l-96 96z"
779
+ }
780
+ ),
781
+ /* @__PURE__ */ d(
782
+ "path",
783
+ {
784
+ className: "fa-primary",
785
+ 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.7 192 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z"
786
+ }
787
+ )
788
+ ]
789
+ }
790
+ ), La = ({
791
+ className: e,
792
+ viewBox: t,
793
+ title: r,
794
+ monotone: a,
795
+ ...n
796
+ }) => /* @__PURE__ */ I(
797
+ Et,
798
+ {
799
+ defaultViewBox: "0 0 576 512",
800
+ size: "size-5",
801
+ viewBox: t,
802
+ className: e,
803
+ title: r || "Sort Down",
804
+ ...n,
805
+ children: [
806
+ /* @__PURE__ */ d(
807
+ "path",
808
+ {
809
+ className: "fa-secondary",
810
+ opacity: a ? "1" : "0.4",
811
+ d: "M288 64c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L320 96c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32z"
812
+ }
813
+ ),
814
+ /* @__PURE__ */ d(
815
+ "path",
816
+ {
817
+ className: "fa-primary",
818
+ 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.7 160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 301.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"
819
+ }
820
+ )
821
+ ]
822
+ }
823
+ ), Ba = ({
824
+ className: e,
825
+ viewBox: t,
826
+ title: r,
827
+ monotone: a,
828
+ ...n
829
+ }) => /* @__PURE__ */ I(
830
+ Et,
831
+ {
832
+ defaultViewBox: "0 0 576 512",
833
+ size: "size-5",
834
+ viewBox: t,
835
+ className: e,
836
+ title: r || "Sort Up",
837
+ ...n,
838
+ children: [
839
+ /* @__PURE__ */ d(
840
+ "path",
841
+ {
842
+ className: "fa-secondary",
843
+ opacity: a ? "1" : "0.4",
844
+ d: "M288 64c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32z"
845
+ }
846
+ ),
847
+ /* @__PURE__ */ d(
848
+ "path",
849
+ {
850
+ className: "fa-primary",
851
+ 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.3 160 448c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-301.7L63.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"
852
+ }
853
+ )
854
+ ]
855
+ }
856
+ );
857
+ /*!
858
+ @versini/ui-icons v4.2.0
859
+ © 2025 gizmette.com
860
+ */
861
+ try {
862
+ window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
863
+ version: "4.2.0",
864
+ buildTime: "01/04/2025 04:09 PM EST",
865
+ homepage: "https://github.com/aversini/ui-components",
866
+ license: "MIT"
867
+ });
868
+ } catch {
869
+ }
870
+ const be = $.createContext({
871
+ mode: "light",
872
+ cellWrapper: "thead",
873
+ stickyHeader: !1,
874
+ stickyFooter: !1,
875
+ compact: !1
876
+ }), Wo = ({
877
+ children: e,
878
+ mode: t = "system",
879
+ caption: r,
880
+ compact: a,
881
+ summary: n,
882
+ className: o,
883
+ wrapperClassName: s,
884
+ maxHeight: i,
885
+ stickyHeader: l,
886
+ stickyFooter: h,
887
+ ...f
888
+ }) => {
889
+ const g = fa({
890
+ mode: t,
891
+ className: o,
892
+ wrapperClassName: s,
893
+ stickyHeader: l,
894
+ stickyFooter: h
895
+ });
896
+ return /* @__PURE__ */ d(
897
+ be.Provider,
898
+ {
899
+ value: { mode: t, stickyHeader: l, stickyFooter: h, compact: a },
900
+ children: /* @__PURE__ */ d(
901
+ "div",
902
+ {
903
+ className: g.wrapper,
904
+ ...i && {
905
+ style: { maxHeight: i }
906
+ },
907
+ children: /* @__PURE__ */ I("table", { className: g.table, summary: n, ...f, children: [
908
+ r && /* @__PURE__ */ d("caption", { className: g.caption, children: r }),
909
+ e
910
+ ] })
911
+ }
912
+ )
913
+ }
914
+ );
915
+ }, jo = ({
916
+ children: e,
917
+ className: t,
918
+ ...r
919
+ }) => {
920
+ const a = P(be);
921
+ a.cellWrapper = Ve;
922
+ const n = pa({
923
+ className: t,
924
+ mode: a.mode,
925
+ stickyHeader: a.stickyHeader
926
+ });
927
+ return /* @__PURE__ */ d("thead", { className: n, ...r, children: e });
928
+ }, qo = ({
929
+ children: e,
930
+ className: t,
931
+ ...r
932
+ }) => {
933
+ const a = P(be);
934
+ a.cellWrapper = kt;
935
+ const n = ya({
936
+ className: t,
937
+ mode: a.mode,
938
+ stickyFooter: a.stickyFooter
939
+ });
940
+ return /* @__PURE__ */ d("tfoot", { className: n, ...r, children: e });
941
+ }, Ko = ({ children: e, ...t }) => {
942
+ const r = P(be);
943
+ return r.cellWrapper = ye, /* @__PURE__ */ d("tbody", { ...t, children: e });
944
+ }, Jo = ({
945
+ children: e,
946
+ className: t,
947
+ ...r
948
+ }) => {
949
+ const a = P(be), n = ba({
950
+ mode: a.mode,
951
+ cellWrapper: a.cellWrapper,
952
+ className: t
953
+ });
954
+ return /* @__PURE__ */ d("tr", { className: n, ...r, children: e });
955
+ }, $a = ({
956
+ children: e,
957
+ component: t,
958
+ className: r,
959
+ align: a,
960
+ ...n
961
+ }) => {
962
+ const o = P(be), s = t || (o.cellWrapper === Ve ? "th" : "td"), { mainClasses: i, alignClasses: l } = va({
963
+ cellWrapper: o.cellWrapper,
964
+ className: r,
965
+ mode: o.mode,
966
+ compact: o.compact,
967
+ align: a
968
+ });
969
+ return a ? /* @__PURE__ */ d(s, { className: i, ...n, children: /* @__PURE__ */ d("div", { className: l, children: e }) }) : /* @__PURE__ */ d(s, { className: i, ...n, children: e });
970
+ }, Yo = ({
971
+ align: e,
972
+ children: t,
973
+ buttonClassName: r,
974
+ className: a,
975
+ component: n,
976
+ focusMode: o = "alt-system",
977
+ mode: s = "alt-system",
978
+ onClick: i,
979
+ sortDirection: l,
980
+ sortedCell: h,
981
+ cellId: f,
982
+ ...g
983
+ }) => {
984
+ const u = ka({ buttonClassName: r });
985
+ return /* @__PURE__ */ d(
986
+ $a,
987
+ {
988
+ component: n,
989
+ className: a,
990
+ role: "columnheader",
991
+ "aria-sort": l === Ee.ASC && h === f ? "ascending" : l === Ee.DESC && h === f ? "descending" : "other",
992
+ ...g,
993
+ children: /* @__PURE__ */ d(
994
+ gr,
995
+ {
996
+ active: h === f,
997
+ className: u,
998
+ onClick: i,
999
+ align: e,
1000
+ noBorder: !0,
1001
+ focusMode: o,
1002
+ mode: s,
1003
+ fullWidth: !0,
1004
+ labelRight: t,
1005
+ children: l === Ee.ASC && h === f ? /* @__PURE__ */ d(Ba, { className: "size-4", monotone: !0 }) : l === Ee.DESC && h === f ? /* @__PURE__ */ d(La, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ d(Oa, { className: "size-4", monotone: !0 })
1006
+ }
1007
+ )
1008
+ }
1009
+ );
1010
+ }, D = [];
1011
+ for (let e = 0; e < 256; ++e)
1012
+ D.push((e + 256).toString(16).slice(1));
1013
+ function Ma(e, t = 0) {
1014
+ return (D[e[t + 0]] + D[e[t + 1]] + D[e[t + 2]] + D[e[t + 3]] + "-" + D[e[t + 4]] + D[e[t + 5]] + "-" + D[e[t + 6]] + D[e[t + 7]] + "-" + D[e[t + 8]] + D[e[t + 9]] + "-" + D[e[t + 10]] + D[e[t + 11]] + D[e[t + 12]] + D[e[t + 13]] + D[e[t + 14]] + D[e[t + 15]]).toLowerCase();
1015
+ }
1016
+ let Ke;
1017
+ const Da = new Uint8Array(16);
1018
+ function Va() {
1019
+ if (!Ke) {
1020
+ if (typeof crypto > "u" || !crypto.getRandomValues)
1021
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1022
+ Ke = crypto.getRandomValues.bind(crypto);
1023
+ }
1024
+ return Ke(Da);
1025
+ }
1026
+ const za = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ht = { randomUUID: za };
1027
+ function xt(e, t, r) {
1028
+ var n;
1029
+ if (Ht.randomUUID && !t && !e)
1030
+ return Ht.randomUUID();
1031
+ e = e || {};
1032
+ const a = e.random ?? ((n = e.rng) == null ? void 0 : n.call(e)) ?? Va();
1033
+ if (a.length < 16)
1034
+ throw new Error("Random bytes length must be >= 16");
1035
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ma(a);
1036
+ }
1037
+ const Ua = (e, t) => {
1038
+ if ((t == null ? void 0 : t.type) === $r) {
1039
+ const r = t.payload.messages.map((a) => ({
1040
+ message: {
1041
+ role: a.role,
1042
+ content: a.content,
1043
+ name: a.name,
1044
+ processingTime: a.processingTime
1045
+ }
1046
+ }));
1047
+ return {
1048
+ id: t.payload.id,
1049
+ model: t.payload.model,
1050
+ usage: t.payload.usage,
1051
+ isComponent: e.isComponent,
1052
+ messages: r,
1053
+ engine: e.engine,
1054
+ prompts: e.prompts
1055
+ };
1056
+ }
1057
+ if ((t == null ? void 0 : t.type) === xe) {
1058
+ const r = t.payload.message.role, a = t.payload.message.content, n = t.payload.message.name, o = t.payload.message.processingTime, s = t.payload.message.messageId;
1059
+ if (r !== "") {
1060
+ const i = {
1061
+ role: r,
1062
+ content: a,
1063
+ name: n,
1064
+ processingTime: o,
1065
+ messageId: s
1066
+ };
1067
+ if (r === we) {
1068
+ const l = e.messages.findIndex(
1069
+ (h) => h.message.messageId === s
1070
+ );
1071
+ if (l !== -1) {
1072
+ const h = e.messages.map((f, g) => g === l ? {
1073
+ message: {
1074
+ ...f.message,
1075
+ content: `${f.message.content}${a}`,
1076
+ processingTime: o,
1077
+ name: n
1078
+ }
1079
+ } : f);
1080
+ return {
1081
+ id: e.id,
1082
+ model: e.model,
1083
+ usage: e.usage,
1084
+ isComponent: e.isComponent,
1085
+ messages: h,
1086
+ engine: e.engine,
1087
+ prompts: e.prompts
1088
+ };
1089
+ }
1090
+ }
1091
+ return {
1092
+ id: e.id,
1093
+ model: e.model,
1094
+ engine: e.engine,
1095
+ prompts: e.prompts,
1096
+ usage: e.usage,
1097
+ isComponent: e.isComponent,
1098
+ messages: [
1099
+ ...e.messages,
1100
+ {
1101
+ message: i
1102
+ }
1103
+ ]
1104
+ };
1105
+ }
1106
+ }
1107
+ return (t == null ? void 0 : t.type) === rr ? {
1108
+ id: xt(),
1109
+ model: e.model,
1110
+ engine: e.engine,
1111
+ usage: 0,
1112
+ messages: [],
1113
+ isComponent: e.isComponent,
1114
+ prompts: e.prompts
1115
+ } : (t == null ? void 0 : t.type) === ar ? {
1116
+ id: e.id,
1117
+ model: t.payload.model,
1118
+ engine: e.engine,
1119
+ prompts: e.prompts,
1120
+ usage: t.payload.usage,
1121
+ messages: e.messages,
1122
+ isComponent: e.isComponent
1123
+ } : (t == null ? void 0 : t.type) === nr ? {
1124
+ ...e,
1125
+ streaming: t.payload.streaming
1126
+ } : e;
1127
+ }, Pa = (e, t) => {
1128
+ switch (t == null ? void 0 : t.type) {
1129
+ case Dr:
1130
+ return {
1131
+ searchString: t.payload.searchString,
1132
+ sortedCell: e.sortedCell,
1133
+ sortDirection: e.sortDirection
1134
+ };
1135
+ case Mr:
1136
+ return {
1137
+ searchString: e.searchString,
1138
+ sortedCell: t.payload.sortedCell,
1139
+ sortDirection: t.payload.sortDirection
1140
+ };
1141
+ default:
1142
+ return e;
1143
+ }
1144
+ }, Ha = (e, t) => {
1145
+ switch (t == null ? void 0 : t.type) {
1146
+ case sr:
1147
+ return {
1148
+ prompt: t.payload.prompt
1149
+ };
1150
+ case or:
1151
+ return {
1152
+ prompt: ""
1153
+ };
1154
+ default:
1155
+ return e;
1156
+ }
1157
+ }, ve = $.createContext({
1158
+ state: {
1159
+ id: "",
1160
+ model: Se,
1161
+ engine: Se,
1162
+ usage: 0,
1163
+ messages: [],
1164
+ isComponent: !1,
1165
+ prompts: []
1166
+ },
1167
+ dispatch: () => {
1168
+ },
1169
+ serverStats: {
1170
+ version: "",
1171
+ models: [],
1172
+ plugins: [],
1173
+ engines: []
1174
+ }
1175
+ }), Fa = $.createContext({
1176
+ state: { searchString: "", sortedCell: "", sortDirection: "" },
1177
+ dispatch: () => {
1178
+ }
1179
+ }), wt = $.createContext({
1180
+ state: { prompt: "" },
1181
+ dispatch: () => {
1182
+ }
1183
+ });
1184
+ /*!
1185
+ @versini/ui-textarea v3.0.0
1186
+ © 2025 gizmette.com
1187
+ */
1188
+ try {
1189
+ window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
1190
+ version: "3.0.0",
1191
+ buildTime: "01/03/2025 10:45 AM EST",
1192
+ homepage: "https://github.com/aversini/ui-components",
1193
+ license: "MIT"
1194
+ });
1195
+ } catch {
1196
+ }
1197
+ const hr = "av-text-area", Ga = "av-text-area-wrapper", Je = "av-text-area-helper-text", Wa = "av-text-area__control--right", ja = "av-text-area__control--left";
1198
+ function qa() {
1199
+ const e = S(!1);
1200
+ return L(() => (e.current = !0, () => {
1201
+ e.current = !1;
1202
+ }), []), Z(() => e.current, []);
1203
+ }
1204
+ function Ka(e) {
1205
+ return De(() => e.every((t) => t == null) ? () => {
1206
+ } : (t) => {
1207
+ e.forEach((r) => {
1208
+ typeof r == "function" ? r(t) : r != null && (r.current = t);
1209
+ });
1210
+ }, e);
1211
+ }
1212
+ const Ja = {
1213
+ x: 0,
1214
+ y: 0,
1215
+ width: 0,
1216
+ height: 0,
1217
+ top: 0,
1218
+ left: 0,
1219
+ bottom: 0,
1220
+ right: 0
1221
+ };
1222
+ function Ft(e) {
1223
+ const t = qa(), r = S(0), a = S(null), [n, o] = G(Ja), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
1224
+ const l = i[0];
1225
+ l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
1226
+ a.current && t() && o(l.contentRect);
1227
+ }));
1228
+ }), [t]);
1229
+ return L(() => (a.current && (s == null || s.observe(a.current, e)), () => {
1230
+ s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
1231
+ }), [s, e]), [a, n];
1232
+ }
1233
+ function Ya({
1234
+ value: e,
1235
+ defaultValue: t,
1236
+ finalValue: r,
1237
+ onChange: a = () => {
1238
+ },
1239
+ initialControlledDelay: n = 0
1240
+ }) {
1241
+ const [o, s] = G(!1), [i, l] = G(
1242
+ t !== void 0 ? t : r
1243
+ ), h = (f) => {
1244
+ l(f), a == null || a(f);
1245
+ };
1246
+ return L(() => {
1247
+ (async () => e !== void 0 && !o && n > 0 && (await new Promise(
1248
+ (f) => setTimeout(f, n)
1249
+ ), s(!0)))();
1250
+ }, [e, n, o]), e !== void 0 ? !o && n > 0 ? ["", a, !0] : [e, a, !0] : [i, h, !1];
1251
+ }
1252
+ function Xa(e) {
1253
+ const t = Qr();
1254
+ if (!e)
1255
+ return t;
1256
+ if (typeof e == "number" || typeof e == "string")
1257
+ return `${e}${t}`;
1258
+ if (typeof e == "object") {
1259
+ const { id: r, prefix: a = "" } = e;
1260
+ return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
1261
+ }
1262
+ }
1263
+ const fr = "SET_ANNOUNCEMENT", pr = "CLEAR_ANNOUNCEMENT", Qa = {
1264
+ alert: null,
1265
+ alertdialog: null,
1266
+ log: "polite",
1267
+ marquee: null,
1268
+ progressbar: null,
1269
+ status: "polite",
1270
+ timer: "assertive"
1271
+ }, Za = (e, t) => {
1272
+ switch (t == null ? void 0 : t.type) {
1273
+ case fr:
1274
+ return {
1275
+ ...e,
1276
+ announcement: t.payload
1277
+ };
1278
+ case pr:
1279
+ return {
1280
+ ...e,
1281
+ announcement: null
1282
+ };
1283
+ default:
1284
+ return e;
1285
+ }
1286
+ }, en = ({
1287
+ onAnnouncementClear: e,
1288
+ dispatch: t
1289
+ }) => {
1290
+ t({
1291
+ type: pr
1292
+ }), typeof e == "function" && e();
1293
+ }, Gt = ({
1294
+ children: e,
1295
+ clearAnnouncementDelay: t,
1296
+ clearAnnouncementTimeoutRef: r,
1297
+ onAnnouncementClear: a,
1298
+ dispatch: n
1299
+ }) => {
1300
+ clearTimeout(r.current), e !== null && n({
1301
+ type: fr,
1302
+ payload: e
1303
+ }), t && (r.current = setTimeout(
1304
+ () => en({
1305
+ onAnnouncementClear: a,
1306
+ dispatch: n
1307
+ }),
1308
+ t
1309
+ ));
1310
+ }, tn = ({
1311
+ children: e,
1312
+ announcementTimeoutRef: t,
1313
+ announcementDelay: r,
1314
+ clearAnnouncementDelay: a,
1315
+ clearAnnouncementTimeoutRef: n,
1316
+ onAnnouncementClear: o,
1317
+ dispatch: s
1318
+ }) => {
1319
+ clearTimeout(t.current), r ? t.current = setTimeout(Gt, r, {
1320
+ children: e,
1321
+ clearAnnouncementDelay: a,
1322
+ clearAnnouncementTimeoutRef: n,
1323
+ onAnnouncementClear: o,
1324
+ dispatch: s
1325
+ }) : Gt({
1326
+ children: e,
1327
+ clearAnnouncementDelay: a,
1328
+ clearAnnouncementTimeoutRef: n,
1329
+ onAnnouncementClear: o,
1330
+ dispatch: s
1331
+ });
1332
+ };
1333
+ function rn({
1334
+ children: e,
1335
+ className: t,
1336
+ politeness: r,
1337
+ role: a = null,
1338
+ announcementDelay: n,
1339
+ clearAnnouncementDelay: o,
1340
+ onAnnouncementClear: s,
1341
+ visible: i,
1342
+ ...l
1343
+ }) {
1344
+ const h = S(null), f = S(null), [g, u] = Be(Za, {
1345
+ announcement: null
1346
+ });
1347
+ let m = r;
1348
+ typeof m > "u" && (m = a ? Qa[a] : "assertive"), L(() => {
1349
+ tn({
1350
+ announcementTimeoutRef: h,
1351
+ announcementDelay: n,
1352
+ children: e,
1353
+ clearAnnouncementDelay: o,
1354
+ clearAnnouncementTimeoutRef: f,
1355
+ onAnnouncementClear: s,
1356
+ dispatch: u
1357
+ });
1358
+ }, [
1359
+ e,
1360
+ n,
1361
+ o,
1362
+ s
1363
+ ]);
1364
+ const y = c(t, {
1365
+ "sr-only": !i
1366
+ });
1367
+ return /* @__PURE__ */ d(
1368
+ "div",
1369
+ {
1370
+ "aria-live": m,
1371
+ ...a && { role: a },
1372
+ className: y,
1373
+ ...l,
1374
+ children: g.announcement
1375
+ }
1376
+ );
1377
+ }
1378
+ /*!
1379
+ @versini/ui-liveregion v1.3.0
1380
+ © 2025 gizmette.com
1381
+ */
1382
+ try {
1383
+ window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
1384
+ version: "1.3.0",
1385
+ buildTime: "01/03/2025 10:45 AM EST",
1386
+ homepage: "https://github.com/aversini/ui-components",
1387
+ license: "MIT"
1388
+ });
1389
+ } catch {
1390
+ }
1391
+ const an = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", nn = ({ mode: e }) => c({
1392
+ "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
1393
+ "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
1394
+ "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
1395
+ "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
1396
+ }), on = ({
1397
+ focusMode: e
1398
+ }) => c("focus:outline focus:outline-2 focus:outline-offset-2", {
1399
+ "focus:outline-focus-dark": e === "dark",
1400
+ "focus:outline-focus-light": e === "light",
1401
+ "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1402
+ "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1403
+ }), sn = ({
1404
+ noBorder: e,
1405
+ error: t
1406
+ }) => c("border-2", {
1407
+ "border-border-dark": !e && !t,
1408
+ "focus:border-border-dark": !e && t,
1409
+ "border-border-error-dark": !e && t,
1410
+ "border-transparent": e
1411
+ }), cn = ({
1412
+ disabled: e,
1413
+ raw: t,
1414
+ error: r,
1415
+ mode: a,
1416
+ leftElement: n,
1417
+ rightElement: o
1418
+ }) => {
1419
+ if (t)
1420
+ return "";
1421
+ if (e)
1422
+ return c(
1423
+ "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
1424
+ {
1425
+ "translate-x-[12px]": o === !0 && !n || !o && !n
1426
+ }
1427
+ );
1428
+ if (!r)
1429
+ return c(
1430
+ "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
1431
+ {
1432
+ "translate-x-[12px]": o === !0 && !n || !o && !n,
1433
+ "text-copy-medium": a === "dark",
1434
+ "text-copy-dark": a === "light",
1435
+ "text-copy-dark dark:text-copy-medium": a === "system",
1436
+ "text-copy-medium dark:text-copy-dark": a === "alt-system"
1437
+ }
1438
+ );
1439
+ if (r)
1440
+ return c(
1441
+ "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
1442
+ {
1443
+ "translate-x-[12px]": o === !0 && !n || !o && !n,
1444
+ "text-copy-medium": a === "dark",
1445
+ "text-copy-error-dark": a === "light",
1446
+ "text-copy-error-dark dark:text-copy-error-light": a === "system",
1447
+ "text-copy-medium dark:text-copy-error-dark": a === "alt-system"
1448
+ }
1449
+ );
1450
+ }, ln = ({
1451
+ error: e,
1452
+ raw: t,
1453
+ mode: r,
1454
+ disabled: a
1455
+ }) => {
1456
+ if (t)
1457
+ return "";
1458
+ if (a)
1459
+ return c(
1460
+ Je,
1461
+ "absolute px-2 cursor-not-allowed opacity-50 font-medium"
1462
+ );
1463
+ if (!e)
1464
+ return c(Je, "absolute px-2 font-medium", {
1465
+ "text-copy-medium": r === "dark",
1466
+ "text-copy-dark": r === "light",
1467
+ "text-copy-dark dark:text-copy-medium": r === "system",
1468
+ "text-copy-medium dark:text-copy-dark": r === "alt-system"
1469
+ });
1470
+ if (e)
1471
+ return c(Je, "absolute px-2 font-medium", {
1472
+ "text-copy-error-light": r === "dark",
1473
+ "text-copy-error-dark": r === "light",
1474
+ "text-copy-error-dark dark:text-copy-error-light": r === "system",
1475
+ "dark:text-copy-error-dark text-copy-error-light": r === "alt-system"
1476
+ });
1477
+ }, dn = ({
1478
+ className: e,
1479
+ textAreaClassName: t,
1480
+ raw: r,
1481
+ focusMode: a,
1482
+ disabled: n,
1483
+ noBorder: o,
1484
+ error: s,
1485
+ mode: i,
1486
+ leftElement: l,
1487
+ rightElement: h
1488
+ }) => {
1489
+ const f = r ? e : c(
1490
+ "relative flex w-full flex-col justify-center",
1491
+ Ga,
1492
+ e
1493
+ ), g = r ? c(t) : c(
1494
+ hr,
1495
+ t,
1496
+ an(),
1497
+ nn({ mode: i }),
1498
+ on({ focusMode: a }),
1499
+ sn({
1500
+ noBorder: o,
1501
+ error: s
1502
+ }),
1503
+ {
1504
+ "disabled:cursor-not-allowed disabled:opacity-50": n
1505
+ }
1506
+ ), u = r ? void 0 : "sr-only", m = cn({
1507
+ disabled: n,
1508
+ raw: r,
1509
+ error: s,
1510
+ mode: i,
1511
+ rightElement: h,
1512
+ leftElement: l
1513
+ }), y = ln({
1514
+ error: s,
1515
+ raw: r,
1516
+ mode: i,
1517
+ disabled: n
1518
+ }), b = r ? void 0 : c(Wa, "absolute"), k = r ? void 0 : c(ja, "absolute");
1519
+ return {
1520
+ wrapper: f,
1521
+ textArea: g,
1522
+ accessibleLabel: u,
1523
+ visibleLabel: m,
1524
+ helperText: y,
1525
+ rightElement: b,
1526
+ leftElement: k
1527
+ };
1528
+ }, un = ({
1529
+ scrollHeight: e,
1530
+ currentHeight: t,
1531
+ currentLabelOffset: r = 0,
1532
+ currentHelperTextOffset: a = 0
1533
+ }) => {
1534
+ let n, o;
1535
+ if (e > 0 && e !== t) {
1536
+ const s = e - t, i = Math.abs(s / 24);
1537
+ n = r + -1 * Math.sign(s) * (12 * i), o = a + Math.sign(s) * (12 * i);
1538
+ }
1539
+ return {
1540
+ labelOffset: n,
1541
+ helperTextOffset: o,
1542
+ scrollHeight: e
1543
+ };
1544
+ }, yr = $.forwardRef(
1545
+ ({
1546
+ id: e,
1547
+ name: t,
1548
+ label: r,
1549
+ error: a = !1,
1550
+ raw: n = !1,
1551
+ className: o,
1552
+ textAreaClassName: s,
1553
+ mode: i = "system",
1554
+ focusMode: l = "system",
1555
+ value: h,
1556
+ defaultValue: f,
1557
+ disabled: g = !1,
1558
+ noBorder: u = !1,
1559
+ labelId: m,
1560
+ helperText: y = "",
1561
+ helperTextOnFocus: b = !1,
1562
+ rightElement: k,
1563
+ leftElement: p,
1564
+ onChange: N,
1565
+ onFocus: A,
1566
+ onBlur: R,
1567
+ ...E
1568
+ }, C) => {
1569
+ var ee;
1570
+ const x = S(null), oe = Ka([C, x]), [H, W] = Ft(), [te, B] = Ft(), j = S(80), me = S(-25), q = S(null), ke = S(30), K = S(null), se = Xa({ id: e, prefix: `${hr}-` }), [Ne, ie] = G(0), [re, pe] = G(0), [Re, ge] = G(
1571
+ !!(!b && y)
1572
+ ), Ce = `${t} error, ${y}`, J = dn({
1573
+ className: o,
1574
+ textAreaClassName: s,
1575
+ error: a,
1576
+ raw: n,
1577
+ focusMode: l,
1578
+ disabled: g,
1579
+ noBorder: u,
1580
+ mode: i,
1581
+ rightElement: !!k,
1582
+ leftElement: !!p
1583
+ }), [Y, We] = Ya({
1584
+ value: h,
1585
+ initialControlledDelay: 20,
1586
+ defaultValue: f,
1587
+ onChange: (v) => {
1588
+ N && N({
1589
+ target: {
1590
+ value: v
1591
+ }
1592
+ });
1593
+ }
1594
+ }), he = (v) => {
1595
+ We(v.target.value);
1596
+ }, Ie = (v) => {
1597
+ b && y && ge(!0), A && A(v);
1598
+ }, w = (v) => {
1599
+ b && y && !Y && ge(!1), R && R(v);
1600
+ };
1601
+ return fe(() => {
1602
+ W && W.width && ie(W.width + 18 + 10);
1603
+ }, [W]), fe(() => {
1604
+ B && B.width && pe(B.width + 18 + 10);
1605
+ }, [B]), fe(() => {
1606
+ n || x && x.current && Y !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
1607
+ }, [Y, n]), fe(() => {
1608
+ n || setTimeout(() => {
1609
+ var v;
1610
+ (v = q == null ? void 0 : q.current) == null || v.style.setProperty(
1611
+ "--av-text-area-wrapper-transition",
1612
+ Y ? "none" : "all 0.2s ease-out"
1613
+ );
1614
+ }, 0);
1615
+ }, [Y, n]), fe(() => {
1616
+ var v, O;
1617
+ if (!n && x && x.current && Y !== void 0) {
1618
+ const { labelOffset: T, helperTextOffset: U, scrollHeight: ce } = un({
1619
+ scrollHeight: x.current.scrollHeight,
1620
+ currentHeight: j.current,
1621
+ currentLabelOffset: me.current,
1622
+ currentHelperTextOffset: ke.current
1623
+ });
1624
+ T && (me.current = T, (v = q == null ? void 0 : q.current) == null || v.style.setProperty(
1625
+ "--av-text-area-label",
1626
+ `${T}px`
1627
+ )), U && (ke.current = U, (O = K == null ? void 0 : K.current) == null || O.style.setProperty(
1628
+ "--av-text-area-helper-text",
1629
+ `${U}px`
1630
+ )), j.current = ce || j.current;
1631
+ }
1632
+ }, [Y, n]), B.width > 0 && ((ee = q == null ? void 0 : q.current) == null || ee.style.setProperty(
1633
+ "--tw-translate-x",
1634
+ `${12 + B.width + 5}px`
1635
+ )), /* @__PURE__ */ I("div", { className: J.wrapper, children: [
1636
+ /* @__PURE__ */ d(
1637
+ "label",
1638
+ {
1639
+ htmlFor: se,
1640
+ id: m,
1641
+ className: J.accessibleLabel,
1642
+ children: r
1643
+ }
1644
+ ),
1645
+ p && /* @__PURE__ */ d(
1646
+ "div",
1647
+ {
1648
+ ref: te,
1649
+ className: J.leftElement,
1650
+ children: p
1651
+ }
1652
+ ),
1653
+ /* @__PURE__ */ d(
1654
+ "textarea",
1655
+ {
1656
+ ref: oe,
1657
+ id: se,
1658
+ name: t,
1659
+ disabled: g,
1660
+ placeholder: n ? void 0 : " ",
1661
+ className: J.textArea,
1662
+ rows: 1,
1663
+ ...y && { "aria-describedby": `${se}-helper` },
1664
+ ...a && { "aria-invalid": "true" },
1665
+ ...k && !p && !n && { style: { paddingRight: Ne } },
1666
+ ...p && !k && !n && { style: { paddingLeft: re } },
1667
+ ...k && p && !n && {
1668
+ style: {
1669
+ paddingRight: Ne,
1670
+ paddingLeft: re
1671
+ }
1672
+ },
1673
+ value: Y,
1674
+ onChange: he,
1675
+ onFocus: Ie,
1676
+ onBlur: w,
1677
+ ...E
1678
+ }
1679
+ ),
1680
+ !n && /* @__PURE__ */ d(
1681
+ "label",
1682
+ {
1683
+ ref: q,
1684
+ "aria-hidden": !0,
1685
+ htmlFor: se,
1686
+ className: `${J.visibleLabel}`,
1687
+ children: r
1688
+ }
1689
+ ),
1690
+ Re && /* @__PURE__ */ d(
1691
+ "div",
1692
+ {
1693
+ ref: K,
1694
+ id: `${se}-helper`,
1695
+ className: J.helperText,
1696
+ children: y
1697
+ }
1698
+ ),
1699
+ k && /* @__PURE__ */ d(
1700
+ "div",
1701
+ {
1702
+ ref: H,
1703
+ className: J.rightElement,
1704
+ children: k
1705
+ }
1706
+ ),
1707
+ a && y && /* @__PURE__ */ d(rn, { politeness: "polite", clearAnnouncementDelay: 500, children: Ce })
1708
+ ] });
1709
+ }
1710
+ );
1711
+ yr.displayName = "TextArea";
1712
+ const le = {
1713
+ GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
1714
+ location(latitude: $latitude, longitude: $longitude) {
1715
+ country
1716
+ state
1717
+ city
1718
+ displayName
1719
+ }
1720
+ }`,
1721
+ GET_CHATS: `query GetChats(
1722
+ $user: String!,
1723
+ $searchString: String,
1724
+ $limit: Float,
1725
+ $direction: String,
1726
+ $truncateSize: Float) {
1727
+ chats(
1728
+ user: $user,
1729
+ searchString: $searchString,
1730
+ limit: $limit,
1731
+ direction: $direction,
1732
+ truncateSize: $truncateSize) {
1733
+ timestamp
1734
+ id
1735
+ model
1736
+ messages {
1737
+ content
1738
+ }
1739
+ }
1740
+ }`,
1741
+ GET_CHATS_STATS: `query GetChatsStats($user: String!) {
1742
+ chatsStats(user: $user) {
1743
+ totalChats
1744
+ averageProcessingTimes
1745
+ }
1746
+ }`,
1747
+ GET_CHAT: `query GetChatById($id: String!) {
1748
+ chatById(id: $id) {
1749
+ model
1750
+ usage
1751
+ messages {
1752
+ content
1753
+ role
1754
+ name
1755
+ processingTime
1756
+ }
1757
+ }
1758
+ }`,
1759
+ DELETE_CHAT: `mutation DeleteChat(
1760
+ $id: String!,
1761
+ $userId: String!) {
1762
+ deleteChat(
1763
+ id: $id,
1764
+ user: $userId) {
1765
+ id
1766
+ }
1767
+ }`,
1768
+ GET_SERVER_CAPABILITIES: `query GetServerCapabilities {
1769
+ getServerCapabilities {
1770
+ version
1771
+ models
1772
+ plugins
1773
+ engines
1774
+ runningMode
1775
+ }
1776
+ }`,
1777
+ GET_USER_PREFERENCES: `query GetUserPreferences($user: String!) {
1778
+ getUserPreferences(user: $user) {
1779
+ instructions
1780
+ location
1781
+ engine
1782
+ tags {
1783
+ enabled
1784
+ slot
1785
+ label
1786
+ content
1787
+ }
1788
+ }
1789
+ }`,
1790
+ SET_USER_PREFERENCES: `mutation SetUserPreferences(
1791
+ $user: String!,
1792
+ $instructions: String,
1793
+ $location: String,
1794
+ $engine: String,
1795
+ $tags: [TagIn]) {
1796
+ setUserPreferences(
1797
+ user: $user,
1798
+ instructions: $instructions,
1799
+ location: $location,
1800
+ engine: $engine,
1801
+ tags: $tags)
1802
+ }`
1803
+ }, ze = {
1804
+ GET_LOCATION: {
1805
+ schema: le.GET_LOCATION,
1806
+ method: "location"
1807
+ },
1808
+ GET_CHATS: {
1809
+ schema: le.GET_CHATS,
1810
+ method: "chats"
1811
+ },
1812
+ GET_CHATS_STATS: {
1813
+ schema: le.GET_CHATS_STATS,
1814
+ method: "chatsStats"
1815
+ },
1816
+ GET_CHAT: {
1817
+ schema: le.GET_CHAT,
1818
+ method: "chatById"
1819
+ },
1820
+ DELETE_CHAT: {
1821
+ schema: le.DELETE_CHAT,
1822
+ method: "deleteChat"
1823
+ },
1824
+ GET_SERVER_CAPABILITIES: {
1825
+ schema: le.GET_SERVER_CAPABILITIES,
1826
+ method: "getServerCapabilities"
1827
+ },
1828
+ GET_USER_PREFERENCES: {
1829
+ schema: le.GET_USER_PREFERENCES,
1830
+ method: "getUserPreferences"
1831
+ },
1832
+ SET_USER_PREFERENCES: {
1833
+ schema: le.SET_USER_PREFERENCES,
1834
+ method: "setUserPreferences"
1835
+ }
1836
+ }, br = process.env.PUBLIC_SASSY_API_SERVER_URL, mn = async ({
1837
+ query: e,
1838
+ data: t,
1839
+ headers: r = {}
1840
+ }) => await fetch(`${br}/graphql`, {
1841
+ method: "POST",
1842
+ credentials: "include",
1843
+ headers: {
1844
+ ...r,
1845
+ "Content-Type": "application/json",
1846
+ Accept: "application/json"
1847
+ },
1848
+ body: JSON.stringify({
1849
+ query: e,
1850
+ variables: t
1851
+ })
1852
+ }), gn = async ({
1853
+ accessToken: e,
1854
+ type: t,
1855
+ params: r = {}
1856
+ }) => {
1857
+ const a = t != null && t.data ? t.data(r) : r;
1858
+ try {
1859
+ const n = `Bearer ${e}`, o = await mn({
1860
+ headers: {
1861
+ authorization: n
1862
+ },
1863
+ query: t.schema,
1864
+ data: a
1865
+ });
1866
+ if (o.status !== 200)
1867
+ return { status: o.status, data: [] };
1868
+ const { data: s, errors: i } = await o.json();
1869
+ return {
1870
+ status: o.status,
1871
+ data: s[t.method],
1872
+ errors: i
1873
+ };
1874
+ } catch (n) {
1875
+ return console.error(n), { status: 500, data: [] };
1876
+ }
1877
+ }, hn = async ({
1878
+ accessToken: e,
1879
+ name: t,
1880
+ data: r,
1881
+ method: a = "POST"
1882
+ }) => {
1883
+ const n = `Bearer ${e}`;
1884
+ return await fetch(`${br}/api/${t}`, {
1885
+ method: a,
1886
+ credentials: "include",
1887
+ headers: {
1888
+ "Content-Type": "application/json",
1889
+ authorization: n
1890
+ },
1891
+ body: JSON.stringify(r)
1892
+ });
1893
+ }, fn = ({
1894
+ mode: e = "light",
1895
+ focusMode: t = "light",
1896
+ radius: r = "small"
1897
+ }) => {
1898
+ const { state: a, dispatch: n } = P(ve), o = S(null), s = S(!1), i = (l) => {
1899
+ l.preventDefault(), n({
1900
+ type: rr
1901
+ });
1902
+ };
1903
+ return L(() => {
1904
+ var l;
1905
+ (a == null ? void 0 : a.streaming) === !0 && !s.current && o.current && (s.current = !0, o.current.focus()), (a == null ? void 0 : a.streaming) === !1 && (s.current = !1, (l = o.current) == null || l.blur());
1906
+ }, [a]), /* @__PURE__ */ d(
1907
+ ir,
1908
+ {
1909
+ noBorder: !0,
1910
+ radius: r,
1911
+ mode: e,
1912
+ focusMode: t,
1913
+ ref: o,
1914
+ onClick: i,
1915
+ children: a != null && a.streaming ? /* @__PURE__ */ d(ra, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ d(ta, { size: "size-4", monotone: !0 })
1916
+ }
1917
+ );
1918
+ }, $e = (e, t) => {
1919
+ e({
1920
+ type: nr,
1921
+ payload: {
1922
+ streaming: t
1923
+ }
1924
+ });
1925
+ }, Wt = (e) => {
1926
+ $e(e, !1), e({
1927
+ type: xe,
1928
+ payload: {
1929
+ message: {
1930
+ role: vt,
1931
+ content: Hr
1932
+ }
1933
+ }
1934
+ });
1935
+ }, pn = () => {
1936
+ const { state: e, dispatch: t } = P(ve), { state: r, dispatch: a } = P(wt), [n, o] = G(""), { getAccessToken: s, user: i } = Me(), l = S(null), h = S(
1937
+ null
1938
+ );
1939
+ L(() => {
1940
+ (async () => {
1941
+ var u;
1942
+ if (!e || e.messages.length === 0) {
1943
+ (u = h == null ? void 0 : h.current) == null || u.cancel();
1944
+ return;
1945
+ }
1946
+ const g = e.messages[e.messages.length - 1];
1947
+ if (!(e.messages.length === 0 || g.message.role === we || g.message.role === Vr || g.message.role === vt || g.message.role === zr))
1948
+ try {
1949
+ const m = await hn({
1950
+ accessToken: await s(),
1951
+ name: "generate",
1952
+ data: {
1953
+ messages: e.messages,
1954
+ model: e.engine || Se,
1955
+ user: (i == null ? void 0 : i.username) || "",
1956
+ id: e.id,
1957
+ usage: e.usage
1958
+ }
1959
+ });
1960
+ if (m && m.ok) {
1961
+ const y = xt();
1962
+ h.current = m.body.getReader();
1963
+ const b = new TextDecoder();
1964
+ for (; ; ) {
1965
+ $e(t, !0);
1966
+ const { done: k, value: p } = await h.current.read();
1967
+ if (k) {
1968
+ $e(t, !1);
1969
+ break;
1970
+ }
1971
+ const N = b.decode(p, { stream: !0 }), A = N.indexOf(Bt);
1972
+ if (A !== -1) {
1973
+ const R = N.substring(0, A), E = JSON.parse(
1974
+ N.substring(A + Bt.length)
1975
+ );
1976
+ t({
1977
+ type: ar,
1978
+ payload: {
1979
+ model: E.model,
1980
+ usage: E.usage
1981
+ }
1982
+ }), t({
1983
+ type: xe,
1984
+ payload: {
1985
+ message: {
1986
+ content: R,
1987
+ role: we,
1988
+ messageId: y,
1989
+ processingTime: E.processingTime,
1990
+ name: E.name
1991
+ }
1992
+ }
1993
+ }), $e(t, !1);
1994
+ break;
1995
+ } else
1996
+ t({
1997
+ type: xe,
1998
+ payload: {
1999
+ message: {
2000
+ content: N,
2001
+ role: we,
2002
+ messageId: y
2003
+ }
2004
+ }
2005
+ });
2006
+ }
2007
+ } else
2008
+ Wt(t);
2009
+ } catch (m) {
2010
+ console.error(m), Wt(t);
2011
+ }
2012
+ })();
2013
+ }, [e == null ? void 0 : e.messages]);
2014
+ const f = async (g) => {
2015
+ g.preventDefault(), t({
2016
+ type: xe,
2017
+ payload: {
2018
+ message: {
2019
+ role: nt,
2020
+ content: n
2021
+ }
2022
+ }
2023
+ }), o("");
2024
+ };
2025
+ return L(() => {
2026
+ if (r.prompt !== "") {
2027
+ const g = r.prompt.endsWith(":") && !r.prompt.endsWith(": ") ? r.prompt + " " : r.prompt;
2028
+ g.indexOf($t) !== -1 ? navigator.clipboard.readText().then((m) => {
2029
+ o(g.replace($t, m));
2030
+ }) : o(g), l.current && l.current.focus(), a({
2031
+ type: or
2032
+ });
2033
+ }
2034
+ }, [r, a]), L(() => {
2035
+ e && e.usage === 0 && e.messages.length === 0 && l.current && l.current.focus();
2036
+ }, [e]), /* @__PURE__ */ d(yt, { children: /* @__PURE__ */ d("form", { className: "mt-2", onSubmit: f, children: /* @__PURE__ */ d(
2037
+ yr,
2038
+ {
2039
+ mode: "dark",
2040
+ focusMode: "light",
2041
+ ref: l,
2042
+ name: "chat-input",
2043
+ label: Ur,
2044
+ helperText: "Press ENTER to add a new line",
2045
+ helperTextOnFocus: !0,
2046
+ required: !0,
2047
+ value: n,
2048
+ onChange: (g) => o(g.target.value),
2049
+ onKeyDown: la([["mod+Enter", f]]),
2050
+ leftElement: /* @__PURE__ */ d(fn, {}),
2051
+ rightElement: /* @__PURE__ */ d(
2052
+ cr,
2053
+ {
2054
+ disabled: e == null ? void 0 : e.streaming,
2055
+ noBorder: !0,
2056
+ type: "submit",
2057
+ mode: "light",
2058
+ focusMode: "light",
2059
+ children: Pr
2060
+ }
2061
+ )
2062
+ }
2063
+ ) }) });
2064
+ };
2065
+ var Ae = { exports: {} }, Ye = {};
2066
+ /**
2067
+ * @license React
2068
+ * use-sync-external-store-shim.production.js
2069
+ *
2070
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2071
+ *
2072
+ * This source code is licensed under the MIT license found in the
2073
+ * LICENSE file in the root directory of this source tree.
2074
+ */
2075
+ var jt;
2076
+ function yn() {
2077
+ if (jt) return Ye;
2078
+ jt = 1;
2079
+ var e = $;
2080
+ function t(g, u) {
2081
+ return g === u && (g !== 0 || 1 / g === 1 / u) || g !== g && u !== u;
2082
+ }
2083
+ var r = typeof Object.is == "function" ? Object.is : t, a = e.useState, n = e.useEffect, o = e.useLayoutEffect, s = e.useDebugValue;
2084
+ function i(g, u) {
2085
+ var m = u(), y = a({ inst: { value: m, getSnapshot: u } }), b = y[0].inst, k = y[1];
2086
+ return o(
2087
+ function() {
2088
+ b.value = m, b.getSnapshot = u, l(b) && k({ inst: b });
2089
+ },
2090
+ [g, m, u]
2091
+ ), n(
2092
+ function() {
2093
+ return l(b) && k({ inst: b }), g(function() {
2094
+ l(b) && k({ inst: b });
2095
+ });
2096
+ },
2097
+ [g]
2098
+ ), s(m), m;
2099
+ }
2100
+ function l(g) {
2101
+ var u = g.getSnapshot;
2102
+ g = g.value;
2103
+ try {
2104
+ var m = u();
2105
+ return !r(g, m);
2106
+ } catch {
2107
+ return !0;
2108
+ }
2109
+ }
2110
+ function h(g, u) {
2111
+ return u();
2112
+ }
2113
+ var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : i;
2114
+ return Ye.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, Ye;
2115
+ }
2116
+ var Xe = {};
2117
+ /**
2118
+ * @license React
2119
+ * use-sync-external-store-shim.development.js
2120
+ *
2121
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2122
+ *
2123
+ * This source code is licensed under the MIT license found in the
2124
+ * LICENSE file in the root directory of this source tree.
2125
+ */
2126
+ var qt;
2127
+ function bn() {
2128
+ return qt || (qt = 1, process.env.NODE_ENV !== "production" && function() {
2129
+ function e(m, y) {
2130
+ return m === y && (m !== 0 || 1 / m === 1 / y) || m !== m && y !== y;
2131
+ }
2132
+ function t(m, y) {
2133
+ f || n.startTransition === void 0 || (f = !0, console.error(
2134
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
2135
+ ));
2136
+ var b = y();
2137
+ if (!g) {
2138
+ var k = y();
2139
+ o(b, k) || (console.error(
2140
+ "The result of getSnapshot should be cached to avoid an infinite loop"
2141
+ ), g = !0);
2142
+ }
2143
+ k = s({
2144
+ inst: { value: b, getSnapshot: y }
2145
+ });
2146
+ var p = k[0].inst, N = k[1];
2147
+ return l(
2148
+ function() {
2149
+ p.value = b, p.getSnapshot = y, r(p) && N({ inst: p });
2150
+ },
2151
+ [m, b, y]
2152
+ ), i(
2153
+ function() {
2154
+ return r(p) && N({ inst: p }), m(function() {
2155
+ r(p) && N({ inst: p });
2156
+ });
2157
+ },
2158
+ [m]
2159
+ ), h(b), b;
2160
+ }
2161
+ function r(m) {
2162
+ var y = m.getSnapshot;
2163
+ m = m.value;
2164
+ try {
2165
+ var b = y();
2166
+ return !o(m, b);
2167
+ } catch {
2168
+ return !0;
2169
+ }
2170
+ }
2171
+ function a(m, y) {
2172
+ return y();
2173
+ }
2174
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
2175
+ var n = $, o = typeof Object.is == "function" ? Object.is : e, s = n.useState, i = n.useEffect, l = n.useLayoutEffect, h = n.useDebugValue, f = !1, g = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
2176
+ Xe.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
2177
+ }()), Xe;
2178
+ }
2179
+ var Kt;
2180
+ function vn() {
2181
+ return Kt || (Kt = 1, process.env.NODE_ENV === "production" ? Ae.exports = /* @__PURE__ */ yn() : Ae.exports = /* @__PURE__ */ bn()), Ae.exports;
2182
+ }
2183
+ var kn = /* @__PURE__ */ vn(), Jt = Object.prototype.hasOwnProperty;
2184
+ function it(e, t) {
2185
+ var r, a;
2186
+ if (e === t) return !0;
2187
+ if (e && t && (r = e.constructor) === t.constructor) {
2188
+ if (r === Date) return e.getTime() === t.getTime();
2189
+ if (r === RegExp) return e.toString() === t.toString();
2190
+ if (r === Array) {
2191
+ if ((a = e.length) === t.length)
2192
+ for (; a-- && it(e[a], t[a]); ) ;
2193
+ return a === -1;
2194
+ }
2195
+ if (!r || typeof e == "object") {
2196
+ a = 0;
2197
+ for (r in e)
2198
+ if (Jt.call(e, r) && ++a && !Jt.call(t, r) || !(r in t) || !it(e[r], t[r])) return !1;
2199
+ return Object.keys(t).length === a;
2200
+ }
2201
+ }
2202
+ return e !== e && t !== t;
2203
+ }
2204
+ const X = /* @__PURE__ */ new WeakMap(), de = () => {
2205
+ }, z = (
2206
+ /*#__NOINLINE__*/
2207
+ de()
2208
+ ), ct = Object, _ = (e) => e === z, Q = (e) => typeof e == "function", ue = (e, t) => ({
2209
+ ...e,
2210
+ ...t
2211
+ }), vr = (e) => Q(e.then), Qe = {}, Oe = {}, St = "undefined", Ue = typeof window != St, lt = typeof document != St, _n = () => Ue && typeof window.requestAnimationFrame != St, kr = (e, t) => {
2212
+ const r = X.get(e);
2213
+ return [
2214
+ // Getter
2215
+ () => !_(t) && e.get(t) || Qe,
2216
+ // Setter
2217
+ (a) => {
2218
+ if (!_(t)) {
2219
+ const n = e.get(t);
2220
+ t in Oe || (Oe[t] = n), r[5](t, ue(n, a), n || Qe);
2221
+ }
2222
+ },
2223
+ // Subscriber
2224
+ r[6],
2225
+ // Get server cache snapshot
2226
+ () => !_(t) && t in Oe ? Oe[t] : !_(t) && e.get(t) || Qe
2227
+ ];
2228
+ };
2229
+ let dt = !0;
2230
+ const En = () => dt, [ut, mt] = Ue && window.addEventListener ? [
2231
+ window.addEventListener.bind(window),
2232
+ window.removeEventListener.bind(window)
2233
+ ] : [
2234
+ de,
2235
+ de
2236
+ ], xn = () => {
2237
+ const e = lt && document.visibilityState;
2238
+ return _(e) || e !== "hidden";
2239
+ }, wn = (e) => (lt && document.addEventListener("visibilitychange", e), ut("focus", e), () => {
2240
+ lt && document.removeEventListener("visibilitychange", e), mt("focus", e);
2241
+ }), Sn = (e) => {
2242
+ const t = () => {
2243
+ dt = !0, e();
2244
+ }, r = () => {
2245
+ dt = !1;
2246
+ };
2247
+ return ut("online", t), ut("offline", r), () => {
2248
+ mt("online", t), mt("offline", r);
2249
+ };
2250
+ }, Tn = {
2251
+ isOnline: En,
2252
+ isVisible: xn
2253
+ }, Nn = {
2254
+ initFocus: wn,
2255
+ initReconnect: Sn
2256
+ }, Yt = !$.useId, Te = !Ue || "Deno" in globalThis, Rn = (e) => _n() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Ze = Te ? L : fe, et = typeof navigator < "u" && navigator.connection, Xt = !Te && et && ([
2257
+ "slow-2g",
2258
+ "2g"
2259
+ ].includes(et.effectiveType) || et.saveData), Le = /* @__PURE__ */ new WeakMap(), tt = (e, t) => ct.prototype.toString.call(e) === `[object ${t}]`;
2260
+ let Cn = 0;
2261
+ const gt = (e) => {
2262
+ const t = typeof e, r = tt(e, "Date"), a = tt(e, "RegExp"), n = tt(e, "Object");
2263
+ let o, s;
2264
+ if (ct(e) === e && !r && !a) {
2265
+ if (o = Le.get(e), o) return o;
2266
+ if (o = ++Cn + "~", Le.set(e, o), Array.isArray(e)) {
2267
+ for (o = "@", s = 0; s < e.length; s++)
2268
+ o += gt(e[s]) + ",";
2269
+ Le.set(e, o);
2270
+ }
2271
+ if (n) {
2272
+ o = "#";
2273
+ const i = ct.keys(e).sort();
2274
+ for (; !_(s = i.pop()); )
2275
+ _(e[s]) || (o += s + ":" + gt(e[s]) + ",");
2276
+ Le.set(e, o);
2277
+ }
2278
+ } else
2279
+ o = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
2280
+ return o;
2281
+ }, Pe = (e) => {
2282
+ if (Q(e))
2283
+ try {
2284
+ e = e();
2285
+ } catch {
2286
+ e = "";
2287
+ }
2288
+ const t = e;
2289
+ return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? gt(e) : "", [
2290
+ e,
2291
+ t
2292
+ ];
2293
+ };
2294
+ let In = 0;
2295
+ const ht = () => ++In, _r = 0, Er = 1, xr = 2, An = 3;
2296
+ var _e = {
2297
+ __proto__: null,
2298
+ ERROR_REVALIDATE_EVENT: An,
2299
+ FOCUS_EVENT: _r,
2300
+ MUTATE_EVENT: xr,
2301
+ RECONNECT_EVENT: Er
2302
+ };
2303
+ async function wr(...e) {
2304
+ const [t, r, a, n] = e, o = ue({
2305
+ populateCache: !0,
2306
+ throwOnError: !0
2307
+ }, typeof n == "boolean" ? {
2308
+ revalidate: n
2309
+ } : n || {});
2310
+ let s = o.populateCache;
2311
+ const i = o.rollbackOnError;
2312
+ let l = o.optimisticData;
2313
+ const h = (u) => typeof i == "function" ? i(u) : i !== !1, f = o.throwOnError;
2314
+ if (Q(r)) {
2315
+ const u = r, m = [], y = t.keys();
2316
+ for (const b of y)
2317
+ // Skip the special useSWRInfinite and useSWRSubscription keys.
2318
+ !/^\$(inf|sub)\$/.test(b) && u(t.get(b)._k) && m.push(b);
2319
+ return Promise.all(m.map(g));
2320
+ }
2321
+ return g(r);
2322
+ async function g(u) {
2323
+ const [m] = Pe(u);
2324
+ if (!m) return;
2325
+ const [y, b] = kr(t, m), [k, p, N, A] = X.get(t), R = () => {
2326
+ const B = k[m];
2327
+ return (Q(o.revalidate) ? o.revalidate(y().data, u) : o.revalidate !== !1) && (delete N[m], delete A[m], B && B[0]) ? B[0](xr).then(() => y().data) : y().data;
2328
+ };
2329
+ if (e.length < 3)
2330
+ return R();
2331
+ let E = a, C;
2332
+ const ee = ht();
2333
+ p[m] = [
2334
+ ee,
2335
+ 0
2336
+ ];
2337
+ const x = !_(l), oe = y(), H = oe.data, W = oe._c, te = _(W) ? H : W;
2338
+ if (x && (l = Q(l) ? l(te, H) : l, b({
2339
+ data: l,
2340
+ _c: te
2341
+ })), Q(E))
2342
+ try {
2343
+ E = E(te);
2344
+ } catch (B) {
2345
+ C = B;
2346
+ }
2347
+ if (E && vr(E))
2348
+ if (E = await E.catch((B) => {
2349
+ C = B;
2350
+ }), ee !== p[m][0]) {
2351
+ if (C) throw C;
2352
+ return E;
2353
+ } else C && x && h(C) && (s = !0, b({
2354
+ data: te,
2355
+ _c: z
2356
+ }));
2357
+ if (s && !C)
2358
+ if (Q(s)) {
2359
+ const B = s(E, te);
2360
+ b({
2361
+ data: B,
2362
+ error: z,
2363
+ _c: z
2364
+ });
2365
+ } else
2366
+ b({
2367
+ data: E,
2368
+ error: z,
2369
+ _c: z
2370
+ });
2371
+ if (p[m][1] = ht(), Promise.resolve(R()).then(() => {
2372
+ b({
2373
+ _c: z
2374
+ });
2375
+ }), C) {
2376
+ if (f) throw C;
2377
+ return;
2378
+ }
2379
+ return E;
2380
+ }
2381
+ }
2382
+ const Qt = (e, t) => {
2383
+ for (const r in e)
2384
+ e[r][0] && e[r][0](t);
2385
+ }, On = (e, t) => {
2386
+ if (!X.has(e)) {
2387
+ const r = ue(Nn, t), a = {}, n = wr.bind(z, e);
2388
+ let o = de;
2389
+ const s = {}, i = (f, g) => {
2390
+ const u = s[f] || [];
2391
+ return s[f] = u, u.push(g), () => u.splice(u.indexOf(g), 1);
2392
+ }, l = (f, g, u) => {
2393
+ e.set(f, g);
2394
+ const m = s[f];
2395
+ if (m)
2396
+ for (const y of m)
2397
+ y(g, u);
2398
+ }, h = () => {
2399
+ if (!X.has(e) && (X.set(e, [
2400
+ a,
2401
+ {},
2402
+ {},
2403
+ {},
2404
+ n,
2405
+ l,
2406
+ i
2407
+ ]), !Te)) {
2408
+ const f = r.initFocus(setTimeout.bind(z, Qt.bind(z, a, _r))), g = r.initReconnect(setTimeout.bind(z, Qt.bind(z, a, Er)));
2409
+ o = () => {
2410
+ f && f(), g && g(), X.delete(e);
2411
+ };
2412
+ }
2413
+ };
2414
+ return h(), [
2415
+ e,
2416
+ n,
2417
+ h,
2418
+ o
2419
+ ];
2420
+ }
2421
+ return [
2422
+ e,
2423
+ X.get(e)[4]
2424
+ ];
2425
+ }, Ln = (e, t, r, a, n) => {
2426
+ const o = r.errorRetryCount, s = n.retryCount, i = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * r.errorRetryInterval;
2427
+ !_(o) && s > o || setTimeout(a, i, n);
2428
+ }, Bn = it, [Tt, $n] = On(/* @__PURE__ */ new Map()), Mn = ue(
2429
+ {
2430
+ // events
2431
+ onLoadingSlow: de,
2432
+ onSuccess: de,
2433
+ onError: de,
2434
+ onErrorRetry: Ln,
2435
+ onDiscarded: de,
2436
+ // switches
2437
+ revalidateOnFocus: !0,
2438
+ revalidateOnReconnect: !0,
2439
+ revalidateIfStale: !0,
2440
+ shouldRetryOnError: !0,
2441
+ // timeouts
2442
+ errorRetryInterval: Xt ? 1e4 : 5e3,
2443
+ focusThrottleInterval: 5 * 1e3,
2444
+ dedupingInterval: 2 * 1e3,
2445
+ loadingTimeout: Xt ? 5e3 : 3e3,
2446
+ // providers
2447
+ compare: Bn,
2448
+ isPaused: () => !1,
2449
+ cache: Tt,
2450
+ mutate: $n,
2451
+ fallback: {}
2452
+ },
2453
+ // use web preset by default
2454
+ Tn
2455
+ ), Dn = (e, t) => {
2456
+ const r = ue(e, t);
2457
+ if (t) {
2458
+ const { use: a, fallback: n } = e, { use: o, fallback: s } = t;
2459
+ a && o && (r.use = a.concat(o)), n && s && (r.fallback = ue(n, s));
2460
+ }
2461
+ return r;
2462
+ }, Vn = Zr({}), zn = "$inf$", Sr = Ue && window.__SWR_DEVTOOLS_USE__, Un = Sr ? window.__SWR_DEVTOOLS_USE__ : [], Pn = () => {
2463
+ Sr && (window.__SWR_DEVTOOLS_REACT__ = $);
2464
+ }, Hn = (e) => Q(e[1]) ? [
2465
+ e[0],
2466
+ e[1],
2467
+ e[2] || {}
2468
+ ] : [
2469
+ e[0],
2470
+ null,
2471
+ (e[1] === null ? e[2] : e[1]) || {}
2472
+ ], Fn = () => ue(Mn, P(Vn)), Gn = (e, t) => {
2473
+ const [r, a] = Pe(e), [, , , n] = X.get(Tt);
2474
+ if (n[r]) return n[r];
2475
+ const o = t(a);
2476
+ return n[r] = o, o;
2477
+ }, Wn = (e) => (t, r, a) => e(t, r && ((...o) => {
2478
+ const [s] = Pe(t), [, , , i] = X.get(Tt);
2479
+ if (s.startsWith(zn))
2480
+ return r(...o);
2481
+ const l = i[s];
2482
+ return _(l) ? r(...o) : (delete i[s], l);
2483
+ }), a), jn = Un.concat(Wn), qn = (e) => function(...r) {
2484
+ const a = Fn(), [n, o, s] = Hn(r), i = Dn(a, s);
2485
+ let l = e;
2486
+ const { use: h } = i, f = (h || []).concat(jn);
2487
+ for (let g = f.length; g--; )
2488
+ l = f[g](l);
2489
+ return l(n, o || i.fetcher || null, i);
2490
+ }, Kn = (e, t, r) => {
2491
+ const a = t[e] || (t[e] = []);
2492
+ return a.push(r), () => {
2493
+ const n = a.indexOf(r);
2494
+ n >= 0 && (a[n] = a[a.length - 1], a.pop());
2495
+ };
2496
+ };
2497
+ Pn();
2498
+ const rt = $.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
2499
+ // and emitting an error.
2500
+ // We assume that this is only for the `use(thenable)` case, not `use(context)`.
2501
+ // https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
2502
+ ((e) => {
2503
+ switch (e.status) {
2504
+ case "pending":
2505
+ throw e;
2506
+ case "fulfilled":
2507
+ return e.value;
2508
+ case "rejected":
2509
+ throw e.reason;
2510
+ default:
2511
+ throw e.status = "pending", e.then((t) => {
2512
+ e.status = "fulfilled", e.value = t;
2513
+ }, (t) => {
2514
+ e.status = "rejected", e.reason = t;
2515
+ }), e;
2516
+ }
2517
+ }), at = {
2518
+ dedupe: !0
2519
+ }, Jn = (e, t, r) => {
2520
+ const { cache: a, compare: n, suspense: o, fallbackData: s, revalidateOnMount: i, revalidateIfStale: l, refreshInterval: h, refreshWhenHidden: f, refreshWhenOffline: g, keepPreviousData: u } = r, [m, y, b, k] = X.get(a), [p, N] = Pe(e), A = S(!1), R = S(!1), E = S(p), C = S(t), ee = S(r), x = () => ee.current, oe = () => x().isVisible() && x().isOnline(), [H, W, te, B] = kr(a, p), j = S({}).current, me = _(s) ? _(r.fallback) ? z : r.fallback[p] : s, q = (w, v) => {
2521
+ for (const O in j) {
2522
+ const T = O;
2523
+ if (T === "data") {
2524
+ if (!n(w[T], v[T]) && (!_(w[T]) || !n(ge, v[T])))
2525
+ return !1;
2526
+ } else if (v[T] !== w[T])
2527
+ return !1;
2528
+ }
2529
+ return !0;
2530
+ }, ke = De(() => {
2531
+ const w = !p || !t ? !1 : _(i) ? x().isPaused() || o ? !1 : l !== !1 : i, v = (V) => {
2532
+ const ae = ue(V);
2533
+ return delete ae._k, w ? {
2534
+ isValidating: !0,
2535
+ isLoading: !0,
2536
+ ...ae
2537
+ } : ae;
2538
+ }, O = H(), T = B(), U = v(O), ce = O === T ? U : v(T);
2539
+ let M = U;
2540
+ return [
2541
+ () => {
2542
+ const V = v(H());
2543
+ return q(V, M) ? (M.data = V.data, M.isLoading = V.isLoading, M.isValidating = V.isValidating, M.error = V.error, M) : (M = V, V);
2544
+ },
2545
+ () => ce
2546
+ ];
2547
+ }, [
2548
+ a,
2549
+ p
2550
+ ]), K = kn.useSyncExternalStore(Z(
2551
+ (w) => te(p, (v, O) => {
2552
+ q(O, v) || w();
2553
+ }),
2554
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2555
+ [
2556
+ a,
2557
+ p
2558
+ ]
2559
+ ), ke[0], ke[1]), se = !A.current, Ne = m[p] && m[p].length > 0, ie = K.data, re = _(ie) ? me && vr(me) ? rt(me) : me : ie, pe = K.error, Re = S(re), ge = u ? _(ie) ? Re.current : ie : re, Ce = Ne && !_(pe) ? !1 : se && !_(i) ? i : x().isPaused() ? !1 : o ? _(re) ? !1 : l : _(re) || l, J = !!(p && t && se && Ce), Y = _(K.isValidating) ? J : K.isValidating, We = _(K.isLoading) ? J : K.isLoading, he = Z(
2560
+ async (w) => {
2561
+ const v = C.current;
2562
+ if (!p || !v || R.current || x().isPaused())
2563
+ return !1;
2564
+ let O, T, U = !0;
2565
+ const ce = w || {}, M = !b[p] || !ce.dedupe, V = () => Yt ? !R.current && p === E.current && A.current : p === E.current, ae = {
2566
+ isValidating: !1,
2567
+ isLoading: !1
2568
+ }, At = () => {
2569
+ W(ae);
2570
+ }, Ot = () => {
2571
+ const F = b[p];
2572
+ F && F[1] === T && delete b[p];
2573
+ }, Lt = {
2574
+ isValidating: !0
2575
+ };
2576
+ _(H().data) && (Lt.isLoading = !0);
2577
+ try {
2578
+ if (M && (W(Lt), r.loadingTimeout && _(H().data) && setTimeout(() => {
2579
+ U && V() && x().onLoadingSlow(p, r);
2580
+ }, r.loadingTimeout), b[p] = [
2581
+ v(N),
2582
+ ht()
2583
+ ]), [O, T] = b[p], O = await O, M && setTimeout(Ot, r.dedupingInterval), !b[p] || b[p][1] !== T)
2584
+ return M && V() && x().onDiscarded(p), !1;
2585
+ ae.error = z;
2586
+ const F = y[p];
2587
+ if (!_(F) && // case 1
2588
+ (T <= F[0] || // case 2
2589
+ T <= F[1] || // case 3
2590
+ F[1] === 0))
2591
+ return At(), M && V() && x().onDiscarded(p), !1;
2592
+ const ne = H().data;
2593
+ ae.data = n(ne, O) ? ne : O, M && V() && x().onSuccess(O, p, r);
2594
+ } catch (F) {
2595
+ Ot();
2596
+ const ne = x(), { shouldRetryOnError: je } = ne;
2597
+ ne.isPaused() || (ae.error = F, M && V() && (ne.onError(F, p, ne), (je === !0 || Q(je) && je(F)) && (!x().revalidateOnFocus || !x().revalidateOnReconnect || oe()) && ne.onErrorRetry(F, p, ne, (Br) => {
2598
+ const qe = m[p];
2599
+ qe && qe[0] && qe[0](_e.ERROR_REVALIDATE_EVENT, Br);
2600
+ }, {
2601
+ retryCount: (ce.retryCount || 0) + 1,
2602
+ dedupe: !0
2603
+ })));
2604
+ }
2605
+ return U = !1, At(), !0;
2606
+ },
2607
+ // `setState` is immutable, and `eventsCallback`, `fnArg`, and
2608
+ // `keyValidating` are depending on `key`, so we can exclude them from
2609
+ // the deps array.
2610
+ //
2611
+ // FIXME:
2612
+ // `fn` and `config` might be changed during the lifecycle,
2613
+ // but they might be changed every render like this.
2614
+ // `useSWR('key', () => fetch('/api/'), { suspense: true })`
2615
+ // So we omit the values from the deps array
2616
+ // even though it might cause unexpected behaviors.
2617
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2618
+ [
2619
+ p,
2620
+ a
2621
+ ]
2622
+ ), Ie = Z(
2623
+ // Use callback to make sure `keyRef.current` returns latest result every time
2624
+ (...w) => wr(a, E.current, ...w),
2625
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2626
+ []
2627
+ );
2628
+ if (Ze(() => {
2629
+ C.current = t, ee.current = r, _(ie) || (Re.current = ie);
2630
+ }), Ze(() => {
2631
+ if (!p) return;
2632
+ const w = he.bind(z, at);
2633
+ let v = 0;
2634
+ const T = Kn(p, m, (U, ce = {}) => {
2635
+ if (U == _e.FOCUS_EVENT) {
2636
+ const M = Date.now();
2637
+ x().revalidateOnFocus && M > v && oe() && (v = M + x().focusThrottleInterval, w());
2638
+ } else if (U == _e.RECONNECT_EVENT)
2639
+ x().revalidateOnReconnect && oe() && w();
2640
+ else {
2641
+ if (U == _e.MUTATE_EVENT)
2642
+ return he();
2643
+ if (U == _e.ERROR_REVALIDATE_EVENT)
2644
+ return he(ce);
2645
+ }
2646
+ });
2647
+ return R.current = !1, E.current = p, A.current = !0, W({
2648
+ _k: N
2649
+ }), Ce && (_(re) || Te ? w() : Rn(w)), () => {
2650
+ R.current = !0, T();
2651
+ };
2652
+ }, [
2653
+ p
2654
+ ]), Ze(() => {
2655
+ let w;
2656
+ function v() {
2657
+ const T = Q(h) ? h(H().data) : h;
2658
+ T && w !== -1 && (w = setTimeout(O, T));
2659
+ }
2660
+ function O() {
2661
+ !H().error && (f || x().isVisible()) && (g || x().isOnline()) ? he(at).then(v) : v();
2662
+ }
2663
+ return v(), () => {
2664
+ w && (clearTimeout(w), w = -1);
2665
+ };
2666
+ }, [
2667
+ h,
2668
+ f,
2669
+ g,
2670
+ p
2671
+ ]), ea(ge), o && _(re) && p) {
2672
+ if (!Yt && Te)
2673
+ throw new Error("Fallback data is required when using Suspense in SSR.");
2674
+ C.current = t, ee.current = r, R.current = !1;
2675
+ const w = k[p];
2676
+ if (!_(w)) {
2677
+ const v = Ie(w);
2678
+ rt(v);
2679
+ }
2680
+ if (_(pe)) {
2681
+ const v = he(at);
2682
+ _(ge) || (v.status = "fulfilled", v.value = !0), rt(v);
2683
+ } else
2684
+ throw pe;
2685
+ }
2686
+ return {
2687
+ mutate: Ie,
2688
+ get data() {
2689
+ return j.data = !0, ge;
2690
+ },
2691
+ get error() {
2692
+ return j.error = !0, pe;
2693
+ },
2694
+ get isValidating() {
2695
+ return j.isValidating = !0, Y;
2696
+ },
2697
+ get isLoading() {
2698
+ return j.isLoading = !0, We;
2699
+ }
2700
+ };
2701
+ }, Yn = qn(Jn), He = ({
2702
+ fetcher: e,
2703
+ scope: t,
2704
+ keys: r,
2705
+ swrOptions: a,
2706
+ getAccessToken: n
2707
+ }) => {
2708
+ const { data: o, error: s, isLoading: i, mutate: l } = Yn(
2709
+ [t, ...r],
2710
+ (h) => e(h, n),
2711
+ { ...a }
2712
+ );
2713
+ return { data: o, error: s, isLoading: i, mutate: l };
2714
+ }, Fe = async ({
2715
+ getAccessToken: e,
2716
+ type: t,
2717
+ params: r
2718
+ }) => {
2719
+ const a = await e(), n = await gn({
2720
+ accessToken: a,
2721
+ type: t,
2722
+ params: r
2723
+ });
2724
+ if (n.status === 200 && n.errors === void 0)
2725
+ return n.data;
2726
+ throw new Error("An error occurred while fetching the data.");
2727
+ }, Xn = async ([e, t], r) => Fe({
2728
+ getAccessToken: r,
2729
+ type: ze.GET_USER_PREFERENCES,
2730
+ params: {
2731
+ user: t
2732
+ }
2733
+ }), Qn = ({
2734
+ keys: e,
2735
+ getAccessToken: t
2736
+ }) => He({
2737
+ fetcher: Xn,
2738
+ scope: "/preferences",
2739
+ keys: e,
2740
+ swrOptions: { keepPreviousData: !0 },
2741
+ getAccessToken: t
2742
+ }), Zn = async ([e, t], r) => Fe({
2743
+ getAccessToken: r,
2744
+ type: ze.GET_CHATS_STATS,
2745
+ params: {
2746
+ user: t
2747
+ }
2748
+ }), Xo = ({
2749
+ keys: e,
2750
+ getAccessToken: t
2751
+ }) => He({
2752
+ fetcher: Zn,
2753
+ scope: "/stats",
2754
+ keys: e,
2755
+ getAccessToken: t
2756
+ }), Tr = async ([e, t, r, a], n) => Fe({
2757
+ getAccessToken: n,
2758
+ type: ze.GET_CHATS,
2759
+ params: {
2760
+ user: t,
2761
+ searchString: r,
2762
+ direction: a,
2763
+ limit: 1,
2764
+ truncateSize: 100
2765
+ }
2766
+ }), Qo = ({
2767
+ keys: e,
2768
+ getAccessToken: t
2769
+ }) => He({
2770
+ fetcher: Tr,
2771
+ scope: "/history",
2772
+ keys: e,
2773
+ getAccessToken: t,
2774
+ swrOptions: {
2775
+ keepPreviousData: !0,
2776
+ dedupingInterval: 1e4
2777
+ }
2778
+ }), Zo = ({
2779
+ keys: e,
2780
+ getAccessToken: t
2781
+ }) => {
2782
+ Gn(["/history", ...e], (r) => Tr(r, t));
2783
+ }, eo = async ([e], t) => Fe({
2784
+ getAccessToken: t,
2785
+ type: ze.GET_SERVER_CAPABILITIES
2786
+ }), es = ({
2787
+ keys: e,
2788
+ getAccessToken: t
2789
+ }) => He({
2790
+ fetcher: eo,
2791
+ scope: "/capabilities",
2792
+ keys: e,
2793
+ getAccessToken: t
2794
+ }), to = () => {
2795
+ const { dispatch: e } = P(wt), { getAccessToken: t, user: r } = Me(), {
2796
+ data: a,
2797
+ error: n,
2798
+ isLoading: o
2799
+ } = Qn({
2800
+ keys: [r == null ? void 0 : r.username],
2801
+ getAccessToken: t
2802
+ }), s = "mt-2 flex justify-center rounded-md", i = (l, h) => {
2803
+ l.preventDefault(), e({
2804
+ type: sr,
2805
+ payload: {
2806
+ prompt: h
2807
+ }
2808
+ });
2809
+ };
2810
+ return n || o ? null : /* @__PURE__ */ d(Fr, { alignHorizontal: "center", columnGap: 2, children: a && a.tags && a.tags.map((l) => l.enabled && l.label && l.content && /* @__PURE__ */ d(Gr, { children: /* @__PURE__ */ d("div", { className: s, children: /* @__PURE__ */ d(
2811
+ cr,
2812
+ {
2813
+ noBorder: !0,
2814
+ mode: "dark",
2815
+ focusMode: "light",
2816
+ size: "small",
2817
+ onClick: (h) => i(h, l.content),
2818
+ children: l.label
2819
+ }
2820
+ ) }) }, `prompt-button-${l.slot}`)) });
2821
+ }, ro = () => {
2822
+ const { state: e } = P(ve), t = S(!1), r = window.innerWidth < 403, [a, n] = G(
2823
+ r ? "bottom-10" : "top-[245px]"
2824
+ );
2825
+ return L(() => {
2826
+ r || e && (!t.current && e.streaming && n("bottom-10"), t.current = !!e.streaming);
2827
+ }, [e, r]), L(() => {
2828
+ r || (e && e.messages.length === 0 && n("top-[245px]"), e && !e.streaming && e.messages.length > 0 && n("bottom-10"));
2829
+ }, [e, r]), /* @__PURE__ */ I(
2830
+ "footer",
2831
+ {
2832
+ className: c(
2833
+ "md:mx-auto md:max-w-4xl w-11/12 fixed left-1/2 transform -translate-x-1/2 z-1000",
2834
+ a
2835
+ ),
2836
+ children: [
2837
+ /* @__PURE__ */ d(to, {}),
2838
+ /* @__PURE__ */ d(pn, {})
2839
+ ]
2840
+ }
2841
+ );
2842
+ };
2843
+ /*!
2844
+ @versini/ui-bubble v3.0.4
2845
+ © 2025 gizmette.com
2846
+ */
2847
+ try {
2848
+ window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
2849
+ version: "3.0.4",
2850
+ buildTime: "01/04/2025 07:31 PM EST",
2851
+ homepage: "https://github.com/aversini/ui-components",
2852
+ license: "MIT"
2853
+ });
2854
+ } catch {
2855
+ }
2856
+ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link", no = ({
2857
+ type: e,
2858
+ size: t,
2859
+ labelRight: r,
2860
+ labelLeft: a,
2861
+ align: n
2862
+ }) => {
2863
+ const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
2864
+ switch (e) {
2865
+ case Nr:
2866
+ case ft:
2867
+ return c({
2868
+ [o]: t === "small",
2869
+ [s]: t === "medium",
2870
+ [i]: t === "large"
2871
+ });
2872
+ case Ge:
2873
+ return c("inline-flex items-center", {
2874
+ "justify-center": n === "center",
2875
+ "justify-start": n === "left",
2876
+ "justify-end": n === "right",
2877
+ "h-6 w-6 p-0": t === "small" && !(r || a),
2878
+ "h-6 px-2": t === "small" && (r || a),
2879
+ "h-8 w-8 p-1": t === "medium" && !(r || a),
2880
+ "h-8 px-3": t === "medium" && (r || a),
2881
+ "h-12 w-12 p-2": t === "large" && !(r || a),
2882
+ "h-12 px-4": t === "large" && (r || a)
2883
+ });
2884
+ }
2885
+ }, oo = ({
2886
+ type: e,
2887
+ size: t,
2888
+ labelRight: r,
2889
+ labelLeft: a
2890
+ }) => {
2891
+ const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
2892
+ switch (e) {
2893
+ case Nr:
2894
+ case ft:
2895
+ return c({
2896
+ "text-center": e === ft,
2897
+ [n]: t === "small",
2898
+ [o]: t === "medium",
2899
+ [s]: t === "large"
2900
+ });
2901
+ case Ge:
2902
+ return c({
2903
+ [n]: t === "small" && (r || a),
2904
+ [o]: t === "medium" && (r || a),
2905
+ [s]: t === "large" && (r || a)
2906
+ });
2907
+ }
2908
+ }, so = ({
2909
+ mode: e,
2910
+ noBackground: t,
2911
+ noTruncate: r,
2912
+ variant: a
2913
+ }) => {
2914
+ if (t)
2915
+ return "not-prose";
2916
+ if (a === "primary")
2917
+ return c("not-prose", {
2918
+ truncate: !r,
2919
+ "text-copy-light": e === "dark" || e === "system",
2920
+ "text-copy-lighter": e === "light" || e === "alt-system",
2921
+ "dark:text-copy-lighter": e === "system",
2922
+ "dark:text-copy-light": e === "alt-system"
2923
+ });
2924
+ if (a === "secondary")
2925
+ return c("not-prose", {
2926
+ truncate: !r,
2927
+ "text-copy-light": e === "light" || e === "system",
2928
+ "text-copy-lighter": e === "dark" || e === "alt-system",
2929
+ "dark:text-copy-lighter": e === "alt-system",
2930
+ "dark:text-copy-light": e === "system"
2931
+ });
2932
+ if (a === "danger")
2933
+ return c("not-prose", {
2934
+ truncate: !r,
2935
+ "text-copy-light": e === "dark" || e === "system",
2936
+ "text-copy-lighter": e === "light" || e === "alt-system",
2937
+ "dark:text-copy-lighter": e === "system",
2938
+ "dark:text-copy-light": e === "alt-system"
2939
+ });
2940
+ if (a === "selected")
2941
+ return c("not-prose text-copy-lighter", {
2942
+ truncate: !r
2943
+ });
2944
+ }, io = ({
2945
+ mode: e,
2946
+ noBackground: t,
2947
+ variant: r
2948
+ }) => {
2949
+ if (!t) {
2950
+ if (r === "primary")
2951
+ return c({
2952
+ "bg-action-dark": e === "dark",
2953
+ "bg-action-light": e === "light",
2954
+ "bg-action-dark dark:bg-action-light": e === "system",
2955
+ "bg-action-light dark:bg-action-dark": e === "alt-system"
2956
+ });
2957
+ if (r === "secondary")
2958
+ return c({
2959
+ "bg-action-dark": e === "light",
2960
+ "bg-action-light": e === "dark",
2961
+ "bg-action-dark dark:bg-action-light": e === "alt-system",
2962
+ "bg-action-light dark:bg-action-dark": e === "system"
2963
+ });
2964
+ if (r === "danger")
2965
+ return c({
2966
+ "bg-action-danger-dark": e === "dark",
2967
+ "bg-action-danger-light": e === "light",
2968
+ "bg-action-danger-dark dark:bg-action-danger-light": e === "system",
2969
+ "bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
2970
+ });
2971
+ if (r === "selected")
2972
+ return "bg-action-selected-dark";
2973
+ }
2974
+ }, co = ({
2975
+ radius: e
2976
+ }) => c({
2977
+ "rounded-full": e === "large",
2978
+ "rounded-md": e === "medium",
2979
+ "rounded-sm": e === "small"
2980
+ }), lo = ({
2981
+ mode: e,
2982
+ disabled: t,
2983
+ variant: r
2984
+ }) => {
2985
+ if (t)
2986
+ return "";
2987
+ if (r === "primary")
2988
+ return c("hover:text-copy-light-hover", {
2989
+ "hover:bg-action-dark-hover": e === "dark",
2990
+ "hover:bg-action-light-hover": e === "light",
2991
+ "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
2992
+ "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
2993
+ });
2994
+ if (r === "secondary")
2995
+ return c("hover:text-copy-light-hover", {
2996
+ "hover:bg-action-dark-hover": e === "light",
2997
+ "hover:bg-action-light-hover": e === "dark",
2998
+ "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
2999
+ "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
3000
+ });
3001
+ if (r === "danger")
3002
+ return c("hover:text-copy-light-hover", {
3003
+ "hover:bg-action-danger-dark-hover": e === "dark",
3004
+ "hover:bg-action-danger-light-hover": e === "light",
3005
+ "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
3006
+ "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
3007
+ });
3008
+ if (r === "selected")
3009
+ return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
3010
+ }, uo = ({
3011
+ mode: e,
3012
+ disabled: t,
3013
+ variant: r
3014
+ }) => {
3015
+ if (t)
3016
+ return "";
3017
+ if (r === "primary")
3018
+ return c("active:text-copy-light-active", {
3019
+ "active:bg-action-dark-active": e === "dark",
3020
+ "active:bg-action-light-active": e === "light",
3021
+ "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
3022
+ "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
3023
+ });
3024
+ if (r === "secondary")
3025
+ return c("active:text-copy-light-active", {
3026
+ "active:bg-action-dark-active": e === "light",
3027
+ "active:bg-action-light-active": e === "dark",
3028
+ "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
3029
+ "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
3030
+ });
3031
+ if (r === "danger")
3032
+ return c("active:text-copy-lighter-active", {
3033
+ "active:bg-action-danger-dark-active": e === "dark",
3034
+ "active:bg-action-danger-light-active": e === "light",
3035
+ "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
3036
+ "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
3037
+ });
3038
+ if (r === "selected")
3039
+ return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
3040
+ }, mo = ({
3041
+ mode: e,
3042
+ noBorder: t,
3043
+ variant: r
3044
+ }) => {
3045
+ if (t)
3046
+ return "border border-transparent";
3047
+ if (r === "primary")
3048
+ return c("border", {
3049
+ "border-border-dark": e === "dark",
3050
+ "border-border-accent": e === "light",
3051
+ "border-border-dark dark:border-border-accent": e === "system",
3052
+ "border-border-accent dark:border-border-dark": e === "alt-system"
3053
+ });
3054
+ if (r === "secondary")
3055
+ return c("border", {
3056
+ "border-border-dark": e === "light",
3057
+ "border-border-accent": e === "dark",
3058
+ "border-border-dark dark:border-border-accent": e === "alt-system",
3059
+ "border-border-accent dark:border-border-dark": e === "system"
3060
+ });
3061
+ if (r === "danger")
3062
+ return c("border", {
3063
+ "border-border-danger-dark": e === "dark",
3064
+ "border-border-danger-medium": e === "light",
3065
+ "border-border-danger-dark dark:border-border-danger-medium": e === "system",
3066
+ "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
3067
+ });
3068
+ if (r === "selected")
3069
+ return "border border-border-selected-dark";
3070
+ }, go = ({
3071
+ focusMode: e
3072
+ }) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
3073
+ "focus:outline-focus-dark": e === "dark",
3074
+ "focus:outline-focus-light": e === "light",
3075
+ "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
3076
+ "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
3077
+ }), Rr = ({
3078
+ type: e,
3079
+ className: t,
3080
+ raw: r,
3081
+ mode: a,
3082
+ focusMode: n,
3083
+ disabled: o,
3084
+ fullWidth: s,
3085
+ size: i,
3086
+ noBorder: l,
3087
+ labelRight: h,
3088
+ labelLeft: f,
3089
+ noBackground: g,
3090
+ variant: u,
3091
+ noTruncate: m,
3092
+ align: y,
3093
+ radius: b
3094
+ }) => (u || (u = "primary"), r ? c(Zt, t) : c(
3095
+ Zt,
3096
+ so({
3097
+ mode: a,
3098
+ variant: u,
3099
+ noBackground: g,
3100
+ noTruncate: m
3101
+ }),
3102
+ io({ mode: a, noBackground: g, variant: u }),
3103
+ co({ radius: b }),
3104
+ no({
3105
+ type: e,
3106
+ size: i,
3107
+ labelRight: h,
3108
+ labelLeft: f,
3109
+ align: y
3110
+ }),
3111
+ oo({ type: e, size: i, labelRight: h, labelLeft: f }),
3112
+ mo({ mode: a, variant: u, noBorder: l }),
3113
+ go({ focusMode: n }),
3114
+ lo({ mode: a, variant: u, disabled: o }),
3115
+ uo({ mode: a, variant: u, disabled: o }),
3116
+ {
3117
+ "w-full": s,
3118
+ "disabled:cursor-not-allowed disabled:opacity-50": o
3119
+ },
3120
+ t
3121
+ )), ho = (e, t, r) => {
3122
+ var a;
3123
+ !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
3124
+ }, Nt = $.forwardRef((e, t) => {
3125
+ const { onClick: r, noInternalClick: a = !1, ...n } = e;
3126
+ return /* @__PURE__ */ d(
3127
+ "button",
3128
+ {
3129
+ ref: t,
3130
+ onClick: (o) => {
3131
+ ho(o, a, r);
3132
+ },
3133
+ ...n
3134
+ }
3135
+ );
3136
+ });
3137
+ Nt.displayName = "BaseButton";
3138
+ const Cr = $.forwardRef(
3139
+ ({
3140
+ children: e,
3141
+ disabled: t = !1,
3142
+ mode: r = "system",
3143
+ focusMode: a = "system",
3144
+ fullWidth: n = !1,
3145
+ className: o,
3146
+ type: s = "button",
3147
+ raw: i = !1,
3148
+ noBorder: l = !1,
3149
+ "aria-label": h,
3150
+ label: f,
3151
+ size: g = "medium",
3152
+ labelRight: u,
3153
+ labelLeft: m,
3154
+ noBackground: y = !1,
3155
+ align: b = "center",
3156
+ radius: k = "large",
3157
+ variant: p = "primary",
3158
+ ...N
3159
+ }, A) => {
3160
+ const R = Rr({
3161
+ type: Ge,
3162
+ mode: r,
3163
+ focusMode: a,
3164
+ fullWidth: n,
3165
+ disabled: t,
3166
+ raw: i,
3167
+ className: o,
3168
+ noBorder: l,
3169
+ size: g,
3170
+ labelRight: u,
3171
+ labelLeft: m,
3172
+ noBackground: y,
3173
+ align: b,
3174
+ radius: k,
3175
+ variant: p
3176
+ }), E = c({
3177
+ "text-copy-accent-dark": r === "light" && !i,
3178
+ "text-copy-light": r === "dark" && !i,
3179
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
3180
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
3181
+ });
3182
+ return /* @__PURE__ */ I(
3183
+ Nt,
3184
+ {
3185
+ ref: A,
3186
+ className: R,
3187
+ disabled: t,
3188
+ type: s,
3189
+ "aria-label": h || f,
3190
+ ...N,
3191
+ children: [
3192
+ m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
3193
+ /* @__PURE__ */ d("div", { className: E, children: e }),
3194
+ u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
3195
+ ]
3196
+ }
3197
+ );
3198
+ }
3199
+ );
3200
+ Cr.displayName = "ButtonIcon";
3201
+ /*!
3202
+ @versini/ui-button v4.0.3
3203
+ © 2025 gizmette.com
3204
+ */
3205
+ try {
3206
+ window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
3207
+ version: "4.0.3",
3208
+ buildTime: "01/04/2025 07:31 PM EST",
3209
+ homepage: "https://github.com/aversini/ui-components",
3210
+ license: "MIT"
3211
+ });
3212
+ } catch {
3213
+ }
3214
+ const fo = $.forwardRef(
3215
+ ({
3216
+ children: e,
3217
+ disabled: t = !1,
3218
+ mode: r = "system",
3219
+ focusMode: a = "system",
3220
+ fullWidth: n = !1,
3221
+ className: o,
3222
+ type: s = "button",
3223
+ raw: i = !1,
3224
+ noBorder: l = !1,
3225
+ "aria-label": h,
3226
+ label: f,
3227
+ size: g = "medium",
3228
+ labelRight: u,
3229
+ labelLeft: m,
3230
+ noBackground: y = !1,
3231
+ align: b = "center",
3232
+ active: k = !1,
3233
+ radius: p = "large",
3234
+ ...N
3235
+ }, A) => {
3236
+ const R = Rr({
3237
+ type: Ge,
3238
+ mode: r,
3239
+ focusMode: a,
3240
+ fullWidth: n,
3241
+ disabled: t,
3242
+ raw: i,
3243
+ className: o,
3244
+ noBorder: l,
3245
+ size: g,
3246
+ labelRight: u,
3247
+ labelLeft: m,
3248
+ noBackground: y,
3249
+ align: b,
3250
+ radius: p
3251
+ }), E = c({
3252
+ "text-copy-accent-dark": r === "light" && !i,
3253
+ "text-copy-light": r === "dark" && !i,
3254
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
3255
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
3256
+ }), C = k ? c(
3257
+ "relative",
3258
+ "focus-within:static",
3259
+ "focus-within:after:border-transparent",
3260
+ "after:absolute",
3261
+ "after:content-['']",
3262
+ "after:border-b-2",
3263
+ "after:bottom-[-4px]",
3264
+ "after:left-0",
3265
+ "after:right-0",
3266
+ {
3267
+ "after:border-table-dark": r === "dark",
3268
+ "after:border-table-light": r === "light",
3269
+ "after:border-table-dark dark:after:border-table-light": r === "system",
3270
+ "after:border-table-light dark:after:border-table-dark": r === "alt-system"
3271
+ }
3272
+ ) : "";
3273
+ return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
3274
+ Nt,
3275
+ {
3276
+ ref: A,
3277
+ className: R,
3278
+ disabled: t,
3279
+ type: s,
3280
+ "aria-label": h || f,
3281
+ ...N,
3282
+ children: [
3283
+ m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
3284
+ /* @__PURE__ */ d("div", { className: E, children: e }),
3285
+ u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
3286
+ ]
3287
+ }
3288
+ ) });
3289
+ }
3290
+ );
3291
+ fo.displayName = "ButtonSort";
3292
+ const Ir = ({
3293
+ children: e,
3294
+ fill: t,
3295
+ viewBox: r,
3296
+ className: a,
3297
+ defaultViewBox: n,
3298
+ size: o,
3299
+ title: s,
3300
+ semantic: i = !1,
3301
+ ...l
3302
+ }) => {
3303
+ const h = c(o, a);
3304
+ return /* @__PURE__ */ I(yt, { children: [
3305
+ /* @__PURE__ */ d(
3306
+ "svg",
3307
+ {
3308
+ xmlns: "http://www.w3.org/2000/svg",
3309
+ className: h,
3310
+ viewBox: r || n,
3311
+ fill: t || "currentColor",
3312
+ role: "img",
3313
+ "aria-hidden": !i,
3314
+ focusable: !1,
3315
+ ...l,
3316
+ children: e
3317
+ }
3318
+ ),
3319
+ s && i && /* @__PURE__ */ d("span", { className: "sr-only", children: s })
3320
+ ] });
3321
+ };
3322
+ /*!
3323
+ @versini/ui-svgicon v4.0.0
3324
+ © 2025 gizmette.com
3325
+ */
3326
+ try {
3327
+ window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
3328
+ version: "4.0.0",
3329
+ buildTime: "01/04/2025 07:31 PM EST",
3330
+ homepage: "https://github.com/aversini/ui-components",
3331
+ license: "MIT"
3332
+ });
3333
+ } catch {
3334
+ }
3335
+ const po = ({
3336
+ className: e,
3337
+ viewBox: t,
3338
+ title: r,
3339
+ monotone: a,
3340
+ ...n
3341
+ }) => /* @__PURE__ */ I(
3342
+ Ir,
3343
+ {
3344
+ defaultViewBox: "0 0 448 512",
3345
+ size: "size-5",
3346
+ viewBox: t,
3347
+ className: e,
3348
+ title: r || "Copied",
3349
+ ...n,
3350
+ children: [
3351
+ /* @__PURE__ */ d(
3352
+ "path",
3353
+ {
3354
+ className: "fa-secondary",
3355
+ opacity: "0.4",
3356
+ d: "M0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96zM104 256c0-6.1 2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l47 47c37-37 74-74 111-111c4.7-4.7 10.8-7 17-7s12.3 2.3 17 7c2.3 2.3 4.1 5 5.3 7.9c.6 1.5 1 2.9 1.3 4.4c.2 1.1 .3 2.2 .3 2.2c.1 1.2 .1 1.2 .1 2.5c-.1 1.5-.1 1.9-.1 2.3c-.1 .7-.2 1.5-.3 2.2c-.3 1.5-.7 3-1.3 4.4c-1.2 2.9-2.9 5.6-5.3 7.9c-42.7 42.7-85.3 85.3-128 128c-4.7 4.7-10.8 7-17 7s-12.3-2.3-17-7c-21.3-21.3-42.7-42.7-64-64c-4.7-4.7-7-10.8-7-17z"
3357
+ }
3358
+ ),
3359
+ /* @__PURE__ */ d(
3360
+ "path",
3361
+ {
3362
+ className: "fa-primary",
3363
+ d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z"
3364
+ }
3365
+ )
3366
+ ]
3367
+ }
3368
+ ), yo = ({
3369
+ className: e,
3370
+ viewBox: t,
3371
+ title: r,
3372
+ monotone: a,
3373
+ ...n
3374
+ }) => /* @__PURE__ */ d(
3375
+ Ir,
3376
+ {
3377
+ defaultViewBox: "0 0 512 512",
3378
+ size: "size-5",
3379
+ viewBox: t,
3380
+ className: e,
3381
+ title: r || "Copy",
3382
+ ...n,
3383
+ children: /* @__PURE__ */ d("path", { d: "M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z" })
3384
+ }
3385
+ );
3386
+ /*!
3387
+ @versini/ui-icons v4.2.0
3388
+ © 2025 gizmette.com
3389
+ */
3390
+ try {
3391
+ window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
3392
+ version: "4.2.0",
3393
+ buildTime: "01/04/2025 07:31 PM EST",
3394
+ homepage: "https://github.com/aversini/ui-components",
3395
+ license: "MIT"
3396
+ });
3397
+ } catch {
3398
+ }
3399
+ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3400
+ "lg:max-w-3xl": e === "left"
3401
+ }), vo = ({ kind: e }) => c({
3402
+ "bg-surface-lighter dark:bg-surface-dark": e === "left",
3403
+ "bg-surface-accent": e === "right"
3404
+ }), ko = ({ kind: e }) => c(
3405
+ "prose prose-dark dark:prose-lighter prose-p:my-3 prose-blockquote:my-3 prose-ol:my-3 prose-ul:my-3 prose-ul:prose-li:marker:text-black",
3406
+ {
3407
+ "text-copy-lighter": e === "right"
3408
+ }
3409
+ ), _o = ({ kind: e }) => c("rounded-b-xl", {
3410
+ "rounded-tr-xl": e === "left",
3411
+ "rounded-tl-xl": e === "right"
3412
+ }), Eo = ({
3413
+ kind: e,
3414
+ className: t
3415
+ }) => {
3416
+ const r = c(
3417
+ ao,
3418
+ "flex items-start",
3419
+ {
3420
+ "flex-row-reverse": e === "right"
3421
+ },
3422
+ t
3423
+ ), a = c(
3424
+ "flex flex-col empty:hidden",
3425
+ bo({ kind: e }),
3426
+ ko({ kind: e }),
3427
+ vo({ kind: e }),
3428
+ _o({ kind: e })
3429
+ ), n = "pr-2 pt-1 text-end text-xs text-copy-light", o = c("flex flex-col-reverse gap-2 sm:flex-row", {
3430
+ "ml-2": e === "left",
3431
+ "mr-2": e === "right"
3432
+ });
3433
+ return {
3434
+ wrapper: r,
3435
+ main: a,
3436
+ footer: n,
3437
+ copyButton: o
3438
+ };
3439
+ }, xo = ({
3440
+ children: e,
3441
+ kind: t = "left",
3442
+ className: r,
3443
+ footer: a,
3444
+ rawFooter: n,
3445
+ copyToClipboard: o,
3446
+ copyToClipboardFocusMode: s = "system",
3447
+ copyToClipboardMode: i = "system"
3448
+ }) => {
3449
+ const [l, h] = G(!1), f = Eo({ kind: t, className: r }), g = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), u = () => {
3450
+ h(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
3451
+ };
3452
+ return L(() => {
3453
+ let m;
3454
+ return l && (m = window.setTimeout(() => {
3455
+ h(!1);
3456
+ }, 3e3)), () => {
3457
+ clearTimeout(m);
3458
+ };
3459
+ }, [l]), /* @__PURE__ */ I("div", { className: f.wrapper, children: [
3460
+ /* @__PURE__ */ I("div", { children: [
3461
+ /* @__PURE__ */ d("div", { className: f.main, children: e }),
3462
+ a && Object.keys(a).map((m) => a[m] ? /* @__PURE__ */ d("div", { className: "prose-p:m-0", children: /* @__PURE__ */ I("p", { className: f.footer, children: [
3463
+ m,
3464
+ ": ",
3465
+ a[m]
3466
+ ] }) }, `-${m}`) : null),
3467
+ n && n
3468
+ ] }),
3469
+ g && /* @__PURE__ */ d("div", { className: f.copyButton, children: /* @__PURE__ */ d(
3470
+ Cr,
3471
+ {
3472
+ noBorder: !0,
3473
+ noBackground: !0,
3474
+ size: "small",
3475
+ mode: i,
3476
+ focusMode: s,
3477
+ label: l ? "Copied to clipboard" : "Copy to clipboard",
3478
+ onClick: u,
3479
+ disabled: l,
3480
+ children: l ? /* @__PURE__ */ d(po, { size: "size-3" }) : /* @__PURE__ */ d(yo, { size: "size-3" })
3481
+ }
3482
+ ) })
3483
+ ] });
3484
+ }, er = "av-button", Rt = "icon", Ct = "button", pt = "link", wo = ({
3485
+ type: e,
3486
+ size: t,
3487
+ labelRight: r,
3488
+ labelLeft: a,
3489
+ align: n
3490
+ }) => {
3491
+ const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
3492
+ switch (e) {
3493
+ case Ct:
3494
+ case pt:
3495
+ return c({
3496
+ [o]: t === "small",
3497
+ [s]: t === "medium",
3498
+ [i]: t === "large"
3499
+ });
3500
+ case Rt:
3501
+ return c("inline-flex items-center", {
3502
+ "justify-center": n === "center",
3503
+ "justify-start": n === "left",
3504
+ "justify-end": n === "right",
3505
+ "h-6 w-6 p-0": t === "small" && !(r || a),
3506
+ "h-6 px-2": t === "small" && (r || a),
3507
+ "h-8 w-8 p-1": t === "medium" && !(r || a),
3508
+ "h-8 px-3": t === "medium" && (r || a),
3509
+ "h-12 w-12 p-2": t === "large" && !(r || a),
3510
+ "h-12 px-4": t === "large" && (r || a)
3511
+ });
3512
+ }
3513
+ }, So = ({
3514
+ type: e,
3515
+ size: t,
3516
+ labelRight: r,
3517
+ labelLeft: a
3518
+ }) => {
3519
+ const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
3520
+ switch (e) {
3521
+ case Ct:
3522
+ case pt:
3523
+ return c({
3524
+ "text-center": e === pt,
3525
+ [n]: t === "small",
3526
+ [o]: t === "medium",
3527
+ [s]: t === "large"
3528
+ });
3529
+ case Rt:
3530
+ return c({
3531
+ [n]: t === "small" && (r || a),
3532
+ [o]: t === "medium" && (r || a),
3533
+ [s]: t === "large" && (r || a)
3534
+ });
3535
+ }
3536
+ }, To = ({
3537
+ mode: e,
3538
+ noBackground: t,
3539
+ noTruncate: r,
3540
+ variant: a
3541
+ }) => {
3542
+ if (t)
3543
+ return "not-prose";
3544
+ if (a === "primary")
3545
+ return c("not-prose", {
3546
+ truncate: !r,
3547
+ "text-copy-light": e === "dark" || e === "system",
3548
+ "text-copy-lighter": e === "light" || e === "alt-system",
3549
+ "dark:text-copy-lighter": e === "system",
3550
+ "dark:text-copy-light": e === "alt-system"
3551
+ });
3552
+ if (a === "secondary")
3553
+ return c("not-prose", {
3554
+ truncate: !r,
3555
+ "text-copy-light": e === "light" || e === "system",
3556
+ "text-copy-lighter": e === "dark" || e === "alt-system",
3557
+ "dark:text-copy-lighter": e === "alt-system",
3558
+ "dark:text-copy-light": e === "system"
3559
+ });
3560
+ if (a === "danger")
3561
+ return c("not-prose", {
3562
+ truncate: !r,
3563
+ "text-copy-light": e === "dark" || e === "system",
3564
+ "text-copy-lighter": e === "light" || e === "alt-system",
3565
+ "dark:text-copy-lighter": e === "system",
3566
+ "dark:text-copy-light": e === "alt-system"
3567
+ });
3568
+ if (a === "selected")
3569
+ return c("not-prose text-copy-lighter", {
3570
+ truncate: !r
3571
+ });
3572
+ }, No = ({
3573
+ mode: e,
3574
+ noBackground: t,
3575
+ variant: r
3576
+ }) => {
3577
+ if (!t) {
3578
+ if (r === "primary")
3579
+ return c({
3580
+ "bg-action-dark": e === "dark",
3581
+ "bg-action-light": e === "light",
3582
+ "bg-action-dark dark:bg-action-light": e === "system",
3583
+ "bg-action-light dark:bg-action-dark": e === "alt-system"
3584
+ });
3585
+ if (r === "secondary")
3586
+ return c({
3587
+ "bg-action-dark": e === "light",
3588
+ "bg-action-light": e === "dark",
3589
+ "bg-action-dark dark:bg-action-light": e === "alt-system",
3590
+ "bg-action-light dark:bg-action-dark": e === "system"
3591
+ });
3592
+ if (r === "danger")
3593
+ return c({
3594
+ "bg-action-danger-dark": e === "dark",
3595
+ "bg-action-danger-light": e === "light",
3596
+ "bg-action-danger-dark dark:bg-action-danger-light": e === "system",
3597
+ "bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
3598
+ });
3599
+ if (r === "selected")
3600
+ return "bg-action-selected-dark";
3601
+ }
3602
+ }, Ro = ({
3603
+ radius: e
3604
+ }) => c({
3605
+ "rounded-full": e === "large",
3606
+ "rounded-md": e === "medium",
3607
+ "rounded-sm": e === "small"
3608
+ }), Co = ({
3609
+ mode: e,
3610
+ disabled: t,
3611
+ variant: r
3612
+ }) => {
3613
+ if (t)
3614
+ return "";
3615
+ if (r === "primary")
3616
+ return c("hover:text-copy-light-hover", {
3617
+ "hover:bg-action-dark-hover": e === "dark",
3618
+ "hover:bg-action-light-hover": e === "light",
3619
+ "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
3620
+ "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
3621
+ });
3622
+ if (r === "secondary")
3623
+ return c("hover:text-copy-light-hover", {
3624
+ "hover:bg-action-dark-hover": e === "light",
3625
+ "hover:bg-action-light-hover": e === "dark",
3626
+ "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
3627
+ "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
3628
+ });
3629
+ if (r === "danger")
3630
+ return c("hover:text-copy-light-hover", {
3631
+ "hover:bg-action-danger-dark-hover": e === "dark",
3632
+ "hover:bg-action-danger-light-hover": e === "light",
3633
+ "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
3634
+ "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
3635
+ });
3636
+ if (r === "selected")
3637
+ return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
3638
+ }, Io = ({
3639
+ mode: e,
3640
+ disabled: t,
3641
+ variant: r
3642
+ }) => {
3643
+ if (t)
3644
+ return "";
3645
+ if (r === "primary")
3646
+ return c("active:text-copy-light-active", {
3647
+ "active:bg-action-dark-active": e === "dark",
3648
+ "active:bg-action-light-active": e === "light",
3649
+ "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
3650
+ "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
3651
+ });
3652
+ if (r === "secondary")
3653
+ return c("active:text-copy-light-active", {
3654
+ "active:bg-action-dark-active": e === "light",
3655
+ "active:bg-action-light-active": e === "dark",
3656
+ "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
3657
+ "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
3658
+ });
3659
+ if (r === "danger")
3660
+ return c("active:text-copy-lighter-active", {
3661
+ "active:bg-action-danger-dark-active": e === "dark",
3662
+ "active:bg-action-danger-light-active": e === "light",
3663
+ "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
3664
+ "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
3665
+ });
3666
+ if (r === "selected")
3667
+ return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
3668
+ }, Ao = ({
3669
+ mode: e,
3670
+ noBorder: t,
3671
+ variant: r
3672
+ }) => {
3673
+ if (t)
3674
+ return "border border-transparent";
3675
+ if (r === "primary")
3676
+ return c("border", {
3677
+ "border-border-dark": e === "dark",
3678
+ "border-border-accent": e === "light",
3679
+ "border-border-dark dark:border-border-accent": e === "system",
3680
+ "border-border-accent dark:border-border-dark": e === "alt-system"
3681
+ });
3682
+ if (r === "secondary")
3683
+ return c("border", {
3684
+ "border-border-dark": e === "light",
3685
+ "border-border-accent": e === "dark",
3686
+ "border-border-dark dark:border-border-accent": e === "alt-system",
3687
+ "border-border-accent dark:border-border-dark": e === "system"
3688
+ });
3689
+ if (r === "danger")
3690
+ return c("border", {
3691
+ "border-border-danger-dark": e === "dark",
3692
+ "border-border-danger-medium": e === "light",
3693
+ "border-border-danger-dark dark:border-border-danger-medium": e === "system",
3694
+ "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
3695
+ });
3696
+ if (r === "selected")
3697
+ return "border border-border-selected-dark";
3698
+ }, Oo = ({
3699
+ focusMode: e
3700
+ }) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
3701
+ "focus:outline-focus-dark": e === "dark",
3702
+ "focus:outline-focus-light": e === "light",
3703
+ "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
3704
+ "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
3705
+ }), Ar = ({
3706
+ type: e,
3707
+ className: t,
3708
+ raw: r,
3709
+ mode: a,
3710
+ focusMode: n,
3711
+ disabled: o,
3712
+ fullWidth: s,
3713
+ size: i,
3714
+ noBorder: l,
3715
+ labelRight: h,
3716
+ labelLeft: f,
3717
+ noBackground: g,
3718
+ variant: u,
3719
+ noTruncate: m,
3720
+ align: y,
3721
+ radius: b
3722
+ }) => (u || (u = "primary"), r ? c(er, t) : c(
3723
+ er,
3724
+ To({
3725
+ mode: a,
3726
+ variant: u,
3727
+ noBackground: g,
3728
+ noTruncate: m
3729
+ }),
3730
+ No({ mode: a, noBackground: g, variant: u }),
3731
+ Ro({ radius: b }),
3732
+ wo({
3733
+ type: e,
3734
+ size: i,
3735
+ labelRight: h,
3736
+ labelLeft: f,
3737
+ align: y
3738
+ }),
3739
+ So({ type: e, size: i, labelRight: h, labelLeft: f }),
3740
+ Ao({ mode: a, variant: u, noBorder: l }),
3741
+ Oo({ focusMode: n }),
3742
+ Co({ mode: a, variant: u, disabled: o }),
3743
+ Io({ mode: a, variant: u, disabled: o }),
3744
+ {
3745
+ "w-full": s,
3746
+ "disabled:cursor-not-allowed disabled:opacity-50": o
3747
+ },
3748
+ t
3749
+ )), Lo = (e, t, r) => {
3750
+ var a;
3751
+ !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
3752
+ }, It = $.forwardRef((e, t) => {
3753
+ const { onClick: r, noInternalClick: a = !1, ...n } = e;
3754
+ return /* @__PURE__ */ d(
3755
+ "button",
3756
+ {
3757
+ ref: t,
3758
+ onClick: (o) => {
3759
+ Lo(o, a, r);
3760
+ },
3761
+ ...n
3762
+ }
3763
+ );
3764
+ });
3765
+ It.displayName = "BaseButton";
3766
+ const Or = $.forwardRef(
3767
+ ({
3768
+ children: e,
3769
+ disabled: t = !1,
3770
+ mode: r = "system",
3771
+ focusMode: a = "system",
3772
+ fullWidth: n = !1,
3773
+ className: o,
3774
+ size: s = "medium",
3775
+ raw: i = !1,
3776
+ noBorder: l = !1,
3777
+ variant: h = "primary",
3778
+ noTruncate: f = !1,
3779
+ radius: g = "large",
3780
+ ...u
3781
+ }, m) => {
3782
+ const y = Ar({
3783
+ type: Ct,
3784
+ mode: r,
3785
+ focusMode: a,
3786
+ fullWidth: n,
3787
+ disabled: t,
3788
+ raw: i,
3789
+ className: o,
3790
+ size: s,
3791
+ noBorder: l,
3792
+ variant: h,
3793
+ noTruncate: f,
3794
+ radius: g
3795
+ });
3796
+ return /* @__PURE__ */ d(
3797
+ It,
3798
+ {
3799
+ ref: m,
3800
+ className: y,
3801
+ disabled: t,
3802
+ ...u,
3803
+ children: e
3804
+ }
3805
+ );
3806
+ }
3807
+ );
3808
+ Or.displayName = "Button";
3809
+ /*!
3810
+ @versini/ui-button v4.0.3
3811
+ © 2025 gizmette.com
3812
+ */
3813
+ try {
3814
+ window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
3815
+ version: "4.0.3",
3816
+ buildTime: "01/04/2025 04:09 PM EST",
3817
+ homepage: "https://github.com/aversini/ui-components",
3818
+ license: "MIT"
3819
+ });
3820
+ } catch {
3821
+ }
3822
+ const Bo = $.forwardRef(
3823
+ ({
3824
+ children: e,
3825
+ disabled: t = !1,
3826
+ mode: r = "system",
3827
+ focusMode: a = "system",
3828
+ fullWidth: n = !1,
3829
+ className: o,
3830
+ type: s = "button",
3831
+ raw: i = !1,
3832
+ noBorder: l = !1,
3833
+ "aria-label": h,
3834
+ label: f,
3835
+ size: g = "medium",
3836
+ labelRight: u,
3837
+ labelLeft: m,
3838
+ noBackground: y = !1,
3839
+ align: b = "center",
3840
+ active: k = !1,
3841
+ radius: p = "large",
3842
+ ...N
3843
+ }, A) => {
3844
+ const R = Ar({
3845
+ type: Rt,
3846
+ mode: r,
3847
+ focusMode: a,
3848
+ fullWidth: n,
3849
+ disabled: t,
3850
+ raw: i,
3851
+ className: o,
3852
+ noBorder: l,
3853
+ size: g,
3854
+ labelRight: u,
3855
+ labelLeft: m,
3856
+ noBackground: y,
3857
+ align: b,
3858
+ radius: p
3859
+ }), E = c({
3860
+ "text-copy-accent-dark": r === "light" && !i,
3861
+ "text-copy-light": r === "dark" && !i,
3862
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
3863
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
3864
+ }), C = k ? c(
3865
+ "relative",
3866
+ "focus-within:static",
3867
+ "focus-within:after:border-transparent",
3868
+ "after:absolute",
3869
+ "after:content-['']",
3870
+ "after:border-b-2",
3871
+ "after:bottom-[-4px]",
3872
+ "after:left-0",
3873
+ "after:right-0",
3874
+ {
3875
+ "after:border-table-dark": r === "dark",
3876
+ "after:border-table-light": r === "light",
3877
+ "after:border-table-dark dark:after:border-table-light": r === "system",
3878
+ "after:border-table-light dark:after:border-table-dark": r === "alt-system"
3879
+ }
3880
+ ) : "";
3881
+ return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
3882
+ It,
3883
+ {
3884
+ ref: A,
3885
+ className: R,
3886
+ disabled: t,
3887
+ type: s,
3888
+ "aria-label": h || f,
3889
+ ...N,
3890
+ children: [
3891
+ m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
3892
+ /* @__PURE__ */ d("div", { className: E, children: e }),
3893
+ u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
3894
+ ]
3895
+ }
3896
+ ) });
3897
+ }
3898
+ );
3899
+ Bo.displayName = "ButtonSort";
3900
+ const $o = 200, Mo = ({
3901
+ string: e,
3902
+ idealLength: t = $o
3903
+ }) => {
3904
+ if (e.length <= t)
3905
+ return { string: e, isTruncated: !1 };
3906
+ if (e.charAt(t) === " ")
3907
+ return { string: e.slice(0, t), isTruncated: !0 };
3908
+ const r = e.slice(t).search(" ");
3909
+ return {
3910
+ string: e.slice(0, t + r),
3911
+ isTruncated: !0
3912
+ };
3913
+ }, Do = ({
3914
+ children: e,
3915
+ length: t = 200,
3916
+ mode: r = "system",
3917
+ focusMode: a = "system"
3918
+ }) => {
3919
+ const [n, o] = G(!1);
3920
+ if (typeof e != "string")
3921
+ return e;
3922
+ const { string: s, isTruncated: i } = Mo({
3923
+ string: e,
3924
+ idealLength: t
3925
+ });
3926
+ return /* @__PURE__ */ I("span", { style: { wordBreak: "break-word" }, children: [
3927
+ n ? e : s,
3928
+ i && /* @__PURE__ */ d(
3929
+ Or,
3930
+ {
3931
+ mode: r,
3932
+ focusMode: a,
3933
+ className: "ml-2",
3934
+ size: "small",
3935
+ onClick: (l) => {
3936
+ l.preventDefault(), o(!n);
3937
+ },
3938
+ children: n ? "less..." : "more..."
3939
+ }
3940
+ )
3941
+ ] });
3942
+ };
3943
+ /*!
3944
+ @versini/ui-truncate v3.0.3
3945
+ © 2025 gizmette.com
3946
+ */
3947
+ try {
3948
+ window.__VERSINI_UI_TRUNCATE__ || (window.__VERSINI_UI_TRUNCATE__ = {
3949
+ version: "3.0.3",
3950
+ buildTime: "01/04/2025 04:09 PM EST",
3951
+ homepage: "https://github.com/aversini/ui-components",
3952
+ license: "MIT"
3953
+ });
3954
+ } catch {
3955
+ }
3956
+ const tr = lr(
3957
+ () => import(
3958
+ /* webpackChunkName: "LazyMessageAssistant" */
3959
+ "./MessageAssistant.SAfzi4l-.js"
3960
+ ).then((e) => e.MessageAssistant)
3961
+ ), Vo = () => {
3962
+ const { state: e } = P(ve);
3963
+ return /* @__PURE__ */ I("div", { className: "space-y-6 mt-2", children: [
3964
+ e && e.messages.length > 0 && e.messages.map((t, r) => {
3965
+ const { role: a, content: n, name: o, processingTime: s } = t.message;
3966
+ return (a === we || a === vt) && n ? /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(tr, { name: o, processingTime: s, children: n }) }, `${r}-${a}`) : a === nt && n ? /* @__PURE__ */ d(
3967
+ xo,
3968
+ {
3969
+ kind: "right",
3970
+ copyToClipboard: n,
3971
+ copyToClipboardFocusMode: "light",
3972
+ children: /* @__PURE__ */ d(Do, { mode: "light", focusMode: "light", children: n })
3973
+ },
3974
+ `${r}-${a}`
3975
+ ) : null;
3976
+ }),
3977
+ Wr(nt, e) && /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(tr, { loading: !0 }) })
3978
+ ] });
3979
+ }, zo = () => {
3980
+ const { isAuthenticated: e } = Me(), { state: t } = P(ve), [r, a] = G(!1), [n, o] = ha(), s = jr({
3981
+ isAuthenticated: e,
3982
+ extraClass: "rounded-b-md"
3983
+ }), i = S(!1), l = Z(() => {
3984
+ const f = n.current;
3985
+ if (f) {
3986
+ const { scrollHeight: g, clientHeight: u, scrollTop: m } = f, y = g - u - m;
3987
+ f.scrollBy({
3988
+ top: y,
3989
+ behavior: "smooth"
3990
+ });
3991
+ }
3992
+ }, [n]), h = Z(() => {
3993
+ const f = n.current;
3994
+ if (f) {
3995
+ const { scrollTop: g, scrollHeight: u, clientHeight: m } = f, y = u > m, b = g + m >= u - 1;
3996
+ a(y && !b);
3997
+ }
3998
+ }, [n]);
3999
+ return fe(() => {
4000
+ o && o.width && t && !t.streaming && h();
4001
+ }, [o, t, h]), L(() => {
4002
+ const f = n.current;
4003
+ if (f)
4004
+ return f.addEventListener("scroll", h), () => f.removeEventListener("scroll", h);
4005
+ }, [h, n]), L(() => {
4006
+ t && t.streaming && h();
4007
+ }, [t, h]), L(() => {
4008
+ t && (!i.current && t.streaming && l(), i.current = !!t.streaming);
4009
+ }, [t, l]), /* @__PURE__ */ I("div", { className: s, ref: n, children: [
4010
+ r && /* @__PURE__ */ d("div", { className: "bottom-44 z-40 fixed left-1/2 transform -translate-x-1/2", children: /* @__PURE__ */ d(
4011
+ ir,
4012
+ {
4013
+ className: c(
4014
+ "dark:bg-slate-50 dark:hover:bg-slate-300 dark:active:bg-slate-400",
4015
+ "bg-slate-500 hover:bg-slate-600 active:bg-slate-700"
4016
+ ),
4017
+ noBorder: !0,
4018
+ size: "medium",
4019
+ mode: "dark",
4020
+ onClick: l,
4021
+ children: /* @__PURE__ */ d(
4022
+ aa,
4023
+ {
4024
+ monotone: !0,
4025
+ size: "size-4",
4026
+ className: "dark:text-copy-dark text-copy-lighter"
4027
+ }
4028
+ )
4029
+ }
4030
+ ) }),
4031
+ /* @__PURE__ */ d(qr, {}),
4032
+ e && /* @__PURE__ */ d(Vo, {})
4033
+ ] });
4034
+ }, Uo = lr(
4035
+ () => import(
4036
+ /* webpackChunkName: "LazyHeader" */
4037
+ "./HeaderToolbar.CMqJfj02.js"
4038
+ )
4039
+ );
4040
+ function Lr({ isComponent: e = !1 }) {
4041
+ const { isAuthenticated: t } = Me(), [r] = Ut({
4042
+ key: Dt + Jr,
4043
+ initialValue: ""
4044
+ }), [a] = Ut({
4045
+ key: Dt + Yr,
4046
+ initialValue: Ee.ASC
4047
+ }), [n, o] = Be(Ua, {
4048
+ id: xt(),
4049
+ model: Se,
4050
+ engine: Se,
4051
+ usage: 0,
4052
+ messages: [],
4053
+ prompts: [],
4054
+ isComponent: e
4055
+ }), [s, i] = Be(Pa, {
4056
+ searchString: r,
4057
+ sortedCell: "timestamp",
4058
+ sortDirection: a
4059
+ }), [l, h] = Be(Ha, {
4060
+ prompt: ""
4061
+ });
4062
+ return L(() => {
4063
+ var g;
4064
+ (g = document.getElementById("logo")) == null || g.classList.add("fadeOut"), setTimeout(() => {
4065
+ var u;
4066
+ (u = document.getElementById("root")) == null || u.classList.replace("app-hidden", "fadeIn");
4067
+ }, 500);
4068
+ }), /* @__PURE__ */ d(ve.Provider, { value: { state: n, dispatch: o }, children: /* @__PURE__ */ d(
4069
+ Fa.Provider,
4070
+ {
4071
+ value: {
4072
+ state: s,
4073
+ dispatch: i
4074
+ },
4075
+ children: /* @__PURE__ */ I(
4076
+ wt.Provider,
4077
+ {
4078
+ value: { state: l, dispatch: h },
4079
+ children: [
4080
+ /* @__PURE__ */ d(
4081
+ oa,
4082
+ {
4083
+ noColors: !0,
4084
+ noMargin: !0,
4085
+ noPadding: !0,
4086
+ noBorder: !0,
4087
+ className: Mt({
4088
+ extraClass: "mt-5"
4089
+ }),
4090
+ children: t && /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("div", {}), children: /* @__PURE__ */ d(Uo, {}) })
4091
+ }
4092
+ ),
4093
+ /* @__PURE__ */ d(
4094
+ Kr,
4095
+ {
4096
+ className: Mt({
4097
+ extraClass: "max-h-[calc(100svh_-_250px)]"
4098
+ }),
4099
+ noMargin: !0,
4100
+ noPadding: !0,
4101
+ children: /* @__PURE__ */ d(zo, {})
4102
+ }
4103
+ ),
4104
+ /* @__PURE__ */ d(ro, {})
4105
+ ]
4106
+ }
4107
+ )
4108
+ }
4109
+ ) });
4110
+ }
4111
+ Lr.displayName = "App";
4112
+ const ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Lr }, Symbol.toStringTag, { value: "Module" }));
4113
+ export {
4114
+ ts as App,
4115
+ ve as AppContext,
4116
+ Ut as E,
4117
+ Fa as HistoryContext,
4118
+ fn as NewChatButton,
4119
+ yr as Pe,
4120
+ ze as SERVICE_TYPES,
4121
+ qo as be,
4122
+ Ee as f,
4123
+ Wo as ge,
4124
+ jo as he,
4125
+ $a as ie,
4126
+ xo as le,
4127
+ Ko as me,
4128
+ gn as serviceCall,
4129
+ Jo as ue,
4130
+ Qo as useChatsHistory,
4131
+ Zo as usePreloadChatsHistory,
4132
+ es as useServerCapabilities,
4133
+ Xo as useUserChatStats,
4134
+ Qn as useUserPreferences,
4135
+ Yo as ye
4136
+ };