@versini/sassysaint 5.4.4 → 5.4.6

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,187 +1,187 @@
1
- import { jsx as r, jsxs as v, Fragment as A } from "react/jsx-runtime";
2
- import { g as V, E as $, CARDS as N, renderDataAsList as ie, pluralize as be, AppContext as ue, ABOUT_TITLE as At, DEFAULT_AI_ENGINE as ae, numberFormatter as Mt, durationFormatter as Xe, NA as Pt, ROLE_ASSISTANT as Lt, extractAverage as $t, GPT4_MAX_TOKENS as Bt, un as X, STATS as Ze, b as Q, j as L, R as G, HistoryContext as Je, LOCAL_STORAGE_PREFIX as me, LOCAL_STORAGE_SORT as Vt, O as W, ACTION_RESET as Qe, ACTION_RESTORE as zt, truncate as Ot, ACTION_SORT as we, LOCAL_STORAGE_SEARCH as Dt, fe as _e, ACTION_SEARCH as Ht, HISTORY_TITLE as Ft, LOCAL_STORAGE_ENGINE_TOGGLE as et, ENGINE_OPENAI as Ne, ENGINE_ANTHROPIC as fe, APP_NAME as Gt, ACTION_ENGINE as tt, getCurrentGeoLocation as Ut, TagsContext as jt, TAGS_DESCRIPTION as Kt, ACTION_SET_TAGS as Wt, LOCAL_STORAGE_CHAT_DETAILS as Yt, M as qt, v as ze, PROFILE_TITLE as Xt, LOG_OUT as Oe } from "./index.7zCJNQU6.js";
3
- import { serviceCall as D, SERVICE_TYPES as H, E as he, y as O, ge as Zt, he as Jt, ue as Te, pe as Qt, se as F, me as eo, be as to, $e as De, m as He } from "./index.DTvyH-fG.js";
4
- import * as b from "react";
5
- import _, { useId as oo, forwardRef as ot, useState as x, useRef as le, useContext as B, useEffect as q, Suspense as ro, lazy as no, useMemo as ao } from "react";
1
+ import { jsx as n, jsxs as y, Fragment as S } from "react/jsx-runtime";
2
+ import { g as L, E as M, CARDS as I, renderDataAsList as ne, pluralize as he, AppContext as se, ABOUT_TITLE as Dt, DEFAULT_AI_ENGINE as te, numberFormatter as Ft, durationFormatter as Xe, NA as Gt, ROLE_ASSISTANT as Ht, extractAverage as Ut, GPT4_MAX_TOKENS as jt, un as W, STATS as Je, b as q, j as A, R as G, HistoryContext as et, LOCAL_STORAGE_PREFIX as ie, LOCAL_STORAGE_SORT as Kt, O as U, ACTION_RESET as tt, ACTION_RESTORE as Wt, truncate as Yt, ACTION_SORT as we, LOCAL_STORAGE_SEARCH as qt, fe as _e, ACTION_SEARCH as Zt, debounce as Qt, HISTORY_TITLE as Xt, LOCAL_STORAGE_ENGINE_TOGGLE as ot, ENGINE_OPENAI as Ne, ENGINE_ANTHROPIC as me, APP_NAME as Jt, ACTION_ENGINE as nt, getCurrentGeoLocation as eo, TagsContext as to, TAGS_DESCRIPTION as oo, ACTION_SET_TAGS as no, LOCAL_STORAGE_CHAT_DETAILS as ro, M as ao, v as De, PROFILE_TITLE as so, LOG_OUT as Fe } from "./index.sbHwdUKv.js";
3
+ import { serviceCall as z, SERVICE_TYPES as D, E as le, y as B, ge as io, he as lo, ue as Ie, pe as co, se as F, me as uo, be as mo, $e as Ge, m as He } from "./index.CTDNajS_.js";
4
+ import * as f from "react";
5
+ import _, { useId as Me, forwardRef as rt, useState as x, useRef as Z, useContext as P, useEffect as K } from "react";
6
6
  import C from "clsx";
7
- import { useFloatingTree as rt, useFloatingNodeId as so, useListItem as nt, useFloating as io, offset as lo, flip as co, shift as uo, autoUpdate as mo, useClick as ho, useRole as go, useDismiss as po, useListNavigation as fo, useTypeahead as bo, useInteractions as vo, useMergeRefs as at, FloatingNode as yo, FloatingList as ko, FloatingPortal as Co, FloatingFocusManager as wo, FloatingTree as No } from "@floating-ui/react";
8
- const st = ({
7
+ import { useFloatingTree as at, useFloatingNodeId as ho, useListItem as st, useFloating as it, offset as po, flip as go, shift as fo, autoUpdate as bo, useClick as lt, useRole as ct, useDismiss as dt, useListNavigation as vo, useTypeahead as yo, useInteractions as ut, useMergeRefs as Pe, FloatingNode as ko, FloatingList as Co, FloatingPortal as mt, FloatingFocusManager as ht, FloatingTree as wo, FloatingOverlay as No } from "@floating-ui/react";
8
+ const pt = ({
9
9
  className: e,
10
10
  viewBox: t,
11
11
  spacing: o,
12
- title: n,
12
+ title: r,
13
13
  monotone: a,
14
14
  ...s
15
- }) => /* @__PURE__ */ r(
16
- V,
15
+ }) => /* @__PURE__ */ n(
16
+ L,
17
17
  {
18
18
  defaultViewBox: "0 0 256 176",
19
19
  defaultClassName: "size-5",
20
20
  viewBox: t,
21
21
  className: e,
22
22
  spacing: o,
23
- title: n || "Anthropic",
23
+ title: r || "Anthropic",
24
24
  ...s,
25
- children: /* @__PURE__ */ r("path", { d: "m147.487 0l70.081 175.78H256L185.919 0zM66.183 106.221l23.98-61.774l23.98 61.774zM70.07 0L0 175.78h39.18l14.33-36.914h73.308l14.328 36.914h39.179L110.255 0z" })
25
+ children: /* @__PURE__ */ n("path", { d: "m147.487 0l70.081 175.78H256L185.919 0zM66.183 106.221l23.98-61.774l23.98 61.774zM70.07 0L0 175.78h39.18l14.33-36.914h73.308l14.328 36.914h39.179L110.255 0z" })
26
26
  }
27
- ), To = ({
27
+ ), Io = ({
28
28
  className: e,
29
29
  viewBox: t,
30
30
  spacing: o,
31
- title: n,
31
+ title: r,
32
32
  monotone: a,
33
33
  ...s
34
- }) => /* @__PURE__ */ v(
35
- V,
34
+ }) => /* @__PURE__ */ y(
35
+ L,
36
36
  {
37
37
  defaultViewBox: "0 0 512 512",
38
38
  defaultClassName: "size-5",
39
39
  viewBox: t,
40
40
  className: e,
41
41
  spacing: o,
42
- title: n || "Back",
42
+ title: r || "Back",
43
43
  ...s,
44
44
  children: [
45
- /* @__PURE__ */ r(
45
+ /* @__PURE__ */ n(
46
46
  "path",
47
47
  {
48
48
  opacity: a ? "1" : "0.4",
49
49
  d: "M288.4 93.4c2.9-17.4 19.4-29.2 36.9-26.3C431.3 84.9 512 177 512 288c0 123.7-100.3 224-224 224C177 512 84.9 431.3 67.1 325.3c-2.9-17.4 8.8-33.9 26.3-36.9s33.9 8.8 36.9 26.3C142.9 390.4 208.8 448 288 448c88.4 0 160-71.6 160-160c0-79.2-57.6-145.1-133.3-157.8c-17.4-2.9-29.2-19.4-26.3-36.9z"
50
50
  }
51
51
  ),
52
- /* @__PURE__ */ r("path", { d: "M32 0H192c17.7 0 32 14.3 32 32s-14.3 32-32 32H109.3L342.6 297.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3V192c0 17.7-14.3 32-32 32s-32-14.3-32-32V32C0 14.3 14.3 0 32 0z" })
52
+ /* @__PURE__ */ n("path", { d: "M32 0H192c17.7 0 32 14.3 32 32s-14.3 32-32 32H109.3L342.6 297.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3V192c0 17.7-14.3 32-32 32s-32-14.3-32-32V32C0 14.3 14.3 0 32 0z" })
53
53
  ]
54
54
  }
55
- ), Io = ({
55
+ ), To = ({
56
56
  className: e,
57
57
  viewBox: t,
58
58
  spacing: o,
59
- title: n,
59
+ title: r,
60
60
  monotone: a,
61
61
  ...s
62
- }) => /* @__PURE__ */ v(
63
- V,
62
+ }) => /* @__PURE__ */ y(
63
+ L,
64
64
  {
65
65
  defaultViewBox: "0 0 448 512",
66
66
  defaultClassName: "size-5",
67
67
  viewBox: t,
68
68
  className: e,
69
69
  spacing: o,
70
- title: n || "Chart",
70
+ title: r || "Chart",
71
71
  ...s,
72
72
  children: [
73
- /* @__PURE__ */ r(
73
+ /* @__PURE__ */ n(
74
74
  "path",
75
75
  {
76
76
  opacity: a ? "1" : "0.4",
77
77
  d: "M160 80c0-26.5 21.5-48 48-48h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V80z"
78
78
  }
79
79
  ),
80
- /* @__PURE__ */ r("path", { d: "M368 96c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V144c0-26.5-21.5-48-48-48H368zM48 224c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48H48z" })
80
+ /* @__PURE__ */ n("path", { d: "M368 96c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V144c0-26.5-21.5-48-48-48H368zM48 224c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48H48z" })
81
81
  ]
82
82
  }
83
83
  ), _o = ({
84
84
  className: e,
85
85
  viewBox: t,
86
86
  spacing: o,
87
- title: n,
87
+ title: r,
88
88
  monotone: a,
89
89
  ...s
90
- }) => /* @__PURE__ */ v(
91
- V,
90
+ }) => /* @__PURE__ */ y(
91
+ L,
92
92
  {
93
93
  defaultViewBox: "0 0 448 512",
94
94
  defaultClassName: "size-5",
95
95
  viewBox: t,
96
96
  className: e,
97
97
  spacing: o,
98
- title: n || "Delete",
98
+ title: r || "Delete",
99
99
  ...s,
100
100
  children: [
101
- /* @__PURE__ */ r(
101
+ /* @__PURE__ */ n(
102
102
  "path",
103
103
  {
104
104
  opacity: a ? "1" : "0.4",
105
105
  d: "M416 96H32V448c0 35.3 28.7 64 64 64H352c35.3 0 64-28.7 64-64V96zM144 176V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16z"
106
106
  }
107
107
  ),
108
- /* @__PURE__ */ r("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8z" })
108
+ /* @__PURE__ */ n("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8z" })
109
109
  ]
110
110
  }
111
111
  ), Eo = ({
112
112
  className: e,
113
113
  viewBox: t,
114
114
  spacing: o,
115
- title: n,
115
+ title: r,
116
116
  monotone: a,
117
117
  ...s
118
- }) => /* @__PURE__ */ v(
119
- V,
118
+ }) => /* @__PURE__ */ y(
119
+ L,
120
120
  {
121
121
  defaultViewBox: "0 0 512 512",
122
122
  defaultClassName: "size-5",
123
123
  viewBox: t,
124
124
  className: e,
125
125
  spacing: o,
126
- title: n || "History",
126
+ title: r || "History",
127
127
  ...s,
128
128
  children: [
129
- /* @__PURE__ */ r(
129
+ /* @__PURE__ */ n(
130
130
  "path",
131
131
  {
132
132
  opacity: a ? "1" : "0.4",
133
133
  d: "M120.2 120.2C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75L41 41C25.9 25.9 0 36.6 0 57.9V168c0 13.3 10.7 24 24 24H134.1c21.4 0 32.1-25.9 17-41l-30.8-30.8z"
134
134
  }
135
135
  ),
136
- /* @__PURE__ */ r("path", { d: "M256 128c13.3 0 24 10.7 24 24v94.1l65 65c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72c-4.5-4.5-7-10.6-7-17V152c0-13.3 10.7-24 24-24z" })
136
+ /* @__PURE__ */ n("path", { d: "M256 128c13.3 0 24 10.7 24 24v94.1l65 65c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72c-4.5-4.5-7-10.6-7-17V152c0-13.3 10.7-24 24-24z" })
137
137
  ]
138
138
  }
139
139
  ), xo = ({
140
140
  className: e,
141
141
  viewBox: t,
142
142
  spacing: o,
143
- title: n,
143
+ title: r,
144
144
  monotone: a,
145
145
  ...s
146
- }) => /* @__PURE__ */ v(
147
- V,
146
+ }) => /* @__PURE__ */ y(
147
+ L,
148
148
  {
149
149
  defaultViewBox: "0 0 512 512",
150
150
  defaultClassName: "size-5",
151
151
  viewBox: t,
152
152
  className: e,
153
153
  spacing: o,
154
- title: n || "Info",
154
+ title: r || "Info",
155
155
  ...s,
156
156
  children: [
157
- /* @__PURE__ */ r(
157
+ /* @__PURE__ */ n(
158
158
  "path",
159
159
  {
160
160
  opacity: "0.4",
161
161
  d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"
162
162
  }
163
163
  ),
164
- /* @__PURE__ */ r("path", { d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM192 248c0-13.3 10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h24V272H216c-13.3 0-24-10.7-24-24z" })
164
+ /* @__PURE__ */ n("path", { d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM192 248c0-13.3 10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h24V272H216c-13.3 0-24-10.7-24-24z" })
165
165
  ]
166
166
  }
167
- ), it = ({
167
+ ), gt = ({
168
168
  className: e,
169
169
  viewBox: t,
170
170
  spacing: o,
171
- title: n,
171
+ title: r,
172
172
  monotone: a,
173
173
  ...s
174
- }) => /* @__PURE__ */ r(
175
- V,
174
+ }) => /* @__PURE__ */ n(
175
+ L,
176
176
  {
177
177
  defaultViewBox: "0 0 24 24",
178
178
  defaultClassName: "size-5",
179
179
  viewBox: t,
180
180
  className: e,
181
181
  spacing: o,
182
- title: n || "OpenAI",
182
+ title: r || "OpenAI",
183
183
  ...s,
184
- children: /* @__PURE__ */ r(
184
+ children: /* @__PURE__ */ n(
185
185
  "path",
186
186
  {
187
187
  fill: "currentColor",
@@ -193,82 +193,82 @@ const st = ({
193
193
  className: e,
194
194
  viewBox: t,
195
195
  spacing: o,
196
- title: n,
196
+ title: r,
197
197
  monotone: a,
198
198
  ...s
199
- }) => /* @__PURE__ */ v(
200
- V,
199
+ }) => /* @__PURE__ */ y(
200
+ L,
201
201
  {
202
202
  defaultViewBox: "0 0 576 512",
203
203
  defaultClassName: "size-5",
204
204
  viewBox: t,
205
205
  className: e,
206
206
  spacing: o,
207
- title: n || "Profile",
207
+ title: r || "Profile",
208
208
  ...s,
209
209
  children: [
210
- /* @__PURE__ */ r(
210
+ /* @__PURE__ */ n(
211
211
  "path",
212
212
  {
213
213
  opacity: "0.4",
214
214
  d: "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 256h64c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zm256-32H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s7.2-16 16-16z"
215
215
  }
216
216
  ),
217
- /* @__PURE__ */ r("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
217
+ /* @__PURE__ */ n("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
218
218
  ]
219
219
  }
220
220
  ), Ro = ({
221
221
  className: e,
222
222
  viewBox: t,
223
223
  spacing: o,
224
- title: n,
224
+ title: r,
225
225
  monotone: a,
226
226
  ...s
227
- }) => /* @__PURE__ */ v(
228
- V,
227
+ }) => /* @__PURE__ */ y(
228
+ L,
229
229
  {
230
230
  defaultViewBox: "0 0 512 512",
231
231
  defaultClassName: "size-5",
232
232
  viewBox: t,
233
233
  className: e,
234
234
  spacing: o,
235
- title: n || "Restore",
235
+ title: r || "Restore",
236
236
  ...s,
237
237
  children: [
238
- /* @__PURE__ */ r(
238
+ /* @__PURE__ */ n(
239
239
  "path",
240
240
  {
241
241
  opacity: a ? "1" : "0.4",
242
242
  d: "M208 64H432c8.8 0 16 7.2 16 16V304c0 8.8-7.2 16-16 16H416v64h16c44.2 0 80-35.8 80-80V80c0-44.2-35.8-80-80-80H208c-44.2 0-80 35.8-80 80V96h64V80c0-8.8 7.2-16 16-16z"
243
243
  }
244
244
  ),
245
- /* @__PURE__ */ r("path", { d: "M64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H64zm32 64H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z" })
245
+ /* @__PURE__ */ n("path", { d: "M64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H64zm32 64H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z" })
246
246
  ]
247
247
  }
248
248
  ), Ao = ({
249
249
  className: e,
250
250
  viewBox: t,
251
251
  spacing: o,
252
- title: n,
252
+ title: r,
253
253
  monotone: a,
254
254
  ...s
255
- }) => /* @__PURE__ */ r(
256
- V,
255
+ }) => /* @__PURE__ */ n(
256
+ L,
257
257
  {
258
258
  defaultViewBox: "0 0 448 512",
259
259
  defaultClassName: "size-5",
260
260
  viewBox: t,
261
261
  className: e,
262
262
  spacing: o,
263
- title: n || "Settings",
263
+ title: r || "Settings",
264
264
  ...s,
265
- children: /* @__PURE__ */ r("path", { d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" })
265
+ children: /* @__PURE__ */ n("path", { d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" })
266
266
  }
267
267
  );
268
- function ce(e) {
269
- return oo();
268
+ function re(e) {
269
+ return Me();
270
270
  }
271
- const Ee = b.createContext({
271
+ const Ee = f.createContext({
272
272
  getItemProps: () => ({}),
273
273
  activeIndex: null,
274
274
  /* v8 ignore next 2 */
@@ -277,7 +277,7 @@ const Ee = b.createContext({
277
277
  setHasFocusInside: () => {
278
278
  },
279
279
  isOpen: !1
280
- }), Fe = (e) => {
280
+ }), Ue = (e) => {
281
281
  if (typeof e == "string")
282
282
  return e;
283
283
  if (typeof e == "function")
@@ -288,99 +288,99 @@ const Ee = b.createContext({
288
288
  return t.displayName || t.name || "Component";
289
289
  }
290
290
  return "Element";
291
- }, lt = ot(
291
+ }, ft = rt(
292
292
  ({
293
293
  trigger: e,
294
294
  children: t,
295
295
  label: o = "Open menu",
296
- defaultPlacement: n = "bottom-start",
296
+ defaultPlacement: r = "bottom-start",
297
297
  onOpenChange: a,
298
298
  spacing: s,
299
299
  mode: i = "system",
300
300
  focusMode: l = "system",
301
301
  ...h
302
302
  }, d) => {
303
- const [c, p] = x(!1), [y, u] = x(!1), [m, f] = x(null), g = le([]), k = le([]), w = B(Ee), T = rt(), E = so(), M = nt(), { floatingStyles: S, refs: z, context: I } = io({
303
+ const [c, p] = x(!1), [v, u] = x(!1), [m, b] = x(null), g = Z([]), k = Z([]), w = P(Ee), T = at(), E = ho(), R = st(), { floatingStyles: $, refs: O, context: N } = it({
304
304
  nodeId: E,
305
305
  open: c,
306
- onOpenChange: (re) => {
307
- p(re), a == null || a(re);
306
+ onOpenChange: (J) => {
307
+ p(J), a == null || a(J);
308
308
  },
309
- placement: n,
309
+ placement: r,
310
310
  strategy: "fixed",
311
- middleware: [lo({ mainAxis: 10 }), co(), uo()],
312
- whileElementsMounted: mo
313
- }), te = ho(I, {
311
+ middleware: [po({ mainAxis: 10 }), go(), fo()],
312
+ whileElementsMounted: bo
313
+ }), ce = lt(N, {
314
314
  event: "mousedown",
315
315
  toggle: !0,
316
316
  ignoreMouse: !1
317
- }), J = go(I, { role: "menu" }), U = po(I, { bubbles: !0 }), oe = fo(I, {
317
+ }), de = ct(N, { role: "menu" }), X = dt(N, { bubbles: !0 }), ye = vo(N, {
318
318
  listRef: g,
319
319
  activeIndex: m,
320
320
  nested: !1,
321
- onNavigate: f,
321
+ onNavigate: b,
322
322
  loop: !0
323
- }), P = bo(I, {
323
+ }), ke = yo(N, {
324
324
  listRef: k,
325
- onMatch: c ? f : void 0,
325
+ onMatch: c ? b : void 0,
326
326
  activeIndex: m
327
- }), { getReferenceProps: j, getFloatingProps: R, getItemProps: xt } = vo([te, J, U, oe, P]), Ve = Fe(e) === "Button" || Fe(e) === "ButtonIcon", St = Ve ? {
328
- noInternalClick: Ve,
327
+ }), { getReferenceProps: Ce, getFloatingProps: V, getItemProps: Vt } = ut([ce, de, X, ye, ke]), ze = Ue(e) === "Button" || Ue(e) === "ButtonIcon", Bt = ze ? {
328
+ noInternalClick: ze,
329
329
  focusMode: l,
330
330
  mode: i,
331
331
  spacing: s
332
- } : {}, Rt = _.cloneElement(
332
+ } : {}, zt = _.cloneElement(
333
333
  e,
334
334
  {
335
- ...St,
335
+ ...Bt,
336
336
  "aria-label": o,
337
337
  "data-open": c ? "" : void 0,
338
- "data-focus-inside": y ? "" : void 0,
339
- ref: at([z.setReference, M.ref, d]),
340
- ...j(
338
+ "data-focus-inside": v ? "" : void 0,
339
+ ref: Pe([O.setReference, R.ref, d]),
340
+ ...Ce(
341
341
  w.getItemProps({
342
342
  ...h
343
343
  })
344
344
  )
345
345
  }
346
346
  );
347
- return q(() => {
347
+ return K(() => {
348
348
  if (!T)
349
349
  return;
350
- function re() {
350
+ function J() {
351
351
  p(!1), a == null || a(!1);
352
352
  }
353
- return T.events.on("click", re), () => {
354
- T.events.off("click", re);
353
+ return T.events.on("click", J), () => {
354
+ T.events.off("click", J);
355
355
  };
356
- }, [T, a]), q(() => {
356
+ }, [T, a]), K(() => {
357
357
  c && T && T.events.emit("menuopen", { nodeId: E });
358
- }, [T, c, E]), /* @__PURE__ */ v(yo, { id: E, children: [
359
- Rt,
360
- /* @__PURE__ */ r(
358
+ }, [T, c, E]), /* @__PURE__ */ y(ko, { id: E, children: [
359
+ zt,
360
+ /* @__PURE__ */ n(
361
361
  Ee.Provider,
362
362
  {
363
363
  value: {
364
364
  activeIndex: m,
365
- setActiveIndex: f,
366
- getItemProps: xt,
365
+ setActiveIndex: b,
366
+ getItemProps: Vt,
367
367
  setHasFocusInside: u,
368
368
  isOpen: c
369
369
  },
370
- children: /* @__PURE__ */ r(ko, { elementsRef: g, labelsRef: k, children: c && /* @__PURE__ */ r(Co, { children: /* @__PURE__ */ r(
371
- wo,
370
+ children: /* @__PURE__ */ n(Co, { elementsRef: g, labelsRef: k, children: c && /* @__PURE__ */ n(mt, { children: /* @__PURE__ */ n(
371
+ ht,
372
372
  {
373
- context: I,
373
+ context: N,
374
374
  modal: !1,
375
375
  initialFocus: 0,
376
376
  returnFocus: !0,
377
- children: /* @__PURE__ */ r(
377
+ children: /* @__PURE__ */ n(
378
378
  "div",
379
379
  {
380
- ref: z.setFloating,
380
+ ref: O.setFloating,
381
381
  className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
382
- style: S,
383
- ...R(),
382
+ style: $,
383
+ ...V(),
384
384
  children: t
385
385
  }
386
386
  )
@@ -390,72 +390,73 @@ const Ee = b.createContext({
390
390
  )
391
391
  ] });
392
392
  }
393
- ), xe = ot((e, t) => /* @__PURE__ */ r(No, { children: /* @__PURE__ */ r(lt, { ...e, ref: t }) }));
393
+ ), xe = rt((e, t) => /* @__PURE__ */ n(wo, { children: /* @__PURE__ */ n(ft, { ...e, ref: t }) }));
394
394
  xe.displayName = "Menu";
395
- lt.displayName = "MenuComponent";
396
- const K = b.forwardRef(
395
+ ft.displayName = "MenuComponent";
396
+ const H = f.forwardRef(
397
397
  ({
398
398
  label: e,
399
399
  disabled: t,
400
400
  icon: o,
401
- raw: n = !1,
401
+ raw: r = !1,
402
402
  children: a,
403
403
  ignoreClick: s = !1,
404
404
  ...i
405
405
  }, l) => {
406
- const h = b.useContext(Ee), d = nt({ label: t ? null : e }), c = rt(), p = at([d.ref, l]);
407
- return n && a ? /* @__PURE__ */ r(
406
+ let h = "";
407
+ const d = f.useContext(Ee), c = st({ label: t ? null : e }), p = at(), v = Pe([c.ref, l]);
408
+ return r && a ? /* @__PURE__ */ n(
408
409
  "div",
409
410
  {
410
411
  role: "menuitem",
411
- ...h.getItemProps({
412
- onClick(y) {
413
- var u;
414
- s || ((u = i.onClick) == null || u.call(i, y), c == null || c.events.emit("click"));
412
+ ...d.getItemProps({
413
+ onClick(u) {
414
+ var m;
415
+ s || ((m = i.onClick) == null || m.call(i, u), p == null || p.events.emit("click"));
415
416
  }
416
417
  }),
417
418
  children: a
418
419
  }
419
- ) : /* @__PURE__ */ v(
420
+ ) : (o && (h = "pl-2"), /* @__PURE__ */ y(
420
421
  "button",
421
422
  {
422
423
  ...i,
423
- ref: p,
424
+ ref: v,
424
425
  role: "menuitem",
425
- className: "m-0 flex w-full rounded-md border border-transparent bg-none px-3 py-2 text-left text-base outline-none focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium sm:py-1",
426
+ className: "m-0 flex w-full rounded-md border border-transparent bg-none px-2 py-2 text-left text-base outline-none focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium sm:py-1",
426
427
  tabIndex: 0,
427
428
  disabled: t,
428
- ...h.getItemProps({
429
- onClick(y) {
430
- var u;
431
- s || ((u = i.onClick) == null || u.call(i, y), c == null || c.events.emit("click"));
429
+ ...d.getItemProps({
430
+ onClick(u) {
431
+ var m;
432
+ s || ((m = i.onClick) == null || m.call(i, u), p == null || p.events.emit("click"));
432
433
  },
433
- onFocus(y) {
434
- var u;
435
- (u = i.onFocus) == null || u.call(i, y), h.setHasFocusInside(!0);
434
+ onFocus(u) {
435
+ var m;
436
+ (m = i.onFocus) == null || m.call(i, u), d.setHasFocusInside(!0);
436
437
  }
437
438
  }),
438
439
  children: [
439
440
  o,
440
- e && /* @__PURE__ */ r("span", { className: "pl-2", children: e })
441
+ e && /* @__PURE__ */ n("span", { className: h, children: e })
441
442
  ]
442
443
  }
443
- );
444
+ ));
444
445
  }
445
446
  );
446
- K.displayName = "MenuItem";
447
+ H.displayName = "MenuItem";
447
448
  const Mo = ({ className: e, ...t }) => {
448
449
  const o = C(e, "my-1 border-t border-border-medium");
449
- return /* @__PURE__ */ r("div", { className: o, ...t });
450
+ return /* @__PURE__ */ n("div", { className: o, ...t });
450
451
  };
451
452
  /*!
452
- @versini/ui-menu v1.4.0
453
+ @versini/ui-menu v1.4.1
453
454
  © 2024 gizmette.com
454
455
  */
455
456
  try {
456
457
  window.__VERSINI_UI_MENU__ || (window.__VERSINI_UI_MENU__ = {
457
- version: "1.4.0",
458
- buildTime: "12/26/2024 06:05 PM EST",
458
+ version: "1.4.1",
459
+ buildTime: "12/27/2024 07:18 PM EST",
459
460
  homepage: "https://github.com/aversini/ui-components",
460
461
  license: "MIT"
461
462
  });
@@ -475,122 +476,122 @@ try {
475
476
  } catch {
476
477
  }
477
478
  const Po = "av-togglegroup", Lo = "av-togglegroup-item-wrapper", $o = "av-togglegroup-item";
478
- function Me(e, t = []) {
479
+ function Le(e, t = []) {
479
480
  let o = [];
480
- function n(s, i) {
481
- const l = b.createContext(i), h = o.length;
481
+ function r(s, i) {
482
+ const l = f.createContext(i), h = o.length;
482
483
  o = [...o, i];
483
484
  const d = (p) => {
484
- var y;
485
- const { scope: u, children: m, ...f } = p, g = ((y = u == null ? void 0 : u[e]) == null ? void 0 : y[h]) || l, k = b.useMemo(() => f, Object.values(f));
486
- return /* @__PURE__ */ r(g.Provider, { value: k, children: m });
485
+ var v;
486
+ const { scope: u, children: m, ...b } = p, g = ((v = u == null ? void 0 : u[e]) == null ? void 0 : v[h]) || l, k = f.useMemo(() => b, Object.values(b));
487
+ return /* @__PURE__ */ n(g.Provider, { value: k, children: m });
487
488
  };
488
489
  d.displayName = s + "Provider";
489
- function c(p, y) {
490
+ function c(p, v) {
490
491
  var u;
491
- const m = ((u = y == null ? void 0 : y[e]) == null ? void 0 : u[h]) || l, f = b.useContext(m);
492
- if (f) return f;
492
+ const m = ((u = v == null ? void 0 : v[e]) == null ? void 0 : u[h]) || l, b = f.useContext(m);
493
+ if (b) return b;
493
494
  if (i !== void 0) return i;
494
495
  throw new Error(`\`${p}\` must be used within \`${s}\``);
495
496
  }
496
497
  return [d, c];
497
498
  }
498
499
  const a = () => {
499
- const s = o.map((i) => b.createContext(i));
500
+ const s = o.map((i) => f.createContext(i));
500
501
  return function(i) {
501
502
  const l = (i == null ? void 0 : i[e]) || s;
502
- return b.useMemo(
503
+ return f.useMemo(
503
504
  () => ({ [`__scope${e}`]: { ...i, [e]: l } }),
504
505
  [i, l]
505
506
  );
506
507
  };
507
508
  };
508
- return a.scopeName = e, [n, Bo(a, ...t)];
509
+ return a.scopeName = e, [r, Oo(a, ...t)];
509
510
  }
510
- function Bo(...e) {
511
+ function Oo(...e) {
511
512
  const t = e[0];
512
513
  if (e.length === 1) return t;
513
514
  const o = () => {
514
- const n = e.map((a) => ({
515
+ const r = e.map((a) => ({
515
516
  useScope: a(),
516
517
  scopeName: a.scopeName
517
518
  }));
518
519
  return function(a) {
519
- const s = n.reduce((i, { useScope: l, scopeName: h }) => {
520
+ const s = r.reduce((i, { useScope: l, scopeName: h }) => {
520
521
  const d = l(a)[`__scope${h}`];
521
522
  return { ...i, ...d };
522
523
  }, {});
523
- return b.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
524
+ return f.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
524
525
  };
525
526
  };
526
527
  return o.scopeName = t.scopeName, o;
527
528
  }
528
- function Ge(e, t) {
529
+ function je(e, t) {
529
530
  if (typeof e == "function")
530
531
  return e(t);
531
532
  e != null && (e.current = t);
532
533
  }
533
- function ct(...e) {
534
+ function bt(...e) {
534
535
  return (t) => {
535
536
  let o = !1;
536
- const n = e.map((a) => {
537
- const s = Ge(a, t);
537
+ const r = e.map((a) => {
538
+ const s = je(a, t);
538
539
  return !o && typeof s == "function" && (o = !0), s;
539
540
  });
540
541
  if (o)
541
542
  return () => {
542
- for (let a = 0; a < n.length; a++) {
543
- const s = n[a];
544
- typeof s == "function" ? s() : Ge(e[a], null);
543
+ for (let a = 0; a < r.length; a++) {
544
+ const s = r[a];
545
+ typeof s == "function" ? s() : je(e[a], null);
545
546
  }
546
547
  };
547
548
  };
548
549
  }
549
550
  function Se(...e) {
550
- return b.useCallback(ct(...e), e);
551
+ return f.useCallback(bt(...e), e);
551
552
  }
552
- var ve = b.forwardRef((e, t) => {
553
- const { children: o, ...n } = e, a = b.Children.toArray(o), s = a.find(zo);
553
+ var pe = f.forwardRef((e, t) => {
554
+ const { children: o, ...r } = e, a = f.Children.toArray(o), s = a.find(Bo);
554
555
  if (s) {
555
- const i = s.props.children, l = a.map((h) => h === s ? b.Children.count(i) > 1 ? b.Children.only(null) : b.isValidElement(i) ? i.props.children : null : h);
556
- return /* @__PURE__ */ r(Re, { ...n, ref: t, children: b.isValidElement(i) ? b.cloneElement(i, void 0, l) : null });
556
+ const i = s.props.children, l = a.map((h) => h === s ? f.Children.count(i) > 1 ? f.Children.only(null) : f.isValidElement(i) ? i.props.children : null : h);
557
+ return /* @__PURE__ */ n(Re, { ...r, ref: t, children: f.isValidElement(i) ? f.cloneElement(i, void 0, l) : null });
557
558
  }
558
- return /* @__PURE__ */ r(Re, { ...n, ref: t, children: o });
559
+ return /* @__PURE__ */ n(Re, { ...r, ref: t, children: o });
559
560
  });
560
- ve.displayName = "Slot";
561
- var Re = b.forwardRef((e, t) => {
562
- const { children: o, ...n } = e;
563
- if (b.isValidElement(o)) {
561
+ pe.displayName = "Slot";
562
+ var Re = f.forwardRef((e, t) => {
563
+ const { children: o, ...r } = e;
564
+ if (f.isValidElement(o)) {
564
565
  const a = Do(o);
565
- return b.cloneElement(o, {
566
- ...Oo(n, o.props),
566
+ return f.cloneElement(o, {
567
+ ...zo(r, o.props),
567
568
  // @ts-ignore
568
- ref: t ? ct(t, a) : a
569
+ ref: t ? bt(t, a) : a
569
570
  });
570
571
  }
571
- return b.Children.count(o) > 1 ? b.Children.only(null) : null;
572
+ return f.Children.count(o) > 1 ? f.Children.only(null) : null;
572
573
  });
573
574
  Re.displayName = "SlotClone";
574
- var Vo = ({ children: e }) => /* @__PURE__ */ r(A, { children: e });
575
- function zo(e) {
576
- return b.isValidElement(e) && e.type === Vo;
575
+ var Vo = ({ children: e }) => /* @__PURE__ */ n(S, { children: e });
576
+ function Bo(e) {
577
+ return f.isValidElement(e) && e.type === Vo;
577
578
  }
578
- function Oo(e, t) {
579
+ function zo(e, t) {
579
580
  const o = { ...t };
580
- for (const n in t) {
581
- const a = e[n], s = t[n];
582
- /^on[A-Z]/.test(n) ? a && s ? o[n] = (...i) => {
581
+ for (const r in t) {
582
+ const a = e[r], s = t[r];
583
+ /^on[A-Z]/.test(r) ? a && s ? o[r] = (...i) => {
583
584
  s(...i), a(...i);
584
- } : a && (o[n] = a) : n === "style" ? o[n] = { ...a, ...s } : n === "className" && (o[n] = [a, s].filter(Boolean).join(" "));
585
+ } : a && (o[r] = a) : r === "style" ? o[r] = { ...a, ...s } : r === "className" && (o[r] = [a, s].filter(Boolean).join(" "));
585
586
  }
586
587
  return { ...e, ...o };
587
588
  }
588
589
  function Do(e) {
589
590
  var t, o;
590
- let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = n && "isReactWarning" in n && n.isReactWarning;
591
- return a ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, a = n && "isReactWarning" in n && n.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
591
+ let r = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = r && "isReactWarning" in r && r.isReactWarning;
592
+ return a ? e.ref : (r = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, a = r && "isReactWarning" in r && r.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
592
593
  }
593
- var Ho = [
594
+ var Fo = [
594
595
  "a",
595
596
  "button",
596
597
  "div",
@@ -607,48 +608,48 @@ var Ho = [
607
608
  "span",
608
609
  "svg",
609
610
  "ul"
610
- ], de = Ho.reduce((e, t) => {
611
- const o = b.forwardRef((n, a) => {
612
- const { asChild: s, ...i } = n, l = s ? ve : t;
613
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ r(l, { ...i, ref: a });
611
+ ], ae = Fo.reduce((e, t) => {
612
+ const o = f.forwardRef((r, a) => {
613
+ const { asChild: s, ...i } = r, l = s ? pe : t;
614
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(l, { ...i, ref: a });
614
615
  });
615
616
  return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
616
617
  }, {});
617
- function Y(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
618
- return function(n) {
619
- if (e == null || e(n), o === !1 || !n.defaultPrevented)
620
- return t == null ? void 0 : t(n);
618
+ function j(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
619
+ return function(r) {
620
+ if (e == null || e(r), o === !1 || !r.defaultPrevented)
621
+ return t == null ? void 0 : t(r);
621
622
  };
622
623
  }
623
- function Fo(e) {
624
- const t = e + "CollectionProvider", [o, n] = Me(t), [a, s] = o(
624
+ function Go(e) {
625
+ const t = e + "CollectionProvider", [o, r] = Le(t), [a, s] = o(
625
626
  t,
626
627
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
627
628
  ), i = (u) => {
628
- const { scope: m, children: f } = u, g = _.useRef(null), k = _.useRef(/* @__PURE__ */ new Map()).current;
629
- return /* @__PURE__ */ r(a, { scope: m, itemMap: k, collectionRef: g, children: f });
629
+ const { scope: m, children: b } = u, g = _.useRef(null), k = _.useRef(/* @__PURE__ */ new Map()).current;
630
+ return /* @__PURE__ */ n(a, { scope: m, itemMap: k, collectionRef: g, children: b });
630
631
  };
631
632
  i.displayName = t;
632
633
  const l = e + "CollectionSlot", h = _.forwardRef(
633
634
  (u, m) => {
634
- const { scope: f, children: g } = u, k = s(l, f), w = Se(m, k.collectionRef);
635
- return /* @__PURE__ */ r(ve, { ref: w, children: g });
635
+ const { scope: b, children: g } = u, k = s(l, b), w = Se(m, k.collectionRef);
636
+ return /* @__PURE__ */ n(pe, { ref: w, children: g });
636
637
  }
637
638
  );
638
639
  h.displayName = l;
639
640
  const d = e + "CollectionItemSlot", c = "data-radix-collection-item", p = _.forwardRef(
640
641
  (u, m) => {
641
- const { scope: f, children: g, ...k } = u, w = _.useRef(null), T = Se(m, w), E = s(d, f);
642
- return _.useEffect(() => (E.itemMap.set(w, { ref: w, ...k }), () => void E.itemMap.delete(w))), /* @__PURE__ */ r(ve, { [c]: "", ref: T, children: g });
642
+ const { scope: b, children: g, ...k } = u, w = _.useRef(null), T = Se(m, w), E = s(d, b);
643
+ return _.useEffect(() => (E.itemMap.set(w, { ref: w, ...k }), () => void E.itemMap.delete(w))), /* @__PURE__ */ n(pe, { [c]: "", ref: T, children: g });
643
644
  }
644
645
  );
645
646
  p.displayName = d;
646
- function y(u) {
647
+ function v(u) {
647
648
  const m = s(e + "CollectionConsumer", u);
648
649
  return _.useCallback(() => {
649
- const f = m.collectionRef.current;
650
- if (!f) return [];
651
- const g = Array.from(f.querySelectorAll(`[${c}]`));
650
+ const b = m.collectionRef.current;
651
+ if (!b) return [];
652
+ const g = Array.from(b.querySelectorAll(`[${c}]`));
652
653
  return Array.from(m.itemMap.values()).sort(
653
654
  (k, w) => g.indexOf(k.ref.current) - g.indexOf(w.ref.current)
654
655
  );
@@ -656,35 +657,35 @@ function Fo(e) {
656
657
  }
657
658
  return [
658
659
  { Provider: i, Slot: h, ItemSlot: p },
659
- y,
660
- n
660
+ v,
661
+ r
661
662
  ];
662
663
  }
663
- var Go = globalThis != null && globalThis.document ? b.useLayoutEffect : () => {
664
- }, Uo = b.useId || (() => {
664
+ var Ho = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
665
+ }, Uo = f.useId || (() => {
665
666
  }), jo = 0;
666
667
  function Ko(e) {
667
- const [t, o] = b.useState(Uo());
668
- return Go(() => {
669
- o((n) => n ?? String(jo++));
668
+ const [t, o] = f.useState(Uo());
669
+ return Ho(() => {
670
+ o((r) => r ?? String(jo++));
670
671
  }, [e]), t ? `radix-${t}` : "";
671
672
  }
672
- function Pe(e) {
673
- const t = b.useRef(e);
674
- return b.useEffect(() => {
673
+ function $e(e) {
674
+ const t = f.useRef(e);
675
+ return f.useEffect(() => {
675
676
  t.current = e;
676
- }), b.useMemo(() => (...o) => {
677
- var n;
678
- return (n = t.current) == null ? void 0 : n.call(t, ...o);
677
+ }), f.useMemo(() => (...o) => {
678
+ var r;
679
+ return (r = t.current) == null ? void 0 : r.call(t, ...o);
679
680
  }, []);
680
681
  }
681
- function ke({
682
+ function fe({
682
683
  prop: e,
683
684
  defaultProp: t,
684
685
  onChange: o = () => {
685
686
  }
686
687
  }) {
687
- const [n, a] = Wo({ defaultProp: t, onChange: o }), s = e !== void 0, i = s ? e : n, l = Pe(o), h = b.useCallback(
688
+ const [r, a] = Wo({ defaultProp: t, onChange: o }), s = e !== void 0, i = s ? e : r, l = $e(o), h = f.useCallback(
688
689
  (d) => {
689
690
  if (s) {
690
691
  const c = typeof d == "function" ? d(e) : d;
@@ -700,27 +701,27 @@ function Wo({
700
701
  defaultProp: e,
701
702
  onChange: t
702
703
  }) {
703
- const o = b.useState(e), [n] = o, a = b.useRef(n), s = Pe(t);
704
- return b.useEffect(() => {
705
- a.current !== n && (s(n), a.current = n);
706
- }, [n, a, s]), o;
704
+ const o = f.useState(e), [r] = o, a = f.useRef(r), s = $e(t);
705
+ return f.useEffect(() => {
706
+ a.current !== r && (s(r), a.current = r);
707
+ }, [r, a, s]), o;
707
708
  }
708
- var Yo = b.createContext(void 0);
709
- function dt(e) {
710
- const t = b.useContext(Yo);
709
+ var Yo = f.createContext(void 0);
710
+ function vt(e) {
711
+ const t = f.useContext(Yo);
711
712
  return e || t || "ltr";
712
713
  }
713
- var Ie = "rovingFocusGroup.onEntryFocus", qo = { bubbles: !1, cancelable: !0 }, Ce = "RovingFocusGroup", [Ae, ut, Xo] = Fo(Ce), [Zo, mt] = Me(
714
- Ce,
715
- [Xo]
716
- ), [Jo, Qo] = Zo(Ce), ht = b.forwardRef(
717
- (e, t) => /* @__PURE__ */ r(Ae.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(Ae.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(er, { ...e, ref: t }) }) })
714
+ var Te = "rovingFocusGroup.onEntryFocus", qo = { bubbles: !1, cancelable: !0 }, be = "RovingFocusGroup", [Ae, yt, Zo] = Go(be), [Qo, kt] = Le(
715
+ be,
716
+ [Zo]
717
+ ), [Xo, Jo] = Qo(be), Ct = f.forwardRef(
718
+ (e, t) => /* @__PURE__ */ n(Ae.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ n(Ae.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ n(en, { ...e, ref: t }) }) })
718
719
  );
719
- ht.displayName = Ce;
720
- var er = b.forwardRef((e, t) => {
720
+ Ct.displayName = be;
721
+ var en = f.forwardRef((e, t) => {
721
722
  const {
722
723
  __scopeRovingFocusGroup: o,
723
- orientation: n,
724
+ orientation: r,
724
725
  loop: a = !1,
725
726
  dir: s,
726
727
  currentTabStopId: i,
@@ -729,113 +730,113 @@ var er = b.forwardRef((e, t) => {
729
730
  onEntryFocus: d,
730
731
  preventScrollOnEntryFocus: c = !1,
731
732
  ...p
732
- } = e, y = b.useRef(null), u = Se(t, y), m = dt(s), [f = null, g] = ke({
733
+ } = e, v = f.useRef(null), u = Se(t, v), m = vt(s), [b = null, g] = fe({
733
734
  prop: i,
734
735
  defaultProp: l,
735
736
  onChange: h
736
- }), [k, w] = b.useState(!1), T = Pe(d), E = ut(o), M = b.useRef(!1), [S, z] = b.useState(0);
737
- return b.useEffect(() => {
738
- const I = y.current;
739
- if (I)
740
- return I.addEventListener(Ie, T), () => I.removeEventListener(Ie, T);
741
- }, [T]), /* @__PURE__ */ r(
742
- Jo,
737
+ }), [k, w] = f.useState(!1), T = $e(d), E = yt(o), R = f.useRef(!1), [$, O] = f.useState(0);
738
+ return f.useEffect(() => {
739
+ const N = v.current;
740
+ if (N)
741
+ return N.addEventListener(Te, T), () => N.removeEventListener(Te, T);
742
+ }, [T]), /* @__PURE__ */ n(
743
+ Xo,
743
744
  {
744
745
  scope: o,
745
- orientation: n,
746
+ orientation: r,
746
747
  dir: m,
747
748
  loop: a,
748
- currentTabStopId: f,
749
- onItemFocus: b.useCallback(
750
- (I) => g(I),
749
+ currentTabStopId: b,
750
+ onItemFocus: f.useCallback(
751
+ (N) => g(N),
751
752
  [g]
752
753
  ),
753
- onItemShiftTab: b.useCallback(() => w(!0), []),
754
- onFocusableItemAdd: b.useCallback(
755
- () => z((I) => I + 1),
754
+ onItemShiftTab: f.useCallback(() => w(!0), []),
755
+ onFocusableItemAdd: f.useCallback(
756
+ () => O((N) => N + 1),
756
757
  []
757
758
  ),
758
- onFocusableItemRemove: b.useCallback(
759
- () => z((I) => I - 1),
759
+ onFocusableItemRemove: f.useCallback(
760
+ () => O((N) => N - 1),
760
761
  []
761
762
  ),
762
- children: /* @__PURE__ */ r(
763
- de.div,
763
+ children: /* @__PURE__ */ n(
764
+ ae.div,
764
765
  {
765
- tabIndex: k || S === 0 ? -1 : 0,
766
- "data-orientation": n,
766
+ tabIndex: k || $ === 0 ? -1 : 0,
767
+ "data-orientation": r,
767
768
  ...p,
768
769
  ref: u,
769
770
  style: { outline: "none", ...e.style },
770
- onMouseDown: Y(e.onMouseDown, () => {
771
- M.current = !0;
771
+ onMouseDown: j(e.onMouseDown, () => {
772
+ R.current = !0;
772
773
  }),
773
- onFocus: Y(e.onFocus, (I) => {
774
- const te = !M.current;
775
- if (I.target === I.currentTarget && te && !k) {
776
- const J = new CustomEvent(Ie, qo);
777
- if (I.currentTarget.dispatchEvent(J), !J.defaultPrevented) {
778
- const U = E().filter((R) => R.focusable), oe = U.find((R) => R.active), P = U.find((R) => R.id === f), j = [oe, P, ...U].filter(
774
+ onFocus: j(e.onFocus, (N) => {
775
+ const ce = !R.current;
776
+ if (N.target === N.currentTarget && ce && !k) {
777
+ const de = new CustomEvent(Te, qo);
778
+ if (N.currentTarget.dispatchEvent(de), !de.defaultPrevented) {
779
+ const X = E().filter((V) => V.focusable), ye = X.find((V) => V.active), ke = X.find((V) => V.id === b), Ce = [ye, ke, ...X].filter(
779
780
  Boolean
780
- ).map((R) => R.ref.current);
781
- ft(j, c);
781
+ ).map((V) => V.ref.current);
782
+ It(Ce, c);
782
783
  }
783
784
  }
784
- M.current = !1;
785
+ R.current = !1;
785
786
  }),
786
- onBlur: Y(e.onBlur, () => w(!1))
787
+ onBlur: j(e.onBlur, () => w(!1))
787
788
  }
788
789
  )
789
790
  }
790
791
  );
791
- }), gt = "RovingFocusGroupItem", pt = b.forwardRef(
792
+ }), wt = "RovingFocusGroupItem", Nt = f.forwardRef(
792
793
  (e, t) => {
793
794
  const {
794
795
  __scopeRovingFocusGroup: o,
795
- focusable: n = !0,
796
+ focusable: r = !0,
796
797
  active: a = !1,
797
798
  tabStopId: s,
798
799
  ...i
799
- } = e, l = Ko(), h = s || l, d = Qo(gt, o), c = d.currentTabStopId === h, p = ut(o), { onFocusableItemAdd: y, onFocusableItemRemove: u } = d;
800
- return b.useEffect(() => {
801
- if (n)
802
- return y(), () => u();
803
- }, [n, y, u]), /* @__PURE__ */ r(
800
+ } = e, l = Ko(), h = s || l, d = Jo(wt, o), c = d.currentTabStopId === h, p = yt(o), { onFocusableItemAdd: v, onFocusableItemRemove: u } = d;
801
+ return f.useEffect(() => {
802
+ if (r)
803
+ return v(), () => u();
804
+ }, [r, v, u]), /* @__PURE__ */ n(
804
805
  Ae.ItemSlot,
805
806
  {
806
807
  scope: o,
807
808
  id: h,
808
- focusable: n,
809
+ focusable: r,
809
810
  active: a,
810
- children: /* @__PURE__ */ r(
811
- de.span,
811
+ children: /* @__PURE__ */ n(
812
+ ae.span,
812
813
  {
813
814
  tabIndex: c ? 0 : -1,
814
815
  "data-orientation": d.orientation,
815
816
  ...i,
816
817
  ref: t,
817
- onMouseDown: Y(e.onMouseDown, (m) => {
818
- n ? d.onItemFocus(h) : m.preventDefault();
818
+ onMouseDown: j(e.onMouseDown, (m) => {
819
+ r ? d.onItemFocus(h) : m.preventDefault();
819
820
  }),
820
- onFocus: Y(e.onFocus, () => d.onItemFocus(h)),
821
- onKeyDown: Y(e.onKeyDown, (m) => {
821
+ onFocus: j(e.onFocus, () => d.onItemFocus(h)),
822
+ onKeyDown: j(e.onKeyDown, (m) => {
822
823
  if (m.key === "Tab" && m.shiftKey) {
823
824
  d.onItemShiftTab();
824
825
  return;
825
826
  }
826
827
  if (m.target !== m.currentTarget) return;
827
- const f = rr(m, d.orientation, d.dir);
828
- if (f !== void 0) {
828
+ const b = nn(m, d.orientation, d.dir);
829
+ if (b !== void 0) {
829
830
  if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
830
831
  m.preventDefault();
831
832
  let g = p().filter((k) => k.focusable).map((k) => k.ref.current);
832
- if (f === "last") g.reverse();
833
- else if (f === "prev" || f === "next") {
834
- f === "prev" && g.reverse();
833
+ if (b === "last") g.reverse();
834
+ else if (b === "prev" || b === "next") {
835
+ b === "prev" && g.reverse();
835
836
  const k = g.indexOf(m.currentTarget);
836
- g = d.loop ? nr(g, k + 1) : g.slice(k + 1);
837
+ g = d.loop ? rn(g, k + 1) : g.slice(k + 1);
837
838
  }
838
- setTimeout(() => ft(g));
839
+ setTimeout(() => It(g));
839
840
  }
840
841
  })
841
842
  }
@@ -844,8 +845,8 @@ var er = b.forwardRef((e, t) => {
844
845
  );
845
846
  }
846
847
  );
847
- pt.displayName = gt;
848
- var tr = {
848
+ Nt.displayName = wt;
849
+ var tn = {
849
850
  ArrowLeft: "prev",
850
851
  ArrowUp: "prev",
851
852
  ArrowRight: "next",
@@ -855,30 +856,30 @@ var tr = {
855
856
  PageDown: "last",
856
857
  End: "last"
857
858
  };
858
- function or(e, t) {
859
+ function on(e, t) {
859
860
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
860
861
  }
861
- function rr(e, t, o) {
862
- const n = or(e.key, o);
863
- if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(n)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(n)))
864
- return tr[n];
862
+ function nn(e, t, o) {
863
+ const r = on(e.key, o);
864
+ if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
865
+ return tn[r];
865
866
  }
866
- function ft(e, t = !1) {
867
+ function It(e, t = !1) {
867
868
  const o = document.activeElement;
868
- for (const n of e)
869
- if (n === o || (n.focus({ preventScroll: t }), document.activeElement !== o)) return;
869
+ for (const r of e)
870
+ if (r === o || (r.focus({ preventScroll: t }), document.activeElement !== o)) return;
870
871
  }
871
- function nr(e, t) {
872
- return e.map((o, n) => e[(t + n) % e.length]);
872
+ function rn(e, t) {
873
+ return e.map((o, r) => e[(t + r) % e.length]);
873
874
  }
874
- var ar = ht, sr = pt, ir = "Toggle", bt = b.forwardRef((e, t) => {
875
- const { pressed: o, defaultPressed: n = !1, onPressedChange: a, ...s } = e, [i = !1, l] = ke({
875
+ var an = Ct, sn = Nt, ln = "Toggle", Tt = f.forwardRef((e, t) => {
876
+ const { pressed: o, defaultPressed: r = !1, onPressedChange: a, ...s } = e, [i = !1, l] = fe({
876
877
  prop: o,
877
878
  onChange: a,
878
- defaultProp: n
879
+ defaultProp: r
879
880
  });
880
- return /* @__PURE__ */ r(
881
- de.button,
881
+ return /* @__PURE__ */ n(
882
+ ae.button,
882
883
  {
883
884
  type: "button",
884
885
  "aria-pressed": i,
@@ -886,135 +887,135 @@ var ar = ht, sr = pt, ir = "Toggle", bt = b.forwardRef((e, t) => {
886
887
  "data-disabled": e.disabled ? "" : void 0,
887
888
  ...s,
888
889
  ref: t,
889
- onClick: Y(e.onClick, () => {
890
+ onClick: j(e.onClick, () => {
890
891
  e.disabled || l(!i);
891
892
  })
892
893
  }
893
894
  );
894
895
  });
895
- bt.displayName = ir;
896
- var ee = "ToggleGroup", [vt, kn] = Me(ee, [
897
- mt
898
- ]), yt = mt(), Le = _.forwardRef((e, t) => {
899
- const { type: o, ...n } = e;
896
+ Tt.displayName = ln;
897
+ var Q = "ToggleGroup", [_t, Cr] = Le(Q, [
898
+ kt
899
+ ]), Et = kt(), Oe = _.forwardRef((e, t) => {
900
+ const { type: o, ...r } = e;
900
901
  if (o === "single")
901
- return /* @__PURE__ */ r(lr, { ...n, ref: t });
902
+ return /* @__PURE__ */ n(cn, { ...r, ref: t });
902
903
  if (o === "multiple")
903
- return /* @__PURE__ */ r(cr, { ...n, ref: t });
904
- throw new Error(`Missing prop \`type\` expected on \`${ee}\``);
904
+ return /* @__PURE__ */ n(dn, { ...r, ref: t });
905
+ throw new Error(`Missing prop \`type\` expected on \`${Q}\``);
905
906
  });
906
- Le.displayName = ee;
907
- var [kt, Ct] = vt(ee), lr = _.forwardRef((e, t) => {
907
+ Oe.displayName = Q;
908
+ var [xt, St] = _t(Q), cn = _.forwardRef((e, t) => {
908
909
  const {
909
910
  value: o,
910
- defaultValue: n,
911
+ defaultValue: r,
911
912
  onValueChange: a = () => {
912
913
  },
913
914
  ...s
914
- } = e, [i, l] = ke({
915
+ } = e, [i, l] = fe({
915
916
  prop: o,
916
- defaultProp: n,
917
+ defaultProp: r,
917
918
  onChange: a
918
919
  });
919
- return /* @__PURE__ */ r(
920
- kt,
920
+ return /* @__PURE__ */ n(
921
+ xt,
921
922
  {
922
923
  scope: e.__scopeToggleGroup,
923
924
  type: "single",
924
925
  value: i ? [i] : [],
925
926
  onItemActivate: l,
926
927
  onItemDeactivate: _.useCallback(() => l(""), [l]),
927
- children: /* @__PURE__ */ r(wt, { ...s, ref: t })
928
+ children: /* @__PURE__ */ n(Rt, { ...s, ref: t })
928
929
  }
929
930
  );
930
- }), cr = _.forwardRef((e, t) => {
931
+ }), dn = _.forwardRef((e, t) => {
931
932
  const {
932
933
  value: o,
933
- defaultValue: n,
934
+ defaultValue: r,
934
935
  onValueChange: a = () => {
935
936
  },
936
937
  ...s
937
- } = e, [i = [], l] = ke({
938
+ } = e, [i = [], l] = fe({
938
939
  prop: o,
939
- defaultProp: n,
940
+ defaultProp: r,
940
941
  onChange: a
941
942
  }), h = _.useCallback(
942
943
  (c) => l((p = []) => [...p, c]),
943
944
  [l]
944
945
  ), d = _.useCallback(
945
- (c) => l((p = []) => p.filter((y) => y !== c)),
946
+ (c) => l((p = []) => p.filter((v) => v !== c)),
946
947
  [l]
947
948
  );
948
- return /* @__PURE__ */ r(
949
- kt,
949
+ return /* @__PURE__ */ n(
950
+ xt,
950
951
  {
951
952
  scope: e.__scopeToggleGroup,
952
953
  type: "multiple",
953
954
  value: i,
954
955
  onItemActivate: h,
955
956
  onItemDeactivate: d,
956
- children: /* @__PURE__ */ r(wt, { ...s, ref: t })
957
+ children: /* @__PURE__ */ n(Rt, { ...s, ref: t })
957
958
  }
958
959
  );
959
960
  });
960
- Le.displayName = ee;
961
- var [dr, ur] = vt(ee), wt = _.forwardRef(
961
+ Oe.displayName = Q;
962
+ var [un, mn] = _t(Q), Rt = _.forwardRef(
962
963
  (e, t) => {
963
964
  const {
964
965
  __scopeToggleGroup: o,
965
- disabled: n = !1,
966
+ disabled: r = !1,
966
967
  rovingFocus: a = !0,
967
968
  orientation: s,
968
969
  dir: i,
969
970
  loop: l = !0,
970
971
  ...h
971
- } = e, d = yt(o), c = dt(i), p = { role: "group", dir: c, ...h };
972
- return /* @__PURE__ */ r(dr, { scope: o, rovingFocus: a, disabled: n, children: a ? /* @__PURE__ */ r(
973
- ar,
972
+ } = e, d = Et(o), c = vt(i), p = { role: "group", dir: c, ...h };
973
+ return /* @__PURE__ */ n(un, { scope: o, rovingFocus: a, disabled: r, children: a ? /* @__PURE__ */ n(
974
+ an,
974
975
  {
975
976
  asChild: !0,
976
977
  ...d,
977
978
  orientation: s,
978
979
  dir: c,
979
980
  loop: l,
980
- children: /* @__PURE__ */ r(de.div, { ...p, ref: t })
981
+ children: /* @__PURE__ */ n(ae.div, { ...p, ref: t })
981
982
  }
982
- ) : /* @__PURE__ */ r(de.div, { ...p, ref: t }) });
983
+ ) : /* @__PURE__ */ n(ae.div, { ...p, ref: t }) });
983
984
  }
984
- ), ye = "ToggleGroupItem", Nt = _.forwardRef(
985
+ ), ge = "ToggleGroupItem", At = _.forwardRef(
985
986
  (e, t) => {
986
- const o = Ct(ye, e.__scopeToggleGroup), n = ur(ye, e.__scopeToggleGroup), a = yt(e.__scopeToggleGroup), s = o.value.includes(e.value), i = n.disabled || e.disabled, l = { ...e, pressed: s, disabled: i }, h = _.useRef(null);
987
- return n.rovingFocus ? /* @__PURE__ */ r(
988
- sr,
987
+ const o = St(ge, e.__scopeToggleGroup), r = mn(ge, e.__scopeToggleGroup), a = Et(e.__scopeToggleGroup), s = o.value.includes(e.value), i = r.disabled || e.disabled, l = { ...e, pressed: s, disabled: i }, h = _.useRef(null);
988
+ return r.rovingFocus ? /* @__PURE__ */ n(
989
+ sn,
989
990
  {
990
991
  asChild: !0,
991
992
  ...a,
992
993
  focusable: !i,
993
994
  active: s,
994
995
  ref: h,
995
- children: /* @__PURE__ */ r(Ue, { ...l, ref: t })
996
+ children: /* @__PURE__ */ n(Ke, { ...l, ref: t })
996
997
  }
997
- ) : /* @__PURE__ */ r(Ue, { ...l, ref: t });
998
+ ) : /* @__PURE__ */ n(Ke, { ...l, ref: t });
998
999
  }
999
1000
  );
1000
- Nt.displayName = ye;
1001
- var Ue = _.forwardRef(
1001
+ At.displayName = ge;
1002
+ var Ke = _.forwardRef(
1002
1003
  (e, t) => {
1003
- const { __scopeToggleGroup: o, value: n, ...a } = e, s = Ct(ye, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, l = s.type === "single" ? i : void 0;
1004
- return /* @__PURE__ */ r(
1005
- bt,
1004
+ const { __scopeToggleGroup: o, value: r, ...a } = e, s = St(ge, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, l = s.type === "single" ? i : void 0;
1005
+ return /* @__PURE__ */ n(
1006
+ Tt,
1006
1007
  {
1007
1008
  ...l,
1008
1009
  ...a,
1009
1010
  ref: t,
1010
1011
  onPressedChange: (h) => {
1011
- h ? s.onItemActivate(n) : s.onItemDeactivate(n);
1012
+ h ? s.onItemActivate(r) : s.onItemDeactivate(r);
1012
1013
  }
1013
1014
  }
1014
1015
  );
1015
1016
  }
1016
- ), mr = Le, hr = Nt;
1017
- const Tt = _.createContext({
1017
+ ), hn = Oe, pn = At;
1018
+ const Mt = _.createContext({
1018
1019
  size: "medium",
1019
1020
  focusMode: "system",
1020
1021
  mode: "system"
@@ -1032,7 +1033,7 @@ try {
1032
1033
  });
1033
1034
  } catch {
1034
1035
  }
1035
- const gr = (e) => {
1036
+ const gn = (e) => {
1036
1037
  let t = "";
1037
1038
  if (typeof e == "number" || typeof e == "string")
1038
1039
  t = "m-" + e;
@@ -1041,21 +1042,21 @@ const gr = (e) => {
1041
1042
  (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
1042
1043
  }
1043
1044
  return t;
1044
- }, pr = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset", {
1045
+ }, fn = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset", {
1045
1046
  "focus:outline-focus-light": e === "light",
1046
1047
  "focus:outline-focus-dark": e === "dark",
1047
1048
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1048
1049
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1049
- }), fr = ({ mode: e }) => C({
1050
+ }), bn = ({ mode: e }) => C({
1050
1051
  "data-[state=on]:bg-surface-medium": e === "dark",
1051
1052
  "data-[state=on]:bg-surface-lightest": e === "light",
1052
1053
  "data-[state=on]:bg-surface-lightest dark:data-[state=on]:bg-surface-medium": e === "system",
1053
1054
  "data-[state=on]:bg-surface-medium dark:data-[state=on]:bg-surface-lightest": e === "alt-system"
1054
- }), br = ({ size: e }) => C({
1055
+ }), vn = ({ size: e }) => C({
1055
1056
  "h-5 px-2": e === "small",
1056
1057
  "h-6 px-3": e === "medium",
1057
1058
  "h-7 px-4": e === "large"
1058
- }), vr = ({ mode: e }) => C(
1059
+ }), yn = ({ mode: e }) => C(
1059
1060
  Lo,
1060
1061
  "px-1",
1061
1062
  "relative",
@@ -1069,27 +1070,27 @@ const gr = (e) => {
1069
1070
  "border-surface-light dark:border-surface-darker": e === "system",
1070
1071
  "border-surface-darker dark:border-surface-light": e === "alt-system"
1071
1072
  }
1072
- ), yr = ({
1073
+ ), kn = ({
1073
1074
  focusMode: e,
1074
1075
  mode: t,
1075
1076
  size: o
1076
1077
  }) => ({
1077
- wrapperClass: vr({ mode: t }),
1078
+ wrapperClass: yn({ mode: t }),
1078
1079
  itemClass: C(
1079
1080
  $o,
1080
1081
  "flex items-center justify-center bg-transparent",
1081
1082
  "rounded-sm",
1082
1083
  "transition duration-200 ease",
1083
- br({ size: o }),
1084
- pr({ focusMode: e }),
1085
- fr({ mode: t })
1084
+ vn({ size: o }),
1085
+ fn({ focusMode: e }),
1086
+ bn({ mode: t })
1086
1087
  )
1087
- }), kr = ({
1088
+ }), Cn = ({
1088
1089
  mode: e,
1089
1090
  spacing: t
1090
1091
  }) => C(
1091
1092
  Po,
1092
- gr(t),
1093
+ gn(t),
1093
1094
  "inline-flex p-1",
1094
1095
  "rounded-sm",
1095
1096
  {
@@ -1098,11 +1099,11 @@ const gr = (e) => {
1098
1099
  "bg-surface-light text-copy-dark dark:bg-surface-darker dark:text-copy-lighter": e === "system",
1099
1100
  "bg-surface-darker text-copy-lighter dark:bg-surface-light dark:text-copy-dark": e === "alt-system"
1100
1101
  }
1101
- ), Cr = ({
1102
+ ), wn = ({
1102
1103
  children: e,
1103
1104
  value: t,
1104
1105
  onValueChange: o,
1105
- disabled: n,
1106
+ disabled: r,
1106
1107
  mode: a = "system",
1107
1108
  focusMode: s = "system",
1108
1109
  size: i = "medium",
@@ -1110,11 +1111,11 @@ const gr = (e) => {
1110
1111
  spacing: h,
1111
1112
  ...d
1112
1113
  }) => {
1113
- const c = kr({ mode: a, spacing: h }), p = { size: i, focusMode: s, mode: a };
1114
- return /* @__PURE__ */ r(Tt.Provider, { value: p, children: /* @__PURE__ */ r(
1115
- mr,
1114
+ const c = Cn({ mode: a, spacing: h }), p = { size: i, focusMode: s, mode: a };
1115
+ return /* @__PURE__ */ n(Mt.Provider, { value: p, children: /* @__PURE__ */ n(
1116
+ hn,
1116
1117
  {
1117
- disabled: n,
1118
+ disabled: r,
1118
1119
  className: c,
1119
1120
  value: t,
1120
1121
  defaultValue: l,
@@ -1124,14 +1125,14 @@ const gr = (e) => {
1124
1125
  children: e
1125
1126
  }
1126
1127
  ) });
1127
- }, wr = ({ value: e, disabled: t }) => {
1128
- const { size: o, focusMode: n, mode: a } = B(Tt), { itemClass: s, wrapperClass: i } = yr({
1129
- focusMode: n,
1128
+ }, Nn = ({ value: e, disabled: t }) => {
1129
+ const { size: o, focusMode: r, mode: a } = P(Mt), { itemClass: s, wrapperClass: i } = kn({
1130
+ focusMode: r,
1130
1131
  mode: a,
1131
1132
  size: o
1132
1133
  });
1133
- return /* @__PURE__ */ r("div", { className: i, children: /* @__PURE__ */ r(
1134
- hr,
1134
+ return /* @__PURE__ */ n("div", { className: i, children: /* @__PURE__ */ n(
1135
+ pn,
1135
1136
  {
1136
1137
  disabled: t,
1137
1138
  className: s,
@@ -1141,19 +1142,19 @@ const gr = (e) => {
1141
1142
  ) });
1142
1143
  };
1143
1144
  /*!
1144
- @versini/ui-panel v1.2.2
1145
+ @versini/ui-panel v1.2.3
1145
1146
  © 2024 gizmette.com
1146
1147
  */
1147
1148
  try {
1148
1149
  window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
1149
- version: "1.2.2",
1150
- buildTime: "12/26/2024 06:05 PM EST",
1150
+ version: "1.2.3",
1151
+ buildTime: "12/27/2024 07:18 PM EST",
1151
1152
  homepage: "https://github.com/aversini/ui-components",
1152
1153
  license: "MIT"
1153
1154
  });
1154
1155
  } catch {
1155
1156
  }
1156
- const je = "av-messagebox", Ke = "av-panel", We = "av-button";
1157
+ const We = "av-messagebox", Ye = "av-panel", qe = "av-button";
1157
1158
  /*!
1158
1159
  @versini/ui-spacing v1.1.0
1159
1160
  © 2024 gizmette.com
@@ -1161,13 +1162,13 @@ const je = "av-messagebox", Ke = "av-panel", We = "av-button";
1161
1162
  try {
1162
1163
  window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
1163
1164
  version: "1.1.0",
1164
- buildTime: "12/26/2024 06:05 PM EST",
1165
+ buildTime: "12/27/2024 07:18 PM EST",
1165
1166
  homepage: "https://github.com/aversini/ui-components",
1166
1167
  license: "MIT"
1167
1168
  });
1168
1169
  } catch {
1169
1170
  }
1170
- const Nr = (e) => {
1171
+ const In = (e) => {
1171
1172
  let t = "";
1172
1173
  if (typeof e == "number" || typeof e == "string")
1173
1174
  t = "m-" + e;
@@ -1176,49 +1177,49 @@ const Nr = (e) => {
1176
1177
  (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
1177
1178
  }
1178
1179
  return t;
1179
- }, $e = "icon", Tr = "button", Ir = "link", _r = ({
1180
+ }, Ve = "icon", Tn = "button", _n = "link", En = ({
1180
1181
  type: e,
1181
1182
  size: t,
1182
1183
  labelRight: o,
1183
- labelLeft: n,
1184
+ labelLeft: r,
1184
1185
  align: a
1185
1186
  }) => {
1186
1187
  const s = "text-sm font-medium max-h-8 py-0", i = "text-base font-medium max-h-9 py-1", l = "text-lg font-medium max-h-12 py-2";
1187
1188
  switch (e) {
1188
- case Tr:
1189
+ case Tn:
1189
1190
  return C("px-4", {
1190
1191
  [s]: t === "small",
1191
1192
  [i]: t === "medium",
1192
1193
  [l]: t === "large"
1193
1194
  });
1194
- case Ir:
1195
+ case _n:
1195
1196
  return C("px-4 text-center", {
1196
1197
  [s]: t === "small",
1197
1198
  [i]: t === "medium",
1198
1199
  [l]: t === "large"
1199
1200
  });
1200
- case $e:
1201
+ case Ve:
1201
1202
  return C("inline-flex items-center", {
1202
1203
  "justify-center": a === "center",
1203
1204
  "justify-start": a === "left",
1204
1205
  "justify-end": a === "right",
1205
- "h-6 w-6 p-0": t === "small" && !(o || n),
1206
- "h-6 px-4 text-sm font-medium": t === "small" && (o || n),
1207
- "h-8 w-8 p-1": t === "medium" && !(o || n),
1208
- "h-8 px-4 text-base font-medium": t === "medium" && (o || n),
1209
- "h-12 w-12 p-2": t === "large" && !(o || n),
1210
- "h-12 px-4 text-lg font-medium": t === "large" && (o || n)
1206
+ "h-6 w-6 p-0": t === "small" && !(o || r),
1207
+ "h-6 px-4 text-sm font-medium": t === "small" && (o || r),
1208
+ "h-8 w-8 p-1": t === "medium" && !(o || r),
1209
+ "h-8 px-4 text-base font-medium": t === "medium" && (o || r),
1210
+ "h-12 w-12 p-2": t === "large" && !(o || r),
1211
+ "h-12 px-4 text-lg font-medium": t === "large" && (o || r)
1211
1212
  });
1212
1213
  }
1213
- }, Er = ({
1214
+ }, xn = ({
1214
1215
  mode: e,
1215
1216
  noBackground: t,
1216
1217
  noTruncate: o,
1217
- variant: n
1218
+ variant: r
1218
1219
  }) => {
1219
1220
  if (t)
1220
1221
  return "not-prose rounded-full";
1221
- if (n === "primary")
1222
+ if (r === "primary")
1222
1223
  return C("not-prose rounded-full", {
1223
1224
  truncate: !o,
1224
1225
  "bg-action-dark text-copy-light": e === "dark",
@@ -1226,7 +1227,7 @@ const Nr = (e) => {
1226
1227
  "bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "system",
1227
1228
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
1228
1229
  });
1229
- if (n === "secondary")
1230
+ if (r === "secondary")
1230
1231
  return C("not-prose rounded-full", {
1231
1232
  truncate: !o,
1232
1233
  "bg-action-dark text-copy-light": e === "light",
@@ -1234,7 +1235,7 @@ const Nr = (e) => {
1234
1235
  "bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "alt-system",
1235
1236
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
1236
1237
  });
1237
- if (n === "danger")
1238
+ if (r === "danger")
1238
1239
  return C("not-prose rounded-full", {
1239
1240
  truncate: !o,
1240
1241
  "bg-action-danger-dark text-copy-light": e === "dark",
@@ -1242,7 +1243,7 @@ const Nr = (e) => {
1242
1243
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
1243
1244
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
1244
1245
  });
1245
- }, xr = ({
1246
+ }, Sn = ({
1246
1247
  mode: e,
1247
1248
  disabled: t,
1248
1249
  variant: o
@@ -1270,7 +1271,7 @@ const Nr = (e) => {
1270
1271
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
1271
1272
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
1272
1273
  });
1273
- }, Sr = ({
1274
+ }, Rn = ({
1274
1275
  mode: e,
1275
1276
  disabled: t,
1276
1277
  variant: o
@@ -1298,7 +1299,7 @@ const Nr = (e) => {
1298
1299
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
1299
1300
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
1300
1301
  });
1301
- }, Rr = ({
1302
+ }, An = ({
1302
1303
  mode: e,
1303
1304
  noBorder: t,
1304
1305
  variant: o
@@ -1326,16 +1327,16 @@ const Nr = (e) => {
1326
1327
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
1327
1328
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
1328
1329
  });
1329
- }, Ar = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1330
+ }, Mn = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1330
1331
  "focus:outline-focus-dark": e === "dark",
1331
1332
  "focus:outline-focus-light": e === "light",
1332
1333
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1333
1334
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1334
- }), It = ({
1335
+ }), Pt = ({
1335
1336
  type: e,
1336
1337
  className: t,
1337
1338
  raw: o,
1338
- mode: n,
1339
+ mode: r,
1339
1340
  focusMode: a,
1340
1341
  disabled: s,
1341
1342
  fullWidth: i,
@@ -1344,47 +1345,47 @@ const Nr = (e) => {
1344
1345
  labelRight: d,
1345
1346
  labelLeft: c,
1346
1347
  spacing: p,
1347
- noBackground: y,
1348
+ noBackground: v,
1348
1349
  variant: u,
1349
1350
  noTruncate: m,
1350
- align: f
1351
- }) => (u || (u = "primary"), o ? C(We, t) : C(
1352
- We,
1351
+ align: b
1352
+ }) => (u || (u = "primary"), o ? C(qe, t) : C(
1353
+ qe,
1353
1354
  t,
1354
- Nr(p),
1355
- Er({ mode: n, variant: u, noBackground: y, noTruncate: m }),
1356
- _r({ type: e, size: l, labelRight: d, labelLeft: c, align: f }),
1357
- Rr({ mode: n, variant: u, noBorder: h }),
1358
- Ar({ focusMode: a }),
1359
- xr({ mode: n, variant: u, disabled: s }),
1360
- Sr({ mode: n, variant: u, disabled: s }),
1355
+ In(p),
1356
+ xn({ mode: r, variant: u, noBackground: v, noTruncate: m }),
1357
+ En({ type: e, size: l, labelRight: d, labelLeft: c, align: b }),
1358
+ An({ mode: r, variant: u, noBorder: h }),
1359
+ Mn({ focusMode: a }),
1360
+ Sn({ mode: r, variant: u, disabled: s }),
1361
+ Rn({ mode: r, variant: u, disabled: s }),
1361
1362
  {
1362
1363
  "w-full": i,
1363
1364
  "disabled:cursor-not-allowed disabled:opacity-50": s
1364
1365
  }
1365
- )), Mr = (e, t, o) => {
1366
- var n;
1367
- !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((n = e == null ? void 0 : e.currentTarget) == null ? void 0 : n.focus) == "function" && e.currentTarget.focus(), typeof o == "function" && o(e);
1366
+ )), Pn = (e, t, o) => {
1367
+ var r;
1368
+ !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((r = e == null ? void 0 : e.currentTarget) == null ? void 0 : r.focus) == "function" && e.currentTarget.focus(), typeof o == "function" && o(e);
1368
1369
  }, Be = _.forwardRef((e, t) => {
1369
- const { onClick: o, noInternalClick: n = !1, ...a } = e;
1370
- return /* @__PURE__ */ r(
1370
+ const { onClick: o, noInternalClick: r = !1, ...a } = e;
1371
+ return /* @__PURE__ */ n(
1371
1372
  "button",
1372
1373
  {
1373
1374
  ref: t,
1374
1375
  onClick: (s) => {
1375
- Mr(s, n, o);
1376
+ Pn(s, r, o);
1376
1377
  },
1377
1378
  ...a
1378
1379
  }
1379
1380
  );
1380
1381
  });
1381
1382
  Be.displayName = "BaseButton";
1382
- const _t = _.forwardRef(
1383
+ const Lt = _.forwardRef(
1383
1384
  ({
1384
1385
  children: e,
1385
1386
  disabled: t = !1,
1386
1387
  mode: o = "system",
1387
- focusMode: n = "system",
1388
+ focusMode: r = "system",
1388
1389
  fullWidth: a = !1,
1389
1390
  className: s,
1390
1391
  type: i = "button",
@@ -1393,27 +1394,27 @@ const _t = _.forwardRef(
1393
1394
  "aria-label": d,
1394
1395
  label: c,
1395
1396
  size: p = "medium",
1396
- labelRight: y,
1397
+ labelRight: v,
1397
1398
  labelLeft: u,
1398
1399
  spacing: m,
1399
- noBackground: f = !1,
1400
+ noBackground: b = !1,
1400
1401
  align: g = "center",
1401
1402
  ...k
1402
1403
  }, w) => {
1403
- const T = It({
1404
- type: $e,
1404
+ const T = Pt({
1405
+ type: Ve,
1405
1406
  mode: o,
1406
- focusMode: n,
1407
+ focusMode: r,
1407
1408
  fullWidth: a,
1408
1409
  disabled: t,
1409
1410
  raw: l,
1410
1411
  className: s,
1411
1412
  noBorder: h,
1412
1413
  size: p,
1413
- labelRight: y,
1414
+ labelRight: v,
1414
1415
  labelLeft: u,
1415
1416
  spacing: m,
1416
- noBackground: f,
1417
+ noBackground: b,
1417
1418
  align: g
1418
1419
  }), E = C({
1419
1420
  "text-copy-accent-dark": o === "light" && !l,
@@ -1421,7 +1422,7 @@ const _t = _.forwardRef(
1421
1422
  "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !l,
1422
1423
  "text-copy-light dark:text-copy-accent-dark": o === "system" && !l
1423
1424
  });
1424
- return /* @__PURE__ */ v(
1425
+ return /* @__PURE__ */ y(
1425
1426
  Be,
1426
1427
  {
1427
1428
  ref: w,
@@ -1431,15 +1432,15 @@ const _t = _.forwardRef(
1431
1432
  "aria-label": d || c,
1432
1433
  ...k,
1433
1434
  children: [
1434
- u && /* @__PURE__ */ r("span", { className: "pr-2", children: u }),
1435
- /* @__PURE__ */ r("div", { className: E, children: e }),
1436
- y && /* @__PURE__ */ r("span", { className: "pl-2", children: y })
1435
+ u && /* @__PURE__ */ n("span", { className: "pr-2", children: u }),
1436
+ /* @__PURE__ */ n("div", { className: E, children: e }),
1437
+ v && /* @__PURE__ */ n("span", { className: "pl-2", children: v })
1437
1438
  ]
1438
1439
  }
1439
1440
  );
1440
1441
  }
1441
1442
  );
1442
- _t.displayName = "ButtonIcon";
1443
+ Lt.displayName = "ButtonIcon";
1443
1444
  /*!
1444
1445
  @versini/ui-button v1.6.0
1445
1446
  © 2024 gizmette.com
@@ -1447,18 +1448,18 @@ _t.displayName = "ButtonIcon";
1447
1448
  try {
1448
1449
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
1449
1450
  version: "1.6.0",
1450
- buildTime: "12/26/2024 06:05 PM EST",
1451
+ buildTime: "12/27/2024 07:18 PM EST",
1451
1452
  homepage: "https://github.com/aversini/ui-components",
1452
1453
  license: "MIT"
1453
1454
  });
1454
1455
  } catch {
1455
1456
  }
1456
- const Pr = _.forwardRef(
1457
+ const Ln = _.forwardRef(
1457
1458
  ({
1458
1459
  children: e,
1459
1460
  disabled: t = !1,
1460
1461
  mode: o = "system",
1461
- focusMode: n = "system",
1462
+ focusMode: r = "system",
1462
1463
  fullWidth: a = !1,
1463
1464
  className: s,
1464
1465
  type: i = "button",
@@ -1467,35 +1468,35 @@ const Pr = _.forwardRef(
1467
1468
  "aria-label": d,
1468
1469
  label: c,
1469
1470
  size: p = "medium",
1470
- labelRight: y,
1471
+ labelRight: v,
1471
1472
  labelLeft: u,
1472
1473
  spacing: m,
1473
- noBackground: f = !1,
1474
+ noBackground: b = !1,
1474
1475
  align: g = "center",
1475
1476
  active: k = !1,
1476
1477
  ...w
1477
1478
  }, T) => {
1478
- const E = It({
1479
- type: $e,
1479
+ const E = Pt({
1480
+ type: Ve,
1480
1481
  mode: o,
1481
- focusMode: n,
1482
+ focusMode: r,
1482
1483
  fullWidth: a,
1483
1484
  disabled: t,
1484
1485
  raw: l,
1485
1486
  className: s,
1486
1487
  noBorder: h,
1487
1488
  size: p,
1488
- labelRight: y,
1489
+ labelRight: v,
1489
1490
  labelLeft: u,
1490
1491
  spacing: m,
1491
- noBackground: f,
1492
+ noBackground: b,
1492
1493
  align: g
1493
- }), M = C({
1494
+ }), R = C({
1494
1495
  "text-copy-accent-dark": o === "light" && !l,
1495
1496
  "text-copy-light": o === "dark" && !l,
1496
1497
  "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !l,
1497
1498
  "text-copy-light dark:text-copy-accent-dark": o === "system" && !l
1498
- }), S = k ? C(
1499
+ }), $ = k ? C(
1499
1500
  "relative",
1500
1501
  "focus-within:static",
1501
1502
  "focus-within:after:border-transparent",
@@ -1512,7 +1513,7 @@ const Pr = _.forwardRef(
1512
1513
  "after:border-table-light dark:after:border-table-dark": o === "alt-system"
1513
1514
  }
1514
1515
  ) : "";
1515
- return /* @__PURE__ */ r("div", { className: S, children: /* @__PURE__ */ v(
1516
+ return /* @__PURE__ */ n("div", { className: $, children: /* @__PURE__ */ y(
1516
1517
  Be,
1517
1518
  {
1518
1519
  ref: T,
@@ -1522,15 +1523,15 @@ const Pr = _.forwardRef(
1522
1523
  "aria-label": d || c,
1523
1524
  ...w,
1524
1525
  children: [
1525
- u && /* @__PURE__ */ r("span", { className: "pr-2", children: u }),
1526
- /* @__PURE__ */ r("div", { className: M, children: e }),
1527
- y && /* @__PURE__ */ r("span", { className: "pl-2", children: y })
1526
+ u && /* @__PURE__ */ n("span", { className: "pr-2", children: u }),
1527
+ /* @__PURE__ */ n("div", { className: R, children: e }),
1528
+ v && /* @__PURE__ */ n("span", { className: "pl-2", children: v })
1528
1529
  ]
1529
1530
  }
1530
1531
  ) });
1531
1532
  }
1532
1533
  );
1533
- Pr.displayName = "ButtonSort";
1534
+ Ln.displayName = "ButtonSort";
1534
1535
  /*!
1535
1536
  @versini/ui-spacing v1.1.0
1536
1537
  © 2024 gizmette.com
@@ -1538,13 +1539,13 @@ Pr.displayName = "ButtonSort";
1538
1539
  try {
1539
1540
  window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
1540
1541
  version: "1.1.0",
1541
- buildTime: "12/26/2024 06:05 PM EST",
1542
+ buildTime: "12/27/2024 07:18 PM EST",
1542
1543
  homepage: "https://github.com/aversini/ui-components",
1543
1544
  license: "MIT"
1544
1545
  });
1545
1546
  } catch {
1546
1547
  }
1547
- const Lr = (e) => {
1548
+ const $n = (e) => {
1548
1549
  let t = "";
1549
1550
  if (typeof e == "number" || typeof e == "string")
1550
1551
  t = "m-" + e;
@@ -1553,11 +1554,11 @@ const Lr = (e) => {
1553
1554
  (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
1554
1555
  }
1555
1556
  return t;
1556
- }, $r = ({
1557
+ }, On = ({
1557
1558
  children: e,
1558
1559
  fill: t,
1559
1560
  viewBox: o,
1560
- className: n,
1561
+ className: r,
1561
1562
  defaultViewBox: a,
1562
1563
  defaultClassName: s,
1563
1564
  spacing: i,
@@ -1565,12 +1566,12 @@ const Lr = (e) => {
1565
1566
  semantic: h = !1,
1566
1567
  ...d
1567
1568
  }) => {
1568
- const c = Lr(i), p = C(
1569
+ const c = $n(i), p = C(
1569
1570
  c,
1570
- n || s
1571
+ r || s
1571
1572
  );
1572
- return /* @__PURE__ */ v(A, { children: [
1573
- /* @__PURE__ */ r(
1573
+ return /* @__PURE__ */ y(S, { children: [
1574
+ /* @__PURE__ */ n(
1574
1575
  "svg",
1575
1576
  {
1576
1577
  xmlns: "http://www.w3.org/2000/svg",
@@ -1584,7 +1585,7 @@ const Lr = (e) => {
1584
1585
  children: e
1585
1586
  }
1586
1587
  ),
1587
- l && h && /* @__PURE__ */ r("span", { className: "sr-only", children: l })
1588
+ l && h && /* @__PURE__ */ n("span", { className: "sr-only", children: l })
1588
1589
  ] });
1589
1590
  };
1590
1591
  /*!
@@ -1594,30 +1595,30 @@ const Lr = (e) => {
1594
1595
  try {
1595
1596
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
1596
1597
  version: "1.1.0",
1597
- buildTime: "12/26/2024 06:05 PM EST",
1598
+ buildTime: "12/27/2024 07:18 PM EST",
1598
1599
  homepage: "https://github.com/aversini/ui-components",
1599
1600
  license: "MIT"
1600
1601
  });
1601
1602
  } catch {
1602
1603
  }
1603
- const Br = ({
1604
+ const Vn = ({
1604
1605
  className: e,
1605
1606
  viewBox: t,
1606
1607
  spacing: o,
1607
- title: n,
1608
+ title: r,
1608
1609
  monotone: a,
1609
1610
  ...s
1610
- }) => /* @__PURE__ */ r(
1611
- $r,
1611
+ }) => /* @__PURE__ */ n(
1612
+ On,
1612
1613
  {
1613
1614
  defaultViewBox: "0 0 384 512",
1614
1615
  defaultClassName: "size-5",
1615
1616
  viewBox: t,
1616
1617
  className: e,
1617
1618
  spacing: o,
1618
- title: n || "Close",
1619
+ title: r || "Close",
1619
1620
  ...s,
1620
- children: /* @__PURE__ */ r("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" })
1621
+ children: /* @__PURE__ */ n("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" })
1621
1622
  }
1622
1623
  );
1623
1624
  /*!
@@ -1627,189 +1628,272 @@ const Br = ({
1627
1628
  try {
1628
1629
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
1629
1630
  version: "1.19.0",
1630
- buildTime: "12/26/2024 06:05 PM EST",
1631
+ buildTime: "12/27/2024 07:18 PM EST",
1631
1632
  homepage: "https://github.com/aversini/ui-components",
1632
1633
  license: "MIT"
1633
1634
  });
1634
1635
  } catch {
1635
1636
  }
1636
- const ne = "panel", pe = "messagebox", Vr = ({
1637
+ const $t = f.createContext(null);
1638
+ function Bn({
1639
+ initialOpen: e = !1,
1640
+ open: t,
1641
+ onOpenChange: o
1642
+ } = {}) {
1643
+ const [r, a] = f.useState(e), [s, i] = f.useState(), [l, h] = f.useState(), d = t ?? r, c = o ?? a, p = it({
1644
+ open: d,
1645
+ onOpenChange: c
1646
+ }), v = p.context, u = lt(v, {
1647
+ enabled: t == null
1648
+ }), m = dt(v, {
1649
+ outsidePress: !1,
1650
+ outsidePressEvent: "mousedown"
1651
+ }), b = ct(v), g = ut([u, m, b]);
1652
+ return f.useMemo(
1653
+ () => ({
1654
+ open: d,
1655
+ setOpen: c,
1656
+ ...g,
1657
+ ...p,
1658
+ labelId: s,
1659
+ descriptionId: l,
1660
+ setLabelId: i,
1661
+ setDescriptionId: h
1662
+ }),
1663
+ [d, c, g, p, s, l]
1664
+ );
1665
+ }
1666
+ const ve = () => {
1667
+ const e = f.useContext($t);
1668
+ if (e == null)
1669
+ throw new Error("Modal components must be wrapped in <Modal />");
1670
+ return e;
1671
+ };
1672
+ function zn({
1673
+ children: e,
1674
+ ...t
1675
+ }) {
1676
+ const o = Bn(t);
1677
+ return /* @__PURE__ */ n($t.Provider, { value: o, children: e });
1678
+ }
1679
+ const Dn = f.forwardRef(function(e, t) {
1680
+ const { context: o, ...r } = ve(), a = Pe([r.refs.setFloating, t]);
1681
+ if (!o.open)
1682
+ return null;
1683
+ const { overlayBackground: s, ...i } = e, l = C("grid place-items-center", {
1684
+ [`${s}`]: s,
1685
+ "bg-black sm:bg-black/[.8]": !s
1686
+ });
1687
+ return /* @__PURE__ */ n(mt, { children: /* @__PURE__ */ n(No, { className: l, lockScroll: !0, children: /* @__PURE__ */ n(ht, { context: o, children: /* @__PURE__ */ n(
1688
+ "div",
1689
+ {
1690
+ ref: a,
1691
+ "aria-labelledby": r.labelId,
1692
+ "aria-describedby": r.descriptionId,
1693
+ ...r.getFloatingProps(i),
1694
+ children: i.children
1695
+ }
1696
+ ) }) }) });
1697
+ }), Fn = f.forwardRef(function({ children: e, ...t }, o) {
1698
+ const { setLabelId: r } = ve(), a = Me();
1699
+ return f.useLayoutEffect(() => (r(a), () => r(void 0)), [a, r]), /* @__PURE__ */ n("h1", { ...t, ref: o, id: a, children: e });
1700
+ }), Gn = f.forwardRef(function({ children: e, ...t }, o) {
1701
+ const { setDescriptionId: r } = ve(), a = Me();
1702
+ return f.useLayoutEffect(() => (r(a), () => r(void 0)), [a, r]), /* @__PURE__ */ n("div", { ...t, ref: o, id: a, children: e });
1703
+ }), Hn = f.forwardRef(function(e, t) {
1704
+ const { setOpen: o } = ve(), { trigger: r, className: a, ...s } = e, i = f.useCallback(() => o(!1), [o]);
1705
+ return /* @__PURE__ */ n("div", { className: a, children: f.cloneElement(r, {
1706
+ ref: t,
1707
+ onClick: i,
1708
+ ...s
1709
+ }) });
1710
+ });
1711
+ /*!
1712
+ @versini/ui-modal v1.1.0
1713
+ © 2024 gizmette.com
1714
+ */
1715
+ try {
1716
+ window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
1717
+ version: "1.1.0",
1718
+ buildTime: "12/27/2024 07:18 PM EST",
1719
+ homepage: "https://github.com/aversini/ui-components",
1720
+ license: "MIT"
1721
+ });
1722
+ } catch {
1723
+ }
1724
+ const ee = "panel", ue = "messagebox", Un = ({
1637
1725
  className: e,
1638
1726
  kind: t,
1639
1727
  borderMode: o
1640
1728
  }) => ({
1641
1729
  main: C("prose prose-lighter flex flex-col bg-surface-medium", {
1642
- [`${Ke} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === ne,
1643
- [`${Ke} w-full sm:w-[95%] md:max-w-2xl`]: t === ne && !e,
1644
- [`${je} rounded-lg border-2`]: t === pe,
1645
- [`${je} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === pe && !e,
1730
+ [`${Ye} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === ee,
1731
+ [`${Ye} w-full sm:w-[95%] md:max-w-2xl`]: t === ee && !e,
1732
+ [`${We} rounded-lg border-2`]: t === ue,
1733
+ [`${We} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === ue && !e,
1646
1734
  [`${e}`]: !!e,
1647
- "sm:border-border-dark": o === "dark" && t === ne,
1648
- "sm:border-border-accent": o === "light" && t === ne,
1649
- "border-border-dark": o === "dark" && t === pe,
1650
- "border-border-accent": o === "light" && t === pe
1735
+ "sm:border-border-dark": o === "dark" && t === ee,
1736
+ "sm:border-border-accent": o === "light" && t === ee,
1737
+ "border-border-dark": o === "dark" && t === ue,
1738
+ "border-border-accent": o === "light" && t === ue
1651
1739
  }),
1652
1740
  content: "flex flex-col py-2 sm:py-4 sm:px-4 px-2 overflow-y-auto",
1653
1741
  footer: "flex flex-grow flex-col sm:p-4 p-2",
1654
1742
  header: "sm:p-4 mb-0 p-2",
1655
1743
  close: "sm:p-4 p-2"
1656
- }), ge = (e) => no(
1657
- () => import("./index.DaIz2ggm.CWKMlVvg.js").then((t) => ({
1658
- default: t[e]
1659
- }))
1660
- ), zr = ge("Modal"), Or = ge("ModalClose"), Dr = ge("ModalContent"), Hr = ge("ModalDescription"), Fr = ge("ModalHeading"), Z = ({
1744
+ }), Y = ({
1661
1745
  open: e,
1662
1746
  onOpenChange: t,
1663
1747
  title: o,
1664
- children: n,
1748
+ children: r,
1665
1749
  footer: a,
1666
1750
  borderMode: s = "light",
1667
- kind: i = ne,
1751
+ kind: i = ee,
1668
1752
  className: l
1669
1753
  }) => {
1670
- const h = le(""), d = Vr({ className: l, kind: i, borderMode: s });
1671
- return q(() => (e && (h.current = document.title, document.title = `${o} | ${h.current}`), () => {
1754
+ const h = Z(""), d = Un({ className: l, kind: i, borderMode: s });
1755
+ return K(() => (e && (h.current = document.title, document.title = `${o} | ${h.current}`), () => {
1672
1756
  e && (document.title = h.current);
1673
- }), [o, e]), /* @__PURE__ */ r(ro, { fallback: /* @__PURE__ */ r("div", {}), children: e && /* @__PURE__ */ r(zr, { open: e, onOpenChange: t, children: /* @__PURE__ */ v(Dr, { className: d.main, children: [
1674
- /* @__PURE__ */ v("div", { className: "flex flex-row-reverse items-center justify-between", children: [
1675
- /* @__PURE__ */ r(
1676
- Or,
1757
+ }), [o, e]), /* @__PURE__ */ n(S, { children: e && /* @__PURE__ */ n(zn, { open: e, onOpenChange: t, children: /* @__PURE__ */ y(Dn, { className: d.main, children: [
1758
+ /* @__PURE__ */ y("div", { className: "flex flex-row-reverse items-center justify-between", children: [
1759
+ /* @__PURE__ */ n(
1760
+ Hn,
1677
1761
  {
1678
1762
  className: d.close,
1679
- trigger: /* @__PURE__ */ r(
1680
- _t,
1763
+ trigger: /* @__PURE__ */ n(
1764
+ Lt,
1681
1765
  {
1682
1766
  mode: "dark",
1683
1767
  focusMode: "light",
1684
1768
  noBorder: !0,
1685
1769
  label: "Close",
1686
- children: /* @__PURE__ */ r(Br, {})
1770
+ children: /* @__PURE__ */ n(Vn, {})
1687
1771
  }
1688
1772
  )
1689
1773
  }
1690
1774
  ),
1691
- /* @__PURE__ */ r(Fr, { className: d.header, children: o })
1775
+ /* @__PURE__ */ n(Fn, { className: d.header, children: o })
1692
1776
  ] }),
1693
- /* @__PURE__ */ r(Hr, { className: d.content, children: n }),
1694
- a && /* @__PURE__ */ r("div", { className: d.footer, children: a })
1777
+ /* @__PURE__ */ n(Gn, { className: d.content, children: r }),
1778
+ a && /* @__PURE__ */ n("div", { className: d.footer, children: a })
1695
1779
  ] }) }) });
1696
- }, Gr = ({ stats: e }) => {
1697
- const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", n = (e == null ? void 0 : e.models) || [], a = ce(), s = ce();
1698
- return /* @__PURE__ */ v(A, { children: [
1699
- /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
1700
- $,
1780
+ }, jn = ({ stats: e }) => {
1781
+ const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", r = (e == null ? void 0 : e.models) || [], a = re(), s = re();
1782
+ return /* @__PURE__ */ y(S, { children: [
1783
+ /* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(
1784
+ M,
1701
1785
  {
1702
- header: N.ABOUT.TITLE_CLIENT,
1786
+ header: I.ABOUT.TITLE_CLIENT,
1703
1787
  className: "prose-dark dark:prose-lighter",
1704
- children: ie(a, {
1705
- [N.ABOUT.VERSION]: "5.8.1",
1706
- [N.ABOUT.BUILD_TIMESTAMP]: "12/27/2024 02:06 PM EST"
1788
+ children: ne(a, {
1789
+ [I.ABOUT.VERSION]: "5.9.0",
1790
+ [I.ABOUT.BUILD_TIMESTAMP]: "12/28/2024 10:44 AM EST"
1707
1791
  })
1708
1792
  }
1709
1793
  ) }),
1710
- /* @__PURE__ */ r(
1711
- $,
1794
+ /* @__PURE__ */ n(
1795
+ M,
1712
1796
  {
1713
- header: N.ABOUT.TITLE_SERVER,
1797
+ header: I.ABOUT.TITLE_SERVER,
1714
1798
  className: "prose-dark dark:prose-lighter",
1715
- children: ie(s, {
1716
- [N.ABOUT.VERSION]: o,
1717
- [be(N.ABOUT.ENGINE, n.length)]: /* @__PURE__ */ r(A, { children: n.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) }),
1718
- [be(N.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ r(A, { children: t.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) })
1799
+ children: ne(s, {
1800
+ [I.ABOUT.VERSION]: o,
1801
+ [he(I.ABOUT.ENGINE, r.length)]: /* @__PURE__ */ n(S, { children: r.map((i) => /* @__PURE__ */ n("div", { className: "text-right", children: i }, i)) }),
1802
+ [he(I.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ n(S, { children: t.map((i) => /* @__PURE__ */ n("div", { className: "text-right", children: i }, i)) })
1719
1803
  })
1720
1804
  }
1721
1805
  )
1722
1806
  ] });
1723
- }, Ur = ({
1807
+ }, Kn = ({
1724
1808
  open: e,
1725
1809
  onOpenChange: t
1726
1810
  }) => {
1727
- const { serverStats: o } = B(ue);
1728
- return /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: At, children: /* @__PURE__ */ r(Gr, { stats: o }) });
1729
- }, jr = (e) => Xe(e), Kr = (e) => {
1811
+ const { serverStats: o } = P(se);
1812
+ return /* @__PURE__ */ n(Y, { open: e, onOpenChange: t, title: Dt, children: /* @__PURE__ */ n(jn, { stats: o }) });
1813
+ }, Wn = (e) => Xe(e), Yn = (e) => {
1730
1814
  if (!e || e.length === 0)
1731
- return Pt;
1815
+ return Gt;
1732
1816
  const t = e.filter(
1733
1817
  (o) => {
1734
- var n, a;
1735
- return ((n = o == null ? void 0 : o.message) == null ? void 0 : n.role) === Lt && typeof ((a = o == null ? void 0 : o.message) == null ? void 0 : a.processingTime) == "number";
1818
+ var r, a;
1819
+ return ((r = o == null ? void 0 : o.message) == null ? void 0 : r.role) === Ht && typeof ((a = o == null ? void 0 : o.message) == null ? void 0 : a.processingTime) == "number";
1736
1820
  }
1737
1821
  ).map((o) => o.message.processingTime);
1738
- return $t({
1822
+ return Ut({
1739
1823
  data: t,
1740
- formatter: jr
1824
+ formatter: Wn
1741
1825
  });
1742
- }, Wr = ({
1826
+ }, qn = ({
1743
1827
  isAuthenticated: e,
1744
1828
  stats: t
1745
1829
  }) => {
1746
- const { state: o } = B(ue), n = Bt - Number(o == null ? void 0 : o.usage), a = ce(), s = ce();
1747
- return e ? /* @__PURE__ */ v(A, { children: [
1748
- o && o.messages.length > 0 && /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
1749
- $,
1830
+ const { state: o } = P(se), r = jt - Number(o == null ? void 0 : o.usage), a = re(), s = re();
1831
+ return e ? /* @__PURE__ */ y(S, { children: [
1832
+ o && o.messages.length > 0 && /* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(
1833
+ M,
1750
1834
  {
1751
- header: N.CURRENT_STATISTICS.TITLE,
1835
+ header: I.CURRENT_STATISTICS.TITLE,
1752
1836
  className: "prose-dark dark:prose-lighter",
1753
- children: ie(a, {
1754
- [N.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) || ae,
1755
- [N.CURRENT_STATISTICS.TOKENS_USED]: o == null ? void 0 : o.usage,
1756
- [N.CURRENT_STATISTICS.REMAINING_TOKENS]: Mt.format(n),
1757
- [N.CURRENT_STATISTICS.PROCESSING_TIME]: Kr(o == null ? void 0 : o.messages)
1837
+ children: ne(a, {
1838
+ [I.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) || te,
1839
+ [I.CURRENT_STATISTICS.TOKENS_USED]: o == null ? void 0 : o.usage,
1840
+ [I.CURRENT_STATISTICS.REMAINING_TOKENS]: Ft.format(r),
1841
+ [I.CURRENT_STATISTICS.PROCESSING_TIME]: Yn(o == null ? void 0 : o.messages)
1758
1842
  })
1759
1843
  }
1760
1844
  ) }),
1761
- /* @__PURE__ */ r(
1762
- $,
1845
+ /* @__PURE__ */ n(
1846
+ M,
1763
1847
  {
1764
- header: N.MAIN_STATISTICS.TITLE,
1848
+ header: I.MAIN_STATISTICS.TITLE,
1765
1849
  className: "prose-dark dark:prose-lighter",
1766
- children: ie(s, {
1767
- [be(N.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
1768
- [N.MAIN_STATISTICS.PROCESSING_TIME]: Xe(
1850
+ children: ne(s, {
1851
+ [he(I.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
1852
+ [I.MAIN_STATISTICS.PROCESSING_TIME]: Xe(
1769
1853
  t.averageProcessingTimes
1770
1854
  )
1771
1855
  })
1772
1856
  }
1773
1857
  )
1774
1858
  ] }) : null;
1775
- }, Yr = ({
1859
+ }, Zn = ({
1776
1860
  open: e,
1777
1861
  onOpenChange: t
1778
1862
  }) => {
1779
- const [o, n] = x({
1863
+ const [o, r] = x({
1780
1864
  averageProcessingTimes: 0,
1781
1865
  totalChats: 0
1782
- }), { isAuthenticated: a, getAccessToken: s, user: i } = X();
1783
- return q(() => {
1866
+ }), { isAuthenticated: a, getAccessToken: s, user: i } = W();
1867
+ return K(() => {
1784
1868
  !e || !i || (async () => {
1785
1869
  try {
1786
- const l = await D({
1870
+ const l = await z({
1787
1871
  accessToken: await s(),
1788
- type: H.GET_CHATS_STATS,
1872
+ type: D.GET_CHATS_STATS,
1789
1873
  params: {
1790
1874
  userId: i.username
1791
1875
  }
1792
1876
  });
1793
- l.status === 200 && n(l.data);
1877
+ l.status === 200 && r(l.data);
1794
1878
  } catch {
1795
1879
  }
1796
1880
  })();
1797
- }, [e, s, i]), /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Ze, children: /* @__PURE__ */ r(Wr, { isAuthenticated: a, stats: o }) });
1798
- }, Et = ({
1881
+ }, [e, s, i]), /* @__PURE__ */ n(Y, { open: e, onOpenChange: t, title: Je, children: /* @__PURE__ */ n(qn, { isAuthenticated: a, stats: o }) });
1882
+ }, Ot = ({
1799
1883
  showConfirmation: e,
1800
1884
  setShowConfirmation: t,
1801
1885
  action: o,
1802
- children: n,
1886
+ children: r,
1803
1887
  customStrings: a
1804
- }) => /* @__PURE__ */ r(
1805
- Z,
1888
+ }) => /* @__PURE__ */ n(
1889
+ Y,
1806
1890
  {
1807
1891
  kind: "messagebox",
1808
1892
  open: e,
1809
1893
  onOpenChange: t,
1810
1894
  title: a.title,
1811
- footer: /* @__PURE__ */ v(Q, { columnGap: 2, alignHorizontal: "flex-end", children: [
1812
- /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
1895
+ footer: /* @__PURE__ */ y(q, { columnGap: 2, alignHorizontal: "flex-end", children: [
1896
+ /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
1813
1897
  G,
1814
1898
  {
1815
1899
  mode: "dark",
@@ -1821,7 +1905,7 @@ const ne = "panel", pe = "messagebox", Vr = ({
1821
1905
  children: a.cancelAction
1822
1906
  }
1823
1907
  ) }),
1824
- /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
1908
+ /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
1825
1909
  G,
1826
1910
  {
1827
1911
  mode: "dark",
@@ -1834,21 +1918,21 @@ const ne = "panel", pe = "messagebox", Vr = ({
1834
1918
  }
1835
1919
  ) })
1836
1920
  ] }),
1837
- children: n
1921
+ children: r
1838
1922
  }
1839
- ), qr = async (e, t, o, n) => {
1923
+ ), Qn = async (e, t, o, r) => {
1840
1924
  try {
1841
- const a = await D({
1842
- accessToken: n,
1843
- type: H.GET_CHAT,
1925
+ const a = await z({
1926
+ accessToken: r,
1927
+ type: D.GET_CHAT,
1844
1928
  params: {
1845
1929
  id: e.id
1846
1930
  }
1847
1931
  });
1848
1932
  a.status === 200 && (t({
1849
- type: Qe
1933
+ type: tt
1850
1934
  }), t({
1851
- type: zt,
1935
+ type: Wt,
1852
1936
  payload: {
1853
1937
  id: e.id,
1854
1938
  model: a.data.model,
@@ -1858,30 +1942,30 @@ const ne = "panel", pe = "messagebox", Vr = ({
1858
1942
  }), o(!1));
1859
1943
  } catch {
1860
1944
  }
1861
- }, Ye = (e) => {
1945
+ }, Ze = (e) => {
1862
1946
  const t = e[0];
1863
- return Ot(t == null ? void 0 : t.content, 100);
1864
- }, Xr = ({
1947
+ return Yt(t == null ? void 0 : t.content, 100);
1948
+ }, Xn = ({
1865
1949
  filteredHistory: e,
1866
1950
  setFilteredHistory: t,
1867
1951
  dispatch: o,
1868
- onOpenChange: n
1952
+ onOpenChange: r
1869
1953
  }) => {
1870
- var f;
1871
- const { user: a, getAccessToken: s } = X(), i = le({
1954
+ var b;
1955
+ const { user: a, getAccessToken: s } = W(), i = Z({
1872
1956
  id: 0,
1873
1957
  timestamp: "",
1874
1958
  message: ""
1875
- }), [l, h] = x(!1), { state: d, dispatch: c } = B(Je), [, p] = he({
1876
- key: me + Vt,
1959
+ }), [l, h] = x(!1), { state: d, dispatch: c } = P(et), [, p] = le({
1960
+ key: ie + Kt,
1877
1961
  initialValue: d.sortDirection
1878
- }), y = e.data.sort(
1962
+ }), v = e.data.sort(
1879
1963
  (g, k) => {
1880
1964
  switch (d.sortedCell) {
1881
1965
  case "timestamp":
1882
- if (d.sortDirection === O.ASC)
1966
+ if (d.sortDirection === B.ASC)
1883
1967
  return new Date(g[d.sortedCell]).getTime() - new Date(k[d.sortedCell]).getTime();
1884
- if (d.sortDirection === O.DESC)
1968
+ if (d.sortDirection === B.DESC)
1885
1969
  return new Date(k[d.sortedCell]).getTime() - new Date(g[d.sortedCell]).getTime();
1886
1970
  break;
1887
1971
  default:
@@ -1892,46 +1976,46 @@ const ne = "panel", pe = "messagebox", Vr = ({
1892
1976
  ), u = (g) => {
1893
1977
  switch (d.sortDirection) {
1894
1978
  case !1:
1895
- p(O.ASC), c({
1979
+ p(B.ASC), c({
1896
1980
  type: we,
1897
1981
  payload: {
1898
1982
  sortedCell: g,
1899
- sortDirection: O.ASC
1983
+ sortDirection: B.ASC
1900
1984
  }
1901
1985
  });
1902
1986
  break;
1903
- case O.ASC:
1904
- p(O.DESC), c({
1987
+ case B.ASC:
1988
+ p(B.DESC), c({
1905
1989
  type: we,
1906
1990
  payload: {
1907
1991
  sortedCell: g,
1908
- sortDirection: O.DESC
1992
+ sortDirection: B.DESC
1909
1993
  }
1910
1994
  });
1911
1995
  break;
1912
1996
  default:
1913
- p(O.ASC), c({
1997
+ p(B.ASC), c({
1914
1998
  type: we,
1915
1999
  payload: {
1916
2000
  sortedCell: g,
1917
- sortDirection: O.ASC
2001
+ sortDirection: B.ASC
1918
2002
  }
1919
2003
  });
1920
2004
  break;
1921
2005
  }
1922
2006
  };
1923
- return /* @__PURE__ */ v(A, { children: [
1924
- /* @__PURE__ */ v(
1925
- Et,
2007
+ return /* @__PURE__ */ y(S, { children: [
2008
+ /* @__PURE__ */ y(
2009
+ Ot,
1926
2010
  {
1927
2011
  showConfirmation: l,
1928
2012
  setShowConfirmation: h,
1929
2013
  action: async () => {
1930
2014
  const g = i.current;
1931
2015
  try {
1932
- const k = await D({
2016
+ const k = await z({
1933
2017
  accessToken: await s(),
1934
- type: H.DELETE_CHAT,
2018
+ type: D.DELETE_CHAT,
1935
2019
  params: {
1936
2020
  userId: (a == null ? void 0 : a.username) || "",
1937
2021
  id: g.id
@@ -1947,174 +2031,203 @@ const ne = "panel", pe = "messagebox", Vr = ({
1947
2031
  title: "Delete chat"
1948
2032
  },
1949
2033
  children: [
1950
- /* @__PURE__ */ r("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
1951
- /* @__PURE__ */ v("ul", { className: "m-0", children: [
1952
- /* @__PURE__ */ v("li", { children: [
2034
+ /* @__PURE__ */ n("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
2035
+ /* @__PURE__ */ y("ul", { className: "m-0", children: [
2036
+ /* @__PURE__ */ y("li", { children: [
1953
2037
  "Timestamp:",
1954
2038
  " ",
1955
- /* @__PURE__ */ r("span", { className: "text-lg", children: i.current && i.current.timestamp })
2039
+ /* @__PURE__ */ n("span", { className: "text-lg", children: i.current && i.current.timestamp })
1956
2040
  ] }),
1957
- /* @__PURE__ */ v("li", { children: [
2041
+ /* @__PURE__ */ y("li", { children: [
1958
2042
  "First message:",
1959
2043
  " ",
1960
- /* @__PURE__ */ r("span", { className: "text-lg", children: (f = i.current) == null ? void 0 : f.message })
2044
+ /* @__PURE__ */ n("span", { className: "text-lg", children: (b = i.current) == null ? void 0 : b.message })
1961
2045
  ] })
1962
2046
  ] })
1963
2047
  ]
1964
2048
  }
1965
2049
  ),
1966
- /* @__PURE__ */ v(Zt, { stickyHeader: !0, stickyFooter: !0, compact: !0, wrapperClassName: "max-h-[60vh]", children: [
1967
- /* @__PURE__ */ r(Jt, { children: /* @__PURE__ */ v(Te, { children: [
1968
- /* @__PURE__ */ r(
1969
- Qt,
1970
- {
1971
- buttonClassName: "text-xs sm:text-sm",
1972
- cellId: "timestamp",
1973
- align: "left",
1974
- sortDirection: d.sortDirection,
1975
- sortedCell: d.sortedCell,
1976
- onClick: () => {
1977
- u("timestamp");
1978
- },
1979
- children: "Date"
1980
- }
1981
- ),
1982
- /* @__PURE__ */ r(F, { className: "text-xs sm:text-sm", children: "First message" }),
1983
- /* @__PURE__ */ r(F, { className: "text-xs sm:text-sm", children: "Model" }),
1984
- /* @__PURE__ */ r(F, { className: "text-xs sm:text-sm text-right", children: "Actions" })
1985
- ] }) }),
1986
- /* @__PURE__ */ r(eo, { children: y.map((g, k) => {
1987
- var w;
1988
- return ((w = g == null ? void 0 : g.messages) == null ? void 0 : w.length) > 0 ? /* @__PURE__ */ v(Te, { children: [
1989
- /* @__PURE__ */ r(
1990
- F,
1991
- {
1992
- component: "th",
1993
- scope: "row",
1994
- className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
1995
- children: g.timestamp
1996
- }
1997
- ),
1998
- /* @__PURE__ */ r(
1999
- F,
2000
- {
2001
- className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
2002
- style: {
2003
- wordBreak: "break-word"
2004
- },
2005
- children: Ye(g.messages)
2006
- }
2007
- ),
2008
- /* @__PURE__ */ r(F, { component: "th", scope: "row", className: "text-gray-400", children: /* @__PURE__ */ v(Q, { alignHorizontal: "center", children: [
2009
- g.model && g.model.startsWith("claude") && /* @__PURE__ */ r(st, { className: "size-4 sm:size-5" }),
2010
- g.model && g.model.startsWith("gpt") && /* @__PURE__ */ r(it, { className: "size-4 sm:size-5" })
2011
- ] }) }),
2012
- /* @__PURE__ */ r(F, { className: "px-2", children: /* @__PURE__ */ v("div", { className: "flex justify-end gap-2", children: [
2013
- /* @__PURE__ */ r(
2014
- W,
2015
- {
2016
- focusMode: "alt-system",
2017
- noBorder: !0,
2018
- label: "Restore chat",
2019
- onClick: async () => {
2020
- const T = await s();
2021
- qr(
2022
- g,
2023
- o,
2024
- n,
2025
- T
2026
- );
2027
- },
2028
- children: /* @__PURE__ */ r(Ro, { className: "h-3 w-3", monotone: !0 })
2029
- }
2030
- ),
2031
- /* @__PURE__ */ r(
2032
- W,
2050
+ /* @__PURE__ */ y(
2051
+ io,
2052
+ {
2053
+ stickyHeader: !0,
2054
+ stickyFooter: !0,
2055
+ compact: !0,
2056
+ wrapperClassName: "max-h-[60vh] min-h-[60vh]",
2057
+ children: [
2058
+ /* @__PURE__ */ n(lo, { children: /* @__PURE__ */ y(Ie, { children: [
2059
+ /* @__PURE__ */ n(
2060
+ co,
2033
2061
  {
2034
- focusMode: "alt-system",
2035
- noBorder: !0,
2036
- label: "Delete chat",
2062
+ buttonClassName: "text-xs sm:text-sm",
2063
+ cellId: "timestamp",
2064
+ align: "left",
2065
+ sortDirection: d.sortDirection,
2066
+ sortedCell: d.sortedCell,
2037
2067
  onClick: () => {
2038
- i.current = {
2039
- id: g.id,
2040
- timestamp: g.timestamp,
2041
- message: Ye(g.messages)
2042
- }, h(!l);
2068
+ u("timestamp");
2043
2069
  },
2044
- children: /* @__PURE__ */ r("div", { className: "text-red-400", children: /* @__PURE__ */ r(_o, { className: "h-3 w-3", monotone: !0 }) })
2070
+ children: "Date"
2045
2071
  }
2046
- )
2047
- ] }) })
2048
- ] }, `${N.HISTORY.TITLE}-${g.id}-${k}`) : null;
2049
- }) }),
2050
- /* @__PURE__ */ r(to, { children: /* @__PURE__ */ r(Te, { children: /* @__PURE__ */ r(F, { colSpan: 4, children: /* @__PURE__ */ r("div", { children: be(
2051
- `${e.data.length} chat`,
2052
- e.data.length
2053
- ) }) }) }) })
2054
- ] })
2055
- ] });
2056
- };
2057
- function qe(e, t) {
2058
- return t ? e.filter(
2059
- (o) => o.messages.some(
2060
- (n) => n.content !== null && n.content.toLowerCase().includes(t.toLowerCase())
2072
+ ),
2073
+ /* @__PURE__ */ n(F, { className: "text-xs sm:text-sm", children: "First message" }),
2074
+ /* @__PURE__ */ n(F, { className: "text-xs sm:text-sm", children: "Model" }),
2075
+ /* @__PURE__ */ n(F, { className: "text-xs sm:text-sm text-right", children: "Actions" })
2076
+ ] }) }),
2077
+ /* @__PURE__ */ n(uo, { children: v.map((g, k) => {
2078
+ var w;
2079
+ return ((w = g == null ? void 0 : g.messages) == null ? void 0 : w.length) > 0 ? /* @__PURE__ */ y(Ie, { children: [
2080
+ /* @__PURE__ */ n(
2081
+ F,
2082
+ {
2083
+ component: "th",
2084
+ scope: "row",
2085
+ className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
2086
+ children: g.timestamp
2087
+ }
2088
+ ),
2089
+ /* @__PURE__ */ n(
2090
+ F,
2091
+ {
2092
+ className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
2093
+ style: {
2094
+ wordBreak: "break-word"
2095
+ },
2096
+ children: Ze(g.messages)
2097
+ }
2098
+ ),
2099
+ /* @__PURE__ */ n(F, { component: "th", scope: "row", className: "text-gray-400", children: /* @__PURE__ */ y(q, { alignHorizontal: "center", children: [
2100
+ g.model && g.model.startsWith("claude") && /* @__PURE__ */ n(pt, { className: "size-4 sm:size-5" }),
2101
+ g.model && g.model.startsWith("gpt") && /* @__PURE__ */ n(gt, { className: "size-4 sm:size-5" })
2102
+ ] }) }),
2103
+ /* @__PURE__ */ n(F, { className: "px-2", children: /* @__PURE__ */ y("div", { className: "flex justify-end gap-2", children: [
2104
+ /* @__PURE__ */ n(
2105
+ U,
2106
+ {
2107
+ focusMode: "alt-system",
2108
+ noBorder: !0,
2109
+ label: "Restore chat",
2110
+ onClick: async () => {
2111
+ const T = await s();
2112
+ Qn(
2113
+ g,
2114
+ o,
2115
+ r,
2116
+ T
2117
+ );
2118
+ },
2119
+ children: /* @__PURE__ */ n(Ro, { className: "h-3 w-3", monotone: !0 })
2120
+ }
2121
+ ),
2122
+ /* @__PURE__ */ n(
2123
+ U,
2124
+ {
2125
+ focusMode: "alt-system",
2126
+ noBorder: !0,
2127
+ label: "Delete chat",
2128
+ onClick: () => {
2129
+ i.current = {
2130
+ id: g.id,
2131
+ timestamp: g.timestamp,
2132
+ message: Ze(g.messages)
2133
+ }, h(!l);
2134
+ },
2135
+ children: /* @__PURE__ */ n("div", { className: "text-red-400", children: /* @__PURE__ */ n(_o, { className: "h-3 w-3", monotone: !0 }) })
2136
+ }
2137
+ )
2138
+ ] }) })
2139
+ ] }, `${I.HISTORY.TITLE}-${g.id}-${k}`) : null;
2140
+ }) }),
2141
+ /* @__PURE__ */ n(mo, { children: /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n(F, { colSpan: 4, children: /* @__PURE__ */ n("div", { children: he(
2142
+ `${e.data.length} chat`,
2143
+ e.data.length
2144
+ ) }) }) }) })
2145
+ ]
2146
+ }
2061
2147
  )
2062
- ) : e;
2063
- }
2064
- const Zr = ({
2065
- onOpenChange: e,
2066
- historyData: t
2148
+ ] });
2149
+ }, Qe = async ({
2150
+ searchString: e,
2151
+ username: t,
2152
+ accessToken: o
2067
2153
  }) => {
2068
- const { isAuthenticated: o } = X(), n = le(null), { dispatch: a } = B(ue), { state: s, dispatch: i } = B(Je), [, l] = he({
2069
- key: me + Dt,
2070
- initialValue: s.searchString
2071
- }), h = ao(() => t, [t]), [d, c] = x({
2072
- data: h
2073
- }), p = (m) => {
2074
- const f = qe(h, m);
2075
- c({
2076
- data: f
2077
- }), l(m), i({
2078
- type: Ht,
2079
- payload: { searchString: m }
2154
+ if (!t)
2155
+ return [];
2156
+ try {
2157
+ const r = await z({
2158
+ accessToken: o,
2159
+ type: D.GET_CHATS,
2160
+ params: {
2161
+ userId: t,
2162
+ searchString: e,
2163
+ limit: 1
2164
+ }
2080
2165
  });
2081
- }, y = (m) => {
2082
- p(m.target.value);
2083
- }, u = async (m) => {
2084
- m.preventDefault();
2085
- };
2086
- return q(() => {
2087
- const m = qe(
2088
- t,
2089
- s.searchString
2090
- );
2091
- c({
2092
- data: m
2166
+ if (r.status === 200)
2167
+ return r.data;
2168
+ } catch {
2169
+ return [];
2170
+ }
2171
+ return [];
2172
+ }, Jn = ({ onOpenChange: e }) => {
2173
+ const { isAuthenticated: t, getAccessToken: o, user: r } = W(), a = Z(null), s = Z(!1), { dispatch: i } = P(se), { state: l, dispatch: h } = P(et), [, d] = le({
2174
+ key: ie + qt,
2175
+ initialValue: l.searchString
2176
+ }), [c, p] = x({
2177
+ data: []
2178
+ }), v = async (b) => {
2179
+ const g = await o(), k = await Qe({
2180
+ searchString: b,
2181
+ username: r == null ? void 0 : r.username,
2182
+ accessToken: g
2183
+ });
2184
+ p({
2185
+ data: k
2186
+ }), d(b), h({
2187
+ type: Zt,
2188
+ payload: { searchString: b }
2093
2189
  });
2094
- }, [t, s.searchString]), o ? d && d.data && /* @__PURE__ */ v(A, { children: [
2095
- /* @__PURE__ */ r("form", { autoComplete: "off", onSubmit: u, children: /* @__PURE__ */ r(
2190
+ }, u = Qt((b) => {
2191
+ v(b.target.value);
2192
+ }, 500), m = async (b) => {
2193
+ b.preventDefault();
2194
+ };
2195
+ return K(() => {
2196
+ s.current || (async () => {
2197
+ s.current = !0;
2198
+ const b = await o(), g = await Qe({
2199
+ searchString: l.searchString,
2200
+ username: r == null ? void 0 : r.username,
2201
+ accessToken: b
2202
+ });
2203
+ p({
2204
+ data: g
2205
+ });
2206
+ })();
2207
+ }), t ? c && c.data && /* @__PURE__ */ y(S, { children: [
2208
+ /* @__PURE__ */ n("form", { autoComplete: "off", onSubmit: m, children: /* @__PURE__ */ n(
2096
2209
  _e,
2097
2210
  {
2098
2211
  autoComplete: "off",
2099
2212
  autoCorrect: "off",
2100
- ref: n,
2101
- defaultValue: s.searchString,
2213
+ ref: a,
2214
+ defaultValue: l.searchString,
2102
2215
  focusMode: "light",
2103
2216
  name: "Search",
2104
2217
  label: "Search",
2105
- onChange: y,
2218
+ onChange: u,
2106
2219
  spacing: { t: 2, b: 2 },
2107
- ...s.searchString && {
2108
- rightElement: /* @__PURE__ */ r(
2220
+ ...l.searchString && {
2221
+ rightElement: /* @__PURE__ */ n(
2109
2222
  G,
2110
2223
  {
2111
- disabled: !s.searchString,
2224
+ disabled: !l.searchString,
2112
2225
  mode: "dark",
2113
2226
  noBorder: !0,
2114
2227
  size: "small",
2115
2228
  onClick: () => {
2116
- var m;
2117
- p(""), (m = n.current) != null && m.value && (n.current.value = "", n.current.focus());
2229
+ var b;
2230
+ v(""), (b = a.current) != null && b.value && (a.current.value = "", a.current.focus());
2118
2231
  },
2119
2232
  children: "Reset"
2120
2233
  }
@@ -2122,21 +2235,20 @@ const Zr = ({
2122
2235
  }
2123
2236
  }
2124
2237
  ) }),
2125
- /* @__PURE__ */ r("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ r(
2126
- Xr,
2238
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ n(
2239
+ Xn,
2127
2240
  {
2128
- filteredHistory: d,
2129
- setFilteredHistory: c,
2130
- dispatch: a,
2241
+ filteredHistory: c,
2242
+ setFilteredHistory: p,
2243
+ dispatch: i,
2131
2244
  onOpenChange: e
2132
2245
  }
2133
2246
  ) })
2134
2247
  ] }) : null;
2135
- }, Jr = ({
2248
+ }, er = ({
2136
2249
  open: e,
2137
- onOpenChange: t,
2138
- historyData: o
2139
- }) => /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Ft, children: /* @__PURE__ */ r(Zr, { onOpenChange: t, historyData: o }) });
2250
+ onOpenChange: t
2251
+ }) => /* @__PURE__ */ n(Y, { open: e, onOpenChange: t, title: Xt, children: /* @__PURE__ */ n(Jn, { onOpenChange: t }) });
2140
2252
  /*!
2141
2253
  @versini/ui-toggle v1.4.0
2142
2254
  © 2024 gizmette.com
@@ -2150,7 +2262,7 @@ try {
2150
2262
  });
2151
2263
  } catch {
2152
2264
  }
2153
- const Qr = "av-toggle";
2265
+ const tr = "av-toggle";
2154
2266
  /*!
2155
2267
  @versini/ui-spacing v1.1.0
2156
2268
  © 2024 gizmette.com
@@ -2164,7 +2276,7 @@ try {
2164
2276
  });
2165
2277
  } catch {
2166
2278
  }
2167
- const en = (e) => {
2279
+ const or = (e) => {
2168
2280
  let t = "";
2169
2281
  if (typeof e == "number" || typeof e == "string")
2170
2282
  t = "m-" + e;
@@ -2173,7 +2285,7 @@ const en = (e) => {
2173
2285
  (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
2174
2286
  }
2175
2287
  return t;
2176
- }, tn = () => C("peer", "h-6", "w-11", "rounded-full"), on = ({
2288
+ }, nr = () => C("peer", "h-6", "w-11", "rounded-full"), rr = ({
2177
2289
  focusMode: e
2178
2290
  }) => C(
2179
2291
  "peer-focus:outline",
@@ -2185,14 +2297,14 @@ const en = (e) => {
2185
2297
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
2186
2298
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
2187
2299
  }
2188
- ), rn = () => C(
2300
+ ), ar = () => C(
2189
2301
  "peer-checked:after:translate-x-full",
2190
2302
  // background color when checked
2191
2303
  "peer-checked:bg-violet-500",
2192
2304
  // knob circle and border color when checked
2193
2305
  "peer-checked:after:bg-white",
2194
2306
  "peer-checked:after:border-white"
2195
- ), nn = () => C(
2307
+ ), sr = () => C(
2196
2308
  "after:left-[2px]",
2197
2309
  "after:top-[2px]",
2198
2310
  "after:border",
@@ -2204,7 +2316,7 @@ const en = (e) => {
2204
2316
  "after:rounded-full",
2205
2317
  "after:transition-all",
2206
2318
  "after:content-['']"
2207
- ), an = ({
2319
+ ), ir = ({
2208
2320
  mode: e,
2209
2321
  noBorder: t
2210
2322
  }) => C({
@@ -2213,7 +2325,7 @@ const en = (e) => {
2213
2325
  "border-border-light bg-surface-darker": e === "dark",
2214
2326
  "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
2215
2327
  "border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
2216
- }), sn = ({
2328
+ }), lr = ({
2217
2329
  mode: e,
2218
2330
  labelHidden: t
2219
2331
  }) => t ? "sr-only" : C("ml-2 text-sm", {
@@ -2221,49 +2333,49 @@ const en = (e) => {
2221
2333
  "text-copy-lighter": e === "dark",
2222
2334
  "text-copy-lighter dark:text-copy-dark": e === "alt-system",
2223
2335
  "text-copy-dark dark:text-copy-lighter": e === "system"
2224
- }), ln = ({ spacing: e }) => C(
2225
- Qr,
2336
+ }), cr = ({ spacing: e }) => C(
2337
+ tr,
2226
2338
  "relative flex cursor-pointer items-center",
2227
- en(e)
2228
- ), cn = ({
2339
+ or(e)
2340
+ ), dr = ({
2229
2341
  mode: e,
2230
2342
  focusMode: t,
2231
2343
  labelHidden: o,
2232
- spacing: n,
2344
+ spacing: r,
2233
2345
  noBorder: a
2234
2346
  }) => ({
2235
2347
  toggle: C(
2236
- tn(),
2237
- an({ mode: e, noBorder: a }),
2238
- on({ focusMode: t }),
2239
- nn(),
2240
- rn()
2348
+ nr(),
2349
+ ir({ mode: e, noBorder: a }),
2350
+ rr({ focusMode: t }),
2351
+ sr(),
2352
+ ar()
2241
2353
  ),
2242
- label: sn({ mode: e, labelHidden: o }),
2354
+ label: lr({ mode: e, labelHidden: o }),
2243
2355
  input: "peer sr-only",
2244
- wrapper: ln({ spacing: n })
2245
- }), se = ({
2356
+ wrapper: cr({ spacing: r })
2357
+ }), oe = ({
2246
2358
  checked: e = !1,
2247
2359
  onChange: t,
2248
2360
  label: o,
2249
- labelHidden: n = !1,
2361
+ labelHidden: r = !1,
2250
2362
  name: a,
2251
2363
  mode: s = "system",
2252
2364
  focusMode: i = "system",
2253
2365
  spacing: l,
2254
2366
  noBorder: h = !1
2255
2367
  }) => {
2256
- const d = cn({
2368
+ const d = dr({
2257
2369
  mode: s,
2258
2370
  focusMode: i,
2259
- labelHidden: n,
2371
+ labelHidden: r,
2260
2372
  spacing: l,
2261
2373
  noBorder: h
2262
2374
  }), c = (p) => {
2263
2375
  t == null || t(p.target.checked);
2264
2376
  };
2265
- return /* @__PURE__ */ v("label", { className: d.wrapper, children: [
2266
- /* @__PURE__ */ r(
2377
+ return /* @__PURE__ */ y("label", { className: d.wrapper, children: [
2378
+ /* @__PURE__ */ n(
2267
2379
  "input",
2268
2380
  {
2269
2381
  name: a,
@@ -2273,28 +2385,28 @@ const en = (e) => {
2273
2385
  onChange: c
2274
2386
  }
2275
2387
  ),
2276
- /* @__PURE__ */ r("div", { className: d.toggle }),
2277
- /* @__PURE__ */ r("span", { className: d.label, children: o })
2388
+ /* @__PURE__ */ n("div", { className: d.toggle }),
2389
+ /* @__PURE__ */ n("span", { className: d.label, children: o })
2278
2390
  ] });
2279
- }, dn = ({
2391
+ }, ur = ({
2280
2392
  open: e,
2281
2393
  onOpenChange: t
2282
2394
  }) => {
2283
- const { dispatch: o } = B(ue), { getAccessToken: n, user: a } = X(), [s, i] = x({
2395
+ const { dispatch: o } = P(se), { getAccessToken: r, user: a } = W(), [s, i] = x({
2284
2396
  loaded: !1,
2285
2397
  instructions: "",
2286
2398
  loadingLocation: !1,
2287
2399
  location: "",
2288
- engine: ae
2289
- }), [l, h] = he({
2290
- key: me + et,
2400
+ engine: te
2401
+ }), [l, h] = le({
2402
+ key: ie + ot,
2291
2403
  initialValue: !1
2292
2404
  }), d = async (u) => {
2293
2405
  u.preventDefault();
2294
2406
  try {
2295
- await D({
2296
- accessToken: await n(),
2297
- type: H.SET_USER_PREFERENCES,
2407
+ await z({
2408
+ accessToken: await r(),
2409
+ type: D.SET_USER_PREFERENCES,
2298
2410
  params: {
2299
2411
  user: a == null ? void 0 : a.username,
2300
2412
  instructions: s.instructions,
@@ -2302,7 +2414,7 @@ const en = (e) => {
2302
2414
  engine: s.engine
2303
2415
  }
2304
2416
  }), o({
2305
- type: tt,
2417
+ type: nt,
2306
2418
  payload: {
2307
2419
  engine: s.engine
2308
2420
  }
@@ -2316,20 +2428,20 @@ const en = (e) => {
2316
2428
  loadingLocation: !0
2317
2429
  }));
2318
2430
  try {
2319
- const u = Date.now(), m = await Ut(), f = await D({
2320
- accessToken: await n(),
2321
- type: H.GET_LOCATION,
2431
+ const u = Date.now(), m = await eo(), b = await z({
2432
+ accessToken: await r(),
2433
+ type: D.GET_LOCATION,
2322
2434
  params: {
2323
2435
  latitude: m.latitude,
2324
2436
  longitude: m.longitude
2325
2437
  }
2326
2438
  }), k = Date.now() - u;
2327
- if (k < 2e3 && await new Promise((w) => setTimeout(w, 2e3 - k)), f.status === 200) {
2328
- const { city: w, state: T, country: E, displayName: M } = f.data, S = w && T && E ? `${w}, ${T}, ${E}` : M;
2329
- i((z) => ({
2330
- ...z,
2439
+ if (k < 2e3 && await new Promise((w) => setTimeout(w, 2e3 - k)), b.status === 200) {
2440
+ const { city: w, state: T, country: E, displayName: R } = b.data, $ = w && T && E ? `${w}, ${T}, ${E}` : R;
2441
+ i((O) => ({
2442
+ ...O,
2331
2443
  loaded: !0,
2332
- location: S,
2444
+ location: $,
2333
2445
  loadingLocation: !1
2334
2446
  }));
2335
2447
  } else
@@ -2344,30 +2456,30 @@ const en = (e) => {
2344
2456
  }, p = (u) => {
2345
2457
  i((m) => ({
2346
2458
  ...m,
2347
- engine: u ? Ne : fe
2459
+ engine: u ? Ne : me
2348
2460
  }));
2349
- }, y = (u) => {
2461
+ }, v = (u) => {
2350
2462
  i((m) => ({
2351
2463
  ...m,
2352
- engine: u ? fe : Ne
2464
+ engine: u ? me : Ne
2353
2465
  }));
2354
2466
  };
2355
- return q(() => {
2467
+ return K(() => {
2356
2468
  if (!e || !a) {
2357
2469
  i({
2358
2470
  loaded: !1,
2359
2471
  loadingLocation: !1,
2360
2472
  instructions: "",
2361
2473
  location: "",
2362
- engine: ae
2474
+ engine: te
2363
2475
  });
2364
2476
  return;
2365
2477
  }
2366
2478
  (async () => {
2367
2479
  try {
2368
- const u = await D({
2369
- accessToken: await n(),
2370
- type: H.GET_USER_PREFERENCES,
2480
+ const u = await z({
2481
+ accessToken: await r(),
2482
+ type: D.GET_USER_PREFERENCES,
2371
2483
  params: {
2372
2484
  user: a.username
2373
2485
  }
@@ -2377,25 +2489,25 @@ const en = (e) => {
2377
2489
  loaded: !0,
2378
2490
  instructions: u.data.instructions || "",
2379
2491
  location: u.data.location || "",
2380
- engine: u.data.engine || ae
2492
+ engine: u.data.engine || te
2381
2493
  }));
2382
2494
  } catch {
2383
2495
  }
2384
2496
  })();
2385
- }, [a, e]), /* @__PURE__ */ r(A, { children: s.loaded && /* @__PURE__ */ r(
2386
- Z,
2497
+ }, [a, e]), /* @__PURE__ */ n(S, { children: s.loaded && /* @__PURE__ */ n(
2498
+ Y,
2387
2499
  {
2388
2500
  open: e,
2389
2501
  onOpenChange: t,
2390
2502
  title: "Engine Fine Tuning",
2391
- footer: /* @__PURE__ */ v(
2392
- Q,
2503
+ footer: /* @__PURE__ */ y(
2504
+ q,
2393
2505
  {
2394
2506
  columnGap: 2,
2395
2507
  alignHorizontal: "flex-end",
2396
2508
  className: "pb-8 sm:pb-0",
2397
2509
  children: [
2398
- /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
2510
+ /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
2399
2511
  G,
2400
2512
  {
2401
2513
  mode: "dark",
@@ -2407,7 +2519,7 @@ const en = (e) => {
2407
2519
  children: "Cancel"
2408
2520
  }
2409
2521
  ) }),
2410
- /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
2522
+ /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
2411
2523
  G,
2412
2524
  {
2413
2525
  mode: "dark",
@@ -2422,16 +2534,16 @@ const en = (e) => {
2422
2534
  ]
2423
2535
  }
2424
2536
  ),
2425
- children: /* @__PURE__ */ v(A, { children: [
2426
- /* @__PURE__ */ v(
2427
- $,
2537
+ children: /* @__PURE__ */ y(S, { children: [
2538
+ /* @__PURE__ */ y(
2539
+ M,
2428
2540
  {
2429
2541
  header: "AI Engine",
2430
2542
  className: "prose-dark dark:prose-lighter",
2431
2543
  children: [
2432
- /* @__PURE__ */ r("p", { children: "Select the AI engine that will be used to generate responses." }),
2433
- /* @__PURE__ */ r(
2434
- se,
2544
+ /* @__PURE__ */ n("p", { children: "Select the AI engine that will be used to generate responses." }),
2545
+ /* @__PURE__ */ n(
2546
+ oe,
2435
2547
  {
2436
2548
  noBorder: !0,
2437
2549
  label: "OpenAI",
@@ -2440,20 +2552,20 @@ const en = (e) => {
2440
2552
  checked: s.engine === Ne
2441
2553
  }
2442
2554
  ),
2443
- /* @__PURE__ */ r(
2444
- se,
2555
+ /* @__PURE__ */ n(
2556
+ oe,
2445
2557
  {
2446
2558
  spacing: { t: 2 },
2447
2559
  noBorder: !0,
2448
2560
  label: "Anthropic",
2449
2561
  name: "Anthropic",
2450
- onChange: y,
2451
- checked: s.engine === fe
2562
+ onChange: v,
2563
+ checked: s.engine === me
2452
2564
  }
2453
2565
  ),
2454
- /* @__PURE__ */ r("p", { className: "text-xs", children: "NOTE: Anthropic is currently in beta and may not be as accurate as OpenAI." }),
2455
- /* @__PURE__ */ r(
2456
- se,
2566
+ /* @__PURE__ */ n("p", { className: "text-xs", children: "NOTE: Anthropic is currently in beta and may not be as accurate as OpenAI." }),
2567
+ /* @__PURE__ */ n(
2568
+ oe,
2457
2569
  {
2458
2570
  spacing: { t: 2 },
2459
2571
  noBorder: !0,
@@ -2463,24 +2575,24 @@ const en = (e) => {
2463
2575
  checked: l
2464
2576
  }
2465
2577
  ),
2466
- /* @__PURE__ */ r("p", { className: "text-xs", children: "This option introduces a new menu on the left side of the screen, enabling you to quickly switch between engines." })
2578
+ /* @__PURE__ */ n("p", { className: "text-xs", children: "This option introduces a new menu on the left side of the screen, enabling you to quickly switch between engines." })
2467
2579
  ]
2468
2580
  }
2469
2581
  ),
2470
- /* @__PURE__ */ v(
2471
- $,
2582
+ /* @__PURE__ */ y(
2583
+ M,
2472
2584
  {
2473
2585
  spacing: { t: 4 },
2474
2586
  header: "Custom Instructions",
2475
2587
  className: "prose-dark dark:prose-lighter",
2476
2588
  children: [
2477
- /* @__PURE__ */ v("p", { children: [
2589
+ /* @__PURE__ */ y("p", { children: [
2478
2590
  "What would you like ",
2479
- /* @__PURE__ */ r("em", { children: Gt }),
2591
+ /* @__PURE__ */ n("em", { children: Jt }),
2480
2592
  " to know about you to provide better responses?"
2481
2593
  ] }),
2482
- /* @__PURE__ */ r(
2483
- De,
2594
+ /* @__PURE__ */ n(
2595
+ Ge,
2484
2596
  {
2485
2597
  mode: "alt-system",
2486
2598
  autoCapitalize: "off",
@@ -2502,16 +2614,16 @@ const en = (e) => {
2502
2614
  ]
2503
2615
  }
2504
2616
  ),
2505
- /* @__PURE__ */ v(
2506
- $,
2617
+ /* @__PURE__ */ y(
2618
+ M,
2507
2619
  {
2508
2620
  header: "Location",
2509
2621
  className: "prose-dark dark:prose-lighter",
2510
2622
  spacing: { t: 4 },
2511
2623
  children: [
2512
- /* @__PURE__ */ r("p", { children: "You can share your location to receive customized responses based on your area." }),
2513
- /* @__PURE__ */ r(
2514
- De,
2624
+ /* @__PURE__ */ n("p", { children: "You can share your location to receive customized responses based on your area." }),
2625
+ /* @__PURE__ */ n(
2626
+ Ge,
2515
2627
  {
2516
2628
  mode: "alt-system",
2517
2629
  name: "location",
@@ -2527,7 +2639,7 @@ const en = (e) => {
2527
2639
  helperText: "Enter your location or press auto-detect."
2528
2640
  }
2529
2641
  ),
2530
- /* @__PURE__ */ r(
2642
+ /* @__PURE__ */ n(
2531
2643
  G,
2532
2644
  {
2533
2645
  spacing: { t: 2 },
@@ -2544,45 +2656,45 @@ const en = (e) => {
2544
2656
  ] })
2545
2657
  }
2546
2658
  ) });
2547
- }, un = ({
2659
+ }, mr = ({
2548
2660
  open: e,
2549
2661
  onOpenChange: t
2550
2662
  }) => {
2551
- const { state: o, dispatch: n } = B(jt), { getAccessToken: a, user: s } = X(), [i, l] = x({
2663
+ const { state: o, dispatch: r } = P(to), { getAccessToken: a, user: s } = W(), [i, l] = x({
2552
2664
  tags: [...o.tags]
2553
2665
  }), h = ({
2554
2666
  slot: c,
2555
2667
  checked: p,
2556
- label: y,
2668
+ label: v,
2557
2669
  content: u
2558
2670
  }) => {
2559
2671
  l((m) => {
2560
- const f = m.tags, g = {
2672
+ const b = m.tags, g = {
2561
2673
  slot: c,
2562
- label: y,
2674
+ label: v,
2563
2675
  content: u,
2564
2676
  enabled: p
2565
- }, k = f.findIndex((w) => w.slot === c);
2677
+ }, k = b.findIndex((w) => w.slot === c);
2566
2678
  return k === -1 ? {
2567
2679
  ...m,
2568
- tags: [...f, { ...g, slot: c }]
2569
- } : (f[k] = g, {
2680
+ tags: [...b, { ...g, slot: c }]
2681
+ } : (b[k] = g, {
2570
2682
  ...m,
2571
- tags: [...f]
2683
+ tags: [...b]
2572
2684
  });
2573
2685
  });
2574
2686
  }, d = async (c) => {
2575
2687
  c.preventDefault();
2576
2688
  try {
2577
- await D({
2689
+ await z({
2578
2690
  accessToken: await a(),
2579
- type: H.SET_USER_PREFERENCES,
2691
+ type: D.SET_USER_PREFERENCES,
2580
2692
  params: {
2581
2693
  user: s == null ? void 0 : s.username,
2582
2694
  tags: i.tags
2583
2695
  }
2584
- }), n({
2585
- type: Wt,
2696
+ }), r({
2697
+ type: no,
2586
2698
  payload: {
2587
2699
  tags: i.tags
2588
2700
  }
@@ -2590,20 +2702,20 @@ const en = (e) => {
2590
2702
  } catch {
2591
2703
  }
2592
2704
  };
2593
- return /* @__PURE__ */ v(
2594
- Z,
2705
+ return /* @__PURE__ */ y(
2706
+ Y,
2595
2707
  {
2596
2708
  open: e,
2597
2709
  onOpenChange: t,
2598
2710
  title: "Tags",
2599
- footer: /* @__PURE__ */ v(
2600
- Q,
2711
+ footer: /* @__PURE__ */ y(
2712
+ q,
2601
2713
  {
2602
2714
  columnGap: 2,
2603
2715
  alignHorizontal: "flex-end",
2604
2716
  className: "pb-8 sm:pb-0",
2605
2717
  children: [
2606
- /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
2718
+ /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
2607
2719
  G,
2608
2720
  {
2609
2721
  mode: "dark",
@@ -2615,7 +2727,7 @@ const en = (e) => {
2615
2727
  children: "Cancel"
2616
2728
  }
2617
2729
  ) }),
2618
- /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
2730
+ /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
2619
2731
  G,
2620
2732
  {
2621
2733
  mode: "dark",
@@ -2631,16 +2743,16 @@ const en = (e) => {
2631
2743
  }
2632
2744
  ),
2633
2745
  children: [
2634
- /* @__PURE__ */ r("p", { children: Kt }),
2635
- i.tags && i.tags.map((c) => /* @__PURE__ */ v(
2636
- $,
2746
+ /* @__PURE__ */ n("p", { children: oo }),
2747
+ i.tags && i.tags.map((c) => /* @__PURE__ */ y(
2748
+ M,
2637
2749
  {
2638
2750
  header: `Tag ${c.slot + 1}`,
2639
2751
  className: "prose-dark dark:prose-lighter",
2640
2752
  spacing: { b: 2 },
2641
2753
  children: [
2642
- /* @__PURE__ */ v(Q, { spacing: { t: 8, b: 6 }, columnGap: 2, rowGap: 6, children: [
2643
- /* @__PURE__ */ r(L, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
2754
+ /* @__PURE__ */ y(q, { spacing: { t: 8, b: 6 }, columnGap: 2, rowGap: 6, children: [
2755
+ /* @__PURE__ */ n(A, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ n(
2644
2756
  _e,
2645
2757
  {
2646
2758
  label: "Label",
@@ -2656,7 +2768,7 @@ const en = (e) => {
2656
2768
  }
2657
2769
  }
2658
2770
  ) }),
2659
- /* @__PURE__ */ r(L, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
2771
+ /* @__PURE__ */ n(A, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ n(
2660
2772
  _e,
2661
2773
  {
2662
2774
  label: "Content",
@@ -2673,8 +2785,8 @@ const en = (e) => {
2673
2785
  }
2674
2786
  ) })
2675
2787
  ] }),
2676
- /* @__PURE__ */ r(
2677
- se,
2788
+ /* @__PURE__ */ n(
2789
+ oe,
2678
2790
  {
2679
2791
  spacing: { t: 2 },
2680
2792
  noBorder: !0,
@@ -2698,264 +2810,223 @@ const en = (e) => {
2698
2810
  ]
2699
2811
  }
2700
2812
  );
2701
- }, mn = () => {
2702
- const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType: n } = X(), [a, s] = he({
2703
- key: me + Yt,
2813
+ }, hr = () => {
2814
+ const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType: r } = W(), [a, s] = le({
2815
+ key: ie + ro,
2704
2816
  initialValue: !1
2705
- }), [i, l] = x(!1), [h, d] = x(!1), c = ce(), p = (t == null ? void 0 : t.username) || "", y = (f) => {
2706
- s(f);
2817
+ }), [i, l] = x(!1), [h, d] = x(!1), c = re(), p = (t == null ? void 0 : t.username) || "", v = (b) => {
2818
+ s(b);
2707
2819
  }, u = () => {
2708
2820
  l(!i);
2709
2821
  }, m = () => {
2710
2822
  d(!h);
2711
2823
  };
2712
- return e && p ? /* @__PURE__ */ v(A, { children: [
2713
- i && /* @__PURE__ */ r(
2714
- dn,
2824
+ return e && p ? /* @__PURE__ */ y(S, { children: [
2825
+ i && /* @__PURE__ */ n(
2826
+ ur,
2715
2827
  {
2716
2828
  open: i,
2717
2829
  onOpenChange: l
2718
2830
  }
2719
2831
  ),
2720
- h && /* @__PURE__ */ r(un, { open: h, onOpenChange: d }),
2721
- /* @__PURE__ */ v(
2722
- $,
2832
+ h && /* @__PURE__ */ n(mr, { open: h, onOpenChange: d }),
2833
+ /* @__PURE__ */ y(
2834
+ M,
2723
2835
  {
2724
- header: N.PREFERENCES.TITLE,
2836
+ header: I.PREFERENCES.TITLE,
2725
2837
  className: "prose-dark dark:prose-lighter",
2726
2838
  children: [
2727
- ie(c, {
2728
- [N.PREFERENCES.NAME]: p,
2729
- [N.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
2730
- [N.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ r(
2731
- se,
2839
+ ne(c, {
2840
+ [I.PREFERENCES.NAME]: p,
2841
+ [I.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
2842
+ [I.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ n(
2843
+ oe,
2732
2844
  {
2733
2845
  noBorder: !0,
2734
2846
  labelHidden: !0,
2735
- label: N.PREFERENCES.ENGINE_DETAILS,
2736
- name: N.PREFERENCES.ENGINE_DETAILS,
2737
- onChange: y,
2847
+ label: I.PREFERENCES.ENGINE_DETAILS,
2848
+ name: I.PREFERENCES.ENGINE_DETAILS,
2849
+ onChange: v,
2738
2850
  checked: a
2739
2851
  }
2740
2852
  )
2741
2853
  }),
2742
- /* @__PURE__ */ r(
2743
- W,
2854
+ /* @__PURE__ */ n(
2855
+ U,
2744
2856
  {
2745
2857
  spacing: { t: 2 },
2746
2858
  size: "small",
2747
2859
  onClick: u,
2748
2860
  labelLeft: "Engine Fine Tuning",
2749
- children: /* @__PURE__ */ r(He, { className: "size-3", monotone: !0 })
2861
+ children: /* @__PURE__ */ n(He, { className: "size-3", monotone: !0 })
2750
2862
  }
2751
2863
  ),
2752
- /* @__PURE__ */ r(
2753
- W,
2864
+ /* @__PURE__ */ n(
2865
+ U,
2754
2866
  {
2755
2867
  spacing: { t: 2, l: 2 },
2756
2868
  size: "small",
2757
2869
  onClick: m,
2758
2870
  labelLeft: "Tags",
2759
- children: /* @__PURE__ */ r(He, { className: "size-3", monotone: !0 })
2871
+ children: /* @__PURE__ */ n(He, { className: "size-3", monotone: !0 })
2760
2872
  }
2761
2873
  )
2762
2874
  ]
2763
2875
  }
2764
2876
  ),
2765
- n !== qt.PASSKEY && /* @__PURE__ */ v(
2766
- $,
2877
+ r !== ao.PASSKEY && /* @__PURE__ */ y(
2878
+ M,
2767
2879
  {
2768
2880
  spacing: { t: 4 },
2769
2881
  className: "prose-dark dark:prose-lighter",
2770
- header: /* @__PURE__ */ r("h2", { className: "m-0", children: /* @__PURE__ */ v(Q, { columnGap: 3, alignVertical: "center", children: [
2771
- /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(ze, { className: "size-8" }) }),
2772
- /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r("div", { children: N.PREFERENCES.PASSKEY_TITLE }) })
2882
+ header: /* @__PURE__ */ n("h2", { className: "m-0", children: /* @__PURE__ */ y(q, { columnGap: 3, alignVertical: "center", children: [
2883
+ /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(De, { className: "size-8" }) }),
2884
+ /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n("div", { children: I.PREFERENCES.PASSKEY_TITLE }) })
2773
2885
  ] }) }),
2774
2886
  children: [
2775
- /* @__PURE__ */ r("p", { children: N.PREFERENCES.PASSKEY_INSTRUCTIONS }),
2776
- /* @__PURE__ */ r(
2777
- W,
2887
+ /* @__PURE__ */ n("p", { children: I.PREFERENCES.PASSKEY_INSTRUCTIONS }),
2888
+ /* @__PURE__ */ n(
2889
+ U,
2778
2890
  {
2779
2891
  size: "small",
2780
2892
  spacing: { t: 2 },
2781
2893
  onClick: o,
2782
- labelLeft: N.PREFERENCES.PASSKEY_BUTTON,
2783
- children: /* @__PURE__ */ r(ze, { className: "size-5", monotone: !0 })
2894
+ labelLeft: I.PREFERENCES.PASSKEY_BUTTON,
2895
+ children: /* @__PURE__ */ n(De, { className: "size-5", monotone: !0 })
2784
2896
  }
2785
2897
  )
2786
2898
  ]
2787
2899
  }
2788
2900
  )
2789
2901
  ] }) : null;
2790
- }, hn = ({
2902
+ }, pr = ({
2791
2903
  open: e,
2792
2904
  onOpenChange: t
2793
- }) => /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Xt, children: /* @__PURE__ */ r(mn, {}) }), Cn = () => {
2794
- const { state: e, dispatch: t, serverStats: o } = B(ue), [n, a] = x((e == null ? void 0 : e.engine) || ae), [s, i] = x(!1), [l, h] = x(!1), [d, c] = x(!1), [p, y] = x(!1), [u, m] = x([]), [f, g] = x(!1), [k, w] = x({
2795
- done: !1,
2796
- progress: !1,
2797
- timestamp: Date.now()
2798
- }), [T] = he({
2799
- key: me + et,
2905
+ }) => /* @__PURE__ */ n(Y, { open: e, onOpenChange: t, title: so, children: /* @__PURE__ */ n(hr, {}) }), wr = () => {
2906
+ const { state: e, dispatch: t, serverStats: o } = P(se), [r, a] = x((e == null ? void 0 : e.engine) || te), [s, i] = x(!1), [l, h] = x(!1), [d, c] = x(!1), [p, v] = x(!1), [u, m] = x(!1), [b] = le({
2907
+ key: ie + ot,
2800
2908
  initialValue: !1
2801
- }), { logout: E, getAccessToken: M, user: S } = X(), z = () => {
2909
+ }), { logout: g, getAccessToken: k, user: w } = W(), T = () => {
2802
2910
  i(!s);
2803
- }, I = () => {
2911
+ }, E = () => {
2804
2912
  h(!l);
2805
- }, te = () => {
2913
+ }, R = () => {
2806
2914
  c(!d);
2807
- }, J = () => {
2808
- y(!p);
2809
- }, U = async (P) => {
2810
- const j = Date.now();
2811
- if (P && !(!S || !e || k.progress || k.done === !0 && j - k.timestamp < 5e3)) {
2812
- w({
2813
- done: !0,
2814
- progress: !0,
2815
- timestamp: j
2816
- });
2817
- try {
2818
- const R = await D({
2819
- accessToken: await M(),
2820
- type: H.GET_CHATS,
2821
- params: {
2822
- userId: S.username
2823
- }
2824
- });
2825
- R.status === 200 && (m(R.data), w({
2826
- done: !0,
2827
- progress: !1,
2828
- timestamp: Date.now()
2829
- }));
2830
- } catch {
2831
- w({
2832
- done: !0,
2833
- progress: !1,
2834
- timestamp: Date.now()
2835
- });
2836
- }
2837
- }
2838
- }, oe = () => {
2839
- g(!f);
2915
+ }, $ = () => {
2916
+ v(!p);
2917
+ }, O = () => {
2918
+ m(!u);
2840
2919
  };
2841
- return q(() => {
2842
- e && e.engine && e.engine !== n && a(e.engine);
2843
- }, [e, n]), /* @__PURE__ */ v(A, { children: [
2844
- /* @__PURE__ */ r(
2845
- Et,
2920
+ return K(() => {
2921
+ e && e.engine && e.engine !== r && a(e.engine);
2922
+ }, [e, r]), /* @__PURE__ */ y(S, { children: [
2923
+ /* @__PURE__ */ n(
2924
+ Ot,
2846
2925
  {
2847
- showConfirmation: f,
2848
- setShowConfirmation: g,
2849
- action: E,
2926
+ showConfirmation: u,
2927
+ setShowConfirmation: m,
2928
+ action: g,
2850
2929
  customStrings: {
2851
- confirmAction: Oe,
2930
+ confirmAction: Fe,
2852
2931
  cancelAction: "Cancel",
2853
- title: Oe
2932
+ title: Fe
2854
2933
  },
2855
- children: /* @__PURE__ */ r("p", { children: "Are you sure you want to log out?" })
2856
- }
2857
- ),
2858
- /* @__PURE__ */ r(hn, { open: s, onOpenChange: i }),
2859
- /* @__PURE__ */ r(Yr, { open: l, onOpenChange: h }),
2860
- /* @__PURE__ */ r(
2861
- Jr,
2862
- {
2863
- open: d,
2864
- onOpenChange: c,
2865
- historyData: u
2934
+ children: /* @__PURE__ */ n("p", { children: "Are you sure you want to log out?" })
2866
2935
  }
2867
2936
  ),
2868
- /* @__PURE__ */ r(Ur, { open: p, onOpenChange: y }),
2869
- /* @__PURE__ */ v("div", { className: "relative", children: [
2870
- T && o && /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] left-[-7px]", children: /* @__PURE__ */ r(
2937
+ /* @__PURE__ */ n(pr, { open: s, onOpenChange: i }),
2938
+ /* @__PURE__ */ n(Zn, { open: l, onOpenChange: h }),
2939
+ /* @__PURE__ */ n(er, { open: d, onOpenChange: c }),
2940
+ /* @__PURE__ */ n(Kn, { open: p, onOpenChange: v }),
2941
+ /* @__PURE__ */ y("div", { className: "relative", children: [
2942
+ b && o && /* @__PURE__ */ n("div", { className: "absolute bottom-[-28px] left-[-7px]", children: /* @__PURE__ */ n(
2871
2943
  xe,
2872
2944
  {
2873
2945
  mode: "dark",
2874
2946
  focusMode: "light",
2875
- trigger: /* @__PURE__ */ r(W, { children: e && e.engine === fe ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(it, {}) }),
2947
+ trigger: /* @__PURE__ */ n(U, { children: e && e.engine === me ? /* @__PURE__ */ n(pt, {}) : /* @__PURE__ */ n(gt, {}) }),
2876
2948
  defaultPlacement: "bottom-start",
2877
- children: /* @__PURE__ */ r(K, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ r(
2878
- Cr,
2949
+ children: /* @__PURE__ */ n(H, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ n(
2950
+ wn,
2879
2951
  {
2880
2952
  size: "small",
2881
2953
  mode: "dark",
2882
2954
  focusMode: "light",
2883
- value: n,
2884
- onValueChange: async (P) => {
2885
- if (P)
2955
+ value: r,
2956
+ onValueChange: async (N) => {
2957
+ if (N)
2886
2958
  try {
2887
- await D({
2888
- accessToken: await M(),
2889
- type: H.SET_USER_PREFERENCES,
2959
+ await z({
2960
+ accessToken: await k(),
2961
+ type: D.SET_USER_PREFERENCES,
2890
2962
  params: {
2891
- user: S == null ? void 0 : S.username,
2892
- engine: P
2963
+ user: w == null ? void 0 : w.username,
2964
+ engine: N
2893
2965
  }
2894
2966
  }), t({
2895
- type: tt,
2967
+ type: nt,
2896
2968
  payload: {
2897
- engine: P
2969
+ engine: N
2898
2970
  }
2899
2971
  }), t({
2900
- type: Qe
2972
+ type: tt
2901
2973
  });
2902
2974
  } catch {
2903
2975
  }
2904
2976
  },
2905
- children: o && o.engines.map((P) => /* @__PURE__ */ r(wr, { value: P }, P))
2977
+ children: o && o.engines.map((N) => /* @__PURE__ */ n(Nn, { value: N }, N))
2906
2978
  }
2907
2979
  ) })
2908
2980
  }
2909
2981
  ) }),
2910
- /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ v(
2982
+ /* @__PURE__ */ n("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ y(
2911
2983
  xe,
2912
2984
  {
2913
2985
  mode: "dark",
2914
2986
  focusMode: "light",
2915
- trigger: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(Ao, {}) }),
2987
+ trigger: /* @__PURE__ */ n(U, { children: /* @__PURE__ */ n(Ao, {}) }),
2916
2988
  defaultPlacement: "bottom-end",
2917
- onOpenChange: U,
2918
2989
  children: [
2919
- /* @__PURE__ */ r(
2920
- K,
2990
+ /* @__PURE__ */ n(
2991
+ H,
2921
2992
  {
2922
2993
  label: "Profile",
2923
- onClick: z,
2924
- icon: /* @__PURE__ */ r(So, {})
2994
+ onClick: T,
2995
+ icon: /* @__PURE__ */ n(So, {})
2925
2996
  }
2926
2997
  ),
2927
- /* @__PURE__ */ r(
2928
- K,
2998
+ /* @__PURE__ */ n(
2999
+ H,
2929
3000
  {
2930
- label: Ze,
2931
- onClick: I,
2932
- icon: /* @__PURE__ */ r(Io, {})
3001
+ label: Je,
3002
+ onClick: E,
3003
+ icon: /* @__PURE__ */ n(To, {})
2933
3004
  }
2934
3005
  ),
2935
- /* @__PURE__ */ r(
2936
- K,
3006
+ /* @__PURE__ */ n(
3007
+ H,
2937
3008
  {
2938
3009
  label: "History",
2939
- onClick: te,
2940
- icon: /* @__PURE__ */ r(Eo, {})
3010
+ onClick: R,
3011
+ icon: /* @__PURE__ */ n(Eo, {})
2941
3012
  }
2942
3013
  ),
2943
- /* @__PURE__ */ r(
2944
- K,
3014
+ /* @__PURE__ */ n(
3015
+ H,
2945
3016
  {
2946
3017
  label: "About",
2947
- onClick: J,
2948
- icon: /* @__PURE__ */ r(xo, {})
3018
+ onClick: $,
3019
+ icon: /* @__PURE__ */ n(xo, {})
2949
3020
  }
2950
3021
  ),
2951
- e && e.id && !e.isComponent && /* @__PURE__ */ v(A, { children: [
2952
- /* @__PURE__ */ r(Mo, {}),
2953
- /* @__PURE__ */ r(
2954
- K,
3022
+ e && e.id && !e.isComponent && /* @__PURE__ */ y(S, { children: [
3023
+ /* @__PURE__ */ n(Mo, {}),
3024
+ /* @__PURE__ */ n(
3025
+ H,
2955
3026
  {
2956
3027
  label: "Log out",
2957
- onClick: oe,
2958
- icon: /* @__PURE__ */ r("div", { className: "text-red-700", children: /* @__PURE__ */ r(To, { monotone: !0 }) })
3028
+ onClick: O,
3029
+ icon: /* @__PURE__ */ n("div", { className: "text-red-700", children: /* @__PURE__ */ n(Io, { monotone: !0 }) })
2959
3030
  }
2960
3031
  )
2961
3032
  ] })
@@ -2966,5 +3037,5 @@ const en = (e) => {
2966
3037
  ] });
2967
3038
  };
2968
3039
  export {
2969
- Cn as default
3040
+ wr as default
2970
3041
  };