@exegia/corpora-ui 0.5.0

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 (71) hide show
  1. package/README.md +21 -0
  2. package/dist-lib/components/blocks/auth/auth-shell.d.ts +56 -0
  3. package/dist-lib/components/blocks/auth/code-auth-block.d.ts +22 -0
  4. package/dist-lib/components/blocks/auth/forgot-password-block.d.ts +15 -0
  5. package/dist-lib/components/blocks/auth/login-block.d.ts +25 -0
  6. package/dist-lib/components/blocks/auth/signup-block.d.ts +26 -0
  7. package/dist-lib/components/composed/password-input.d.ts +30 -0
  8. package/dist-lib/components/composed/social-providers.d.ts +22 -0
  9. package/dist-lib/components/docs/code-block.d.ts +4 -0
  10. package/dist-lib/components/docs/component-preview.d.ts +10 -0
  11. package/dist-lib/components/docs/demo-controls.d.ts +28 -0
  12. package/dist-lib/components/docs/props-table.d.ts +4 -0
  13. package/dist-lib/components/theme-provider.d.ts +15 -0
  14. package/dist-lib/components/ui/button.d.ts +28 -0
  15. package/dist-lib/components/ui/card.d.ts +16 -0
  16. package/dist-lib/components/ui/checkbox.d.ts +7 -0
  17. package/dist-lib/components/ui/field.d.ts +10 -0
  18. package/dist-lib/components/ui/frame.d.ts +7 -0
  19. package/dist-lib/components/ui/glasscn/glass-button.d.ts +6 -0
  20. package/dist-lib/components/ui/glasscn/liquid-glass.d.ts +31 -0
  21. package/dist-lib/components/ui/input-group.d.ts +13 -0
  22. package/dist-lib/components/ui/input.d.ts +9 -0
  23. package/dist-lib/components/ui/label.d.ts +11 -0
  24. package/dist-lib/components/ui/otp-field.d.ts +11 -0
  25. package/dist-lib/components/ui/separator.d.ts +4 -0
  26. package/dist-lib/components/ui/spinner.d.ts +3 -0
  27. package/dist-lib/components/ui/textarea.d.ts +8 -0
  28. package/dist-lib/index.d.ts +29 -0
  29. package/dist-lib/index.js +1617 -0
  30. package/dist-lib/index.js.map +1 -0
  31. package/dist-lib/lib/auth-accent.d.ts +33 -0
  32. package/dist-lib/lib/glass-variants.d.ts +6 -0
  33. package/dist-lib/lib/sound.d.ts +13 -0
  34. package/dist-lib/lib/utils.d.ts +2 -0
  35. package/dist-lib/lib/utils.test.d.ts +1 -0
  36. package/package.json +80 -0
  37. package/src/components/blocks/.gitkeep +0 -0
  38. package/src/components/blocks/auth/auth-shell.tsx +266 -0
  39. package/src/components/blocks/auth/code-auth-block.tsx +190 -0
  40. package/src/components/blocks/auth/forgot-password-block.tsx +123 -0
  41. package/src/components/blocks/auth/login-block.tsx +239 -0
  42. package/src/components/blocks/auth/signup-block.tsx +260 -0
  43. package/src/components/composed/.gitkeep +0 -0
  44. package/src/components/composed/password-input.tsx +179 -0
  45. package/src/components/composed/social-providers.tsx +89 -0
  46. package/src/components/docs/code-block.tsx +8 -0
  47. package/src/components/docs/component-preview.tsx +28 -0
  48. package/src/components/docs/demo-controls.tsx +118 -0
  49. package/src/components/docs/props-table.tsx +35 -0
  50. package/src/components/theme-provider.tsx +230 -0
  51. package/src/components/ui/button.tsx +199 -0
  52. package/src/components/ui/card.tsx +253 -0
  53. package/src/components/ui/checkbox.tsx +83 -0
  54. package/src/components/ui/field.tsx +89 -0
  55. package/src/components/ui/frame.tsx +87 -0
  56. package/src/components/ui/glasscn/glass-button.tsx +25 -0
  57. package/src/components/ui/glasscn/liquid-glass.tsx +276 -0
  58. package/src/components/ui/input-group.tsx +105 -0
  59. package/src/components/ui/input.tsx +70 -0
  60. package/src/components/ui/label.tsx +36 -0
  61. package/src/components/ui/otp-field.tsx +88 -0
  62. package/src/components/ui/separator.tsx +23 -0
  63. package/src/components/ui/spinner.tsx +17 -0
  64. package/src/components/ui/textarea.tsx +58 -0
  65. package/src/index.css +171 -0
  66. package/src/index.ts +37 -0
  67. package/src/lib/auth-accent.ts +49 -0
  68. package/src/lib/glass-variants.ts +57 -0
  69. package/src/lib/sound.ts +39 -0
  70. package/src/lib/utils.test.ts +22 -0
  71. package/src/lib/utils.ts +6 -0
@@ -0,0 +1,1617 @@
1
+ import { mergeProps as e } from "@base-ui/react/merge-props";
2
+ import { useRender as t } from "@base-ui/react/use-render";
3
+ import { cva as n } from "class-variance-authority";
4
+ import { clsx as r } from "clsx";
5
+ import { twMerge as i } from "tailwind-merge";
6
+ import { ArrowLeftIcon as a, CheckIcon as o, EyeIcon as s, EyeOffIcon as c, Loader2Icon as l, MailIcon as u, SmartphoneIcon as d, XIcon as f } from "lucide-react";
7
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
8
+ import * as g from "react";
9
+ import { forwardRef as _, useCallback as v, useEffect as y, useId as b, useMemo as x, useRef as S, useState as C } from "react";
10
+ import { Checkbox as w } from "@base-ui/react/checkbox";
11
+ import { bind as T, play as E, play as D, setEnabled as O, setVolume as k, sounds as ee } from "cuelume";
12
+ import { Field as A, Field as j } from "@base-ui/react/field";
13
+ import { Input as M } from "@base-ui/react/input";
14
+ import { OTPField as N } from "@base-ui/react/otp-field";
15
+ import { Separator as P } from "@base-ui/react/separator";
16
+ import { AnimatePresence as F, MotionConfig as te, motion as I } from "motion/react";
17
+ import { RiAppleFill as ne, RiGithubFill as re, RiGoogleFill as ie, RiTwitterXFill as ae } from "@remixicon/react";
18
+ //#region src/lib/utils.ts
19
+ function L(...e) {
20
+ return i(r(e));
21
+ }
22
+ //#endregion
23
+ //#region src/components/ui/spinner.tsx
24
+ function oe({ className: e, ...t }) {
25
+ return /* @__PURE__ */ m(l, {
26
+ "aria-label": "Loading",
27
+ className: L("animate-spin", e),
28
+ role: "status",
29
+ ...t
30
+ });
31
+ }
32
+ //#endregion
33
+ //#region src/components/ui/glasscn/liquid-glass.tsx
34
+ var se = 480, ce = 1.25, le = /* @__PURE__ */ new Map();
35
+ function ue() {
36
+ if (typeof navigator > "u") return !1;
37
+ let e = navigator.userAgent;
38
+ return (/Chrom(e|ium)/.test(e) || /Edg\//.test(e)) && !/Firefox/.test(e);
39
+ }
40
+ function de({ width: e, height: t, radius: n, bezel: r }) {
41
+ let i = `${e}:${t}:${n}:${r}`, a = le.get(i);
42
+ if (a !== void 0) return a;
43
+ let o = Math.min(1, se / Math.max(e, t)), s = Math.max(2, Math.round(e * o)), c = Math.max(2, Math.round(t * o)), l = document.createElement("canvas");
44
+ l.width = s, l.height = c;
45
+ let u = l.getContext("2d");
46
+ if (!u) return "";
47
+ let d = u.createImageData(s, c), f = d.data, p = e / 2, m = t / 2, h = Math.min(n, p, m), g = Math.max(1, r * Math.min(p, m));
48
+ for (let n = 0; n < c; n += 1) for (let r = 0; r < s; r += 1) {
49
+ let i = (r + .5) / s * e - p, a = (n + .5) / c * t - m, o = Math.abs(i) - (p - h), l = Math.abs(a) - (m - h), u, d = 0, _ = 0;
50
+ if (o > 0 && l > 0) {
51
+ let e = Math.hypot(o, l);
52
+ u = e - h, d = Math.sign(i) * o / e, _ = Math.sign(a) * l / e;
53
+ } else o > l ? (u = o - h, d = Math.sign(i)) : (u = l - h, _ = Math.sign(a));
54
+ let v = (n * s + r) * 4, y = -u;
55
+ if (y <= 0) {
56
+ f[v] = 128, f[v + 1] = 128, f[v + 2] = 128, f[v + 3] = 255;
57
+ continue;
58
+ }
59
+ let b = 1 - fe(Math.min(1, y / g));
60
+ b *= Math.min(1, y / ce), f[v] = Math.round(128 + d * b * 127), f[v + 1] = Math.round(128 + _ * b * 127), f[v + 2] = 128, f[v + 3] = 255;
61
+ }
62
+ u.putImageData(d, 0, 0);
63
+ let _ = l.toDataURL("image/png");
64
+ return le.set(i, _), _;
65
+ }
66
+ function fe(e) {
67
+ return (1 - (1 - e) ** 4) ** .25;
68
+ }
69
+ var pe = _(function({ blur: e = 2, refraction: t = 15, mapSize: n, bezel: r = .34, saturation: i = 1.28, className: a, style: o, children: s, ...c }, l) {
70
+ let u = b(), d = x(() => `liquid-glass-${u.replace(/:/g, "")}`, [u]);
71
+ console.log(n);
72
+ let f = S(null), g = v((e) => {
73
+ f.current = e, typeof l == "function" ? l(e) : l && (l.current = e);
74
+ }, [l]), [_, w] = C(null);
75
+ y(() => {
76
+ let e = f.current;
77
+ if (!e) return;
78
+ let t = () => {
79
+ let t = e.getBoundingClientRect(), n = Math.round(t.width), i = Math.round(t.height);
80
+ if (!n || !i) return;
81
+ let a = Number.parseFloat(getComputedStyle(e).borderTopLeftRadius), o = Math.min(Number.isFinite(a) ? a : Math.min(n, i) / 2, n / 2, i / 2);
82
+ w((e) => e && e.width === n && e.height === i && e.radius === o && e.bezel === r ? e : {
83
+ width: n,
84
+ height: i,
85
+ radius: o,
86
+ bezel: r
87
+ });
88
+ };
89
+ t();
90
+ let n = new ResizeObserver(t);
91
+ return n.observe(e), () => n.disconnect();
92
+ }, [r]);
93
+ let T = x(() => _ ? de(_) : "", [_]), [E, D] = C(!1);
94
+ y(() => {
95
+ D(ue());
96
+ }, []);
97
+ let O = E && T !== "", k = O ? `url(#${d}) blur(${e}px) saturate(${i})` : `blur(${e + 2}px) saturate(${i})`;
98
+ return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
99
+ ref: g,
100
+ className: L("relative overflow-hidden rounded-full bg-white/[0.08]", a),
101
+ style: {
102
+ ...o,
103
+ backdropFilter: k,
104
+ WebkitBackdropFilter: k
105
+ },
106
+ ...c,
107
+ children: [s, /* @__PURE__ */ m("span", {
108
+ "aria-hidden": !0,
109
+ className: "pointer-events-none absolute inset-0 rounded-[inherit]",
110
+ style: {
111
+ padding: "var(--liquid-glass-rim-width, 0.5px)",
112
+ background: "linear-gradient(to right, rgba(255,255,255,0), var(--liquid-glass-rim-light, rgba(255,255,255,0.25)) var(--liquid-glass-rim-fade, 18%), var(--liquid-glass-rim-light, rgba(255,255,255,0.25)) calc(100% - var(--liquid-glass-rim-fade, 18%)), rgba(255,255,255,0)), linear-gradient(to bottom, rgba(0,0,0,0), var(--liquid-glass-rim-dark, rgba(0,0,0,0.2)) var(--liquid-glass-rim-fade, 18%), var(--liquid-glass-rim-dark, rgba(0,0,0,0.2)) calc(100% - var(--liquid-glass-rim-fade, 18%)), rgba(0,0,0,0))",
113
+ WebkitMask: "linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",
114
+ WebkitMaskComposite: "xor",
115
+ mask: "linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0)"
116
+ }
117
+ })]
118
+ }), O && /* @__PURE__ */ m("svg", {
119
+ className: "absolute size-0 overflow-hidden",
120
+ "aria-hidden": !0,
121
+ children: /* @__PURE__ */ h("filter", {
122
+ id: d,
123
+ x: "0",
124
+ y: "0",
125
+ width: "100%",
126
+ height: "100%",
127
+ colorInterpolationFilters: "sRGB",
128
+ children: [
129
+ /* @__PURE__ */ m("feImage", {
130
+ href: T,
131
+ x: "0",
132
+ y: "0",
133
+ width: "100%",
134
+ height: "100%",
135
+ preserveAspectRatio: "none",
136
+ result: "map"
137
+ }),
138
+ /* @__PURE__ */ m("feDisplacementMap", {
139
+ in: "SourceGraphic",
140
+ in2: "map",
141
+ scale: t,
142
+ xChannelSelector: "R",
143
+ yChannelSelector: "G",
144
+ result: "displaced"
145
+ }),
146
+ /* @__PURE__ */ m("feGaussianBlur", {
147
+ in: "displaced",
148
+ stdDeviation: "0.15"
149
+ })
150
+ ]
151
+ })
152
+ })] });
153
+ }), me = {
154
+ clear: [
155
+ "backdrop-blur-[2px] backdrop-saturate-[1.9]",
156
+ "bg-white/[0.25] dark:bg-black/[0.25]",
157
+ "border border-white/[0.5] dark:border-white/[0.12]",
158
+ "shadow-[0_1px_12px_rgba(0,0,0,0.05)] dark:shadow-[0_1px_12px_rgba(0,0,0,0.2)]"
159
+ ].join(" "),
160
+ frosted: [
161
+ "backdrop-blur-[16px] backdrop-saturate-[1.6]",
162
+ "bg-white/[0.55] dark:bg-black/[0.35]",
163
+ "border border-white/[0.4] dark:border-white/10",
164
+ "shadow-[0_2px_20px_rgba(0,0,0,0.06)] dark:shadow-[0_2px_20px_rgba(0,0,0,0.3)]"
165
+ ].join(" "),
166
+ subtle: [
167
+ "backdrop-blur-[4px] backdrop-saturate-[1.5]",
168
+ "bg-white/[0.3] dark:bg-white/[0.06]",
169
+ "border border-black/[0.05] dark:border-white/[0.08]",
170
+ "shadow-sm"
171
+ ].join(" "),
172
+ liquid: [
173
+ "backdrop-blur-[12px] backdrop-saturate-[1.8] backdrop-brightness-[1.05]",
174
+ "dark:backdrop-saturate-[1.6] dark:backdrop-brightness-[0.95]",
175
+ "bg-white/[0.10] dark:bg-white/[0.04]",
176
+ "[background-image:radial-gradient(120%_85%_at_15%_8%,rgba(255,255,255,0.55)_0%,rgba(255,255,255,0.18)_38%,rgba(255,255,255,0)_70%),radial-gradient(110%_80%_at_85%_100%,rgba(255,210,230,0.22)_0%,rgba(255,255,255,0)_60%),linear-gradient(180deg,rgba(255,255,255,0.28)_0%,rgba(255,255,255,0.12)_100%)]",
177
+ "dark:[background-image:radial-gradient(120%_85%_at_15%_8%,rgba(255,255,255,0.18)_0%,rgba(255,255,255,0.05)_40%,rgba(255,255,255,0)_70%),radial-gradient(110%_80%_at_85%_100%,rgba(120,170,255,0.12)_0%,rgba(0,0,0,0)_60%),linear-gradient(180deg,rgba(255,255,255,0.06)_0%,rgba(0,0,0,0.18)_100%)]",
178
+ "[background-size:200%_200%,180%_180%,100%_100%]",
179
+ "[background-repeat:no-repeat]",
180
+ "shadow-[inset_0_1px_0_0_rgba(255,255,255,0.65),inset_0_-12px_24px_-10px_rgba(255,255,255,0.45),inset_1px_0_0_0_rgba(255,255,255,0.22),inset_-1px_0_0_0_rgba(255,255,255,0.18),0_24px_60px_-18px_rgba(15,23,42,0.30),0_8px_24px_-8px_rgba(15,23,42,0.18)]",
181
+ "dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.30),inset_0_-14px_28px_-10px_rgba(180,210,255,0.18),inset_1px_0_0_0_rgba(255,255,255,0.10),inset_-1px_0_0_0_rgba(255,255,255,0.08),0_28px_70px_-18px_rgba(0,0,0,0.55),0_10px_28px_-10px_rgba(0,0,0,0.40)]",
182
+ "border border-white/[0.45] dark:border-white/[0.10]",
183
+ "animate-[liquid-drift_18s_ease-in-out_infinite] motion-reduce:animate-none",
184
+ "[will-change:background-position]"
185
+ ].join(" "),
186
+ "liquid-refract": ""
187
+ }, he = n("relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-base outline-none transition-[scale,box-shadow,width,height,background-color,border-color] [transition-duration:150ms,150ms,300ms,300ms,150ms,150ms] ease-smooth-out active:scale-97 data-pressed:scale-97 motion-reduce:transition-none motion-reduce:active:scale-100 motion-reduce:data-pressed:scale-100 [&_svg]:transition-transform [&_svg]:duration-150 [&_svg]:ease-smooth-out motion-reduce:[&_svg]:transition-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 data-loading:select-none sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0", {
188
+ compoundVariants: [{
189
+ class: "h-auto border-0 px-0 align-middle sm:h-auto",
190
+ size: [
191
+ "xs",
192
+ "sm",
193
+ "default",
194
+ "lg",
195
+ "xl"
196
+ ],
197
+ variant: "link"
198
+ }],
199
+ defaultVariants: {
200
+ size: "default",
201
+ variant: "default"
202
+ },
203
+ variants: {
204
+ size: {
205
+ default: "h-9 px-[calc(--spacing(3)-1px)] sm:h-8",
206
+ icon: "size-9 sm:size-8",
207
+ "icon-lg": "size-10 sm:size-9",
208
+ "icon-sm": "size-8 sm:size-7",
209
+ "icon-xl": "size-11 sm:size-10 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
210
+ "icon-xs": "size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5",
211
+ lg: "h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9",
212
+ sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:h-7",
213
+ xl: "h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
214
+ xs: "h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5"
215
+ },
216
+ variant: {
217
+ default: "not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 data-pressed:bg-primary/90 *:data-[slot=button-loading-indicator]:text-primary-foreground [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none",
218
+ destructive: "not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 data-pressed:bg-destructive/90 *:data-[slot=button-loading-indicator]:text-white [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none",
219
+ "destructive-outline": "border-input bg-popover not-dark:bg-clip-padding text-destructive-foreground shadow-xs/5 not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] hover:border-destructive/32 hover:bg-destructive/4 data-pressed:border-destructive/32 data-pressed:bg-destructive/4 *:data-[slot=button-loading-indicator]:text-foreground dark:bg-input/32 dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none",
220
+ ghost: "border-transparent text-foreground hover:bg-accent data-pressed:bg-accent *:data-[slot=button-loading-indicator]:text-foreground",
221
+ glass: "border-transparent text-foreground *:data-[slot=button-loading-indicator]:text-foreground",
222
+ link: "border-transparent text-foreground underline-offset-4 hover:underline data-pressed:underline *:data-[slot=button-loading-indicator]:text-foreground",
223
+ outline: "border-input bg-popover not-dark:bg-clip-padding text-foreground shadow-xs/5 not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] hover:bg-accent/50 data-pressed:bg-accent/50 *:data-[slot=button-loading-indicator]:text-foreground dark:bg-input/32 dark:data-pressed:bg-input/64 dark:hover:bg-input/64 dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none",
224
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 data-pressed:bg-secondary/90 *:data-[slot=button-loading-indicator]:text-secondary-foreground [:active,[data-pressed]]:bg-secondary/80"
225
+ }
226
+ }
227
+ });
228
+ function R({ className: n, variant: r, size: i, render: a, children: o, loading: s = !1, disabled: c, glassVariant: l, sound: u = !0, ...d }) {
229
+ let f = !!(s || c), g = a ? void 0 : "button", _ = r === "glass" ? l ?? "liquid-refract" : void 0, v = _ === "liquid-refract", y = (i ?? "default").startsWith("icon"), b = t({
230
+ defaultTagName: "button",
231
+ props: e({
232
+ children: /* @__PURE__ */ h(p, { children: [
233
+ !y && /* @__PURE__ */ m("span", {
234
+ "aria-hidden": !s || void 0,
235
+ "data-slot": "button-loading-indicator",
236
+ className: L("pointer-events-none inline-flex shrink-0 items-center overflow-hidden transition-[max-width,margin-inline-start,opacity,filter] duration-300 ease-smooth-out motion-reduce:transition-none", s ? "max-w-6" : L("max-w-0 opacity-0 blur-[2px]", i === "xs" ? "-ms-1" : i === "sm" ? "-ms-1.5" : "-ms-2")),
237
+ children: /* @__PURE__ */ m(oe, { className: s ? void 0 : "animate-none" })
238
+ }),
239
+ o,
240
+ s && y && /* @__PURE__ */ m(oe, {
241
+ className: "pointer-events-none absolute",
242
+ "data-slot": "button-loading-indicator"
243
+ })
244
+ ] }),
245
+ className: L(he({
246
+ size: i,
247
+ variant: r
248
+ }), !y && "hover:[&_svg:not([class*='animate-'])]:scale-110 motion-reduce:hover:[&_svg]:scale-100", s && y && "data-loading:text-transparent", _ && me[_], v && "bg-transparent border-0 shadow-none", n),
249
+ "aria-disabled": s || void 0,
250
+ "data-cuelume-press": u ? "" : void 0,
251
+ "data-cuelume-release": u ? "" : void 0,
252
+ "data-loading": s ? "" : void 0,
253
+ "data-glass-variant": _,
254
+ "data-slot": "button",
255
+ disabled: f,
256
+ type: g
257
+ }, d),
258
+ render: a
259
+ });
260
+ return v ? /* @__PURE__ */ m(pe, { children: b }) : b;
261
+ }
262
+ //#endregion
263
+ //#region src/components/ui/card.tsx
264
+ function ge({ className: n, render: r, ...i }) {
265
+ return t({
266
+ defaultTagName: "div",
267
+ props: e({
268
+ className: L("relative flex flex-col rounded-2xl border bg-card not-dark:bg-clip-padding text-card-foreground shadow-xs/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", n),
269
+ "data-slot": "card"
270
+ }, i),
271
+ render: r
272
+ });
273
+ }
274
+ function _e({ className: n, render: r, ...i }) {
275
+ return t({
276
+ defaultTagName: "div",
277
+ props: e({
278
+ className: L("relative flex flex-col rounded-2xl border bg-card not-dark:bg-clip-padding text-card-foreground shadow-xs/5 [--clip-bottom:-1rem] [--clip-top:-1rem] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:bg-muted/72 before:shadow-[0_1px_--theme(--color-black/4%)] has-data-[slot=table-container]:overflow-hidden *:data-[slot=card]:-m-px *:data-[slot=table-container]:-m-px *:data-[slot=table-container]:w-[calc(100%+2px)] *:not-first:data-[slot=card]:rounded-t-xl *:not-last:data-[slot=card]:rounded-b-xl *:data-[slot=card]:bg-clip-padding *:data-[slot=card]:shadow-none *:data-[slot=card]:before:hidden *:not-first:data-[slot=card]:before:rounded-t-[calc(var(--radius-xl)-1px)] *:not-last:data-[slot=card]:before:rounded-b-[calc(var(--radius-xl)-1px)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)] *:data-[slot=card]:[clip-path:inset(var(--clip-top)_1px_var(--clip-bottom)_1px_round_calc(var(--radius-2xl)-1px))] *:data-[slot=card]:last:[--clip-bottom:1px] *:data-[slot=card]:first:[--clip-top:1px]", n),
279
+ "data-slot": "card-frame"
280
+ }, i),
281
+ render: r
282
+ });
283
+ }
284
+ function ve({ className: n, render: r, ...i }) {
285
+ return t({
286
+ defaultTagName: "div",
287
+ props: e({
288
+ className: L("relative flex grid auto-rows-min grid-rows-[auto_auto] flex-col items-start gap-x-4 px-6 py-4 has-data-[slot=card-frame-action]:grid-cols-[1fr_auto]", n),
289
+ "data-slot": "card-frame-header"
290
+ }, i),
291
+ render: r
292
+ });
293
+ }
294
+ function ye({ className: n, render: r, ...i }) {
295
+ return t({
296
+ defaultTagName: "div",
297
+ props: e({
298
+ className: L("self-center font-semibold text-sm", n),
299
+ "data-slot": "card-frame-title"
300
+ }, i),
301
+ render: r
302
+ });
303
+ }
304
+ function be({ className: n, render: r, ...i }) {
305
+ return t({
306
+ defaultTagName: "div",
307
+ props: e({
308
+ className: L("self-center text-muted-foreground text-sm", n),
309
+ "data-slot": "card-frame-description"
310
+ }, i),
311
+ render: r
312
+ });
313
+ }
314
+ function xe({ className: n, render: r, ...i }) {
315
+ return t({
316
+ defaultTagName: "div",
317
+ props: e({
318
+ className: L("col-start-2 nth-3:row-span-2 nth-3:row-start-1 inline-flex self-center justify-self-end", n),
319
+ "data-slot": "card-frame-action"
320
+ }, i),
321
+ render: r
322
+ });
323
+ }
324
+ function Se({ className: n, render: r, ...i }) {
325
+ return t({
326
+ defaultTagName: "div",
327
+ props: e({
328
+ className: L("px-6 py-4", n),
329
+ "data-slot": "card-frame-footer"
330
+ }, i),
331
+ render: r
332
+ });
333
+ }
334
+ function Ce({ className: n, render: r, ...i }) {
335
+ return t({
336
+ defaultTagName: "div",
337
+ props: e({
338
+ className: L("grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 p-6 in-[[data-slot=card]:has(>[data-slot=card-panel])]:pb-4 has-data-[slot=card-action]:grid-cols-[1fr_auto]", n),
339
+ "data-slot": "card-header"
340
+ }, i),
341
+ render: r
342
+ });
343
+ }
344
+ function we({ className: n, render: r, ...i }) {
345
+ return t({
346
+ defaultTagName: "div",
347
+ props: e({
348
+ className: L("font-heading font-semibold text-lg leading-none", n),
349
+ "data-slot": "card-title"
350
+ }, i),
351
+ render: r
352
+ });
353
+ }
354
+ function Te({ className: n, render: r, ...i }) {
355
+ return t({
356
+ defaultTagName: "div",
357
+ props: e({
358
+ className: L("text-muted-foreground text-sm", n),
359
+ "data-slot": "card-description"
360
+ }, i),
361
+ render: r
362
+ });
363
+ }
364
+ function Ee({ className: n, render: r, ...i }) {
365
+ return t({
366
+ defaultTagName: "div",
367
+ props: e({
368
+ className: L("col-start-2 row-span-2 row-start-1 inline-flex self-start justify-self-end", n),
369
+ "data-slot": "card-action"
370
+ }, i),
371
+ render: r
372
+ });
373
+ }
374
+ function z({ className: n, render: r, ...i }) {
375
+ return t({
376
+ defaultTagName: "div",
377
+ props: e({
378
+ className: L("flex-1 p-6 in-[[data-slot=card]:has(>[data-slot=card-header]:not(.border-b))]:pt-0 in-[[data-slot=card]:has(>[data-slot=card-footer]:not(.border-t))]:pb-0", n),
379
+ "data-slot": "card-panel"
380
+ }, i),
381
+ render: r
382
+ });
383
+ }
384
+ function De({ className: n, render: r, ...i }) {
385
+ return t({
386
+ defaultTagName: "div",
387
+ props: e({
388
+ className: L("flex items-center p-6 in-[[data-slot=card]:has(>[data-slot=card-panel])]:pt-4", n),
389
+ "data-slot": "card-footer"
390
+ }, i),
391
+ render: r
392
+ });
393
+ }
394
+ //#endregion
395
+ //#region src/lib/sound.ts
396
+ var Oe = !1;
397
+ function ke(e) {
398
+ Oe = !0, T(e);
399
+ }
400
+ function B(e, t) {
401
+ Oe && E(e, t);
402
+ }
403
+ //#endregion
404
+ //#region src/components/ui/checkbox.tsx
405
+ function V({ className: e, sound: t = !0, onCheckedChange: n, ...r }) {
406
+ return /* @__PURE__ */ m(w.Root, {
407
+ onCheckedChange: (e, r) => {
408
+ t && B("toggle"), n?.(e, r);
409
+ },
410
+ className: L("relative inline-flex size-4.5 shrink-0 cursor-pointer items-center justify-center rounded-[.25rem] border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none ring-ring transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[3px] not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-offset-background aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/48 data-disabled:cursor-not-allowed data-disabled:opacity-64 sm:size-4 dark:not-data-checked:bg-input/32 dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none", e),
411
+ "data-slot": "checkbox",
412
+ ...r,
413
+ children: /* @__PURE__ */ m(w.Indicator, {
414
+ className: "absolute -inset-px flex items-center justify-center rounded-[.25rem] text-primary-foreground data-unchecked:hidden data-checked:bg-primary data-indeterminate:text-foreground",
415
+ "data-slot": "checkbox-indicator",
416
+ render: (e, t) => /* @__PURE__ */ m("span", {
417
+ ...e,
418
+ children: t.indeterminate ? /* @__PURE__ */ m("svg", {
419
+ "aria-hidden": "true",
420
+ className: "size-3.5 sm:size-3",
421
+ fill: "none",
422
+ height: "24",
423
+ stroke: "currentColor",
424
+ strokeLinecap: "round",
425
+ strokeLinejoin: "round",
426
+ strokeWidth: "3",
427
+ viewBox: "0 0 24 24",
428
+ width: "24",
429
+ xmlns: "http://www.w3.org/2000/svg",
430
+ children: /* @__PURE__ */ m("path", { d: "M5.252 12h13.496" })
431
+ }) : /* @__PURE__ */ m("svg", {
432
+ "aria-hidden": "true",
433
+ className: "size-3.5 sm:size-3",
434
+ fill: "none",
435
+ height: "24",
436
+ stroke: "currentColor",
437
+ strokeLinecap: "round",
438
+ strokeLinejoin: "round",
439
+ strokeWidth: "3",
440
+ viewBox: "0 0 24 24",
441
+ width: "24",
442
+ xmlns: "http://www.w3.org/2000/svg",
443
+ children: /* @__PURE__ */ m("path", { d: "M5.252 12.7 10.2 18.63 18.748 5.37" })
444
+ })
445
+ })
446
+ })
447
+ });
448
+ }
449
+ //#endregion
450
+ //#region src/components/ui/field.tsx
451
+ function H({ className: e, ...t }) {
452
+ return /* @__PURE__ */ m(j.Root, {
453
+ className: L("flex flex-col items-start gap-2", e),
454
+ "data-slot": "field",
455
+ ...t
456
+ });
457
+ }
458
+ function U({ className: e, ...t }) {
459
+ return /* @__PURE__ */ m(j.Label, {
460
+ className: L("inline-flex cursor-pointer items-center gap-2 font-medium text-base/4 text-foreground data-disabled:cursor-not-allowed data-disabled:opacity-64 sm:text-xs/3.5 ml-3", e),
461
+ "data-slot": "field-label",
462
+ ...t
463
+ });
464
+ }
465
+ function Ae({ className: e, ...t }) {
466
+ return /* @__PURE__ */ m(j.Item, {
467
+ className: L("flex", e),
468
+ "data-slot": "field-item",
469
+ ...t
470
+ });
471
+ }
472
+ function je({ className: e, ...t }) {
473
+ return /* @__PURE__ */ m(j.Description, {
474
+ className: L("overflow-hidden text-muted-foreground text-xs transition-[height,opacity,filter,translate] duration-300 ease-smooth-out starting:h-0 starting:translate-y-1 starting:opacity-0 starting:blur-[2px] motion-reduce:transition-none", e),
475
+ "data-slot": "field-description",
476
+ ...t
477
+ });
478
+ }
479
+ function Me({ className: e, ...t }) {
480
+ return /* @__PURE__ */ m(j.Error, {
481
+ className: L("overflow-hidden text-destructive-foreground text-xs transition-[height,opacity,filter,translate] duration-300 ease-smooth-out starting:h-0 starting:translate-y-1 starting:opacity-0 starting:blur-[2px] motion-reduce:transition-none", e),
482
+ "data-slot": "field-error",
483
+ ...t
484
+ });
485
+ }
486
+ var Ne = j.Control, Pe = j.Validity;
487
+ //#endregion
488
+ //#region src/components/ui/frame.tsx
489
+ function Fe({ className: e, ...t }) {
490
+ return /* @__PURE__ */ m("div", {
491
+ className: L("relative flex flex-col rounded-2xl bg-muted/72 p-1", "*:[[data-slot=frame-panel]+[data-slot=frame-panel]]:mt-1", e),
492
+ "data-slot": "frame",
493
+ ...t
494
+ });
495
+ }
496
+ function Ie({ className: e, ...t }) {
497
+ return /* @__PURE__ */ m("div", {
498
+ className: L("relative rounded-xl border bg-background bg-clip-padding p-5 shadow-xs/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", e),
499
+ "data-slot": "frame-panel",
500
+ ...t
501
+ });
502
+ }
503
+ function Le({ className: e, ...t }) {
504
+ return /* @__PURE__ */ m("header", {
505
+ className: L("flex flex-col px-5 py-4", e),
506
+ "data-slot": "frame-panel-header",
507
+ ...t
508
+ });
509
+ }
510
+ function Re({ className: e, ...t }) {
511
+ return /* @__PURE__ */ m("div", {
512
+ className: L("font-semibold text-sm", e),
513
+ "data-slot": "frame-panel-title",
514
+ ...t
515
+ });
516
+ }
517
+ function ze({ className: e, ...t }) {
518
+ return /* @__PURE__ */ m("div", {
519
+ className: L("text-muted-foreground text-sm", e),
520
+ "data-slot": "frame-panel-description",
521
+ ...t
522
+ });
523
+ }
524
+ function Be({ className: e, ...t }) {
525
+ return /* @__PURE__ */ m("footer", {
526
+ className: L("px-5 py-4", e),
527
+ "data-slot": "frame-panel-footer",
528
+ ...t
529
+ });
530
+ }
531
+ //#endregion
532
+ //#region src/components/ui/input.tsx
533
+ function W({ className: e, size: t = "default", unstyled: n = !1, nativeInput: r = !1, style: i, ...a }) {
534
+ let o = L("h-8.5 w-full min-w-0 rounded-[inherit] px-[calc(--spacing(3)-1px)] leading-8.5 outline-none [transition:background-color_5000000s_ease-in-out_0s,height_300ms_var(--ease-smooth-out),line-height_300ms_var(--ease-smooth-out),padding_300ms_var(--ease-smooth-out),font-size_300ms_var(--ease-smooth-out)] placeholder:text-muted-foreground/72 motion-reduce:[transition:background-color_5000000s_ease-in-out_0s] sm:h-7.5 sm:leading-7.5", t === "sm" && "h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5", t === "lg" && "h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5", a.type === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none", a.type === "file" && "text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm");
535
+ return /* @__PURE__ */ m("span", {
536
+ className: L(!n && "relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-[box-shadow,border-color] duration-150 ease-smooth-out has-aria-invalid:animate-input-shake motion-reduce:animate-none motion-reduce:transition-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-autofill:bg-foreground/4 has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] sm:text-sm dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]", e) || void 0,
537
+ "data-size": t,
538
+ "data-slot": "input-control",
539
+ children: r ? /* @__PURE__ */ m("input", {
540
+ className: o,
541
+ "data-slot": "input",
542
+ size: typeof t == "number" ? t : void 0,
543
+ style: typeof i == "function" ? void 0 : i,
544
+ ...a
545
+ }) : /* @__PURE__ */ m(M, {
546
+ className: o,
547
+ "data-slot": "input",
548
+ size: typeof t == "number" ? t : void 0,
549
+ style: i,
550
+ ...a
551
+ })
552
+ });
553
+ }
554
+ //#endregion
555
+ //#region src/components/ui/textarea.tsx
556
+ function Ve({ className: t, size: n = "default", unstyled: r = !1, ref: i, ...a }) {
557
+ return /* @__PURE__ */ m("span", {
558
+ className: L(!r && "relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] sm:text-sm dark:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]", t) || void 0,
559
+ "data-size": n,
560
+ "data-slot": "textarea-control",
561
+ children: /* @__PURE__ */ m(A.Control, {
562
+ ref: i,
563
+ value: a.value,
564
+ defaultValue: a.defaultValue,
565
+ disabled: a.disabled,
566
+ id: a.id,
567
+ name: a.name,
568
+ render: (t) => /* @__PURE__ */ m("textarea", {
569
+ className: L("field-sizing-content min-h-17.5 w-full rounded-[inherit] px-[calc(--spacing(3)-1px)] py-[calc(--spacing(1.5)-1px)] outline-none max-sm:min-h-20.5", n === "sm" && "min-h-16.5 px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1)-1px)] max-sm:min-h-19.5", n === "lg" && "min-h-18.5 py-[calc(--spacing(2)-1px)] max-sm:min-h-21.5"),
570
+ "data-slot": "textarea",
571
+ ...e(t, a)
572
+ })
573
+ })
574
+ });
575
+ }
576
+ //#endregion
577
+ //#region src/components/ui/input-group.tsx
578
+ var He = n("flex h-auto cursor-text select-none items-center justify-center gap-2 leading-none [&>kbd]:rounded-[calc(var(--radius)-5px)] in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4.5 sm:in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4 [&_svg]:-mx-0.5 not-has-[button]:**:[svg:not([class*='opacity-'])]:opacity-80", {
579
+ defaultVariants: { align: "inline-start" },
580
+ variants: { align: {
581
+ "block-end": "order-last w-full justify-start px-[calc(--spacing(3)-1px)] pb-[calc(--spacing(3)-1px)] [.border-t]:pt-[calc(--spacing(3)-1px)] [[data-size=sm]+&]:px-[calc(--spacing(2.5)-1px)]",
582
+ "block-start": "order-first w-full justify-start px-[calc(--spacing(3)-1px)] pt-[calc(--spacing(3)-1px)] [.border-b]:pb-[calc(--spacing(3)-1px)] [[data-size=sm]+&]:px-[calc(--spacing(2.5)-1px)]",
583
+ "inline-end": "order-last pe-[calc(--spacing(3)-1px)] has-[>:last-child[data-slot=badge]]:-me-1.5 has-[>button]:-me-2 has-[>kbd:last-child]:me-[-0.35rem] [[data-size=sm]+&]:pe-[calc(--spacing(2.5)-1px)]",
584
+ "inline-start": "order-first ps-[calc(--spacing(3)-1px)] has-[>:last-child[data-slot=badge]]:-ms-1.5 has-[>button]:-ms-2 has-[>kbd:last-child]:ms-[-0.35rem] [[data-size=sm]+&]:ps-[calc(--spacing(2.5)-1px)]"
585
+ } }
586
+ });
587
+ function Ue({ className: e, ...t }) {
588
+ return /* @__PURE__ */ m("div", {
589
+ className: L("relative inline-flex w-full min-w-0 items-center rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_1px_--theme(--color-black/4%)] has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/64 has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/16 has-[textarea]:h-auto has-data-[align=block-end]:h-auto has-data-[align=block-start]:h-auto has-data-[align=block-end]:flex-col has-data-[align=block-start]:flex-col has-[input:focus-visible,textarea:focus-visible]:border-ring has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/36 has-autofill:bg-foreground/4 has-[input:disabled,textarea:disabled]:opacity-64 has-[input:disabled,textarea:disabled,input:focus-visible,textarea:focus-visible,input[aria-invalid],textarea[aria-invalid]]:shadow-none has-[input:focus-visible,textarea:focus-visible]:ring-[3px] sm:text-sm dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/24 dark:not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_-1px_--theme(--color-white/6%)] has-data-[align=inline-start]:**:[[data-size=sm]_input]:ps-1.5 has-data-[align=inline-end]:**:[[data-size=sm]_input]:pe-1.5 *:[[data-slot=input-control],[data-slot=textarea-control]]:contents *:[[data-slot=input-control],[data-slot=textarea-control]]:before:hidden has-[[data-align=block-start],[data-align=block-end]]:**:[input]:h-auto has-data-[align=inline-start]:**:[input]:ps-2 has-data-[align=inline-end]:**:[input]:pe-2 has-data-[align=block-end]:**:[input]:pt-1.5 has-data-[align=block-start]:**:[input]:pb-1.5 **:[textarea]:min-h-20.5 **:[textarea]:resize-none **:[textarea]:py-[calc(--spacing(3)-1px)] **:[textarea]:max-sm:min-h-23.5 **:[textarea_button]:rounded-[calc(var(--radius-md)-1px)]", e),
590
+ "data-slot": "input-group",
591
+ role: "group",
592
+ ...t
593
+ });
594
+ }
595
+ function We({ className: e, align: t = "inline-start", ...n }) {
596
+ return /* @__PURE__ */ m("div", {
597
+ className: L(He({ align: t }), e),
598
+ "data-align": t,
599
+ "data-slot": "input-group-addon",
600
+ onMouseDown: (e) => {
601
+ if (e.target.closest("button, a, input, select, textarea, [role='button'], [role='combobox'], [role='listbox'], [data-slot='select-trigger']")) return;
602
+ e.preventDefault();
603
+ let t = e.currentTarget.parentElement, n = t?.querySelector("input, textarea");
604
+ n && !t?.querySelector("input:focus, textarea:focus") && n.focus();
605
+ },
606
+ ...n
607
+ });
608
+ }
609
+ function Ge({ className: e, ...t }) {
610
+ return /* @__PURE__ */ m("span", {
611
+ className: L("line-clamp-1 flex items-center gap-2 whitespace-nowrap text-muted-foreground leading-none in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4.5 sm:in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5", e),
612
+ ...t
613
+ });
614
+ }
615
+ function Ke({ className: e, ...t }) {
616
+ return /* @__PURE__ */ m(W, {
617
+ className: e,
618
+ unstyled: !0,
619
+ ...t
620
+ });
621
+ }
622
+ function qe({ className: e, ...t }) {
623
+ return /* @__PURE__ */ m(Ve, {
624
+ className: e,
625
+ unstyled: !0,
626
+ ...t
627
+ });
628
+ }
629
+ //#endregion
630
+ //#region src/components/ui/label.tsx
631
+ function Je({ className: n, render: r, sound: i = !1, ...a }) {
632
+ return t({
633
+ defaultTagName: "label",
634
+ props: e({
635
+ className: L("inline-flex cursor-pointer items-center gap-2 font-medium text-base/4.5 text-foreground sm:text-sm/4", n),
636
+ "data-cuelume-hover": i ? "tick" : void 0,
637
+ "data-slot": "label"
638
+ }, a),
639
+ render: r
640
+ });
641
+ }
642
+ //#endregion
643
+ //#region src/components/ui/separator.tsx
644
+ function G({ className: e, orientation: t = "horizontal", ...n }) {
645
+ return /* @__PURE__ */ m(P, {
646
+ className: L("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:not-[[class^='h-']]:not-[[class*='_h-']]:self-stretch", e),
647
+ "data-slot": "separator",
648
+ orientation: t,
649
+ ...n
650
+ });
651
+ }
652
+ //#endregion
653
+ //#region src/components/ui/otp-field.tsx
654
+ function Ye({ className: e, size: t = "default", sound: n = !0, onValueChange: r, ...i }) {
655
+ let a = g.useRef(String(i.value ?? i.defaultValue ?? "").length);
656
+ return /* @__PURE__ */ m(N.Root, {
657
+ className: L("flex items-center gap-2 has-disabled:opacity-64 has-disabled:**:data-[slot=otp-field-input]:shadow-none has-disabled:**:data-[slot=otp-field-input]:before:shadow-none!", e),
658
+ "data-size": t,
659
+ "data-slot": "otp-field",
660
+ onValueChange: (e, ...t) => {
661
+ n && e.length > a.current && B("tick"), a.current = e.length, r?.(e, ...t);
662
+ },
663
+ ...i
664
+ });
665
+ }
666
+ function Xe({ className: e, ...t }) {
667
+ return /* @__PURE__ */ m(N.Input, {
668
+ className: L("relative in-[[data-slot=otp-field][data-size=lg]]:size-10 size-9 min-w-0 rounded-lg border border-input bg-background not-dark:bg-clip-padding text-center in-[[data-slot=otp-field][data-size=lg]]:text-lg text-base text-foreground in-[[data-slot=otp-field][data-size=lg]]:leading-10 leading-9 shadow-xs/5 outline-none ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-focus-visible:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:z-10 focus-visible:border-ring focus-visible:shadow-none focus-visible:ring-[3px] focus-visible:ring-ring/24 aria-invalid:border-destructive/36 aria-invalid:shadow-none aria-invalid:focus-visible:border-destructive/64 aria-invalid:focus-visible:ring-destructive/16 sm:in-[[data-slot=otp-field][data-size=lg]]:size-9 sm:size-8 sm:in-[[data-slot=otp-field][data-size=lg]]:text-base sm:text-sm sm:in-[[data-slot=otp-field][data-size=lg]]:leading-9 sm:leading-8 dark:bg-input/32 dark:aria-invalid:focus-visible:ring-destructive/24 dark:not-focus-visible:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]", e),
669
+ "data-slot": "otp-field-input",
670
+ spellCheck: !1,
671
+ ...t
672
+ });
673
+ }
674
+ function Ze({ className: e, ...t }) {
675
+ return /* @__PURE__ */ m(N.Separator, { render: /* @__PURE__ */ m(G, {
676
+ className: L("rounded-full bg-input data-[orientation=horizontal]:h-0.5 data-[orientation=horizontal]:w-3", e),
677
+ orientation: "horizontal",
678
+ ...t
679
+ }) });
680
+ }
681
+ //#endregion
682
+ //#region src/components/composed/password-input.tsx
683
+ var Qe = [
684
+ .22,
685
+ 1,
686
+ .36,
687
+ 1
688
+ ], K = [
689
+ {
690
+ regex: /.{8,}/,
691
+ text: "At least 8 characters"
692
+ },
693
+ {
694
+ regex: /[0-9]/,
695
+ text: "At least 1 number"
696
+ },
697
+ {
698
+ regex: /[a-z]/,
699
+ text: "At least 1 lowercase letter"
700
+ },
701
+ {
702
+ regex: /[A-Z]/,
703
+ text: "At least 1 uppercase letter"
704
+ }
705
+ ];
706
+ function $e(e) {
707
+ return K.filter((t) => t.regex.test(e)).length;
708
+ }
709
+ var et = [
710
+ "bg-border",
711
+ "bg-red-500",
712
+ "bg-orange-500",
713
+ "bg-amber-500",
714
+ "bg-emerald-500"
715
+ ];
716
+ function tt({ visibilityToggle: e = !0, showStrength: t = !1, sound: n = !0, className: r, value: i, defaultValue: a, onChange: l, ...u }) {
717
+ let [d, p] = g.useState(!1), [_, v] = g.useState(String(a ?? "")), y = i === void 0 ? _ : String(i), b = $e(y);
718
+ return /* @__PURE__ */ h("div", {
719
+ className: L("flex w-full flex-col gap-3", r),
720
+ children: [/* @__PURE__ */ h(Ue, { children: [/* @__PURE__ */ m(Ke, {
721
+ placeholder: "Enter your password",
722
+ ...u,
723
+ type: d ? "text" : "password",
724
+ value: y,
725
+ onChange: (e) => {
726
+ v(e.target.value), l?.(e);
727
+ }
728
+ }), e && /* @__PURE__ */ m(We, {
729
+ align: "inline-end",
730
+ children: /* @__PURE__ */ m(R, {
731
+ "aria-label": d ? "Hide password" : "Show password",
732
+ onClick: () => {
733
+ n && B(d ? "droplet" : "bloom"), p((e) => !e);
734
+ },
735
+ size: "icon-xs",
736
+ variant: "ghost",
737
+ sound: !1,
738
+ children: /* @__PURE__ */ m(F, {
739
+ mode: "wait",
740
+ initial: !1,
741
+ children: /* @__PURE__ */ m(I.span, {
742
+ className: "inline-flex",
743
+ initial: {
744
+ opacity: 0,
745
+ scale: .8,
746
+ filter: "blur(2px)"
747
+ },
748
+ animate: {
749
+ opacity: 1,
750
+ scale: 1,
751
+ filter: "blur(0px)"
752
+ },
753
+ exit: {
754
+ opacity: 0,
755
+ scale: .8,
756
+ filter: "blur(2px)"
757
+ },
758
+ transition: {
759
+ duration: .15,
760
+ ease: Qe
761
+ },
762
+ children: m(d ? c : s, { "aria-hidden": "true" })
763
+ }, d ? "off" : "on")
764
+ })
765
+ })
766
+ })] }), /* @__PURE__ */ m(F, {
767
+ initial: !1,
768
+ children: t && /* @__PURE__ */ h(I.div, {
769
+ className: "flex flex-col gap-2 overflow-hidden",
770
+ initial: {
771
+ height: 0,
772
+ opacity: 0
773
+ },
774
+ animate: {
775
+ height: "auto",
776
+ opacity: 1
777
+ },
778
+ exit: {
779
+ height: 0,
780
+ opacity: 0
781
+ },
782
+ transition: {
783
+ duration: .25,
784
+ ease: Qe
785
+ },
786
+ children: [/* @__PURE__ */ m("div", {
787
+ "aria-label": "Password strength",
788
+ "aria-valuemax": 4,
789
+ "aria-valuemin": 0,
790
+ "aria-valuenow": b,
791
+ className: "h-1 w-full overflow-hidden rounded-full bg-border",
792
+ role: "progressbar",
793
+ children: /* @__PURE__ */ m(I.div, {
794
+ className: L("h-full rounded-full", et[b]),
795
+ animate: { width: `${b / 4 * 100}%` },
796
+ transition: {
797
+ duration: .4,
798
+ ease: Qe
799
+ }
800
+ })
801
+ }), /* @__PURE__ */ m("ul", {
802
+ "aria-label": "Password requirements",
803
+ className: "flex flex-col gap-1",
804
+ children: K.map((e) => {
805
+ let t = e.regex.test(y);
806
+ return /* @__PURE__ */ h("li", {
807
+ className: "flex items-center gap-2 text-xs",
808
+ children: [t ? /* @__PURE__ */ m(o, {
809
+ "aria-hidden": "true",
810
+ className: "size-3.5 text-emerald-500"
811
+ }) : /* @__PURE__ */ m(f, {
812
+ "aria-hidden": "true",
813
+ className: "size-3.5 text-muted-foreground/80"
814
+ }), /* @__PURE__ */ h("span", {
815
+ className: t ? "text-emerald-600" : "text-muted-foreground",
816
+ children: [e.text, /* @__PURE__ */ m("span", {
817
+ className: "sr-only",
818
+ children: t ? " - met" : " - not met"
819
+ })]
820
+ })]
821
+ }, e.text);
822
+ })
823
+ })]
824
+ })
825
+ })]
826
+ });
827
+ }
828
+ //#endregion
829
+ //#region src/components/composed/social-providers.tsx
830
+ var nt = {
831
+ google: {
832
+ label: "Google",
833
+ Icon: ie
834
+ },
835
+ apple: {
836
+ label: "Apple",
837
+ Icon: ne
838
+ },
839
+ github: {
840
+ label: "GitHub",
841
+ Icon: re
842
+ },
843
+ x: {
844
+ label: "X",
845
+ Icon: ae
846
+ }
847
+ }, rt = {
848
+ login: "Login with",
849
+ signup: "Sign up with",
850
+ continue: "Continue with"
851
+ };
852
+ function it({ providers: e = [
853
+ "google",
854
+ "apple",
855
+ "github"
856
+ ], action: t = "continue", layout: n = "stack", loadingProvider: r = null, disabled: i = !1, onSelect: a, className: o }) {
857
+ let s = n === "row";
858
+ return /* @__PURE__ */ m("div", {
859
+ className: L("flex w-full gap-2", s ? "flex-row justify-center" : "flex-col", o),
860
+ children: e.map((e) => {
861
+ let { label: n, Icon: o } = nt[e];
862
+ return /* @__PURE__ */ h(R, {
863
+ variant: "outline",
864
+ size: s ? "icon" : "default",
865
+ className: s ? void 0 : "w-full",
866
+ "aria-label": `${rt[t]} ${n}`,
867
+ loading: r === e,
868
+ disabled: i || r !== null && r !== e,
869
+ onClick: () => a?.(e),
870
+ children: [/* @__PURE__ */ m(o, { "aria-hidden": "true" }), !s && /* @__PURE__ */ h("span", {
871
+ className: "flex-1",
872
+ children: [
873
+ rt[t],
874
+ " ",
875
+ n
876
+ ]
877
+ })]
878
+ }, e);
879
+ })
880
+ });
881
+ }
882
+ //#endregion
883
+ //#region src/lib/auth-accent.ts
884
+ var at = {
885
+ corpora: {
886
+ "--auth-accent": "#E8B124",
887
+ "--auth-accent-image": "none",
888
+ "--auth-accent-foreground": "oklch(0.145 0 0)"
889
+ },
890
+ exegia: {
891
+ "--auth-accent": "#3B0080",
892
+ "--auth-accent-image": "linear-gradient(44deg in oklab, rgba(29,0,202,0.66) 3%, #3B0080 37%, rgba(36,0,72,0.86) 98%)",
893
+ "--auth-accent-foreground": "oklch(0.985 0 0)"
894
+ }
895
+ }, ot = "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]", q = [
896
+ .22,
897
+ 1,
898
+ .36,
899
+ 1
900
+ ];
901
+ function J({ title: e, description: t, children: n, footer: r, className: i, logo: a, accent: o }) {
902
+ return /* @__PURE__ */ m(te, {
903
+ reducedMotion: "user",
904
+ children: /* @__PURE__ */ m(Fe, {
905
+ className: L("w-full max-w-sm", i),
906
+ "data-accent": o,
907
+ style: o ? at[o] : void 0,
908
+ children: /* @__PURE__ */ h(I.div, {
909
+ layout: !0,
910
+ transition: {
911
+ duration: .3,
912
+ ease: q
913
+ },
914
+ className: "flex flex-col",
915
+ children: [/* @__PURE__ */ h(ge, { children: [/* @__PURE__ */ h(Ce, { children: [
916
+ a && /* @__PURE__ */ m("div", {
917
+ className: "mb-1.5 flex items-center [&_img:not([class*='h-'])]:h-8 [&_img]:w-auto [&_svg:not([class*='size-'])]:size-8",
918
+ "data-slot": "auth-logo",
919
+ children: a
920
+ }),
921
+ /* @__PURE__ */ m(we, { children: e }),
922
+ t && /* @__PURE__ */ m(Te, { children: t })
923
+ ] }), /* @__PURE__ */ m(z, {
924
+ className: "overflow-hidden",
925
+ children: n
926
+ })] }), r && /* @__PURE__ */ m(Be, {
927
+ className: "text-center text-sm text-muted-foreground",
928
+ children: r
929
+ })]
930
+ })
931
+ })
932
+ });
933
+ }
934
+ function Y({ step: e, children: t, className: n }) {
935
+ return /* @__PURE__ */ m(F, {
936
+ mode: "popLayout",
937
+ initial: !1,
938
+ children: /* @__PURE__ */ m(I.div, {
939
+ className: n,
940
+ initial: {
941
+ opacity: 0,
942
+ y: 8,
943
+ filter: "blur(2px)"
944
+ },
945
+ animate: {
946
+ opacity: 1,
947
+ y: 0,
948
+ filter: "blur(0px)"
949
+ },
950
+ exit: {
951
+ opacity: 0,
952
+ y: -8,
953
+ filter: "blur(2px)"
954
+ },
955
+ transition: {
956
+ duration: .25,
957
+ ease: q
958
+ },
959
+ children: t
960
+ }, e)
961
+ });
962
+ }
963
+ function X({ show: e, children: t, className: n }) {
964
+ let [r, i] = g.useState({
965
+ show: e,
966
+ settled: e
967
+ });
968
+ return r.show !== e && i({
969
+ show: e,
970
+ settled: !1
971
+ }), /* @__PURE__ */ m(F, {
972
+ initial: !1,
973
+ children: e && /* @__PURE__ */ m(I.div, {
974
+ className: L(!r.settled && "overflow-hidden", n),
975
+ initial: {
976
+ height: 0,
977
+ opacity: 0,
978
+ y: -4,
979
+ filter: "blur(2px)"
980
+ },
981
+ animate: {
982
+ height: "auto",
983
+ opacity: 1,
984
+ y: 0,
985
+ filter: "blur(0px)"
986
+ },
987
+ exit: {
988
+ height: 0,
989
+ opacity: 0,
990
+ y: -4,
991
+ filter: "blur(2px)"
992
+ },
993
+ transition: {
994
+ duration: .25,
995
+ ease: q
996
+ },
997
+ onAnimationComplete: () => i((e) => ({
998
+ ...e,
999
+ settled: !0
1000
+ })),
1001
+ children: t
1002
+ })
1003
+ });
1004
+ }
1005
+ function Z({ message: e }) {
1006
+ return /* @__PURE__ */ m(F, {
1007
+ initial: !1,
1008
+ children: e && /* @__PURE__ */ m(I.p, {
1009
+ role: "alert",
1010
+ className: "text-sm text-destructive-foreground",
1011
+ initial: {
1012
+ opacity: 0,
1013
+ height: 0
1014
+ },
1015
+ animate: {
1016
+ opacity: 1,
1017
+ height: "auto",
1018
+ x: [
1019
+ 0,
1020
+ -6,
1021
+ 6,
1022
+ -4,
1023
+ 4,
1024
+ 0
1025
+ ]
1026
+ },
1027
+ exit: {
1028
+ opacity: 0,
1029
+ height: 0
1030
+ },
1031
+ transition: {
1032
+ duration: .25,
1033
+ ease: q,
1034
+ x: {
1035
+ duration: .4,
1036
+ ease: "easeInOut"
1037
+ }
1038
+ },
1039
+ children: e
1040
+ }, e)
1041
+ });
1042
+ }
1043
+ function Q({ title: e, description: t, children: n }) {
1044
+ return /* @__PURE__ */ h("div", {
1045
+ className: "flex flex-col items-center gap-3 py-4 text-center",
1046
+ children: [
1047
+ /* @__PURE__ */ m(I.span, {
1048
+ className: "flex size-12 items-center justify-center rounded-full bg-emerald-500/12 text-emerald-600",
1049
+ initial: {
1050
+ scale: .6,
1051
+ opacity: 0
1052
+ },
1053
+ animate: {
1054
+ scale: 1,
1055
+ opacity: 1
1056
+ },
1057
+ transition: {
1058
+ duration: .4,
1059
+ ease: q
1060
+ },
1061
+ children: /* @__PURE__ */ m("svg", {
1062
+ "aria-hidden": "true",
1063
+ viewBox: "0 0 24 24",
1064
+ className: "size-6",
1065
+ fill: "none",
1066
+ stroke: "currentColor",
1067
+ strokeWidth: "2.5",
1068
+ strokeLinecap: "round",
1069
+ strokeLinejoin: "round",
1070
+ children: /* @__PURE__ */ m(I.path, {
1071
+ d: "M4 12.5l5 5L20 6.5",
1072
+ initial: { pathLength: 0 },
1073
+ animate: { pathLength: 1 },
1074
+ transition: {
1075
+ duration: .4,
1076
+ delay: .15,
1077
+ ease: q
1078
+ }
1079
+ })
1080
+ })
1081
+ }),
1082
+ /* @__PURE__ */ h("div", {
1083
+ className: "flex flex-col gap-1",
1084
+ children: [/* @__PURE__ */ m("p", {
1085
+ className: "font-medium",
1086
+ children: e
1087
+ }), t && /* @__PURE__ */ m("p", {
1088
+ className: "text-sm text-muted-foreground",
1089
+ children: t
1090
+ })]
1091
+ }),
1092
+ n
1093
+ ]
1094
+ });
1095
+ }
1096
+ function $({ label: e = "Or" }) {
1097
+ return /* @__PURE__ */ h("div", {
1098
+ className: "flex items-center gap-3",
1099
+ children: [
1100
+ /* @__PURE__ */ m(G, { className: "flex-1" }),
1101
+ /* @__PURE__ */ m("span", {
1102
+ className: "text-xs text-muted-foreground uppercase",
1103
+ children: e
1104
+ }),
1105
+ /* @__PURE__ */ m(G, { className: "flex-1" })
1106
+ ]
1107
+ });
1108
+ }
1109
+ function st(e, t) {
1110
+ let [n, r] = g.useState({
1111
+ restartKey: t,
1112
+ seconds: e,
1113
+ remaining: e
1114
+ });
1115
+ return (n.restartKey !== t || n.seconds !== e) && r({
1116
+ restartKey: t,
1117
+ seconds: e,
1118
+ remaining: e
1119
+ }), g.useEffect(() => {
1120
+ if (e <= 0) return;
1121
+ let t = window.setInterval(() => {
1122
+ r((e) => e.remaining <= 0 ? e : {
1123
+ ...e,
1124
+ remaining: e.remaining - 1
1125
+ });
1126
+ }, 1e3);
1127
+ return () => window.clearInterval(t);
1128
+ }, [e, t]), n.remaining;
1129
+ }
1130
+ //#endregion
1131
+ //#region src/components/blocks/auth/code-auth-block.tsx
1132
+ function ct({ channel: e = "email", logo: t, accent: n, destination: r, length: i = 6, autoSubmit: a = !0, resendSeconds: o = 30, onVerify: s, onResend: c, onBack: l }) {
1133
+ let [f, _] = g.useState("idle"), [v, y] = g.useState(null), [b, x] = g.useState(""), [S, C] = g.useState(0), w = st(o, S), T = e === "sms" ? d : u, E = e === "sms" ? "phone" : "email", D = g.useCallback(async (e) => {
1134
+ y(null), _("loading");
1135
+ try {
1136
+ await s?.(e), _("success");
1137
+ } catch (e) {
1138
+ _("idle"), x(""), y(e instanceof Error ? e.message : "Invalid code.");
1139
+ }
1140
+ }, [s]);
1141
+ function O(e) {
1142
+ x(e), v && y(null), a && e.length === i && f === "idle" && D(e);
1143
+ }
1144
+ async function k() {
1145
+ C((e) => e + 1), x(""), y(null), await c?.();
1146
+ }
1147
+ return /* @__PURE__ */ m(J, {
1148
+ title: "Enter verification code",
1149
+ logo: t,
1150
+ accent: n,
1151
+ description: /* @__PURE__ */ h("span", {
1152
+ className: "inline-flex items-center gap-1.5",
1153
+ children: [/* @__PURE__ */ m(T, { className: "size-3.5 shrink-0" }), /* @__PURE__ */ h("span", { children: [
1154
+ "We sent a ",
1155
+ i,
1156
+ "-digit code to your ",
1157
+ E,
1158
+ r ? /* @__PURE__ */ h(p, { children: [" ", /* @__PURE__ */ m("span", {
1159
+ className: "font-medium text-foreground",
1160
+ children: r
1161
+ })] }) : null,
1162
+ "."
1163
+ ] })]
1164
+ }),
1165
+ footer: f !== "success" && /* @__PURE__ */ h(R, {
1166
+ variant: "link",
1167
+ onClick: l,
1168
+ children: ["Use a different ", E]
1169
+ }),
1170
+ children: /* @__PURE__ */ m(Y, {
1171
+ step: f === "success" ? "success" : "form",
1172
+ children: f === "success" ? /* @__PURE__ */ m(Q, {
1173
+ title: "Verified",
1174
+ description: "Your identity has been confirmed."
1175
+ }) : /* @__PURE__ */ h("div", {
1176
+ className: "flex flex-col items-center gap-4",
1177
+ children: [
1178
+ /* @__PURE__ */ m(I.div, {
1179
+ animate: v ? { x: [
1180
+ 0,
1181
+ -8,
1182
+ 8,
1183
+ -5,
1184
+ 5,
1185
+ 0
1186
+ ] } : { x: 0 },
1187
+ transition: {
1188
+ duration: .4,
1189
+ ease: "easeInOut"
1190
+ },
1191
+ children: /* @__PURE__ */ m(Ye, {
1192
+ length: i,
1193
+ value: b,
1194
+ onValueChange: O,
1195
+ disabled: f === "loading",
1196
+ children: Array.from({ length: i }, (e, t) => /* @__PURE__ */ m(Xe, {
1197
+ "aria-invalid": v ? !0 : void 0,
1198
+ "aria-label": `Digit ${t + 1} of ${i}`
1199
+ }, `slot-${t}`))
1200
+ })
1201
+ }, v ?? "steady"),
1202
+ /* @__PURE__ */ m(Z, { message: v }),
1203
+ !a && /* @__PURE__ */ m(R, {
1204
+ className: L("w-full", n && "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]"),
1205
+ loading: f === "loading",
1206
+ disabled: b.length !== i,
1207
+ onClick: () => void D(b),
1208
+ children: "Verify"
1209
+ }),
1210
+ /* @__PURE__ */ m(I.p, {
1211
+ layout: !0,
1212
+ transition: {
1213
+ duration: .25,
1214
+ ease: q
1215
+ },
1216
+ className: "text-center text-sm text-muted-foreground",
1217
+ children: w > 0 ? /* @__PURE__ */ h(p, { children: [
1218
+ "Resend code in",
1219
+ " ",
1220
+ /* @__PURE__ */ h("span", {
1221
+ className: "font-medium tabular-nums text-foreground",
1222
+ children: [w, "s"]
1223
+ })
1224
+ ] }) : /* @__PURE__ */ m(R, {
1225
+ variant: "link",
1226
+ disabled: f === "loading",
1227
+ onClick: () => void k(),
1228
+ children: "Resend code"
1229
+ })
1230
+ })
1231
+ ]
1232
+ })
1233
+ })
1234
+ });
1235
+ }
1236
+ //#endregion
1237
+ //#region src/components/blocks/auth/forgot-password-block.tsx
1238
+ function lt({ title: e = "Reset your password", logo: t, accent: n, description: r = "Enter your email and we will send you a reset link", onSubmit: i, onBackToLogin: o }) {
1239
+ let s = g.useId(), [c, l] = g.useState("idle"), [u, d] = g.useState(null), [f, _] = g.useState("");
1240
+ async function v(e) {
1241
+ e.preventDefault(), d(null), l("loading");
1242
+ try {
1243
+ await i?.({ email: f }), l("success");
1244
+ } catch (e) {
1245
+ l("idle"), d(e instanceof Error ? e.message : "Unable to send reset link.");
1246
+ }
1247
+ }
1248
+ return /* @__PURE__ */ m(J, {
1249
+ title: e,
1250
+ description: r,
1251
+ logo: t,
1252
+ accent: n,
1253
+ footer: /* @__PURE__ */ h(R, {
1254
+ variant: "link",
1255
+ className: "gap-1",
1256
+ onClick: o,
1257
+ children: [/* @__PURE__ */ m(a, { className: "size-3.5" }), "Back to login"]
1258
+ }),
1259
+ children: /* @__PURE__ */ m(Y, {
1260
+ step: c === "success" ? "success" : "form",
1261
+ children: c === "success" ? /* @__PURE__ */ m(Q, {
1262
+ title: "Check your inbox",
1263
+ description: /* @__PURE__ */ h(p, { children: [
1264
+ "We sent a password reset link to",
1265
+ " ",
1266
+ /* @__PURE__ */ m("span", {
1267
+ className: "font-medium text-foreground",
1268
+ children: f
1269
+ }),
1270
+ "."
1271
+ ] }),
1272
+ children: /* @__PURE__ */ m(R, {
1273
+ variant: "link",
1274
+ className: "text-xs sm:text-xs",
1275
+ onClick: () => l("idle"),
1276
+ children: "Use a different email"
1277
+ })
1278
+ }) : /* @__PURE__ */ h("form", {
1279
+ className: "flex flex-col gap-4",
1280
+ onSubmit: v,
1281
+ children: [
1282
+ /* @__PURE__ */ h(H, {
1283
+ name: "email",
1284
+ children: [/* @__PURE__ */ m(U, {
1285
+ htmlFor: s,
1286
+ children: "Email"
1287
+ }), /* @__PURE__ */ m(W, {
1288
+ id: s,
1289
+ name: "email",
1290
+ type: "email",
1291
+ autoComplete: "email",
1292
+ placeholder: "you@example.com",
1293
+ required: !0,
1294
+ disabled: c === "loading",
1295
+ value: f,
1296
+ onChange: (e) => _(e.target.value)
1297
+ })]
1298
+ }),
1299
+ /* @__PURE__ */ m(Z, { message: u }),
1300
+ /* @__PURE__ */ m(R, {
1301
+ className: L("w-full", n && "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]"),
1302
+ type: "submit",
1303
+ loading: c === "loading",
1304
+ children: "Send reset link"
1305
+ })
1306
+ ]
1307
+ })
1308
+ })
1309
+ });
1310
+ }
1311
+ //#endregion
1312
+ //#region src/components/blocks/auth/login-block.tsx
1313
+ function ut({ title: e = "Login to your account", description: t = "Enter your email and password to login", logo: n, accent: r, providers: i = [
1314
+ "google",
1315
+ "apple",
1316
+ "github"
1317
+ ], showRememberMe: a = !0, showForgotPassword: o = !0, onSubmit: s, onProviderSelect: c, onForgotPassword: l, onSignup: u }) {
1318
+ let d = g.useId(), f = g.useId(), [_, v] = g.useState("idle"), [y, b] = g.useState(null), [x, S] = g.useState(null), [C, w] = g.useState(!1), [T, E] = g.useState(""), [D, O] = g.useState(!1), [k, ee] = g.useState(""), A = _ === "loading" || x !== null, j = k.trim().length > 0, M = D && j;
1319
+ async function N(e) {
1320
+ if (e.preventDefault(), !M) return;
1321
+ let t = new FormData(e.currentTarget);
1322
+ b(null), v("loading");
1323
+ try {
1324
+ await s?.({
1325
+ email: String(t.get("email") ?? ""),
1326
+ password: String(t.get("password") ?? ""),
1327
+ remember: C
1328
+ }), v("success");
1329
+ } catch (e) {
1330
+ v("idle"), b(e instanceof Error ? e.message : "Unable to login.");
1331
+ }
1332
+ }
1333
+ async function P(e) {
1334
+ b(null), S(e);
1335
+ try {
1336
+ await c?.(e), v("success");
1337
+ } catch (e) {
1338
+ b(e instanceof Error ? e.message : "Unable to login.");
1339
+ } finally {
1340
+ S(null);
1341
+ }
1342
+ }
1343
+ return /* @__PURE__ */ m(J, {
1344
+ title: e,
1345
+ description: t,
1346
+ logo: n,
1347
+ accent: r,
1348
+ footer: _ !== "success" && /* @__PURE__ */ h(p, { children: [
1349
+ "Don't have an account?",
1350
+ " ",
1351
+ /* @__PURE__ */ m(R, {
1352
+ variant: "link",
1353
+ onClick: u,
1354
+ children: "Sign up"
1355
+ })
1356
+ ] }),
1357
+ children: /* @__PURE__ */ m(Y, {
1358
+ step: _ === "success" ? "success" : "form",
1359
+ children: _ === "success" ? /* @__PURE__ */ m(Q, {
1360
+ title: "Welcome back",
1361
+ description: "You are now logged in."
1362
+ }) : /* @__PURE__ */ h("div", {
1363
+ className: "flex flex-col gap-4",
1364
+ children: [/* @__PURE__ */ h("form", {
1365
+ className: "flex flex-col gap-4",
1366
+ onSubmit: N,
1367
+ children: [
1368
+ /* @__PURE__ */ h(H, {
1369
+ name: "email",
1370
+ children: [/* @__PURE__ */ m(U, {
1371
+ htmlFor: d,
1372
+ children: "Email"
1373
+ }), /* @__PURE__ */ m(W, {
1374
+ id: d,
1375
+ "aria-label": "Email",
1376
+ name: "email",
1377
+ type: "email",
1378
+ autoComplete: "email",
1379
+ placeholder: "you@example.com",
1380
+ required: !0,
1381
+ disabled: A,
1382
+ value: T,
1383
+ onChange: (e) => {
1384
+ E(e.currentTarget.value), O(e.currentTarget.validity.valid);
1385
+ }
1386
+ })]
1387
+ }),
1388
+ /* @__PURE__ */ m(X, {
1389
+ show: D,
1390
+ children: /* @__PURE__ */ h(H, {
1391
+ name: "password",
1392
+ children: [
1393
+ /* @__PURE__ */ m(U, {
1394
+ htmlFor: "password",
1395
+ children: "Password"
1396
+ }),
1397
+ /* @__PURE__ */ m(tt, {
1398
+ id: "password",
1399
+ name: "password",
1400
+ autoComplete: "current-password",
1401
+ required: !0,
1402
+ disabled: A,
1403
+ value: k,
1404
+ onChange: (e) => ee(e.target.value)
1405
+ }),
1406
+ o && /* @__PURE__ */ m(R, {
1407
+ variant: "link",
1408
+ type: "button",
1409
+ className: "self-end font-normal text-muted-foreground text-xs hover:text-foreground sm:text-xs",
1410
+ onClick: l,
1411
+ children: "Forgot password?"
1412
+ })
1413
+ ]
1414
+ })
1415
+ }),
1416
+ a && /* @__PURE__ */ h("div", {
1417
+ className: "flex items-center gap-2",
1418
+ children: [/* @__PURE__ */ m(V, {
1419
+ id: f,
1420
+ checked: C,
1421
+ onCheckedChange: (e) => w(e),
1422
+ disabled: A
1423
+ }), /* @__PURE__ */ m(Je, {
1424
+ htmlFor: f,
1425
+ className: "font-normal",
1426
+ children: "Remember me"
1427
+ })]
1428
+ }),
1429
+ /* @__PURE__ */ m(Z, { message: y }),
1430
+ /* @__PURE__ */ m(X, {
1431
+ show: M,
1432
+ children: /* @__PURE__ */ m(R, {
1433
+ className: L("w-full", r && "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]"),
1434
+ type: "submit",
1435
+ loading: _ === "loading",
1436
+ disabled: A,
1437
+ children: "Login"
1438
+ })
1439
+ })
1440
+ ]
1441
+ }), i.length > 0 && /* @__PURE__ */ h(X, {
1442
+ show: !M,
1443
+ className: "flex flex-col gap-4",
1444
+ children: [/* @__PURE__ */ m($, { label: "Or continue with" }), /* @__PURE__ */ m(it, {
1445
+ providers: i,
1446
+ action: "login",
1447
+ loadingProvider: x,
1448
+ disabled: _ === "loading",
1449
+ onSelect: P
1450
+ })]
1451
+ })]
1452
+ })
1453
+ })
1454
+ });
1455
+ }
1456
+ //#endregion
1457
+ //#region src/components/blocks/auth/signup-block.tsx
1458
+ function dt({ title: e = "Create your account", description: t = "Start exploring manuscripts in minutes", logo: n, accent: r, providers: i = [
1459
+ "google",
1460
+ "apple",
1461
+ "github"
1462
+ ], showNameField: a = !0, showTerms: o = !0, enforceStrongPassword: s = !0, onSubmit: c, onProviderSelect: l, onLogin: u, onTerms: d }) {
1463
+ let f = g.useId(), _ = g.useId(), v = g.useId(), [y, b] = g.useState("idle"), [x, S] = g.useState(null), [C, w] = g.useState(null), [T, E] = g.useState(""), [D, O] = g.useState(!1), [k, ee] = g.useState(!1), [A, j] = g.useState(!1), M = y === "loading" || C !== null, N = !s || $e(T) === K.length, P = T.trim().length > 0 && N, F = (!a || A) && k && P;
1464
+ async function te(e) {
1465
+ if (e.preventDefault(), S(null), !N) {
1466
+ S("Please meet all password requirements.");
1467
+ return;
1468
+ }
1469
+ if (o && !D) {
1470
+ S("Please accept the terms to continue.");
1471
+ return;
1472
+ }
1473
+ let t = new FormData(e.currentTarget);
1474
+ b("loading");
1475
+ try {
1476
+ await c?.({
1477
+ name: String(t.get("name") ?? ""),
1478
+ email: String(t.get("email") ?? ""),
1479
+ password: T
1480
+ }), b("success");
1481
+ } catch (e) {
1482
+ b("idle"), S(e instanceof Error ? e.message : "Unable to create account.");
1483
+ }
1484
+ }
1485
+ async function I(e) {
1486
+ S(null), w(e);
1487
+ try {
1488
+ await l?.(e), b("success");
1489
+ } catch (e) {
1490
+ S(e instanceof Error ? e.message : "Unable to create account.");
1491
+ } finally {
1492
+ w(null);
1493
+ }
1494
+ }
1495
+ return /* @__PURE__ */ m(J, {
1496
+ title: e,
1497
+ description: t,
1498
+ logo: n,
1499
+ accent: r,
1500
+ footer: y !== "success" && /* @__PURE__ */ h(p, { children: [
1501
+ "Already have an account?",
1502
+ " ",
1503
+ /* @__PURE__ */ m(R, {
1504
+ variant: "link",
1505
+ onClick: u,
1506
+ children: "Login"
1507
+ })
1508
+ ] }),
1509
+ children: /* @__PURE__ */ m(Y, {
1510
+ step: y === "success" ? "success" : "form",
1511
+ children: y === "success" ? /* @__PURE__ */ m(Q, {
1512
+ title: "Account created",
1513
+ description: "Check your inbox to confirm your email address."
1514
+ }) : /* @__PURE__ */ h("div", {
1515
+ className: "flex flex-col gap-4",
1516
+ children: [i.length > 0 && /* @__PURE__ */ h(X, {
1517
+ show: !F,
1518
+ className: "flex flex-col gap-4",
1519
+ children: [/* @__PURE__ */ m(it, {
1520
+ providers: i,
1521
+ action: "signup",
1522
+ loadingProvider: C,
1523
+ disabled: y === "loading",
1524
+ onSelect: I
1525
+ }), /* @__PURE__ */ m($, { label: "Or with email" })]
1526
+ }), /* @__PURE__ */ h("form", {
1527
+ className: "flex flex-col gap-4",
1528
+ onSubmit: te,
1529
+ children: [
1530
+ a && /* @__PURE__ */ h(H, {
1531
+ name: "name",
1532
+ children: [/* @__PURE__ */ m(U, {
1533
+ htmlFor: f,
1534
+ children: "Name"
1535
+ }), /* @__PURE__ */ m(W, {
1536
+ "aria-label": "Name",
1537
+ id: f,
1538
+ name: "name",
1539
+ autoComplete: "name",
1540
+ placeholder: "Your name",
1541
+ required: !0,
1542
+ disabled: M,
1543
+ onChange: (e) => j(e.currentTarget.validity.valid)
1544
+ })]
1545
+ }),
1546
+ /* @__PURE__ */ h(H, {
1547
+ name: "email",
1548
+ children: [/* @__PURE__ */ m(U, {
1549
+ htmlFor: _,
1550
+ children: "Email"
1551
+ }), /* @__PURE__ */ m(W, {
1552
+ id: _,
1553
+ name: "email",
1554
+ type: "email",
1555
+ autoComplete: "email",
1556
+ placeholder: "you@example.com",
1557
+ required: !0,
1558
+ disabled: M,
1559
+ onChange: (e) => ee(e.currentTarget.validity.valid)
1560
+ })]
1561
+ }),
1562
+ /* @__PURE__ */ m(X, {
1563
+ show: k,
1564
+ children: /* @__PURE__ */ h(H, {
1565
+ name: "password",
1566
+ children: [/* @__PURE__ */ m(U, { children: "Password" }), /* @__PURE__ */ m(tt, {
1567
+ name: "password",
1568
+ autoComplete: "new-password",
1569
+ placeholder: "Create a password",
1570
+ showStrength: !0,
1571
+ required: !0,
1572
+ disabled: M,
1573
+ value: T,
1574
+ onChange: (e) => E(e.target.value)
1575
+ })]
1576
+ })
1577
+ }),
1578
+ o && /* @__PURE__ */ h("div", {
1579
+ className: "flex items-center gap-2",
1580
+ children: [/* @__PURE__ */ m(V, {
1581
+ id: v,
1582
+ checked: D,
1583
+ onCheckedChange: (e) => O(e === !0),
1584
+ disabled: M
1585
+ }), /* @__PURE__ */ h(Je, {
1586
+ htmlFor: v,
1587
+ className: "font-normal",
1588
+ children: [
1589
+ "I agree to the",
1590
+ " ",
1591
+ /* @__PURE__ */ m(R, {
1592
+ variant: "link",
1593
+ type: "button",
1594
+ onClick: d,
1595
+ children: "terms"
1596
+ })
1597
+ ]
1598
+ })]
1599
+ }),
1600
+ /* @__PURE__ */ m(Z, { message: x }),
1601
+ /* @__PURE__ */ m(R, {
1602
+ className: L("w-full", r && "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]"),
1603
+ type: "submit",
1604
+ loading: y === "loading",
1605
+ disabled: M,
1606
+ children: "Create account"
1607
+ })
1608
+ ]
1609
+ })]
1610
+ })
1611
+ })
1612
+ });
1613
+ }
1614
+ //#endregion
1615
+ export { J as AuthCard, Z as AuthError, $ as AuthSeparator, Q as AuthSuccess, R as Button, ge as Card, Ee as CardAction, z as CardContent, z as CardPanel, Te as CardDescription, De as CardFooter, _e as CardFrame, xe as CardFrameAction, be as CardFrameDescription, Se as CardFrameFooter, ve as CardFrameHeader, ye as CardFrameTitle, Ce as CardHeader, we as CardTitle, V as Checkbox, w as CheckboxPrimitive, ct as CodeAuthBlock, q as EASE, H as Field, Ne as FieldControl, je as FieldDescription, Me as FieldError, Ae as FieldItem, U as FieldLabel, Pe as FieldValidity, lt as ForgotPasswordBlock, Fe as Frame, ze as FrameDescription, Be as FrameFooter, Le as FrameHeader, Ie as FramePanel, Re as FrameTitle, W as Input, Ue as InputGroup, We as InputGroupAddon, Ke as InputGroupInput, Ge as InputGroupText, qe as InputGroupTextarea, M as InputPrimitive, Je as Label, ut as LoginBlock, Y as MorphStep, Ye as OTPField, Xe as OTPFieldInput, N as OTPFieldPrimitive, Ze as OTPFieldSeparator, tt as PasswordInput, X as Reveal, G as Separator, P as SeparatorPrimitive, dt as SignupBlock, it as SocialProviders, oe as Spinner, Ve as Textarea, ot as authAccentActionStyles, at as authAccentVars, ke as bindSounds, he as buttonVariants, L as cn, $e as getPasswordStrength, K as passwordRequirements, B as playCue, D as playSound, O as setSoundEnabled, k as setSoundVolume, ee as sounds, st as useCountdown };
1616
+
1617
+ //# sourceMappingURL=index.js.map