@versini/sassysaint 5.5.0 → 5.5.1

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,27 +1,71 @@
1
- import N, { useSyncExternalStore as He, useCallback as P, useEffect as z, useContext as L, useRef as f, useState as $, useLayoutEffect as B, useMemo as me, useId as Be, useReducer as ze } from "react";
2
- import { DEFAULT_AI_ENGINE as X } from "./index.UHRCFkiB.js";
3
- import i from "clsx";
4
- import { jsx as c, jsxs as C, Fragment as Le } from "react/jsx-runtime";
5
- function ge(e, r) {
1
+ import C, { useSyncExternalStore as He, useCallback as P, useEffect as R, useContext as B, useRef as f, useState as $, useLayoutEffect as L, useMemo as me, useId as ze, useReducer as Le } from "react";
2
+ import { jsxs as N, jsx as c, Fragment as Ve } from "react/jsx-runtime";
3
+ import { g as ge, DEFAULT_AI_ENGINE as X, O as Oe, ACTION_RESET as Me } from "./index.DiAX0KiN.js";
4
+ import l from "clsx";
5
+ const Ue = ({
6
+ className: e,
7
+ viewBox: r,
8
+ title: t,
9
+ monotone: a,
10
+ ...o
11
+ }) => /* @__PURE__ */ N(
12
+ ge,
13
+ {
14
+ defaultViewBox: "0 0 448 512",
15
+ size: "size-5",
16
+ viewBox: r,
17
+ className: e,
18
+ title: t || "Add",
19
+ ...o,
20
+ children: [
21
+ /* @__PURE__ */ c(
22
+ "path",
23
+ {
24
+ opacity: a ? "1" : "0.4",
25
+ 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"
26
+ }
27
+ ),
28
+ /* @__PURE__ */ c("path", { d: "" })
29
+ ]
30
+ }
31
+ ), Fe = ({
32
+ className: e,
33
+ viewBox: r,
34
+ title: t,
35
+ monotone: a,
36
+ ...o
37
+ }) => /* @__PURE__ */ c(
38
+ ge,
39
+ {
40
+ defaultViewBox: "0 0 384 512",
41
+ size: "size-5",
42
+ viewBox: r,
43
+ className: e,
44
+ title: t || "Close",
45
+ ...o,
46
+ children: /* @__PURE__ */ c("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" })
47
+ }
48
+ );
49
+ function he(e, r) {
6
50
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: r }));
7
51
  }
8
52
  const le = (e, r) => {
9
53
  const t = JSON.stringify(
10
54
  typeof r == "function" ? r() : r
11
55
  );
12
- window.localStorage.setItem(e, t), ge(e, t);
13
- }, Me = (e) => {
14
- window.localStorage.removeItem(e), ge(e, null);
15
- }, se = (e) => window.localStorage.getItem(e), Oe = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
16
- function Rt({
56
+ window.localStorage.setItem(e, t), he(e, t);
57
+ }, Pe = (e) => {
58
+ window.localStorage.removeItem(e), he(e, null);
59
+ }, se = (e) => window.localStorage.getItem(e), Ge = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
60
+ function Ot({
17
61
  key: e,
18
62
  initialValue: r
19
63
  }) {
20
- const t = He(Oe, () => se(e)), a = P(
21
- (l) => {
64
+ const t = He(Ge, () => se(e)), a = P(
65
+ (i) => {
22
66
  try {
23
- const s = typeof l == "function" ? l(JSON.parse(t)) : l;
24
- s == null ? Me(e) : le(e, s);
67
+ const s = typeof i == "function" ? i(JSON.parse(t)) : i;
68
+ s == null ? Pe(e) : le(e, s);
25
69
  } catch (s) {
26
70
  console.warn(s);
27
71
  }
@@ -32,15 +76,15 @@ function Rt({
32
76
  }, [r, a]), n = P(() => {
33
77
  a(null);
34
78
  }, [a]);
35
- return z(() => {
79
+ return R(() => {
36
80
  try {
37
81
  se(e) === null && typeof r < "u" && le(e, r);
38
- } catch (l) {
39
- console.warn(l);
82
+ } catch (i) {
83
+ console.warn(i);
40
84
  }
41
85
  }, [e, r]), [t ? JSON.parse(t) : null, a, o, n];
42
86
  }
43
- const w = {
87
+ const E = {
44
88
  GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
45
89
  location(latitude: $latitude, longitude: $longitude) {
46
90
  country
@@ -144,44 +188,44 @@ const w = {
144
188
  engine: $engine,
145
189
  tags: $tags)
146
190
  }`
147
- }, Ht = {
191
+ }, Mt = {
148
192
  GET_LOCATION: {
149
- schema: w.GET_LOCATION,
193
+ schema: E.GET_LOCATION,
150
194
  method: "location"
151
195
  },
152
196
  GET_CHATS: {
153
- schema: w.GET_CHATS,
197
+ schema: E.GET_CHATS,
154
198
  method: "chats"
155
199
  },
156
200
  GET_CHATS_STATS: {
157
- schema: w.GET_CHATS_STATS,
201
+ schema: E.GET_CHATS_STATS,
158
202
  method: "chatsStats"
159
203
  },
160
204
  GET_CHAT: {
161
- schema: w.GET_CHAT,
205
+ schema: E.GET_CHAT,
162
206
  method: "chatById"
163
207
  },
164
208
  DELETE_CHAT: {
165
- schema: w.DELETE_CHAT,
209
+ schema: E.DELETE_CHAT,
166
210
  method: "deleteChat"
167
211
  },
168
212
  ABOUT: {
169
- schema: w.ABOUT,
213
+ schema: E.ABOUT,
170
214
  method: "about"
171
215
  },
172
216
  GET_USER_PREFERENCES: {
173
- schema: w.GET_USER_PREFERENCES,
217
+ schema: E.GET_USER_PREFERENCES,
174
218
  method: "getUserPreferences"
175
219
  },
176
220
  SET_USER_PREFERENCES: {
177
- schema: w.SET_USER_PREFERENCES,
221
+ schema: E.SET_USER_PREFERENCES,
178
222
  method: "setUserPreferences"
179
223
  }
180
- }, he = process.env.PUBLIC_SASSY_API_SERVER_URL, Ve = async ({
224
+ }, pe = process.env.PUBLIC_SASSY_API_SERVER_URL, De = async ({
181
225
  query: e,
182
226
  data: r,
183
227
  headers: t = {}
184
- }) => await fetch(`${he}/graphql`, {
228
+ }) => await fetch(`${pe}/graphql`, {
185
229
  method: "POST",
186
230
  credentials: "include",
187
231
  headers: {
@@ -193,14 +237,14 @@ const w = {
193
237
  query: e,
194
238
  variables: r
195
239
  })
196
- }), Bt = async ({
240
+ }), Ut = async ({
197
241
  accessToken: e,
198
242
  type: r,
199
243
  params: t = {}
200
244
  }) => {
201
245
  const a = r != null && r.data ? r.data(t) : t;
202
246
  try {
203
- const o = `Bearer ${e}`, n = await Ve({
247
+ const o = `Bearer ${e}`, n = await De({
204
248
  headers: {
205
249
  authorization: o
206
250
  },
@@ -209,23 +253,23 @@ const w = {
209
253
  });
210
254
  if (n.status !== 200)
211
255
  return { status: n.status, data: [] };
212
- const { data: l, errors: s } = await n.json();
256
+ const { data: i, errors: s } = await n.json();
213
257
  return {
214
258
  status: n.status,
215
- data: l[r.method],
259
+ data: i[r.method],
216
260
  errors: s
217
261
  };
218
262
  } catch (o) {
219
263
  return console.error(o), { status: 500, data: [] };
220
264
  }
221
- }, zt = async ({
265
+ }, Ft = async ({
222
266
  accessToken: e,
223
267
  name: r,
224
268
  data: t,
225
269
  method: a = "POST"
226
270
  }) => {
227
271
  const o = `Bearer ${e}`;
228
- return await fetch(`${he}/api/${r}`, {
272
+ return await fetch(`${pe}/api/${r}`, {
229
273
  method: a,
230
274
  credentials: "include",
231
275
  headers: {
@@ -234,7 +278,7 @@ const w = {
234
278
  },
235
279
  body: JSON.stringify(t)
236
280
  });
237
- }, Lt = N.createContext({
281
+ }, We = C.createContext({
238
282
  state: {
239
283
  id: "",
240
284
  model: X,
@@ -253,15 +297,40 @@ const w = {
253
297
  engine: X,
254
298
  engines: []
255
299
  }
256
- }), Mt = N.createContext({
300
+ }), Pt = C.createContext({
257
301
  state: { searchString: "", sortedCell: "", sortDirection: "" },
258
302
  dispatch: () => {
259
303
  }
260
- }), Ot = N.createContext({
304
+ }), Gt = C.createContext({
261
305
  state: { tag: "" },
262
306
  dispatch: () => {
263
307
  }
264
- });
308
+ }), Dt = ({
309
+ mode: e = "light",
310
+ focusMode: r = "light",
311
+ radius: t = "small"
312
+ }) => {
313
+ const { state: a, dispatch: o } = B(We), n = f(null), i = f(!1), s = (d) => {
314
+ d.preventDefault(), o({
315
+ type: Me
316
+ });
317
+ };
318
+ return R(() => {
319
+ var d;
320
+ (a == null ? void 0 : a.streaming) === !0 && !i.current && n.current && (i.current = !0, n.current.focus()), (a == null ? void 0 : a.streaming) === !1 && (i.current = !1, (d = n.current) == null || d.blur());
321
+ }, [a]), /* @__PURE__ */ c(
322
+ Oe,
323
+ {
324
+ noBorder: !0,
325
+ radius: t,
326
+ mode: e,
327
+ focusMode: r,
328
+ ref: n,
329
+ onClick: s,
330
+ children: a != null && a.streaming ? /* @__PURE__ */ c(Fe, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ c(Ue, { size: "size-4", monotone: !0 })
331
+ }
332
+ );
333
+ };
265
334
  /*!
266
335
  @versini/ui-table v2.0.8
267
336
  © 2024 gizmette.com
@@ -275,17 +344,17 @@ try {
275
344
  });
276
345
  } catch {
277
346
  }
278
- const G = "thead", K = "tfoot", A = "tbody", F = {
347
+ const G = "thead", K = "tfoot", I = "tbody", F = {
279
348
  ASC: "asc",
280
349
  DESC: "desc"
281
- }, Ue = ({
350
+ }, je = ({
282
351
  mode: e,
283
352
  className: r,
284
353
  wrapperClassName: t,
285
354
  stickyHeader: a,
286
355
  stickyFooter: o
287
356
  }) => ({
288
- wrapper: i(
357
+ wrapper: l(
289
358
  "not-prose relative w-full rounded-lg shadow-md",
290
359
  {
291
360
  "overflow-x-auto": !a && !o,
@@ -297,23 +366,23 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
297
366
  },
298
367
  t
299
368
  ),
300
- table: i("my-0 w-full text-left text-sm", r, {
369
+ table: l("my-0 w-full text-left text-sm", r, {
301
370
  "text-copy-light": e === "dark",
302
371
  "text-copy-dark": e === "light",
303
372
  "text-copy-light dark:text-copy-dark": e === "system",
304
373
  "text-copy-dark dark:text-copy-light": e === "alt-system"
305
374
  }),
306
- caption: i("py-2 text-sm font-bold", {
375
+ caption: l("py-2 text-sm font-bold", {
307
376
  "text-copy-light": e === "dark",
308
377
  "text-copy-dark": e === "light",
309
378
  "text-copy-light dark:text-copy-dark": e === "system",
310
379
  "text-copy-dark dark:text-copy-light": e === "alt-system"
311
380
  })
312
- }), Fe = ({
381
+ }), qe = ({
313
382
  className: e,
314
383
  stickyHeader: r,
315
384
  mode: t
316
- }) => i(
385
+ }) => l(
317
386
  {
318
387
  "sticky top-0 z-10": r,
319
388
  "shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "dark",
@@ -322,11 +391,11 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
322
391
  "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "alt-system"
323
392
  },
324
393
  e
325
- ), Pe = ({
394
+ ), Je = ({
326
395
  className: e,
327
396
  stickyFooter: r,
328
397
  mode: t
329
- }) => i(
398
+ }) => l(
330
399
  {
331
400
  "sticky bottom-0 z-10": r,
332
401
  "shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "dark",
@@ -335,11 +404,11 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
335
404
  "shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "alt-system"
336
405
  },
337
406
  e
338
- ), Ge = ({
407
+ ), Qe = ({
339
408
  mode: e,
340
409
  className: r,
341
410
  cellWrapper: t
342
- }) => t === G || t === K ? i(
411
+ }) => t === G || t === K ? l(
343
412
  {
344
413
  "bg-table-head-dark": e === "dark",
345
414
  "bg-table-head-light": e === "light",
@@ -347,60 +416,60 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
347
416
  "bg-table-head-light dark:bg-table-head-dark": e === "alt-system"
348
417
  },
349
418
  r
350
- ) : i(
419
+ ) : l(
351
420
  "border-b last:border-0",
352
421
  {
353
422
  "border-table-dark": e === "dark",
354
- "odd:bg-table-dark-odd even:bg-table-dark-even": t === A && e === "dark",
423
+ "odd:bg-table-dark-odd even:bg-table-dark-even": t === I && e === "dark",
355
424
  "border-table-light": e === "light",
356
- "odd:bg-table-light-odd even:bg-table-light-even": t === A && e === "light",
425
+ "odd:bg-table-light-odd even:bg-table-light-even": t === I && e === "light",
357
426
  "border-table-dark dark:border-table-light": e === "system",
358
- "odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === A && e === "system",
427
+ "odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === I && e === "system",
359
428
  "border-table-light dark:border-table-dark": e === "alt-system",
360
- "odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === A && e === "alt-system"
429
+ "odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === I && e === "alt-system"
361
430
  },
362
431
  r
363
- ), De = ({
432
+ ), Xe = ({
364
433
  cellWrapper: e,
365
434
  className: r,
366
435
  compact: t,
367
436
  mode: a
368
- }) => i(
437
+ }) => l(
369
438
  {
370
439
  "text-copy-light": a === "dark",
371
440
  "text-copy-dark": a === "light",
372
441
  "text-copy-light dark:text-copy-dark": a === "system",
373
442
  "text-copy-dark dark:text-copy-light": a === "alt-system",
374
443
  "px-4 py-3": !t && (e === G || e === K),
375
- "p-4": !t && e === A,
444
+ "p-4": !t && e === I,
376
445
  "px-2 py-1.5": t
377
446
  },
378
447
  r
379
- ), We = ({
448
+ ), Ye = ({
380
449
  buttonClassName: e
381
- }) => i("rounded-none text-sm", e), ce = "av-button", pe = "icon", je = "button", qe = "link", Je = ({
450
+ }) => l("rounded-none text-sm", e), ce = "av-button", be = "icon", Ke = "button", Ze = "link", et = ({
382
451
  type: e,
383
452
  size: r,
384
453
  labelRight: t,
385
454
  labelLeft: a,
386
455
  align: o
387
456
  }) => {
388
- const n = "text-sm font-medium max-h-8 py-0 px-2", l = "text-base font-medium max-h-9 py-1 px-3", s = "text-lg font-medium max-h-12 py-2 px-4";
457
+ const n = "text-sm font-medium max-h-8 py-0 px-2", i = "text-base font-medium max-h-9 py-1 px-3", s = "text-lg font-medium max-h-12 py-2 px-4";
389
458
  switch (e) {
390
- case je:
391
- return i({
459
+ case Ke:
460
+ return l({
392
461
  [n]: r === "small",
393
- [l]: r === "medium",
462
+ [i]: r === "medium",
394
463
  [s]: r === "large"
395
464
  });
396
- case qe:
397
- return i("text-center", {
465
+ case Ze:
466
+ return l("text-center", {
398
467
  [n]: r === "small",
399
- [l]: r === "medium",
468
+ [i]: r === "medium",
400
469
  [s]: r === "large"
401
470
  });
402
- case pe:
403
- return i("inline-flex items-center", {
471
+ case be:
472
+ return l("inline-flex items-center", {
404
473
  "justify-center": o === "center",
405
474
  "justify-start": o === "left",
406
475
  "justify-end": o === "right",
@@ -412,7 +481,7 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
412
481
  "h-12 px-4 text-lg font-medium": r === "large" && (t || a)
413
482
  });
414
483
  }
415
- }, Qe = ({
484
+ }, tt = ({
416
485
  mode: e,
417
486
  noBackground: r,
418
487
  noTruncate: t,
@@ -420,13 +489,13 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
420
489
  radius: o
421
490
  }) => {
422
491
  if (r)
423
- return i("not-prose", {
492
+ return l("not-prose", {
424
493
  "rounded-full": o === "large",
425
494
  "rounded-md": o === "medium",
426
495
  "rounded-sm": o === "small"
427
496
  });
428
497
  if (a === "primary")
429
- return i("not-prose", {
498
+ return l("not-prose", {
430
499
  "rounded-full": o === "large",
431
500
  "rounded-md": o === "medium",
432
501
  "rounded-sm": o === "small",
@@ -437,7 +506,7 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
437
506
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
438
507
  });
439
508
  if (a === "secondary")
440
- return i("not-prose", {
509
+ return l("not-prose", {
441
510
  "rounded-full": o === "large",
442
511
  "rounded-md": o === "medium",
443
512
  "rounded-sm": o === "small",
@@ -448,7 +517,7 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
448
517
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
449
518
  });
450
519
  if (a === "danger")
451
- return i("not-prose", {
520
+ return l("not-prose", {
452
521
  "rounded-full": o === "large",
453
522
  "rounded-md": o === "medium",
454
523
  "rounded-sm": o === "small",
@@ -459,7 +528,7 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
459
528
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
460
529
  });
461
530
  if (a === "selected")
462
- return i("not-prose", {
531
+ return l("not-prose", {
463
532
  "rounded-full": o === "large",
464
533
  "rounded-md": o === "medium",
465
534
  "rounded-sm": o === "small",
@@ -469,7 +538,7 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
469
538
  "bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
470
539
  "bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
471
540
  });
472
- }, Xe = ({
541
+ }, rt = ({
473
542
  mode: e,
474
543
  disabled: r,
475
544
  variant: t
@@ -477,34 +546,34 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
477
546
  if (r)
478
547
  return "";
479
548
  if (t === "primary")
480
- return i("hover:text-copy-light-hover", {
549
+ return l("hover:text-copy-light-hover", {
481
550
  "hover:bg-action-dark-hover": e === "dark",
482
551
  "hover:bg-action-light-hover": e === "light",
483
552
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
484
553
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
485
554
  });
486
555
  if (t === "secondary")
487
- return i("hover:text-copy-light-hover", {
556
+ return l("hover:text-copy-light-hover", {
488
557
  "hover:bg-action-dark-hover": e === "light",
489
558
  "hover:bg-action-light-hover": e === "dark",
490
559
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
491
560
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
492
561
  });
493
562
  if (t === "danger")
494
- return i("hover:text-copy-light-hover", {
563
+ return l("hover:text-copy-light-hover", {
495
564
  "hover:bg-action-danger-dark-hover": e === "dark",
496
565
  "hover:bg-action-danger-light-hover": e === "light",
497
566
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
498
567
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
499
568
  });
500
569
  if (t === "selected")
501
- return i("hover:text-copy-light-hover", {
570
+ return l("hover:text-copy-light-hover", {
502
571
  "hover:bg-action-selected-dark-hover": e === "dark",
503
572
  "hover:bg-action-selected-light-hover": e === "light",
504
573
  "hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
505
574
  "hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
506
575
  });
507
- }, Ye = ({
576
+ }, at = ({
508
577
  mode: e,
509
578
  disabled: r,
510
579
  variant: t
@@ -512,34 +581,34 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
512
581
  if (r)
513
582
  return "";
514
583
  if (t === "primary")
515
- return i("active:text-copy-light-active", {
584
+ return l("active:text-copy-light-active", {
516
585
  "active:bg-action-dark-active": e === "dark",
517
586
  "active:bg-action-light-active": e === "light",
518
587
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
519
588
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
520
589
  });
521
590
  if (t === "secondary")
522
- return i("active:text-copy-light-active", {
591
+ return l("active:text-copy-light-active", {
523
592
  "active:bg-action-dark-active": e === "light",
524
593
  "active:bg-action-light-active": e === "dark",
525
594
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
526
595
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
527
596
  });
528
597
  if (t === "danger")
529
- return i("active:text-copy-lighter-active", {
598
+ return l("active:text-copy-lighter-active", {
530
599
  "active:bg-action-danger-dark-active": e === "dark",
531
600
  "active:bg-action-danger-light-active": e === "light",
532
601
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
533
602
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
534
603
  });
535
604
  if (t === "selected")
536
- return i("active:text-copy-lighter-active", {
605
+ return l("active:text-copy-lighter-active", {
537
606
  "active:bg-action-selected-dark-active": e === "dark",
538
607
  "active:bg-action-selected-light-active": e === "light",
539
608
  "active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
540
609
  "active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
541
610
  });
542
- }, Ke = ({
611
+ }, ot = ({
543
612
  mode: e,
544
613
  noBorder: r,
545
614
  variant: t
@@ -547,48 +616,48 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
547
616
  if (r)
548
617
  return "border border-transparent";
549
618
  if (t === "primary")
550
- return i("border", {
619
+ return l("border", {
551
620
  "border-border-dark": e === "dark",
552
621
  "border-border-accent": e === "light",
553
622
  "border-border-dark dark:border-border-accent": e === "system",
554
623
  "border-border-accent dark:border-border-dark": e === "alt-system"
555
624
  });
556
625
  if (t === "secondary")
557
- return i("border", {
626
+ return l("border", {
558
627
  "border-border-dark": e === "light",
559
628
  "border-border-accent": e === "dark",
560
629
  "border-border-dark dark:border-border-accent": e === "alt-system",
561
630
  "border-border-accent dark:border-border-dark": e === "system"
562
631
  });
563
632
  if (t === "danger")
564
- return i("border", {
633
+ return l("border", {
565
634
  "border-border-danger-dark": e === "dark",
566
635
  "border-border-danger-medium": e === "light",
567
636
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
568
637
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
569
638
  });
570
639
  if (t === "selected")
571
- return i("border", {
640
+ return l("border", {
572
641
  "border-border-selected-dark": e === "dark",
573
642
  "border-border-selected-medium": e === "light",
574
643
  "border-border-selected-dark dark:border-border-selected-medium": e === "system",
575
644
  "border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
576
645
  });
577
- }, Ze = ({
646
+ }, nt = ({
578
647
  focusMode: e
579
- }) => i("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
648
+ }) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
580
649
  "focus:outline-focus-dark": e === "dark",
581
650
  "focus:outline-focus-light": e === "light",
582
651
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
583
652
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
584
- }), et = ({
653
+ }), it = ({
585
654
  type: e,
586
655
  className: r,
587
656
  raw: t,
588
657
  mode: a,
589
658
  focusMode: o,
590
659
  disabled: n,
591
- fullWidth: l,
660
+ fullWidth: i,
592
661
  size: s,
593
662
  noBorder: d,
594
663
  labelRight: u,
@@ -598,48 +667,48 @@ const G = "thead", K = "tfoot", A = "tbody", F = {
598
667
  noTruncate: b,
599
668
  align: p,
600
669
  radius: v
601
- }) => (g || (g = "primary"), t ? i(ce, r) : i(
670
+ }) => (g || (g = "primary"), t ? l(ce, r) : l(
602
671
  ce,
603
- Qe({
672
+ tt({
604
673
  mode: a,
605
674
  variant: g,
606
675
  noBackground: h,
607
676
  noTruncate: b,
608
677
  radius: v
609
678
  }),
610
- Je({
679
+ et({
611
680
  type: e,
612
681
  size: s,
613
682
  labelRight: u,
614
683
  labelLeft: m,
615
684
  align: p
616
685
  }),
617
- Ke({ mode: a, variant: g, noBorder: d }),
618
- Ze({ focusMode: o }),
619
- Xe({ mode: a, variant: g, disabled: n }),
620
- Ye({ mode: a, variant: g, disabled: n }),
686
+ ot({ mode: a, variant: g, noBorder: d }),
687
+ nt({ focusMode: o }),
688
+ rt({ mode: a, variant: g, disabled: n }),
689
+ at({ mode: a, variant: g, disabled: n }),
621
690
  {
622
- "w-full": l,
691
+ "w-full": i,
623
692
  "disabled:cursor-not-allowed disabled:opacity-50": n
624
693
  },
625
694
  r
626
- )), tt = (e, r, t) => {
695
+ )), lt = (e, r, t) => {
627
696
  var a;
628
697
  !r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
629
- }, be = N.forwardRef((e, r) => {
698
+ }, ye = C.forwardRef((e, r) => {
630
699
  const { onClick: t, noInternalClick: a = !1, ...o } = e;
631
700
  return /* @__PURE__ */ c(
632
701
  "button",
633
702
  {
634
703
  ref: r,
635
704
  onClick: (n) => {
636
- tt(n, a, t);
705
+ lt(n, a, t);
637
706
  },
638
707
  ...o
639
708
  }
640
709
  );
641
710
  });
642
- be.displayName = "BaseButton";
711
+ ye.displayName = "BaseButton";
643
712
  /*!
644
713
  @versini/ui-button v3.2.0
645
714
  © 2024 gizmette.com
@@ -653,7 +722,7 @@ try {
653
722
  });
654
723
  } catch {
655
724
  }
656
- const ye = N.forwardRef(
725
+ const fe = C.forwardRef(
657
726
  ({
658
727
  children: e,
659
728
  disabled: r = !1,
@@ -661,7 +730,7 @@ const ye = N.forwardRef(
661
730
  focusMode: a = "system",
662
731
  fullWidth: o = !1,
663
732
  className: n,
664
- type: l = "button",
733
+ type: i = "button",
665
734
  raw: s = !1,
666
735
  noBorder: d = !1,
667
736
  "aria-label": u,
@@ -673,10 +742,10 @@ const ye = N.forwardRef(
673
742
  align: v = "center",
674
743
  active: k = !1,
675
744
  radius: _ = "large",
676
- ...M
745
+ ...V
677
746
  }, O) => {
678
- const V = et({
679
- type: pe,
747
+ const M = it({
748
+ type: be,
680
749
  mode: t,
681
750
  focusMode: a,
682
751
  fullWidth: o,
@@ -690,12 +759,12 @@ const ye = N.forwardRef(
690
759
  noBackground: p,
691
760
  align: v,
692
761
  radius: _
693
- }), D = i({
762
+ }), D = l({
694
763
  "text-copy-accent-dark": t === "light" && !s,
695
764
  "text-copy-light": t === "dark" && !s,
696
765
  "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !s,
697
766
  "text-copy-light dark:text-copy-accent-dark": t === "system" && !s
698
- }), W = k ? i(
767
+ }), W = k ? l(
699
768
  "relative",
700
769
  "focus-within:static",
701
770
  "focus-within:after:border-transparent",
@@ -712,15 +781,15 @@ const ye = N.forwardRef(
712
781
  "after:border-table-light dark:after:border-table-dark": t === "alt-system"
713
782
  }
714
783
  ) : "";
715
- return /* @__PURE__ */ c("div", { className: W, children: /* @__PURE__ */ C(
716
- be,
784
+ return /* @__PURE__ */ c("div", { className: W, children: /* @__PURE__ */ N(
785
+ ye,
717
786
  {
718
787
  ref: O,
719
- className: V,
788
+ className: M,
720
789
  disabled: r,
721
- type: l,
790
+ type: i,
722
791
  "aria-label": u || m,
723
- ...M,
792
+ ...V,
724
793
  children: [
725
794
  b && /* @__PURE__ */ c("span", { className: "pr-2", children: b }),
726
795
  /* @__PURE__ */ c("div", { className: D, children: e }),
@@ -730,7 +799,7 @@ const ye = N.forwardRef(
730
799
  ) });
731
800
  }
732
801
  );
733
- ye.displayName = "ButtonSort";
802
+ fe.displayName = "ButtonSort";
734
803
  const Z = ({
735
804
  children: e,
736
805
  fill: r,
@@ -738,12 +807,12 @@ const Z = ({
738
807
  className: a,
739
808
  defaultViewBox: o,
740
809
  size: n,
741
- title: l,
810
+ title: i,
742
811
  semantic: s = !1,
743
812
  ...d
744
813
  }) => {
745
- const u = i(n, a);
746
- return /* @__PURE__ */ C(Le, { children: [
814
+ const u = l(n, a);
815
+ return /* @__PURE__ */ N(Ve, { children: [
747
816
  /* @__PURE__ */ c(
748
817
  "svg",
749
818
  {
@@ -758,7 +827,7 @@ const Z = ({
758
827
  children: e
759
828
  }
760
829
  ),
761
- l && s && /* @__PURE__ */ c("span", { className: "sr-only", children: l })
830
+ i && s && /* @__PURE__ */ c("span", { className: "sr-only", children: i })
762
831
  ] });
763
832
  };
764
833
  /*!
@@ -774,13 +843,13 @@ try {
774
843
  });
775
844
  } catch {
776
845
  }
777
- const rt = ({
846
+ const st = ({
778
847
  className: e,
779
848
  viewBox: r,
780
849
  title: t,
781
850
  monotone: a,
782
851
  ...o
783
- }) => /* @__PURE__ */ C(
852
+ }) => /* @__PURE__ */ N(
784
853
  Z,
785
854
  {
786
855
  defaultViewBox: "0 0 576 512",
@@ -800,13 +869,13 @@ const rt = ({
800
869
  /* @__PURE__ */ c("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
801
870
  ]
802
871
  }
803
- ), at = ({
872
+ ), ct = ({
804
873
  className: e,
805
874
  viewBox: r,
806
875
  title: t,
807
876
  monotone: a,
808
877
  ...o
809
- }) => /* @__PURE__ */ C(
878
+ }) => /* @__PURE__ */ N(
810
879
  Z,
811
880
  {
812
881
  defaultViewBox: "0 0 576 512",
@@ -826,13 +895,13 @@ const rt = ({
826
895
  /* @__PURE__ */ c("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V365.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z" })
827
896
  ]
828
897
  }
829
- ), ot = ({
898
+ ), dt = ({
830
899
  className: e,
831
900
  viewBox: r,
832
901
  title: t,
833
902
  monotone: a,
834
903
  ...o
835
- }) => /* @__PURE__ */ C(
904
+ }) => /* @__PURE__ */ N(
836
905
  Z,
837
906
  {
838
907
  defaultViewBox: "0 0 576 512",
@@ -866,34 +935,34 @@ try {
866
935
  });
867
936
  } catch {
868
937
  }
869
- const R = N.createContext({
938
+ const H = C.createContext({
870
939
  mode: "light",
871
940
  cellWrapper: "thead",
872
941
  stickyHeader: !1,
873
942
  stickyFooter: !1,
874
943
  compact: !1
875
- }), Vt = ({
944
+ }), Wt = ({
876
945
  children: e,
877
946
  mode: r = "system",
878
947
  caption: t,
879
948
  compact: a,
880
949
  summary: o,
881
950
  className: n,
882
- wrapperClassName: l,
951
+ wrapperClassName: i,
883
952
  maxHeight: s,
884
953
  stickyHeader: d,
885
954
  stickyFooter: u,
886
955
  ...m
887
956
  }) => {
888
- const h = Ue({
957
+ const h = je({
889
958
  mode: r,
890
959
  className: n,
891
- wrapperClassName: l,
960
+ wrapperClassName: i,
892
961
  stickyHeader: d,
893
962
  stickyFooter: u
894
963
  });
895
964
  return /* @__PURE__ */ c(
896
- R.Provider,
965
+ H.Provider,
897
966
  {
898
967
  value: { mode: r, stickyHeader: d, stickyFooter: u, compact: a },
899
968
  children: /* @__PURE__ */ c(
@@ -903,7 +972,7 @@ const R = N.createContext({
903
972
  ...s && {
904
973
  style: { maxHeight: s }
905
974
  },
906
- children: /* @__PURE__ */ C("table", { className: h.table, summary: o, ...m, children: [
975
+ children: /* @__PURE__ */ N("table", { className: h.table, summary: o, ...m, children: [
907
976
  t && /* @__PURE__ */ c("caption", { className: h.caption, children: t }),
908
977
  e
909
978
  ] })
@@ -911,76 +980,76 @@ const R = N.createContext({
911
980
  )
912
981
  }
913
982
  );
914
- }, Ut = ({
983
+ }, jt = ({
915
984
  children: e,
916
985
  className: r,
917
986
  ...t
918
987
  }) => {
919
- const a = L(R);
988
+ const a = B(H);
920
989
  a.cellWrapper = G;
921
- const o = Fe({
990
+ const o = qe({
922
991
  className: r,
923
992
  mode: a.mode,
924
993
  stickyHeader: a.stickyHeader
925
994
  });
926
995
  return /* @__PURE__ */ c("thead", { className: o, ...t, children: e });
927
- }, Ft = ({
996
+ }, qt = ({
928
997
  children: e,
929
998
  className: r,
930
999
  ...t
931
1000
  }) => {
932
- const a = L(R);
1001
+ const a = B(H);
933
1002
  a.cellWrapper = K;
934
- const o = Pe({
1003
+ const o = Je({
935
1004
  className: r,
936
1005
  mode: a.mode,
937
1006
  stickyFooter: a.stickyFooter
938
1007
  });
939
1008
  return /* @__PURE__ */ c("tfoot", { className: o, ...t, children: e });
940
- }, Pt = ({ children: e, ...r }) => {
941
- const t = L(R);
942
- return t.cellWrapper = A, /* @__PURE__ */ c("tbody", { ...r, children: e });
943
- }, Gt = ({
1009
+ }, Jt = ({ children: e, ...r }) => {
1010
+ const t = B(H);
1011
+ return t.cellWrapper = I, /* @__PURE__ */ c("tbody", { ...r, children: e });
1012
+ }, Qt = ({
944
1013
  children: e,
945
1014
  className: r,
946
1015
  ...t
947
1016
  }) => {
948
- const a = L(R), o = Ge({
1017
+ const a = B(H), o = Qe({
949
1018
  mode: a.mode,
950
1019
  cellWrapper: a.cellWrapper,
951
1020
  className: r
952
1021
  });
953
1022
  return /* @__PURE__ */ c("tr", { className: o, ...t, children: e });
954
- }, nt = ({
1023
+ }, ut = ({
955
1024
  children: e,
956
1025
  component: r,
957
1026
  className: t,
958
1027
  ...a
959
1028
  }) => {
960
- const o = L(R), n = r || (o.cellWrapper === G ? "th" : "td"), l = De({
1029
+ const o = B(H), n = r || (o.cellWrapper === G ? "th" : "td"), i = Xe({
961
1030
  cellWrapper: o.cellWrapper,
962
1031
  className: t,
963
1032
  mode: o.mode,
964
1033
  compact: o.compact
965
1034
  });
966
- return /* @__PURE__ */ c(n, { className: l, ...a, children: e });
967
- }, Dt = ({
1035
+ return /* @__PURE__ */ c(n, { className: i, ...a, children: e });
1036
+ }, Xt = ({
968
1037
  align: e,
969
1038
  children: r,
970
1039
  buttonClassName: t,
971
1040
  className: a,
972
1041
  component: o,
973
1042
  focusMode: n = "alt-system",
974
- mode: l = "alt-system",
1043
+ mode: i = "alt-system",
975
1044
  onClick: s,
976
1045
  sortDirection: d,
977
1046
  sortedCell: u,
978
1047
  cellId: m,
979
1048
  ...h
980
1049
  }) => {
981
- const g = We({ buttonClassName: t });
1050
+ const g = Ye({ buttonClassName: t });
982
1051
  return /* @__PURE__ */ c(
983
- nt,
1052
+ ut,
984
1053
  {
985
1054
  component: o,
986
1055
  className: a,
@@ -988,7 +1057,7 @@ const R = N.createContext({
988
1057
  "aria-sort": d === F.ASC && u === m ? "ascending" : d === F.DESC && u === m ? "descending" : "other",
989
1058
  ...h,
990
1059
  children: /* @__PURE__ */ c(
991
- ye,
1060
+ fe,
992
1061
  {
993
1062
  active: u === m,
994
1063
  className: g,
@@ -996,10 +1065,10 @@ const R = N.createContext({
996
1065
  align: e,
997
1066
  noBorder: !0,
998
1067
  focusMode: n,
999
- mode: l,
1068
+ mode: i,
1000
1069
  fullWidth: !0,
1001
1070
  labelRight: r,
1002
- children: d === F.ASC && u === m ? /* @__PURE__ */ c(ot, { className: "size-4", monotone: !0 }) : d === F.DESC && u === m ? /* @__PURE__ */ c(at, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ c(rt, { className: "size-4", monotone: !0 })
1071
+ children: d === F.ASC && u === m ? /* @__PURE__ */ c(dt, { className: "size-4", monotone: !0 }) : d === F.DESC && u === m ? /* @__PURE__ */ c(ct, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ c(st, { className: "size-4", monotone: !0 })
1003
1072
  }
1004
1073
  )
1005
1074
  }
@@ -1018,14 +1087,14 @@ try {
1018
1087
  });
1019
1088
  } catch {
1020
1089
  }
1021
- const fe = "av-text-area", it = "av-text-area-wrapper", Y = "av-text-area-helper-text", lt = "av-text-area__control--right", st = "av-text-area__control--left";
1022
- function ct() {
1090
+ const ke = "av-text-area", mt = "av-text-area-wrapper", Y = "av-text-area-helper-text", gt = "av-text-area__control--right", ht = "av-text-area__control--left";
1091
+ function pt() {
1023
1092
  const e = f(!1);
1024
- return z(() => (e.current = !0, () => {
1093
+ return R(() => (e.current = !0, () => {
1025
1094
  e.current = !1;
1026
1095
  }), []), P(() => e.current, []);
1027
1096
  }
1028
- function dt(e) {
1097
+ function bt(e) {
1029
1098
  return me(() => e.every((r) => r == null) ? () => {
1030
1099
  } : (r) => {
1031
1100
  e.forEach((t) => {
@@ -1033,7 +1102,7 @@ function dt(e) {
1033
1102
  });
1034
1103
  }, e);
1035
1104
  }
1036
- const ut = {
1105
+ const yt = {
1037
1106
  x: 0,
1038
1107
  y: 0,
1039
1108
  width: 0,
@@ -1044,17 +1113,17 @@ const ut = {
1044
1113
  right: 0
1045
1114
  };
1046
1115
  function de(e) {
1047
- const r = ct(), t = f(0), a = f(null), [o, n] = $(ut), l = me(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
1116
+ const r = pt(), t = f(0), a = f(null), [o, n] = $(yt), i = me(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
1048
1117
  const d = s[0];
1049
1118
  d && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
1050
1119
  a.current && r() && n(d.contentRect);
1051
1120
  }));
1052
1121
  }), [r]);
1053
- return z(() => (a.current && (l == null || l.observe(a.current, e)), () => {
1054
- l == null || l.disconnect(), t.current && cancelAnimationFrame(t.current);
1055
- }), [l, e]), [a, o];
1122
+ return R(() => (a.current && (i == null || i.observe(a.current, e)), () => {
1123
+ i == null || i.disconnect(), t.current && cancelAnimationFrame(t.current);
1124
+ }), [i, e]), [a, o];
1056
1125
  }
1057
- function mt({
1126
+ function ft({
1058
1127
  value: e,
1059
1128
  defaultValue: r,
1060
1129
  finalValue: t,
@@ -1062,19 +1131,19 @@ function mt({
1062
1131
  },
1063
1132
  initialControlledDelay: o = 0
1064
1133
  }) {
1065
- const [n, l] = $(!1), [s, d] = $(
1134
+ const [n, i] = $(!1), [s, d] = $(
1066
1135
  r !== void 0 ? r : t
1067
1136
  ), u = (m) => {
1068
1137
  d(m), a == null || a(m);
1069
1138
  };
1070
- return z(() => {
1139
+ return R(() => {
1071
1140
  (async () => e !== void 0 && !n && o > 0 && (await new Promise(
1072
1141
  (m) => setTimeout(m, o)
1073
- ), l(!0)))();
1142
+ ), i(!0)))();
1074
1143
  }, [e, o, n]), e !== void 0 ? !n && o > 0 ? ["", a, !0] : [e, a, !0] : [s, u, !1];
1075
1144
  }
1076
- function gt(e) {
1077
- const r = Be();
1145
+ function kt(e) {
1146
+ const r = ze();
1078
1147
  if (!e)
1079
1148
  return r;
1080
1149
  if (typeof e == "number" || typeof e == "string")
@@ -1084,7 +1153,7 @@ function gt(e) {
1084
1153
  return typeof t == "number" || typeof t == "string" ? `${a}${t}` : `${a}${r}`;
1085
1154
  }
1086
1155
  }
1087
- const ke = "SET_ANNOUNCEMENT", ve = "CLEAR_ANNOUNCEMENT", ht = {
1156
+ const ve = "SET_ANNOUNCEMENT", xe = "CLEAR_ANNOUNCEMENT", vt = {
1088
1157
  alert: null,
1089
1158
  alertdialog: null,
1090
1159
  log: "polite",
@@ -1092,14 +1161,14 @@ const ke = "SET_ANNOUNCEMENT", ve = "CLEAR_ANNOUNCEMENT", ht = {
1092
1161
  progressbar: null,
1093
1162
  status: "polite",
1094
1163
  timer: "assertive"
1095
- }, pt = (e, r) => {
1164
+ }, xt = (e, r) => {
1096
1165
  switch (r == null ? void 0 : r.type) {
1097
- case ke:
1166
+ case ve:
1098
1167
  return {
1099
1168
  ...e,
1100
1169
  announcement: r.payload
1101
1170
  };
1102
- case ve:
1171
+ case xe:
1103
1172
  return {
1104
1173
  ...e,
1105
1174
  announcement: null
@@ -1107,12 +1176,12 @@ const ke = "SET_ANNOUNCEMENT", ve = "CLEAR_ANNOUNCEMENT", ht = {
1107
1176
  default:
1108
1177
  return e;
1109
1178
  }
1110
- }, bt = ({
1179
+ }, _t = ({
1111
1180
  onAnnouncementClear: e,
1112
1181
  dispatch: r
1113
1182
  }) => {
1114
1183
  r({
1115
- type: ve
1184
+ type: xe
1116
1185
  }), typeof e == "function" && e();
1117
1186
  }, ue = ({
1118
1187
  children: e,
@@ -1122,70 +1191,70 @@ const ke = "SET_ANNOUNCEMENT", ve = "CLEAR_ANNOUNCEMENT", ht = {
1122
1191
  dispatch: o
1123
1192
  }) => {
1124
1193
  clearTimeout(t.current), e !== null && o({
1125
- type: ke,
1194
+ type: ve,
1126
1195
  payload: e
1127
1196
  }), r && (t.current = setTimeout(
1128
- () => bt({
1197
+ () => _t({
1129
1198
  onAnnouncementClear: a,
1130
1199
  dispatch: o
1131
1200
  }),
1132
1201
  r
1133
1202
  ));
1134
- }, yt = ({
1203
+ }, wt = ({
1135
1204
  children: e,
1136
1205
  announcementTimeoutRef: r,
1137
1206
  announcementDelay: t,
1138
1207
  clearAnnouncementDelay: a,
1139
1208
  clearAnnouncementTimeoutRef: o,
1140
1209
  onAnnouncementClear: n,
1141
- dispatch: l
1210
+ dispatch: i
1142
1211
  }) => {
1143
1212
  clearTimeout(r.current), t ? r.current = setTimeout(ue, t, {
1144
1213
  children: e,
1145
1214
  clearAnnouncementDelay: a,
1146
1215
  clearAnnouncementTimeoutRef: o,
1147
1216
  onAnnouncementClear: n,
1148
- dispatch: l
1217
+ dispatch: i
1149
1218
  }) : ue({
1150
1219
  children: e,
1151
1220
  clearAnnouncementDelay: a,
1152
1221
  clearAnnouncementTimeoutRef: o,
1153
1222
  onAnnouncementClear: n,
1154
- dispatch: l
1223
+ dispatch: i
1155
1224
  });
1156
1225
  };
1157
- function ft({
1226
+ function Et({
1158
1227
  children: e,
1159
1228
  className: r,
1160
1229
  politeness: t,
1161
1230
  role: a = null,
1162
1231
  announcementDelay: o,
1163
1232
  clearAnnouncementDelay: n,
1164
- onAnnouncementClear: l,
1233
+ onAnnouncementClear: i,
1165
1234
  visible: s,
1166
1235
  ...d
1167
1236
  }) {
1168
- const u = f(null), m = f(null), [h, g] = ze(pt, {
1237
+ const u = f(null), m = f(null), [h, g] = Le(xt, {
1169
1238
  announcement: null
1170
1239
  });
1171
1240
  let b = t;
1172
- typeof b > "u" && (b = a ? ht[a] : "assertive"), z(() => {
1173
- yt({
1241
+ typeof b > "u" && (b = a ? vt[a] : "assertive"), R(() => {
1242
+ wt({
1174
1243
  announcementTimeoutRef: u,
1175
1244
  announcementDelay: o,
1176
1245
  children: e,
1177
1246
  clearAnnouncementDelay: n,
1178
1247
  clearAnnouncementTimeoutRef: m,
1179
- onAnnouncementClear: l,
1248
+ onAnnouncementClear: i,
1180
1249
  dispatch: g
1181
1250
  });
1182
1251
  }, [
1183
1252
  e,
1184
1253
  o,
1185
1254
  n,
1186
- l
1255
+ i
1187
1256
  ]);
1188
- const p = i(r, {
1257
+ const p = l(r, {
1189
1258
  "sr-only": !s
1190
1259
  });
1191
1260
  return /* @__PURE__ */ c(
@@ -1212,27 +1281,27 @@ try {
1212
1281
  });
1213
1282
  } catch {
1214
1283
  }
1215
- const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", vt = ({ mode: e }) => i({
1284
+ const Nt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", St = ({ mode: e }) => l({
1216
1285
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
1217
1286
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
1218
1287
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
1219
1288
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
1220
- }), xt = ({
1289
+ }), Tt = ({
1221
1290
  focusMode: e
1222
- }) => i("focus:outline focus:outline-2 focus:outline-offset-2", {
1291
+ }) => l("focus:outline focus:outline-2 focus:outline-offset-2", {
1223
1292
  "focus:outline-focus-dark": e === "dark",
1224
1293
  "focus:outline-focus-light": e === "light",
1225
1294
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1226
1295
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1227
- }), _t = ({
1296
+ }), Ct = ({
1228
1297
  noBorder: e,
1229
1298
  error: r
1230
- }) => i("border-2", {
1299
+ }) => l("border-2", {
1231
1300
  "border-border-dark": !e && !r,
1232
1301
  "focus:border-border-dark": !e && r,
1233
1302
  "border-border-error-dark": !e && r,
1234
1303
  "border-transparent": e
1235
- }), Et = ({
1304
+ }), At = ({
1236
1305
  disabled: e,
1237
1306
  raw: r,
1238
1307
  error: t,
@@ -1243,14 +1312,14 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1243
1312
  if (r)
1244
1313
  return "";
1245
1314
  if (e)
1246
- return i(
1315
+ return l(
1247
1316
  "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
1248
1317
  {
1249
1318
  "translate-x-[12px]": n === !0 && !o || !n && !o
1250
1319
  }
1251
1320
  );
1252
1321
  if (!t)
1253
- return i(
1322
+ return l(
1254
1323
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
1255
1324
  {
1256
1325
  "translate-x-[12px]": n === !0 && !o || !n && !o,
@@ -1261,7 +1330,7 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1261
1330
  }
1262
1331
  );
1263
1332
  if (t)
1264
- return i(
1333
+ return l(
1265
1334
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
1266
1335
  {
1267
1336
  "translate-x-[12px]": n === !0 && !o || !n && !o,
@@ -1271,7 +1340,7 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1271
1340
  "text-copy-medium dark:text-copy-error-dark": a === "alt-system"
1272
1341
  }
1273
1342
  );
1274
- }, wt = ({
1343
+ }, It = ({
1275
1344
  error: e,
1276
1345
  raw: r,
1277
1346
  mode: t,
@@ -1280,66 +1349,66 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1280
1349
  if (r)
1281
1350
  return "";
1282
1351
  if (a)
1283
- return i(
1352
+ return l(
1284
1353
  Y,
1285
1354
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
1286
1355
  );
1287
1356
  if (!e)
1288
- return i(Y, "absolute px-2 font-medium", {
1357
+ return l(Y, "absolute px-2 font-medium", {
1289
1358
  "text-copy-medium": t === "dark",
1290
1359
  "text-copy-dark": t === "light",
1291
1360
  "text-copy-dark dark:text-copy-medium": t === "system",
1292
1361
  "text-copy-medium dark:text-copy-dark": t === "alt-system"
1293
1362
  });
1294
1363
  if (e)
1295
- return i(Y, "absolute px-2 font-medium", {
1364
+ return l(Y, "absolute px-2 font-medium", {
1296
1365
  "text-copy-error-light": t === "dark",
1297
1366
  "text-copy-error-dark": t === "light",
1298
1367
  "text-copy-error-dark dark:text-copy-error-light": t === "system",
1299
1368
  "dark:text-copy-error-dark text-copy-error-light": t === "alt-system"
1300
1369
  });
1301
- }, St = ({
1370
+ }, $t = ({
1302
1371
  className: e,
1303
1372
  textAreaClassName: r,
1304
1373
  raw: t,
1305
1374
  focusMode: a,
1306
1375
  disabled: o,
1307
1376
  noBorder: n,
1308
- error: l,
1377
+ error: i,
1309
1378
  mode: s,
1310
1379
  leftElement: d,
1311
1380
  rightElement: u
1312
1381
  }) => {
1313
- const m = t ? e : i(
1382
+ const m = t ? e : l(
1314
1383
  "relative flex w-full flex-col justify-center",
1315
- it,
1384
+ mt,
1316
1385
  e
1317
- ), h = t ? i(r) : i(
1318
- fe,
1386
+ ), h = t ? l(r) : l(
1387
+ ke,
1319
1388
  r,
1320
- kt(),
1321
- vt({ mode: s }),
1322
- xt({ focusMode: a }),
1323
- _t({
1389
+ Nt(),
1390
+ St({ mode: s }),
1391
+ Tt({ focusMode: a }),
1392
+ Ct({
1324
1393
  noBorder: n,
1325
- error: l
1394
+ error: i
1326
1395
  }),
1327
1396
  {
1328
1397
  "disabled:cursor-not-allowed disabled:opacity-50": o
1329
1398
  }
1330
- ), g = t ? void 0 : "sr-only", b = Et({
1399
+ ), g = t ? void 0 : "sr-only", b = At({
1331
1400
  disabled: o,
1332
1401
  raw: t,
1333
- error: l,
1402
+ error: i,
1334
1403
  mode: s,
1335
1404
  rightElement: u,
1336
1405
  leftElement: d
1337
- }), p = wt({
1338
- error: l,
1406
+ }), p = It({
1407
+ error: i,
1339
1408
  raw: t,
1340
1409
  mode: s,
1341
1410
  disabled: o
1342
- }), v = t ? void 0 : i(lt, "absolute"), k = t ? void 0 : i(st, "absolute");
1411
+ }), v = t ? void 0 : l(gt, "absolute"), k = t ? void 0 : l(ht, "absolute");
1343
1412
  return {
1344
1413
  wrapper: m,
1345
1414
  textArea: h,
@@ -1349,7 +1418,7 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1349
1418
  rightElement: v,
1350
1419
  leftElement: k
1351
1420
  };
1352
- }, Tt = ({
1421
+ }, Rt = ({
1353
1422
  scrollHeight: e,
1354
1423
  currentHeight: r,
1355
1424
  currentLabelOffset: t = 0,
@@ -1357,15 +1426,15 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1357
1426
  }) => {
1358
1427
  let o, n;
1359
1428
  if (e > 0 && e !== r) {
1360
- const l = e - r, s = Math.abs(l / 24);
1361
- o = t + -1 * Math.sign(l) * (12 * s), n = a + Math.sign(l) * (12 * s);
1429
+ const i = e - r, s = Math.abs(i / 24);
1430
+ o = t + -1 * Math.sign(i) * (12 * s), n = a + Math.sign(i) * (12 * s);
1362
1431
  }
1363
1432
  return {
1364
1433
  labelOffset: o,
1365
1434
  helperTextOffset: n,
1366
1435
  scrollHeight: e
1367
1436
  };
1368
- }, Nt = N.forwardRef(
1437
+ }, Bt = C.forwardRef(
1369
1438
  ({
1370
1439
  id: e,
1371
1440
  name: r,
@@ -1373,7 +1442,7 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1373
1442
  error: a = !1,
1374
1443
  raw: o = !1,
1375
1444
  className: n,
1376
- textAreaClassName: l,
1445
+ textAreaClassName: i,
1377
1446
  mode: s = "system",
1378
1447
  focusMode: d = "system",
1379
1448
  value: u,
@@ -1385,17 +1454,17 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1385
1454
  helperTextOnFocus: v = !1,
1386
1455
  rightElement: k,
1387
1456
  leftElement: _,
1388
- onChange: M,
1457
+ onChange: V,
1389
1458
  onFocus: O,
1390
- onBlur: V,
1459
+ onBlur: M,
1391
1460
  ...D
1392
1461
  }, W) => {
1393
1462
  var ee;
1394
- const x = f(null), xe = dt([W, x]), [_e, U] = de(), [Ee, I] = de(), j = f(80), te = f(-25), S = f(null), re = f(30), q = f(null), H = gt({ id: e, prefix: `${fe}-` }), [ae, we] = $(0), [oe, Se] = $(0), [Te, ne] = $(
1463
+ const x = f(null), _e = bt([W, x]), [we, U] = de(), [Ee, A] = de(), j = f(80), te = f(-25), S = f(null), re = f(30), q = f(null), z = kt({ id: e, prefix: `${ke}-` }), [ae, Ne] = $(0), [oe, Se] = $(0), [Te, ne] = $(
1395
1464
  !!(!v && p)
1396
- ), Ne = `${r} error, ${p}`, T = St({
1465
+ ), Ce = `${r} error, ${p}`, T = $t({
1397
1466
  className: n,
1398
- textAreaClassName: l,
1467
+ textAreaClassName: i,
1399
1468
  error: a,
1400
1469
  raw: o,
1401
1470
  focusMode: d,
@@ -1404,42 +1473,42 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1404
1473
  mode: s,
1405
1474
  rightElement: !!k,
1406
1475
  leftElement: !!_
1407
- }), [E, Ce] = mt({
1476
+ }), [w, Ae] = ft({
1408
1477
  value: u,
1409
1478
  initialControlledDelay: 20,
1410
1479
  defaultValue: m,
1411
1480
  onChange: (y) => {
1412
- M && M({
1481
+ V && V({
1413
1482
  target: {
1414
1483
  value: y
1415
1484
  }
1416
1485
  });
1417
1486
  }
1418
1487
  }), Ie = (y) => {
1419
- Ce(y.target.value);
1420
- }, Ae = (y) => {
1421
- v && p && ne(!0), O && O(y);
1488
+ Ae(y.target.value);
1422
1489
  }, $e = (y) => {
1423
- v && p && !E && ne(!1), V && V(y);
1490
+ v && p && ne(!0), O && O(y);
1491
+ }, Re = (y) => {
1492
+ v && p && !w && ne(!1), M && M(y);
1424
1493
  };
1425
- return B(() => {
1426
- U && U.width && we(U.width + 18 + 10);
1427
- }, [U]), B(() => {
1428
- I && I.width && Se(I.width + 18 + 10);
1429
- }, [I]), B(() => {
1430
- o || x && x.current && E !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
1431
- }, [E, o]), B(() => {
1494
+ return L(() => {
1495
+ U && U.width && Ne(U.width + 18 + 10);
1496
+ }, [U]), L(() => {
1497
+ A && A.width && Se(A.width + 18 + 10);
1498
+ }, [A]), L(() => {
1499
+ o || x && x.current && w !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
1500
+ }, [w, o]), L(() => {
1432
1501
  o || setTimeout(() => {
1433
1502
  var y;
1434
1503
  (y = S == null ? void 0 : S.current) == null || y.style.setProperty(
1435
1504
  "--av-text-area-wrapper-transition",
1436
- E ? "none" : "all 0.2s ease-out"
1505
+ w ? "none" : "all 0.2s ease-out"
1437
1506
  );
1438
1507
  }, 0);
1439
- }, [E, o]), B(() => {
1508
+ }, [w, o]), L(() => {
1440
1509
  var y, ie;
1441
- if (!o && x && x.current && E !== void 0) {
1442
- const { labelOffset: J, helperTextOffset: Q, scrollHeight: Re } = Tt({
1510
+ if (!o && x && x.current && w !== void 0) {
1511
+ const { labelOffset: J, helperTextOffset: Q, scrollHeight: Be } = Rt({
1443
1512
  scrollHeight: x.current.scrollHeight,
1444
1513
  currentHeight: j.current,
1445
1514
  currentLabelOffset: te.current,
@@ -1451,16 +1520,16 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1451
1520
  )), Q && (re.current = Q, (ie = q == null ? void 0 : q.current) == null || ie.style.setProperty(
1452
1521
  "--av-text-area-helper-text",
1453
1522
  `${Q}px`
1454
- )), j.current = Re || j.current;
1523
+ )), j.current = Be || j.current;
1455
1524
  }
1456
- }, [E, o]), I.width > 0 && ((ee = S == null ? void 0 : S.current) == null || ee.style.setProperty(
1525
+ }, [w, o]), A.width > 0 && ((ee = S == null ? void 0 : S.current) == null || ee.style.setProperty(
1457
1526
  "--tw-translate-x",
1458
- `${12 + I.width + 5}px`
1459
- )), /* @__PURE__ */ C("div", { className: T.wrapper, children: [
1527
+ `${12 + A.width + 5}px`
1528
+ )), /* @__PURE__ */ N("div", { className: T.wrapper, children: [
1460
1529
  /* @__PURE__ */ c(
1461
1530
  "label",
1462
1531
  {
1463
- htmlFor: H,
1532
+ htmlFor: z,
1464
1533
  id: b,
1465
1534
  className: T.accessibleLabel,
1466
1535
  children: t
@@ -1477,14 +1546,14 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1477
1546
  /* @__PURE__ */ c(
1478
1547
  "textarea",
1479
1548
  {
1480
- ref: xe,
1481
- id: H,
1549
+ ref: _e,
1550
+ id: z,
1482
1551
  name: r,
1483
1552
  disabled: h,
1484
1553
  placeholder: o ? void 0 : " ",
1485
1554
  className: T.textArea,
1486
1555
  rows: 1,
1487
- ...p && { "aria-describedby": `${H}-helper` },
1556
+ ...p && { "aria-describedby": `${z}-helper` },
1488
1557
  ...a && { "aria-invalid": "true" },
1489
1558
  ...k && !_ && !o && { style: { paddingRight: ae } },
1490
1559
  ..._ && !k && !o && { style: { paddingLeft: oe } },
@@ -1494,10 +1563,10 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1494
1563
  paddingLeft: oe
1495
1564
  }
1496
1565
  },
1497
- value: E,
1566
+ value: w,
1498
1567
  onChange: Ie,
1499
- onFocus: Ae,
1500
- onBlur: $e,
1568
+ onFocus: $e,
1569
+ onBlur: Re,
1501
1570
  ...D
1502
1571
  }
1503
1572
  ),
@@ -1506,7 +1575,7 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1506
1575
  {
1507
1576
  ref: S,
1508
1577
  "aria-hidden": !0,
1509
- htmlFor: H,
1578
+ htmlFor: z,
1510
1579
  className: `${T.visibleLabel}`,
1511
1580
  children: t
1512
1581
  }
@@ -1515,7 +1584,7 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1515
1584
  "div",
1516
1585
  {
1517
1586
  ref: q,
1518
- id: `${H}-helper`,
1587
+ id: `${z}-helper`,
1519
1588
  className: T.helperText,
1520
1589
  children: p
1521
1590
  }
@@ -1523,31 +1592,33 @@ const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1523
1592
  k && /* @__PURE__ */ c(
1524
1593
  "div",
1525
1594
  {
1526
- ref: _e,
1595
+ ref: we,
1527
1596
  className: T.rightElement,
1528
1597
  children: k
1529
1598
  }
1530
1599
  ),
1531
- a && p && /* @__PURE__ */ c(ft, { politeness: "polite", clearAnnouncementDelay: 500, children: Ne })
1600
+ a && p && /* @__PURE__ */ c(Et, { politeness: "polite", clearAnnouncementDelay: 500, children: Ce })
1532
1601
  ] });
1533
1602
  }
1534
1603
  );
1535
- Nt.displayName = "TextArea";
1604
+ Bt.displayName = "TextArea";
1536
1605
  export {
1537
- Lt as AppContext,
1538
- Rt as E,
1539
- Nt as Fe,
1540
- Mt as HistoryContext,
1541
- Ht as SERVICE_TYPES,
1542
- Ot as TagsContext,
1543
- Dt as be,
1544
- Vt as ce,
1606
+ We as AppContext,
1607
+ Ot as E,
1608
+ Bt as Fe,
1609
+ Pt as HistoryContext,
1610
+ Dt as NewChatButton,
1611
+ Mt as SERVICE_TYPES,
1612
+ Gt as TagsContext,
1613
+ Xt as be,
1614
+ Wt as ce,
1545
1615
  F as f,
1546
- Pt as ge,
1547
- Gt as he,
1548
- Ft as ne,
1549
- nt as oe,
1550
- zt as restCall,
1551
- Ut as se,
1552
- Bt as serviceCall
1616
+ Jt as ge,
1617
+ Qt as he,
1618
+ Fe as m,
1619
+ qt as ne,
1620
+ ut as oe,
1621
+ Ft as restCall,
1622
+ jt as se,
1623
+ Ut as serviceCall
1553
1624
  };