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