@roku-ui/vue 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +65 -63
- package/dist/index.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as x, openBlock as m, createElementBlock as g, normalizeStyle as C, renderSlot as M, computed as v, ref as b, onMounted as
|
|
1
|
+
import { defineComponent as x, openBlock as m, createElementBlock as g, normalizeStyle as C, renderSlot as M, computed as v, ref as b, onMounted as re, Fragment as J, createBlock as N, resolveDynamicComponent as ce, mergeProps as ye, unref as u, createCommentVNode as T, getCurrentScope as yt, onScopeDispose as wt, nextTick as et, getCurrentInstance as tt, watch as ue, shallowRef as _t, readonly as kt, watchEffect as F, withCtx as W, normalizeClass as y, createElementVNode as k, mergeModels as Y, useModel as Q, inject as Ie, provide as ze, useAttrs as xt, withDirectives as Ve, vModelText as St, createVNode as X, Teleport as Mt, Transition as rt, useSlots as $t, toDisplayString as ae, renderList as ve, withModifiers as nt, withKeys as Ct, reactive as At, vModelCheckbox as Tt, isRef as Et, createTextVNode as Rt } from "vue";
|
|
2
2
|
const On = /* @__PURE__ */ x({
|
|
3
3
|
__name: "AspectRatio",
|
|
4
4
|
props: {
|
|
@@ -47,10 +47,10 @@ const On = /* @__PURE__ */ x({
|
|
|
47
47
|
function o() {
|
|
48
48
|
n.value = !0;
|
|
49
49
|
}
|
|
50
|
-
return
|
|
50
|
+
return re(() => {
|
|
51
51
|
var s;
|
|
52
52
|
(s = a.value) != null && s.complete && o();
|
|
53
|
-
}), (s, l) => (m(), g(
|
|
53
|
+
}), (s, l) => (m(), g(J, null, [
|
|
54
54
|
s.src ? (m(), N(ce(s.is), ye({
|
|
55
55
|
key: 0,
|
|
56
56
|
ref_key: "img",
|
|
@@ -112,7 +112,7 @@ function Ot() {
|
|
|
112
112
|
function $e(e) {
|
|
113
113
|
return typeof e == "function" ? e() : u(e);
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const Z = typeof window < "u" && typeof document < "u";
|
|
116
116
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
117
117
|
const Ht = (e) => e != null, Pt = Object.prototype.toString, Nt = (e) => Pt.call(e) === "[object Object]", It = () => {
|
|
118
118
|
}, Vt = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
@@ -120,14 +120,14 @@ function Dt(e) {
|
|
|
120
120
|
return e || tt();
|
|
121
121
|
}
|
|
122
122
|
function Ft(e, t = !0, r) {
|
|
123
|
-
Dt() ?
|
|
123
|
+
Dt() ? re(e, r) : t ? e() : et(e);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function ee(e) {
|
|
126
126
|
var t;
|
|
127
127
|
const r = $e(e);
|
|
128
128
|
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
129
129
|
}
|
|
130
|
-
const de =
|
|
130
|
+
const de = Z ? window : void 0, Lt = Z ? window.document : void 0;
|
|
131
131
|
function P(...e) {
|
|
132
132
|
let t, r, n, a;
|
|
133
133
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, a] = e, t = de) : [t, r, n, a] = e, !t)
|
|
@@ -136,7 +136,7 @@ function P(...e) {
|
|
|
136
136
|
const o = [], s = () => {
|
|
137
137
|
o.forEach((d) => d()), o.length = 0;
|
|
138
138
|
}, l = (d, f, h, w) => (d.addEventListener(f, h, w), () => d.removeEventListener(f, h, w)), i = ue(
|
|
139
|
-
() => [
|
|
139
|
+
() => [ee(t), $e(a)],
|
|
140
140
|
([d, f]) => {
|
|
141
141
|
if (s(), !d)
|
|
142
142
|
return;
|
|
@@ -169,7 +169,7 @@ function Ee(...e) {
|
|
|
169
169
|
}
|
|
170
170
|
function jt() {
|
|
171
171
|
const e = b(!1);
|
|
172
|
-
return tt() &&
|
|
172
|
+
return tt() && re(() => {
|
|
173
173
|
e.value = !0;
|
|
174
174
|
}), e;
|
|
175
175
|
}
|
|
@@ -197,7 +197,7 @@ function Gt(e, t, r = {}) {
|
|
|
197
197
|
const s = De(() => n && "MutationObserver" in n), l = () => {
|
|
198
198
|
o && (o.disconnect(), o = void 0);
|
|
199
199
|
}, i = ue(
|
|
200
|
-
() =>
|
|
200
|
+
() => ee(e),
|
|
201
201
|
(f) => {
|
|
202
202
|
l(), s.value && n && f && (o = new MutationObserver(t), o.observe(f, a));
|
|
203
203
|
},
|
|
@@ -214,7 +214,7 @@ function Gt(e, t, r = {}) {
|
|
|
214
214
|
function Ut(e, t = {}) {
|
|
215
215
|
const r = b(!1), n = _t(null);
|
|
216
216
|
let a = 0, o = !0;
|
|
217
|
-
if (
|
|
217
|
+
if (Z) {
|
|
218
218
|
const s = typeof t == "function" ? { onDrop: t } : t, l = (i) => {
|
|
219
219
|
var c, d;
|
|
220
220
|
const f = Array.from((d = (c = i.dataTransfer) == null ? void 0 : c.files) != null ? d : []);
|
|
@@ -250,7 +250,7 @@ function qt(e, t, r = {}) {
|
|
|
250
250
|
let o;
|
|
251
251
|
const s = De(() => n && "ResizeObserver" in n), l = () => {
|
|
252
252
|
o && (o.disconnect(), o = void 0);
|
|
253
|
-
}, i = v(() => Array.isArray(e) ? e.map((f) =>
|
|
253
|
+
}, i = v(() => Array.isArray(e) ? e.map((f) => ee(f)) : [ee(e)]), c = ue(
|
|
254
254
|
i,
|
|
255
255
|
(f) => {
|
|
256
256
|
if (l(), s.value && n) {
|
|
@@ -276,7 +276,7 @@ function Xt(e, t = {}) {
|
|
|
276
276
|
immediate: o = !0
|
|
277
277
|
} = t, s = b(0), l = b(0), i = b(0), c = b(0), d = b(0), f = b(0), h = b(0), w = b(0);
|
|
278
278
|
function A() {
|
|
279
|
-
const E =
|
|
279
|
+
const E = ee(e);
|
|
280
280
|
if (!E) {
|
|
281
281
|
r && (s.value = 0, l.value = 0, i.value = 0, c.value = 0, d.value = 0, f.value = 0, h.value = 0, w.value = 0);
|
|
282
282
|
return;
|
|
@@ -284,7 +284,7 @@ function Xt(e, t = {}) {
|
|
|
284
284
|
const R = E.getBoundingClientRect();
|
|
285
285
|
s.value = R.height, l.value = R.bottom, i.value = R.left, c.value = R.right, d.value = R.top, f.value = R.width, h.value = R.x, w.value = R.y;
|
|
286
286
|
}
|
|
287
|
-
return qt(e, A), ue(() =>
|
|
287
|
+
return qt(e, A), ue(() => ee(e), (E) => !E && A()), Gt(e, A, {
|
|
288
288
|
attributeFilter: ["style", "class"]
|
|
289
289
|
}), a && P("scroll", A, { capture: !0, passive: !0 }), n && P("resize", A, { passive: !0 }), Ft(() => {
|
|
290
290
|
o && A();
|
|
@@ -348,7 +348,7 @@ function Kt(e = {}) {
|
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
350
|
function Qt(e, t = {}) {
|
|
351
|
-
const { initialValue: r = !1, focusVisible: n = !1 } = t, a = b(!1), o = v(() =>
|
|
351
|
+
const { initialValue: r = !1, focusVisible: n = !1 } = t, a = b(!1), o = v(() => ee(e));
|
|
352
352
|
P(o, "focus", (l) => {
|
|
353
353
|
var i, c;
|
|
354
354
|
(!n || (c = (i = l.target).matches) != null && c.call(i, ":focus-visible")) && (a.value = !0);
|
|
@@ -630,7 +630,7 @@ const Hn = /* @__PURE__ */ er(tr, [["render", nr]]), Pn = /* @__PURE__ */ x({
|
|
|
630
630
|
}),
|
|
631
631
|
emits: ["update:modelValue"],
|
|
632
632
|
setup(e) {
|
|
633
|
-
const t = e, r =
|
|
633
|
+
const t = e, r = Q(e, "modelValue"), n = j(t), a = v(() => {
|
|
634
634
|
switch (t.size) {
|
|
635
635
|
case "sm":
|
|
636
636
|
return "px-3 text-sm h-6";
|
|
@@ -1378,7 +1378,7 @@ function Tr(e) {
|
|
|
1378
1378
|
};
|
|
1379
1379
|
}
|
|
1380
1380
|
function Er() {
|
|
1381
|
-
if (
|
|
1381
|
+
if (!Z)
|
|
1382
1382
|
return b("dark");
|
|
1383
1383
|
const e = b(document.documentElement.dataset.scheme);
|
|
1384
1384
|
return new MutationObserver((r) => {
|
|
@@ -1483,7 +1483,7 @@ function it(e, t = !0) {
|
|
|
1483
1483
|
}
|
|
1484
1484
|
function lt(e) {
|
|
1485
1485
|
const t = b("");
|
|
1486
|
-
return
|
|
1486
|
+
return re(() => {
|
|
1487
1487
|
e.id ? t.value = e.id : t.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
|
|
1488
1488
|
}), t;
|
|
1489
1489
|
}
|
|
@@ -1499,7 +1499,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1499
1499
|
},
|
|
1500
1500
|
emits: ["update:modelValue"],
|
|
1501
1501
|
setup(e) {
|
|
1502
|
-
const t =
|
|
1502
|
+
const t = Q(e, "modelValue"), r = xt(), n = lt(r), a = b(null);
|
|
1503
1503
|
return (o, s) => {
|
|
1504
1504
|
const l = ar;
|
|
1505
1505
|
return m(), g("div", null, [
|
|
@@ -1549,7 +1549,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1549
1549
|
}),
|
|
1550
1550
|
emits: ["update:modelValue"],
|
|
1551
1551
|
setup(e) {
|
|
1552
|
-
const t = e, r =
|
|
1552
|
+
const t = e, r = Q(e, "modelValue"), n = b(null);
|
|
1553
1553
|
function a(l) {
|
|
1554
1554
|
t.persistent || l.target === n.value && (r.value = !1);
|
|
1555
1555
|
}
|
|
@@ -1606,7 +1606,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1606
1606
|
}),
|
|
1607
1607
|
emits: ["update:modelValue"],
|
|
1608
1608
|
setup(e) {
|
|
1609
|
-
const t = e, r =
|
|
1609
|
+
const t = e, r = Q(e, "modelValue");
|
|
1610
1610
|
return F(() => {
|
|
1611
1611
|
r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
|
|
1612
1612
|
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
@@ -1708,7 +1708,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1708
1708
|
function a() {
|
|
1709
1709
|
r.value = !0;
|
|
1710
1710
|
}
|
|
1711
|
-
|
|
1711
|
+
re(() => {
|
|
1712
1712
|
var s;
|
|
1713
1713
|
(s = n.value) != null && s.complete && a();
|
|
1714
1714
|
});
|
|
@@ -1845,7 +1845,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1845
1845
|
}),
|
|
1846
1846
|
emits: ["update:modelValue"],
|
|
1847
1847
|
setup(e) {
|
|
1848
|
-
const t = e, r =
|
|
1848
|
+
const t = e, r = Q(e, "modelValue");
|
|
1849
1849
|
return F(() => {
|
|
1850
1850
|
r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
|
|
1851
1851
|
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
@@ -1954,8 +1954,8 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1954
1954
|
o.title ? (m(), g("div", {
|
|
1955
1955
|
key: 0,
|
|
1956
1956
|
class: y([u(a), "text-base"])
|
|
1957
|
-
},
|
|
1958
|
-
o.$slots.message ? M(o.$slots, "message", { key: 1 }) : o.message ? (m(), g("div", jr,
|
|
1957
|
+
}, ae(o.title), 3)) : T("", !0),
|
|
1958
|
+
o.$slots.message ? M(o.$slots, "message", { key: 1 }) : o.message ? (m(), g("div", jr, ae(o.message), 1)) : T("", !0)
|
|
1959
1959
|
]),
|
|
1960
1960
|
o.closeable ? (m(), N(l, {
|
|
1961
1961
|
key: 2,
|
|
@@ -1972,14 +1972,14 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1972
1972
|
], 6);
|
|
1973
1973
|
};
|
|
1974
1974
|
}
|
|
1975
|
-
}), dt = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(),
|
|
1976
|
-
let
|
|
1975
|
+
}), dt = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), qr = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakSet();
|
|
1976
|
+
let K, Fe = 0, Le = 0;
|
|
1977
1977
|
const U = "__aa_tgt", be = "__aa_del", Me = "__aa_new", Xr = (e) => {
|
|
1978
1978
|
const t = Jr(e);
|
|
1979
1979
|
t && t.forEach((r) => en(r));
|
|
1980
1980
|
}, Yr = (e) => {
|
|
1981
1981
|
e.forEach((t) => {
|
|
1982
|
-
t.target ===
|
|
1982
|
+
t.target === K && Kr(), O.has(t.target) && ne(t.target);
|
|
1983
1983
|
});
|
|
1984
1984
|
};
|
|
1985
1985
|
function Zr(e) {
|
|
@@ -1988,25 +1988,25 @@ function Zr(e) {
|
|
|
1988
1988
|
let r = O.get(e), n = 0;
|
|
1989
1989
|
const a = 5;
|
|
1990
1990
|
r || (r = le(e), O.set(e, r));
|
|
1991
|
-
const { offsetWidth: o, offsetHeight: s } =
|
|
1991
|
+
const { offsetWidth: o, offsetHeight: s } = K, i = [
|
|
1992
1992
|
r.top - a,
|
|
1993
1993
|
o - (r.left + a + r.width),
|
|
1994
1994
|
s - (r.top + a + r.height),
|
|
1995
1995
|
r.left - a
|
|
1996
1996
|
].map((d) => `${-1 * Math.floor(d)}px`).join(" "), c = new IntersectionObserver(() => {
|
|
1997
|
-
++n > 1 &&
|
|
1997
|
+
++n > 1 && ne(e);
|
|
1998
1998
|
}, {
|
|
1999
|
-
root:
|
|
1999
|
+
root: K,
|
|
2000
2000
|
threshold: 1,
|
|
2001
2001
|
rootMargin: i
|
|
2002
2002
|
});
|
|
2003
2003
|
c.observe(e), Oe.set(e, c);
|
|
2004
2004
|
}
|
|
2005
|
-
function
|
|
2005
|
+
function ne(e) {
|
|
2006
2006
|
clearTimeout(Se.get(e));
|
|
2007
2007
|
const t = Ae(e), r = ge(t) ? 500 : t.duration;
|
|
2008
2008
|
Se.set(e, setTimeout(async () => {
|
|
2009
|
-
const n =
|
|
2009
|
+
const n = te.get(e);
|
|
2010
2010
|
try {
|
|
2011
2011
|
await (n == null ? void 0 : n.finished), O.set(e, le(e)), Zr(e);
|
|
2012
2012
|
} catch {
|
|
@@ -2014,22 +2014,22 @@ function re(e) {
|
|
|
2014
2014
|
}, r));
|
|
2015
2015
|
}
|
|
2016
2016
|
function Kr() {
|
|
2017
|
-
clearTimeout(Se.get(
|
|
2018
|
-
dt.forEach((e) => mt(e, (t) => ft(() =>
|
|
2017
|
+
clearTimeout(Se.get(K)), Se.set(K, setTimeout(() => {
|
|
2018
|
+
dt.forEach((e) => mt(e, (t) => ft(() => ne(t))));
|
|
2019
2019
|
}, 100));
|
|
2020
2020
|
}
|
|
2021
2021
|
function Qr(e) {
|
|
2022
2022
|
setTimeout(() => {
|
|
2023
|
-
qr.set(e, setInterval(() => ft(
|
|
2023
|
+
qr.set(e, setInterval(() => ft(ne.bind(null, e)), 2e3));
|
|
2024
2024
|
}, Math.round(2e3 * Math.random()));
|
|
2025
2025
|
}
|
|
2026
2026
|
function ft(e) {
|
|
2027
2027
|
typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
|
|
2028
2028
|
}
|
|
2029
|
-
let He,
|
|
2030
|
-
typeof window < "u" && (
|
|
2029
|
+
let He, oe;
|
|
2030
|
+
typeof window < "u" && (K = document.documentElement, He = new MutationObserver(Xr), oe = new ResizeObserver(Yr), window.addEventListener("scroll", () => {
|
|
2031
2031
|
Le = window.scrollY, Fe = window.scrollX;
|
|
2032
|
-
}),
|
|
2032
|
+
}), oe.observe(K));
|
|
2033
2033
|
function Jr(e) {
|
|
2034
2034
|
return e.reduce((n, a) => [
|
|
2035
2035
|
...n,
|
|
@@ -2070,7 +2070,7 @@ function Re(e, t) {
|
|
|
2070
2070
|
function en(e) {
|
|
2071
2071
|
var t;
|
|
2072
2072
|
const r = e.isConnected, n = O.has(e);
|
|
2073
|
-
r && se.has(e) && se.delete(e),
|
|
2073
|
+
r && se.has(e) && se.delete(e), te.has(e) && ((t = te.get(e)) === null || t === void 0 || t.cancel()), Me in e ? Qe(e) : n && r ? rn(e) : n && !r ? nn(e) : Qe(e);
|
|
2074
2074
|
}
|
|
2075
2075
|
function L(e) {
|
|
2076
2076
|
return Number(e.replace(/[^0-9.\-]/g, ""));
|
|
@@ -2148,7 +2148,7 @@ function rn(e) {
|
|
|
2148
2148
|
const [o] = je(a(e, "remain", t, r));
|
|
2149
2149
|
n = new Animation(o), n.play();
|
|
2150
2150
|
}
|
|
2151
|
-
|
|
2151
|
+
te.set(e, n), O.set(e, r), n.addEventListener("finish", ne.bind(null, e));
|
|
2152
2152
|
}
|
|
2153
2153
|
function Qe(e) {
|
|
2154
2154
|
Me in e && delete e[Me];
|
|
@@ -2171,11 +2171,11 @@ function Qe(e) {
|
|
|
2171
2171
|
const [a] = je(r(e, "add", t));
|
|
2172
2172
|
n = new Animation(a), n.play();
|
|
2173
2173
|
}
|
|
2174
|
-
|
|
2174
|
+
te.set(e, n), n.addEventListener("finish", ne.bind(null, e));
|
|
2175
2175
|
}
|
|
2176
2176
|
function Je(e, t) {
|
|
2177
2177
|
var r;
|
|
2178
|
-
e.remove(), O.delete(e), se.delete(e),
|
|
2178
|
+
e.remove(), O.delete(e), se.delete(e), te.delete(e), (r = Oe.get(e)) === null || r === void 0 || r.disconnect(), setTimeout(() => {
|
|
2179
2179
|
if (be in e && delete e[be], Object.defineProperty(e, Me, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
|
|
2180
2180
|
for (const n in t)
|
|
2181
2181
|
e.style[n] = "";
|
|
@@ -2218,11 +2218,11 @@ function nn(e) {
|
|
|
2218
2218
|
const [A, E] = je(d(e, "remove", f));
|
|
2219
2219
|
(E == null ? void 0 : E.styleReset) !== !1 && (w = (E == null ? void 0 : E.styleReset) || w, Object.assign(e.style, w)), h = new Animation(A), h.play();
|
|
2220
2220
|
}
|
|
2221
|
-
|
|
2221
|
+
te.set(e, h), h.addEventListener("finish", Je.bind(null, e, w));
|
|
2222
2222
|
}
|
|
2223
2223
|
function on(e, t, r, n) {
|
|
2224
2224
|
const a = Fe - t, o = Le - r, s = document.documentElement.style.scrollBehavior;
|
|
2225
|
-
if (getComputedStyle(
|
|
2225
|
+
if (getComputedStyle(K).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + a, window.scrollY + o), !e.parentElement)
|
|
2226
2226
|
return;
|
|
2227
2227
|
const i = e.parentElement;
|
|
2228
2228
|
let c = i.clientHeight, d = i.clientWidth;
|
|
@@ -2250,7 +2250,7 @@ function an(e) {
|
|
|
2250
2250
|
return [l, i, r, n];
|
|
2251
2251
|
}
|
|
2252
2252
|
function sn(e, t = {}) {
|
|
2253
|
-
return He &&
|
|
2253
|
+
return He && oe && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !ge(t) && !t.disrespectUserMotionPreference || (me.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), mt(e, ne, Qr, (a) => oe == null ? void 0 : oe.observe(a)), ge(t) ? ie.set(e, t) : ie.set(e, { duration: 250, easing: "ease-in-out", ...t }), He.observe(e, { childList: !0 }), dt.add(e))), Object.freeze({
|
|
2254
2254
|
parent: e,
|
|
2255
2255
|
enable: () => {
|
|
2256
2256
|
me.add(e);
|
|
@@ -2274,7 +2274,7 @@ const ln = {
|
|
|
2274
2274
|
return (r, n) => {
|
|
2275
2275
|
const a = Ur;
|
|
2276
2276
|
return Ve((m(), g("div", cn, [
|
|
2277
|
-
(m(!0), g(
|
|
2277
|
+
(m(!0), g(J, null, ve(u(t), (o) => (m(), N(a, {
|
|
2278
2278
|
key: o.hash,
|
|
2279
2279
|
closeable: "",
|
|
2280
2280
|
"with-border": "",
|
|
@@ -2442,7 +2442,7 @@ const ln = {
|
|
|
2442
2442
|
l !== 0 && (r.value[l - 1].el.focus(), r.value[l - 1].el.select(), s || (r.value[l - 1].el.value = ""));
|
|
2443
2443
|
}
|
|
2444
2444
|
return (o, s) => (m(), g("div", hn, [
|
|
2445
|
-
(m(!0), g(
|
|
2445
|
+
(m(!0), g(J, null, ve(t.length, (l) => (m(), N(fn, {
|
|
2446
2446
|
ref_for: !0,
|
|
2447
2447
|
ref_key: "inputs",
|
|
2448
2448
|
ref: r,
|
|
@@ -2555,7 +2555,7 @@ const eo = /* @__PURE__ */ x({
|
|
|
2555
2555
|
},
|
|
2556
2556
|
setup(e) {
|
|
2557
2557
|
const t = e, r = b(0), n = b(0), a = b(t.theme.scheme);
|
|
2558
|
-
|
|
2558
|
+
Z && (new ResizeObserver(() => {
|
|
2559
2559
|
const d = window.innerWidth - document.body.clientWidth;
|
|
2560
2560
|
d !== 0 && (r.value = d), n.value = d;
|
|
2561
2561
|
}).observe(document.body), new MutationObserver(() => {
|
|
@@ -2566,6 +2566,8 @@ const eo = /* @__PURE__ */ x({
|
|
|
2566
2566
|
}));
|
|
2567
2567
|
const o = v(() => n.value === r.value ? "0px" : `${r.value}px`), s = Jt();
|
|
2568
2568
|
F(() => {
|
|
2569
|
+
if (!Z)
|
|
2570
|
+
return "dark";
|
|
2569
2571
|
a.value === "dark" ? document.documentElement.dataset.scheme = "dark" : a.value === "light" ? document.documentElement.dataset.scheme = "light" : s.value === "dark" ? document.documentElement.dataset.scheme = "dark" : document.documentElement.dataset.scheme = "light", localStorage.setItem("scheme", document.documentElement.dataset.scheme);
|
|
2570
2572
|
}), ze(ct, a);
|
|
2571
2573
|
const l = it(t.theme);
|
|
@@ -2603,7 +2605,7 @@ const eo = /* @__PURE__ */ x({
|
|
|
2603
2605
|
}),
|
|
2604
2606
|
emits: ["update:modelValue"],
|
|
2605
2607
|
setup(e) {
|
|
2606
|
-
const t = e, r =
|
|
2608
|
+
const t = e, r = Q(e, "modelValue");
|
|
2607
2609
|
t.value && (r.value = t.value);
|
|
2608
2610
|
const n = b(null), a = b(!1), o = v(() => {
|
|
2609
2611
|
switch (t.size) {
|
|
@@ -2702,7 +2704,7 @@ const eo = /* @__PURE__ */ x({
|
|
|
2702
2704
|
d.label ? (m(), g("label", {
|
|
2703
2705
|
key: 0,
|
|
2704
2706
|
for: u(l)
|
|
2705
|
-
},
|
|
2707
|
+
}, ae(d.label), 9, wn)) : T("", !0)
|
|
2706
2708
|
], 2));
|
|
2707
2709
|
}
|
|
2708
2710
|
}), kn = { class: "dark:hidden" }, xn = { class: "light:hidden" }, to = /* @__PURE__ */ x({
|
|
@@ -2717,11 +2719,11 @@ const eo = /* @__PURE__ */ x({
|
|
|
2717
2719
|
}
|
|
2718
2720
|
});
|
|
2719
2721
|
F(() => {
|
|
2720
|
-
|
|
2722
|
+
Z && (r.value === !0 ? (document.documentElement.setAttribute("data-scheme", "dark"), localStorage.setItem("scheme", "dark")) : r.value === !1 && (document.documentElement.setAttribute("data-scheme", "light"), localStorage.setItem("scheme", "light")));
|
|
2721
2723
|
});
|
|
2722
2724
|
const n = b(!0), a = b(!1);
|
|
2723
|
-
return
|
|
2724
|
-
if (
|
|
2725
|
+
return re(() => {
|
|
2726
|
+
if (Z) {
|
|
2725
2727
|
const o = localStorage.getItem("scheme");
|
|
2726
2728
|
o === "dark" ? r.value = !0 : o === "light" ? r.value = !1 : r.value = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
2727
2729
|
}
|
|
@@ -2730,7 +2732,7 @@ const eo = /* @__PURE__ */ x({
|
|
|
2730
2732
|
a.value = !0;
|
|
2731
2733
|
}), (o, s) => {
|
|
2732
2734
|
const l = _n;
|
|
2733
|
-
return m(), g(
|
|
2735
|
+
return m(), g(J, null, [
|
|
2734
2736
|
k("div", {
|
|
2735
2737
|
class: y({ hidden: !u(n) })
|
|
2736
2738
|
}, [
|
|
@@ -2786,7 +2788,7 @@ const eo = /* @__PURE__ */ x({
|
|
|
2786
2788
|
}),
|
|
2787
2789
|
emits: /* @__PURE__ */ Y(["change"], ["update:modelValue"]),
|
|
2788
2790
|
setup(e, { emit: t }) {
|
|
2789
|
-
const r = e, n = t, a = j(r), o =
|
|
2791
|
+
const r = e, n = t, a = j(r), o = Q(e, "modelValue"), s = b(null), l = b(null), { focused: i } = Qt(s), c = v(() => r.options.map((_) => R(_)).indexOf(o.value)), d = b(-1), f = b(-1);
|
|
2790
2792
|
F(() => {
|
|
2791
2793
|
i.value || (f.value = -1);
|
|
2792
2794
|
}), F(() => {
|
|
@@ -2862,7 +2864,7 @@ const eo = /* @__PURE__ */ x({
|
|
|
2862
2864
|
key: 0,
|
|
2863
2865
|
class: y([u(ke).dropdown, "absolute z-1 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1"])
|
|
2864
2866
|
}, [
|
|
2865
|
-
u(h).length === 0 ? (m(), g("div", Cn,
|
|
2867
|
+
u(h).length === 0 ? (m(), g("div", Cn, ae(_.noneText), 1)) : (m(!0), g(J, { key: 1 }, ve(u(h), ($, z) => (m(), g("div", {
|
|
2866
2868
|
key: R($),
|
|
2867
2869
|
class: y([{
|
|
2868
2870
|
"hover:bg-surface-high": u(f) !== z,
|
|
@@ -2871,7 +2873,7 @@ const eo = /* @__PURE__ */ x({
|
|
|
2871
2873
|
onPointerdown: (B) => fe($),
|
|
2872
2874
|
onHover: (B) => d.value = z
|
|
2873
2875
|
}, [
|
|
2874
|
-
Rt(
|
|
2876
|
+
Rt(ae(E($)) + " ", 1),
|
|
2875
2877
|
$ === u(w) ? (m(), g("div", Tn, Rn)) : T("", !0)
|
|
2876
2878
|
], 42, An))), 128))
|
|
2877
2879
|
], 2)) : T("", !0)
|
|
@@ -2913,7 +2915,7 @@ const eo = /* @__PURE__ */ x({
|
|
|
2913
2915
|
B.push(z[Math.round(q * I)]);
|
|
2914
2916
|
return B.push(z[z.length - 1]), B;
|
|
2915
2917
|
}
|
|
2916
|
-
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)), l =
|
|
2918
|
+
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)), l = Q(e, "modelValue"), i = v(() => o.value.length ?? 0), c = b(o.value.includes(l.value) ? o.value.indexOf(l.value) : 0);
|
|
2917
2919
|
function d($) {
|
|
2918
2920
|
return o.value.indexOf($);
|
|
2919
2921
|
}
|
|
@@ -2969,7 +2971,7 @@ const eo = /* @__PURE__ */ x({
|
|
|
2969
2971
|
function ke($) {
|
|
2970
2972
|
$.preventDefault(), $.stopPropagation(), fe.value = !0, _e($);
|
|
2971
2973
|
}
|
|
2972
|
-
P(A, "pointerdown", ke),
|
|
2974
|
+
P(A, "pointerdown", ke), re(() => {
|
|
2973
2975
|
P(document, "pointermove", _e), c.value = Math.max(0, d(l.value));
|
|
2974
2976
|
});
|
|
2975
2977
|
const _ = v(() => {
|
|
@@ -3031,7 +3033,7 @@ const eo = /* @__PURE__ */ x({
|
|
|
3031
3033
|
minWidth: `${t.minWidth}rem`
|
|
3032
3034
|
})
|
|
3033
3035
|
}, [
|
|
3034
|
-
(m(!0), g(
|
|
3036
|
+
(m(!0), g(J, null, ve(u(s), (B) => (m(), g("div", {
|
|
3035
3037
|
key: B,
|
|
3036
3038
|
style: C({
|
|
3037
3039
|
left: `${d(B) / (u(i) - 1) * 100}%`
|
|
@@ -3066,13 +3068,13 @@ const eo = /* @__PURE__ */ x({
|
|
|
3066
3068
|
width: `${t.width}rem`
|
|
3067
3069
|
})
|
|
3068
3070
|
}, [
|
|
3069
|
-
(m(!0), g(
|
|
3071
|
+
(m(!0), g(J, null, ve(u(s), (B, I) => (m(), g("div", {
|
|
3070
3072
|
key: I,
|
|
3071
3073
|
style: C({
|
|
3072
3074
|
left: `${d(B) / (u(i) - 1) * 100}%`
|
|
3073
3075
|
}),
|
|
3074
3076
|
class: y(["absolute w-auto flex rounded-full -translate-x-50%", u(_).tick])
|
|
3075
|
-
},
|
|
3077
|
+
}, ae(B), 7))), 128))
|
|
3076
3078
|
], 4)
|
|
3077
3079
|
]));
|
|
3078
3080
|
}
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h["roku-ui"]={},h.Vue))})(this,function(h,e){"use strict";const tt=e.defineComponent({__name:"AspectRatio",props:{ratio:{default:1},width:{},maxWidth:{},height:{},maxHeight:{}},setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({"--ar-ratio":r.ratio,width:r.width,"max-width":r.maxWidth,height:r.height,"max-height":r.maxHeight}),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-['']"},[e.renderSlot(r.$slots,"default")],4))}}),Me=e.defineComponent({__name:"Avatar",props:{is:{default:"img"},src:{},size:{default:"md"},style:{},class:{}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"--size: 1.5rem;";case"md":return"--size: 2rem;";case"lg":return"--size: 3rem;";default:return typeof r.size=="number"||!Number.isNaN(Number(r.size))?`--size: ${r.size}rem;`:`--size: ${r.size};`}}),o=e.ref(!1),s=e.ref(null);function a(){o.value=!0}return e.onMounted(()=>{var l;(l=s.value)!=null&&l.complete&&a()}),(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.src?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.is),e.mergeProps({key:0,ref_key:"img",ref:s,style:[l.style,e.unref(n)],placeholder:"",src:l.src,class:["h-[var(--size)] w-[var(--size)] rounded-full object-cover",[{hidden:!e.unref(o)},r.class]]},l.$attrs,{onLoad:a}),null,16,["style","src","class"])):e.createCommentVNode("",!0),e.unref(o)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:"h-[var(--size)] w-[var(--size)] animate-pulse border-transparent rounded-full bg-surface-high object-cover",style:e.normalizeStyle([l.style,e.unref(n)])},null,4))],64))}});function v(t){return e.computed(()=>({style:rt(t.rounded),class:"rounded-[var(--r-rounded)]"}))}function rt(t){const r=/^-?\d*\.?\d+(px|em|rem|vh|vw|in|cm|mm|pt|pc|%)?$/;switch(t){case"none":return"--r-rounded: 0";case"sm":return"--r-rounded: 0.125rem";case"md":return"--r-rounded: 0.25rem";case"lg":return"--r-rounded: 0.5rem";case"full":return"--r-rounded: 9999px";default:return typeof t=="string"&&r.test(t)?`--r-rounded: ${t};`:typeof t=="number"||!Number.isNaN(Number(t))?`--r-rounded: ${t}rem;`:"rounded-[var(--r-rounded)]"}}function G(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function nt(){const t=new Set,r=s=>{t.delete(s)};return{on:s=>{t.add(s);const a=()=>r(s);return G(a),{off:a}},off:r,trigger:(...s)=>Promise.all(Array.from(t).map(a=>a(...s)))}}function J(t){return typeof t=="function"?t():e.unref(t)}const D=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ot=t=>t!=null,at=Object.prototype.toString,st=t=>at.call(t)==="[object Object]",lt=()=>{},it=(t,r)=>Object.prototype.hasOwnProperty.call(t,r);function ct(t){return t||e.getCurrentInstance()}function dt(t,r=!0,n){ct()?e.onMounted(t,n):r?t():e.nextTick(t)}function O(t){var r;const n=J(t);return(r=n==null?void 0:n.$el)!=null?r:n}const F=D?window:void 0,ft=D?window.document:void 0;function M(...t){let r,n,o,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,s]=t,r=F):[r,n,o,s]=t,!r)return lt;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],l=()=>{a.forEach(f=>f()),a.length=0},c=(f,u,m,g)=>(f.addEventListener(u,m,g),()=>f.removeEventListener(u,m,g)),i=e.watch(()=>[O(r),J(s)],([f,u])=>{if(l(),!f)return;const m=st(u)?{...u}:u;a.push(...n.flatMap(g=>o.map(k=>c(f,g,k,m))))},{immediate:!0,flush:"post"}),d=()=>{i(),l()};return G(d),d}function ut(t){return typeof t=="function"?t:typeof t=="string"?r=>r.key===t:Array.isArray(t)?r=>t.includes(r.key):()=>!0}function ie(...t){let r,n,o={};t.length===3?(r=t[0],n=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(r=!0,n=t[0],o=t[1]):(r=t[0],n=t[1]):(r=!0,n=t[0]);const{target:s=F,eventName:a="keydown",passive:l=!1,dedupe:c=!1}=o,i=ut(r);return M(s,a,f=>{f.repeat&&J(c)||i(f)&&n(f)},l)}function mt(){const t=e.ref(!1);return e.getCurrentInstance()&&e.onMounted(()=>{t.value=!0}),t}function ce(t){const r=mt();return e.computed(()=>(r.value,!!t()))}function Ee(t,r={}){const{window:n=F}=r,o=ce(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const a=e.ref(!1),l=d=>{a.value=d.matches},c=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",l):s.removeListener(l))},i=e.watchEffect(()=>{o.value&&(c(),s=n.matchMedia(J(t)),"addEventListener"in s?s.addEventListener("change",l):s.addListener(l),a.value=s.matches)});return G(()=>{i(),c(),s=void 0}),a}function pt(t,r,n={}){const{window:o=F,...s}=n;let a;const l=ce(()=>o&&"MutationObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},i=e.watch(()=>O(t),u=>{c(),l.value&&o&&u&&(a=new MutationObserver(r),a.observe(u,s))},{immediate:!0}),d=()=>a==null?void 0:a.takeRecords(),f=()=>{c(),i()};return G(f),{isSupported:l,stop:f,takeRecords:d}}function ht(t,r={}){const n=e.ref(!1),o=e.shallowRef(null);let s=0,a=!0;if(D){const l=typeof r=="function"?{onDrop:r}:r,c=i=>{var d,f;const u=Array.from((f=(d=i.dataTransfer)==null?void 0:d.files)!=null?f:[]);return o.value=u.length===0?null:u};M(t,"dragenter",i=>{var d,f;const u=Array.from(((d=i==null?void 0:i.dataTransfer)==null?void 0:d.items)||[]).map(m=>m.kind==="file"?m.type:null).filter(ot);if(l.dataTypes&&i.dataTransfer){const m=e.unref(l.dataTypes);if(a=typeof m=="function"?m(u):m?m.some(g=>u.includes(g)):!0,!a)return}i.preventDefault(),s+=1,n.value=!0,(f=l.onEnter)==null||f.call(l,c(i),i)}),M(t,"dragover",i=>{var d;a&&(i.preventDefault(),(d=l.onOver)==null||d.call(l,c(i),i))}),M(t,"dragleave",i=>{var d;a&&(i.preventDefault(),s-=1,s===0&&(n.value=!1),(d=l.onLeave)==null||d.call(l,c(i),i))}),M(t,"drop",i=>{var d;i.preventDefault(),s=0,n.value=!1,(d=l.onDrop)==null||d.call(l,c(i),i)})}return{files:o,isOverDropZone:n}}function gt(t,r,n={}){const{window:o=F,...s}=n;let a;const l=ce(()=>o&&"ResizeObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},i=e.computed(()=>Array.isArray(t)?t.map(u=>O(u)):[O(t)]),d=e.watch(i,u=>{if(c(),l.value&&o){a=new ResizeObserver(r);for(const m of u)m&&a.observe(m,s)}},{immediate:!0,flush:"post",deep:!0}),f=()=>{c(),d()};return G(f),{isSupported:l,stop:f}}function bt(t,r={}){const{reset:n=!0,windowResize:o=!0,windowScroll:s=!0,immediate:a=!0}=r,l=e.ref(0),c=e.ref(0),i=e.ref(0),d=e.ref(0),f=e.ref(0),u=e.ref(0),m=e.ref(0),g=e.ref(0);function k(){const _=O(t);if(!_){n&&(l.value=0,c.value=0,i.value=0,d.value=0,f.value=0,u.value=0,m.value=0,g.value=0);return}const C=_.getBoundingClientRect();l.value=C.height,c.value=C.bottom,i.value=C.left,d.value=C.right,f.value=C.top,u.value=C.width,m.value=C.x,g.value=C.y}return gt(t,k),e.watch(()=>O(t),_=>!_&&k()),pt(t,k,{attributeFilter:["style","class"]}),s&&M("scroll",k,{capture:!0,passive:!0}),o&&M("resize",k,{passive:!0}),dt(()=>{a&&k()}),{height:l,bottom:c,left:i,right:d,top:f,width:u,x:m,y:g,update:k}}function yt(t,r={}){const{delayEnter:n=0,delayLeave:o=0,window:s=F}=r,a=e.ref(!1);let l;const c=i=>{const d=i?n:o;l&&(clearTimeout(l),l=void 0),d?l=setTimeout(()=>a.value=i,d):a.value=i};return s&&(M(t,"mouseenter",()=>c(!0),{passive:!0}),M(t,"mouseleave",()=>c(!1),{passive:!0})),a}const wt={multiple:!0,accept:"*",reset:!1,directory:!1};function kt(t={}){const{document:r=ft}=t,n=e.ref(null),{on:o,trigger:s}=nt();let a;r&&(a=r.createElement("input"),a.type="file",a.onchange=i=>{const d=i.target;n.value=d.files,s(n.value)});const l=()=>{n.value=null,a&&(a.value="",s(null))},c=i=>{if(!a)return;const d={...wt,...t,...i};a.multiple=d.multiple,a.accept=d.accept,a.webkitdirectory=d.directory,it(d,"capture")&&(a.capture=d.capture),d.reset&&l(),a.click()};return{files:e.readonly(n),open:c,reset:l,onChange:o}}function _t(t,r={}){const{initialValue:n=!1,focusVisible:o=!1}=r,s=e.ref(!1),a=e.computed(()=>O(t));M(a,"focus",c=>{var i,d;(!o||(d=(i=c.target).matches)!=null&&d.call(i,":focus-visible"))&&(s.value=!0)}),M(a,"blur",()=>s.value=!1);const l=e.computed({get:()=>s.value,set(c){var i,d;!c&&s.value?(i=a.value)==null||i.blur():c&&!s.value&&((d=a.value)==null||d.focus())}});return e.watch(a,()=>{l.value=n},{immediate:!0,flush:"post"}),{focused:l}}function Ct(t){const r=Ee("(prefers-color-scheme: light)",t),n=Ee("(prefers-color-scheme: dark)",t);return e.computed(()=>n.value?"dark":r.value?"light":"no-preference")}const de=e.defineComponent({__name:"Btn",props:{type:{default:"button"},size:{default:"md"},is:{default:"button"},icon:{type:Boolean,default:!1},pressEffect:{default:"translate"},variant:{},hoverVariant:{},color:{},animate:{type:Boolean},rounded:{default:"md"},disabled:{type:Boolean,default:!1}},setup(t){const r=t,n=v(r),o=e.computed(()=>{switch(r.size){case"sm":return{normalContent:"min-w-16 h-6 px-2 py-1 text-xs",iconContent:"h-6 w-6 p-1"};case"md":return{normalContent:"min-w-20 h-8 px-3 py-1 text-sm",iconContent:"h-8 w-8 p-2"};case"lg":return{normalContent:"min-w-24 h-10 px-4 py-2 text-base",iconContent:"h-10 w-10 p-3"}}}),s=e.ref(null),a=yt(s),l=e.computed(()=>r.hoverVariant&&a.value?r.hoverVariant:r.variant),c=e.computed(()=>{switch(l.value){case"filled":switch(r.color){case"secondary":return"btn-filled-secondary";case"tertiary":return"btn-filled-tertiary";case"error":return"btn-filled-error";default:return"btn-filled-primary"}case"ghost":case"light":switch(r.color){case"secondary":return"btn-light-secondary";case"tertiary":return"btn-light-tertiary";case"error":return"btn-light-error";default:return"btn-light-primary"}case"constrast":switch(r.color){case"secondary":return"btn-constrast-secondary";case"tertiary":return"btn-constrast-tertiary";case"error":return"btn-constrast-error";default:return"btn-constrast-primary"}case"outline":switch(r.color){case"secondary":return"btn-outline-secondary";case"tertiary":return"btn-outline-tertiary";case"error":return"btn-outline-error";default:return"btn-outline-primary"}case"subtle":switch(r.color){case"secondary":return"btn-subtle-secondary";case"tertiary":return"btn-subtle-tertiary";case"error":return"btn-subtle-error";default:return"btn-subtle-primary"}case"transparent":switch(r.color){case"secondary":return"btn-transparent-secondary";case"tertiary":return"btn-transparent-tertiary";case"error":return"btn-transparent-error";default:return"btn-transparent-primary"}default:return"btn-default"}});return(i,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.is),e.mergeProps({ref_key:"btn",ref:s,"data-size":i.size,type:i.type,class:["flex items-center justify-center gap-1 decoration-none",[e.unref(c),e.unref(n).class,i.icon?e.unref(o).iconContent:e.unref(o).normalContent,{"filter-grayscale pointer-events-none":i.disabled,"active:translate-y-0.25":i.pressEffect==="translate","active:scale-98":i.pressEffect==="scale","transition-all":i.animate}]],style:[e.unref(n).style],disabled:i.disabled},i.$attrs),{default:e.withCtx(()=>[i.$slots.leftSection?e.renderSlot(i.$slots,"leftSection",{key:0}):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default"),i.$slots.rightSection?e.renderSlot(i.$slots,"rightSection",{key:1}):e.createCommentVNode("",!0)]),_:3},16,["data-size","type","style","class","disabled"]))}}),St=(t,r)=>{const n=t.__vccOpts||t;for(const[o,s]of r)n[o]=s;return n},Bt={},xt={class:"flex flex-col gap-4 container"};function Mt(t,r){return e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"default")])}const Et=St(Bt,[["render",Mt]]),$t=e.defineComponent({__name:"ChatMessage",props:{avatar:{},position:{default:"left"},color:{},variant:{default:"default"},withBorder:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>{switch(r.variant){case"default":return"bg-surface-base";case"filled":switch(r.color){case"secondary":return"bg-secondary-container text-secondary-on";case"tertiary":return"bg-tertiary-container text-tertiary-on";case"error":return"bg-error-container text-error-on";default:return"bg-primary-container text-primary-on"}case"transparent":return"bg-transparent"}});return(o,s)=>{const a=Me;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex gap-2",[{"flex-row-reverse":o.position==="right","flex-row":o.position==="left"}]])},[o.$slots.avatar?e.renderSlot(o.$slots,"avatar",{key:0}):o.avatar?(e.openBlock(),e.createBlock(a,{key:1,src:o.avatar},null,8,["src"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["rounded-xl px-3 py-2 transition-background-color,border-color",[{"rounded-tr":o.position==="right","rounded-tl":o.position==="left",border:o.withBorder},e.unref(n)]])},[e.renderSlot(o.$slots,"default")],2)],2)}}}),zt={class:"w-full flex self-center gap-2 text-center"},Nt=e.defineComponent({__name:"ChatSystem",props:{position:{},color:{},variant:{default:"default"},withBorder:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>{switch(r.variant){case"default":return"bg-surface-base";case"fill":switch(r.color){case"secondary":return"bg-secondary-container text-secondary-on";case"tertiary":return"bg-tertiary-container text-tertiary-on";case"error":return"bg-error-container text-error-on";default:return"bg-primary-container text-primary-on"}case"transparent":return"bg-transparent"}});return(o,s)=>(e.openBlock(),e.createElementBlock("div",zt,[e.createElementVNode("div",{class:e.normalizeClass(["w-full rounded-xl px-3 py-2 transition-background-color,border-color",[e.unref(n)]])},[e.renderSlot(o.$slots,"default")],2)]))}}),vt=e.defineComponent({__name:"Chip",props:e.mergeModels({is:{default:"img"},src:{},size:{default:"md"},style:{},class:{},rounded:{default:"full"}},{modelValue:{type:Boolean,default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue"),o=v(r),s=e.computed(()=>{switch(r.size){case"sm":return"px-3 text-sm h-6";case"md":return"px-6 h-8 text-base";case"lg":return"px-8 h-10 text-lg"}}),a=e.computed(()=>n.value?"container-filled-primary border-transparent":"container-base"),l=e.computed(()=>n.value!==void 0),c=e.computed(()=>l.value?"cursor-pointer":"");return(i,d)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-flex items-center gap-1",[e.unref(o).class,e.unref(s),e.unref(a),e.unref(c)]]),style:e.normalizeStyle([e.unref(o).style]),onPointerup:d[0]||(d[0]=f=>e.unref(l)&&(n.value=!n.value))},[i.$slots.leftSection?e.renderSlot(i.$slots,"leftSection",{key:0}):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default"),i.$slots.rightSection?e.renderSlot(i.$slots,"rightSection",{key:1}):e.createCommentVNode("",!0)],38))}}),$e=e.defineComponent({__name:"ColorSwatch",props:{color:{},is:{default:"div"},withBorder:{type:Boolean,default:!1}},setup(t){return(r,n)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.is),{class:e.normalizeClass(["h-6 w-6 border rounded-full",[{"border border-surface-border-base":r.withBorder,"border border-transparent":!r.withBorder}]]),style:e.normalizeStyle({backgroundColor:r.color})},null,8,["class","style"]))}});function ee(t){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ee(t)}var Vt=/^\s+/,At=/\s+$/;function p(t,r){if(t=t||"",r=r||{},t instanceof p)return t;if(!(this instanceof p))return new p(t,r);var n=Tt(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||n.format,this._gradientType=r.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=n.ok}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),n,o,s,a,l,c;return n=r.r/255,o=r.g/255,s=r.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),s<=.03928?c=s/12.92:c=Math.pow((s+.055)/1.055,2.4),.2126*a+.7152*l+.0722*c},setAlpha:function(r){return this._a=Te(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=Ne(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=Ne(this._r,this._g,this._b),n=Math.round(r.h*360),o=Math.round(r.s*100),s=Math.round(r.v*100);return this._a==1?"hsv("+n+", "+o+"%, "+s+"%)":"hsva("+n+", "+o+"%, "+s+"%, "+this._roundA+")"},toHsl:function(){var r=ze(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=ze(this._r,this._g,this._b),n=Math.round(r.h*360),o=Math.round(r.s*100),s=Math.round(r.l*100);return this._a==1?"hsl("+n+", "+o+"%, "+s+"%)":"hsla("+n+", "+o+"%, "+s+"%, "+this._roundA+")"},toHex:function(r){return ve(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return Ht(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(y(this._r,255)*100)+"%",g:Math.round(y(this._g,255)*100)+"%",b:Math.round(y(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(y(this._r,255)*100)+"%, "+Math.round(y(this._g,255)*100)+"%, "+Math.round(y(this._b,255)*100)+"%)":"rgba("+Math.round(y(this._r,255)*100)+"%, "+Math.round(y(this._g,255)*100)+"%, "+Math.round(y(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Zt[ve(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var n="#"+Ve(this._r,this._g,this._b,this._a),o=n,s=this._gradientType?"GradientType = 1, ":"";if(r){var a=p(r);o="#"+Ve(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+s+"startColorstr="+n+",endColorstr="+o+")"},toString:function(r){var n=!!r;r=r||this._format;var o=!1,s=this._a<1&&this._a>=0,a=!n&&s&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return a?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(o=this.toRgbString()),r==="prgb"&&(o=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(o=this.toHexString()),r==="hex3"&&(o=this.toHexString(!0)),r==="hex4"&&(o=this.toHex8String(!0)),r==="hex8"&&(o=this.toHex8String()),r==="name"&&(o=this.toName()),r==="hsl"&&(o=this.toHslString()),r==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return p(this.toString())},_applyModification:function(r,n){var o=r.apply(null,[this].concat([].slice.call(n)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(Lt,arguments)},brighten:function(){return this._applyModification(Wt,arguments)},darken:function(){return this._applyModification(jt,arguments)},desaturate:function(){return this._applyModification(It,arguments)},saturate:function(){return this._applyModification(Dt,arguments)},greyscale:function(){return this._applyModification(Ft,arguments)},spin:function(){return this._applyModification(qt,arguments)},_applyCombination:function(r,n){return r.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(Xt,arguments)},complement:function(){return this._applyCombination(Gt,arguments)},monochromatic:function(){return this._applyCombination(Yt,arguments)},splitcomplement:function(){return this._applyCombination(Ut,arguments)},triad:function(){return this._applyCombination(Ae,[3])},tetrad:function(){return this._applyCombination(Ae,[4])}},p.fromRatio=function(t,r){if(ee(t)=="object"){var n={};for(var o in t)t.hasOwnProperty(o)&&(o==="a"?n[o]=t[o]:n[o]=U(t[o]));t=n}return p(t,r)};function Tt(t){var r={r:0,g:0,b:0},n=1,o=null,s=null,a=null,l=!1,c=!1;return typeof t=="string"&&(t=er(t)),ee(t)=="object"&&(A(t.r)&&A(t.g)&&A(t.b)?(r=Rt(t.r,t.g,t.b),l=!0,c=String(t.r).substr(-1)==="%"?"prgb":"rgb"):A(t.h)&&A(t.s)&&A(t.v)?(o=U(t.s),s=U(t.v),r=Ot(t.h,o,s),l=!0,c="hsv"):A(t.h)&&A(t.s)&&A(t.l)&&(o=U(t.s),a=U(t.l),r=Pt(t.h,o,a),l=!0,c="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=Te(n),{ok:l,format:t.format||c,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:n}}function Rt(t,r,n){return{r:y(t,255)*255,g:y(r,255)*255,b:y(n,255)*255}}function ze(t,r,n){t=y(t,255),r=y(r,255),n=y(n,255);var o=Math.max(t,r,n),s=Math.min(t,r,n),a,l,c=(o+s)/2;if(o==s)a=l=0;else{var i=o-s;switch(l=c>.5?i/(2-o-s):i/(o+s),o){case t:a=(r-n)/i+(r<n?6:0);break;case r:a=(n-t)/i+2;break;case n:a=(t-r)/i+4;break}a/=6}return{h:a,s:l,l:c}}function Pt(t,r,n){var o,s,a;t=y(t,360),r=y(r,100),n=y(n,100);function l(d,f,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?d+(f-d)*6*u:u<1/2?f:u<2/3?d+(f-d)*(2/3-u)*6:d}if(r===0)o=s=a=n;else{var c=n<.5?n*(1+r):n+r-n*r,i=2*n-c;o=l(i,c,t+1/3),s=l(i,c,t),a=l(i,c,t-1/3)}return{r:o*255,g:s*255,b:a*255}}function Ne(t,r,n){t=y(t,255),r=y(r,255),n=y(n,255);var o=Math.max(t,r,n),s=Math.min(t,r,n),a,l,c=o,i=o-s;if(l=o===0?0:i/o,o==s)a=0;else{switch(o){case t:a=(r-n)/i+(r<n?6:0);break;case r:a=(n-t)/i+2;break;case n:a=(t-r)/i+4;break}a/=6}return{h:a,s:l,v:c}}function Ot(t,r,n){t=y(t,360)*6,r=y(r,100),n=y(n,100);var o=Math.floor(t),s=t-o,a=n*(1-r),l=n*(1-s*r),c=n*(1-(1-s)*r),i=o%6,d=[n,l,a,a,c,n][i],f=[c,n,n,l,a,a][i],u=[a,a,c,n,n,l][i];return{r:d*255,g:f*255,b:u*255}}function ve(t,r,n,o){var s=[z(Math.round(t).toString(16)),z(Math.round(r).toString(16)),z(Math.round(n).toString(16))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function Ht(t,r,n,o,s){var a=[z(Math.round(t).toString(16)),z(Math.round(r).toString(16)),z(Math.round(n).toString(16)),z(Re(o))];return s&&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[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Ve(t,r,n,o){var s=[z(Re(o)),z(Math.round(t).toString(16)),z(Math.round(r).toString(16)),z(Math.round(n).toString(16))];return s.join("")}p.equals=function(t,r){return!t||!r?!1:p(t).toRgbString()==p(r).toRgbString()},p.random=function(){return p.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function It(t,r){r=r===0?0:r||10;var n=p(t).toHsl();return n.s-=r/100,n.s=te(n.s),p(n)}function Dt(t,r){r=r===0?0:r||10;var n=p(t).toHsl();return n.s+=r/100,n.s=te(n.s),p(n)}function Ft(t){return p(t).desaturate(100)}function Lt(t,r){r=r===0?0:r||10;var n=p(t).toHsl();return n.l+=r/100,n.l=te(n.l),p(n)}function Wt(t,r){r=r===0?0:r||10;var n=p(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(r/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(r/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(r/100)))),p(n)}function jt(t,r){r=r===0?0:r||10;var n=p(t).toHsl();return n.l-=r/100,n.l=te(n.l),p(n)}function qt(t,r){var n=p(t).toHsl(),o=(n.h+r)%360;return n.h=o<0?360+o:o,p(n)}function Gt(t){var r=p(t).toHsl();return r.h=(r.h+180)%360,p(r)}function Ae(t,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var n=p(t).toHsl(),o=[p(t)],s=360/r,a=1;a<r;a++)o.push(p({h:(n.h+a*s)%360,s:n.s,l:n.l}));return o}function Ut(t){var r=p(t).toHsl(),n=r.h;return[p(t),p({h:(n+72)%360,s:r.s,l:r.l}),p({h:(n+216)%360,s:r.s,l:r.l})]}function Xt(t,r,n){r=r||6,n=n||30;var o=p(t).toHsl(),s=360/n,a=[p(t)];for(o.h=(o.h-(s*r>>1)+720)%360;--r;)o.h=(o.h+s)%360,a.push(p(o));return a}function Yt(t,r){r=r||6;for(var n=p(t).toHsv(),o=n.h,s=n.s,a=n.v,l=[],c=1/r;r--;)l.push(p({h:o,s,v:a})),a=(a+c)%1;return l}p.mix=function(t,r,n){n=n===0?0:n||50;var o=p(t).toRgb(),s=p(r).toRgb(),a=n/100,l={r:(s.r-o.r)*a+o.r,g:(s.g-o.g)*a+o.g,b:(s.b-o.b)*a+o.b,a:(s.a-o.a)*a+o.a};return p(l)},p.readability=function(t,r){var n=p(t),o=p(r);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)},p.isReadable=function(t,r,n){var o=p.readability(t,r),s,a;switch(a=!1,s=tr(n),s.level+s.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7;break}return a},p.mostReadable=function(t,r,n){var o=null,s=0,a,l,c,i;n=n||{},l=n.includeFallbackColors,c=n.level,i=n.size;for(var d=0;d<r.length;d++)a=p.readability(t,r[d]),a>s&&(s=a,o=p(r[d]));return p.isReadable(t,o,{level:c,size:i})||!l?o:(n.includeFallbackColors=!1,p.mostReadable(t,["#fff","#000"],n))};var fe=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Zt=p.hexNames=Kt(fe);function Kt(t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[t[n]]=n);return r}function Te(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function y(t,r){Qt(t)&&(t="100%");var n=Jt(t);return t=Math.min(r,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function te(t){return Math.min(1,Math.max(0,t))}function E(t){return parseInt(t,16)}function Qt(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Jt(t){return typeof t=="string"&&t.indexOf("%")!=-1}function z(t){return t.length==1?"0"+t:""+t}function U(t){return t<=1&&(t=t*100+"%"),t}function Re(t){return Math.round(parseFloat(t)*255).toString(16)}function Pe(t){return E(t)/255}var N=function(){var t="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",n="(?:"+r+")|(?:"+t+")",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",s="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+s),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+s),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+s),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function A(t){return!!N.CSS_UNIT.exec(t)}function er(t){t=t.replace(Vt,"").replace(At,"").toLowerCase();var r=!1;if(fe[t])t=fe[t],r=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=N.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=N.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=N.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=N.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=N.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=N.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=N.hex8.exec(t))?{r:E(n[1]),g:E(n[2]),b:E(n[3]),a:Pe(n[4]),format:r?"name":"hex8"}:(n=N.hex6.exec(t))?{r:E(n[1]),g:E(n[2]),b:E(n[3]),format:r?"name":"hex"}:(n=N.hex4.exec(t))?{r:E(n[1]+""+n[1]),g:E(n[2]+""+n[2]),b:E(n[3]+""+n[3]),a:Pe(n[4]+""+n[4]),format:r?"name":"hex8"}:(n=N.hex3.exec(t))?{r:E(n[1]+""+n[1]),g:E(n[2]+""+n[2]),b:E(n[3]+""+n[3]),format:r?"name":"hex"}:!1}function tr(t){var r,n;return t=t||{level:"AA",size:"small"},r=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:r,size:n}}function Oe(){if(typeof window>"u")return e.ref("dark");const t=e.ref(document.documentElement.dataset.scheme);return new MutationObserver(n=>{n.forEach(o=>{o.type==="attributes"&&o.attributeName==="data-scheme"&&(t.value=document.documentElement.dataset.scheme)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-scheme"]}),t}function rr(){return e.inject("currentThemeScheme",null)}function He(){return e.inject("currentTheme",e.ref(ae))}function ue(t,r=!0){const n=e.ref(t),o=e.ref(t.scheme),s=Oe();e.watchEffect(()=>{s.value&&(o.value=s.value)}),e.provide("currentTheme",n),e.provide("currentThemeScheme",o);const l={...Object.keys(n.value.colors).map(d=>{const f=d;return n.value.colors[f].reduce((m,g,k)=>{const _=p(g).toRgb();return m[`--r-color-${f}-${k}`]=`${_.r} ${_.g} ${_.b}`,m},{})}).reduce((d,f)=>({...d,...f}),{})},c={"font-family":"'Roboto', sans-serif","background-color":"rgb(var(--r-color-surface-lowest))",color:"rgb(var(--r-color-surface-on))"},i=e.computed(()=>{if(r)return{};const{scheme:d}=t;switch(d){case"dark":return{colorScheme:"dark","--r-color-surface-on":"var(--r-color-surface-3)","--r-color-surface-oninverted":"var(--r-color-surface-8)","--r-color-surface-onlow":"var(--r-color-surface-4)","--r-color-surface-onlowinverted":"var(--r-color-surface-7)","--r-color-surface-lowest":"var(--r-color-surface-10)","--r-color-surface-low":"var(--r-color-surface-9)","--r-color-surface-base":"var(--r-color-surface-8)","--r-color-surface-high":"var(--r-color-surface-7)","--r-color-surface-highest":"var(--r-color-surface-6)","--r-color-surface-border":"var(--r-color-surface-7)","--r-color-primary-container":"var(--r-color-primary-8)","--r-color-secondary-container":"var(--r-color-secondary-8)","--r-color-tertiary-container":"var(--r-color-tertiary-8)","--r-color-error-container":"var(--r-color-error-8)","--r-color-primary-containerd":"var(--r-color-primary-9)","--r-color-secondary-containerd":"var(--r-color-secondary-9)","--r-color-tertiary-containerd":"var(--r-color-tertiary-9)","--r-color-error-containerd":"var(--r-color-error-9)","--r-color-primary-containerl":"var(--r-color-primary-6)","--r-color-secondary-containerl":"var(--r-color-secondary-6)","--r-color-tertiary-containerl":"var(--r-color-tertiary-6)","--r-color-error-containerl":"var(--r-color-error-6)"};case"light":return{colorScheme:"light","--r-color-surface-on":"var(--r-color-surface-7)","--r-color-surface-oninverted":"var(--r-color-surface-2)","--r-color-surface-onlow":"var(--r-color-surface-6)","--r-color-surface-onlowinverted":"var(--r-color-surface-3)","--r-color-surface-lowest":"var(--r-color-surface-3)","--r-color-surface-low":"var(--r-color-surface-2)","--r-color-surface-base":"var(--r-color-surface-1)","--r-color-surface-high":"var(--r-color-surface-0)","--r-color-surface-highest":"var(--r-color-surface-0)","--r-color-surface-border":"var(--r-color-surface-4)","--r-color-primary-container":"var(--r-color-primary-6)","--r-color-secondary-container":"var(--r-color-secondary-6)","--r-color-tertiary-container":"var(--r-color-tertiary-6)","--r-color-error-container":"var(--r-color-error-6)","--r-color-primary-containerd":"var(--r-color-primary-7)","--r-color-secondary-containerd":"var(--r-color-secondary-7)","--r-color-tertiary-containerd":"var(--r-color-tertiary-7)","--r-color-error-containerd":"var(--r-color-error-7)","--r-color-primary-containerl":"var(--r-color-primary-4)","--r-color-secondary-containerl":"var(--r-color-secondary-4)","--r-color-tertiary-containerl":"var(--r-color-tertiary-4)","--r-color-error-containerl":"var(--r-color-error-4)"}}});return{...l,...c,...i.value}}function me(t){const r=e.ref("");return e.onMounted(()=>{t.id?r.value=t.id:r.value=`switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`}),r}const pe=Symbol("scheme");function Ie(){return e.inject(pe,e.ref("dark"))}const nr=["id"],or=["for"],ar=e.defineComponent({__name:"ColorInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(t){const r=e.useModel(t,"modelValue"),n=e.useAttrs(),o=me(n),s=e.ref(null);return(a,l)=>{const c=$e;return e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("input",{id:e.unref(o),ref_key:"input",ref:s,"onUpdate:modelValue":l[0]||(l[0]=i=>r.value=i),type:"color",class:"pointer-events-none absolute opacity-0"},null,8,nr),[[e.vModelText,r.value]]),e.createElementVNode("label",{for:e.unref(o)},[e.createVNode(c,{class:"cursor-pointer",color:r.value??"#222"},null,8,["color"])],8,or)])}}}),sr=["data-scheme","data-theme"],De=e.defineComponent({__name:"ThemeProvider",props:{theme:{}},setup(t){const n=ue(t.theme,!1);return(o,s)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle([e.unref(n)]),"data-scheme":o.theme.scheme,"data-theme":o.theme.name},[e.renderSlot(o.$slots,"default")],12,sr))}}),he=e.defineComponent({__name:"FullscreenOverlay",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1},wrapperClass:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue"),o=e.ref(null);function s(c){r.persistent||c.target===o.value&&(n.value=!1)}const a=e.computed(()=>{switch(r.blur){case"sm":return"backdrop-blur-sm";case"md":case!0:return"backdrop-blur-md";case"lg":return"backdrop-blur-lg";default:return""}});e.watchEffect(()=>{n.value?document.body.style.overflow="hidden":setTimeout(()=>{document.querySelector(".modal-wrapper.op100")||(document.body.style.overflow="",document.body.style.marginRight="")},300)});const l=He();return(c,i)=>{const d=De;return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(d,{theme:e.unref(l)},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"wrapperRef",ref:o,class:e.normalizeClass(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full bg-surface-lowest/50 transition-all duration-300 md:items-center",[a.value,c.wrapperClass,{"op0 pointer-events-none":!n.value,op100:n.value}]]),onClick:s},[e.renderSlot(c.$slots,"default")],2)]),_:3},8,["theme"])])}}}),lr={class:"flex justify-end p-4 md:px-6 md:py-4 md:pb-0"},ir=e.createElementVNode("i",{class:"i-tabler-x"},null,-1),cr={class:"h-full flex flex-col items-center justify-center px-4 md:px-6"},dr=e.defineComponent({__name:"Drawer",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1},position:{default:"left"}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue");return e.watchEffect(()=>{n.value?document.body.style.overflow="hidden":setTimeout(()=>{document.querySelector(".modal-wrapper.op100")||(document.body.style.overflow="",document.body.style.marginRight="")},300)}),(o,s)=>{const a=de,l=he;return e.openBlock(),e.createBlock(l,{modelValue:n.value,"onUpdate:modelValue":s[1]||(s[1]=c=>n.value=c),blur:r.blur,persistent:r.persistent},{default:e.withCtx(()=>[e.createVNode(e.Transition,{"enter-from-class":o.position==="left"?"-translate-x-1/1":"translate-x-1/1","enter-to-class":(o.position==="left","translate-x-0"),"leave-from-class":(o.position==="left","translate-x-0"),"leave-to-class":o.position==="left"?"-translate-x-1/1":"translate-x-1/1","enter-active-class":"transition ease-out duration-300","leave-active-class":"transition ease-in duration-200"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["fixed h-full w-full bg-surface-low md:w-md",o.position==="left"?"left-0":"right-0"])},[e.createElementVNode("div",lr,[e.createVNode(a,{icon:"",variant:"transparent",class:"text-surface-on hover:text-surface-on",onPointerup:s[0]||(s[0]=c=>n.value=!1)},{default:e.withCtx(()=>[ir]),_:1})]),e.createElementVNode("div",cr,[e.renderSlot(o.$slots,"default")])],2)):e.createCommentVNode("",!0)]),_:3},8,["enter-from-class","enter-to-class","leave-from-class","leave-to-class"])]),_:3},8,["modelValue","blur","persistent"])}}}),fr=e.defineComponent({__name:"Dropzone",props:{dashed:{type:Boolean,default:!0},accept:{default:"*"}},emits:["drop"],setup(t,{emit:r}){const n=t,o=r,s=e.ref(),{onChange:a,open:l}=kt({accept:n.accept});a(i=>{i?o("drop",Array.from(i)):o("drop",null)});const{isOverDropZone:c}=ht(s,{onDrop:i=>{o("drop",i)}});return(i,d)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropZoneRef",ref:s,class:e.normalizeClass([{"":e.unref(c)," bg-surface-low":!e.unref(c),"border-dashed":i.dashed},"h-full w-full flex cursor-pointer items-center justify-center rounded"]),onPointerup:d[0]||(d[0]=()=>e.unref(l)())},[e.renderSlot(i.$slots,"default")],34))}}),ur=e.defineComponent({__name:"Image",props:{is:{default:"img"},src:{},style:{},class:{},width:{},maxWidth:{},height:{},maxHeight:{},rounded:{default:"md"}},setup(t){const r=t,n=e.ref(!1),o=e.ref(null);function s(){n.value=!0}e.onMounted(()=>{var l;(l=o.value)!=null&&l.complete&&s()});const a=v(r);return(l,c)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:l.height,width:l.width,maxHeight:l.maxHeight,maxWidth:l.maxWidth})},[l.src?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.is),e.mergeProps({key:0,ref_key:"img",ref:o,style:[l.style,e.unref(a).style],src:l.src,class:["h-full w-full object-cover",[r.class,e.unref(a).class,{hidden:!e.unref(n)}]]},l.$attrs,{onLoad:s}),null,16,["style","src","class"])):e.createCommentVNode("",!0),e.unref(n)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["h-full w-full animate-pulse border-transparent bg-surface-high object-cover",[r.class,e.unref(a).class]]),style:e.normalizeStyle([l.style,e.unref(a).style])},null,6))],4))}}),mr={class:"relative"},pr=e.defineComponent({__name:"Indicator",props:{color:{default:"primary"},size:{default:"md"},position:{default:"top-right"},ping:{type:Boolean}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"w-2 h-2";case"md":return"w-3 h-3";case"lg":return"w-4 h-4";default:return typeof r.size=="number"||!Number.isNaN(Number(r.size))?`w-${r.size} h-${r.size}`:r.size}}),o=e.useSlots(),s=e.computed(()=>{if(!o.label)return"";switch(r.size){case"sm":return"text-sm children:px-1.5";case"md":return"text-md children:px-2";case"lg":return"text-lg children:px-2.5"}}),a=e.computed(()=>{switch(r.position){case"top-left":return"top-0 left-0 -translate-x-1/2 -translate-y-1/2";case"top-right":return"top-0 right-0 translate-x-1/2 -translate-y-1/2";case"bottom-left":return"bottom-0 left-0 -translate-x-1/2 translate-y-1/2";case"bottom-right":return"bottom-0 right-0 translate-x-1/2 translate-y-1/2"}}),l=e.computed(()=>{switch(r.color){case"primary":return"bg-primary-container text-primary-on";case"secondary":return"bg-secondary-container text-secondary-on";case"tertiary":return"bg-tertiary-container text-tertiary-on";case"error":return"bg-error-container text-error-on"}});return(c,i)=>(e.openBlock(),e.createElementBlock("div",mr,[e.createElementVNode("div",{class:e.normalizeClass([[e.unref(a),e.unref(s)],"absolute z-1"])},[r.ping?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute box-content animate-ping border-2 border-transparent rounded-full",[{[e.unref(n)]:!c.$slots.label},e.unref(l)]])},[c.$slots.label?e.renderSlot(c.$slots,"label",{key:0}):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["top-0 box-content border-2 border-surface-low rounded-full",[{[e.unref(n)]:!c.$slots.label},e.unref(l)]])},[c.$slots.label?e.renderSlot(c.$slots,"label",{key:0}):e.createCommentVNode("",!0)],2)],2),e.renderSlot(c.$slots,"default")]))}}),hr=e.defineComponent({__name:"Modal",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue");return e.watchEffect(()=>{n.value?document.body.style.overflow="hidden":setTimeout(()=>{document.querySelector(".modal-wrapper.op100")||(document.body.style.overflow="",document.body.style.marginRight="")},300)}),(o,s)=>{const a=he;return e.openBlock(),e.createBlock(a,{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=l=>n.value=l),blur:r.blur,persistent:r.persistent,"wrapper-class":"flex items-end justify-center"},{default:e.withCtx(()=>[e.createVNode(e.Transition,{"enter-from-class":"translate-y-1/2","enter-to-class":"translate-y-0","leave-from-class":"translate-y-0","leave-to-class":"translate-y-1/2","enter-active-class":"transition ease-out duration-300","leave-active-class":"transition ease-in duration-200"},{default:e.withCtx(()=>[n.value?e.renderSlot(o.$slots,"default",{key:0}):e.createCommentVNode("",!0)]),_:3})]),_:3},8,["modelValue","blur","persistent"])}}}),gr={key:0,class:"h-container w-container i-tabler-loader-2 shrink-0 animate-spin"},br={key:1},yr={class:"grow-1"},wr={key:2,class:"text-sm text-surface-onlow"},kr=e.createElementVNode("i",{class:"i-tabler-x"},null,-1),Fe=e.defineComponent({__name:"Notification",props:{title:{},message:{},icon:{},loading:{type:Boolean},withBorder:{type:Boolean},closeable:{type:Boolean},rounded:{default:"md"},block:{type:Boolean,default:!1},color:{default:"primary"}},emits:["close"],setup(t){const r=t,n=v(r),o=e.computed(()=>{switch(r.color){case"secondary":return"bg-secondary-container";case"tertiary":return"bg-tertiary-container";case"error":return"bg-error-container";default:return"bg-primary-container"}}),s=e.computed(()=>{switch(r.color){case"secondary":return"text-secondary-container";case"tertiary":return"text-tertiary-container";case"error":return"text-error-container";default:return"text-primary-container"}});return(a,l)=>{const c=de;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative min-h-16 min-w-80 w-full flex items-center gap-2 container-low p-3",[{"border-0":!a.withBorder},e.unref(n).class,{"max-w-100":!a.block,"w-full":a.block}]]),style:e.normalizeStyle(e.unref(n).style)},[a.icon?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["leading-0",e.unref(s)])},[a.loading?(e.openBlock(),e.createElementBlock("i",gr)):(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(["h-container w-container shrink-0",a.icon])},null,2))],2)):(e.openBlock(),e.createElementBlock("div",br,[e.createElementVNode("div",{class:e.normalizeClass(["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full",[{"animate-pulse":a.loading},e.unref(o)]])},null,2)])),e.createElementVNode("div",yr,[a.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(s),"text-base"])},e.toDisplayString(a.title),3)):e.createCommentVNode("",!0),a.$slots.message?e.renderSlot(a.$slots,"message",{key:1}):a.message?(e.openBlock(),e.createElementBlock("div",wr,e.toDisplayString(a.message),1)):e.createCommentVNode("",!0)]),a.closeable?(e.openBlock(),e.createBlock(c,{key:2,icon:"",variant:"transparent",class:"text-surface-on hover:text-surface-on",onClick:l[0]||(l[0]=i=>a.$emit("close"))},{default:e.withCtx(()=>[kr]),_:1})):e.createCommentVNode("",!0)],6)}}}),Le=new Set,x=new WeakMap,L=new WeakMap,H=new WeakMap,ge=new WeakMap,_r=new WeakMap,W=new WeakMap,re=new WeakMap,X=new WeakSet;let R,be=0,ye=0;const T="__aa_tgt",Y="__aa_del",ne="__aa_new",Cr=t=>{const r=Er(t);r&&r.forEach(n=>$r(n))},Sr=t=>{t.forEach(r=>{r.target===R&&xr(),x.has(r.target)&&I(r.target)})};function Br(t){const r=ge.get(t);r==null||r.disconnect();let n=x.get(t),o=0;const s=5;n||(n=q(t),x.set(t,n));const{offsetWidth:a,offsetHeight:l}=R,i=[n.top-s,a-(n.left+s+n.width),l-(n.top+s+n.height),n.left-s].map(f=>`${-1*Math.floor(f)}px`).join(" "),d=new IntersectionObserver(()=>{++o>1&&I(t)},{root:R,threshold:1,rootMargin:i});d.observe(t),ge.set(t,d)}function I(t){clearTimeout(re.get(t));const r=oe(t),n=Z(r)?500:r.duration;re.set(t,setTimeout(async()=>{const o=H.get(t);try{await(o==null?void 0:o.finished),x.set(t,q(t)),Br(t)}catch{}},n))}function xr(){clearTimeout(re.get(R)),re.set(R,setTimeout(()=>{Le.forEach(t=>Ge(t,r=>We(()=>I(r))))},100))}function Mr(t){setTimeout(()=>{_r.set(t,setInterval(()=>We(I.bind(null,t)),2e3))},Math.round(2e3*Math.random()))}function We(t){typeof requestIdleCallback=="function"?requestIdleCallback(()=>t()):requestAnimationFrame(()=>t())}let we,j;typeof window<"u"&&(R=document.documentElement,we=new MutationObserver(Cr),j=new ResizeObserver(Sr),window.addEventListener("scroll",()=>{ye=window.scrollY,be=window.scrollX}),j.observe(R));function Er(t){return t.reduce((o,s)=>[...o,...Array.from(s.addedNodes),...Array.from(s.removedNodes)],[]).every(o=>o.nodeName==="#comment")?!1:t.reduce((o,s)=>{if(o===!1)return!1;if(s.target instanceof Element){if(ke(s.target),!o.has(s.target)){o.add(s.target);for(let a=0;a<s.target.children.length;a++){const l=s.target.children.item(a);if(l){if(Y in l)return!1;ke(s.target,l),o.add(l)}}}if(s.removedNodes.length)for(let a=0;a<s.removedNodes.length;a++){const l=s.removedNodes[a];if(Y in l)return!1;l instanceof Element&&(o.add(l),ke(s.target,l),L.set(l,[s.previousSibling,s.nextSibling]))}}return o},new Set)}function ke(t,r){!r&&!(T in t)?Object.defineProperty(t,T,{value:t}):r&&!(T in r)&&Object.defineProperty(r,T,{value:t})}function $r(t){var r;const n=t.isConnected,o=x.has(t);n&&L.has(t)&&L.delete(t),H.has(t)&&((r=H.get(t))===null||r===void 0||r.cancel()),ne in t?Ue(t):o&&n?Nr(t):o&&!n?vr(t):Ue(t)}function V(t){return Number(t.replace(/[^0-9.\-]/g,""))}function zr(t){let r=t.parentElement;for(;r;){if(r.scrollLeft||r.scrollTop)return{x:r.scrollLeft,y:r.scrollTop};r=r.parentElement}return{x:0,y:0}}function q(t){const r=t.getBoundingClientRect(),{x:n,y:o}=zr(t);return{top:r.top+o,left:r.left+n,width:r.width,height:r.height}}function je(t,r,n){let o=r.width,s=r.height,a=n.width,l=n.height;const c=getComputedStyle(t);if(c.getPropertyValue("box-sizing")==="content-box"){const d=V(c.paddingTop)+V(c.paddingBottom)+V(c.borderTopWidth)+V(c.borderBottomWidth),f=V(c.paddingLeft)+V(c.paddingRight)+V(c.borderRightWidth)+V(c.borderLeftWidth);o-=f,a-=f,s-=d,l-=d}return[o,a,s,l].map(Math.round)}function oe(t){return T in t&&W.has(t[T])?W.get(t[T]):{duration:250,easing:"ease-in-out"}}function qe(t){if(T in t)return t[T]}function _e(t){const r=qe(t);return r?X.has(r):!1}function Ge(t,...r){r.forEach(n=>n(t,W.has(t)));for(let n=0;n<t.children.length;n++){const o=t.children.item(n);o&&r.forEach(s=>s(o,W.has(o)))}}function Ce(t){return Array.isArray(t)?t:[t]}function Z(t){return typeof t=="function"}function Nr(t){const r=x.get(t),n=q(t);if(!_e(t))return x.set(t,n);let o;if(!r)return;const s=oe(t);if(typeof s!="function"){const a=r.left-n.left,l=r.top-n.top,[c,i,d,f]=je(t,r,n),u={transform:`translate(${a}px, ${l}px)`},m={transform:"translate(0, 0)"};c!==i&&(u.width=`${c}px`,m.width=`${i}px`),d!==f&&(u.height=`${d}px`,m.height=`${f}px`),o=t.animate([u,m],{duration:s.duration,easing:s.easing})}else{const[a]=Ce(s(t,"remain",r,n));o=new Animation(a),o.play()}H.set(t,o),x.set(t,n),o.addEventListener("finish",I.bind(null,t))}function Ue(t){ne in t&&delete t[ne];const r=q(t);x.set(t,r);const n=oe(t);if(!_e(t))return;let o;if(typeof n!="function")o=t.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:n.duration*1.5,easing:"ease-in"});else{const[s]=Ce(n(t,"add",r));o=new Animation(s),o.play()}H.set(t,o),o.addEventListener("finish",I.bind(null,t))}function Xe(t,r){var n;t.remove(),x.delete(t),L.delete(t),H.delete(t),(n=ge.get(t))===null||n===void 0||n.disconnect(),setTimeout(()=>{if(Y in t&&delete t[Y],Object.defineProperty(t,ne,{value:!0,configurable:!0}),r&&t instanceof HTMLElement)for(const o in r)t.style[o]=""},0)}function vr(t){var r;if(!L.has(t)||!x.has(t))return;const[n,o]=L.get(t);Object.defineProperty(t,Y,{value:!0,configurable:!0});const s=window.scrollX,a=window.scrollY;if(o&&o.parentNode&&o.parentNode instanceof Element?o.parentNode.insertBefore(t,o):n&&n.parentNode?n.parentNode.appendChild(t):(r=qe(t))===null||r===void 0||r.appendChild(t),!_e(t))return Xe(t);const[l,c,i,d]=Ar(t),f=oe(t),u=x.get(t);(s!==be||a!==ye)&&Vr(t,s,a,f);let m,g={position:"absolute",top:`${l}px`,left:`${c}px`,width:`${i}px`,height:`${d}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!Z(f))Object.assign(t.style,g),m=t.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:f.duration,easing:"ease-out"});else{const[k,_]=Ce(f(t,"remove",u));(_==null?void 0:_.styleReset)!==!1&&(g=(_==null?void 0:_.styleReset)||g,Object.assign(t.style,g)),m=new Animation(k),m.play()}H.set(t,m),m.addEventListener("finish",Xe.bind(null,t,g))}function Vr(t,r,n,o){const s=be-r,a=ye-n,l=document.documentElement.style.scrollBehavior;if(getComputedStyle(R).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+s,window.scrollY+a),!t.parentElement)return;const i=t.parentElement;let d=i.clientHeight,f=i.clientWidth;const u=performance.now();function m(){requestAnimationFrame(()=>{if(!Z(o)){const g=d-i.clientHeight,k=f-i.clientWidth;u+o.duration>performance.now()?(window.scrollTo({left:window.scrollX-k,top:window.scrollY-g}),d=i.clientHeight,f=i.clientWidth,m()):document.documentElement.style.scrollBehavior=l}})}m()}function Ar(t){const r=x.get(t),[n,,o]=je(t,r,q(t));let s=t.parentElement;for(;s&&(getComputedStyle(s).position==="static"||s instanceof HTMLBodyElement);)s=s.parentElement;s||(s=document.body);const a=getComputedStyle(s),l=x.get(s)||q(s),c=Math.round(r.top-l.top)-V(a.borderTopWidth),i=Math.round(r.left-l.left)-V(a.borderLeftWidth);return[c,i,n,o]}function Tr(t,r={}){return we&&j&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!Z(r)&&!r.disrespectUserMotionPreference||(X.add(t),getComputedStyle(t).position==="static"&&Object.assign(t.style,{position:"relative"}),Ge(t,I,Mr,s=>j==null?void 0:j.observe(s)),Z(r)?W.set(t,r):W.set(t,{duration:250,easing:"ease-in-out",...r}),we.observe(t,{childList:!0}),Le.add(t))),Object.freeze({parent:t,enable:()=>{X.add(t)},disable:()=>{X.delete(t)},isEnabled:()=>X.has(t)})}const Rr={mounted:(t,r)=>{Tr(t,r.value||{})},getSSRProps:()=>({})},Pr={class:"fixed z-20 flex flex-col gap-2 p-2"},Or=e.defineComponent({__name:"NotificationSystem",setup(t){const r=Qe();return(n,o)=>{const s=Fe;return e.withDirectives((e.openBlock(),e.createElementBlock("div",Pr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),a=>(e.openBlock(),e.createBlock(s,{key:a.hash,closeable:"","with-border":"",title:a.title,message:a.message,icon:a.icon,loading:a.loading,color:a.color,onClose:l=>e.unref(r).splice(e.unref(r).indexOf(a),1)},null,8,["title","message","icon","loading","color","onClose"]))),128))])),[[e.unref(Rr)]])}}}),Hr={class:"relative"},Ir=e.defineComponent({__name:"Overlay",props:{blur:{type:[Boolean,String],default:!1},rounded:{default:"none"},opacity:{default:30},color:{default:"black"}},setup(t){const r=t,n=e.computed(()=>{switch(r.blur){case"sm":return"backdrop-blur-sm";case"md":case!0:return"backdrop-blur-md";case"lg":return"backdrop-blur-lg";default:return""}}),o=v(r),s=e.ref(null),a=p(r.color).toRgb(),l=e.computed(()=>({backgroundColor:`rgba(${a.r}, ${a.g}, ${a.b}, ${r.opacity/100})`}));return(c,i)=>(e.openBlock(),e.createElementBlock("div",Hr,[e.renderSlot(c.$slots,"default"),e.createElementVNode("div",e.mergeProps(c.$attrs,{ref_key:"wrapperRef",ref:s,class:[[e.unref(n),e.unref(o).class],"absolute left-0 top-0 h-full w-full overflow-hidden md:items-center"],style:[e.unref(o).style,e.unref(l)]}),[e.renderSlot(c.$slots,"content")],16)]))}}),Dr=e.defineComponent({__name:"Paper",props:{size:{default:"md"},rounded:{default:"md"},withBorder:{type:Boolean,default:!1},is:{default:"div"}},setup(t){const n=v(t);return(o,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.is),{class:e.normalizeClass(["container-low rounded-lg p-4",[{"border-transparent":!o.withBorder},e.unref(n).class]]),style:e.normalizeStyle([e.unref(n).style])},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}}),Fr=["value","placeholder","type"],Ye=e.defineComponent({__name:"TextField",props:{modelValue:{},onChange:{},color:{default:"primary"},error:{type:Boolean},disabled:{type:Boolean},rounded:{default:"md"},size:{default:"md"},password:{type:Boolean},placeholder:{}},emits:["change","update:modelValue","input","click","pointerdown","pointerup"],setup(t,{expose:r,emit:n}){const o=t,s=n,a=e.computed(()=>{switch(o.size){case"sm":return{base:"h-6 px-2 py-1 text-xs"};case"md":return{base:"h-8 px-3 py-1 text-sm"};case"lg":return{base:"h-10 px-4 py-2 text-base"}}}),l=e.computed(()=>{if(o.error)return"text-error-container bg-surface-base border-error-container focus:border-error-container";switch(o.color){case"secondary":return"text-surface-on bg-surface-base border-surface-border-base focus:border-secondary-container";case"tertiary":return"text-surface-on bg-surface-base border-surface-border-base focus:border-tertiary-container";case"error":return"text-surface-on bg-surface-base border-surface-border-base focus:border-error-container";case"primary":default:return"text-surface-on bg-surface-base border-surface-border-base focus:border-primary-container"}}),c=e.computed(()=>o.disabled?"pointer-events-none filter grayscale opacity-60":""),i=v(o),d=e.ref(null);function f(u){var m;s("update:modelValue",((m=u.target)==null?void 0:m.value)??""),s("input",u)}return r({el:d}),(u,m)=>(e.openBlock(),e.createElementBlock("input",{ref_key:"input",ref:d,value:u.modelValue,class:e.normalizeClass(["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color",[e.unref(l),e.unref(c),e.unref(i).class,e.unref(a).base]]),style:e.normalizeStyle([e.unref(i).style]),placeholder:u.placeholder,type:o.password?"password":"text",onChange:m[0]||(m[0]=g=>u.$emit("change",g)),onInput:f,onClick:m[1]||(m[1]=g=>u.$emit("click",g)),onPointerdown:m[2]||(m[2]=g=>u.$emit("pointerdown",g)),onPointerup:m[3]||(m[3]=g=>u.$emit("pointerup",g))},null,46,Fr))}}),Lr={class:"flex gap-2"},Wr=e.defineComponent({__name:"PinInput",props:{modelValue:{},length:{default:6},size:{},password:{type:Boolean}},setup(t){const r=t,n=e.ref([]);function o(a){a.preventDefault(),a.stopPropagation();const l=n.value.findIndex(i=>i.el===a.target),c=a.target.value??"";a.target.value="",Array.from(c).forEach((i,d)=>{l+d>=n.value.length||(n.value[l+d].el.value=i,l+d+1<n.value.length?(n.value[l+d+1].el.focus(),n.value[l+d+1].el.select()):n.value[l+d].el.blur())})}function s(a){a.preventDefault(),a.stopPropagation();const l=a.target.value!=="";a.target.value="";const c=n.value.findIndex(i=>i.el===a.target);c!==0&&(n.value[c-1].el.focus(),n.value[c-1].el.select(),l||(n.value[c-1].el.value=""))}return(a,l)=>(e.openBlock(),e.createElementBlock("div",Lr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.length,c=>(e.openBlock(),e.createBlock(Ye,{ref_for:!0,ref_key:"inputs",ref:n,key:c,class:"w-8 text-center",style:{padding:"0"},password:r.password,onPointerup:l[0]||(l[0]=i=>i.target.select()),onInput:e.withModifiers(o,["stop","prevent"]),onKeydown:e.withKeys(s,["backspace"])},null,8,["password"]))),128))]))}}),jr=e.defineComponent({__name:"Progress",props:{value:{default:0},max:{default:100},min:{default:0},size:{default:"md"},color:{default:"primary"},rounded:{default:"full"},loading:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"h-0.25";case"md":return"h-0.5";case"lg":return"h-1"}}),o=e.computed(()=>{switch(r.color){case"primary":return"bg-primary-container";case"secondary":return"bg-secondary-7";case"tertiary":return"bg-tertiary-7";case"error":return"bg-error-7"}}),s=v(r);return(a,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color",[e.unref(n),e.unref(s).class]]),style:e.normalizeStyle([e.unref(s).style])},[a.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["loading-progress h-full",[e.unref(o)]])},null,2)):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["h-full",[e.unref(o)]]),style:e.normalizeStyle([{width:`${(Number(a.value)-Number(a.min))/(Number(a.max)-Number(a.min))*100}%`}])},null,6))],6))}}),Se={primary:["#e5f7ff","#d3ebfa","#a9d4f1","#7cbde9","#57a9e0","#3f9cdc","#3096dc","#1f82c4","#0f73b0","#00649c","#082f49"],secondary:["#e9fbf0","#dcf1e3","#badfc7","#96cea9","#77bf90","#63b580","#58b077","#479a64","#3b8a58","#2c7749","#022c22"],tertiary:["#fff7e1","#ffedcd","#fcd99e","#f9c46b","#f7b23f","#f6a724","#f5a113","#da8c04","#c37d00","#aa6a00","#572508"],error:["#ffeaea","#fcd5d5","#f2a8a9","#ea7a7a","#e25353","#de3939","#dd2b2b","#c41e1f","#af171a","#9a0913","#450a0a"],surface:["#fefefe","#fafafa","#f5f5f5","#e5e5e5","#a3a3a3","#737373","#525252","#404040","#262626","#171717","#121212"]},ae={name:"dark",scheme:"dark",colors:Se},Ze={name:"light",scheme:"light",colors:Se},qr=Symbol("Notifications"),Ke=e.reactive([]);function Qe(){return Ke}class Gr{static show(r){r.hash=Math.random().toString(36),Ke.push(r)}}const Be=[.96,.96,.907,.805,.697,.547,.518,.445,.395,.34,.28];function Ur(t){const r=p(t).toHsl().l;return Be.reduce((n,o)=>Math.abs(o-r)<Math.abs(n-r)?o:n)}function Je(t){const r=p(t),n=Ur(r),o=Be.findIndex(a=>a===n),s=Be.map(a=>{const l=p({h:r.toHsl().h,s:r.toHsl().s,l:a});return l.saturate(0*100),l});return{baseColorIndex:o,colors:s.map(a=>a.toHexString())}}function Xr(t){return Je(t).colors}const Yr=e.defineComponent({__name:"RokuProvider",props:{is:{default:"div"},theme:{default(){return typeof window>"u"||document.documentElement.dataset.scheme==="dark"?ae:Ze}}},setup(t){const r=t,n=e.ref(0),o=e.ref(0),s=e.ref(r.theme.scheme);D&&(new ResizeObserver(()=>{const f=window.innerWidth-document.body.clientWidth;f!==0&&(n.value=f),o.value=f}).observe(document.body),new MutationObserver(()=>{s.value!==document.documentElement.dataset.scheme&&(s.value=document.documentElement.dataset.scheme)}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-scheme"]}));const a=e.computed(()=>o.value===n.value?"0px":`${n.value}px`),l=Ct();e.watchEffect(()=>{s.value==="dark"?document.documentElement.dataset.scheme="dark":s.value==="light"?document.documentElement.dataset.scheme="light":l.value==="dark"?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light",localStorage.setItem("scheme",document.documentElement.dataset.scheme)}),e.provide(pe,s);const c=ue(r.theme);return(i,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.is),{style:e.normalizeStyle([e.unref(c),{paddingRight:e.unref(a)}]),class:"text-surface-on transition-background-color,border-color,color"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},8,["style"]))}}),Zr=["id"],Kr=["for"],Qr=["for"],et=e.defineComponent({inheritAttrs:!1,__name:"Switch",props:e.mergeModels({size:{default:"md"},animate:{type:Boolean,default:!0},options:{},label:{},id:{},rounded:{default:"full"},color:{default:"primary"},disabled:{type:Boolean},offIcon:{},onIcon:{},value:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue");r.value&&(n.value=r.value);const o=e.ref(null),s=e.ref(!1),a=e.computed(()=>{switch(r.size){case"sm":return{icon:"text-xs mx-0.5",wrapper:"h-4 w-8",indicator:s.value?"h-3 w-4":"h-3 w-3",inactive:"left-[calc(0.125rem-1px)]",active:s.value?"left-[calc(0.875rem-1px)]":"left-[calc(1.125rem-1px)]"};case"md":return{icon:"text-sm mx-1",wrapper:"h-6 w-12",indicator:s.value?"h-4 w-5":"h-4 w-4",inactive:"left-[calc(0.25rem-1px)]",active:s.value?"left-[calc(1.5rem-1px)]":"left-[calc(1.75rem-1px)]"};case"lg":return{icon:"text-lg mx-2",wrapper:"h-8 w-16",indicator:s.value?"h-6 w-8":"h-6 w-6",inactive:"left-[calc(0.25rem-1px)]",active:s.value?"left-[calc(1.75rem-1px)]":"left-[calc(2.25rem-1px)]"}}}),l=e.computed(()=>r.animate?{indicator:"transition-all",progress:"transition-width"}:{indicator:"",progress:""}),c=me(r),i=e.computed(()=>{let f="bg-primary-container";switch(r.color){case"secondary":f="bg-secondary-7";break;case"tertiary":f="bg-tertiary-7";break;case"error":f="bg-error-7";break}return{wrapper:n.value?`border border-transparent ${f}`:"bg-surface-lowest border border-surface-border-low",indicator:r.disabled?"bg-surface-high":"bg-white text-primary-container"}}),d=v(r);return(f,u)=>(e.openBlock(),e.createElementBlock("div",{role:"switch",class:e.normalizeClass(["relative flex items-center gap-2",{"pointer-events-none filter-grayscale op60":r.disabled}])},[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(c),"onUpdate:modelValue":u[0]||(u[0]=m=>n.value=m)},f.$attrs,{class:"hidden",type:"checkbox"}),null,16,Zr),[[e.vModelCheckbox,n.value]]),e.createElementVNode("label",{class:"leading-0 cursor-pointer!",for:e.unref(c)},[e.createElementVNode("div",{ref_key:"wrapper",ref:o,class:e.normalizeClass([[e.unref(a).wrapper,e.unref(i).wrapper,e.unref(d).class],"relative inline-block transition-all"]),style:e.normalizeStyle([e.unref(d).style]),onPointerdown:u[1]||(u[1]=m=>s.value=!0),onPointerup:u[2]||(u[2]=m=>s.value=!1),onPointerleave:u[3]||(u[3]=m=>s.value=!1),onPointerenter:u[4]||(u[4]=m=>m.buttons===1&&(s.value=!0))},[e.createElementVNode("div",{class:e.normalizeClass(["absolute top-50% -translate-y-50%",[e.unref(a).indicator,e.unref(i).indicator,e.unref(l).indicator,n.value?e.unref(a).active:e.unref(a).inactive,e.unref(d).class]]),style:e.normalizeStyle([e.unref(d).style])},null,6),e.createElementVNode("i",{class:e.normalizeClass(["absolute top-1/2 -translate-y-50%",[e.unref(a).icon,{[`left-0 text-${f.color}-on`]:n.value,"right-0 text-surface-on ":!n.value,[f.onIcon??""]:n.value&&f.onIcon,[f.offIcon??""]:!n.value&&f.offIcon}]])},null,2)],38)],8,Kr),f.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(c)},e.toDisplayString(f.label),9,Qr)):e.createCommentVNode("",!0)],2))}}),Jr={class:"dark:hidden"},en={class:"light:hidden"},tn=e.defineComponent({__name:"SchemeSwitch",setup(t){const r=Ie(),n=e.computed({get(){return r.value==="dark"},set(a){r.value=a?"dark":"light"}});e.watchEffect(()=>{D&&(n.value===!0?(document.documentElement.setAttribute("data-scheme","dark"),localStorage.setItem("scheme","dark")):n.value===!1&&(document.documentElement.setAttribute("data-scheme","light"),localStorage.setItem("scheme","light")))});const o=e.ref(!0),s=e.ref(!1);return e.onMounted(()=>{if(D){const a=localStorage.getItem("scheme");a==="dark"?n.value=!0:a==="light"?n.value=!1:n.value=window.matchMedia("(prefers-color-scheme: dark)").matches}o.value=!1}),e.nextTick(()=>{s.value=!0}),(a,l)=>{const c=et;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass({hidden:!e.unref(o)})},[e.createElementVNode("div",Jr,[e.createVNode(c,{value:!1,"on-icon":"i-tabler-moon","off-icon":"i-tabler-sun"})]),e.createElementVNode("div",en,[e.createVNode(c,{value:!0,color:"secondary","on-icon":"i-tabler-moon","off-icon":"i-tabler-sun"})])],2),e.createElementVNode("div",{class:e.normalizeClass({hidden:e.unref(o)})},[e.createVNode(c,{modelValue:e.unref(n),"onUpdate:modelValue":l[0]||(l[0]=i=>e.isRef(n)?n.value=i:null),animate:e.unref(s),color:"secondary","on-icon":"i-tabler-moon","off-icon":"i-tabler-sun"},null,8,["modelValue","animate"])],2)],64)}}}),rn={class:"w-full flex items-center"},nn=["placeholder","value"],on=e.createElementVNode("i",{class:"i-tabler-chevron-down pointer-events-none absolute right-2"},null,-1),an={key:0,class:"flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"},sn=["onPointerdown","onHover"],ln={key:0},cn=[e.createElementVNode("i",{class:"i-tabler-check h-3 w-3"},null,-1)],dn=e.defineComponent({__name:"Select",props:e.mergeModels({options:{default(){return[]}},size:{default:"md"},noneText:{default:"No options"},rounded:{default:"md"},placeholder:{default:""}},{modelValue:{default:void 0},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:r}){const n=t,o=r,s=v(n),a=e.useModel(t,"modelValue"),l=e.ref(null),c=e.ref(null),{focused:i}=_t(l),d=e.computed(()=>n.options.map(b=>C(b)).indexOf(a.value)),f=e.ref(-1),u=e.ref(-1);e.watchEffect(()=>{i.value||(u.value=-1)}),e.watchEffect(()=>{a.value=C(n.options[d.value])}),e.watch(a,()=>{o("change",a.value)});const m=n.options,g=e.computed(()=>m[d.value]),k=e.computed(()=>_(g.value));function _(b){if(b)return typeof b=="string"||typeof b=="symbol"||typeof b=="number"?b:b.label}function C(b){if(b)return typeof b=="string"||typeof b=="symbol"||typeof b=="number"?b:b.id}ie("ArrowDown",b=>{i.value&&(b.preventDefault(),u.value=(u.value+1)%m.length)}),ie("ArrowUp",b=>{i.value&&(b.preventDefault(),u.value=(u.value-1+m.length)%m.length)}),ie("Enter",()=>{i.value&&u.value!==-1&&(a.value=C(m[u.value]),i.value=!1)});function K(b){if(!i.value){i.value=!0;return}a.value=C(b),i.value=!1}const se=e.computed(()=>({input:"container-base focus:border-primary-container"})),le=e.computed(()=>{switch(n.size){case"sm":return{wrapper:"h-6 w-full py-1 pl-1.5 pr-6 text-sm",dropdown:"text-sm children:py-1"};case"lg":return{wrapper:"h-10 w-full py-2 pl-3 pr-10 text-lg",dropdown:"text-lg children:py-2"};default:return{wrapper:"h-8 w-full py-1 pl-2 pr-8 text-base",dropdown:"text-base children:py-1"}}});return(b,Q)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:c,class:"r-select-wrapper relative"},[e.createElementVNode("div",rn,[e.createElementVNode("input",{ref_key:"inputRef",ref:l,class:e.normalizeClass([[e.unref(se).input,e.unref(le).wrapper,e.unref(s).class],"r-select-input cursor-pointer border outline-none outline-none focus-visible:outline-2"]),placeholder:b.placeholder,style:e.normalizeStyle([e.unref(s).style]),readonly:"",value:e.unref(k),"aria-haspopup":"listbox",autocomplete:"off",onFocus:Q[0]||(Q[0]=w=>i.value=!0)},null,46,nn),on]),e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(le).dropdown,"absolute z-1 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1"])},[e.unref(m).length===0?(e.openBlock(),e.createElementBlock("div",an,e.toDisplayString(b.noneText),1)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(m),(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:C(w),class:e.normalizeClass([{"hover:bg-surface-high":e.unref(u)!==S,"container-filled-primary":e.unref(u)===S},"flex cursor-pointer items-center justify-between gap-2 rounded p-1 px-2"]),onPointerdown:B=>K(w),onHover:B=>f.value=S},[e.createTextVNode(e.toDisplayString(_(w))+" ",1),w===e.unref(g)?(e.openBlock(),e.createElementBlock("div",ln,cn)):e.createCommentVNode("",!0)],42,sn))),128))],2)):e.createCommentVNode("",!0)],512))}}),fn={class:"relative inline-block w-full"},un=e.defineComponent({__name:"Slider",props:e.mergeModels({size:{default:"md"},animate:{type:Boolean,default:!1},width:{},options:{},min:{default:0},max:{default:100},step:{default:1},tickNum:{},color:{default:"primary"},minWidth:{default:12}},{modelValue:{default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t;function n(w,S,B){const $=[];for(let P=w;P<=S;P+=B)$.push(P);return $[$.length-1]!==S&&$.push(S),$}function o(w,S){const B=[];B.push(S[0]);const $=(S.length-1)/(w-1);for(let P=1;P<w-1;P++)B.push(S[Math.round(P*$)]);return B.push(S[S.length-1]),B}const s=e.computed(()=>r.options?r.options.length:r.tickNum??0),a=e.computed(()=>r.options===void 0?n(r.min,r.max,r.step):r.options),l=e.computed(()=>o(s.value,a.value)),c=e.useModel(t,"modelValue"),i=e.computed(()=>a.value.length??0),d=e.ref(a.value.includes(c.value)?a.value.indexOf(c.value):0);function f(w){return a.value.indexOf(w)}const u=e.computed(()=>{switch(r.color){case"primary":return"bg-primary-container";case"secondary":return"bg-secondary-container";case"tertiary":return"bg-tertiary-container";case"error":return"bg-error-container"}}),m=e.computed(()=>`dark:bg-white bg-${r.color}-container`),g=e.computed(()=>{switch(r.color){case"primary":return"dark:bg-primary-container bg-white";case"secondary":return"dark:bg-secondary-container bg-white";case"tertiary":return"dark:bg-tertiary-container bg-white";case"error":return"dark:bg-error-container bg-white"}});e.watchEffect(()=>{c.value=a.value[d.value]});const k=e.ref(),_=e.ref(),C=bt(k),K=e.ref(!1);function se(w){if(!K.value)return;if(!(w.buttons===1)){K.value=!1;return}w.preventDefault(),w.stopPropagation();const{clientX:B}=w,$=C.left.value,mn=C.right.value-$,xe=Math.round((B-$)/mn*(i.value-1));if(xe<0){d.value=0;return}if(xe>i.value-1){d.value=i.value-1;return}d.value=xe}e.watchEffect(()=>{d.value=f(c.value)});function le(w){w.preventDefault(),w.stopPropagation(),K.value=!0,se(w)}M(k,"pointerdown",le),e.onMounted(()=>{M(document,"pointermove",se),d.value=Math.max(0,f(c.value))});const b=e.computed(()=>{switch(r.size){case"sm":return{wrapper:"h-2",innerWrapper:"px-0.5 h-1",content:"h-1",tick:"h-0.5 w-0.5 -translate-x-0.25 -translate-y-0.25",indicator:"h-2 w-2 -translate-x-1 -translate-y-1",indicatorInner:"h-1 w-1 -translate-x-0.5 -translate-y-0.5",progress:"-mx-0.5"};case"md":return{wrapper:"h-4",innerWrapper:"px-1 h-2",content:"h-2",tick:"h-1 w-1 -translate-x-0.5 -translate-y-0.5",indicator:"h-4 w-4 -translate-x-2 -translate-y-2",indicatorInner:"h-2 w-2 -translate-x-1 -translate-y-1",progress:"-mx-1"};case"lg":return{wrapper:"h-6",innerWrapper:"px-1.5 h-3",content:"h-3",tick:"h-1.5 w-1.5 -translate-x-0.75 -translate-y-0.75",indicator:"h-6 w-6 -translate-x-3 -translate-y-3",indicatorInner:"h-3 w-3 -translate-x-1.5 -translate-y-1.5",progress:"-mx-1.5"}}}),Q=e.computed(()=>r.animate?{indicator:"transition-left",progress:"transition-width"}:{indicator:"",progress:""});return(w,S)=>(e.openBlock(),e.createElementBlock("div",fn,[e.createElementVNode("div",{ref_key:"wrapper",ref:k,type:"size",class:e.normalizeClass(["w-full flex cursor-pointer items-center",e.unref(b).wrapper]),onTouchmove:S[0]||(S[0]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",{class:e.normalizeClass(["w-full rounded-full bg-surface-lowest transition-background-color,border-color,color",e.unref(b).innerWrapper])},[e.createElementVNode("div",{class:e.normalizeClass(["relative flex",e.unref(b).content]),style:e.normalizeStyle({width:`${r.width}rem`,minWidth:`${r.minWidth}rem`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),B=>(e.openBlock(),e.createElementBlock("div",{key:B,style:e.normalizeStyle({left:`${f(B)/(e.unref(i)-1)*100}%`}),class:e.normalizeClass(["absolute top-50% rounded-full bg-white",e.unref(b).tick])},null,6))),128)),e.unref(d)!==-1?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"indicator",ref:_,class:e.normalizeClass(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color",[e.unref(b).indicator,e.unref(Q).indicator,e.unref(m)]]),style:e.normalizeStyle({left:`${e.unref(d)/(e.unref(i)-1)*100}%`})},[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color",[e.unref(b).indicatorInner,e.unref(g)]])},null,2)],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none h-full rounded-full",[e.unref(b).progress,e.unref(Q).progress,e.unref(u)]]),style:e.normalizeStyle({width:`${e.unref(d)/(e.unref(i)-1)*100}%`})},null,6)],6)],2)],34),e.createElementVNode("div",{class:"relative mx-1 h-1em text-xs text-surface-onlow",style:e.normalizeStyle({width:`${r.width}rem`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(B,$)=>(e.openBlock(),e.createElementBlock("div",{key:$,style:e.normalizeStyle({left:`${f(B)/(e.unref(i)-1)*100}%`}),class:e.normalizeClass(["absolute w-auto flex rounded-full -translate-x-50%",e.unref(b).tick])},e.toDisplayString(B),7))),128))],4)]))}});h.AspectRatio=tt,h.Avatar=Me,h.Btn=de,h.ChatContainer=Et,h.ChatMessage=$t,h.ChatSystem=Nt,h.Chip=vt,h.ColorInput=ar,h.ColorSwatch=$e,h.Drawer=dr,h.Dropzone=fr,h.FullscreenOverlay=he,h.Image=ur,h.Indicator=pr,h.Modal=hr,h.Notification=Fe,h.NotificationSystem=Or,h.Notifications=Gr,h.Overlay=Ir,h.Paper=Dr,h.PinInput=Wr,h.Progress=jr,h.RokuProvider=Yr,h.SchemeSwitch=tn,h.Select=dn,h.Slider=un,h.Switch=et,h.TextField=Ye,h.ThemeProvider=De,h.darkTheme=ae,h.generateColors=Xr,h.generateColorsMap=Je,h.lightTheme=Ze,h.notificationsSymbol=qr,h.schemeSymbol=pe,h.themeColors=Se,h.useCurrentTheme=He,h.useCurrentThemeScheme=rr,h.useId=me,h.useNotifications=Qe,h.useRootTheme=Oe,h.useScheme=Ie,h.useThemeStyles=ue,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h["roku-ui"]={},h.Vue))})(this,function(h,e){"use strict";const tt=e.defineComponent({__name:"AspectRatio",props:{ratio:{default:1},width:{},maxWidth:{},height:{},maxHeight:{}},setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({"--ar-ratio":r.ratio,width:r.width,"max-width":r.maxWidth,height:r.height,"max-height":r.maxHeight}),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-['']"},[e.renderSlot(r.$slots,"default")],4))}}),Me=e.defineComponent({__name:"Avatar",props:{is:{default:"img"},src:{},size:{default:"md"},style:{},class:{}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"--size: 1.5rem;";case"md":return"--size: 2rem;";case"lg":return"--size: 3rem;";default:return typeof r.size=="number"||!Number.isNaN(Number(r.size))?`--size: ${r.size}rem;`:`--size: ${r.size};`}}),o=e.ref(!1),s=e.ref(null);function a(){o.value=!0}return e.onMounted(()=>{var l;(l=s.value)!=null&&l.complete&&a()}),(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.src?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.is),e.mergeProps({key:0,ref_key:"img",ref:s,style:[l.style,e.unref(n)],placeholder:"",src:l.src,class:["h-[var(--size)] w-[var(--size)] rounded-full object-cover",[{hidden:!e.unref(o)},r.class]]},l.$attrs,{onLoad:a}),null,16,["style","src","class"])):e.createCommentVNode("",!0),e.unref(o)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:"h-[var(--size)] w-[var(--size)] animate-pulse border-transparent rounded-full bg-surface-high object-cover",style:e.normalizeStyle([l.style,e.unref(n)])},null,4))],64))}});function v(t){return e.computed(()=>({style:rt(t.rounded),class:"rounded-[var(--r-rounded)]"}))}function rt(t){const r=/^-?\d*\.?\d+(px|em|rem|vh|vw|in|cm|mm|pt|pc|%)?$/;switch(t){case"none":return"--r-rounded: 0";case"sm":return"--r-rounded: 0.125rem";case"md":return"--r-rounded: 0.25rem";case"lg":return"--r-rounded: 0.5rem";case"full":return"--r-rounded: 9999px";default:return typeof t=="string"&&r.test(t)?`--r-rounded: ${t};`:typeof t=="number"||!Number.isNaN(Number(t))?`--r-rounded: ${t}rem;`:"rounded-[var(--r-rounded)]"}}function G(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function nt(){const t=new Set,r=s=>{t.delete(s)};return{on:s=>{t.add(s);const a=()=>r(s);return G(a),{off:a}},off:r,trigger:(...s)=>Promise.all(Array.from(t).map(a=>a(...s)))}}function J(t){return typeof t=="function"?t():e.unref(t)}const R=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ot=t=>t!=null,at=Object.prototype.toString,st=t=>at.call(t)==="[object Object]",lt=()=>{},it=(t,r)=>Object.prototype.hasOwnProperty.call(t,r);function ct(t){return t||e.getCurrentInstance()}function dt(t,r=!0,n){ct()?e.onMounted(t,n):r?t():e.nextTick(t)}function H(t){var r;const n=J(t);return(r=n==null?void 0:n.$el)!=null?r:n}const F=R?window:void 0,ft=R?window.document:void 0;function M(...t){let r,n,o,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,s]=t,r=F):[r,n,o,s]=t,!r)return lt;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],l=()=>{a.forEach(f=>f()),a.length=0},c=(f,u,m,g)=>(f.addEventListener(u,m,g),()=>f.removeEventListener(u,m,g)),i=e.watch(()=>[H(r),J(s)],([f,u])=>{if(l(),!f)return;const m=st(u)?{...u}:u;a.push(...n.flatMap(g=>o.map(k=>c(f,g,k,m))))},{immediate:!0,flush:"post"}),d=()=>{i(),l()};return G(d),d}function ut(t){return typeof t=="function"?t:typeof t=="string"?r=>r.key===t:Array.isArray(t)?r=>t.includes(r.key):()=>!0}function ie(...t){let r,n,o={};t.length===3?(r=t[0],n=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(r=!0,n=t[0],o=t[1]):(r=t[0],n=t[1]):(r=!0,n=t[0]);const{target:s=F,eventName:a="keydown",passive:l=!1,dedupe:c=!1}=o,i=ut(r);return M(s,a,f=>{f.repeat&&J(c)||i(f)&&n(f)},l)}function mt(){const t=e.ref(!1);return e.getCurrentInstance()&&e.onMounted(()=>{t.value=!0}),t}function ce(t){const r=mt();return e.computed(()=>(r.value,!!t()))}function Ee(t,r={}){const{window:n=F}=r,o=ce(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const a=e.ref(!1),l=d=>{a.value=d.matches},c=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",l):s.removeListener(l))},i=e.watchEffect(()=>{o.value&&(c(),s=n.matchMedia(J(t)),"addEventListener"in s?s.addEventListener("change",l):s.addListener(l),a.value=s.matches)});return G(()=>{i(),c(),s=void 0}),a}function pt(t,r,n={}){const{window:o=F,...s}=n;let a;const l=ce(()=>o&&"MutationObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},i=e.watch(()=>H(t),u=>{c(),l.value&&o&&u&&(a=new MutationObserver(r),a.observe(u,s))},{immediate:!0}),d=()=>a==null?void 0:a.takeRecords(),f=()=>{c(),i()};return G(f),{isSupported:l,stop:f,takeRecords:d}}function ht(t,r={}){const n=e.ref(!1),o=e.shallowRef(null);let s=0,a=!0;if(R){const l=typeof r=="function"?{onDrop:r}:r,c=i=>{var d,f;const u=Array.from((f=(d=i.dataTransfer)==null?void 0:d.files)!=null?f:[]);return o.value=u.length===0?null:u};M(t,"dragenter",i=>{var d,f;const u=Array.from(((d=i==null?void 0:i.dataTransfer)==null?void 0:d.items)||[]).map(m=>m.kind==="file"?m.type:null).filter(ot);if(l.dataTypes&&i.dataTransfer){const m=e.unref(l.dataTypes);if(a=typeof m=="function"?m(u):m?m.some(g=>u.includes(g)):!0,!a)return}i.preventDefault(),s+=1,n.value=!0,(f=l.onEnter)==null||f.call(l,c(i),i)}),M(t,"dragover",i=>{var d;a&&(i.preventDefault(),(d=l.onOver)==null||d.call(l,c(i),i))}),M(t,"dragleave",i=>{var d;a&&(i.preventDefault(),s-=1,s===0&&(n.value=!1),(d=l.onLeave)==null||d.call(l,c(i),i))}),M(t,"drop",i=>{var d;i.preventDefault(),s=0,n.value=!1,(d=l.onDrop)==null||d.call(l,c(i),i)})}return{files:o,isOverDropZone:n}}function gt(t,r,n={}){const{window:o=F,...s}=n;let a;const l=ce(()=>o&&"ResizeObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},i=e.computed(()=>Array.isArray(t)?t.map(u=>H(u)):[H(t)]),d=e.watch(i,u=>{if(c(),l.value&&o){a=new ResizeObserver(r);for(const m of u)m&&a.observe(m,s)}},{immediate:!0,flush:"post",deep:!0}),f=()=>{c(),d()};return G(f),{isSupported:l,stop:f}}function bt(t,r={}){const{reset:n=!0,windowResize:o=!0,windowScroll:s=!0,immediate:a=!0}=r,l=e.ref(0),c=e.ref(0),i=e.ref(0),d=e.ref(0),f=e.ref(0),u=e.ref(0),m=e.ref(0),g=e.ref(0);function k(){const _=H(t);if(!_){n&&(l.value=0,c.value=0,i.value=0,d.value=0,f.value=0,u.value=0,m.value=0,g.value=0);return}const C=_.getBoundingClientRect();l.value=C.height,c.value=C.bottom,i.value=C.left,d.value=C.right,f.value=C.top,u.value=C.width,m.value=C.x,g.value=C.y}return gt(t,k),e.watch(()=>H(t),_=>!_&&k()),pt(t,k,{attributeFilter:["style","class"]}),s&&M("scroll",k,{capture:!0,passive:!0}),o&&M("resize",k,{passive:!0}),dt(()=>{a&&k()}),{height:l,bottom:c,left:i,right:d,top:f,width:u,x:m,y:g,update:k}}function yt(t,r={}){const{delayEnter:n=0,delayLeave:o=0,window:s=F}=r,a=e.ref(!1);let l;const c=i=>{const d=i?n:o;l&&(clearTimeout(l),l=void 0),d?l=setTimeout(()=>a.value=i,d):a.value=i};return s&&(M(t,"mouseenter",()=>c(!0),{passive:!0}),M(t,"mouseleave",()=>c(!1),{passive:!0})),a}const wt={multiple:!0,accept:"*",reset:!1,directory:!1};function kt(t={}){const{document:r=ft}=t,n=e.ref(null),{on:o,trigger:s}=nt();let a;r&&(a=r.createElement("input"),a.type="file",a.onchange=i=>{const d=i.target;n.value=d.files,s(n.value)});const l=()=>{n.value=null,a&&(a.value="",s(null))},c=i=>{if(!a)return;const d={...wt,...t,...i};a.multiple=d.multiple,a.accept=d.accept,a.webkitdirectory=d.directory,it(d,"capture")&&(a.capture=d.capture),d.reset&&l(),a.click()};return{files:e.readonly(n),open:c,reset:l,onChange:o}}function _t(t,r={}){const{initialValue:n=!1,focusVisible:o=!1}=r,s=e.ref(!1),a=e.computed(()=>H(t));M(a,"focus",c=>{var i,d;(!o||(d=(i=c.target).matches)!=null&&d.call(i,":focus-visible"))&&(s.value=!0)}),M(a,"blur",()=>s.value=!1);const l=e.computed({get:()=>s.value,set(c){var i,d;!c&&s.value?(i=a.value)==null||i.blur():c&&!s.value&&((d=a.value)==null||d.focus())}});return e.watch(a,()=>{l.value=n},{immediate:!0,flush:"post"}),{focused:l}}function Ct(t){const r=Ee("(prefers-color-scheme: light)",t),n=Ee("(prefers-color-scheme: dark)",t);return e.computed(()=>n.value?"dark":r.value?"light":"no-preference")}const de=e.defineComponent({__name:"Btn",props:{type:{default:"button"},size:{default:"md"},is:{default:"button"},icon:{type:Boolean,default:!1},pressEffect:{default:"translate"},variant:{},hoverVariant:{},color:{},animate:{type:Boolean},rounded:{default:"md"},disabled:{type:Boolean,default:!1}},setup(t){const r=t,n=v(r),o=e.computed(()=>{switch(r.size){case"sm":return{normalContent:"min-w-16 h-6 px-2 py-1 text-xs",iconContent:"h-6 w-6 p-1"};case"md":return{normalContent:"min-w-20 h-8 px-3 py-1 text-sm",iconContent:"h-8 w-8 p-2"};case"lg":return{normalContent:"min-w-24 h-10 px-4 py-2 text-base",iconContent:"h-10 w-10 p-3"}}}),s=e.ref(null),a=yt(s),l=e.computed(()=>r.hoverVariant&&a.value?r.hoverVariant:r.variant),c=e.computed(()=>{switch(l.value){case"filled":switch(r.color){case"secondary":return"btn-filled-secondary";case"tertiary":return"btn-filled-tertiary";case"error":return"btn-filled-error";default:return"btn-filled-primary"}case"ghost":case"light":switch(r.color){case"secondary":return"btn-light-secondary";case"tertiary":return"btn-light-tertiary";case"error":return"btn-light-error";default:return"btn-light-primary"}case"constrast":switch(r.color){case"secondary":return"btn-constrast-secondary";case"tertiary":return"btn-constrast-tertiary";case"error":return"btn-constrast-error";default:return"btn-constrast-primary"}case"outline":switch(r.color){case"secondary":return"btn-outline-secondary";case"tertiary":return"btn-outline-tertiary";case"error":return"btn-outline-error";default:return"btn-outline-primary"}case"subtle":switch(r.color){case"secondary":return"btn-subtle-secondary";case"tertiary":return"btn-subtle-tertiary";case"error":return"btn-subtle-error";default:return"btn-subtle-primary"}case"transparent":switch(r.color){case"secondary":return"btn-transparent-secondary";case"tertiary":return"btn-transparent-tertiary";case"error":return"btn-transparent-error";default:return"btn-transparent-primary"}default:return"btn-default"}});return(i,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.is),e.mergeProps({ref_key:"btn",ref:s,"data-size":i.size,type:i.type,class:["flex items-center justify-center gap-1 decoration-none",[e.unref(c),e.unref(n).class,i.icon?e.unref(o).iconContent:e.unref(o).normalContent,{"filter-grayscale pointer-events-none":i.disabled,"active:translate-y-0.25":i.pressEffect==="translate","active:scale-98":i.pressEffect==="scale","transition-all":i.animate}]],style:[e.unref(n).style],disabled:i.disabled},i.$attrs),{default:e.withCtx(()=>[i.$slots.leftSection?e.renderSlot(i.$slots,"leftSection",{key:0}):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default"),i.$slots.rightSection?e.renderSlot(i.$slots,"rightSection",{key:1}):e.createCommentVNode("",!0)]),_:3},16,["data-size","type","style","class","disabled"]))}}),St=(t,r)=>{const n=t.__vccOpts||t;for(const[o,s]of r)n[o]=s;return n},Bt={},xt={class:"flex flex-col gap-4 container"};function Mt(t,r){return e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"default")])}const Et=St(Bt,[["render",Mt]]),$t=e.defineComponent({__name:"ChatMessage",props:{avatar:{},position:{default:"left"},color:{},variant:{default:"default"},withBorder:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>{switch(r.variant){case"default":return"bg-surface-base";case"filled":switch(r.color){case"secondary":return"bg-secondary-container text-secondary-on";case"tertiary":return"bg-tertiary-container text-tertiary-on";case"error":return"bg-error-container text-error-on";default:return"bg-primary-container text-primary-on"}case"transparent":return"bg-transparent"}});return(o,s)=>{const a=Me;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex gap-2",[{"flex-row-reverse":o.position==="right","flex-row":o.position==="left"}]])},[o.$slots.avatar?e.renderSlot(o.$slots,"avatar",{key:0}):o.avatar?(e.openBlock(),e.createBlock(a,{key:1,src:o.avatar},null,8,["src"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["rounded-xl px-3 py-2 transition-background-color,border-color",[{"rounded-tr":o.position==="right","rounded-tl":o.position==="left",border:o.withBorder},e.unref(n)]])},[e.renderSlot(o.$slots,"default")],2)],2)}}}),zt={class:"w-full flex self-center gap-2 text-center"},Nt=e.defineComponent({__name:"ChatSystem",props:{position:{},color:{},variant:{default:"default"},withBorder:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>{switch(r.variant){case"default":return"bg-surface-base";case"fill":switch(r.color){case"secondary":return"bg-secondary-container text-secondary-on";case"tertiary":return"bg-tertiary-container text-tertiary-on";case"error":return"bg-error-container text-error-on";default:return"bg-primary-container text-primary-on"}case"transparent":return"bg-transparent"}});return(o,s)=>(e.openBlock(),e.createElementBlock("div",zt,[e.createElementVNode("div",{class:e.normalizeClass(["w-full rounded-xl px-3 py-2 transition-background-color,border-color",[e.unref(n)]])},[e.renderSlot(o.$slots,"default")],2)]))}}),vt=e.defineComponent({__name:"Chip",props:e.mergeModels({is:{default:"img"},src:{},size:{default:"md"},style:{},class:{},rounded:{default:"full"}},{modelValue:{type:Boolean,default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue"),o=v(r),s=e.computed(()=>{switch(r.size){case"sm":return"px-3 text-sm h-6";case"md":return"px-6 h-8 text-base";case"lg":return"px-8 h-10 text-lg"}}),a=e.computed(()=>n.value?"container-filled-primary border-transparent":"container-base"),l=e.computed(()=>n.value!==void 0),c=e.computed(()=>l.value?"cursor-pointer":"");return(i,d)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-flex items-center gap-1",[e.unref(o).class,e.unref(s),e.unref(a),e.unref(c)]]),style:e.normalizeStyle([e.unref(o).style]),onPointerup:d[0]||(d[0]=f=>e.unref(l)&&(n.value=!n.value))},[i.$slots.leftSection?e.renderSlot(i.$slots,"leftSection",{key:0}):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default"),i.$slots.rightSection?e.renderSlot(i.$slots,"rightSection",{key:1}):e.createCommentVNode("",!0)],38))}}),$e=e.defineComponent({__name:"ColorSwatch",props:{color:{},is:{default:"div"},withBorder:{type:Boolean,default:!1}},setup(t){return(r,n)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.is),{class:e.normalizeClass(["h-6 w-6 border rounded-full",[{"border border-surface-border-base":r.withBorder,"border border-transparent":!r.withBorder}]]),style:e.normalizeStyle({backgroundColor:r.color})},null,8,["class","style"]))}});function ee(t){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ee(t)}var Vt=/^\s+/,At=/\s+$/;function p(t,r){if(t=t||"",r=r||{},t instanceof p)return t;if(!(this instanceof p))return new p(t,r);var n=Tt(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||n.format,this._gradientType=r.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=n.ok}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),n,o,s,a,l,c;return n=r.r/255,o=r.g/255,s=r.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),s<=.03928?c=s/12.92:c=Math.pow((s+.055)/1.055,2.4),.2126*a+.7152*l+.0722*c},setAlpha:function(r){return this._a=Te(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=Ne(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=Ne(this._r,this._g,this._b),n=Math.round(r.h*360),o=Math.round(r.s*100),s=Math.round(r.v*100);return this._a==1?"hsv("+n+", "+o+"%, "+s+"%)":"hsva("+n+", "+o+"%, "+s+"%, "+this._roundA+")"},toHsl:function(){var r=ze(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=ze(this._r,this._g,this._b),n=Math.round(r.h*360),o=Math.round(r.s*100),s=Math.round(r.l*100);return this._a==1?"hsl("+n+", "+o+"%, "+s+"%)":"hsla("+n+", "+o+"%, "+s+"%, "+this._roundA+")"},toHex:function(r){return ve(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return Ht(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(y(this._r,255)*100)+"%",g:Math.round(y(this._g,255)*100)+"%",b:Math.round(y(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(y(this._r,255)*100)+"%, "+Math.round(y(this._g,255)*100)+"%, "+Math.round(y(this._b,255)*100)+"%)":"rgba("+Math.round(y(this._r,255)*100)+"%, "+Math.round(y(this._g,255)*100)+"%, "+Math.round(y(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Zt[ve(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var n="#"+Ve(this._r,this._g,this._b,this._a),o=n,s=this._gradientType?"GradientType = 1, ":"";if(r){var a=p(r);o="#"+Ve(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+s+"startColorstr="+n+",endColorstr="+o+")"},toString:function(r){var n=!!r;r=r||this._format;var o=!1,s=this._a<1&&this._a>=0,a=!n&&s&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return a?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(o=this.toRgbString()),r==="prgb"&&(o=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(o=this.toHexString()),r==="hex3"&&(o=this.toHexString(!0)),r==="hex4"&&(o=this.toHex8String(!0)),r==="hex8"&&(o=this.toHex8String()),r==="name"&&(o=this.toName()),r==="hsl"&&(o=this.toHslString()),r==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return p(this.toString())},_applyModification:function(r,n){var o=r.apply(null,[this].concat([].slice.call(n)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(Lt,arguments)},brighten:function(){return this._applyModification(Wt,arguments)},darken:function(){return this._applyModification(jt,arguments)},desaturate:function(){return this._applyModification(It,arguments)},saturate:function(){return this._applyModification(Dt,arguments)},greyscale:function(){return this._applyModification(Ft,arguments)},spin:function(){return this._applyModification(qt,arguments)},_applyCombination:function(r,n){return r.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(Xt,arguments)},complement:function(){return this._applyCombination(Gt,arguments)},monochromatic:function(){return this._applyCombination(Yt,arguments)},splitcomplement:function(){return this._applyCombination(Ut,arguments)},triad:function(){return this._applyCombination(Ae,[3])},tetrad:function(){return this._applyCombination(Ae,[4])}},p.fromRatio=function(t,r){if(ee(t)=="object"){var n={};for(var o in t)t.hasOwnProperty(o)&&(o==="a"?n[o]=t[o]:n[o]=U(t[o]));t=n}return p(t,r)};function Tt(t){var r={r:0,g:0,b:0},n=1,o=null,s=null,a=null,l=!1,c=!1;return typeof t=="string"&&(t=er(t)),ee(t)=="object"&&(A(t.r)&&A(t.g)&&A(t.b)?(r=Rt(t.r,t.g,t.b),l=!0,c=String(t.r).substr(-1)==="%"?"prgb":"rgb"):A(t.h)&&A(t.s)&&A(t.v)?(o=U(t.s),s=U(t.v),r=Ot(t.h,o,s),l=!0,c="hsv"):A(t.h)&&A(t.s)&&A(t.l)&&(o=U(t.s),a=U(t.l),r=Pt(t.h,o,a),l=!0,c="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=Te(n),{ok:l,format:t.format||c,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:n}}function Rt(t,r,n){return{r:y(t,255)*255,g:y(r,255)*255,b:y(n,255)*255}}function ze(t,r,n){t=y(t,255),r=y(r,255),n=y(n,255);var o=Math.max(t,r,n),s=Math.min(t,r,n),a,l,c=(o+s)/2;if(o==s)a=l=0;else{var i=o-s;switch(l=c>.5?i/(2-o-s):i/(o+s),o){case t:a=(r-n)/i+(r<n?6:0);break;case r:a=(n-t)/i+2;break;case n:a=(t-r)/i+4;break}a/=6}return{h:a,s:l,l:c}}function Pt(t,r,n){var o,s,a;t=y(t,360),r=y(r,100),n=y(n,100);function l(d,f,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?d+(f-d)*6*u:u<1/2?f:u<2/3?d+(f-d)*(2/3-u)*6:d}if(r===0)o=s=a=n;else{var c=n<.5?n*(1+r):n+r-n*r,i=2*n-c;o=l(i,c,t+1/3),s=l(i,c,t),a=l(i,c,t-1/3)}return{r:o*255,g:s*255,b:a*255}}function Ne(t,r,n){t=y(t,255),r=y(r,255),n=y(n,255);var o=Math.max(t,r,n),s=Math.min(t,r,n),a,l,c=o,i=o-s;if(l=o===0?0:i/o,o==s)a=0;else{switch(o){case t:a=(r-n)/i+(r<n?6:0);break;case r:a=(n-t)/i+2;break;case n:a=(t-r)/i+4;break}a/=6}return{h:a,s:l,v:c}}function Ot(t,r,n){t=y(t,360)*6,r=y(r,100),n=y(n,100);var o=Math.floor(t),s=t-o,a=n*(1-r),l=n*(1-s*r),c=n*(1-(1-s)*r),i=o%6,d=[n,l,a,a,c,n][i],f=[c,n,n,l,a,a][i],u=[a,a,c,n,n,l][i];return{r:d*255,g:f*255,b:u*255}}function ve(t,r,n,o){var s=[z(Math.round(t).toString(16)),z(Math.round(r).toString(16)),z(Math.round(n).toString(16))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function Ht(t,r,n,o,s){var a=[z(Math.round(t).toString(16)),z(Math.round(r).toString(16)),z(Math.round(n).toString(16)),z(Re(o))];return s&&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[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Ve(t,r,n,o){var s=[z(Re(o)),z(Math.round(t).toString(16)),z(Math.round(r).toString(16)),z(Math.round(n).toString(16))];return s.join("")}p.equals=function(t,r){return!t||!r?!1:p(t).toRgbString()==p(r).toRgbString()},p.random=function(){return p.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function It(t,r){r=r===0?0:r||10;var n=p(t).toHsl();return n.s-=r/100,n.s=te(n.s),p(n)}function Dt(t,r){r=r===0?0:r||10;var n=p(t).toHsl();return n.s+=r/100,n.s=te(n.s),p(n)}function Ft(t){return p(t).desaturate(100)}function Lt(t,r){r=r===0?0:r||10;var n=p(t).toHsl();return n.l+=r/100,n.l=te(n.l),p(n)}function Wt(t,r){r=r===0?0:r||10;var n=p(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(r/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(r/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(r/100)))),p(n)}function jt(t,r){r=r===0?0:r||10;var n=p(t).toHsl();return n.l-=r/100,n.l=te(n.l),p(n)}function qt(t,r){var n=p(t).toHsl(),o=(n.h+r)%360;return n.h=o<0?360+o:o,p(n)}function Gt(t){var r=p(t).toHsl();return r.h=(r.h+180)%360,p(r)}function Ae(t,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var n=p(t).toHsl(),o=[p(t)],s=360/r,a=1;a<r;a++)o.push(p({h:(n.h+a*s)%360,s:n.s,l:n.l}));return o}function Ut(t){var r=p(t).toHsl(),n=r.h;return[p(t),p({h:(n+72)%360,s:r.s,l:r.l}),p({h:(n+216)%360,s:r.s,l:r.l})]}function Xt(t,r,n){r=r||6,n=n||30;var o=p(t).toHsl(),s=360/n,a=[p(t)];for(o.h=(o.h-(s*r>>1)+720)%360;--r;)o.h=(o.h+s)%360,a.push(p(o));return a}function Yt(t,r){r=r||6;for(var n=p(t).toHsv(),o=n.h,s=n.s,a=n.v,l=[],c=1/r;r--;)l.push(p({h:o,s,v:a})),a=(a+c)%1;return l}p.mix=function(t,r,n){n=n===0?0:n||50;var o=p(t).toRgb(),s=p(r).toRgb(),a=n/100,l={r:(s.r-o.r)*a+o.r,g:(s.g-o.g)*a+o.g,b:(s.b-o.b)*a+o.b,a:(s.a-o.a)*a+o.a};return p(l)},p.readability=function(t,r){var n=p(t),o=p(r);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)},p.isReadable=function(t,r,n){var o=p.readability(t,r),s,a;switch(a=!1,s=tr(n),s.level+s.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7;break}return a},p.mostReadable=function(t,r,n){var o=null,s=0,a,l,c,i;n=n||{},l=n.includeFallbackColors,c=n.level,i=n.size;for(var d=0;d<r.length;d++)a=p.readability(t,r[d]),a>s&&(s=a,o=p(r[d]));return p.isReadable(t,o,{level:c,size:i})||!l?o:(n.includeFallbackColors=!1,p.mostReadable(t,["#fff","#000"],n))};var fe=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Zt=p.hexNames=Kt(fe);function Kt(t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[t[n]]=n);return r}function Te(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function y(t,r){Qt(t)&&(t="100%");var n=Jt(t);return t=Math.min(r,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function te(t){return Math.min(1,Math.max(0,t))}function E(t){return parseInt(t,16)}function Qt(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Jt(t){return typeof t=="string"&&t.indexOf("%")!=-1}function z(t){return t.length==1?"0"+t:""+t}function U(t){return t<=1&&(t=t*100+"%"),t}function Re(t){return Math.round(parseFloat(t)*255).toString(16)}function Pe(t){return E(t)/255}var N=function(){var t="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",n="(?:"+r+")|(?:"+t+")",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",s="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+s),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+s),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+s),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function A(t){return!!N.CSS_UNIT.exec(t)}function er(t){t=t.replace(Vt,"").replace(At,"").toLowerCase();var r=!1;if(fe[t])t=fe[t],r=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=N.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=N.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=N.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=N.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=N.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=N.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=N.hex8.exec(t))?{r:E(n[1]),g:E(n[2]),b:E(n[3]),a:Pe(n[4]),format:r?"name":"hex8"}:(n=N.hex6.exec(t))?{r:E(n[1]),g:E(n[2]),b:E(n[3]),format:r?"name":"hex"}:(n=N.hex4.exec(t))?{r:E(n[1]+""+n[1]),g:E(n[2]+""+n[2]),b:E(n[3]+""+n[3]),a:Pe(n[4]+""+n[4]),format:r?"name":"hex8"}:(n=N.hex3.exec(t))?{r:E(n[1]+""+n[1]),g:E(n[2]+""+n[2]),b:E(n[3]+""+n[3]),format:r?"name":"hex"}:!1}function tr(t){var r,n;return t=t||{level:"AA",size:"small"},r=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:r,size:n}}function Oe(){if(!R)return e.ref("dark");const t=e.ref(document.documentElement.dataset.scheme);return new MutationObserver(n=>{n.forEach(o=>{o.type==="attributes"&&o.attributeName==="data-scheme"&&(t.value=document.documentElement.dataset.scheme)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-scheme"]}),t}function rr(){return e.inject("currentThemeScheme",null)}function He(){return e.inject("currentTheme",e.ref(ae))}function ue(t,r=!0){const n=e.ref(t),o=e.ref(t.scheme),s=Oe();e.watchEffect(()=>{s.value&&(o.value=s.value)}),e.provide("currentTheme",n),e.provide("currentThemeScheme",o);const l={...Object.keys(n.value.colors).map(d=>{const f=d;return n.value.colors[f].reduce((m,g,k)=>{const _=p(g).toRgb();return m[`--r-color-${f}-${k}`]=`${_.r} ${_.g} ${_.b}`,m},{})}).reduce((d,f)=>({...d,...f}),{})},c={"font-family":"'Roboto', sans-serif","background-color":"rgb(var(--r-color-surface-lowest))",color:"rgb(var(--r-color-surface-on))"},i=e.computed(()=>{if(r)return{};const{scheme:d}=t;switch(d){case"dark":return{colorScheme:"dark","--r-color-surface-on":"var(--r-color-surface-3)","--r-color-surface-oninverted":"var(--r-color-surface-8)","--r-color-surface-onlow":"var(--r-color-surface-4)","--r-color-surface-onlowinverted":"var(--r-color-surface-7)","--r-color-surface-lowest":"var(--r-color-surface-10)","--r-color-surface-low":"var(--r-color-surface-9)","--r-color-surface-base":"var(--r-color-surface-8)","--r-color-surface-high":"var(--r-color-surface-7)","--r-color-surface-highest":"var(--r-color-surface-6)","--r-color-surface-border":"var(--r-color-surface-7)","--r-color-primary-container":"var(--r-color-primary-8)","--r-color-secondary-container":"var(--r-color-secondary-8)","--r-color-tertiary-container":"var(--r-color-tertiary-8)","--r-color-error-container":"var(--r-color-error-8)","--r-color-primary-containerd":"var(--r-color-primary-9)","--r-color-secondary-containerd":"var(--r-color-secondary-9)","--r-color-tertiary-containerd":"var(--r-color-tertiary-9)","--r-color-error-containerd":"var(--r-color-error-9)","--r-color-primary-containerl":"var(--r-color-primary-6)","--r-color-secondary-containerl":"var(--r-color-secondary-6)","--r-color-tertiary-containerl":"var(--r-color-tertiary-6)","--r-color-error-containerl":"var(--r-color-error-6)"};case"light":return{colorScheme:"light","--r-color-surface-on":"var(--r-color-surface-7)","--r-color-surface-oninverted":"var(--r-color-surface-2)","--r-color-surface-onlow":"var(--r-color-surface-6)","--r-color-surface-onlowinverted":"var(--r-color-surface-3)","--r-color-surface-lowest":"var(--r-color-surface-3)","--r-color-surface-low":"var(--r-color-surface-2)","--r-color-surface-base":"var(--r-color-surface-1)","--r-color-surface-high":"var(--r-color-surface-0)","--r-color-surface-highest":"var(--r-color-surface-0)","--r-color-surface-border":"var(--r-color-surface-4)","--r-color-primary-container":"var(--r-color-primary-6)","--r-color-secondary-container":"var(--r-color-secondary-6)","--r-color-tertiary-container":"var(--r-color-tertiary-6)","--r-color-error-container":"var(--r-color-error-6)","--r-color-primary-containerd":"var(--r-color-primary-7)","--r-color-secondary-containerd":"var(--r-color-secondary-7)","--r-color-tertiary-containerd":"var(--r-color-tertiary-7)","--r-color-error-containerd":"var(--r-color-error-7)","--r-color-primary-containerl":"var(--r-color-primary-4)","--r-color-secondary-containerl":"var(--r-color-secondary-4)","--r-color-tertiary-containerl":"var(--r-color-tertiary-4)","--r-color-error-containerl":"var(--r-color-error-4)"}}});return{...l,...c,...i.value}}function me(t){const r=e.ref("");return e.onMounted(()=>{t.id?r.value=t.id:r.value=`switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`}),r}const pe=Symbol("scheme");function Ie(){return e.inject(pe,e.ref("dark"))}const nr=["id"],or=["for"],ar=e.defineComponent({__name:"ColorInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(t){const r=e.useModel(t,"modelValue"),n=e.useAttrs(),o=me(n),s=e.ref(null);return(a,l)=>{const c=$e;return e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("input",{id:e.unref(o),ref_key:"input",ref:s,"onUpdate:modelValue":l[0]||(l[0]=i=>r.value=i),type:"color",class:"pointer-events-none absolute opacity-0"},null,8,nr),[[e.vModelText,r.value]]),e.createElementVNode("label",{for:e.unref(o)},[e.createVNode(c,{class:"cursor-pointer",color:r.value??"#222"},null,8,["color"])],8,or)])}}}),sr=["data-scheme","data-theme"],De=e.defineComponent({__name:"ThemeProvider",props:{theme:{}},setup(t){const n=ue(t.theme,!1);return(o,s)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle([e.unref(n)]),"data-scheme":o.theme.scheme,"data-theme":o.theme.name},[e.renderSlot(o.$slots,"default")],12,sr))}}),he=e.defineComponent({__name:"FullscreenOverlay",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1},wrapperClass:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue"),o=e.ref(null);function s(c){r.persistent||c.target===o.value&&(n.value=!1)}const a=e.computed(()=>{switch(r.blur){case"sm":return"backdrop-blur-sm";case"md":case!0:return"backdrop-blur-md";case"lg":return"backdrop-blur-lg";default:return""}});e.watchEffect(()=>{n.value?document.body.style.overflow="hidden":setTimeout(()=>{document.querySelector(".modal-wrapper.op100")||(document.body.style.overflow="",document.body.style.marginRight="")},300)});const l=He();return(c,i)=>{const d=De;return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(d,{theme:e.unref(l)},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"wrapperRef",ref:o,class:e.normalizeClass(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full bg-surface-lowest/50 transition-all duration-300 md:items-center",[a.value,c.wrapperClass,{"op0 pointer-events-none":!n.value,op100:n.value}]]),onClick:s},[e.renderSlot(c.$slots,"default")],2)]),_:3},8,["theme"])])}}}),lr={class:"flex justify-end p-4 md:px-6 md:py-4 md:pb-0"},ir=e.createElementVNode("i",{class:"i-tabler-x"},null,-1),cr={class:"h-full flex flex-col items-center justify-center px-4 md:px-6"},dr=e.defineComponent({__name:"Drawer",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1},position:{default:"left"}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue");return e.watchEffect(()=>{n.value?document.body.style.overflow="hidden":setTimeout(()=>{document.querySelector(".modal-wrapper.op100")||(document.body.style.overflow="",document.body.style.marginRight="")},300)}),(o,s)=>{const a=de,l=he;return e.openBlock(),e.createBlock(l,{modelValue:n.value,"onUpdate:modelValue":s[1]||(s[1]=c=>n.value=c),blur:r.blur,persistent:r.persistent},{default:e.withCtx(()=>[e.createVNode(e.Transition,{"enter-from-class":o.position==="left"?"-translate-x-1/1":"translate-x-1/1","enter-to-class":(o.position==="left","translate-x-0"),"leave-from-class":(o.position==="left","translate-x-0"),"leave-to-class":o.position==="left"?"-translate-x-1/1":"translate-x-1/1","enter-active-class":"transition ease-out duration-300","leave-active-class":"transition ease-in duration-200"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["fixed h-full w-full bg-surface-low md:w-md",o.position==="left"?"left-0":"right-0"])},[e.createElementVNode("div",lr,[e.createVNode(a,{icon:"",variant:"transparent",class:"text-surface-on hover:text-surface-on",onPointerup:s[0]||(s[0]=c=>n.value=!1)},{default:e.withCtx(()=>[ir]),_:1})]),e.createElementVNode("div",cr,[e.renderSlot(o.$slots,"default")])],2)):e.createCommentVNode("",!0)]),_:3},8,["enter-from-class","enter-to-class","leave-from-class","leave-to-class"])]),_:3},8,["modelValue","blur","persistent"])}}}),fr=e.defineComponent({__name:"Dropzone",props:{dashed:{type:Boolean,default:!0},accept:{default:"*"}},emits:["drop"],setup(t,{emit:r}){const n=t,o=r,s=e.ref(),{onChange:a,open:l}=kt({accept:n.accept});a(i=>{i?o("drop",Array.from(i)):o("drop",null)});const{isOverDropZone:c}=ht(s,{onDrop:i=>{o("drop",i)}});return(i,d)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropZoneRef",ref:s,class:e.normalizeClass([{"":e.unref(c)," bg-surface-low":!e.unref(c),"border-dashed":i.dashed},"h-full w-full flex cursor-pointer items-center justify-center rounded"]),onPointerup:d[0]||(d[0]=()=>e.unref(l)())},[e.renderSlot(i.$slots,"default")],34))}}),ur=e.defineComponent({__name:"Image",props:{is:{default:"img"},src:{},style:{},class:{},width:{},maxWidth:{},height:{},maxHeight:{},rounded:{default:"md"}},setup(t){const r=t,n=e.ref(!1),o=e.ref(null);function s(){n.value=!0}e.onMounted(()=>{var l;(l=o.value)!=null&&l.complete&&s()});const a=v(r);return(l,c)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:l.height,width:l.width,maxHeight:l.maxHeight,maxWidth:l.maxWidth})},[l.src?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.is),e.mergeProps({key:0,ref_key:"img",ref:o,style:[l.style,e.unref(a).style],src:l.src,class:["h-full w-full object-cover",[r.class,e.unref(a).class,{hidden:!e.unref(n)}]]},l.$attrs,{onLoad:s}),null,16,["style","src","class"])):e.createCommentVNode("",!0),e.unref(n)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["h-full w-full animate-pulse border-transparent bg-surface-high object-cover",[r.class,e.unref(a).class]]),style:e.normalizeStyle([l.style,e.unref(a).style])},null,6))],4))}}),mr={class:"relative"},pr=e.defineComponent({__name:"Indicator",props:{color:{default:"primary"},size:{default:"md"},position:{default:"top-right"},ping:{type:Boolean}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"w-2 h-2";case"md":return"w-3 h-3";case"lg":return"w-4 h-4";default:return typeof r.size=="number"||!Number.isNaN(Number(r.size))?`w-${r.size} h-${r.size}`:r.size}}),o=e.useSlots(),s=e.computed(()=>{if(!o.label)return"";switch(r.size){case"sm":return"text-sm children:px-1.5";case"md":return"text-md children:px-2";case"lg":return"text-lg children:px-2.5"}}),a=e.computed(()=>{switch(r.position){case"top-left":return"top-0 left-0 -translate-x-1/2 -translate-y-1/2";case"top-right":return"top-0 right-0 translate-x-1/2 -translate-y-1/2";case"bottom-left":return"bottom-0 left-0 -translate-x-1/2 translate-y-1/2";case"bottom-right":return"bottom-0 right-0 translate-x-1/2 translate-y-1/2"}}),l=e.computed(()=>{switch(r.color){case"primary":return"bg-primary-container text-primary-on";case"secondary":return"bg-secondary-container text-secondary-on";case"tertiary":return"bg-tertiary-container text-tertiary-on";case"error":return"bg-error-container text-error-on"}});return(c,i)=>(e.openBlock(),e.createElementBlock("div",mr,[e.createElementVNode("div",{class:e.normalizeClass([[e.unref(a),e.unref(s)],"absolute z-1"])},[r.ping?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute box-content animate-ping border-2 border-transparent rounded-full",[{[e.unref(n)]:!c.$slots.label},e.unref(l)]])},[c.$slots.label?e.renderSlot(c.$slots,"label",{key:0}):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["top-0 box-content border-2 border-surface-low rounded-full",[{[e.unref(n)]:!c.$slots.label},e.unref(l)]])},[c.$slots.label?e.renderSlot(c.$slots,"label",{key:0}):e.createCommentVNode("",!0)],2)],2),e.renderSlot(c.$slots,"default")]))}}),hr=e.defineComponent({__name:"Modal",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue");return e.watchEffect(()=>{n.value?document.body.style.overflow="hidden":setTimeout(()=>{document.querySelector(".modal-wrapper.op100")||(document.body.style.overflow="",document.body.style.marginRight="")},300)}),(o,s)=>{const a=he;return e.openBlock(),e.createBlock(a,{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=l=>n.value=l),blur:r.blur,persistent:r.persistent,"wrapper-class":"flex items-end justify-center"},{default:e.withCtx(()=>[e.createVNode(e.Transition,{"enter-from-class":"translate-y-1/2","enter-to-class":"translate-y-0","leave-from-class":"translate-y-0","leave-to-class":"translate-y-1/2","enter-active-class":"transition ease-out duration-300","leave-active-class":"transition ease-in duration-200"},{default:e.withCtx(()=>[n.value?e.renderSlot(o.$slots,"default",{key:0}):e.createCommentVNode("",!0)]),_:3})]),_:3},8,["modelValue","blur","persistent"])}}}),gr={key:0,class:"h-container w-container i-tabler-loader-2 shrink-0 animate-spin"},br={key:1},yr={class:"grow-1"},wr={key:2,class:"text-sm text-surface-onlow"},kr=e.createElementVNode("i",{class:"i-tabler-x"},null,-1),Fe=e.defineComponent({__name:"Notification",props:{title:{},message:{},icon:{},loading:{type:Boolean},withBorder:{type:Boolean},closeable:{type:Boolean},rounded:{default:"md"},block:{type:Boolean,default:!1},color:{default:"primary"}},emits:["close"],setup(t){const r=t,n=v(r),o=e.computed(()=>{switch(r.color){case"secondary":return"bg-secondary-container";case"tertiary":return"bg-tertiary-container";case"error":return"bg-error-container";default:return"bg-primary-container"}}),s=e.computed(()=>{switch(r.color){case"secondary":return"text-secondary-container";case"tertiary":return"text-tertiary-container";case"error":return"text-error-container";default:return"text-primary-container"}});return(a,l)=>{const c=de;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative min-h-16 min-w-80 w-full flex items-center gap-2 container-low p-3",[{"border-0":!a.withBorder},e.unref(n).class,{"max-w-100":!a.block,"w-full":a.block}]]),style:e.normalizeStyle(e.unref(n).style)},[a.icon?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["leading-0",e.unref(s)])},[a.loading?(e.openBlock(),e.createElementBlock("i",gr)):(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(["h-container w-container shrink-0",a.icon])},null,2))],2)):(e.openBlock(),e.createElementBlock("div",br,[e.createElementVNode("div",{class:e.normalizeClass(["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full",[{"animate-pulse":a.loading},e.unref(o)]])},null,2)])),e.createElementVNode("div",yr,[a.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(s),"text-base"])},e.toDisplayString(a.title),3)):e.createCommentVNode("",!0),a.$slots.message?e.renderSlot(a.$slots,"message",{key:1}):a.message?(e.openBlock(),e.createElementBlock("div",wr,e.toDisplayString(a.message),1)):e.createCommentVNode("",!0)]),a.closeable?(e.openBlock(),e.createBlock(c,{key:2,icon:"",variant:"transparent",class:"text-surface-on hover:text-surface-on",onClick:l[0]||(l[0]=i=>a.$emit("close"))},{default:e.withCtx(()=>[kr]),_:1})):e.createCommentVNode("",!0)],6)}}}),Le=new Set,x=new WeakMap,L=new WeakMap,I=new WeakMap,ge=new WeakMap,_r=new WeakMap,W=new WeakMap,re=new WeakMap,X=new WeakSet;let P,be=0,ye=0;const T="__aa_tgt",Y="__aa_del",ne="__aa_new",Cr=t=>{const r=Er(t);r&&r.forEach(n=>$r(n))},Sr=t=>{t.forEach(r=>{r.target===P&&xr(),x.has(r.target)&&D(r.target)})};function Br(t){const r=ge.get(t);r==null||r.disconnect();let n=x.get(t),o=0;const s=5;n||(n=q(t),x.set(t,n));const{offsetWidth:a,offsetHeight:l}=P,i=[n.top-s,a-(n.left+s+n.width),l-(n.top+s+n.height),n.left-s].map(f=>`${-1*Math.floor(f)}px`).join(" "),d=new IntersectionObserver(()=>{++o>1&&D(t)},{root:P,threshold:1,rootMargin:i});d.observe(t),ge.set(t,d)}function D(t){clearTimeout(re.get(t));const r=oe(t),n=Z(r)?500:r.duration;re.set(t,setTimeout(async()=>{const o=I.get(t);try{await(o==null?void 0:o.finished),x.set(t,q(t)),Br(t)}catch{}},n))}function xr(){clearTimeout(re.get(P)),re.set(P,setTimeout(()=>{Le.forEach(t=>Ge(t,r=>We(()=>D(r))))},100))}function Mr(t){setTimeout(()=>{_r.set(t,setInterval(()=>We(D.bind(null,t)),2e3))},Math.round(2e3*Math.random()))}function We(t){typeof requestIdleCallback=="function"?requestIdleCallback(()=>t()):requestAnimationFrame(()=>t())}let we,j;typeof window<"u"&&(P=document.documentElement,we=new MutationObserver(Cr),j=new ResizeObserver(Sr),window.addEventListener("scroll",()=>{ye=window.scrollY,be=window.scrollX}),j.observe(P));function Er(t){return t.reduce((o,s)=>[...o,...Array.from(s.addedNodes),...Array.from(s.removedNodes)],[]).every(o=>o.nodeName==="#comment")?!1:t.reduce((o,s)=>{if(o===!1)return!1;if(s.target instanceof Element){if(ke(s.target),!o.has(s.target)){o.add(s.target);for(let a=0;a<s.target.children.length;a++){const l=s.target.children.item(a);if(l){if(Y in l)return!1;ke(s.target,l),o.add(l)}}}if(s.removedNodes.length)for(let a=0;a<s.removedNodes.length;a++){const l=s.removedNodes[a];if(Y in l)return!1;l instanceof Element&&(o.add(l),ke(s.target,l),L.set(l,[s.previousSibling,s.nextSibling]))}}return o},new Set)}function ke(t,r){!r&&!(T in t)?Object.defineProperty(t,T,{value:t}):r&&!(T in r)&&Object.defineProperty(r,T,{value:t})}function $r(t){var r;const n=t.isConnected,o=x.has(t);n&&L.has(t)&&L.delete(t),I.has(t)&&((r=I.get(t))===null||r===void 0||r.cancel()),ne in t?Ue(t):o&&n?Nr(t):o&&!n?vr(t):Ue(t)}function V(t){return Number(t.replace(/[^0-9.\-]/g,""))}function zr(t){let r=t.parentElement;for(;r;){if(r.scrollLeft||r.scrollTop)return{x:r.scrollLeft,y:r.scrollTop};r=r.parentElement}return{x:0,y:0}}function q(t){const r=t.getBoundingClientRect(),{x:n,y:o}=zr(t);return{top:r.top+o,left:r.left+n,width:r.width,height:r.height}}function je(t,r,n){let o=r.width,s=r.height,a=n.width,l=n.height;const c=getComputedStyle(t);if(c.getPropertyValue("box-sizing")==="content-box"){const d=V(c.paddingTop)+V(c.paddingBottom)+V(c.borderTopWidth)+V(c.borderBottomWidth),f=V(c.paddingLeft)+V(c.paddingRight)+V(c.borderRightWidth)+V(c.borderLeftWidth);o-=f,a-=f,s-=d,l-=d}return[o,a,s,l].map(Math.round)}function oe(t){return T in t&&W.has(t[T])?W.get(t[T]):{duration:250,easing:"ease-in-out"}}function qe(t){if(T in t)return t[T]}function _e(t){const r=qe(t);return r?X.has(r):!1}function Ge(t,...r){r.forEach(n=>n(t,W.has(t)));for(let n=0;n<t.children.length;n++){const o=t.children.item(n);o&&r.forEach(s=>s(o,W.has(o)))}}function Ce(t){return Array.isArray(t)?t:[t]}function Z(t){return typeof t=="function"}function Nr(t){const r=x.get(t),n=q(t);if(!_e(t))return x.set(t,n);let o;if(!r)return;const s=oe(t);if(typeof s!="function"){const a=r.left-n.left,l=r.top-n.top,[c,i,d,f]=je(t,r,n),u={transform:`translate(${a}px, ${l}px)`},m={transform:"translate(0, 0)"};c!==i&&(u.width=`${c}px`,m.width=`${i}px`),d!==f&&(u.height=`${d}px`,m.height=`${f}px`),o=t.animate([u,m],{duration:s.duration,easing:s.easing})}else{const[a]=Ce(s(t,"remain",r,n));o=new Animation(a),o.play()}I.set(t,o),x.set(t,n),o.addEventListener("finish",D.bind(null,t))}function Ue(t){ne in t&&delete t[ne];const r=q(t);x.set(t,r);const n=oe(t);if(!_e(t))return;let o;if(typeof n!="function")o=t.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:n.duration*1.5,easing:"ease-in"});else{const[s]=Ce(n(t,"add",r));o=new Animation(s),o.play()}I.set(t,o),o.addEventListener("finish",D.bind(null,t))}function Xe(t,r){var n;t.remove(),x.delete(t),L.delete(t),I.delete(t),(n=ge.get(t))===null||n===void 0||n.disconnect(),setTimeout(()=>{if(Y in t&&delete t[Y],Object.defineProperty(t,ne,{value:!0,configurable:!0}),r&&t instanceof HTMLElement)for(const o in r)t.style[o]=""},0)}function vr(t){var r;if(!L.has(t)||!x.has(t))return;const[n,o]=L.get(t);Object.defineProperty(t,Y,{value:!0,configurable:!0});const s=window.scrollX,a=window.scrollY;if(o&&o.parentNode&&o.parentNode instanceof Element?o.parentNode.insertBefore(t,o):n&&n.parentNode?n.parentNode.appendChild(t):(r=qe(t))===null||r===void 0||r.appendChild(t),!_e(t))return Xe(t);const[l,c,i,d]=Ar(t),f=oe(t),u=x.get(t);(s!==be||a!==ye)&&Vr(t,s,a,f);let m,g={position:"absolute",top:`${l}px`,left:`${c}px`,width:`${i}px`,height:`${d}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!Z(f))Object.assign(t.style,g),m=t.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:f.duration,easing:"ease-out"});else{const[k,_]=Ce(f(t,"remove",u));(_==null?void 0:_.styleReset)!==!1&&(g=(_==null?void 0:_.styleReset)||g,Object.assign(t.style,g)),m=new Animation(k),m.play()}I.set(t,m),m.addEventListener("finish",Xe.bind(null,t,g))}function Vr(t,r,n,o){const s=be-r,a=ye-n,l=document.documentElement.style.scrollBehavior;if(getComputedStyle(P).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+s,window.scrollY+a),!t.parentElement)return;const i=t.parentElement;let d=i.clientHeight,f=i.clientWidth;const u=performance.now();function m(){requestAnimationFrame(()=>{if(!Z(o)){const g=d-i.clientHeight,k=f-i.clientWidth;u+o.duration>performance.now()?(window.scrollTo({left:window.scrollX-k,top:window.scrollY-g}),d=i.clientHeight,f=i.clientWidth,m()):document.documentElement.style.scrollBehavior=l}})}m()}function Ar(t){const r=x.get(t),[n,,o]=je(t,r,q(t));let s=t.parentElement;for(;s&&(getComputedStyle(s).position==="static"||s instanceof HTMLBodyElement);)s=s.parentElement;s||(s=document.body);const a=getComputedStyle(s),l=x.get(s)||q(s),c=Math.round(r.top-l.top)-V(a.borderTopWidth),i=Math.round(r.left-l.left)-V(a.borderLeftWidth);return[c,i,n,o]}function Tr(t,r={}){return we&&j&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!Z(r)&&!r.disrespectUserMotionPreference||(X.add(t),getComputedStyle(t).position==="static"&&Object.assign(t.style,{position:"relative"}),Ge(t,D,Mr,s=>j==null?void 0:j.observe(s)),Z(r)?W.set(t,r):W.set(t,{duration:250,easing:"ease-in-out",...r}),we.observe(t,{childList:!0}),Le.add(t))),Object.freeze({parent:t,enable:()=>{X.add(t)},disable:()=>{X.delete(t)},isEnabled:()=>X.has(t)})}const Rr={mounted:(t,r)=>{Tr(t,r.value||{})},getSSRProps:()=>({})},Pr={class:"fixed z-20 flex flex-col gap-2 p-2"},Or=e.defineComponent({__name:"NotificationSystem",setup(t){const r=Qe();return(n,o)=>{const s=Fe;return e.withDirectives((e.openBlock(),e.createElementBlock("div",Pr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),a=>(e.openBlock(),e.createBlock(s,{key:a.hash,closeable:"","with-border":"",title:a.title,message:a.message,icon:a.icon,loading:a.loading,color:a.color,onClose:l=>e.unref(r).splice(e.unref(r).indexOf(a),1)},null,8,["title","message","icon","loading","color","onClose"]))),128))])),[[e.unref(Rr)]])}}}),Hr={class:"relative"},Ir=e.defineComponent({__name:"Overlay",props:{blur:{type:[Boolean,String],default:!1},rounded:{default:"none"},opacity:{default:30},color:{default:"black"}},setup(t){const r=t,n=e.computed(()=>{switch(r.blur){case"sm":return"backdrop-blur-sm";case"md":case!0:return"backdrop-blur-md";case"lg":return"backdrop-blur-lg";default:return""}}),o=v(r),s=e.ref(null),a=p(r.color).toRgb(),l=e.computed(()=>({backgroundColor:`rgba(${a.r}, ${a.g}, ${a.b}, ${r.opacity/100})`}));return(c,i)=>(e.openBlock(),e.createElementBlock("div",Hr,[e.renderSlot(c.$slots,"default"),e.createElementVNode("div",e.mergeProps(c.$attrs,{ref_key:"wrapperRef",ref:s,class:[[e.unref(n),e.unref(o).class],"absolute left-0 top-0 h-full w-full overflow-hidden md:items-center"],style:[e.unref(o).style,e.unref(l)]}),[e.renderSlot(c.$slots,"content")],16)]))}}),Dr=e.defineComponent({__name:"Paper",props:{size:{default:"md"},rounded:{default:"md"},withBorder:{type:Boolean,default:!1},is:{default:"div"}},setup(t){const n=v(t);return(o,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.is),{class:e.normalizeClass(["container-low rounded-lg p-4",[{"border-transparent":!o.withBorder},e.unref(n).class]]),style:e.normalizeStyle([e.unref(n).style])},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}}),Fr=["value","placeholder","type"],Ye=e.defineComponent({__name:"TextField",props:{modelValue:{},onChange:{},color:{default:"primary"},error:{type:Boolean},disabled:{type:Boolean},rounded:{default:"md"},size:{default:"md"},password:{type:Boolean},placeholder:{}},emits:["change","update:modelValue","input","click","pointerdown","pointerup"],setup(t,{expose:r,emit:n}){const o=t,s=n,a=e.computed(()=>{switch(o.size){case"sm":return{base:"h-6 px-2 py-1 text-xs"};case"md":return{base:"h-8 px-3 py-1 text-sm"};case"lg":return{base:"h-10 px-4 py-2 text-base"}}}),l=e.computed(()=>{if(o.error)return"text-error-container bg-surface-base border-error-container focus:border-error-container";switch(o.color){case"secondary":return"text-surface-on bg-surface-base border-surface-border-base focus:border-secondary-container";case"tertiary":return"text-surface-on bg-surface-base border-surface-border-base focus:border-tertiary-container";case"error":return"text-surface-on bg-surface-base border-surface-border-base focus:border-error-container";case"primary":default:return"text-surface-on bg-surface-base border-surface-border-base focus:border-primary-container"}}),c=e.computed(()=>o.disabled?"pointer-events-none filter grayscale opacity-60":""),i=v(o),d=e.ref(null);function f(u){var m;s("update:modelValue",((m=u.target)==null?void 0:m.value)??""),s("input",u)}return r({el:d}),(u,m)=>(e.openBlock(),e.createElementBlock("input",{ref_key:"input",ref:d,value:u.modelValue,class:e.normalizeClass(["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color",[e.unref(l),e.unref(c),e.unref(i).class,e.unref(a).base]]),style:e.normalizeStyle([e.unref(i).style]),placeholder:u.placeholder,type:o.password?"password":"text",onChange:m[0]||(m[0]=g=>u.$emit("change",g)),onInput:f,onClick:m[1]||(m[1]=g=>u.$emit("click",g)),onPointerdown:m[2]||(m[2]=g=>u.$emit("pointerdown",g)),onPointerup:m[3]||(m[3]=g=>u.$emit("pointerup",g))},null,46,Fr))}}),Lr={class:"flex gap-2"},Wr=e.defineComponent({__name:"PinInput",props:{modelValue:{},length:{default:6},size:{},password:{type:Boolean}},setup(t){const r=t,n=e.ref([]);function o(a){a.preventDefault(),a.stopPropagation();const l=n.value.findIndex(i=>i.el===a.target),c=a.target.value??"";a.target.value="",Array.from(c).forEach((i,d)=>{l+d>=n.value.length||(n.value[l+d].el.value=i,l+d+1<n.value.length?(n.value[l+d+1].el.focus(),n.value[l+d+1].el.select()):n.value[l+d].el.blur())})}function s(a){a.preventDefault(),a.stopPropagation();const l=a.target.value!=="";a.target.value="";const c=n.value.findIndex(i=>i.el===a.target);c!==0&&(n.value[c-1].el.focus(),n.value[c-1].el.select(),l||(n.value[c-1].el.value=""))}return(a,l)=>(e.openBlock(),e.createElementBlock("div",Lr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.length,c=>(e.openBlock(),e.createBlock(Ye,{ref_for:!0,ref_key:"inputs",ref:n,key:c,class:"w-8 text-center",style:{padding:"0"},password:r.password,onPointerup:l[0]||(l[0]=i=>i.target.select()),onInput:e.withModifiers(o,["stop","prevent"]),onKeydown:e.withKeys(s,["backspace"])},null,8,["password"]))),128))]))}}),jr=e.defineComponent({__name:"Progress",props:{value:{default:0},max:{default:100},min:{default:0},size:{default:"md"},color:{default:"primary"},rounded:{default:"full"},loading:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"h-0.25";case"md":return"h-0.5";case"lg":return"h-1"}}),o=e.computed(()=>{switch(r.color){case"primary":return"bg-primary-container";case"secondary":return"bg-secondary-7";case"tertiary":return"bg-tertiary-7";case"error":return"bg-error-7"}}),s=v(r);return(a,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color",[e.unref(n),e.unref(s).class]]),style:e.normalizeStyle([e.unref(s).style])},[a.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["loading-progress h-full",[e.unref(o)]])},null,2)):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["h-full",[e.unref(o)]]),style:e.normalizeStyle([{width:`${(Number(a.value)-Number(a.min))/(Number(a.max)-Number(a.min))*100}%`}])},null,6))],6))}}),Se={primary:["#e5f7ff","#d3ebfa","#a9d4f1","#7cbde9","#57a9e0","#3f9cdc","#3096dc","#1f82c4","#0f73b0","#00649c","#082f49"],secondary:["#e9fbf0","#dcf1e3","#badfc7","#96cea9","#77bf90","#63b580","#58b077","#479a64","#3b8a58","#2c7749","#022c22"],tertiary:["#fff7e1","#ffedcd","#fcd99e","#f9c46b","#f7b23f","#f6a724","#f5a113","#da8c04","#c37d00","#aa6a00","#572508"],error:["#ffeaea","#fcd5d5","#f2a8a9","#ea7a7a","#e25353","#de3939","#dd2b2b","#c41e1f","#af171a","#9a0913","#450a0a"],surface:["#fefefe","#fafafa","#f5f5f5","#e5e5e5","#a3a3a3","#737373","#525252","#404040","#262626","#171717","#121212"]},ae={name:"dark",scheme:"dark",colors:Se},Ze={name:"light",scheme:"light",colors:Se},qr=Symbol("Notifications"),Ke=e.reactive([]);function Qe(){return Ke}class Gr{static show(r){r.hash=Math.random().toString(36),Ke.push(r)}}const Be=[.96,.96,.907,.805,.697,.547,.518,.445,.395,.34,.28];function Ur(t){const r=p(t).toHsl().l;return Be.reduce((n,o)=>Math.abs(o-r)<Math.abs(n-r)?o:n)}function Je(t){const r=p(t),n=Ur(r),o=Be.findIndex(a=>a===n),s=Be.map(a=>{const l=p({h:r.toHsl().h,s:r.toHsl().s,l:a});return l.saturate(0*100),l});return{baseColorIndex:o,colors:s.map(a=>a.toHexString())}}function Xr(t){return Je(t).colors}const Yr=e.defineComponent({__name:"RokuProvider",props:{is:{default:"div"},theme:{default(){return typeof window>"u"||document.documentElement.dataset.scheme==="dark"?ae:Ze}}},setup(t){const r=t,n=e.ref(0),o=e.ref(0),s=e.ref(r.theme.scheme);R&&(new ResizeObserver(()=>{const f=window.innerWidth-document.body.clientWidth;f!==0&&(n.value=f),o.value=f}).observe(document.body),new MutationObserver(()=>{s.value!==document.documentElement.dataset.scheme&&(s.value=document.documentElement.dataset.scheme)}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-scheme"]}));const a=e.computed(()=>o.value===n.value?"0px":`${n.value}px`),l=Ct();e.watchEffect(()=>{if(!R)return"dark";s.value==="dark"?document.documentElement.dataset.scheme="dark":s.value==="light"?document.documentElement.dataset.scheme="light":l.value==="dark"?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light",localStorage.setItem("scheme",document.documentElement.dataset.scheme)}),e.provide(pe,s);const c=ue(r.theme);return(i,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.is),{style:e.normalizeStyle([e.unref(c),{paddingRight:e.unref(a)}]),class:"text-surface-on transition-background-color,border-color,color"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},8,["style"]))}}),Zr=["id"],Kr=["for"],Qr=["for"],et=e.defineComponent({inheritAttrs:!1,__name:"Switch",props:e.mergeModels({size:{default:"md"},animate:{type:Boolean,default:!0},options:{},label:{},id:{},rounded:{default:"full"},color:{default:"primary"},disabled:{type:Boolean},offIcon:{},onIcon:{},value:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue");r.value&&(n.value=r.value);const o=e.ref(null),s=e.ref(!1),a=e.computed(()=>{switch(r.size){case"sm":return{icon:"text-xs mx-0.5",wrapper:"h-4 w-8",indicator:s.value?"h-3 w-4":"h-3 w-3",inactive:"left-[calc(0.125rem-1px)]",active:s.value?"left-[calc(0.875rem-1px)]":"left-[calc(1.125rem-1px)]"};case"md":return{icon:"text-sm mx-1",wrapper:"h-6 w-12",indicator:s.value?"h-4 w-5":"h-4 w-4",inactive:"left-[calc(0.25rem-1px)]",active:s.value?"left-[calc(1.5rem-1px)]":"left-[calc(1.75rem-1px)]"};case"lg":return{icon:"text-lg mx-2",wrapper:"h-8 w-16",indicator:s.value?"h-6 w-8":"h-6 w-6",inactive:"left-[calc(0.25rem-1px)]",active:s.value?"left-[calc(1.75rem-1px)]":"left-[calc(2.25rem-1px)]"}}}),l=e.computed(()=>r.animate?{indicator:"transition-all",progress:"transition-width"}:{indicator:"",progress:""}),c=me(r),i=e.computed(()=>{let f="bg-primary-container";switch(r.color){case"secondary":f="bg-secondary-7";break;case"tertiary":f="bg-tertiary-7";break;case"error":f="bg-error-7";break}return{wrapper:n.value?`border border-transparent ${f}`:"bg-surface-lowest border border-surface-border-low",indicator:r.disabled?"bg-surface-high":"bg-white text-primary-container"}}),d=v(r);return(f,u)=>(e.openBlock(),e.createElementBlock("div",{role:"switch",class:e.normalizeClass(["relative flex items-center gap-2",{"pointer-events-none filter-grayscale op60":r.disabled}])},[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(c),"onUpdate:modelValue":u[0]||(u[0]=m=>n.value=m)},f.$attrs,{class:"hidden",type:"checkbox"}),null,16,Zr),[[e.vModelCheckbox,n.value]]),e.createElementVNode("label",{class:"leading-0 cursor-pointer!",for:e.unref(c)},[e.createElementVNode("div",{ref_key:"wrapper",ref:o,class:e.normalizeClass([[e.unref(a).wrapper,e.unref(i).wrapper,e.unref(d).class],"relative inline-block transition-all"]),style:e.normalizeStyle([e.unref(d).style]),onPointerdown:u[1]||(u[1]=m=>s.value=!0),onPointerup:u[2]||(u[2]=m=>s.value=!1),onPointerleave:u[3]||(u[3]=m=>s.value=!1),onPointerenter:u[4]||(u[4]=m=>m.buttons===1&&(s.value=!0))},[e.createElementVNode("div",{class:e.normalizeClass(["absolute top-50% -translate-y-50%",[e.unref(a).indicator,e.unref(i).indicator,e.unref(l).indicator,n.value?e.unref(a).active:e.unref(a).inactive,e.unref(d).class]]),style:e.normalizeStyle([e.unref(d).style])},null,6),e.createElementVNode("i",{class:e.normalizeClass(["absolute top-1/2 -translate-y-50%",[e.unref(a).icon,{[`left-0 text-${f.color}-on`]:n.value,"right-0 text-surface-on ":!n.value,[f.onIcon??""]:n.value&&f.onIcon,[f.offIcon??""]:!n.value&&f.offIcon}]])},null,2)],38)],8,Kr),f.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(c)},e.toDisplayString(f.label),9,Qr)):e.createCommentVNode("",!0)],2))}}),Jr={class:"dark:hidden"},en={class:"light:hidden"},tn=e.defineComponent({__name:"SchemeSwitch",setup(t){const r=Ie(),n=e.computed({get(){return r.value==="dark"},set(a){r.value=a?"dark":"light"}});e.watchEffect(()=>{R&&(n.value===!0?(document.documentElement.setAttribute("data-scheme","dark"),localStorage.setItem("scheme","dark")):n.value===!1&&(document.documentElement.setAttribute("data-scheme","light"),localStorage.setItem("scheme","light")))});const o=e.ref(!0),s=e.ref(!1);return e.onMounted(()=>{if(R){const a=localStorage.getItem("scheme");a==="dark"?n.value=!0:a==="light"?n.value=!1:n.value=window.matchMedia("(prefers-color-scheme: dark)").matches}o.value=!1}),e.nextTick(()=>{s.value=!0}),(a,l)=>{const c=et;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass({hidden:!e.unref(o)})},[e.createElementVNode("div",Jr,[e.createVNode(c,{value:!1,"on-icon":"i-tabler-moon","off-icon":"i-tabler-sun"})]),e.createElementVNode("div",en,[e.createVNode(c,{value:!0,color:"secondary","on-icon":"i-tabler-moon","off-icon":"i-tabler-sun"})])],2),e.createElementVNode("div",{class:e.normalizeClass({hidden:e.unref(o)})},[e.createVNode(c,{modelValue:e.unref(n),"onUpdate:modelValue":l[0]||(l[0]=i=>e.isRef(n)?n.value=i:null),animate:e.unref(s),color:"secondary","on-icon":"i-tabler-moon","off-icon":"i-tabler-sun"},null,8,["modelValue","animate"])],2)],64)}}}),rn={class:"w-full flex items-center"},nn=["placeholder","value"],on=e.createElementVNode("i",{class:"i-tabler-chevron-down pointer-events-none absolute right-2"},null,-1),an={key:0,class:"flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"},sn=["onPointerdown","onHover"],ln={key:0},cn=[e.createElementVNode("i",{class:"i-tabler-check h-3 w-3"},null,-1)],dn=e.defineComponent({__name:"Select",props:e.mergeModels({options:{default(){return[]}},size:{default:"md"},noneText:{default:"No options"},rounded:{default:"md"},placeholder:{default:""}},{modelValue:{default:void 0},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:r}){const n=t,o=r,s=v(n),a=e.useModel(t,"modelValue"),l=e.ref(null),c=e.ref(null),{focused:i}=_t(l),d=e.computed(()=>n.options.map(b=>C(b)).indexOf(a.value)),f=e.ref(-1),u=e.ref(-1);e.watchEffect(()=>{i.value||(u.value=-1)}),e.watchEffect(()=>{a.value=C(n.options[d.value])}),e.watch(a,()=>{o("change",a.value)});const m=n.options,g=e.computed(()=>m[d.value]),k=e.computed(()=>_(g.value));function _(b){if(b)return typeof b=="string"||typeof b=="symbol"||typeof b=="number"?b:b.label}function C(b){if(b)return typeof b=="string"||typeof b=="symbol"||typeof b=="number"?b:b.id}ie("ArrowDown",b=>{i.value&&(b.preventDefault(),u.value=(u.value+1)%m.length)}),ie("ArrowUp",b=>{i.value&&(b.preventDefault(),u.value=(u.value-1+m.length)%m.length)}),ie("Enter",()=>{i.value&&u.value!==-1&&(a.value=C(m[u.value]),i.value=!1)});function K(b){if(!i.value){i.value=!0;return}a.value=C(b),i.value=!1}const se=e.computed(()=>({input:"container-base focus:border-primary-container"})),le=e.computed(()=>{switch(n.size){case"sm":return{wrapper:"h-6 w-full py-1 pl-1.5 pr-6 text-sm",dropdown:"text-sm children:py-1"};case"lg":return{wrapper:"h-10 w-full py-2 pl-3 pr-10 text-lg",dropdown:"text-lg children:py-2"};default:return{wrapper:"h-8 w-full py-1 pl-2 pr-8 text-base",dropdown:"text-base children:py-1"}}});return(b,Q)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:c,class:"r-select-wrapper relative"},[e.createElementVNode("div",rn,[e.createElementVNode("input",{ref_key:"inputRef",ref:l,class:e.normalizeClass([[e.unref(se).input,e.unref(le).wrapper,e.unref(s).class],"r-select-input cursor-pointer border outline-none outline-none focus-visible:outline-2"]),placeholder:b.placeholder,style:e.normalizeStyle([e.unref(s).style]),readonly:"",value:e.unref(k),"aria-haspopup":"listbox",autocomplete:"off",onFocus:Q[0]||(Q[0]=w=>i.value=!0)},null,46,nn),on]),e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(le).dropdown,"absolute z-1 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1"])},[e.unref(m).length===0?(e.openBlock(),e.createElementBlock("div",an,e.toDisplayString(b.noneText),1)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(m),(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:C(w),class:e.normalizeClass([{"hover:bg-surface-high":e.unref(u)!==S,"container-filled-primary":e.unref(u)===S},"flex cursor-pointer items-center justify-between gap-2 rounded p-1 px-2"]),onPointerdown:B=>K(w),onHover:B=>f.value=S},[e.createTextVNode(e.toDisplayString(_(w))+" ",1),w===e.unref(g)?(e.openBlock(),e.createElementBlock("div",ln,cn)):e.createCommentVNode("",!0)],42,sn))),128))],2)):e.createCommentVNode("",!0)],512))}}),fn={class:"relative inline-block w-full"},un=e.defineComponent({__name:"Slider",props:e.mergeModels({size:{default:"md"},animate:{type:Boolean,default:!1},width:{},options:{},min:{default:0},max:{default:100},step:{default:1},tickNum:{},color:{default:"primary"},minWidth:{default:12}},{modelValue:{default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t;function n(w,S,B){const $=[];for(let O=w;O<=S;O+=B)$.push(O);return $[$.length-1]!==S&&$.push(S),$}function o(w,S){const B=[];B.push(S[0]);const $=(S.length-1)/(w-1);for(let O=1;O<w-1;O++)B.push(S[Math.round(O*$)]);return B.push(S[S.length-1]),B}const s=e.computed(()=>r.options?r.options.length:r.tickNum??0),a=e.computed(()=>r.options===void 0?n(r.min,r.max,r.step):r.options),l=e.computed(()=>o(s.value,a.value)),c=e.useModel(t,"modelValue"),i=e.computed(()=>a.value.length??0),d=e.ref(a.value.includes(c.value)?a.value.indexOf(c.value):0);function f(w){return a.value.indexOf(w)}const u=e.computed(()=>{switch(r.color){case"primary":return"bg-primary-container";case"secondary":return"bg-secondary-container";case"tertiary":return"bg-tertiary-container";case"error":return"bg-error-container"}}),m=e.computed(()=>`dark:bg-white bg-${r.color}-container`),g=e.computed(()=>{switch(r.color){case"primary":return"dark:bg-primary-container bg-white";case"secondary":return"dark:bg-secondary-container bg-white";case"tertiary":return"dark:bg-tertiary-container bg-white";case"error":return"dark:bg-error-container bg-white"}});e.watchEffect(()=>{c.value=a.value[d.value]});const k=e.ref(),_=e.ref(),C=bt(k),K=e.ref(!1);function se(w){if(!K.value)return;if(!(w.buttons===1)){K.value=!1;return}w.preventDefault(),w.stopPropagation();const{clientX:B}=w,$=C.left.value,mn=C.right.value-$,xe=Math.round((B-$)/mn*(i.value-1));if(xe<0){d.value=0;return}if(xe>i.value-1){d.value=i.value-1;return}d.value=xe}e.watchEffect(()=>{d.value=f(c.value)});function le(w){w.preventDefault(),w.stopPropagation(),K.value=!0,se(w)}M(k,"pointerdown",le),e.onMounted(()=>{M(document,"pointermove",se),d.value=Math.max(0,f(c.value))});const b=e.computed(()=>{switch(r.size){case"sm":return{wrapper:"h-2",innerWrapper:"px-0.5 h-1",content:"h-1",tick:"h-0.5 w-0.5 -translate-x-0.25 -translate-y-0.25",indicator:"h-2 w-2 -translate-x-1 -translate-y-1",indicatorInner:"h-1 w-1 -translate-x-0.5 -translate-y-0.5",progress:"-mx-0.5"};case"md":return{wrapper:"h-4",innerWrapper:"px-1 h-2",content:"h-2",tick:"h-1 w-1 -translate-x-0.5 -translate-y-0.5",indicator:"h-4 w-4 -translate-x-2 -translate-y-2",indicatorInner:"h-2 w-2 -translate-x-1 -translate-y-1",progress:"-mx-1"};case"lg":return{wrapper:"h-6",innerWrapper:"px-1.5 h-3",content:"h-3",tick:"h-1.5 w-1.5 -translate-x-0.75 -translate-y-0.75",indicator:"h-6 w-6 -translate-x-3 -translate-y-3",indicatorInner:"h-3 w-3 -translate-x-1.5 -translate-y-1.5",progress:"-mx-1.5"}}}),Q=e.computed(()=>r.animate?{indicator:"transition-left",progress:"transition-width"}:{indicator:"",progress:""});return(w,S)=>(e.openBlock(),e.createElementBlock("div",fn,[e.createElementVNode("div",{ref_key:"wrapper",ref:k,type:"size",class:e.normalizeClass(["w-full flex cursor-pointer items-center",e.unref(b).wrapper]),onTouchmove:S[0]||(S[0]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",{class:e.normalizeClass(["w-full rounded-full bg-surface-lowest transition-background-color,border-color,color",e.unref(b).innerWrapper])},[e.createElementVNode("div",{class:e.normalizeClass(["relative flex",e.unref(b).content]),style:e.normalizeStyle({width:`${r.width}rem`,minWidth:`${r.minWidth}rem`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),B=>(e.openBlock(),e.createElementBlock("div",{key:B,style:e.normalizeStyle({left:`${f(B)/(e.unref(i)-1)*100}%`}),class:e.normalizeClass(["absolute top-50% rounded-full bg-white",e.unref(b).tick])},null,6))),128)),e.unref(d)!==-1?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"indicator",ref:_,class:e.normalizeClass(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color",[e.unref(b).indicator,e.unref(Q).indicator,e.unref(m)]]),style:e.normalizeStyle({left:`${e.unref(d)/(e.unref(i)-1)*100}%`})},[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color",[e.unref(b).indicatorInner,e.unref(g)]])},null,2)],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none h-full rounded-full",[e.unref(b).progress,e.unref(Q).progress,e.unref(u)]]),style:e.normalizeStyle({width:`${e.unref(d)/(e.unref(i)-1)*100}%`})},null,6)],6)],2)],34),e.createElementVNode("div",{class:"relative mx-1 h-1em text-xs text-surface-onlow",style:e.normalizeStyle({width:`${r.width}rem`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(B,$)=>(e.openBlock(),e.createElementBlock("div",{key:$,style:e.normalizeStyle({left:`${f(B)/(e.unref(i)-1)*100}%`}),class:e.normalizeClass(["absolute w-auto flex rounded-full -translate-x-50%",e.unref(b).tick])},e.toDisplayString(B),7))),128))],4)]))}});h.AspectRatio=tt,h.Avatar=Me,h.Btn=de,h.ChatContainer=Et,h.ChatMessage=$t,h.ChatSystem=Nt,h.Chip=vt,h.ColorInput=ar,h.ColorSwatch=$e,h.Drawer=dr,h.Dropzone=fr,h.FullscreenOverlay=he,h.Image=ur,h.Indicator=pr,h.Modal=hr,h.Notification=Fe,h.NotificationSystem=Or,h.Notifications=Gr,h.Overlay=Ir,h.Paper=Dr,h.PinInput=Wr,h.Progress=jr,h.RokuProvider=Yr,h.SchemeSwitch=tn,h.Select=dn,h.Slider=un,h.Switch=et,h.TextField=Ye,h.ThemeProvider=De,h.darkTheme=ae,h.generateColors=Xr,h.generateColorsMap=Je,h.lightTheme=Ze,h.notificationsSymbol=qr,h.schemeSymbol=pe,h.themeColors=Se,h.useCurrentTheme=He,h.useCurrentThemeScheme=rr,h.useId=me,h.useNotifications=Qe,h.useRootTheme=Oe,h.useScheme=Ie,h.useThemeStyles=ue,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roku-ui/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.3",
|
|
5
5
|
"author": "Jianqi Pan <jannchie@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"vite-plugin-dts": "^3.7.0",
|
|
55
55
|
"vitest": "^1.2.0",
|
|
56
56
|
"vue-tsc": "^1.8.27",
|
|
57
|
-
"@roku-ui/preset": "^0.6.
|
|
57
|
+
"@roku-ui/preset": "^0.6.3"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"dev": "vite",
|