@roku-ui/vue 0.8.1 → 0.8.2
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/Paper.vue.d.ts +15 -0
- package/dist/composables/index.d.ts +38 -0
- package/dist/index.js +1501 -1188
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/symbols.d.ts +2 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as R, openBlock as b, createElementBlock as w, normalizeStyle as V, renderSlot as z, computed as m, ref as g, onMounted as le, Fragment as ie, createBlock as X, resolveDynamicComponent as Se, mergeProps as $e, unref as c, createCommentVNode as B, getCurrentScope as Pt, onScopeDispose as Ft, nextTick as Fe, getCurrentInstance as mt, readonly as Ge, watch as ee, shallowRef as Je, shallowReactive as Dt, watchEffect as pe, withCtx as J, normalizeClass as k, createElementVNode as $, mergeModels as K, useModel as te, inject as we, useAttrs as vt, withDirectives as De, vModelText as Lt, createVNode as oe, toDisplayString as ue, Teleport as Wt, Transition as Ke, useSlots as bt, renderList as Re, vModelDynamic as jt, withModifiers as gt, withKeys as Xt, reactive as Ut, provide as Te, vModelCheckbox as Yt, isRef as qt, createTextVNode as Gt } from "vue";
|
|
2
|
+
const ga = /* @__PURE__ */ R({
|
|
3
3
|
__name: "AspectRatio",
|
|
4
4
|
props: {
|
|
5
5
|
ratio: { default: 1 },
|
|
@@ -9,8 +9,8 @@ const sa = /* @__PURE__ */ S({
|
|
|
9
9
|
maxHeight: {}
|
|
10
10
|
},
|
|
11
11
|
setup(e) {
|
|
12
|
-
return (t, r) => (
|
|
13
|
-
style:
|
|
12
|
+
return (t, r) => (b(), w("div", {
|
|
13
|
+
style: V({
|
|
14
14
|
"--ar-ratio": t.ratio,
|
|
15
15
|
width: t.width,
|
|
16
16
|
"max-width": t.maxWidth,
|
|
@@ -19,10 +19,10 @@ const sa = /* @__PURE__ */ S({
|
|
|
19
19
|
}),
|
|
20
20
|
class: "relative children:absolute children:top-0 before:block before:h-0 children:h-full children:w-full before:pb-[calc((1/var(--ar-ratio,1))*100%)] before:content-['']"
|
|
21
21
|
}, [
|
|
22
|
-
|
|
22
|
+
z(t.$slots, "default")
|
|
23
23
|
], 4));
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
25
|
+
}), Jt = /* @__PURE__ */ R({
|
|
26
26
|
__name: "Avatar",
|
|
27
27
|
props: {
|
|
28
28
|
is: { default: "img" },
|
|
@@ -32,7 +32,7 @@ const sa = /* @__PURE__ */ S({
|
|
|
32
32
|
class: {}
|
|
33
33
|
},
|
|
34
34
|
setup(e) {
|
|
35
|
-
const t = e, r =
|
|
35
|
+
const t = e, r = m(() => {
|
|
36
36
|
switch (t.size) {
|
|
37
37
|
case "sm":
|
|
38
38
|
return "--size: 1.5rem;";
|
|
@@ -47,33 +47,33 @@ const sa = /* @__PURE__ */ S({
|
|
|
47
47
|
function a() {
|
|
48
48
|
n.value = !0;
|
|
49
49
|
}
|
|
50
|
-
return
|
|
50
|
+
return le(() => {
|
|
51
51
|
var s;
|
|
52
52
|
(s = o.value) != null && s.complete && a();
|
|
53
|
-
}), (s,
|
|
54
|
-
s.src ? (
|
|
53
|
+
}), (s, i) => (b(), w(ie, null, [
|
|
54
|
+
s.src ? (b(), X(Se(s.is), $e({
|
|
55
55
|
key: 0,
|
|
56
56
|
ref_key: "img",
|
|
57
57
|
ref: o,
|
|
58
|
-
style: [s.style,
|
|
58
|
+
style: [s.style, c(r)],
|
|
59
59
|
placeholder: "",
|
|
60
60
|
src: s.src,
|
|
61
|
-
class: ["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !
|
|
62
|
-
}, s.$attrs, { onLoad: a }), null, 16, ["style", "src", "class"])) :
|
|
63
|
-
|
|
61
|
+
class: ["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !c(n) }, t.class]]
|
|
62
|
+
}, s.$attrs, { onLoad: a }), null, 16, ["style", "src", "class"])) : B("", !0),
|
|
63
|
+
c(n) ? B("", !0) : (b(), w("div", {
|
|
64
64
|
key: 1,
|
|
65
65
|
class: "h-[var(--size)] w-[var(--size)] animate-pulse border-transparent rounded-full bg-surface-high object-cover",
|
|
66
|
-
style:
|
|
66
|
+
style: V([s.style, c(r)])
|
|
67
67
|
}, null, 4))
|
|
68
68
|
], 64));
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
|
-
function
|
|
72
|
-
return
|
|
73
|
-
() => ({ style:
|
|
71
|
+
function re(e) {
|
|
72
|
+
return m(
|
|
73
|
+
() => ({ style: Kt(e.rounded), class: "rounded-[var(--r-rounded)]" })
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Kt(e) {
|
|
77
77
|
const t = /^-?\d*\.?\d+(px|em|rem|vh|vw|in|cm|mm|pt|pc|%)?$/;
|
|
78
78
|
switch (e) {
|
|
79
79
|
case "none":
|
|
@@ -90,10 +90,10 @@ function Lt(e) {
|
|
|
90
90
|
return typeof e == "string" && t.test(e) ? `--r-rounded: ${e};` : typeof e == "number" || !Number.isNaN(Number(e)) ? `--r-rounded: ${e}rem;` : "rounded-[var(--r-rounded)]";
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return
|
|
93
|
+
function ve(e) {
|
|
94
|
+
return Pt() ? (Ft(e), !0) : !1;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function Zt() {
|
|
97
97
|
const e = /* @__PURE__ */ new Set(), t = (o) => {
|
|
98
98
|
e.delete(o);
|
|
99
99
|
};
|
|
@@ -101,7 +101,7 @@ function Wt() {
|
|
|
101
101
|
on: (o) => {
|
|
102
102
|
e.add(o);
|
|
103
103
|
const a = () => t(o);
|
|
104
|
-
return
|
|
104
|
+
return ve(a), {
|
|
105
105
|
off: a
|
|
106
106
|
};
|
|
107
107
|
},
|
|
@@ -109,14 +109,14 @@ function Wt() {
|
|
|
109
109
|
trigger: (...o) => Promise.all(Array.from(e).map((a) => a(...o)))
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
return typeof e == "function" ? e() :
|
|
112
|
+
function he(e) {
|
|
113
|
+
return typeof e == "function" ? e() : c(e);
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const se = typeof window < "u" && typeof document < "u";
|
|
116
116
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
117
|
-
const
|
|
118
|
-
},
|
|
119
|
-
function
|
|
117
|
+
const Qt = (e) => e != null, er = Object.prototype.toString, yt = (e) => er.call(e) === "[object Object]", tr = () => {
|
|
118
|
+
}, rr = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
119
|
+
function nr(e, t) {
|
|
120
120
|
function r(...n) {
|
|
121
121
|
return new Promise((o, a) => {
|
|
122
122
|
Promise.resolve(e(() => t.apply(this, n), { fn: t, thisArg: this, args: n })).then(o).catch(a);
|
|
@@ -124,8 +124,8 @@ function Yt(e, t) {
|
|
|
124
124
|
}
|
|
125
125
|
return r;
|
|
126
126
|
}
|
|
127
|
-
const
|
|
128
|
-
function
|
|
127
|
+
const wt = (e) => e();
|
|
128
|
+
function ar(e = wt) {
|
|
129
129
|
const t = g(!0);
|
|
130
130
|
function r() {
|
|
131
131
|
t.value = !1;
|
|
@@ -136,122 +136,286 @@ function Jt(e = pt) {
|
|
|
136
136
|
const o = (...a) => {
|
|
137
137
|
t.value && e(...a);
|
|
138
138
|
};
|
|
139
|
-
return { isActive:
|
|
139
|
+
return { isActive: Ge(t), pause: r, resume: n, eventFilter: o };
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
return e ||
|
|
141
|
+
function or(e, t, r = !1) {
|
|
142
|
+
return Object.fromEntries(Object.entries(e).filter(([n, o]) => (!r || o !== void 0) && !t.includes(n)));
|
|
143
|
+
}
|
|
144
|
+
function sr(e) {
|
|
145
|
+
return e || mt();
|
|
143
146
|
}
|
|
144
|
-
function
|
|
147
|
+
function lr(e, t, r = {}) {
|
|
145
148
|
const {
|
|
146
|
-
eventFilter: n =
|
|
149
|
+
eventFilter: n = wt,
|
|
147
150
|
...o
|
|
148
151
|
} = r;
|
|
149
|
-
return
|
|
152
|
+
return ee(
|
|
150
153
|
e,
|
|
151
|
-
|
|
154
|
+
nr(
|
|
152
155
|
n,
|
|
153
156
|
t
|
|
154
157
|
),
|
|
155
158
|
o
|
|
156
159
|
);
|
|
157
160
|
}
|
|
158
|
-
function
|
|
161
|
+
function ir(e, t, r = {}) {
|
|
159
162
|
const {
|
|
160
163
|
eventFilter: n,
|
|
161
164
|
...o
|
|
162
|
-
} = r, { eventFilter: a, pause: s, resume:
|
|
163
|
-
return { stop:
|
|
165
|
+
} = r, { eventFilter: a, pause: s, resume: i, isActive: l } = ar(n);
|
|
166
|
+
return { stop: lr(
|
|
164
167
|
e,
|
|
165
168
|
t,
|
|
166
169
|
{
|
|
167
170
|
...o,
|
|
168
171
|
eventFilter: a
|
|
169
172
|
}
|
|
170
|
-
), pause: s, resume:
|
|
173
|
+
), pause: s, resume: i, isActive: l };
|
|
171
174
|
}
|
|
172
|
-
function
|
|
173
|
-
|
|
175
|
+
function Ze(e, t = !0, r) {
|
|
176
|
+
sr() ? le(e, r) : t ? e() : Fe(e);
|
|
174
177
|
}
|
|
175
|
-
function
|
|
178
|
+
function q(e) {
|
|
176
179
|
var t;
|
|
177
|
-
const r =
|
|
180
|
+
const r = he(e);
|
|
178
181
|
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
179
182
|
}
|
|
180
|
-
const
|
|
181
|
-
function
|
|
183
|
+
const U = se ? window : void 0, ur = se ? window.document : void 0;
|
|
184
|
+
function P(...e) {
|
|
182
185
|
let t, r, n, o;
|
|
183
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, o] = e, t =
|
|
184
|
-
return
|
|
186
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, o] = e, t = U) : [t, r, n, o] = e, !t)
|
|
187
|
+
return tr;
|
|
185
188
|
Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
|
|
186
189
|
const a = [], s = () => {
|
|
187
190
|
a.forEach((d) => d()), a.length = 0;
|
|
188
|
-
},
|
|
189
|
-
() => [
|
|
191
|
+
}, i = (d, f, p, h) => (d.addEventListener(f, p, h), () => d.removeEventListener(f, p, h)), l = ee(
|
|
192
|
+
() => [q(t), he(o)],
|
|
190
193
|
([d, f]) => {
|
|
191
194
|
if (s(), !d)
|
|
192
195
|
return;
|
|
193
|
-
const
|
|
196
|
+
const p = yt(f) ? { ...f } : f;
|
|
194
197
|
a.push(
|
|
195
|
-
...r.flatMap((
|
|
198
|
+
...r.flatMap((h) => n.map((v) => i(d, h, v, p)))
|
|
196
199
|
);
|
|
197
200
|
},
|
|
198
201
|
{ immediate: !0, flush: "post" }
|
|
199
|
-
),
|
|
200
|
-
|
|
202
|
+
), u = () => {
|
|
203
|
+
l(), s();
|
|
201
204
|
};
|
|
202
|
-
return
|
|
205
|
+
return ve(u), u;
|
|
203
206
|
}
|
|
204
|
-
function
|
|
207
|
+
function cr(e) {
|
|
205
208
|
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
206
209
|
}
|
|
207
|
-
function
|
|
210
|
+
function fe(...e) {
|
|
208
211
|
let t, r, n = {};
|
|
209
212
|
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]);
|
|
210
213
|
const {
|
|
211
|
-
target: o =
|
|
214
|
+
target: o = U,
|
|
212
215
|
eventName: a = "keydown",
|
|
213
216
|
passive: s = !1,
|
|
214
|
-
dedupe:
|
|
215
|
-
} = n,
|
|
216
|
-
return
|
|
217
|
-
d.repeat &&
|
|
217
|
+
dedupe: i = !1
|
|
218
|
+
} = n, l = cr(t);
|
|
219
|
+
return P(o, a, (d) => {
|
|
220
|
+
d.repeat && he(i) || l(d) && r(d);
|
|
218
221
|
}, s);
|
|
219
222
|
}
|
|
220
|
-
function
|
|
223
|
+
function dr() {
|
|
221
224
|
const e = g(!1);
|
|
222
|
-
return
|
|
225
|
+
return mt() && le(() => {
|
|
223
226
|
e.value = !0;
|
|
224
227
|
}), e;
|
|
225
228
|
}
|
|
226
|
-
function
|
|
227
|
-
const t =
|
|
228
|
-
return
|
|
229
|
+
function Le(e) {
|
|
230
|
+
const t = dr();
|
|
231
|
+
return m(() => (t.value, !!e()));
|
|
232
|
+
}
|
|
233
|
+
function fr(e, t = {}) {
|
|
234
|
+
const {
|
|
235
|
+
immediate: r = !0,
|
|
236
|
+
fpsLimit: n = void 0,
|
|
237
|
+
window: o = U
|
|
238
|
+
} = t, a = g(!1), s = n ? 1e3 / n : null;
|
|
239
|
+
let i = 0, l = null;
|
|
240
|
+
function u(p) {
|
|
241
|
+
if (!a.value || !o)
|
|
242
|
+
return;
|
|
243
|
+
const h = p - (i || p);
|
|
244
|
+
if (s && h < s) {
|
|
245
|
+
l = o.requestAnimationFrame(u);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
e({ delta: h, timestamp: p }), i = p, l = o.requestAnimationFrame(u);
|
|
249
|
+
}
|
|
250
|
+
function d() {
|
|
251
|
+
!a.value && o && (a.value = !0, l = o.requestAnimationFrame(u));
|
|
252
|
+
}
|
|
253
|
+
function f() {
|
|
254
|
+
a.value = !1, l != null && o && (o.cancelAnimationFrame(l), l = null);
|
|
255
|
+
}
|
|
256
|
+
return r && d(), ve(f), {
|
|
257
|
+
isActive: Ge(a),
|
|
258
|
+
pause: f,
|
|
259
|
+
resume: d
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
function pr(e, t, r) {
|
|
263
|
+
let n, o;
|
|
264
|
+
yt(r) ? (n = r, o = or(r, ["window", "immediate", "commitStyles", "persist", "onReady", "onError"])) : (n = { duration: r }, o = r);
|
|
265
|
+
const {
|
|
266
|
+
window: a = U,
|
|
267
|
+
immediate: s = !0,
|
|
268
|
+
commitStyles: i,
|
|
269
|
+
persist: l,
|
|
270
|
+
playbackRate: u = 1,
|
|
271
|
+
onReady: d,
|
|
272
|
+
onError: f = (A) => {
|
|
273
|
+
console.error(A);
|
|
274
|
+
}
|
|
275
|
+
} = n, p = Le(() => a && HTMLElement && "animate" in HTMLElement.prototype), h = Je(void 0), v = Dt({
|
|
276
|
+
startTime: null,
|
|
277
|
+
currentTime: null,
|
|
278
|
+
timeline: null,
|
|
279
|
+
playbackRate: u,
|
|
280
|
+
pending: !1,
|
|
281
|
+
playState: s ? "idle" : "paused",
|
|
282
|
+
replaceState: "active"
|
|
283
|
+
}), M = m(() => v.pending), S = m(() => v.playState), L = m(() => v.replaceState), H = m({
|
|
284
|
+
get() {
|
|
285
|
+
return v.startTime;
|
|
286
|
+
},
|
|
287
|
+
set(A) {
|
|
288
|
+
v.startTime = A, h.value && (h.value.startTime = A);
|
|
289
|
+
}
|
|
290
|
+
}), I = m({
|
|
291
|
+
get() {
|
|
292
|
+
return v.currentTime;
|
|
293
|
+
},
|
|
294
|
+
set(A) {
|
|
295
|
+
v.currentTime = A, h.value && (h.value.currentTime = A, Oe());
|
|
296
|
+
}
|
|
297
|
+
}), N = m({
|
|
298
|
+
get() {
|
|
299
|
+
return v.timeline;
|
|
300
|
+
},
|
|
301
|
+
set(A) {
|
|
302
|
+
v.timeline = A, h.value && (h.value.timeline = A);
|
|
303
|
+
}
|
|
304
|
+
}), C = m({
|
|
305
|
+
get() {
|
|
306
|
+
return v.playbackRate;
|
|
307
|
+
},
|
|
308
|
+
set(A) {
|
|
309
|
+
v.playbackRate = A, h.value && (h.value.playbackRate = A);
|
|
310
|
+
}
|
|
311
|
+
}), E = () => {
|
|
312
|
+
if (h.value)
|
|
313
|
+
try {
|
|
314
|
+
h.value.play(), Oe();
|
|
315
|
+
} catch (A) {
|
|
316
|
+
ge(), f(A);
|
|
317
|
+
}
|
|
318
|
+
else
|
|
319
|
+
D();
|
|
320
|
+
}, F = () => {
|
|
321
|
+
var A;
|
|
322
|
+
try {
|
|
323
|
+
(A = h.value) == null || A.pause(), ge();
|
|
324
|
+
} catch (Z) {
|
|
325
|
+
f(Z);
|
|
326
|
+
}
|
|
327
|
+
}, _ = () => {
|
|
328
|
+
var A;
|
|
329
|
+
!h.value && D();
|
|
330
|
+
try {
|
|
331
|
+
(A = h.value) == null || A.reverse(), Oe();
|
|
332
|
+
} catch (Z) {
|
|
333
|
+
ge(), f(Z);
|
|
334
|
+
}
|
|
335
|
+
}, x = () => {
|
|
336
|
+
var A;
|
|
337
|
+
try {
|
|
338
|
+
(A = h.value) == null || A.finish(), ge();
|
|
339
|
+
} catch (Z) {
|
|
340
|
+
f(Z);
|
|
341
|
+
}
|
|
342
|
+
}, T = () => {
|
|
343
|
+
var A;
|
|
344
|
+
try {
|
|
345
|
+
(A = h.value) == null || A.cancel(), ge();
|
|
346
|
+
} catch (Z) {
|
|
347
|
+
f(Z);
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
ee(() => q(e), (A) => {
|
|
351
|
+
A && D();
|
|
352
|
+
}), ee(() => t, (A) => {
|
|
353
|
+
!h.value && D(), !q(e) && h.value && (h.value.effect = new KeyframeEffect(
|
|
354
|
+
q(e),
|
|
355
|
+
he(A),
|
|
356
|
+
o
|
|
357
|
+
));
|
|
358
|
+
}, { deep: !0 }), Ze(() => {
|
|
359
|
+
Fe(() => D(!0));
|
|
360
|
+
}), ve(T);
|
|
361
|
+
function D(A) {
|
|
362
|
+
const Z = q(e);
|
|
363
|
+
!p.value || !Z || (h.value = Z.animate(he(t), o), i && h.value.commitStyles(), l && h.value.persist(), u !== 1 && (h.value.playbackRate = u), A && !s ? h.value.pause() : Oe(), d == null || d(h.value));
|
|
364
|
+
}
|
|
365
|
+
P(h, ["cancel", "finish", "remove"], ge);
|
|
366
|
+
const { resume: de, pause: It } = fr(() => {
|
|
367
|
+
h.value && (v.pending = h.value.pending, v.playState = h.value.playState, v.replaceState = h.value.replaceState, v.startTime = h.value.startTime, v.currentTime = h.value.currentTime, v.timeline = h.value.timeline, v.playbackRate = h.value.playbackRate);
|
|
368
|
+
}, { immediate: !1 });
|
|
369
|
+
function Oe() {
|
|
370
|
+
p.value && de();
|
|
371
|
+
}
|
|
372
|
+
function ge() {
|
|
373
|
+
p.value && a && a.requestAnimationFrame(It);
|
|
374
|
+
}
|
|
375
|
+
return {
|
|
376
|
+
isSupported: p,
|
|
377
|
+
animate: h,
|
|
378
|
+
// actions
|
|
379
|
+
play: E,
|
|
380
|
+
pause: F,
|
|
381
|
+
reverse: _,
|
|
382
|
+
finish: x,
|
|
383
|
+
cancel: T,
|
|
384
|
+
// state
|
|
385
|
+
pending: M,
|
|
386
|
+
playState: S,
|
|
387
|
+
replaceState: L,
|
|
388
|
+
startTime: H,
|
|
389
|
+
currentTime: I,
|
|
390
|
+
timeline: N,
|
|
391
|
+
playbackRate: C
|
|
392
|
+
};
|
|
229
393
|
}
|
|
230
|
-
function
|
|
231
|
-
const { window: r =
|
|
394
|
+
function ot(e, t = {}) {
|
|
395
|
+
const { window: r = U } = t, n = Le(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
|
|
232
396
|
let o;
|
|
233
|
-
const a = g(!1), s = (
|
|
234
|
-
a.value =
|
|
235
|
-
},
|
|
397
|
+
const a = g(!1), s = (u) => {
|
|
398
|
+
a.value = u.matches;
|
|
399
|
+
}, i = () => {
|
|
236
400
|
o && ("removeEventListener" in o ? o.removeEventListener("change", s) : o.removeListener(s));
|
|
237
|
-
},
|
|
238
|
-
n.value && (
|
|
401
|
+
}, l = pe(() => {
|
|
402
|
+
n.value && (i(), o = r.matchMedia(he(e)), "addEventListener" in o ? o.addEventListener("change", s) : o.addListener(s), a.value = o.matches);
|
|
239
403
|
});
|
|
240
|
-
return
|
|
241
|
-
|
|
404
|
+
return ve(() => {
|
|
405
|
+
l(), i(), o = void 0;
|
|
242
406
|
}), a;
|
|
243
407
|
}
|
|
244
|
-
const
|
|
245
|
-
function
|
|
246
|
-
return
|
|
408
|
+
const Ne = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Be = "__vueuse_ssr_handlers__", hr = /* @__PURE__ */ mr();
|
|
409
|
+
function mr() {
|
|
410
|
+
return Be in Ne || (Ne[Be] = Ne[Be] || {}), Ne[Be];
|
|
247
411
|
}
|
|
248
|
-
function
|
|
249
|
-
return
|
|
412
|
+
function vr(e, t) {
|
|
413
|
+
return hr[e] || t;
|
|
250
414
|
}
|
|
251
|
-
function
|
|
415
|
+
function br(e) {
|
|
252
416
|
return e == null ? "any" : e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof Date ? "date" : typeof e == "boolean" ? "boolean" : typeof e == "string" ? "string" : typeof e == "object" ? "object" : Number.isNaN(e) ? "any" : "number";
|
|
253
417
|
}
|
|
254
|
-
const
|
|
418
|
+
const gr = {
|
|
255
419
|
boolean: {
|
|
256
420
|
read: (e) => e === "true",
|
|
257
421
|
write: (e) => String(e)
|
|
@@ -284,140 +448,140 @@ const ir = {
|
|
|
284
448
|
read: (e) => new Date(e),
|
|
285
449
|
write: (e) => e.toISOString()
|
|
286
450
|
}
|
|
287
|
-
},
|
|
288
|
-
function
|
|
451
|
+
}, st = "vueuse-storage";
|
|
452
|
+
function yr(e, t, r, n = {}) {
|
|
289
453
|
var o;
|
|
290
454
|
const {
|
|
291
455
|
flush: a = "pre",
|
|
292
456
|
deep: s = !0,
|
|
293
|
-
listenToStorageChanges:
|
|
294
|
-
writeDefaults:
|
|
295
|
-
mergeDefaults:
|
|
457
|
+
listenToStorageChanges: i = !0,
|
|
458
|
+
writeDefaults: l = !0,
|
|
459
|
+
mergeDefaults: u = !1,
|
|
296
460
|
shallow: d,
|
|
297
|
-
window: f =
|
|
298
|
-
eventFilter:
|
|
299
|
-
onError:
|
|
300
|
-
console.error(
|
|
461
|
+
window: f = U,
|
|
462
|
+
eventFilter: p,
|
|
463
|
+
onError: h = (x) => {
|
|
464
|
+
console.error(x);
|
|
301
465
|
},
|
|
302
|
-
initOnMounted:
|
|
303
|
-
} = n,
|
|
466
|
+
initOnMounted: v
|
|
467
|
+
} = n, M = (d ? Je : g)(typeof t == "function" ? t() : t);
|
|
304
468
|
if (!r)
|
|
305
469
|
try {
|
|
306
|
-
r =
|
|
307
|
-
var
|
|
308
|
-
return (
|
|
470
|
+
r = vr("getDefaultStorage", () => {
|
|
471
|
+
var x;
|
|
472
|
+
return (x = U) == null ? void 0 : x.localStorage;
|
|
309
473
|
})();
|
|
310
|
-
} catch (
|
|
311
|
-
|
|
474
|
+
} catch (x) {
|
|
475
|
+
h(x);
|
|
312
476
|
}
|
|
313
477
|
if (!r)
|
|
314
|
-
return
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
() =>
|
|
318
|
-
{ flush: a, deep: s, eventFilter:
|
|
478
|
+
return M;
|
|
479
|
+
const S = he(t), L = br(S), H = (o = n.serializer) != null ? o : gr[L], { pause: I, resume: N } = ir(
|
|
480
|
+
M,
|
|
481
|
+
() => C(M.value),
|
|
482
|
+
{ flush: a, deep: s, eventFilter: p }
|
|
319
483
|
);
|
|
320
|
-
return f &&
|
|
321
|
-
|
|
322
|
-
}),
|
|
323
|
-
function
|
|
484
|
+
return f && i && Ze(() => {
|
|
485
|
+
P(f, "storage", _), P(f, st, F), v && _();
|
|
486
|
+
}), v || _(), M;
|
|
487
|
+
function C(x) {
|
|
324
488
|
try {
|
|
325
|
-
if (
|
|
489
|
+
if (x == null)
|
|
326
490
|
r.removeItem(e);
|
|
327
491
|
else {
|
|
328
|
-
const
|
|
329
|
-
|
|
492
|
+
const T = H.write(x), D = r.getItem(e);
|
|
493
|
+
D !== T && (r.setItem(e, T), f && f.dispatchEvent(new CustomEvent(st, {
|
|
330
494
|
detail: {
|
|
331
495
|
key: e,
|
|
332
|
-
oldValue:
|
|
333
|
-
newValue:
|
|
496
|
+
oldValue: D,
|
|
497
|
+
newValue: T,
|
|
334
498
|
storageArea: r
|
|
335
499
|
}
|
|
336
500
|
})));
|
|
337
501
|
}
|
|
338
|
-
} catch (
|
|
339
|
-
|
|
502
|
+
} catch (T) {
|
|
503
|
+
h(T);
|
|
340
504
|
}
|
|
341
505
|
}
|
|
342
|
-
function
|
|
343
|
-
const
|
|
344
|
-
if (
|
|
345
|
-
return
|
|
346
|
-
if (!
|
|
347
|
-
const
|
|
348
|
-
return typeof
|
|
506
|
+
function E(x) {
|
|
507
|
+
const T = x ? x.newValue : r.getItem(e);
|
|
508
|
+
if (T == null)
|
|
509
|
+
return l && S != null && r.setItem(e, H.write(S)), S;
|
|
510
|
+
if (!x && u) {
|
|
511
|
+
const D = H.read(T);
|
|
512
|
+
return typeof u == "function" ? u(D, S) : L === "object" && !Array.isArray(D) ? { ...S, ...D } : D;
|
|
349
513
|
} else
|
|
350
|
-
return typeof
|
|
514
|
+
return typeof T != "string" ? T : H.read(T);
|
|
351
515
|
}
|
|
352
|
-
function
|
|
353
|
-
|
|
516
|
+
function F(x) {
|
|
517
|
+
_(x.detail);
|
|
354
518
|
}
|
|
355
|
-
function
|
|
356
|
-
if (!(
|
|
357
|
-
if (
|
|
358
|
-
|
|
519
|
+
function _(x) {
|
|
520
|
+
if (!(x && x.storageArea !== r)) {
|
|
521
|
+
if (x && x.key == null) {
|
|
522
|
+
M.value = S;
|
|
359
523
|
return;
|
|
360
524
|
}
|
|
361
|
-
if (!(
|
|
362
|
-
|
|
525
|
+
if (!(x && x.key !== e)) {
|
|
526
|
+
I();
|
|
363
527
|
try {
|
|
364
|
-
(
|
|
365
|
-
} catch (
|
|
366
|
-
|
|
528
|
+
(x == null ? void 0 : x.newValue) !== H.write(M.value) && (M.value = E(x));
|
|
529
|
+
} catch (T) {
|
|
530
|
+
h(T);
|
|
367
531
|
} finally {
|
|
368
|
-
|
|
532
|
+
x ? Fe(N) : N();
|
|
369
533
|
}
|
|
370
534
|
}
|
|
371
535
|
}
|
|
372
536
|
}
|
|
373
537
|
}
|
|
374
|
-
function
|
|
375
|
-
const { window: n =
|
|
538
|
+
function wr(e, t, r = {}) {
|
|
539
|
+
const { window: n = U, ...o } = r;
|
|
376
540
|
let a;
|
|
377
|
-
const s =
|
|
541
|
+
const s = Le(() => n && "MutationObserver" in n), i = () => {
|
|
378
542
|
a && (a.disconnect(), a = void 0);
|
|
379
|
-
},
|
|
380
|
-
() =>
|
|
543
|
+
}, l = ee(
|
|
544
|
+
() => q(e),
|
|
381
545
|
(f) => {
|
|
382
|
-
|
|
546
|
+
i(), s.value && n && f && (a = new MutationObserver(t), a.observe(f, o));
|
|
383
547
|
},
|
|
384
548
|
{ immediate: !0 }
|
|
385
|
-
),
|
|
386
|
-
|
|
549
|
+
), u = () => a == null ? void 0 : a.takeRecords(), d = () => {
|
|
550
|
+
i(), l();
|
|
387
551
|
};
|
|
388
|
-
return
|
|
552
|
+
return ve(d), {
|
|
389
553
|
isSupported: s,
|
|
390
554
|
stop: d,
|
|
391
|
-
takeRecords:
|
|
555
|
+
takeRecords: u
|
|
392
556
|
};
|
|
393
557
|
}
|
|
394
|
-
function
|
|
395
|
-
const r = g(!1), n =
|
|
558
|
+
function _r(e, t = {}) {
|
|
559
|
+
const r = g(!1), n = Je(null);
|
|
396
560
|
let o = 0, a = !0;
|
|
397
|
-
if (
|
|
398
|
-
const s = typeof t == "function" ? { onDrop: t } : t,
|
|
399
|
-
var
|
|
400
|
-
const f = Array.from((d = (
|
|
561
|
+
if (se) {
|
|
562
|
+
const s = typeof t == "function" ? { onDrop: t } : t, i = (l) => {
|
|
563
|
+
var u, d;
|
|
564
|
+
const f = Array.from((d = (u = l.dataTransfer) == null ? void 0 : u.files) != null ? d : []);
|
|
401
565
|
return n.value = f.length === 0 ? null : f;
|
|
402
566
|
};
|
|
403
|
-
|
|
404
|
-
var
|
|
405
|
-
const f = Array.from(((
|
|
406
|
-
if (s.dataTypes &&
|
|
407
|
-
const
|
|
408
|
-
if (a = typeof
|
|
567
|
+
P(e, "dragenter", (l) => {
|
|
568
|
+
var u, d;
|
|
569
|
+
const f = Array.from(((u = l == null ? void 0 : l.dataTransfer) == null ? void 0 : u.items) || []).map((p) => p.kind === "file" ? p.type : null).filter(Qt);
|
|
570
|
+
if (s.dataTypes && l.dataTransfer) {
|
|
571
|
+
const p = c(s.dataTypes);
|
|
572
|
+
if (a = typeof p == "function" ? p(f) : p ? p.some((h) => f.includes(h)) : !0, !a)
|
|
409
573
|
return;
|
|
410
574
|
}
|
|
411
|
-
|
|
412
|
-
}),
|
|
413
|
-
var
|
|
414
|
-
a && (
|
|
415
|
-
}),
|
|
416
|
-
var
|
|
417
|
-
a && (
|
|
418
|
-
}),
|
|
419
|
-
var
|
|
420
|
-
|
|
575
|
+
l.preventDefault(), o += 1, r.value = !0, (d = s.onEnter) == null || d.call(s, i(l), l);
|
|
576
|
+
}), P(e, "dragover", (l) => {
|
|
577
|
+
var u;
|
|
578
|
+
a && (l.preventDefault(), (u = s.onOver) == null || u.call(s, i(l), l));
|
|
579
|
+
}), P(e, "dragleave", (l) => {
|
|
580
|
+
var u;
|
|
581
|
+
a && (l.preventDefault(), o -= 1, o === 0 && (r.value = !1), (u = s.onLeave) == null || u.call(s, i(l), l));
|
|
582
|
+
}), P(e, "drop", (l) => {
|
|
583
|
+
var u;
|
|
584
|
+
l.preventDefault(), o = 0, r.value = !1, (u = s.onDrop) == null || u.call(s, i(l), l);
|
|
421
585
|
});
|
|
422
586
|
}
|
|
423
587
|
return {
|
|
@@ -425,122 +589,122 @@ function cr(e, t = {}) {
|
|
|
425
589
|
isOverDropZone: r
|
|
426
590
|
};
|
|
427
591
|
}
|
|
428
|
-
function
|
|
429
|
-
const { window: n =
|
|
592
|
+
function xr(e, t, r = {}) {
|
|
593
|
+
const { window: n = U, ...o } = r;
|
|
430
594
|
let a;
|
|
431
|
-
const s =
|
|
595
|
+
const s = Le(() => n && "ResizeObserver" in n), i = () => {
|
|
432
596
|
a && (a.disconnect(), a = void 0);
|
|
433
|
-
},
|
|
434
|
-
|
|
597
|
+
}, l = m(() => Array.isArray(e) ? e.map((f) => q(f)) : [q(e)]), u = ee(
|
|
598
|
+
l,
|
|
435
599
|
(f) => {
|
|
436
|
-
if (
|
|
600
|
+
if (i(), s.value && n) {
|
|
437
601
|
a = new ResizeObserver(t);
|
|
438
|
-
for (const
|
|
439
|
-
|
|
602
|
+
for (const p of f)
|
|
603
|
+
p && a.observe(p, o);
|
|
440
604
|
}
|
|
441
605
|
},
|
|
442
606
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
443
607
|
), d = () => {
|
|
444
|
-
|
|
608
|
+
i(), u();
|
|
445
609
|
};
|
|
446
|
-
return
|
|
610
|
+
return ve(d), {
|
|
447
611
|
isSupported: s,
|
|
448
612
|
stop: d
|
|
449
613
|
};
|
|
450
614
|
}
|
|
451
|
-
function
|
|
615
|
+
function He(e, t = {}) {
|
|
452
616
|
const {
|
|
453
617
|
reset: r = !0,
|
|
454
618
|
windowResize: n = !0,
|
|
455
619
|
windowScroll: o = !0,
|
|
456
620
|
immediate: a = !0
|
|
457
|
-
} = t, s = g(0),
|
|
458
|
-
function
|
|
459
|
-
const
|
|
460
|
-
if (!
|
|
461
|
-
r && (s.value = 0,
|
|
621
|
+
} = t, s = g(0), i = g(0), l = g(0), u = g(0), d = g(0), f = g(0), p = g(0), h = g(0);
|
|
622
|
+
function v() {
|
|
623
|
+
const M = q(e);
|
|
624
|
+
if (!M) {
|
|
625
|
+
r && (s.value = 0, i.value = 0, l.value = 0, u.value = 0, d.value = 0, f.value = 0, p.value = 0, h.value = 0);
|
|
462
626
|
return;
|
|
463
627
|
}
|
|
464
|
-
const
|
|
465
|
-
s.value =
|
|
628
|
+
const S = M.getBoundingClientRect();
|
|
629
|
+
s.value = S.height, i.value = S.bottom, l.value = S.left, u.value = S.right, d.value = S.top, f.value = S.width, p.value = S.x, h.value = S.y;
|
|
466
630
|
}
|
|
467
|
-
return
|
|
631
|
+
return xr(e, v), ee(() => q(e), (M) => !M && v()), wr(e, v, {
|
|
468
632
|
attributeFilter: ["style", "class"]
|
|
469
|
-
}), o &&
|
|
470
|
-
a &&
|
|
633
|
+
}), o && P("scroll", v, { capture: !0, passive: !0 }), n && P("resize", v, { passive: !0 }), Ze(() => {
|
|
634
|
+
a && v();
|
|
471
635
|
}), {
|
|
472
636
|
height: s,
|
|
473
|
-
bottom:
|
|
474
|
-
left:
|
|
475
|
-
right:
|
|
637
|
+
bottom: i,
|
|
638
|
+
left: l,
|
|
639
|
+
right: u,
|
|
476
640
|
top: d,
|
|
477
641
|
width: f,
|
|
478
|
-
x:
|
|
479
|
-
y:
|
|
480
|
-
update:
|
|
642
|
+
x: p,
|
|
643
|
+
y: h,
|
|
644
|
+
update: v
|
|
481
645
|
};
|
|
482
646
|
}
|
|
483
|
-
function
|
|
647
|
+
function kr(e, t = {}) {
|
|
484
648
|
const {
|
|
485
649
|
delayEnter: r = 0,
|
|
486
650
|
delayLeave: n = 0,
|
|
487
|
-
window: o =
|
|
651
|
+
window: o = U
|
|
488
652
|
} = t, a = g(!1);
|
|
489
653
|
let s;
|
|
490
|
-
const
|
|
491
|
-
const
|
|
492
|
-
s && (clearTimeout(s), s = void 0),
|
|
654
|
+
const i = (l) => {
|
|
655
|
+
const u = l ? r : n;
|
|
656
|
+
s && (clearTimeout(s), s = void 0), u ? s = setTimeout(() => a.value = l, u) : a.value = l;
|
|
493
657
|
};
|
|
494
|
-
return o && (
|
|
658
|
+
return o && (P(e, "mouseenter", () => i(!0), { passive: !0 }), P(e, "mouseleave", () => i(!1), { passive: !0 })), a;
|
|
495
659
|
}
|
|
496
|
-
const
|
|
660
|
+
const Sr = {
|
|
497
661
|
multiple: !0,
|
|
498
662
|
accept: "*",
|
|
499
663
|
reset: !1,
|
|
500
664
|
directory: !1
|
|
501
665
|
};
|
|
502
|
-
function
|
|
666
|
+
function $r(e = {}) {
|
|
503
667
|
const {
|
|
504
|
-
document: t =
|
|
505
|
-
} = e, r = g(null), { on: n, trigger: o } =
|
|
668
|
+
document: t = ur
|
|
669
|
+
} = e, r = g(null), { on: n, trigger: o } = Zt();
|
|
506
670
|
let a;
|
|
507
|
-
t && (a = t.createElement("input"), a.type = "file", a.onchange = (
|
|
508
|
-
const
|
|
509
|
-
r.value =
|
|
671
|
+
t && (a = t.createElement("input"), a.type = "file", a.onchange = (l) => {
|
|
672
|
+
const u = l.target;
|
|
673
|
+
r.value = u.files, o(r.value);
|
|
510
674
|
});
|
|
511
675
|
const s = () => {
|
|
512
676
|
r.value = null, a && (a.value = "", o(null));
|
|
513
|
-
},
|
|
677
|
+
}, i = (l) => {
|
|
514
678
|
if (!a)
|
|
515
679
|
return;
|
|
516
|
-
const
|
|
517
|
-
...
|
|
680
|
+
const u = {
|
|
681
|
+
...Sr,
|
|
518
682
|
...e,
|
|
519
|
-
...
|
|
683
|
+
...l
|
|
520
684
|
};
|
|
521
|
-
a.multiple =
|
|
685
|
+
a.multiple = u.multiple, a.accept = u.accept, a.webkitdirectory = u.directory, rr(u, "capture") && (a.capture = u.capture), u.reset && s(), a.click();
|
|
522
686
|
};
|
|
523
687
|
return {
|
|
524
|
-
files:
|
|
525
|
-
open:
|
|
688
|
+
files: Ge(r),
|
|
689
|
+
open: i,
|
|
526
690
|
reset: s,
|
|
527
691
|
onChange: n
|
|
528
692
|
};
|
|
529
693
|
}
|
|
530
|
-
function
|
|
531
|
-
const { initialValue: r = !1, focusVisible: n = !1 } = t, o = g(!1), a =
|
|
532
|
-
|
|
533
|
-
var
|
|
534
|
-
(!n || (
|
|
535
|
-
}),
|
|
536
|
-
const s =
|
|
694
|
+
function Mr(e, t = {}) {
|
|
695
|
+
const { initialValue: r = !1, focusVisible: n = !1 } = t, o = g(!1), a = m(() => q(e));
|
|
696
|
+
P(a, "focus", (i) => {
|
|
697
|
+
var l, u;
|
|
698
|
+
(!n || (u = (l = i.target).matches) != null && u.call(l, ":focus-visible")) && (o.value = !0);
|
|
699
|
+
}), P(a, "blur", () => o.value = !1);
|
|
700
|
+
const s = m({
|
|
537
701
|
get: () => o.value,
|
|
538
|
-
set(
|
|
539
|
-
var
|
|
540
|
-
!
|
|
702
|
+
set(i) {
|
|
703
|
+
var l, u;
|
|
704
|
+
!i && o.value ? (l = a.value) == null || l.blur() : i && !o.value && ((u = a.value) == null || u.focus());
|
|
541
705
|
}
|
|
542
706
|
});
|
|
543
|
-
return
|
|
707
|
+
return ee(
|
|
544
708
|
a,
|
|
545
709
|
() => {
|
|
546
710
|
s.value = r;
|
|
@@ -548,15 +712,59 @@ function vr(e, t = {}) {
|
|
|
548
712
|
{ immediate: !0, flush: "post" }
|
|
549
713
|
), { focused: s };
|
|
550
714
|
}
|
|
551
|
-
function
|
|
552
|
-
const { window: n =
|
|
553
|
-
return
|
|
715
|
+
function _t(e, t, r = {}) {
|
|
716
|
+
const { window: n = U } = r;
|
|
717
|
+
return yr(e, t, n == null ? void 0 : n.localStorage, r);
|
|
554
718
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
719
|
+
const Ar = {
|
|
720
|
+
page: (e) => [e.pageX, e.pageY],
|
|
721
|
+
client: (e) => [e.clientX, e.clientY],
|
|
722
|
+
screen: (e) => [e.screenX, e.screenY],
|
|
723
|
+
movement: (e) => e instanceof Touch ? null : [e.movementX, e.movementY]
|
|
724
|
+
};
|
|
725
|
+
function Cr(e = {}) {
|
|
726
|
+
const {
|
|
727
|
+
type: t = "page",
|
|
728
|
+
touch: r = !0,
|
|
729
|
+
resetOnTouchEnds: n = !1,
|
|
730
|
+
initialValue: o = { x: 0, y: 0 },
|
|
731
|
+
window: a = U,
|
|
732
|
+
target: s = a,
|
|
733
|
+
scroll: i = !0,
|
|
734
|
+
eventFilter: l
|
|
735
|
+
} = e;
|
|
736
|
+
let u = null;
|
|
737
|
+
const d = g(o.x), f = g(o.y), p = g(null), h = typeof t == "function" ? t : Ar[t], v = (C) => {
|
|
738
|
+
const E = h(C);
|
|
739
|
+
u = C, E && ([d.value, f.value] = E, p.value = "mouse");
|
|
740
|
+
}, M = (C) => {
|
|
741
|
+
if (C.touches.length > 0) {
|
|
742
|
+
const E = h(C.touches[0]);
|
|
743
|
+
E && ([d.value, f.value] = E, p.value = "touch");
|
|
744
|
+
}
|
|
745
|
+
}, S = () => {
|
|
746
|
+
if (!u || !a)
|
|
747
|
+
return;
|
|
748
|
+
const C = h(u);
|
|
749
|
+
u instanceof MouseEvent && C && (d.value = C[0] + a.scrollX, f.value = C[1] + a.scrollY);
|
|
750
|
+
}, L = () => {
|
|
751
|
+
d.value = o.x, f.value = o.y;
|
|
752
|
+
}, H = l ? (C) => l(() => v(C), {}) : (C) => v(C), I = l ? (C) => l(() => M(C), {}) : (C) => M(C), N = l ? () => l(() => S(), {}) : () => S();
|
|
753
|
+
if (s) {
|
|
754
|
+
const C = { passive: !0 };
|
|
755
|
+
P(s, ["mousemove", "dragover"], H, C), r && t !== "movement" && (P(s, ["touchstart", "touchmove"], I, C), n && P(s, "touchend", L, C)), i && t === "page" && P(a, "scroll", N, { passive: !0 });
|
|
756
|
+
}
|
|
757
|
+
return {
|
|
758
|
+
x: d,
|
|
759
|
+
y: f,
|
|
760
|
+
sourceType: p
|
|
761
|
+
};
|
|
558
762
|
}
|
|
559
|
-
|
|
763
|
+
function Tr(e) {
|
|
764
|
+
const t = ot("(prefers-color-scheme: light)", e), r = ot("(prefers-color-scheme: dark)", e);
|
|
765
|
+
return m(() => r.value ? "dark" : t.value ? "light" : "no-preference");
|
|
766
|
+
}
|
|
767
|
+
const xt = /* @__PURE__ */ R({
|
|
560
768
|
__name: "Btn",
|
|
561
769
|
props: {
|
|
562
770
|
type: { default: "button" },
|
|
@@ -572,7 +780,7 @@ const vt = /* @__PURE__ */ S({
|
|
|
572
780
|
disabled: { type: Boolean, default: !1 }
|
|
573
781
|
},
|
|
574
782
|
setup(e) {
|
|
575
|
-
const t = e, r =
|
|
783
|
+
const t = e, r = re(t), n = m(() => {
|
|
576
784
|
switch (t.size) {
|
|
577
785
|
case "sm":
|
|
578
786
|
return {
|
|
@@ -590,7 +798,7 @@ const vt = /* @__PURE__ */ S({
|
|
|
590
798
|
iconContent: "h-10 w-10 p-3"
|
|
591
799
|
};
|
|
592
800
|
}
|
|
593
|
-
}), o = g(null), a =
|
|
801
|
+
}), o = g(null), a = kr(o), s = m(() => t.hoverVariant && a.value ? t.hoverVariant : t.variant), i = m(() => {
|
|
594
802
|
switch (s.value) {
|
|
595
803
|
case "filled":
|
|
596
804
|
switch (t.color) {
|
|
@@ -663,47 +871,47 @@ const vt = /* @__PURE__ */ S({
|
|
|
663
871
|
return "btn-default";
|
|
664
872
|
}
|
|
665
873
|
});
|
|
666
|
-
return (
|
|
874
|
+
return (l, u) => (b(), X(Se(l.is), $e({
|
|
667
875
|
ref_key: "btn",
|
|
668
876
|
ref: o,
|
|
669
|
-
"data-size":
|
|
670
|
-
type:
|
|
877
|
+
"data-size": l.size,
|
|
878
|
+
type: l.type,
|
|
671
879
|
class: ["flex items-center justify-center gap-1 decoration-none", [
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
880
|
+
c(i),
|
|
881
|
+
c(r).class,
|
|
882
|
+
l.icon ? c(n).iconContent : c(n).normalContent,
|
|
675
883
|
{
|
|
676
|
-
"filter-grayscale pointer-events-none":
|
|
677
|
-
"active:translate-y-0.25":
|
|
678
|
-
"active:scale-98":
|
|
679
|
-
"transition-all":
|
|
884
|
+
"filter-grayscale pointer-events-none": l.disabled,
|
|
885
|
+
"active:translate-y-0.25": l.pressEffect === "translate",
|
|
886
|
+
"active:scale-98": l.pressEffect === "scale",
|
|
887
|
+
"transition-all": l.animate
|
|
680
888
|
}
|
|
681
889
|
]],
|
|
682
890
|
style: [
|
|
683
|
-
|
|
891
|
+
c(r).style
|
|
684
892
|
],
|
|
685
|
-
disabled:
|
|
686
|
-
},
|
|
687
|
-
default:
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
893
|
+
disabled: l.disabled
|
|
894
|
+
}, l.$attrs), {
|
|
895
|
+
default: J(() => [
|
|
896
|
+
l.$slots.leftSection ? z(l.$slots, "leftSection", { key: 0 }) : B("", !0),
|
|
897
|
+
z(l.$slots, "default"),
|
|
898
|
+
l.$slots.rightSection ? z(l.$slots, "rightSection", { key: 1 }) : B("", !0)
|
|
691
899
|
]),
|
|
692
900
|
_: 3
|
|
693
901
|
}, 16, ["data-size", "type", "style", "class", "disabled"]));
|
|
694
902
|
}
|
|
695
|
-
}),
|
|
903
|
+
}), Rr = (e, t) => {
|
|
696
904
|
const r = e.__vccOpts || e;
|
|
697
905
|
for (const [n, o] of t)
|
|
698
906
|
r[n] = o;
|
|
699
907
|
return r;
|
|
700
|
-
},
|
|
701
|
-
function
|
|
702
|
-
return
|
|
703
|
-
|
|
908
|
+
}, Er = {}, zr = { class: "flex flex-col gap-4 container" };
|
|
909
|
+
function Or(e, t) {
|
|
910
|
+
return b(), w("div", zr, [
|
|
911
|
+
z(e.$slots, "default")
|
|
704
912
|
]);
|
|
705
913
|
}
|
|
706
|
-
const
|
|
914
|
+
const ya = /* @__PURE__ */ Rr(Er, [["render", Or]]), wa = /* @__PURE__ */ R({
|
|
707
915
|
__name: "ChatMessage",
|
|
708
916
|
props: {
|
|
709
917
|
avatar: {},
|
|
@@ -713,7 +921,7 @@ const ia = /* @__PURE__ */ gr(yr, [["render", _r]]), la = /* @__PURE__ */ S({
|
|
|
713
921
|
withBorder: { type: Boolean, default: !1 }
|
|
714
922
|
},
|
|
715
923
|
setup(e) {
|
|
716
|
-
const t = e, r =
|
|
924
|
+
const t = e, r = m(() => {
|
|
717
925
|
switch (t.variant) {
|
|
718
926
|
case "default":
|
|
719
927
|
return "bg-surface-base";
|
|
@@ -733,35 +941,35 @@ const ia = /* @__PURE__ */ gr(yr, [["render", _r]]), la = /* @__PURE__ */ S({
|
|
|
733
941
|
}
|
|
734
942
|
});
|
|
735
943
|
return (n, o) => {
|
|
736
|
-
const a =
|
|
737
|
-
return
|
|
738
|
-
class:
|
|
944
|
+
const a = Jt;
|
|
945
|
+
return b(), w("div", {
|
|
946
|
+
class: k(["flex gap-2", [
|
|
739
947
|
{
|
|
740
948
|
"flex-row-reverse": n.position === "right",
|
|
741
949
|
"flex-row": n.position === "left"
|
|
742
950
|
}
|
|
743
951
|
]])
|
|
744
952
|
}, [
|
|
745
|
-
n.$slots.avatar ?
|
|
953
|
+
n.$slots.avatar ? z(n.$slots, "avatar", { key: 0 }) : n.avatar ? (b(), X(a, {
|
|
746
954
|
key: 1,
|
|
747
955
|
src: n.avatar
|
|
748
|
-
}, null, 8, ["src"])) :
|
|
749
|
-
|
|
750
|
-
class:
|
|
956
|
+
}, null, 8, ["src"])) : B("", !0),
|
|
957
|
+
$("div", {
|
|
958
|
+
class: k(["rounded-xl px-3 py-2 transition-background-color,border-color", [
|
|
751
959
|
{
|
|
752
960
|
"rounded-tr": n.position === "right",
|
|
753
961
|
"rounded-tl": n.position === "left",
|
|
754
962
|
border: n.withBorder
|
|
755
963
|
},
|
|
756
|
-
|
|
964
|
+
c(r)
|
|
757
965
|
]])
|
|
758
966
|
}, [
|
|
759
|
-
|
|
967
|
+
z(n.$slots, "default")
|
|
760
968
|
], 2)
|
|
761
969
|
], 2);
|
|
762
970
|
};
|
|
763
971
|
}
|
|
764
|
-
}),
|
|
972
|
+
}), Nr = { class: "w-full flex self-center gap-2 text-center" }, _a = /* @__PURE__ */ R({
|
|
765
973
|
__name: "ChatSystem",
|
|
766
974
|
props: {
|
|
767
975
|
position: {},
|
|
@@ -770,7 +978,7 @@ const ia = /* @__PURE__ */ gr(yr, [["render", _r]]), la = /* @__PURE__ */ S({
|
|
|
770
978
|
withBorder: { type: Boolean, default: !1 }
|
|
771
979
|
},
|
|
772
980
|
setup(e) {
|
|
773
|
-
const t = e, r =
|
|
981
|
+
const t = e, r = m(() => {
|
|
774
982
|
switch (t.variant) {
|
|
775
983
|
case "default":
|
|
776
984
|
return "bg-surface-base";
|
|
@@ -789,19 +997,19 @@ const ia = /* @__PURE__ */ gr(yr, [["render", _r]]), la = /* @__PURE__ */ S({
|
|
|
789
997
|
return "bg-transparent";
|
|
790
998
|
}
|
|
791
999
|
});
|
|
792
|
-
return (n, o) => (
|
|
793
|
-
|
|
794
|
-
class:
|
|
795
|
-
|
|
1000
|
+
return (n, o) => (b(), w("div", Nr, [
|
|
1001
|
+
$("div", {
|
|
1002
|
+
class: k(["w-full rounded-xl px-3 py-2 transition-background-color,border-color", [
|
|
1003
|
+
c(r)
|
|
796
1004
|
]])
|
|
797
1005
|
}, [
|
|
798
|
-
|
|
1006
|
+
z(n.$slots, "default")
|
|
799
1007
|
], 2)
|
|
800
1008
|
]));
|
|
801
1009
|
}
|
|
802
|
-
}),
|
|
1010
|
+
}), xa = /* @__PURE__ */ R({
|
|
803
1011
|
__name: "Chip",
|
|
804
|
-
props: /* @__PURE__ */
|
|
1012
|
+
props: /* @__PURE__ */ K({
|
|
805
1013
|
is: { default: "img" },
|
|
806
1014
|
src: {},
|
|
807
1015
|
size: { default: "md" },
|
|
@@ -814,7 +1022,7 @@ const ia = /* @__PURE__ */ gr(yr, [["render", _r]]), la = /* @__PURE__ */ S({
|
|
|
814
1022
|
}),
|
|
815
1023
|
emits: ["update:modelValue"],
|
|
816
1024
|
setup(e) {
|
|
817
|
-
const t = e, r =
|
|
1025
|
+
const t = e, r = te(e, "modelValue"), n = re(t), o = m(() => {
|
|
818
1026
|
switch (t.size) {
|
|
819
1027
|
case "sm":
|
|
820
1028
|
return "px-3 text-sm h-6";
|
|
@@ -823,18 +1031,18 @@ const ia = /* @__PURE__ */ gr(yr, [["render", _r]]), la = /* @__PURE__ */ S({
|
|
|
823
1031
|
case "lg":
|
|
824
1032
|
return "px-8 h-10 text-lg";
|
|
825
1033
|
}
|
|
826
|
-
}), a =
|
|
827
|
-
return (
|
|
828
|
-
class:
|
|
829
|
-
style:
|
|
830
|
-
onPointerup:
|
|
1034
|
+
}), a = m(() => r.value ? "container-filled-primary border-transparent text-white" : "container-base"), s = m(() => r.value !== void 0), i = m(() => s.value ? "cursor-pointer" : "");
|
|
1035
|
+
return (l, u) => (b(), w("span", {
|
|
1036
|
+
class: k(["inline-flex items-center gap-1", [c(n).class, c(o), c(a), c(i)]]),
|
|
1037
|
+
style: V([c(n).style]),
|
|
1038
|
+
onPointerup: u[0] || (u[0] = (d) => c(s) && (r.value = !r.value))
|
|
831
1039
|
}, [
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
1040
|
+
l.$slots.leftSection ? z(l.$slots, "leftSection", { key: 0 }) : B("", !0),
|
|
1041
|
+
z(l.$slots, "default"),
|
|
1042
|
+
l.$slots.rightSection ? z(l.$slots, "rightSection", { key: 1 }) : B("", !0)
|
|
835
1043
|
], 38));
|
|
836
1044
|
}
|
|
837
|
-
}),
|
|
1045
|
+
}), Br = /* @__PURE__ */ R({
|
|
838
1046
|
__name: "ColorSwatch",
|
|
839
1047
|
props: {
|
|
840
1048
|
color: {},
|
|
@@ -842,35 +1050,35 @@ const ia = /* @__PURE__ */ gr(yr, [["render", _r]]), la = /* @__PURE__ */ S({
|
|
|
842
1050
|
withBorder: { type: Boolean, default: !1 }
|
|
843
1051
|
},
|
|
844
1052
|
setup(e) {
|
|
845
|
-
return (t, r) => (
|
|
846
|
-
class:
|
|
1053
|
+
return (t, r) => (b(), X(Se(t.is), {
|
|
1054
|
+
class: k(["h-6 w-6 border rounded-full", [{
|
|
847
1055
|
"border border-surface-border-base": t.withBorder,
|
|
848
1056
|
"border border-transparent": !t.withBorder
|
|
849
1057
|
}]]),
|
|
850
|
-
style:
|
|
1058
|
+
style: V({
|
|
851
1059
|
backgroundColor: t.color
|
|
852
1060
|
})
|
|
853
1061
|
}, null, 8, ["class", "style"]));
|
|
854
1062
|
}
|
|
855
1063
|
});
|
|
856
|
-
function
|
|
1064
|
+
function Ve(e) {
|
|
857
1065
|
"@babel/helpers - typeof";
|
|
858
|
-
return
|
|
1066
|
+
return Ve = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
859
1067
|
return typeof t;
|
|
860
1068
|
} : function(t) {
|
|
861
1069
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
862
|
-
},
|
|
1070
|
+
}, Ve(e);
|
|
863
1071
|
}
|
|
864
|
-
var
|
|
865
|
-
function
|
|
866
|
-
if (e = e || "", t = t || {}, e instanceof
|
|
1072
|
+
var Hr = /^\s+/, Vr = /\s+$/;
|
|
1073
|
+
function y(e, t) {
|
|
1074
|
+
if (e = e || "", t = t || {}, e instanceof y)
|
|
867
1075
|
return e;
|
|
868
|
-
if (!(this instanceof
|
|
869
|
-
return new
|
|
870
|
-
var r =
|
|
1076
|
+
if (!(this instanceof y))
|
|
1077
|
+
return new y(e, t);
|
|
1078
|
+
var r = Ir(e);
|
|
871
1079
|
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;
|
|
872
1080
|
}
|
|
873
|
-
|
|
1081
|
+
y.prototype = {
|
|
874
1082
|
isDark: function() {
|
|
875
1083
|
return this.getBrightness() < 128;
|
|
876
1084
|
},
|
|
@@ -894,14 +1102,14 @@ m.prototype = {
|
|
|
894
1102
|
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
|
|
895
1103
|
},
|
|
896
1104
|
getLuminance: function() {
|
|
897
|
-
var t = this.toRgb(), r, n, o, a, s,
|
|
898
|
-
return r = t.r / 255, n = t.g / 255, o = t.b / 255, r <= 0.03928 ? a = r / 12.92 : a = 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), o <= 0.03928 ?
|
|
1105
|
+
var t = this.toRgb(), r, n, o, a, s, i;
|
|
1106
|
+
return r = t.r / 255, n = t.g / 255, o = t.b / 255, r <= 0.03928 ? a = r / 12.92 : a = 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), o <= 0.03928 ? i = o / 12.92 : i = Math.pow((o + 0.055) / 1.055, 2.4), 0.2126 * a + 0.7152 * s + 0.0722 * i;
|
|
899
1107
|
},
|
|
900
1108
|
setAlpha: function(t) {
|
|
901
|
-
return this._a =
|
|
1109
|
+
return this._a = kt(t), this._roundA = Math.round(100 * this._a) / 100, this;
|
|
902
1110
|
},
|
|
903
1111
|
toHsv: function() {
|
|
904
|
-
var t =
|
|
1112
|
+
var t = it(this._r, this._g, this._b);
|
|
905
1113
|
return {
|
|
906
1114
|
h: t.h * 360,
|
|
907
1115
|
s: t.s,
|
|
@@ -910,11 +1118,11 @@ m.prototype = {
|
|
|
910
1118
|
};
|
|
911
1119
|
},
|
|
912
1120
|
toHsvString: function() {
|
|
913
|
-
var t =
|
|
1121
|
+
var t = it(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), o = Math.round(t.v * 100);
|
|
914
1122
|
return this._a == 1 ? "hsv(" + r + ", " + n + "%, " + o + "%)" : "hsva(" + r + ", " + n + "%, " + o + "%, " + this._roundA + ")";
|
|
915
1123
|
},
|
|
916
1124
|
toHsl: function() {
|
|
917
|
-
var t =
|
|
1125
|
+
var t = lt(this._r, this._g, this._b);
|
|
918
1126
|
return {
|
|
919
1127
|
h: t.h * 360,
|
|
920
1128
|
s: t.s,
|
|
@@ -923,17 +1131,17 @@ m.prototype = {
|
|
|
923
1131
|
};
|
|
924
1132
|
},
|
|
925
1133
|
toHslString: function() {
|
|
926
|
-
var t =
|
|
1134
|
+
var t = lt(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), o = Math.round(t.l * 100);
|
|
927
1135
|
return this._a == 1 ? "hsl(" + r + ", " + n + "%, " + o + "%)" : "hsla(" + r + ", " + n + "%, " + o + "%, " + this._roundA + ")";
|
|
928
1136
|
},
|
|
929
1137
|
toHex: function(t) {
|
|
930
|
-
return
|
|
1138
|
+
return ut(this._r, this._g, this._b, t);
|
|
931
1139
|
},
|
|
932
1140
|
toHexString: function(t) {
|
|
933
1141
|
return "#" + this.toHex(t);
|
|
934
1142
|
},
|
|
935
1143
|
toHex8: function(t) {
|
|
936
|
-
return
|
|
1144
|
+
return Lr(this._r, this._g, this._b, this._a, t);
|
|
937
1145
|
},
|
|
938
1146
|
toHex8String: function(t) {
|
|
939
1147
|
return "#" + this.toHex8(t);
|
|
@@ -951,23 +1159,23 @@ m.prototype = {
|
|
|
951
1159
|
},
|
|
952
1160
|
toPercentageRgb: function() {
|
|
953
1161
|
return {
|
|
954
|
-
r: Math.round(
|
|
955
|
-
g: Math.round(
|
|
956
|
-
b: Math.round(
|
|
1162
|
+
r: Math.round(O(this._r, 255) * 100) + "%",
|
|
1163
|
+
g: Math.round(O(this._g, 255) * 100) + "%",
|
|
1164
|
+
b: Math.round(O(this._b, 255) * 100) + "%",
|
|
957
1165
|
a: this._a
|
|
958
1166
|
};
|
|
959
1167
|
},
|
|
960
1168
|
toPercentageRgbString: function() {
|
|
961
|
-
return this._a == 1 ? "rgb(" + Math.round(
|
|
1169
|
+
return this._a == 1 ? "rgb(" + Math.round(O(this._r, 255) * 100) + "%, " + Math.round(O(this._g, 255) * 100) + "%, " + Math.round(O(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(O(this._r, 255) * 100) + "%, " + Math.round(O(this._g, 255) * 100) + "%, " + Math.round(O(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
|
962
1170
|
},
|
|
963
1171
|
toName: function() {
|
|
964
|
-
return this._a === 0 ? "transparent" : this._a < 1 ? !1 :
|
|
1172
|
+
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : en[ut(this._r, this._g, this._b, !0)] || !1;
|
|
965
1173
|
},
|
|
966
1174
|
toFilter: function(t) {
|
|
967
|
-
var r = "#" +
|
|
1175
|
+
var r = "#" + ct(this._r, this._g, this._b, this._a), n = r, o = this._gradientType ? "GradientType = 1, " : "";
|
|
968
1176
|
if (t) {
|
|
969
|
-
var a =
|
|
970
|
-
n = "#" +
|
|
1177
|
+
var a = y(t);
|
|
1178
|
+
n = "#" + ct(a._r, a._g, a._b, a._a);
|
|
971
1179
|
}
|
|
972
1180
|
return "progid:DXImageTransform.Microsoft.gradient(" + o + "startColorstr=" + r + ",endColorstr=" + n + ")";
|
|
973
1181
|
},
|
|
@@ -978,106 +1186,106 @@ m.prototype = {
|
|
|
978
1186
|
return a ? t === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (n = this.toRgbString()), t === "prgb" && (n = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (n = this.toHexString()), t === "hex3" && (n = this.toHexString(!0)), t === "hex4" && (n = this.toHex8String(!0)), t === "hex8" && (n = this.toHex8String()), t === "name" && (n = this.toName()), t === "hsl" && (n = this.toHslString()), t === "hsv" && (n = this.toHsvString()), n || this.toHexString());
|
|
979
1187
|
},
|
|
980
1188
|
clone: function() {
|
|
981
|
-
return
|
|
1189
|
+
return y(this.toString());
|
|
982
1190
|
},
|
|
983
1191
|
_applyModification: function(t, r) {
|
|
984
1192
|
var n = t.apply(null, [this].concat([].slice.call(r)));
|
|
985
1193
|
return this._r = n._r, this._g = n._g, this._b = n._b, this.setAlpha(n._a), this;
|
|
986
1194
|
},
|
|
987
1195
|
lighten: function() {
|
|
988
|
-
return this._applyModification(
|
|
1196
|
+
return this._applyModification(Ur, arguments);
|
|
989
1197
|
},
|
|
990
1198
|
brighten: function() {
|
|
991
|
-
return this._applyModification(
|
|
1199
|
+
return this._applyModification(Yr, arguments);
|
|
992
1200
|
},
|
|
993
1201
|
darken: function() {
|
|
994
|
-
return this._applyModification(
|
|
1202
|
+
return this._applyModification(qr, arguments);
|
|
995
1203
|
},
|
|
996
1204
|
desaturate: function() {
|
|
997
|
-
return this._applyModification(
|
|
1205
|
+
return this._applyModification(Wr, arguments);
|
|
998
1206
|
},
|
|
999
1207
|
saturate: function() {
|
|
1000
|
-
return this._applyModification(
|
|
1208
|
+
return this._applyModification(jr, arguments);
|
|
1001
1209
|
},
|
|
1002
1210
|
greyscale: function() {
|
|
1003
|
-
return this._applyModification(
|
|
1211
|
+
return this._applyModification(Xr, arguments);
|
|
1004
1212
|
},
|
|
1005
1213
|
spin: function() {
|
|
1006
|
-
return this._applyModification(
|
|
1214
|
+
return this._applyModification(Gr, arguments);
|
|
1007
1215
|
},
|
|
1008
1216
|
_applyCombination: function(t, r) {
|
|
1009
1217
|
return t.apply(null, [this].concat([].slice.call(r)));
|
|
1010
1218
|
},
|
|
1011
1219
|
analogous: function() {
|
|
1012
|
-
return this._applyCombination(
|
|
1220
|
+
return this._applyCombination(Zr, arguments);
|
|
1013
1221
|
},
|
|
1014
1222
|
complement: function() {
|
|
1015
|
-
return this._applyCombination(
|
|
1223
|
+
return this._applyCombination(Jr, arguments);
|
|
1016
1224
|
},
|
|
1017
1225
|
monochromatic: function() {
|
|
1018
|
-
return this._applyCombination(
|
|
1226
|
+
return this._applyCombination(Qr, arguments);
|
|
1019
1227
|
},
|
|
1020
1228
|
splitcomplement: function() {
|
|
1021
|
-
return this._applyCombination(
|
|
1229
|
+
return this._applyCombination(Kr, arguments);
|
|
1022
1230
|
},
|
|
1023
1231
|
// Disabled until https://github.com/bgrins/TinyColor/issues/254
|
|
1024
1232
|
// polyad: function (number) {
|
|
1025
1233
|
// return this._applyCombination(polyad, [number]);
|
|
1026
1234
|
// },
|
|
1027
1235
|
triad: function() {
|
|
1028
|
-
return this._applyCombination(
|
|
1236
|
+
return this._applyCombination(dt, [3]);
|
|
1029
1237
|
},
|
|
1030
1238
|
tetrad: function() {
|
|
1031
|
-
return this._applyCombination(
|
|
1239
|
+
return this._applyCombination(dt, [4]);
|
|
1032
1240
|
}
|
|
1033
1241
|
};
|
|
1034
|
-
|
|
1035
|
-
if (
|
|
1242
|
+
y.fromRatio = function(e, t) {
|
|
1243
|
+
if (Ve(e) == "object") {
|
|
1036
1244
|
var r = {};
|
|
1037
1245
|
for (var n in e)
|
|
1038
|
-
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] =
|
|
1246
|
+
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] = Ae(e[n]));
|
|
1039
1247
|
e = r;
|
|
1040
1248
|
}
|
|
1041
|
-
return
|
|
1249
|
+
return y(e, t);
|
|
1042
1250
|
};
|
|
1043
|
-
function
|
|
1251
|
+
function Ir(e) {
|
|
1044
1252
|
var t = {
|
|
1045
1253
|
r: 0,
|
|
1046
1254
|
g: 0,
|
|
1047
1255
|
b: 0
|
|
1048
|
-
}, r = 1, n = null, o = null, a = null, s = !1,
|
|
1049
|
-
return typeof e == "string" && (e =
|
|
1256
|
+
}, r = 1, n = null, o = null, a = null, s = !1, i = !1;
|
|
1257
|
+
return typeof e == "string" && (e = an(e)), Ve(e) == "object" && (ne(e.r) && ne(e.g) && ne(e.b) ? (t = Pr(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ne(e.h) && ne(e.s) && ne(e.v) ? (n = Ae(e.s), o = Ae(e.v), t = Dr(e.h, n, o), s = !0, i = "hsv") : ne(e.h) && ne(e.s) && ne(e.l) && (n = Ae(e.s), a = Ae(e.l), t = Fr(e.h, n, a), s = !0, i = "hsl"), e.hasOwnProperty("a") && (r = e.a)), r = kt(r), {
|
|
1050
1258
|
ok: s,
|
|
1051
|
-
format: e.format ||
|
|
1259
|
+
format: e.format || i,
|
|
1052
1260
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
1053
1261
|
g: Math.min(255, Math.max(t.g, 0)),
|
|
1054
1262
|
b: Math.min(255, Math.max(t.b, 0)),
|
|
1055
1263
|
a: r
|
|
1056
1264
|
};
|
|
1057
1265
|
}
|
|
1058
|
-
function
|
|
1266
|
+
function Pr(e, t, r) {
|
|
1059
1267
|
return {
|
|
1060
|
-
r:
|
|
1061
|
-
g:
|
|
1062
|
-
b:
|
|
1268
|
+
r: O(e, 255) * 255,
|
|
1269
|
+
g: O(t, 255) * 255,
|
|
1270
|
+
b: O(r, 255) * 255
|
|
1063
1271
|
};
|
|
1064
1272
|
}
|
|
1065
|
-
function
|
|
1066
|
-
e =
|
|
1067
|
-
var n = Math.max(e, t, r), o = Math.min(e, t, r), a, s,
|
|
1273
|
+
function lt(e, t, r) {
|
|
1274
|
+
e = O(e, 255), t = O(t, 255), r = O(r, 255);
|
|
1275
|
+
var n = Math.max(e, t, r), o = Math.min(e, t, r), a, s, i = (n + o) / 2;
|
|
1068
1276
|
if (n == o)
|
|
1069
1277
|
a = s = 0;
|
|
1070
1278
|
else {
|
|
1071
|
-
var
|
|
1072
|
-
switch (s =
|
|
1279
|
+
var l = n - o;
|
|
1280
|
+
switch (s = i > 0.5 ? l / (2 - n - o) : l / (n + o), n) {
|
|
1073
1281
|
case e:
|
|
1074
|
-
a = (t - r) /
|
|
1282
|
+
a = (t - r) / l + (t < r ? 6 : 0);
|
|
1075
1283
|
break;
|
|
1076
1284
|
case t:
|
|
1077
|
-
a = (r - e) /
|
|
1285
|
+
a = (r - e) / l + 2;
|
|
1078
1286
|
break;
|
|
1079
1287
|
case r:
|
|
1080
|
-
a = (e - t) /
|
|
1288
|
+
a = (e - t) / l + 4;
|
|
1081
1289
|
break;
|
|
1082
1290
|
}
|
|
1083
1291
|
a /= 6;
|
|
@@ -1085,20 +1293,20 @@ function Qe(e, t, r) {
|
|
|
1085
1293
|
return {
|
|
1086
1294
|
h: a,
|
|
1087
1295
|
s,
|
|
1088
|
-
l
|
|
1296
|
+
l: i
|
|
1089
1297
|
};
|
|
1090
1298
|
}
|
|
1091
|
-
function
|
|
1299
|
+
function Fr(e, t, r) {
|
|
1092
1300
|
var n, o, a;
|
|
1093
|
-
e =
|
|
1094
|
-
function s(
|
|
1095
|
-
return f < 0 && (f += 1), f > 1 && (f -= 1), f < 1 / 6 ?
|
|
1301
|
+
e = O(e, 360), t = O(t, 100), r = O(r, 100);
|
|
1302
|
+
function s(u, d, f) {
|
|
1303
|
+
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;
|
|
1096
1304
|
}
|
|
1097
1305
|
if (t === 0)
|
|
1098
1306
|
n = o = a = r;
|
|
1099
1307
|
else {
|
|
1100
|
-
var
|
|
1101
|
-
n = s(
|
|
1308
|
+
var i = r < 0.5 ? r * (1 + t) : r + t - r * t, l = 2 * r - i;
|
|
1309
|
+
n = s(l, i, e + 1 / 3), o = s(l, i, e), a = s(l, i, e - 1 / 3);
|
|
1102
1310
|
}
|
|
1103
1311
|
return {
|
|
1104
1312
|
r: n * 255,
|
|
@@ -1106,21 +1314,21 @@ function Ar(e, t, r) {
|
|
|
1106
1314
|
b: a * 255
|
|
1107
1315
|
};
|
|
1108
1316
|
}
|
|
1109
|
-
function
|
|
1110
|
-
e =
|
|
1111
|
-
var n = Math.max(e, t, r), o = Math.min(e, t, r), a, s,
|
|
1112
|
-
if (s = n === 0 ? 0 :
|
|
1317
|
+
function it(e, t, r) {
|
|
1318
|
+
e = O(e, 255), t = O(t, 255), r = O(r, 255);
|
|
1319
|
+
var n = Math.max(e, t, r), o = Math.min(e, t, r), a, s, i = n, l = n - o;
|
|
1320
|
+
if (s = n === 0 ? 0 : l / n, n == o)
|
|
1113
1321
|
a = 0;
|
|
1114
1322
|
else {
|
|
1115
1323
|
switch (n) {
|
|
1116
1324
|
case e:
|
|
1117
|
-
a = (t - r) /
|
|
1325
|
+
a = (t - r) / l + (t < r ? 6 : 0);
|
|
1118
1326
|
break;
|
|
1119
1327
|
case t:
|
|
1120
|
-
a = (r - e) /
|
|
1328
|
+
a = (r - e) / l + 2;
|
|
1121
1329
|
break;
|
|
1122
1330
|
case r:
|
|
1123
|
-
a = (e - t) /
|
|
1331
|
+
a = (e - t) / l + 4;
|
|
1124
1332
|
break;
|
|
1125
1333
|
}
|
|
1126
1334
|
a /= 6;
|
|
@@ -1128,133 +1336,133 @@ function et(e, t, r) {
|
|
|
1128
1336
|
return {
|
|
1129
1337
|
h: a,
|
|
1130
1338
|
s,
|
|
1131
|
-
v:
|
|
1339
|
+
v: i
|
|
1132
1340
|
};
|
|
1133
1341
|
}
|
|
1134
|
-
function
|
|
1135
|
-
e =
|
|
1136
|
-
var n = Math.floor(e), o = e - n, a = r * (1 - t), s = r * (1 - o * t),
|
|
1342
|
+
function Dr(e, t, r) {
|
|
1343
|
+
e = O(e, 360) * 6, t = O(t, 100), r = O(r, 100);
|
|
1344
|
+
var n = Math.floor(e), o = e - n, a = r * (1 - t), s = r * (1 - o * t), i = r * (1 - (1 - o) * t), l = n % 6, u = [r, s, a, a, i, r][l], d = [i, r, r, s, a, a][l], f = [a, a, i, r, r, s][l];
|
|
1137
1345
|
return {
|
|
1138
|
-
r:
|
|
1346
|
+
r: u * 255,
|
|
1139
1347
|
g: d * 255,
|
|
1140
1348
|
b: f * 255
|
|
1141
1349
|
};
|
|
1142
1350
|
}
|
|
1143
|
-
function
|
|
1144
|
-
var o = [
|
|
1351
|
+
function ut(e, t, r, n) {
|
|
1352
|
+
var o = [G(Math.round(e).toString(16)), G(Math.round(t).toString(16)), G(Math.round(r).toString(16))];
|
|
1145
1353
|
return n && 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[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join("");
|
|
1146
1354
|
}
|
|
1147
|
-
function
|
|
1148
|
-
var a = [
|
|
1355
|
+
function Lr(e, t, r, n, o) {
|
|
1356
|
+
var a = [G(Math.round(e).toString(16)), G(Math.round(t).toString(16)), G(Math.round(r).toString(16)), G(St(n))];
|
|
1149
1357
|
return o && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) && a[3].charAt(0) == a[3].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
|
|
1150
1358
|
}
|
|
1151
|
-
function
|
|
1152
|
-
var o = [
|
|
1359
|
+
function ct(e, t, r, n) {
|
|
1360
|
+
var o = [G(St(n)), G(Math.round(e).toString(16)), G(Math.round(t).toString(16)), G(Math.round(r).toString(16))];
|
|
1153
1361
|
return o.join("");
|
|
1154
1362
|
}
|
|
1155
|
-
|
|
1156
|
-
return !e || !t ? !1 :
|
|
1363
|
+
y.equals = function(e, t) {
|
|
1364
|
+
return !e || !t ? !1 : y(e).toRgbString() == y(t).toRgbString();
|
|
1157
1365
|
};
|
|
1158
|
-
|
|
1159
|
-
return
|
|
1366
|
+
y.random = function() {
|
|
1367
|
+
return y.fromRatio({
|
|
1160
1368
|
r: Math.random(),
|
|
1161
1369
|
g: Math.random(),
|
|
1162
1370
|
b: Math.random()
|
|
1163
1371
|
});
|
|
1164
1372
|
};
|
|
1165
|
-
function
|
|
1373
|
+
function Wr(e, t) {
|
|
1166
1374
|
t = t === 0 ? 0 : t || 10;
|
|
1167
|
-
var r =
|
|
1168
|
-
return r.s -= t / 100, r.s =
|
|
1375
|
+
var r = y(e).toHsl();
|
|
1376
|
+
return r.s -= t / 100, r.s = We(r.s), y(r);
|
|
1169
1377
|
}
|
|
1170
|
-
function
|
|
1378
|
+
function jr(e, t) {
|
|
1171
1379
|
t = t === 0 ? 0 : t || 10;
|
|
1172
|
-
var r =
|
|
1173
|
-
return r.s += t / 100, r.s =
|
|
1380
|
+
var r = y(e).toHsl();
|
|
1381
|
+
return r.s += t / 100, r.s = We(r.s), y(r);
|
|
1174
1382
|
}
|
|
1175
|
-
function
|
|
1176
|
-
return
|
|
1383
|
+
function Xr(e) {
|
|
1384
|
+
return y(e).desaturate(100);
|
|
1177
1385
|
}
|
|
1178
|
-
function
|
|
1386
|
+
function Ur(e, t) {
|
|
1179
1387
|
t = t === 0 ? 0 : t || 10;
|
|
1180
|
-
var r =
|
|
1181
|
-
return r.l += t / 100, r.l =
|
|
1388
|
+
var r = y(e).toHsl();
|
|
1389
|
+
return r.l += t / 100, r.l = We(r.l), y(r);
|
|
1182
1390
|
}
|
|
1183
|
-
function
|
|
1391
|
+
function Yr(e, t) {
|
|
1184
1392
|
t = t === 0 ? 0 : t || 10;
|
|
1185
|
-
var r =
|
|
1186
|
-
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)))),
|
|
1393
|
+
var r = y(e).toRgb();
|
|
1394
|
+
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)))), y(r);
|
|
1187
1395
|
}
|
|
1188
|
-
function
|
|
1396
|
+
function qr(e, t) {
|
|
1189
1397
|
t = t === 0 ? 0 : t || 10;
|
|
1190
|
-
var r =
|
|
1191
|
-
return r.l -= t / 100, r.l =
|
|
1398
|
+
var r = y(e).toHsl();
|
|
1399
|
+
return r.l -= t / 100, r.l = We(r.l), y(r);
|
|
1192
1400
|
}
|
|
1193
|
-
function
|
|
1194
|
-
var r =
|
|
1195
|
-
return r.h = n < 0 ? 360 + n : n,
|
|
1401
|
+
function Gr(e, t) {
|
|
1402
|
+
var r = y(e).toHsl(), n = (r.h + t) % 360;
|
|
1403
|
+
return r.h = n < 0 ? 360 + n : n, y(r);
|
|
1196
1404
|
}
|
|
1197
|
-
function
|
|
1198
|
-
var t =
|
|
1199
|
-
return t.h = (t.h + 180) % 360,
|
|
1405
|
+
function Jr(e) {
|
|
1406
|
+
var t = y(e).toHsl();
|
|
1407
|
+
return t.h = (t.h + 180) % 360, y(t);
|
|
1200
1408
|
}
|
|
1201
|
-
function
|
|
1409
|
+
function dt(e, t) {
|
|
1202
1410
|
if (isNaN(t) || t <= 0)
|
|
1203
1411
|
throw new Error("Argument to polyad must be a positive number");
|
|
1204
|
-
for (var r =
|
|
1205
|
-
n.push(
|
|
1412
|
+
for (var r = y(e).toHsl(), n = [y(e)], o = 360 / t, a = 1; a < t; a++)
|
|
1413
|
+
n.push(y({
|
|
1206
1414
|
h: (r.h + a * o) % 360,
|
|
1207
1415
|
s: r.s,
|
|
1208
1416
|
l: r.l
|
|
1209
1417
|
}));
|
|
1210
1418
|
return n;
|
|
1211
1419
|
}
|
|
1212
|
-
function
|
|
1213
|
-
var t =
|
|
1214
|
-
return [
|
|
1420
|
+
function Kr(e) {
|
|
1421
|
+
var t = y(e).toHsl(), r = t.h;
|
|
1422
|
+
return [y(e), y({
|
|
1215
1423
|
h: (r + 72) % 360,
|
|
1216
1424
|
s: t.s,
|
|
1217
1425
|
l: t.l
|
|
1218
|
-
}),
|
|
1426
|
+
}), y({
|
|
1219
1427
|
h: (r + 216) % 360,
|
|
1220
1428
|
s: t.s,
|
|
1221
1429
|
l: t.l
|
|
1222
1430
|
})];
|
|
1223
1431
|
}
|
|
1224
|
-
function
|
|
1432
|
+
function Zr(e, t, r) {
|
|
1225
1433
|
t = t || 6, r = r || 30;
|
|
1226
|
-
var n =
|
|
1434
|
+
var n = y(e).toHsl(), o = 360 / r, a = [y(e)];
|
|
1227
1435
|
for (n.h = (n.h - (o * t >> 1) + 720) % 360; --t; )
|
|
1228
|
-
n.h = (n.h + o) % 360, a.push(
|
|
1436
|
+
n.h = (n.h + o) % 360, a.push(y(n));
|
|
1229
1437
|
return a;
|
|
1230
1438
|
}
|
|
1231
|
-
function
|
|
1439
|
+
function Qr(e, t) {
|
|
1232
1440
|
t = t || 6;
|
|
1233
|
-
for (var r =
|
|
1234
|
-
s.push(
|
|
1441
|
+
for (var r = y(e).toHsv(), n = r.h, o = r.s, a = r.v, s = [], i = 1 / t; t--; )
|
|
1442
|
+
s.push(y({
|
|
1235
1443
|
h: n,
|
|
1236
1444
|
s: o,
|
|
1237
1445
|
v: a
|
|
1238
|
-
})), a = (a +
|
|
1446
|
+
})), a = (a + i) % 1;
|
|
1239
1447
|
return s;
|
|
1240
1448
|
}
|
|
1241
|
-
|
|
1449
|
+
y.mix = function(e, t, r) {
|
|
1242
1450
|
r = r === 0 ? 0 : r || 50;
|
|
1243
|
-
var n =
|
|
1451
|
+
var n = y(e).toRgb(), o = y(t).toRgb(), a = r / 100, s = {
|
|
1244
1452
|
r: (o.r - n.r) * a + n.r,
|
|
1245
1453
|
g: (o.g - n.g) * a + n.g,
|
|
1246
1454
|
b: (o.b - n.b) * a + n.b,
|
|
1247
1455
|
a: (o.a - n.a) * a + n.a
|
|
1248
1456
|
};
|
|
1249
|
-
return
|
|
1457
|
+
return y(s);
|
|
1250
1458
|
};
|
|
1251
|
-
|
|
1252
|
-
var r =
|
|
1459
|
+
y.readability = function(e, t) {
|
|
1460
|
+
var r = y(e), n = y(t);
|
|
1253
1461
|
return (Math.max(r.getLuminance(), n.getLuminance()) + 0.05) / (Math.min(r.getLuminance(), n.getLuminance()) + 0.05);
|
|
1254
1462
|
};
|
|
1255
|
-
|
|
1256
|
-
var n =
|
|
1257
|
-
switch (a = !1, o =
|
|
1463
|
+
y.isReadable = function(e, t, r) {
|
|
1464
|
+
var n = y.readability(e, t), o, a;
|
|
1465
|
+
switch (a = !1, o = on(r), o.level + o.size) {
|
|
1258
1466
|
case "AAsmall":
|
|
1259
1467
|
case "AAAlarge":
|
|
1260
1468
|
a = n >= 4.5;
|
|
@@ -1268,17 +1476,17 @@ m.isReadable = function(e, t, r) {
|
|
|
1268
1476
|
}
|
|
1269
1477
|
return a;
|
|
1270
1478
|
};
|
|
1271
|
-
|
|
1272
|
-
var n = null, o = 0, a, s,
|
|
1273
|
-
r = r || {}, s = r.includeFallbackColors,
|
|
1274
|
-
for (var
|
|
1275
|
-
a =
|
|
1276
|
-
return
|
|
1277
|
-
level:
|
|
1278
|
-
size:
|
|
1279
|
-
}) || !s ? n : (r.includeFallbackColors = !1,
|
|
1479
|
+
y.mostReadable = function(e, t, r) {
|
|
1480
|
+
var n = null, o = 0, a, s, i, l;
|
|
1481
|
+
r = r || {}, s = r.includeFallbackColors, i = r.level, l = r.size;
|
|
1482
|
+
for (var u = 0; u < t.length; u++)
|
|
1483
|
+
a = y.readability(e, t[u]), a > o && (o = a, n = y(t[u]));
|
|
1484
|
+
return y.isReadable(e, n, {
|
|
1485
|
+
level: i,
|
|
1486
|
+
size: l
|
|
1487
|
+
}) || !s ? n : (r.includeFallbackColors = !1, y.mostReadable(e, ["#fff", "#000"], r));
|
|
1280
1488
|
};
|
|
1281
|
-
var
|
|
1489
|
+
var Ue = y.names = {
|
|
1282
1490
|
aliceblue: "f0f8ff",
|
|
1283
1491
|
antiquewhite: "faebd7",
|
|
1284
1492
|
aqua: "0ff",
|
|
@@ -1428,46 +1636,46 @@ var Pe = m.names = {
|
|
|
1428
1636
|
whitesmoke: "f5f5f5",
|
|
1429
1637
|
yellow: "ff0",
|
|
1430
1638
|
yellowgreen: "9acd32"
|
|
1431
|
-
},
|
|
1432
|
-
function
|
|
1639
|
+
}, en = y.hexNames = tn(Ue);
|
|
1640
|
+
function tn(e) {
|
|
1433
1641
|
var t = {};
|
|
1434
1642
|
for (var r in e)
|
|
1435
1643
|
e.hasOwnProperty(r) && (t[e[r]] = r);
|
|
1436
1644
|
return t;
|
|
1437
1645
|
}
|
|
1438
|
-
function
|
|
1646
|
+
function kt(e) {
|
|
1439
1647
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
1440
1648
|
}
|
|
1441
|
-
function
|
|
1442
|
-
|
|
1443
|
-
var r =
|
|
1649
|
+
function O(e, t) {
|
|
1650
|
+
rn(e) && (e = "100%");
|
|
1651
|
+
var r = nn(e);
|
|
1444
1652
|
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);
|
|
1445
1653
|
}
|
|
1446
|
-
function
|
|
1654
|
+
function We(e) {
|
|
1447
1655
|
return Math.min(1, Math.max(0, e));
|
|
1448
1656
|
}
|
|
1449
|
-
function
|
|
1657
|
+
function j(e) {
|
|
1450
1658
|
return parseInt(e, 16);
|
|
1451
1659
|
}
|
|
1452
|
-
function
|
|
1660
|
+
function rn(e) {
|
|
1453
1661
|
return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
|
|
1454
1662
|
}
|
|
1455
|
-
function
|
|
1663
|
+
function nn(e) {
|
|
1456
1664
|
return typeof e == "string" && e.indexOf("%") != -1;
|
|
1457
1665
|
}
|
|
1458
|
-
function
|
|
1666
|
+
function G(e) {
|
|
1459
1667
|
return e.length == 1 ? "0" + e : "" + e;
|
|
1460
1668
|
}
|
|
1461
|
-
function
|
|
1669
|
+
function Ae(e) {
|
|
1462
1670
|
return e <= 1 && (e = e * 100 + "%"), e;
|
|
1463
1671
|
}
|
|
1464
|
-
function
|
|
1672
|
+
function St(e) {
|
|
1465
1673
|
return Math.round(parseFloat(e) * 255).toString(16);
|
|
1466
1674
|
}
|
|
1467
|
-
function
|
|
1468
|
-
return
|
|
1675
|
+
function ft(e) {
|
|
1676
|
+
return j(e) / 255;
|
|
1469
1677
|
}
|
|
1470
|
-
var
|
|
1678
|
+
var Y = function() {
|
|
1471
1679
|
var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", r = "(?:" + t + ")|(?:" + e + ")", n = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?", o = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?";
|
|
1472
1680
|
return {
|
|
1473
1681
|
CSS_UNIT: new RegExp(r),
|
|
@@ -1483,14 +1691,14 @@ var D = function() {
|
|
|
1483
1691
|
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1484
1692
|
};
|
|
1485
1693
|
}();
|
|
1486
|
-
function
|
|
1487
|
-
return !!
|
|
1694
|
+
function ne(e) {
|
|
1695
|
+
return !!Y.CSS_UNIT.exec(e);
|
|
1488
1696
|
}
|
|
1489
|
-
function
|
|
1490
|
-
e = e.replace(
|
|
1697
|
+
function an(e) {
|
|
1698
|
+
e = e.replace(Hr, "").replace(Vr, "").toLowerCase();
|
|
1491
1699
|
var t = !1;
|
|
1492
|
-
if (
|
|
1493
|
-
e =
|
|
1700
|
+
if (Ue[e])
|
|
1701
|
+
e = Ue[e], t = !0;
|
|
1494
1702
|
else if (e == "transparent")
|
|
1495
1703
|
return {
|
|
1496
1704
|
r: 0,
|
|
@@ -1500,58 +1708,58 @@ function Gr(e) {
|
|
|
1500
1708
|
format: "name"
|
|
1501
1709
|
};
|
|
1502
1710
|
var r;
|
|
1503
|
-
return (r =
|
|
1711
|
+
return (r = Y.rgb.exec(e)) ? {
|
|
1504
1712
|
r: r[1],
|
|
1505
1713
|
g: r[2],
|
|
1506
1714
|
b: r[3]
|
|
1507
|
-
} : (r =
|
|
1715
|
+
} : (r = Y.rgba.exec(e)) ? {
|
|
1508
1716
|
r: r[1],
|
|
1509
1717
|
g: r[2],
|
|
1510
1718
|
b: r[3],
|
|
1511
1719
|
a: r[4]
|
|
1512
|
-
} : (r =
|
|
1720
|
+
} : (r = Y.hsl.exec(e)) ? {
|
|
1513
1721
|
h: r[1],
|
|
1514
1722
|
s: r[2],
|
|
1515
1723
|
l: r[3]
|
|
1516
|
-
} : (r =
|
|
1724
|
+
} : (r = Y.hsla.exec(e)) ? {
|
|
1517
1725
|
h: r[1],
|
|
1518
1726
|
s: r[2],
|
|
1519
1727
|
l: r[3],
|
|
1520
1728
|
a: r[4]
|
|
1521
|
-
} : (r =
|
|
1729
|
+
} : (r = Y.hsv.exec(e)) ? {
|
|
1522
1730
|
h: r[1],
|
|
1523
1731
|
s: r[2],
|
|
1524
1732
|
v: r[3]
|
|
1525
|
-
} : (r =
|
|
1733
|
+
} : (r = Y.hsva.exec(e)) ? {
|
|
1526
1734
|
h: r[1],
|
|
1527
1735
|
s: r[2],
|
|
1528
1736
|
v: r[3],
|
|
1529
1737
|
a: r[4]
|
|
1530
|
-
} : (r =
|
|
1531
|
-
r:
|
|
1532
|
-
g:
|
|
1533
|
-
b:
|
|
1534
|
-
a:
|
|
1738
|
+
} : (r = Y.hex8.exec(e)) ? {
|
|
1739
|
+
r: j(r[1]),
|
|
1740
|
+
g: j(r[2]),
|
|
1741
|
+
b: j(r[3]),
|
|
1742
|
+
a: ft(r[4]),
|
|
1535
1743
|
format: t ? "name" : "hex8"
|
|
1536
|
-
} : (r =
|
|
1537
|
-
r:
|
|
1538
|
-
g:
|
|
1539
|
-
b:
|
|
1744
|
+
} : (r = Y.hex6.exec(e)) ? {
|
|
1745
|
+
r: j(r[1]),
|
|
1746
|
+
g: j(r[2]),
|
|
1747
|
+
b: j(r[3]),
|
|
1540
1748
|
format: t ? "name" : "hex"
|
|
1541
|
-
} : (r =
|
|
1542
|
-
r:
|
|
1543
|
-
g:
|
|
1544
|
-
b:
|
|
1545
|
-
a:
|
|
1749
|
+
} : (r = Y.hex4.exec(e)) ? {
|
|
1750
|
+
r: j(r[1] + "" + r[1]),
|
|
1751
|
+
g: j(r[2] + "" + r[2]),
|
|
1752
|
+
b: j(r[3] + "" + r[3]),
|
|
1753
|
+
a: ft(r[4] + "" + r[4]),
|
|
1546
1754
|
format: t ? "name" : "hex8"
|
|
1547
|
-
} : (r =
|
|
1548
|
-
r:
|
|
1549
|
-
g:
|
|
1550
|
-
b:
|
|
1755
|
+
} : (r = Y.hex3.exec(e)) ? {
|
|
1756
|
+
r: j(r[1] + "" + r[1]),
|
|
1757
|
+
g: j(r[2] + "" + r[2]),
|
|
1758
|
+
b: j(r[3] + "" + r[3]),
|
|
1551
1759
|
format: t ? "name" : "hex"
|
|
1552
1760
|
} : !1;
|
|
1553
1761
|
}
|
|
1554
|
-
function
|
|
1762
|
+
function on(e) {
|
|
1555
1763
|
var t, r;
|
|
1556
1764
|
return e = e || {
|
|
1557
1765
|
level: "AA",
|
|
@@ -1561,8 +1769,8 @@ function qr(e) {
|
|
|
1561
1769
|
size: r
|
|
1562
1770
|
};
|
|
1563
1771
|
}
|
|
1564
|
-
function
|
|
1565
|
-
if (!
|
|
1772
|
+
function ka() {
|
|
1773
|
+
if (!se)
|
|
1566
1774
|
return g("dark");
|
|
1567
1775
|
const e = g(document.documentElement.dataset.scheme);
|
|
1568
1776
|
return new MutationObserver((r) => {
|
|
@@ -1574,37 +1782,37 @@ function da() {
|
|
|
1574
1782
|
attributeFilter: ["data-scheme"]
|
|
1575
1783
|
}), e;
|
|
1576
1784
|
}
|
|
1577
|
-
function
|
|
1578
|
-
return
|
|
1785
|
+
function Sa() {
|
|
1786
|
+
return we("currentThemeScheme", null);
|
|
1579
1787
|
}
|
|
1580
|
-
function
|
|
1581
|
-
return
|
|
1788
|
+
function $t() {
|
|
1789
|
+
return we("currentThemeData", g(Ot));
|
|
1582
1790
|
}
|
|
1583
|
-
function
|
|
1584
|
-
return
|
|
1791
|
+
function $a() {
|
|
1792
|
+
return we("currentThemeName", g("default"));
|
|
1585
1793
|
}
|
|
1586
|
-
function
|
|
1794
|
+
function sn(e, t, r = {}) {
|
|
1587
1795
|
const n = [0.98, 0.96, 0.9, 0.8, 0.7, 0.6, 0.55, 0.4, 0.36, 0.3, 0.2], o = [1, 0.99, 0.98, 0.9, 0.8, 0.5, 0.2, 0.12, 0.1, 0.08, 0.06];
|
|
1588
|
-
return r.primary === void 0 && (r.primary = n), r.secondary === void 0 && (r.secondary = n), r.tertiary === void 0 && (r.tertiary = n), r.error === void 0 && (r.error = n), r.surface === void 0 && (r.surface = o),
|
|
1796
|
+
return r.primary === void 0 && (r.primary = n), r.secondary === void 0 && (r.secondary = n), r.tertiary === void 0 && (r.tertiary = n), r.error === void 0 && (r.error = n), r.surface === void 0 && (r.surface = o), m(() => ({
|
|
1589
1797
|
name: e,
|
|
1590
1798
|
colors: {
|
|
1591
|
-
primary:
|
|
1592
|
-
secondary:
|
|
1593
|
-
tertiary:
|
|
1594
|
-
error:
|
|
1595
|
-
surface:
|
|
1799
|
+
primary: Me(c(t.primary), r.primary),
|
|
1800
|
+
secondary: Me(c(t.secondary), r.secondary),
|
|
1801
|
+
tertiary: Me(c(t.tertiary), r.tertiary),
|
|
1802
|
+
error: Me(c(t.error), r.error),
|
|
1803
|
+
surface: Me(c(t.surface), r.surface)
|
|
1596
1804
|
}
|
|
1597
1805
|
}));
|
|
1598
1806
|
}
|
|
1599
|
-
function
|
|
1807
|
+
function Mt(e) {
|
|
1600
1808
|
const t = g(e);
|
|
1601
1809
|
return {
|
|
1602
1810
|
...{
|
|
1603
1811
|
...Object.keys(t.value.colors).map((a) => {
|
|
1604
1812
|
const s = a;
|
|
1605
|
-
return t.value.colors[s].reduce((
|
|
1606
|
-
const f =
|
|
1607
|
-
return
|
|
1813
|
+
return t.value.colors[s].reduce((l, u, d) => {
|
|
1814
|
+
const f = y(u).toRgb();
|
|
1815
|
+
return l[`--r-color-${s}-${d}`] = `${f.r} ${f.g} ${f.b}`, l;
|
|
1608
1816
|
}, {});
|
|
1609
1817
|
}).reduce((a, s) => ({
|
|
1610
1818
|
...a,
|
|
@@ -1618,25 +1826,25 @@ function wt(e) {
|
|
|
1618
1826
|
// ...schemeStyles.value,
|
|
1619
1827
|
};
|
|
1620
1828
|
}
|
|
1621
|
-
function
|
|
1829
|
+
function Qe(e) {
|
|
1622
1830
|
const t = g("");
|
|
1623
|
-
return
|
|
1831
|
+
return le(() => {
|
|
1624
1832
|
e.id ? t.value = e.id : t.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
|
|
1625
1833
|
}), t;
|
|
1626
1834
|
}
|
|
1627
|
-
const
|
|
1628
|
-
function
|
|
1629
|
-
const e =
|
|
1630
|
-
return
|
|
1835
|
+
const ln = Symbol("scheme");
|
|
1836
|
+
function un() {
|
|
1837
|
+
const e = _t("scheme", "light");
|
|
1838
|
+
return se && new MutationObserver(() => {
|
|
1631
1839
|
e.value !== document.documentElement.dataset.scheme && (e.value = document.documentElement.dataset.scheme);
|
|
1632
1840
|
}).observe(document.documentElement, {
|
|
1633
1841
|
attributes: !0,
|
|
1634
1842
|
attributeFilter: ["data-scheme"]
|
|
1635
1843
|
}), e;
|
|
1636
1844
|
}
|
|
1637
|
-
const
|
|
1845
|
+
const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R({
|
|
1638
1846
|
__name: "ColorInput",
|
|
1639
|
-
props: /* @__PURE__ */
|
|
1847
|
+
props: /* @__PURE__ */ K({
|
|
1640
1848
|
label: {}
|
|
1641
1849
|
}, {
|
|
1642
1850
|
modelValue: {},
|
|
@@ -1644,53 +1852,53 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1644
1852
|
}),
|
|
1645
1853
|
emits: ["update:modelValue"],
|
|
1646
1854
|
setup(e) {
|
|
1647
|
-
const t =
|
|
1855
|
+
const t = te(e, "modelValue"), r = vt(), n = Qe(r), o = g(null);
|
|
1648
1856
|
return (a, s) => {
|
|
1649
|
-
const
|
|
1650
|
-
return
|
|
1651
|
-
|
|
1652
|
-
id:
|
|
1857
|
+
const i = Br;
|
|
1858
|
+
return b(), w("div", null, [
|
|
1859
|
+
De($("input", {
|
|
1860
|
+
id: c(n),
|
|
1653
1861
|
ref_key: "input",
|
|
1654
1862
|
ref: o,
|
|
1655
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
1863
|
+
"onUpdate:modelValue": s[0] || (s[0] = (l) => t.value = l),
|
|
1656
1864
|
alt: t.value,
|
|
1657
1865
|
type: "color",
|
|
1658
1866
|
class: "pointer-events-none absolute opacity-0"
|
|
1659
|
-
}, null, 8,
|
|
1660
|
-
[
|
|
1867
|
+
}, null, 8, cn), [
|
|
1868
|
+
[Lt, t.value]
|
|
1661
1869
|
]),
|
|
1662
|
-
|
|
1870
|
+
$("label", {
|
|
1663
1871
|
class: "flex items-center gap-2",
|
|
1664
|
-
for:
|
|
1872
|
+
for: c(n)
|
|
1665
1873
|
}, [
|
|
1666
|
-
|
|
1874
|
+
oe(i, {
|
|
1667
1875
|
class: "cursor-pointer",
|
|
1668
1876
|
color: t.value ?? "#222"
|
|
1669
1877
|
}, null, 8, ["color"]),
|
|
1670
|
-
a.label ? (
|
|
1671
|
-
], 8,
|
|
1878
|
+
a.label ? (b(), w("span", fn, ue(a.label), 1)) : B("", !0)
|
|
1879
|
+
], 8, dn)
|
|
1672
1880
|
]);
|
|
1673
1881
|
};
|
|
1674
1882
|
}
|
|
1675
|
-
}),
|
|
1883
|
+
}), pn = ["data-scheme", "data-theme"], hn = /* @__PURE__ */ R({
|
|
1676
1884
|
__name: "ThemeProvider",
|
|
1677
1885
|
props: {
|
|
1678
1886
|
theme: {},
|
|
1679
1887
|
scheme: {}
|
|
1680
1888
|
},
|
|
1681
1889
|
setup(e) {
|
|
1682
|
-
const t = e, r =
|
|
1683
|
-
return (
|
|
1684
|
-
style:
|
|
1685
|
-
"data-scheme":
|
|
1686
|
-
"data-theme":
|
|
1890
|
+
const t = e, r = $t(), n = m(() => Mt(t.theme ? t.theme : r.value)), o = _t("scheme", "light"), a = m(() => t.scheme ? t.scheme : o.value);
|
|
1891
|
+
return (s, i) => (b(), w("div", {
|
|
1892
|
+
style: V([c(n)]),
|
|
1893
|
+
"data-scheme": c(a),
|
|
1894
|
+
"data-theme": c(r).name
|
|
1687
1895
|
}, [
|
|
1688
|
-
|
|
1689
|
-
], 12,
|
|
1896
|
+
z(s.$slots, "default")
|
|
1897
|
+
], 12, pn));
|
|
1690
1898
|
}
|
|
1691
|
-
}),
|
|
1899
|
+
}), At = /* @__PURE__ */ R({
|
|
1692
1900
|
__name: "FullscreenOverlay",
|
|
1693
|
-
props: /* @__PURE__ */
|
|
1901
|
+
props: /* @__PURE__ */ K({
|
|
1694
1902
|
persistent: { type: Boolean, default: !1 },
|
|
1695
1903
|
blur: { type: [String, Boolean], default: !1 },
|
|
1696
1904
|
wrapperClass: {}
|
|
@@ -1700,11 +1908,11 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1700
1908
|
}),
|
|
1701
1909
|
emits: ["update:modelValue"],
|
|
1702
1910
|
setup(e) {
|
|
1703
|
-
const t = e, r =
|
|
1704
|
-
function o(
|
|
1705
|
-
t.persistent ||
|
|
1911
|
+
const t = e, r = te(e, "modelValue"), n = g(null);
|
|
1912
|
+
function o(l) {
|
|
1913
|
+
t.persistent || l.target === n.value && (r.value = !1);
|
|
1706
1914
|
}
|
|
1707
|
-
const a =
|
|
1915
|
+
const a = m(() => {
|
|
1708
1916
|
switch (t.blur) {
|
|
1709
1917
|
case "sm":
|
|
1710
1918
|
return "backdrop-blur-sm";
|
|
@@ -1717,30 +1925,30 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1717
1925
|
return "";
|
|
1718
1926
|
}
|
|
1719
1927
|
}), s = g(0);
|
|
1720
|
-
|
|
1928
|
+
pe(() => {
|
|
1721
1929
|
r.value ? (document.body.style.overflow = "hidden", document.body.style.marginRight = `${s.value}px`) : setTimeout(() => {
|
|
1722
1930
|
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1723
1931
|
}, 300);
|
|
1724
1932
|
}), typeof window < "u" && new ResizeObserver(() => {
|
|
1725
|
-
const
|
|
1726
|
-
|
|
1933
|
+
const u = window.innerWidth - document.body.clientWidth;
|
|
1934
|
+
u !== 0 && (s.value = u);
|
|
1727
1935
|
}).observe(document.body);
|
|
1728
|
-
const
|
|
1729
|
-
return (
|
|
1730
|
-
const d =
|
|
1731
|
-
return
|
|
1732
|
-
|
|
1733
|
-
default:
|
|
1734
|
-
|
|
1936
|
+
const i = $t();
|
|
1937
|
+
return (l, u) => {
|
|
1938
|
+
const d = hn;
|
|
1939
|
+
return b(), X(Wt, { to: "body" }, [
|
|
1940
|
+
oe(d, { theme: c(i) }, {
|
|
1941
|
+
default: J(() => [
|
|
1942
|
+
$("div", {
|
|
1735
1943
|
ref_key: "wrapperRef",
|
|
1736
1944
|
ref: n,
|
|
1737
|
-
class:
|
|
1945
|
+
class: k(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full bg-surface-10/50 transition-all duration-300 md:items-center", [a.value, l.wrapperClass, {
|
|
1738
1946
|
"op0 pointer-events-none": !r.value,
|
|
1739
1947
|
op100: r.value
|
|
1740
1948
|
}]]),
|
|
1741
1949
|
onClick: o
|
|
1742
1950
|
}, [
|
|
1743
|
-
|
|
1951
|
+
z(l.$slots, "default")
|
|
1744
1952
|
], 2)
|
|
1745
1953
|
]),
|
|
1746
1954
|
_: 3
|
|
@@ -1748,9 +1956,9 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1748
1956
|
]);
|
|
1749
1957
|
};
|
|
1750
1958
|
}
|
|
1751
|
-
}),
|
|
1959
|
+
}), mn = { class: "flex justify-end p-4 md:px-6 md:py-4 md:pb-0" }, vn = /* @__PURE__ */ $("i", { class: "i-tabler-x" }, null, -1), bn = { class: "h-full flex flex-col items-center justify-center px-4 md:px-6" }, Aa = /* @__PURE__ */ R({
|
|
1752
1960
|
__name: "Drawer",
|
|
1753
|
-
props: /* @__PURE__ */
|
|
1961
|
+
props: /* @__PURE__ */ K({
|
|
1754
1962
|
persistent: { type: Boolean, default: !1 },
|
|
1755
1963
|
blur: { type: [String, Boolean], default: !1 },
|
|
1756
1964
|
position: { default: "left" }
|
|
@@ -1760,17 +1968,17 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1760
1968
|
}),
|
|
1761
1969
|
emits: ["update:modelValue"],
|
|
1762
1970
|
setup(e) {
|
|
1763
|
-
const t = e, r =
|
|
1971
|
+
const t = e, r = te(e, "modelValue");
|
|
1764
1972
|
return (n, o) => {
|
|
1765
|
-
const a =
|
|
1766
|
-
return
|
|
1973
|
+
const a = xt, s = At;
|
|
1974
|
+
return b(), X(s, {
|
|
1767
1975
|
modelValue: r.value,
|
|
1768
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
1976
|
+
"onUpdate:modelValue": o[1] || (o[1] = (i) => r.value = i),
|
|
1769
1977
|
blur: t.blur,
|
|
1770
1978
|
persistent: t.persistent
|
|
1771
1979
|
}, {
|
|
1772
|
-
default:
|
|
1773
|
-
|
|
1980
|
+
default: J(() => [
|
|
1981
|
+
oe(Ke, {
|
|
1774
1982
|
"enter-from-class": n.position === "left" ? "-translate-x-1/1" : "translate-x-1/1",
|
|
1775
1983
|
"enter-to-class": (n.position === "left", "translate-x-0"),
|
|
1776
1984
|
"leave-from-class": (n.position === "left", "translate-x-0"),
|
|
@@ -1778,28 +1986,28 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1778
1986
|
"enter-active-class": "transition ease-out duration-300",
|
|
1779
1987
|
"leave-active-class": "transition ease-in duration-200"
|
|
1780
1988
|
}, {
|
|
1781
|
-
default:
|
|
1782
|
-
r.value ? (
|
|
1989
|
+
default: J(() => [
|
|
1990
|
+
r.value ? (b(), w("div", {
|
|
1783
1991
|
key: 0,
|
|
1784
|
-
class:
|
|
1992
|
+
class: k(["fixed h-full w-full bg-surface-low md:w-md", n.position === "left" ? "left-0" : "right-0"])
|
|
1785
1993
|
}, [
|
|
1786
|
-
|
|
1787
|
-
|
|
1994
|
+
$("div", mn, [
|
|
1995
|
+
oe(a, {
|
|
1788
1996
|
icon: "",
|
|
1789
1997
|
variant: "transparent",
|
|
1790
1998
|
class: "text-surface-on hover:text-surface-on",
|
|
1791
|
-
onPointerup: o[0] || (o[0] = (
|
|
1999
|
+
onPointerup: o[0] || (o[0] = (i) => r.value = !1)
|
|
1792
2000
|
}, {
|
|
1793
|
-
default:
|
|
1794
|
-
|
|
2001
|
+
default: J(() => [
|
|
2002
|
+
vn
|
|
1795
2003
|
]),
|
|
1796
2004
|
_: 1
|
|
1797
2005
|
})
|
|
1798
2006
|
]),
|
|
1799
|
-
|
|
1800
|
-
|
|
2007
|
+
$("div", bn, [
|
|
2008
|
+
z(n.$slots, "default")
|
|
1801
2009
|
])
|
|
1802
|
-
], 2)) :
|
|
2010
|
+
], 2)) : B("", !0)
|
|
1803
2011
|
]),
|
|
1804
2012
|
_: 3
|
|
1805
2013
|
}, 8, ["enter-from-class", "enter-to-class", "leave-from-class", "leave-to-class"])
|
|
@@ -1808,7 +2016,7 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1808
2016
|
}, 8, ["modelValue", "blur", "persistent"]);
|
|
1809
2017
|
};
|
|
1810
2018
|
}
|
|
1811
|
-
}),
|
|
2019
|
+
}), Ca = /* @__PURE__ */ R({
|
|
1812
2020
|
__name: "Dropzone",
|
|
1813
2021
|
props: {
|
|
1814
2022
|
dashed: { type: Boolean, default: !0 },
|
|
@@ -1816,31 +2024,31 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1816
2024
|
},
|
|
1817
2025
|
emits: ["drop"],
|
|
1818
2026
|
setup(e, { emit: t }) {
|
|
1819
|
-
const r = e, n = t, o = g(), { onChange: a, open: s } =
|
|
2027
|
+
const r = e, n = t, o = g(), { onChange: a, open: s } = $r({
|
|
1820
2028
|
accept: r.accept
|
|
1821
2029
|
});
|
|
1822
|
-
a((
|
|
1823
|
-
|
|
2030
|
+
a((l) => {
|
|
2031
|
+
l ? n("drop", Array.from(l)) : n("drop", null);
|
|
1824
2032
|
});
|
|
1825
|
-
const { isOverDropZone:
|
|
1826
|
-
onDrop: (
|
|
1827
|
-
n("drop",
|
|
2033
|
+
const { isOverDropZone: i } = _r(o, {
|
|
2034
|
+
onDrop: (l) => {
|
|
2035
|
+
n("drop", l);
|
|
1828
2036
|
}
|
|
1829
2037
|
});
|
|
1830
|
-
return (
|
|
2038
|
+
return (l, u) => (b(), w("div", {
|
|
1831
2039
|
ref_key: "dropZoneRef",
|
|
1832
2040
|
ref: o,
|
|
1833
|
-
class:
|
|
1834
|
-
"":
|
|
1835
|
-
" bg-surface-low": !
|
|
1836
|
-
"border-dashed":
|
|
2041
|
+
class: k([{
|
|
2042
|
+
"": c(i),
|
|
2043
|
+
" bg-surface-low": !c(i),
|
|
2044
|
+
"border-dashed": l.dashed
|
|
1837
2045
|
}, "h-full w-full flex cursor-pointer items-center justify-center rounded transition-background-color,border-color"]),
|
|
1838
|
-
onPointerup:
|
|
2046
|
+
onPointerup: u[0] || (u[0] = () => c(s)())
|
|
1839
2047
|
}, [
|
|
1840
|
-
|
|
2048
|
+
z(l.$slots, "default")
|
|
1841
2049
|
], 34));
|
|
1842
2050
|
}
|
|
1843
|
-
}),
|
|
2051
|
+
}), Ta = /* @__PURE__ */ R({
|
|
1844
2052
|
__name: "Image",
|
|
1845
2053
|
props: {
|
|
1846
2054
|
is: { default: "img" },
|
|
@@ -1858,50 +2066,50 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1858
2066
|
function o() {
|
|
1859
2067
|
r.value = !0;
|
|
1860
2068
|
}
|
|
1861
|
-
|
|
2069
|
+
le(() => {
|
|
1862
2070
|
var s;
|
|
1863
2071
|
(s = n.value) != null && s.complete && o();
|
|
1864
2072
|
});
|
|
1865
|
-
const a =
|
|
1866
|
-
return (s,
|
|
1867
|
-
style:
|
|
2073
|
+
const a = re(t);
|
|
2074
|
+
return (s, i) => (b(), w("div", {
|
|
2075
|
+
style: V({
|
|
1868
2076
|
height: s.height,
|
|
1869
2077
|
width: s.width,
|
|
1870
2078
|
maxHeight: s.maxHeight,
|
|
1871
2079
|
maxWidth: s.maxWidth
|
|
1872
2080
|
})
|
|
1873
2081
|
}, [
|
|
1874
|
-
s.src ? (
|
|
2082
|
+
s.src ? (b(), X(Se(s.is), $e({
|
|
1875
2083
|
key: 0,
|
|
1876
2084
|
ref_key: "img",
|
|
1877
2085
|
ref: n,
|
|
1878
2086
|
style: [
|
|
1879
2087
|
s.style,
|
|
1880
|
-
|
|
2088
|
+
c(a).style
|
|
1881
2089
|
],
|
|
1882
2090
|
src: s.src,
|
|
1883
2091
|
class: ["h-full w-full object-cover", [
|
|
1884
2092
|
t.class,
|
|
1885
|
-
|
|
2093
|
+
c(a).class,
|
|
1886
2094
|
{
|
|
1887
|
-
hidden: !
|
|
2095
|
+
hidden: !c(r)
|
|
1888
2096
|
}
|
|
1889
2097
|
]]
|
|
1890
|
-
}, s.$attrs, { onLoad: o }), null, 16, ["style", "src", "class"])) :
|
|
1891
|
-
|
|
2098
|
+
}, s.$attrs, { onLoad: o }), null, 16, ["style", "src", "class"])) : B("", !0),
|
|
2099
|
+
c(r) ? B("", !0) : (b(), w("div", {
|
|
1892
2100
|
key: 1,
|
|
1893
|
-
class:
|
|
2101
|
+
class: k(["h-full w-full animate-pulse border-transparent bg-surface-high object-cover", [
|
|
1894
2102
|
t.class,
|
|
1895
|
-
|
|
2103
|
+
c(a).class
|
|
1896
2104
|
]]),
|
|
1897
|
-
style:
|
|
2105
|
+
style: V([
|
|
1898
2106
|
s.style,
|
|
1899
|
-
|
|
2107
|
+
c(a).style
|
|
1900
2108
|
])
|
|
1901
2109
|
}, null, 6))
|
|
1902
2110
|
], 4));
|
|
1903
2111
|
}
|
|
1904
|
-
}),
|
|
2112
|
+
}), gn = { class: "relative" }, Ra = /* @__PURE__ */ R({
|
|
1905
2113
|
__name: "Indicator",
|
|
1906
2114
|
props: {
|
|
1907
2115
|
color: { default: "primary" },
|
|
@@ -1910,7 +2118,7 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1910
2118
|
ping: { type: Boolean }
|
|
1911
2119
|
},
|
|
1912
2120
|
setup(e) {
|
|
1913
|
-
const t = e, r =
|
|
2121
|
+
const t = e, r = m(() => {
|
|
1914
2122
|
switch (t.size) {
|
|
1915
2123
|
case "sm":
|
|
1916
2124
|
return "w-2 h-2";
|
|
@@ -1921,7 +2129,7 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1921
2129
|
default:
|
|
1922
2130
|
return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `w-${t.size} h-${t.size}` : t.size;
|
|
1923
2131
|
}
|
|
1924
|
-
}), n =
|
|
2132
|
+
}), n = bt(), o = m(() => {
|
|
1925
2133
|
if (!n.label)
|
|
1926
2134
|
return "";
|
|
1927
2135
|
switch (t.size) {
|
|
@@ -1932,7 +2140,7 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1932
2140
|
case "lg":
|
|
1933
2141
|
return "text-lg children:px-2.5";
|
|
1934
2142
|
}
|
|
1935
|
-
}), a =
|
|
2143
|
+
}), a = m(() => {
|
|
1936
2144
|
switch (t.position) {
|
|
1937
2145
|
case "top-left":
|
|
1938
2146
|
return "top-0 left-0 -translate-x-1/2 -translate-y-1/2";
|
|
@@ -1943,50 +2151,50 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1943
2151
|
case "bottom-right":
|
|
1944
2152
|
return "bottom-0 right-0 translate-x-1/2 translate-y-1/2";
|
|
1945
2153
|
}
|
|
1946
|
-
}), s =
|
|
2154
|
+
}), s = m(() => {
|
|
1947
2155
|
switch (t.color) {
|
|
1948
2156
|
case "primary":
|
|
1949
|
-
return "bg-primary-container text-
|
|
2157
|
+
return "bg-primary-container text-white";
|
|
1950
2158
|
case "secondary":
|
|
1951
|
-
return "bg-secondary-container text-
|
|
2159
|
+
return "bg-secondary-container text-white";
|
|
1952
2160
|
case "tertiary":
|
|
1953
|
-
return "bg-tertiary-container text-
|
|
2161
|
+
return "bg-tertiary-container text-white";
|
|
1954
2162
|
case "error":
|
|
1955
|
-
return "bg-error-container text-
|
|
2163
|
+
return "bg-error-container text-white";
|
|
1956
2164
|
}
|
|
1957
2165
|
});
|
|
1958
|
-
return (
|
|
1959
|
-
|
|
1960
|
-
class:
|
|
2166
|
+
return (i, l) => (b(), w("div", gn, [
|
|
2167
|
+
$("div", {
|
|
2168
|
+
class: k([[c(a), c(o)], "absolute z-1"])
|
|
1961
2169
|
}, [
|
|
1962
|
-
t.ping ? (
|
|
2170
|
+
t.ping ? (b(), w("div", {
|
|
1963
2171
|
key: 0,
|
|
1964
|
-
class:
|
|
2172
|
+
class: k(["absolute box-content animate-ping border-2 border-transparent rounded-full", [
|
|
1965
2173
|
{
|
|
1966
|
-
[
|
|
2174
|
+
[c(r)]: !i.$slots.label
|
|
1967
2175
|
},
|
|
1968
|
-
|
|
2176
|
+
c(s)
|
|
1969
2177
|
]])
|
|
1970
2178
|
}, [
|
|
1971
|
-
|
|
1972
|
-
], 2)) :
|
|
1973
|
-
|
|
1974
|
-
class:
|
|
2179
|
+
i.$slots.label ? z(i.$slots, "label", { key: 0 }) : B("", !0)
|
|
2180
|
+
], 2)) : B("", !0),
|
|
2181
|
+
$("div", {
|
|
2182
|
+
class: k(["top-0 box-content border-2 border-surface-low rounded-full", [
|
|
1975
2183
|
{
|
|
1976
|
-
[
|
|
2184
|
+
[c(r)]: !i.$slots.label
|
|
1977
2185
|
},
|
|
1978
|
-
|
|
2186
|
+
c(s)
|
|
1979
2187
|
]])
|
|
1980
2188
|
}, [
|
|
1981
|
-
|
|
2189
|
+
i.$slots.label ? z(i.$slots, "label", { key: 0 }) : B("", !0)
|
|
1982
2190
|
], 2)
|
|
1983
2191
|
], 2),
|
|
1984
|
-
|
|
2192
|
+
z(i.$slots, "default")
|
|
1985
2193
|
]));
|
|
1986
2194
|
}
|
|
1987
|
-
}),
|
|
2195
|
+
}), Ea = /* @__PURE__ */ R({
|
|
1988
2196
|
__name: "Modal",
|
|
1989
|
-
props: /* @__PURE__ */
|
|
2197
|
+
props: /* @__PURE__ */ K({
|
|
1990
2198
|
persistent: { type: Boolean, default: !1 },
|
|
1991
2199
|
blur: { type: [String, Boolean], default: !1 }
|
|
1992
2200
|
}, {
|
|
@@ -1995,18 +2203,18 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
1995
2203
|
}),
|
|
1996
2204
|
emits: ["update:modelValue"],
|
|
1997
2205
|
setup(e) {
|
|
1998
|
-
const t = e, r =
|
|
2206
|
+
const t = e, r = te(e, "modelValue");
|
|
1999
2207
|
return (n, o) => {
|
|
2000
|
-
const a =
|
|
2001
|
-
return
|
|
2208
|
+
const a = At;
|
|
2209
|
+
return b(), X(a, {
|
|
2002
2210
|
modelValue: r.value,
|
|
2003
2211
|
"onUpdate:modelValue": o[0] || (o[0] = (s) => r.value = s),
|
|
2004
2212
|
blur: t.blur,
|
|
2005
2213
|
persistent: t.persistent,
|
|
2006
2214
|
"wrapper-class": "flex items-end justify-center"
|
|
2007
2215
|
}, {
|
|
2008
|
-
default:
|
|
2009
|
-
|
|
2216
|
+
default: J(() => [
|
|
2217
|
+
oe(Ke, {
|
|
2010
2218
|
"enter-from-class": "translate-y-1/2",
|
|
2011
2219
|
"enter-to-class": "translate-y-0",
|
|
2012
2220
|
"leave-from-class": "translate-y-0",
|
|
@@ -2014,8 +2222,8 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
2014
2222
|
"enter-active-class": "transition ease-out duration-300",
|
|
2015
2223
|
"leave-active-class": "transition ease-in duration-200"
|
|
2016
2224
|
}, {
|
|
2017
|
-
default:
|
|
2018
|
-
r.value ?
|
|
2225
|
+
default: J(() => [
|
|
2226
|
+
r.value ? z(n.$slots, "default", { key: 0 }) : B("", !0)
|
|
2019
2227
|
]),
|
|
2020
2228
|
_: 3
|
|
2021
2229
|
})
|
|
@@ -2024,13 +2232,13 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
2024
2232
|
}, 8, ["modelValue", "blur", "persistent"]);
|
|
2025
2233
|
};
|
|
2026
2234
|
}
|
|
2027
|
-
}),
|
|
2235
|
+
}), yn = {
|
|
2028
2236
|
key: 0,
|
|
2029
2237
|
class: "h-container w-container i-tabler-loader-2 shrink-0 animate-spin"
|
|
2030
|
-
},
|
|
2238
|
+
}, wn = { key: 1 }, _n = { class: "grow-1" }, xn = {
|
|
2031
2239
|
key: 2,
|
|
2032
2240
|
class: "text-sm text-surface-on-low"
|
|
2033
|
-
},
|
|
2241
|
+
}, kn = /* @__PURE__ */ $("i", { class: "i-tabler-x" }, null, -1), Sn = /* @__PURE__ */ R({
|
|
2034
2242
|
__name: "Notification",
|
|
2035
2243
|
props: {
|
|
2036
2244
|
title: {},
|
|
@@ -2045,7 +2253,7 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
2045
2253
|
},
|
|
2046
2254
|
emits: ["close"],
|
|
2047
2255
|
setup(e) {
|
|
2048
|
-
const t = e, r =
|
|
2256
|
+
const t = e, r = re(t), n = m(() => {
|
|
2049
2257
|
switch (t.color) {
|
|
2050
2258
|
case "secondary":
|
|
2051
2259
|
return "bg-secondary-container";
|
|
@@ -2056,7 +2264,7 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
2056
2264
|
default:
|
|
2057
2265
|
return "bg-primary-container";
|
|
2058
2266
|
}
|
|
2059
|
-
}), o =
|
|
2267
|
+
}), o = m(() => {
|
|
2060
2268
|
switch (t.color) {
|
|
2061
2269
|
case "secondary":
|
|
2062
2270
|
return "text-secondary-on";
|
|
@@ -2069,114 +2277,114 @@ const Zr = ["id", "alt"], Kr = ["for"], Qr = { key: 0 }, ha = /* @__PURE__ */ S(
|
|
|
2069
2277
|
}
|
|
2070
2278
|
});
|
|
2071
2279
|
return (a, s) => {
|
|
2072
|
-
const
|
|
2073
|
-
return
|
|
2074
|
-
class:
|
|
2280
|
+
const i = xt;
|
|
2281
|
+
return b(), w("div", {
|
|
2282
|
+
class: k(["relative min-h-16 min-w-80 w-full flex items-center gap-2 container-low p-3", [
|
|
2075
2283
|
{ "border-0": !a.withBorder },
|
|
2076
|
-
|
|
2284
|
+
c(r).class,
|
|
2077
2285
|
{
|
|
2078
2286
|
"max-w-100": !a.block,
|
|
2079
2287
|
"w-full": a.block
|
|
2080
2288
|
}
|
|
2081
2289
|
]]),
|
|
2082
|
-
style:
|
|
2290
|
+
style: V(c(r).style)
|
|
2083
2291
|
}, [
|
|
2084
|
-
a.icon ? (
|
|
2292
|
+
a.icon ? (b(), w("div", {
|
|
2085
2293
|
key: 0,
|
|
2086
|
-
class:
|
|
2294
|
+
class: k(["leading-0", c(o)])
|
|
2087
2295
|
}, [
|
|
2088
|
-
a.loading ? (
|
|
2296
|
+
a.loading ? (b(), w("i", yn)) : (b(), w("i", {
|
|
2089
2297
|
key: 1,
|
|
2090
|
-
class:
|
|
2298
|
+
class: k(["h-container w-container shrink-0", a.icon])
|
|
2091
2299
|
}, null, 2))
|
|
2092
|
-
], 2)) : (
|
|
2093
|
-
|
|
2094
|
-
class:
|
|
2300
|
+
], 2)) : (b(), w("div", wn, [
|
|
2301
|
+
$("div", {
|
|
2302
|
+
class: k(["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full", [{
|
|
2095
2303
|
"animate-pulse": a.loading
|
|
2096
|
-
},
|
|
2304
|
+
}, c(n)]])
|
|
2097
2305
|
}, null, 2)
|
|
2098
2306
|
])),
|
|
2099
|
-
|
|
2100
|
-
a.title ? (
|
|
2307
|
+
$("div", _n, [
|
|
2308
|
+
a.title ? (b(), w("div", {
|
|
2101
2309
|
key: 0,
|
|
2102
|
-
class:
|
|
2103
|
-
},
|
|
2104
|
-
a.$slots.message ?
|
|
2310
|
+
class: k([c(o), "text-base"])
|
|
2311
|
+
}, ue(a.title), 3)) : B("", !0),
|
|
2312
|
+
a.$slots.message ? z(a.$slots, "message", { key: 1 }) : a.message ? (b(), w("div", xn, ue(a.message), 1)) : B("", !0)
|
|
2105
2313
|
]),
|
|
2106
|
-
a.closeable ? (
|
|
2314
|
+
a.closeable ? (b(), X(i, {
|
|
2107
2315
|
key: 2,
|
|
2108
2316
|
icon: "",
|
|
2109
2317
|
variant: "transparent",
|
|
2110
2318
|
class: "text-surface-on hover:text-surface-on",
|
|
2111
|
-
onClick: s[0] || (s[0] = (
|
|
2319
|
+
onClick: s[0] || (s[0] = (l) => a.$emit("close"))
|
|
2112
2320
|
}, {
|
|
2113
|
-
default:
|
|
2114
|
-
|
|
2321
|
+
default: J(() => [
|
|
2322
|
+
kn
|
|
2115
2323
|
]),
|
|
2116
2324
|
_: 1
|
|
2117
|
-
})) :
|
|
2325
|
+
})) : B("", !0)
|
|
2118
2326
|
], 6);
|
|
2119
2327
|
};
|
|
2120
2328
|
}
|
|
2121
|
-
}),
|
|
2122
|
-
let
|
|
2123
|
-
const
|
|
2124
|
-
const t =
|
|
2125
|
-
t && t.forEach((r) =>
|
|
2126
|
-
},
|
|
2329
|
+
}), Ct = /* @__PURE__ */ new Set(), W = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakSet();
|
|
2330
|
+
let ce, et = 0, tt = 0;
|
|
2331
|
+
const ae = "__aa_tgt", Ee = "__aa_del", Pe = "__aa_new", Mn = (e) => {
|
|
2332
|
+
const t = En(e);
|
|
2333
|
+
t && t.forEach((r) => zn(r));
|
|
2334
|
+
}, An = (e) => {
|
|
2127
2335
|
e.forEach((t) => {
|
|
2128
|
-
t.target ===
|
|
2336
|
+
t.target === ce && Tn(), W.has(t.target) && be(t.target);
|
|
2129
2337
|
});
|
|
2130
2338
|
};
|
|
2131
|
-
function
|
|
2132
|
-
const t =
|
|
2339
|
+
function Cn(e) {
|
|
2340
|
+
const t = Ye.get(e);
|
|
2133
2341
|
t == null || t.disconnect();
|
|
2134
|
-
let r =
|
|
2342
|
+
let r = W.get(e), n = 0;
|
|
2135
2343
|
const o = 5;
|
|
2136
|
-
r || (r =
|
|
2137
|
-
const { offsetWidth: a, offsetHeight: s } =
|
|
2344
|
+
r || (r = ke(e), W.set(e, r));
|
|
2345
|
+
const { offsetWidth: a, offsetHeight: s } = ce, l = [
|
|
2138
2346
|
r.top - o,
|
|
2139
2347
|
a - (r.left + o + r.width),
|
|
2140
2348
|
s - (r.top + o + r.height),
|
|
2141
2349
|
r.left - o
|
|
2142
|
-
].map((d) => `${-1 * Math.floor(d)}px`).join(" "),
|
|
2143
|
-
++n > 1 &&
|
|
2350
|
+
].map((d) => `${-1 * Math.floor(d)}px`).join(" "), u = new IntersectionObserver(() => {
|
|
2351
|
+
++n > 1 && be(e);
|
|
2144
2352
|
}, {
|
|
2145
|
-
root:
|
|
2353
|
+
root: ce,
|
|
2146
2354
|
threshold: 1,
|
|
2147
|
-
rootMargin:
|
|
2355
|
+
rootMargin: l
|
|
2148
2356
|
});
|
|
2149
|
-
|
|
2357
|
+
u.observe(e), Ye.set(e, u);
|
|
2150
2358
|
}
|
|
2151
|
-
function
|
|
2152
|
-
clearTimeout(
|
|
2153
|
-
const t =
|
|
2154
|
-
|
|
2155
|
-
const n =
|
|
2359
|
+
function be(e) {
|
|
2360
|
+
clearTimeout(Ie.get(e));
|
|
2361
|
+
const t = je(e), r = ze(t) ? 500 : t.duration;
|
|
2362
|
+
Ie.set(e, setTimeout(async () => {
|
|
2363
|
+
const n = me.get(e);
|
|
2156
2364
|
try {
|
|
2157
|
-
await (n == null ? void 0 : n.finished),
|
|
2365
|
+
await (n == null ? void 0 : n.finished), W.set(e, ke(e)), Cn(e);
|
|
2158
2366
|
} catch {
|
|
2159
2367
|
}
|
|
2160
2368
|
}, r));
|
|
2161
2369
|
}
|
|
2162
|
-
function
|
|
2163
|
-
clearTimeout(
|
|
2164
|
-
|
|
2370
|
+
function Tn() {
|
|
2371
|
+
clearTimeout(Ie.get(ce)), Ie.set(ce, setTimeout(() => {
|
|
2372
|
+
Ct.forEach((e) => zt(e, (t) => Tt(() => be(t))));
|
|
2165
2373
|
}, 100));
|
|
2166
2374
|
}
|
|
2167
|
-
function
|
|
2375
|
+
function Rn(e) {
|
|
2168
2376
|
setTimeout(() => {
|
|
2169
|
-
|
|
2377
|
+
$n.set(e, setInterval(() => Tt(be.bind(null, e)), 2e3));
|
|
2170
2378
|
}, Math.round(2e3 * Math.random()));
|
|
2171
2379
|
}
|
|
2172
|
-
function
|
|
2380
|
+
function Tt(e) {
|
|
2173
2381
|
typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
|
|
2174
2382
|
}
|
|
2175
|
-
let
|
|
2176
|
-
typeof window < "u" && (
|
|
2177
|
-
|
|
2178
|
-
}),
|
|
2179
|
-
function
|
|
2383
|
+
let qe, ye;
|
|
2384
|
+
typeof window < "u" && (ce = document.documentElement, qe = new MutationObserver(Mn), ye = new ResizeObserver(An), window.addEventListener("scroll", () => {
|
|
2385
|
+
tt = window.scrollY, et = window.scrollX;
|
|
2386
|
+
}), ye.observe(ce));
|
|
2387
|
+
function En(e) {
|
|
2180
2388
|
return e.reduce((n, o) => [
|
|
2181
2389
|
...n,
|
|
2182
2390
|
...Array.from(o.addedNodes),
|
|
@@ -2185,23 +2393,23 @@ function yn(e) {
|
|
|
2185
2393
|
if (n === !1)
|
|
2186
2394
|
return !1;
|
|
2187
2395
|
if (o.target instanceof Element) {
|
|
2188
|
-
if (
|
|
2396
|
+
if (Xe(o.target), !n.has(o.target)) {
|
|
2189
2397
|
n.add(o.target);
|
|
2190
2398
|
for (let a = 0; a < o.target.children.length; a++) {
|
|
2191
2399
|
const s = o.target.children.item(a);
|
|
2192
2400
|
if (s) {
|
|
2193
|
-
if (
|
|
2401
|
+
if (Ee in s)
|
|
2194
2402
|
return !1;
|
|
2195
|
-
|
|
2403
|
+
Xe(o.target, s), n.add(s);
|
|
2196
2404
|
}
|
|
2197
2405
|
}
|
|
2198
2406
|
}
|
|
2199
2407
|
if (o.removedNodes.length)
|
|
2200
2408
|
for (let a = 0; a < o.removedNodes.length; a++) {
|
|
2201
2409
|
const s = o.removedNodes[a];
|
|
2202
|
-
if (
|
|
2410
|
+
if (Ee in s)
|
|
2203
2411
|
return !1;
|
|
2204
|
-
s instanceof Element && (n.add(s),
|
|
2412
|
+
s instanceof Element && (n.add(s), Xe(o.target, s), _e.set(s, [
|
|
2205
2413
|
o.previousSibling,
|
|
2206
2414
|
o.nextSibling
|
|
2207
2415
|
]));
|
|
@@ -2210,18 +2418,18 @@ function yn(e) {
|
|
|
2210
2418
|
return n;
|
|
2211
2419
|
}, /* @__PURE__ */ new Set());
|
|
2212
2420
|
}
|
|
2213
|
-
function
|
|
2214
|
-
!t && !(
|
|
2421
|
+
function Xe(e, t) {
|
|
2422
|
+
!t && !(ae in e) ? Object.defineProperty(e, ae, { value: e }) : t && !(ae in t) && Object.defineProperty(t, ae, { value: e });
|
|
2215
2423
|
}
|
|
2216
|
-
function
|
|
2424
|
+
function zn(e) {
|
|
2217
2425
|
var t;
|
|
2218
|
-
const r = e.isConnected, n =
|
|
2219
|
-
r &&
|
|
2426
|
+
const r = e.isConnected, n = W.has(e);
|
|
2427
|
+
r && _e.has(e) && _e.delete(e), me.has(e) && ((t = me.get(e)) === null || t === void 0 || t.cancel()), Pe in e ? pt(e) : n && r ? Nn(e) : n && !r ? Bn(e) : pt(e);
|
|
2220
2428
|
}
|
|
2221
|
-
function
|
|
2429
|
+
function Q(e) {
|
|
2222
2430
|
return Number(e.replace(/[^0-9.\-]/g, ""));
|
|
2223
2431
|
}
|
|
2224
|
-
function
|
|
2432
|
+
function On(e) {
|
|
2225
2433
|
let t = e.parentElement;
|
|
2226
2434
|
for (; t; ) {
|
|
2227
2435
|
if (t.scrollLeft || t.scrollTop)
|
|
@@ -2230,8 +2438,8 @@ function _n(e) {
|
|
|
2230
2438
|
}
|
|
2231
2439
|
return { x: 0, y: 0 };
|
|
2232
2440
|
}
|
|
2233
|
-
function
|
|
2234
|
-
const t = e.getBoundingClientRect(), { x: r, y: n } =
|
|
2441
|
+
function ke(e) {
|
|
2442
|
+
const t = e.getBoundingClientRect(), { x: r, y: n } = On(e);
|
|
2235
2443
|
return {
|
|
2236
2444
|
top: t.top + n,
|
|
2237
2445
|
left: t.left + r,
|
|
@@ -2239,69 +2447,69 @@ function ve(e) {
|
|
|
2239
2447
|
height: t.height
|
|
2240
2448
|
};
|
|
2241
2449
|
}
|
|
2242
|
-
function
|
|
2450
|
+
function Rt(e, t, r) {
|
|
2243
2451
|
let n = t.width, o = t.height, a = r.width, s = r.height;
|
|
2244
|
-
const
|
|
2245
|
-
if (
|
|
2246
|
-
const
|
|
2247
|
-
n -= d, a -= d, o -=
|
|
2452
|
+
const i = getComputedStyle(e);
|
|
2453
|
+
if (i.getPropertyValue("box-sizing") === "content-box") {
|
|
2454
|
+
const u = Q(i.paddingTop) + Q(i.paddingBottom) + Q(i.borderTopWidth) + Q(i.borderBottomWidth), d = Q(i.paddingLeft) + Q(i.paddingRight) + Q(i.borderRightWidth) + Q(i.borderLeftWidth);
|
|
2455
|
+
n -= d, a -= d, o -= u, s -= u;
|
|
2248
2456
|
}
|
|
2249
2457
|
return [n, a, o, s].map(Math.round);
|
|
2250
2458
|
}
|
|
2251
|
-
function
|
|
2252
|
-
return
|
|
2459
|
+
function je(e) {
|
|
2460
|
+
return ae in e && xe.has(e[ae]) ? xe.get(e[ae]) : { duration: 250, easing: "ease-in-out" };
|
|
2253
2461
|
}
|
|
2254
|
-
function
|
|
2255
|
-
if (
|
|
2256
|
-
return e[
|
|
2462
|
+
function Et(e) {
|
|
2463
|
+
if (ae in e)
|
|
2464
|
+
return e[ae];
|
|
2257
2465
|
}
|
|
2258
|
-
function
|
|
2259
|
-
const t =
|
|
2260
|
-
return t ?
|
|
2466
|
+
function rt(e) {
|
|
2467
|
+
const t = Et(e);
|
|
2468
|
+
return t ? Ce.has(t) : !1;
|
|
2261
2469
|
}
|
|
2262
|
-
function
|
|
2263
|
-
t.forEach((r) => r(e,
|
|
2470
|
+
function zt(e, ...t) {
|
|
2471
|
+
t.forEach((r) => r(e, xe.has(e)));
|
|
2264
2472
|
for (let r = 0; r < e.children.length; r++) {
|
|
2265
2473
|
const n = e.children.item(r);
|
|
2266
|
-
n && t.forEach((o) => o(n,
|
|
2474
|
+
n && t.forEach((o) => o(n, xe.has(n)));
|
|
2267
2475
|
}
|
|
2268
2476
|
}
|
|
2269
|
-
function
|
|
2477
|
+
function nt(e) {
|
|
2270
2478
|
return Array.isArray(e) ? e : [e];
|
|
2271
2479
|
}
|
|
2272
|
-
function
|
|
2480
|
+
function ze(e) {
|
|
2273
2481
|
return typeof e == "function";
|
|
2274
2482
|
}
|
|
2275
|
-
function
|
|
2276
|
-
const t =
|
|
2277
|
-
if (!
|
|
2278
|
-
return
|
|
2483
|
+
function Nn(e) {
|
|
2484
|
+
const t = W.get(e), r = ke(e);
|
|
2485
|
+
if (!rt(e))
|
|
2486
|
+
return W.set(e, r);
|
|
2279
2487
|
let n;
|
|
2280
2488
|
if (!t)
|
|
2281
2489
|
return;
|
|
2282
|
-
const o =
|
|
2490
|
+
const o = je(e);
|
|
2283
2491
|
if (typeof o != "function") {
|
|
2284
|
-
const a = t.left - r.left, s = t.top - r.top, [
|
|
2492
|
+
const a = t.left - r.left, s = t.top - r.top, [i, l, u, d] = Rt(e, t, r), f = {
|
|
2285
2493
|
transform: `translate(${a}px, ${s}px)`
|
|
2286
|
-
},
|
|
2494
|
+
}, p = {
|
|
2287
2495
|
transform: "translate(0, 0)"
|
|
2288
2496
|
};
|
|
2289
|
-
|
|
2497
|
+
i !== l && (f.width = `${i}px`, p.width = `${l}px`), u !== d && (f.height = `${u}px`, p.height = `${d}px`), n = e.animate([f, p], {
|
|
2290
2498
|
duration: o.duration,
|
|
2291
2499
|
easing: o.easing
|
|
2292
2500
|
});
|
|
2293
2501
|
} else {
|
|
2294
|
-
const [a] =
|
|
2502
|
+
const [a] = nt(o(e, "remain", t, r));
|
|
2295
2503
|
n = new Animation(a), n.play();
|
|
2296
2504
|
}
|
|
2297
|
-
|
|
2298
|
-
}
|
|
2299
|
-
function
|
|
2300
|
-
|
|
2301
|
-
const t =
|
|
2302
|
-
|
|
2303
|
-
const r =
|
|
2304
|
-
if (!
|
|
2505
|
+
me.set(e, n), W.set(e, r), n.addEventListener("finish", be.bind(null, e));
|
|
2506
|
+
}
|
|
2507
|
+
function pt(e) {
|
|
2508
|
+
Pe in e && delete e[Pe];
|
|
2509
|
+
const t = ke(e);
|
|
2510
|
+
W.set(e, t);
|
|
2511
|
+
const r = je(e);
|
|
2512
|
+
if (!rt(e))
|
|
2305
2513
|
return;
|
|
2306
2514
|
let n;
|
|
2307
2515
|
if (typeof r != "function")
|
|
@@ -2314,43 +2522,43 @@ function ot(e) {
|
|
|
2314
2522
|
easing: "ease-in"
|
|
2315
2523
|
});
|
|
2316
2524
|
else {
|
|
2317
|
-
const [o] =
|
|
2525
|
+
const [o] = nt(r(e, "add", t));
|
|
2318
2526
|
n = new Animation(o), n.play();
|
|
2319
2527
|
}
|
|
2320
|
-
|
|
2528
|
+
me.set(e, n), n.addEventListener("finish", be.bind(null, e));
|
|
2321
2529
|
}
|
|
2322
|
-
function
|
|
2530
|
+
function ht(e, t) {
|
|
2323
2531
|
var r;
|
|
2324
|
-
e.remove(),
|
|
2325
|
-
if (
|
|
2532
|
+
e.remove(), W.delete(e), _e.delete(e), me.delete(e), (r = Ye.get(e)) === null || r === void 0 || r.disconnect(), setTimeout(() => {
|
|
2533
|
+
if (Ee in e && delete e[Ee], Object.defineProperty(e, Pe, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
|
|
2326
2534
|
for (const n in t)
|
|
2327
2535
|
e.style[n] = "";
|
|
2328
2536
|
}, 0);
|
|
2329
2537
|
}
|
|
2330
|
-
function
|
|
2538
|
+
function Bn(e) {
|
|
2331
2539
|
var t;
|
|
2332
|
-
if (!
|
|
2540
|
+
if (!_e.has(e) || !W.has(e))
|
|
2333
2541
|
return;
|
|
2334
|
-
const [r, n] =
|
|
2335
|
-
Object.defineProperty(e,
|
|
2542
|
+
const [r, n] = _e.get(e);
|
|
2543
|
+
Object.defineProperty(e, Ee, { value: !0, configurable: !0 });
|
|
2336
2544
|
const o = window.scrollX, a = window.scrollY;
|
|
2337
|
-
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t =
|
|
2338
|
-
return
|
|
2339
|
-
const [s,
|
|
2340
|
-
(o !==
|
|
2341
|
-
let
|
|
2545
|
+
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t = Et(e)) === null || t === void 0 || t.appendChild(e), !rt(e))
|
|
2546
|
+
return ht(e);
|
|
2547
|
+
const [s, i, l, u] = Vn(e), d = je(e), f = W.get(e);
|
|
2548
|
+
(o !== et || a !== tt) && Hn(e, o, a, d);
|
|
2549
|
+
let p, h = {
|
|
2342
2550
|
position: "absolute",
|
|
2343
2551
|
top: `${s}px`,
|
|
2344
|
-
left: `${
|
|
2345
|
-
width: `${
|
|
2346
|
-
height: `${
|
|
2552
|
+
left: `${i}px`,
|
|
2553
|
+
width: `${l}px`,
|
|
2554
|
+
height: `${u}px`,
|
|
2347
2555
|
margin: "0",
|
|
2348
2556
|
pointerEvents: "none",
|
|
2349
2557
|
transformOrigin: "center",
|
|
2350
2558
|
zIndex: "100"
|
|
2351
2559
|
};
|
|
2352
|
-
if (
|
|
2353
|
-
Object.assign(e.style,
|
|
2560
|
+
if (!ze(d))
|
|
2561
|
+
Object.assign(e.style, h), p = e.animate([
|
|
2354
2562
|
{
|
|
2355
2563
|
transform: "scale(1)",
|
|
2356
2564
|
opacity: 1
|
|
@@ -2361,66 +2569,66 @@ function kn(e) {
|
|
|
2361
2569
|
}
|
|
2362
2570
|
], { duration: d.duration, easing: "ease-out" });
|
|
2363
2571
|
else {
|
|
2364
|
-
const [
|
|
2365
|
-
(
|
|
2572
|
+
const [v, M] = nt(d(e, "remove", f));
|
|
2573
|
+
(M == null ? void 0 : M.styleReset) !== !1 && (h = (M == null ? void 0 : M.styleReset) || h, Object.assign(e.style, h)), p = new Animation(v), p.play();
|
|
2366
2574
|
}
|
|
2367
|
-
|
|
2575
|
+
me.set(e, p), p.addEventListener("finish", ht.bind(null, e, h));
|
|
2368
2576
|
}
|
|
2369
|
-
function
|
|
2370
|
-
const o =
|
|
2371
|
-
if (getComputedStyle(
|
|
2577
|
+
function Hn(e, t, r, n) {
|
|
2578
|
+
const o = et - t, a = tt - r, s = document.documentElement.style.scrollBehavior;
|
|
2579
|
+
if (getComputedStyle(ce).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + o, window.scrollY + a), !e.parentElement)
|
|
2372
2580
|
return;
|
|
2373
|
-
const
|
|
2374
|
-
let
|
|
2581
|
+
const l = e.parentElement;
|
|
2582
|
+
let u = l.clientHeight, d = l.clientWidth;
|
|
2375
2583
|
const f = performance.now();
|
|
2376
|
-
function
|
|
2584
|
+
function p() {
|
|
2377
2585
|
requestAnimationFrame(() => {
|
|
2378
|
-
if (
|
|
2379
|
-
const
|
|
2586
|
+
if (!ze(n)) {
|
|
2587
|
+
const h = u - l.clientHeight, v = d - l.clientWidth;
|
|
2380
2588
|
f + n.duration > performance.now() ? (window.scrollTo({
|
|
2381
|
-
left: window.scrollX -
|
|
2382
|
-
top: window.scrollY -
|
|
2383
|
-
}),
|
|
2589
|
+
left: window.scrollX - v,
|
|
2590
|
+
top: window.scrollY - h
|
|
2591
|
+
}), u = l.clientHeight, d = l.clientWidth, p()) : document.documentElement.style.scrollBehavior = s;
|
|
2384
2592
|
}
|
|
2385
2593
|
});
|
|
2386
2594
|
}
|
|
2387
|
-
|
|
2595
|
+
p();
|
|
2388
2596
|
}
|
|
2389
|
-
function
|
|
2390
|
-
const t =
|
|
2597
|
+
function Vn(e) {
|
|
2598
|
+
const t = W.get(e), [r, , n] = Rt(e, t, ke(e));
|
|
2391
2599
|
let o = e.parentElement;
|
|
2392
2600
|
for (; o && (getComputedStyle(o).position === "static" || o instanceof HTMLBodyElement); )
|
|
2393
2601
|
o = o.parentElement;
|
|
2394
2602
|
o || (o = document.body);
|
|
2395
|
-
const a = getComputedStyle(o), s =
|
|
2396
|
-
return [
|
|
2603
|
+
const a = getComputedStyle(o), s = W.get(o) || ke(o), i = Math.round(t.top - s.top) - Q(a.borderTopWidth), l = Math.round(t.left - s.left) - Q(a.borderLeftWidth);
|
|
2604
|
+
return [i, l, r, n];
|
|
2397
2605
|
}
|
|
2398
|
-
function
|
|
2399
|
-
return
|
|
2606
|
+
function In(e, t = {}) {
|
|
2607
|
+
return qe && ye && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !ze(t) && !t.disrespectUserMotionPreference || (Ce.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), zt(e, be, Rn, (o) => ye == null ? void 0 : ye.observe(o)), ze(t) ? xe.set(e, t) : xe.set(e, { duration: 250, easing: "ease-in-out", ...t }), qe.observe(e, { childList: !0 }), Ct.add(e))), Object.freeze({
|
|
2400
2608
|
parent: e,
|
|
2401
2609
|
enable: () => {
|
|
2402
|
-
|
|
2610
|
+
Ce.add(e);
|
|
2403
2611
|
},
|
|
2404
2612
|
disable: () => {
|
|
2405
|
-
|
|
2613
|
+
Ce.delete(e);
|
|
2406
2614
|
},
|
|
2407
|
-
isEnabled: () =>
|
|
2615
|
+
isEnabled: () => Ce.has(e)
|
|
2408
2616
|
});
|
|
2409
2617
|
}
|
|
2410
|
-
const
|
|
2618
|
+
const Pn = {
|
|
2411
2619
|
mounted: (e, t) => {
|
|
2412
|
-
|
|
2620
|
+
In(e, t.value || {});
|
|
2413
2621
|
},
|
|
2414
2622
|
// ignore ssr see #96:
|
|
2415
2623
|
getSSRProps: () => ({})
|
|
2416
|
-
},
|
|
2624
|
+
}, Fn = { class: "fixed z-20 flex flex-col gap-2 p-2" }, za = /* @__PURE__ */ R({
|
|
2417
2625
|
__name: "NotificationSystem",
|
|
2418
2626
|
setup(e) {
|
|
2419
|
-
const t =
|
|
2627
|
+
const t = Zn();
|
|
2420
2628
|
return (r, n) => {
|
|
2421
|
-
const o =
|
|
2422
|
-
return
|
|
2423
|
-
(
|
|
2629
|
+
const o = Sn;
|
|
2630
|
+
return De((b(), w("div", Fn, [
|
|
2631
|
+
(b(!0), w(ie, null, Re(c(t), (a) => (b(), X(o, {
|
|
2424
2632
|
key: a.hash,
|
|
2425
2633
|
"with-border": "",
|
|
2426
2634
|
closeable: "",
|
|
@@ -2429,14 +2637,14 @@ const Cn = {
|
|
|
2429
2637
|
icon: a.icon,
|
|
2430
2638
|
loading: a.loading,
|
|
2431
2639
|
color: a.color,
|
|
2432
|
-
onClose: (s) =>
|
|
2640
|
+
onClose: (s) => c(t).splice(c(t).indexOf(a), 1)
|
|
2433
2641
|
}, null, 8, ["title", "message", "icon", "loading", "color", "onClose"]))), 128))
|
|
2434
2642
|
])), [
|
|
2435
|
-
[
|
|
2643
|
+
[c(Pn)]
|
|
2436
2644
|
]);
|
|
2437
2645
|
};
|
|
2438
2646
|
}
|
|
2439
|
-
}),
|
|
2647
|
+
}), Dn = { class: "relative" }, Oa = /* @__PURE__ */ R({
|
|
2440
2648
|
__name: "Overlay",
|
|
2441
2649
|
props: {
|
|
2442
2650
|
blur: { type: [Boolean, String], default: !1 },
|
|
@@ -2445,7 +2653,7 @@ const Cn = {
|
|
|
2445
2653
|
color: { default: "black" }
|
|
2446
2654
|
},
|
|
2447
2655
|
setup(e) {
|
|
2448
|
-
const t = e, r =
|
|
2656
|
+
const t = e, r = m(() => {
|
|
2449
2657
|
switch (t.blur) {
|
|
2450
2658
|
case "sm":
|
|
2451
2659
|
return "backdrop-blur-sm";
|
|
@@ -2457,49 +2665,112 @@ const Cn = {
|
|
|
2457
2665
|
default:
|
|
2458
2666
|
return "";
|
|
2459
2667
|
}
|
|
2460
|
-
}), n =
|
|
2668
|
+
}), n = re(t), o = g(null), a = y(t.color).toRgb(), s = m(() => ({
|
|
2461
2669
|
backgroundColor: `rgba(${a.r}, ${a.g}, ${a.b}, ${t.opacity / 100})`
|
|
2462
2670
|
}));
|
|
2463
|
-
return (
|
|
2464
|
-
|
|
2465
|
-
|
|
2671
|
+
return (i, l) => (b(), w("div", Dn, [
|
|
2672
|
+
z(i.$slots, "default"),
|
|
2673
|
+
$("div", $e(i.$attrs, {
|
|
2466
2674
|
ref_key: "wrapperRef",
|
|
2467
2675
|
ref: o,
|
|
2468
|
-
class: [[
|
|
2469
|
-
style: [
|
|
2676
|
+
class: [[c(r), c(n).class], "absolute left-0 top-0 h-full w-full overflow-hidden md:items-center"],
|
|
2677
|
+
style: [c(n).style, c(s)]
|
|
2470
2678
|
}), [
|
|
2471
|
-
|
|
2679
|
+
z(i.$slots, "content")
|
|
2472
2680
|
], 16)
|
|
2473
2681
|
]));
|
|
2474
2682
|
}
|
|
2475
|
-
}),
|
|
2683
|
+
}), Na = /* @__PURE__ */ R({
|
|
2476
2684
|
__name: "Paper",
|
|
2477
2685
|
props: {
|
|
2478
2686
|
size: { default: "md" },
|
|
2479
2687
|
rounded: { default: "md" },
|
|
2480
2688
|
withBorder: { type: Boolean, default: !1 },
|
|
2481
|
-
|
|
2689
|
+
loading: { type: Boolean, default: !1 },
|
|
2690
|
+
is: { default: "div" },
|
|
2691
|
+
color: { default: "primary" },
|
|
2692
|
+
traceAnimate: { type: Boolean, default: !1 }
|
|
2482
2693
|
},
|
|
2483
2694
|
setup(e) {
|
|
2484
|
-
const
|
|
2485
|
-
|
|
2486
|
-
|
|
2695
|
+
const t = e;
|
|
2696
|
+
function r(v) {
|
|
2697
|
+
return ["primary", "secondary", "tertiary", "error"].includes(v) ? `rgb(var(--r-color-${v}-container))` : v;
|
|
2698
|
+
}
|
|
2699
|
+
const n = re(t), o = m(() => t.loading ? {
|
|
2700
|
+
background: "linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient) border-box",
|
|
2701
|
+
"background-color": "var(--bg)",
|
|
2702
|
+
"--bg": "rgba(var(--r-color-surface-low) / 1)",
|
|
2703
|
+
"--gradient": `radial-gradient(circle at center, ${r(t.color)} 25%, var(--bg) 25%)`,
|
|
2704
|
+
"background-size": "200% 200%"
|
|
2705
|
+
} : {}), { x: a, y: s } = Cr(), i = g(null), { width: l, height: u, top: d, left: f } = He(i), p = m(() => {
|
|
2706
|
+
if (t.traceAnimate) {
|
|
2707
|
+
const v = m(() => ({
|
|
2708
|
+
x: f.value + l.value / 2,
|
|
2709
|
+
y: d.value + u.value / 2
|
|
2710
|
+
})), M = m(() => {
|
|
2711
|
+
if (a.value < f.value || a.value > f.value + l.value || s.value < d.value || s.value > d.value + u.value)
|
|
2712
|
+
return {
|
|
2713
|
+
x: a.value,
|
|
2714
|
+
y: s.value
|
|
2715
|
+
};
|
|
2716
|
+
const S = v.value.x, L = v.value.y;
|
|
2717
|
+
let H, I;
|
|
2718
|
+
const N = (s.value - L) / (a.value - S);
|
|
2719
|
+
return a.value < S ? (H = f.value, I = L + N * (f.value - S)) : (H = f.value + l.value, I = L + N * (H - S)), I < d.value ? (I = d.value, H = S + (I - L) / N) : I > d.value + u.value && (I = d.value + u.value, H = S + (I - L) / N), {
|
|
2720
|
+
x: H,
|
|
2721
|
+
y: I
|
|
2722
|
+
};
|
|
2723
|
+
});
|
|
2724
|
+
return {
|
|
2725
|
+
"--bg": "rgba(var(--r-color-surface-low) / 1)",
|
|
2726
|
+
"--gradient": `radial-gradient(circle at ${M.value.x - f.value}px ${M.value.y - d.value}px, ${r(t.color)} 50px, var(--bg) 50px)`,
|
|
2727
|
+
background: "linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient) border-box",
|
|
2728
|
+
"background-size": "200% 200%",
|
|
2729
|
+
"background-color": "var(--bg)"
|
|
2730
|
+
};
|
|
2731
|
+
} else
|
|
2732
|
+
return {};
|
|
2733
|
+
}), h = m(() => !l.value || !u.value ? [] : t.loading ? [
|
|
2734
|
+
{
|
|
2735
|
+
backgroundPosition: "0% 0%",
|
|
2736
|
+
offset: 0
|
|
2737
|
+
},
|
|
2738
|
+
{
|
|
2739
|
+
backgroundPosition: "0% 100%",
|
|
2740
|
+
offset: 0.5 * (u.value / l.value)
|
|
2741
|
+
},
|
|
2742
|
+
{
|
|
2743
|
+
backgroundPosition: "100% 100%",
|
|
2744
|
+
offset: 0.5
|
|
2745
|
+
},
|
|
2746
|
+
{
|
|
2747
|
+
backgroundPosition: "100% 0%",
|
|
2748
|
+
offset: 1 - 0.5 * (u.value / l.value)
|
|
2749
|
+
}
|
|
2750
|
+
] : []);
|
|
2751
|
+
return pr(i, h, {
|
|
2752
|
+
duration: 1e3,
|
|
2753
|
+
iterations: Number.POSITIVE_INFINITY
|
|
2754
|
+
}), (v, M) => (b(), X(Se(v.is), {
|
|
2755
|
+
ref_key: "paperRef",
|
|
2756
|
+
ref: i,
|
|
2757
|
+
class: k(["relative container-low rounded-lg p-4", [
|
|
2487
2758
|
{
|
|
2488
|
-
"border-transparent": !
|
|
2759
|
+
"border-transparent": !v.withBorder
|
|
2489
2760
|
},
|
|
2490
|
-
|
|
2761
|
+
c(n).class
|
|
2491
2762
|
]]),
|
|
2492
|
-
style:
|
|
2763
|
+
style: V([c(n).style, c(o), c(p)])
|
|
2493
2764
|
}, {
|
|
2494
|
-
default:
|
|
2495
|
-
|
|
2765
|
+
default: J(() => [
|
|
2766
|
+
z(v.$slots, "default")
|
|
2496
2767
|
]),
|
|
2497
2768
|
_: 3
|
|
2498
2769
|
}, 8, ["class", "style"]));
|
|
2499
2770
|
}
|
|
2500
|
-
}),
|
|
2771
|
+
}), Ln = ["for"], Wn = { key: 1 }, jn = ["id", "placeholder", "type"], Xn = /* @__PURE__ */ R({
|
|
2501
2772
|
__name: "TextField",
|
|
2502
|
-
props: /* @__PURE__ */
|
|
2773
|
+
props: /* @__PURE__ */ K({
|
|
2503
2774
|
onChange: {},
|
|
2504
2775
|
color: { default: "primary" },
|
|
2505
2776
|
error: { type: Boolean },
|
|
@@ -2515,7 +2786,7 @@ const Cn = {
|
|
|
2515
2786
|
}),
|
|
2516
2787
|
emits: ["update:modelValue"],
|
|
2517
2788
|
setup(e, { expose: t }) {
|
|
2518
|
-
const r = e, n =
|
|
2789
|
+
const r = e, n = te(e, "modelValue"), o = m(() => {
|
|
2519
2790
|
switch (r.size) {
|
|
2520
2791
|
case "sm":
|
|
2521
2792
|
return {
|
|
@@ -2530,7 +2801,7 @@ const Cn = {
|
|
|
2530
2801
|
base: "h-10 px-4 py-2 text-base"
|
|
2531
2802
|
};
|
|
2532
2803
|
}
|
|
2533
|
-
}), a =
|
|
2804
|
+
}), a = m(() => {
|
|
2534
2805
|
switch (r.size) {
|
|
2535
2806
|
case "sm":
|
|
2536
2807
|
return "text-xs";
|
|
@@ -2539,7 +2810,7 @@ const Cn = {
|
|
|
2539
2810
|
case "lg":
|
|
2540
2811
|
return "md-md";
|
|
2541
2812
|
}
|
|
2542
|
-
}), s =
|
|
2813
|
+
}), s = m(() => {
|
|
2543
2814
|
if (r.error)
|
|
2544
2815
|
return "text-error-container bg-surface-base border-error-container focus:border-error-container";
|
|
2545
2816
|
switch (r.color) {
|
|
@@ -2553,33 +2824,33 @@ const Cn = {
|
|
|
2553
2824
|
default:
|
|
2554
2825
|
return "text-surface-on bg-surface-base border-surface-border-base focus:border-primary-container";
|
|
2555
2826
|
}
|
|
2556
|
-
}),
|
|
2827
|
+
}), i = m(() => r.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), l = re(r), u = g(null);
|
|
2557
2828
|
t({
|
|
2558
|
-
el:
|
|
2829
|
+
el: u
|
|
2559
2830
|
});
|
|
2560
|
-
const d =
|
|
2561
|
-
return (
|
|
2562
|
-
|
|
2831
|
+
const d = vt(), f = Qe(d);
|
|
2832
|
+
return (p, h) => (b(), w("div", null, [
|
|
2833
|
+
p.$slots.label || p.label ? (b(), w("label", {
|
|
2563
2834
|
key: 0,
|
|
2564
|
-
for:
|
|
2565
|
-
class:
|
|
2835
|
+
for: c(f),
|
|
2836
|
+
class: k(["mb-1 block text-surface-on", [c(a)]])
|
|
2566
2837
|
}, [
|
|
2567
|
-
|
|
2568
|
-
], 10,
|
|
2569
|
-
|
|
2838
|
+
p.$slots.label ? z(p.$slots, "label", { key: 0 }) : (b(), w("span", Wn, ue(p.label), 1))
|
|
2839
|
+
], 10, Ln)) : B("", !0),
|
|
2840
|
+
De($("input", $e({ id: c(f) }, p.$attrs, {
|
|
2570
2841
|
ref_key: "input",
|
|
2571
|
-
ref:
|
|
2572
|
-
"onUpdate:modelValue":
|
|
2573
|
-
class: ["w-full border px-2 py-1 outline-none transition-background-color,border-color,color", [
|
|
2574
|
-
style: [
|
|
2575
|
-
placeholder:
|
|
2842
|
+
ref: u,
|
|
2843
|
+
"onUpdate:modelValue": h[0] || (h[0] = (v) => n.value = v),
|
|
2844
|
+
class: ["w-full border px-2 py-1 outline-none transition-background-color,border-color,color", [c(s), c(i), c(l).class, c(o).base]],
|
|
2845
|
+
style: [c(l).style],
|
|
2846
|
+
placeholder: p.placeholder,
|
|
2576
2847
|
type: r.password ? "password" : "text"
|
|
2577
|
-
}), null, 16,
|
|
2578
|
-
[
|
|
2848
|
+
}), null, 16, jn), [
|
|
2849
|
+
[jt, n.value]
|
|
2579
2850
|
])
|
|
2580
2851
|
]));
|
|
2581
2852
|
}
|
|
2582
|
-
}),
|
|
2853
|
+
}), Un = { class: "flex gap-2" }, Ba = /* @__PURE__ */ R({
|
|
2583
2854
|
__name: "PinInput",
|
|
2584
2855
|
props: {
|
|
2585
2856
|
modelValue: {},
|
|
@@ -2591,34 +2862,34 @@ const Cn = {
|
|
|
2591
2862
|
const t = e, r = g([]);
|
|
2592
2863
|
function n(a) {
|
|
2593
2864
|
a.preventDefault(), a.stopPropagation();
|
|
2594
|
-
const s = r.value.findIndex((
|
|
2595
|
-
a.target.value = "", Array.from(
|
|
2596
|
-
s +
|
|
2865
|
+
const s = r.value.findIndex((l) => l.el === a.target), i = a.target.value ?? "";
|
|
2866
|
+
a.target.value = "", Array.from(i).forEach((l, u) => {
|
|
2867
|
+
s + u >= r.value.length || (r.value[s + u].el.value = l, s + u + 1 < r.value.length ? (r.value[s + u + 1].el.focus(), r.value[s + u + 1].el.select()) : r.value[s + u].el.blur());
|
|
2597
2868
|
});
|
|
2598
2869
|
}
|
|
2599
2870
|
function o(a) {
|
|
2600
2871
|
a.preventDefault(), a.stopPropagation();
|
|
2601
2872
|
const s = a.target.value !== "";
|
|
2602
2873
|
a.target.value = "";
|
|
2603
|
-
const
|
|
2604
|
-
|
|
2874
|
+
const i = r.value.findIndex((l) => l.el === a.target);
|
|
2875
|
+
i !== 0 && (r.value[i - 1].el.focus(), r.value[i - 1].el.select(), s || (r.value[i - 1].el.value = ""));
|
|
2605
2876
|
}
|
|
2606
|
-
return (a, s) => (
|
|
2607
|
-
(
|
|
2877
|
+
return (a, s) => (b(), w("div", Un, [
|
|
2878
|
+
(b(!0), w(ie, null, Re(t.length, (i) => (b(), X(Xn, {
|
|
2608
2879
|
ref_for: !0,
|
|
2609
2880
|
ref_key: "inputs",
|
|
2610
2881
|
ref: r,
|
|
2611
|
-
key:
|
|
2882
|
+
key: i,
|
|
2612
2883
|
class: "w-8 text-center",
|
|
2613
2884
|
style: { padding: "0" },
|
|
2614
2885
|
password: t.password,
|
|
2615
|
-
onPointerup: s[0] || (s[0] = (
|
|
2616
|
-
onInput:
|
|
2617
|
-
onKeydown:
|
|
2886
|
+
onPointerup: s[0] || (s[0] = (l) => l.target.select()),
|
|
2887
|
+
onInput: gt(n, ["stop", "prevent"]),
|
|
2888
|
+
onKeydown: Xt(o, ["backspace"])
|
|
2618
2889
|
}, null, 8, ["password"]))), 128))
|
|
2619
2890
|
]));
|
|
2620
2891
|
}
|
|
2621
|
-
}),
|
|
2892
|
+
}), Ha = /* @__PURE__ */ R({
|
|
2622
2893
|
__name: "Progress",
|
|
2623
2894
|
props: {
|
|
2624
2895
|
value: { default: 0 },
|
|
@@ -2630,7 +2901,7 @@ const Cn = {
|
|
|
2630
2901
|
loading: { type: Boolean, default: !1 }
|
|
2631
2902
|
},
|
|
2632
2903
|
setup(e) {
|
|
2633
|
-
const t = e, r =
|
|
2904
|
+
const t = e, r = m(() => {
|
|
2634
2905
|
switch (t.size) {
|
|
2635
2906
|
case "sm":
|
|
2636
2907
|
return "h-0.25";
|
|
@@ -2639,105 +2910,105 @@ const Cn = {
|
|
|
2639
2910
|
case "lg":
|
|
2640
2911
|
return "h-1";
|
|
2641
2912
|
}
|
|
2642
|
-
}), n =
|
|
2913
|
+
}), n = m(() => {
|
|
2643
2914
|
switch (t.color) {
|
|
2644
2915
|
case "primary":
|
|
2645
|
-
return "bg-primary-
|
|
2916
|
+
return "bg-primary-containerl";
|
|
2646
2917
|
case "secondary":
|
|
2647
|
-
return "bg-secondary-
|
|
2918
|
+
return "bg-secondary-containerl";
|
|
2648
2919
|
case "tertiary":
|
|
2649
|
-
return "bg-tertiary-
|
|
2920
|
+
return "bg-tertiary-containerl";
|
|
2650
2921
|
case "error":
|
|
2651
|
-
return "bg-error-
|
|
2922
|
+
return "bg-error-containerl";
|
|
2652
2923
|
}
|
|
2653
|
-
}), o =
|
|
2654
|
-
return (a, s) => (
|
|
2655
|
-
class:
|
|
2656
|
-
style:
|
|
2924
|
+
}), o = re(t);
|
|
2925
|
+
return (a, s) => (b(), w("div", {
|
|
2926
|
+
class: k(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [c(r), c(o).class]]),
|
|
2927
|
+
style: V([c(o).style])
|
|
2657
2928
|
}, [
|
|
2658
|
-
a.loading ? (
|
|
2929
|
+
a.loading ? (b(), w("div", {
|
|
2659
2930
|
key: 1,
|
|
2660
|
-
class:
|
|
2661
|
-
}, null, 2)) : (
|
|
2931
|
+
class: k(["loading-progress h-full", [c(n)]])
|
|
2932
|
+
}, null, 2)) : (b(), w("div", {
|
|
2662
2933
|
key: 0,
|
|
2663
|
-
class:
|
|
2664
|
-
style:
|
|
2934
|
+
class: k(["h-full", [c(n)]]),
|
|
2935
|
+
style: V([{
|
|
2665
2936
|
width: `${(Number(a.value) - Number(a.min)) / (Number(a.max) - Number(a.min)) * 100}%`
|
|
2666
2937
|
}])
|
|
2667
2938
|
}, null, 6))
|
|
2668
2939
|
], 6));
|
|
2669
2940
|
}
|
|
2670
|
-
}),
|
|
2941
|
+
}), Va = {
|
|
2671
2942
|
primary: ["#e5f7ff", "#d3ebfa", "#a9d4f1", "#7cbde9", "#57a9e0", "#3f9cdc", "#3096dc", "#1f82c4", "#0f73b0", "#00649c", "#082f49"],
|
|
2672
2943
|
secondary: ["#e9fbf0", "#dcf1e3", "#badfc7", "#96cea9", "#77bf90", "#63b580", "#58b077", "#479a64", "#3b8a58", "#2c7749", "#022c22"],
|
|
2673
2944
|
tertiary: ["#fff7e1", "#ffedcd", "#fcd99e", "#f9c46b", "#f7b23f", "#f6a724", "#f5a113", "#da8c04", "#c37d00", "#aa6a00", "#572508"],
|
|
2674
2945
|
error: ["#ffeaea", "#fcd5d5", "#f2a8a9", "#ea7a7a", "#e25353", "#de3939", "#dd2b2b", "#c41e1f", "#af171a", "#9a0913", "#450a0a"],
|
|
2675
2946
|
surface: ["#fefefe", "#fafafa", "#f2f2f2", "#e8e8e8", "#c6c6c6", "#737373", "#525252", "#343434", "#262626", "#171717", "#121212"]
|
|
2676
|
-
},
|
|
2677
|
-
primary:
|
|
2678
|
-
secondary:
|
|
2679
|
-
tertiary:
|
|
2680
|
-
error:
|
|
2681
|
-
surface:
|
|
2682
|
-
}),
|
|
2683
|
-
function
|
|
2684
|
-
return
|
|
2685
|
-
}
|
|
2686
|
-
class
|
|
2947
|
+
}, Yn = g("#3F9CDC"), qn = g("#5999A6"), Gn = g("#F76C22"), Jn = g("#F95858"), Kn = g("#121212"), Ot = sn("default", {
|
|
2948
|
+
primary: Yn,
|
|
2949
|
+
secondary: qn,
|
|
2950
|
+
tertiary: Gn,
|
|
2951
|
+
error: Jn,
|
|
2952
|
+
surface: Kn
|
|
2953
|
+
}), Ia = Symbol("Notifications"), Nt = Ut([]);
|
|
2954
|
+
function Zn() {
|
|
2955
|
+
return Nt;
|
|
2956
|
+
}
|
|
2957
|
+
class Pa {
|
|
2687
2958
|
static show(t) {
|
|
2688
|
-
t.hash = Math.random().toString(36),
|
|
2959
|
+
t.hash = Math.random().toString(36), Nt.push(t);
|
|
2689
2960
|
}
|
|
2690
2961
|
}
|
|
2691
|
-
const
|
|
2692
|
-
function
|
|
2693
|
-
const t =
|
|
2694
|
-
return
|
|
2962
|
+
const Bt = Symbol("tabCurrent"), Ht = Symbol("direction"), Fa = Symbol("tabValueList"), Vt = Symbol("childrenElementMapSymbol"), at = [0.98, 0.96, 0.9, 0.8, 0.6, 0.55, 0.5, 0.3, 0.28, 0.2, 0.08];
|
|
2963
|
+
function Qn(e) {
|
|
2964
|
+
const t = y(e).toHsl().l;
|
|
2965
|
+
return at.reduce(
|
|
2695
2966
|
(r, n) => Math.abs(n - t) < Math.abs(r - t) ? n : r
|
|
2696
2967
|
);
|
|
2697
2968
|
}
|
|
2698
|
-
function
|
|
2699
|
-
const r =
|
|
2700
|
-
const
|
|
2701
|
-
return
|
|
2969
|
+
function ea(e, t = at) {
|
|
2970
|
+
const r = y(e), n = Qn(r), o = t.findIndex((s) => s === n), a = t.map((s) => {
|
|
2971
|
+
const i = y({ h: r.toHsl().h, s: r.toHsl().s, l: s });
|
|
2972
|
+
return i.saturate(0 * 100), i;
|
|
2702
2973
|
});
|
|
2703
2974
|
return { baseColorIndex: o, colors: a.map((s) => s.toHexString()) };
|
|
2704
2975
|
}
|
|
2705
|
-
function
|
|
2706
|
-
return
|
|
2976
|
+
function Me(e, t = at) {
|
|
2977
|
+
return ea(e, t).colors;
|
|
2707
2978
|
}
|
|
2708
|
-
const
|
|
2979
|
+
const Da = /* @__PURE__ */ R({
|
|
2709
2980
|
__name: "RokuProvider",
|
|
2710
2981
|
props: {
|
|
2711
2982
|
is: { default: "div" },
|
|
2712
2983
|
theme: { default: "default" },
|
|
2713
2984
|
themes: { default: () => ({
|
|
2714
|
-
default:
|
|
2985
|
+
default: Ot.value
|
|
2715
2986
|
}) }
|
|
2716
2987
|
},
|
|
2717
2988
|
setup(e) {
|
|
2718
|
-
const t = e, r =
|
|
2719
|
-
|
|
2720
|
-
if (!
|
|
2989
|
+
const t = e, r = m(() => t.themes[t.theme]), n = un(), o = Tr();
|
|
2990
|
+
pe(() => {
|
|
2991
|
+
if (!se)
|
|
2721
2992
|
return "dark";
|
|
2722
2993
|
n.value === "dark" ? document.documentElement.dataset.scheme = "dark" : n.value === "light" ? document.documentElement.dataset.scheme = "light" : o.value === "dark" ? document.documentElement.dataset.scheme = "dark" : document.documentElement.dataset.scheme = "light", localStorage.setItem("scheme", document.documentElement.dataset.scheme);
|
|
2723
|
-
}),
|
|
2724
|
-
const a =
|
|
2725
|
-
return
|
|
2726
|
-
style:
|
|
2727
|
-
|
|
2994
|
+
}), Te(ln, n);
|
|
2995
|
+
const a = m(() => Mt(r.value));
|
|
2996
|
+
return Te("currentThemeData", m(() => r.value)), (s, i) => (b(), X(Se(s.is), {
|
|
2997
|
+
style: V([
|
|
2998
|
+
c(a)
|
|
2728
2999
|
]),
|
|
2729
3000
|
class: "text-surface-on transition-background-color,border-color,color"
|
|
2730
3001
|
}, {
|
|
2731
|
-
default:
|
|
2732
|
-
|
|
3002
|
+
default: J(() => [
|
|
3003
|
+
z(s.$slots, "default")
|
|
2733
3004
|
]),
|
|
2734
3005
|
_: 3
|
|
2735
3006
|
}, 8, ["style"]));
|
|
2736
3007
|
}
|
|
2737
|
-
}),
|
|
3008
|
+
}), ta = ["id"], ra = ["for"], na = ["for"], aa = /* @__PURE__ */ R({
|
|
2738
3009
|
inheritAttrs: !1,
|
|
2739
3010
|
__name: "Switch",
|
|
2740
|
-
props: /* @__PURE__ */
|
|
3011
|
+
props: /* @__PURE__ */ K({
|
|
2741
3012
|
size: { default: "md" },
|
|
2742
3013
|
animate: { type: Boolean, default: !0 },
|
|
2743
3014
|
options: {},
|
|
@@ -2755,9 +3026,9 @@ const Aa = /* @__PURE__ */ S({
|
|
|
2755
3026
|
}),
|
|
2756
3027
|
emits: ["update:modelValue"],
|
|
2757
3028
|
setup(e) {
|
|
2758
|
-
const t = e, r =
|
|
3029
|
+
const t = e, r = te(e, "modelValue");
|
|
2759
3030
|
t.value && (r.value = t.value);
|
|
2760
|
-
const n = g(null), o = g(!1), a =
|
|
3031
|
+
const n = g(null), o = g(!1), a = m(() => {
|
|
2761
3032
|
switch (t.size) {
|
|
2762
3033
|
case "sm":
|
|
2763
3034
|
return {
|
|
@@ -2784,13 +3055,13 @@ const Aa = /* @__PURE__ */ S({
|
|
|
2784
3055
|
active: o.value ? "left-[calc(1.75rem-1px)]" : "left-[calc(2.25rem-1px)]"
|
|
2785
3056
|
};
|
|
2786
3057
|
}
|
|
2787
|
-
}), s =
|
|
3058
|
+
}), s = m(() => t.animate ? {
|
|
2788
3059
|
indicator: "transition-all",
|
|
2789
3060
|
progress: "transition-width"
|
|
2790
3061
|
} : {
|
|
2791
3062
|
indicator: "",
|
|
2792
3063
|
progress: ""
|
|
2793
|
-
}),
|
|
3064
|
+
}), i = Qe(t), l = m(() => {
|
|
2794
3065
|
let d = "bg-primary-container";
|
|
2795
3066
|
switch (t.color) {
|
|
2796
3067
|
case "secondary":
|
|
@@ -2807,41 +3078,41 @@ const Aa = /* @__PURE__ */ S({
|
|
|
2807
3078
|
wrapper: r.value ? `border border-transparent ${d}` : "bg-surface-border-low border border-surface-border-low",
|
|
2808
3079
|
indicator: t.disabled ? "bg-surface-high" : "bg-white text-primary-container"
|
|
2809
3080
|
};
|
|
2810
|
-
}),
|
|
2811
|
-
return (d, f) => (
|
|
3081
|
+
}), u = re(t);
|
|
3082
|
+
return (d, f) => (b(), w("div", {
|
|
2812
3083
|
role: "switch",
|
|
2813
|
-
class:
|
|
3084
|
+
class: k(["relative flex items-center gap-2", {
|
|
2814
3085
|
"pointer-events-none filter-grayscale op-60": t.disabled
|
|
2815
3086
|
}])
|
|
2816
3087
|
}, [
|
|
2817
|
-
|
|
2818
|
-
id:
|
|
2819
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
3088
|
+
De($("input", $e({
|
|
3089
|
+
id: c(i),
|
|
3090
|
+
"onUpdate:modelValue": f[0] || (f[0] = (p) => r.value = p)
|
|
2820
3091
|
}, d.$attrs, {
|
|
2821
3092
|
class: "hidden",
|
|
2822
3093
|
type: "checkbox"
|
|
2823
|
-
}), null, 16,
|
|
2824
|
-
[
|
|
3094
|
+
}), null, 16, ta), [
|
|
3095
|
+
[Yt, r.value]
|
|
2825
3096
|
]),
|
|
2826
|
-
|
|
3097
|
+
$("label", {
|
|
2827
3098
|
class: "leading-0 cursor-pointer!",
|
|
2828
|
-
for:
|
|
3099
|
+
for: c(i)
|
|
2829
3100
|
}, [
|
|
2830
|
-
|
|
3101
|
+
$("div", {
|
|
2831
3102
|
ref_key: "wrapper",
|
|
2832
3103
|
ref: n,
|
|
2833
|
-
class:
|
|
2834
|
-
style:
|
|
2835
|
-
onPointerdown: f[1] || (f[1] = (
|
|
2836
|
-
onPointerup: f[2] || (f[2] = (
|
|
2837
|
-
onPointerleave: f[3] || (f[3] = (
|
|
2838
|
-
onPointerenter: f[4] || (f[4] = (
|
|
3104
|
+
class: k([[c(a).wrapper, c(l).wrapper, c(u).class], "relative inline-block transition-all"]),
|
|
3105
|
+
style: V([c(u).style]),
|
|
3106
|
+
onPointerdown: f[1] || (f[1] = (p) => o.value = !0),
|
|
3107
|
+
onPointerup: f[2] || (f[2] = (p) => o.value = !1),
|
|
3108
|
+
onPointerleave: f[3] || (f[3] = (p) => o.value = !1),
|
|
3109
|
+
onPointerenter: f[4] || (f[4] = (p) => p.buttons === 1 && (o.value = !0))
|
|
2839
3110
|
}, [
|
|
2840
|
-
|
|
2841
|
-
class:
|
|
2842
|
-
style:
|
|
3111
|
+
$("div", {
|
|
3112
|
+
class: k(["absolute top-50% -translate-y-50%", [c(a).indicator, c(l).indicator, c(s).indicator, r.value ? c(a).active : c(a).inactive, c(u).class]]),
|
|
3113
|
+
style: V([c(u).style])
|
|
2843
3114
|
}, null, 6),
|
|
2844
|
-
|
|
3115
|
+
oe(Ke, {
|
|
2845
3116
|
"enter-active-class": "transition-all",
|
|
2846
3117
|
"enter-from-class": "opacity-0",
|
|
2847
3118
|
"enter-to-class": "opacity-100",
|
|
@@ -2850,17 +3121,17 @@ const Aa = /* @__PURE__ */ S({
|
|
|
2850
3121
|
"leave-to-class": "opacity-0",
|
|
2851
3122
|
mode: "out-in"
|
|
2852
3123
|
}, {
|
|
2853
|
-
default:
|
|
2854
|
-
r.value ? (
|
|
3124
|
+
default: J(() => [
|
|
3125
|
+
r.value ? (b(), w("i", {
|
|
2855
3126
|
key: "on",
|
|
2856
|
-
class:
|
|
3127
|
+
class: k(["absolute top-1/2 -translate-y-50%", [c(a).icon, {
|
|
2857
3128
|
[`left-0 text-${d.color}-on-container-low`]: r.value,
|
|
2858
3129
|
[d.onIcon ?? ""]: r.value && d.onIcon,
|
|
2859
3130
|
[d.offIcon ?? ""]: !r.value && d.offIcon
|
|
2860
3131
|
}]])
|
|
2861
|
-
}, null, 2)) : (
|
|
3132
|
+
}, null, 2)) : (b(), w("i", {
|
|
2862
3133
|
key: "off",
|
|
2863
|
-
class:
|
|
3134
|
+
class: k(["absolute top-1/2 -translate-y-50%", [c(a).icon, {
|
|
2864
3135
|
"right-0 text-surface-on-low ": !r.value,
|
|
2865
3136
|
[d.onIcon ?? ""]: r.value && d.onIcon,
|
|
2866
3137
|
[d.offIcon ?? ""]: !r.value && d.offIcon
|
|
@@ -2870,40 +3141,40 @@ const Aa = /* @__PURE__ */ S({
|
|
|
2870
3141
|
_: 1
|
|
2871
3142
|
})
|
|
2872
3143
|
], 38)
|
|
2873
|
-
], 8,
|
|
2874
|
-
d.label ? (
|
|
3144
|
+
], 8, ra),
|
|
3145
|
+
d.label ? (b(), w("label", {
|
|
2875
3146
|
key: 0,
|
|
2876
|
-
for:
|
|
2877
|
-
},
|
|
3147
|
+
for: c(i)
|
|
3148
|
+
}, ue(d.label), 9, na)) : B("", !0)
|
|
2878
3149
|
], 2));
|
|
2879
3150
|
}
|
|
2880
|
-
}),
|
|
3151
|
+
}), oa = { class: "dark:hidden" }, sa = { class: "light:hidden" }, La = /* @__PURE__ */ R({
|
|
2881
3152
|
__name: "SchemeSwitch",
|
|
2882
3153
|
setup(e) {
|
|
2883
3154
|
const t = g(!1);
|
|
2884
|
-
|
|
2885
|
-
|
|
3155
|
+
ee([t], () => {
|
|
3156
|
+
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")));
|
|
2886
3157
|
});
|
|
2887
3158
|
const r = g(!0), n = g(!1);
|
|
2888
|
-
return
|
|
2889
|
-
|
|
2890
|
-
}),
|
|
3159
|
+
return le(() => {
|
|
3160
|
+
se && (t.value = localStorage.getItem("scheme") === "dark"), r.value = !1;
|
|
3161
|
+
}), Fe(() => {
|
|
2891
3162
|
n.value = !0;
|
|
2892
3163
|
}), (o, a) => {
|
|
2893
|
-
const s =
|
|
2894
|
-
return
|
|
2895
|
-
|
|
2896
|
-
class:
|
|
3164
|
+
const s = aa;
|
|
3165
|
+
return b(), w(ie, null, [
|
|
3166
|
+
$("div", {
|
|
3167
|
+
class: k({ hidden: !c(r) })
|
|
2897
3168
|
}, [
|
|
2898
|
-
|
|
2899
|
-
|
|
3169
|
+
$("div", oa, [
|
|
3170
|
+
oe(s, {
|
|
2900
3171
|
value: !1,
|
|
2901
3172
|
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
2902
3173
|
"off-icon": "i-line-md-sunny-outline-twotone-loop"
|
|
2903
3174
|
})
|
|
2904
3175
|
]),
|
|
2905
|
-
|
|
2906
|
-
|
|
3176
|
+
$("div", sa, [
|
|
3177
|
+
oe(s, {
|
|
2907
3178
|
value: !0,
|
|
2908
3179
|
color: "secondary",
|
|
2909
3180
|
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
@@ -2911,13 +3182,13 @@ const Aa = /* @__PURE__ */ S({
|
|
|
2911
3182
|
})
|
|
2912
3183
|
])
|
|
2913
3184
|
], 2),
|
|
2914
|
-
|
|
2915
|
-
class:
|
|
3185
|
+
$("div", {
|
|
3186
|
+
class: k({ hidden: c(r) })
|
|
2916
3187
|
}, [
|
|
2917
|
-
|
|
2918
|
-
modelValue:
|
|
2919
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
2920
|
-
animate:
|
|
3188
|
+
oe(s, {
|
|
3189
|
+
modelValue: c(t),
|
|
3190
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => qt(t) ? t.value = i : null),
|
|
3191
|
+
animate: c(n),
|
|
2921
3192
|
color: "secondary",
|
|
2922
3193
|
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
2923
3194
|
"off-icon": "i-line-md-sunny-outline-twotone-loop"
|
|
@@ -2926,14 +3197,14 @@ const Aa = /* @__PURE__ */ S({
|
|
|
2926
3197
|
], 64);
|
|
2927
3198
|
};
|
|
2928
3199
|
}
|
|
2929
|
-
}),
|
|
3200
|
+
}), la = { class: "w-full flex items-center" }, ia = ["placeholder", "value", "aria-label"], ua = /* @__PURE__ */ $("i", { class: "i-tabler-chevron-down pointer-events-none absolute right-2" }, null, -1), ca = {
|
|
2930
3201
|
key: 0,
|
|
2931
3202
|
class: "flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"
|
|
2932
|
-
},
|
|
2933
|
-
|
|
2934
|
-
],
|
|
3203
|
+
}, da = ["onPointerdown", "onHover"], fa = { key: 0 }, pa = /* @__PURE__ */ $("i", { class: "i-tabler-check h-3 w-3" }, null, -1), ha = [
|
|
3204
|
+
pa
|
|
3205
|
+
], Wa = /* @__PURE__ */ R({
|
|
2935
3206
|
__name: "Select",
|
|
2936
|
-
props: /* @__PURE__ */
|
|
3207
|
+
props: /* @__PURE__ */ K({
|
|
2937
3208
|
ariaLabel: {},
|
|
2938
3209
|
options: { default() {
|
|
2939
3210
|
return [];
|
|
@@ -2946,42 +3217,42 @@ const Aa = /* @__PURE__ */ S({
|
|
|
2946
3217
|
modelValue: { default: void 0 },
|
|
2947
3218
|
modelModifiers: {}
|
|
2948
3219
|
}),
|
|
2949
|
-
emits: /* @__PURE__ */
|
|
3220
|
+
emits: /* @__PURE__ */ K(["change"], ["update:modelValue"]),
|
|
2950
3221
|
setup(e, { emit: t }) {
|
|
2951
|
-
const r = e, n = t, o =
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
}),
|
|
2955
|
-
a.value =
|
|
2956
|
-
}),
|
|
3222
|
+
const r = e, n = t, o = re(r), a = te(e, "modelValue"), s = g(null), i = g(null), { focused: l } = Mr(s), u = m(() => r.options.map((_) => S(_)).indexOf(a.value)), d = g(-1), f = g(-1);
|
|
3223
|
+
pe(() => {
|
|
3224
|
+
l.value || (f.value = -1);
|
|
3225
|
+
}), pe(() => {
|
|
3226
|
+
a.value = S(r.options[u.value]);
|
|
3227
|
+
}), ee(a, () => {
|
|
2957
3228
|
n("change", a.value);
|
|
2958
3229
|
});
|
|
2959
|
-
const
|
|
2960
|
-
function
|
|
3230
|
+
const p = r.options, h = m(() => p[u.value]), v = m(() => M(h.value));
|
|
3231
|
+
function M(_) {
|
|
2961
3232
|
if (_)
|
|
2962
3233
|
return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.label;
|
|
2963
3234
|
}
|
|
2964
|
-
function
|
|
3235
|
+
function S(_) {
|
|
2965
3236
|
if (_)
|
|
2966
3237
|
return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.id;
|
|
2967
3238
|
}
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
}),
|
|
2971
|
-
|
|
2972
|
-
}),
|
|
2973
|
-
|
|
3239
|
+
fe("ArrowDown", (_) => {
|
|
3240
|
+
l.value && (_.preventDefault(), f.value = (f.value + 1) % p.length);
|
|
3241
|
+
}), fe("ArrowUp", (_) => {
|
|
3242
|
+
l.value && (_.preventDefault(), f.value = (f.value - 1 + p.length) % p.length);
|
|
3243
|
+
}), fe("Enter", () => {
|
|
3244
|
+
l.value && f.value !== -1 && (a.value = S(p[f.value]), l.value = !1);
|
|
2974
3245
|
});
|
|
2975
|
-
function
|
|
2976
|
-
if (!
|
|
2977
|
-
|
|
3246
|
+
function L(_) {
|
|
3247
|
+
if (!l.value) {
|
|
3248
|
+
l.value = !0;
|
|
2978
3249
|
return;
|
|
2979
3250
|
}
|
|
2980
|
-
a.value =
|
|
3251
|
+
a.value = S(_), l.value = !1;
|
|
2981
3252
|
}
|
|
2982
|
-
const
|
|
3253
|
+
const H = m(() => ({
|
|
2983
3254
|
input: "container-base focus:border-primary-container"
|
|
2984
|
-
})),
|
|
3255
|
+
})), I = m(() => {
|
|
2985
3256
|
switch (r.size) {
|
|
2986
3257
|
case "sm":
|
|
2987
3258
|
return {
|
|
@@ -2999,50 +3270,54 @@ const Aa = /* @__PURE__ */ S({
|
|
|
2999
3270
|
dropdown: "text-base children:py-1"
|
|
3000
3271
|
};
|
|
3001
3272
|
}
|
|
3002
|
-
});
|
|
3003
|
-
return (_,
|
|
3273
|
+
}), N = g(null), { height: C } = He(N), { bottom: E } = He(s), F = m(() => l.value && se ? C.value === 0 ? !1 : document.documentElement.clientHeight - E.value > C.value : !1);
|
|
3274
|
+
return (_, x) => (b(), w("div", {
|
|
3004
3275
|
ref_key: "wrapperRef",
|
|
3005
|
-
ref:
|
|
3276
|
+
ref: i,
|
|
3006
3277
|
class: "r-select-wrapper relative"
|
|
3007
3278
|
}, [
|
|
3008
|
-
|
|
3009
|
-
|
|
3279
|
+
$("div", la, [
|
|
3280
|
+
$("input", {
|
|
3010
3281
|
ref_key: "inputRef",
|
|
3011
3282
|
ref: s,
|
|
3012
|
-
class:
|
|
3283
|
+
class: k([[c(H).input, c(I).wrapper, c(o).class], "r-select-input cursor-pointer border outline-none outline-none focus-visible:outline-2"]),
|
|
3013
3284
|
placeholder: _.placeholder,
|
|
3014
|
-
style:
|
|
3285
|
+
style: V([c(o).style]),
|
|
3015
3286
|
readonly: "",
|
|
3016
|
-
value:
|
|
3287
|
+
value: c(v),
|
|
3017
3288
|
"aria-label": _.ariaLabel,
|
|
3018
3289
|
"aria-haspopup": "listbox",
|
|
3019
3290
|
autocomplete: "off",
|
|
3020
|
-
onFocus:
|
|
3021
|
-
}, null, 46,
|
|
3022
|
-
|
|
3291
|
+
onFocus: x[0] || (x[0] = (T) => l.value = !0)
|
|
3292
|
+
}, null, 46, ia),
|
|
3293
|
+
ua
|
|
3023
3294
|
]),
|
|
3024
|
-
|
|
3295
|
+
c(l) ? (b(), w("div", {
|
|
3025
3296
|
key: 0,
|
|
3026
|
-
|
|
3297
|
+
ref_key: "dropdownRef",
|
|
3298
|
+
ref: N,
|
|
3299
|
+
class: k(["absolute z-10 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1", [c(I).dropdown, {
|
|
3300
|
+
"bottom-10": !c(F)
|
|
3301
|
+
}]])
|
|
3027
3302
|
}, [
|
|
3028
|
-
|
|
3029
|
-
key:
|
|
3030
|
-
class:
|
|
3031
|
-
"hover:bg-surface-high border-transparent":
|
|
3032
|
-
"container-filled-primary":
|
|
3303
|
+
c(p).length === 0 ? (b(), w("div", ca, ue(_.noneText), 1)) : (b(!0), w(ie, { key: 1 }, Re(c(p), (T, D) => (b(), w("div", {
|
|
3304
|
+
key: S(T),
|
|
3305
|
+
class: k([{
|
|
3306
|
+
"hover:bg-surface-high border-transparent": c(f) !== D,
|
|
3307
|
+
"container-filled-primary": c(f) === D
|
|
3033
3308
|
}, "flex cursor-pointer items-center justify-between gap-2 border rounded p-1 px-2"]),
|
|
3034
|
-
onPointerdown: (
|
|
3035
|
-
onHover: (
|
|
3309
|
+
onPointerdown: (de) => L(T),
|
|
3310
|
+
onHover: (de) => d.value = D
|
|
3036
3311
|
}, [
|
|
3037
|
-
|
|
3038
|
-
T ===
|
|
3039
|
-
], 42,
|
|
3040
|
-
], 2)) :
|
|
3312
|
+
Gt(ue(M(T)) + " ", 1),
|
|
3313
|
+
T === c(h) ? (b(), w("div", fa, ha)) : B("", !0)
|
|
3314
|
+
], 42, da))), 128))
|
|
3315
|
+
], 2)) : B("", !0)
|
|
3041
3316
|
], 512));
|
|
3042
3317
|
}
|
|
3043
|
-
}),
|
|
3318
|
+
}), ma = { class: "relative inline-block w-full" }, ja = /* @__PURE__ */ R({
|
|
3044
3319
|
__name: "Slider",
|
|
3045
|
-
props: /* @__PURE__ */
|
|
3320
|
+
props: /* @__PURE__ */ K({
|
|
3046
3321
|
size: { default: "md" },
|
|
3047
3322
|
animate: { type: Boolean, default: !1 },
|
|
3048
3323
|
width: {},
|
|
@@ -3062,80 +3337,80 @@ const Aa = /* @__PURE__ */ S({
|
|
|
3062
3337
|
emits: ["update:modelValue"],
|
|
3063
3338
|
setup(e) {
|
|
3064
3339
|
const t = e;
|
|
3065
|
-
function r(
|
|
3066
|
-
const
|
|
3067
|
-
for (let
|
|
3068
|
-
|
|
3069
|
-
return
|
|
3340
|
+
function r(E, F, _) {
|
|
3341
|
+
const x = [];
|
|
3342
|
+
for (let T = E; T <= F; T += _)
|
|
3343
|
+
x.push(T);
|
|
3344
|
+
return x[x.length - 1] !== F && x.push(F), x;
|
|
3070
3345
|
}
|
|
3071
|
-
function n(
|
|
3072
|
-
const
|
|
3073
|
-
|
|
3074
|
-
const
|
|
3075
|
-
for (let
|
|
3076
|
-
|
|
3077
|
-
return
|
|
3346
|
+
function n(E, F) {
|
|
3347
|
+
const _ = [];
|
|
3348
|
+
_.push(F[0]);
|
|
3349
|
+
const x = (F.length - 1) / (E - 1);
|
|
3350
|
+
for (let T = 1; T < E - 1; T++)
|
|
3351
|
+
_.push(F[Math.round(T * x)]);
|
|
3352
|
+
return _.push(F[F.length - 1]), _;
|
|
3078
3353
|
}
|
|
3079
|
-
const o =
|
|
3080
|
-
function d(
|
|
3081
|
-
return a.value.indexOf(
|
|
3354
|
+
const o = m(() => t.options ? t.options.length : t.tickNum ?? 0), a = m(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), s = m(() => n(o.value, a.value)), i = te(e, "modelValue"), l = m(() => a.value.length ?? 0), u = g(a.value.includes(i.value) ? a.value.indexOf(i.value) : 0);
|
|
3355
|
+
function d(E) {
|
|
3356
|
+
return a.value.indexOf(E);
|
|
3082
3357
|
}
|
|
3083
|
-
const f =
|
|
3358
|
+
const f = m(() => {
|
|
3084
3359
|
switch (t.color) {
|
|
3085
3360
|
case "primary":
|
|
3086
|
-
return "bg-primary-
|
|
3361
|
+
return "bg-primary-containerl";
|
|
3087
3362
|
case "secondary":
|
|
3088
|
-
return "bg-secondary-
|
|
3363
|
+
return "bg-secondary-containerl";
|
|
3089
3364
|
case "tertiary":
|
|
3090
|
-
return "bg-tertiary-
|
|
3365
|
+
return "bg-tertiary-containerl";
|
|
3091
3366
|
case "error":
|
|
3092
|
-
return "bg-error-
|
|
3367
|
+
return "bg-error-containerl";
|
|
3093
3368
|
}
|
|
3094
|
-
}),
|
|
3369
|
+
}), p = m(() => `dark:bg-white bg-${t.color}-containerl`), h = m(() => {
|
|
3095
3370
|
switch (t.color) {
|
|
3096
3371
|
case "primary":
|
|
3097
|
-
return "dark:bg-primary-
|
|
3372
|
+
return "dark:bg-primary-containerl bg-white";
|
|
3098
3373
|
case "secondary":
|
|
3099
|
-
return "dark:bg-secondary-
|
|
3374
|
+
return "dark:bg-secondary-containerl bg-white";
|
|
3100
3375
|
case "tertiary":
|
|
3101
|
-
return "dark:bg-tertiary-
|
|
3376
|
+
return "dark:bg-tertiary-containerl bg-white";
|
|
3102
3377
|
case "error":
|
|
3103
|
-
return "dark:bg-error-
|
|
3378
|
+
return "dark:bg-error-containerl bg-white";
|
|
3104
3379
|
}
|
|
3105
3380
|
});
|
|
3106
|
-
|
|
3107
|
-
|
|
3381
|
+
pe(() => {
|
|
3382
|
+
i.value = a.value[u.value];
|
|
3108
3383
|
});
|
|
3109
|
-
const
|
|
3110
|
-
function
|
|
3111
|
-
if (!
|
|
3384
|
+
const v = g(), M = g(), S = He(v), L = g(!1);
|
|
3385
|
+
function H(E) {
|
|
3386
|
+
if (!L.value)
|
|
3112
3387
|
return;
|
|
3113
|
-
if (!(
|
|
3114
|
-
|
|
3388
|
+
if (!(E.buttons === 1)) {
|
|
3389
|
+
L.value = !1;
|
|
3115
3390
|
return;
|
|
3116
3391
|
}
|
|
3117
|
-
|
|
3118
|
-
const { clientX:
|
|
3119
|
-
if (
|
|
3120
|
-
|
|
3392
|
+
E.preventDefault(), E.stopPropagation();
|
|
3393
|
+
const { clientX: _ } = E, x = S.left.value, D = S.right.value - x, de = Math.round((_ - x) / D * (l.value - 1));
|
|
3394
|
+
if (de < 0) {
|
|
3395
|
+
u.value = 0;
|
|
3121
3396
|
return;
|
|
3122
3397
|
}
|
|
3123
|
-
if (
|
|
3124
|
-
|
|
3398
|
+
if (de > l.value - 1) {
|
|
3399
|
+
u.value = l.value - 1;
|
|
3125
3400
|
return;
|
|
3126
3401
|
}
|
|
3127
|
-
|
|
3402
|
+
u.value = de;
|
|
3128
3403
|
}
|
|
3129
|
-
|
|
3130
|
-
|
|
3404
|
+
pe(() => {
|
|
3405
|
+
u.value = d(i.value);
|
|
3131
3406
|
});
|
|
3132
|
-
function
|
|
3133
|
-
|
|
3407
|
+
function I(E) {
|
|
3408
|
+
E.preventDefault(), E.stopPropagation(), L.value = !0, H(E);
|
|
3134
3409
|
}
|
|
3135
|
-
|
|
3136
|
-
|
|
3410
|
+
P(v, "pointerdown", I), le(() => {
|
|
3411
|
+
P(document, "pointermove", H), u.value = Math.max(0, d(i.value));
|
|
3137
3412
|
});
|
|
3138
|
-
const
|
|
3413
|
+
const N = m(() => {
|
|
3139
3414
|
switch (t.size) {
|
|
3140
3415
|
case "sm":
|
|
3141
3416
|
return {
|
|
@@ -3168,123 +3443,129 @@ const Aa = /* @__PURE__ */ S({
|
|
|
3168
3443
|
progress: "-mx-1.5"
|
|
3169
3444
|
};
|
|
3170
3445
|
}
|
|
3171
|
-
}),
|
|
3446
|
+
}), C = m(() => t.animate ? {
|
|
3172
3447
|
indicator: "transition-left",
|
|
3173
3448
|
progress: "transition-width"
|
|
3174
3449
|
} : {
|
|
3175
3450
|
indicator: "",
|
|
3176
3451
|
progress: ""
|
|
3177
3452
|
});
|
|
3178
|
-
return (
|
|
3179
|
-
|
|
3453
|
+
return (E, F) => (b(), w("div", ma, [
|
|
3454
|
+
$("div", {
|
|
3180
3455
|
ref_key: "wrapper",
|
|
3181
|
-
ref:
|
|
3456
|
+
ref: v,
|
|
3182
3457
|
type: "size",
|
|
3183
|
-
class:
|
|
3184
|
-
onTouchmove:
|
|
3458
|
+
class: k(["w-full flex cursor-pointer items-center", c(N).wrapper]),
|
|
3459
|
+
onTouchmove: F[0] || (F[0] = gt(() => {
|
|
3185
3460
|
}, ["prevent"]))
|
|
3186
3461
|
}, [
|
|
3187
|
-
|
|
3188
|
-
class:
|
|
3462
|
+
$("div", {
|
|
3463
|
+
class: k(["w-full rounded-full bg-surface-3 transition-background-color,border-color,color dark:bg-surface-7", c(N).innerWrapper])
|
|
3189
3464
|
}, [
|
|
3190
|
-
|
|
3191
|
-
class:
|
|
3192
|
-
style:
|
|
3465
|
+
$("div", {
|
|
3466
|
+
class: k(["relative flex", c(N).content]),
|
|
3467
|
+
style: V({
|
|
3193
3468
|
width: `${t.width}rem`,
|
|
3194
3469
|
minWidth: `${t.minWidth}rem`
|
|
3195
3470
|
})
|
|
3196
3471
|
}, [
|
|
3197
|
-
(
|
|
3198
|
-
key:
|
|
3199
|
-
style:
|
|
3200
|
-
left: `${d(
|
|
3472
|
+
(b(!0), w(ie, null, Re(c(s), (_) => (b(), w("div", {
|
|
3473
|
+
key: _,
|
|
3474
|
+
style: V({
|
|
3475
|
+
left: `${d(_) / (c(l) - 1) * 100}%`
|
|
3201
3476
|
}),
|
|
3202
|
-
class:
|
|
3477
|
+
class: k(["absolute top-50% rounded-full bg-surface-0", c(N).tick])
|
|
3203
3478
|
}, null, 6))), 128)),
|
|
3204
|
-
u
|
|
3479
|
+
c(u) !== -1 ? (b(), w("div", {
|
|
3205
3480
|
key: 0,
|
|
3206
3481
|
ref_key: "indicator",
|
|
3207
|
-
ref:
|
|
3208
|
-
class:
|
|
3209
|
-
style:
|
|
3210
|
-
left: `${u
|
|
3482
|
+
ref: M,
|
|
3483
|
+
class: k(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [c(N).indicator, c(C).indicator, c(p)]]),
|
|
3484
|
+
style: V({
|
|
3485
|
+
left: `${c(u) / (c(l) - 1) * 100}%`
|
|
3211
3486
|
})
|
|
3212
3487
|
}, [
|
|
3213
|
-
|
|
3214
|
-
class:
|
|
3488
|
+
$("div", {
|
|
3489
|
+
class: k(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [c(N).indicatorInner, c(h)]])
|
|
3215
3490
|
}, null, 2)
|
|
3216
|
-
], 6)) :
|
|
3217
|
-
|
|
3218
|
-
class:
|
|
3219
|
-
style:
|
|
3220
|
-
width: `${u
|
|
3491
|
+
], 6)) : B("", !0),
|
|
3492
|
+
$("div", {
|
|
3493
|
+
class: k(["pointer-events-none h-full rounded-full", [c(N).progress, c(C).progress, c(f)]]),
|
|
3494
|
+
style: V({
|
|
3495
|
+
width: `${c(u) / (c(l) - 1) * 100}%`
|
|
3221
3496
|
})
|
|
3222
3497
|
}, null, 6)
|
|
3223
3498
|
], 6)
|
|
3224
3499
|
], 2)
|
|
3225
3500
|
], 34),
|
|
3226
|
-
|
|
3501
|
+
$("div", {
|
|
3227
3502
|
class: "relative mx-1 h-1em text-xs text-surface-on-low",
|
|
3228
|
-
style:
|
|
3503
|
+
style: V({
|
|
3229
3504
|
width: `${t.width}rem`
|
|
3230
3505
|
})
|
|
3231
3506
|
}, [
|
|
3232
|
-
(
|
|
3233
|
-
key:
|
|
3234
|
-
style:
|
|
3235
|
-
left: `${d(
|
|
3507
|
+
(b(!0), w(ie, null, Re(c(s), (_, x) => (b(), w("div", {
|
|
3508
|
+
key: x,
|
|
3509
|
+
style: V({
|
|
3510
|
+
left: `${d(_) / (c(l) - 1) * 100}%`
|
|
3236
3511
|
}),
|
|
3237
|
-
class:
|
|
3238
|
-
},
|
|
3512
|
+
class: k(["absolute w-auto flex rounded-full -translate-x-50%", c(N).tick])
|
|
3513
|
+
}, ue(_), 7))), 128))
|
|
3239
3514
|
], 4)
|
|
3240
3515
|
]));
|
|
3241
3516
|
}
|
|
3242
|
-
}),
|
|
3517
|
+
}), va = { class: "h-full py-2" }, Xa = /* @__PURE__ */ R({
|
|
3243
3518
|
__name: "TabItem",
|
|
3244
3519
|
props: {
|
|
3245
3520
|
value: {},
|
|
3246
3521
|
color: { default: "primary" }
|
|
3247
3522
|
},
|
|
3248
3523
|
setup(e) {
|
|
3249
|
-
const t = e, r =
|
|
3524
|
+
const t = e, r = we(Bt, g("")), n = g(null), o = m(() => r.value === t.value);
|
|
3250
3525
|
function a() {
|
|
3251
3526
|
r.value = t.value;
|
|
3252
3527
|
}
|
|
3253
|
-
const s =
|
|
3254
|
-
|
|
3528
|
+
const s = we(Vt, /* @__PURE__ */ new Map());
|
|
3529
|
+
le(() => {
|
|
3530
|
+
s.set(t.value, n);
|
|
3531
|
+
});
|
|
3532
|
+
const i = we(Ht, m(() => "horizontal")), l = m(() => {
|
|
3533
|
+
switch (i.value) {
|
|
3255
3534
|
case "horizontal":
|
|
3256
|
-
return "flex-col";
|
|
3535
|
+
return "flex-col rounded-tr-lg rounded-tl-lg";
|
|
3257
3536
|
case "vertical":
|
|
3258
|
-
return "flex-row-reverse";
|
|
3537
|
+
return "flex-row-reverse rounded-tr-lg rounded-br-lg";
|
|
3259
3538
|
}
|
|
3260
|
-
}),
|
|
3261
|
-
switch (
|
|
3539
|
+
}), u = m(() => {
|
|
3540
|
+
switch (i.value) {
|
|
3262
3541
|
case "horizontal":
|
|
3263
|
-
return "absolute inset-0 top-100% h-2px w-full transition-background-color,border-color,color";
|
|
3542
|
+
return "absolute inset-0 top-100% h-2px w-full transition-background-color,border-color,color ";
|
|
3264
3543
|
case "vertical":
|
|
3265
|
-
return "absolute inset-0 right-100% h-full w-2px
|
|
3544
|
+
return "absolute inset-0 right-100% h-full w-2px transition-background-color,border-color,color";
|
|
3266
3545
|
}
|
|
3267
|
-
}),
|
|
3268
|
-
return (
|
|
3546
|
+
}), d = m(() => o.value ? "bg-primary-containerl" : "bg-surface-lowest");
|
|
3547
|
+
return (f, p) => (b(), w("button", {
|
|
3548
|
+
ref_key: "tabRef",
|
|
3549
|
+
ref: n,
|
|
3269
3550
|
type: "button",
|
|
3270
|
-
class:
|
|
3551
|
+
class: k(["rutline-none relative min-w-20 flex items-center justify-center outline-none focus-visible:outline-2 focus-visible:outline-primary-container outline-offset-0!", [c(l)]]),
|
|
3271
3552
|
onClick: a
|
|
3272
3553
|
}, [
|
|
3273
|
-
|
|
3554
|
+
c(o) ? (b(), w("div", {
|
|
3274
3555
|
key: 0,
|
|
3275
|
-
class:
|
|
3276
|
-
}, null, 2)) : (
|
|
3556
|
+
class: k([c(u), c(d)])
|
|
3557
|
+
}, null, 2)) : (b(), w("div", {
|
|
3277
3558
|
key: 1,
|
|
3278
|
-
class:
|
|
3559
|
+
class: k([c(u), c(d)])
|
|
3279
3560
|
}, null, 2)),
|
|
3280
|
-
|
|
3281
|
-
|
|
3561
|
+
$("div", va, [
|
|
3562
|
+
z(f.$slots, "default")
|
|
3282
3563
|
])
|
|
3283
3564
|
], 2));
|
|
3284
3565
|
}
|
|
3285
|
-
}),
|
|
3566
|
+
}), Ua = /* @__PURE__ */ R({
|
|
3286
3567
|
__name: "Tabs",
|
|
3287
|
-
props: /* @__PURE__ */
|
|
3568
|
+
props: /* @__PURE__ */ K({
|
|
3288
3569
|
defaultValue: {},
|
|
3289
3570
|
direction: { default: "horizontal" }
|
|
3290
3571
|
}, {
|
|
@@ -3293,40 +3574,68 @@ const Aa = /* @__PURE__ */ S({
|
|
|
3293
3574
|
}),
|
|
3294
3575
|
emits: ["update:modelValue"],
|
|
3295
3576
|
setup(e) {
|
|
3296
|
-
const t = e, r =
|
|
3297
|
-
var
|
|
3298
|
-
const
|
|
3299
|
-
return (
|
|
3300
|
-
var
|
|
3301
|
-
return ((
|
|
3302
|
-
}).map((
|
|
3303
|
-
}), o =
|
|
3304
|
-
!o.value && n.value.length > 0 && (o.value = n.value[0])
|
|
3577
|
+
const t = e, r = bt(), n = m(() => {
|
|
3578
|
+
var f;
|
|
3579
|
+
const u = (f = r.default) == null ? void 0 : f.call(r);
|
|
3580
|
+
return (u == null ? void 0 : u.flatMap((p) => p.type === ie ? p.children : p).filter((p) => {
|
|
3581
|
+
var h;
|
|
3582
|
+
return ((h = p == null ? void 0 : p.props) == null ? void 0 : h.value) !== void 0;
|
|
3583
|
+
}).map((p) => p.props.value)) ?? [];
|
|
3584
|
+
}), o = te(e, "modelValue");
|
|
3585
|
+
!o.value && n.value.length > 0 && (o.value = n.value[0]);
|
|
3586
|
+
const a = g(null);
|
|
3587
|
+
le(() => {
|
|
3305
3588
|
t.defaultValue && (o.value = t.defaultValue);
|
|
3306
|
-
}),
|
|
3307
|
-
const
|
|
3308
|
-
|
|
3309
|
-
|
|
3589
|
+
}), Te(Bt, o);
|
|
3590
|
+
const s = m(() => t.direction);
|
|
3591
|
+
Te(Ht, s);
|
|
3592
|
+
const i = /* @__PURE__ */ new Map();
|
|
3593
|
+
Te(Vt, i), fe("ArrowLeft", (u) => {
|
|
3594
|
+
var h;
|
|
3595
|
+
if (!((h = a.value) != null && h.contains(document.activeElement)) || (u.preventDefault(), t.direction !== "horizontal"))
|
|
3310
3596
|
return;
|
|
3311
|
-
const
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
if (
|
|
3597
|
+
const d = o.value ? n.value.indexOf(o.value) : 0, f = d > 0 ? n.value[d - 1] : n.value[n.value.length - 1];
|
|
3598
|
+
o.value = f;
|
|
3599
|
+
const p = i.get(f);
|
|
3600
|
+
if (p) {
|
|
3601
|
+
const v = p.value;
|
|
3602
|
+
v && v.focus();
|
|
3603
|
+
}
|
|
3604
|
+
}), fe("ArrowRight", (u) => {
|
|
3605
|
+
var h;
|
|
3606
|
+
if (!((h = a.value) != null && h.contains(document.activeElement)) || (u.preventDefault(), t.direction !== "horizontal"))
|
|
3315
3607
|
return;
|
|
3316
|
-
const
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
if (
|
|
3608
|
+
const d = o.value ? n.value.indexOf(o.value) : 0, f = d < n.value.length - 1 ? o.value = n.value[d + 1] : o.value = n.value[0];
|
|
3609
|
+
o.value = f;
|
|
3610
|
+
const p = i.get(f);
|
|
3611
|
+
if (p) {
|
|
3612
|
+
const v = p.value;
|
|
3613
|
+
v && v.focus();
|
|
3614
|
+
}
|
|
3615
|
+
}), fe("ArrowUp", (u) => {
|
|
3616
|
+
var h;
|
|
3617
|
+
if (!((h = a.value) != null && h.contains(document.activeElement)) || (u.preventDefault(), t.direction !== "vertical"))
|
|
3320
3618
|
return;
|
|
3321
|
-
const
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
if (
|
|
3619
|
+
const d = o.value ? n.value.indexOf(o.value) : 0, f = d > 0 ? n.value[d - 1] : n.value[n.value.length - 1];
|
|
3620
|
+
o.value = f;
|
|
3621
|
+
const p = i.get(f);
|
|
3622
|
+
if (p) {
|
|
3623
|
+
const v = p.value;
|
|
3624
|
+
v && v.focus();
|
|
3625
|
+
}
|
|
3626
|
+
}), fe("ArrowDown", (u) => {
|
|
3627
|
+
var h;
|
|
3628
|
+
if (!((h = a.value) != null && h.contains(document.activeElement)) || (u.preventDefault(), t.direction !== "vertical"))
|
|
3325
3629
|
return;
|
|
3326
|
-
const
|
|
3327
|
-
|
|
3630
|
+
const d = o.value ? n.value.indexOf(o.value) : 0, f = d < n.value.length - 1 ? n.value[d + 1] : n.value[0];
|
|
3631
|
+
o.value = f;
|
|
3632
|
+
const p = i.get(f);
|
|
3633
|
+
if (p) {
|
|
3634
|
+
const v = p.value;
|
|
3635
|
+
v && v.focus();
|
|
3636
|
+
}
|
|
3328
3637
|
});
|
|
3329
|
-
const
|
|
3638
|
+
const l = m(() => {
|
|
3330
3639
|
switch (t.direction) {
|
|
3331
3640
|
case "horizontal":
|
|
3332
3641
|
return "flex-row";
|
|
@@ -3334,60 +3643,64 @@ const Aa = /* @__PURE__ */ S({
|
|
|
3334
3643
|
return "flex-col";
|
|
3335
3644
|
}
|
|
3336
3645
|
});
|
|
3337
|
-
return (
|
|
3338
|
-
|
|
3646
|
+
return (u, d) => (b(), w("div", {
|
|
3647
|
+
ref_key: "tabRef",
|
|
3648
|
+
ref: a,
|
|
3649
|
+
class: k(["flex", [c(l)]])
|
|
3339
3650
|
}, [
|
|
3340
|
-
|
|
3651
|
+
z(u.$slots, "default")
|
|
3341
3652
|
], 2));
|
|
3342
3653
|
}
|
|
3343
3654
|
});
|
|
3344
3655
|
export {
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3656
|
+
ga as AspectRatio,
|
|
3657
|
+
Jt as Avatar,
|
|
3658
|
+
xt as Btn,
|
|
3659
|
+
ya as ChatContainer,
|
|
3660
|
+
wa as ChatMessage,
|
|
3661
|
+
_a as ChatSystem,
|
|
3662
|
+
xa as Chip,
|
|
3663
|
+
Ma as ColorInput,
|
|
3664
|
+
Br as ColorSwatch,
|
|
3665
|
+
Aa as Drawer,
|
|
3666
|
+
Ca as Dropzone,
|
|
3667
|
+
At as FullscreenOverlay,
|
|
3668
|
+
Ta as Image,
|
|
3669
|
+
Ra as Indicator,
|
|
3670
|
+
Ea as Modal,
|
|
3671
|
+
Sn as Notification,
|
|
3672
|
+
za as NotificationSystem,
|
|
3673
|
+
Pa as Notifications,
|
|
3674
|
+
Oa as Overlay,
|
|
3675
|
+
Na as Paper,
|
|
3676
|
+
Ba as PinInput,
|
|
3677
|
+
Ha as Progress,
|
|
3678
|
+
Da as RokuProvider,
|
|
3679
|
+
La as SchemeSwitch,
|
|
3680
|
+
Wa as Select,
|
|
3681
|
+
ja as Slider,
|
|
3682
|
+
aa as Switch,
|
|
3683
|
+
Xa as TabItem,
|
|
3684
|
+
Ua as Tabs,
|
|
3685
|
+
Xn as TextField,
|
|
3686
|
+
hn as ThemeProvider,
|
|
3687
|
+
Vt as childrenElementMapSymbol,
|
|
3688
|
+
Ot as defaultTheme,
|
|
3689
|
+
Ht as directionSymbol,
|
|
3690
|
+
Me as generateColors,
|
|
3691
|
+
ea as generateColorsMap,
|
|
3692
|
+
Ia as notificationsSymbol,
|
|
3693
|
+
ln as schemeSymbol,
|
|
3694
|
+
Bt as tabCurrentSymbol,
|
|
3695
|
+
Fa as tabValueListSymbol,
|
|
3696
|
+
Va as themeColors,
|
|
3697
|
+
$t as useCurrentThemeData,
|
|
3698
|
+
$a as useCurrentThemeName,
|
|
3699
|
+
Sa as useCurrentThemeScheme,
|
|
3700
|
+
Qe as useId,
|
|
3701
|
+
Zn as useNotifications,
|
|
3702
|
+
ka as useRootTheme,
|
|
3703
|
+
un as useSchemeString,
|
|
3704
|
+
sn as useThemeData,
|
|
3705
|
+
Mt as useThemeStyles
|
|
3393
3706
|
};
|