@roku-ui/vue 0.2.0 → 0.4.0

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