@roku-ui/vue 0.7.0 → 0.7.1

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 (43) hide show
  1. package/dist/components/AspectRatio.vue.d.ts +44 -0
  2. package/dist/components/Avatar.vue.d.ts +41 -0
  3. package/dist/components/Btn.vue.d.ts +77 -0
  4. package/dist/components/ChatContainer.vue.d.ts +9 -0
  5. package/dist/components/ChatMessage.vue.d.ts +51 -0
  6. package/dist/components/ChatSystem.vue.d.ts +45 -0
  7. package/dist/components/Chip.vue.d.ts +61 -0
  8. package/dist/components/ColorInput.vue.d.ts +6 -0
  9. package/dist/components/ColorSwatch.vue.d.ts +36 -0
  10. package/dist/components/Drawer.vue.d.ts +41 -0
  11. package/dist/components/Dropzone.vue.d.ts +45 -0
  12. package/dist/components/FullscreenOverlay.vue.d.ts +38 -0
  13. package/dist/components/Image.vue.d.ts +49 -0
  14. package/dist/components/Indicator.vue.d.ts +49 -0
  15. package/dist/components/Modal.vue.d.ts +32 -0
  16. package/dist/components/Notification.vue.d.ts +66 -0
  17. package/dist/components/NotificationSystem.vue.d.ts +2 -0
  18. package/dist/components/Overlay.vue.d.ts +52 -0
  19. package/dist/components/Paper.vue.d.ts +51 -0
  20. package/dist/components/PinInput.vue.d.ts +35 -0
  21. package/dist/components/Progress.vue.d.ts +59 -0
  22. package/dist/components/RokuProvider.vue.d.ts +42 -0
  23. package/dist/components/SchemeSwitch.vue.d.ts +2 -0
  24. package/dist/components/Select.vue.d.ts +60 -0
  25. package/dist/components/Slider.vue.d.ts +88 -0
  26. package/dist/components/Switch.vue.d.ts +85 -0
  27. package/dist/components/TabItem.vue.d.ts +38 -0
  28. package/dist/components/Tabs.vue.d.ts +29 -0
  29. package/dist/components/ThemeProvider.vue.d.ts +23 -0
  30. package/dist/components/index.d.ts +30 -0
  31. package/dist/composables/index.d.ts +64 -0
  32. package/dist/index.d.ts +3 -0
  33. package/dist/index.js +3226 -0
  34. package/dist/index.umd.cjs +1 -0
  35. package/dist/style.css +1 -0
  36. package/dist/test/index.test.d.ts +1 -0
  37. package/dist/test.d.ts +1 -0
  38. package/dist/utils/classGenerator.d.ts +6 -0
  39. package/dist/utils/index.d.ts +23 -0
  40. package/dist/utils/notifications.d.ts +12 -0
  41. package/dist/utils/symbols.d.ts +2 -0
  42. package/dist/utils/theme.d.ts +35 -0
  43. package/package.json +2 -2
package/dist/index.js ADDED
@@ -0,0 +1,3226 @@
1
+ import { defineComponent as x, openBlock as h, createElementBlock as b, normalizeStyle as C, renderSlot as k, computed as m, ref as g, onMounted as ee, Fragment as K, createBlock as P, resolveDynamicComponent as ue, mergeProps as xe, unref as c, createCommentVNode as T, getCurrentScope as xt, onScopeDispose as kt, nextTick as et, getCurrentInstance as tt, watch as de, shallowRef as St, readonly as Mt, watchEffect as F, withCtx as W, normalizeClass as y, createElementVNode as w, mergeModels as j, useModel as U, inject as be, provide as ge, useAttrs as $t, withDirectives as Te, vModelText as Ct, createVNode as Z, Teleport as At, Transition as rt, useSlots as nt, toDisplayString as se, renderList as ye, vModelDynamic as Tt, withModifiers as ot, withKeys as zt, reactive as Et, vModelCheckbox as Rt, isRef as Bt, createTextVNode as Ot } from "vue";
2
+ const In = /* @__PURE__ */ x({
3
+ __name: "AspectRatio",
4
+ props: {
5
+ ratio: { default: 1 },
6
+ width: {},
7
+ maxWidth: {},
8
+ height: {},
9
+ maxHeight: {}
10
+ },
11
+ setup(e) {
12
+ return (t, r) => (h(), b("div", {
13
+ style: C({
14
+ "--ar-ratio": t.ratio,
15
+ width: t.width,
16
+ "max-width": t.maxWidth,
17
+ height: t.height,
18
+ "max-height": t.maxHeight
19
+ }),
20
+ class: "relative children:absolute children:top-0 before:block before:h-0 children:h-full children:w-full before:pb-[calc((1/var(--ar-ratio,1))*100%)] before:content-['']"
21
+ }, [
22
+ k(t.$slots, "default")
23
+ ], 4));
24
+ }
25
+ }), Ht = /* @__PURE__ */ x({
26
+ __name: "Avatar",
27
+ props: {
28
+ is: { default: "img" },
29
+ src: {},
30
+ size: { default: "md" },
31
+ style: {},
32
+ class: {}
33
+ },
34
+ setup(e) {
35
+ const t = e, r = m(() => {
36
+ switch (t.size) {
37
+ case "sm":
38
+ return "--size: 1.5rem;";
39
+ case "md":
40
+ return "--size: 2rem;";
41
+ case "lg":
42
+ return "--size: 3rem;";
43
+ default:
44
+ return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `--size: ${t.size}rem;` : `--size: ${t.size};`;
45
+ }
46
+ }), n = g(!1), a = g(null);
47
+ function o() {
48
+ n.value = !0;
49
+ }
50
+ return ee(() => {
51
+ var s;
52
+ (s = a.value) != null && s.complete && o();
53
+ }), (s, i) => (h(), b(K, null, [
54
+ s.src ? (h(), P(ue(s.is), xe({
55
+ key: 0,
56
+ ref_key: "img",
57
+ ref: a,
58
+ style: [s.style, c(r)],
59
+ placeholder: "",
60
+ src: s.src,
61
+ class: ["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !c(n) }, t.class]]
62
+ }, s.$attrs, { onLoad: o }), null, 16, ["style", "src", "class"])) : T("", !0),
63
+ c(n) ? T("", !0) : (h(), b("div", {
64
+ key: 1,
65
+ class: "h-[var(--size)] w-[var(--size)] animate-pulse border-transparent rounded-full bg-surface-high object-cover",
66
+ style: C([s.style, c(r)])
67
+ }, null, 4))
68
+ ], 64));
69
+ }
70
+ });
71
+ function G(e) {
72
+ return m(
73
+ () => ({ style: Nt(e.rounded), class: "rounded-[var(--r-rounded)]" })
74
+ );
75
+ }
76
+ function Nt(e) {
77
+ const t = /^-?\d*\.?\d+(px|em|rem|vh|vw|in|cm|mm|pt|pc|%)?$/;
78
+ switch (e) {
79
+ case "none":
80
+ return "--r-rounded: 0";
81
+ case "sm":
82
+ return "--r-rounded: 0.125rem";
83
+ case "md":
84
+ return "--r-rounded: 0.25rem";
85
+ case "lg":
86
+ return "--r-rounded: 0.5rem";
87
+ case "full":
88
+ return "--r-rounded: 9999px";
89
+ default:
90
+ return typeof e == "string" && t.test(e) ? `--r-rounded: ${e};` : typeof e == "number" || !Number.isNaN(Number(e)) ? `--r-rounded: ${e}rem;` : "rounded-[var(--r-rounded)]";
91
+ }
92
+ }
93
+ function ke(e) {
94
+ return xt() ? (kt(e), !0) : !1;
95
+ }
96
+ function Pt() {
97
+ const e = /* @__PURE__ */ new Set(), t = (a) => {
98
+ e.delete(a);
99
+ };
100
+ return {
101
+ on: (a) => {
102
+ e.add(a);
103
+ const o = () => t(a);
104
+ return ke(o), {
105
+ off: o
106
+ };
107
+ },
108
+ off: t,
109
+ trigger: (...a) => Promise.all(Array.from(e).map((o) => o(...a)))
110
+ };
111
+ }
112
+ function ze(e) {
113
+ return typeof e == "function" ? e() : c(e);
114
+ }
115
+ const Q = typeof window < "u" && typeof document < "u";
116
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
117
+ const It = (e) => e != null, Vt = Object.prototype.toString, Dt = (e) => Vt.call(e) === "[object Object]", Ft = () => {
118
+ }, Lt = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
119
+ function Wt(e) {
120
+ return e || tt();
121
+ }
122
+ function jt(e, t = !0, r) {
123
+ Wt() ? ee(e, r) : t ? e() : et(e);
124
+ }
125
+ function re(e) {
126
+ var t;
127
+ const r = ze(e);
128
+ return (t = r == null ? void 0 : r.$el) != null ? t : r;
129
+ }
130
+ const fe = Q ? window : void 0, Ut = Q ? window.document : void 0;
131
+ function N(...e) {
132
+ let t, r, n, a;
133
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, a] = e, t = fe) : [t, r, n, a] = e, !t)
134
+ return Ft;
135
+ Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
136
+ const o = [], s = () => {
137
+ o.forEach((d) => d()), o.length = 0;
138
+ }, i = (d, f, v, S) => (d.addEventListener(f, v, S), () => d.removeEventListener(f, v, S)), l = de(
139
+ () => [re(t), ze(a)],
140
+ ([d, f]) => {
141
+ if (s(), !d)
142
+ return;
143
+ const v = Dt(f) ? { ...f } : f;
144
+ o.push(
145
+ ...r.flatMap((S) => n.map((A) => i(d, S, A, v)))
146
+ );
147
+ },
148
+ { immediate: !0, flush: "post" }
149
+ ), u = () => {
150
+ l(), s();
151
+ };
152
+ return ke(u), u;
153
+ }
154
+ function Gt(e) {
155
+ return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
156
+ }
157
+ function te(...e) {
158
+ let t, r, n = {};
159
+ e.length === 3 ? (t = e[0], r = e[1], n = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, r = e[0], n = e[1]) : (t = e[0], r = e[1]) : (t = !0, r = e[0]);
160
+ const {
161
+ target: a = fe,
162
+ eventName: o = "keydown",
163
+ passive: s = !1,
164
+ dedupe: i = !1
165
+ } = n, l = Gt(t);
166
+ return N(a, o, (d) => {
167
+ d.repeat && ze(i) || l(d) && r(d);
168
+ }, s);
169
+ }
170
+ function qt() {
171
+ const e = g(!1);
172
+ return tt() && ee(() => {
173
+ e.value = !0;
174
+ }), e;
175
+ }
176
+ function De(e) {
177
+ const t = qt();
178
+ return m(() => (t.value, !!e()));
179
+ }
180
+ function Ue(e, t = {}) {
181
+ const { window: r = fe } = t, n = De(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
182
+ let a;
183
+ const o = g(!1), s = (u) => {
184
+ o.value = u.matches;
185
+ }, i = () => {
186
+ a && ("removeEventListener" in a ? a.removeEventListener("change", s) : a.removeListener(s));
187
+ }, l = F(() => {
188
+ n.value && (i(), a = r.matchMedia(ze(e)), "addEventListener" in a ? a.addEventListener("change", s) : a.addListener(s), o.value = a.matches);
189
+ });
190
+ return ke(() => {
191
+ l(), i(), a = void 0;
192
+ }), o;
193
+ }
194
+ function Xt(e, t, r = {}) {
195
+ const { window: n = fe, ...a } = r;
196
+ let o;
197
+ const s = De(() => n && "MutationObserver" in n), i = () => {
198
+ o && (o.disconnect(), o = void 0);
199
+ }, l = de(
200
+ () => re(e),
201
+ (f) => {
202
+ i(), s.value && n && f && (o = new MutationObserver(t), o.observe(f, a));
203
+ },
204
+ { immediate: !0 }
205
+ ), u = () => o == null ? void 0 : o.takeRecords(), d = () => {
206
+ i(), l();
207
+ };
208
+ return ke(d), {
209
+ isSupported: s,
210
+ stop: d,
211
+ takeRecords: u
212
+ };
213
+ }
214
+ function Yt(e, t = {}) {
215
+ const r = g(!1), n = St(null);
216
+ let a = 0, o = !0;
217
+ if (Q) {
218
+ const s = typeof t == "function" ? { onDrop: t } : t, i = (l) => {
219
+ var u, d;
220
+ const f = Array.from((d = (u = l.dataTransfer) == null ? void 0 : u.files) != null ? d : []);
221
+ return n.value = f.length === 0 ? null : f;
222
+ };
223
+ N(e, "dragenter", (l) => {
224
+ var u, d;
225
+ const f = Array.from(((u = l == null ? void 0 : l.dataTransfer) == null ? void 0 : u.items) || []).map((v) => v.kind === "file" ? v.type : null).filter(It);
226
+ if (s.dataTypes && l.dataTransfer) {
227
+ const v = c(s.dataTypes);
228
+ if (o = typeof v == "function" ? v(f) : v ? v.some((S) => f.includes(S)) : !0, !o)
229
+ return;
230
+ }
231
+ l.preventDefault(), a += 1, r.value = !0, (d = s.onEnter) == null || d.call(s, i(l), l);
232
+ }), N(e, "dragover", (l) => {
233
+ var u;
234
+ o && (l.preventDefault(), (u = s.onOver) == null || u.call(s, i(l), l));
235
+ }), N(e, "dragleave", (l) => {
236
+ var u;
237
+ o && (l.preventDefault(), a -= 1, a === 0 && (r.value = !1), (u = s.onLeave) == null || u.call(s, i(l), l));
238
+ }), N(e, "drop", (l) => {
239
+ var u;
240
+ l.preventDefault(), a = 0, r.value = !1, (u = s.onDrop) == null || u.call(s, i(l), l);
241
+ });
242
+ }
243
+ return {
244
+ files: n,
245
+ isOverDropZone: r
246
+ };
247
+ }
248
+ function Zt(e, t, r = {}) {
249
+ const { window: n = fe, ...a } = r;
250
+ let o;
251
+ const s = De(() => n && "ResizeObserver" in n), i = () => {
252
+ o && (o.disconnect(), o = void 0);
253
+ }, l = m(() => Array.isArray(e) ? e.map((f) => re(f)) : [re(e)]), u = de(
254
+ l,
255
+ (f) => {
256
+ if (i(), s.value && n) {
257
+ o = new ResizeObserver(t);
258
+ for (const v of f)
259
+ v && o.observe(v, a);
260
+ }
261
+ },
262
+ { immediate: !0, flush: "post", deep: !0 }
263
+ ), d = () => {
264
+ i(), u();
265
+ };
266
+ return ke(d), {
267
+ isSupported: s,
268
+ stop: d
269
+ };
270
+ }
271
+ function Kt(e, t = {}) {
272
+ const {
273
+ reset: r = !0,
274
+ windowResize: n = !0,
275
+ windowScroll: a = !0,
276
+ immediate: o = !0
277
+ } = t, s = g(0), i = g(0), l = g(0), u = g(0), d = g(0), f = g(0), v = g(0), S = g(0);
278
+ function A() {
279
+ const z = re(e);
280
+ if (!z) {
281
+ r && (s.value = 0, i.value = 0, l.value = 0, u.value = 0, d.value = 0, f.value = 0, v.value = 0, S.value = 0);
282
+ return;
283
+ }
284
+ const E = z.getBoundingClientRect();
285
+ s.value = E.height, i.value = E.bottom, l.value = E.left, u.value = E.right, d.value = E.top, f.value = E.width, v.value = E.x, S.value = E.y;
286
+ }
287
+ return Zt(e, A), de(() => re(e), (z) => !z && A()), Xt(e, A, {
288
+ attributeFilter: ["style", "class"]
289
+ }), a && N("scroll", A, { capture: !0, passive: !0 }), n && N("resize", A, { passive: !0 }), jt(() => {
290
+ o && A();
291
+ }), {
292
+ height: s,
293
+ bottom: i,
294
+ left: l,
295
+ right: u,
296
+ top: d,
297
+ width: f,
298
+ x: v,
299
+ y: S,
300
+ update: A
301
+ };
302
+ }
303
+ function Qt(e, t = {}) {
304
+ const {
305
+ delayEnter: r = 0,
306
+ delayLeave: n = 0,
307
+ window: a = fe
308
+ } = t, o = g(!1);
309
+ let s;
310
+ const i = (l) => {
311
+ const u = l ? r : n;
312
+ s && (clearTimeout(s), s = void 0), u ? s = setTimeout(() => o.value = l, u) : o.value = l;
313
+ };
314
+ return a && (N(e, "mouseenter", () => i(!0), { passive: !0 }), N(e, "mouseleave", () => i(!1), { passive: !0 })), o;
315
+ }
316
+ const Jt = {
317
+ multiple: !0,
318
+ accept: "*",
319
+ reset: !1,
320
+ directory: !1
321
+ };
322
+ function er(e = {}) {
323
+ const {
324
+ document: t = Ut
325
+ } = e, r = g(null), { on: n, trigger: a } = Pt();
326
+ let o;
327
+ t && (o = t.createElement("input"), o.type = "file", o.onchange = (l) => {
328
+ const u = l.target;
329
+ r.value = u.files, a(r.value);
330
+ });
331
+ const s = () => {
332
+ r.value = null, o && (o.value = "", a(null));
333
+ }, i = (l) => {
334
+ if (!o)
335
+ return;
336
+ const u = {
337
+ ...Jt,
338
+ ...e,
339
+ ...l
340
+ };
341
+ o.multiple = u.multiple, o.accept = u.accept, o.webkitdirectory = u.directory, Lt(u, "capture") && (o.capture = u.capture), u.reset && s(), o.click();
342
+ };
343
+ return {
344
+ files: Mt(r),
345
+ open: i,
346
+ reset: s,
347
+ onChange: n
348
+ };
349
+ }
350
+ function tr(e, t = {}) {
351
+ const { initialValue: r = !1, focusVisible: n = !1 } = t, a = g(!1), o = m(() => re(e));
352
+ N(o, "focus", (i) => {
353
+ var l, u;
354
+ (!n || (u = (l = i.target).matches) != null && u.call(l, ":focus-visible")) && (a.value = !0);
355
+ }), N(o, "blur", () => a.value = !1);
356
+ const s = m({
357
+ get: () => a.value,
358
+ set(i) {
359
+ var l, u;
360
+ !i && a.value ? (l = o.value) == null || l.blur() : i && !a.value && ((u = o.value) == null || u.focus());
361
+ }
362
+ });
363
+ return de(
364
+ o,
365
+ () => {
366
+ s.value = r;
367
+ },
368
+ { immediate: !0, flush: "post" }
369
+ ), { focused: s };
370
+ }
371
+ function rr(e) {
372
+ const t = Ue("(prefers-color-scheme: light)", e), r = Ue("(prefers-color-scheme: dark)", e);
373
+ return m(() => r.value ? "dark" : t.value ? "light" : "no-preference");
374
+ }
375
+ const at = /* @__PURE__ */ x({
376
+ __name: "Btn",
377
+ props: {
378
+ type: { default: "button" },
379
+ size: { default: "md" },
380
+ is: { default: "button" },
381
+ icon: { type: Boolean, default: !1 },
382
+ pressEffect: { default: "translate" },
383
+ variant: {},
384
+ hoverVariant: {},
385
+ color: {},
386
+ animate: { type: Boolean },
387
+ rounded: { default: "md" },
388
+ disabled: { type: Boolean, default: !1 }
389
+ },
390
+ setup(e) {
391
+ const t = e, r = G(t), n = m(() => {
392
+ switch (t.size) {
393
+ case "sm":
394
+ return {
395
+ normalContent: "min-w-16 h-6 px-2 py-1 text-xs",
396
+ iconContent: "h-6 w-6 p-1"
397
+ };
398
+ case "md":
399
+ return {
400
+ normalContent: "min-w-20 h-8 px-3 py-1 text-sm",
401
+ iconContent: "h-8 w-8 p-2"
402
+ };
403
+ case "lg":
404
+ return {
405
+ normalContent: "min-w-24 h-10 px-4 py-2 text-base",
406
+ iconContent: "h-10 w-10 p-3"
407
+ };
408
+ }
409
+ }), a = g(null), o = Qt(a), s = m(() => t.hoverVariant && o.value ? t.hoverVariant : t.variant), i = m(() => {
410
+ switch (s.value) {
411
+ case "filled":
412
+ switch (t.color) {
413
+ case "secondary":
414
+ return "btn-filled-secondary";
415
+ case "tertiary":
416
+ return "btn-filled-tertiary";
417
+ case "error":
418
+ return "btn-filled-error";
419
+ default:
420
+ return "btn-filled-primary";
421
+ }
422
+ case "ghost":
423
+ case "light":
424
+ switch (t.color) {
425
+ case "secondary":
426
+ return "btn-light-secondary";
427
+ case "tertiary":
428
+ return "btn-light-tertiary";
429
+ case "error":
430
+ return "btn-light-error";
431
+ default:
432
+ return "btn-light-primary";
433
+ }
434
+ case "constrast":
435
+ switch (t.color) {
436
+ case "secondary":
437
+ return "btn-constrast-secondary";
438
+ case "tertiary":
439
+ return "btn-constrast-tertiary";
440
+ case "error":
441
+ return "btn-constrast-error";
442
+ default:
443
+ return "btn-constrast-primary";
444
+ }
445
+ case "outline":
446
+ switch (t.color) {
447
+ case "secondary":
448
+ return "btn-outline-secondary";
449
+ case "tertiary":
450
+ return "btn-outline-tertiary";
451
+ case "error":
452
+ return "btn-outline-error";
453
+ default:
454
+ return "btn-outline-primary";
455
+ }
456
+ case "subtle":
457
+ switch (t.color) {
458
+ case "secondary":
459
+ return "btn-subtle-secondary";
460
+ case "tertiary":
461
+ return "btn-subtle-tertiary";
462
+ case "error":
463
+ return "btn-subtle-error";
464
+ default:
465
+ return "btn-subtle-primary";
466
+ }
467
+ case "transparent":
468
+ switch (t.color) {
469
+ case "secondary":
470
+ return "btn-transparent-secondary";
471
+ case "tertiary":
472
+ return "btn-transparent-tertiary";
473
+ case "error":
474
+ return "btn-transparent-error";
475
+ default:
476
+ return "btn-transparent-primary";
477
+ }
478
+ default:
479
+ return "btn-default";
480
+ }
481
+ });
482
+ return (l, u) => (h(), P(ue(l.is), xe({
483
+ ref_key: "btn",
484
+ ref: a,
485
+ "data-size": l.size,
486
+ type: l.type,
487
+ class: ["flex items-center justify-center gap-1 decoration-none", [
488
+ c(i),
489
+ c(r).class,
490
+ l.icon ? c(n).iconContent : c(n).normalContent,
491
+ {
492
+ "filter-grayscale pointer-events-none": l.disabled,
493
+ "active:translate-y-0.25": l.pressEffect === "translate",
494
+ "active:scale-98": l.pressEffect === "scale",
495
+ "transition-all": l.animate
496
+ }
497
+ ]],
498
+ style: [
499
+ c(r).style
500
+ ],
501
+ disabled: l.disabled
502
+ }, l.$attrs), {
503
+ default: W(() => [
504
+ l.$slots.leftSection ? k(l.$slots, "leftSection", { key: 0 }) : T("", !0),
505
+ k(l.$slots, "default"),
506
+ l.$slots.rightSection ? k(l.$slots, "rightSection", { key: 1 }) : T("", !0)
507
+ ]),
508
+ _: 3
509
+ }, 16, ["data-size", "type", "style", "class", "disabled"]));
510
+ }
511
+ }), nr = (e, t) => {
512
+ const r = e.__vccOpts || e;
513
+ for (const [n, a] of t)
514
+ r[n] = a;
515
+ return r;
516
+ }, or = {}, ar = { class: "flex flex-col gap-4 container" };
517
+ function sr(e, t) {
518
+ return h(), b("div", ar, [
519
+ k(e.$slots, "default")
520
+ ]);
521
+ }
522
+ const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
523
+ __name: "ChatMessage",
524
+ props: {
525
+ avatar: {},
526
+ position: { default: "left" },
527
+ color: {},
528
+ variant: { default: "default" },
529
+ withBorder: { type: Boolean, default: !1 }
530
+ },
531
+ setup(e) {
532
+ const t = e, r = m(() => {
533
+ switch (t.variant) {
534
+ case "default":
535
+ return "bg-surface-base";
536
+ case "filled":
537
+ switch (t.color) {
538
+ case "secondary":
539
+ return "bg-secondary-container text-secondary-on";
540
+ case "tertiary":
541
+ return "bg-tertiary-container text-tertiary-on";
542
+ case "error":
543
+ return "bg-error-container text-error-on";
544
+ default:
545
+ return "bg-primary-container text-primary-on";
546
+ }
547
+ case "transparent":
548
+ return "bg-transparent";
549
+ }
550
+ });
551
+ return (n, a) => {
552
+ const o = Ht;
553
+ return h(), b("div", {
554
+ class: y(["flex gap-2", [
555
+ {
556
+ "flex-row-reverse": n.position === "right",
557
+ "flex-row": n.position === "left"
558
+ }
559
+ ]])
560
+ }, [
561
+ n.$slots.avatar ? k(n.$slots, "avatar", { key: 0 }) : n.avatar ? (h(), P(o, {
562
+ key: 1,
563
+ src: n.avatar
564
+ }, null, 8, ["src"])) : T("", !0),
565
+ w("div", {
566
+ class: y(["rounded-xl px-3 py-2 transition-background-color,border-color", [
567
+ {
568
+ "rounded-tr": n.position === "right",
569
+ "rounded-tl": n.position === "left",
570
+ border: n.withBorder
571
+ },
572
+ c(r)
573
+ ]])
574
+ }, [
575
+ k(n.$slots, "default")
576
+ ], 2)
577
+ ], 2);
578
+ };
579
+ }
580
+ }), lr = { class: "w-full flex self-center gap-2 text-center" }, Fn = /* @__PURE__ */ x({
581
+ __name: "ChatSystem",
582
+ props: {
583
+ position: {},
584
+ color: {},
585
+ variant: { default: "default" },
586
+ withBorder: { type: Boolean, default: !1 }
587
+ },
588
+ setup(e) {
589
+ const t = e, r = m(() => {
590
+ switch (t.variant) {
591
+ case "default":
592
+ return "bg-surface-base";
593
+ case "fill":
594
+ switch (t.color) {
595
+ case "secondary":
596
+ return "bg-secondary-container text-secondary-on";
597
+ case "tertiary":
598
+ return "bg-tertiary-container text-tertiary-on";
599
+ case "error":
600
+ return "bg-error-container text-error-on";
601
+ default:
602
+ return "bg-primary-container text-primary-on";
603
+ }
604
+ case "transparent":
605
+ return "bg-transparent";
606
+ }
607
+ });
608
+ return (n, a) => (h(), b("div", lr, [
609
+ w("div", {
610
+ class: y(["w-full rounded-xl px-3 py-2 transition-background-color,border-color", [
611
+ c(r)
612
+ ]])
613
+ }, [
614
+ k(n.$slots, "default")
615
+ ], 2)
616
+ ]));
617
+ }
618
+ }), Ln = /* @__PURE__ */ x({
619
+ __name: "Chip",
620
+ props: /* @__PURE__ */ j({
621
+ is: { default: "img" },
622
+ src: {},
623
+ size: { default: "md" },
624
+ style: {},
625
+ class: {},
626
+ rounded: { default: "full" }
627
+ }, {
628
+ modelValue: { type: Boolean, default: void 0 },
629
+ modelModifiers: {}
630
+ }),
631
+ emits: ["update:modelValue"],
632
+ setup(e) {
633
+ const t = e, r = U(e, "modelValue"), n = G(t), a = m(() => {
634
+ switch (t.size) {
635
+ case "sm":
636
+ return "px-3 text-sm h-6";
637
+ case "md":
638
+ return "px-6 h-8 text-base";
639
+ case "lg":
640
+ return "px-8 h-10 text-lg";
641
+ }
642
+ }), o = m(() => r.value ? "container-filled-primary border-transparent" : "container-base"), s = m(() => r.value !== void 0), i = m(() => s.value ? "cursor-pointer" : "");
643
+ return (l, u) => (h(), b("span", {
644
+ class: y(["inline-flex items-center gap-1", [c(n).class, c(a), c(o), c(i)]]),
645
+ style: C([c(n).style]),
646
+ onPointerup: u[0] || (u[0] = (d) => c(s) && (r.value = !r.value))
647
+ }, [
648
+ l.$slots.leftSection ? k(l.$slots, "leftSection", { key: 0 }) : T("", !0),
649
+ k(l.$slots, "default"),
650
+ l.$slots.rightSection ? k(l.$slots, "rightSection", { key: 1 }) : T("", !0)
651
+ ], 38));
652
+ }
653
+ }), ir = /* @__PURE__ */ x({
654
+ __name: "ColorSwatch",
655
+ props: {
656
+ color: {},
657
+ is: { default: "div" },
658
+ withBorder: { type: Boolean, default: !1 }
659
+ },
660
+ setup(e) {
661
+ return (t, r) => (h(), P(ue(t.is), {
662
+ class: y(["h-6 w-6 border rounded-full", [{
663
+ "border border-surface-border-base": t.withBorder,
664
+ "border border-transparent": !t.withBorder
665
+ }]]),
666
+ style: C({
667
+ backgroundColor: t.color
668
+ })
669
+ }, null, 8, ["class", "style"]));
670
+ }
671
+ });
672
+ function $e(e) {
673
+ "@babel/helpers - typeof";
674
+ return $e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
675
+ return typeof t;
676
+ } : function(t) {
677
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
678
+ }, $e(e);
679
+ }
680
+ var cr = /^\s+/, ur = /\s+$/;
681
+ function p(e, t) {
682
+ if (e = e || "", t = t || {}, e instanceof p)
683
+ return e;
684
+ if (!(this instanceof p))
685
+ return new p(e, t);
686
+ var r = dr(e);
687
+ this._originalInput = e, this._r = r.r, this._g = r.g, this._b = r.b, this._a = r.a, this._roundA = Math.round(100 * this._a) / 100, this._format = t.format || r.format, this._gradientType = t.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = r.ok;
688
+ }
689
+ p.prototype = {
690
+ isDark: function() {
691
+ return this.getBrightness() < 128;
692
+ },
693
+ isLight: function() {
694
+ return !this.isDark();
695
+ },
696
+ isValid: function() {
697
+ return this._ok;
698
+ },
699
+ getOriginalInput: function() {
700
+ return this._originalInput;
701
+ },
702
+ getFormat: function() {
703
+ return this._format;
704
+ },
705
+ getAlpha: function() {
706
+ return this._a;
707
+ },
708
+ getBrightness: function() {
709
+ var t = this.toRgb();
710
+ return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
711
+ },
712
+ getLuminance: function() {
713
+ var t = this.toRgb(), r, n, a, o, s, i;
714
+ return r = t.r / 255, n = t.g / 255, a = t.b / 255, r <= 0.03928 ? o = r / 12.92 : o = Math.pow((r + 0.055) / 1.055, 2.4), n <= 0.03928 ? s = n / 12.92 : s = Math.pow((n + 0.055) / 1.055, 2.4), a <= 0.03928 ? i = a / 12.92 : i = Math.pow((a + 0.055) / 1.055, 2.4), 0.2126 * o + 0.7152 * s + 0.0722 * i;
715
+ },
716
+ setAlpha: function(t) {
717
+ return this._a = st(t), this._roundA = Math.round(100 * this._a) / 100, this;
718
+ },
719
+ toHsv: function() {
720
+ var t = qe(this._r, this._g, this._b);
721
+ return {
722
+ h: t.h * 360,
723
+ s: t.s,
724
+ v: t.v,
725
+ a: this._a
726
+ };
727
+ },
728
+ toHsvString: function() {
729
+ var t = qe(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), a = Math.round(t.v * 100);
730
+ return this._a == 1 ? "hsv(" + r + ", " + n + "%, " + a + "%)" : "hsva(" + r + ", " + n + "%, " + a + "%, " + this._roundA + ")";
731
+ },
732
+ toHsl: function() {
733
+ var t = Ge(this._r, this._g, this._b);
734
+ return {
735
+ h: t.h * 360,
736
+ s: t.s,
737
+ l: t.l,
738
+ a: this._a
739
+ };
740
+ },
741
+ toHslString: function() {
742
+ var t = Ge(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), a = Math.round(t.l * 100);
743
+ return this._a == 1 ? "hsl(" + r + ", " + n + "%, " + a + "%)" : "hsla(" + r + ", " + n + "%, " + a + "%, " + this._roundA + ")";
744
+ },
745
+ toHex: function(t) {
746
+ return Xe(this._r, this._g, this._b, t);
747
+ },
748
+ toHexString: function(t) {
749
+ return "#" + this.toHex(t);
750
+ },
751
+ toHex8: function(t) {
752
+ return mr(this._r, this._g, this._b, this._a, t);
753
+ },
754
+ toHex8String: function(t) {
755
+ return "#" + this.toHex8(t);
756
+ },
757
+ toRgb: function() {
758
+ return {
759
+ r: Math.round(this._r),
760
+ g: Math.round(this._g),
761
+ b: Math.round(this._b),
762
+ a: this._a
763
+ };
764
+ },
765
+ toRgbString: function() {
766
+ return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
767
+ },
768
+ toPercentageRgb: function() {
769
+ return {
770
+ r: Math.round(M(this._r, 255) * 100) + "%",
771
+ g: Math.round(M(this._g, 255) * 100) + "%",
772
+ b: Math.round(M(this._b, 255) * 100) + "%",
773
+ a: this._a
774
+ };
775
+ },
776
+ toPercentageRgbString: function() {
777
+ return this._a == 1 ? "rgb(" + Math.round(M(this._r, 255) * 100) + "%, " + Math.round(M(this._g, 255) * 100) + "%, " + Math.round(M(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(M(this._r, 255) * 100) + "%, " + Math.round(M(this._g, 255) * 100) + "%, " + Math.round(M(this._b, 255) * 100) + "%, " + this._roundA + ")";
778
+ },
779
+ toName: function() {
780
+ return this._a === 0 ? "transparent" : this._a < 1 ? !1 : Cr[Xe(this._r, this._g, this._b, !0)] || !1;
781
+ },
782
+ toFilter: function(t) {
783
+ var r = "#" + Ye(this._r, this._g, this._b, this._a), n = r, a = this._gradientType ? "GradientType = 1, " : "";
784
+ if (t) {
785
+ var o = p(t);
786
+ n = "#" + Ye(o._r, o._g, o._b, o._a);
787
+ }
788
+ return "progid:DXImageTransform.Microsoft.gradient(" + a + "startColorstr=" + r + ",endColorstr=" + n + ")";
789
+ },
790
+ toString: function(t) {
791
+ var r = !!t;
792
+ t = t || this._format;
793
+ var n = !1, a = this._a < 1 && this._a >= 0, o = !r && a && (t === "hex" || t === "hex6" || t === "hex3" || t === "hex4" || t === "hex8" || t === "name");
794
+ return o ? t === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (n = this.toRgbString()), t === "prgb" && (n = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (n = this.toHexString()), t === "hex3" && (n = this.toHexString(!0)), t === "hex4" && (n = this.toHex8String(!0)), t === "hex8" && (n = this.toHex8String()), t === "name" && (n = this.toName()), t === "hsl" && (n = this.toHslString()), t === "hsv" && (n = this.toHsvString()), n || this.toHexString());
795
+ },
796
+ clone: function() {
797
+ return p(this.toString());
798
+ },
799
+ _applyModification: function(t, r) {
800
+ var n = t.apply(null, [this].concat([].slice.call(r)));
801
+ return this._r = n._r, this._g = n._g, this._b = n._b, this.setAlpha(n._a), this;
802
+ },
803
+ lighten: function() {
804
+ return this._applyModification(yr, arguments);
805
+ },
806
+ brighten: function() {
807
+ return this._applyModification(wr, arguments);
808
+ },
809
+ darken: function() {
810
+ return this._applyModification(_r, arguments);
811
+ },
812
+ desaturate: function() {
813
+ return this._applyModification(vr, arguments);
814
+ },
815
+ saturate: function() {
816
+ return this._applyModification(br, arguments);
817
+ },
818
+ greyscale: function() {
819
+ return this._applyModification(gr, arguments);
820
+ },
821
+ spin: function() {
822
+ return this._applyModification(xr, arguments);
823
+ },
824
+ _applyCombination: function(t, r) {
825
+ return t.apply(null, [this].concat([].slice.call(r)));
826
+ },
827
+ analogous: function() {
828
+ return this._applyCombination(Mr, arguments);
829
+ },
830
+ complement: function() {
831
+ return this._applyCombination(kr, arguments);
832
+ },
833
+ monochromatic: function() {
834
+ return this._applyCombination($r, arguments);
835
+ },
836
+ splitcomplement: function() {
837
+ return this._applyCombination(Sr, arguments);
838
+ },
839
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
840
+ // polyad: function (number) {
841
+ // return this._applyCombination(polyad, [number]);
842
+ // },
843
+ triad: function() {
844
+ return this._applyCombination(Ze, [3]);
845
+ },
846
+ tetrad: function() {
847
+ return this._applyCombination(Ze, [4]);
848
+ }
849
+ };
850
+ p.fromRatio = function(e, t) {
851
+ if ($e(e) == "object") {
852
+ var r = {};
853
+ for (var n in e)
854
+ e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] = me(e[n]));
855
+ e = r;
856
+ }
857
+ return p(e, t);
858
+ };
859
+ function dr(e) {
860
+ var t = {
861
+ r: 0,
862
+ g: 0,
863
+ b: 0
864
+ }, r = 1, n = null, a = null, o = null, s = !1, i = !1;
865
+ return typeof e == "string" && (e = Er(e)), $e(e) == "object" && (q(e.r) && q(e.g) && q(e.b) ? (t = fr(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : q(e.h) && q(e.s) && q(e.v) ? (n = me(e.s), a = me(e.v), t = pr(e.h, n, a), s = !0, i = "hsv") : q(e.h) && q(e.s) && q(e.l) && (n = me(e.s), o = me(e.l), t = hr(e.h, n, o), s = !0, i = "hsl"), e.hasOwnProperty("a") && (r = e.a)), r = st(r), {
866
+ ok: s,
867
+ format: e.format || i,
868
+ r: Math.min(255, Math.max(t.r, 0)),
869
+ g: Math.min(255, Math.max(t.g, 0)),
870
+ b: Math.min(255, Math.max(t.b, 0)),
871
+ a: r
872
+ };
873
+ }
874
+ function fr(e, t, r) {
875
+ return {
876
+ r: M(e, 255) * 255,
877
+ g: M(t, 255) * 255,
878
+ b: M(r, 255) * 255
879
+ };
880
+ }
881
+ function Ge(e, t, r) {
882
+ e = M(e, 255), t = M(t, 255), r = M(r, 255);
883
+ var n = Math.max(e, t, r), a = Math.min(e, t, r), o, s, i = (n + a) / 2;
884
+ if (n == a)
885
+ o = s = 0;
886
+ else {
887
+ var l = n - a;
888
+ switch (s = i > 0.5 ? l / (2 - n - a) : l / (n + a), n) {
889
+ case e:
890
+ o = (t - r) / l + (t < r ? 6 : 0);
891
+ break;
892
+ case t:
893
+ o = (r - e) / l + 2;
894
+ break;
895
+ case r:
896
+ o = (e - t) / l + 4;
897
+ break;
898
+ }
899
+ o /= 6;
900
+ }
901
+ return {
902
+ h: o,
903
+ s,
904
+ l: i
905
+ };
906
+ }
907
+ function hr(e, t, r) {
908
+ var n, a, o;
909
+ e = M(e, 360), t = M(t, 100), r = M(r, 100);
910
+ function s(u, d, f) {
911
+ return f < 0 && (f += 1), f > 1 && (f -= 1), f < 1 / 6 ? u + (d - u) * 6 * f : f < 1 / 2 ? d : f < 2 / 3 ? u + (d - u) * (2 / 3 - f) * 6 : u;
912
+ }
913
+ if (t === 0)
914
+ n = a = o = r;
915
+ else {
916
+ var i = r < 0.5 ? r * (1 + t) : r + t - r * t, l = 2 * r - i;
917
+ n = s(l, i, e + 1 / 3), a = s(l, i, e), o = s(l, i, e - 1 / 3);
918
+ }
919
+ return {
920
+ r: n * 255,
921
+ g: a * 255,
922
+ b: o * 255
923
+ };
924
+ }
925
+ function qe(e, t, r) {
926
+ e = M(e, 255), t = M(t, 255), r = M(r, 255);
927
+ var n = Math.max(e, t, r), a = Math.min(e, t, r), o, s, i = n, l = n - a;
928
+ if (s = n === 0 ? 0 : l / n, n == a)
929
+ o = 0;
930
+ else {
931
+ switch (n) {
932
+ case e:
933
+ o = (t - r) / l + (t < r ? 6 : 0);
934
+ break;
935
+ case t:
936
+ o = (r - e) / l + 2;
937
+ break;
938
+ case r:
939
+ o = (e - t) / l + 4;
940
+ break;
941
+ }
942
+ o /= 6;
943
+ }
944
+ return {
945
+ h: o,
946
+ s,
947
+ v: i
948
+ };
949
+ }
950
+ function pr(e, t, r) {
951
+ e = M(e, 360) * 6, t = M(t, 100), r = M(r, 100);
952
+ var n = Math.floor(e), a = e - n, o = r * (1 - t), s = r * (1 - a * t), i = r * (1 - (1 - a) * t), l = n % 6, u = [r, s, o, o, i, r][l], d = [i, r, r, s, o, o][l], f = [o, o, i, r, r, s][l];
953
+ return {
954
+ r: u * 255,
955
+ g: d * 255,
956
+ b: f * 255
957
+ };
958
+ }
959
+ function Xe(e, t, r, n) {
960
+ var a = [D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16))];
961
+ return n && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join("");
962
+ }
963
+ function mr(e, t, r, n, a) {
964
+ var o = [D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16)), D(lt(n))];
965
+ return a && o[0].charAt(0) == o[0].charAt(1) && o[1].charAt(0) == o[1].charAt(1) && o[2].charAt(0) == o[2].charAt(1) && o[3].charAt(0) == o[3].charAt(1) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join("");
966
+ }
967
+ function Ye(e, t, r, n) {
968
+ var a = [D(lt(n)), D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16))];
969
+ return a.join("");
970
+ }
971
+ p.equals = function(e, t) {
972
+ return !e || !t ? !1 : p(e).toRgbString() == p(t).toRgbString();
973
+ };
974
+ p.random = function() {
975
+ return p.fromRatio({
976
+ r: Math.random(),
977
+ g: Math.random(),
978
+ b: Math.random()
979
+ });
980
+ };
981
+ function vr(e, t) {
982
+ t = t === 0 ? 0 : t || 10;
983
+ var r = p(e).toHsl();
984
+ return r.s -= t / 100, r.s = Ee(r.s), p(r);
985
+ }
986
+ function br(e, t) {
987
+ t = t === 0 ? 0 : t || 10;
988
+ var r = p(e).toHsl();
989
+ return r.s += t / 100, r.s = Ee(r.s), p(r);
990
+ }
991
+ function gr(e) {
992
+ return p(e).desaturate(100);
993
+ }
994
+ function yr(e, t) {
995
+ t = t === 0 ? 0 : t || 10;
996
+ var r = p(e).toHsl();
997
+ return r.l += t / 100, r.l = Ee(r.l), p(r);
998
+ }
999
+ function wr(e, t) {
1000
+ t = t === 0 ? 0 : t || 10;
1001
+ var r = p(e).toRgb();
1002
+ return r.r = Math.max(0, Math.min(255, r.r - Math.round(255 * -(t / 100)))), r.g = Math.max(0, Math.min(255, r.g - Math.round(255 * -(t / 100)))), r.b = Math.max(0, Math.min(255, r.b - Math.round(255 * -(t / 100)))), p(r);
1003
+ }
1004
+ function _r(e, t) {
1005
+ t = t === 0 ? 0 : t || 10;
1006
+ var r = p(e).toHsl();
1007
+ return r.l -= t / 100, r.l = Ee(r.l), p(r);
1008
+ }
1009
+ function xr(e, t) {
1010
+ var r = p(e).toHsl(), n = (r.h + t) % 360;
1011
+ return r.h = n < 0 ? 360 + n : n, p(r);
1012
+ }
1013
+ function kr(e) {
1014
+ var t = p(e).toHsl();
1015
+ return t.h = (t.h + 180) % 360, p(t);
1016
+ }
1017
+ function Ze(e, t) {
1018
+ if (isNaN(t) || t <= 0)
1019
+ throw new Error("Argument to polyad must be a positive number");
1020
+ for (var r = p(e).toHsl(), n = [p(e)], a = 360 / t, o = 1; o < t; o++)
1021
+ n.push(p({
1022
+ h: (r.h + o * a) % 360,
1023
+ s: r.s,
1024
+ l: r.l
1025
+ }));
1026
+ return n;
1027
+ }
1028
+ function Sr(e) {
1029
+ var t = p(e).toHsl(), r = t.h;
1030
+ return [p(e), p({
1031
+ h: (r + 72) % 360,
1032
+ s: t.s,
1033
+ l: t.l
1034
+ }), p({
1035
+ h: (r + 216) % 360,
1036
+ s: t.s,
1037
+ l: t.l
1038
+ })];
1039
+ }
1040
+ function Mr(e, t, r) {
1041
+ t = t || 6, r = r || 30;
1042
+ var n = p(e).toHsl(), a = 360 / r, o = [p(e)];
1043
+ for (n.h = (n.h - (a * t >> 1) + 720) % 360; --t; )
1044
+ n.h = (n.h + a) % 360, o.push(p(n));
1045
+ return o;
1046
+ }
1047
+ function $r(e, t) {
1048
+ t = t || 6;
1049
+ for (var r = p(e).toHsv(), n = r.h, a = r.s, o = r.v, s = [], i = 1 / t; t--; )
1050
+ s.push(p({
1051
+ h: n,
1052
+ s: a,
1053
+ v: o
1054
+ })), o = (o + i) % 1;
1055
+ return s;
1056
+ }
1057
+ p.mix = function(e, t, r) {
1058
+ r = r === 0 ? 0 : r || 50;
1059
+ var n = p(e).toRgb(), a = p(t).toRgb(), o = r / 100, s = {
1060
+ r: (a.r - n.r) * o + n.r,
1061
+ g: (a.g - n.g) * o + n.g,
1062
+ b: (a.b - n.b) * o + n.b,
1063
+ a: (a.a - n.a) * o + n.a
1064
+ };
1065
+ return p(s);
1066
+ };
1067
+ p.readability = function(e, t) {
1068
+ var r = p(e), n = p(t);
1069
+ return (Math.max(r.getLuminance(), n.getLuminance()) + 0.05) / (Math.min(r.getLuminance(), n.getLuminance()) + 0.05);
1070
+ };
1071
+ p.isReadable = function(e, t, r) {
1072
+ var n = p.readability(e, t), a, o;
1073
+ switch (o = !1, a = Rr(r), a.level + a.size) {
1074
+ case "AAsmall":
1075
+ case "AAAlarge":
1076
+ o = n >= 4.5;
1077
+ break;
1078
+ case "AAlarge":
1079
+ o = n >= 3;
1080
+ break;
1081
+ case "AAAsmall":
1082
+ o = n >= 7;
1083
+ break;
1084
+ }
1085
+ return o;
1086
+ };
1087
+ p.mostReadable = function(e, t, r) {
1088
+ var n = null, a = 0, o, s, i, l;
1089
+ r = r || {}, s = r.includeFallbackColors, i = r.level, l = r.size;
1090
+ for (var u = 0; u < t.length; u++)
1091
+ o = p.readability(e, t[u]), o > a && (a = o, n = p(t[u]));
1092
+ return p.isReadable(e, n, {
1093
+ level: i,
1094
+ size: l
1095
+ }) || !s ? n : (r.includeFallbackColors = !1, p.mostReadable(e, ["#fff", "#000"], r));
1096
+ };
1097
+ var He = p.names = {
1098
+ aliceblue: "f0f8ff",
1099
+ antiquewhite: "faebd7",
1100
+ aqua: "0ff",
1101
+ aquamarine: "7fffd4",
1102
+ azure: "f0ffff",
1103
+ beige: "f5f5dc",
1104
+ bisque: "ffe4c4",
1105
+ black: "000",
1106
+ blanchedalmond: "ffebcd",
1107
+ blue: "00f",
1108
+ blueviolet: "8a2be2",
1109
+ brown: "a52a2a",
1110
+ burlywood: "deb887",
1111
+ burntsienna: "ea7e5d",
1112
+ cadetblue: "5f9ea0",
1113
+ chartreuse: "7fff00",
1114
+ chocolate: "d2691e",
1115
+ coral: "ff7f50",
1116
+ cornflowerblue: "6495ed",
1117
+ cornsilk: "fff8dc",
1118
+ crimson: "dc143c",
1119
+ cyan: "0ff",
1120
+ darkblue: "00008b",
1121
+ darkcyan: "008b8b",
1122
+ darkgoldenrod: "b8860b",
1123
+ darkgray: "a9a9a9",
1124
+ darkgreen: "006400",
1125
+ darkgrey: "a9a9a9",
1126
+ darkkhaki: "bdb76b",
1127
+ darkmagenta: "8b008b",
1128
+ darkolivegreen: "556b2f",
1129
+ darkorange: "ff8c00",
1130
+ darkorchid: "9932cc",
1131
+ darkred: "8b0000",
1132
+ darksalmon: "e9967a",
1133
+ darkseagreen: "8fbc8f",
1134
+ darkslateblue: "483d8b",
1135
+ darkslategray: "2f4f4f",
1136
+ darkslategrey: "2f4f4f",
1137
+ darkturquoise: "00ced1",
1138
+ darkviolet: "9400d3",
1139
+ deeppink: "ff1493",
1140
+ deepskyblue: "00bfff",
1141
+ dimgray: "696969",
1142
+ dimgrey: "696969",
1143
+ dodgerblue: "1e90ff",
1144
+ firebrick: "b22222",
1145
+ floralwhite: "fffaf0",
1146
+ forestgreen: "228b22",
1147
+ fuchsia: "f0f",
1148
+ gainsboro: "dcdcdc",
1149
+ ghostwhite: "f8f8ff",
1150
+ gold: "ffd700",
1151
+ goldenrod: "daa520",
1152
+ gray: "808080",
1153
+ green: "008000",
1154
+ greenyellow: "adff2f",
1155
+ grey: "808080",
1156
+ honeydew: "f0fff0",
1157
+ hotpink: "ff69b4",
1158
+ indianred: "cd5c5c",
1159
+ indigo: "4b0082",
1160
+ ivory: "fffff0",
1161
+ khaki: "f0e68c",
1162
+ lavender: "e6e6fa",
1163
+ lavenderblush: "fff0f5",
1164
+ lawngreen: "7cfc00",
1165
+ lemonchiffon: "fffacd",
1166
+ lightblue: "add8e6",
1167
+ lightcoral: "f08080",
1168
+ lightcyan: "e0ffff",
1169
+ lightgoldenrodyellow: "fafad2",
1170
+ lightgray: "d3d3d3",
1171
+ lightgreen: "90ee90",
1172
+ lightgrey: "d3d3d3",
1173
+ lightpink: "ffb6c1",
1174
+ lightsalmon: "ffa07a",
1175
+ lightseagreen: "20b2aa",
1176
+ lightskyblue: "87cefa",
1177
+ lightslategray: "789",
1178
+ lightslategrey: "789",
1179
+ lightsteelblue: "b0c4de",
1180
+ lightyellow: "ffffe0",
1181
+ lime: "0f0",
1182
+ limegreen: "32cd32",
1183
+ linen: "faf0e6",
1184
+ magenta: "f0f",
1185
+ maroon: "800000",
1186
+ mediumaquamarine: "66cdaa",
1187
+ mediumblue: "0000cd",
1188
+ mediumorchid: "ba55d3",
1189
+ mediumpurple: "9370db",
1190
+ mediumseagreen: "3cb371",
1191
+ mediumslateblue: "7b68ee",
1192
+ mediumspringgreen: "00fa9a",
1193
+ mediumturquoise: "48d1cc",
1194
+ mediumvioletred: "c71585",
1195
+ midnightblue: "191970",
1196
+ mintcream: "f5fffa",
1197
+ mistyrose: "ffe4e1",
1198
+ moccasin: "ffe4b5",
1199
+ navajowhite: "ffdead",
1200
+ navy: "000080",
1201
+ oldlace: "fdf5e6",
1202
+ olive: "808000",
1203
+ olivedrab: "6b8e23",
1204
+ orange: "ffa500",
1205
+ orangered: "ff4500",
1206
+ orchid: "da70d6",
1207
+ palegoldenrod: "eee8aa",
1208
+ palegreen: "98fb98",
1209
+ paleturquoise: "afeeee",
1210
+ palevioletred: "db7093",
1211
+ papayawhip: "ffefd5",
1212
+ peachpuff: "ffdab9",
1213
+ peru: "cd853f",
1214
+ pink: "ffc0cb",
1215
+ plum: "dda0dd",
1216
+ powderblue: "b0e0e6",
1217
+ purple: "800080",
1218
+ rebeccapurple: "663399",
1219
+ red: "f00",
1220
+ rosybrown: "bc8f8f",
1221
+ royalblue: "4169e1",
1222
+ saddlebrown: "8b4513",
1223
+ salmon: "fa8072",
1224
+ sandybrown: "f4a460",
1225
+ seagreen: "2e8b57",
1226
+ seashell: "fff5ee",
1227
+ sienna: "a0522d",
1228
+ silver: "c0c0c0",
1229
+ skyblue: "87ceeb",
1230
+ slateblue: "6a5acd",
1231
+ slategray: "708090",
1232
+ slategrey: "708090",
1233
+ snow: "fffafa",
1234
+ springgreen: "00ff7f",
1235
+ steelblue: "4682b4",
1236
+ tan: "d2b48c",
1237
+ teal: "008080",
1238
+ thistle: "d8bfd8",
1239
+ tomato: "ff6347",
1240
+ turquoise: "40e0d0",
1241
+ violet: "ee82ee",
1242
+ wheat: "f5deb3",
1243
+ white: "fff",
1244
+ whitesmoke: "f5f5f5",
1245
+ yellow: "ff0",
1246
+ yellowgreen: "9acd32"
1247
+ }, Cr = p.hexNames = Ar(He);
1248
+ function Ar(e) {
1249
+ var t = {};
1250
+ for (var r in e)
1251
+ e.hasOwnProperty(r) && (t[e[r]] = r);
1252
+ return t;
1253
+ }
1254
+ function st(e) {
1255
+ return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
1256
+ }
1257
+ function M(e, t) {
1258
+ Tr(e) && (e = "100%");
1259
+ var r = zr(e);
1260
+ return e = Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(e * t, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / parseFloat(t);
1261
+ }
1262
+ function Ee(e) {
1263
+ return Math.min(1, Math.max(0, e));
1264
+ }
1265
+ function H(e) {
1266
+ return parseInt(e, 16);
1267
+ }
1268
+ function Tr(e) {
1269
+ return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
1270
+ }
1271
+ function zr(e) {
1272
+ return typeof e == "string" && e.indexOf("%") != -1;
1273
+ }
1274
+ function D(e) {
1275
+ return e.length == 1 ? "0" + e : "" + e;
1276
+ }
1277
+ function me(e) {
1278
+ return e <= 1 && (e = e * 100 + "%"), e;
1279
+ }
1280
+ function lt(e) {
1281
+ return Math.round(parseFloat(e) * 255).toString(16);
1282
+ }
1283
+ function Ke(e) {
1284
+ return H(e) / 255;
1285
+ }
1286
+ var V = function() {
1287
+ var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", r = "(?:" + t + ")|(?:" + e + ")", n = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?", a = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?";
1288
+ return {
1289
+ CSS_UNIT: new RegExp(r),
1290
+ rgb: new RegExp("rgb" + n),
1291
+ rgba: new RegExp("rgba" + a),
1292
+ hsl: new RegExp("hsl" + n),
1293
+ hsla: new RegExp("hsla" + a),
1294
+ hsv: new RegExp("hsv" + n),
1295
+ hsva: new RegExp("hsva" + a),
1296
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
1297
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
1298
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
1299
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
1300
+ };
1301
+ }();
1302
+ function q(e) {
1303
+ return !!V.CSS_UNIT.exec(e);
1304
+ }
1305
+ function Er(e) {
1306
+ e = e.replace(cr, "").replace(ur, "").toLowerCase();
1307
+ var t = !1;
1308
+ if (He[e])
1309
+ e = He[e], t = !0;
1310
+ else if (e == "transparent")
1311
+ return {
1312
+ r: 0,
1313
+ g: 0,
1314
+ b: 0,
1315
+ a: 0,
1316
+ format: "name"
1317
+ };
1318
+ var r;
1319
+ return (r = V.rgb.exec(e)) ? {
1320
+ r: r[1],
1321
+ g: r[2],
1322
+ b: r[3]
1323
+ } : (r = V.rgba.exec(e)) ? {
1324
+ r: r[1],
1325
+ g: r[2],
1326
+ b: r[3],
1327
+ a: r[4]
1328
+ } : (r = V.hsl.exec(e)) ? {
1329
+ h: r[1],
1330
+ s: r[2],
1331
+ l: r[3]
1332
+ } : (r = V.hsla.exec(e)) ? {
1333
+ h: r[1],
1334
+ s: r[2],
1335
+ l: r[3],
1336
+ a: r[4]
1337
+ } : (r = V.hsv.exec(e)) ? {
1338
+ h: r[1],
1339
+ s: r[2],
1340
+ v: r[3]
1341
+ } : (r = V.hsva.exec(e)) ? {
1342
+ h: r[1],
1343
+ s: r[2],
1344
+ v: r[3],
1345
+ a: r[4]
1346
+ } : (r = V.hex8.exec(e)) ? {
1347
+ r: H(r[1]),
1348
+ g: H(r[2]),
1349
+ b: H(r[3]),
1350
+ a: Ke(r[4]),
1351
+ format: t ? "name" : "hex8"
1352
+ } : (r = V.hex6.exec(e)) ? {
1353
+ r: H(r[1]),
1354
+ g: H(r[2]),
1355
+ b: H(r[3]),
1356
+ format: t ? "name" : "hex"
1357
+ } : (r = V.hex4.exec(e)) ? {
1358
+ r: H(r[1] + "" + r[1]),
1359
+ g: H(r[2] + "" + r[2]),
1360
+ b: H(r[3] + "" + r[3]),
1361
+ a: Ke(r[4] + "" + r[4]),
1362
+ format: t ? "name" : "hex8"
1363
+ } : (r = V.hex3.exec(e)) ? {
1364
+ r: H(r[1] + "" + r[1]),
1365
+ g: H(r[2] + "" + r[2]),
1366
+ b: H(r[3] + "" + r[3]),
1367
+ format: t ? "name" : "hex"
1368
+ } : !1;
1369
+ }
1370
+ function Rr(e) {
1371
+ var t, r;
1372
+ return e = e || {
1373
+ level: "AA",
1374
+ size: "small"
1375
+ }, t = (e.level || "AA").toUpperCase(), r = (e.size || "small").toLowerCase(), t !== "AA" && t !== "AAA" && (t = "AA"), r !== "small" && r !== "large" && (r = "small"), {
1376
+ level: t,
1377
+ size: r
1378
+ };
1379
+ }
1380
+ function Br() {
1381
+ if (!Q)
1382
+ return g("dark");
1383
+ const e = g(document.documentElement.dataset.scheme);
1384
+ return new MutationObserver((r) => {
1385
+ r.forEach((n) => {
1386
+ n.type === "attributes" && n.attributeName === "data-scheme" && (e.value = document.documentElement.dataset.scheme);
1387
+ });
1388
+ }).observe(document.documentElement, {
1389
+ attributes: !0,
1390
+ attributeFilter: ["data-scheme"]
1391
+ }), e;
1392
+ }
1393
+ function Wn() {
1394
+ return be("currentThemeScheme", null);
1395
+ }
1396
+ function Or() {
1397
+ return be("currentTheme", g(Ie));
1398
+ }
1399
+ function it(e, t = !0) {
1400
+ const r = g(e), n = g(e.scheme), a = Br();
1401
+ F(() => {
1402
+ a.value && (n.value = a.value);
1403
+ }), ge("currentTheme", r), ge("currentThemeScheme", n);
1404
+ const s = {
1405
+ ...Object.keys(r.value.colors).map((u) => {
1406
+ const d = u;
1407
+ return r.value.colors[d].reduce((v, S, A) => {
1408
+ const z = p(S).toRgb();
1409
+ return v[`--r-color-${d}-${A}`] = `${z.r} ${z.g} ${z.b}`, v;
1410
+ }, {});
1411
+ }).reduce((u, d) => ({
1412
+ ...u,
1413
+ ...d
1414
+ }), {})
1415
+ }, i = {
1416
+ "font-family": "'Roboto', sans-serif",
1417
+ "background-color": "rgb(var(--r-color-surface-lowest))",
1418
+ color: "rgb(var(--r-color-surface-on))"
1419
+ }, l = m(() => {
1420
+ if (t)
1421
+ return {};
1422
+ const { scheme: u } = e;
1423
+ switch (u) {
1424
+ case "dark":
1425
+ return {
1426
+ colorScheme: "dark",
1427
+ "--r-color-surface-on": "var(--r-color-surface-3)",
1428
+ "--r-color-surface-oninverted": "var(--r-color-surface-8)",
1429
+ "--r-color-surface-onlow": "var(--r-color-surface-4)",
1430
+ "--r-color-surface-onlowinverted": "var(--r-color-surface-7)",
1431
+ "--r-color-surface-lowest": "var(--r-color-surface-10)",
1432
+ "--r-color-surface-low": "var(--r-color-surface-9)",
1433
+ "--r-color-surface-base": "var(--r-color-surface-8)",
1434
+ "--r-color-surface-high": "var(--r-color-surface-7)",
1435
+ "--r-color-surface-highest": "var(--r-color-surface-6)",
1436
+ "--r-color-surface-border": "var(--r-color-surface-7)",
1437
+ "--r-color-primary-container": "var(--r-color-primary-8)",
1438
+ "--r-color-secondary-container": "var(--r-color-secondary-8)",
1439
+ "--r-color-tertiary-container": "var(--r-color-tertiary-8)",
1440
+ "--r-color-error-container": "var(--r-color-error-8)",
1441
+ "--r-color-primary-containerd": "var(--r-color-primary-9)",
1442
+ "--r-color-secondary-containerd": "var(--r-color-secondary-9)",
1443
+ "--r-color-tertiary-containerd": "var(--r-color-tertiary-9)",
1444
+ "--r-color-error-containerd": "var(--r-color-error-9)",
1445
+ "--r-color-primary-containerl": "var(--r-color-primary-6)",
1446
+ "--r-color-secondary-containerl": "var(--r-color-secondary-6)",
1447
+ "--r-color-tertiary-containerl": "var(--r-color-tertiary-6)",
1448
+ "--r-color-error-containerl": "var(--r-color-error-6)"
1449
+ };
1450
+ case "light":
1451
+ return {
1452
+ colorScheme: "light",
1453
+ "--r-color-surface-on": "var(--r-color-surface-7)",
1454
+ "--r-color-surface-oninverted": "var(--r-color-surface-2)",
1455
+ "--r-color-surface-onlow": "var(--r-color-surface-6)",
1456
+ "--r-color-surface-onlowinverted": "var(--r-color-surface-3)",
1457
+ "--r-color-surface-lowest": "var(--r-color-surface-3)",
1458
+ "--r-color-surface-low": "var(--r-color-surface-2)",
1459
+ "--r-color-surface-base": "var(--r-color-surface-1)",
1460
+ "--r-color-surface-high": "var(--r-color-surface-0)",
1461
+ "--r-color-surface-highest": "var(--r-color-surface-0)",
1462
+ "--r-color-surface-border": "var(--r-color-surface-4)",
1463
+ "--r-color-primary-container": "var(--r-color-primary-6)",
1464
+ "--r-color-secondary-container": "var(--r-color-secondary-6)",
1465
+ "--r-color-tertiary-container": "var(--r-color-tertiary-6)",
1466
+ "--r-color-error-container": "var(--r-color-error-6)",
1467
+ "--r-color-primary-containerd": "var(--r-color-primary-7)",
1468
+ "--r-color-secondary-containerd": "var(--r-color-secondary-7)",
1469
+ "--r-color-tertiary-containerd": "var(--r-color-tertiary-7)",
1470
+ "--r-color-error-containerd": "var(--r-color-error-7)",
1471
+ "--r-color-primary-containerl": "var(--r-color-primary-4)",
1472
+ "--r-color-secondary-containerl": "var(--r-color-secondary-4)",
1473
+ "--r-color-tertiary-containerl": "var(--r-color-tertiary-4)",
1474
+ "--r-color-error-containerl": "var(--r-color-error-4)"
1475
+ };
1476
+ }
1477
+ });
1478
+ return {
1479
+ ...s,
1480
+ ...i,
1481
+ ...l.value
1482
+ };
1483
+ }
1484
+ function ct(e) {
1485
+ const t = g("");
1486
+ return ee(() => {
1487
+ e.id ? t.value = e.id : t.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
1488
+ }), t;
1489
+ }
1490
+ const ut = Symbol("scheme");
1491
+ function Hr() {
1492
+ return be(ut, g("dark"));
1493
+ }
1494
+ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
1495
+ __name: "ColorInput",
1496
+ props: {
1497
+ modelValue: {},
1498
+ modelModifiers: {}
1499
+ },
1500
+ emits: ["update:modelValue"],
1501
+ setup(e) {
1502
+ const t = U(e, "modelValue"), r = $t(), n = ct(r), a = g(null);
1503
+ return (o, s) => {
1504
+ const i = ir;
1505
+ return h(), b("div", null, [
1506
+ Te(w("input", {
1507
+ id: c(n),
1508
+ ref_key: "input",
1509
+ ref: a,
1510
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => t.value = l),
1511
+ type: "color",
1512
+ class: "pointer-events-none absolute opacity-0"
1513
+ }, null, 8, Nr), [
1514
+ [Ct, t.value]
1515
+ ]),
1516
+ w("label", { for: c(n) }, [
1517
+ Z(i, {
1518
+ class: "cursor-pointer",
1519
+ color: t.value ?? "#222"
1520
+ }, null, 8, ["color"])
1521
+ ], 8, Pr)
1522
+ ]);
1523
+ };
1524
+ }
1525
+ }), Ir = ["data-scheme", "data-theme"], Vr = /* @__PURE__ */ x({
1526
+ __name: "ThemeProvider",
1527
+ props: {
1528
+ theme: {}
1529
+ },
1530
+ setup(e) {
1531
+ const r = it(e.theme, !1);
1532
+ return (n, a) => (h(), b("div", {
1533
+ style: C([c(r)]),
1534
+ "data-scheme": n.theme.scheme,
1535
+ "data-theme": n.theme.name
1536
+ }, [
1537
+ k(n.$slots, "default")
1538
+ ], 12, Ir));
1539
+ }
1540
+ }), dt = /* @__PURE__ */ x({
1541
+ __name: "FullscreenOverlay",
1542
+ props: /* @__PURE__ */ j({
1543
+ persistent: { type: Boolean, default: !1 },
1544
+ blur: { type: [String, Boolean], default: !1 },
1545
+ wrapperClass: {}
1546
+ }, {
1547
+ modelValue: { type: Boolean },
1548
+ modelModifiers: {}
1549
+ }),
1550
+ emits: ["update:modelValue"],
1551
+ setup(e) {
1552
+ const t = e, r = U(e, "modelValue"), n = g(null);
1553
+ function a(i) {
1554
+ t.persistent || i.target === n.value && (r.value = !1);
1555
+ }
1556
+ const o = m(() => {
1557
+ switch (t.blur) {
1558
+ case "sm":
1559
+ return "backdrop-blur-sm";
1560
+ case "md":
1561
+ case !0:
1562
+ return "backdrop-blur-md";
1563
+ case "lg":
1564
+ return "backdrop-blur-lg";
1565
+ default:
1566
+ return "";
1567
+ }
1568
+ });
1569
+ F(() => {
1570
+ r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
1571
+ document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
1572
+ }, 300);
1573
+ });
1574
+ const s = Or();
1575
+ return (i, l) => {
1576
+ const u = Vr;
1577
+ return h(), P(At, { to: "body" }, [
1578
+ Z(u, { theme: c(s) }, {
1579
+ default: W(() => [
1580
+ w("div", {
1581
+ ref_key: "wrapperRef",
1582
+ ref: n,
1583
+ class: y(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full bg-surface-lowest/50 transition-all duration-300 md:items-center", [o.value, i.wrapperClass, {
1584
+ "op0 pointer-events-none": !r.value,
1585
+ op100: r.value
1586
+ }]]),
1587
+ onClick: a
1588
+ }, [
1589
+ k(i.$slots, "default")
1590
+ ], 2)
1591
+ ]),
1592
+ _: 3
1593
+ }, 8, ["theme"])
1594
+ ]);
1595
+ };
1596
+ }
1597
+ }), Dr = { class: "flex justify-end p-4 md:px-6 md:py-4 md:pb-0" }, Fr = /* @__PURE__ */ w("i", { class: "i-tabler-x" }, null, -1), Lr = { class: "h-full flex flex-col items-center justify-center px-4 md:px-6" }, Un = /* @__PURE__ */ x({
1598
+ __name: "Drawer",
1599
+ props: /* @__PURE__ */ j({
1600
+ persistent: { type: Boolean, default: !1 },
1601
+ blur: { type: [String, Boolean], default: !1 },
1602
+ position: { default: "left" }
1603
+ }, {
1604
+ modelValue: { type: Boolean },
1605
+ modelModifiers: {}
1606
+ }),
1607
+ emits: ["update:modelValue"],
1608
+ setup(e) {
1609
+ const t = e, r = U(e, "modelValue");
1610
+ return F(() => {
1611
+ r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
1612
+ document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
1613
+ }, 300);
1614
+ }), (n, a) => {
1615
+ const o = at, s = dt;
1616
+ return h(), P(s, {
1617
+ modelValue: r.value,
1618
+ "onUpdate:modelValue": a[1] || (a[1] = (i) => r.value = i),
1619
+ blur: t.blur,
1620
+ persistent: t.persistent
1621
+ }, {
1622
+ default: W(() => [
1623
+ Z(rt, {
1624
+ "enter-from-class": n.position === "left" ? "-translate-x-1/1" : "translate-x-1/1",
1625
+ "enter-to-class": (n.position === "left", "translate-x-0"),
1626
+ "leave-from-class": (n.position === "left", "translate-x-0"),
1627
+ "leave-to-class": n.position === "left" ? "-translate-x-1/1" : "translate-x-1/1",
1628
+ "enter-active-class": "transition ease-out duration-300",
1629
+ "leave-active-class": "transition ease-in duration-200"
1630
+ }, {
1631
+ default: W(() => [
1632
+ r.value ? (h(), b("div", {
1633
+ key: 0,
1634
+ class: y(["fixed h-full w-full bg-surface-low md:w-md", n.position === "left" ? "left-0" : "right-0"])
1635
+ }, [
1636
+ w("div", Dr, [
1637
+ Z(o, {
1638
+ icon: "",
1639
+ variant: "transparent",
1640
+ class: "text-surface-on hover:text-surface-on",
1641
+ onPointerup: a[0] || (a[0] = (i) => r.value = !1)
1642
+ }, {
1643
+ default: W(() => [
1644
+ Fr
1645
+ ]),
1646
+ _: 1
1647
+ })
1648
+ ]),
1649
+ w("div", Lr, [
1650
+ k(n.$slots, "default")
1651
+ ])
1652
+ ], 2)) : T("", !0)
1653
+ ]),
1654
+ _: 3
1655
+ }, 8, ["enter-from-class", "enter-to-class", "leave-from-class", "leave-to-class"])
1656
+ ]),
1657
+ _: 3
1658
+ }, 8, ["modelValue", "blur", "persistent"]);
1659
+ };
1660
+ }
1661
+ }), Gn = /* @__PURE__ */ x({
1662
+ __name: "Dropzone",
1663
+ props: {
1664
+ dashed: { type: Boolean, default: !0 },
1665
+ accept: { default: "*" }
1666
+ },
1667
+ emits: ["drop"],
1668
+ setup(e, { emit: t }) {
1669
+ const r = e, n = t, a = g(), { onChange: o, open: s } = er({
1670
+ accept: r.accept
1671
+ });
1672
+ o((l) => {
1673
+ l ? n("drop", Array.from(l)) : n("drop", null);
1674
+ });
1675
+ const { isOverDropZone: i } = Yt(a, {
1676
+ onDrop: (l) => {
1677
+ n("drop", l);
1678
+ }
1679
+ });
1680
+ return (l, u) => (h(), b("div", {
1681
+ ref_key: "dropZoneRef",
1682
+ ref: a,
1683
+ class: y([{
1684
+ "": c(i),
1685
+ " bg-surface-low": !c(i),
1686
+ "border-dashed": l.dashed
1687
+ }, "h-full w-full flex cursor-pointer items-center justify-center rounded"]),
1688
+ onPointerup: u[0] || (u[0] = () => c(s)())
1689
+ }, [
1690
+ k(l.$slots, "default")
1691
+ ], 34));
1692
+ }
1693
+ }), qn = /* @__PURE__ */ x({
1694
+ __name: "Image",
1695
+ props: {
1696
+ is: { default: "img" },
1697
+ src: {},
1698
+ style: {},
1699
+ class: {},
1700
+ width: {},
1701
+ maxWidth: {},
1702
+ height: {},
1703
+ maxHeight: {},
1704
+ rounded: { default: "md" }
1705
+ },
1706
+ setup(e) {
1707
+ const t = e, r = g(!1), n = g(null);
1708
+ function a() {
1709
+ r.value = !0;
1710
+ }
1711
+ ee(() => {
1712
+ var s;
1713
+ (s = n.value) != null && s.complete && a();
1714
+ });
1715
+ const o = G(t);
1716
+ return (s, i) => (h(), b("div", {
1717
+ style: C({
1718
+ height: s.height,
1719
+ width: s.width,
1720
+ maxHeight: s.maxHeight,
1721
+ maxWidth: s.maxWidth
1722
+ })
1723
+ }, [
1724
+ s.src ? (h(), P(ue(s.is), xe({
1725
+ key: 0,
1726
+ ref_key: "img",
1727
+ ref: n,
1728
+ style: [
1729
+ s.style,
1730
+ c(o).style
1731
+ ],
1732
+ src: s.src,
1733
+ class: ["h-full w-full object-cover", [
1734
+ t.class,
1735
+ c(o).class,
1736
+ {
1737
+ hidden: !c(r)
1738
+ }
1739
+ ]]
1740
+ }, s.$attrs, { onLoad: a }), null, 16, ["style", "src", "class"])) : T("", !0),
1741
+ c(r) ? T("", !0) : (h(), b("div", {
1742
+ key: 1,
1743
+ class: y(["h-full w-full animate-pulse border-transparent bg-surface-high object-cover", [
1744
+ t.class,
1745
+ c(o).class
1746
+ ]]),
1747
+ style: C([
1748
+ s.style,
1749
+ c(o).style
1750
+ ])
1751
+ }, null, 6))
1752
+ ], 4));
1753
+ }
1754
+ }), Wr = { class: "relative" }, Xn = /* @__PURE__ */ x({
1755
+ __name: "Indicator",
1756
+ props: {
1757
+ color: { default: "primary" },
1758
+ size: { default: "md" },
1759
+ position: { default: "top-right" },
1760
+ ping: { type: Boolean }
1761
+ },
1762
+ setup(e) {
1763
+ const t = e, r = m(() => {
1764
+ switch (t.size) {
1765
+ case "sm":
1766
+ return "w-2 h-2";
1767
+ case "md":
1768
+ return "w-3 h-3";
1769
+ case "lg":
1770
+ return "w-4 h-4";
1771
+ default:
1772
+ return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `w-${t.size} h-${t.size}` : t.size;
1773
+ }
1774
+ }), n = nt(), a = m(() => {
1775
+ if (!n.label)
1776
+ return "";
1777
+ switch (t.size) {
1778
+ case "sm":
1779
+ return "text-sm children:px-1.5";
1780
+ case "md":
1781
+ return "text-md children:px-2";
1782
+ case "lg":
1783
+ return "text-lg children:px-2.5";
1784
+ }
1785
+ }), o = m(() => {
1786
+ switch (t.position) {
1787
+ case "top-left":
1788
+ return "top-0 left-0 -translate-x-1/2 -translate-y-1/2";
1789
+ case "top-right":
1790
+ return "top-0 right-0 translate-x-1/2 -translate-y-1/2";
1791
+ case "bottom-left":
1792
+ return "bottom-0 left-0 -translate-x-1/2 translate-y-1/2";
1793
+ case "bottom-right":
1794
+ return "bottom-0 right-0 translate-x-1/2 translate-y-1/2";
1795
+ }
1796
+ }), s = m(() => {
1797
+ switch (t.color) {
1798
+ case "primary":
1799
+ return "bg-primary-container text-primary-on";
1800
+ case "secondary":
1801
+ return "bg-secondary-container text-secondary-on";
1802
+ case "tertiary":
1803
+ return "bg-tertiary-container text-tertiary-on";
1804
+ case "error":
1805
+ return "bg-error-container text-error-on";
1806
+ }
1807
+ });
1808
+ return (i, l) => (h(), b("div", Wr, [
1809
+ w("div", {
1810
+ class: y([[c(o), c(a)], "absolute z-1"])
1811
+ }, [
1812
+ t.ping ? (h(), b("div", {
1813
+ key: 0,
1814
+ class: y(["absolute box-content animate-ping border-2 border-transparent rounded-full", [
1815
+ {
1816
+ [c(r)]: !i.$slots.label
1817
+ },
1818
+ c(s)
1819
+ ]])
1820
+ }, [
1821
+ i.$slots.label ? k(i.$slots, "label", { key: 0 }) : T("", !0)
1822
+ ], 2)) : T("", !0),
1823
+ w("div", {
1824
+ class: y(["top-0 box-content border-2 border-surface-low rounded-full", [
1825
+ {
1826
+ [c(r)]: !i.$slots.label
1827
+ },
1828
+ c(s)
1829
+ ]])
1830
+ }, [
1831
+ i.$slots.label ? k(i.$slots, "label", { key: 0 }) : T("", !0)
1832
+ ], 2)
1833
+ ], 2),
1834
+ k(i.$slots, "default")
1835
+ ]));
1836
+ }
1837
+ }), Yn = /* @__PURE__ */ x({
1838
+ __name: "Modal",
1839
+ props: /* @__PURE__ */ j({
1840
+ persistent: { type: Boolean, default: !1 },
1841
+ blur: { type: [String, Boolean], default: !1 }
1842
+ }, {
1843
+ modelValue: { type: Boolean },
1844
+ modelModifiers: {}
1845
+ }),
1846
+ emits: ["update:modelValue"],
1847
+ setup(e) {
1848
+ const t = e, r = U(e, "modelValue");
1849
+ return F(() => {
1850
+ r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
1851
+ document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
1852
+ }, 300);
1853
+ }), (n, a) => {
1854
+ const o = dt;
1855
+ return h(), P(o, {
1856
+ modelValue: r.value,
1857
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => r.value = s),
1858
+ blur: t.blur,
1859
+ persistent: t.persistent,
1860
+ "wrapper-class": "flex items-end justify-center"
1861
+ }, {
1862
+ default: W(() => [
1863
+ Z(rt, {
1864
+ "enter-from-class": "translate-y-1/2",
1865
+ "enter-to-class": "translate-y-0",
1866
+ "leave-from-class": "translate-y-0",
1867
+ "leave-to-class": "translate-y-1/2",
1868
+ "enter-active-class": "transition ease-out duration-300",
1869
+ "leave-active-class": "transition ease-in duration-200"
1870
+ }, {
1871
+ default: W(() => [
1872
+ r.value ? k(n.$slots, "default", { key: 0 }) : T("", !0)
1873
+ ]),
1874
+ _: 3
1875
+ })
1876
+ ]),
1877
+ _: 3
1878
+ }, 8, ["modelValue", "blur", "persistent"]);
1879
+ };
1880
+ }
1881
+ }), jr = {
1882
+ key: 0,
1883
+ class: "h-container w-container i-tabler-loader-2 shrink-0 animate-spin"
1884
+ }, Ur = { key: 1 }, Gr = { class: "grow-1" }, qr = {
1885
+ key: 2,
1886
+ class: "text-sm text-surface-onlow"
1887
+ }, Xr = /* @__PURE__ */ w("i", { class: "i-tabler-x" }, null, -1), Yr = /* @__PURE__ */ x({
1888
+ __name: "Notification",
1889
+ props: {
1890
+ title: {},
1891
+ message: {},
1892
+ icon: {},
1893
+ loading: { type: Boolean },
1894
+ withBorder: { type: Boolean },
1895
+ closeable: { type: Boolean },
1896
+ rounded: { default: "md" },
1897
+ block: { type: Boolean, default: !1 },
1898
+ color: { default: "primary" }
1899
+ },
1900
+ emits: ["close"],
1901
+ setup(e) {
1902
+ const t = e, r = G(t), n = m(() => {
1903
+ switch (t.color) {
1904
+ case "secondary":
1905
+ return "bg-secondary-container";
1906
+ case "tertiary":
1907
+ return "bg-tertiary-container";
1908
+ case "error":
1909
+ return "bg-error-container";
1910
+ default:
1911
+ return "bg-primary-container";
1912
+ }
1913
+ }), a = m(() => {
1914
+ switch (t.color) {
1915
+ case "secondary":
1916
+ return "text-secondary-container";
1917
+ case "tertiary":
1918
+ return "text-tertiary-container";
1919
+ case "error":
1920
+ return "text-error-container";
1921
+ default:
1922
+ return "text-primary-container";
1923
+ }
1924
+ });
1925
+ return (o, s) => {
1926
+ const i = at;
1927
+ return h(), b("div", {
1928
+ class: y(["relative min-h-16 min-w-80 w-full flex items-center gap-2 container-low p-3", [
1929
+ { "border-0": !o.withBorder },
1930
+ c(r).class,
1931
+ {
1932
+ "max-w-100": !o.block,
1933
+ "w-full": o.block
1934
+ }
1935
+ ]]),
1936
+ style: C(c(r).style)
1937
+ }, [
1938
+ o.icon ? (h(), b("div", {
1939
+ key: 0,
1940
+ class: y(["leading-0", c(a)])
1941
+ }, [
1942
+ o.loading ? (h(), b("i", jr)) : (h(), b("i", {
1943
+ key: 1,
1944
+ class: y(["h-container w-container shrink-0", o.icon])
1945
+ }, null, 2))
1946
+ ], 2)) : (h(), b("div", Ur, [
1947
+ w("div", {
1948
+ class: y(["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full", [{
1949
+ "animate-pulse": o.loading
1950
+ }, c(n)]])
1951
+ }, null, 2)
1952
+ ])),
1953
+ w("div", Gr, [
1954
+ o.title ? (h(), b("div", {
1955
+ key: 0,
1956
+ class: y([c(a), "text-base"])
1957
+ }, se(o.title), 3)) : T("", !0),
1958
+ o.$slots.message ? k(o.$slots, "message", { key: 1 }) : o.message ? (h(), b("div", qr, se(o.message), 1)) : T("", !0)
1959
+ ]),
1960
+ o.closeable ? (h(), P(i, {
1961
+ key: 2,
1962
+ icon: "",
1963
+ variant: "transparent",
1964
+ class: "text-surface-on hover:text-surface-on",
1965
+ onClick: s[0] || (s[0] = (l) => o.$emit("close"))
1966
+ }, {
1967
+ default: W(() => [
1968
+ Xr
1969
+ ]),
1970
+ _: 1
1971
+ })) : T("", !0)
1972
+ ], 6);
1973
+ };
1974
+ }
1975
+ }), ft = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakSet();
1976
+ let J, Fe = 0, Le = 0;
1977
+ const X = "__aa_tgt", we = "__aa_del", Ae = "__aa_new", Kr = (e) => {
1978
+ const t = rn(e);
1979
+ t && t.forEach((r) => nn(r));
1980
+ }, Qr = (e) => {
1981
+ e.forEach((t) => {
1982
+ t.target === J && en(), O.has(t.target) && oe(t.target);
1983
+ });
1984
+ };
1985
+ function Jr(e) {
1986
+ const t = Ne.get(e);
1987
+ t == null || t.disconnect();
1988
+ let r = O.get(e), n = 0;
1989
+ const a = 5;
1990
+ r || (r = ce(e), O.set(e, r));
1991
+ const { offsetWidth: o, offsetHeight: s } = J, l = [
1992
+ r.top - a,
1993
+ o - (r.left + a + r.width),
1994
+ s - (r.top + a + r.height),
1995
+ r.left - a
1996
+ ].map((d) => `${-1 * Math.floor(d)}px`).join(" "), u = new IntersectionObserver(() => {
1997
+ ++n > 1 && oe(e);
1998
+ }, {
1999
+ root: J,
2000
+ threshold: 1,
2001
+ rootMargin: l
2002
+ });
2003
+ u.observe(e), Ne.set(e, u);
2004
+ }
2005
+ function oe(e) {
2006
+ clearTimeout(Ce.get(e));
2007
+ const t = Re(e), r = _e(t) ? 500 : t.duration;
2008
+ Ce.set(e, setTimeout(async () => {
2009
+ const n = ne.get(e);
2010
+ try {
2011
+ await (n == null ? void 0 : n.finished), O.set(e, ce(e)), Jr(e);
2012
+ } catch {
2013
+ }
2014
+ }, r));
2015
+ }
2016
+ function en() {
2017
+ clearTimeout(Ce.get(J)), Ce.set(J, setTimeout(() => {
2018
+ ft.forEach((e) => vt(e, (t) => ht(() => oe(t))));
2019
+ }, 100));
2020
+ }
2021
+ function tn(e) {
2022
+ setTimeout(() => {
2023
+ Zr.set(e, setInterval(() => ht(oe.bind(null, e)), 2e3));
2024
+ }, Math.round(2e3 * Math.random()));
2025
+ }
2026
+ function ht(e) {
2027
+ typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
2028
+ }
2029
+ let Pe, ae;
2030
+ typeof window < "u" && (J = document.documentElement, Pe = new MutationObserver(Kr), ae = new ResizeObserver(Qr), window.addEventListener("scroll", () => {
2031
+ Le = window.scrollY, Fe = window.scrollX;
2032
+ }), ae.observe(J));
2033
+ function rn(e) {
2034
+ return e.reduce((n, a) => [
2035
+ ...n,
2036
+ ...Array.from(a.addedNodes),
2037
+ ...Array.from(a.removedNodes)
2038
+ ], []).every((n) => n.nodeName === "#comment") ? !1 : e.reduce((n, a) => {
2039
+ if (n === !1)
2040
+ return !1;
2041
+ if (a.target instanceof Element) {
2042
+ if (Oe(a.target), !n.has(a.target)) {
2043
+ n.add(a.target);
2044
+ for (let o = 0; o < a.target.children.length; o++) {
2045
+ const s = a.target.children.item(o);
2046
+ if (s) {
2047
+ if (we in s)
2048
+ return !1;
2049
+ Oe(a.target, s), n.add(s);
2050
+ }
2051
+ }
2052
+ }
2053
+ if (a.removedNodes.length)
2054
+ for (let o = 0; o < a.removedNodes.length; o++) {
2055
+ const s = a.removedNodes[o];
2056
+ if (we in s)
2057
+ return !1;
2058
+ s instanceof Element && (n.add(s), Oe(a.target, s), le.set(s, [
2059
+ a.previousSibling,
2060
+ a.nextSibling
2061
+ ]));
2062
+ }
2063
+ }
2064
+ return n;
2065
+ }, /* @__PURE__ */ new Set());
2066
+ }
2067
+ function Oe(e, t) {
2068
+ !t && !(X in e) ? Object.defineProperty(e, X, { value: e }) : t && !(X in t) && Object.defineProperty(t, X, { value: e });
2069
+ }
2070
+ function nn(e) {
2071
+ var t;
2072
+ const r = e.isConnected, n = O.has(e);
2073
+ r && le.has(e) && le.delete(e), ne.has(e) && ((t = ne.get(e)) === null || t === void 0 || t.cancel()), Ae in e ? Qe(e) : n && r ? an(e) : n && !r ? sn(e) : Qe(e);
2074
+ }
2075
+ function L(e) {
2076
+ return Number(e.replace(/[^0-9.\-]/g, ""));
2077
+ }
2078
+ function on(e) {
2079
+ let t = e.parentElement;
2080
+ for (; t; ) {
2081
+ if (t.scrollLeft || t.scrollTop)
2082
+ return { x: t.scrollLeft, y: t.scrollTop };
2083
+ t = t.parentElement;
2084
+ }
2085
+ return { x: 0, y: 0 };
2086
+ }
2087
+ function ce(e) {
2088
+ const t = e.getBoundingClientRect(), { x: r, y: n } = on(e);
2089
+ return {
2090
+ top: t.top + n,
2091
+ left: t.left + r,
2092
+ width: t.width,
2093
+ height: t.height
2094
+ };
2095
+ }
2096
+ function pt(e, t, r) {
2097
+ let n = t.width, a = t.height, o = r.width, s = r.height;
2098
+ const i = getComputedStyle(e);
2099
+ if (i.getPropertyValue("box-sizing") === "content-box") {
2100
+ const u = L(i.paddingTop) + L(i.paddingBottom) + L(i.borderTopWidth) + L(i.borderBottomWidth), d = L(i.paddingLeft) + L(i.paddingRight) + L(i.borderRightWidth) + L(i.borderLeftWidth);
2101
+ n -= d, o -= d, a -= u, s -= u;
2102
+ }
2103
+ return [n, o, a, s].map(Math.round);
2104
+ }
2105
+ function Re(e) {
2106
+ return X in e && ie.has(e[X]) ? ie.get(e[X]) : { duration: 250, easing: "ease-in-out" };
2107
+ }
2108
+ function mt(e) {
2109
+ if (X in e)
2110
+ return e[X];
2111
+ }
2112
+ function We(e) {
2113
+ const t = mt(e);
2114
+ return t ? ve.has(t) : !1;
2115
+ }
2116
+ function vt(e, ...t) {
2117
+ t.forEach((r) => r(e, ie.has(e)));
2118
+ for (let r = 0; r < e.children.length; r++) {
2119
+ const n = e.children.item(r);
2120
+ n && t.forEach((a) => a(n, ie.has(n)));
2121
+ }
2122
+ }
2123
+ function je(e) {
2124
+ return Array.isArray(e) ? e : [e];
2125
+ }
2126
+ function _e(e) {
2127
+ return typeof e == "function";
2128
+ }
2129
+ function an(e) {
2130
+ const t = O.get(e), r = ce(e);
2131
+ if (!We(e))
2132
+ return O.set(e, r);
2133
+ let n;
2134
+ if (!t)
2135
+ return;
2136
+ const a = Re(e);
2137
+ if (typeof a != "function") {
2138
+ const o = t.left - r.left, s = t.top - r.top, [i, l, u, d] = pt(e, t, r), f = {
2139
+ transform: `translate(${o}px, ${s}px)`
2140
+ }, v = {
2141
+ transform: "translate(0, 0)"
2142
+ };
2143
+ i !== l && (f.width = `${i}px`, v.width = `${l}px`), u !== d && (f.height = `${u}px`, v.height = `${d}px`), n = e.animate([f, v], {
2144
+ duration: a.duration,
2145
+ easing: a.easing
2146
+ });
2147
+ } else {
2148
+ const [o] = je(a(e, "remain", t, r));
2149
+ n = new Animation(o), n.play();
2150
+ }
2151
+ ne.set(e, n), O.set(e, r), n.addEventListener("finish", oe.bind(null, e));
2152
+ }
2153
+ function Qe(e) {
2154
+ Ae in e && delete e[Ae];
2155
+ const t = ce(e);
2156
+ O.set(e, t);
2157
+ const r = Re(e);
2158
+ if (!We(e))
2159
+ return;
2160
+ let n;
2161
+ if (typeof r != "function")
2162
+ n = e.animate([
2163
+ { transform: "scale(.98)", opacity: 0 },
2164
+ { transform: "scale(0.98)", opacity: 0, offset: 0.5 },
2165
+ { transform: "scale(1)", opacity: 1 }
2166
+ ], {
2167
+ duration: r.duration * 1.5,
2168
+ easing: "ease-in"
2169
+ });
2170
+ else {
2171
+ const [a] = je(r(e, "add", t));
2172
+ n = new Animation(a), n.play();
2173
+ }
2174
+ ne.set(e, n), n.addEventListener("finish", oe.bind(null, e));
2175
+ }
2176
+ function Je(e, t) {
2177
+ var r;
2178
+ e.remove(), O.delete(e), le.delete(e), ne.delete(e), (r = Ne.get(e)) === null || r === void 0 || r.disconnect(), setTimeout(() => {
2179
+ if (we in e && delete e[we], Object.defineProperty(e, Ae, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
2180
+ for (const n in t)
2181
+ e.style[n] = "";
2182
+ }, 0);
2183
+ }
2184
+ function sn(e) {
2185
+ var t;
2186
+ if (!le.has(e) || !O.has(e))
2187
+ return;
2188
+ const [r, n] = le.get(e);
2189
+ Object.defineProperty(e, we, { value: !0, configurable: !0 });
2190
+ const a = window.scrollX, o = window.scrollY;
2191
+ if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t = mt(e)) === null || t === void 0 || t.appendChild(e), !We(e))
2192
+ return Je(e);
2193
+ const [s, i, l, u] = cn(e), d = Re(e), f = O.get(e);
2194
+ (a !== Fe || o !== Le) && ln(e, a, o, d);
2195
+ let v, S = {
2196
+ position: "absolute",
2197
+ top: `${s}px`,
2198
+ left: `${i}px`,
2199
+ width: `${l}px`,
2200
+ height: `${u}px`,
2201
+ margin: "0",
2202
+ pointerEvents: "none",
2203
+ transformOrigin: "center",
2204
+ zIndex: "100"
2205
+ };
2206
+ if (!_e(d))
2207
+ Object.assign(e.style, S), v = e.animate([
2208
+ {
2209
+ transform: "scale(1)",
2210
+ opacity: 1
2211
+ },
2212
+ {
2213
+ transform: "scale(.98)",
2214
+ opacity: 0
2215
+ }
2216
+ ], { duration: d.duration, easing: "ease-out" });
2217
+ else {
2218
+ const [A, z] = je(d(e, "remove", f));
2219
+ (z == null ? void 0 : z.styleReset) !== !1 && (S = (z == null ? void 0 : z.styleReset) || S, Object.assign(e.style, S)), v = new Animation(A), v.play();
2220
+ }
2221
+ ne.set(e, v), v.addEventListener("finish", Je.bind(null, e, S));
2222
+ }
2223
+ function ln(e, t, r, n) {
2224
+ const a = Fe - t, o = Le - r, s = document.documentElement.style.scrollBehavior;
2225
+ if (getComputedStyle(J).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + a, window.scrollY + o), !e.parentElement)
2226
+ return;
2227
+ const l = e.parentElement;
2228
+ let u = l.clientHeight, d = l.clientWidth;
2229
+ const f = performance.now();
2230
+ function v() {
2231
+ requestAnimationFrame(() => {
2232
+ if (!_e(n)) {
2233
+ const S = u - l.clientHeight, A = d - l.clientWidth;
2234
+ f + n.duration > performance.now() ? (window.scrollTo({
2235
+ left: window.scrollX - A,
2236
+ top: window.scrollY - S
2237
+ }), u = l.clientHeight, d = l.clientWidth, v()) : document.documentElement.style.scrollBehavior = s;
2238
+ }
2239
+ });
2240
+ }
2241
+ v();
2242
+ }
2243
+ function cn(e) {
2244
+ const t = O.get(e), [r, , n] = pt(e, t, ce(e));
2245
+ let a = e.parentElement;
2246
+ for (; a && (getComputedStyle(a).position === "static" || a instanceof HTMLBodyElement); )
2247
+ a = a.parentElement;
2248
+ a || (a = document.body);
2249
+ const o = getComputedStyle(a), s = O.get(a) || ce(a), i = Math.round(t.top - s.top) - L(o.borderTopWidth), l = Math.round(t.left - s.left) - L(o.borderLeftWidth);
2250
+ return [i, l, r, n];
2251
+ }
2252
+ function un(e, t = {}) {
2253
+ return Pe && ae && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !_e(t) && !t.disrespectUserMotionPreference || (ve.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), vt(e, oe, tn, (a) => ae == null ? void 0 : ae.observe(a)), _e(t) ? ie.set(e, t) : ie.set(e, { duration: 250, easing: "ease-in-out", ...t }), Pe.observe(e, { childList: !0 }), ft.add(e))), Object.freeze({
2254
+ parent: e,
2255
+ enable: () => {
2256
+ ve.add(e);
2257
+ },
2258
+ disable: () => {
2259
+ ve.delete(e);
2260
+ },
2261
+ isEnabled: () => ve.has(e)
2262
+ });
2263
+ }
2264
+ const dn = {
2265
+ mounted: (e, t) => {
2266
+ un(e, t.value || {});
2267
+ },
2268
+ // ignore ssr see #96:
2269
+ getSSRProps: () => ({})
2270
+ }, fn = { class: "fixed z-20 flex flex-col gap-2 p-2" }, Zn = /* @__PURE__ */ x({
2271
+ __name: "NotificationSystem",
2272
+ setup(e) {
2273
+ const t = gn();
2274
+ return (r, n) => {
2275
+ const a = Yr;
2276
+ return Te((h(), b("div", fn, [
2277
+ (h(!0), b(K, null, ye(c(t), (o) => (h(), P(a, {
2278
+ key: o.hash,
2279
+ closeable: "",
2280
+ "with-border": "",
2281
+ title: o.title,
2282
+ message: o.message,
2283
+ icon: o.icon,
2284
+ loading: o.loading,
2285
+ color: o.color,
2286
+ onClose: (s) => c(t).splice(c(t).indexOf(o), 1)
2287
+ }, null, 8, ["title", "message", "icon", "loading", "color", "onClose"]))), 128))
2288
+ ])), [
2289
+ [c(dn)]
2290
+ ]);
2291
+ };
2292
+ }
2293
+ }), hn = { class: "relative" }, Kn = /* @__PURE__ */ x({
2294
+ __name: "Overlay",
2295
+ props: {
2296
+ blur: { type: [Boolean, String], default: !1 },
2297
+ rounded: { default: "none" },
2298
+ opacity: { default: 30 },
2299
+ color: { default: "black" }
2300
+ },
2301
+ setup(e) {
2302
+ const t = e, r = m(() => {
2303
+ switch (t.blur) {
2304
+ case "sm":
2305
+ return "backdrop-blur-sm";
2306
+ case "md":
2307
+ case !0:
2308
+ return "backdrop-blur-md";
2309
+ case "lg":
2310
+ return "backdrop-blur-lg";
2311
+ default:
2312
+ return "";
2313
+ }
2314
+ }), n = G(t), a = g(null), o = p(t.color).toRgb(), s = m(() => ({
2315
+ backgroundColor: `rgba(${o.r}, ${o.g}, ${o.b}, ${t.opacity / 100})`
2316
+ }));
2317
+ return (i, l) => (h(), b("div", hn, [
2318
+ k(i.$slots, "default"),
2319
+ w("div", xe(i.$attrs, {
2320
+ ref_key: "wrapperRef",
2321
+ ref: a,
2322
+ class: [[c(r), c(n).class], "absolute left-0 top-0 h-full w-full overflow-hidden md:items-center"],
2323
+ style: [c(n).style, c(s)]
2324
+ }), [
2325
+ k(i.$slots, "content")
2326
+ ], 16)
2327
+ ]));
2328
+ }
2329
+ }), Qn = /* @__PURE__ */ x({
2330
+ __name: "Paper",
2331
+ props: {
2332
+ size: { default: "md" },
2333
+ rounded: { default: "md" },
2334
+ withBorder: { type: Boolean, default: !1 },
2335
+ is: { default: "div" }
2336
+ },
2337
+ setup(e) {
2338
+ const r = G(e);
2339
+ return (n, a) => (h(), P(ue(n.is), {
2340
+ class: y(["container-low rounded-lg p-4", [
2341
+ {
2342
+ "border-transparent": !n.withBorder
2343
+ },
2344
+ c(r).class
2345
+ ]]),
2346
+ style: C([c(r).style])
2347
+ }, {
2348
+ default: W(() => [
2349
+ k(n.$slots, "default")
2350
+ ]),
2351
+ _: 3
2352
+ }, 8, ["class", "style"]));
2353
+ }
2354
+ }), pn = ["placeholder", "type"], mn = /* @__PURE__ */ x({
2355
+ __name: "TextField",
2356
+ props: /* @__PURE__ */ j({
2357
+ onChange: {},
2358
+ color: { default: "primary" },
2359
+ error: { type: Boolean },
2360
+ disabled: { type: Boolean },
2361
+ rounded: { default: "md" },
2362
+ size: { default: "md" },
2363
+ password: { type: Boolean },
2364
+ placeholder: {}
2365
+ }, {
2366
+ modelValue: {},
2367
+ modelModifiers: {}
2368
+ }),
2369
+ emits: ["update:modelValue"],
2370
+ setup(e, { expose: t }) {
2371
+ const r = e, n = U(e, "modelValue"), a = m(() => {
2372
+ switch (r.size) {
2373
+ case "sm":
2374
+ return {
2375
+ base: "h-6 px-2 py-1 text-xs"
2376
+ };
2377
+ case "md":
2378
+ return {
2379
+ base: "h-8 px-3 py-1 text-sm"
2380
+ };
2381
+ case "lg":
2382
+ return {
2383
+ base: "h-10 px-4 py-2 text-base"
2384
+ };
2385
+ }
2386
+ }), o = m(() => {
2387
+ if (r.error)
2388
+ return "text-error-container bg-surface-base border-error-container focus:border-error-container";
2389
+ switch (r.color) {
2390
+ case "secondary":
2391
+ return "text-surface-on bg-surface-base border-surface-border-base focus:border-secondary-container";
2392
+ case "tertiary":
2393
+ return "text-surface-on bg-surface-base border-surface-border-base focus:border-tertiary-container";
2394
+ case "error":
2395
+ return "text-surface-on bg-surface-base border-surface-border-base focus:border-error-container";
2396
+ case "primary":
2397
+ default:
2398
+ return "text-surface-on bg-surface-base border-surface-border-base focus:border-primary-container";
2399
+ }
2400
+ }), s = m(() => r.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), i = G(r), l = g(null);
2401
+ return t({
2402
+ el: l
2403
+ }), (u, d) => Te((h(), b("input", {
2404
+ ref_key: "input",
2405
+ ref: l,
2406
+ "onUpdate:modelValue": d[0] || (d[0] = (f) => n.value = f),
2407
+ class: y(["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color", [c(o), c(s), c(i).class, c(a).base]]),
2408
+ style: C([c(i).style]),
2409
+ placeholder: u.placeholder,
2410
+ type: r.password ? "password" : "text"
2411
+ }, null, 14, pn)), [
2412
+ [Tt, n.value]
2413
+ ]);
2414
+ }
2415
+ }), vn = { class: "flex gap-2" }, Jn = /* @__PURE__ */ x({
2416
+ __name: "PinInput",
2417
+ props: {
2418
+ modelValue: {},
2419
+ length: { default: 6 },
2420
+ size: {},
2421
+ password: { type: Boolean }
2422
+ },
2423
+ setup(e) {
2424
+ const t = e, r = g([]);
2425
+ function n(o) {
2426
+ o.preventDefault(), o.stopPropagation();
2427
+ const s = r.value.findIndex((l) => l.el === o.target), i = o.target.value ?? "";
2428
+ o.target.value = "", Array.from(i).forEach((l, u) => {
2429
+ s + u >= r.value.length || (r.value[s + u].el.value = l, s + u + 1 < r.value.length ? (r.value[s + u + 1].el.focus(), r.value[s + u + 1].el.select()) : r.value[s + u].el.blur());
2430
+ });
2431
+ }
2432
+ function a(o) {
2433
+ o.preventDefault(), o.stopPropagation();
2434
+ const s = o.target.value !== "";
2435
+ o.target.value = "";
2436
+ const i = r.value.findIndex((l) => l.el === o.target);
2437
+ i !== 0 && (r.value[i - 1].el.focus(), r.value[i - 1].el.select(), s || (r.value[i - 1].el.value = ""));
2438
+ }
2439
+ return (o, s) => (h(), b("div", vn, [
2440
+ (h(!0), b(K, null, ye(t.length, (i) => (h(), P(mn, {
2441
+ ref_for: !0,
2442
+ ref_key: "inputs",
2443
+ ref: r,
2444
+ key: i,
2445
+ class: "w-8 text-center",
2446
+ style: { padding: "0" },
2447
+ password: t.password,
2448
+ onPointerup: s[0] || (s[0] = (l) => l.target.select()),
2449
+ onInput: ot(n, ["stop", "prevent"]),
2450
+ onKeydown: zt(a, ["backspace"])
2451
+ }, null, 8, ["password"]))), 128))
2452
+ ]));
2453
+ }
2454
+ }), eo = /* @__PURE__ */ x({
2455
+ __name: "Progress",
2456
+ props: {
2457
+ value: { default: 0 },
2458
+ max: { default: 100 },
2459
+ min: { default: 0 },
2460
+ size: { default: "md" },
2461
+ color: { default: "primary" },
2462
+ rounded: { default: "full" },
2463
+ loading: { type: Boolean, default: !1 }
2464
+ },
2465
+ setup(e) {
2466
+ const t = e, r = m(() => {
2467
+ switch (t.size) {
2468
+ case "sm":
2469
+ return "h-0.25";
2470
+ case "md":
2471
+ return "h-0.5";
2472
+ case "lg":
2473
+ return "h-1";
2474
+ }
2475
+ }), n = m(() => {
2476
+ switch (t.color) {
2477
+ case "primary":
2478
+ return "bg-primary-container";
2479
+ case "secondary":
2480
+ return "bg-secondary-7";
2481
+ case "tertiary":
2482
+ return "bg-tertiary-7";
2483
+ case "error":
2484
+ return "bg-error-7";
2485
+ }
2486
+ }), a = G(t);
2487
+ return (o, s) => (h(), b("div", {
2488
+ class: y(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [c(r), c(a).class]]),
2489
+ style: C([c(a).style])
2490
+ }, [
2491
+ o.loading ? (h(), b("div", {
2492
+ key: 1,
2493
+ class: y(["loading-progress h-full", [c(n)]])
2494
+ }, null, 2)) : (h(), b("div", {
2495
+ key: 0,
2496
+ class: y(["h-full", [c(n)]]),
2497
+ style: C([{
2498
+ width: `${(Number(o.value) - Number(o.min)) / (Number(o.max) - Number(o.min)) * 100}%`
2499
+ }])
2500
+ }, null, 6))
2501
+ ], 6));
2502
+ }
2503
+ }), bt = {
2504
+ primary: ["#e5f7ff", "#d3ebfa", "#a9d4f1", "#7cbde9", "#57a9e0", "#3f9cdc", "#3096dc", "#1f82c4", "#0f73b0", "#00649c", "#082f49"],
2505
+ secondary: ["#e9fbf0", "#dcf1e3", "#badfc7", "#96cea9", "#77bf90", "#63b580", "#58b077", "#479a64", "#3b8a58", "#2c7749", "#022c22"],
2506
+ tertiary: ["#fff7e1", "#ffedcd", "#fcd99e", "#f9c46b", "#f7b23f", "#f6a724", "#f5a113", "#da8c04", "#c37d00", "#aa6a00", "#572508"],
2507
+ error: ["#ffeaea", "#fcd5d5", "#f2a8a9", "#ea7a7a", "#e25353", "#de3939", "#dd2b2b", "#c41e1f", "#af171a", "#9a0913", "#450a0a"],
2508
+ surface: ["#fefefe", "#fafafa", "#f2f2f2", "#e8e8e8", "#c6c6c6", "#737373", "#525252", "#343434", "#262626", "#171717", "#121212"]
2509
+ }, Ie = {
2510
+ name: "dark",
2511
+ scheme: "dark",
2512
+ colors: bt
2513
+ }, bn = {
2514
+ name: "light",
2515
+ scheme: "light",
2516
+ colors: bt
2517
+ }, to = Symbol("Notifications"), gt = Et([]);
2518
+ function gn() {
2519
+ return gt;
2520
+ }
2521
+ class ro {
2522
+ static show(t) {
2523
+ t.hash = Math.random().toString(36), gt.push(t);
2524
+ }
2525
+ }
2526
+ const yt = Symbol("tabCurrent"), wt = Symbol("direction"), Ve = [0.96, 0.96, 0.907, 0.805, 0.697, 0.547, 0.518, 0.445, 0.395, 0.34, 0.28];
2527
+ function yn(e) {
2528
+ const t = p(e).toHsl().l;
2529
+ return Ve.reduce(
2530
+ (r, n) => Math.abs(n - t) < Math.abs(r - t) ? n : r
2531
+ );
2532
+ }
2533
+ function wn(e) {
2534
+ const t = p(e), r = yn(t), n = Ve.findIndex((o) => o === r), a = Ve.map((o) => {
2535
+ const s = p({ h: t.toHsl().h, s: t.toHsl().s, l: o });
2536
+ return s.saturate(0 * 100), s;
2537
+ });
2538
+ return { baseColorIndex: n, colors: a.map((o) => o.toHexString()) };
2539
+ }
2540
+ function no(e) {
2541
+ return wn(e).colors;
2542
+ }
2543
+ const oo = /* @__PURE__ */ x({
2544
+ __name: "RokuProvider",
2545
+ props: {
2546
+ is: { default: "div" },
2547
+ theme: { default() {
2548
+ return typeof window > "u" || document.documentElement.dataset.scheme === "dark" ? Ie : bn;
2549
+ } }
2550
+ },
2551
+ setup(e) {
2552
+ const t = e, r = g(0), n = g(0), a = g(t.theme.scheme);
2553
+ Q && (new ResizeObserver(() => {
2554
+ const d = window.innerWidth - document.body.clientWidth;
2555
+ d !== 0 && (r.value = d), n.value = d;
2556
+ }).observe(document.body), new MutationObserver(() => {
2557
+ a.value !== document.documentElement.dataset.scheme && (a.value = document.documentElement.dataset.scheme);
2558
+ }).observe(document.documentElement, {
2559
+ attributes: !0,
2560
+ attributeFilter: ["data-scheme"]
2561
+ }));
2562
+ const o = m(() => n.value === r.value ? "0px" : `${r.value}px`), s = rr();
2563
+ F(() => {
2564
+ if (!Q)
2565
+ return "dark";
2566
+ a.value === "dark" ? document.documentElement.dataset.scheme = "dark" : a.value === "light" ? document.documentElement.dataset.scheme = "light" : s.value === "dark" ? document.documentElement.dataset.scheme = "dark" : document.documentElement.dataset.scheme = "light", localStorage.setItem("scheme", document.documentElement.dataset.scheme);
2567
+ }), ge(ut, a);
2568
+ const i = it(t.theme);
2569
+ return (l, u) => (h(), P(ue(l.is), {
2570
+ style: C([
2571
+ c(i),
2572
+ { paddingRight: c(o) }
2573
+ ]),
2574
+ class: "text-surface-on transition-background-color,border-color,color"
2575
+ }, {
2576
+ default: W(() => [
2577
+ k(l.$slots, "default")
2578
+ ]),
2579
+ _: 3
2580
+ }, 8, ["style"]));
2581
+ }
2582
+ }), _n = ["id"], xn = ["for"], kn = ["for"], Sn = /* @__PURE__ */ x({
2583
+ inheritAttrs: !1,
2584
+ __name: "Switch",
2585
+ props: /* @__PURE__ */ j({
2586
+ size: { default: "md" },
2587
+ animate: { type: Boolean, default: !0 },
2588
+ options: {},
2589
+ label: {},
2590
+ id: {},
2591
+ rounded: { default: "full" },
2592
+ color: { default: "primary" },
2593
+ disabled: { type: Boolean },
2594
+ offIcon: {},
2595
+ onIcon: {},
2596
+ value: { type: Boolean }
2597
+ }, {
2598
+ modelValue: { type: Boolean },
2599
+ modelModifiers: {}
2600
+ }),
2601
+ emits: ["update:modelValue"],
2602
+ setup(e) {
2603
+ const t = e, r = U(e, "modelValue");
2604
+ t.value && (r.value = t.value);
2605
+ const n = g(null), a = g(!1), o = m(() => {
2606
+ switch (t.size) {
2607
+ case "sm":
2608
+ return {
2609
+ icon: "text-xs mx-0.5",
2610
+ wrapper: "h-4 w-8",
2611
+ indicator: a.value ? "h-3 w-4" : "h-3 w-3",
2612
+ inactive: "left-[calc(0.125rem-1px)]",
2613
+ active: a.value ? "left-[calc(0.875rem-1px)]" : "left-[calc(1.125rem-1px)]"
2614
+ };
2615
+ case "md":
2616
+ return {
2617
+ icon: "text-sm mx-1",
2618
+ wrapper: "h-6 w-12",
2619
+ indicator: a.value ? "h-4 w-5" : "h-4 w-4",
2620
+ inactive: "left-[calc(0.25rem-1px)]",
2621
+ active: a.value ? "left-[calc(1.5rem-1px)]" : "left-[calc(1.75rem-1px)]"
2622
+ };
2623
+ case "lg":
2624
+ return {
2625
+ icon: "text-lg mx-2",
2626
+ wrapper: "h-8 w-16",
2627
+ indicator: a.value ? "h-6 w-8" : "h-6 w-6",
2628
+ inactive: "left-[calc(0.25rem-1px)]",
2629
+ active: a.value ? "left-[calc(1.75rem-1px)]" : "left-[calc(2.25rem-1px)]"
2630
+ };
2631
+ }
2632
+ }), s = m(() => t.animate ? {
2633
+ indicator: "transition-all",
2634
+ progress: "transition-width"
2635
+ } : {
2636
+ indicator: "",
2637
+ progress: ""
2638
+ }), i = ct(t), l = m(() => {
2639
+ let d = "bg-primary-container";
2640
+ switch (t.color) {
2641
+ case "secondary":
2642
+ d = "bg-secondary-7";
2643
+ break;
2644
+ case "tertiary":
2645
+ d = "bg-tertiary-7";
2646
+ break;
2647
+ case "error":
2648
+ d = "bg-error-7";
2649
+ break;
2650
+ }
2651
+ return {
2652
+ wrapper: r.value ? `border border-transparent ${d}` : "bg-surface-lowest border border-surface-border-base",
2653
+ indicator: t.disabled ? "bg-surface-high" : "bg-white text-primary-container"
2654
+ };
2655
+ }), u = G(t);
2656
+ return (d, f) => (h(), b("div", {
2657
+ role: "switch",
2658
+ class: y(["relative flex items-center gap-2", {
2659
+ "pointer-events-none filter-grayscale op60": t.disabled
2660
+ }])
2661
+ }, [
2662
+ Te(w("input", xe({
2663
+ id: c(i),
2664
+ "onUpdate:modelValue": f[0] || (f[0] = (v) => r.value = v)
2665
+ }, d.$attrs, {
2666
+ class: "hidden",
2667
+ type: "checkbox"
2668
+ }), null, 16, _n), [
2669
+ [Rt, r.value]
2670
+ ]),
2671
+ w("label", {
2672
+ class: "leading-0 cursor-pointer!",
2673
+ for: c(i)
2674
+ }, [
2675
+ w("div", {
2676
+ ref_key: "wrapper",
2677
+ ref: n,
2678
+ class: y([[c(o).wrapper, c(l).wrapper, c(u).class], "relative inline-block transition-all"]),
2679
+ style: C([c(u).style]),
2680
+ onPointerdown: f[1] || (f[1] = (v) => a.value = !0),
2681
+ onPointerup: f[2] || (f[2] = (v) => a.value = !1),
2682
+ onPointerleave: f[3] || (f[3] = (v) => a.value = !1),
2683
+ onPointerenter: f[4] || (f[4] = (v) => v.buttons === 1 && (a.value = !0))
2684
+ }, [
2685
+ w("div", {
2686
+ class: y(["absolute top-50% -translate-y-50%", [c(o).indicator, c(l).indicator, c(s).indicator, r.value ? c(o).active : c(o).inactive, c(u).class]]),
2687
+ style: C([c(u).style])
2688
+ }, null, 6),
2689
+ w("i", {
2690
+ class: y(["absolute top-1/2 -translate-y-50%", [c(o).icon, {
2691
+ [`left-0 text-${d.color}-on`]: r.value,
2692
+ "right-0 text-surface-on ": !r.value,
2693
+ [d.onIcon ?? ""]: r.value && d.onIcon,
2694
+ [d.offIcon ?? ""]: !r.value && d.offIcon
2695
+ }]])
2696
+ }, null, 2)
2697
+ ], 38)
2698
+ ], 8, xn),
2699
+ d.label ? (h(), b("label", {
2700
+ key: 0,
2701
+ for: c(i)
2702
+ }, se(d.label), 9, kn)) : T("", !0)
2703
+ ], 2));
2704
+ }
2705
+ }), Mn = { class: "dark:hidden" }, $n = { class: "light:hidden" }, ao = /* @__PURE__ */ x({
2706
+ __name: "SchemeSwitch",
2707
+ setup(e) {
2708
+ const t = Hr(), r = m({
2709
+ get() {
2710
+ return t.value === "dark";
2711
+ },
2712
+ set(o) {
2713
+ t.value = o ? "dark" : "light";
2714
+ }
2715
+ });
2716
+ F(() => {
2717
+ Q && (r.value === !0 ? (document.documentElement.setAttribute("data-scheme", "dark"), localStorage.setItem("scheme", "dark")) : r.value === !1 && (document.documentElement.setAttribute("data-scheme", "light"), localStorage.setItem("scheme", "light")));
2718
+ });
2719
+ const n = g(!0), a = g(!1);
2720
+ return ee(() => {
2721
+ if (Q) {
2722
+ const o = localStorage.getItem("scheme");
2723
+ o === "dark" ? r.value = !0 : o === "light" ? r.value = !1 : r.value = window.matchMedia("(prefers-color-scheme: dark)").matches;
2724
+ }
2725
+ n.value = !1;
2726
+ }), et(() => {
2727
+ a.value = !0;
2728
+ }), (o, s) => {
2729
+ const i = Sn;
2730
+ return h(), b(K, null, [
2731
+ w("div", {
2732
+ class: y({ hidden: !c(n) })
2733
+ }, [
2734
+ w("div", Mn, [
2735
+ Z(i, {
2736
+ value: !1,
2737
+ "on-icon": "i-tabler-moon",
2738
+ "off-icon": "i-tabler-sun"
2739
+ })
2740
+ ]),
2741
+ w("div", $n, [
2742
+ Z(i, {
2743
+ value: !0,
2744
+ color: "secondary",
2745
+ "on-icon": "i-tabler-moon",
2746
+ "off-icon": "i-tabler-sun"
2747
+ })
2748
+ ])
2749
+ ], 2),
2750
+ w("div", {
2751
+ class: y({ hidden: c(n) })
2752
+ }, [
2753
+ Z(i, {
2754
+ modelValue: c(r),
2755
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => Bt(r) ? r.value = l : null),
2756
+ animate: c(a),
2757
+ color: "secondary",
2758
+ "on-icon": "i-tabler-moon",
2759
+ "off-icon": "i-tabler-sun"
2760
+ }, null, 8, ["modelValue", "animate"])
2761
+ ], 2)
2762
+ ], 64);
2763
+ };
2764
+ }
2765
+ }), Cn = { class: "w-full flex items-center" }, An = ["placeholder", "value"], Tn = /* @__PURE__ */ w("i", { class: "i-tabler-chevron-down pointer-events-none absolute right-2" }, null, -1), zn = {
2766
+ key: 0,
2767
+ class: "flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"
2768
+ }, En = ["onPointerdown", "onHover"], Rn = { key: 0 }, Bn = /* @__PURE__ */ w("i", { class: "i-tabler-check h-3 w-3" }, null, -1), On = [
2769
+ Bn
2770
+ ], so = /* @__PURE__ */ x({
2771
+ __name: "Select",
2772
+ props: /* @__PURE__ */ j({
2773
+ options: { default() {
2774
+ return [];
2775
+ } },
2776
+ size: { default: "md" },
2777
+ noneText: { default: "No options" },
2778
+ rounded: { default: "md" },
2779
+ placeholder: { default: "" }
2780
+ }, {
2781
+ modelValue: { default: void 0 },
2782
+ modelModifiers: {}
2783
+ }),
2784
+ emits: /* @__PURE__ */ j(["change"], ["update:modelValue"]),
2785
+ setup(e, { emit: t }) {
2786
+ const r = e, n = t, a = G(r), o = U(e, "modelValue"), s = g(null), i = g(null), { focused: l } = tr(s), u = m(() => r.options.map((_) => E(_)).indexOf(o.value)), d = g(-1), f = g(-1);
2787
+ F(() => {
2788
+ l.value || (f.value = -1);
2789
+ }), F(() => {
2790
+ o.value = E(r.options[u.value]);
2791
+ }), de(o, () => {
2792
+ n("change", o.value);
2793
+ });
2794
+ const v = r.options, S = m(() => v[u.value]), A = m(() => z(S.value));
2795
+ function z(_) {
2796
+ if (_)
2797
+ return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.label;
2798
+ }
2799
+ function E(_) {
2800
+ if (_)
2801
+ return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.id;
2802
+ }
2803
+ te("ArrowDown", (_) => {
2804
+ l.value && (_.preventDefault(), f.value = (f.value + 1) % v.length);
2805
+ }), te("ArrowUp", (_) => {
2806
+ l.value && (_.preventDefault(), f.value = (f.value - 1 + v.length) % v.length);
2807
+ }), te("Enter", () => {
2808
+ l.value && f.value !== -1 && (o.value = E(v[f.value]), l.value = !1);
2809
+ });
2810
+ function he(_) {
2811
+ if (!l.value) {
2812
+ l.value = !0;
2813
+ return;
2814
+ }
2815
+ o.value = E(_), l.value = !1;
2816
+ }
2817
+ const Se = m(() => ({
2818
+ input: "container-base focus:border-primary-container"
2819
+ })), Me = m(() => {
2820
+ switch (r.size) {
2821
+ case "sm":
2822
+ return {
2823
+ wrapper: "h-6 w-full py-1 pl-1.5 pr-6 text-sm",
2824
+ dropdown: "text-sm children:py-1"
2825
+ };
2826
+ case "lg":
2827
+ return {
2828
+ wrapper: "h-10 w-full py-2 pl-3 pr-10 text-lg",
2829
+ dropdown: "text-lg children:py-2"
2830
+ };
2831
+ default:
2832
+ return {
2833
+ wrapper: "h-8 w-full py-1 pl-2 pr-8 text-base",
2834
+ dropdown: "text-base children:py-1"
2835
+ };
2836
+ }
2837
+ });
2838
+ return (_, pe) => (h(), b("div", {
2839
+ ref_key: "wrapperRef",
2840
+ ref: i,
2841
+ class: "r-select-wrapper relative"
2842
+ }, [
2843
+ w("div", Cn, [
2844
+ w("input", {
2845
+ ref_key: "inputRef",
2846
+ ref: s,
2847
+ class: y([[c(Se).input, c(Me).wrapper, c(a).class], "r-select-input cursor-pointer border outline-none outline-none focus-visible:outline-2"]),
2848
+ placeholder: _.placeholder,
2849
+ style: C([c(a).style]),
2850
+ readonly: "",
2851
+ value: c(A),
2852
+ "aria-haspopup": "listbox",
2853
+ autocomplete: "off",
2854
+ onFocus: pe[0] || (pe[0] = ($) => l.value = !0)
2855
+ }, null, 46, An),
2856
+ Tn
2857
+ ]),
2858
+ c(l) ? (h(), b("div", {
2859
+ key: 0,
2860
+ class: y([c(Me).dropdown, "absolute z-10 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1"])
2861
+ }, [
2862
+ c(v).length === 0 ? (h(), b("div", zn, se(_.noneText), 1)) : (h(!0), b(K, { key: 1 }, ye(c(v), ($, R) => (h(), b("div", {
2863
+ key: E($),
2864
+ class: y([{
2865
+ "hover:bg-surface-high border-transparent": c(f) !== R,
2866
+ "container-filled-primary": c(f) === R
2867
+ }, "flex cursor-pointer items-center justify-between gap-2 border rounded p-1 px-2"]),
2868
+ onPointerdown: (B) => he($),
2869
+ onHover: (B) => d.value = R
2870
+ }, [
2871
+ Ot(se(z($)) + " ", 1),
2872
+ $ === c(S) ? (h(), b("div", Rn, On)) : T("", !0)
2873
+ ], 42, En))), 128))
2874
+ ], 2)) : T("", !0)
2875
+ ], 512));
2876
+ }
2877
+ }), Hn = { class: "relative inline-block w-full" }, lo = /* @__PURE__ */ x({
2878
+ __name: "Slider",
2879
+ props: /* @__PURE__ */ j({
2880
+ size: { default: "md" },
2881
+ animate: { type: Boolean, default: !1 },
2882
+ width: {},
2883
+ options: {},
2884
+ min: { default: 0 },
2885
+ max: { default: 100 },
2886
+ step: { default: 1 },
2887
+ tickNum: {},
2888
+ color: { default: "primary" },
2889
+ minWidth: { default: 12 }
2890
+ }, {
2891
+ modelValue: {
2892
+ default: void 0
2893
+ },
2894
+ modelModifiers: {}
2895
+ }),
2896
+ emits: ["update:modelValue"],
2897
+ setup(e) {
2898
+ const t = e;
2899
+ function r($, R, B) {
2900
+ const I = [];
2901
+ for (let Y = $; Y <= R; Y += B)
2902
+ I.push(Y);
2903
+ return I[I.length - 1] !== R && I.push(R), I;
2904
+ }
2905
+ function n($, R) {
2906
+ const B = [];
2907
+ B.push(R[0]);
2908
+ const I = (R.length - 1) / ($ - 1);
2909
+ for (let Y = 1; Y < $ - 1; Y++)
2910
+ B.push(R[Math.round(Y * I)]);
2911
+ return B.push(R[R.length - 1]), B;
2912
+ }
2913
+ const a = m(() => t.options ? t.options.length : t.tickNum ?? 0), o = m(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), s = m(() => n(a.value, o.value)), i = U(e, "modelValue"), l = m(() => o.value.length ?? 0), u = g(o.value.includes(i.value) ? o.value.indexOf(i.value) : 0);
2914
+ function d($) {
2915
+ return o.value.indexOf($);
2916
+ }
2917
+ const f = m(() => {
2918
+ switch (t.color) {
2919
+ case "primary":
2920
+ return "bg-primary-container";
2921
+ case "secondary":
2922
+ return "bg-secondary-container";
2923
+ case "tertiary":
2924
+ return "bg-tertiary-container";
2925
+ case "error":
2926
+ return "bg-error-container";
2927
+ }
2928
+ }), v = m(() => `dark:bg-white bg-${t.color}-container`), S = m(() => {
2929
+ switch (t.color) {
2930
+ case "primary":
2931
+ return "dark:bg-primary-container bg-white";
2932
+ case "secondary":
2933
+ return "dark:bg-secondary-container bg-white";
2934
+ case "tertiary":
2935
+ return "dark:bg-tertiary-container bg-white";
2936
+ case "error":
2937
+ return "dark:bg-error-container bg-white";
2938
+ }
2939
+ });
2940
+ F(() => {
2941
+ i.value = o.value[u.value];
2942
+ });
2943
+ const A = g(), z = g(), E = Kt(A), he = g(!1);
2944
+ function Se($) {
2945
+ if (!he.value)
2946
+ return;
2947
+ if (!($.buttons === 1)) {
2948
+ he.value = !1;
2949
+ return;
2950
+ }
2951
+ $.preventDefault(), $.stopPropagation();
2952
+ const { clientX: B } = $, I = E.left.value, _t = E.right.value - I, Be = Math.round((B - I) / _t * (l.value - 1));
2953
+ if (Be < 0) {
2954
+ u.value = 0;
2955
+ return;
2956
+ }
2957
+ if (Be > l.value - 1) {
2958
+ u.value = l.value - 1;
2959
+ return;
2960
+ }
2961
+ u.value = Be;
2962
+ }
2963
+ F(() => {
2964
+ u.value = d(i.value);
2965
+ });
2966
+ function Me($) {
2967
+ $.preventDefault(), $.stopPropagation(), he.value = !0, Se($);
2968
+ }
2969
+ N(A, "pointerdown", Me), ee(() => {
2970
+ N(document, "pointermove", Se), u.value = Math.max(0, d(i.value));
2971
+ });
2972
+ const _ = m(() => {
2973
+ switch (t.size) {
2974
+ case "sm":
2975
+ return {
2976
+ wrapper: "h-2",
2977
+ innerWrapper: "px-0.5 h-1",
2978
+ content: "h-1",
2979
+ tick: "h-0.5 w-0.5 -translate-x-0.25 -translate-y-0.25",
2980
+ indicator: "h-2 w-2 -translate-x-1 -translate-y-1",
2981
+ indicatorInner: "h-1 w-1 -translate-x-0.5 -translate-y-0.5",
2982
+ progress: "-mx-0.5"
2983
+ };
2984
+ case "md":
2985
+ return {
2986
+ wrapper: "h-4",
2987
+ innerWrapper: "px-1 h-2",
2988
+ content: "h-2",
2989
+ tick: "h-1 w-1 -translate-x-0.5 -translate-y-0.5",
2990
+ indicator: "h-4 w-4 -translate-x-2 -translate-y-2",
2991
+ indicatorInner: "h-2 w-2 -translate-x-1 -translate-y-1",
2992
+ progress: "-mx-1"
2993
+ };
2994
+ case "lg":
2995
+ return {
2996
+ wrapper: "h-6",
2997
+ innerWrapper: "px-1.5 h-3",
2998
+ content: "h-3",
2999
+ tick: "h-1.5 w-1.5 -translate-x-0.75 -translate-y-0.75",
3000
+ indicator: "h-6 w-6 -translate-x-3 -translate-y-3",
3001
+ indicatorInner: "h-3 w-3 -translate-x-1.5 -translate-y-1.5",
3002
+ progress: "-mx-1.5"
3003
+ };
3004
+ }
3005
+ }), pe = m(() => t.animate ? {
3006
+ indicator: "transition-left",
3007
+ progress: "transition-width"
3008
+ } : {
3009
+ indicator: "",
3010
+ progress: ""
3011
+ });
3012
+ return ($, R) => (h(), b("div", Hn, [
3013
+ w("div", {
3014
+ ref_key: "wrapper",
3015
+ ref: A,
3016
+ type: "size",
3017
+ class: y(["w-full flex cursor-pointer items-center", c(_).wrapper]),
3018
+ onTouchmove: R[0] || (R[0] = ot(() => {
3019
+ }, ["prevent"]))
3020
+ }, [
3021
+ w("div", {
3022
+ class: y(["w-full rounded-full bg-surface-lowest transition-background-color,border-color,color", c(_).innerWrapper])
3023
+ }, [
3024
+ w("div", {
3025
+ class: y(["relative flex", c(_).content]),
3026
+ style: C({
3027
+ width: `${t.width}rem`,
3028
+ minWidth: `${t.minWidth}rem`
3029
+ })
3030
+ }, [
3031
+ (h(!0), b(K, null, ye(c(s), (B) => (h(), b("div", {
3032
+ key: B,
3033
+ style: C({
3034
+ left: `${d(B) / (c(l) - 1) * 100}%`
3035
+ }),
3036
+ class: y(["absolute top-50% rounded-full bg-white", c(_).tick])
3037
+ }, null, 6))), 128)),
3038
+ c(u) !== -1 ? (h(), b("div", {
3039
+ key: 0,
3040
+ ref_key: "indicator",
3041
+ ref: z,
3042
+ class: y(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [c(_).indicator, c(pe).indicator, c(v)]]),
3043
+ style: C({
3044
+ left: `${c(u) / (c(l) - 1) * 100}%`
3045
+ })
3046
+ }, [
3047
+ w("div", {
3048
+ class: y(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [c(_).indicatorInner, c(S)]])
3049
+ }, null, 2)
3050
+ ], 6)) : T("", !0),
3051
+ w("div", {
3052
+ class: y(["pointer-events-none h-full rounded-full", [c(_).progress, c(pe).progress, c(f)]]),
3053
+ style: C({
3054
+ width: `${c(u) / (c(l) - 1) * 100}%`
3055
+ })
3056
+ }, null, 6)
3057
+ ], 6)
3058
+ ], 2)
3059
+ ], 34),
3060
+ w("div", {
3061
+ class: "relative mx-1 h-1em text-xs text-surface-onlow",
3062
+ style: C({
3063
+ width: `${t.width}rem`
3064
+ })
3065
+ }, [
3066
+ (h(!0), b(K, null, ye(c(s), (B, I) => (h(), b("div", {
3067
+ key: I,
3068
+ style: C({
3069
+ left: `${d(B) / (c(l) - 1) * 100}%`
3070
+ }),
3071
+ class: y(["absolute w-auto flex rounded-full -translate-x-50%", c(_).tick])
3072
+ }, se(B), 7))), 128))
3073
+ ], 4)
3074
+ ]));
3075
+ }
3076
+ }), Nn = { class: "h-full py-2" }, io = /* @__PURE__ */ x({
3077
+ __name: "TabItem",
3078
+ props: {
3079
+ value: {},
3080
+ color: { default: "primary" }
3081
+ },
3082
+ setup(e) {
3083
+ const t = e, r = be(yt, g("")), n = be(wt, m(() => "horizontal")), a = m(() => r.value === t.value);
3084
+ function o() {
3085
+ r.value = t.value;
3086
+ }
3087
+ const s = m(() => {
3088
+ switch (n.value) {
3089
+ case "horizontal":
3090
+ return "flex-col";
3091
+ case "vertical":
3092
+ return "flex-row-reverse";
3093
+ }
3094
+ }), i = m(() => {
3095
+ switch (n.value) {
3096
+ case "horizontal":
3097
+ return "absolute inset-0 top-100% h-2px w-full transition-background-color,border-color,color";
3098
+ case "vertical":
3099
+ return "absolute inset-0 right-100% h-full w-2px bg-primary-container transition-background-color,border-color,color";
3100
+ }
3101
+ }), l = m(() => a.value ? "bg-primary-container" : "bg-surface-lowest");
3102
+ return (u, d) => (h(), b("button", {
3103
+ type: "button",
3104
+ class: y(["relative min-w-20 flex items-center justify-center", [c(s)]]),
3105
+ onClick: o
3106
+ }, [
3107
+ c(a) ? (h(), b("div", {
3108
+ key: 0,
3109
+ class: y([c(i), c(l)])
3110
+ }, null, 2)) : (h(), b("div", {
3111
+ key: 1,
3112
+ class: y([c(i), c(l)])
3113
+ }, null, 2)),
3114
+ w("div", Nn, [
3115
+ k(u.$slots, "default")
3116
+ ])
3117
+ ], 2));
3118
+ }
3119
+ }), co = /* @__PURE__ */ x({
3120
+ __name: "Tabs",
3121
+ props: /* @__PURE__ */ j({
3122
+ defaultValue: {},
3123
+ direction: { default: "horizontal" }
3124
+ }, {
3125
+ modelValue: {},
3126
+ modelModifiers: {}
3127
+ }),
3128
+ emits: ["update:modelValue"],
3129
+ setup(e) {
3130
+ const t = e, r = nt(), n = m(() => {
3131
+ var u;
3132
+ const i = (u = r.default) == null ? void 0 : u.call(r);
3133
+ return (i == null ? void 0 : i.flatMap((d) => d.type === K ? d.children : d).filter((d) => {
3134
+ var f;
3135
+ return ((f = d == null ? void 0 : d.props) == null ? void 0 : f.value) !== void 0;
3136
+ }).map((d) => d.props.value)) ?? [];
3137
+ }), a = U(e, "modelValue");
3138
+ !a.value && n.value.length > 0 && (a.value = n.value[0]), ee(() => {
3139
+ t.defaultValue && (a.value = t.defaultValue);
3140
+ }), ge(yt, a);
3141
+ const o = m(() => t.direction);
3142
+ ge(wt, o), te("left", () => {
3143
+ if (t.direction !== "horizontal")
3144
+ return;
3145
+ const i = a.value ? n.value.indexOf(a.value) : 0;
3146
+ i > 0 ? a.value = n.value[i - 1] : a.value = n.value[n.value.length - 1];
3147
+ }), te("right", () => {
3148
+ if (t.direction !== "horizontal")
3149
+ return;
3150
+ const i = a.value ? n.value.indexOf(a.value) : 0;
3151
+ i < n.value.length - 1 ? a.value = n.value[i + 1] : a.value = n.value[0];
3152
+ }), te("up", () => {
3153
+ if (t.direction !== "vertical")
3154
+ return;
3155
+ const i = a.value ? n.value.indexOf(a.value) : 0;
3156
+ i > 0 ? a.value = n.value[i - 1] : a.value = n.value[n.value.length - 1];
3157
+ }), te("down", () => {
3158
+ if (t.direction !== "vertical")
3159
+ return;
3160
+ const i = a.value ? n.value.indexOf(a.value) : 0;
3161
+ i < n.value.length - 1 ? a.value = n.value[i + 1] : a.value = n.value[0];
3162
+ });
3163
+ const s = m(() => {
3164
+ switch (t.direction) {
3165
+ case "horizontal":
3166
+ return "flex-row";
3167
+ case "vertical":
3168
+ return "flex-col";
3169
+ }
3170
+ });
3171
+ return (i, l) => (h(), b("div", {
3172
+ class: y(["flex", [c(s)]])
3173
+ }, [
3174
+ k(i.$slots, "default")
3175
+ ], 2));
3176
+ }
3177
+ });
3178
+ export {
3179
+ In as AspectRatio,
3180
+ Ht as Avatar,
3181
+ at as Btn,
3182
+ Vn as ChatContainer,
3183
+ Dn as ChatMessage,
3184
+ Fn as ChatSystem,
3185
+ Ln as Chip,
3186
+ jn as ColorInput,
3187
+ ir as ColorSwatch,
3188
+ Un as Drawer,
3189
+ Gn as Dropzone,
3190
+ dt as FullscreenOverlay,
3191
+ qn as Image,
3192
+ Xn as Indicator,
3193
+ Yn as Modal,
3194
+ Yr as Notification,
3195
+ Zn as NotificationSystem,
3196
+ ro as Notifications,
3197
+ Kn as Overlay,
3198
+ Qn as Paper,
3199
+ Jn as PinInput,
3200
+ eo as Progress,
3201
+ oo as RokuProvider,
3202
+ ao as SchemeSwitch,
3203
+ so as Select,
3204
+ lo as Slider,
3205
+ Sn as Switch,
3206
+ io as TabItem,
3207
+ co as Tabs,
3208
+ mn as TextField,
3209
+ Vr as ThemeProvider,
3210
+ Ie as darkTheme,
3211
+ wt as directionSymbol,
3212
+ no as generateColors,
3213
+ wn as generateColorsMap,
3214
+ bn as lightTheme,
3215
+ to as notificationsSymbol,
3216
+ ut as schemeSymbol,
3217
+ yt as tabCurrentSymbol,
3218
+ bt as themeColors,
3219
+ Or as useCurrentTheme,
3220
+ Wn as useCurrentThemeScheme,
3221
+ ct as useId,
3222
+ gn as useNotifications,
3223
+ Br as useRootTheme,
3224
+ Hr as useScheme,
3225
+ it as useThemeStyles
3226
+ };