@versini/sassysaint 8.61.3 → 8.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/chunks/{AboutChangelog.BAx1HqFg.js → AboutChangelog.Bcp6_JXd.js} +2 -2
  2. package/dist/chunks/{AboutEntry.BxOSZ9Zn.js → AboutEntry.DVBUjCJk.js} +7 -7
  3. package/dist/chunks/{App.rQbSKvZ3.js → App.DL4IaJKE.js} +17 -20
  4. package/dist/chunks/{Chart.Dj64lK_N.js → Chart.COg_T_AO.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.DrDq6NyF.js → ChatBubbleAssistant.Bde_BKC8.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.C9mGRscp.js → ChatBubbleUser.CylWmaAk.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.BlfO2pn7.js → ChatHistoryTable.DwiAf2iK.js} +3 -3
  8. package/dist/chunks/{HistoryEntry.D6wETXAB.js → HistoryEntry.1J_Lw9HH.js} +3 -3
  9. package/dist/chunks/{ProfileEntry.BkNCg9RV.js → ProfileEntry.B7sOPbBh.js} +2 -2
  10. package/dist/chunks/SettingsEntry.fBAXDI0G.js +777 -0
  11. package/dist/chunks/{Table.BlbxuxDe.js → Table.DECiK51P.js} +2 -2
  12. package/dist/chunks/{UsageEntry.Mu8PQ0UR.js → UsageEntry.BnQ-62s3.js} +3 -3
  13. package/dist/chunks/{UserMemoriesPanel.wX3eDJpK.js → UserMemoriesPanel.DGqSP95i.js} +3 -3
  14. package/dist/chunks/{index.GWzy3bHo.js → index.Bt79QV0P.js} +1 -1
  15. package/dist/chunks/{index.BJWpr4PY.js → index.BxeCb1YH.js} +3 -3
  16. package/dist/chunks/{index.BDp4lUob.js → index.Cj-3H--g.js} +2 -2
  17. package/dist/chunks/{index.7KZcTWqp.js → index.CpgcMuF-.js} +1 -1
  18. package/dist/chunks/{index.BuMpzx4r.js → index.DZQCXS_u.js} +1 -1
  19. package/dist/chunks/{index.ENZu2o5O.js → index.DuFPaE4g.js} +1 -1
  20. package/dist/chunks/{index.Dk2MVovf.js → index.IGrBIWZE.js} +1 -1
  21. package/dist/chunks/{useMarkdown.CaiQ1WFj.js → useMarkdown.DfDymT8d.js} +6 -6
  22. package/dist/components/SassySaint/SassySaint.js +1 -1
  23. package/dist/index.js +4 -4
  24. package/package.json +3 -3
  25. package/dist/chunks/SettingsEntry.DrOPbOB2.js +0 -799
@@ -1,799 +0,0 @@
1
- import { jsxs as d, jsx as r, Fragment as de } from "react/jsx-runtime";
2
- import { o as Ne, h as pe, i as Te, x as we, n as ve, useUserPreferences as Se, Pe as fe, getCacheInfo as Ce, isServiceWorkerEnabled as Ie, SETTINGS_TITLE as _e, S as $, CARDS as L, C as oe, _e as Le, PROMPTS_DESCRIPTION as Me, L as Re, j as ge, getCurrentGeoLocation as Ae, mutateCall as ye, handleServiceWorkerToggle as De, SERVICE_TYPES as xe } from "./index.GWzy3bHo.js";
3
- import { useCapability as be, oe as Oe, O as M } from "./App.rQbSKvZ3.js";
4
- import Be, { useState as c, useEffect as me, useRef as W, useLayoutEffect as J, useCallback as Pe } from "react";
5
- import { UserMemoriesPanel as Ue } from "./UserMemoriesPanel.wX3eDJpK.js";
6
- import p from "clsx";
7
- function Ge({
8
- value: a,
9
- defaultValue: n,
10
- finalValue: o,
11
- onChange: s = () => {
12
- },
13
- initialControlledDelay: e = 0
14
- }) {
15
- const [l, m] = c(!1), [f, E] = c(
16
- n !== void 0 ? n : o
17
- ), v = (x) => {
18
- E(x), s?.(x);
19
- };
20
- return me(() => {
21
- (async () => a !== void 0 && !l && e > 0 && (await new Promise(
22
- (x) => setTimeout(x, e)
23
- ), m(!0)))();
24
- }, [a, e, l]), a !== void 0 ? !l && e > 0 ? ["", s, !0] : [a, s, !0] : [f, v, !1];
25
- }
26
- const ke = "av-text-area", He = "av-text-area-wrapper", ue = "av-text-area-helper-text", Ve = "av-text-area__control--right", $e = "av-text-area__control--left", We = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", ze = ({ mode: a }) => p({
27
- "bg-surface-darker text-copy-lighter caret-copy-light": a === "dark",
28
- "bg-surface-lighter text-copy-dark caret-copy-dark": a === "light",
29
- "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": a === "system",
30
- "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": a === "alt-system"
31
- }), Fe = ({
32
- focusMode: a
33
- }) => p("focus:outline focus:outline-2 focus:outline-offset-2", {
34
- "focus:outline-focus-dark": a === "dark",
35
- "focus:outline-focus-light": a === "light",
36
- "focus:outline-focus-light dark:focus:outline-focus-dark": a === "alt-system",
37
- "focus:outline-focus-dark dark:focus:outline-focus-light": a === "system"
38
- }), je = ({
39
- noBorder: a,
40
- error: n
41
- }) => p("border-2", {
42
- "border-border-dark": !a && !n,
43
- "focus:border-border-dark": !a && n,
44
- "border-border-error-dark": !a && n,
45
- "border-transparent": a
46
- }), Xe = ({
47
- disabled: a,
48
- raw: n,
49
- error: o,
50
- mode: s,
51
- leftElement: e,
52
- rightElement: l
53
- }) => {
54
- if (n)
55
- return "";
56
- if (a)
57
- return p(
58
- "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
59
- {
60
- "translate-x-[10px]": l === !0 && !e || !l && !e
61
- }
62
- );
63
- if (!o)
64
- return p(
65
- "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
66
- {
67
- "translate-x-[10px]": l === !0 && !e || !l && !e,
68
- "text-copy-medium": s === "dark",
69
- "text-copy-dark": s === "light",
70
- "text-copy-dark dark:text-copy-medium": s === "system",
71
- "text-copy-medium dark:text-copy-dark": s === "alt-system"
72
- }
73
- );
74
- if (o)
75
- return p(
76
- "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
77
- {
78
- "translate-x-[10px]": l === !0 && !e || !l && !e,
79
- "text-copy-medium": s === "dark",
80
- "text-copy-error-dark": s === "light",
81
- "text-copy-error-dark dark:text-copy-error-light": s === "system",
82
- "text-copy-medium dark:text-copy-error-dark": s === "alt-system"
83
- }
84
- );
85
- }, Ye = ({
86
- error: a,
87
- raw: n,
88
- mode: o,
89
- disabled: s
90
- }) => {
91
- if (n)
92
- return "";
93
- if (s)
94
- return p(
95
- ue,
96
- "absolute px-2 cursor-not-allowed opacity-50 font-medium"
97
- );
98
- if (!a)
99
- return p(ue, "absolute px-2 font-medium", {
100
- "text-copy-medium": o === "dark",
101
- "text-copy-dark": o === "light",
102
- "text-copy-dark dark:text-copy-medium": o === "system",
103
- "text-copy-medium dark:text-copy-dark": o === "alt-system"
104
- });
105
- if (a)
106
- return p(ue, "absolute px-2 font-medium", {
107
- "text-copy-error-light": o === "dark",
108
- "text-copy-error-dark": o === "light",
109
- "text-copy-error-dark dark:text-copy-error-light": o === "system",
110
- "dark:text-copy-error-dark text-copy-error-light": o === "alt-system"
111
- });
112
- }, qe = ({
113
- className: a,
114
- textAreaClassName: n,
115
- raw: o,
116
- focusMode: s,
117
- disabled: e,
118
- noBorder: l,
119
- error: m,
120
- mode: f,
121
- leftElement: E,
122
- rightElement: v
123
- }) => {
124
- const x = o ? a : p(
125
- "relative flex w-full flex-col justify-center",
126
- He,
127
- a
128
- ), R = o ? p(n) : p(
129
- ke,
130
- n,
131
- We(),
132
- ze({ mode: f }),
133
- Fe({ focusMode: s }),
134
- je({
135
- noBorder: l,
136
- error: m
137
- }),
138
- {
139
- "disabled:cursor-not-allowed disabled:opacity-50": e
140
- }
141
- ), P = o ? void 0 : "sr-only", U = Xe({
142
- disabled: e,
143
- raw: o,
144
- error: m,
145
- mode: f,
146
- rightElement: v,
147
- leftElement: E
148
- }), h = Ye({
149
- error: m,
150
- raw: o,
151
- mode: f,
152
- disabled: e
153
- }), I = o ? void 0 : p(Ve, "absolute"), b = o ? void 0 : p($e, "absolute");
154
- return {
155
- wrapper: x,
156
- textArea: R,
157
- accessibleLabel: P,
158
- visibleLabel: U,
159
- helperText: h,
160
- rightElement: I,
161
- leftElement: b
162
- };
163
- }, Je = ({
164
- scrollHeight: a,
165
- currentHeight: n,
166
- currentLabelOffset: o = 0,
167
- currentHelperTextOffset: s = 0
168
- }) => {
169
- let e, l;
170
- if (a > 0 && a !== n) {
171
- const m = a - n, f = Math.abs(m / 24);
172
- e = o + -1 * Math.sign(m) * (12 * f), l = s + Math.sign(m) * (12 * f);
173
- }
174
- return {
175
- labelOffset: e,
176
- helperTextOffset: l,
177
- scrollHeight: a
178
- };
179
- }, he = Be.forwardRef(
180
- ({
181
- id: a,
182
- name: n,
183
- label: o,
184
- error: s = !1,
185
- raw: e = !1,
186
- className: l,
187
- textAreaClassName: m,
188
- mode: f = "system",
189
- focusMode: E = "system",
190
- value: v,
191
- defaultValue: x,
192
- disabled: R = !1,
193
- noBorder: P = !1,
194
- labelId: U,
195
- helperText: h = "",
196
- helperTextOnFocus: I = !1,
197
- rightElement: b,
198
- leftElement: N,
199
- onChange: z,
200
- onFocus: A,
201
- onBlur: F,
202
- ...G
203
- }, K) => {
204
- const g = W(null), Q = Ne([K, g]), [D, O] = pe(), [Z, S] = pe(), H = W(80), j = W(-25), V = W(null), X = W(30), Y = W(null), _ = Te({ id: a, prefix: `${ke}-` }), [ee, se] = c(0), [te, ne] = c(0), [le, re] = c(
205
- !!(!I && h)
206
- ), ce = `${n} error, ${h}`, T = qe({
207
- className: l,
208
- textAreaClassName: m,
209
- error: s,
210
- raw: e,
211
- focusMode: E,
212
- disabled: R,
213
- noBorder: P,
214
- mode: f,
215
- rightElement: !!b,
216
- leftElement: !!N
217
- }), [y, ae] = Ge({
218
- value: v,
219
- initialControlledDelay: 20,
220
- defaultValue: x,
221
- onChange: (u) => {
222
- z && z({
223
- target: {
224
- value: u
225
- }
226
- });
227
- }
228
- }), t = (u) => {
229
- ae(u.target.value);
230
- }, i = (u) => {
231
- I && h && re(!0), A && A(u);
232
- }, B = (u) => {
233
- I && h && !y && re(!1), F && F(u);
234
- };
235
- return J(() => {
236
- O && O.width && se(O.width + 18 + 10);
237
- }, [O]), J(() => {
238
- S && S.width && ne(S.width + 18 + 10);
239
- }, [S]), J(() => {
240
- e || g && g.current && y !== void 0 && (g.current.style.height = "inherit", g.current.style.height = g.current.scrollHeight + "px");
241
- }, [y, e]), J(() => {
242
- e || setTimeout(() => {
243
- V?.current?.style.setProperty(
244
- "--av-text-area-wrapper-transition",
245
- y ? "none" : "all 0.2s ease-out"
246
- );
247
- }, 0);
248
- }, [y, e]), J(() => {
249
- if (!e && g && g.current && y !== void 0) {
250
- const { labelOffset: u, helperTextOffset: w, scrollHeight: k } = Je({
251
- scrollHeight: g.current.scrollHeight,
252
- currentHeight: H.current,
253
- currentLabelOffset: j.current,
254
- currentHelperTextOffset: X.current
255
- });
256
- u && (j.current = u, V?.current?.style.setProperty(
257
- "--av-text-area-label",
258
- `${u}px`
259
- )), w && (X.current = w, Y?.current?.style.setProperty(
260
- "--av-text-area-helper-text",
261
- `${w}px`
262
- )), H.current = k || H.current;
263
- }
264
- }, [y, e]), S.width > 0 && V?.current?.style.setProperty(
265
- "--tw-translate-x",
266
- `${12 + S.width + 5}px`
267
- ), /* @__PURE__ */ d("div", { className: T.wrapper, children: [
268
- /* @__PURE__ */ r(
269
- "label",
270
- {
271
- htmlFor: _,
272
- id: U,
273
- className: T.accessibleLabel,
274
- children: o
275
- }
276
- ),
277
- N && /* @__PURE__ */ r(
278
- "div",
279
- {
280
- ref: Z,
281
- className: T.leftElement,
282
- children: N
283
- }
284
- ),
285
- /* @__PURE__ */ r(
286
- "textarea",
287
- {
288
- ref: Q,
289
- id: _,
290
- name: n,
291
- disabled: R,
292
- placeholder: e ? void 0 : " ",
293
- className: T.textArea,
294
- rows: 1,
295
- ...h && { "aria-describedby": `${_}-helper` },
296
- ...s && { "aria-invalid": "true" },
297
- ...b && !N && !e && { style: { paddingRight: ee } },
298
- ...N && !b && !e && { style: { paddingLeft: te } },
299
- ...b && N && !e && {
300
- style: {
301
- paddingRight: ee,
302
- paddingLeft: te
303
- }
304
- },
305
- value: y,
306
- onChange: t,
307
- onFocus: i,
308
- onBlur: B,
309
- ...G
310
- }
311
- ),
312
- !e && /* @__PURE__ */ r(
313
- "label",
314
- {
315
- ref: V,
316
- "aria-hidden": !0,
317
- htmlFor: _,
318
- className: `${T.visibleLabel}`,
319
- children: o
320
- }
321
- ),
322
- le && /* @__PURE__ */ r(
323
- "div",
324
- {
325
- ref: Y,
326
- id: `${_}-helper`,
327
- className: T.helperText,
328
- children: h
329
- }
330
- ),
331
- b && /* @__PURE__ */ r(
332
- "div",
333
- {
334
- ref: D,
335
- className: T.rightElement,
336
- children: b
337
- }
338
- ),
339
- s && h && /* @__PURE__ */ r(we, { politeness: "polite", clearAnnouncementDelay: 500, children: ce })
340
- ] });
341
- }
342
- );
343
- he.displayName = "TextArea";
344
- /*!
345
- @versini/ui-textarea v5.0.2
346
- © 2025 gizmette.com
347
- */
348
- try {
349
- window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
350
- version: "5.0.2",
351
- buildTime: "10/11/2025 07:15 PM EDT",
352
- homepage: "https://github.com/aversini/ui-components",
353
- license: "MIT"
354
- });
355
- } catch {
356
- }
357
- const at = ({
358
- open: a,
359
- onOpenChange: n
360
- }) => {
361
- const { getAccessToken: o, user: s } = ve(), {
362
- data: e,
363
- isSuccess: l,
364
- refetch: m
365
- } = Se({
366
- user: s?.username,
367
- getAccessToken: o
368
- }), [f, E] = c({
369
- loadingLocation: !1
370
- }), [v, x] = c({
371
- prompts: []
372
- }), [R, P] = c(""), [U, h] = c(""), [I, b] = c(!1), [N, z] = c(!1), [A, F] = c(!1), [G, K] = c(!1), [g, Q] = c(!1), [D, O] = c(null), [Z, S] = c(!1), [H, j] = c(!1), [V, X] = c(!1), Y = be(fe.TOOL.MEMORIES), _ = be(fe.ADDON.REASONING), ee = (t) => {
373
- j(t);
374
- }, se = (t) => {
375
- b(t);
376
- }, te = (t) => {
377
- Y && z(t);
378
- }, ne = (t) => {
379
- K(t);
380
- }, le = (t) => {
381
- _ && Q(t);
382
- }, re = async (t) => {
383
- t.preventDefault();
384
- try {
385
- await ye({
386
- accessToken: await o(),
387
- type: xe.SET_USER_PREFERENCES,
388
- params: {
389
- user: s?.username,
390
- instructions: R,
391
- location: U,
392
- provider: e?.provider,
393
- tags: v.prompts,
394
- sendOnEnter: I,
395
- useMemory: N,
396
- showDetails: H,
397
- showReasoningButton: g
398
- }
399
- }), G !== A && (await De(G), F(G)), m(), E({
400
- loadingLocation: !1
401
- });
402
- } catch {
403
- }
404
- }, ce = async () => {
405
- E({
406
- loadingLocation: !0
407
- }), h("...");
408
- try {
409
- const t = Date.now(), i = await Ae(), B = await ye({
410
- accessToken: await o(),
411
- type: xe.GET_LOCATION,
412
- params: {
413
- latitude: i.latitude,
414
- longitude: i.longitude
415
- }
416
- }), w = Date.now() - t;
417
- if (w < 2e3 && await new Promise((k) => setTimeout(k, 2e3 - w)), B.status === 200) {
418
- const { city: k, state: C, country: q, displayName: ie } = B.data, Ee = k && C && q ? `${k}, ${C}, ${q}` : ie;
419
- E({
420
- loadingLocation: !1
421
- }), h(Ee);
422
- } else
423
- E({
424
- loadingLocation: !1
425
- });
426
- } catch {
427
- }
428
- }, T = () => {
429
- m(), n(!1);
430
- }, y = ({
431
- enabled: t = !1,
432
- privateChat: i = !1,
433
- clipboardAccess: B = !1,
434
- ...u
435
- }) => {
436
- x((w) => {
437
- const k = w.prompts, C = {
438
- ...u,
439
- enabled: t,
440
- privateChat: i,
441
- clipboardAccess: B
442
- };
443
- B ? C.content = C.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : C.content = C.content.replace(/{{clipboard}}/g, "");
444
- const q = k.findIndex((ie) => ie.slot === u.slot);
445
- return q === -1 ? {
446
- ...w,
447
- prompts: [...k, { ...C }]
448
- } : (k[q] = C, {
449
- ...w,
450
- prompts: [...k]
451
- });
452
- });
453
- }, ae = Pe(async () => {
454
- try {
455
- S(!0);
456
- const t = await Ce();
457
- O(t);
458
- } catch {
459
- } finally {
460
- S(!1);
461
- }
462
- }, []);
463
- return me(() => {
464
- if (!e)
465
- return;
466
- e.instructions && P(e.instructions), e.location && h(e.location), e.tags && x({ prompts: e.tags }), e.sendOnEnter !== void 0 && b(e.sendOnEnter), e.useMemory !== void 0 && z(e.useMemory), e.showDetails !== void 0 && j(e.showDetails), e.showReasoningButton !== void 0 && Q(e.showReasoningButton);
467
- const t = Ie();
468
- F(t), K(t);
469
- }, [e]), me(() => {
470
- A ? ae() : O(null);
471
- }, [A, ae]), l ? /* @__PURE__ */ d(de, { children: [
472
- /* @__PURE__ */ d(
473
- Oe,
474
- {
475
- open: a,
476
- onOpenChange: T,
477
- title: _e,
478
- animation: !0,
479
- animationType: "fade",
480
- footer: /* @__PURE__ */ d(
481
- Re,
482
- {
483
- columnGap: 2,
484
- alignHorizontal: "flex-end",
485
- className: "pb-8 sm:pb-0",
486
- children: [
487
- /* @__PURE__ */ r(ge, { children: /* @__PURE__ */ r(
488
- oe,
489
- {
490
- mode: "dark",
491
- variant: "secondary",
492
- focusMode: "light",
493
- noBorder: !0,
494
- onClick: T,
495
- children: "Cancel"
496
- }
497
- ) }),
498
- /* @__PURE__ */ r(ge, { children: /* @__PURE__ */ r(
499
- oe,
500
- {
501
- mode: "dark",
502
- focusMode: "light",
503
- onClick: async (t) => {
504
- n(!1), await re(t);
505
- },
506
- children: "Save"
507
- }
508
- ) })
509
- ]
510
- }
511
- ),
512
- children: [
513
- /* @__PURE__ */ d(
514
- $,
515
- {
516
- header: L.SETTINGS_DETAILS.TITLE,
517
- className: "prose-dark dark:prose-lighter",
518
- noBorder: !0,
519
- children: [
520
- /* @__PURE__ */ r("p", { className: "text-sm", children: L.SETTINGS_DETAILS.DETAILS }),
521
- /* @__PURE__ */ r(
522
- M,
523
- {
524
- noBorder: !0,
525
- narrow: !0,
526
- className: "mt-2",
527
- label: "Show Message Statistics",
528
- name: "show-message-statistics",
529
- onChange: ee,
530
- checked: H
531
- }
532
- ),
533
- /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: L.SETTINGS_DETAILS.SEND_ON_ENTER }),
534
- /* @__PURE__ */ r(
535
- M,
536
- {
537
- noBorder: !0,
538
- narrow: !0,
539
- className: "mt-2",
540
- label: "Send Message on Enter",
541
- name: "send-message-on-enter",
542
- onChange: se,
543
- checked: I
544
- }
545
- ),
546
- Y && /* @__PURE__ */ d(de, { children: [
547
- /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: L.SETTINGS_DETAILS.USE_MEMORY }),
548
- /* @__PURE__ */ r(
549
- M,
550
- {
551
- noBorder: !0,
552
- narrow: !0,
553
- className: "mt-2",
554
- label: "Use Memory",
555
- name: "use-memory",
556
- onChange: te,
557
- checked: N
558
- }
559
- ),
560
- N && /* @__PURE__ */ r(
561
- oe,
562
- {
563
- variant: "secondary",
564
- noBorder: !0,
565
- size: "small",
566
- className: "mt-3",
567
- onClick: () => X(!0),
568
- children: "Manage Memories"
569
- }
570
- )
571
- ] })
572
- ]
573
- }
574
- ),
575
- /* @__PURE__ */ d(
576
- $,
577
- {
578
- header: "Custom Instructions",
579
- className: "prose-dark dark:prose-lighter mt-4",
580
- noBorder: !0,
581
- children: [
582
- /* @__PURE__ */ d("p", { className: "text-sm", children: [
583
- "What would you like ",
584
- /* @__PURE__ */ r("em", { children: Le }),
585
- " to know about you to provide better responses?"
586
- ] }),
587
- /* @__PURE__ */ r(
588
- he,
589
- {
590
- mode: "alt-system",
591
- autoCapitalize: "off",
592
- autoComplete: "off",
593
- autoCorrect: "off",
594
- name: "customInstructions",
595
- label: "Custom Instructions",
596
- value: R,
597
- onChange: (t) => {
598
- P(t.target.value);
599
- },
600
- helperText: "Press ENTER to add a new line."
601
- }
602
- )
603
- ]
604
- }
605
- ),
606
- /* @__PURE__ */ d(
607
- $,
608
- {
609
- header: "Location",
610
- className: "prose-dark dark:prose-lighter mt-4",
611
- noBorder: !0,
612
- children: [
613
- /* @__PURE__ */ r("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
614
- /* @__PURE__ */ r(
615
- he,
616
- {
617
- mode: "alt-system",
618
- name: "location",
619
- label: "Location",
620
- value: U,
621
- onChange: (t) => {
622
- h(t.target.value);
623
- },
624
- helperText: "Enter your location or press auto-detect."
625
- }
626
- ),
627
- /* @__PURE__ */ r(
628
- oe,
629
- {
630
- className: "mt-2",
631
- size: "small",
632
- noBorder: !0,
633
- variant: "secondary",
634
- disabled: f.loadingLocation,
635
- onClick: ce,
636
- children: f.loadingLocation ? "Detecting..." : "Auto-detect"
637
- }
638
- )
639
- ]
640
- }
641
- ),
642
- /* @__PURE__ */ d(
643
- $,
644
- {
645
- header: L.SETTINGS_PROMPTS.TITLE,
646
- className: "prose-dark dark:prose-lighter mt-4",
647
- noBorder: !0,
648
- children: [
649
- /* @__PURE__ */ r("p", { className: "text-sm", children: Me }),
650
- v.prompts && v.prompts.slice(0, 3).map((t) => /* @__PURE__ */ d(
651
- $,
652
- {
653
- mode: "dark",
654
- noBorder: !0,
655
- header: t.label.replace("...", ""),
656
- className: "prose-light mb-2",
657
- children: [
658
- /* @__PURE__ */ r("p", { className: "text-sm", children: t.description }),
659
- /* @__PURE__ */ r(
660
- M,
661
- {
662
- noBorder: !0,
663
- narrow: !0,
664
- mode: "dark",
665
- focusMode: "light",
666
- className: "mt-2",
667
- label: "Enabled",
668
- name: t.slot.toString(),
669
- onChange: (i) => {
670
- y({
671
- ...t,
672
- enabled: i
673
- });
674
- },
675
- checked: t.enabled
676
- }
677
- ),
678
- /* @__PURE__ */ r(
679
- M,
680
- {
681
- noBorder: !0,
682
- narrow: !0,
683
- mode: "dark",
684
- focusMode: "light",
685
- className: "mt-2",
686
- label: "Private Chat",
687
- name: `private-${t.slot.toString()}`,
688
- onChange: (i) => {
689
- y({
690
- ...t,
691
- privateChat: i
692
- });
693
- },
694
- checked: t.privateChat
695
- }
696
- ),
697
- /* @__PURE__ */ r(
698
- M,
699
- {
700
- noBorder: !0,
701
- narrow: !0,
702
- mode: "dark",
703
- focusMode: "light",
704
- className: "mt-2",
705
- label: "Use Clipboard",
706
- name: `clipboard-${t.slot.toString()}`,
707
- onChange: (i) => {
708
- y({
709
- ...t,
710
- clipboardAccess: i
711
- });
712
- },
713
- checked: t.clipboardAccess
714
- }
715
- )
716
- ]
717
- },
718
- `prompt-slot-${t.slot}`
719
- ))
720
- ]
721
- }
722
- ),
723
- /* @__PURE__ */ d(
724
- $,
725
- {
726
- header: L.SETTINGS_ADVANCED.TITLE,
727
- className: "prose-dark dark:prose-lighter mt-4 ",
728
- noBorder: !0,
729
- children: [
730
- _ && /* @__PURE__ */ d(de, { children: [
731
- /* @__PURE__ */ r("p", { className: "text-sm", children: L.SETTINGS_ADVANCED.REASONING_BUTTON_DESCRIPTION }),
732
- /* @__PURE__ */ r(
733
- M,
734
- {
735
- noBorder: !0,
736
- narrow: !0,
737
- className: "mt-2",
738
- label: "Show Reasoning Button",
739
- name: "show-reasoning-button",
740
- onChange: le,
741
- checked: g
742
- }
743
- )
744
- ] }),
745
- /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: L.SETTINGS_ADVANCED.CACHE_DESCRIPTION }),
746
- /* @__PURE__ */ r(
747
- M,
748
- {
749
- noBorder: !0,
750
- narrow: !0,
751
- className: "mt-2",
752
- label: "Enable Assets Caching",
753
- name: "enable-service-worker",
754
- onChange: ne,
755
- checked: G
756
- }
757
- ),
758
- A && /* @__PURE__ */ d("div", { className: "mt-4 p-3 border border-dashed border-neutral-700 dark:border-neutral-400 rounded @container/optimizations", children: [
759
- /* @__PURE__ */ r("h3", { className: "m-0 mb-2 text-xs uppercase opacity-70", children: "Cache Info" }),
760
- D ? /* @__PURE__ */ d("div", { className: "text-xs space-y-2", children: [
761
- /* @__PURE__ */ d("p", { className: "m-0", children: [
762
- "Version: ",
763
- /* @__PURE__ */ r("strong", { children: D.version })
764
- ] }),
765
- /* @__PURE__ */ d("p", { className: "m-0", children: [
766
- "Total Items: ",
767
- /* @__PURE__ */ r("strong", { children: D.totalItems })
768
- ] }),
769
- D.caches.map((t) => /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: t.urls.map((i) => /* @__PURE__ */ r(
770
- "li",
771
- {
772
- className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
773
- title: i,
774
- children: new URL(i).pathname
775
- },
776
- i
777
- )) }) }, t.name)),
778
- D.totalItems === 0 && !Z && /* @__PURE__ */ r("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
779
- ] }) : /* @__PURE__ */ r("p", { className: "text-xs opacity-70 m-0", children: Z ? "Loading cache info..." : "No cache info available." })
780
- ] })
781
- ]
782
- }
783
- )
784
- ]
785
- }
786
- ),
787
- /* @__PURE__ */ r(
788
- Ue,
789
- {
790
- open: V,
791
- onOpenChange: X,
792
- user: s?.username
793
- }
794
- )
795
- ] }) : null;
796
- };
797
- export {
798
- at as SettingsPanel
799
- };