@versini/sassysaint 5.3.8 → 5.3.9

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