@noxickon/onyx 0.0.2 → 0.0.3

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.
Files changed (28) hide show
  1. package/dist/chunks/{Button-CLMaoxRW.js → Button-BV4_pmoH.js} +513 -513
  2. package/dist/chunks/{Button-CZYAHivj.js → Button-CU-zvMVL.js} +1 -1
  3. package/dist/chunks/{Input-BQQT5eZ0.js → Input-BraK4lDE.js} +2 -2
  4. package/dist/chunks/{Input-DJZcvJdP.js → Input-C5dK8VSu.js} +1 -1
  5. package/dist/chunks/{index-XTQUUzZ1.js → index-DGjVEo0G.js} +1 -1
  6. package/dist/chunks/{index-1-zQ3RaM.js → index-Dgwp7JKP.js} +9 -9
  7. package/dist/chunks/{index-BgUMV1hv.js → index-DnVdNmco.js} +1 -1
  8. package/dist/chunks/{index-CjVXr8mh.js → index-rUH_mzKt.js} +1 -1
  9. package/dist/chunks/{jsx-runtime-C5mzlN2N.js → jsx-runtime--oOP9f8K.js} +15 -15
  10. package/dist/chunks/{jsx-runtime-DUiatUiq.js → jsx-runtime-CITbqOLs.js} +2 -2
  11. package/dist/chunks/{useAuth-CfKOZqhG.js → useAuth-BwjRd05B.js} +1 -1
  12. package/dist/chunks/{useAuth-C-TIgBfr.js → useAuth-CR3bAGqp.js} +3 -3
  13. package/dist/chunks/{useForm-BIKRbGHj.js → useForm-BAbY8X4X.js} +1 -1
  14. package/dist/chunks/{useForm-BZEaiRaa.js → useForm-cxgyAiOs.js} +1 -1
  15. package/dist/chunks/{useQuery-B_ce5e8f.js → useQuery--6GP2-dN.js} +1 -1
  16. package/dist/chunks/{useQuery-CJdYhuQu.js → useQuery-mFRa2XuW.js} +1 -1
  17. package/dist/context/context.cjs.js +1 -1
  18. package/dist/context/context.es.js +1 -1
  19. package/dist/hooks/hooks.cjs.js +1 -1
  20. package/dist/hooks/hooks.es.js +4 -4
  21. package/dist/index.d.ts +6 -10
  22. package/dist/layout/layout.cjs.js +1 -1
  23. package/dist/layout/layout.es.js +2 -2
  24. package/dist/onyx.cjs.js +1 -12
  25. package/dist/onyx.es.js +762 -2057
  26. package/dist/pages/pages.cjs.js +1 -1
  27. package/dist/pages/pages.es.js +5 -5
  28. package/package.json +1 -2
package/dist/onyx.es.js CHANGED
@@ -1,133 +1,132 @@
1
- import { j as i } from "./chunks/jsx-runtime-C5mzlN2N.js";
2
- import * as f from "react";
3
- import ee, { useState as z, useEffect as Y, useId as ue, useRef as ye, useCallback as Fe, createContext as We, useContext as Be } from "react";
4
- import { t as N, b as T, a as U, O as De } from "./chunks/Button-CLMaoxRW.js";
5
- import { c as Ce, d as je, b as Ne } from "./chunks/Input-BQQT5eZ0.js";
6
- import { O as Sn, a as Rn } from "./chunks/Input-BQQT5eZ0.js";
7
- import { createPortal as He } from "react-dom";
8
- import { M as ft } from "./chunks/constants-CDXq37n6.js";
9
- import { u as Ae } from "./chunks/useAuth-C-TIgBfr.js";
10
- import './index.css';const cn = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: N("flex items-center gap-3", t), children: e }), he = {
1
+ import { j as e } from "./chunks/jsx-runtime--oOP9f8K.js";
2
+ import _, { useState as S, useEffect as H, useId as J, useRef as ee, useCallback as ne, createContext as le, useContext as ae } from "react";
3
+ import { t as b, b as $, a as T, O as oe } from "./chunks/Button-BV4_pmoH.js";
4
+ import { c as te, d as se, b as re } from "./chunks/Input-BraK4lDE.js";
5
+ import { O as pt, a as gt } from "./chunks/Input-BraK4lDE.js";
6
+ import { createPortal as ie } from "react-dom";
7
+ import { M as pe } from "./chunks/constants-CDXq37n6.js";
8
+ import { u as ce } from "./chunks/useAuth-CR3bAGqp.js";
9
+ import './index.css';const Re = ({ children: t, className: s }) => /* @__PURE__ */ e.jsx("div", { className: b("flex items-center gap-3", s), children: t }), X = {
11
10
  rounded: "rounded-full",
12
11
  square: "rounded-lg"
13
- }, pe = {
12
+ }, Z = {
14
13
  sm: "h-6 w-6",
15
14
  md: "h-8 w-8",
16
15
  lg: "h-10 w-10",
17
16
  xl: "h-12 w-12",
18
17
  "2xl": "h-16 w-16"
19
- }, mt = {
18
+ }, ge = {
20
19
  sm: "h-2 w-2",
21
20
  md: "h-2.5 w-2.5",
22
21
  lg: "h-3 w-3",
23
22
  xl: "h-3.5 w-3.5",
24
23
  "2xl": "h-4 w-4"
25
- }, ht = {
24
+ }, ve = {
26
25
  online: "bg-green-500",
27
26
  offline: "bg-neutral-500",
28
27
  away: "bg-yellow-500",
29
28
  busy: "bg-red-500"
30
- }, pt = {
29
+ }, we = {
31
30
  sm: "text-xs",
32
31
  md: "text-sm",
33
32
  lg: "text-base",
34
33
  xl: "text-base",
35
34
  "2xl": "text-lg"
36
- }, xt = ({
37
- alt: e,
38
- className: t,
39
- fallback: r,
40
- showStatus: a = !1,
41
- size: n = "md",
42
- skeleton: o = !1,
43
- src: s,
44
- status: u,
45
- type: l = "square"
35
+ }, je = ({
36
+ alt: t,
37
+ className: s,
38
+ fallback: n,
39
+ showStatus: o = !1,
40
+ size: r = "md",
41
+ skeleton: i = !1,
42
+ src: l,
43
+ status: a,
44
+ type: u = "square"
46
45
  }) => {
47
- const [c, d] = z(!1), [m, h] = z(!1), [b, g] = z(!0);
48
- Y(() => {
49
- if (!s) {
50
- d(!1), h(!0), g(!1);
46
+ const [v, x] = S(!1), [m, h] = S(!1), [f, p] = S(!0);
47
+ H(() => {
48
+ if (!l) {
49
+ x(!1), h(!0), p(!1);
51
50
  return;
52
51
  }
53
- g(!0);
54
- const C = new Image();
55
- C.src = s;
56
- const p = () => {
57
- d(!0), h(!1), g(!1);
58
- }, x = () => {
59
- d(!1), h(!0), g(!1);
52
+ p(!0);
53
+ const y = new Image();
54
+ y.src = l;
55
+ const k = () => {
56
+ x(!0), h(!1), p(!1);
57
+ }, c = () => {
58
+ x(!1), h(!0), p(!1);
60
59
  };
61
- return C.addEventListener("load", p), C.addEventListener("error", x), () => {
62
- C.removeEventListener("load", p), C.removeEventListener("error", x);
60
+ return y.addEventListener("load", k), y.addEventListener("error", c), () => {
61
+ y.removeEventListener("load", k), y.removeEventListener("error", c);
63
62
  };
64
- }, [s]);
65
- const v = () => b && o ? /* @__PURE__ */ i.jsx("div", { className: T("animate-pulse bg-zinc-800", he[l], pe[n]) }) : c && !m ? /* @__PURE__ */ i.jsx(
63
+ }, [l]);
64
+ const j = () => f && i ? /* @__PURE__ */ e.jsx("div", { className: $("animate-pulse bg-zinc-800", X[u], Z[r]) }) : v && !m ? /* @__PURE__ */ e.jsx(
66
65
  "img",
67
66
  {
68
- alt: e,
69
- className: N(he[l], pe[n], "object-cover", t),
67
+ alt: t,
68
+ className: b(X[u], Z[r], "object-cover", s),
70
69
  loading: "lazy",
71
- src: s
70
+ src: l
72
71
  }
73
- ) : /* @__PURE__ */ i.jsx(
72
+ ) : /* @__PURE__ */ e.jsx(
74
73
  "div",
75
74
  {
76
- "aria-label": e,
77
- className: N(
75
+ "aria-label": t,
76
+ className: b(
78
77
  "flex items-center justify-center bg-zinc-800 font-medium text-white",
79
- he[l],
80
- pe[n],
81
- pt[n],
82
- t
78
+ X[u],
79
+ Z[r],
80
+ we[r],
81
+ s
83
82
  ),
84
83
  role: "img",
85
- children: typeof r == "string" && r.length > 2 ? r.substring(0, 2) : r
84
+ children: typeof n == "string" && n.length > 2 ? n.substring(0, 2) : n
86
85
  }
87
86
  );
88
- return /* @__PURE__ */ i.jsxs("div", { className: "relative shrink-0", children: [
89
- v(),
90
- a && u && /* @__PURE__ */ i.jsx(
87
+ return /* @__PURE__ */ e.jsxs("div", { className: "relative shrink-0", children: [
88
+ j(),
89
+ o && a && /* @__PURE__ */ e.jsx(
91
90
  "span",
92
91
  {
93
- "aria-label": `Status: ${u}`,
94
- className: T(
92
+ "aria-label": `Status: ${a}`,
93
+ className: $(
95
94
  "absolute right-0 bottom-0 rounded-full border-2 border-zinc-900",
96
- mt[n],
97
- ht[u]
95
+ ge[r],
96
+ ve[a]
98
97
  ),
99
98
  role: "status"
100
99
  }
101
100
  )
102
101
  ] });
103
- }, dn = ({
104
- className: e,
105
- size: t = "md",
106
- subtext: r,
107
- username: a
102
+ }, et = ({
103
+ className: t,
104
+ size: s = "md",
105
+ subtext: n,
106
+ username: o
108
107
  }) => {
109
- const n = {
108
+ const r = {
110
109
  sm: "text-xs",
111
110
  md: "text-sm",
112
111
  lg: "text-base",
113
112
  xl: "text-lg",
114
113
  "2xl": "text-xl"
115
- }, o = {
114
+ }, i = {
116
115
  sm: "text-xs",
117
116
  md: "text-xs",
118
117
  lg: "text-sm",
119
118
  xl: "text-sm",
120
119
  "2xl": "text-base"
121
120
  };
122
- return /* @__PURE__ */ i.jsxs("div", { className: N("flex flex-col justify-center overflow-hidden", e), children: [
123
- /* @__PURE__ */ i.jsx("span", { className: T("block truncate font-medium text-white", n[t]), children: a }),
124
- r && /* @__PURE__ */ i.jsx("span", { className: T("block truncate text-neutral-400", o[t]), children: r })
121
+ return /* @__PURE__ */ e.jsxs("div", { className: b("flex flex-col justify-center overflow-hidden", t), children: [
122
+ /* @__PURE__ */ e.jsx("span", { className: $("block truncate font-medium text-white", r[s]), children: o }),
123
+ n && /* @__PURE__ */ e.jsx("span", { className: $("block truncate text-neutral-400", i[s]), children: n })
125
124
  ] });
126
- }, gt = {
125
+ }, ye = {
127
126
  sm: "px-1 py-0.5 text-xs",
128
127
  md: "px-1.5 py-0.5 text-sm",
129
128
  lg: "px-2 py-1 text-base"
130
- }, bt = {
129
+ }, Ne = {
131
130
  purple: "bg-purple-500/25 text-purple-400",
132
131
  lime: "bg-lime-400/10 text-lime-300",
133
132
  red: "bg-red-500/25 text-red-400",
@@ -145,49 +144,49 @@ import './index.css';const cn = ({ children: e, className: t }) => /* @__PURE__
145
144
  fuchsia: "bg-fuchsia-500/25 text-fuchsia-400",
146
145
  gray: "bg-gray-500/25 text-gray-400"
147
146
  };
148
- function vt(e) {
149
- const t = e.startsWith("#") ? e.substring(1) : e;
150
- if (!/^[0-9A-Fa-f]{3,6}$/.test(t)) return "#FFFFFF";
151
- const a = parseInt(t.length === 3 ? t[0] + t[0] : t.substr(0, 2), 16), n = parseInt(t.length === 3 ? t[1] + t[1] : t.substr(2, 2), 16), o = parseInt(t.length === 3 ? t[2] + t[2] : t.substr(4, 2), 16);
152
- return (0.299 * a + 0.587 * n + 0.114 * o) / 255 > 0.5 ? "#000000" : "#FFFFFF";
153
- }
154
- const se = ({
155
- bgColor: e,
156
- children: t,
157
- className: r,
158
- color: a = "purple",
159
- size: n = "md",
160
- textColor: o
147
+ function ke(t) {
148
+ const s = t.startsWith("#") ? t.substring(1) : t;
149
+ if (!/^[0-9A-Fa-f]{3,6}$/.test(s)) return "#FFFFFF";
150
+ const o = parseInt(s.length === 3 ? s[0] + s[0] : s.substr(0, 2), 16), r = parseInt(s.length === 3 ? s[1] + s[1] : s.substr(2, 2), 16), i = parseInt(s.length === 3 ? s[2] + s[2] : s.substr(4, 2), 16);
151
+ return (0.299 * o + 0.587 * r + 0.114 * i) / 255 > 0.5 ? "#000000" : "#FFFFFF";
152
+ }
153
+ const G = ({
154
+ bgColor: t,
155
+ children: s,
156
+ className: n,
157
+ color: o = "purple",
158
+ size: r = "md",
159
+ textColor: i
161
160
  }) => {
162
- const s = !e && !o ? bt[a] : "", u = {};
163
- return e && (u.backgroundColor = e, o || (u.color = vt(e))), o && (u.color = o), /* @__PURE__ */ i.jsx(
161
+ const l = !t && !i ? Ne[o] : "", a = {};
162
+ return t && (a.backgroundColor = t, i || (a.color = ke(t))), i && (a.color = i), /* @__PURE__ */ e.jsx(
164
163
  "span",
165
164
  {
166
- className: N(
165
+ className: b(
167
166
  "inline-flex items-center rounded-md font-medium",
168
- gt[n],
169
- s,
170
- r
167
+ ye[r],
168
+ l,
169
+ n
171
170
  ),
172
- style: Object.keys(u).length ? u : void 0,
173
- children: t
171
+ style: Object.keys(a).length ? a : void 0,
172
+ children: s
174
173
  }
175
174
  );
176
- }, yt = {
175
+ }, Ce = {
177
176
  default: "bg-zinc-900/90 border border-zinc-800",
178
177
  outline: "bg-transparent border border-zinc-700",
179
178
  gradient: "bg-gradient-to-br from-zinc-900 via-purple-900/20 to-zinc-900 border border-purple-800/30"
180
- }, wt = {
179
+ }, Oe = {
181
180
  none: "p-0",
182
181
  sm: "p-3",
183
182
  md: "p-4",
184
183
  lg: "p-6"
185
- }, Ct = {
184
+ }, ze = {
186
185
  none: "",
187
186
  lift: "hover:scale-[1.01] hover:-translate-y-1",
188
187
  glow: "hover:shadow-lg hover:shadow-purple-500/10",
189
188
  border: "hover:border-purple-500/50"
190
- }, jt = {
189
+ }, Ie = {
191
190
  purple: "hover:border-purple-500/50",
192
191
  blue: "hover:border-blue-500/50",
193
192
  emerald: "hover:border-emerald-500/50",
@@ -196,7 +195,7 @@ const se = ({
196
195
  amber: "hover:border-amber-500/50",
197
196
  cyan: "hover:border-cyan-500/50",
198
197
  indigo: "hover:border-indigo-500/50"
199
- }, Nt = {
198
+ }, Ee = {
200
199
  purple: "from-purple-500/5 to-pink-500/5",
201
200
  blue: "from-blue-500/5 to-cyan-500/5",
202
201
  emerald: "from-emerald-500/5 to-teal-500/5",
@@ -205,49 +204,49 @@ const se = ({
205
204
  amber: "from-amber-500/5 to-orange-500/5",
206
205
  cyan: "from-cyan-500/5 to-blue-500/5",
207
206
  indigo: "from-indigo-500/5 to-purple-500/5"
208
- }, fn = ({
209
- backdropBlur: e = !1,
210
- children: t,
211
- className: r,
212
- color: a = "purple",
213
- equalHeight: n = !1,
214
- hoverVariant: o = "lift",
215
- hoverable: s = !1,
216
- padding: u = "md",
217
- variant: l = "default",
218
- ...c
207
+ }, tt = ({
208
+ backdropBlur: t = !1,
209
+ children: s,
210
+ className: n,
211
+ color: o = "purple",
212
+ equalHeight: r = !1,
213
+ hoverVariant: i = "lift",
214
+ hoverable: l = !1,
215
+ padding: a = "md",
216
+ variant: u = "default",
217
+ ...v
219
218
  }) => {
220
- const d = s ? o : "none", m = s && d !== "none";
221
- return /* @__PURE__ */ i.jsxs(
219
+ const x = l ? i : "none", m = l && x !== "none";
220
+ return /* @__PURE__ */ e.jsxs(
222
221
  "div",
223
222
  {
224
- className: N(
223
+ className: b(
225
224
  "relative overflow-hidden rounded-lg transition-all duration-300",
226
- yt[l],
227
- wt[u],
228
- n && "flex flex-col",
229
- e && "backdrop-blur-sm",
230
- m && Ct[d],
225
+ Ce[u],
226
+ Oe[a],
227
+ r && "flex flex-col",
228
+ t && "backdrop-blur-sm",
229
+ m && ze[x],
231
230
  m && "group hover:bg-white/5",
232
- m && jt[a],
233
- r
231
+ m && Ie[o],
232
+ n
234
233
  ),
235
- ...c,
234
+ ...v,
236
235
  children: [
237
- m && /* @__PURE__ */ i.jsx(
236
+ m && /* @__PURE__ */ e.jsx(
238
237
  "div",
239
238
  {
240
- className: N(
239
+ className: b(
241
240
  "absolute inset-0 bg-gradient-to-br opacity-0 transition-opacity duration-300 group-hover:opacity-100",
242
- Nt[a]
241
+ Ee[o]
243
242
  )
244
243
  }
245
244
  ),
246
- /* @__PURE__ */ i.jsx("div", { className: "relative z-10", children: t })
245
+ /* @__PURE__ */ e.jsx("div", { className: "relative z-10", children: s })
247
246
  ]
248
247
  }
249
248
  );
250
- }, Et = {
249
+ }, Le = {
251
250
  purple: {
252
251
  border: "border-purple-500/20",
253
252
  bg: "bg-purple-500/10",
@@ -288,465 +287,465 @@ const se = ({
288
287
  bg: "bg-indigo-500/10",
289
288
  text: "text-indigo-400"
290
289
  }
291
- }, mn = ({
292
- action: e,
293
- children: t,
294
- className: r,
295
- color: a = "purple",
296
- icon: n,
297
- iconColor: o,
298
- subtitle: s,
299
- title: u,
300
- ...l
290
+ }, st = ({
291
+ action: t,
292
+ children: s,
293
+ className: n,
294
+ color: o = "purple",
295
+ icon: r,
296
+ iconColor: i,
297
+ subtitle: l,
298
+ title: a,
299
+ ...u
301
300
  }) => {
302
- if (t)
303
- return /* @__PURE__ */ i.jsx("div", { className: N("mb-4", r), ...l, children: t });
304
- const d = Et[o || a];
305
- return /* @__PURE__ */ i.jsxs("div", { className: N("mb-4 flex items-start justify-between gap-3", r), ...l, children: [
306
- /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-3", children: [
307
- n && /* @__PURE__ */ i.jsx("div", { className: N("rounded-lg border p-2", d.border, d.bg), children: /* @__PURE__ */ i.jsx(U, { className: d.text, icon: n }) }),
308
- /* @__PURE__ */ i.jsxs("div", { children: [
309
- u && /* @__PURE__ */ i.jsx("h3", { className: "text-base font-semibold text-white", children: u }),
310
- s && /* @__PURE__ */ i.jsx("p", { className: "text-sm text-neutral-400", children: s })
301
+ if (s)
302
+ return /* @__PURE__ */ e.jsx("div", { className: b("mb-4", n), ...u, children: s });
303
+ const x = Le[i || o];
304
+ return /* @__PURE__ */ e.jsxs("div", { className: b("mb-4 flex items-start justify-between gap-3", n), ...u, children: [
305
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
306
+ r && /* @__PURE__ */ e.jsx("div", { className: b("rounded-lg border p-2", x.border, x.bg), children: /* @__PURE__ */ e.jsx(T, { className: x.text, icon: r }) }),
307
+ /* @__PURE__ */ e.jsxs("div", { children: [
308
+ a && /* @__PURE__ */ e.jsx("h3", { className: "text-base font-semibold text-white", children: a }),
309
+ l && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-neutral-400", children: l })
311
310
  ] })
312
311
  ] }),
313
- e && /* @__PURE__ */ i.jsx("div", { children: e })
312
+ t && /* @__PURE__ */ e.jsx("div", { children: t })
314
313
  ] });
315
- }, hn = ({
316
- children: e,
317
- className: t,
318
- flexGrow: r = !0,
319
- ...a
320
- }) => /* @__PURE__ */ i.jsx("div", { className: N("py-2", r && "flex-grow", t), ...a, children: e }), pn = ({ children: e, className: t, ...r }) => /* @__PURE__ */ i.jsx(
314
+ }, rt = ({
315
+ children: t,
316
+ className: s,
317
+ flexGrow: n = !0,
318
+ ...o
319
+ }) => /* @__PURE__ */ e.jsx("div", { className: b("py-2", n && "flex-grow", s), ...o, children: t }), nt = ({ children: t, className: s, ...n }) => /* @__PURE__ */ e.jsx(
321
320
  "div",
322
321
  {
323
- className: N(
322
+ className: b(
324
323
  "mt-4 flex items-center justify-end border-t border-neutral-800 pt-4",
325
- t
324
+ s
326
325
  ),
327
- ...r,
328
- children: e
326
+ ...n,
327
+ children: t
329
328
  }
330
- ), kt = {
329
+ ), Fe = {
331
330
  sm: "h-4 w-4",
332
331
  md: "h-5 w-5",
333
332
  lg: "h-6 w-6"
334
- }, Lt = {
333
+ }, Se = {
335
334
  sm: 0.5,
336
335
  md: 0.7,
337
336
  lg: 0.9
338
- }, xn = ({
339
- checked: e,
340
- className: t,
341
- defaultChecked: r,
342
- description: a,
343
- disabled: n = !1,
344
- error: o = !1,
345
- errorMessage: s,
346
- id: u,
347
- label: l,
348
- name: c,
349
- onChange: d,
337
+ }, ot = ({
338
+ checked: t,
339
+ className: s,
340
+ defaultChecked: n,
341
+ description: o,
342
+ disabled: r = !1,
343
+ error: i = !1,
344
+ errorMessage: l,
345
+ id: a,
346
+ label: u,
347
+ name: v,
348
+ onChange: x,
350
349
  required: m = !1,
351
350
  size: h = "md",
352
- value: b,
353
- ...g
351
+ value: f,
352
+ ...p
354
353
  }) => {
355
- const v = ue(), C = u || v, p = `${C}-checkbox`, x = `${C}-description`, y = `${C}-error`, j = o && s, L = /* @__PURE__ */ i.jsxs("div", { className: "relative inline-flex shrink-0", children: [
356
- /* @__PURE__ */ i.jsx(
354
+ const j = J(), y = a || j, k = `${y}-checkbox`, c = `${y}-description`, w = `${y}-error`, N = i && l, E = /* @__PURE__ */ e.jsxs("div", { className: "relative inline-flex shrink-0", children: [
355
+ /* @__PURE__ */ e.jsx(
357
356
  "input",
358
357
  {
359
- id: p,
360
- "aria-describedby": [a ? x : "", j ? y : ""].filter(Boolean).join(" ") || void 0,
361
- "aria-invalid": o,
358
+ id: k,
359
+ "aria-describedby": [o ? c : "", N ? w : ""].filter(Boolean).join(" ") || void 0,
360
+ "aria-invalid": i,
362
361
  "aria-required": m,
363
- checked: e,
364
- className: N(
362
+ checked: t,
363
+ className: b(
365
364
  "peer cursor-pointer appearance-none rounded-sm",
366
365
  "checked:bg-violet-700",
367
366
  "default-outset-focus",
368
367
  "disabled:cursor-not-allowed disabled:opacity-50",
369
- o ? "default-error-border" : "default-border",
370
- kt[h],
371
- t
368
+ i ? "default-error-border" : "default-border",
369
+ Fe[h],
370
+ s
372
371
  ),
373
- defaultChecked: r,
374
- disabled: n,
375
- name: c,
372
+ defaultChecked: n,
373
+ disabled: r,
374
+ name: v,
376
375
  type: "checkbox",
377
- value: b,
378
- onChange: d,
379
- ...g
376
+ value: f,
377
+ onChange: x,
378
+ ...p
380
379
  }
381
380
  ),
382
- /* @__PURE__ */ i.jsx(
383
- U,
381
+ /* @__PURE__ */ e.jsx(
382
+ T,
384
383
  {
385
384
  className: "pointer-events-none absolute inset-0 m-auto opacity-0 peer-checked:opacity-80",
386
385
  icon: "mdiCheck",
387
- size: Lt[h] || 0.7
386
+ size: Se[h] || 0.7
388
387
  }
389
388
  )
390
389
  ] });
391
- return /* @__PURE__ */ i.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
392
- /* @__PURE__ */ i.jsxs("div", { className: "flex items-start gap-2", children: [
393
- L,
394
- l && /* @__PURE__ */ i.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
395
- /* @__PURE__ */ i.jsx(Ce, { htmlFor: p, required: m, children: l }),
396
- a ? /* @__PURE__ */ i.jsx(je, { id: x, disabled: n, children: a }) : null
390
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
391
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
392
+ E,
393
+ u && /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
394
+ /* @__PURE__ */ e.jsx(te, { htmlFor: k, required: m, children: u }),
395
+ o ? /* @__PURE__ */ e.jsx(se, { id: c, disabled: r, children: o }) : null
397
396
  ] })
398
397
  ] }),
399
- j ? /* @__PURE__ */ i.jsx(Ne, { id: y, children: s }) : null
398
+ N ? /* @__PURE__ */ e.jsx(re, { id: w, children: l }) : null
400
399
  ] });
401
- }, Ue = ({
402
- align: e = "center",
403
- ariaHaspopup: t,
404
- children: r,
405
- className: a,
406
- content: n,
407
- contentClassName: o,
408
- contentRole: s,
409
- contentStyle: u,
410
- disabled: l = !1,
411
- id: c,
412
- offset: d = 8,
400
+ }, de = ({
401
+ align: t = "center",
402
+ ariaHaspopup: s,
403
+ children: n,
404
+ className: o,
405
+ content: r,
406
+ contentClassName: i,
407
+ contentRole: l,
408
+ contentStyle: a,
409
+ disabled: u = !1,
410
+ id: v,
411
+ offset: x = 8,
413
412
  onOpenChange: m,
414
413
  open: h,
415
- portal: b = !0,
416
- position: g = "top",
417
- trigger: v = "hover",
418
- useAriaControls: C = !1
414
+ portal: f = !0,
415
+ position: p = "top",
416
+ trigger: j = "hover",
417
+ useAriaControls: y = !1
419
418
  }) => {
420
- const p = ue(), [x, y] = z(!1), j = ye(null), L = ye(null), F = h !== void 0, k = l ? !1 : F ? h : x, D = c || p, S = Fe(
421
- (w) => {
422
- l || (m == null || m(w), F || y(w));
419
+ const k = J(), [c, w] = S(!1), N = ee(null), E = ee(null), F = h !== void 0, C = u ? !1 : F ? h : c, D = v || k, L = ne(
420
+ (d) => {
421
+ u || (m == null || m(d), F || w(d));
423
422
  },
424
- [l, F, m]
425
- ), I = Fe(() => {
426
- if (!j.current || !L.current || !k) return;
427
- const w = j.current.getBoundingClientRect(), E = L.current.getBoundingClientRect(), R = {
423
+ [u, F, m]
424
+ ), W = ne(() => {
425
+ if (!N.current || !E.current || !C) return;
426
+ const d = N.current.getBoundingClientRect(), g = E.current.getBoundingClientRect(), O = {
428
427
  width: window.innerWidth,
429
428
  height: window.innerHeight
430
429
  };
431
- let P = g;
432
- g === "top" && w.top < E.height + d ? P = "bottom" : g === "bottom" && w.bottom + E.height + d > R.height ? P = "top" : g === "left" && w.left < E.width + d ? P = "right" : g === "right" && w.right + E.width + d > R.width && (P = "left");
433
- const O = H(w, E, P, e, d);
434
- L.current && (L.current.style.left = `${O.x}px`, L.current.style.top = `${O.y}px`);
435
- }, [k, g, e, d]);
436
- Y(() => {
437
- if (!k || v !== "click") return;
438
- const w = (E) => {
439
- j.current && !j.current.contains(E.target) && L.current && !L.current.contains(E.target) && S(!1);
430
+ let z = p;
431
+ p === "top" && d.top < g.height + x ? z = "bottom" : p === "bottom" && d.bottom + g.height + x > O.height ? z = "top" : p === "left" && d.left < g.width + x ? z = "right" : p === "right" && d.right + g.width + x > O.width && (z = "left");
432
+ const I = P(d, g, z, t, x);
433
+ E.current && (E.current.style.left = `${I.x}px`, E.current.style.top = `${I.y}px`);
434
+ }, [C, p, t, x]);
435
+ H(() => {
436
+ if (!C || j !== "click") return;
437
+ const d = (g) => {
438
+ N.current && !N.current.contains(g.target) && E.current && !E.current.contains(g.target) && L(!1);
440
439
  };
441
- return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
442
- }, [k, S, v]), Y(() => {
443
- if (k) {
444
- I();
445
- const w = () => I(), E = () => I();
446
- return window.addEventListener("resize", w), window.addEventListener("scroll", E, !0), () => {
447
- window.removeEventListener("resize", w), window.removeEventListener("scroll", E, !0);
440
+ return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
441
+ }, [C, L, j]), H(() => {
442
+ if (C) {
443
+ W();
444
+ const d = () => W(), g = () => W();
445
+ return window.addEventListener("resize", d), window.addEventListener("scroll", g, !0), () => {
446
+ window.removeEventListener("resize", d), window.removeEventListener("scroll", g, !0);
448
447
  };
449
448
  }
450
- }, [k, g, e, d, I]);
451
- const H = (w, E, R, P, O) => {
452
- let J = 0, K = 0;
453
- switch (R) {
449
+ }, [C, p, t, x, W]);
450
+ const P = (d, g, O, z, I) => {
451
+ let B = 0, M = 0;
452
+ switch (O) {
454
453
  case "top":
455
- J = w.left, K = w.top - E.height - O;
454
+ B = d.left, M = d.top - g.height - I;
456
455
  break;
457
456
  case "bottom":
458
- J = w.left, K = w.bottom + O;
457
+ B = d.left, M = d.bottom + I;
459
458
  break;
460
459
  case "left":
461
- J = w.left - E.width - O, K = w.top;
460
+ B = d.left - g.width - I, M = d.top;
462
461
  break;
463
462
  case "right":
464
- J = w.right + O, K = w.top;
463
+ B = d.right + I, M = d.top;
465
464
  break;
466
465
  }
467
- if (R === "top" || R === "bottom")
468
- switch (P) {
466
+ if (O === "top" || O === "bottom")
467
+ switch (z) {
469
468
  case "start":
470
469
  break;
471
470
  case "center":
472
- J = w.left + (w.width - E.width) / 2;
471
+ B = d.left + (d.width - g.width) / 2;
473
472
  break;
474
473
  case "end":
475
- J = w.right - E.width;
474
+ B = d.right - g.width;
476
475
  break;
477
476
  }
478
- else if (R === "left" || R === "right")
479
- switch (P) {
477
+ else if (O === "left" || O === "right")
478
+ switch (z) {
480
479
  case "start":
481
480
  break;
482
481
  case "center":
483
- K = w.top + (w.height - E.height) / 2;
482
+ M = d.top + (d.height - g.height) / 2;
484
483
  break;
485
484
  case "end":
486
- K = w.bottom - E.height;
485
+ M = d.bottom - g.height;
487
486
  break;
488
487
  }
489
- return { x: J, y: K };
490
- }, G = () => {
491
- v === "hover" && S(!0);
492
- }, fe = () => {
493
- v === "hover" && S(!1);
494
- }, X = () => {
495
- v === "click" && S(!k);
496
- }, ne = () => {
497
- v === "focus" && S(!0);
498
- }, me = () => {
499
- v === "focus" && S(!1);
500
- }, Q = k ? /* @__PURE__ */ i.jsx(
488
+ return { x: B, y: M };
489
+ }, V = () => {
490
+ j === "hover" && L(!0);
491
+ }, Y = () => {
492
+ j === "hover" && L(!1);
493
+ }, K = () => {
494
+ j === "click" && L(!C);
495
+ }, q = () => {
496
+ j === "focus" && L(!0);
497
+ }, Q = () => {
498
+ j === "focus" && L(!1);
499
+ }, U = C ? /* @__PURE__ */ e.jsx(
501
500
  "div",
502
501
  {
503
502
  id: D,
504
- "aria-hidden": !k,
505
- className: N(
503
+ "aria-hidden": !C,
504
+ className: b(
506
505
  "fixed z-50 transition-opacity duration-200",
507
- k ? "opacity-100" : "pointer-events-none opacity-0",
508
- o
506
+ C ? "opacity-100" : "pointer-events-none opacity-0",
507
+ i
509
508
  ),
510
- ref: L,
511
- role: s,
512
- style: { left: -9999, top: -9999, ...u },
513
- children: /* @__PURE__ */ i.jsx("div", { className: "relative", children: n })
509
+ ref: E,
510
+ role: l,
511
+ style: { left: -9999, top: -9999, ...a },
512
+ children: /* @__PURE__ */ e.jsx("div", { className: "relative", children: r })
514
513
  }
515
514
  ) : null;
516
- return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
517
- /* @__PURE__ */ i.jsx(
515
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
516
+ /* @__PURE__ */ e.jsx(
518
517
  "div",
519
518
  {
520
- "aria-controls": C && k ? D : void 0,
521
- "aria-describedby": !C && k ? D : void 0,
522
- "aria-expanded": C ? k : void 0,
523
- "aria-haspopup": t,
524
- className: N("w-full", a),
525
- ref: j,
526
- onBlur: me,
527
- onClick: X,
528
- onFocus: ne,
529
- onMouseEnter: G,
530
- onMouseLeave: fe,
531
- children: r
519
+ "aria-controls": y && C ? D : void 0,
520
+ "aria-describedby": !y && C ? D : void 0,
521
+ "aria-expanded": y ? C : void 0,
522
+ "aria-haspopup": s,
523
+ className: b("w-full", o),
524
+ ref: N,
525
+ onBlur: Q,
526
+ onClick: K,
527
+ onFocus: q,
528
+ onMouseEnter: V,
529
+ onMouseLeave: Y,
530
+ children: n
532
531
  }
533
532
  ),
534
- b && typeof document < "u" ? He(Q, document.body) : Q
533
+ f && typeof document < "u" ? ie(U, document.body) : U
535
534
  ] });
536
- }, _e = ({ children: e }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: e }), St = ({ children: e }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: e }), Ve = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx(
535
+ }, ue = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: t }), $e = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: t }), xe = ({ children: t, className: s }) => /* @__PURE__ */ e.jsx(
537
536
  "div",
538
537
  {
539
- className: N(
538
+ className: b(
540
539
  "sticky top-0 flex-shrink-0 border-b border-neutral-700 bg-zinc-1000/95 px-3 py-2 backdrop-blur-lg",
541
- t
540
+ s
542
541
  ),
543
- children: e
542
+ children: t
544
543
  }
545
- ), Je = We({
544
+ ), me = le({
546
545
  open: !1,
547
546
  setOpen: () => {
548
547
  },
549
548
  disabled: !1
550
549
  });
551
- function Ke() {
552
- const e = Be(Je);
553
- if (e === void 0)
550
+ function fe() {
551
+ const t = ae(me);
552
+ if (t === void 0)
554
553
  throw new Error("useDropdownContext must be used within a DropdownProvider");
555
- return e;
554
+ return t;
556
555
  }
557
- const Ye = ({
558
- animateIcon: e = !1,
559
- children: t,
560
- className: r,
561
- disabled: a = !1,
562
- icon: n,
563
- outline: o = !1,
564
- unstyled: s = !1,
565
- ...u
556
+ const be = ({
557
+ animateIcon: t = !1,
558
+ children: s,
559
+ className: n,
560
+ disabled: o = !1,
561
+ icon: r,
562
+ outline: i = !1,
563
+ unstyled: l = !1,
564
+ ...a
566
565
  }) => {
567
- const { disabled: l, open: c } = Ke(), d = a || l;
568
- return /* @__PURE__ */ i.jsxs(
566
+ const { disabled: u, open: v } = fe(), x = o || u;
567
+ return /* @__PURE__ */ e.jsxs(
569
568
  "button",
570
569
  {
571
- "aria-expanded": c,
570
+ "aria-expanded": v,
572
571
  "aria-haspopup": "menu",
573
- className: N(
574
- !s && [
572
+ className: b(
573
+ !l && [
575
574
  "flex h-10 items-center justify-between rounded-lg px-3 py-2 text-sm enabled:cursor-pointer enabled:text-white enabled:hover:bg-white/6",
576
575
  "default-outset-focus",
577
- o ? "default-border" : "bg-transparent",
576
+ i ? "default-border" : "bg-transparent",
578
577
  "default-disabled"
579
578
  ],
580
- r
579
+ n
581
580
  ),
582
- disabled: d,
581
+ disabled: x,
583
582
  type: "button",
584
- ...u,
583
+ ...a,
585
584
  children: [
586
- s ? t : /* @__PURE__ */ i.jsx("span", { className: "flex items-center gap-2", children: t }),
587
- n && /* @__PURE__ */ i.jsx(
588
- U,
585
+ l ? s : /* @__PURE__ */ e.jsx("span", { className: "flex items-center gap-2", children: s }),
586
+ r && /* @__PURE__ */ e.jsx(
587
+ T,
589
588
  {
590
- className: T(
591
- !s && "ml-2",
592
- d && "text-neutral-500",
593
- e && ["transition-transform duration-200", c && "rotate-180"]
589
+ className: $(
590
+ !l && "ml-2",
591
+ x && "text-neutral-500",
592
+ t && ["transition-transform duration-200", v && "rotate-180"]
594
593
  ),
595
- icon: n,
594
+ icon: r,
596
595
  size: 0.8
597
596
  }
598
597
  )
599
598
  ]
600
599
  }
601
600
  );
602
- }, Rt = ({
603
- children: e,
604
- className: t,
605
- defaultOpen: r = !1,
606
- disabled: a = !1,
607
- onOpenChange: n,
608
- open: o
601
+ }, De = ({
602
+ children: t,
603
+ className: s,
604
+ defaultOpen: n = !1,
605
+ disabled: o = !1,
606
+ onOpenChange: r,
607
+ open: i
609
608
  }) => {
610
- const [s, u] = z(r), l = o !== void 0, c = l ? o : s, d = (x) => {
611
- a || (l || u(x), n == null || n(x));
612
- }, m = { open: c, setOpen: d, disabled: a };
613
- let h = null, b = null;
614
- const g = {
609
+ const [l, a] = S(n), u = i !== void 0, v = u ? i : l, x = (c) => {
610
+ o || (u || a(c), r == null || r(c));
611
+ }, m = { open: v, setOpen: x, disabled: o };
612
+ let h = null, f = null;
613
+ const p = {
615
614
  children: null,
616
615
  className: ""
617
- }, v = {
616
+ }, j = {
618
617
  children: null,
619
618
  className: ""
620
619
  };
621
- let C = {
620
+ let y = {
622
621
  side: "bottom",
623
622
  align: "start",
624
623
  className: ""
625
624
  };
626
- ee.Children.forEach(e, (x) => {
627
- if (ee.isValidElement(x)) {
628
- if (x.type === Ye)
629
- h = x;
630
- else if (x.type === Ve) {
631
- const y = x.props;
632
- g.className = y.className, g.children = y.children;
633
- } else if (x.type === St) {
634
- const y = x.props;
635
- v.className = y.className, v.children = y.children;
636
- } else if (x.type === _e) {
637
- const y = x.props;
638
- b = y.children, C = {
639
- side: y.side || "bottom",
640
- align: y.align || "start",
641
- className: y.className || ""
625
+ _.Children.forEach(t, (c) => {
626
+ if (_.isValidElement(c)) {
627
+ if (c.type === be)
628
+ h = c;
629
+ else if (c.type === xe) {
630
+ const w = c.props;
631
+ p.className = w.className, p.children = w.children;
632
+ } else if (c.type === $e) {
633
+ const w = c.props;
634
+ j.className = w.className, j.children = w.children;
635
+ } else if (c.type === ue) {
636
+ const w = c.props;
637
+ f = w.children, y = {
638
+ side: w.side || "bottom",
639
+ align: w.align || "start",
640
+ className: w.className || ""
642
641
  };
643
642
  }
644
643
  }
645
644
  });
646
- const p = /* @__PURE__ */ i.jsxs(
645
+ const k = /* @__PURE__ */ e.jsxs(
647
646
  "div",
648
647
  {
649
- className: N(
648
+ className: b(
650
649
  "default-border z-50 flex max-h-96 min-w-[8rem] flex-col overflow-hidden rounded-lg bg-zinc-1000/50 p-1 backdrop-blur-xl",
651
- C.side === "bottom" && "animate-dropdown-in-bottom",
652
- C.side === "top" && "animate-dropdown-in-top",
653
- C.className
650
+ y.side === "bottom" && "animate-dropdown-in-bottom",
651
+ y.side === "top" && "animate-dropdown-in-top",
652
+ y.className
654
653
  ),
655
654
  children: [
656
- g.children ? /* @__PURE__ */ i.jsx(
655
+ p.children ? /* @__PURE__ */ e.jsx(
657
656
  "div",
658
657
  {
659
- className: N(
658
+ className: b(
660
659
  "flex-shrink-0 border-b border-neutral-700 bg-zinc-1000/95 px-3 py-2 backdrop-blur-sm",
661
- g.className
660
+ p.className
662
661
  ),
663
- children: g.children
662
+ children: p.children
664
663
  }
665
664
  ) : null,
666
- /* @__PURE__ */ i.jsx("ul", { className: N("min-h-0 flex-1 overflow-y-auto"), children: b }),
667
- v.children ? /* @__PURE__ */ i.jsx(
665
+ /* @__PURE__ */ e.jsx("ul", { className: b("min-h-0 flex-1 overflow-y-auto"), children: f }),
666
+ j.children ? /* @__PURE__ */ e.jsx(
668
667
  "div",
669
668
  {
670
- className: N(
669
+ className: b(
671
670
  "flex-shrink-0 border-t border-neutral-700 bg-zinc-1000/95 px-3 py-2 backdrop-blur-sm",
672
- v.className
671
+ j.className
673
672
  ),
674
- children: v.children
673
+ children: j.children
675
674
  }
676
675
  ) : null
677
676
  ]
678
677
  }
679
678
  );
680
- return /* @__PURE__ */ i.jsx(Je.Provider, { value: m, children: /* @__PURE__ */ i.jsx("div", { className: N("inline-block", t), children: /* @__PURE__ */ i.jsx(
681
- Ue,
679
+ return /* @__PURE__ */ e.jsx(me.Provider, { value: m, children: /* @__PURE__ */ e.jsx("div", { className: b("inline-block", s), children: /* @__PURE__ */ e.jsx(
680
+ de,
682
681
  {
683
- align: C.align,
684
- content: p,
682
+ align: y.align,
683
+ content: k,
685
684
  contentRole: "menu",
686
- disabled: a,
687
- open: c,
685
+ disabled: o,
686
+ open: v,
688
687
  portal: !0,
689
- position: C.side,
688
+ position: y.side,
690
689
  trigger: "click",
691
- onOpenChange: d,
690
+ onOpenChange: x,
692
691
  children: h
693
692
  }
694
693
  ) }) });
695
- }, Pt = ({
696
- children: e,
697
- className: t,
698
- disabled: r = !1,
699
- icon: a,
700
- onClick: n,
701
- unstyled: o = !1
694
+ }, We = ({
695
+ children: t,
696
+ className: s,
697
+ disabled: n = !1,
698
+ icon: o,
699
+ onClick: r,
700
+ unstyled: i = !1
702
701
  }) => {
703
- const { setOpen: s } = Ke(), u = (l) => {
704
- r || (n && n(l), s(!1));
702
+ const { setOpen: l } = fe(), a = (u) => {
703
+ n || (r && r(u), l(!1));
705
704
  };
706
- return /* @__PURE__ */ i.jsx("li", { children: /* @__PURE__ */ i.jsxs(
705
+ return /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsxs(
707
706
  "button",
708
707
  {
709
- className: N(
710
- !o && [
708
+ className: b(
709
+ !i && [
711
710
  "group flex w-full items-center rounded-sm px-2 py-1.5 text-left text-sm enabled:text-white",
712
711
  "enabled:cursor-pointer enabled:hover:bg-white/6",
713
712
  "default-inset-focus",
714
713
  "default-disabled"
715
714
  ],
716
- t
715
+ s
717
716
  ),
718
- disabled: r,
717
+ disabled: n,
719
718
  role: "menuitem",
720
- onClick: u,
719
+ onClick: a,
721
720
  children: [
722
- a && /* @__PURE__ */ i.jsx(
723
- U,
721
+ o && /* @__PURE__ */ e.jsx(
722
+ T,
724
723
  {
725
- className: T("mr-2", r && "text-neutral-500"),
726
- icon: a,
724
+ className: $("mr-2", n && "text-neutral-500"),
725
+ icon: o,
727
726
  size: 0.75
728
727
  }
729
728
  ),
730
- e
729
+ t
731
730
  ]
732
731
  }
733
732
  ) });
734
- }, gn = ({ className: e }) => /* @__PURE__ */ i.jsx("li", { className: "px-1 py-1", children: /* @__PURE__ */ i.jsx("hr", { className: N("border-t-neutral-700", e) }) }), bn = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx(
733
+ }, lt = ({ className: t }) => /* @__PURE__ */ e.jsx("li", { className: "px-1 py-1", children: /* @__PURE__ */ e.jsx("hr", { className: b("border-t-neutral-700", t) }) }), at = ({ children: t, className: s }) => /* @__PURE__ */ e.jsx(
735
734
  "span",
736
735
  {
737
- className: N("ml-auto text-xs tracking-widest text-neutral-500", t),
736
+ className: b("ml-auto text-xs tracking-widest text-neutral-500", s),
738
737
  "data-part": "dropdown-shortcut",
739
- children: e
738
+ children: t
740
739
  }
741
- ), $t = (e) => {
742
- const r = Math.floor(((/* @__PURE__ */ new Date()).getTime() - e.getTime()) / (1e3 * 60));
743
- if (r < 1) return "just now";
744
- if (r < 60) return `${r}m ago`;
745
- const a = Math.floor(r / 60);
746
- if (a < 24) return `${a}h ago`;
747
- const n = Math.floor(a / 24);
748
- return n < 7 ? `${n}d ago` : e.toLocaleDateString();
749
- }, Ot = {
740
+ ), Te = (t) => {
741
+ const n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - t.getTime()) / (1e3 * 60));
742
+ if (n < 1) return "just now";
743
+ if (n < 60) return `${n}m ago`;
744
+ const o = Math.floor(n / 60);
745
+ if (o < 24) return `${o}h ago`;
746
+ const r = Math.floor(o / 24);
747
+ return r < 7 ? `${r}d ago` : t.toLocaleDateString();
748
+ }, Be = {
750
749
  error: {
751
750
  background: "bg-rose-500/20",
752
751
  iconClass: "text-rose-400",
@@ -772,370 +771,370 @@ const Ye = ({
772
771
  iconClass: "text-neutral-400",
773
772
  icon: "mdiBellOutline"
774
773
  }
775
- }, vn = ({
776
- className: e,
777
- disabled: t = !1,
778
- emptyMessage: r = "No notifications",
779
- maxHeight: a = "max-h-96",
780
- notifications: n,
781
- onMarkAllRead: o,
782
- onNotificationClick: s,
783
- unreadCount: u = 0
774
+ }, it = ({
775
+ className: t,
776
+ disabled: s = !1,
777
+ emptyMessage: n = "No notifications",
778
+ maxHeight: o = "max-h-96",
779
+ notifications: r,
780
+ onMarkAllRead: i,
781
+ onNotificationClick: l,
782
+ unreadCount: a = 0
784
783
  }) => {
785
- const [l, c] = z(!1), [d, m] = z(!1), h = u > 99 ? "99+" : u.toString(), b = u > 0, g = n.length > 0;
786
- Y(() => {
787
- const x = () => {
788
- const y = window.innerWidth < ft;
789
- m(y), y && l ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
784
+ const [u, v] = S(!1), [x, m] = S(!1), h = a > 99 ? "99+" : a.toString(), f = a > 0, p = r.length > 0;
785
+ H(() => {
786
+ const c = () => {
787
+ const w = window.innerWidth < pe;
788
+ m(w), w && u ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
790
789
  };
791
- return x(), window.addEventListener("resize", x), () => {
792
- document.body.classList.remove("overflow-hidden"), window.removeEventListener("resize", x);
790
+ return c(), window.addEventListener("resize", c), () => {
791
+ document.body.classList.remove("overflow-hidden"), window.removeEventListener("resize", c);
793
792
  };
794
- }, [l]);
795
- const v = (x) => {
796
- s == null || s(x), d && c(!1);
797
- }, C = () => {
798
- o == null || o(), d && c(!1);
799
- }, p = () => /* @__PURE__ */ i.jsx(i.Fragment, { children: g ? /* @__PURE__ */ i.jsx("div", { className: "divide-y divide-neutral-800/50", children: n.map((x, y) => {
800
- const j = Ot[x.type || "default"];
801
- return /* @__PURE__ */ i.jsxs(
802
- Pt,
793
+ }, [u]);
794
+ const j = (c) => {
795
+ l == null || l(c), x && v(!1);
796
+ }, y = () => {
797
+ i == null || i(), x && v(!1);
798
+ }, k = () => /* @__PURE__ */ e.jsx(e.Fragment, { children: p ? /* @__PURE__ */ e.jsx("div", { className: "divide-y divide-neutral-800/50", children: r.map((c, w) => {
799
+ const N = Be[c.type || "default"];
800
+ return /* @__PURE__ */ e.jsxs(
801
+ We,
803
802
  {
804
- className: N(
803
+ className: b(
805
804
  "secondary-inset-focus flex w-full items-start gap-3 px-3 py-3 text-left hover:bg-white/6",
806
- !x.read && "bg-white/3",
807
- y === n.length - 1 && "pb-4"
805
+ !c.read && "bg-white/3",
806
+ w === r.length - 1 && "pb-4"
808
807
  ),
809
808
  unstyled: !0,
810
- onClick: () => v(x),
809
+ onClick: () => j(c),
811
810
  children: [
812
- /* @__PURE__ */ i.jsx(
811
+ /* @__PURE__ */ e.jsx(
813
812
  "div",
814
813
  {
815
- className: N(
814
+ className: b(
816
815
  "mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg",
817
- j.background
816
+ N.background
818
817
  ),
819
- children: x.img ? /* @__PURE__ */ i.jsx(
820
- xt,
818
+ children: c.img ? /* @__PURE__ */ e.jsx(
819
+ je,
821
820
  {
822
821
  alt: "User avatar",
823
822
  fallback: "NA",
824
823
  size: "md",
825
- src: x.img
824
+ src: c.img
826
825
  }
827
- ) : /* @__PURE__ */ i.jsx(
828
- U,
826
+ ) : /* @__PURE__ */ e.jsx(
827
+ T,
829
828
  {
830
- className: j.iconClass,
831
- icon: x.icon ?? j.icon,
829
+ className: N.iconClass,
830
+ icon: c.icon ?? N.icon,
832
831
  size: 0.75
833
832
  }
834
833
  )
835
834
  }
836
835
  ),
837
- /* @__PURE__ */ i.jsxs("div", { className: "min-w-0 flex-1", children: [
838
- /* @__PURE__ */ i.jsx("p", { className: "mb-1 text-sm leading-5 text-white", children: x.title }),
839
- x.message && /* @__PURE__ */ i.jsx("p", { className: "mb-1 text-xs leading-4 text-neutral-400", children: x.message }),
840
- /* @__PURE__ */ i.jsx("p", { className: "text-xs text-neutral-500", children: $t(x.timestamp) })
836
+ /* @__PURE__ */ e.jsxs("div", { className: "min-w-0 flex-1", children: [
837
+ /* @__PURE__ */ e.jsx("p", { className: "mb-1 text-sm leading-5 text-white", children: c.title }),
838
+ c.message && /* @__PURE__ */ e.jsx("p", { className: "mb-1 text-xs leading-4 text-neutral-400", children: c.message }),
839
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs text-neutral-500", children: Te(c.timestamp) })
841
840
  ] }),
842
- !x.read && /* @__PURE__ */ i.jsx("div", { className: "mt-1.5 h-2 w-2 flex-shrink-0 rounded-full bg-rose-500" })
841
+ !c.read && /* @__PURE__ */ e.jsx("div", { className: "mt-1.5 h-2 w-2 flex-shrink-0 rounded-full bg-rose-500" })
843
842
  ]
844
843
  },
845
- x.id
844
+ c.id
846
845
  );
847
- }) }) : /* @__PURE__ */ i.jsxs(
846
+ }) }) : /* @__PURE__ */ e.jsxs(
848
847
  "div",
849
848
  {
850
849
  "aria-label": "No notifications available",
851
850
  className: "px-3 py-8 text-center",
852
851
  role: "status",
853
852
  children: [
854
- /* @__PURE__ */ i.jsx(U, { className: "mx-auto mb-2 text-neutral-500", icon: "mdiBellOffOutline", size: 2 }),
855
- /* @__PURE__ */ i.jsx("p", { className: "text-sm text-neutral-400", children: r })
853
+ /* @__PURE__ */ e.jsx(T, { className: "mx-auto mb-2 text-neutral-500", icon: "mdiBellOffOutline", size: 2 }),
854
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-neutral-400", children: n })
856
855
  ]
857
856
  }
858
857
  ) });
859
- return /* @__PURE__ */ i.jsx(i.Fragment, { children: d ? /* @__PURE__ */ i.jsxs("div", { children: [
860
- /* @__PURE__ */ i.jsxs("div", { className: "relative", children: [
861
- /* @__PURE__ */ i.jsx(
862
- De,
858
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: x ? /* @__PURE__ */ e.jsxs("div", { children: [
859
+ /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
860
+ /* @__PURE__ */ e.jsx(
861
+ oe,
863
862
  {
864
- "aria-expanded": l,
865
- "aria-label": `Notifications${b ? ` (${u} unread)` : ""}`,
866
- disabled: t,
863
+ "aria-expanded": u,
864
+ "aria-label": `Notifications${f ? ` (${a} unread)` : ""}`,
865
+ disabled: s,
867
866
  icon: "mdiBellOutline",
868
867
  variant: "ghost",
869
- onClick: () => c(!l)
868
+ onClick: () => v(!u)
870
869
  }
871
870
  ),
872
- b ? /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsx("div", { className: "absolute -top-2 -right-2", children: /* @__PURE__ */ i.jsx(se, { className: "min-w-[1.25rem] justify-center px-1", color: "violet", size: "sm", children: h }) }) }) : null
871
+ f ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx("div", { className: "absolute -top-2 -right-2", children: /* @__PURE__ */ e.jsx(G, { className: "min-w-[1.25rem] justify-center px-1", color: "violet", size: "sm", children: h }) }) }) : null
873
872
  ] }),
874
- He(
875
- /* @__PURE__ */ i.jsxs(
873
+ ie(
874
+ /* @__PURE__ */ e.jsxs(
876
875
  "div",
877
876
  {
878
877
  "aria-labelledby": "notifications-title-mobile",
879
878
  "aria-modal": "true",
880
- className: N(
879
+ className: b(
881
880
  "fixed inset-y-0 z-50 flex w-full flex-col bg-zinc-1000/50 backdrop-blur-xl transition-transform duration-300",
882
- l ? "translate-x-0" : "translate-x-full"
881
+ u ? "translate-x-0" : "translate-x-full"
883
882
  ),
884
883
  role: "dialog",
885
884
  children: [
886
- /* @__PURE__ */ i.jsxs("div", { className: "flex h-15 items-center justify-between border-b border-neutral-800 px-4", children: [
887
- d ? /* @__PURE__ */ i.jsx(
888
- De,
885
+ /* @__PURE__ */ e.jsxs("div", { className: "flex h-15 items-center justify-between border-b border-neutral-800 px-4", children: [
886
+ x ? /* @__PURE__ */ e.jsx(
887
+ oe,
889
888
  {
890
889
  "aria-label": "Close sidebar",
891
890
  icon: "mdiClose",
892
891
  variant: "ghost",
893
- onClick: () => c(!1)
892
+ onClick: () => v(!1)
894
893
  }
895
894
  ) : null,
896
- /* @__PURE__ */ i.jsx("h3", { id: "notifications-title-mobile", className: "text-sm font-semibold text-white", children: "Notifications" }),
897
- /* @__PURE__ */ i.jsx("div", { className: "flex items-center gap-2", children: b && o && /* @__PURE__ */ i.jsx(
895
+ /* @__PURE__ */ e.jsx("h3", { id: "notifications-title-mobile", className: "text-sm font-semibold text-white", children: "Notifications" }),
896
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: f && i && /* @__PURE__ */ e.jsx(
898
897
  "button",
899
898
  {
900
899
  className: "cursor-pointer text-xs text-neutral-400 transition-colors hover:text-white",
901
- onClick: C,
900
+ onClick: y,
902
901
  children: "Mark all read"
903
902
  }
904
903
  ) })
905
904
  ] }),
906
- /* @__PURE__ */ i.jsx("ul", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ i.jsx(p, {}) })
905
+ /* @__PURE__ */ e.jsx("ul", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ e.jsx(k, {}) })
907
906
  ]
908
907
  }
909
908
  ),
910
909
  document.body
911
910
  )
912
- ] }) : /* @__PURE__ */ i.jsxs(Rt, { className: e, disabled: t, children: [
913
- /* @__PURE__ */ i.jsx(
914
- Ye,
911
+ ] }) : /* @__PURE__ */ e.jsxs(De, { className: t, disabled: s, children: [
912
+ /* @__PURE__ */ e.jsx(
913
+ be,
915
914
  {
916
- "aria-label": `Notifications${b ? ` (${u} unread)` : ""}`,
917
- className: T(
915
+ "aria-label": `Notifications${f ? ` (${a} unread)` : ""}`,
916
+ className: $(
918
917
  "relative flex h-10 w-10 items-center justify-center px-2 text-sm",
919
918
  "secondary-outset-focus group rounded-lg border border-transparent bg-transparent text-white enabled:cursor-pointer enabled:hover:bg-white/6"
920
919
  ),
921
- disabled: t,
920
+ disabled: s,
922
921
  icon: "mdiBellOutline",
923
922
  unstyled: !0,
924
- children: b ? /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsx("div", { className: "absolute -top-2 -right-2", children: /* @__PURE__ */ i.jsx(se, { className: "min-w-[1.25rem] justify-center px-1", color: "violet", size: "sm", children: h }) }) }) : null
923
+ children: f ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx("div", { className: "absolute -top-2 -right-2", children: /* @__PURE__ */ e.jsx(G, { className: "min-w-[1.25rem] justify-center px-1", color: "violet", size: "sm", children: h }) }) }) : null
925
924
  }
926
925
  ),
927
- /* @__PURE__ */ i.jsx(Ve, { children: /* @__PURE__ */ i.jsxs("div", { className: "flex items-center justify-between", children: [
928
- /* @__PURE__ */ i.jsx("h3", { id: "notifications-title", className: "text-sm font-semibold text-white", children: "Notifications" }),
929
- b && o && /* @__PURE__ */ i.jsx(
926
+ /* @__PURE__ */ e.jsx(xe, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
927
+ /* @__PURE__ */ e.jsx("h3", { id: "notifications-title", className: "text-sm font-semibold text-white", children: "Notifications" }),
928
+ f && i && /* @__PURE__ */ e.jsx(
930
929
  "button",
931
930
  {
932
931
  className: "secondary-outset-focus cursor-pointer rounded-lg p-1 text-xs text-neutral-400 transition-colors hover:text-white",
933
- onClick: o,
932
+ onClick: i,
934
933
  children: "Mark all read"
935
934
  }
936
935
  )
937
936
  ] }) }),
938
- /* @__PURE__ */ i.jsx(
939
- _e,
937
+ /* @__PURE__ */ e.jsx(
938
+ ue,
940
939
  {
941
940
  align: "end",
942
941
  "aria-labelledby": "notifications-title",
943
- className: N("flex w-85 flex-col overflow-hidden p-0", a),
942
+ className: b("flex w-85 flex-col overflow-hidden p-0", o),
944
943
  side: "bottom",
945
- children: /* @__PURE__ */ i.jsx(p, {})
944
+ children: /* @__PURE__ */ e.jsx(k, {})
946
945
  }
947
946
  )
948
947
  ] }) });
949
- }, qe = We(void 0), It = () => {
950
- const e = Be(qe);
951
- if (!e)
948
+ }, he = le(void 0), Me = () => {
949
+ const t = ae(he);
950
+ if (!t)
952
951
  throw new Error("Select components must be used within an OxSelect");
953
- return e;
954
- }, Ft = ({
955
- children: e,
956
- className: t,
957
- disabled: r = !1,
958
- id: a,
959
- value: n
952
+ return t;
953
+ }, Pe = ({
954
+ children: t,
955
+ className: s,
956
+ disabled: n = !1,
957
+ id: o,
958
+ value: r
960
959
  }) => {
961
- const { closeDropdown: o, onSelect: s, selectedValue: u } = It(), l = () => {
962
- s({ value: n, label: e });
963
- }, c = (m) => {
964
- (m.key === "Enter" || m.key === " ") && (m.preventDefault(), s({ value: n, label: e })), m.key === "Escape" && o();
965
- }, d = u.includes(n);
966
- return /* @__PURE__ */ i.jsx("li", { role: "none", children: /* @__PURE__ */ i.jsxs(
960
+ const { closeDropdown: i, onSelect: l, selectedValue: a } = Me(), u = () => {
961
+ l({ value: r, label: t });
962
+ }, v = (m) => {
963
+ (m.key === "Enter" || m.key === " ") && (m.preventDefault(), l({ value: r, label: t })), m.key === "Escape" && i();
964
+ }, x = a.includes(r);
965
+ return /* @__PURE__ */ e.jsx("li", { role: "none", children: /* @__PURE__ */ e.jsxs(
967
966
  "button",
968
967
  {
969
- id: a,
970
- "aria-selected": d,
971
- className: N(
968
+ id: o,
969
+ "aria-selected": x,
970
+ className: b(
972
971
  "group flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-left text-sm enabled:text-white",
973
972
  "enabled:cursor-pointer enabled:hover:bg-white/6",
974
973
  "default-inset-focus",
975
974
  "default-disabled",
976
- d && "bg-white/5",
977
- t
975
+ x && "bg-white/5",
976
+ s
978
977
  ),
979
- disabled: r,
978
+ disabled: n,
980
979
  role: "option",
981
- tabIndex: r ? -1 : 0,
982
- onClick: l,
983
- onKeyDown: c,
980
+ tabIndex: n ? -1 : 0,
981
+ onClick: u,
982
+ onKeyDown: v,
984
983
  children: [
985
- e,
986
- d && !r && /* @__PURE__ */ i.jsx(U, { className: "text-violet-700", icon: "mdiCheck", size: 0.8 })
984
+ t,
985
+ x && !n && /* @__PURE__ */ e.jsx(T, { className: "text-violet-700", icon: "mdiCheck", size: 0.8 })
987
986
  ]
988
987
  }
989
988
  ) });
990
989
  };
991
- let xe = null, ge = null;
992
- const Dt = () => (xe || (xe = document.createElement("canvas"), ge = xe.getContext("2d"), ge.font = "0.875rem system-ui, sans-serif"), ge), zt = (e, t, r) => {
993
- if (e.length === 0) return [];
994
- if (!t.current) return e.slice(0, 1);
995
- const a = t.current.offsetWidth || 0, n = 12, o = 32, s = 32;
996
- let u = a - n - o;
997
- e.length > 1 && (u -= s);
998
- const l = Dt();
999
- if (!l) return e.slice(0, 2);
1000
- const c = r ? 4 : 8, d = r ? 12 : 0;
990
+ let A = null, R = null;
991
+ const He = () => (A || (A = document.createElement("canvas"), R = A.getContext("2d"), R.font = "0.875rem system-ui, sans-serif"), R), Ve = (t, s, n) => {
992
+ if (t.length === 0) return [];
993
+ if (!s.current) return t.slice(0, 1);
994
+ const o = s.current.offsetWidth || 0, r = 12, i = 32, l = 32;
995
+ let a = o - r - i;
996
+ t.length > 1 && (a -= l);
997
+ const u = He();
998
+ if (!u) return t.slice(0, 2);
999
+ const v = n ? 4 : 8, x = n ? 12 : 0;
1001
1000
  let m = 0, h = 0;
1002
- for (let b = 0; b < e.length; b++) {
1003
- const g = e[b], v = String(g.label), p = l.measureText(v).width + (r ? d : 0), x = b > 0 ? m + p + c : m + p;
1004
- if (x <= u)
1005
- m = x, h++;
1001
+ for (let f = 0; f < t.length; f++) {
1002
+ const p = t[f], j = String(p.label), k = u.measureText(j).width + (n ? x : 0), c = f > 0 ? m + k + v : m + k;
1003
+ if (c <= a)
1004
+ m = c, h++;
1006
1005
  else
1007
1006
  break;
1008
1007
  }
1009
- return h = Math.max(1, h), e.slice(0, h);
1010
- }, Tt = (e) => e == null ? [] : Array.isArray(e) ? e : [e], yn = ({
1011
- badgeColor: e = "purple",
1012
- children: t,
1013
- className: r,
1014
- defaultValue: a = null,
1015
- description: n,
1016
- disabled: o = !1,
1017
- displayAsBadges: s = !1,
1018
- error: u = !1,
1019
- errorMessage: l,
1020
- id: c,
1021
- label: d,
1008
+ return h = Math.max(1, h), t.slice(0, h);
1009
+ }, Ke = (t) => t == null ? [] : Array.isArray(t) ? t : [t], ct = ({
1010
+ badgeColor: t = "purple",
1011
+ children: s,
1012
+ className: n,
1013
+ defaultValue: o = null,
1014
+ description: r,
1015
+ disabled: i = !1,
1016
+ displayAsBadges: l = !1,
1017
+ error: a = !1,
1018
+ errorMessage: u,
1019
+ id: v,
1020
+ label: x,
1022
1021
  multiple: m = !1,
1023
1022
  name: h,
1024
- onChange: b,
1025
- placeholder: g = "Select an option",
1026
- required: v = !1
1023
+ onChange: f,
1024
+ placeholder: p = "Select an option",
1025
+ required: j = !1
1027
1026
  }) => {
1028
- var Q;
1029
- const C = ue(), p = ye(null), [x, y] = z(!1), [j, L] = z([]), F = c || C, k = `${F}-select`, D = `${F}-description`, S = `${F}-error`, I = u && l, H = (w, E) => {
1030
- let R = null;
1031
- return ee.Children.forEach(w, (P) => {
1032
- if (ee.isValidElement(P) && P.type === Ft) {
1033
- const O = P.props;
1034
- O.value === E && (R = { value: O.value, label: O.children });
1027
+ var U;
1028
+ const y = J(), k = ee(null), [c, w] = S(!1), [N, E] = S([]), F = v || y, C = `${F}-select`, D = `${F}-description`, L = `${F}-error`, W = a && u, P = (d, g) => {
1029
+ let O = null;
1030
+ return _.Children.forEach(d, (z) => {
1031
+ if (_.isValidElement(z) && z.type === Pe) {
1032
+ const I = z.props;
1033
+ I.value === g && (O = { value: I.value, label: I.children });
1035
1034
  }
1036
- }), R;
1037
- }, G = (w) => {
1038
- var R;
1039
- let E;
1040
- if (m ? j.some((O) => O.value === w.value) ? E = j.filter((O) => O.value !== w.value) : E = [...j, w] : (E = [w], y(!1)), L(E), b) {
1041
- const P = m ? E.map((O) => O.value) : ((R = E[0]) == null ? void 0 : R.value) ?? null;
1042
- b(P);
1035
+ }), O;
1036
+ }, V = (d) => {
1037
+ var O;
1038
+ let g;
1039
+ if (m ? N.some((I) => I.value === d.value) ? g = N.filter((I) => I.value !== d.value) : g = [...N, d] : (g = [d], w(!1)), E(g), f) {
1040
+ const z = m ? g.map((I) => I.value) : ((O = g[0]) == null ? void 0 : O.value) ?? null;
1041
+ f(z);
1043
1042
  }
1044
1043
  };
1045
- Y(() => {
1046
- if (a !== void 0) {
1047
- const w = Tt(a), E = [];
1048
- w.forEach((R) => {
1049
- const P = H(t, R);
1050
- P && E.push(P);
1051
- }), L(m ? E : E.slice(0, 1));
1044
+ H(() => {
1045
+ if (o !== void 0) {
1046
+ const d = Ke(o), g = [];
1047
+ d.forEach((O) => {
1048
+ const z = P(s, O);
1049
+ z && g.push(z);
1050
+ }), E(m ? g : g.slice(0, 1));
1052
1051
  }
1053
- }, [a, t, m]);
1054
- const fe = /* @__PURE__ */ i.jsx(
1052
+ }, [o, s, m]);
1053
+ const Y = /* @__PURE__ */ e.jsx(
1055
1054
  "ul",
1056
1055
  {
1057
- id: `${k}-listbox`,
1056
+ id: `${C}-listbox`,
1058
1057
  "aria-multiselectable": m,
1059
1058
  className: "max-h-72 space-y-0.5 overflow-hidden overflow-y-auto",
1060
1059
  role: "listbox",
1061
- children: t
1060
+ children: s
1062
1061
  }
1063
- ), X = zt(j, p, s), ne = j.length - X.length, me = ne > 0;
1064
- return /* @__PURE__ */ i.jsx(
1065
- qe.Provider,
1062
+ ), K = Ve(N, k, l), q = N.length - K.length, Q = q > 0;
1063
+ return /* @__PURE__ */ e.jsx(
1064
+ he.Provider,
1066
1065
  {
1067
1066
  value: {
1068
- selectedValue: j.map((w) => w.value),
1067
+ selectedValue: N.map((d) => d.value),
1069
1068
  multiple: m,
1070
- onSelect: G,
1071
- closeDropdown: () => y(!1)
1069
+ onSelect: V,
1070
+ closeDropdown: () => w(!1)
1072
1071
  },
1073
- children: /* @__PURE__ */ i.jsxs("div", { className: N("flex w-full flex-col gap-1", r), children: [
1074
- d && /* @__PURE__ */ i.jsx(Ce, { htmlFor: k, required: v, children: d }),
1075
- /* @__PURE__ */ i.jsx(
1076
- Ue,
1072
+ children: /* @__PURE__ */ e.jsxs("div", { className: b("flex w-full flex-col gap-1", n), children: [
1073
+ x && /* @__PURE__ */ e.jsx(te, { htmlFor: C, required: j, children: x }),
1074
+ /* @__PURE__ */ e.jsx(
1075
+ de,
1077
1076
  {
1078
1077
  align: "start",
1079
- content: fe,
1078
+ content: Y,
1080
1079
  contentClassName: "default-border bg-zinc-1000/70 rounded-lg p-1 backdrop-blur-xl animate-dropdown-in-bottom",
1081
- contentStyle: { minWidth: `${((Q = p.current) == null ? void 0 : Q.offsetWidth) || 200}px` },
1082
- disabled: o,
1083
- open: x,
1080
+ contentStyle: { minWidth: `${((U = k.current) == null ? void 0 : U.offsetWidth) || 200}px` },
1081
+ disabled: i,
1082
+ open: c,
1084
1083
  position: "bottom",
1085
1084
  trigger: "click",
1086
- onOpenChange: y,
1087
- children: /* @__PURE__ */ i.jsxs(
1085
+ onOpenChange: w,
1086
+ children: /* @__PURE__ */ e.jsxs(
1088
1087
  "button",
1089
1088
  {
1090
- id: k,
1091
- "aria-controls": `${k}-listbox`,
1092
- "aria-describedby": [n ? D : "", I ? S : ""].filter(Boolean).join(" ") || void 0,
1093
- "aria-disabled": o,
1094
- "aria-expanded": x,
1089
+ id: C,
1090
+ "aria-controls": `${C}-listbox`,
1091
+ "aria-describedby": [r ? D : "", W ? L : ""].filter(Boolean).join(" ") || void 0,
1092
+ "aria-disabled": i,
1093
+ "aria-expanded": c,
1095
1094
  "aria-haspopup": "listbox",
1096
- "aria-invalid": u,
1097
- "aria-required": v,
1098
- className: T(
1095
+ "aria-invalid": a,
1096
+ "aria-required": j,
1097
+ className: $(
1099
1098
  "relative flex h-10 w-full gap-x-2 rounded-lg py-2 ps-3 pe-8 text-start text-sm enabled:cursor-pointer enabled:text-white",
1100
1099
  "default-outset-focus default-disabled",
1101
- u ? "default-error-border" : "default-border",
1102
- x && "default-active-border"
1100
+ a ? "default-error-border" : "default-border",
1101
+ c && "default-active-border"
1103
1102
  ),
1104
- disabled: o,
1105
- ref: p,
1103
+ disabled: i,
1104
+ ref: k,
1106
1105
  role: "combobox",
1107
1106
  type: "button",
1108
1107
  children: [
1109
- /* @__PURE__ */ i.jsx(
1108
+ /* @__PURE__ */ e.jsx(
1110
1109
  "span",
1111
1110
  {
1112
- className: T(
1111
+ className: $(
1113
1112
  "w-full overflow-hidden text-ellipsis",
1114
- s ? m && "flex flex-wrap gap-1" : "whitespace-nowrap",
1115
- o && s && "opacity-50"
1113
+ l ? m && "flex flex-wrap gap-1" : "whitespace-nowrap",
1114
+ i && l && "opacity-50"
1116
1115
  ),
1117
- children: j.length > 0 ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
1118
- s && m ? X.map((w) => /* @__PURE__ */ i.jsx(se, { color: e, size: "sm", children: w.label }, String(w.value))) : X.map((w, E, R) => /* @__PURE__ */ i.jsxs(ee.Fragment, { children: [
1119
- w.label,
1120
- E < R.length - 1 && ", "
1121
- ] }, String(w.value))),
1122
- me && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
1123
- !(s && m) && " ",
1124
- /* @__PURE__ */ i.jsxs(se, { color: e, size: "sm", children: [
1116
+ children: N.length > 0 ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1117
+ l && m ? K.map((d) => /* @__PURE__ */ e.jsx(G, { color: t, size: "sm", children: d.label }, String(d.value))) : K.map((d, g, O) => /* @__PURE__ */ e.jsxs(_.Fragment, { children: [
1118
+ d.label,
1119
+ g < O.length - 1 && ", "
1120
+ ] }, String(d.value))),
1121
+ Q && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1122
+ !(l && m) && " ",
1123
+ /* @__PURE__ */ e.jsxs(G, { color: t, size: "sm", children: [
1125
1124
  "+",
1126
- ne
1125
+ q
1127
1126
  ] })
1128
1127
  ] })
1129
- ] }) : g
1128
+ ] }) : p
1130
1129
  }
1131
1130
  ),
1132
- /* @__PURE__ */ i.jsx("div", { className: "absolute end-3 top-1/2 -translate-y-1/2", children: /* @__PURE__ */ i.jsx(
1133
- U,
1131
+ /* @__PURE__ */ e.jsx("div", { className: "absolute end-3 top-1/2 -translate-y-1/2", children: /* @__PURE__ */ e.jsx(
1132
+ T,
1134
1133
  {
1135
- className: T(
1134
+ className: $(
1136
1135
  "transition-transform duration-300 ease-in-out",
1137
- o && "text-neutral-500",
1138
- x && "rotate-180"
1136
+ i && "text-neutral-500",
1137
+ c && "rotate-180"
1139
1138
  ),
1140
1139
  icon: "mdiChevronDown",
1141
1140
  size: 0.8
@@ -1146,82 +1145,82 @@ const Dt = () => (xe || (xe = document.createElement("canvas"), ge = xe.getConte
1146
1145
  )
1147
1146
  }
1148
1147
  ),
1149
- h && /* @__PURE__ */ i.jsx(
1148
+ h && /* @__PURE__ */ e.jsx(
1150
1149
  "input",
1151
1150
  {
1152
1151
  name: h,
1153
1152
  type: "hidden",
1154
- value: j.map((w) => w.value).join(",")
1153
+ value: N.map((d) => d.value).join(",")
1155
1154
  }
1156
1155
  ),
1157
- n && /* @__PURE__ */ i.jsx(je, { id: D, disabled: o, children: n }),
1158
- I && /* @__PURE__ */ i.jsx(Ne, { id: S, children: l })
1156
+ r && /* @__PURE__ */ e.jsx(se, { id: D, disabled: i, children: r }),
1157
+ W && /* @__PURE__ */ e.jsx(re, { id: L, children: u })
1159
1158
  ] })
1160
1159
  }
1161
1160
  );
1162
- }, wn = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: N("px-2 py-1 text-xs font-medium text-neutral-400", t), children: e }), Mt = {
1161
+ }, dt = ({ children: t, className: s }) => /* @__PURE__ */ e.jsx("div", { className: b("px-2 py-1 text-xs font-medium text-neutral-400", s), children: t }), Ue = {
1163
1162
  default: "bg-zinc-800/80",
1164
1163
  purple: "bg-purple-950/50",
1165
1164
  blue: "bg-blue-950/50",
1166
1165
  gray: "bg-gray-800/50"
1167
- }, Wt = {
1166
+ }, _e = {
1168
1167
  rectangle: "rounded-md",
1169
1168
  circle: "rounded-full"
1170
- }, Bt = ({
1171
- animate: e = !0,
1172
- className: t,
1173
- color: r = "default",
1174
- fullWidth: a = !1,
1175
- height: n,
1176
- shape: o = "rectangle",
1177
- width: s,
1178
- ...u
1169
+ }, qe = ({
1170
+ animate: t = !0,
1171
+ className: s,
1172
+ color: n = "default",
1173
+ fullWidth: o = !1,
1174
+ height: r,
1175
+ shape: i = "rectangle",
1176
+ width: l,
1177
+ ...a
1179
1178
  }) => {
1180
- const l = {
1181
- height: typeof n == "number" ? `${n}px` : n,
1182
- width: typeof s == "number" ? `${s}px` : s
1179
+ const u = {
1180
+ height: typeof r == "number" ? `${r}px` : r,
1181
+ width: typeof l == "number" ? `${l}px` : l
1183
1182
  };
1184
- return /* @__PURE__ */ i.jsx(
1183
+ return /* @__PURE__ */ e.jsx(
1185
1184
  "div",
1186
1185
  {
1187
1186
  "aria-busy": "true",
1188
1187
  "aria-label": "Loading...",
1189
- className: N(
1188
+ className: b(
1190
1189
  "relative overflow-hidden",
1191
- Mt[r],
1192
- Wt[o],
1193
- e && "animate-pulse",
1194
- a && "w-full",
1195
- t
1190
+ Ue[n],
1191
+ _e[i],
1192
+ t && "animate-pulse",
1193
+ o && "w-full",
1194
+ s
1196
1195
  ),
1197
1196
  role: "status",
1198
- style: l,
1199
- ...u
1197
+ style: u,
1198
+ ...a
1200
1199
  }
1201
1200
  );
1202
- }, Cn = ({
1203
- animate: e = !0,
1204
- className: t,
1205
- color: r = "default",
1206
- fullWidth: a = !1,
1207
- gap: n = 8,
1208
- height: o = 20,
1209
- lines: s = 1,
1210
- width: u,
1211
- ...l
1201
+ }, ut = ({
1202
+ animate: t = !0,
1203
+ className: s,
1204
+ color: n = "default",
1205
+ fullWidth: o = !1,
1206
+ gap: r = 8,
1207
+ height: i = 20,
1208
+ lines: l = 1,
1209
+ width: a,
1210
+ ...u
1212
1211
  }) => {
1213
- const c = (h) => h <= 1 ? `${h * 100}%` : `${h}px`, d = (h) => {
1214
- if (!a) {
1215
- if (Array.isArray(u)) {
1216
- const b = u[h % u.length];
1217
- return b == null ? void 0 : typeof b == "number" ? c(b) : b;
1212
+ const v = (h) => h <= 1 ? `${h * 100}%` : `${h}px`, x = (h) => {
1213
+ if (!o) {
1214
+ if (Array.isArray(a)) {
1215
+ const f = a[h % a.length];
1216
+ return f == null ? void 0 : typeof f == "number" ? v(f) : f;
1218
1217
  }
1219
- if (typeof u == "number") {
1220
- if (s > 1 && h === s - 1) {
1221
- const b = u <= 1 ? u * 0.6 : Math.max(100, u * 0.6);
1222
- return c(b);
1218
+ if (typeof a == "number") {
1219
+ if (l > 1 && h === l - 1) {
1220
+ const f = a <= 1 ? a * 0.6 : Math.max(100, a * 0.6);
1221
+ return v(f);
1223
1222
  }
1224
- return c(u);
1223
+ return v(a);
1225
1224
  }
1226
1225
  return "200px";
1227
1226
  }
@@ -1231,1422 +1230,128 @@ const Dt = () => (xe || (xe = document.createElement("canvas"), ge = xe.getConte
1231
1230
  12: "space-y-3",
1232
1231
  16: "space-y-4",
1233
1232
  20: "space-y-5"
1234
- }[n] || "space-y-2";
1235
- return /* @__PURE__ */ i.jsx("div", { className: N("flex flex-col", m, t), ...l, children: Array.from({ length: s }).map((h, b) => /* @__PURE__ */ i.jsx(
1236
- Bt,
1233
+ }[r] || "space-y-2";
1234
+ return /* @__PURE__ */ e.jsx("div", { className: b("flex flex-col", m, s), ...u, children: Array.from({ length: l }).map((h, f) => /* @__PURE__ */ e.jsx(
1235
+ qe,
1237
1236
  {
1238
- animate: e,
1239
- color: r,
1240
- fullWidth: a,
1241
- height: o,
1242
- width: d(b)
1237
+ animate: t,
1238
+ color: n,
1239
+ fullWidth: o,
1240
+ height: i,
1241
+ width: x(f)
1243
1242
  },
1244
- b
1243
+ f
1245
1244
  )) });
1246
- }, jn = ({
1247
- className: e,
1248
- description: t,
1249
- disabled: r = !1,
1250
- error: a = !1,
1251
- errorMessage: n,
1252
- id: o,
1253
- label: s,
1254
- name: u,
1255
- onChange: l,
1256
- placeholder: c = "Enter text...",
1257
- readOnly: d = !1,
1245
+ }, xt = ({
1246
+ className: t,
1247
+ description: s,
1248
+ disabled: n = !1,
1249
+ error: o = !1,
1250
+ errorMessage: r,
1251
+ id: i,
1252
+ label: l,
1253
+ name: a,
1254
+ onChange: u,
1255
+ placeholder: v = "Enter text...",
1256
+ readOnly: x = !1,
1258
1257
  required: m = !1,
1259
1258
  rows: h = 3,
1260
- showMaxLength: b = !1,
1261
- value: g,
1262
- ...v
1259
+ showMaxLength: f = !1,
1260
+ value: p,
1261
+ ...j
1263
1262
  }) => {
1264
- const C = ue(), [p, x] = z(
1265
- typeof g == "string" ? g.length : 0
1266
- ), y = o || C, j = `${y}-textarea`, L = `${y}-description`, F = `${y}-error`, k = v.maxLength, D = a && n;
1267
- Y(() => {
1268
- typeof g == "string" && x(g.length);
1269
- }, [g]);
1270
- const S = (H) => {
1271
- const G = H.target.value.length;
1272
- x(G), l == null || l(H);
1273
- }, I = /* @__PURE__ */ i.jsx(
1263
+ const y = J(), [k, c] = S(
1264
+ typeof p == "string" ? p.length : 0
1265
+ ), w = i || y, N = `${w}-textarea`, E = `${w}-description`, F = `${w}-error`, C = j.maxLength, D = o && r;
1266
+ H(() => {
1267
+ typeof p == "string" && c(p.length);
1268
+ }, [p]);
1269
+ const L = (P) => {
1270
+ const V = P.target.value.length;
1271
+ c(V), u == null || u(P);
1272
+ }, W = /* @__PURE__ */ e.jsx(
1274
1273
  "textarea",
1275
1274
  {
1276
- id: j,
1277
- "aria-describedby": [t ? L : "", D ? F : ""].filter(Boolean).join(" ") || void 0,
1278
- "aria-invalid": a,
1275
+ id: N,
1276
+ "aria-describedby": [s ? E : "", D ? F : ""].filter(Boolean).join(" ") || void 0,
1277
+ "aria-invalid": o,
1279
1278
  "aria-required": m,
1280
- className: N(
1279
+ className: b(
1281
1280
  "flex min-h-10 w-full resize-y rounded-lg bg-transparent px-2 py-2 text-sm text-white",
1282
1281
  "placeholder:text-neutral-500",
1283
1282
  "default-outset-focus",
1284
1283
  "default-disabled",
1285
- a ? "default-error-border" : "default-border",
1286
- e
1284
+ o ? "default-error-border" : "default-border",
1285
+ t
1287
1286
  ),
1288
- disabled: r,
1289
- name: u,
1290
- placeholder: c,
1291
- readOnly: d,
1287
+ disabled: n,
1288
+ name: a,
1289
+ placeholder: v,
1290
+ readOnly: x,
1292
1291
  rows: h,
1293
- value: g,
1294
- onChange: S,
1295
- ...v
1292
+ value: p,
1293
+ onChange: L,
1294
+ ...j
1296
1295
  }
1297
1296
  );
1298
- return /* @__PURE__ */ i.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
1299
- s ? /* @__PURE__ */ i.jsx(Ce, { htmlFor: j, required: m, children: s }) : null,
1300
- I,
1301
- b && typeof k == "number" ? /* @__PURE__ */ i.jsxs("div", { className: "pointer-events-none mt-1 text-right text-xs text-neutral-400", children: [
1302
- p,
1297
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
1298
+ l ? /* @__PURE__ */ e.jsx(te, { htmlFor: N, required: m, children: l }) : null,
1299
+ W,
1300
+ f && typeof C == "number" ? /* @__PURE__ */ e.jsxs("div", { className: "pointer-events-none mt-1 text-right text-xs text-neutral-400", children: [
1301
+ k,
1303
1302
  "/",
1304
- k
1303
+ C
1305
1304
  ] }) : null,
1306
- t ? /* @__PURE__ */ i.jsx(je, { id: L, disabled: r, children: t }) : null,
1307
- D ? /* @__PURE__ */ i.jsx(Ne, { id: F, children: n }) : null
1305
+ s ? /* @__PURE__ */ e.jsx(se, { id: E, disabled: n, children: s }) : null,
1306
+ D ? /* @__PURE__ */ e.jsx(re, { id: F, children: r }) : null
1308
1307
  ] });
1309
- };
1310
- /**
1311
- * react-router v7.7.0
1312
- *
1313
- * Copyright (c) Remix Software Inc.
1314
- *
1315
- * This source code is licensed under the MIT license found in the
1316
- * LICENSE.md file in the root directory of this source tree.
1317
- *
1318
- * @license MIT
1319
- */
1320
- function $(e, t) {
1321
- if (e === !1 || e === null || typeof e > "u")
1322
- throw new Error(t);
1323
- }
1324
- function M(e, t) {
1325
- if (!e) {
1326
- typeof console < "u" && console.warn(t);
1327
- try {
1328
- throw new Error(t);
1329
- } catch {
1330
- }
1331
- }
1332
- }
1333
- function we({
1334
- pathname: e = "/",
1335
- search: t = "",
1336
- hash: r = ""
1337
- }) {
1338
- return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e;
1339
- }
1340
- function Ee(e) {
1341
- let t = {};
1342
- if (e) {
1343
- let r = e.indexOf("#");
1344
- r >= 0 && (t.hash = e.substring(r), e = e.substring(0, r));
1345
- let a = e.indexOf("?");
1346
- a >= 0 && (t.search = e.substring(a), e = e.substring(0, a)), e && (t.pathname = e);
1347
- }
1348
- return t;
1349
- }
1350
- function Ge(e, t, r = "/") {
1351
- return Ht(e, t, r, !1);
1352
- }
1353
- function Ht(e, t, r, a) {
1354
- let n = typeof t == "string" ? Ee(t) : t, o = _(n.pathname || "/", r);
1355
- if (o == null)
1356
- return null;
1357
- let s = Xe(e);
1358
- At(s);
1359
- let u = null;
1360
- for (let l = 0; u == null && l < s.length; ++l) {
1361
- let c = Zt(o);
1362
- u = Xt(
1363
- s[l],
1364
- c,
1365
- a
1366
- );
1367
- }
1368
- return u;
1369
- }
1370
- function Xe(e, t = [], r = [], a = "") {
1371
- let n = (o, s, u) => {
1372
- let l = {
1373
- relativePath: u === void 0 ? o.path || "" : u,
1374
- caseSensitive: o.caseSensitive === !0,
1375
- childrenIndex: s,
1376
- route: o
1377
- };
1378
- l.relativePath.startsWith("/") && ($(
1379
- l.relativePath.startsWith(a),
1380
- `Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
1381
- ), l.relativePath = l.relativePath.slice(a.length));
1382
- let c = A([a, l.relativePath]), d = r.concat(l);
1383
- o.children && o.children.length > 0 && ($(
1384
- // Our types know better, but runtime JS may not!
1385
- // @ts-expect-error
1386
- o.index !== !0,
1387
- `Index routes must not have child routes. Please remove all child routes from route path "${c}".`
1388
- ), Xe(o.children, t, d, c)), !(o.path == null && !o.index) && t.push({
1389
- path: c,
1390
- score: qt(c, o.index),
1391
- routesMeta: d
1392
- });
1393
- };
1394
- return e.forEach((o, s) => {
1395
- var u;
1396
- if (o.path === "" || !((u = o.path) != null && u.includes("?")))
1397
- n(o, s);
1398
- else
1399
- for (let l of Qe(o.path))
1400
- n(o, s, l);
1401
- }), t;
1402
- }
1403
- function Qe(e) {
1404
- let t = e.split("/");
1405
- if (t.length === 0) return [];
1406
- let [r, ...a] = t, n = r.endsWith("?"), o = r.replace(/\?$/, "");
1407
- if (a.length === 0)
1408
- return n ? [o, ""] : [o];
1409
- let s = Qe(a.join("/")), u = [];
1410
- return u.push(
1411
- ...s.map(
1412
- (l) => l === "" ? o : [o, l].join("/")
1413
- )
1414
- ), n && u.push(...s), u.map(
1415
- (l) => e.startsWith("/") && l === "" ? "/" : l
1416
- );
1417
- }
1418
- function At(e) {
1419
- e.sort(
1420
- (t, r) => t.score !== r.score ? r.score - t.score : Gt(
1421
- t.routesMeta.map((a) => a.childrenIndex),
1422
- r.routesMeta.map((a) => a.childrenIndex)
1423
- )
1424
- );
1425
- }
1426
- var Ut = /^:[\w-]+$/, _t = 3, Vt = 2, Jt = 1, Kt = 10, Yt = -2, ze = (e) => e === "*";
1427
- function qt(e, t) {
1428
- let r = e.split("/"), a = r.length;
1429
- return r.some(ze) && (a += Yt), t && (a += Vt), r.filter((n) => !ze(n)).reduce(
1430
- (n, o) => n + (Ut.test(o) ? _t : o === "" ? Jt : Kt),
1431
- a
1432
- );
1433
- }
1434
- function Gt(e, t) {
1435
- return e.length === t.length && e.slice(0, -1).every((a, n) => a === t[n]) ? (
1436
- // If two routes are siblings, we should try to match the earlier sibling
1437
- // first. This allows people to have fine-grained control over the matching
1438
- // behavior by simply putting routes with identical paths in the order they
1439
- // want them tried.
1440
- e[e.length - 1] - t[t.length - 1]
1441
- ) : (
1442
- // Otherwise, it doesn't really make sense to rank non-siblings by index,
1443
- // so they sort equally.
1444
- 0
1445
- );
1446
- }
1447
- function Xt(e, t, r = !1) {
1448
- let { routesMeta: a } = e, n = {}, o = "/", s = [];
1449
- for (let u = 0; u < a.length; ++u) {
1450
- let l = a[u], c = u === a.length - 1, d = o === "/" ? t : t.slice(o.length) || "/", m = ie(
1451
- { path: l.relativePath, caseSensitive: l.caseSensitive, end: c },
1452
- d
1453
- ), h = l.route;
1454
- if (!m && c && r && !a[a.length - 1].route.index && (m = ie(
1455
- {
1456
- path: l.relativePath,
1457
- caseSensitive: l.caseSensitive,
1458
- end: !1
1459
- },
1460
- d
1461
- )), !m)
1462
- return null;
1463
- Object.assign(n, m.params), s.push({
1464
- // TODO: Can this as be avoided?
1465
- params: n,
1466
- pathname: A([o, m.pathname]),
1467
- pathnameBase: nr(
1468
- A([o, m.pathnameBase])
1469
- ),
1470
- route: h
1471
- }), m.pathnameBase !== "/" && (o = A([o, m.pathnameBase]));
1472
- }
1473
- return s;
1474
- }
1475
- function ie(e, t) {
1476
- typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
1477
- let [r, a] = Qt(
1478
- e.path,
1479
- e.caseSensitive,
1480
- e.end
1481
- ), n = t.match(r);
1482
- if (!n) return null;
1483
- let o = n[0], s = o.replace(/(.)\/+$/, "$1"), u = n.slice(1);
1484
- return {
1485
- params: a.reduce(
1486
- (c, { paramName: d, isOptional: m }, h) => {
1487
- if (d === "*") {
1488
- let g = u[h] || "";
1489
- s = o.slice(0, o.length - g.length).replace(/(.)\/+$/, "$1");
1490
- }
1491
- const b = u[h];
1492
- return m && !b ? c[d] = void 0 : c[d] = (b || "").replace(/%2F/g, "/"), c;
1493
- },
1494
- {}
1495
- ),
1496
- pathname: o,
1497
- pathnameBase: s,
1498
- pattern: e
1499
- };
1500
- }
1501
- function Qt(e, t = !1, r = !0) {
1502
- M(
1503
- e === "*" || !e.endsWith("*") || e.endsWith("/*"),
1504
- `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
1505
- );
1506
- let a = [], n = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
1507
- /\/:([\w-]+)(\?)?/g,
1508
- (s, u, l) => (a.push({ paramName: u, isOptional: l != null }), l ? "/?([^\\/]+)?" : "/([^\\/]+)")
1509
- );
1510
- return e.endsWith("*") ? (a.push({ paramName: "*" }), n += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? n += "\\/*$" : e !== "" && e !== "/" && (n += "(?:(?=\\/|$))"), [new RegExp(n, t ? void 0 : "i"), a];
1511
- }
1512
- function Zt(e) {
1513
- try {
1514
- return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
1515
- } catch (t) {
1516
- return M(
1517
- !1,
1518
- `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
1519
- ), e;
1520
- }
1521
- }
1522
- function _(e, t) {
1523
- if (t === "/") return e;
1524
- if (!e.toLowerCase().startsWith(t.toLowerCase()))
1525
- return null;
1526
- let r = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(r);
1527
- return a && a !== "/" ? null : e.slice(r) || "/";
1528
- }
1529
- function er(e, t = "/") {
1530
- let {
1531
- pathname: r,
1532
- search: a = "",
1533
- hash: n = ""
1534
- } = typeof e == "string" ? Ee(e) : e;
1535
- return {
1536
- pathname: r ? r.startsWith("/") ? r : tr(r, t) : t,
1537
- search: ar(a),
1538
- hash: or(n)
1539
- };
1540
- }
1541
- function tr(e, t) {
1542
- let r = t.replace(/\/+$/, "").split("/");
1543
- return e.split("/").forEach((n) => {
1544
- n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n);
1545
- }), r.length > 1 ? r.join("/") : "/";
1546
- }
1547
- function be(e, t, r, a) {
1548
- return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
1549
- a
1550
- )}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
1551
- }
1552
- function rr(e) {
1553
- return e.filter(
1554
- (t, r) => r === 0 || t.route.path && t.route.path.length > 0
1555
- );
1556
- }
1557
- function ke(e) {
1558
- let t = rr(e);
1559
- return t.map(
1560
- (r, a) => a === t.length - 1 ? r.pathname : r.pathnameBase
1561
- );
1562
- }
1563
- function Le(e, t, r, a = !1) {
1564
- let n;
1565
- typeof e == "string" ? n = Ee(e) : (n = { ...e }, $(
1566
- !n.pathname || !n.pathname.includes("?"),
1567
- be("?", "pathname", "search", n)
1568
- ), $(
1569
- !n.pathname || !n.pathname.includes("#"),
1570
- be("#", "pathname", "hash", n)
1571
- ), $(
1572
- !n.search || !n.search.includes("#"),
1573
- be("#", "search", "hash", n)
1574
- ));
1575
- let o = e === "" || n.pathname === "", s = o ? "/" : n.pathname, u;
1576
- if (s == null)
1577
- u = r;
1578
- else {
1579
- let m = t.length - 1;
1580
- if (!a && s.startsWith("..")) {
1581
- let h = s.split("/");
1582
- for (; h[0] === ".."; )
1583
- h.shift(), m -= 1;
1584
- n.pathname = h.join("/");
1585
- }
1586
- u = m >= 0 ? t[m] : "/";
1587
- }
1588
- let l = er(n, u), c = s && s !== "/" && s.endsWith("/"), d = (o || s === ".") && r.endsWith("/");
1589
- return !l.pathname.endsWith("/") && (c || d) && (l.pathname += "/"), l;
1590
- }
1591
- var A = (e) => e.join("/").replace(/\/\/+/g, "/"), nr = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), ar = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, or = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
1592
- function lr(e) {
1593
- return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
1594
- }
1595
- var Ze = [
1596
- "POST",
1597
- "PUT",
1598
- "PATCH",
1599
- "DELETE"
1600
- ];
1601
- new Set(
1602
- Ze
1603
- );
1604
- var sr = [
1605
- "GET",
1606
- ...Ze
1607
- ];
1608
- new Set(sr);
1609
- var q = f.createContext(null);
1610
- q.displayName = "DataRouter";
1611
- var ce = f.createContext(null);
1612
- ce.displayName = "DataRouterState";
1613
- f.createContext(!1);
1614
- var et = f.createContext({
1615
- isTransitioning: !1
1616
- });
1617
- et.displayName = "ViewTransition";
1618
- var ir = f.createContext(
1619
- /* @__PURE__ */ new Map()
1620
- );
1621
- ir.displayName = "Fetchers";
1622
- var ur = f.createContext(null);
1623
- ur.displayName = "Await";
1624
- var W = f.createContext(
1625
- null
1626
- );
1627
- W.displayName = "Navigation";
1628
- var Se = f.createContext(
1629
- null
1630
- );
1631
- Se.displayName = "Location";
1632
- var B = f.createContext({
1633
- outlet: null,
1634
- matches: [],
1635
- isDataRoute: !1
1636
- });
1637
- B.displayName = "Route";
1638
- var Re = f.createContext(null);
1639
- Re.displayName = "RouteError";
1640
- function cr(e, { relative: t } = {}) {
1641
- $(
1642
- te(),
1643
- // TODO: This error is probably because they somehow have 2 versions of the
1644
- // router loaded. We can help them understand how to avoid that.
1645
- "useHref() may be used only in the context of a <Router> component."
1646
- );
1647
- let { basename: r, navigator: a } = f.useContext(W), { hash: n, pathname: o, search: s } = re(e, { relative: t }), u = o;
1648
- return r !== "/" && (u = o === "/" ? r : A([r, o])), a.createHref({ pathname: u, search: s, hash: n });
1649
- }
1650
- function te() {
1651
- return f.useContext(Se) != null;
1652
- }
1653
- function V() {
1654
- return $(
1655
- te(),
1656
- // TODO: This error is probably because they somehow have 2 versions of the
1657
- // router loaded. We can help them understand how to avoid that.
1658
- "useLocation() may be used only in the context of a <Router> component."
1659
- ), f.useContext(Se).location;
1660
- }
1661
- var tt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
1662
- function rt(e) {
1663
- f.useContext(W).static || f.useLayoutEffect(e);
1664
- }
1665
- function nt() {
1666
- let { isDataRoute: e } = f.useContext(B);
1667
- return e ? jr() : dr();
1668
- }
1669
- function dr() {
1670
- $(
1671
- te(),
1672
- // TODO: This error is probably because they somehow have 2 versions of the
1673
- // router loaded. We can help them understand how to avoid that.
1674
- "useNavigate() may be used only in the context of a <Router> component."
1675
- );
1676
- let e = f.useContext(q), { basename: t, navigator: r } = f.useContext(W), { matches: a } = f.useContext(B), { pathname: n } = V(), o = JSON.stringify(ke(a)), s = f.useRef(!1);
1677
- return rt(() => {
1678
- s.current = !0;
1679
- }), f.useCallback(
1680
- (l, c = {}) => {
1681
- if (M(s.current, tt), !s.current) return;
1682
- if (typeof l == "number") {
1683
- r.go(l);
1684
- return;
1685
- }
1686
- let d = Le(
1687
- l,
1688
- JSON.parse(o),
1689
- n,
1690
- c.relative === "path"
1691
- );
1692
- e == null && t !== "/" && (d.pathname = d.pathname === "/" ? t : A([t, d.pathname])), (c.replace ? r.replace : r.push)(
1693
- d,
1694
- c.state,
1695
- c
1696
- );
1697
- },
1698
- [
1699
- t,
1700
- r,
1701
- o,
1702
- n,
1703
- e
1704
- ]
1705
- );
1706
- }
1707
- f.createContext(null);
1708
- function re(e, { relative: t } = {}) {
1709
- let { matches: r } = f.useContext(B), { pathname: a } = V(), n = JSON.stringify(ke(r));
1710
- return f.useMemo(
1711
- () => Le(
1712
- e,
1713
- JSON.parse(n),
1714
- a,
1715
- t === "path"
1716
- ),
1717
- [e, n, a, t]
1718
- );
1719
- }
1720
- function fr(e, t, r, a) {
1721
- $(
1722
- te(),
1723
- // TODO: This error is probably because they somehow have 2 versions of the
1724
- // router loaded. We can help them understand how to avoid that.
1725
- "useRoutes() may be used only in the context of a <Router> component."
1726
- );
1727
- let { navigator: n } = f.useContext(W), { matches: o } = f.useContext(B), s = o[o.length - 1], u = s ? s.params : {}, l = s ? s.pathname : "/", c = s ? s.pathnameBase : "/", d = s && s.route;
1728
- {
1729
- let p = d && d.path || "";
1730
- at(
1731
- l,
1732
- !d || p.endsWith("*") || p.endsWith("*?"),
1733
- `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
1734
-
1735
- Please change the parent <Route path="${p}"> to <Route path="${p === "/" ? "*" : `${p}/*`}">.`
1736
- );
1737
- }
1738
- let m = V(), h;
1739
- h = m;
1740
- let b = h.pathname || "/", g = b;
1741
- if (c !== "/") {
1742
- let p = c.replace(/^\//, "").split("/");
1743
- g = "/" + b.replace(/^\//, "").split("/").slice(p.length).join("/");
1744
- }
1745
- let v = Ge(e, { pathname: g });
1746
- return M(
1747
- d || v != null,
1748
- `No routes matched location "${h.pathname}${h.search}${h.hash}" `
1749
- ), M(
1750
- v == null || v[v.length - 1].route.element !== void 0 || v[v.length - 1].route.Component !== void 0 || v[v.length - 1].route.lazy !== void 0,
1751
- `Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
1752
- ), gr(
1753
- v && v.map(
1754
- (p) => Object.assign({}, p, {
1755
- params: Object.assign({}, u, p.params),
1756
- pathname: A([
1757
- c,
1758
- // Re-encode pathnames that were decoded inside matchRoutes
1759
- n.encodeLocation ? n.encodeLocation(p.pathname).pathname : p.pathname
1760
- ]),
1761
- pathnameBase: p.pathnameBase === "/" ? c : A([
1762
- c,
1763
- // Re-encode pathnames that were decoded inside matchRoutes
1764
- n.encodeLocation ? n.encodeLocation(p.pathnameBase).pathname : p.pathnameBase
1765
- ])
1766
- })
1767
- ),
1768
- o,
1769
- r,
1770
- a
1771
- );
1772
- }
1773
- function mr() {
1774
- let e = Cr(), t = lr(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", n = { padding: "0.5rem", backgroundColor: a }, o = { padding: "2px 4px", backgroundColor: a }, s = null;
1775
- return console.error(
1776
- "Error handled by React Router default ErrorBoundary:",
1777
- e
1778
- ), s = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ f.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ f.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ f.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ f.createElement("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ f.createElement("pre", { style: n }, r) : null, s);
1779
- }
1780
- var hr = /* @__PURE__ */ f.createElement(mr, null), pr = class extends f.Component {
1781
- constructor(e) {
1782
- super(e), this.state = {
1783
- location: e.location,
1784
- revalidation: e.revalidation,
1785
- error: e.error
1786
- };
1787
- }
1788
- static getDerivedStateFromError(e) {
1789
- return { error: e };
1790
- }
1791
- static getDerivedStateFromProps(e, t) {
1792
- return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
1793
- error: e.error,
1794
- location: e.location,
1795
- revalidation: e.revalidation
1796
- } : {
1797
- error: e.error !== void 0 ? e.error : t.error,
1798
- location: t.location,
1799
- revalidation: e.revalidation || t.revalidation
1800
- };
1801
- }
1802
- componentDidCatch(e, t) {
1803
- console.error(
1804
- "React Router caught the following error during render",
1805
- e,
1806
- t
1807
- );
1808
- }
1809
- render() {
1810
- return this.state.error !== void 0 ? /* @__PURE__ */ f.createElement(B.Provider, { value: this.props.routeContext }, /* @__PURE__ */ f.createElement(
1811
- Re.Provider,
1812
- {
1813
- value: this.state.error,
1814
- children: this.props.component
1815
- }
1816
- )) : this.props.children;
1817
- }
1818
- };
1819
- function xr({ routeContext: e, match: t, children: r }) {
1820
- let a = f.useContext(q);
1821
- return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ f.createElement(B.Provider, { value: e }, r);
1822
- }
1823
- function gr(e, t = [], r = null, a = null) {
1824
- if (e == null) {
1825
- if (!r)
1826
- return null;
1827
- if (r.errors)
1828
- e = r.matches;
1829
- else if (t.length === 0 && !r.initialized && r.matches.length > 0)
1830
- e = r.matches;
1831
- else
1832
- return null;
1833
- }
1834
- let n = e, o = r == null ? void 0 : r.errors;
1835
- if (o != null) {
1836
- let l = n.findIndex(
1837
- (c) => c.route.id && (o == null ? void 0 : o[c.route.id]) !== void 0
1838
- );
1839
- $(
1840
- l >= 0,
1841
- `Could not find a matching route for errors on route IDs: ${Object.keys(
1842
- o
1843
- ).join(",")}`
1844
- ), n = n.slice(
1845
- 0,
1846
- Math.min(n.length, l + 1)
1847
- );
1848
- }
1849
- let s = !1, u = -1;
1850
- if (r)
1851
- for (let l = 0; l < n.length; l++) {
1852
- let c = n[l];
1853
- if ((c.route.HydrateFallback || c.route.hydrateFallbackElement) && (u = l), c.route.id) {
1854
- let { loaderData: d, errors: m } = r, h = c.route.loader && !d.hasOwnProperty(c.route.id) && (!m || m[c.route.id] === void 0);
1855
- if (c.route.lazy || h) {
1856
- s = !0, u >= 0 ? n = n.slice(0, u + 1) : n = [n[0]];
1857
- break;
1858
- }
1859
- }
1860
- }
1861
- return n.reduceRight((l, c, d) => {
1862
- let m, h = !1, b = null, g = null;
1863
- r && (m = o && c.route.id ? o[c.route.id] : void 0, b = c.route.errorElement || hr, s && (u < 0 && d === 0 ? (at(
1864
- "route-fallback",
1865
- !1,
1866
- "No `HydrateFallback` element provided to render during initial hydration"
1867
- ), h = !0, g = null) : u === d && (h = !0, g = c.route.hydrateFallbackElement || null)));
1868
- let v = t.concat(n.slice(0, d + 1)), C = () => {
1869
- let p;
1870
- return m ? p = b : h ? p = g : c.route.Component ? p = /* @__PURE__ */ f.createElement(c.route.Component, null) : c.route.element ? p = c.route.element : p = l, /* @__PURE__ */ f.createElement(
1871
- xr,
1872
- {
1873
- match: c,
1874
- routeContext: {
1875
- outlet: l,
1876
- matches: v,
1877
- isDataRoute: r != null
1878
- },
1879
- children: p
1880
- }
1881
- );
1882
- };
1883
- return r && (c.route.ErrorBoundary || c.route.errorElement || d === 0) ? /* @__PURE__ */ f.createElement(
1884
- pr,
1885
- {
1886
- location: r.location,
1887
- revalidation: r.revalidation,
1888
- component: b,
1889
- error: m,
1890
- children: C(),
1891
- routeContext: { outlet: null, matches: v, isDataRoute: !0 }
1892
- }
1893
- ) : C();
1894
- }, null);
1895
- }
1896
- function Pe(e) {
1897
- return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1898
- }
1899
- function br(e) {
1900
- let t = f.useContext(q);
1901
- return $(t, Pe(e)), t;
1902
- }
1903
- function vr(e) {
1904
- let t = f.useContext(ce);
1905
- return $(t, Pe(e)), t;
1906
- }
1907
- function yr(e) {
1908
- let t = f.useContext(B);
1909
- return $(t, Pe(e)), t;
1910
- }
1911
- function $e(e) {
1912
- let t = yr(e), r = t.matches[t.matches.length - 1];
1913
- return $(
1914
- r.route.id,
1915
- `${e} can only be used on routes that contain a unique "id"`
1916
- ), r.route.id;
1917
- }
1918
- function wr() {
1919
- return $e(
1920
- "useRouteId"
1921
- /* UseRouteId */
1922
- );
1923
- }
1924
- function Cr() {
1925
- var a;
1926
- let e = f.useContext(Re), t = vr(
1927
- "useRouteError"
1928
- /* UseRouteError */
1929
- ), r = $e(
1930
- "useRouteError"
1931
- /* UseRouteError */
1932
- );
1933
- return e !== void 0 ? e : (a = t.errors) == null ? void 0 : a[r];
1934
- }
1935
- function jr() {
1936
- let { router: e } = br(
1937
- "useNavigate"
1938
- /* UseNavigateStable */
1939
- ), t = $e(
1940
- "useNavigate"
1941
- /* UseNavigateStable */
1942
- ), r = f.useRef(!1);
1943
- return rt(() => {
1944
- r.current = !0;
1945
- }), f.useCallback(
1946
- async (n, o = {}) => {
1947
- M(r.current, tt), r.current && (typeof n == "number" ? e.navigate(n) : await e.navigate(n, { fromRouteId: t, ...o }));
1948
- },
1949
- [e, t]
1950
- );
1951
- }
1952
- var Te = {};
1953
- function at(e, t, r) {
1954
- !t && !Te[e] && (Te[e] = !0, M(!1, r));
1955
- }
1956
- f.memo(Nr);
1957
- function Nr({
1958
- routes: e,
1959
- future: t,
1960
- state: r
1961
- }) {
1962
- return fr(e, void 0, r, t);
1963
- }
1964
- function ot({
1965
- to: e,
1966
- replace: t,
1967
- state: r,
1968
- relative: a
1969
- }) {
1970
- $(
1971
- te(),
1972
- // TODO: This error is probably because they somehow have 2 versions of
1973
- // the router loaded. We can help them understand how to avoid that.
1974
- "<Navigate> may be used only in the context of a <Router> component."
1975
- );
1976
- let { static: n } = f.useContext(W);
1977
- M(
1978
- !n,
1979
- "<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change."
1980
- );
1981
- let { matches: o } = f.useContext(B), { pathname: s } = V(), u = nt(), l = Le(
1982
- e,
1983
- ke(o),
1984
- s,
1985
- a === "path"
1986
- ), c = JSON.stringify(l);
1987
- return f.useEffect(() => {
1988
- u(JSON.parse(c), { replace: t, state: r, relative: a });
1989
- }, [u, c, a, t, r]), null;
1990
- }
1991
- var oe = "get", le = "application/x-www-form-urlencoded";
1992
- function de(e) {
1993
- return e != null && typeof e.tagName == "string";
1994
- }
1995
- function Er(e) {
1996
- return de(e) && e.tagName.toLowerCase() === "button";
1997
- }
1998
- function kr(e) {
1999
- return de(e) && e.tagName.toLowerCase() === "form";
2000
- }
2001
- function Lr(e) {
2002
- return de(e) && e.tagName.toLowerCase() === "input";
2003
- }
2004
- function Sr(e) {
2005
- return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
2006
- }
2007
- function Rr(e, t) {
2008
- return e.button === 0 && // Ignore everything but left clicks
2009
- (!t || t === "_self") && // Let browser handle "target=_blank" etc.
2010
- !Sr(e);
2011
- }
2012
- var ae = null;
2013
- function Pr() {
2014
- if (ae === null)
2015
- try {
2016
- new FormData(
2017
- document.createElement("form"),
2018
- // @ts-expect-error if FormData supports the submitter parameter, this will throw
2019
- 0
2020
- ), ae = !1;
2021
- } catch {
2022
- ae = !0;
2023
- }
2024
- return ae;
2025
- }
2026
- var $r = /* @__PURE__ */ new Set([
2027
- "application/x-www-form-urlencoded",
2028
- "multipart/form-data",
2029
- "text/plain"
2030
- ]);
2031
- function ve(e) {
2032
- return e != null && !$r.has(e) ? (M(
2033
- !1,
2034
- `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${le}"`
2035
- ), null) : e;
2036
- }
2037
- function Or(e, t) {
2038
- let r, a, n, o, s;
2039
- if (kr(e)) {
2040
- let u = e.getAttribute("action");
2041
- a = u ? _(u, t) : null, r = e.getAttribute("method") || oe, n = ve(e.getAttribute("enctype")) || le, o = new FormData(e);
2042
- } else if (Er(e) || Lr(e) && (e.type === "submit" || e.type === "image")) {
2043
- let u = e.form;
2044
- if (u == null)
2045
- throw new Error(
2046
- 'Cannot submit a <button> or <input type="submit"> without a <form>'
2047
- );
2048
- let l = e.getAttribute("formaction") || u.getAttribute("action");
2049
- if (a = l ? _(l, t) : null, r = e.getAttribute("formmethod") || u.getAttribute("method") || oe, n = ve(e.getAttribute("formenctype")) || ve(u.getAttribute("enctype")) || le, o = new FormData(u, e), !Pr()) {
2050
- let { name: c, type: d, value: m } = e;
2051
- if (d === "image") {
2052
- let h = c ? `${c}.` : "";
2053
- o.append(`${h}x`, "0"), o.append(`${h}y`, "0");
2054
- } else c && o.append(c, m);
2055
- }
2056
- } else {
2057
- if (de(e))
2058
- throw new Error(
2059
- 'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
2060
- );
2061
- r = oe, a = null, n = le, s = e;
2062
- }
2063
- return o && n === "text/plain" && (s = o, o = void 0), { action: a, method: r.toLowerCase(), encType: n, formData: o, body: s };
2064
- }
2065
- Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
2066
- function Oe(e, t) {
2067
- if (e === !1 || e === null || typeof e > "u")
2068
- throw new Error(t);
2069
- }
2070
- function Ir(e, t, r) {
2071
- let a = typeof e == "string" ? new URL(
2072
- e,
2073
- // This can be called during the SSR flow via PrefetchPageLinksImpl so
2074
- // don't assume window is available
2075
- typeof window > "u" ? "server://singlefetch/" : window.location.origin
2076
- ) : e;
2077
- return a.pathname === "/" ? a.pathname = `_root.${r}` : t && _(a.pathname, t) === "/" ? a.pathname = `${t.replace(/\/$/, "")}/_root.${r}` : a.pathname = `${a.pathname.replace(/\/$/, "")}.${r}`, a;
2078
- }
2079
- async function Fr(e, t) {
2080
- if (e.id in t)
2081
- return t[e.id];
2082
- try {
2083
- let r = await import(
2084
- /* @vite-ignore */
2085
- /* webpackIgnore: true */
2086
- e.module
2087
- );
2088
- return t[e.id] = r, r;
2089
- } catch (r) {
2090
- return console.error(
2091
- `Error loading route module \`${e.module}\`, reloading page...`
2092
- ), console.error(r), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
2093
- });
2094
- }
2095
- }
2096
- function Dr(e) {
2097
- return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
2098
- }
2099
- async function zr(e, t, r) {
2100
- let a = await Promise.all(
2101
- e.map(async (n) => {
2102
- let o = t.routes[n.route.id];
2103
- if (o) {
2104
- let s = await Fr(o, r);
2105
- return s.links ? s.links() : [];
2106
- }
2107
- return [];
2108
- })
2109
- );
2110
- return Br(
2111
- a.flat(1).filter(Dr).filter((n) => n.rel === "stylesheet" || n.rel === "preload").map(
2112
- (n) => n.rel === "stylesheet" ? { ...n, rel: "prefetch", as: "style" } : { ...n, rel: "prefetch" }
2113
- )
2114
- );
2115
- }
2116
- function Me(e, t, r, a, n, o) {
2117
- let s = (l, c) => r[c] ? l.route.id !== r[c].route.id : !0, u = (l, c) => {
2118
- var d;
2119
- return (
2120
- // param change, /users/123 -> /users/456
2121
- r[c].pathname !== l.pathname || // splat param changed, which is not present in match.path
2122
- // e.g. /files/images/avatar.jpg -> files/finances.xls
2123
- ((d = r[c].route.path) == null ? void 0 : d.endsWith("*")) && r[c].params["*"] !== l.params["*"]
2124
- );
2125
- };
2126
- return o === "assets" ? t.filter(
2127
- (l, c) => s(l, c) || u(l, c)
2128
- ) : o === "data" ? t.filter((l, c) => {
2129
- var m;
2130
- let d = a.routes[l.route.id];
2131
- if (!d || !d.hasLoader)
2132
- return !1;
2133
- if (s(l, c) || u(l, c))
2134
- return !0;
2135
- if (l.route.shouldRevalidate) {
2136
- let h = l.route.shouldRevalidate({
2137
- currentUrl: new URL(
2138
- n.pathname + n.search + n.hash,
2139
- window.origin
2140
- ),
2141
- currentParams: ((m = r[0]) == null ? void 0 : m.params) || {},
2142
- nextUrl: new URL(e, window.origin),
2143
- nextParams: l.params,
2144
- defaultShouldRevalidate: !0
2145
- });
2146
- if (typeof h == "boolean")
2147
- return h;
2148
- }
2149
- return !0;
2150
- }) : [];
2151
- }
2152
- function Tr(e, t, { includeHydrateFallback: r } = {}) {
2153
- return Mr(
2154
- e.map((a) => {
2155
- let n = t.routes[a.route.id];
2156
- if (!n) return [];
2157
- let o = [n.module];
2158
- return n.clientActionModule && (o = o.concat(n.clientActionModule)), n.clientLoaderModule && (o = o.concat(n.clientLoaderModule)), r && n.hydrateFallbackModule && (o = o.concat(n.hydrateFallbackModule)), n.imports && (o = o.concat(n.imports)), o;
2159
- }).flat(1)
2160
- );
2161
- }
2162
- function Mr(e) {
2163
- return [...new Set(e)];
2164
- }
2165
- function Wr(e) {
2166
- let t = {}, r = Object.keys(e).sort();
2167
- for (let a of r)
2168
- t[a] = e[a];
2169
- return t;
2170
- }
2171
- function Br(e, t) {
2172
- let r = /* @__PURE__ */ new Set();
2173
- return new Set(t), e.reduce((a, n) => {
2174
- let o = JSON.stringify(Wr(n));
2175
- return r.has(o) || (r.add(o), a.push({ key: o, link: n })), a;
2176
- }, []);
2177
- }
2178
- function lt() {
2179
- let e = f.useContext(q);
2180
- return Oe(
2181
- e,
2182
- "You must render this element inside a <DataRouterContext.Provider> element"
2183
- ), e;
2184
- }
2185
- function Hr() {
2186
- let e = f.useContext(ce);
2187
- return Oe(
2188
- e,
2189
- "You must render this element inside a <DataRouterStateContext.Provider> element"
2190
- ), e;
2191
- }
2192
- var Ie = f.createContext(void 0);
2193
- Ie.displayName = "FrameworkContext";
2194
- function st() {
2195
- let e = f.useContext(Ie);
2196
- return Oe(
2197
- e,
2198
- "You must render this element inside a <HydratedRouter> element"
2199
- ), e;
2200
- }
2201
- function Ar(e, t) {
2202
- let r = f.useContext(Ie), [a, n] = f.useState(!1), [o, s] = f.useState(!1), { onFocus: u, onBlur: l, onMouseEnter: c, onMouseLeave: d, onTouchStart: m } = t, h = f.useRef(null);
2203
- f.useEffect(() => {
2204
- if (e === "render" && s(!0), e === "viewport") {
2205
- let v = (p) => {
2206
- p.forEach((x) => {
2207
- s(x.isIntersecting);
2208
- });
2209
- }, C = new IntersectionObserver(v, { threshold: 0.5 });
2210
- return h.current && C.observe(h.current), () => {
2211
- C.disconnect();
2212
- };
2213
- }
2214
- }, [e]), f.useEffect(() => {
2215
- if (a) {
2216
- let v = setTimeout(() => {
2217
- s(!0);
2218
- }, 100);
2219
- return () => {
2220
- clearTimeout(v);
2221
- };
2222
- }
2223
- }, [a]);
2224
- let b = () => {
2225
- n(!0);
2226
- }, g = () => {
2227
- n(!1), s(!1);
2228
- };
2229
- return r ? e !== "intent" ? [o, h, {}] : [
2230
- o,
2231
- h,
2232
- {
2233
- onFocus: Z(u, b),
2234
- onBlur: Z(l, g),
2235
- onMouseEnter: Z(c, b),
2236
- onMouseLeave: Z(d, g),
2237
- onTouchStart: Z(m, b)
2238
- }
2239
- ] : [!1, h, {}];
2240
- }
2241
- function Z(e, t) {
2242
- return (r) => {
2243
- e && e(r), r.defaultPrevented || t(r);
2244
- };
2245
- }
2246
- function Ur({
2247
- page: e,
2248
- ...t
2249
- }) {
2250
- let { router: r } = lt(), a = f.useMemo(
2251
- () => Ge(r.routes, e, r.basename),
2252
- [r.routes, e, r.basename]
2253
- );
2254
- return a ? /* @__PURE__ */ f.createElement(Vr, { page: e, matches: a, ...t }) : null;
2255
- }
2256
- function _r(e) {
2257
- let { manifest: t, routeModules: r } = st(), [a, n] = f.useState([]);
2258
- return f.useEffect(() => {
2259
- let o = !1;
2260
- return zr(e, t, r).then(
2261
- (s) => {
2262
- o || n(s);
2263
- }
2264
- ), () => {
2265
- o = !0;
2266
- };
2267
- }, [e, t, r]), a;
2268
- }
2269
- function Vr({
2270
- page: e,
2271
- matches: t,
2272
- ...r
2273
- }) {
2274
- let a = V(), { manifest: n, routeModules: o } = st(), { basename: s } = lt(), { loaderData: u, matches: l } = Hr(), c = f.useMemo(
2275
- () => Me(
2276
- e,
2277
- t,
2278
- l,
2279
- n,
2280
- a,
2281
- "data"
2282
- ),
2283
- [e, t, l, n, a]
2284
- ), d = f.useMemo(
2285
- () => Me(
2286
- e,
2287
- t,
2288
- l,
2289
- n,
2290
- a,
2291
- "assets"
2292
- ),
2293
- [e, t, l, n, a]
2294
- ), m = f.useMemo(() => {
2295
- if (e === a.pathname + a.search + a.hash)
2296
- return [];
2297
- let g = /* @__PURE__ */ new Set(), v = !1;
2298
- if (t.forEach((p) => {
2299
- var y;
2300
- let x = n.routes[p.route.id];
2301
- !x || !x.hasLoader || (!c.some((j) => j.route.id === p.route.id) && p.route.id in u && ((y = o[p.route.id]) != null && y.shouldRevalidate) || x.hasClientLoader ? v = !0 : g.add(p.route.id));
2302
- }), g.size === 0)
2303
- return [];
2304
- let C = Ir(e, s, "data");
2305
- return v && g.size > 0 && C.searchParams.set(
2306
- "_routes",
2307
- t.filter((p) => g.has(p.route.id)).map((p) => p.route.id).join(",")
2308
- ), [C.pathname + C.search];
2309
- }, [
2310
- s,
2311
- u,
2312
- a,
2313
- n,
2314
- c,
2315
- t,
2316
- e,
2317
- o
2318
- ]), h = f.useMemo(
2319
- () => Tr(d, n),
2320
- [d, n]
2321
- ), b = _r(d);
2322
- return /* @__PURE__ */ f.createElement(f.Fragment, null, m.map((g) => /* @__PURE__ */ f.createElement("link", { key: g, rel: "prefetch", as: "fetch", href: g, ...r })), h.map((g) => /* @__PURE__ */ f.createElement("link", { key: g, rel: "modulepreload", href: g, ...r })), b.map(({ key: g, link: v }) => (
2323
- // these don't spread `linkProps` because they are full link descriptors
2324
- // already with their own props
2325
- /* @__PURE__ */ f.createElement("link", { key: g, ...v })
2326
- )));
2327
- }
2328
- function Jr(...e) {
2329
- return (t) => {
2330
- e.forEach((r) => {
2331
- typeof r == "function" ? r(t) : r != null && (r.current = t);
2332
- });
2333
- };
2334
- }
2335
- var it = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
2336
- try {
2337
- it && (window.__reactRouterVersion = // @ts-expect-error
2338
- "7.7.0");
2339
- } catch {
2340
- }
2341
- var ut = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ct = f.forwardRef(
2342
- function({
2343
- onClick: t,
2344
- discover: r = "render",
2345
- prefetch: a = "none",
2346
- relative: n,
2347
- reloadDocument: o,
2348
- replace: s,
2349
- state: u,
2350
- target: l,
2351
- to: c,
2352
- preventScrollReset: d,
2353
- viewTransition: m,
2354
- ...h
2355
- }, b) {
2356
- let { basename: g } = f.useContext(W), v = typeof c == "string" && ut.test(c), C, p = !1;
2357
- if (typeof c == "string" && v && (C = c, it))
2358
- try {
2359
- let S = new URL(window.location.href), I = c.startsWith("//") ? new URL(S.protocol + c) : new URL(c), H = _(I.pathname, g);
2360
- I.origin === S.origin && H != null ? c = H + I.search + I.hash : p = !0;
2361
- } catch {
2362
- M(
2363
- !1,
2364
- `<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
2365
- );
2366
- }
2367
- let x = cr(c, { relative: n }), [y, j, L] = Ar(
2368
- a,
2369
- h
2370
- ), F = Gr(c, {
2371
- replace: s,
2372
- state: u,
2373
- target: l,
2374
- preventScrollReset: d,
2375
- relative: n,
2376
- viewTransition: m
2377
- });
2378
- function k(S) {
2379
- t && t(S), S.defaultPrevented || F(S);
2380
- }
2381
- let D = (
2382
- // eslint-disable-next-line jsx-a11y/anchor-has-content
2383
- /* @__PURE__ */ f.createElement(
2384
- "a",
2385
- {
2386
- ...h,
2387
- ...L,
2388
- href: C || x,
2389
- onClick: p || o ? t : k,
2390
- ref: Jr(b, j),
2391
- target: l,
2392
- "data-discover": !v && r === "render" ? "true" : void 0
2393
- }
2394
- )
2395
- );
2396
- return y && !v ? /* @__PURE__ */ f.createElement(f.Fragment, null, D, /* @__PURE__ */ f.createElement(Ur, { page: x })) : D;
2397
- }
2398
- );
2399
- ct.displayName = "Link";
2400
- var Kr = f.forwardRef(
2401
- function({
2402
- "aria-current": t = "page",
2403
- caseSensitive: r = !1,
2404
- className: a = "",
2405
- end: n = !1,
2406
- style: o,
2407
- to: s,
2408
- viewTransition: u,
2409
- children: l,
2410
- ...c
2411
- }, d) {
2412
- let m = re(s, { relative: c.relative }), h = V(), b = f.useContext(ce), { navigator: g, basename: v } = f.useContext(W), C = b != null && // Conditional usage is OK here because the usage of a data router is static
2413
- // eslint-disable-next-line react-hooks/rules-of-hooks
2414
- tn(m) && u === !0, p = g.encodeLocation ? g.encodeLocation(m).pathname : m.pathname, x = h.pathname, y = b && b.navigation && b.navigation.location ? b.navigation.location.pathname : null;
2415
- r || (x = x.toLowerCase(), y = y ? y.toLowerCase() : null, p = p.toLowerCase()), y && v && (y = _(y, v) || y);
2416
- const j = p !== "/" && p.endsWith("/") ? p.length - 1 : p.length;
2417
- let L = x === p || !n && x.startsWith(p) && x.charAt(j) === "/", F = y != null && (y === p || !n && y.startsWith(p) && y.charAt(p.length) === "/"), k = {
2418
- isActive: L,
2419
- isPending: F,
2420
- isTransitioning: C
2421
- }, D = L ? t : void 0, S;
2422
- typeof a == "function" ? S = a(k) : S = [
2423
- a,
2424
- L ? "active" : null,
2425
- F ? "pending" : null,
2426
- C ? "transitioning" : null
2427
- ].filter(Boolean).join(" ");
2428
- let I = typeof o == "function" ? o(k) : o;
2429
- return /* @__PURE__ */ f.createElement(
2430
- ct,
2431
- {
2432
- ...c,
2433
- "aria-current": D,
2434
- className: S,
2435
- ref: d,
2436
- style: I,
2437
- to: s,
2438
- viewTransition: u
2439
- },
2440
- typeof l == "function" ? l(k) : l
2441
- );
2442
- }
2443
- );
2444
- Kr.displayName = "NavLink";
2445
- var Yr = f.forwardRef(
2446
- ({
2447
- discover: e = "render",
2448
- fetcherKey: t,
2449
- navigate: r,
2450
- reloadDocument: a,
2451
- replace: n,
2452
- state: o,
2453
- method: s = oe,
2454
- action: u,
2455
- onSubmit: l,
2456
- relative: c,
2457
- preventScrollReset: d,
2458
- viewTransition: m,
2459
- ...h
2460
- }, b) => {
2461
- let g = Zr(), v = en(u, { relative: c }), C = s.toLowerCase() === "get" ? "get" : "post", p = typeof u == "string" && ut.test(u), x = (y) => {
2462
- if (l && l(y), y.defaultPrevented) return;
2463
- y.preventDefault();
2464
- let j = y.nativeEvent.submitter, L = (j == null ? void 0 : j.getAttribute("formmethod")) || s;
2465
- g(j || y.currentTarget, {
2466
- fetcherKey: t,
2467
- method: L,
2468
- navigate: r,
2469
- replace: n,
2470
- state: o,
2471
- relative: c,
2472
- preventScrollReset: d,
2473
- viewTransition: m
2474
- });
2475
- };
2476
- return /* @__PURE__ */ f.createElement(
2477
- "form",
2478
- {
2479
- ref: b,
2480
- method: C,
2481
- action: v,
2482
- onSubmit: a ? l : x,
2483
- ...h,
2484
- "data-discover": !p && e === "render" ? "true" : void 0
2485
- }
2486
- );
2487
- }
2488
- );
2489
- Yr.displayName = "Form";
2490
- function qr(e) {
2491
- return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
2492
- }
2493
- function dt(e) {
2494
- let t = f.useContext(q);
2495
- return $(t, qr(e)), t;
2496
- }
2497
- function Gr(e, {
2498
- target: t,
2499
- replace: r,
2500
- state: a,
2501
- preventScrollReset: n,
2502
- relative: o,
2503
- viewTransition: s
2504
- } = {}) {
2505
- let u = nt(), l = V(), c = re(e, { relative: o });
2506
- return f.useCallback(
2507
- (d) => {
2508
- if (Rr(d, t)) {
2509
- d.preventDefault();
2510
- let m = r !== void 0 ? r : we(l) === we(c);
2511
- u(e, {
2512
- replace: m,
2513
- state: a,
2514
- preventScrollReset: n,
2515
- relative: o,
2516
- viewTransition: s
2517
- });
2518
- }
2519
- },
2520
- [
2521
- l,
2522
- u,
2523
- c,
2524
- r,
2525
- a,
2526
- t,
2527
- e,
2528
- n,
2529
- o,
2530
- s
2531
- ]
2532
- );
2533
- }
2534
- var Xr = 0, Qr = () => `__${String(++Xr)}__`;
2535
- function Zr() {
2536
- let { router: e } = dt(
2537
- "useSubmit"
2538
- /* UseSubmit */
2539
- ), { basename: t } = f.useContext(W), r = wr();
2540
- return f.useCallback(
2541
- async (a, n = {}) => {
2542
- let { action: o, method: s, encType: u, formData: l, body: c } = Or(
2543
- a,
2544
- t
2545
- );
2546
- if (n.navigate === !1) {
2547
- let d = n.fetcherKey || Qr();
2548
- await e.fetch(d, r, n.action || o, {
2549
- preventScrollReset: n.preventScrollReset,
2550
- formData: l,
2551
- body: c,
2552
- formMethod: n.method || s,
2553
- formEncType: n.encType || u,
2554
- flushSync: n.flushSync
2555
- });
2556
- } else
2557
- await e.navigate(n.action || o, {
2558
- preventScrollReset: n.preventScrollReset,
2559
- formData: l,
2560
- body: c,
2561
- formMethod: n.method || s,
2562
- formEncType: n.encType || u,
2563
- replace: n.replace,
2564
- state: n.state,
2565
- fromRouteId: r,
2566
- flushSync: n.flushSync,
2567
- viewTransition: n.viewTransition
2568
- });
2569
- },
2570
- [e, t, r]
2571
- );
2572
- }
2573
- function en(e, { relative: t } = {}) {
2574
- let { basename: r } = f.useContext(W), a = f.useContext(B);
2575
- $(a, "useFormAction must be used inside a RouteContext");
2576
- let [n] = a.matches.slice(-1), o = { ...re(e || ".", { relative: t }) }, s = V();
2577
- if (e == null) {
2578
- o.search = s.search;
2579
- let u = new URLSearchParams(o.search), l = u.getAll("index");
2580
- if (l.some((d) => d === "")) {
2581
- u.delete("index"), l.filter((m) => m).forEach((m) => u.append("index", m));
2582
- let d = u.toString();
2583
- o.search = d ? `?${d}` : "";
2584
- }
2585
- }
2586
- return (!e || e === ".") && n.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : A([r, o.pathname])), we(o);
2587
- }
2588
- function tn(e, t = {}) {
2589
- let r = f.useContext(et);
2590
- $(
2591
- r != null,
2592
- "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
2593
- );
2594
- let { basename: a } = dt(
2595
- "useViewTransitionState"
2596
- /* useViewTransitionState */
2597
- ), n = re(e, { relative: t.relative });
2598
- if (!r.isTransitioning)
2599
- return !1;
2600
- let o = _(r.currentLocation.pathname, a) || r.currentLocation.pathname, s = _(r.nextLocation.pathname, a) || r.nextLocation.pathname;
2601
- return ie(n.pathname, s) != null || ie(n.pathname, o) != null;
2602
- }
2603
- const Nn = ({
2604
- children: e,
2605
- fallback: t = null,
2606
- redirectTo: r = "/"
1308
+ }, mt = ({
1309
+ children: t,
1310
+ onAuthenticated: s = null,
1311
+ onLoading: n = null
2607
1312
  }) => {
2608
- const { isLoggedIn: a, loading: n } = Ae();
2609
- return n ? t : a ? /* @__PURE__ */ i.jsx(ot, { replace: !0, to: r }) : e;
2610
- }, En = ({
2611
- children: e,
2612
- fallback: t = null,
2613
- redirectTo: r = "/login"
1313
+ const { isLoggedIn: o, loading: r } = ce();
1314
+ return r ? n : o ? s : t;
1315
+ }, ft = ({
1316
+ children: t,
1317
+ onLoading: s = null,
1318
+ onUnauthenticated: n = null
2614
1319
  }) => {
2615
- const { isLoggedIn: a, loading: n } = Ae();
2616
- return n ? t : a ? e : /* @__PURE__ */ i.jsx(ot, { replace: !0, to: r });
1320
+ const { isLoggedIn: o, loading: r } = ce();
1321
+ return r ? s : o ? t : n;
2617
1322
  };
2618
1323
  export {
2619
- cn as OxAvatar,
2620
- xt as OxAvatarImage,
2621
- dn as OxAvatarText,
2622
- se as OxBadge,
2623
- De as OxButton,
2624
- fn as OxCard,
2625
- hn as OxCardContent,
2626
- pn as OxCardFooter,
2627
- mn as OxCardHeader,
2628
- xn as OxCheckbox,
2629
- je as OxDescription,
2630
- Rt as OxDropdown,
2631
- _e as OxDropdownContent,
2632
- St as OxDropdownFooter,
2633
- Ve as OxDropdownHeader,
2634
- Pt as OxDropdownItem,
2635
- gn as OxDropdownSeparator,
2636
- bn as OxDropdownShortcut,
2637
- Ye as OxDropdownTrigger,
2638
- Ne as OxErrorMessage,
2639
- Sn as OxForm,
2640
- Nn as OxGuestRoute,
2641
- U as OxIcon,
2642
- Rn as OxInput,
2643
- Ce as OxLabel,
2644
- vn as OxNotificationDropdown,
2645
- En as OxProtectedRoute,
2646
- yn as OxSelect,
2647
- wn as OxSelectLabel,
2648
- Ft as OxSelectOption,
2649
- Bt as OxSkeleton,
2650
- Cn as OxSkeletonText,
2651
- jn as OxTextarea
1324
+ Re as OxAvatar,
1325
+ je as OxAvatarImage,
1326
+ et as OxAvatarText,
1327
+ G as OxBadge,
1328
+ oe as OxButton,
1329
+ tt as OxCard,
1330
+ rt as OxCardContent,
1331
+ nt as OxCardFooter,
1332
+ st as OxCardHeader,
1333
+ ot as OxCheckbox,
1334
+ se as OxDescription,
1335
+ De as OxDropdown,
1336
+ ue as OxDropdownContent,
1337
+ $e as OxDropdownFooter,
1338
+ xe as OxDropdownHeader,
1339
+ We as OxDropdownItem,
1340
+ lt as OxDropdownSeparator,
1341
+ at as OxDropdownShortcut,
1342
+ be as OxDropdownTrigger,
1343
+ re as OxErrorMessage,
1344
+ pt as OxForm,
1345
+ mt as OxGuestRoute,
1346
+ T as OxIcon,
1347
+ gt as OxInput,
1348
+ te as OxLabel,
1349
+ it as OxNotificationDropdown,
1350
+ ft as OxProtectedRoute,
1351
+ ct as OxSelect,
1352
+ dt as OxSelectLabel,
1353
+ Pe as OxSelectOption,
1354
+ qe as OxSkeleton,
1355
+ ut as OxSkeletonText,
1356
+ xt as OxTextarea
2652
1357
  };