@versini/sassysaint 5.5.0 → 5.5.2

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.
@@ -1,53 +1,9 @@
1
- import { jsxs as v, jsx as d, Fragment as V } from "react/jsx-runtime";
2
- import { g as ie, ACTION_RESTORE as Ne, ACTION_MESSAGE as R, ROLE_ASSISTANT as B, ACTION_RESET as de, ACTION_MODEL as se, ACTION_ENGINE as ne, ACTION_STREAMING as le, ACTION_SORT as Ee, ACTION_SEARCH as Ie, ACTION_SET_TAGS as ce, ACTION_RESET_TAGS as ge, ACTION_TOGGLE_TAG as me, ROLE_INTERNAL as G, ROLE_USER as H, isLastMessageFromRole as Ce, un as U, getMessageContaintWrapperClass as Se, MessagesContainerHeader as Re, ROLE_SYSTEM as Be, ROLE_HIDDEN as Ae, DEFAULT_AI_ENGINE as L, STATS_SEPARATOR as q, CLIPBOARD_TAG as J, TYPE_QUESTION as Me, O as Le, C as ue, SEND as Oe, ERROR_MESSAGE as ze, L as Ve, j as Ue, _ as De, LOCAL_STORAGE_PREFIX as Q, LOCAL_STORAGE_SEARCH as $e, LOCAL_STORAGE_SORT as He } from "./index.UHRCFkiB.js";
3
- import { AppContext as j, TagsContext as P, restCall as Ge, Fe as je, serviceCall as he, SERVICE_TYPES as be, E as X, HistoryContext as Pe, f as We } from "./index.CqSoo2Fx.js";
4
- import C, { useState as A, useEffect as _, lazy as Fe, useContext as z, Suspense as Z, useRef as S, useReducer as D } from "react";
5
- import s from "clsx";
6
- const Ke = ({
7
- className: e,
8
- viewBox: t,
9
- title: r,
10
- monotone: a,
11
- ...o
12
- }) => /* @__PURE__ */ v(
13
- ie,
14
- {
15
- defaultViewBox: "0 0 448 512",
16
- size: "size-5",
17
- viewBox: t,
18
- className: e,
19
- title: r || "Add",
20
- ...o,
21
- children: [
22
- /* @__PURE__ */ d(
23
- "path",
24
- {
25
- opacity: a ? "1" : "0.4",
26
- d: "M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"
27
- }
28
- ),
29
- /* @__PURE__ */ d("path", { d: "" })
30
- ]
31
- }
32
- ), Ye = ({
33
- className: e,
34
- viewBox: t,
35
- title: r,
36
- monotone: a,
37
- ...o
38
- }) => /* @__PURE__ */ d(
39
- ie,
40
- {
41
- defaultViewBox: "0 0 384 512",
42
- size: "size-5",
43
- viewBox: t,
44
- className: e,
45
- title: r || "Close",
46
- ...o,
47
- children: /* @__PURE__ */ d("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
48
- }
49
- );
50
- function qe(e) {
1
+ import { jsx as s, jsxs as f, Fragment as R } from "react/jsx-runtime";
2
+ import { ACTION_RESTORE as xe, ACTION_MESSAGE as C, ROLE_ASSISTANT as S, ACTION_RESET as Te, ACTION_MODEL as oe, ACTION_ENGINE as ie, ACTION_STREAMING as de, ACTION_SORT as _e, ACTION_SEARCH as we, ACTION_SET_TAGS as se, ACTION_RESET_TAGS as ne, ACTION_TOGGLE_TAG as le, ROLE_INTERNAL as G, ROLE_USER as D, isLastMessageFromRole as Ne, un as O, getMessageContaintWrapperClass as Ee, MessagesContainerHeader as Ie, ROLE_SYSTEM as Ce, ROLE_HIDDEN as Se, DEFAULT_AI_ENGINE as A, STATS_SEPARATOR as Y, CLIPBOARD_TAG as q, TYPE_QUESTION as Re, C as ce, SEND as Be, ERROR_MESSAGE as Ae, L as Me, j as Le, _ as Oe, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as ze, LOCAL_STORAGE_SORT as Ue } from "./index.CSNLtEls.js";
3
+ import { AppContext as H, TagsContext as j, restCall as Ve, Fe as De, NewChatButton as $e, serviceCall as ge, SERVICE_TYPES as me, E as Q, HistoryContext as Ge, f as He } from "./index.DL3JlbtG.js";
4
+ import I, { useState as B, useEffect as E, lazy as je, useContext as L, Suspense as X, useRef as $, useReducer as U } from "react";
5
+ import d from "clsx";
6
+ function Pe(e) {
51
7
  const t = e.toLowerCase().split("+").map((i) => i.trim()), r = {
52
8
  alt: t.includes("alt"),
53
9
  ctrl: t.includes("ctrl"),
@@ -60,54 +16,54 @@ function qe(e) {
60
16
  key: o
61
17
  };
62
18
  }
63
- function Je(e, t) {
64
- const { alt: r, ctrl: a, meta: o, mod: i, shift: g, key: n } = e, { altKey: l, ctrlKey: u, metaKey: h, shiftKey: p, key: c } = t;
19
+ function We(e, t) {
20
+ const { alt: r, ctrl: a, meta: o, mod: i, shift: g, key: n } = e, { altKey: l, ctrlKey: m, metaKey: b, shiftKey: h, key: c } = t;
65
21
  if (r !== l)
66
22
  return !1;
67
23
  if (i) {
68
- if (!u && !h)
24
+ if (!m && !b)
69
25
  return !1;
70
- } else if (a !== u || o !== h)
26
+ } else if (a !== m || o !== b)
71
27
  return !1;
72
- return g !== p ? !1 : !!(n && (c.toLowerCase() === n.toLowerCase() || t.code.replace("Key", "").toLowerCase() === n.toLowerCase()));
28
+ return g !== h ? !1 : !!(n && (c.toLowerCase() === n.toLowerCase() || t.code.replace("Key", "").toLowerCase() === n.toLowerCase()));
73
29
  }
74
- function Qe(e) {
75
- return (t) => Je(qe(e), t);
30
+ function Fe(e) {
31
+ return (t) => We(Pe(e), t);
76
32
  }
77
- function Xe(e) {
33
+ function Ke(e) {
78
34
  return (t) => {
79
35
  const r = "nativeEvent" in t ? t.nativeEvent : t;
80
36
  e.forEach(([a, o, i = { preventDefault: !0 }]) => {
81
- Qe(a)(r) && (i.preventDefault && t.preventDefault(), o(r));
37
+ Fe(a)(r) && (i.preventDefault && t.preventDefault(), o(r));
82
38
  });
83
39
  };
84
40
  }
85
41
  const y = [];
86
42
  for (let e = 0; e < 256; ++e)
87
43
  y.push((e + 256).toString(16).slice(1));
88
- function Ze(e, t = 0) {
44
+ function Ye(e, t = 0) {
89
45
  return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
90
46
  }
91
- let $;
92
- const et = new Uint8Array(16);
93
- function tt() {
94
- if (!$) {
47
+ let V;
48
+ const qe = new Uint8Array(16);
49
+ function Je() {
50
+ if (!V) {
95
51
  if (typeof crypto > "u" || !crypto.getRandomValues)
96
52
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
97
- $ = crypto.getRandomValues.bind(crypto);
53
+ V = crypto.getRandomValues.bind(crypto);
98
54
  }
99
- return $(et);
55
+ return V(qe);
100
56
  }
101
- const rt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ee = { randomUUID: rt };
102
- function W(e, t, r) {
103
- if (ee.randomUUID && !t && !e)
104
- return ee.randomUUID();
57
+ const Qe = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Z = { randomUUID: Qe };
58
+ function P(e, t, r) {
59
+ if (Z.randomUUID && !t && !e)
60
+ return Z.randomUUID();
105
61
  e = e || {};
106
- const a = e.random || (e.rng || tt)();
107
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ze(a);
62
+ const a = e.random || (e.rng || Je)();
63
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ye(a);
108
64
  }
109
- const at = (e, t) => {
110
- if ((t == null ? void 0 : t.type) === Ne) {
65
+ const Xe = (e, t) => {
66
+ if ((t == null ? void 0 : t.type) === xe) {
111
67
  const r = t.payload.messages.map((a) => ({
112
68
  message: {
113
69
  role: a.role,
@@ -126,7 +82,7 @@ const at = (e, t) => {
126
82
  tags: e.tags
127
83
  };
128
84
  }
129
- if ((t == null ? void 0 : t.type) === R) {
85
+ if ((t == null ? void 0 : t.type) === C) {
130
86
  const r = t.payload.message.role, a = t.payload.message.content, o = t.payload.message.name, i = t.payload.message.processingTime, g = t.payload.message.messageId;
131
87
  if (r !== "") {
132
88
  const n = {
@@ -136,25 +92,25 @@ const at = (e, t) => {
136
92
  processingTime: i,
137
93
  messageId: g
138
94
  };
139
- if (r === B) {
95
+ if (r === S) {
140
96
  const l = e.messages.findIndex(
141
- (u) => u.message.messageId === g
97
+ (m) => m.message.messageId === g
142
98
  );
143
99
  if (l !== -1) {
144
- const u = e.messages.map((h, p) => p === l ? {
100
+ const m = e.messages.map((b, h) => h === l ? {
145
101
  message: {
146
- ...h.message,
147
- content: `${h.message.content}${a}`,
102
+ ...b.message,
103
+ content: `${b.message.content}${a}`,
148
104
  processingTime: i,
149
105
  name: o
150
106
  }
151
- } : h);
107
+ } : b);
152
108
  return {
153
109
  id: e.id,
154
110
  model: e.model,
155
111
  usage: e.usage,
156
112
  isComponent: e.isComponent,
157
- messages: u,
113
+ messages: m,
158
114
  engine: e.engine,
159
115
  tags: e.tags
160
116
  };
@@ -176,15 +132,15 @@ const at = (e, t) => {
176
132
  };
177
133
  }
178
134
  }
179
- return (t == null ? void 0 : t.type) === de ? {
180
- id: W(),
135
+ return (t == null ? void 0 : t.type) === Te ? {
136
+ id: P(),
181
137
  model: e.model,
182
138
  engine: e.engine,
183
139
  usage: 0,
184
140
  messages: [],
185
141
  isComponent: e.isComponent,
186
142
  tags: e.tags
187
- } : (t == null ? void 0 : t.type) === se ? {
143
+ } : (t == null ? void 0 : t.type) === oe ? {
188
144
  id: e.id,
189
145
  model: t.payload.model,
190
146
  engine: e.engine,
@@ -192,22 +148,22 @@ const at = (e, t) => {
192
148
  usage: t.payload.usage,
193
149
  messages: e.messages,
194
150
  isComponent: e.isComponent
195
- } : (t == null ? void 0 : t.type) === ne ? {
151
+ } : (t == null ? void 0 : t.type) === ie ? {
196
152
  ...e,
197
153
  engine: t.payload.engine
198
- } : (t == null ? void 0 : t.type) === le ? {
154
+ } : (t == null ? void 0 : t.type) === de ? {
199
155
  ...e,
200
156
  streaming: t.payload.streaming
201
157
  } : e;
202
- }, ot = (e, t) => {
158
+ }, Ze = (e, t) => {
203
159
  switch (t == null ? void 0 : t.type) {
204
- case Ie:
160
+ case we:
205
161
  return {
206
162
  searchString: t.payload.searchString,
207
163
  sortedCell: e.sortedCell,
208
164
  sortDirection: e.sortDirection
209
165
  };
210
- case Ee:
166
+ case _e:
211
167
  return {
212
168
  searchString: e.searchString,
213
169
  sortedCell: t.payload.sortedCell,
@@ -216,19 +172,19 @@ const at = (e, t) => {
216
172
  default:
217
173
  return e;
218
174
  }
219
- }, it = (e, t) => {
175
+ }, et = (e, t) => {
220
176
  switch (t == null ? void 0 : t.type) {
221
- case me:
177
+ case le:
222
178
  return {
223
179
  tags: e.tags,
224
180
  tag: t.payload.tag
225
181
  };
226
- case ge:
182
+ case ne:
227
183
  return {
228
184
  tags: e.tags,
229
185
  tag: ""
230
186
  };
231
- case ce:
187
+ case se:
232
188
  return {
233
189
  tags: t.payload.tags,
234
190
  tag: ""
@@ -250,7 +206,7 @@ try {
250
206
  });
251
207
  } catch {
252
208
  }
253
- const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link", lt = ({
209
+ const tt = "av-bubble", ee = "av-button", W = "icon", rt = "button", at = "link", ot = ({
254
210
  type: e,
255
211
  size: t,
256
212
  labelRight: r,
@@ -259,20 +215,20 @@ const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link"
259
215
  }) => {
260
216
  const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3", n = "text-lg font-medium max-h-12 py-2 px-4";
261
217
  switch (e) {
262
- case st:
263
- return s({
218
+ case rt:
219
+ return d({
264
220
  [i]: t === "small",
265
221
  [g]: t === "medium",
266
222
  [n]: t === "large"
267
223
  });
268
- case nt:
269
- return s("text-center", {
224
+ case at:
225
+ return d("text-center", {
270
226
  [i]: t === "small",
271
227
  [g]: t === "medium",
272
228
  [n]: t === "large"
273
229
  });
274
- case F:
275
- return s("inline-flex items-center", {
230
+ case W:
231
+ return d("inline-flex items-center", {
276
232
  "justify-center": o === "center",
277
233
  "justify-start": o === "left",
278
234
  "justify-end": o === "right",
@@ -284,7 +240,7 @@ const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link"
284
240
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
285
241
  });
286
242
  }
287
- }, ct = ({
243
+ }, it = ({
288
244
  mode: e,
289
245
  noBackground: t,
290
246
  noTruncate: r,
@@ -292,13 +248,13 @@ const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link"
292
248
  radius: o
293
249
  }) => {
294
250
  if (t)
295
- return s("not-prose", {
251
+ return d("not-prose", {
296
252
  "rounded-full": o === "large",
297
253
  "rounded-md": o === "medium",
298
254
  "rounded-sm": o === "small"
299
255
  });
300
256
  if (a === "primary")
301
- return s("not-prose", {
257
+ return d("not-prose", {
302
258
  "rounded-full": o === "large",
303
259
  "rounded-md": o === "medium",
304
260
  "rounded-sm": o === "small",
@@ -309,7 +265,7 @@ const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link"
309
265
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
310
266
  });
311
267
  if (a === "secondary")
312
- return s("not-prose", {
268
+ return d("not-prose", {
313
269
  "rounded-full": o === "large",
314
270
  "rounded-md": o === "medium",
315
271
  "rounded-sm": o === "small",
@@ -320,7 +276,7 @@ const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link"
320
276
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
321
277
  });
322
278
  if (a === "danger")
323
- return s("not-prose", {
279
+ return d("not-prose", {
324
280
  "rounded-full": o === "large",
325
281
  "rounded-md": o === "medium",
326
282
  "rounded-sm": o === "small",
@@ -331,7 +287,7 @@ const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link"
331
287
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
332
288
  });
333
289
  if (a === "selected")
334
- return s("not-prose", {
290
+ return d("not-prose", {
335
291
  "rounded-full": o === "large",
336
292
  "rounded-md": o === "medium",
337
293
  "rounded-sm": o === "small",
@@ -341,7 +297,7 @@ const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link"
341
297
  "bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
342
298
  "bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
343
299
  });
344
- }, gt = ({
300
+ }, dt = ({
345
301
  mode: e,
346
302
  disabled: t,
347
303
  variant: r
@@ -349,34 +305,34 @@ const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link"
349
305
  if (t)
350
306
  return "";
351
307
  if (r === "primary")
352
- return s("hover:text-copy-light-hover", {
308
+ return d("hover:text-copy-light-hover", {
353
309
  "hover:bg-action-dark-hover": e === "dark",
354
310
  "hover:bg-action-light-hover": e === "light",
355
311
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
356
312
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
357
313
  });
358
314
  if (r === "secondary")
359
- return s("hover:text-copy-light-hover", {
315
+ return d("hover:text-copy-light-hover", {
360
316
  "hover:bg-action-dark-hover": e === "light",
361
317
  "hover:bg-action-light-hover": e === "dark",
362
318
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
363
319
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
364
320
  });
365
321
  if (r === "danger")
366
- return s("hover:text-copy-light-hover", {
322
+ return d("hover:text-copy-light-hover", {
367
323
  "hover:bg-action-danger-dark-hover": e === "dark",
368
324
  "hover:bg-action-danger-light-hover": e === "light",
369
325
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
370
326
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
371
327
  });
372
328
  if (r === "selected")
373
- return s("hover:text-copy-light-hover", {
329
+ return d("hover:text-copy-light-hover", {
374
330
  "hover:bg-action-selected-dark-hover": e === "dark",
375
331
  "hover:bg-action-selected-light-hover": e === "light",
376
332
  "hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
377
333
  "hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
378
334
  });
379
- }, mt = ({
335
+ }, st = ({
380
336
  mode: e,
381
337
  disabled: t,
382
338
  variant: r
@@ -384,34 +340,34 @@ const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link"
384
340
  if (t)
385
341
  return "";
386
342
  if (r === "primary")
387
- return s("active:text-copy-light-active", {
343
+ return d("active:text-copy-light-active", {
388
344
  "active:bg-action-dark-active": e === "dark",
389
345
  "active:bg-action-light-active": e === "light",
390
346
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
391
347
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
392
348
  });
393
349
  if (r === "secondary")
394
- return s("active:text-copy-light-active", {
350
+ return d("active:text-copy-light-active", {
395
351
  "active:bg-action-dark-active": e === "light",
396
352
  "active:bg-action-light-active": e === "dark",
397
353
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
398
354
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
399
355
  });
400
356
  if (r === "danger")
401
- return s("active:text-copy-lighter-active", {
357
+ return d("active:text-copy-lighter-active", {
402
358
  "active:bg-action-danger-dark-active": e === "dark",
403
359
  "active:bg-action-danger-light-active": e === "light",
404
360
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
405
361
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
406
362
  });
407
363
  if (r === "selected")
408
- return s("active:text-copy-lighter-active", {
364
+ return d("active:text-copy-lighter-active", {
409
365
  "active:bg-action-selected-dark-active": e === "dark",
410
366
  "active:bg-action-selected-light-active": e === "light",
411
367
  "active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
412
368
  "active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
413
369
  });
414
- }, ut = ({
370
+ }, nt = ({
415
371
  mode: e,
416
372
  noBorder: t,
417
373
  variant: r
@@ -419,41 +375,41 @@ const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link"
419
375
  if (t)
420
376
  return "border border-transparent";
421
377
  if (r === "primary")
422
- return s("border", {
378
+ return d("border", {
423
379
  "border-border-dark": e === "dark",
424
380
  "border-border-accent": e === "light",
425
381
  "border-border-dark dark:border-border-accent": e === "system",
426
382
  "border-border-accent dark:border-border-dark": e === "alt-system"
427
383
  });
428
384
  if (r === "secondary")
429
- return s("border", {
385
+ return d("border", {
430
386
  "border-border-dark": e === "light",
431
387
  "border-border-accent": e === "dark",
432
388
  "border-border-dark dark:border-border-accent": e === "alt-system",
433
389
  "border-border-accent dark:border-border-dark": e === "system"
434
390
  });
435
391
  if (r === "danger")
436
- return s("border", {
392
+ return d("border", {
437
393
  "border-border-danger-dark": e === "dark",
438
394
  "border-border-danger-medium": e === "light",
439
395
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
440
396
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
441
397
  });
442
398
  if (r === "selected")
443
- return s("border", {
399
+ return d("border", {
444
400
  "border-border-selected-dark": e === "dark",
445
401
  "border-border-selected-medium": e === "light",
446
402
  "border-border-selected-dark dark:border-border-selected-medium": e === "system",
447
403
  "border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
448
404
  });
449
- }, ht = ({
405
+ }, lt = ({
450
406
  focusMode: e
451
- }) => s("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
407
+ }) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
452
408
  "focus:outline-focus-dark": e === "dark",
453
409
  "focus:outline-focus-light": e === "light",
454
410
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
455
411
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
456
- }), pe = ({
412
+ }), ue = ({
457
413
  type: e,
458
414
  className: t,
459
415
  raw: r,
@@ -463,56 +419,56 @@ const dt = "av-bubble", te = "av-button", F = "icon", st = "button", nt = "link"
463
419
  fullWidth: g,
464
420
  size: n,
465
421
  noBorder: l,
466
- labelRight: u,
467
- labelLeft: h,
468
- noBackground: p,
422
+ labelRight: m,
423
+ labelLeft: b,
424
+ noBackground: h,
469
425
  variant: c,
470
- noTruncate: b,
471
- align: m,
472
- radius: f
473
- }) => (c || (c = "primary"), r ? s(te, t) : s(
474
- te,
475
- ct({
426
+ noTruncate: u,
427
+ align: p,
428
+ radius: v
429
+ }) => (c || (c = "primary"), r ? d(ee, t) : d(
430
+ ee,
431
+ it({
476
432
  mode: a,
477
433
  variant: c,
478
- noBackground: p,
479
- noTruncate: b,
480
- radius: f
434
+ noBackground: h,
435
+ noTruncate: u,
436
+ radius: v
481
437
  }),
482
- lt({
438
+ ot({
483
439
  type: e,
484
440
  size: n,
485
- labelRight: u,
486
- labelLeft: h,
487
- align: m
441
+ labelRight: m,
442
+ labelLeft: b,
443
+ align: p
488
444
  }),
489
- ut({ mode: a, variant: c, noBorder: l }),
490
- ht({ focusMode: o }),
491
- gt({ mode: a, variant: c, disabled: i }),
492
- mt({ mode: a, variant: c, disabled: i }),
445
+ nt({ mode: a, variant: c, noBorder: l }),
446
+ lt({ focusMode: o }),
447
+ dt({ mode: a, variant: c, disabled: i }),
448
+ st({ mode: a, variant: c, disabled: i }),
493
449
  {
494
450
  "w-full": g,
495
451
  "disabled:cursor-not-allowed disabled:opacity-50": i
496
452
  },
497
453
  t
498
- )), bt = (e, t, r) => {
454
+ )), ct = (e, t, r) => {
499
455
  var a;
500
456
  !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);
501
- }, K = C.forwardRef((e, t) => {
457
+ }, F = I.forwardRef((e, t) => {
502
458
  const { onClick: r, noInternalClick: a = !1, ...o } = e;
503
- return /* @__PURE__ */ d(
459
+ return /* @__PURE__ */ s(
504
460
  "button",
505
461
  {
506
462
  ref: t,
507
463
  onClick: (i) => {
508
- bt(i, a, r);
464
+ ct(i, a, r);
509
465
  },
510
466
  ...o
511
467
  }
512
468
  );
513
469
  });
514
- K.displayName = "BaseButton";
515
- const ye = C.forwardRef(
470
+ F.displayName = "BaseButton";
471
+ const he = I.forwardRef(
516
472
  ({
517
473
  children: e,
518
474
  disabled: t = !1,
@@ -523,18 +479,18 @@ const ye = C.forwardRef(
523
479
  type: g = "button",
524
480
  raw: n = !1,
525
481
  noBorder: l = !1,
526
- "aria-label": u,
527
- label: h,
528
- size: p = "medium",
482
+ "aria-label": m,
483
+ label: b,
484
+ size: h = "medium",
529
485
  labelRight: c,
530
- labelLeft: b,
531
- noBackground: m = !1,
532
- align: f = "center",
533
- radius: k = "large",
534
- ...x
535
- }, w) => {
536
- const N = pe({
537
- type: F,
486
+ labelLeft: u,
487
+ noBackground: p = !1,
488
+ align: v = "center",
489
+ radius: _ = "large",
490
+ ...w
491
+ }, k) => {
492
+ const x = ue({
493
+ type: W,
538
494
  mode: r,
539
495
  focusMode: a,
540
496
  fullWidth: o,
@@ -542,37 +498,37 @@ const ye = C.forwardRef(
542
498
  raw: n,
543
499
  className: i,
544
500
  noBorder: l,
545
- size: p,
501
+ size: h,
546
502
  labelRight: c,
547
- labelLeft: b,
548
- noBackground: m,
549
- align: f,
550
- radius: k
551
- }), E = s({
503
+ labelLeft: u,
504
+ noBackground: p,
505
+ align: v,
506
+ radius: _
507
+ }), N = d({
552
508
  "text-copy-accent-dark": r === "light" && !n,
553
509
  "text-copy-light": r === "dark" && !n,
554
510
  "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !n,
555
511
  "text-copy-light dark:text-copy-accent-dark": r === "system" && !n
556
512
  });
557
- return /* @__PURE__ */ v(
558
- K,
513
+ return /* @__PURE__ */ f(
514
+ F,
559
515
  {
560
- ref: w,
561
- className: N,
516
+ ref: k,
517
+ className: x,
562
518
  disabled: t,
563
519
  type: g,
564
- "aria-label": u || h,
565
- ...x,
520
+ "aria-label": m || b,
521
+ ...w,
566
522
  children: [
567
- b && /* @__PURE__ */ d("span", { className: "pr-2", children: b }),
568
- /* @__PURE__ */ d("div", { className: E, children: e }),
569
- c && /* @__PURE__ */ d("span", { className: "pl-2", children: c })
523
+ u && /* @__PURE__ */ s("span", { className: "pr-2", children: u }),
524
+ /* @__PURE__ */ s("div", { className: N, children: e }),
525
+ c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
570
526
  ]
571
527
  }
572
528
  );
573
529
  }
574
530
  );
575
- ye.displayName = "ButtonIcon";
531
+ he.displayName = "ButtonIcon";
576
532
  /*!
577
533
  @versini/ui-button v3.2.0
578
534
  © 2024 gizmette.com
@@ -586,7 +542,7 @@ try {
586
542
  });
587
543
  } catch {
588
544
  }
589
- const pt = C.forwardRef(
545
+ const gt = I.forwardRef(
590
546
  ({
591
547
  children: e,
592
548
  disabled: t = !1,
@@ -597,19 +553,19 @@ const pt = C.forwardRef(
597
553
  type: g = "button",
598
554
  raw: n = !1,
599
555
  noBorder: l = !1,
600
- "aria-label": u,
601
- label: h,
602
- size: p = "medium",
556
+ "aria-label": m,
557
+ label: b,
558
+ size: h = "medium",
603
559
  labelRight: c,
604
- labelLeft: b,
605
- noBackground: m = !1,
606
- align: f = "center",
607
- active: k = !1,
608
- radius: x = "large",
609
- ...w
610
- }, N) => {
611
- const E = pe({
612
- type: F,
560
+ labelLeft: u,
561
+ noBackground: p = !1,
562
+ align: v = "center",
563
+ active: _ = !1,
564
+ radius: w = "large",
565
+ ...k
566
+ }, x) => {
567
+ const N = ue({
568
+ type: W,
613
569
  mode: r,
614
570
  focusMode: a,
615
571
  fullWidth: o,
@@ -617,18 +573,18 @@ const pt = C.forwardRef(
617
573
  raw: n,
618
574
  className: i,
619
575
  noBorder: l,
620
- size: p,
576
+ size: h,
621
577
  labelRight: c,
622
- labelLeft: b,
623
- noBackground: m,
624
- align: f,
625
- radius: x
626
- }), T = s({
578
+ labelLeft: u,
579
+ noBackground: p,
580
+ align: v,
581
+ radius: w
582
+ }), T = d({
627
583
  "text-copy-accent-dark": r === "light" && !n,
628
584
  "text-copy-light": r === "dark" && !n,
629
585
  "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !n,
630
586
  "text-copy-light dark:text-copy-accent-dark": r === "system" && !n
631
- }), I = k ? s(
587
+ }), z = _ ? d(
632
588
  "relative",
633
589
  "focus-within:static",
634
590
  "focus-within:after:border-transparent",
@@ -645,26 +601,26 @@ const pt = C.forwardRef(
645
601
  "after:border-table-light dark:after:border-table-dark": r === "alt-system"
646
602
  }
647
603
  ) : "";
648
- return /* @__PURE__ */ d("div", { className: I, children: /* @__PURE__ */ v(
649
- K,
604
+ return /* @__PURE__ */ s("div", { className: z, children: /* @__PURE__ */ f(
605
+ F,
650
606
  {
651
- ref: N,
652
- className: E,
607
+ ref: x,
608
+ className: N,
653
609
  disabled: t,
654
610
  type: g,
655
- "aria-label": u || h,
656
- ...w,
611
+ "aria-label": m || b,
612
+ ...k,
657
613
  children: [
658
- b && /* @__PURE__ */ d("span", { className: "pr-2", children: b }),
659
- /* @__PURE__ */ d("div", { className: T, children: e }),
660
- c && /* @__PURE__ */ d("span", { className: "pl-2", children: c })
614
+ u && /* @__PURE__ */ s("span", { className: "pr-2", children: u }),
615
+ /* @__PURE__ */ s("div", { className: T, children: e }),
616
+ c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
661
617
  ]
662
618
  }
663
619
  ) });
664
620
  }
665
621
  );
666
- pt.displayName = "ButtonSort";
667
- const fe = ({
622
+ gt.displayName = "ButtonSort";
623
+ const be = ({
668
624
  children: e,
669
625
  fill: t,
670
626
  viewBox: r,
@@ -675,13 +631,13 @@ const fe = ({
675
631
  semantic: n = !1,
676
632
  ...l
677
633
  }) => {
678
- const u = s(i, a);
679
- return /* @__PURE__ */ v(V, { children: [
680
- /* @__PURE__ */ d(
634
+ const m = d(i, a);
635
+ return /* @__PURE__ */ f(R, { children: [
636
+ /* @__PURE__ */ s(
681
637
  "svg",
682
638
  {
683
639
  xmlns: "http://www.w3.org/2000/svg",
684
- className: u,
640
+ className: m,
685
641
  viewBox: r || o,
686
642
  fill: t || "currentColor",
687
643
  role: "img",
@@ -691,7 +647,7 @@ const fe = ({
691
647
  children: e
692
648
  }
693
649
  ),
694
- g && n && /* @__PURE__ */ d("span", { className: "sr-only", children: g })
650
+ g && n && /* @__PURE__ */ s("span", { className: "sr-only", children: g })
695
651
  ] });
696
652
  };
697
653
  /*!
@@ -707,14 +663,14 @@ try {
707
663
  });
708
664
  } catch {
709
665
  }
710
- const yt = ({
666
+ const mt = ({
711
667
  className: e,
712
668
  viewBox: t,
713
669
  title: r,
714
670
  monotone: a,
715
671
  ...o
716
- }) => /* @__PURE__ */ v(
717
- fe,
672
+ }) => /* @__PURE__ */ f(
673
+ be,
718
674
  {
719
675
  defaultViewBox: "0 0 448 512",
720
676
  size: "size-5",
@@ -723,24 +679,24 @@ const yt = ({
723
679
  title: r || "Copied",
724
680
  ...o,
725
681
  children: [
726
- /* @__PURE__ */ d(
682
+ /* @__PURE__ */ s(
727
683
  "path",
728
684
  {
729
685
  opacity: "0.4",
730
686
  d: "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM337 209L209 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 0s9.4 24.6 0 33.9z"
731
687
  }
732
688
  ),
733
- /* @__PURE__ */ d("path", { 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" })
689
+ /* @__PURE__ */ s("path", { 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" })
734
690
  ]
735
691
  }
736
- ), ft = ({
692
+ ), ut = ({
737
693
  className: e,
738
694
  viewBox: t,
739
695
  title: r,
740
696
  monotone: a,
741
697
  ...o
742
- }) => /* @__PURE__ */ d(
743
- fe,
698
+ }) => /* @__PURE__ */ s(
699
+ be,
744
700
  {
745
701
  defaultViewBox: "0 0 512 512",
746
702
  size: "size-5",
@@ -748,7 +704,7 @@ const yt = ({
748
704
  className: e,
749
705
  title: r || "Copy",
750
706
  ...o,
751
- children: /* @__PURE__ */ d("path", { d: "M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z" })
707
+ children: /* @__PURE__ */ s("path", { d: "M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z" })
752
708
  }
753
709
  );
754
710
  /*!
@@ -764,35 +720,35 @@ try {
764
720
  });
765
721
  } catch {
766
722
  }
767
- const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) => s({
723
+ const ht = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", bt = ({ kind: e }) => d({
768
724
  "bg-surface-lighter dark:bg-surface-dark": e === "left",
769
725
  "bg-surface-accent": e === "right"
770
- }), xt = ({ kind: e }) => s(
726
+ }), pt = ({ kind: e }) => d(
771
727
  "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",
772
728
  {
773
729
  "text-copy-lighter": e === "right"
774
730
  }
775
- ), Tt = ({ kind: e }) => s("rounded-b-xl", {
731
+ ), yt = ({ kind: e }) => d("rounded-b-xl", {
776
732
  "rounded-tr-xl": e === "left",
777
733
  "rounded-tl-xl": e === "right"
778
- }), _t = ({
734
+ }), vt = ({
779
735
  kind: e,
780
736
  className: t
781
737
  }) => {
782
- const r = s(
783
- dt,
738
+ const r = d(
739
+ tt,
784
740
  "flex items-start",
785
741
  {
786
742
  "flex-row-reverse": e === "right"
787
743
  },
788
744
  t
789
- ), a = s(
745
+ ), a = d(
790
746
  "flex flex-col empty:hidden",
791
- vt(),
792
- xt({ kind: e }),
793
- kt({ kind: e }),
794
- Tt({ kind: e })
795
- ), o = "pr-2 pt-1 text-end text-xs text-copy-light", i = s("flex flex-col-reverse gap-2 sm:flex-row", {
747
+ ht(),
748
+ pt({ kind: e }),
749
+ bt({ kind: e }),
750
+ yt({ kind: e })
751
+ ), o = "pr-2 pt-1 text-end text-xs text-copy-light", i = d("flex flex-col-reverse gap-2 sm:flex-row", {
796
752
  "ml-2": e === "left",
797
753
  "mr-2": e === "right"
798
754
  });
@@ -802,7 +758,7 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
802
758
  footer: o,
803
759
  copyButton: i
804
760
  };
805
- }, wt = ({
761
+ }, ft = ({
806
762
  children: e,
807
763
  kind: t = "left",
808
764
  className: r,
@@ -812,28 +768,28 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
812
768
  copyToClipboardFocusMode: g = "system",
813
769
  copyToClipboardMode: n = "system"
814
770
  }) => {
815
- const [l, u] = A(!1), h = _t({ kind: t, className: r }), p = !!i && (typeof i == "function" || typeof i == "string" || typeof e == "string"), c = () => {
816
- u(!0), typeof i == "function" ? i(e) : typeof i == "string" ? navigator.clipboard.writeText(i) : typeof e == "string" && navigator.clipboard.writeText(e);
771
+ const [l, m] = B(!1), b = vt({ kind: t, className: r }), h = !!i && (typeof i == "function" || typeof i == "string" || typeof e == "string"), c = () => {
772
+ m(!0), typeof i == "function" ? i(e) : typeof i == "string" ? navigator.clipboard.writeText(i) : typeof e == "string" && navigator.clipboard.writeText(e);
817
773
  };
818
- return _(() => {
819
- let b;
820
- return l && (b = window.setTimeout(() => {
821
- u(!1);
774
+ return E(() => {
775
+ let u;
776
+ return l && (u = window.setTimeout(() => {
777
+ m(!1);
822
778
  }, 3e3)), () => {
823
- clearTimeout(b);
779
+ clearTimeout(u);
824
780
  };
825
- }, [l]), /* @__PURE__ */ v("div", { className: h.wrapper, children: [
826
- /* @__PURE__ */ v("div", { children: [
827
- /* @__PURE__ */ d("div", { className: h.main, children: e }),
828
- a && Object.keys(a).map((b) => a[b] ? /* @__PURE__ */ d("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: h.footer, children: [
829
- b,
781
+ }, [l]), /* @__PURE__ */ f("div", { className: b.wrapper, children: [
782
+ /* @__PURE__ */ f("div", { children: [
783
+ /* @__PURE__ */ s("div", { className: b.main, children: e }),
784
+ a && Object.keys(a).map((u) => a[u] ? /* @__PURE__ */ s("div", { className: "prose-p:m-0", children: /* @__PURE__ */ f("p", { className: b.footer, children: [
785
+ u,
830
786
  ": ",
831
- a[b]
832
- ] }) }, `-${b}`) : null),
787
+ a[u]
788
+ ] }) }, `-${u}`) : null),
833
789
  o && o
834
790
  ] }),
835
- p && /* @__PURE__ */ d("div", { className: h.copyButton, children: /* @__PURE__ */ d(
836
- ye,
791
+ h && /* @__PURE__ */ s("div", { className: b.copyButton, children: /* @__PURE__ */ s(
792
+ he,
837
793
  {
838
794
  noBorder: !0,
839
795
  noBackground: !0,
@@ -843,11 +799,11 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
843
799
  label: l ? "Copied to clipboard" : "Copy to clipboard",
844
800
  onClick: c,
845
801
  disabled: l,
846
- children: l ? /* @__PURE__ */ d(yt, { size: "size-3" }) : /* @__PURE__ */ d(ft, { size: "size-3" })
802
+ children: l ? /* @__PURE__ */ s(mt, { size: "size-3" }) : /* @__PURE__ */ s(ut, { size: "size-3" })
847
803
  }
848
804
  ) })
849
805
  ] });
850
- }, re = "av-button", ve = "icon", ke = "button", Nt = "link", Et = ({
806
+ }, te = "av-button", pe = "icon", ye = "button", kt = "link", xt = ({
851
807
  type: e,
852
808
  size: t,
853
809
  labelRight: r,
@@ -856,20 +812,20 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
856
812
  }) => {
857
813
  const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3", n = "text-lg font-medium max-h-12 py-2 px-4";
858
814
  switch (e) {
859
- case ke:
860
- return s({
815
+ case ye:
816
+ return d({
861
817
  [i]: t === "small",
862
818
  [g]: t === "medium",
863
819
  [n]: t === "large"
864
820
  });
865
- case Nt:
866
- return s("text-center", {
821
+ case kt:
822
+ return d("text-center", {
867
823
  [i]: t === "small",
868
824
  [g]: t === "medium",
869
825
  [n]: t === "large"
870
826
  });
871
- case ve:
872
- return s("inline-flex items-center", {
827
+ case pe:
828
+ return d("inline-flex items-center", {
873
829
  "justify-center": o === "center",
874
830
  "justify-start": o === "left",
875
831
  "justify-end": o === "right",
@@ -881,7 +837,7 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
881
837
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
882
838
  });
883
839
  }
884
- }, It = ({
840
+ }, Tt = ({
885
841
  mode: e,
886
842
  noBackground: t,
887
843
  noTruncate: r,
@@ -889,13 +845,13 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
889
845
  radius: o
890
846
  }) => {
891
847
  if (t)
892
- return s("not-prose", {
848
+ return d("not-prose", {
893
849
  "rounded-full": o === "large",
894
850
  "rounded-md": o === "medium",
895
851
  "rounded-sm": o === "small"
896
852
  });
897
853
  if (a === "primary")
898
- return s("not-prose", {
854
+ return d("not-prose", {
899
855
  "rounded-full": o === "large",
900
856
  "rounded-md": o === "medium",
901
857
  "rounded-sm": o === "small",
@@ -906,7 +862,7 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
906
862
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
907
863
  });
908
864
  if (a === "secondary")
909
- return s("not-prose", {
865
+ return d("not-prose", {
910
866
  "rounded-full": o === "large",
911
867
  "rounded-md": o === "medium",
912
868
  "rounded-sm": o === "small",
@@ -917,7 +873,7 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
917
873
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
918
874
  });
919
875
  if (a === "danger")
920
- return s("not-prose", {
876
+ return d("not-prose", {
921
877
  "rounded-full": o === "large",
922
878
  "rounded-md": o === "medium",
923
879
  "rounded-sm": o === "small",
@@ -928,7 +884,7 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
928
884
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
929
885
  });
930
886
  if (a === "selected")
931
- return s("not-prose", {
887
+ return d("not-prose", {
932
888
  "rounded-full": o === "large",
933
889
  "rounded-md": o === "medium",
934
890
  "rounded-sm": o === "small",
@@ -938,7 +894,7 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
938
894
  "bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
939
895
  "bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
940
896
  });
941
- }, Ct = ({
897
+ }, _t = ({
942
898
  mode: e,
943
899
  disabled: t,
944
900
  variant: r
@@ -946,34 +902,34 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
946
902
  if (t)
947
903
  return "";
948
904
  if (r === "primary")
949
- return s("hover:text-copy-light-hover", {
905
+ return d("hover:text-copy-light-hover", {
950
906
  "hover:bg-action-dark-hover": e === "dark",
951
907
  "hover:bg-action-light-hover": e === "light",
952
908
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
953
909
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
954
910
  });
955
911
  if (r === "secondary")
956
- return s("hover:text-copy-light-hover", {
912
+ return d("hover:text-copy-light-hover", {
957
913
  "hover:bg-action-dark-hover": e === "light",
958
914
  "hover:bg-action-light-hover": e === "dark",
959
915
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
960
916
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
961
917
  });
962
918
  if (r === "danger")
963
- return s("hover:text-copy-light-hover", {
919
+ return d("hover:text-copy-light-hover", {
964
920
  "hover:bg-action-danger-dark-hover": e === "dark",
965
921
  "hover:bg-action-danger-light-hover": e === "light",
966
922
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
967
923
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
968
924
  });
969
925
  if (r === "selected")
970
- return s("hover:text-copy-light-hover", {
926
+ return d("hover:text-copy-light-hover", {
971
927
  "hover:bg-action-selected-dark-hover": e === "dark",
972
928
  "hover:bg-action-selected-light-hover": e === "light",
973
929
  "hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
974
930
  "hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
975
931
  });
976
- }, St = ({
932
+ }, wt = ({
977
933
  mode: e,
978
934
  disabled: t,
979
935
  variant: r
@@ -981,34 +937,34 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
981
937
  if (t)
982
938
  return "";
983
939
  if (r === "primary")
984
- return s("active:text-copy-light-active", {
940
+ return d("active:text-copy-light-active", {
985
941
  "active:bg-action-dark-active": e === "dark",
986
942
  "active:bg-action-light-active": e === "light",
987
943
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
988
944
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
989
945
  });
990
946
  if (r === "secondary")
991
- return s("active:text-copy-light-active", {
947
+ return d("active:text-copy-light-active", {
992
948
  "active:bg-action-dark-active": e === "light",
993
949
  "active:bg-action-light-active": e === "dark",
994
950
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
995
951
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
996
952
  });
997
953
  if (r === "danger")
998
- return s("active:text-copy-lighter-active", {
954
+ return d("active:text-copy-lighter-active", {
999
955
  "active:bg-action-danger-dark-active": e === "dark",
1000
956
  "active:bg-action-danger-light-active": e === "light",
1001
957
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
1002
958
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
1003
959
  });
1004
960
  if (r === "selected")
1005
- return s("active:text-copy-lighter-active", {
961
+ return d("active:text-copy-lighter-active", {
1006
962
  "active:bg-action-selected-dark-active": e === "dark",
1007
963
  "active:bg-action-selected-light-active": e === "light",
1008
964
  "active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
1009
965
  "active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
1010
966
  });
1011
- }, Rt = ({
967
+ }, Nt = ({
1012
968
  mode: e,
1013
969
  noBorder: t,
1014
970
  variant: r
@@ -1016,41 +972,41 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
1016
972
  if (t)
1017
973
  return "border border-transparent";
1018
974
  if (r === "primary")
1019
- return s("border", {
975
+ return d("border", {
1020
976
  "border-border-dark": e === "dark",
1021
977
  "border-border-accent": e === "light",
1022
978
  "border-border-dark dark:border-border-accent": e === "system",
1023
979
  "border-border-accent dark:border-border-dark": e === "alt-system"
1024
980
  });
1025
981
  if (r === "secondary")
1026
- return s("border", {
982
+ return d("border", {
1027
983
  "border-border-dark": e === "light",
1028
984
  "border-border-accent": e === "dark",
1029
985
  "border-border-dark dark:border-border-accent": e === "alt-system",
1030
986
  "border-border-accent dark:border-border-dark": e === "system"
1031
987
  });
1032
988
  if (r === "danger")
1033
- return s("border", {
989
+ return d("border", {
1034
990
  "border-border-danger-dark": e === "dark",
1035
991
  "border-border-danger-medium": e === "light",
1036
992
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
1037
993
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
1038
994
  });
1039
995
  if (r === "selected")
1040
- return s("border", {
996
+ return d("border", {
1041
997
  "border-border-selected-dark": e === "dark",
1042
998
  "border-border-selected-medium": e === "light",
1043
999
  "border-border-selected-dark dark:border-border-selected-medium": e === "system",
1044
1000
  "border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
1045
1001
  });
1046
- }, Bt = ({
1002
+ }, Et = ({
1047
1003
  focusMode: e
1048
- }) => s("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1004
+ }) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1049
1005
  "focus:outline-focus-dark": e === "dark",
1050
1006
  "focus:outline-focus-light": e === "light",
1051
1007
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1052
1008
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1053
- }), xe = ({
1009
+ }), ve = ({
1054
1010
  type: e,
1055
1011
  className: t,
1056
1012
  raw: r,
@@ -1060,56 +1016,56 @@ const vt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", kt = ({ kind: e }) =>
1060
1016
  fullWidth: g,
1061
1017
  size: n,
1062
1018
  noBorder: l,
1063
- labelRight: u,
1064
- labelLeft: h,
1065
- noBackground: p,
1019
+ labelRight: m,
1020
+ labelLeft: b,
1021
+ noBackground: h,
1066
1022
  variant: c,
1067
- noTruncate: b,
1068
- align: m,
1069
- radius: f
1070
- }) => (c || (c = "primary"), r ? s(re, t) : s(
1071
- re,
1072
- It({
1023
+ noTruncate: u,
1024
+ align: p,
1025
+ radius: v
1026
+ }) => (c || (c = "primary"), r ? d(te, t) : d(
1027
+ te,
1028
+ Tt({
1073
1029
  mode: a,
1074
1030
  variant: c,
1075
- noBackground: p,
1076
- noTruncate: b,
1077
- radius: f
1031
+ noBackground: h,
1032
+ noTruncate: u,
1033
+ radius: v
1078
1034
  }),
1079
- Et({
1035
+ xt({
1080
1036
  type: e,
1081
1037
  size: n,
1082
- labelRight: u,
1083
- labelLeft: h,
1084
- align: m
1038
+ labelRight: m,
1039
+ labelLeft: b,
1040
+ align: p
1085
1041
  }),
1086
- Rt({ mode: a, variant: c, noBorder: l }),
1087
- Bt({ focusMode: o }),
1088
- Ct({ mode: a, variant: c, disabled: i }),
1089
- St({ mode: a, variant: c, disabled: i }),
1042
+ Nt({ mode: a, variant: c, noBorder: l }),
1043
+ Et({ focusMode: o }),
1044
+ _t({ mode: a, variant: c, disabled: i }),
1045
+ wt({ mode: a, variant: c, disabled: i }),
1090
1046
  {
1091
1047
  "w-full": g,
1092
1048
  "disabled:cursor-not-allowed disabled:opacity-50": i
1093
1049
  },
1094
1050
  t
1095
- )), At = (e, t, r) => {
1051
+ )), It = (e, t, r) => {
1096
1052
  var a;
1097
1053
  !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);
1098
- }, Y = C.forwardRef((e, t) => {
1054
+ }, K = I.forwardRef((e, t) => {
1099
1055
  const { onClick: r, noInternalClick: a = !1, ...o } = e;
1100
- return /* @__PURE__ */ d(
1056
+ return /* @__PURE__ */ s(
1101
1057
  "button",
1102
1058
  {
1103
1059
  ref: t,
1104
1060
  onClick: (i) => {
1105
- At(i, a, r);
1061
+ It(i, a, r);
1106
1062
  },
1107
1063
  ...o
1108
1064
  }
1109
1065
  );
1110
1066
  });
1111
- Y.displayName = "BaseButton";
1112
- const Te = C.forwardRef(
1067
+ K.displayName = "BaseButton";
1068
+ const fe = I.forwardRef(
1113
1069
  ({
1114
1070
  children: e,
1115
1071
  disabled: t = !1,
@@ -1120,13 +1076,13 @@ const Te = C.forwardRef(
1120
1076
  size: g = "medium",
1121
1077
  raw: n = !1,
1122
1078
  noBorder: l = !1,
1123
- variant: u = "primary",
1124
- noTruncate: h = !1,
1125
- radius: p = "large",
1079
+ variant: m = "primary",
1080
+ noTruncate: b = !1,
1081
+ radius: h = "large",
1126
1082
  ...c
1127
- }, b) => {
1128
- const m = xe({
1129
- type: ke,
1083
+ }, u) => {
1084
+ const p = ve({
1085
+ type: ye,
1130
1086
  mode: r,
1131
1087
  focusMode: a,
1132
1088
  fullWidth: o,
@@ -1135,15 +1091,15 @@ const Te = C.forwardRef(
1135
1091
  className: i,
1136
1092
  size: g,
1137
1093
  noBorder: l,
1138
- variant: u,
1139
- noTruncate: h,
1140
- radius: p
1094
+ variant: m,
1095
+ noTruncate: b,
1096
+ radius: h
1141
1097
  });
1142
- return /* @__PURE__ */ d(
1143
- Y,
1098
+ return /* @__PURE__ */ s(
1099
+ K,
1144
1100
  {
1145
- ref: b,
1146
- className: m,
1101
+ ref: u,
1102
+ className: p,
1147
1103
  disabled: t,
1148
1104
  ...c,
1149
1105
  children: e
@@ -1151,7 +1107,7 @@ const Te = C.forwardRef(
1151
1107
  );
1152
1108
  }
1153
1109
  );
1154
- Te.displayName = "Button";
1110
+ fe.displayName = "Button";
1155
1111
  /*!
1156
1112
  @versini/ui-button v3.2.0
1157
1113
  © 2024 gizmette.com
@@ -1165,7 +1121,7 @@ try {
1165
1121
  });
1166
1122
  } catch {
1167
1123
  }
1168
- const Mt = C.forwardRef(
1124
+ const Ct = I.forwardRef(
1169
1125
  ({
1170
1126
  children: e,
1171
1127
  disabled: t = !1,
@@ -1176,19 +1132,19 @@ const Mt = C.forwardRef(
1176
1132
  type: g = "button",
1177
1133
  raw: n = !1,
1178
1134
  noBorder: l = !1,
1179
- "aria-label": u,
1180
- label: h,
1181
- size: p = "medium",
1135
+ "aria-label": m,
1136
+ label: b,
1137
+ size: h = "medium",
1182
1138
  labelRight: c,
1183
- labelLeft: b,
1184
- noBackground: m = !1,
1185
- align: f = "center",
1186
- active: k = !1,
1187
- radius: x = "large",
1188
- ...w
1189
- }, N) => {
1190
- const E = xe({
1191
- type: ve,
1139
+ labelLeft: u,
1140
+ noBackground: p = !1,
1141
+ align: v = "center",
1142
+ active: _ = !1,
1143
+ radius: w = "large",
1144
+ ...k
1145
+ }, x) => {
1146
+ const N = ve({
1147
+ type: pe,
1192
1148
  mode: r,
1193
1149
  focusMode: a,
1194
1150
  fullWidth: o,
@@ -1196,18 +1152,18 @@ const Mt = C.forwardRef(
1196
1152
  raw: n,
1197
1153
  className: i,
1198
1154
  noBorder: l,
1199
- size: p,
1155
+ size: h,
1200
1156
  labelRight: c,
1201
- labelLeft: b,
1202
- noBackground: m,
1203
- align: f,
1204
- radius: x
1205
- }), T = s({
1157
+ labelLeft: u,
1158
+ noBackground: p,
1159
+ align: v,
1160
+ radius: w
1161
+ }), T = d({
1206
1162
  "text-copy-accent-dark": r === "light" && !n,
1207
1163
  "text-copy-light": r === "dark" && !n,
1208
1164
  "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !n,
1209
1165
  "text-copy-light dark:text-copy-accent-dark": r === "system" && !n
1210
- }), I = k ? s(
1166
+ }), z = _ ? d(
1211
1167
  "relative",
1212
1168
  "focus-within:static",
1213
1169
  "focus-within:after:border-transparent",
@@ -1224,28 +1180,28 @@ const Mt = C.forwardRef(
1224
1180
  "after:border-table-light dark:after:border-table-dark": r === "alt-system"
1225
1181
  }
1226
1182
  ) : "";
1227
- return /* @__PURE__ */ d("div", { className: I, children: /* @__PURE__ */ v(
1228
- Y,
1183
+ return /* @__PURE__ */ s("div", { className: z, children: /* @__PURE__ */ f(
1184
+ K,
1229
1185
  {
1230
- ref: N,
1231
- className: E,
1186
+ ref: x,
1187
+ className: N,
1232
1188
  disabled: t,
1233
1189
  type: g,
1234
- "aria-label": u || h,
1235
- ...w,
1190
+ "aria-label": m || b,
1191
+ ...k,
1236
1192
  children: [
1237
- b && /* @__PURE__ */ d("span", { className: "pr-2", children: b }),
1238
- /* @__PURE__ */ d("div", { className: T, children: e }),
1239
- c && /* @__PURE__ */ d("span", { className: "pl-2", children: c })
1193
+ u && /* @__PURE__ */ s("span", { className: "pr-2", children: u }),
1194
+ /* @__PURE__ */ s("div", { className: T, children: e }),
1195
+ c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
1240
1196
  ]
1241
1197
  }
1242
1198
  ) });
1243
1199
  }
1244
1200
  );
1245
- Mt.displayName = "ButtonSort";
1246
- const Lt = 200, Ot = ({
1201
+ Ct.displayName = "ButtonSort";
1202
+ const St = 200, Rt = ({
1247
1203
  string: e,
1248
- idealLength: t = Lt
1204
+ idealLength: t = St
1249
1205
  }) => {
1250
1206
  if (e.length <= t)
1251
1207
  return { string: e, isTruncated: !1 };
@@ -1256,23 +1212,23 @@ const Lt = 200, Ot = ({
1256
1212
  string: e.slice(0, t + r),
1257
1213
  isTruncated: !0
1258
1214
  };
1259
- }, zt = ({
1215
+ }, Bt = ({
1260
1216
  children: e,
1261
1217
  length: t = 200,
1262
1218
  mode: r = "system",
1263
1219
  focusMode: a = "system"
1264
1220
  }) => {
1265
- const [o, i] = A(!1);
1221
+ const [o, i] = B(!1);
1266
1222
  if (typeof e != "string")
1267
1223
  return e;
1268
- const { string: g, isTruncated: n } = Ot({
1224
+ const { string: g, isTruncated: n } = Rt({
1269
1225
  string: e,
1270
1226
  idealLength: t
1271
1227
  });
1272
- return /* @__PURE__ */ v("span", { style: { wordBreak: "break-word" }, children: [
1228
+ return /* @__PURE__ */ f("span", { style: { wordBreak: "break-word" }, children: [
1273
1229
  o ? e : g,
1274
- n && /* @__PURE__ */ d(
1275
- Te,
1230
+ n && /* @__PURE__ */ s(
1231
+ fe,
1276
1232
  {
1277
1233
  mode: r,
1278
1234
  focusMode: a,
@@ -1299,218 +1255,200 @@ try {
1299
1255
  });
1300
1256
  } catch {
1301
1257
  }
1302
- const ae = Fe(
1258
+ const re = je(
1303
1259
  () => import(
1304
1260
  /* webpackChunkName: "LazyMessageAssistant" */
1305
- "./LazyMessageAssistant.CJ_QpOdB.js"
1261
+ "./LazyMessageAssistant.axz4vvCk.js"
1306
1262
  ).then((e) => e.LazyMessageAssistant)
1307
- ), Vt = () => {
1308
- const { state: e } = z(j);
1309
- return /* @__PURE__ */ v(V, { children: [
1263
+ ), At = () => {
1264
+ const { state: e } = L(H);
1265
+ return /* @__PURE__ */ f(R, { children: [
1310
1266
  e && e.messages.length > 0 && e.messages.map((t, r) => {
1311
1267
  const { role: a, content: o, name: i, processingTime: g } = t.message;
1312
- return (a === B || a === G) && o ? /* @__PURE__ */ d(Z, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(
1313
- ae,
1268
+ return (a === S || a === G) && o ? /* @__PURE__ */ s(X, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(
1269
+ re,
1314
1270
  {
1315
1271
  name: i,
1316
1272
  processingTime: g,
1317
1273
  children: o
1318
1274
  }
1319
- ) }, `${r}-${a}`) : a === H && o ? /* @__PURE__ */ d(
1320
- wt,
1275
+ ) }, `${r}-${a}`) : a === D && o ? /* @__PURE__ */ s(
1276
+ ft,
1321
1277
  {
1322
1278
  kind: "right",
1323
1279
  copyToClipboard: o,
1324
1280
  copyToClipboardFocusMode: "light",
1325
- children: /* @__PURE__ */ d(zt, { mode: "light", focusMode: "light", children: o })
1281
+ children: /* @__PURE__ */ s(Bt, { mode: "light", focusMode: "light", children: o })
1326
1282
  },
1327
1283
  `${r}-${a}`
1328
1284
  ) : null;
1329
1285
  }),
1330
- Ce(H, e) && /* @__PURE__ */ d(Z, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(ae, { loading: !0 }) })
1286
+ Ne(D, e) && /* @__PURE__ */ s(X, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(re, { loading: !0 }) })
1331
1287
  ] });
1332
- }, Ut = () => {
1333
- const { isAuthenticated: e } = U(), t = Se(e);
1334
- return /* @__PURE__ */ d(V, { children: /* @__PURE__ */ v("div", { className: t, children: [
1335
- /* @__PURE__ */ d(Re, {}),
1336
- /* @__PURE__ */ d(Vt, {})
1288
+ }, Mt = () => {
1289
+ const { isAuthenticated: e } = O(), t = Ee(e);
1290
+ return /* @__PURE__ */ s(R, { children: /* @__PURE__ */ f("div", { className: t, children: [
1291
+ /* @__PURE__ */ s(Ie, {}),
1292
+ /* @__PURE__ */ s(At, {})
1337
1293
  ] }) });
1338
- }, O = (e, t) => {
1294
+ }, M = (e, t) => {
1339
1295
  e({
1340
- type: le,
1296
+ type: de,
1341
1297
  payload: {
1342
1298
  streaming: t
1343
1299
  }
1344
1300
  });
1345
- }, oe = (e) => {
1346
- O(e, !1), e({
1347
- type: R,
1301
+ }, ae = (e) => {
1302
+ M(e, !1), e({
1303
+ type: C,
1348
1304
  payload: {
1349
1305
  message: {
1350
1306
  role: G,
1351
- content: ze
1307
+ content: Ae
1352
1308
  }
1353
1309
  }
1354
1310
  });
1355
- }, Dt = () => {
1356
- const { state: e, dispatch: t } = z(j), { state: r, dispatch: a } = z(P), [o, i] = A(""), { getAccessToken: g, user: n } = U(), l = S(null), u = S(!1), h = S(null), p = S(
1311
+ }, Lt = () => {
1312
+ const { state: e, dispatch: t } = L(H), { state: r, dispatch: a } = L(j), [o, i] = B(""), { getAccessToken: g, user: n } = O(), l = $(null), m = $(
1357
1313
  null
1358
1314
  );
1359
- _(() => {
1360
- var m;
1361
- (e == null ? void 0 : e.streaming) === !0 && !u.current && l.current && (u.current = !0, l.current.focus()), (e == null ? void 0 : e.streaming) === !1 && (u.current = !1, (m = l.current) == null || m.blur());
1362
- }, [e]), _(() => {
1315
+ E(() => {
1363
1316
  (async () => {
1364
- var f;
1317
+ var c;
1365
1318
  if (!e || e.messages.length === 0) {
1366
- (f = p == null ? void 0 : p.current) == null || f.cancel();
1319
+ (c = m == null ? void 0 : m.current) == null || c.cancel();
1367
1320
  return;
1368
1321
  }
1369
- const m = e.messages[e.messages.length - 1];
1370
- if (!(e.messages.length === 0 || m.message.role === B || m.message.role === Be || m.message.role === G || m.message.role === Ae))
1322
+ const h = e.messages[e.messages.length - 1];
1323
+ if (!(e.messages.length === 0 || h.message.role === S || h.message.role === Ce || h.message.role === G || h.message.role === Se))
1371
1324
  try {
1372
- const k = await Ge({
1325
+ const u = await Ve({
1373
1326
  accessToken: await g(),
1374
1327
  name: "generate",
1375
1328
  data: {
1376
1329
  messages: e.messages,
1377
- model: e.engine || L,
1330
+ model: e.engine || A,
1378
1331
  user: (n == null ? void 0 : n.username) || "",
1379
1332
  id: e.id,
1380
1333
  usage: e.usage
1381
1334
  }
1382
1335
  });
1383
- if (k && k.ok) {
1384
- const x = W();
1385
- p.current = k.body.getReader();
1386
- const w = new TextDecoder();
1336
+ if (u && u.ok) {
1337
+ const p = P();
1338
+ m.current = u.body.getReader();
1339
+ const v = new TextDecoder();
1387
1340
  for (; ; ) {
1388
- O(t, !0);
1389
- const { done: N, value: E } = await p.current.read();
1390
- if (N) {
1391
- O(t, !1);
1341
+ M(t, !0);
1342
+ const { done: _, value: w } = await m.current.read();
1343
+ if (_) {
1344
+ M(t, !1);
1392
1345
  break;
1393
1346
  }
1394
- const T = w.decode(E, { stream: !0 }), I = T.indexOf(q);
1395
- if (I !== -1) {
1396
- const we = T.substring(0, I), M = JSON.parse(
1397
- T.substring(I + q.length)
1347
+ const k = v.decode(w, { stream: !0 }), x = k.indexOf(Y);
1348
+ if (x !== -1) {
1349
+ const N = k.substring(0, x), T = JSON.parse(
1350
+ k.substring(x + Y.length)
1398
1351
  );
1399
1352
  t({
1400
- type: se,
1353
+ type: oe,
1401
1354
  payload: {
1402
- model: M.model,
1403
- usage: M.usage
1355
+ model: T.model,
1356
+ usage: T.usage
1404
1357
  }
1405
1358
  }), t({
1406
- type: R,
1359
+ type: C,
1407
1360
  payload: {
1408
1361
  message: {
1409
- content: we,
1410
- role: B,
1411
- messageId: x,
1412
- processingTime: M.processingTime,
1413
- name: M.name
1362
+ content: N,
1363
+ role: S,
1364
+ messageId: p,
1365
+ processingTime: T.processingTime,
1366
+ name: T.name
1414
1367
  }
1415
1368
  }
1416
- }), O(t, !1);
1369
+ }), M(t, !1);
1417
1370
  break;
1418
1371
  } else
1419
1372
  t({
1420
- type: R,
1373
+ type: C,
1421
1374
  payload: {
1422
1375
  message: {
1423
- content: T,
1424
- role: B,
1425
- messageId: x
1376
+ content: k,
1377
+ role: S,
1378
+ messageId: p
1426
1379
  }
1427
1380
  }
1428
1381
  });
1429
1382
  }
1430
1383
  } else
1431
- oe(t);
1432
- } catch (k) {
1433
- console.error(k), oe(t);
1384
+ ae(t);
1385
+ } catch (u) {
1386
+ console.error(u), ae(t);
1434
1387
  }
1435
1388
  })();
1436
1389
  }, [e == null ? void 0 : e.messages]);
1437
- const c = async (m) => {
1438
- m.preventDefault(), t({
1439
- type: R,
1390
+ const b = async (h) => {
1391
+ h.preventDefault(), t({
1392
+ type: C,
1440
1393
  payload: {
1441
1394
  message: {
1442
- role: H,
1395
+ role: D,
1443
1396
  content: o
1444
1397
  }
1445
1398
  }
1446
1399
  }), i("");
1447
- }, b = (m) => {
1448
- m.preventDefault(), t({
1449
- type: de
1450
- });
1451
1400
  };
1452
- return _(() => {
1401
+ return E(() => {
1453
1402
  if (r.tag !== "") {
1454
- const m = r.tag.endsWith(":") && !r.tag.endsWith(": ") ? r.tag + " " : r.tag;
1455
- m.indexOf(J) !== -1 ? navigator.clipboard.readText().then((k) => {
1456
- i(m.replace(J, k));
1457
- }) : i(m), h.current && h.current.focus(), a({
1458
- type: ge
1403
+ const h = r.tag.endsWith(":") && !r.tag.endsWith(": ") ? r.tag + " " : r.tag;
1404
+ h.indexOf(q) !== -1 ? navigator.clipboard.readText().then((u) => {
1405
+ i(h.replace(q, u));
1406
+ }) : i(h), l.current && l.current.focus(), a({
1407
+ type: ne
1459
1408
  });
1460
1409
  }
1461
- }, [r, a]), _(() => {
1462
- e && e.usage === 0 && e.messages.length === 0 && h.current && h.current.focus();
1463
- }, [e]), /* @__PURE__ */ d("form", { className: "mt-2", onSubmit: c, children: /* @__PURE__ */ d(
1464
- je,
1410
+ }, [r, a]), E(() => {
1411
+ e && e.usage === 0 && e.messages.length === 0 && l.current && l.current.focus();
1412
+ }, [e]), /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s("form", { className: "mt-2", onSubmit: b, children: /* @__PURE__ */ s(
1413
+ De,
1465
1414
  {
1466
1415
  mode: "dark",
1467
1416
  focusMode: "light",
1468
- ref: h,
1417
+ ref: l,
1469
1418
  name: "chat-input",
1470
- label: Me,
1419
+ label: Re,
1471
1420
  helperText: "Press ENTER to add a new line",
1472
1421
  helperTextOnFocus: !0,
1473
1422
  required: !0,
1474
1423
  value: o,
1475
- onChange: (m) => i(m.target.value),
1476
- onKeyDown: Xe([["mod+Enter", c]]),
1477
- leftElement: /* @__PURE__ */ d(
1478
- Le,
1479
- {
1480
- radius: "small",
1481
- noBorder: !0,
1482
- mode: "light",
1483
- focusMode: "light",
1484
- ref: l,
1485
- onClick: b,
1486
- children: e != null && e.streaming ? /* @__PURE__ */ d(Ye, { size: "size-4" }) : /* @__PURE__ */ d(Ke, { size: "size-4" })
1487
- }
1488
- ),
1489
- rightElement: /* @__PURE__ */ d(
1490
- ue,
1424
+ onChange: (h) => i(h.target.value),
1425
+ onKeyDown: Ke([["mod+Enter", b]]),
1426
+ leftElement: /* @__PURE__ */ s($e, {}),
1427
+ rightElement: /* @__PURE__ */ s(
1428
+ ce,
1491
1429
  {
1492
1430
  disabled: e == null ? void 0 : e.streaming,
1493
1431
  noBorder: !0,
1494
1432
  type: "submit",
1495
1433
  mode: "light",
1496
1434
  focusMode: "light",
1497
- children: Oe
1435
+ children: Be
1498
1436
  }
1499
1437
  )
1500
1438
  }
1501
- ) });
1502
- }, $t = () => {
1503
- const { dispatch: e, state: t } = z(P), { getAccessToken: r, user: a } = U(), [o, i] = A({
1439
+ ) }) });
1440
+ }, Ot = () => {
1441
+ const { dispatch: e, state: t } = L(j), { getAccessToken: r, user: a } = O(), [o, i] = B({
1504
1442
  loaded: !1
1505
- }), g = "mt-2 flex justify-center rounded-md", n = (l, u) => {
1443
+ }), g = "mt-2 flex justify-center rounded-md", n = (l, m) => {
1506
1444
  l.preventDefault(), e({
1507
- type: me,
1445
+ type: le,
1508
1446
  payload: {
1509
- tag: u
1447
+ tag: m
1510
1448
  }
1511
1449
  });
1512
1450
  };
1513
- return _(() => {
1451
+ return E(() => {
1514
1452
  if (!a) {
1515
1453
  i({
1516
1454
  loaded: !1
@@ -1519,15 +1457,15 @@ const ae = Fe(
1519
1457
  }
1520
1458
  o.loaded || (async () => {
1521
1459
  try {
1522
- const l = await he({
1460
+ const l = await ge({
1523
1461
  accessToken: await r(),
1524
- type: be.GET_USER_PREFERENCES,
1462
+ type: me.GET_USER_PREFERENCES,
1525
1463
  params: {
1526
1464
  user: a.username
1527
1465
  }
1528
1466
  });
1529
1467
  l.status === 200 && (e({
1530
- type: ce,
1468
+ type: se,
1531
1469
  payload: {
1532
1470
  tags: l.data.tags || []
1533
1471
  }
@@ -1537,89 +1475,89 @@ const ae = Fe(
1537
1475
  } catch {
1538
1476
  }
1539
1477
  })();
1540
- }, [a]), /* @__PURE__ */ d(V, { children: /* @__PURE__ */ d(Ve, { alignHorizontal: "center", columnGap: 2, children: o && o.loaded && t.tags && t.tags.map((l) => l.enabled && l.label && l.content && /* @__PURE__ */ d(Ue, { children: /* @__PURE__ */ d("div", { className: g, children: /* @__PURE__ */ d(
1541
- ue,
1478
+ }, [a]), /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(Me, { alignHorizontal: "center", columnGap: 2, children: o && o.loaded && t.tags && t.tags.map((l) => l.enabled && l.label && l.content && /* @__PURE__ */ s(Le, { children: /* @__PURE__ */ s("div", { className: g, children: /* @__PURE__ */ s(
1479
+ ce,
1542
1480
  {
1543
1481
  noBorder: !0,
1544
1482
  mode: "dark",
1545
1483
  focusMode: "light",
1546
1484
  size: "small",
1547
- onClick: (u) => n(u, l.content),
1485
+ onClick: (m) => n(m, l.content),
1548
1486
  children: l.label
1549
1487
  }
1550
1488
  ) }) }, `tag-button-${l.slot}`)) }) });
1551
1489
  };
1552
- function _e({ isComponent: e = !1 }) {
1553
- const t = S(!1), { getAccessToken: r, user: a } = U(), [o] = X({
1554
- key: Q + $e,
1490
+ function ke({ isComponent: e = !1 }) {
1491
+ const t = $(!1), { getAccessToken: r, user: a } = O(), [o] = Q({
1492
+ key: J + ze,
1555
1493
  initialValue: ""
1556
- }), [i] = X({
1557
- key: Q + He,
1558
- initialValue: We.ASC
1559
- }), [g, n] = D(at, {
1560
- id: W(),
1561
- model: L,
1562
- engine: L,
1494
+ }), [i] = Q({
1495
+ key: J + Ue,
1496
+ initialValue: He.ASC
1497
+ }), [g, n] = U(Xe, {
1498
+ id: P(),
1499
+ model: A,
1500
+ engine: A,
1563
1501
  usage: 0,
1564
1502
  messages: [],
1565
1503
  tags: [],
1566
1504
  isComponent: e
1567
- }), [l, u] = D(ot, {
1505
+ }), [l, m] = U(Ze, {
1568
1506
  searchString: o,
1569
1507
  sortedCell: "timestamp",
1570
1508
  sortDirection: i
1571
- }), [h, p] = D(it, {
1509
+ }), [b, h] = U(et, {
1572
1510
  tag: "",
1573
1511
  tags: []
1574
- }), [c, b] = A({
1512
+ }), [c, u] = B({
1575
1513
  version: "",
1576
1514
  models: [],
1577
1515
  plugins: [],
1578
- engine: L,
1516
+ engine: A,
1579
1517
  engines: []
1580
1518
  });
1581
- return _(() => {
1519
+ return E(() => {
1582
1520
  c.version !== "" || t.current || (async () => {
1583
1521
  try {
1584
1522
  t.current = !0;
1585
- const m = await he({
1523
+ const p = await ge({
1586
1524
  accessToken: await r(),
1587
- type: be.ABOUT,
1525
+ type: me.ABOUT,
1588
1526
  params: {
1589
1527
  user: a == null ? void 0 : a.username
1590
1528
  }
1591
1529
  });
1592
- t.current = !1, m.status === 200 && (b(m.data), n({
1593
- type: ne,
1530
+ t.current = !1, p.status === 200 && (u(p.data), n({
1531
+ type: ie,
1594
1532
  payload: {
1595
- engine: m.data.engine
1533
+ engine: p.data.engine
1596
1534
  }
1597
1535
  }));
1598
1536
  } catch {
1599
1537
  }
1600
1538
  })();
1601
- }, [c, r, a]), _(() => {
1602
- var m;
1603
- (m = document.getElementById("logo")) == null || m.classList.add("fadeOut"), setTimeout(() => {
1604
- var f;
1605
- (f = document.getElementById("root")) == null || f.classList.replace("app-hidden", "fadeIn");
1539
+ }, [c, r, a]), E(() => {
1540
+ var p;
1541
+ (p = document.getElementById("logo")) == null || p.classList.add("fadeOut"), setTimeout(() => {
1542
+ var v;
1543
+ (v = document.getElementById("root")) == null || v.classList.replace("app-hidden", "fadeIn");
1606
1544
  }, 500);
1607
- }), /* @__PURE__ */ d(j.Provider, { value: { state: g, dispatch: n, serverStats: c }, children: /* @__PURE__ */ d(
1608
- Pe.Provider,
1545
+ }), /* @__PURE__ */ s(H.Provider, { value: { state: g, dispatch: n, serverStats: c }, children: /* @__PURE__ */ s(
1546
+ Ge.Provider,
1609
1547
  {
1610
1548
  value: {
1611
1549
  state: l,
1612
- dispatch: u
1550
+ dispatch: m
1613
1551
  },
1614
- children: /* @__PURE__ */ v(
1615
- P.Provider,
1552
+ children: /* @__PURE__ */ f(
1553
+ j.Provider,
1616
1554
  {
1617
- value: { state: h, dispatch: p },
1555
+ value: { state: b, dispatch: h },
1618
1556
  children: [
1619
- /* @__PURE__ */ d(De, { className: "max-h-[calc(100svh_-_163px)]", children: /* @__PURE__ */ d(Ut, {}) }),
1620
- /* @__PURE__ */ v("div", { className: "md:mx-auto md:max-w-4xl w-11/12 fixed bottom-10 left-1/2 transform -translate-x-1/2 z-1000", children: [
1621
- /* @__PURE__ */ d($t, {}),
1622
- /* @__PURE__ */ d(Dt, {})
1557
+ /* @__PURE__ */ s(Oe, { className: "max-h-[calc(100svh_-_163px)]", children: /* @__PURE__ */ s(Mt, {}) }),
1558
+ /* @__PURE__ */ f("div", { className: "md:mx-auto md:max-w-4xl w-11/12 fixed bottom-10 left-1/2 transform -translate-x-1/2 z-1000", children: [
1559
+ /* @__PURE__ */ s(Ot, {}),
1560
+ /* @__PURE__ */ s(Lt, {})
1623
1561
  ] })
1624
1562
  ]
1625
1563
  }
@@ -1627,9 +1565,9 @@ function _e({ isComponent: e = !1 }) {
1627
1565
  }
1628
1566
  ) });
1629
1567
  }
1630
- _e.displayName = "App";
1631
- const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: _e }, Symbol.toStringTag, { value: "Module" }));
1568
+ ke.displayName = "App";
1569
+ const Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: ke }, Symbol.toStringTag, { value: "Module" }));
1632
1570
  export {
1633
- Ft as LazyApp,
1634
- wt as ae
1571
+ Gt as LazyApp,
1572
+ ft as ae
1635
1573
  };