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