@versini/sassysaint 5.4.6 → 5.4.7

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