@aggc/ui 0.7.0 → 0.8.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 (38) hide show
  1. package/dist/chunks/UiToastProvider.vue_vue_type_script_setup_true_lang-D7OGRCU4.js +3958 -0
  2. package/dist/chunks/{pageHeader-DhPY_hNA.js → pageHeader-YZ3BV9dQ.js} +8 -5
  3. package/dist/components/UiAvatar.styles.d.ts +53 -0
  4. package/dist/components/UiAvatar.vue.d.ts +13 -0
  5. package/dist/components/UiButton.styles.d.ts +0 -3
  6. package/dist/components/UiModal.styles.d.ts +21 -0
  7. package/dist/components/UiModal.vue.d.ts +30 -0
  8. package/dist/components/UiToast.styles.d.ts +41 -0
  9. package/dist/components/UiToast.vue.d.ts +13 -0
  10. package/dist/components/UiToastProvider.vue.d.ts +13 -0
  11. package/dist/components/index.d.ts +4 -0
  12. package/dist/components.js +14 -10
  13. package/dist/composables/useToast.d.ts +27 -0
  14. package/dist/index.d.ts +1 -0
  15. package/dist/index.js +66 -61
  16. package/dist/styles/recipes/button.recipe.d.ts +0 -3
  17. package/dist/styles.js +2 -2
  18. package/dist/ui.css +364 -58
  19. package/package.json +3 -2
  20. package/src/components/UiAvatar.styles.ts +81 -0
  21. package/src/components/UiAvatar.test.ts +43 -0
  22. package/src/components/UiAvatar.vue +41 -0
  23. package/src/components/UiModal.styles.ts +126 -0
  24. package/src/components/UiModal.test.ts +64 -0
  25. package/src/components/UiModal.vue +79 -0
  26. package/src/components/UiToast.styles.ts +143 -0
  27. package/src/components/UiToast.test.ts +47 -0
  28. package/src/components/UiToast.vue +65 -0
  29. package/src/components/UiToastProvider.vue +22 -0
  30. package/src/components/index.ts +4 -0
  31. package/src/composables/useToast.ts +43 -0
  32. package/src/css/base.css +50 -1
  33. package/src/index.ts +1 -0
  34. package/src/stories/feedback/UiToast.stories.ts +72 -0
  35. package/src/stories/layout/UiModal.stories.ts +89 -0
  36. package/src/stories/primitives/UiAvatar.stories.ts +83 -0
  37. package/src/styles/recipes/button.recipe.ts +8 -4
  38. package/dist/chunks/UiSkeleton.vue_vue_type_script_setup_true_lang-Dg-HzSqj.js +0 -1201
@@ -0,0 +1,3958 @@
1
+ import * as Qe from "vue";
2
+ import { defineComponent as _, openBlock as p, createElementBlock as D, normalizeClass as m, unref as o, renderSlot as O, createElementVNode as P, createBlock as S, resolveDynamicComponent as ft, toDisplayString as R, createVNode as F, withCtx as C, createTextVNode as X, Fragment as Q, renderList as se, createCommentVNode as L, inject as pt, provide as vt, onBeforeUnmount as mt, getCurrentScope as $t, onScopeDispose as bt, computed as $, watch as j, effectScope as gt, getCurrentInstance as ue, shallowRef as ze, shallowReadonly as yt, toValue as Y, ref as x, nextTick as Z, onMounted as ae, toHandlerKey as Ft, camelize as Mt, onUpdated as zt, triggerRef as qt, onUnmounted as pe, toRefs as ve, h as le, Comment as Nt, mergeProps as W, cloneVNode as Vt, watchEffect as ee, reactive as ht, normalizeStyle as qe, withModifiers as Ee, Teleport as wt, normalizeProps as Ne, guardReactiveProps as Ve, markRaw as Wt, withDirectives as jt, vShow as Ht, withKeys as Ze, useId as Kt } from "vue";
3
+ import { j as Ut, o as z, q as Te, n as Ct, r as E, g as Yt, f as Xt, a as _t, l as Gt, p as Jt, b as Qt, h as Zt, i as en, d as tn } from "./pageHeader-YZ3BV9dQ.js";
4
+ import { CheckCircle2 as nn, TriangleAlert as an, LoaderCircle as on, Check as xt, X as Et, ChevronDown as sn, AlertTriangle as rn, Info as ln, AlertCircle as un, CheckCircle as dn } from "lucide-vue-next";
5
+ const cn = Ut, Qs = /* @__PURE__ */ _({
6
+ __name: "PageSurface",
7
+ setup(e) {
8
+ return (t, n) => (p(), D("div", {
9
+ class: m(o(cn))
10
+ }, [
11
+ O(t.$slots, "default")
12
+ ], 2));
13
+ }
14
+ }), fn = z({
15
+ base: {
16
+ display: "inline-flex",
17
+ alignItems: "center",
18
+ justifyContent: "center",
19
+ borderRadius: "full",
20
+ borderWidth: "1px",
21
+ px: "2.5",
22
+ py: "1",
23
+ fontSize: "xs",
24
+ fontWeight: "700",
25
+ textTransform: "uppercase",
26
+ letterSpacing: "0.06em",
27
+ lineHeight: "1",
28
+ whiteSpace: "nowrap"
29
+ },
30
+ variants: {
31
+ tone: {
32
+ success: {
33
+ bg: "badge.successBg",
34
+ color: "badge.successText",
35
+ borderColor: "badge.successBorder"
36
+ },
37
+ warning: {
38
+ bg: "badge.warningBg",
39
+ color: "badge.warningText",
40
+ borderColor: "badge.warningBorder"
41
+ },
42
+ info: {
43
+ bg: "badge.infoBg",
44
+ color: "badge.infoText",
45
+ borderColor: "badge.infoBorder"
46
+ },
47
+ neutral: {
48
+ bg: "badge.neutralBg",
49
+ color: "badge.neutralText",
50
+ borderColor: "badge.neutralBorder"
51
+ },
52
+ danger: {
53
+ bg: "badge.dangerBg",
54
+ color: "badge.dangerText",
55
+ borderColor: "badge.dangerBorder"
56
+ }
57
+ }
58
+ },
59
+ defaultVariants: {
60
+ tone: "neutral"
61
+ }
62
+ }), pn = /* @__PURE__ */ _({
63
+ __name: "StatusBadge",
64
+ props: {
65
+ tone: { default: "neutral" }
66
+ },
67
+ setup(e) {
68
+ const t = e;
69
+ return (n, a) => (p(), D("span", {
70
+ class: m(o(fn)({ tone: t.tone }))
71
+ }, [
72
+ O(n.$slots, "default")
73
+ ], 2));
74
+ }
75
+ }), vn = z({
76
+ base: {
77
+ borderWidth: "1px",
78
+ padding: "5",
79
+ _dark: {
80
+ borderColor: "border.default"
81
+ }
82
+ },
83
+ variants: {
84
+ ok: {
85
+ true: {
86
+ borderColor: "result.okBorder",
87
+ bg: "result.okBg"
88
+ },
89
+ false: {
90
+ borderColor: "result.failBorder",
91
+ bg: "result.failBg"
92
+ }
93
+ }
94
+ }
95
+ }), mn = (e) => Te(Ct, vn({ ok: e })), bn = E({
96
+ display: "flex",
97
+ justifyContent: "space-between",
98
+ gap: "4",
99
+ alignItems: { base: "flex-start", md: "center" },
100
+ flexDirection: { base: "column", md: "row" },
101
+ mb: "3"
102
+ }), gn = E({
103
+ display: "flex",
104
+ alignItems: "center",
105
+ gap: "3"
106
+ }), yn = z({
107
+ base: {
108
+ width: "9",
109
+ height: "9",
110
+ borderRadius: "full",
111
+ display: "flex",
112
+ alignItems: "center",
113
+ justifyContent: "center",
114
+ flexShrink: "0"
115
+ },
116
+ variants: {
117
+ ok: {
118
+ true: {
119
+ bg: "bg.accentSoft",
120
+ color: "text.accent"
121
+ },
122
+ false: {
123
+ bg: "badge.warningBg",
124
+ color: "badge.warningText"
125
+ }
126
+ }
127
+ }
128
+ }), hn = E({
129
+ fontSize: "lg",
130
+ fontWeight: "700",
131
+ color: "text.primary",
132
+ lineHeight: "1.3"
133
+ }), et = z({
134
+ base: {},
135
+ variants: {
136
+ spaced: {
137
+ true: { mb: "3" },
138
+ false: { mb: "0" }
139
+ }
140
+ }
141
+ }), De = z({
142
+ base: {
143
+ fontSize: "sm",
144
+ fontWeight: "700",
145
+ mb: "2"
146
+ },
147
+ variants: {
148
+ tone: {
149
+ detail: { color: "result.detailText" },
150
+ warning: { color: "result.warningLabel" },
151
+ error: { color: "result.errorLabel" }
152
+ }
153
+ }
154
+ }), Oe = z({
155
+ base: {
156
+ display: "grid",
157
+ gap: "1.5",
158
+ pl: "4"
159
+ },
160
+ variants: {
161
+ tone: {
162
+ detail: { color: "result.bodyText" },
163
+ warning: { color: "result.warningBody" },
164
+ error: { color: "result.errorBody" }
165
+ }
166
+ }
167
+ }), wn = ["aria-live", "role"], Cn = { key: 2 }, Zs = /* @__PURE__ */ _({
168
+ __name: "ResultPanel",
169
+ props: {
170
+ ok: { type: Boolean },
171
+ summary: {},
172
+ warnings: {},
173
+ errors: {},
174
+ messages: {},
175
+ live: {},
176
+ passLabel: {},
177
+ failLabel: {},
178
+ detailsLabel: {},
179
+ warningsLabel: {},
180
+ errorsLabel: {}
181
+ },
182
+ setup(e) {
183
+ const t = e;
184
+ return (n, a) => (p(), D("div", {
185
+ class: m(o(mn)(e.ok)),
186
+ "aria-live": t.live ?? "polite",
187
+ role: (t.live ?? "polite") === "off" ? void 0 : "status"
188
+ }, [
189
+ P("div", {
190
+ class: m(o(bn))
191
+ }, [
192
+ P("div", {
193
+ class: m(o(gn))
194
+ }, [
195
+ P("div", {
196
+ class: m(o(yn)({ ok: e.ok }))
197
+ }, [
198
+ (p(), S(ft(e.ok ? o(nn) : o(an)), { size: 18 }))
199
+ ], 2),
200
+ P("h3", {
201
+ class: m(o(hn))
202
+ }, R(t.summary), 3)
203
+ ], 2),
204
+ F(pn, {
205
+ tone: e.ok ? "success" : "warning"
206
+ }, {
207
+ default: C(() => [
208
+ X(R(e.ok ? t.passLabel ?? "Pass" : t.failLabel ?? "Fail"), 1)
209
+ ]),
210
+ _: 1
211
+ }, 8, ["tone"])
212
+ ], 2),
213
+ e.messages?.length ? (p(), D("div", {
214
+ key: 0,
215
+ class: m(o(et)({ spaced: !0 }))
216
+ }, [
217
+ P("p", {
218
+ class: m(o(De)({ tone: "detail" }))
219
+ }, R(t.detailsLabel ?? "Details"), 3),
220
+ P("ul", {
221
+ class: m(o(Oe)({ tone: "detail" }))
222
+ }, [
223
+ (p(!0), D(Q, null, se(e.messages, (s) => (p(), D("li", { key: s }, R(s), 1))), 128))
224
+ ], 2)
225
+ ], 2)) : L("", !0),
226
+ e.warnings?.length ? (p(), D("div", {
227
+ key: 1,
228
+ class: m(o(et)({ spaced: !!e.errors?.length }))
229
+ }, [
230
+ P("p", {
231
+ class: m(o(De)({ tone: "warning" }))
232
+ }, R(t.warningsLabel ?? "Warnings"), 3),
233
+ P("ul", {
234
+ class: m(o(Oe)({ tone: "warning" }))
235
+ }, [
236
+ (p(!0), D(Q, null, se(e.warnings, (s) => (p(), D("li", { key: s }, R(s), 1))), 128))
237
+ ], 2)
238
+ ], 2)) : L("", !0),
239
+ e.errors?.length ? (p(), D("div", Cn, [
240
+ P("p", {
241
+ class: m(o(De)({ tone: "error" }))
242
+ }, R(t.errorsLabel ?? "Errors"), 3),
243
+ P("ul", {
244
+ class: m(o(Oe)({ tone: "error" }))
245
+ }, [
246
+ (p(!0), D(Q, null, se(e.errors, (s) => (p(), D("li", { key: s }, R(s), 1))), 128))
247
+ ], 2)
248
+ ])) : L("", !0)
249
+ ], 10, wn));
250
+ }
251
+ }), _n = E({
252
+ padding: "6"
253
+ }), xn = E({
254
+ height: "100%",
255
+ minHeight: "0",
256
+ display: "grid",
257
+ gridTemplateRows: "auto minmax(0, 1fr)"
258
+ }), En = Ct, Tn = Yt, Sn = E({
259
+ position: "relative",
260
+ zIndex: "1",
261
+ mb: "4"
262
+ }), kn = E({
263
+ position: "relative",
264
+ zIndex: "1",
265
+ mb: "0"
266
+ }), Dn = Xt, On = _t, An = Gt, In = E({
267
+ color: "text.secondary",
268
+ lineHeight: "1.65",
269
+ fontSize: "sm",
270
+ maxWidth: "2xl"
271
+ }), Pn = Jt, Bn = E({
272
+ position: "relative",
273
+ zIndex: "1",
274
+ minHeight: "0",
275
+ overflowY: "auto",
276
+ paddingRight: "1",
277
+ overscrollBehavior: "contain"
278
+ }), Rn = E({
279
+ position: "relative",
280
+ zIndex: "1"
281
+ }), er = /* @__PURE__ */ _({
282
+ __name: "SectionCard",
283
+ props: {
284
+ title: {},
285
+ eyebrow: { default: void 0 },
286
+ description: { default: "" },
287
+ scrollBody: { type: Boolean, default: !1 },
288
+ collapseBodyGap: { type: Boolean, default: !1 }
289
+ },
290
+ setup(e) {
291
+ const t = e;
292
+ return (n, a) => (p(), D("section", {
293
+ class: m(o(Te)(o(En), o(_n), t.scrollBody && o(xn)))
294
+ }, [
295
+ P("div", {
296
+ class: m(o(Te)(o(Tn), t.collapseBodyGap ? o(kn) : o(Sn)))
297
+ }, [
298
+ P("div", {
299
+ class: m(o(Dn))
300
+ }, [
301
+ t.eyebrow ? (p(), D("p", {
302
+ key: 0,
303
+ class: m(o(On))
304
+ }, R(t.eyebrow), 3)) : L("", !0),
305
+ P("h2", {
306
+ class: m(o(An))
307
+ }, R(t.title), 3),
308
+ t.description ? (p(), D("p", {
309
+ key: 1,
310
+ class: m(o(In))
311
+ }, R(t.description), 3)) : L("", !0)
312
+ ], 2),
313
+ n.$slots.actions ? (p(), D("div", {
314
+ key: 0,
315
+ class: m(o(Pn))
316
+ }, [
317
+ O(n.$slots, "actions")
318
+ ], 2)) : L("", !0)
319
+ ], 2),
320
+ P("div", {
321
+ class: m(t.scrollBody ? o(Bn) : o(Rn))
322
+ }, [
323
+ O(n.$slots, "default")
324
+ ], 2)
325
+ ], 2));
326
+ }
327
+ });
328
+ function me(e, t) {
329
+ const n = typeof e == "string" && !t ? `${e}Context` : t, a = Symbol(n);
330
+ return [(u) => {
331
+ const i = pt(a, u);
332
+ if (i || i === null) return i;
333
+ throw new Error(`Injection \`${a.toString()}\` not found. Component must be used within ${Array.isArray(e) ? `one of the following components: ${e.join(", ")}` : `\`${e}\``}`);
334
+ }, (u) => (vt(a, u), u)];
335
+ }
336
+ function G() {
337
+ let e = document.activeElement;
338
+ if (e == null) return null;
339
+ for (; e != null && e.shadowRoot != null && e.shadowRoot.activeElement != null; ) e = e.shadowRoot.activeElement;
340
+ return e;
341
+ }
342
+ function Tt(e, t, n) {
343
+ const a = n.originalEvent.target, s = new CustomEvent(e, {
344
+ bubbles: !1,
345
+ cancelable: !0,
346
+ detail: n
347
+ });
348
+ t && a.addEventListener(e, t, { once: !0 }), a.dispatchEvent(s);
349
+ }
350
+ function Ln(e) {
351
+ return e == null;
352
+ }
353
+ function We(e, t) {
354
+ return $t() ? (bt(e, t), !0) : !1;
355
+ }
356
+ // @__NO_SIDE_EFFECTS__
357
+ function $n(e) {
358
+ let t = !1, n;
359
+ const a = gt(!0);
360
+ return ((...s) => (t || (n = a.run(() => e(...s)), t = !0), n));
361
+ }
362
+ const H = typeof window < "u" && typeof document < "u";
363
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
364
+ const Fn = (e) => typeof e < "u", Mn = Object.prototype.toString, zn = (e) => Mn.call(e) === "[object Object]", qn = () => {
365
+ }, tt = /* @__PURE__ */ Nn();
366
+ function Nn() {
367
+ var e, t, n;
368
+ return H && !!(!((e = window) === null || e === void 0 || (e = e.navigator) === null || e === void 0) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) === null || t === void 0 || (t = t.navigator) === null || t === void 0 ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test((n = window) === null || n === void 0 ? void 0 : n.navigator.userAgent));
369
+ }
370
+ function Ae(e) {
371
+ return Array.isArray(e) ? e : [e];
372
+ }
373
+ function Vn(e) {
374
+ return ue();
375
+ }
376
+ // @__NO_SIDE_EFFECTS__
377
+ function Wn(e) {
378
+ if (!H) return e;
379
+ let t = 0, n, a;
380
+ const s = () => {
381
+ t -= 1, a && t <= 0 && (a.stop(), n = void 0, a = void 0);
382
+ };
383
+ return ((...r) => (t += 1, a || (a = gt(!0), n = a.run(() => e(...r))), We(s), n));
384
+ }
385
+ function jn(e, t) {
386
+ Vn() && mt(e, t);
387
+ }
388
+ function Hn(e, t, n = {}) {
389
+ const { immediate: a = !0, immediateCallback: s = !1 } = n, r = ze(!1);
390
+ let u;
391
+ function i() {
392
+ u && (clearTimeout(u), u = void 0);
393
+ }
394
+ function l() {
395
+ r.value = !1, i();
396
+ }
397
+ function d(...c) {
398
+ s && e(), i(), r.value = !0, u = setTimeout(() => {
399
+ r.value = !1, u = void 0, e(...c);
400
+ }, Y(t));
401
+ }
402
+ return a && (r.value = !0, H && d()), We(l), {
403
+ isPending: yt(r),
404
+ start: d,
405
+ stop: l
406
+ };
407
+ }
408
+ function Kn(e = 1e3, t = {}) {
409
+ const { controls: n = !1, callback: a } = t, s = Hn(a ?? qn, e, t), r = $(() => !s.isPending.value);
410
+ return n ? {
411
+ ready: r,
412
+ ...s
413
+ } : r;
414
+ }
415
+ function Un(e, t, n) {
416
+ return j(e, t, {
417
+ ...n,
418
+ immediate: !0
419
+ });
420
+ }
421
+ const Se = H ? window : void 0;
422
+ function re(e) {
423
+ var t;
424
+ const n = Y(e);
425
+ return (t = n?.$el) !== null && t !== void 0 ? t : n;
426
+ }
427
+ function St(...e) {
428
+ const t = (a, s, r, u) => (a.addEventListener(s, r, u), () => a.removeEventListener(s, r, u)), n = $(() => {
429
+ const a = Ae(Y(e[0])).filter((s) => s != null);
430
+ return a.every((s) => typeof s != "string") ? a : void 0;
431
+ });
432
+ return Un(() => {
433
+ var a, s;
434
+ return [
435
+ (a = (s = n.value) === null || s === void 0 ? void 0 : s.map((r) => re(r))) !== null && a !== void 0 ? a : [Se].filter((r) => r != null),
436
+ Ae(Y(n.value ? e[1] : e[0])),
437
+ Ae(o(n.value ? e[2] : e[1])),
438
+ Y(n.value ? e[3] : e[2])
439
+ ];
440
+ }, ([a, s, r, u], i, l) => {
441
+ if (!a?.length || !s?.length || !r?.length) return;
442
+ const d = zn(u) ? { ...u } : u, c = a.flatMap((f) => s.flatMap((v) => r.map((b) => t(f, v, b, d))));
443
+ l(() => {
444
+ c.forEach((f) => f());
445
+ });
446
+ }, { flush: "post" });
447
+ }
448
+ // @__NO_SIDE_EFFECTS__
449
+ function Yn() {
450
+ const e = ze(!1), t = ue();
451
+ return t && ae(() => {
452
+ e.value = !0;
453
+ }, t), e;
454
+ }
455
+ function Xn(e) {
456
+ return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
457
+ }
458
+ function je(...e) {
459
+ let t, n, a = {};
460
+ e.length === 3 ? (t = e[0], n = e[1], a = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], a = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
461
+ const { target: s = Se, eventName: r = "keydown", passive: u = !1, dedupe: i = !1 } = a, l = Xn(t);
462
+ return St(s, r, (c) => {
463
+ c.repeat && Y(i) || l(c) && n(c);
464
+ }, u);
465
+ }
466
+ function Gn(e, t = {}) {
467
+ const { immediate: n = !0, fpsLimit: a = null, window: s = Se, once: r = !1 } = t, u = ze(!1), i = $(() => {
468
+ const b = Y(a);
469
+ return b ? 1e3 / b : null;
470
+ });
471
+ let l = 0, d = null;
472
+ function c(b) {
473
+ if (!u.value || !s) return;
474
+ l || (l = b);
475
+ const y = b - l;
476
+ if (i.value && y < i.value) {
477
+ d = s.requestAnimationFrame(c);
478
+ return;
479
+ }
480
+ if (l = b, e({
481
+ delta: y,
482
+ timestamp: b
483
+ }), r) {
484
+ u.value = !1, d = null;
485
+ return;
486
+ }
487
+ d = s.requestAnimationFrame(c);
488
+ }
489
+ function f() {
490
+ !u.value && s && (u.value = !0, l = 0, d = s.requestAnimationFrame(c));
491
+ }
492
+ function v() {
493
+ u.value = !1, d != null && s && (s.cancelAnimationFrame(d), d = null);
494
+ }
495
+ return n && f(), We(v), {
496
+ isActive: yt(u),
497
+ pause: v,
498
+ resume: f
499
+ };
500
+ }
501
+ function Jn(e) {
502
+ return JSON.parse(JSON.stringify(e));
503
+ }
504
+ // @__NO_SIDE_EFFECTS__
505
+ function kt(e, t, n, a = {}) {
506
+ var s, r;
507
+ const { clone: u = !1, passive: i = !1, eventName: l, deep: d = !1, defaultValue: c, shouldEmit: f } = a, v = ue(), b = n || v?.emit || (v == null || (s = v.$emit) === null || s === void 0 ? void 0 : s.bind(v)) || (v == null || (r = v.proxy) === null || r === void 0 || (r = r.$emit) === null || r === void 0 ? void 0 : r.bind(v?.proxy));
508
+ let y = l;
509
+ y = y || `update:${t.toString()}`;
510
+ const A = (T) => u ? typeof u == "function" ? u(T) : Jn(T) : T, g = () => Fn(e[t]) ? A(e[t]) : c, h = (T) => {
511
+ f ? f(T) && b(y, T) : b(y, T);
512
+ };
513
+ if (i) {
514
+ const T = x(g());
515
+ let k = !1;
516
+ return j(() => e[t], (I) => {
517
+ k || (k = !0, T.value = A(I), Z(() => k = !1));
518
+ }), j(T, (I) => {
519
+ !k && (I !== e[t] || d) && h(I);
520
+ }, { deep: d }), T;
521
+ } else return $({
522
+ get() {
523
+ return g();
524
+ },
525
+ set(T) {
526
+ h(T);
527
+ }
528
+ });
529
+ }
530
+ function He(e) {
531
+ return e ? e.flatMap((t) => t.type === Q ? He(t.children) : [t]) : [];
532
+ }
533
+ const [Dt] = /* @__PURE__ */ me("ConfigProvider");
534
+ function Ie(e) {
535
+ if (e === null || typeof e != "object")
536
+ return !1;
537
+ const t = Object.getPrototypeOf(e);
538
+ return t !== null && t !== Object.prototype && Object.getPrototypeOf(t) !== null || Symbol.iterator in e ? !1 : Symbol.toStringTag in e ? Object.prototype.toString.call(e) === "[object Module]" : !0;
539
+ }
540
+ function Le(e, t, n = ".", a) {
541
+ if (!Ie(t))
542
+ return Le(e, {}, n, a);
543
+ const s = { ...t };
544
+ for (const r of Object.keys(e)) {
545
+ if (r === "__proto__" || r === "constructor")
546
+ continue;
547
+ const u = e[r];
548
+ u != null && (a && a(s, r, u, n) || (Array.isArray(u) && Array.isArray(s[r]) ? s[r] = [...u, ...s[r]] : Ie(u) && Ie(s[r]) ? s[r] = Le(
549
+ u,
550
+ s[r],
551
+ (n ? `${n}.` : "") + r.toString(),
552
+ a
553
+ ) : s[r] = u));
554
+ }
555
+ return s;
556
+ }
557
+ function Qn(e) {
558
+ return (...t) => (
559
+ // eslint-disable-next-line unicorn/no-array-reduce
560
+ t.reduce((n, a) => Le(n, a, "", e), {})
561
+ );
562
+ }
563
+ const Zn = Qn(), ea = /* @__PURE__ */ Wn(() => {
564
+ const e = x(/* @__PURE__ */ new Map()), t = x(), n = $(() => {
565
+ for (const u of e.value.values()) if (u) return !0;
566
+ return !1;
567
+ }), a = Dt({ scrollBody: x(!0) });
568
+ let s = null;
569
+ const r = () => {
570
+ document.body.style.paddingRight = "", document.body.style.marginRight = "", document.body.style.pointerEvents = "", document.documentElement.style.removeProperty("--scrollbar-width"), document.body.style.overflow = t.value ?? "", tt && s?.(), t.value = void 0;
571
+ };
572
+ return j(n, (u, i) => {
573
+ if (!H) return;
574
+ if (!u) {
575
+ i && r();
576
+ return;
577
+ }
578
+ t.value === void 0 && (t.value = document.body.style.overflow);
579
+ const l = window.innerWidth - document.documentElement.clientWidth, d = {
580
+ padding: l,
581
+ margin: 0
582
+ }, c = a.scrollBody?.value ? typeof a.scrollBody.value == "object" ? Zn({
583
+ padding: a.scrollBody.value.padding === !0 ? l : a.scrollBody.value.padding,
584
+ margin: a.scrollBody.value.margin === !0 ? l : a.scrollBody.value.margin
585
+ }, d) : d : {
586
+ padding: 0,
587
+ margin: 0
588
+ };
589
+ l > 0 && (document.body.style.paddingRight = typeof c.padding == "number" ? `${c.padding}px` : String(c.padding), document.body.style.marginRight = typeof c.margin == "number" ? `${c.margin}px` : String(c.margin), document.documentElement.style.setProperty("--scrollbar-width", `${l}px`), document.body.style.overflow = "hidden"), tt && (s = St(document, "touchmove", (f) => na(f), { passive: !1 })), Z(() => {
590
+ n.value && (document.body.style.pointerEvents = "none", document.body.style.overflow = "hidden");
591
+ });
592
+ }, {
593
+ immediate: !0,
594
+ flush: "sync"
595
+ }), e;
596
+ });
597
+ function ta(e) {
598
+ const t = Math.random().toString(36).substring(2, 7), n = ea();
599
+ n.value.set(t, e);
600
+ const a = $({
601
+ get: () => n.value.get(t) ?? !1,
602
+ set: (s) => n.value.set(t, s)
603
+ });
604
+ return jn(() => {
605
+ n.value.delete(t);
606
+ }), a;
607
+ }
608
+ function Ot(e) {
609
+ const t = window.getComputedStyle(e);
610
+ if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight) return !0;
611
+ {
612
+ const n = e.parentNode;
613
+ return !(n instanceof Element) || n.tagName === "BODY" ? !1 : Ot(n);
614
+ }
615
+ }
616
+ function na(e) {
617
+ const t = e || window.event, n = t.target;
618
+ return n instanceof Element && Ot(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.cancelable && t.preventDefault(), !1);
619
+ }
620
+ function Ke(e) {
621
+ const t = ue(), n = t?.type.emits, a = {};
622
+ return n?.length || console.warn(`No emitted event found. Please check component: ${t?.type.__name}`), n?.forEach((s) => {
623
+ a[Ft(Mt(s))] = (...r) => e(s, ...r);
624
+ }), a;
625
+ }
626
+ function q() {
627
+ const e = ue(), t = x(), n = $(() => a());
628
+ zt(() => {
629
+ n.value !== a() && qt(t);
630
+ });
631
+ function a() {
632
+ return t.value && "$el" in t.value && ["#text", "#comment"].includes(t.value.$el.nodeName) ? t.value.$el.nextElementSibling : re(t);
633
+ }
634
+ const s = Object.assign({}, e.exposed), r = {};
635
+ for (const i in e.props) Object.defineProperty(r, i, {
636
+ enumerable: !0,
637
+ configurable: !0,
638
+ get: () => e.props[i]
639
+ });
640
+ if (Object.keys(s).length > 0) for (const i in s) Object.defineProperty(r, i, {
641
+ enumerable: !0,
642
+ configurable: !0,
643
+ get: () => s[i]
644
+ });
645
+ Object.defineProperty(r, "$el", {
646
+ enumerable: !0,
647
+ configurable: !0,
648
+ get: () => e.vnode.el
649
+ }), e.exposed = r;
650
+ function u(i) {
651
+ if (t.value = i, !!i && (Object.defineProperty(r, "$el", {
652
+ enumerable: !0,
653
+ configurable: !0,
654
+ get: () => i instanceof Element ? i : i.$el
655
+ }), !(i instanceof Element) && !Object.hasOwn(i, "$el"))) {
656
+ const l = i.$.exposed, d = Object.assign({}, r);
657
+ for (const c in l) Object.defineProperty(d, c, {
658
+ enumerable: !0,
659
+ configurable: !0,
660
+ get: () => l[c]
661
+ });
662
+ e.exposed = d;
663
+ }
664
+ }
665
+ return {
666
+ forwardRef: u,
667
+ currentRef: t,
668
+ currentElement: n
669
+ };
670
+ }
671
+ var aa = function(e) {
672
+ if (typeof document > "u")
673
+ return null;
674
+ var t = Array.isArray(e) ? e[0] : e;
675
+ return t.ownerDocument.body;
676
+ }, ie = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), he = {}, Pe = 0, At = function(e) {
677
+ return e && (e.host || At(e.parentNode));
678
+ }, oa = function(e, t) {
679
+ return t.map(function(n) {
680
+ if (e.contains(n))
681
+ return n;
682
+ var a = At(n);
683
+ return a && e.contains(a) ? a : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
684
+ }).filter(function(n) {
685
+ return !!n;
686
+ });
687
+ }, sa = function(e, t, n, a) {
688
+ var s = oa(t, Array.isArray(e) ? e : [e]);
689
+ he[n] || (he[n] = /* @__PURE__ */ new WeakMap());
690
+ var r = he[n], u = [], i = /* @__PURE__ */ new Set(), l = new Set(s), d = function(f) {
691
+ !f || i.has(f) || (i.add(f), d(f.parentNode));
692
+ };
693
+ s.forEach(d);
694
+ var c = function(f) {
695
+ !f || l.has(f) || Array.prototype.forEach.call(f.children, function(v) {
696
+ if (i.has(v))
697
+ c(v);
698
+ else
699
+ try {
700
+ var b = v.getAttribute(a), y = b !== null && b !== "false", A = (ie.get(v) || 0) + 1, g = (r.get(v) || 0) + 1;
701
+ ie.set(v, A), r.set(v, g), u.push(v), A === 1 && y && ye.set(v, !0), g === 1 && v.setAttribute(n, "true"), y || v.setAttribute(a, "true");
702
+ } catch (h) {
703
+ console.error("aria-hidden: cannot operate on ", v, h);
704
+ }
705
+ });
706
+ };
707
+ return c(t), i.clear(), Pe++, function() {
708
+ u.forEach(function(f) {
709
+ var v = ie.get(f) - 1, b = r.get(f) - 1;
710
+ ie.set(f, v), r.set(f, b), v || (ye.has(f) || f.removeAttribute(a), ye.delete(f)), b || f.removeAttribute(n);
711
+ }), Pe--, Pe || (ie = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), he = {});
712
+ };
713
+ }, ra = function(e, t, n) {
714
+ n === void 0 && (n = "data-aria-hidden");
715
+ var a = Array.from(Array.isArray(e) ? e : [e]), s = aa(e);
716
+ return s ? (a.push.apply(a, Array.from(s.querySelectorAll("[aria-live], script"))), sa(a, s, n, "aria-hidden")) : function() {
717
+ return null;
718
+ };
719
+ };
720
+ function ia(e) {
721
+ let t;
722
+ j(() => re(e), (n) => {
723
+ let a = !1;
724
+ try {
725
+ a = !!n?.closest("[popover]:not(:popover-open)");
726
+ } catch {
727
+ }
728
+ n && !a ? t = ra(n) : t && t();
729
+ }), pe(() => {
730
+ t && t();
731
+ });
732
+ }
733
+ let la = 0;
734
+ function nt(e, t = "reka") {
735
+ let n;
736
+ const a = Dt({ useId: void 0 });
737
+ return a.useId ? n = a.useId() : "useId" in Qe ? n = Qe.useId?.() : n = `${++la}`, t ? `${t}-${n}` : n;
738
+ }
739
+ function ua(e, t) {
740
+ const n = x(e);
741
+ function a(r) {
742
+ return t[n.value][r] ?? n.value;
743
+ }
744
+ return {
745
+ state: n,
746
+ dispatch: (r) => {
747
+ n.value = a(r);
748
+ }
749
+ };
750
+ }
751
+ function da(e, t) {
752
+ const n = x({}), a = x("none"), s = x(e), r = e.value ? "mounted" : "unmounted";
753
+ let u;
754
+ const i = t.value?.ownerDocument.defaultView ?? Se, { state: l, dispatch: d } = ua(r, {
755
+ mounted: {
756
+ UNMOUNT: "unmounted",
757
+ ANIMATION_OUT: "unmountSuspended"
758
+ },
759
+ unmountSuspended: {
760
+ MOUNT: "mounted",
761
+ ANIMATION_END: "unmounted"
762
+ },
763
+ unmounted: { MOUNT: "mounted" }
764
+ }), c = (g) => {
765
+ if (H) {
766
+ const h = new CustomEvent(g, {
767
+ bubbles: !1,
768
+ cancelable: !1
769
+ });
770
+ t.value?.dispatchEvent(h);
771
+ }
772
+ };
773
+ j(e, async (g, h) => {
774
+ const T = h !== g;
775
+ if (await Z(), T) {
776
+ const k = a.value, I = we(t.value);
777
+ g ? (d("MOUNT"), c("enter"), I === "none" && c("after-enter")) : I === "none" || I === "undefined" || n.value?.display === "none" ? (d("UNMOUNT"), c("leave"), c("after-leave")) : h && k !== I ? (d("ANIMATION_OUT"), c("leave")) : (d("UNMOUNT"), c("after-leave"));
778
+ }
779
+ }, { immediate: !0 });
780
+ const f = (g) => {
781
+ const h = we(t.value), T = h.includes(CSS.escape(g.animationName)), k = l.value === "mounted" ? "enter" : "leave";
782
+ if (g.target === t.value && T && (c(`after-${k}`), d("ANIMATION_END"), !s.value)) {
783
+ const I = t.value.style.animationFillMode;
784
+ t.value.style.animationFillMode = "forwards", u = i?.setTimeout(() => {
785
+ t.value?.style.animationFillMode === "forwards" && (t.value.style.animationFillMode = I);
786
+ });
787
+ }
788
+ g.target === t.value && h === "none" && d("ANIMATION_END");
789
+ }, v = (g) => {
790
+ g.target === t.value && (a.value = we(t.value));
791
+ }, b = j(t, (g, h) => {
792
+ g ? (n.value = getComputedStyle(g), g.addEventListener("animationstart", v), g.addEventListener("animationcancel", f), g.addEventListener("animationend", f)) : (d("ANIMATION_END"), u !== void 0 && i?.clearTimeout(u), h?.removeEventListener("animationstart", v), h?.removeEventListener("animationcancel", f), h?.removeEventListener("animationend", f));
793
+ }, { immediate: !0 }), y = j(l, () => {
794
+ const g = we(t.value);
795
+ a.value = l.value === "mounted" ? g : "none";
796
+ });
797
+ return pe(() => {
798
+ b(), y();
799
+ }), { isPresent: $(() => ["mounted", "unmountSuspended"].includes(l.value)) };
800
+ }
801
+ function we(e) {
802
+ return e && getComputedStyle(e).animationName || "none";
803
+ }
804
+ var Ue = /* @__PURE__ */ _({
805
+ name: "Presence",
806
+ props: {
807
+ present: {
808
+ type: Boolean,
809
+ required: !0
810
+ },
811
+ forceMount: { type: Boolean }
812
+ },
813
+ slots: {},
814
+ setup(e, { slots: t, expose: n }) {
815
+ const { present: a, forceMount: s } = ve(e), r = x(), { isPresent: u } = da(a, r);
816
+ n({ present: u });
817
+ let i = t.default({ present: u.value });
818
+ i = He(i || []);
819
+ const l = ue();
820
+ if (i && i?.length > 1) {
821
+ const d = l?.parent?.type.name ? `<${l.parent.type.name} />` : "component";
822
+ throw new Error([
823
+ `Detected an invalid children for \`${d}\` for \`Presence\` component.`,
824
+ "",
825
+ "Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",
826
+ "You can apply a few solutions:",
827
+ ["Provide a single child element so that `presence` directive attach correctly.", "Ensure the first child is an actual element instead of a raw text node or comment node."].map((c) => ` - ${c}`).join(`
828
+ `)
829
+ ].join(`
830
+ `));
831
+ }
832
+ return () => s.value || a.value || u.value ? le(t.default({ present: u.value })[0], { ref: (d) => {
833
+ const c = re(d);
834
+ return typeof c?.hasAttribute > "u" || (c?.hasAttribute("data-reka-popper-content-wrapper") ? r.value = c.firstElementChild : r.value = c), c;
835
+ } }) : null;
836
+ }
837
+ });
838
+ const $e = /* @__PURE__ */ _({
839
+ name: "PrimitiveSlot",
840
+ inheritAttrs: !1,
841
+ setup(e, { attrs: t, slots: n }) {
842
+ return () => {
843
+ if (!n.default) return null;
844
+ const a = He(n.default()), s = a.findIndex((l) => l.type !== Nt);
845
+ if (s === -1) return a;
846
+ const r = a[s];
847
+ delete r.props?.ref;
848
+ const u = r.props ? W(t, r.props) : t, i = Vt({
849
+ ...r,
850
+ props: {}
851
+ }, u);
852
+ return a.length === 1 ? i : (a[s] = i, a);
853
+ };
854
+ }
855
+ }), ca = [
856
+ "area",
857
+ "img",
858
+ "input"
859
+ ], N = /* @__PURE__ */ _({
860
+ name: "Primitive",
861
+ inheritAttrs: !1,
862
+ props: {
863
+ asChild: {
864
+ type: Boolean,
865
+ default: !1
866
+ },
867
+ as: {
868
+ type: [String, Object],
869
+ default: "div"
870
+ }
871
+ },
872
+ setup(e, { attrs: t, slots: n }) {
873
+ const a = e.asChild ? "template" : e.as;
874
+ return typeof a == "string" && ca.includes(a) ? () => le(a, t) : a !== "template" ? () => le(e.as, t, { default: n.default }) : () => le($e, t, { default: n.default });
875
+ }
876
+ });
877
+ function at() {
878
+ const e = x(), t = $(() => ["#text", "#comment"].includes(e.value?.$el.nodeName) ? e.value?.$el.nextElementSibling : re(e));
879
+ return {
880
+ primitiveElement: e,
881
+ currentElement: t
882
+ };
883
+ }
884
+ const [te, fa] = /* @__PURE__ */ me("DialogRoot");
885
+ var pa = /* @__PURE__ */ _({
886
+ inheritAttrs: !1,
887
+ __name: "DialogRoot",
888
+ props: {
889
+ open: {
890
+ type: Boolean,
891
+ required: !1,
892
+ default: void 0
893
+ },
894
+ defaultOpen: {
895
+ type: Boolean,
896
+ required: !1,
897
+ default: !1
898
+ },
899
+ modal: {
900
+ type: Boolean,
901
+ required: !1,
902
+ default: !0
903
+ }
904
+ },
905
+ emits: ["update:open"],
906
+ setup(e, { emit: t }) {
907
+ const n = e, s = /* @__PURE__ */ kt(n, "open", t, {
908
+ defaultValue: n.defaultOpen,
909
+ passive: n.open === void 0
910
+ }), r = x(), u = x(), { modal: i } = ve(n);
911
+ return fa({
912
+ open: s,
913
+ modal: i,
914
+ openModal: () => {
915
+ s.value = !0;
916
+ },
917
+ onOpenChange: (l) => {
918
+ s.value = l;
919
+ },
920
+ onOpenToggle: () => {
921
+ s.value = !s.value;
922
+ },
923
+ contentId: "",
924
+ titleId: "",
925
+ descriptionId: "",
926
+ triggerElement: r,
927
+ contentElement: u
928
+ }), (l, d) => O(l.$slots, "default", {
929
+ open: o(s),
930
+ close: () => s.value = !1
931
+ });
932
+ }
933
+ }), va = pa, ma = /* @__PURE__ */ _({
934
+ __name: "DialogClose",
935
+ props: {
936
+ asChild: {
937
+ type: Boolean,
938
+ required: !1
939
+ },
940
+ as: {
941
+ type: null,
942
+ required: !1,
943
+ default: "button"
944
+ }
945
+ },
946
+ setup(e) {
947
+ const t = e;
948
+ q();
949
+ const n = te();
950
+ return (a, s) => (p(), S(o(N), W(t, {
951
+ type: a.as === "button" ? "button" : void 0,
952
+ onClick: s[0] || (s[0] = (r) => o(n).onOpenChange(!1))
953
+ }), {
954
+ default: C(() => [O(a.$slots, "default")]),
955
+ _: 3
956
+ }, 16, ["type"]));
957
+ }
958
+ }), ba = ma;
959
+ const ga = "dismissableLayer.pointerDownOutside", ya = "dismissableLayer.focusOutside";
960
+ function It(e, t) {
961
+ if (!(t instanceof Element)) return !1;
962
+ const n = t.closest("[data-dismissable-layer]"), a = e.dataset.dismissableLayer === "" ? e : e.querySelector("[data-dismissable-layer]"), s = Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));
963
+ return !!(n && (a === n || s.indexOf(a) < s.indexOf(n)));
964
+ }
965
+ function ha(e, t, n = !0) {
966
+ const a = t?.value?.ownerDocument ?? globalThis?.document, s = x(!1), r = x(() => {
967
+ });
968
+ return ee((u) => {
969
+ if (!H || !Y(n)) return;
970
+ const i = async (d) => {
971
+ const c = d.target;
972
+ if (!(!t?.value || !c)) {
973
+ if (It(t.value, c)) {
974
+ s.value = !1;
975
+ return;
976
+ }
977
+ if (d.target && !s.value) {
978
+ let v = function() {
979
+ Tt(ga, e, f);
980
+ };
981
+ const f = { originalEvent: d };
982
+ d.pointerType === "touch" ? (a.removeEventListener("click", r.value), r.value = v, a.addEventListener("click", r.value, { once: !0 })) : v();
983
+ } else a.removeEventListener("click", r.value);
984
+ s.value = !1;
985
+ }
986
+ }, l = window.setTimeout(() => {
987
+ a.addEventListener("pointerdown", i);
988
+ }, 0);
989
+ u(() => {
990
+ window.clearTimeout(l), a.removeEventListener("pointerdown", i), a.removeEventListener("click", r.value);
991
+ });
992
+ }), { onPointerDownCapture: () => {
993
+ Y(n) && (s.value = !0);
994
+ } };
995
+ }
996
+ function wa(e, t, n = !0) {
997
+ const a = t?.value?.ownerDocument ?? globalThis?.document, s = x(!1);
998
+ return ee((r) => {
999
+ if (!H || !Y(n)) return;
1000
+ const u = async (i) => {
1001
+ if (!t?.value) return;
1002
+ await Z(), await Z();
1003
+ const l = i.target;
1004
+ !t.value || !l || It(t.value, l) || i.target && !s.value && Tt(ya, e, { originalEvent: i });
1005
+ };
1006
+ a.addEventListener("focusin", u), r(() => a.removeEventListener("focusin", u));
1007
+ }), {
1008
+ onFocusCapture: () => {
1009
+ Y(n) && (s.value = !0);
1010
+ },
1011
+ onBlurCapture: () => {
1012
+ Y(n) && (s.value = !1);
1013
+ }
1014
+ };
1015
+ }
1016
+ const V = /* @__PURE__ */ ht({
1017
+ layersRoot: /* @__PURE__ */ new Set(),
1018
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
1019
+ originalBodyPointerEvents: void 0,
1020
+ branches: /* @__PURE__ */ new Set()
1021
+ });
1022
+ var Ca = /* @__PURE__ */ _({
1023
+ __name: "DismissableLayer",
1024
+ props: {
1025
+ disableOutsidePointerEvents: {
1026
+ type: Boolean,
1027
+ required: !1,
1028
+ default: !1
1029
+ },
1030
+ asChild: {
1031
+ type: Boolean,
1032
+ required: !1
1033
+ },
1034
+ as: {
1035
+ type: null,
1036
+ required: !1
1037
+ }
1038
+ },
1039
+ emits: [
1040
+ "escapeKeyDown",
1041
+ "pointerDownOutside",
1042
+ "focusOutside",
1043
+ "interactOutside",
1044
+ "dismiss"
1045
+ ],
1046
+ setup(e, { emit: t }) {
1047
+ const n = e, a = t, { forwardRef: s, currentElement: r } = q(), u = $(() => r.value?.ownerDocument ?? globalThis.document), i = $(() => V.layersRoot), l = $(() => r.value ? Array.from(i.value).indexOf(r.value) : -1), d = $(() => V.layersWithOutsidePointerEventsDisabled.size > 0), c = $(() => {
1048
+ const b = Array.from(i.value), [y] = [...V.layersWithOutsidePointerEventsDisabled].slice(-1), A = b.indexOf(y);
1049
+ return l.value >= A;
1050
+ }), f = ha(async (b) => {
1051
+ const y = [...V.branches].some((A) => A?.contains(b.target));
1052
+ !c.value || y || (a("pointerDownOutside", b), a("interactOutside", b), await Z(), b.defaultPrevented || a("dismiss"));
1053
+ }, r), v = wa((b) => {
1054
+ [...V.branches].some((A) => A?.contains(b.target)) || (a("focusOutside", b), a("interactOutside", b), b.defaultPrevented || a("dismiss"));
1055
+ }, r);
1056
+ return je("Escape", (b) => {
1057
+ l.value === i.value.size - 1 && (a("escapeKeyDown", b), b.defaultPrevented || a("dismiss"));
1058
+ }), j([r, () => n.disableOutsidePointerEvents], ([b, y], A, g) => {
1059
+ b && (y && (V.layersWithOutsidePointerEventsDisabled.size === 0 && (V.originalBodyPointerEvents = u.value.body.style.pointerEvents, u.value.body.style.pointerEvents = "none"), V.layersWithOutsidePointerEventsDisabled.add(b), g(() => {
1060
+ V.layersWithOutsidePointerEventsDisabled.delete(b), V.layersWithOutsidePointerEventsDisabled.size === 0 && !Ln(V.originalBodyPointerEvents) && (u.value.body.style.pointerEvents = V.originalBodyPointerEvents);
1061
+ })), i.value.add(b));
1062
+ }, { immediate: !0 }), ee((b) => {
1063
+ b(() => {
1064
+ r.value && (i.value.delete(r.value), V.layersWithOutsidePointerEventsDisabled.delete(r.value));
1065
+ });
1066
+ }), (b, y) => (p(), S(o(N), {
1067
+ ref: o(s),
1068
+ "as-child": b.asChild,
1069
+ as: b.as,
1070
+ "data-dismissable-layer": "",
1071
+ style: qe({ pointerEvents: d.value ? c.value ? "auto" : "none" : void 0 }),
1072
+ onFocusCapture: o(v).onFocusCapture,
1073
+ onBlurCapture: o(v).onBlurCapture,
1074
+ onPointerdownCapture: o(f).onPointerDownCapture
1075
+ }, {
1076
+ default: C(() => [O(b.$slots, "default")]),
1077
+ _: 3
1078
+ }, 8, [
1079
+ "as-child",
1080
+ "as",
1081
+ "style",
1082
+ "onFocusCapture",
1083
+ "onBlurCapture",
1084
+ "onPointerdownCapture"
1085
+ ]));
1086
+ }
1087
+ }), _a = Ca, xa = /* @__PURE__ */ _({
1088
+ __name: "DismissableLayerBranch",
1089
+ props: {
1090
+ asChild: {
1091
+ type: Boolean,
1092
+ required: !1
1093
+ },
1094
+ as: {
1095
+ type: null,
1096
+ required: !1
1097
+ }
1098
+ },
1099
+ setup(e) {
1100
+ const t = e, { forwardRef: n, currentElement: a } = q();
1101
+ return ae(() => {
1102
+ V.branches.add(a.value);
1103
+ }), pe(() => {
1104
+ V.branches.delete(a.value);
1105
+ }), (s, r) => (p(), S(o(N), W({ ref: o(n) }, t), {
1106
+ default: C(() => [O(s.$slots, "default")]),
1107
+ _: 3
1108
+ }, 16));
1109
+ }
1110
+ }), Ea = xa;
1111
+ const Ta = /* @__PURE__ */ $n(() => x([]));
1112
+ function Sa() {
1113
+ const e = Ta();
1114
+ return {
1115
+ add(t) {
1116
+ const n = e.value[0];
1117
+ t !== n && n?.pause(), e.value = ot(e.value, t), e.value.unshift(t);
1118
+ },
1119
+ remove(t) {
1120
+ e.value = ot(e.value, t), e.value[0]?.resume();
1121
+ }
1122
+ };
1123
+ }
1124
+ function ot(e, t) {
1125
+ const n = [...e], a = n.indexOf(t);
1126
+ return a !== -1 && n.splice(a, 1), n;
1127
+ }
1128
+ const Be = "focusScope.autoFocusOnMount", Re = "focusScope.autoFocusOnUnmount", st = {
1129
+ bubbles: !1,
1130
+ cancelable: !0
1131
+ };
1132
+ function xe(e, { select: t = !1 } = {}) {
1133
+ const n = G();
1134
+ for (const a of e)
1135
+ if (ne(a, { select: t }), G() !== n) return !0;
1136
+ }
1137
+ function ka(e) {
1138
+ const t = Ye(e), n = rt(t, e), a = rt(t.reverse(), e);
1139
+ return [n, a];
1140
+ }
1141
+ function Ye(e) {
1142
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (a) => {
1143
+ const s = a.tagName === "INPUT" && a.type === "hidden";
1144
+ return a.disabled || a.hidden || s ? NodeFilter.FILTER_SKIP : a.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1145
+ } });
1146
+ for (; n.nextNode(); ) t.push(n.currentNode);
1147
+ return t;
1148
+ }
1149
+ function rt(e, t) {
1150
+ for (const n of e) if (!Da(n, { upTo: t })) return n;
1151
+ }
1152
+ function Da(e, { upTo: t }) {
1153
+ if (getComputedStyle(e).visibility === "hidden") return !0;
1154
+ for (; e; ) {
1155
+ if (t !== void 0 && e === t) return !1;
1156
+ if (getComputedStyle(e).display === "none") return !0;
1157
+ e = e.parentElement;
1158
+ }
1159
+ return !1;
1160
+ }
1161
+ function Oa(e) {
1162
+ return e instanceof HTMLInputElement && "select" in e;
1163
+ }
1164
+ function ne(e, { select: t = !1 } = {}) {
1165
+ if (e && e.focus) {
1166
+ const n = G();
1167
+ e.focus({ preventScroll: !0 }), e !== n && Oa(e) && t && e.select();
1168
+ }
1169
+ }
1170
+ var Aa = /* @__PURE__ */ _({
1171
+ __name: "FocusScope",
1172
+ props: {
1173
+ loop: {
1174
+ type: Boolean,
1175
+ required: !1,
1176
+ default: !1
1177
+ },
1178
+ trapped: {
1179
+ type: Boolean,
1180
+ required: !1,
1181
+ default: !1
1182
+ },
1183
+ asChild: {
1184
+ type: Boolean,
1185
+ required: !1
1186
+ },
1187
+ as: {
1188
+ type: null,
1189
+ required: !1
1190
+ }
1191
+ },
1192
+ emits: ["mountAutoFocus", "unmountAutoFocus"],
1193
+ setup(e, { emit: t }) {
1194
+ const n = e, a = t, { currentRef: s, currentElement: r } = q(), u = x(null), i = Sa(), l = /* @__PURE__ */ ht({
1195
+ paused: !1,
1196
+ pause() {
1197
+ this.paused = !0;
1198
+ },
1199
+ resume() {
1200
+ this.paused = !1;
1201
+ }
1202
+ });
1203
+ ee((c) => {
1204
+ if (!H) return;
1205
+ const f = r.value;
1206
+ if (!n.trapped) return;
1207
+ function v(g) {
1208
+ if (l.paused || !f) return;
1209
+ const h = g.target;
1210
+ f.contains(h) ? u.value = h : ne(u.value, { select: !0 });
1211
+ }
1212
+ function b(g) {
1213
+ if (l.paused || !f) return;
1214
+ const h = g.relatedTarget;
1215
+ h !== null && (f.contains(h) || ne(u.value, { select: !0 }));
1216
+ }
1217
+ function y(g) {
1218
+ const h = u.value;
1219
+ if (h === null || !g.some((I) => I.removedNodes.length > 0)) return;
1220
+ f.contains(h) || ne(f);
1221
+ }
1222
+ document.addEventListener("focusin", v), document.addEventListener("focusout", b);
1223
+ const A = new MutationObserver(y);
1224
+ f && A.observe(f, {
1225
+ childList: !0,
1226
+ subtree: !0
1227
+ }), c(() => {
1228
+ document.removeEventListener("focusin", v), document.removeEventListener("focusout", b), A.disconnect();
1229
+ });
1230
+ }), ee(async (c) => {
1231
+ const f = r.value;
1232
+ if (await Z(), !f) return;
1233
+ i.add(l);
1234
+ const v = G();
1235
+ if (!f.contains(v)) {
1236
+ const y = new CustomEvent(Be, st);
1237
+ f.addEventListener(Be, (A) => a("mountAutoFocus", A)), f.dispatchEvent(y), y.defaultPrevented || (xe(Ye(f), { select: !0 }), G() === v && ne(f));
1238
+ }
1239
+ c(() => {
1240
+ f.removeEventListener(Be, (g) => a("mountAutoFocus", g));
1241
+ const y = new CustomEvent(Re, st), A = (g) => {
1242
+ a("unmountAutoFocus", g);
1243
+ };
1244
+ f.addEventListener(Re, A), f.dispatchEvent(y), f.setAttribute("data-focus-scope-unmounting", ""), setTimeout(() => {
1245
+ y.defaultPrevented || ne(v ?? document.body, { select: !0 }), f.removeEventListener(Re, A), i.remove(l), f.removeAttribute("data-focus-scope-unmounting");
1246
+ }, 0);
1247
+ });
1248
+ });
1249
+ function d(c) {
1250
+ if (!n.loop && !n.trapped || l.paused) return;
1251
+ const f = c.key === "Tab" && !c.altKey && !c.ctrlKey && !c.metaKey, v = G();
1252
+ if (f && v) {
1253
+ const b = c.currentTarget, [y, A] = ka(b);
1254
+ y && A ? !c.shiftKey && v === A ? (c.preventDefault(), n.loop && ne(y, { select: !0 })) : c.shiftKey && v === y && (c.preventDefault(), n.loop && ne(A, { select: !0 })) : v === b && c.preventDefault();
1255
+ }
1256
+ }
1257
+ return (c, f) => (p(), S(o(N), {
1258
+ ref_key: "currentRef",
1259
+ ref: s,
1260
+ tabindex: "-1",
1261
+ "as-child": c.asChild,
1262
+ as: c.as,
1263
+ onKeydown: d
1264
+ }, {
1265
+ default: C(() => [O(c.$slots, "default")]),
1266
+ _: 3
1267
+ }, 8, ["as-child", "as"]));
1268
+ }
1269
+ }), Ia = Aa;
1270
+ function Pa(e) {
1271
+ return e ? "open" : "closed";
1272
+ }
1273
+ const Ba = "DialogTitle", Ra = "DialogContent";
1274
+ function La({ titleName: e = Ba, contentName: t = Ra, componentLink: n = "dialog.html#title", titleId: a, descriptionId: s, contentElement: r }) {
1275
+ const u = `Warning: \`${t}\` requires a \`${e}\` for the component to be accessible for screen reader users.
1276
+
1277
+ If you want to hide the \`${e}\`, you can wrap it with our VisuallyHidden component.
1278
+
1279
+ For more information, see https://www.reka-ui.com/docs/components/${n}`, i = `Warning: Missing \`Description\` or \`aria-describedby="undefined"\` for ${t}.`;
1280
+ ae(() => {
1281
+ document.getElementById(a) || console.warn(u);
1282
+ const d = r.value?.getAttribute("aria-describedby");
1283
+ s && d && (document.getElementById(s) || console.warn(i));
1284
+ });
1285
+ }
1286
+ var $a = /* @__PURE__ */ _({
1287
+ __name: "DialogContentImpl",
1288
+ props: {
1289
+ forceMount: {
1290
+ type: Boolean,
1291
+ required: !1
1292
+ },
1293
+ trapFocus: {
1294
+ type: Boolean,
1295
+ required: !1
1296
+ },
1297
+ disableOutsidePointerEvents: {
1298
+ type: Boolean,
1299
+ required: !1
1300
+ },
1301
+ asChild: {
1302
+ type: Boolean,
1303
+ required: !1
1304
+ },
1305
+ as: {
1306
+ type: null,
1307
+ required: !1
1308
+ }
1309
+ },
1310
+ emits: [
1311
+ "escapeKeyDown",
1312
+ "pointerDownOutside",
1313
+ "focusOutside",
1314
+ "interactOutside",
1315
+ "openAutoFocus",
1316
+ "closeAutoFocus"
1317
+ ],
1318
+ setup(e, { emit: t }) {
1319
+ const n = e, a = t, s = te(), { forwardRef: r, currentElement: u } = q();
1320
+ return s.titleId ||= nt(void 0, "reka-dialog-title"), s.descriptionId ||= nt(void 0, "reka-dialog-description"), ae(() => {
1321
+ s.contentElement = u, G() !== document.body && (s.triggerElement.value = G());
1322
+ }), process.env.NODE_ENV !== "production" && La({
1323
+ titleName: "DialogTitle",
1324
+ contentName: "DialogContent",
1325
+ componentLink: "dialog.html#title",
1326
+ titleId: s.titleId,
1327
+ descriptionId: s.descriptionId,
1328
+ contentElement: u
1329
+ }), (i, l) => (p(), S(o(Ia), {
1330
+ "as-child": "",
1331
+ loop: "",
1332
+ trapped: n.trapFocus,
1333
+ onMountAutoFocus: l[5] || (l[5] = (d) => a("openAutoFocus", d)),
1334
+ onUnmountAutoFocus: l[6] || (l[6] = (d) => a("closeAutoFocus", d))
1335
+ }, {
1336
+ default: C(() => [F(o(_a), W({
1337
+ id: o(s).contentId,
1338
+ ref: o(r),
1339
+ as: i.as,
1340
+ "as-child": i.asChild,
1341
+ "disable-outside-pointer-events": i.disableOutsidePointerEvents,
1342
+ role: "dialog",
1343
+ "aria-describedby": o(s).descriptionId,
1344
+ "aria-labelledby": o(s).titleId,
1345
+ "data-state": o(Pa)(o(s).open.value)
1346
+ }, i.$attrs, {
1347
+ onDismiss: l[0] || (l[0] = (d) => o(s).onOpenChange(!1)),
1348
+ onEscapeKeyDown: l[1] || (l[1] = (d) => a("escapeKeyDown", d)),
1349
+ onFocusOutside: l[2] || (l[2] = (d) => a("focusOutside", d)),
1350
+ onInteractOutside: l[3] || (l[3] = (d) => a("interactOutside", d)),
1351
+ onPointerDownOutside: l[4] || (l[4] = (d) => a("pointerDownOutside", d))
1352
+ }), {
1353
+ default: C(() => [O(i.$slots, "default")]),
1354
+ _: 3
1355
+ }, 16, [
1356
+ "id",
1357
+ "as",
1358
+ "as-child",
1359
+ "disable-outside-pointer-events",
1360
+ "aria-describedby",
1361
+ "aria-labelledby",
1362
+ "data-state"
1363
+ ])]),
1364
+ _: 3
1365
+ }, 8, ["trapped"]));
1366
+ }
1367
+ }), Pt = $a, Fa = /* @__PURE__ */ _({
1368
+ __name: "DialogContentModal",
1369
+ props: {
1370
+ forceMount: {
1371
+ type: Boolean,
1372
+ required: !1
1373
+ },
1374
+ trapFocus: {
1375
+ type: Boolean,
1376
+ required: !1
1377
+ },
1378
+ disableOutsidePointerEvents: {
1379
+ type: Boolean,
1380
+ required: !1,
1381
+ default: !0
1382
+ },
1383
+ asChild: {
1384
+ type: Boolean,
1385
+ required: !1
1386
+ },
1387
+ as: {
1388
+ type: null,
1389
+ required: !1
1390
+ }
1391
+ },
1392
+ emits: [
1393
+ "escapeKeyDown",
1394
+ "pointerDownOutside",
1395
+ "focusOutside",
1396
+ "interactOutside",
1397
+ "openAutoFocus",
1398
+ "closeAutoFocus"
1399
+ ],
1400
+ setup(e, { emit: t }) {
1401
+ const n = e, a = t, s = te(), r = Ke(a), { forwardRef: u, currentElement: i } = q();
1402
+ return ia(i), (l, d) => (p(), S(Pt, W({
1403
+ ...n,
1404
+ ...o(r)
1405
+ }, {
1406
+ ref: o(u),
1407
+ "trap-focus": o(s).open.value,
1408
+ "disable-outside-pointer-events": n.disableOutsidePointerEvents,
1409
+ onCloseAutoFocus: d[0] || (d[0] = (c) => {
1410
+ c.defaultPrevented || (c.preventDefault(), o(s).triggerElement.value?.focus());
1411
+ }),
1412
+ onPointerDownOutside: d[1] || (d[1] = (c) => {
1413
+ const f = c.detail.originalEvent, v = f.button === 0 && f.ctrlKey === !0;
1414
+ (f.button === 2 || v) && c.preventDefault();
1415
+ }),
1416
+ onFocusOutside: d[2] || (d[2] = (c) => {
1417
+ c.preventDefault();
1418
+ })
1419
+ }), {
1420
+ default: C(() => [O(l.$slots, "default")]),
1421
+ _: 3
1422
+ }, 16, ["trap-focus", "disable-outside-pointer-events"]));
1423
+ }
1424
+ }), Ma = Fa, za = /* @__PURE__ */ _({
1425
+ __name: "DialogContentNonModal",
1426
+ props: {
1427
+ forceMount: {
1428
+ type: Boolean,
1429
+ required: !1
1430
+ },
1431
+ trapFocus: {
1432
+ type: Boolean,
1433
+ required: !1
1434
+ },
1435
+ disableOutsidePointerEvents: {
1436
+ type: Boolean,
1437
+ required: !1
1438
+ },
1439
+ asChild: {
1440
+ type: Boolean,
1441
+ required: !1
1442
+ },
1443
+ as: {
1444
+ type: null,
1445
+ required: !1
1446
+ }
1447
+ },
1448
+ emits: [
1449
+ "escapeKeyDown",
1450
+ "pointerDownOutside",
1451
+ "focusOutside",
1452
+ "interactOutside",
1453
+ "openAutoFocus",
1454
+ "closeAutoFocus"
1455
+ ],
1456
+ setup(e, { emit: t }) {
1457
+ const n = e, s = Ke(t);
1458
+ q();
1459
+ const r = te(), u = x(!1), i = x(!1);
1460
+ return (l, d) => (p(), S(Pt, W({
1461
+ ...n,
1462
+ ...o(s)
1463
+ }, {
1464
+ "trap-focus": !1,
1465
+ "disable-outside-pointer-events": !1,
1466
+ onCloseAutoFocus: d[0] || (d[0] = (c) => {
1467
+ c.defaultPrevented || (u.value || o(r).triggerElement.value?.focus(), c.preventDefault()), u.value = !1, i.value = !1;
1468
+ }),
1469
+ onInteractOutside: d[1] || (d[1] = (c) => {
1470
+ c.defaultPrevented || (u.value = !0, c.detail.originalEvent.type === "pointerdown" && (i.value = !0));
1471
+ const f = c.target;
1472
+ o(r).triggerElement.value?.contains(f) && c.preventDefault(), c.detail.originalEvent.type === "focusin" && i.value && c.preventDefault();
1473
+ })
1474
+ }), {
1475
+ default: C(() => [O(l.$slots, "default")]),
1476
+ _: 3
1477
+ }, 16));
1478
+ }
1479
+ }), qa = za, Na = /* @__PURE__ */ _({
1480
+ __name: "DialogContent",
1481
+ props: {
1482
+ forceMount: {
1483
+ type: Boolean,
1484
+ required: !1
1485
+ },
1486
+ disableOutsidePointerEvents: {
1487
+ type: Boolean,
1488
+ required: !1,
1489
+ default: void 0
1490
+ },
1491
+ asChild: {
1492
+ type: Boolean,
1493
+ required: !1
1494
+ },
1495
+ as: {
1496
+ type: null,
1497
+ required: !1
1498
+ }
1499
+ },
1500
+ emits: [
1501
+ "escapeKeyDown",
1502
+ "pointerDownOutside",
1503
+ "focusOutside",
1504
+ "interactOutside",
1505
+ "openAutoFocus",
1506
+ "closeAutoFocus"
1507
+ ],
1508
+ setup(e, { emit: t }) {
1509
+ const n = e, a = t, s = te(), r = Ke(a), { forwardRef: u } = q();
1510
+ return (i, l) => (p(), S(o(Ue), { present: i.forceMount || o(s).open.value }, {
1511
+ default: C(() => [o(s).modal.value ? (p(), S(Ma, W({
1512
+ key: 0,
1513
+ ref: o(u)
1514
+ }, {
1515
+ ...n,
1516
+ ...o(r),
1517
+ ...i.$attrs
1518
+ }), {
1519
+ default: C(() => [O(i.$slots, "default")]),
1520
+ _: 3
1521
+ }, 16)) : (p(), S(qa, W({
1522
+ key: 1,
1523
+ ref: o(u)
1524
+ }, {
1525
+ ...n,
1526
+ ...o(r),
1527
+ ...i.$attrs
1528
+ }), {
1529
+ default: C(() => [O(i.$slots, "default")]),
1530
+ _: 3
1531
+ }, 16))]),
1532
+ _: 3
1533
+ }, 8, ["present"]));
1534
+ }
1535
+ }), Va = Na, Wa = /* @__PURE__ */ _({
1536
+ __name: "DialogDescription",
1537
+ props: {
1538
+ asChild: {
1539
+ type: Boolean,
1540
+ required: !1
1541
+ },
1542
+ as: {
1543
+ type: null,
1544
+ required: !1,
1545
+ default: "p"
1546
+ }
1547
+ },
1548
+ setup(e) {
1549
+ const t = e;
1550
+ q();
1551
+ const n = te();
1552
+ return (a, s) => (p(), S(o(N), W(t, { id: o(n).descriptionId }), {
1553
+ default: C(() => [O(a.$slots, "default")]),
1554
+ _: 3
1555
+ }, 16, ["id"]));
1556
+ }
1557
+ }), it = Wa, ja = /* @__PURE__ */ _({
1558
+ __name: "DialogOverlayImpl",
1559
+ props: {
1560
+ asChild: {
1561
+ type: Boolean,
1562
+ required: !1
1563
+ },
1564
+ as: {
1565
+ type: null,
1566
+ required: !1
1567
+ }
1568
+ },
1569
+ setup(e) {
1570
+ const t = te();
1571
+ return ta(!0), q(), (n, a) => (p(), S(o(N), {
1572
+ as: n.as,
1573
+ "as-child": n.asChild,
1574
+ "data-state": o(t).open.value ? "open" : "closed",
1575
+ style: { "pointer-events": "auto" },
1576
+ onPointerdown: a[0] || (a[0] = Ee(() => {
1577
+ }, [
1578
+ "left",
1579
+ "self",
1580
+ "prevent"
1581
+ ]))
1582
+ }, {
1583
+ default: C(() => [O(n.$slots, "default")]),
1584
+ _: 3
1585
+ }, 8, [
1586
+ "as",
1587
+ "as-child",
1588
+ "data-state"
1589
+ ]));
1590
+ }
1591
+ }), Ha = ja, Ka = /* @__PURE__ */ _({
1592
+ __name: "DialogOverlay",
1593
+ props: {
1594
+ forceMount: {
1595
+ type: Boolean,
1596
+ required: !1
1597
+ },
1598
+ asChild: {
1599
+ type: Boolean,
1600
+ required: !1
1601
+ },
1602
+ as: {
1603
+ type: null,
1604
+ required: !1
1605
+ }
1606
+ },
1607
+ setup(e) {
1608
+ const t = te(), { forwardRef: n } = q();
1609
+ return (a, s) => o(t)?.modal.value ? (p(), S(o(Ue), {
1610
+ key: 0,
1611
+ present: a.forceMount || o(t).open.value
1612
+ }, {
1613
+ default: C(() => [F(Ha, W(a.$attrs, {
1614
+ ref: o(n),
1615
+ as: a.as,
1616
+ "as-child": a.asChild
1617
+ }), {
1618
+ default: C(() => [O(a.$slots, "default")]),
1619
+ _: 3
1620
+ }, 16, ["as", "as-child"])]),
1621
+ _: 3
1622
+ }, 8, ["present"])) : L("v-if", !0);
1623
+ }
1624
+ }), Ua = Ka, Ya = /* @__PURE__ */ _({
1625
+ __name: "Teleport",
1626
+ props: {
1627
+ to: {
1628
+ type: null,
1629
+ required: !1,
1630
+ default: "body"
1631
+ },
1632
+ disabled: {
1633
+ type: Boolean,
1634
+ required: !1
1635
+ },
1636
+ defer: {
1637
+ type: Boolean,
1638
+ required: !1
1639
+ },
1640
+ forceMount: {
1641
+ type: Boolean,
1642
+ required: !1
1643
+ }
1644
+ },
1645
+ setup(e) {
1646
+ const t = /* @__PURE__ */ Yn();
1647
+ return (n, a) => o(t) || n.forceMount ? (p(), S(wt, {
1648
+ key: 0,
1649
+ to: n.to,
1650
+ disabled: n.disabled,
1651
+ defer: n.defer
1652
+ }, [O(n.$slots, "default")], 8, [
1653
+ "to",
1654
+ "disabled",
1655
+ "defer"
1656
+ ])) : L("v-if", !0);
1657
+ }
1658
+ }), Xa = Ya, Ga = /* @__PURE__ */ _({
1659
+ __name: "DialogPortal",
1660
+ props: {
1661
+ to: {
1662
+ type: null,
1663
+ required: !1
1664
+ },
1665
+ disabled: {
1666
+ type: Boolean,
1667
+ required: !1
1668
+ },
1669
+ defer: {
1670
+ type: Boolean,
1671
+ required: !1
1672
+ },
1673
+ forceMount: {
1674
+ type: Boolean,
1675
+ required: !1
1676
+ }
1677
+ },
1678
+ setup(e) {
1679
+ const t = e;
1680
+ return (n, a) => (p(), S(o(Xa), Ne(Ve(t)), {
1681
+ default: C(() => [O(n.$slots, "default")]),
1682
+ _: 3
1683
+ }, 16));
1684
+ }
1685
+ }), Ja = Ga, Qa = /* @__PURE__ */ _({
1686
+ __name: "DialogTitle",
1687
+ props: {
1688
+ asChild: {
1689
+ type: Boolean,
1690
+ required: !1
1691
+ },
1692
+ as: {
1693
+ type: null,
1694
+ required: !1,
1695
+ default: "h2"
1696
+ }
1697
+ },
1698
+ setup(e) {
1699
+ const t = e, n = te();
1700
+ return q(), (a, s) => (p(), S(o(N), W(t, { id: o(n).titleId }), {
1701
+ default: C(() => [O(a.$slots, "default")]),
1702
+ _: 3
1703
+ }, 16, ["id"]));
1704
+ }
1705
+ }), Za = Qa;
1706
+ const lt = "data-reka-collection-item";
1707
+ function Xe(e = {}) {
1708
+ const { key: t = "", isProvider: n = !1 } = e, a = `${t}CollectionProvider`;
1709
+ let s;
1710
+ if (n) {
1711
+ const c = x(/* @__PURE__ */ new Map());
1712
+ s = {
1713
+ collectionRef: x(),
1714
+ itemMap: c
1715
+ }, vt(a, s);
1716
+ } else s = pt(a);
1717
+ const r = (c = !1) => {
1718
+ const f = s.collectionRef.value;
1719
+ if (!f) return [];
1720
+ const v = Array.from(f.querySelectorAll(`[${lt}]`)), y = Array.from(s.itemMap.value.values()).sort((A, g) => v.indexOf(A.ref) - v.indexOf(g.ref));
1721
+ return c ? y : y.filter((A) => A.ref.dataset.disabled !== "");
1722
+ }, u = /* @__PURE__ */ _({
1723
+ name: "CollectionSlot",
1724
+ inheritAttrs: !1,
1725
+ setup(c, { slots: f, attrs: v }) {
1726
+ const { primitiveElement: b, currentElement: y } = at();
1727
+ return j(y, () => {
1728
+ s.collectionRef.value = y.value;
1729
+ }), () => le($e, {
1730
+ ref: b,
1731
+ ...v
1732
+ }, f);
1733
+ }
1734
+ }), i = /* @__PURE__ */ _({
1735
+ name: "CollectionItem",
1736
+ inheritAttrs: !1,
1737
+ props: { value: { validator: () => !0 } },
1738
+ setup(c, { slots: f, attrs: v }) {
1739
+ const { primitiveElement: b, currentElement: y } = at();
1740
+ return ee((A) => {
1741
+ if (y.value) {
1742
+ const g = Wt(y.value);
1743
+ s.itemMap.value.set(g, {
1744
+ ref: y.value,
1745
+ value: c.value
1746
+ }), A(() => s.itemMap.value.delete(g));
1747
+ }
1748
+ }), () => le($e, {
1749
+ ...v,
1750
+ [lt]: "",
1751
+ ref: b
1752
+ }, f);
1753
+ }
1754
+ }), l = $(() => Array.from(s.itemMap.value.values())), d = $(() => s.itemMap.value.size);
1755
+ return {
1756
+ getItems: r,
1757
+ reactiveItems: l,
1758
+ itemMapSize: d,
1759
+ CollectionSlot: u,
1760
+ CollectionItem: i
1761
+ };
1762
+ }
1763
+ var eo = /* @__PURE__ */ _({
1764
+ __name: "VisuallyHidden",
1765
+ props: {
1766
+ feature: {
1767
+ type: String,
1768
+ required: !1,
1769
+ default: "focusable"
1770
+ },
1771
+ asChild: {
1772
+ type: Boolean,
1773
+ required: !1
1774
+ },
1775
+ as: {
1776
+ type: null,
1777
+ required: !1,
1778
+ default: "span"
1779
+ }
1780
+ },
1781
+ setup(e) {
1782
+ return (t, n) => (p(), S(o(N), {
1783
+ as: t.as,
1784
+ "as-child": t.asChild,
1785
+ "aria-hidden": t.feature === "focusable" ? "true" : void 0,
1786
+ "data-hidden": t.feature === "fully-hidden" ? "" : void 0,
1787
+ tabindex: t.feature === "fully-hidden" ? "-1" : void 0,
1788
+ style: {
1789
+ position: "absolute",
1790
+ border: 0,
1791
+ width: "1px",
1792
+ height: "1px",
1793
+ padding: 0,
1794
+ margin: "-1px",
1795
+ overflow: "hidden",
1796
+ clip: "rect(0, 0, 0, 0)",
1797
+ clipPath: "inset(50%)",
1798
+ whiteSpace: "nowrap",
1799
+ wordWrap: "normal",
1800
+ top: "-1px",
1801
+ left: "-1px"
1802
+ }
1803
+ }, {
1804
+ default: C(() => [O(t.$slots, "default")]),
1805
+ _: 3
1806
+ }, 8, [
1807
+ "as",
1808
+ "as-child",
1809
+ "aria-hidden",
1810
+ "data-hidden",
1811
+ "tabindex"
1812
+ ]));
1813
+ }
1814
+ }), Ge = eo;
1815
+ const [Bt, to] = /* @__PURE__ */ me("AvatarRoot");
1816
+ var no = /* @__PURE__ */ _({
1817
+ __name: "AvatarRoot",
1818
+ props: {
1819
+ asChild: {
1820
+ type: Boolean,
1821
+ required: !1
1822
+ },
1823
+ as: {
1824
+ type: null,
1825
+ required: !1,
1826
+ default: "span"
1827
+ }
1828
+ },
1829
+ setup(e) {
1830
+ return q(), to({ imageLoadingStatus: x("idle") }), (t, n) => (p(), S(o(N), {
1831
+ "as-child": t.asChild,
1832
+ as: t.as
1833
+ }, {
1834
+ default: C(() => [O(t.$slots, "default")]),
1835
+ _: 3
1836
+ }, 8, ["as-child", "as"]));
1837
+ }
1838
+ }), ao = no, oo = /* @__PURE__ */ _({
1839
+ __name: "AvatarFallback",
1840
+ props: {
1841
+ delayMs: {
1842
+ type: Number,
1843
+ required: !1
1844
+ },
1845
+ asChild: {
1846
+ type: Boolean,
1847
+ required: !1
1848
+ },
1849
+ as: {
1850
+ type: null,
1851
+ required: !1,
1852
+ default: "span"
1853
+ }
1854
+ },
1855
+ setup(e) {
1856
+ const t = e, n = Bt();
1857
+ q();
1858
+ const a = x(t.delayMs === void 0);
1859
+ return ee((s) => {
1860
+ if (t.delayMs && H) {
1861
+ const r = window.setTimeout(() => {
1862
+ a.value = !0;
1863
+ }, t.delayMs);
1864
+ s(() => {
1865
+ window.clearTimeout(r);
1866
+ });
1867
+ }
1868
+ }), (s, r) => a.value && o(n).imageLoadingStatus.value !== "loaded" ? (p(), S(o(N), {
1869
+ key: 0,
1870
+ "as-child": s.asChild,
1871
+ as: s.as
1872
+ }, {
1873
+ default: C(() => [O(s.$slots, "default")]),
1874
+ _: 3
1875
+ }, 8, ["as-child", "as"])) : L("v-if", !0);
1876
+ }
1877
+ }), so = oo;
1878
+ function ut(e, t) {
1879
+ return e ? t ? (e.src !== t && (e.src = t), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
1880
+ }
1881
+ function ro(e, { referrerPolicy: t, crossOrigin: n } = {}) {
1882
+ const a = x(!1), s = x(null), r = $(() => a.value ? (!s.value && H && (s.value = new window.Image()), s.value) : null), u = x(ut(r.value, e.value)), i = (l) => () => {
1883
+ a.value && (u.value = l);
1884
+ };
1885
+ return ae(() => {
1886
+ a.value = !0, ee((l) => {
1887
+ const d = r.value;
1888
+ if (!d) return;
1889
+ u.value = ut(d, e.value);
1890
+ const c = i("loaded"), f = i("error");
1891
+ d.addEventListener("load", c), d.addEventListener("error", f), t?.value && (d.referrerPolicy = t.value), typeof n?.value == "string" && (d.crossOrigin = n.value), l(() => {
1892
+ d.removeEventListener("load", c), d.removeEventListener("error", f);
1893
+ });
1894
+ });
1895
+ }), pe(() => {
1896
+ a.value = !1;
1897
+ }), u;
1898
+ }
1899
+ var io = /* @__PURE__ */ _({
1900
+ __name: "AvatarImage",
1901
+ props: {
1902
+ src: {
1903
+ type: String,
1904
+ required: !0
1905
+ },
1906
+ referrerPolicy: {
1907
+ type: null,
1908
+ required: !1
1909
+ },
1910
+ crossOrigin: {
1911
+ type: null,
1912
+ required: !1
1913
+ },
1914
+ asChild: {
1915
+ type: Boolean,
1916
+ required: !1
1917
+ },
1918
+ as: {
1919
+ type: null,
1920
+ required: !1,
1921
+ default: "img"
1922
+ }
1923
+ },
1924
+ emits: ["loadingStatusChange"],
1925
+ setup(e, { emit: t }) {
1926
+ const n = e, a = t, { src: s, referrerPolicy: r, crossOrigin: u } = ve(n);
1927
+ q();
1928
+ const i = Bt(), l = ro(s, {
1929
+ referrerPolicy: r,
1930
+ crossOrigin: u
1931
+ });
1932
+ return j(l, (d) => {
1933
+ a("loadingStatusChange", d), d !== "idle" && (i.imageLoadingStatus.value = d);
1934
+ }, { immediate: !0 }), (d, c) => jt((p(), S(o(N), {
1935
+ role: "img",
1936
+ "as-child": d.asChild,
1937
+ as: d.as,
1938
+ src: o(s),
1939
+ referrerpolicy: o(r),
1940
+ crossorigin: o(u)
1941
+ }, {
1942
+ default: C(() => [O(d.$slots, "default")]),
1943
+ _: 3
1944
+ }, 8, [
1945
+ "as-child",
1946
+ "as",
1947
+ "src",
1948
+ "referrerpolicy",
1949
+ "crossorigin"
1950
+ ])), [[Ht, o(l) === "loaded"]]);
1951
+ }
1952
+ }), lo = io, uo = /* @__PURE__ */ _({
1953
+ __name: "ToastAnnounceExclude",
1954
+ props: {
1955
+ altText: {
1956
+ type: String,
1957
+ required: !1
1958
+ },
1959
+ asChild: {
1960
+ type: Boolean,
1961
+ required: !1
1962
+ },
1963
+ as: {
1964
+ type: null,
1965
+ required: !1
1966
+ }
1967
+ },
1968
+ setup(e) {
1969
+ return (t, n) => (p(), S(o(N), {
1970
+ as: t.as,
1971
+ "as-child": t.asChild,
1972
+ "data-reka-toast-announce-exclude": "",
1973
+ "data-reka-toast-announce-alt": t.altText || void 0
1974
+ }, {
1975
+ default: C(() => [O(t.$slots, "default")]),
1976
+ _: 3
1977
+ }, 8, [
1978
+ "as",
1979
+ "as-child",
1980
+ "data-reka-toast-announce-alt"
1981
+ ]));
1982
+ }
1983
+ }), co = uo;
1984
+ const [ke, fo] = /* @__PURE__ */ me("ToastProvider");
1985
+ var po = /* @__PURE__ */ _({
1986
+ inheritAttrs: !1,
1987
+ __name: "ToastProvider",
1988
+ props: {
1989
+ label: {
1990
+ type: String,
1991
+ required: !1,
1992
+ default: "Notification"
1993
+ },
1994
+ duration: {
1995
+ type: Number,
1996
+ required: !1,
1997
+ default: 5e3
1998
+ },
1999
+ disableSwipe: {
2000
+ type: Boolean,
2001
+ required: !1
2002
+ },
2003
+ swipeDirection: {
2004
+ type: String,
2005
+ required: !1,
2006
+ default: "right"
2007
+ },
2008
+ swipeThreshold: {
2009
+ type: Number,
2010
+ required: !1,
2011
+ default: 50
2012
+ }
2013
+ },
2014
+ setup(e) {
2015
+ const t = e, { label: n, duration: a, disableSwipe: s, swipeDirection: r, swipeThreshold: u } = ve(t);
2016
+ Xe({ isProvider: !0 });
2017
+ const i = x(), l = x(0), d = x(!1), c = x(!1);
2018
+ if (t.label && typeof t.label == "string" && !t.label.trim()) {
2019
+ const f = "Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.";
2020
+ throw new Error(f);
2021
+ }
2022
+ return fo({
2023
+ label: n,
2024
+ duration: a,
2025
+ disableSwipe: s,
2026
+ swipeDirection: r,
2027
+ swipeThreshold: u,
2028
+ toastCount: l,
2029
+ viewport: i,
2030
+ onViewportChange(f) {
2031
+ i.value = f;
2032
+ },
2033
+ onToastAdd() {
2034
+ l.value++;
2035
+ },
2036
+ onToastRemove() {
2037
+ l.value--;
2038
+ },
2039
+ isFocusedToastEscapeKeyDownRef: d,
2040
+ isClosePausedRef: c
2041
+ }), (f, v) => O(f.$slots, "default");
2042
+ }
2043
+ }), vo = po, mo = /* @__PURE__ */ _({
2044
+ __name: "ToastAnnounce",
2045
+ setup(e) {
2046
+ const t = ke(), n = Kn(1e3), a = x(!1);
2047
+ let s = 0, r = 0;
2048
+ return H && (s = requestAnimationFrame(() => {
2049
+ r = requestAnimationFrame(() => {
2050
+ a.value = !0;
2051
+ });
2052
+ }), bt(() => {
2053
+ cancelAnimationFrame(s), cancelAnimationFrame(r);
2054
+ })), (u, i) => o(n) || a.value ? (p(), S(o(Ge), {
2055
+ key: 0,
2056
+ feature: "fully-hidden"
2057
+ }, {
2058
+ default: C(() => [X(R(o(t).label.value) + " ", 1), O(u.$slots, "default")]),
2059
+ _: 3
2060
+ })) : L("v-if", !0);
2061
+ }
2062
+ }), bo = mo;
2063
+ const go = "toast.swipeStart", yo = "toast.swipeMove", ho = "toast.swipeCancel", wo = "toast.swipeEnd", Fe = "toast.viewportPause", Me = "toast.viewportResume";
2064
+ function Ce(e, t, n) {
2065
+ const a = n.originalEvent.currentTarget, s = new CustomEvent(e, {
2066
+ bubbles: !1,
2067
+ cancelable: !0,
2068
+ detail: n
2069
+ });
2070
+ t && a.addEventListener(e, t, { once: !0 }), a.dispatchEvent(s);
2071
+ }
2072
+ function dt(e, t, n = 0) {
2073
+ const a = Math.abs(e.x), s = Math.abs(e.y), r = a > s;
2074
+ return t === "left" || t === "right" ? r && a > n : !r && s > n;
2075
+ }
2076
+ function Co(e) {
2077
+ return e.nodeType === e.ELEMENT_NODE;
2078
+ }
2079
+ function Rt(e) {
2080
+ const t = [];
2081
+ return Array.from(e.childNodes).forEach((a) => {
2082
+ if (a.nodeType === a.TEXT_NODE && a.textContent && t.push(a.textContent), Co(a)) {
2083
+ const s = a.ariaHidden || a.hidden || a.style.display === "none", r = a.dataset.rekaToastAnnounceExclude === "";
2084
+ if (!s) if (r) {
2085
+ const u = a.dataset.rekaToastAnnounceAlt;
2086
+ u && t.push(u);
2087
+ } else t.push(...Rt(a));
2088
+ }
2089
+ }), t;
2090
+ }
2091
+ const [_o, xo] = /* @__PURE__ */ me("ToastRoot");
2092
+ var Eo = /* @__PURE__ */ _({
2093
+ inheritAttrs: !1,
2094
+ __name: "ToastRootImpl",
2095
+ props: {
2096
+ type: {
2097
+ type: String,
2098
+ required: !1
2099
+ },
2100
+ open: {
2101
+ type: Boolean,
2102
+ required: !1,
2103
+ default: !1
2104
+ },
2105
+ duration: {
2106
+ type: Number,
2107
+ required: !1
2108
+ },
2109
+ asChild: {
2110
+ type: Boolean,
2111
+ required: !1
2112
+ },
2113
+ as: {
2114
+ type: null,
2115
+ required: !1,
2116
+ default: "li"
2117
+ }
2118
+ },
2119
+ emits: [
2120
+ "close",
2121
+ "escapeKeyDown",
2122
+ "pause",
2123
+ "resume",
2124
+ "swipeStart",
2125
+ "swipeMove",
2126
+ "swipeCancel",
2127
+ "swipeEnd"
2128
+ ],
2129
+ setup(e, { emit: t }) {
2130
+ const n = e, a = t, { forwardRef: s, currentElement: r } = q(), { CollectionItem: u } = Xe(), i = ke(), l = x(null), d = x(null), c = $(() => typeof n.duration == "number" ? n.duration : i.duration.value), f = x(0), v = x(c.value), b = x(0), y = x(c.value), A = Gn(() => {
2131
+ const k = Date.now() - f.value;
2132
+ y.value = Math.max(v.value - k, 0);
2133
+ }, { fpsLimit: 60 });
2134
+ function g(k) {
2135
+ k <= 0 || k === Number.POSITIVE_INFINITY || H && (window.clearTimeout(b.value), f.value = Date.now(), b.value = window.setTimeout(h, k));
2136
+ }
2137
+ function h(k) {
2138
+ const I = k?.pointerType === "";
2139
+ r.value?.contains(G()) && I && i.viewport.value?.focus(), I && (i.isClosePausedRef.value = !1), a("close");
2140
+ }
2141
+ const T = $(() => r.value ? Rt(r.value) : null);
2142
+ if (n.type && !["foreground", "background"].includes(n.type)) {
2143
+ const k = "Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.";
2144
+ throw new Error(k);
2145
+ }
2146
+ return ee((k) => {
2147
+ const I = i.viewport.value;
2148
+ if (I) {
2149
+ const w = () => {
2150
+ g(v.value), A.resume(), a("resume");
2151
+ }, M = () => {
2152
+ const B = Date.now() - f.value;
2153
+ v.value = v.value - B, window.clearTimeout(b.value), A.pause(), a("pause");
2154
+ };
2155
+ return I.addEventListener(Fe, M), I.addEventListener(Me, w), () => {
2156
+ I.removeEventListener(Fe, M), I.removeEventListener(Me, w);
2157
+ };
2158
+ }
2159
+ }), j(() => [n.open, c.value], () => {
2160
+ v.value = c.value, n.open && !i.isClosePausedRef.value && g(c.value);
2161
+ }, { immediate: !0 }), je("Escape", (k) => {
2162
+ a("escapeKeyDown", k), k.defaultPrevented || (i.isFocusedToastEscapeKeyDownRef.value = !0, h());
2163
+ }), ae(() => {
2164
+ i.onToastAdd();
2165
+ }), pe(() => {
2166
+ i.onToastRemove();
2167
+ }), xo({ onClose: h }), (k, I) => (p(), D(Q, null, [T.value ? (p(), S(bo, {
2168
+ key: 0,
2169
+ role: "alert",
2170
+ "aria-live": k.type === "foreground" ? "assertive" : "polite"
2171
+ }, {
2172
+ default: C(() => [L(`
2173
+ Render each chunk as its own text node so screen readers get the
2174
+ natural pause break between nodes (see comment in utils.ts).
2175
+ Interpolating the array directly with \`{{ announceTextContent }}\`
2176
+ would route through Vue's \`toDisplayString\`, which JSON-stringifies
2177
+ arrays — the live region would then announce literal \`[\`, quotes
2178
+ and commas instead of the toast title and description.
2179
+ `), (p(!0), D(Q, null, se(T.value, (w, M) => (p(), D(Q, { key: M }, [X(R(w), 1)], 64))), 128))]),
2180
+ _: 1
2181
+ }, 8, ["aria-live"])) : L("v-if", !0), o(i).viewport.value ? (p(), S(wt, {
2182
+ key: 1,
2183
+ to: o(i).viewport.value
2184
+ }, [F(o(u), null, {
2185
+ default: C(() => [F(o(N), W({
2186
+ ref: o(s),
2187
+ tabindex: "0"
2188
+ }, k.$attrs, {
2189
+ as: k.as,
2190
+ "as-child": k.asChild,
2191
+ "data-state": k.open ? "open" : "closed",
2192
+ "data-swipe-direction": o(i).swipeDirection.value,
2193
+ style: o(i).disableSwipe.value ? void 0 : {
2194
+ userSelect: "none",
2195
+ touchAction: "none"
2196
+ },
2197
+ onPointerdown: I[0] || (I[0] = Ee((w) => {
2198
+ o(i).disableSwipe.value || (l.value = {
2199
+ x: w.clientX,
2200
+ y: w.clientY
2201
+ });
2202
+ }, ["left"])),
2203
+ onPointermove: I[1] || (I[1] = (w) => {
2204
+ if (o(i).disableSwipe.value || !l.value) return;
2205
+ const M = w.clientX - l.value.x, B = w.clientY - l.value.y, K = !!d.value, U = ["left", "right"].includes(o(i).swipeDirection.value), J = ["left", "up"].includes(o(i).swipeDirection.value) ? Math.min : Math.max, de = U ? J(0, M) : 0, Je = U ? 0 : J(0, B), be = w.pointerType === "touch" ? 10 : 2, oe = {
2206
+ x: de,
2207
+ y: Je
2208
+ }, ge = {
2209
+ originalEvent: w,
2210
+ delta: oe
2211
+ };
2212
+ K ? (d.value = oe, o(Ce)(o(yo), (ce) => a("swipeMove", ce), ge)) : o(dt)(oe, o(i).swipeDirection.value, be) ? (d.value = oe, o(Ce)(o(go), (ce) => a("swipeStart", ce), ge), w.target.setPointerCapture(w.pointerId)) : (Math.abs(M) > be || Math.abs(B) > be) && (l.value = null);
2213
+ }),
2214
+ onPointerup: I[2] || (I[2] = (w) => {
2215
+ if (o(i).disableSwipe.value) return;
2216
+ const M = d.value, B = w.target;
2217
+ if (B.hasPointerCapture(w.pointerId) && B.releasePointerCapture(w.pointerId), d.value = null, l.value = null, M) {
2218
+ const K = w.currentTarget, U = {
2219
+ originalEvent: w,
2220
+ delta: M
2221
+ };
2222
+ o(dt)(M, o(i).swipeDirection.value, o(i).swipeThreshold.value) ? o(Ce)(o(wo), (J) => a("swipeEnd", J), U) : o(Ce)(o(ho), (J) => a("swipeCancel", J), U), K?.addEventListener("click", (J) => J.preventDefault(), { once: !0 });
2223
+ }
2224
+ })
2225
+ }), {
2226
+ default: C(() => [O(k.$slots, "default", {
2227
+ remaining: y.value,
2228
+ duration: c.value
2229
+ })]),
2230
+ _: 3
2231
+ }, 16, [
2232
+ "as",
2233
+ "as-child",
2234
+ "data-state",
2235
+ "data-swipe-direction",
2236
+ "style"
2237
+ ])]),
2238
+ _: 3
2239
+ })], 8, ["to"])) : L("v-if", !0)], 64));
2240
+ }
2241
+ }), To = Eo, So = /* @__PURE__ */ _({
2242
+ __name: "ToastClose",
2243
+ props: {
2244
+ asChild: {
2245
+ type: Boolean,
2246
+ required: !1
2247
+ },
2248
+ as: {
2249
+ type: null,
2250
+ required: !1,
2251
+ default: "button"
2252
+ }
2253
+ },
2254
+ setup(e) {
2255
+ const t = e, n = _o(), { forwardRef: a } = q();
2256
+ return (s, r) => (p(), S(co, { "as-child": "" }, {
2257
+ default: C(() => [F(o(N), W(t, {
2258
+ ref: o(a),
2259
+ type: s.as === "button" ? "button" : void 0,
2260
+ onClick: o(n).onClose
2261
+ }), {
2262
+ default: C(() => [O(s.$slots, "default")]),
2263
+ _: 3
2264
+ }, 16, ["type", "onClick"])]),
2265
+ _: 3
2266
+ }));
2267
+ }
2268
+ }), ko = So, Do = /* @__PURE__ */ _({
2269
+ __name: "ToastDescription",
2270
+ props: {
2271
+ asChild: {
2272
+ type: Boolean,
2273
+ required: !1
2274
+ },
2275
+ as: {
2276
+ type: null,
2277
+ required: !1
2278
+ }
2279
+ },
2280
+ setup(e) {
2281
+ const t = e;
2282
+ return q(), (n, a) => (p(), S(o(N), Ne(Ve(t)), {
2283
+ default: C(() => [O(n.$slots, "default")]),
2284
+ _: 3
2285
+ }, 16));
2286
+ }
2287
+ }), Oo = Do, Ao = /* @__PURE__ */ _({
2288
+ __name: "ToastRoot",
2289
+ props: {
2290
+ defaultOpen: {
2291
+ type: Boolean,
2292
+ required: !1,
2293
+ default: !0
2294
+ },
2295
+ forceMount: {
2296
+ type: Boolean,
2297
+ required: !1
2298
+ },
2299
+ type: {
2300
+ type: String,
2301
+ required: !1,
2302
+ default: "foreground"
2303
+ },
2304
+ open: {
2305
+ type: Boolean,
2306
+ required: !1,
2307
+ default: void 0
2308
+ },
2309
+ duration: {
2310
+ type: Number,
2311
+ required: !1
2312
+ },
2313
+ asChild: {
2314
+ type: Boolean,
2315
+ required: !1
2316
+ },
2317
+ as: {
2318
+ type: null,
2319
+ required: !1,
2320
+ default: "li"
2321
+ }
2322
+ },
2323
+ emits: [
2324
+ "escapeKeyDown",
2325
+ "pause",
2326
+ "resume",
2327
+ "swipeStart",
2328
+ "swipeMove",
2329
+ "swipeCancel",
2330
+ "swipeEnd",
2331
+ "update:open"
2332
+ ],
2333
+ setup(e, { emit: t }) {
2334
+ const n = e, a = t, { forwardRef: s } = q(), r = /* @__PURE__ */ kt(n, "open", a, {
2335
+ defaultValue: n.defaultOpen,
2336
+ passive: n.open === void 0
2337
+ });
2338
+ return (u, i) => (p(), S(o(Ue), { present: u.forceMount || o(r) }, {
2339
+ default: C(() => [F(To, W({
2340
+ ref: o(s),
2341
+ open: o(r),
2342
+ type: u.type,
2343
+ as: u.as,
2344
+ "as-child": u.asChild,
2345
+ duration: u.duration
2346
+ }, u.$attrs, {
2347
+ onClose: i[0] || (i[0] = (l) => r.value = !1),
2348
+ onPause: i[1] || (i[1] = (l) => a("pause")),
2349
+ onResume: i[2] || (i[2] = (l) => a("resume")),
2350
+ onEscapeKeyDown: i[3] || (i[3] = (l) => a("escapeKeyDown", l)),
2351
+ onSwipeStart: i[4] || (i[4] = (l) => {
2352
+ a("swipeStart", l), l.defaultPrevented || l.currentTarget.setAttribute("data-swipe", "start");
2353
+ }),
2354
+ onSwipeMove: i[5] || (i[5] = (l) => {
2355
+ if (a("swipeMove", l), !l.defaultPrevented) {
2356
+ const { x: d, y: c } = l.detail.delta, f = l.currentTarget;
2357
+ f.setAttribute("data-swipe", "move"), f.style.setProperty("--reka-toast-swipe-move-x", `${d}px`), f.style.setProperty("--reka-toast-swipe-move-y", `${c}px`);
2358
+ }
2359
+ }),
2360
+ onSwipeCancel: i[6] || (i[6] = (l) => {
2361
+ if (a("swipeCancel", l), !l.defaultPrevented) {
2362
+ const d = l.currentTarget;
2363
+ d.setAttribute("data-swipe", "cancel"), d.style.removeProperty("--reka-toast-swipe-move-x"), d.style.removeProperty("--reka-toast-swipe-move-y"), d.style.removeProperty("--reka-toast-swipe-end-x"), d.style.removeProperty("--reka-toast-swipe-end-y");
2364
+ }
2365
+ }),
2366
+ onSwipeEnd: i[7] || (i[7] = (l) => {
2367
+ if (a("swipeEnd", l), !l.defaultPrevented) {
2368
+ const { x: d, y: c } = l.detail.delta, f = l.currentTarget;
2369
+ f.setAttribute("data-swipe", "end"), f.style.removeProperty("--reka-toast-swipe-move-x"), f.style.removeProperty("--reka-toast-swipe-move-y"), f.style.setProperty("--reka-toast-swipe-end-x", `${d}px`), f.style.setProperty("--reka-toast-swipe-end-y", `${c}px`), r.value = !1;
2370
+ }
2371
+ })
2372
+ }), {
2373
+ default: C(({ remaining: l, duration: d }) => [O(u.$slots, "default", {
2374
+ remaining: l,
2375
+ duration: d,
2376
+ open: o(r)
2377
+ })]),
2378
+ _: 3
2379
+ }, 16, [
2380
+ "open",
2381
+ "type",
2382
+ "as",
2383
+ "as-child",
2384
+ "duration"
2385
+ ])]),
2386
+ _: 3
2387
+ }, 8, ["present"]));
2388
+ }
2389
+ }), Io = Ao, Po = /* @__PURE__ */ _({
2390
+ __name: "ToastTitle",
2391
+ props: {
2392
+ asChild: {
2393
+ type: Boolean,
2394
+ required: !1
2395
+ },
2396
+ as: {
2397
+ type: null,
2398
+ required: !1
2399
+ }
2400
+ },
2401
+ setup(e) {
2402
+ const t = e;
2403
+ return q(), (n, a) => (p(), S(o(N), Ne(Ve(t)), {
2404
+ default: C(() => [O(n.$slots, "default")]),
2405
+ _: 3
2406
+ }, 16));
2407
+ }
2408
+ }), Bo = Po, Ro = /* @__PURE__ */ _({
2409
+ __name: "FocusProxy",
2410
+ emits: ["focusFromOutsideViewport"],
2411
+ setup(e, { emit: t }) {
2412
+ const n = t, a = ke();
2413
+ return (s, r) => (p(), S(o(Ge), {
2414
+ tabindex: "0",
2415
+ style: { position: "fixed" },
2416
+ onFocus: r[0] || (r[0] = (u) => {
2417
+ const i = u.relatedTarget;
2418
+ !o(a).viewport.value?.contains(i) && n("focusFromOutsideViewport");
2419
+ })
2420
+ }, {
2421
+ default: C(() => [O(s.$slots, "default")]),
2422
+ _: 3
2423
+ }));
2424
+ }
2425
+ }), ct = Ro, Lo = /* @__PURE__ */ _({
2426
+ inheritAttrs: !1,
2427
+ __name: "ToastViewport",
2428
+ props: {
2429
+ hotkey: {
2430
+ type: Array,
2431
+ required: !1,
2432
+ default: () => ["F8"]
2433
+ },
2434
+ label: {
2435
+ type: [String, Function],
2436
+ required: !1,
2437
+ default: "Notifications ({hotkey})"
2438
+ },
2439
+ asChild: {
2440
+ type: Boolean,
2441
+ required: !1
2442
+ },
2443
+ as: {
2444
+ type: null,
2445
+ required: !1,
2446
+ default: "ol"
2447
+ }
2448
+ },
2449
+ setup(e) {
2450
+ const t = e, { hotkey: n, label: a } = ve(t), { forwardRef: s, currentElement: r } = q(), { CollectionSlot: u, getItems: i } = Xe(), l = ke(), d = $(() => l.toastCount.value > 0), c = x(), f = x(), v = /Key/g, b = /Digit/g, y = $(() => n.value.join("+").replace(v, "").replace(b, ""));
2451
+ je(n.value, () => {
2452
+ r.value.focus();
2453
+ }), ae(() => {
2454
+ l.onViewportChange(r.value);
2455
+ }), ee((g) => {
2456
+ const h = r.value;
2457
+ if (d.value && h) {
2458
+ const T = () => {
2459
+ if (!l.isClosePausedRef.value) {
2460
+ const B = new CustomEvent(Fe);
2461
+ h.dispatchEvent(B), l.isClosePausedRef.value = !0;
2462
+ }
2463
+ }, k = () => {
2464
+ if (l.isClosePausedRef.value) {
2465
+ const B = new CustomEvent(Me);
2466
+ h.dispatchEvent(B), l.isClosePausedRef.value = !1;
2467
+ }
2468
+ }, I = (B) => {
2469
+ !h.contains(B.relatedTarget) && k();
2470
+ }, w = () => {
2471
+ h.contains(G()) || k();
2472
+ }, M = (B) => {
2473
+ const K = B.altKey || B.ctrlKey || B.metaKey;
2474
+ if (B.key === "Tab" && !K) {
2475
+ const J = G(), de = B.shiftKey;
2476
+ if (B.target === h && de) {
2477
+ c.value?.focus();
2478
+ return;
2479
+ }
2480
+ const oe = A({ tabbingDirection: de ? "backwards" : "forwards" }), ge = oe.findIndex((ce) => ce === J);
2481
+ xe(oe.slice(ge + 1)) ? B.preventDefault() : de ? c.value?.focus() : f.value?.focus();
2482
+ }
2483
+ };
2484
+ h.addEventListener("focusin", T), h.addEventListener("focusout", I), h.addEventListener("pointermove", T), h.addEventListener("pointerleave", w), h.addEventListener("keydown", M), window.addEventListener("blur", T), window.addEventListener("focus", k), g(() => {
2485
+ h.removeEventListener("focusin", T), h.removeEventListener("focusout", I), h.removeEventListener("pointermove", T), h.removeEventListener("pointerleave", w), h.removeEventListener("keydown", M), window.removeEventListener("blur", T), window.removeEventListener("focus", k);
2486
+ });
2487
+ }
2488
+ });
2489
+ function A({ tabbingDirection: g }) {
2490
+ const T = i().map((k) => k.ref).map((k) => {
2491
+ const I = [k, ...Ye(k)];
2492
+ return g === "forwards" ? I : I.reverse();
2493
+ });
2494
+ return (g === "forwards" ? T.reverse() : T).flat();
2495
+ }
2496
+ return (g, h) => (p(), S(o(Ea), {
2497
+ role: "region",
2498
+ "aria-label": typeof o(a) == "string" ? o(a).replace("{hotkey}", y.value) : o(a)(y.value),
2499
+ tabindex: "-1",
2500
+ style: qe({ pointerEvents: d.value ? void 0 : "none" })
2501
+ }, {
2502
+ default: C(() => [
2503
+ d.value ? (p(), S(ct, {
2504
+ key: 0,
2505
+ ref: (T) => {
2506
+ T && (c.value = o(re)(T));
2507
+ },
2508
+ onFocusFromOutsideViewport: h[0] || (h[0] = () => {
2509
+ const T = A({ tabbingDirection: "forwards" });
2510
+ o(xe)(T);
2511
+ })
2512
+ }, null, 512)) : L("v-if", !0),
2513
+ F(o(u), null, {
2514
+ default: C(() => [F(o(N), W({
2515
+ ref: o(s),
2516
+ tabindex: "-1",
2517
+ as: g.as,
2518
+ "as-child": g.asChild
2519
+ }, g.$attrs), {
2520
+ default: C(() => [O(g.$slots, "default")]),
2521
+ _: 3
2522
+ }, 16, ["as", "as-child"])]),
2523
+ _: 3
2524
+ }),
2525
+ d.value ? (p(), S(ct, {
2526
+ key: 1,
2527
+ ref: (T) => {
2528
+ T && (f.value = o(re)(T));
2529
+ },
2530
+ onFocusFromOutsideViewport: h[1] || (h[1] = () => {
2531
+ const T = A({ tabbingDirection: "backwards" });
2532
+ o(xe)(T);
2533
+ })
2534
+ }, null, 512)) : L("v-if", !0)
2535
+ ]),
2536
+ _: 3
2537
+ }, 8, ["aria-label", "style"]));
2538
+ }
2539
+ }), $o = Lo;
2540
+ const Fo = z({
2541
+ base: {
2542
+ display: "inline-flex",
2543
+ alignItems: "center",
2544
+ justifyContent: "center",
2545
+ overflow: "hidden",
2546
+ userSelect: "none",
2547
+ flexShrink: "0",
2548
+ bg: "bg.accentSoft",
2549
+ transition: "background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1)"
2550
+ },
2551
+ variants: {
2552
+ size: {
2553
+ sm: { w: "8", h: "8" },
2554
+ md: { w: "10", h: "10" },
2555
+ lg: { w: "12", h: "12" },
2556
+ xl: { w: "14", h: "14" }
2557
+ },
2558
+ shape: {
2559
+ circle: { borderRadius: "full" },
2560
+ square: { borderRadius: "lg" }
2561
+ }
2562
+ },
2563
+ defaultVariants: {
2564
+ size: "md",
2565
+ shape: "circle"
2566
+ }
2567
+ }), Mo = E({
2568
+ w: "full",
2569
+ h: "full",
2570
+ objectFit: "cover"
2571
+ }), zo = z({
2572
+ base: {
2573
+ fontFamily: "heading",
2574
+ fontWeight: "600",
2575
+ color: "text.accent",
2576
+ lineHeight: "1",
2577
+ display: "flex",
2578
+ alignItems: "center",
2579
+ justifyContent: "center",
2580
+ w: "full",
2581
+ h: "full"
2582
+ },
2583
+ variants: {
2584
+ size: {
2585
+ sm: { fontSize: "xs" },
2586
+ md: { fontSize: "sm" },
2587
+ lg: { fontSize: "md" },
2588
+ xl: { fontSize: "lg" }
2589
+ }
2590
+ },
2591
+ defaultVariants: {
2592
+ size: "md"
2593
+ }
2594
+ });
2595
+ z({
2596
+ base: {
2597
+ color: "text.muted",
2598
+ display: "flex",
2599
+ alignItems: "center",
2600
+ justifyContent: "center"
2601
+ },
2602
+ variants: {
2603
+ size: {
2604
+ sm: {},
2605
+ md: {},
2606
+ lg: {},
2607
+ xl: {}
2608
+ }
2609
+ },
2610
+ defaultVariants: {
2611
+ size: "md"
2612
+ }
2613
+ });
2614
+ const tr = /* @__PURE__ */ _({
2615
+ __name: "UiAvatar",
2616
+ props: {
2617
+ name: {},
2618
+ src: { default: void 0 },
2619
+ size: { default: "md" },
2620
+ shape: { default: "circle" }
2621
+ },
2622
+ setup(e) {
2623
+ const t = e, n = $(() => {
2624
+ const a = t.name.trim().split(/\s+/);
2625
+ return a.length === 1 ? a[0].charAt(0).toUpperCase() : (a[0].charAt(0) + a[a.length - 1].charAt(0)).toUpperCase();
2626
+ });
2627
+ return (a, s) => (p(), S(o(ao), {
2628
+ class: m(o(Fo)({ size: e.size, shape: e.shape })),
2629
+ "aria-label": e.name,
2630
+ role: "img"
2631
+ }, {
2632
+ default: C(() => [
2633
+ e.src ? (p(), S(o(lo), {
2634
+ key: 0,
2635
+ src: e.src,
2636
+ alt: e.name,
2637
+ class: m(o(Mo))
2638
+ }, null, 8, ["src", "alt", "class"])) : L("", !0),
2639
+ F(o(so), {
2640
+ "delay-ms": 300,
2641
+ class: m(o(zo)({ size: e.size }))
2642
+ }, {
2643
+ default: C(() => [
2644
+ X(R(n.value), 1)
2645
+ ]),
2646
+ _: 1
2647
+ }, 8, ["class"])
2648
+ ]),
2649
+ _: 1
2650
+ }, 8, ["class", "aria-label"]));
2651
+ }
2652
+ }), qo = Qt, No = E({
2653
+ display: "inline-flex",
2654
+ alignItems: "center",
2655
+ justifyContent: "center",
2656
+ gap: "2",
2657
+ minWidth: "0"
2658
+ }), Vo = E({
2659
+ visibility: "hidden"
2660
+ }), Wo = E({
2661
+ position: "absolute",
2662
+ inset: "0",
2663
+ display: "inline-flex",
2664
+ alignItems: "center",
2665
+ justifyContent: "center",
2666
+ gap: "2",
2667
+ px: "4",
2668
+ py: "3",
2669
+ pointerEvents: "none"
2670
+ }), jo = ["type", "disabled", "aria-busy", "aria-label"], nr = /* @__PURE__ */ _({
2671
+ __name: "UiButton",
2672
+ props: {
2673
+ variant: { default: "solid" },
2674
+ size: { default: "md" },
2675
+ tone: { default: "default" },
2676
+ loading: { type: Boolean, default: !1 },
2677
+ loadingLabel: { default: "Working..." },
2678
+ disabled: { type: Boolean, default: !1 },
2679
+ type: { default: "button" },
2680
+ ariaLabel: { default: void 0 }
2681
+ },
2682
+ setup(e) {
2683
+ return (t, n) => (p(), D("button", {
2684
+ type: e.type,
2685
+ disabled: e.disabled || e.loading,
2686
+ "aria-busy": e.loading || void 0,
2687
+ "aria-label": e.ariaLabel,
2688
+ class: m(o(qo)({ variant: e.variant, size: e.size, tone: e.tone, disabled: e.disabled, loading: e.loading }))
2689
+ }, [
2690
+ P("span", {
2691
+ class: m([o(No), e.loading ? o(Vo) : void 0])
2692
+ }, [
2693
+ O(t.$slots, "default")
2694
+ ], 2),
2695
+ e.loading ? (p(), D("span", {
2696
+ key: 0,
2697
+ class: m(o(Wo))
2698
+ }, [
2699
+ F(o(on), {
2700
+ size: 14,
2701
+ class: "aggc-spin",
2702
+ "aria-hidden": "true"
2703
+ }),
2704
+ P("span", null, R(e.loadingLabel), 1)
2705
+ ], 2)) : L("", !0)
2706
+ ], 10, jo));
2707
+ }
2708
+ }), Ho = z({
2709
+ base: {
2710
+ width: "100%",
2711
+ display: "flex",
2712
+ alignItems: "flex-start",
2713
+ gap: "3",
2714
+ textAlign: "left",
2715
+ borderRadius: "xl",
2716
+ borderWidth: "1px",
2717
+ px: "4",
2718
+ py: "3.5",
2719
+ color: "text.primary",
2720
+ transition: "border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 160ms cubic-bezier(0.25, 0.1, 0.25, 1)"
2721
+ },
2722
+ variants: {
2723
+ checked: {
2724
+ true: {
2725
+ borderColor: "border.accent",
2726
+ bg: "bg.selected"
2727
+ },
2728
+ false: {
2729
+ borderColor: "border.default",
2730
+ bg: "bg.input"
2731
+ }
2732
+ },
2733
+ disabled: {
2734
+ true: {
2735
+ cursor: "not-allowed",
2736
+ opacity: 0.45
2737
+ },
2738
+ false: {
2739
+ cursor: "pointer"
2740
+ }
2741
+ }
2742
+ },
2743
+ compoundVariants: [
2744
+ {
2745
+ checked: !0,
2746
+ disabled: !1,
2747
+ css: {
2748
+ _hover: {
2749
+ borderColor: "border.accent"
2750
+ }
2751
+ }
2752
+ },
2753
+ {
2754
+ checked: !1,
2755
+ disabled: !1,
2756
+ css: {
2757
+ _hover: {
2758
+ borderColor: "border.strong"
2759
+ }
2760
+ }
2761
+ }
2762
+ ],
2763
+ defaultVariants: {
2764
+ checked: !1,
2765
+ disabled: !1
2766
+ }
2767
+ }), Ko = z({
2768
+ base: {
2769
+ mt: "0.5",
2770
+ flexShrink: "0",
2771
+ width: "22px",
2772
+ height: "22px",
2773
+ borderRadius: "md",
2774
+ borderWidth: "1.5px",
2775
+ display: "flex",
2776
+ alignItems: "center",
2777
+ justifyContent: "center",
2778
+ transition: "border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 160ms cubic-bezier(0.25, 0.1, 0.25, 1)"
2779
+ },
2780
+ variants: {
2781
+ checked: {
2782
+ true: {
2783
+ borderColor: "border.accent",
2784
+ bg: "bg.accentStrong",
2785
+ color: "text.inverse",
2786
+ transform: "scale(1)"
2787
+ },
2788
+ false: {
2789
+ borderColor: "border.default",
2790
+ bg: "bg.buttonOutline",
2791
+ color: "transparent",
2792
+ transform: "scale(1)"
2793
+ }
2794
+ }
2795
+ },
2796
+ defaultVariants: {
2797
+ checked: !1
2798
+ }
2799
+ }), Uo = E({
2800
+ display: "grid",
2801
+ gap: "1",
2802
+ minWidth: "0"
2803
+ }), Yo = E({
2804
+ fontSize: "sm",
2805
+ fontWeight: "700",
2806
+ lineHeight: "1.45"
2807
+ }), Xo = E({
2808
+ color: "text.secondary",
2809
+ fontSize: "sm",
2810
+ lineHeight: "1.55"
2811
+ }), Go = ["id", "name", "aria-checked", "aria-describedby", "aria-invalid", "disabled", "onKeydown"], ar = /* @__PURE__ */ _({
2812
+ __name: "UiCheckbox",
2813
+ props: {
2814
+ modelValue: { type: Boolean },
2815
+ id: { default: void 0 },
2816
+ name: { default: void 0 },
2817
+ label: { default: void 0 },
2818
+ description: { default: void 0 },
2819
+ disabled: { type: Boolean, default: !1 },
2820
+ invalid: { type: Boolean, default: !1 },
2821
+ ariaDescribedby: { default: void 0 }
2822
+ },
2823
+ emits: ["update:modelValue"],
2824
+ setup(e, { emit: t }) {
2825
+ const n = e, a = t;
2826
+ function s() {
2827
+ n.disabled || a("update:modelValue", !n.modelValue);
2828
+ }
2829
+ return (r, u) => (p(), D("button", {
2830
+ type: "button",
2831
+ id: e.id,
2832
+ name: e.name,
2833
+ role: "checkbox",
2834
+ "aria-checked": e.modelValue,
2835
+ "aria-describedby": e.ariaDescribedby,
2836
+ "aria-invalid": e.invalid || void 0,
2837
+ disabled: e.disabled,
2838
+ class: m(o(Ho)({ checked: e.modelValue, disabled: e.disabled })),
2839
+ onClick: s,
2840
+ onKeydown: [
2841
+ Ze(Ee(s, ["prevent"]), ["enter"]),
2842
+ Ze(Ee(s, ["prevent"]), ["space"])
2843
+ ]
2844
+ }, [
2845
+ P("span", {
2846
+ class: m(o(Ko)({ checked: e.modelValue })),
2847
+ "aria-hidden": "true"
2848
+ }, [
2849
+ F(o(xt), { size: 14 })
2850
+ ], 2),
2851
+ P("span", {
2852
+ class: m(o(Uo))
2853
+ }, [
2854
+ e.label || r.$slots.default ? (p(), D("span", {
2855
+ key: 0,
2856
+ class: m(o(Yo))
2857
+ }, [
2858
+ O(r.$slots, "default", {}, () => [
2859
+ X(R(e.label), 1)
2860
+ ])
2861
+ ], 2)) : L("", !0),
2862
+ e.description || r.$slots.description ? (p(), D("span", {
2863
+ key: 1,
2864
+ class: m(o(Xo))
2865
+ }, [
2866
+ O(r.$slots, "description", {}, () => [
2867
+ X(R(e.description), 1)
2868
+ ])
2869
+ ], 2)) : L("", !0)
2870
+ ], 2)
2871
+ ], 42, Go));
2872
+ }
2873
+ }), Jo = E({
2874
+ display: "grid",
2875
+ gap: "2",
2876
+ minWidth: "0"
2877
+ }), Qo = E({
2878
+ display: "flex",
2879
+ alignItems: "flex-start",
2880
+ justifyContent: "space-between",
2881
+ gap: "3"
2882
+ }), Zo = E({
2883
+ display: "grid",
2884
+ gap: "0.5",
2885
+ minWidth: "0"
2886
+ }), es = _t, ts = E({
2887
+ fontSize: "sm",
2888
+ fontWeight: "600",
2889
+ color: "text.primary"
2890
+ }), ns = Zt, as = E({
2891
+ flexShrink: "0"
2892
+ }), os = ["for"], ss = ["id"], or = /* @__PURE__ */ _({
2893
+ __name: "UiField",
2894
+ props: {
2895
+ id: {},
2896
+ forId: {},
2897
+ label: {},
2898
+ hint: {},
2899
+ eyebrow: {}
2900
+ },
2901
+ setup(e) {
2902
+ return (t, n) => (p(), D("div", {
2903
+ class: m(o(Jo))
2904
+ }, [
2905
+ e.eyebrow || e.label || e.hint || t.$slots.meta ? (p(), D("div", {
2906
+ key: 0,
2907
+ class: m(o(Qo))
2908
+ }, [
2909
+ P("div", {
2910
+ class: m(o(Zo))
2911
+ }, [
2912
+ e.eyebrow ? (p(), D("p", {
2913
+ key: 0,
2914
+ class: m(o(es))
2915
+ }, R(e.eyebrow), 3)) : L("", !0),
2916
+ e.label ? (p(), D("label", {
2917
+ key: 1,
2918
+ for: e.forId,
2919
+ class: m(o(ts))
2920
+ }, R(e.label), 11, os)) : L("", !0),
2921
+ e.hint ? (p(), D("p", {
2922
+ key: 2,
2923
+ id: e.id,
2924
+ class: m(o(ns))
2925
+ }, R(e.hint), 11, ss)) : L("", !0)
2926
+ ], 2),
2927
+ t.$slots.meta ? (p(), D("div", {
2928
+ key: 0,
2929
+ class: m(o(as))
2930
+ }, [
2931
+ O(t.$slots, "meta")
2932
+ ], 2)) : L("", !0)
2933
+ ], 2)) : L("", !0),
2934
+ O(t.$slots, "default")
2935
+ ], 2));
2936
+ }
2937
+ }), rs = Te(
2938
+ en,
2939
+ E({
2940
+ paddingX: "4",
2941
+ paddingY: "3",
2942
+ display: "flex",
2943
+ alignItems: "center",
2944
+ gap: "3",
2945
+ color: "text.secondary",
2946
+ fontSize: "sm",
2947
+ lineHeight: "1.5"
2948
+ })
2949
+ ), is = E({
2950
+ width: "2.5",
2951
+ height: "2.5",
2952
+ borderRadius: "full",
2953
+ flexShrink: "0",
2954
+ bg: "text.accent",
2955
+ boxShadow: "0 0 0 0 var(--colors-bg-accentSoft, rgba(49, 94, 255, 0.3))",
2956
+ animation: "loadingPulse 1.4s cubic-bezier(0.25, 0.1, 0.25, 1) infinite"
2957
+ }), ls = E({
2958
+ display: "grid",
2959
+ gap: "0.5"
2960
+ }), us = E({
2961
+ fontWeight: "700",
2962
+ color: "text.primary"
2963
+ }), ds = ["aria-live", "role"], sr = /* @__PURE__ */ _({
2964
+ __name: "UiLoadingState",
2965
+ props: {
2966
+ title: {},
2967
+ description: {},
2968
+ live: { default: "polite" }
2969
+ },
2970
+ setup(e) {
2971
+ return (t, n) => (p(), D("div", {
2972
+ class: m(o(rs)),
2973
+ "data-testid": "loading-state",
2974
+ "aria-live": e.live,
2975
+ role: e.live === "off" ? void 0 : "status"
2976
+ }, [
2977
+ P("span", {
2978
+ class: m(o(is)),
2979
+ "aria-hidden": "true",
2980
+ "data-ui-loading-pulse": ""
2981
+ }, null, 2),
2982
+ P("div", {
2983
+ class: m(o(ls))
2984
+ }, [
2985
+ P("p", {
2986
+ class: m(o(us))
2987
+ }, R(e.title), 3),
2988
+ P("p", null, R(e.description), 1)
2989
+ ], 2)
2990
+ ], 10, ds));
2991
+ }
2992
+ }), cs = E({
2993
+ position: "fixed",
2994
+ inset: "0",
2995
+ bg: "rgba(0, 0, 0, 0.3)",
2996
+ backdropFilter: "blur(12px)",
2997
+ _dark: {
2998
+ bg: "rgba(0, 0, 0, 0.5)"
2999
+ },
3000
+ display: "flex",
3001
+ alignItems: "center",
3002
+ justifyContent: "center",
3003
+ zIndex: "50",
3004
+ px: "4",
3005
+ overscrollBehavior: "contain",
3006
+ animation: "fadeIn 160ms cubic-bezier(0.16, 1, 0.3, 1)"
3007
+ }), fs = z({
3008
+ base: {
3009
+ bg: "bg.menu",
3010
+ borderRadius: "xl",
3011
+ borderWidth: "1px",
3012
+ borderColor: "border.subtle",
3013
+ p: "0",
3014
+ display: "flex",
3015
+ flexDirection: "column",
3016
+ maxH: "calc(100dvh - 2rem)",
3017
+ boxShadow: "0 16px 48px -8px rgba(0, 0, 0, 0.12), 0 4px 16px -4px rgba(0, 0, 0, 0.06)",
3018
+ animation: "modalIn 240ms cubic-bezier(0.16, 1, 0.3, 1)",
3019
+ position: "fixed",
3020
+ top: "50%",
3021
+ left: "50%",
3022
+ transform: "translate(-50%, -50%)",
3023
+ zIndex: "51",
3024
+ _dark: {
3025
+ boxShadow: "0 16px 48px -8px rgba(0, 0, 0, 0.56), 0 4px 16px -4px rgba(0, 0, 0, 0.32)",
3026
+ borderColor: "border.default"
3027
+ },
3028
+ _focusVisible: {
3029
+ outline: "none"
3030
+ }
3031
+ },
3032
+ variants: {
3033
+ size: {
3034
+ sm: { w: "380px" },
3035
+ md: { w: "480px" },
3036
+ lg: { w: "640px" }
3037
+ }
3038
+ },
3039
+ defaultVariants: {
3040
+ size: "md"
3041
+ }
3042
+ }), ps = E({
3043
+ display: "flex",
3044
+ justifyContent: "space-between",
3045
+ alignItems: "center",
3046
+ p: "6",
3047
+ pb: "4"
3048
+ }), vs = E({
3049
+ display: "flex",
3050
+ flexDirection: "column",
3051
+ gap: "1"
3052
+ }), ms = E({
3053
+ fontFamily: "heading",
3054
+ fontWeight: "600",
3055
+ fontSize: "lg",
3056
+ color: "text.primary"
3057
+ }), bs = E({
3058
+ fontSize: "sm",
3059
+ color: "text.secondary",
3060
+ lineHeight: "1.5"
3061
+ }), gs = E({
3062
+ display: "flex",
3063
+ alignItems: "center",
3064
+ justifyContent: "center",
3065
+ w: "8",
3066
+ h: "8",
3067
+ borderRadius: "lg",
3068
+ border: "none",
3069
+ bg: "transparent",
3070
+ color: "text.muted",
3071
+ cursor: "pointer",
3072
+ flexShrink: "0",
3073
+ transition: "color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), background 160ms cubic-bezier(0.25, 0.1, 0.25, 1)",
3074
+ _hover: {
3075
+ bg: "bg.hover",
3076
+ color: "text.primary"
3077
+ },
3078
+ _focusVisible: {
3079
+ outline: "2px solid",
3080
+ outlineColor: "border.accent",
3081
+ outlineOffset: "2px"
3082
+ }
3083
+ }), ys = E({
3084
+ px: "6",
3085
+ pb: "6",
3086
+ overflowY: "auto",
3087
+ overscrollBehavior: "contain"
3088
+ }), hs = E({
3089
+ display: "flex",
3090
+ justifyContent: "flex-end",
3091
+ gap: "3",
3092
+ p: "6",
3093
+ pt: "3",
3094
+ borderTopWidth: "1px",
3095
+ borderTopColor: "border.soft"
3096
+ }), rr = /* @__PURE__ */ _({
3097
+ __name: "UiModal",
3098
+ props: {
3099
+ open: { type: Boolean },
3100
+ size: { default: "md" },
3101
+ title: {},
3102
+ description: { default: void 0 }
3103
+ },
3104
+ emits: ["update:open", "close"],
3105
+ setup(e, { emit: t }) {
3106
+ const n = t;
3107
+ function a(s) {
3108
+ n("update:open", s), s || n("close");
3109
+ }
3110
+ return (s, r) => (p(), S(o(va), {
3111
+ open: e.open,
3112
+ "onUpdate:open": a
3113
+ }, {
3114
+ default: C(() => [
3115
+ F(o(Ja), null, {
3116
+ default: C(() => [
3117
+ F(o(Ua), {
3118
+ class: m(o(cs))
3119
+ }, null, 8, ["class"]),
3120
+ F(o(Va), {
3121
+ class: m(o(fs)({ size: e.size }))
3122
+ }, {
3123
+ default: C(() => [
3124
+ P("div", {
3125
+ class: m(o(ps))
3126
+ }, [
3127
+ P("div", {
3128
+ class: m(o(vs))
3129
+ }, [
3130
+ F(o(Za), {
3131
+ class: m(o(ms))
3132
+ }, {
3133
+ default: C(() => [
3134
+ X(R(e.title), 1)
3135
+ ]),
3136
+ _: 1
3137
+ }, 8, ["class"]),
3138
+ e.description ? (p(), S(o(it), {
3139
+ key: 0,
3140
+ class: m(o(bs))
3141
+ }, {
3142
+ default: C(() => [
3143
+ X(R(e.description), 1)
3144
+ ]),
3145
+ _: 1
3146
+ }, 8, ["class"])) : (p(), S(o(Ge), { key: 1 }, {
3147
+ default: C(() => [
3148
+ F(o(it), null, {
3149
+ default: C(() => [
3150
+ X(R(e.title), 1)
3151
+ ]),
3152
+ _: 1
3153
+ })
3154
+ ]),
3155
+ _: 1
3156
+ }))
3157
+ ], 2),
3158
+ F(o(ba), {
3159
+ class: m(o(gs)),
3160
+ "aria-label": "Close dialog"
3161
+ }, {
3162
+ default: C(() => [
3163
+ F(o(Et), {
3164
+ size: 20,
3165
+ "aria-hidden": "true"
3166
+ })
3167
+ ]),
3168
+ _: 1
3169
+ }, 8, ["class"])
3170
+ ], 2),
3171
+ P("div", {
3172
+ class: m(o(ys))
3173
+ }, [
3174
+ O(s.$slots, "default")
3175
+ ], 2),
3176
+ s.$slots.actions ? (p(), D("div", {
3177
+ key: 0,
3178
+ class: m(o(hs))
3179
+ }, [
3180
+ O(s.$slots, "actions")
3181
+ ], 2)) : L("", !0)
3182
+ ]),
3183
+ _: 3
3184
+ }, 8, ["class"])
3185
+ ]),
3186
+ _: 3
3187
+ })
3188
+ ]),
3189
+ _: 3
3190
+ }, 8, ["open"]));
3191
+ }
3192
+ }), ws = E({
3193
+ display: "inline-flex",
3194
+ width: "fit-content",
3195
+ borderRadius: "full",
3196
+ borderWidth: "1px",
3197
+ borderColor: "border.default",
3198
+ bg: "bg.input",
3199
+ padding: "1",
3200
+ gap: "1",
3201
+ _dark: {
3202
+ borderColor: "border.strong"
3203
+ }
3204
+ }), Cs = z({
3205
+ base: {
3206
+ borderRadius: "full",
3207
+ px: "3.5",
3208
+ py: "2",
3209
+ fontSize: "sm",
3210
+ fontWeight: "600",
3211
+ cursor: "pointer",
3212
+ borderWidth: "1px",
3213
+ transition: "background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 160ms cubic-bezier(0.25, 0.1, 0.25, 1)",
3214
+ _focusVisible: {
3215
+ outline: "2px solid",
3216
+ outlineColor: "text.accent",
3217
+ outlineOffset: "2px"
3218
+ }
3219
+ },
3220
+ variants: {
3221
+ active: {
3222
+ true: {
3223
+ borderColor: "border.accent",
3224
+ bg: "bg.accentStrong",
3225
+ color: "text.inverse",
3226
+ _hover: {
3227
+ bg: "bg.accentStrong"
3228
+ },
3229
+ _dark: {
3230
+ bg: "rgba(138, 180, 255, 0.2)",
3231
+ color: "text.accent",
3232
+ borderColor: "border.accent"
3233
+ }
3234
+ },
3235
+ false: {
3236
+ borderColor: "transparent",
3237
+ bg: "transparent",
3238
+ color: "text.secondary",
3239
+ boxShadow: "none",
3240
+ _hover: {
3241
+ bg: "bg.hover"
3242
+ }
3243
+ }
3244
+ }
3245
+ }
3246
+ }), _s = ["onClick"], ir = /* @__PURE__ */ _({
3247
+ __name: "UiSegmentedControl",
3248
+ props: {
3249
+ modelValue: {},
3250
+ options: {}
3251
+ },
3252
+ emits: ["update:modelValue"],
3253
+ setup(e) {
3254
+ return (t, n) => (p(), D("div", {
3255
+ class: m(o(ws))
3256
+ }, [
3257
+ (p(!0), D(Q, null, se(e.options, (a) => (p(), D("button", {
3258
+ key: a.value,
3259
+ type: "button",
3260
+ class: m(o(Cs)({ active: a.value === e.modelValue })),
3261
+ onClick: (s) => t.$emit("update:modelValue", a.value)
3262
+ }, R(a.label), 11, _s))), 128))
3263
+ ], 2));
3264
+ }
3265
+ }), xs = z({
3266
+ base: {
3267
+ position: "relative"
3268
+ },
3269
+ variants: {
3270
+ open: {
3271
+ true: { zIndex: "30" },
3272
+ false: { zIndex: "1" }
3273
+ }
3274
+ },
3275
+ defaultVariants: {
3276
+ open: !1
3277
+ }
3278
+ }), Es = z({
3279
+ base: {
3280
+ width: "100%",
3281
+ display: "flex",
3282
+ alignItems: "center",
3283
+ justifyContent: "space-between",
3284
+ gap: "3",
3285
+ borderWidth: "1px",
3286
+ fontSize: "sm",
3287
+ overflow: "hidden",
3288
+ transition: "border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 160ms cubic-bezier(0.25, 0.1, 0.25, 1)"
3289
+ },
3290
+ variants: {
3291
+ size: {
3292
+ sm: {
3293
+ minHeight: "40px",
3294
+ borderRadius: "lg",
3295
+ px: "3",
3296
+ py: "2.5"
3297
+ },
3298
+ md: {
3299
+ minHeight: "48px",
3300
+ borderRadius: "xl",
3301
+ px: "4",
3302
+ py: "3"
3303
+ }
3304
+ },
3305
+ open: {
3306
+ true: {
3307
+ borderColor: "border.accent",
3308
+ bg: "bg.cardStrong",
3309
+ _dark: {
3310
+ borderColor: "border.accent",
3311
+ bg: "bg.input"
3312
+ }
3313
+ },
3314
+ false: {
3315
+ borderColor: "border.default",
3316
+ bg: "bg.input"
3317
+ }
3318
+ },
3319
+ selected: {
3320
+ true: { color: "text.primary" },
3321
+ false: { color: "text.muted" }
3322
+ },
3323
+ disabled: {
3324
+ true: {
3325
+ cursor: "not-allowed",
3326
+ opacity: 0.45
3327
+ },
3328
+ false: {
3329
+ cursor: "pointer",
3330
+ _focusVisible: {
3331
+ outline: "2px solid",
3332
+ outlineColor: "text.accent",
3333
+ outlineOffset: "2px"
3334
+ }
3335
+ }
3336
+ }
3337
+ },
3338
+ compoundVariants: [
3339
+ {
3340
+ disabled: !1,
3341
+ css: {
3342
+ _hover: {
3343
+ borderColor: "border.strong",
3344
+ bg: "bg.cardStrong",
3345
+ _dark: {
3346
+ bg: "bg.input"
3347
+ }
3348
+ }
3349
+ }
3350
+ }
3351
+ ],
3352
+ defaultVariants: {
3353
+ size: "md",
3354
+ open: !1,
3355
+ selected: !1,
3356
+ disabled: !1
3357
+ }
3358
+ }), Ts = tn({
3359
+ placement: "anchored",
3360
+ density: "cozy"
3361
+ }), Ss = E({
3362
+ width: "100%",
3363
+ zIndex: "30",
3364
+ maxHeight: "320px",
3365
+ overflowY: "auto",
3366
+ display: "grid"
3367
+ }), ks = E({
3368
+ display: "block",
3369
+ textAlign: "left",
3370
+ minWidth: "0",
3371
+ flex: "1",
3372
+ overflow: "hidden"
3373
+ }), Ds = E({
3374
+ display: "block",
3375
+ overflow: "hidden",
3376
+ textOverflow: "ellipsis",
3377
+ whiteSpace: "nowrap"
3378
+ }), Os = z({
3379
+ base: {
3380
+ color: "text.muted",
3381
+ transition: "transform 160ms cubic-bezier(0.25, 0.1, 0.25, 1)"
3382
+ },
3383
+ variants: {
3384
+ open: {
3385
+ true: { transform: "rotate(180deg)" },
3386
+ false: { transform: "rotate(0deg)" }
3387
+ }
3388
+ },
3389
+ defaultVariants: {
3390
+ open: !1
3391
+ }
3392
+ }), As = z({
3393
+ base: {
3394
+ width: "100%",
3395
+ display: "flex",
3396
+ alignItems: "flex-start",
3397
+ justifyContent: "space-between",
3398
+ gap: "3",
3399
+ textAlign: "left",
3400
+ borderRadius: "lg",
3401
+ px: "3",
3402
+ borderWidth: "1px",
3403
+ cursor: "pointer",
3404
+ transition: "border-color 140ms cubic-bezier(0.25, 0.1, 0.25, 1), background-color 140ms cubic-bezier(0.25, 0.1, 0.25, 1), color 140ms cubic-bezier(0.25, 0.1, 0.25, 1)",
3405
+ _hover: {
3406
+ bg: "bg.selected",
3407
+ borderColor: "border.accent"
3408
+ },
3409
+ _focusVisible: {
3410
+ outline: "2px solid",
3411
+ outlineColor: "text.accent",
3412
+ outlineOffset: "-2px"
3413
+ }
3414
+ },
3415
+ variants: {
3416
+ size: {
3417
+ sm: { py: "2.5" },
3418
+ md: { py: "2.5" }
3419
+ },
3420
+ active: {
3421
+ true: {
3422
+ color: "text.primary",
3423
+ bg: "bg.selected",
3424
+ borderColor: "border.accent"
3425
+ },
3426
+ false: {
3427
+ color: "text.secondary",
3428
+ bg: "transparent",
3429
+ borderColor: "transparent"
3430
+ }
3431
+ }
3432
+ },
3433
+ defaultVariants: {
3434
+ size: "md",
3435
+ active: !1
3436
+ }
3437
+ }), Is = E({
3438
+ display: "grid",
3439
+ gap: "0.5",
3440
+ minWidth: "0"
3441
+ }), Ps = E({
3442
+ fontSize: "sm",
3443
+ fontWeight: "600",
3444
+ minWidth: "0",
3445
+ overflow: "hidden",
3446
+ textOverflow: "ellipsis",
3447
+ whiteSpace: "nowrap"
3448
+ }), Bs = E({
3449
+ color: "text.secondary",
3450
+ fontSize: "xs",
3451
+ lineHeight: "1.45",
3452
+ overflowWrap: "anywhere"
3453
+ }), Rs = z({
3454
+ base: {
3455
+ color: "text.accent",
3456
+ transition: "opacity 140ms cubic-bezier(0.25, 0.1, 0.25, 1)"
3457
+ },
3458
+ variants: {
3459
+ selected: {
3460
+ true: { opacity: 1 },
3461
+ false: { opacity: 0 }
3462
+ }
3463
+ },
3464
+ defaultVariants: {
3465
+ selected: !1
3466
+ }
3467
+ }), Ls = ["id", "name", "disabled", "aria-expanded", "aria-controls", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid"], $s = ["id", "aria-activedescendant"], Fs = ["id", "aria-selected", "onMouseenter", "onClick", "onKeydown"], lr = /* @__PURE__ */ _({
3468
+ __name: "UiSelect",
3469
+ props: {
3470
+ modelValue: {},
3471
+ options: {},
3472
+ id: { default: void 0 },
3473
+ name: { default: void 0 },
3474
+ placeholder: { default: "Select an option" },
3475
+ disabled: { type: Boolean, default: !1 },
3476
+ invalid: { type: Boolean, default: !1 },
3477
+ size: { default: "md" },
3478
+ ariaLabel: { default: void 0 },
3479
+ ariaLabelledby: { default: void 0 },
3480
+ ariaDescribedby: { default: void 0 }
3481
+ },
3482
+ emits: ["update:modelValue"],
3483
+ setup(e, { emit: t }) {
3484
+ const n = e, a = t, s = x(null), r = x(null), u = x([]), i = x(!1), l = x(-1), d = Kt(), c = $(() => n.id ?? `ui-select-${d}`), f = $(() => `${c.value}-listbox`), v = $(
3485
+ () => n.options.find((w) => w.value === n.modelValue) ?? null
3486
+ );
3487
+ function b(w) {
3488
+ if (!n.options.length) {
3489
+ l.value = -1;
3490
+ return;
3491
+ }
3492
+ const M = (w + n.options.length) % n.options.length;
3493
+ l.value = M, Z(() => {
3494
+ u.value[M]?.focus();
3495
+ });
3496
+ }
3497
+ function y() {
3498
+ i.value = !1, l.value = -1;
3499
+ }
3500
+ async function A() {
3501
+ if (n.disabled || !n.options.length)
3502
+ return;
3503
+ i.value = !0;
3504
+ const w = n.options.findIndex((M) => M.value === n.modelValue);
3505
+ await Z(), b(w >= 0 ? w : 0);
3506
+ }
3507
+ function g() {
3508
+ if (i.value) {
3509
+ y();
3510
+ return;
3511
+ }
3512
+ A();
3513
+ }
3514
+ function h(w) {
3515
+ a("update:modelValue", w), y(), Z(() => {
3516
+ r.value?.focus();
3517
+ });
3518
+ }
3519
+ function T(w) {
3520
+ n.disabled || (w.key === "ArrowDown" || w.key === "Enter" || w.key === " ") && (w.preventDefault(), A());
3521
+ }
3522
+ function k(w, M) {
3523
+ switch (w.key) {
3524
+ case "ArrowDown":
3525
+ w.preventDefault(), b(M + 1);
3526
+ break;
3527
+ case "ArrowUp":
3528
+ w.preventDefault(), b(M - 1);
3529
+ break;
3530
+ case "Home":
3531
+ w.preventDefault(), b(0);
3532
+ break;
3533
+ case "End":
3534
+ w.preventDefault(), b(n.options.length - 1);
3535
+ break;
3536
+ case "Escape":
3537
+ w.preventDefault(), y(), r.value?.focus();
3538
+ break;
3539
+ case "Enter":
3540
+ case " ":
3541
+ w.preventDefault(), h(n.options[M].value);
3542
+ break;
3543
+ }
3544
+ }
3545
+ function I(w) {
3546
+ i.value && (s.value?.contains(w.target) || y());
3547
+ }
3548
+ return j(
3549
+ () => n.options,
3550
+ () => {
3551
+ u.value = [], n.options.some((w) => w.value === n.modelValue) || y();
3552
+ }
3553
+ ), j(
3554
+ () => n.disabled,
3555
+ (w) => {
3556
+ w && y();
3557
+ }
3558
+ ), ae(() => {
3559
+ document.addEventListener("pointerdown", I);
3560
+ }), mt(() => {
3561
+ document.removeEventListener("pointerdown", I);
3562
+ }), (w, M) => (p(), D("div", {
3563
+ ref_key: "rootRef",
3564
+ ref: s,
3565
+ class: m(o(xs)({ open: i.value }))
3566
+ }, [
3567
+ P("button", {
3568
+ ref_key: "triggerRef",
3569
+ ref: r,
3570
+ type: "button",
3571
+ id: c.value,
3572
+ name: e.name,
3573
+ disabled: e.disabled,
3574
+ class: m(o(Es)({ size: e.size, open: i.value, selected: !!v.value, disabled: e.disabled })),
3575
+ "aria-haspopup": "listbox",
3576
+ "aria-expanded": i.value,
3577
+ "aria-controls": f.value,
3578
+ "aria-label": e.ariaLabel,
3579
+ "aria-labelledby": e.ariaLabelledby,
3580
+ "aria-describedby": e.ariaDescribedby,
3581
+ "aria-invalid": e.invalid || void 0,
3582
+ onClick: g,
3583
+ onKeydown: T
3584
+ }, [
3585
+ P("span", {
3586
+ class: m(o(ks))
3587
+ }, [
3588
+ P("span", {
3589
+ class: m(o(Ds))
3590
+ }, R(v.value?.label ?? e.placeholder), 3)
3591
+ ], 2),
3592
+ F(o(sn), {
3593
+ size: 16,
3594
+ class: m(o(Os)({ open: i.value }))
3595
+ }, null, 8, ["class"])
3596
+ ], 42, Ls),
3597
+ i.value ? (p(), D("div", {
3598
+ key: 0,
3599
+ id: f.value,
3600
+ class: m([o(Ts), o(Ss)]),
3601
+ role: "listbox",
3602
+ "aria-activedescendant": l.value >= 0 ? `${c.value}-${l.value}` : void 0
3603
+ }, [
3604
+ (p(!0), D(Q, null, se(e.options, (B, K) => (p(), D("button", {
3605
+ id: `${c.value}-${K}`,
3606
+ key: B.value,
3607
+ ref_for: !0,
3608
+ ref: (U) => u.value[K] = U,
3609
+ type: "button",
3610
+ role: "option",
3611
+ "aria-selected": B.value === e.modelValue,
3612
+ class: m(o(As)({ size: e.size, active: l.value === K || B.value === e.modelValue })),
3613
+ onMouseenter: (U) => l.value = K,
3614
+ onClick: (U) => h(B.value),
3615
+ onKeydown: (U) => k(U, K)
3616
+ }, [
3617
+ P("span", {
3618
+ class: m(o(Is))
3619
+ }, [
3620
+ P("span", {
3621
+ class: m(o(Ps))
3622
+ }, R(B.label), 3),
3623
+ B.description && e.size === "md" ? (p(), D("span", {
3624
+ key: 0,
3625
+ class: m(o(Bs))
3626
+ }, R(B.description), 3)) : L("", !0)
3627
+ ], 2),
3628
+ F(o(xt), {
3629
+ size: 15,
3630
+ class: m(o(Rs)({ selected: B.value === e.modelValue }))
3631
+ }, null, 8, ["class"])
3632
+ ], 42, Fs))), 128))
3633
+ ], 10, $s)) : L("", !0)
3634
+ ], 2));
3635
+ }
3636
+ }), Ms = z({
3637
+ base: {
3638
+ position: "relative",
3639
+ overflow: "hidden",
3640
+ bg: "bg.cardAlt",
3641
+ borderRadius: "md",
3642
+ _before: {
3643
+ content: '""',
3644
+ position: "absolute",
3645
+ inset: "0",
3646
+ background: "linear-gradient(90deg, transparent 0%, var(--colors-bg-overlay, rgba(255,255,255,0.36)) 50%, transparent 100%)",
3647
+ transform: "translateX(-100%)",
3648
+ animation: "aggc-shimmer 1.6s cubic-bezier(0.25, 0.1, 0.25, 1) infinite"
3649
+ },
3650
+ _dark: {
3651
+ bg: "rgba(255, 255, 255, 0.04)",
3652
+ _before: {
3653
+ background: "linear-gradient(90deg, transparent 0%, rgba(186, 204, 236, 0.1) 50%, transparent 100%)"
3654
+ }
3655
+ }
3656
+ },
3657
+ variants: {
3658
+ variant: {
3659
+ text: {
3660
+ width: "100%",
3661
+ height: "0.875rem"
3662
+ },
3663
+ title: {
3664
+ width: "100%",
3665
+ height: "1.75rem",
3666
+ borderRadius: "md"
3667
+ },
3668
+ rect: {
3669
+ width: "100%",
3670
+ height: "5rem"
3671
+ },
3672
+ pill: {
3673
+ width: "5rem",
3674
+ height: "1.75rem",
3675
+ borderRadius: "999px"
3676
+ },
3677
+ circle: {
3678
+ width: "2.75rem",
3679
+ height: "2.75rem",
3680
+ borderRadius: "999px"
3681
+ },
3682
+ stat: {
3683
+ width: "100%",
3684
+ height: "4.75rem"
3685
+ },
3686
+ action: {
3687
+ width: "100%",
3688
+ height: "2.75rem"
3689
+ }
3690
+ }
3691
+ },
3692
+ defaultVariants: {
3693
+ variant: "rect"
3694
+ }
3695
+ }), ur = /* @__PURE__ */ _({
3696
+ __name: "UiSkeleton",
3697
+ props: {
3698
+ variant: { default: "rect" },
3699
+ width: { default: void 0 },
3700
+ height: { default: void 0 }
3701
+ },
3702
+ setup(e) {
3703
+ const t = e, n = $(() => Ms({ variant: t.variant })), a = $(() => ({
3704
+ width: t.width ?? (t.variant === "circle" ? "2.75rem" : t.variant === "pill" ? "5rem" : "100%"),
3705
+ height: t.height ?? (t.variant === "text" ? "0.875rem" : t.variant === "title" || t.variant === "pill" ? "1.75rem" : t.variant === "circle" || t.variant === "action" ? "2.75rem" : t.variant === "stat" ? "4.75rem" : "5rem")
3706
+ }));
3707
+ return (s, r) => (p(), D("div", {
3708
+ "aria-hidden": "true",
3709
+ "data-ui-skeleton": "",
3710
+ class: m(n.value),
3711
+ style: qe(a.value)
3712
+ }, null, 6));
3713
+ }
3714
+ }), zs = E({
3715
+ position: "fixed",
3716
+ bottom: "4",
3717
+ right: "4",
3718
+ zIndex: "50",
3719
+ display: "flex",
3720
+ flexDirection: "column",
3721
+ gap: "2",
3722
+ w: "360px",
3723
+ maxW: "calc(100vw - 2rem)",
3724
+ maxHeight: "calc(100dvh - 2rem)",
3725
+ pointerEvents: "none",
3726
+ outline: "none"
3727
+ }), qs = z({
3728
+ base: {
3729
+ display: "flex",
3730
+ alignItems: "flex-start",
3731
+ gap: "3",
3732
+ p: "4",
3733
+ borderRadius: "lg",
3734
+ borderWidth: "1px",
3735
+ bg: "bg.cardStrong",
3736
+ borderColor: "border.default",
3737
+ boxShadow: "0 4px 12px -4px rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
3738
+ pointerEvents: "auto",
3739
+ position: "relative",
3740
+ overflow: "hidden",
3741
+ transition: "all 240ms cubic-bezier(0.16, 1, 0.3, 1)",
3742
+ _dark: {
3743
+ boxShadow: "0 4px 12px -4px rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.24)"
3744
+ },
3745
+ '&[data-state="open"]': {
3746
+ animation: "toastSlideIn 240ms cubic-bezier(0.16, 1, 0.3, 1)"
3747
+ },
3748
+ '&[data-state="closed"]': {
3749
+ animation: "toastFadeOut 160ms cubic-bezier(0.25, 0.1, 0.25, 1)"
3750
+ },
3751
+ '&[data-swipe="move"]': {
3752
+ transform: "translateX(var(--reka-toast-swipe-move-x))"
3753
+ },
3754
+ '&[data-swipe="cancel"]': {
3755
+ transform: "translateX(0)",
3756
+ transition: "transform 200ms ease-out"
3757
+ },
3758
+ '&[data-swipe="end"]': {
3759
+ animation: "toastSwipeOut 100ms ease-out"
3760
+ }
3761
+ },
3762
+ variants: {
3763
+ tone: {
3764
+ success: {
3765
+ borderColor: "badge.successBorder",
3766
+ bg: "badge.successBg"
3767
+ },
3768
+ error: {
3769
+ borderColor: "badge.dangerBorder",
3770
+ bg: "badge.dangerBg"
3771
+ },
3772
+ info: {
3773
+ borderColor: "badge.infoBorder",
3774
+ bg: "badge.infoBg"
3775
+ },
3776
+ warning: {
3777
+ borderColor: "badge.warningBorder",
3778
+ bg: "badge.warningBg"
3779
+ }
3780
+ }
3781
+ },
3782
+ defaultVariants: {
3783
+ tone: "info"
3784
+ }
3785
+ }), Ns = z({
3786
+ base: {
3787
+ flexShrink: "0",
3788
+ w: "5",
3789
+ h: "5"
3790
+ },
3791
+ variants: {
3792
+ tone: {
3793
+ success: { color: "badge.successText" },
3794
+ error: { color: "badge.dangerText" },
3795
+ info: { color: "badge.infoText" },
3796
+ warning: { color: "badge.warningText" }
3797
+ }
3798
+ },
3799
+ defaultVariants: {
3800
+ tone: "info"
3801
+ }
3802
+ }), Vs = E({
3803
+ flex: "1",
3804
+ minW: "0"
3805
+ }), Ws = E({
3806
+ fontWeight: "600",
3807
+ fontSize: "sm",
3808
+ color: "text.primary",
3809
+ lineHeight: "1.4"
3810
+ }), js = E({
3811
+ fontSize: "sm",
3812
+ color: "text.secondary",
3813
+ lineHeight: "1.5"
3814
+ }), Hs = E({
3815
+ position: "absolute",
3816
+ top: "3",
3817
+ right: "3",
3818
+ display: "flex",
3819
+ alignItems: "center",
3820
+ justifyContent: "center",
3821
+ w: "6",
3822
+ h: "6",
3823
+ borderRadius: "md",
3824
+ border: "none",
3825
+ bg: "transparent",
3826
+ color: "text.muted",
3827
+ cursor: "pointer",
3828
+ flexShrink: "0",
3829
+ transition: "color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), background 160ms cubic-bezier(0.25, 0.1, 0.25, 1)",
3830
+ _hover: {
3831
+ bg: "bg.hover",
3832
+ color: "text.primary"
3833
+ },
3834
+ _focusVisible: {
3835
+ outline: "2px solid",
3836
+ outlineColor: "border.accent",
3837
+ outlineOffset: "2px"
3838
+ }
3839
+ }), Ks = /* @__PURE__ */ _({
3840
+ __name: "UiToast",
3841
+ props: {
3842
+ tone: {},
3843
+ message: {},
3844
+ title: { default: void 0 },
3845
+ duration: { default: 4e3 }
3846
+ },
3847
+ setup(e) {
3848
+ const t = e, n = {
3849
+ success: dn,
3850
+ error: un,
3851
+ info: ln,
3852
+ warning: rn
3853
+ };
3854
+ return (a, s) => (p(), S(o(Io), {
3855
+ class: m(o(qs)({ tone: e.tone })),
3856
+ duration: e.duration,
3857
+ type: "foreground"
3858
+ }, {
3859
+ default: C(() => [
3860
+ (p(), S(ft(n[t.tone]), {
3861
+ class: m(o(Ns)({ tone: e.tone })),
3862
+ "aria-hidden": "true"
3863
+ }, null, 8, ["class"])),
3864
+ P("div", {
3865
+ class: m(o(Vs))
3866
+ }, [
3867
+ e.title ? (p(), S(o(Bo), {
3868
+ key: 0,
3869
+ class: m(o(Ws))
3870
+ }, {
3871
+ default: C(() => [
3872
+ X(R(e.title), 1)
3873
+ ]),
3874
+ _: 1
3875
+ }, 8, ["class"])) : L("", !0),
3876
+ F(o(Oo), {
3877
+ class: m(o(js))
3878
+ }, {
3879
+ default: C(() => [
3880
+ X(R(e.message), 1)
3881
+ ]),
3882
+ _: 1
3883
+ }, 8, ["class"])
3884
+ ], 2),
3885
+ F(o(ko), {
3886
+ class: m(o(Hs)),
3887
+ "aria-label": "Dismiss"
3888
+ }, {
3889
+ default: C(() => [
3890
+ F(o(Et), {
3891
+ size: 14,
3892
+ "aria-hidden": "true"
3893
+ })
3894
+ ]),
3895
+ _: 1
3896
+ }, 8, ["class"])
3897
+ ]),
3898
+ _: 1
3899
+ }, 8, ["class", "duration"]));
3900
+ }
3901
+ }), fe = x([]);
3902
+ let Us = 0;
3903
+ function _e(e, t, n = 4e3) {
3904
+ const a = Us++;
3905
+ return fe.value = [...fe.value, { id: a, tone: e, message: t, duration: n }], n > 0 && setTimeout(() => Lt(a), n), a;
3906
+ }
3907
+ function Lt(e) {
3908
+ fe.value = fe.value.filter((t) => t.id !== e);
3909
+ }
3910
+ function Ys() {
3911
+ return {
3912
+ toasts: fe,
3913
+ success: (e, t) => _e("success", e, t),
3914
+ error: (e, t) => _e("error", e, t),
3915
+ info: (e, t) => _e("info", e, t),
3916
+ warning: (e, t) => _e("warning", e, t),
3917
+ dismiss: Lt
3918
+ };
3919
+ }
3920
+ const dr = /* @__PURE__ */ _({
3921
+ __name: "UiToastProvider",
3922
+ setup(e) {
3923
+ const { toasts: t } = Ys();
3924
+ return (n, a) => (p(), S(o(vo), { "swipe-direction": "right" }, {
3925
+ default: C(() => [
3926
+ O(n.$slots, "default"),
3927
+ (p(!0), D(Q, null, se(o(t), (s) => (p(), S(Ks, {
3928
+ key: s.id,
3929
+ tone: s.tone,
3930
+ message: s.message,
3931
+ duration: s.duration
3932
+ }, null, 8, ["tone", "message", "duration"]))), 128)),
3933
+ F(o($o), {
3934
+ class: m(o(zs))
3935
+ }, null, 8, ["class"])
3936
+ ]),
3937
+ _: 3
3938
+ }));
3939
+ }
3940
+ });
3941
+ export {
3942
+ Qs as _,
3943
+ Zs as a,
3944
+ er as b,
3945
+ pn as c,
3946
+ tr as d,
3947
+ nr as e,
3948
+ ar as f,
3949
+ or as g,
3950
+ sr as h,
3951
+ rr as i,
3952
+ ir as j,
3953
+ lr as k,
3954
+ ur as l,
3955
+ Ks as m,
3956
+ dr as n,
3957
+ Ys as u
3958
+ };