@roku-ui/vue 0.6.3 → 0.7.1
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/Drawer.vue.d.ts +7 -7
- package/dist/components/Dropzone.vue.d.ts +1 -1
- package/dist/components/FullscreenOverlay.vue.d.ts +9 -9
- package/dist/components/Modal.vue.d.ts +7 -7
- package/dist/components/Overlay.vue.d.ts +1 -1
- package/dist/components/Progress.vue.d.ts +2 -2
- package/dist/components/Slider.vue.d.ts +6 -6
- package/dist/components/Switch.vue.d.ts +6 -6
- package/dist/components/TabItem.vue.d.ts +38 -0
- package/dist/components/Tabs.vue.d.ts +29 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +973 -873
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/symbols.d.ts +2 -0
- package/package.json +8 -8
- package/dist/components/TextField.vue.d.ts +0 -67
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as x, openBlock as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as x, openBlock as h, createElementBlock as b, normalizeStyle as C, renderSlot as k, computed as m, ref as g, onMounted as ee, Fragment as K, createBlock as P, resolveDynamicComponent as ue, mergeProps as xe, unref as c, createCommentVNode as T, getCurrentScope as xt, onScopeDispose as kt, nextTick as et, getCurrentInstance as tt, watch as de, shallowRef as St, readonly as Mt, watchEffect as F, withCtx as W, normalizeClass as y, createElementVNode as w, mergeModels as j, useModel as U, inject as be, provide as ge, useAttrs as $t, withDirectives as Te, vModelText as Ct, createVNode as Z, Teleport as At, Transition as rt, useSlots as nt, toDisplayString as se, renderList as ye, vModelDynamic as Tt, withModifiers as ot, withKeys as zt, reactive as Et, vModelCheckbox as Rt, isRef as Bt, createTextVNode as Ot } from "vue";
|
|
2
|
+
const In = /* @__PURE__ */ x({
|
|
3
3
|
__name: "AspectRatio",
|
|
4
4
|
props: {
|
|
5
5
|
ratio: { default: 1 },
|
|
@@ -9,7 +9,7 @@ const On = /* @__PURE__ */ x({
|
|
|
9
9
|
maxHeight: {}
|
|
10
10
|
},
|
|
11
11
|
setup(e) {
|
|
12
|
-
return (t, r) => (
|
|
12
|
+
return (t, r) => (h(), b("div", {
|
|
13
13
|
style: C({
|
|
14
14
|
"--ar-ratio": t.ratio,
|
|
15
15
|
width: t.width,
|
|
@@ -19,10 +19,10 @@ const On = /* @__PURE__ */ x({
|
|
|
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
|
+
k(t.$slots, "default")
|
|
23
23
|
], 4));
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
25
|
+
}), Ht = /* @__PURE__ */ x({
|
|
26
26
|
__name: "Avatar",
|
|
27
27
|
props: {
|
|
28
28
|
is: { default: "img" },
|
|
@@ -32,7 +32,7 @@ const On = /* @__PURE__ */ x({
|
|
|
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;";
|
|
@@ -43,37 +43,37 @@ const On = /* @__PURE__ */ x({
|
|
|
43
43
|
default:
|
|
44
44
|
return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `--size: ${t.size}rem;` : `--size: ${t.size};`;
|
|
45
45
|
}
|
|
46
|
-
}), n =
|
|
46
|
+
}), n = g(!1), a = g(null);
|
|
47
47
|
function o() {
|
|
48
48
|
n.value = !0;
|
|
49
49
|
}
|
|
50
|
-
return
|
|
50
|
+
return ee(() => {
|
|
51
51
|
var s;
|
|
52
52
|
(s = a.value) != null && s.complete && o();
|
|
53
|
-
}), (s,
|
|
54
|
-
s.src ? (
|
|
53
|
+
}), (s, i) => (h(), b(K, null, [
|
|
54
|
+
s.src ? (h(), P(ue(s.is), xe({
|
|
55
55
|
key: 0,
|
|
56
56
|
ref_key: "img",
|
|
57
57
|
ref: a,
|
|
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: !
|
|
61
|
+
class: ["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !c(n) }, t.class]]
|
|
62
62
|
}, s.$attrs, { onLoad: o }), null, 16, ["style", "src", "class"])) : T("", !0),
|
|
63
|
-
|
|
63
|
+
c(n) ? T("", !0) : (h(), b("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: C([s.style,
|
|
66
|
+
style: C([s.style, c(r)])
|
|
67
67
|
}, null, 4))
|
|
68
68
|
], 64));
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
|
-
function
|
|
72
|
-
return
|
|
73
|
-
() => ({ style:
|
|
71
|
+
function G(e) {
|
|
72
|
+
return m(
|
|
73
|
+
() => ({ style: Nt(e.rounded), class: "rounded-[var(--r-rounded)]" })
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Nt(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 Bt(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 ke(e) {
|
|
94
|
+
return xt() ? (kt(e), !0) : !1;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function Pt() {
|
|
97
97
|
const e = /* @__PURE__ */ new Set(), t = (a) => {
|
|
98
98
|
e.delete(a);
|
|
99
99
|
};
|
|
@@ -101,7 +101,7 @@ function Ot() {
|
|
|
101
101
|
on: (a) => {
|
|
102
102
|
e.add(a);
|
|
103
103
|
const o = () => t(a);
|
|
104
|
-
return
|
|
104
|
+
return ke(o), {
|
|
105
105
|
off: o
|
|
106
106
|
};
|
|
107
107
|
},
|
|
@@ -109,135 +109,135 @@ function Ot() {
|
|
|
109
109
|
trigger: (...a) => Promise.all(Array.from(e).map((o) => o(...a)))
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
return typeof e == "function" ? e() :
|
|
112
|
+
function ze(e) {
|
|
113
|
+
return typeof e == "function" ? e() : c(e);
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const Q = typeof window < "u" && typeof document < "u";
|
|
116
116
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
117
|
-
const
|
|
118
|
-
},
|
|
119
|
-
function
|
|
117
|
+
const It = (e) => e != null, Vt = Object.prototype.toString, Dt = (e) => Vt.call(e) === "[object Object]", Ft = () => {
|
|
118
|
+
}, Lt = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
119
|
+
function Wt(e) {
|
|
120
120
|
return e || tt();
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
|
|
122
|
+
function jt(e, t = !0, r) {
|
|
123
|
+
Wt() ? ee(e, r) : t ? e() : et(e);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function re(e) {
|
|
126
126
|
var t;
|
|
127
|
-
const r =
|
|
127
|
+
const r = ze(e);
|
|
128
128
|
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
129
129
|
}
|
|
130
|
-
const
|
|
131
|
-
function
|
|
130
|
+
const fe = Q ? window : void 0, Ut = Q ? window.document : void 0;
|
|
131
|
+
function N(...e) {
|
|
132
132
|
let t, r, n, a;
|
|
133
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, a] = e, t =
|
|
134
|
-
return
|
|
133
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, a] = e, t = fe) : [t, r, n, a] = e, !t)
|
|
134
|
+
return Ft;
|
|
135
135
|
Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
|
|
136
136
|
const o = [], s = () => {
|
|
137
137
|
o.forEach((d) => d()), o.length = 0;
|
|
138
|
-
},
|
|
139
|
-
() => [
|
|
138
|
+
}, i = (d, f, v, S) => (d.addEventListener(f, v, S), () => d.removeEventListener(f, v, S)), l = de(
|
|
139
|
+
() => [re(t), ze(a)],
|
|
140
140
|
([d, f]) => {
|
|
141
141
|
if (s(), !d)
|
|
142
142
|
return;
|
|
143
|
-
const
|
|
143
|
+
const v = Dt(f) ? { ...f } : f;
|
|
144
144
|
o.push(
|
|
145
|
-
...r.flatMap((
|
|
145
|
+
...r.flatMap((S) => n.map((A) => i(d, S, A, v)))
|
|
146
146
|
);
|
|
147
147
|
},
|
|
148
148
|
{ immediate: !0, flush: "post" }
|
|
149
|
-
),
|
|
150
|
-
|
|
149
|
+
), u = () => {
|
|
150
|
+
l(), s();
|
|
151
151
|
};
|
|
152
|
-
return
|
|
152
|
+
return ke(u), u;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Gt(e) {
|
|
155
155
|
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function te(...e) {
|
|
158
158
|
let t, r, n = {};
|
|
159
159
|
e.length === 3 ? (t = e[0], r = e[1], n = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, r = e[0], n = e[1]) : (t = e[0], r = e[1]) : (t = !0, r = e[0]);
|
|
160
160
|
const {
|
|
161
|
-
target: a =
|
|
161
|
+
target: a = fe,
|
|
162
162
|
eventName: o = "keydown",
|
|
163
163
|
passive: s = !1,
|
|
164
|
-
dedupe:
|
|
165
|
-
} = n,
|
|
166
|
-
return
|
|
167
|
-
d.repeat &&
|
|
164
|
+
dedupe: i = !1
|
|
165
|
+
} = n, l = Gt(t);
|
|
166
|
+
return N(a, o, (d) => {
|
|
167
|
+
d.repeat && ze(i) || l(d) && r(d);
|
|
168
168
|
}, s);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
const e =
|
|
172
|
-
return tt() &&
|
|
170
|
+
function qt() {
|
|
171
|
+
const e = g(!1);
|
|
172
|
+
return tt() && ee(() => {
|
|
173
173
|
e.value = !0;
|
|
174
174
|
}), e;
|
|
175
175
|
}
|
|
176
176
|
function De(e) {
|
|
177
|
-
const t =
|
|
178
|
-
return
|
|
177
|
+
const t = qt();
|
|
178
|
+
return m(() => (t.value, !!e()));
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
const { window: r =
|
|
180
|
+
function Ue(e, t = {}) {
|
|
181
|
+
const { window: r = fe } = t, n = De(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
|
|
182
182
|
let a;
|
|
183
|
-
const o =
|
|
184
|
-
o.value =
|
|
185
|
-
},
|
|
183
|
+
const o = g(!1), s = (u) => {
|
|
184
|
+
o.value = u.matches;
|
|
185
|
+
}, i = () => {
|
|
186
186
|
a && ("removeEventListener" in a ? a.removeEventListener("change", s) : a.removeListener(s));
|
|
187
|
-
},
|
|
188
|
-
n.value && (
|
|
187
|
+
}, l = F(() => {
|
|
188
|
+
n.value && (i(), a = r.matchMedia(ze(e)), "addEventListener" in a ? a.addEventListener("change", s) : a.addListener(s), o.value = a.matches);
|
|
189
189
|
});
|
|
190
|
-
return
|
|
191
|
-
|
|
190
|
+
return ke(() => {
|
|
191
|
+
l(), i(), a = void 0;
|
|
192
192
|
}), o;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
const { window: n =
|
|
194
|
+
function Xt(e, t, r = {}) {
|
|
195
|
+
const { window: n = fe, ...a } = r;
|
|
196
196
|
let o;
|
|
197
|
-
const s = De(() => n && "MutationObserver" in n),
|
|
197
|
+
const s = De(() => n && "MutationObserver" in n), i = () => {
|
|
198
198
|
o && (o.disconnect(), o = void 0);
|
|
199
|
-
},
|
|
200
|
-
() =>
|
|
199
|
+
}, l = de(
|
|
200
|
+
() => re(e),
|
|
201
201
|
(f) => {
|
|
202
|
-
|
|
202
|
+
i(), s.value && n && f && (o = new MutationObserver(t), o.observe(f, a));
|
|
203
203
|
},
|
|
204
204
|
{ immediate: !0 }
|
|
205
|
-
),
|
|
206
|
-
|
|
205
|
+
), u = () => o == null ? void 0 : o.takeRecords(), d = () => {
|
|
206
|
+
i(), l();
|
|
207
207
|
};
|
|
208
|
-
return
|
|
208
|
+
return ke(d), {
|
|
209
209
|
isSupported: s,
|
|
210
210
|
stop: d,
|
|
211
|
-
takeRecords:
|
|
211
|
+
takeRecords: u
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
const r =
|
|
214
|
+
function Yt(e, t = {}) {
|
|
215
|
+
const r = g(!1), n = St(null);
|
|
216
216
|
let a = 0, o = !0;
|
|
217
|
-
if (
|
|
218
|
-
const s = typeof t == "function" ? { onDrop: t } : t,
|
|
219
|
-
var
|
|
220
|
-
const f = Array.from((d = (
|
|
217
|
+
if (Q) {
|
|
218
|
+
const s = typeof t == "function" ? { onDrop: t } : t, i = (l) => {
|
|
219
|
+
var u, d;
|
|
220
|
+
const f = Array.from((d = (u = l.dataTransfer) == null ? void 0 : u.files) != null ? d : []);
|
|
221
221
|
return n.value = f.length === 0 ? null : f;
|
|
222
222
|
};
|
|
223
|
-
|
|
224
|
-
var
|
|
225
|
-
const f = Array.from(((
|
|
226
|
-
if (s.dataTypes &&
|
|
227
|
-
const
|
|
228
|
-
if (o = typeof
|
|
223
|
+
N(e, "dragenter", (l) => {
|
|
224
|
+
var u, d;
|
|
225
|
+
const f = Array.from(((u = l == null ? void 0 : l.dataTransfer) == null ? void 0 : u.items) || []).map((v) => v.kind === "file" ? v.type : null).filter(It);
|
|
226
|
+
if (s.dataTypes && l.dataTransfer) {
|
|
227
|
+
const v = c(s.dataTypes);
|
|
228
|
+
if (o = typeof v == "function" ? v(f) : v ? v.some((S) => f.includes(S)) : !0, !o)
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
|
-
|
|
232
|
-
}),
|
|
233
|
-
var
|
|
234
|
-
o && (
|
|
235
|
-
}),
|
|
236
|
-
var
|
|
237
|
-
o && (
|
|
238
|
-
}),
|
|
239
|
-
var
|
|
240
|
-
|
|
231
|
+
l.preventDefault(), a += 1, r.value = !0, (d = s.onEnter) == null || d.call(s, i(l), l);
|
|
232
|
+
}), N(e, "dragover", (l) => {
|
|
233
|
+
var u;
|
|
234
|
+
o && (l.preventDefault(), (u = s.onOver) == null || u.call(s, i(l), l));
|
|
235
|
+
}), N(e, "dragleave", (l) => {
|
|
236
|
+
var u;
|
|
237
|
+
o && (l.preventDefault(), a -= 1, a === 0 && (r.value = !1), (u = s.onLeave) == null || u.call(s, i(l), l));
|
|
238
|
+
}), N(e, "drop", (l) => {
|
|
239
|
+
var u;
|
|
240
|
+
l.preventDefault(), a = 0, r.value = !1, (u = s.onDrop) == null || u.call(s, i(l), l);
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
return {
|
|
@@ -245,122 +245,122 @@ function Ut(e, t = {}) {
|
|
|
245
245
|
isOverDropZone: r
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
const { window: n =
|
|
248
|
+
function Zt(e, t, r = {}) {
|
|
249
|
+
const { window: n = fe, ...a } = r;
|
|
250
250
|
let o;
|
|
251
|
-
const s = De(() => n && "ResizeObserver" in n),
|
|
251
|
+
const s = De(() => n && "ResizeObserver" in n), i = () => {
|
|
252
252
|
o && (o.disconnect(), o = void 0);
|
|
253
|
-
},
|
|
254
|
-
|
|
253
|
+
}, l = m(() => Array.isArray(e) ? e.map((f) => re(f)) : [re(e)]), u = de(
|
|
254
|
+
l,
|
|
255
255
|
(f) => {
|
|
256
|
-
if (
|
|
256
|
+
if (i(), s.value && n) {
|
|
257
257
|
o = new ResizeObserver(t);
|
|
258
|
-
for (const
|
|
259
|
-
|
|
258
|
+
for (const v of f)
|
|
259
|
+
v && o.observe(v, a);
|
|
260
260
|
}
|
|
261
261
|
},
|
|
262
262
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
263
263
|
), d = () => {
|
|
264
|
-
|
|
264
|
+
i(), u();
|
|
265
265
|
};
|
|
266
|
-
return
|
|
266
|
+
return ke(d), {
|
|
267
267
|
isSupported: s,
|
|
268
268
|
stop: d
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function Kt(e, t = {}) {
|
|
272
272
|
const {
|
|
273
273
|
reset: r = !0,
|
|
274
274
|
windowResize: n = !0,
|
|
275
275
|
windowScroll: a = !0,
|
|
276
276
|
immediate: o = !0
|
|
277
|
-
} = t, s =
|
|
277
|
+
} = t, s = g(0), i = g(0), l = g(0), u = g(0), d = g(0), f = g(0), v = g(0), S = g(0);
|
|
278
278
|
function A() {
|
|
279
|
-
const
|
|
280
|
-
if (!
|
|
281
|
-
r && (s.value = 0,
|
|
279
|
+
const z = re(e);
|
|
280
|
+
if (!z) {
|
|
281
|
+
r && (s.value = 0, i.value = 0, l.value = 0, u.value = 0, d.value = 0, f.value = 0, v.value = 0, S.value = 0);
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
const
|
|
285
|
-
s.value =
|
|
284
|
+
const E = z.getBoundingClientRect();
|
|
285
|
+
s.value = E.height, i.value = E.bottom, l.value = E.left, u.value = E.right, d.value = E.top, f.value = E.width, v.value = E.x, S.value = E.y;
|
|
286
286
|
}
|
|
287
|
-
return
|
|
287
|
+
return Zt(e, A), de(() => re(e), (z) => !z && A()), Xt(e, A, {
|
|
288
288
|
attributeFilter: ["style", "class"]
|
|
289
|
-
}), a &&
|
|
289
|
+
}), a && N("scroll", A, { capture: !0, passive: !0 }), n && N("resize", A, { passive: !0 }), jt(() => {
|
|
290
290
|
o && A();
|
|
291
291
|
}), {
|
|
292
292
|
height: s,
|
|
293
|
-
bottom:
|
|
294
|
-
left:
|
|
295
|
-
right:
|
|
293
|
+
bottom: i,
|
|
294
|
+
left: l,
|
|
295
|
+
right: u,
|
|
296
296
|
top: d,
|
|
297
297
|
width: f,
|
|
298
|
-
x:
|
|
299
|
-
y:
|
|
298
|
+
x: v,
|
|
299
|
+
y: S,
|
|
300
300
|
update: A
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function Qt(e, t = {}) {
|
|
304
304
|
const {
|
|
305
305
|
delayEnter: r = 0,
|
|
306
306
|
delayLeave: n = 0,
|
|
307
|
-
window: a =
|
|
308
|
-
} = t, o =
|
|
307
|
+
window: a = fe
|
|
308
|
+
} = t, o = g(!1);
|
|
309
309
|
let s;
|
|
310
|
-
const
|
|
311
|
-
const
|
|
312
|
-
s && (clearTimeout(s), s = void 0),
|
|
310
|
+
const i = (l) => {
|
|
311
|
+
const u = l ? r : n;
|
|
312
|
+
s && (clearTimeout(s), s = void 0), u ? s = setTimeout(() => o.value = l, u) : o.value = l;
|
|
313
313
|
};
|
|
314
|
-
return a && (
|
|
314
|
+
return a && (N(e, "mouseenter", () => i(!0), { passive: !0 }), N(e, "mouseleave", () => i(!1), { passive: !0 })), o;
|
|
315
315
|
}
|
|
316
|
-
const
|
|
316
|
+
const Jt = {
|
|
317
317
|
multiple: !0,
|
|
318
318
|
accept: "*",
|
|
319
319
|
reset: !1,
|
|
320
320
|
directory: !1
|
|
321
321
|
};
|
|
322
|
-
function
|
|
322
|
+
function er(e = {}) {
|
|
323
323
|
const {
|
|
324
|
-
document: t =
|
|
325
|
-
} = e, r =
|
|
324
|
+
document: t = Ut
|
|
325
|
+
} = e, r = g(null), { on: n, trigger: a } = Pt();
|
|
326
326
|
let o;
|
|
327
|
-
t && (o = t.createElement("input"), o.type = "file", o.onchange = (
|
|
328
|
-
const
|
|
329
|
-
r.value =
|
|
327
|
+
t && (o = t.createElement("input"), o.type = "file", o.onchange = (l) => {
|
|
328
|
+
const u = l.target;
|
|
329
|
+
r.value = u.files, a(r.value);
|
|
330
330
|
});
|
|
331
331
|
const s = () => {
|
|
332
332
|
r.value = null, o && (o.value = "", a(null));
|
|
333
|
-
},
|
|
333
|
+
}, i = (l) => {
|
|
334
334
|
if (!o)
|
|
335
335
|
return;
|
|
336
|
-
const
|
|
337
|
-
...
|
|
336
|
+
const u = {
|
|
337
|
+
...Jt,
|
|
338
338
|
...e,
|
|
339
|
-
...
|
|
339
|
+
...l
|
|
340
340
|
};
|
|
341
|
-
o.multiple =
|
|
341
|
+
o.multiple = u.multiple, o.accept = u.accept, o.webkitdirectory = u.directory, Lt(u, "capture") && (o.capture = u.capture), u.reset && s(), o.click();
|
|
342
342
|
};
|
|
343
343
|
return {
|
|
344
|
-
files:
|
|
345
|
-
open:
|
|
344
|
+
files: Mt(r),
|
|
345
|
+
open: i,
|
|
346
346
|
reset: s,
|
|
347
347
|
onChange: n
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
function
|
|
351
|
-
const { initialValue: r = !1, focusVisible: n = !1 } = t, a =
|
|
352
|
-
|
|
353
|
-
var
|
|
354
|
-
(!n || (
|
|
355
|
-
}),
|
|
356
|
-
const s =
|
|
350
|
+
function tr(e, t = {}) {
|
|
351
|
+
const { initialValue: r = !1, focusVisible: n = !1 } = t, a = g(!1), o = m(() => re(e));
|
|
352
|
+
N(o, "focus", (i) => {
|
|
353
|
+
var l, u;
|
|
354
|
+
(!n || (u = (l = i.target).matches) != null && u.call(l, ":focus-visible")) && (a.value = !0);
|
|
355
|
+
}), N(o, "blur", () => a.value = !1);
|
|
356
|
+
const s = m({
|
|
357
357
|
get: () => a.value,
|
|
358
|
-
set(
|
|
359
|
-
var
|
|
360
|
-
!
|
|
358
|
+
set(i) {
|
|
359
|
+
var l, u;
|
|
360
|
+
!i && a.value ? (l = o.value) == null || l.blur() : i && !a.value && ((u = o.value) == null || u.focus());
|
|
361
361
|
}
|
|
362
362
|
});
|
|
363
|
-
return
|
|
363
|
+
return de(
|
|
364
364
|
o,
|
|
365
365
|
() => {
|
|
366
366
|
s.value = r;
|
|
@@ -368,11 +368,11 @@ function Qt(e, t = {}) {
|
|
|
368
368
|
{ immediate: !0, flush: "post" }
|
|
369
369
|
), { focused: s };
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
const t =
|
|
373
|
-
return
|
|
371
|
+
function rr(e) {
|
|
372
|
+
const t = Ue("(prefers-color-scheme: light)", e), r = Ue("(prefers-color-scheme: dark)", e);
|
|
373
|
+
return m(() => r.value ? "dark" : t.value ? "light" : "no-preference");
|
|
374
374
|
}
|
|
375
|
-
const
|
|
375
|
+
const at = /* @__PURE__ */ x({
|
|
376
376
|
__name: "Btn",
|
|
377
377
|
props: {
|
|
378
378
|
type: { default: "button" },
|
|
@@ -388,7 +388,7 @@ const ot = /* @__PURE__ */ x({
|
|
|
388
388
|
disabled: { type: Boolean, default: !1 }
|
|
389
389
|
},
|
|
390
390
|
setup(e) {
|
|
391
|
-
const t = e, r =
|
|
391
|
+
const t = e, r = G(t), n = m(() => {
|
|
392
392
|
switch (t.size) {
|
|
393
393
|
case "sm":
|
|
394
394
|
return {
|
|
@@ -406,7 +406,7 @@ const ot = /* @__PURE__ */ x({
|
|
|
406
406
|
iconContent: "h-10 w-10 p-3"
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
}), a =
|
|
409
|
+
}), a = g(null), o = Qt(a), s = m(() => t.hoverVariant && o.value ? t.hoverVariant : t.variant), i = m(() => {
|
|
410
410
|
switch (s.value) {
|
|
411
411
|
case "filled":
|
|
412
412
|
switch (t.color) {
|
|
@@ -479,47 +479,47 @@ const ot = /* @__PURE__ */ x({
|
|
|
479
479
|
return "btn-default";
|
|
480
480
|
}
|
|
481
481
|
});
|
|
482
|
-
return (
|
|
482
|
+
return (l, u) => (h(), P(ue(l.is), xe({
|
|
483
483
|
ref_key: "btn",
|
|
484
484
|
ref: a,
|
|
485
|
-
"data-size":
|
|
486
|
-
type:
|
|
485
|
+
"data-size": l.size,
|
|
486
|
+
type: l.type,
|
|
487
487
|
class: ["flex items-center justify-center gap-1 decoration-none", [
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
488
|
+
c(i),
|
|
489
|
+
c(r).class,
|
|
490
|
+
l.icon ? c(n).iconContent : c(n).normalContent,
|
|
491
491
|
{
|
|
492
|
-
"filter-grayscale pointer-events-none":
|
|
493
|
-
"active:translate-y-0.25":
|
|
494
|
-
"active:scale-98":
|
|
495
|
-
"transition-all":
|
|
492
|
+
"filter-grayscale pointer-events-none": l.disabled,
|
|
493
|
+
"active:translate-y-0.25": l.pressEffect === "translate",
|
|
494
|
+
"active:scale-98": l.pressEffect === "scale",
|
|
495
|
+
"transition-all": l.animate
|
|
496
496
|
}
|
|
497
497
|
]],
|
|
498
498
|
style: [
|
|
499
|
-
|
|
499
|
+
c(r).style
|
|
500
500
|
],
|
|
501
|
-
disabled:
|
|
502
|
-
},
|
|
501
|
+
disabled: l.disabled
|
|
502
|
+
}, l.$attrs), {
|
|
503
503
|
default: W(() => [
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
504
|
+
l.$slots.leftSection ? k(l.$slots, "leftSection", { key: 0 }) : T("", !0),
|
|
505
|
+
k(l.$slots, "default"),
|
|
506
|
+
l.$slots.rightSection ? k(l.$slots, "rightSection", { key: 1 }) : T("", !0)
|
|
507
507
|
]),
|
|
508
508
|
_: 3
|
|
509
509
|
}, 16, ["data-size", "type", "style", "class", "disabled"]));
|
|
510
510
|
}
|
|
511
|
-
}),
|
|
511
|
+
}), nr = (e, t) => {
|
|
512
512
|
const r = e.__vccOpts || e;
|
|
513
513
|
for (const [n, a] of t)
|
|
514
514
|
r[n] = a;
|
|
515
515
|
return r;
|
|
516
|
-
},
|
|
517
|
-
function
|
|
518
|
-
return
|
|
519
|
-
|
|
516
|
+
}, or = {}, ar = { class: "flex flex-col gap-4 container" };
|
|
517
|
+
function sr(e, t) {
|
|
518
|
+
return h(), b("div", ar, [
|
|
519
|
+
k(e.$slots, "default")
|
|
520
520
|
]);
|
|
521
521
|
}
|
|
522
|
-
const
|
|
522
|
+
const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
|
|
523
523
|
__name: "ChatMessage",
|
|
524
524
|
props: {
|
|
525
525
|
avatar: {},
|
|
@@ -529,7 +529,7 @@ const Hn = /* @__PURE__ */ er(tr, [["render", nr]]), Pn = /* @__PURE__ */ x({
|
|
|
529
529
|
withBorder: { type: Boolean, default: !1 }
|
|
530
530
|
},
|
|
531
531
|
setup(e) {
|
|
532
|
-
const t = e, r =
|
|
532
|
+
const t = e, r = m(() => {
|
|
533
533
|
switch (t.variant) {
|
|
534
534
|
case "default":
|
|
535
535
|
return "bg-surface-base";
|
|
@@ -549,8 +549,8 @@ const Hn = /* @__PURE__ */ er(tr, [["render", nr]]), Pn = /* @__PURE__ */ x({
|
|
|
549
549
|
}
|
|
550
550
|
});
|
|
551
551
|
return (n, a) => {
|
|
552
|
-
const o =
|
|
553
|
-
return
|
|
552
|
+
const o = Ht;
|
|
553
|
+
return h(), b("div", {
|
|
554
554
|
class: y(["flex gap-2", [
|
|
555
555
|
{
|
|
556
556
|
"flex-row-reverse": n.position === "right",
|
|
@@ -558,26 +558,26 @@ const Hn = /* @__PURE__ */ er(tr, [["render", nr]]), Pn = /* @__PURE__ */ x({
|
|
|
558
558
|
}
|
|
559
559
|
]])
|
|
560
560
|
}, [
|
|
561
|
-
n.$slots.avatar ?
|
|
561
|
+
n.$slots.avatar ? k(n.$slots, "avatar", { key: 0 }) : n.avatar ? (h(), P(o, {
|
|
562
562
|
key: 1,
|
|
563
563
|
src: n.avatar
|
|
564
564
|
}, null, 8, ["src"])) : T("", !0),
|
|
565
|
-
|
|
565
|
+
w("div", {
|
|
566
566
|
class: y(["rounded-xl px-3 py-2 transition-background-color,border-color", [
|
|
567
567
|
{
|
|
568
568
|
"rounded-tr": n.position === "right",
|
|
569
569
|
"rounded-tl": n.position === "left",
|
|
570
570
|
border: n.withBorder
|
|
571
571
|
},
|
|
572
|
-
|
|
572
|
+
c(r)
|
|
573
573
|
]])
|
|
574
574
|
}, [
|
|
575
|
-
|
|
575
|
+
k(n.$slots, "default")
|
|
576
576
|
], 2)
|
|
577
577
|
], 2);
|
|
578
578
|
};
|
|
579
579
|
}
|
|
580
|
-
}),
|
|
580
|
+
}), lr = { class: "w-full flex self-center gap-2 text-center" }, Fn = /* @__PURE__ */ x({
|
|
581
581
|
__name: "ChatSystem",
|
|
582
582
|
props: {
|
|
583
583
|
position: {},
|
|
@@ -586,7 +586,7 @@ const Hn = /* @__PURE__ */ er(tr, [["render", nr]]), Pn = /* @__PURE__ */ x({
|
|
|
586
586
|
withBorder: { type: Boolean, default: !1 }
|
|
587
587
|
},
|
|
588
588
|
setup(e) {
|
|
589
|
-
const t = e, r =
|
|
589
|
+
const t = e, r = m(() => {
|
|
590
590
|
switch (t.variant) {
|
|
591
591
|
case "default":
|
|
592
592
|
return "bg-surface-base";
|
|
@@ -605,19 +605,19 @@ const Hn = /* @__PURE__ */ er(tr, [["render", nr]]), Pn = /* @__PURE__ */ x({
|
|
|
605
605
|
return "bg-transparent";
|
|
606
606
|
}
|
|
607
607
|
});
|
|
608
|
-
return (n, a) => (
|
|
609
|
-
|
|
608
|
+
return (n, a) => (h(), b("div", lr, [
|
|
609
|
+
w("div", {
|
|
610
610
|
class: y(["w-full rounded-xl px-3 py-2 transition-background-color,border-color", [
|
|
611
|
-
|
|
611
|
+
c(r)
|
|
612
612
|
]])
|
|
613
613
|
}, [
|
|
614
|
-
|
|
614
|
+
k(n.$slots, "default")
|
|
615
615
|
], 2)
|
|
616
616
|
]));
|
|
617
617
|
}
|
|
618
|
-
}),
|
|
618
|
+
}), Ln = /* @__PURE__ */ x({
|
|
619
619
|
__name: "Chip",
|
|
620
|
-
props: /* @__PURE__ */
|
|
620
|
+
props: /* @__PURE__ */ j({
|
|
621
621
|
is: { default: "img" },
|
|
622
622
|
src: {},
|
|
623
623
|
size: { default: "md" },
|
|
@@ -630,7 +630,7 @@ const Hn = /* @__PURE__ */ er(tr, [["render", nr]]), Pn = /* @__PURE__ */ x({
|
|
|
630
630
|
}),
|
|
631
631
|
emits: ["update:modelValue"],
|
|
632
632
|
setup(e) {
|
|
633
|
-
const t = e, r =
|
|
633
|
+
const t = e, r = U(e, "modelValue"), n = G(t), a = m(() => {
|
|
634
634
|
switch (t.size) {
|
|
635
635
|
case "sm":
|
|
636
636
|
return "px-3 text-sm h-6";
|
|
@@ -639,18 +639,18 @@ const Hn = /* @__PURE__ */ er(tr, [["render", nr]]), Pn = /* @__PURE__ */ x({
|
|
|
639
639
|
case "lg":
|
|
640
640
|
return "px-8 h-10 text-lg";
|
|
641
641
|
}
|
|
642
|
-
}), o =
|
|
643
|
-
return (
|
|
644
|
-
class: y(["inline-flex items-center gap-1", [
|
|
645
|
-
style: C([
|
|
646
|
-
onPointerup:
|
|
642
|
+
}), o = m(() => r.value ? "container-filled-primary border-transparent" : "container-base"), s = m(() => r.value !== void 0), i = m(() => s.value ? "cursor-pointer" : "");
|
|
643
|
+
return (l, u) => (h(), b("span", {
|
|
644
|
+
class: y(["inline-flex items-center gap-1", [c(n).class, c(a), c(o), c(i)]]),
|
|
645
|
+
style: C([c(n).style]),
|
|
646
|
+
onPointerup: u[0] || (u[0] = (d) => c(s) && (r.value = !r.value))
|
|
647
647
|
}, [
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
648
|
+
l.$slots.leftSection ? k(l.$slots, "leftSection", { key: 0 }) : T("", !0),
|
|
649
|
+
k(l.$slots, "default"),
|
|
650
|
+
l.$slots.rightSection ? k(l.$slots, "rightSection", { key: 1 }) : T("", !0)
|
|
651
651
|
], 38));
|
|
652
652
|
}
|
|
653
|
-
}),
|
|
653
|
+
}), ir = /* @__PURE__ */ x({
|
|
654
654
|
__name: "ColorSwatch",
|
|
655
655
|
props: {
|
|
656
656
|
color: {},
|
|
@@ -658,7 +658,7 @@ const Hn = /* @__PURE__ */ er(tr, [["render", nr]]), Pn = /* @__PURE__ */ x({
|
|
|
658
658
|
withBorder: { type: Boolean, default: !1 }
|
|
659
659
|
},
|
|
660
660
|
setup(e) {
|
|
661
|
-
return (t, r) => (
|
|
661
|
+
return (t, r) => (h(), P(ue(t.is), {
|
|
662
662
|
class: y(["h-6 w-6 border rounded-full", [{
|
|
663
663
|
"border border-surface-border-base": t.withBorder,
|
|
664
664
|
"border border-transparent": !t.withBorder
|
|
@@ -669,21 +669,21 @@ const Hn = /* @__PURE__ */ er(tr, [["render", nr]]), Pn = /* @__PURE__ */ x({
|
|
|
669
669
|
}, null, 8, ["class", "style"]));
|
|
670
670
|
}
|
|
671
671
|
});
|
|
672
|
-
function
|
|
672
|
+
function $e(e) {
|
|
673
673
|
"@babel/helpers - typeof";
|
|
674
|
-
return
|
|
674
|
+
return $e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
675
675
|
return typeof t;
|
|
676
676
|
} : function(t) {
|
|
677
677
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
678
|
-
},
|
|
678
|
+
}, $e(e);
|
|
679
679
|
}
|
|
680
|
-
var
|
|
680
|
+
var cr = /^\s+/, ur = /\s+$/;
|
|
681
681
|
function p(e, t) {
|
|
682
682
|
if (e = e || "", t = t || {}, e instanceof p)
|
|
683
683
|
return e;
|
|
684
684
|
if (!(this instanceof p))
|
|
685
685
|
return new p(e, t);
|
|
686
|
-
var r =
|
|
686
|
+
var r = dr(e);
|
|
687
687
|
this._originalInput = e, this._r = r.r, this._g = r.g, this._b = r.b, this._a = r.a, this._roundA = Math.round(100 * this._a) / 100, this._format = t.format || r.format, this._gradientType = t.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = r.ok;
|
|
688
688
|
}
|
|
689
689
|
p.prototype = {
|
|
@@ -710,11 +710,11 @@ p.prototype = {
|
|
|
710
710
|
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
|
|
711
711
|
},
|
|
712
712
|
getLuminance: function() {
|
|
713
|
-
var t = this.toRgb(), r, n, a, o, s,
|
|
714
|
-
return r = t.r / 255, n = t.g / 255, a = t.b / 255, r <= 0.03928 ? o = r / 12.92 : o = Math.pow((r + 0.055) / 1.055, 2.4), n <= 0.03928 ? s = n / 12.92 : s = Math.pow((n + 0.055) / 1.055, 2.4), a <= 0.03928 ?
|
|
713
|
+
var t = this.toRgb(), r, n, a, o, s, i;
|
|
714
|
+
return r = t.r / 255, n = t.g / 255, a = t.b / 255, r <= 0.03928 ? o = r / 12.92 : o = Math.pow((r + 0.055) / 1.055, 2.4), n <= 0.03928 ? s = n / 12.92 : s = Math.pow((n + 0.055) / 1.055, 2.4), a <= 0.03928 ? i = a / 12.92 : i = Math.pow((a + 0.055) / 1.055, 2.4), 0.2126 * o + 0.7152 * s + 0.0722 * i;
|
|
715
715
|
},
|
|
716
716
|
setAlpha: function(t) {
|
|
717
|
-
return this._a =
|
|
717
|
+
return this._a = st(t), this._roundA = Math.round(100 * this._a) / 100, this;
|
|
718
718
|
},
|
|
719
719
|
toHsv: function() {
|
|
720
720
|
var t = qe(this._r, this._g, this._b);
|
|
@@ -730,7 +730,7 @@ p.prototype = {
|
|
|
730
730
|
return this._a == 1 ? "hsv(" + r + ", " + n + "%, " + a + "%)" : "hsva(" + r + ", " + n + "%, " + a + "%, " + this._roundA + ")";
|
|
731
731
|
},
|
|
732
732
|
toHsl: function() {
|
|
733
|
-
var t =
|
|
733
|
+
var t = Ge(this._r, this._g, this._b);
|
|
734
734
|
return {
|
|
735
735
|
h: t.h * 360,
|
|
736
736
|
s: t.s,
|
|
@@ -739,7 +739,7 @@ p.prototype = {
|
|
|
739
739
|
};
|
|
740
740
|
},
|
|
741
741
|
toHslString: function() {
|
|
742
|
-
var t =
|
|
742
|
+
var t = Ge(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), a = Math.round(t.l * 100);
|
|
743
743
|
return this._a == 1 ? "hsl(" + r + ", " + n + "%, " + a + "%)" : "hsla(" + r + ", " + n + "%, " + a + "%, " + this._roundA + ")";
|
|
744
744
|
},
|
|
745
745
|
toHex: function(t) {
|
|
@@ -749,7 +749,7 @@ p.prototype = {
|
|
|
749
749
|
return "#" + this.toHex(t);
|
|
750
750
|
},
|
|
751
751
|
toHex8: function(t) {
|
|
752
|
-
return
|
|
752
|
+
return mr(this._r, this._g, this._b, this._a, t);
|
|
753
753
|
},
|
|
754
754
|
toHex8String: function(t) {
|
|
755
755
|
return "#" + this.toHex8(t);
|
|
@@ -767,17 +767,17 @@ p.prototype = {
|
|
|
767
767
|
},
|
|
768
768
|
toPercentageRgb: function() {
|
|
769
769
|
return {
|
|
770
|
-
r: Math.round(
|
|
771
|
-
g: Math.round(
|
|
772
|
-
b: Math.round(
|
|
770
|
+
r: Math.round(M(this._r, 255) * 100) + "%",
|
|
771
|
+
g: Math.round(M(this._g, 255) * 100) + "%",
|
|
772
|
+
b: Math.round(M(this._b, 255) * 100) + "%",
|
|
773
773
|
a: this._a
|
|
774
774
|
};
|
|
775
775
|
},
|
|
776
776
|
toPercentageRgbString: function() {
|
|
777
|
-
return this._a == 1 ? "rgb(" + Math.round(
|
|
777
|
+
return this._a == 1 ? "rgb(" + Math.round(M(this._r, 255) * 100) + "%, " + Math.round(M(this._g, 255) * 100) + "%, " + Math.round(M(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(M(this._r, 255) * 100) + "%, " + Math.round(M(this._g, 255) * 100) + "%, " + Math.round(M(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
|
778
778
|
},
|
|
779
779
|
toName: function() {
|
|
780
|
-
return this._a === 0 ? "transparent" : this._a < 1 ? !1 :
|
|
780
|
+
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : Cr[Xe(this._r, this._g, this._b, !0)] || !1;
|
|
781
781
|
},
|
|
782
782
|
toFilter: function(t) {
|
|
783
783
|
var r = "#" + Ye(this._r, this._g, this._b, this._a), n = r, a = this._gradientType ? "GradientType = 1, " : "";
|
|
@@ -801,40 +801,40 @@ p.prototype = {
|
|
|
801
801
|
return this._r = n._r, this._g = n._g, this._b = n._b, this.setAlpha(n._a), this;
|
|
802
802
|
},
|
|
803
803
|
lighten: function() {
|
|
804
|
-
return this._applyModification(
|
|
804
|
+
return this._applyModification(yr, arguments);
|
|
805
805
|
},
|
|
806
806
|
brighten: function() {
|
|
807
|
-
return this._applyModification(
|
|
807
|
+
return this._applyModification(wr, arguments);
|
|
808
808
|
},
|
|
809
809
|
darken: function() {
|
|
810
|
-
return this._applyModification(
|
|
810
|
+
return this._applyModification(_r, arguments);
|
|
811
811
|
},
|
|
812
812
|
desaturate: function() {
|
|
813
|
-
return this._applyModification(
|
|
813
|
+
return this._applyModification(vr, arguments);
|
|
814
814
|
},
|
|
815
815
|
saturate: function() {
|
|
816
|
-
return this._applyModification(
|
|
816
|
+
return this._applyModification(br, arguments);
|
|
817
817
|
},
|
|
818
818
|
greyscale: function() {
|
|
819
|
-
return this._applyModification(
|
|
819
|
+
return this._applyModification(gr, arguments);
|
|
820
820
|
},
|
|
821
821
|
spin: function() {
|
|
822
|
-
return this._applyModification(
|
|
822
|
+
return this._applyModification(xr, arguments);
|
|
823
823
|
},
|
|
824
824
|
_applyCombination: function(t, r) {
|
|
825
825
|
return t.apply(null, [this].concat([].slice.call(r)));
|
|
826
826
|
},
|
|
827
827
|
analogous: function() {
|
|
828
|
-
return this._applyCombination(
|
|
828
|
+
return this._applyCombination(Mr, arguments);
|
|
829
829
|
},
|
|
830
830
|
complement: function() {
|
|
831
|
-
return this._applyCombination(
|
|
831
|
+
return this._applyCombination(kr, arguments);
|
|
832
832
|
},
|
|
833
833
|
monochromatic: function() {
|
|
834
|
-
return this._applyCombination(
|
|
834
|
+
return this._applyCombination($r, arguments);
|
|
835
835
|
},
|
|
836
836
|
splitcomplement: function() {
|
|
837
|
-
return this._applyCombination(
|
|
837
|
+
return this._applyCombination(Sr, arguments);
|
|
838
838
|
},
|
|
839
839
|
// Disabled until https://github.com/bgrins/TinyColor/issues/254
|
|
840
840
|
// polyad: function (number) {
|
|
@@ -848,52 +848,52 @@ p.prototype = {
|
|
|
848
848
|
}
|
|
849
849
|
};
|
|
850
850
|
p.fromRatio = function(e, t) {
|
|
851
|
-
if (
|
|
851
|
+
if ($e(e) == "object") {
|
|
852
852
|
var r = {};
|
|
853
853
|
for (var n in e)
|
|
854
|
-
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] =
|
|
854
|
+
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] = me(e[n]));
|
|
855
855
|
e = r;
|
|
856
856
|
}
|
|
857
857
|
return p(e, t);
|
|
858
858
|
};
|
|
859
|
-
function
|
|
859
|
+
function dr(e) {
|
|
860
860
|
var t = {
|
|
861
861
|
r: 0,
|
|
862
862
|
g: 0,
|
|
863
863
|
b: 0
|
|
864
|
-
}, r = 1, n = null, a = null, o = null, s = !1,
|
|
865
|
-
return typeof e == "string" && (e =
|
|
864
|
+
}, r = 1, n = null, a = null, o = null, s = !1, i = !1;
|
|
865
|
+
return typeof e == "string" && (e = Er(e)), $e(e) == "object" && (q(e.r) && q(e.g) && q(e.b) ? (t = fr(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : q(e.h) && q(e.s) && q(e.v) ? (n = me(e.s), a = me(e.v), t = pr(e.h, n, a), s = !0, i = "hsv") : q(e.h) && q(e.s) && q(e.l) && (n = me(e.s), o = me(e.l), t = hr(e.h, n, o), s = !0, i = "hsl"), e.hasOwnProperty("a") && (r = e.a)), r = st(r), {
|
|
866
866
|
ok: s,
|
|
867
|
-
format: e.format ||
|
|
867
|
+
format: e.format || i,
|
|
868
868
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
869
869
|
g: Math.min(255, Math.max(t.g, 0)),
|
|
870
870
|
b: Math.min(255, Math.max(t.b, 0)),
|
|
871
871
|
a: r
|
|
872
872
|
};
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function fr(e, t, r) {
|
|
875
875
|
return {
|
|
876
|
-
r:
|
|
877
|
-
g:
|
|
878
|
-
b:
|
|
876
|
+
r: M(e, 255) * 255,
|
|
877
|
+
g: M(t, 255) * 255,
|
|
878
|
+
b: M(r, 255) * 255
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
e =
|
|
883
|
-
var n = Math.max(e, t, r), a = Math.min(e, t, r), o, s,
|
|
881
|
+
function Ge(e, t, r) {
|
|
882
|
+
e = M(e, 255), t = M(t, 255), r = M(r, 255);
|
|
883
|
+
var n = Math.max(e, t, r), a = Math.min(e, t, r), o, s, i = (n + a) / 2;
|
|
884
884
|
if (n == a)
|
|
885
885
|
o = s = 0;
|
|
886
886
|
else {
|
|
887
|
-
var
|
|
888
|
-
switch (s =
|
|
887
|
+
var l = n - a;
|
|
888
|
+
switch (s = i > 0.5 ? l / (2 - n - a) : l / (n + a), n) {
|
|
889
889
|
case e:
|
|
890
|
-
o = (t - r) /
|
|
890
|
+
o = (t - r) / l + (t < r ? 6 : 0);
|
|
891
891
|
break;
|
|
892
892
|
case t:
|
|
893
|
-
o = (r - e) /
|
|
893
|
+
o = (r - e) / l + 2;
|
|
894
894
|
break;
|
|
895
895
|
case r:
|
|
896
|
-
o = (e - t) /
|
|
896
|
+
o = (e - t) / l + 4;
|
|
897
897
|
break;
|
|
898
898
|
}
|
|
899
899
|
o /= 6;
|
|
@@ -901,20 +901,20 @@ function Ue(e, t, r) {
|
|
|
901
901
|
return {
|
|
902
902
|
h: o,
|
|
903
903
|
s,
|
|
904
|
-
l
|
|
904
|
+
l: i
|
|
905
905
|
};
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function hr(e, t, r) {
|
|
908
908
|
var n, a, o;
|
|
909
|
-
e =
|
|
910
|
-
function s(
|
|
911
|
-
return f < 0 && (f += 1), f > 1 && (f -= 1), f < 1 / 6 ?
|
|
909
|
+
e = M(e, 360), t = M(t, 100), r = M(r, 100);
|
|
910
|
+
function s(u, d, f) {
|
|
911
|
+
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;
|
|
912
912
|
}
|
|
913
913
|
if (t === 0)
|
|
914
914
|
n = a = o = r;
|
|
915
915
|
else {
|
|
916
|
-
var
|
|
917
|
-
n = s(
|
|
916
|
+
var i = r < 0.5 ? r * (1 + t) : r + t - r * t, l = 2 * r - i;
|
|
917
|
+
n = s(l, i, e + 1 / 3), a = s(l, i, e), o = s(l, i, e - 1 / 3);
|
|
918
918
|
}
|
|
919
919
|
return {
|
|
920
920
|
r: n * 255,
|
|
@@ -923,20 +923,20 @@ function ur(e, t, r) {
|
|
|
923
923
|
};
|
|
924
924
|
}
|
|
925
925
|
function qe(e, t, r) {
|
|
926
|
-
e =
|
|
927
|
-
var n = Math.max(e, t, r), a = Math.min(e, t, r), o, s,
|
|
928
|
-
if (s = n === 0 ? 0 :
|
|
926
|
+
e = M(e, 255), t = M(t, 255), r = M(r, 255);
|
|
927
|
+
var n = Math.max(e, t, r), a = Math.min(e, t, r), o, s, i = n, l = n - a;
|
|
928
|
+
if (s = n === 0 ? 0 : l / n, n == a)
|
|
929
929
|
o = 0;
|
|
930
930
|
else {
|
|
931
931
|
switch (n) {
|
|
932
932
|
case e:
|
|
933
|
-
o = (t - r) /
|
|
933
|
+
o = (t - r) / l + (t < r ? 6 : 0);
|
|
934
934
|
break;
|
|
935
935
|
case t:
|
|
936
|
-
o = (r - e) /
|
|
936
|
+
o = (r - e) / l + 2;
|
|
937
937
|
break;
|
|
938
938
|
case r:
|
|
939
|
-
o = (e - t) /
|
|
939
|
+
o = (e - t) / l + 4;
|
|
940
940
|
break;
|
|
941
941
|
}
|
|
942
942
|
o /= 6;
|
|
@@ -944,14 +944,14 @@ function qe(e, t, r) {
|
|
|
944
944
|
return {
|
|
945
945
|
h: o,
|
|
946
946
|
s,
|
|
947
|
-
v:
|
|
947
|
+
v: i
|
|
948
948
|
};
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
e =
|
|
952
|
-
var n = Math.floor(e), a = e - n, o = r * (1 - t), s = r * (1 - a * t),
|
|
950
|
+
function pr(e, t, r) {
|
|
951
|
+
e = M(e, 360) * 6, t = M(t, 100), r = M(r, 100);
|
|
952
|
+
var n = Math.floor(e), a = e - n, o = r * (1 - t), s = r * (1 - a * t), i = r * (1 - (1 - a) * t), l = n % 6, u = [r, s, o, o, i, r][l], d = [i, r, r, s, o, o][l], f = [o, o, i, r, r, s][l];
|
|
953
953
|
return {
|
|
954
|
-
r:
|
|
954
|
+
r: u * 255,
|
|
955
955
|
g: d * 255,
|
|
956
956
|
b: f * 255
|
|
957
957
|
};
|
|
@@ -960,12 +960,12 @@ function Xe(e, t, r, n) {
|
|
|
960
960
|
var a = [D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16))];
|
|
961
961
|
return n && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join("");
|
|
962
962
|
}
|
|
963
|
-
function
|
|
964
|
-
var o = [D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16)), D(
|
|
963
|
+
function mr(e, t, r, n, a) {
|
|
964
|
+
var o = [D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16)), D(lt(n))];
|
|
965
965
|
return a && o[0].charAt(0) == o[0].charAt(1) && o[1].charAt(0) == o[1].charAt(1) && o[2].charAt(0) == o[2].charAt(1) && o[3].charAt(0) == o[3].charAt(1) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join("");
|
|
966
966
|
}
|
|
967
967
|
function Ye(e, t, r, n) {
|
|
968
|
-
var a = [D(
|
|
968
|
+
var a = [D(lt(n)), D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16))];
|
|
969
969
|
return a.join("");
|
|
970
970
|
}
|
|
971
971
|
p.equals = function(e, t) {
|
|
@@ -978,39 +978,39 @@ p.random = function() {
|
|
|
978
978
|
b: Math.random()
|
|
979
979
|
});
|
|
980
980
|
};
|
|
981
|
-
function
|
|
981
|
+
function vr(e, t) {
|
|
982
982
|
t = t === 0 ? 0 : t || 10;
|
|
983
983
|
var r = p(e).toHsl();
|
|
984
|
-
return r.s -= t / 100, r.s =
|
|
984
|
+
return r.s -= t / 100, r.s = Ee(r.s), p(r);
|
|
985
985
|
}
|
|
986
|
-
function
|
|
986
|
+
function br(e, t) {
|
|
987
987
|
t = t === 0 ? 0 : t || 10;
|
|
988
988
|
var r = p(e).toHsl();
|
|
989
|
-
return r.s += t / 100, r.s =
|
|
989
|
+
return r.s += t / 100, r.s = Ee(r.s), p(r);
|
|
990
990
|
}
|
|
991
|
-
function
|
|
991
|
+
function gr(e) {
|
|
992
992
|
return p(e).desaturate(100);
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function yr(e, t) {
|
|
995
995
|
t = t === 0 ? 0 : t || 10;
|
|
996
996
|
var r = p(e).toHsl();
|
|
997
|
-
return r.l += t / 100, r.l =
|
|
997
|
+
return r.l += t / 100, r.l = Ee(r.l), p(r);
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function wr(e, t) {
|
|
1000
1000
|
t = t === 0 ? 0 : t || 10;
|
|
1001
1001
|
var r = p(e).toRgb();
|
|
1002
1002
|
return r.r = Math.max(0, Math.min(255, r.r - Math.round(255 * -(t / 100)))), r.g = Math.max(0, Math.min(255, r.g - Math.round(255 * -(t / 100)))), r.b = Math.max(0, Math.min(255, r.b - Math.round(255 * -(t / 100)))), p(r);
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function _r(e, t) {
|
|
1005
1005
|
t = t === 0 ? 0 : t || 10;
|
|
1006
1006
|
var r = p(e).toHsl();
|
|
1007
|
-
return r.l -= t / 100, r.l =
|
|
1007
|
+
return r.l -= t / 100, r.l = Ee(r.l), p(r);
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function xr(e, t) {
|
|
1010
1010
|
var r = p(e).toHsl(), n = (r.h + t) % 360;
|
|
1011
1011
|
return r.h = n < 0 ? 360 + n : n, p(r);
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function kr(e) {
|
|
1014
1014
|
var t = p(e).toHsl();
|
|
1015
1015
|
return t.h = (t.h + 180) % 360, p(t);
|
|
1016
1016
|
}
|
|
@@ -1025,7 +1025,7 @@ function Ze(e, t) {
|
|
|
1025
1025
|
}));
|
|
1026
1026
|
return n;
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function Sr(e) {
|
|
1029
1029
|
var t = p(e).toHsl(), r = t.h;
|
|
1030
1030
|
return [p(e), p({
|
|
1031
1031
|
h: (r + 72) % 360,
|
|
@@ -1037,21 +1037,21 @@ function _r(e) {
|
|
|
1037
1037
|
l: t.l
|
|
1038
1038
|
})];
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function Mr(e, t, r) {
|
|
1041
1041
|
t = t || 6, r = r || 30;
|
|
1042
1042
|
var n = p(e).toHsl(), a = 360 / r, o = [p(e)];
|
|
1043
1043
|
for (n.h = (n.h - (a * t >> 1) + 720) % 360; --t; )
|
|
1044
1044
|
n.h = (n.h + a) % 360, o.push(p(n));
|
|
1045
1045
|
return o;
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function $r(e, t) {
|
|
1048
1048
|
t = t || 6;
|
|
1049
|
-
for (var r = p(e).toHsv(), n = r.h, a = r.s, o = r.v, s = [],
|
|
1049
|
+
for (var r = p(e).toHsv(), n = r.h, a = r.s, o = r.v, s = [], i = 1 / t; t--; )
|
|
1050
1050
|
s.push(p({
|
|
1051
1051
|
h: n,
|
|
1052
1052
|
s: a,
|
|
1053
1053
|
v: o
|
|
1054
|
-
})), o = (o +
|
|
1054
|
+
})), o = (o + i) % 1;
|
|
1055
1055
|
return s;
|
|
1056
1056
|
}
|
|
1057
1057
|
p.mix = function(e, t, r) {
|
|
@@ -1070,7 +1070,7 @@ p.readability = function(e, t) {
|
|
|
1070
1070
|
};
|
|
1071
1071
|
p.isReadable = function(e, t, r) {
|
|
1072
1072
|
var n = p.readability(e, t), a, o;
|
|
1073
|
-
switch (o = !1, a =
|
|
1073
|
+
switch (o = !1, a = Rr(r), a.level + a.size) {
|
|
1074
1074
|
case "AAsmall":
|
|
1075
1075
|
case "AAAlarge":
|
|
1076
1076
|
o = n >= 4.5;
|
|
@@ -1085,16 +1085,16 @@ p.isReadable = function(e, t, r) {
|
|
|
1085
1085
|
return o;
|
|
1086
1086
|
};
|
|
1087
1087
|
p.mostReadable = function(e, t, r) {
|
|
1088
|
-
var n = null, a = 0, o, s,
|
|
1089
|
-
r = r || {}, s = r.includeFallbackColors,
|
|
1090
|
-
for (var
|
|
1091
|
-
o = p.readability(e, t[
|
|
1088
|
+
var n = null, a = 0, o, s, i, l;
|
|
1089
|
+
r = r || {}, s = r.includeFallbackColors, i = r.level, l = r.size;
|
|
1090
|
+
for (var u = 0; u < t.length; u++)
|
|
1091
|
+
o = p.readability(e, t[u]), o > a && (a = o, n = p(t[u]));
|
|
1092
1092
|
return p.isReadable(e, n, {
|
|
1093
|
-
level:
|
|
1094
|
-
size:
|
|
1093
|
+
level: i,
|
|
1094
|
+
size: l
|
|
1095
1095
|
}) || !s ? n : (r.includeFallbackColors = !1, p.mostReadable(e, ["#fff", "#000"], r));
|
|
1096
1096
|
};
|
|
1097
|
-
var
|
|
1097
|
+
var He = p.names = {
|
|
1098
1098
|
aliceblue: "f0f8ff",
|
|
1099
1099
|
antiquewhite: "faebd7",
|
|
1100
1100
|
aqua: "0ff",
|
|
@@ -1244,40 +1244,40 @@ var Be = p.names = {
|
|
|
1244
1244
|
whitesmoke: "f5f5f5",
|
|
1245
1245
|
yellow: "ff0",
|
|
1246
1246
|
yellowgreen: "9acd32"
|
|
1247
|
-
},
|
|
1248
|
-
function
|
|
1247
|
+
}, Cr = p.hexNames = Ar(He);
|
|
1248
|
+
function Ar(e) {
|
|
1249
1249
|
var t = {};
|
|
1250
1250
|
for (var r in e)
|
|
1251
1251
|
e.hasOwnProperty(r) && (t[e[r]] = r);
|
|
1252
1252
|
return t;
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function st(e) {
|
|
1255
1255
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
|
|
1259
|
-
var r =
|
|
1257
|
+
function M(e, t) {
|
|
1258
|
+
Tr(e) && (e = "100%");
|
|
1259
|
+
var r = zr(e);
|
|
1260
1260
|
return e = Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(e * t, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / parseFloat(t);
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1262
|
+
function Ee(e) {
|
|
1263
1263
|
return Math.min(1, Math.max(0, e));
|
|
1264
1264
|
}
|
|
1265
1265
|
function H(e) {
|
|
1266
1266
|
return parseInt(e, 16);
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function Tr(e) {
|
|
1269
1269
|
return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function zr(e) {
|
|
1272
1272
|
return typeof e == "string" && e.indexOf("%") != -1;
|
|
1273
1273
|
}
|
|
1274
1274
|
function D(e) {
|
|
1275
1275
|
return e.length == 1 ? "0" + e : "" + e;
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function me(e) {
|
|
1278
1278
|
return e <= 1 && (e = e * 100 + "%"), e;
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function lt(e) {
|
|
1281
1281
|
return Math.round(parseFloat(e) * 255).toString(16);
|
|
1282
1282
|
}
|
|
1283
1283
|
function Ke(e) {
|
|
@@ -1299,14 +1299,14 @@ var V = function() {
|
|
|
1299
1299
|
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1300
1300
|
};
|
|
1301
1301
|
}();
|
|
1302
|
-
function
|
|
1302
|
+
function q(e) {
|
|
1303
1303
|
return !!V.CSS_UNIT.exec(e);
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1306
|
-
e = e.replace(
|
|
1305
|
+
function Er(e) {
|
|
1306
|
+
e = e.replace(cr, "").replace(ur, "").toLowerCase();
|
|
1307
1307
|
var t = !1;
|
|
1308
|
-
if (
|
|
1309
|
-
e =
|
|
1308
|
+
if (He[e])
|
|
1309
|
+
e = He[e], t = !0;
|
|
1310
1310
|
else if (e == "transparent")
|
|
1311
1311
|
return {
|
|
1312
1312
|
r: 0,
|
|
@@ -1367,7 +1367,7 @@ function Ar(e) {
|
|
|
1367
1367
|
format: t ? "name" : "hex"
|
|
1368
1368
|
} : !1;
|
|
1369
1369
|
}
|
|
1370
|
-
function
|
|
1370
|
+
function Rr(e) {
|
|
1371
1371
|
var t, r;
|
|
1372
1372
|
return e = e || {
|
|
1373
1373
|
level: "AA",
|
|
@@ -1377,10 +1377,10 @@ function Tr(e) {
|
|
|
1377
1377
|
size: r
|
|
1378
1378
|
};
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1381
|
-
if (!
|
|
1382
|
-
return
|
|
1383
|
-
const e =
|
|
1380
|
+
function Br() {
|
|
1381
|
+
if (!Q)
|
|
1382
|
+
return g("dark");
|
|
1383
|
+
const e = g(document.documentElement.dataset.scheme);
|
|
1384
1384
|
return new MutationObserver((r) => {
|
|
1385
1385
|
r.forEach((n) => {
|
|
1386
1386
|
n.type === "attributes" && n.attributeName === "data-scheme" && (e.value = document.documentElement.dataset.scheme);
|
|
@@ -1390,37 +1390,37 @@ function Er() {
|
|
|
1390
1390
|
attributeFilter: ["data-scheme"]
|
|
1391
1391
|
}), e;
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1394
|
-
return
|
|
1393
|
+
function Wn() {
|
|
1394
|
+
return be("currentThemeScheme", null);
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1397
|
-
return
|
|
1396
|
+
function Or() {
|
|
1397
|
+
return be("currentTheme", g(Ie));
|
|
1398
1398
|
}
|
|
1399
1399
|
function it(e, t = !0) {
|
|
1400
|
-
const r =
|
|
1400
|
+
const r = g(e), n = g(e.scheme), a = Br();
|
|
1401
1401
|
F(() => {
|
|
1402
1402
|
a.value && (n.value = a.value);
|
|
1403
|
-
}),
|
|
1403
|
+
}), ge("currentTheme", r), ge("currentThemeScheme", n);
|
|
1404
1404
|
const s = {
|
|
1405
|
-
...Object.keys(r.value.colors).map((
|
|
1406
|
-
const d =
|
|
1407
|
-
return r.value.colors[d].reduce((
|
|
1408
|
-
const
|
|
1409
|
-
return
|
|
1405
|
+
...Object.keys(r.value.colors).map((u) => {
|
|
1406
|
+
const d = u;
|
|
1407
|
+
return r.value.colors[d].reduce((v, S, A) => {
|
|
1408
|
+
const z = p(S).toRgb();
|
|
1409
|
+
return v[`--r-color-${d}-${A}`] = `${z.r} ${z.g} ${z.b}`, v;
|
|
1410
1410
|
}, {});
|
|
1411
|
-
}).reduce((
|
|
1412
|
-
...
|
|
1411
|
+
}).reduce((u, d) => ({
|
|
1412
|
+
...u,
|
|
1413
1413
|
...d
|
|
1414
1414
|
}), {})
|
|
1415
|
-
},
|
|
1415
|
+
}, i = {
|
|
1416
1416
|
"font-family": "'Roboto', sans-serif",
|
|
1417
1417
|
"background-color": "rgb(var(--r-color-surface-lowest))",
|
|
1418
1418
|
color: "rgb(var(--r-color-surface-on))"
|
|
1419
|
-
},
|
|
1419
|
+
}, l = m(() => {
|
|
1420
1420
|
if (t)
|
|
1421
1421
|
return {};
|
|
1422
|
-
const { scheme:
|
|
1423
|
-
switch (
|
|
1422
|
+
const { scheme: u } = e;
|
|
1423
|
+
switch (u) {
|
|
1424
1424
|
case "dark":
|
|
1425
1425
|
return {
|
|
1426
1426
|
colorScheme: "dark",
|
|
@@ -1477,21 +1477,21 @@ function it(e, t = !0) {
|
|
|
1477
1477
|
});
|
|
1478
1478
|
return {
|
|
1479
1479
|
...s,
|
|
1480
|
-
...
|
|
1481
|
-
...
|
|
1480
|
+
...i,
|
|
1481
|
+
...l.value
|
|
1482
1482
|
};
|
|
1483
1483
|
}
|
|
1484
|
-
function
|
|
1485
|
-
const t =
|
|
1486
|
-
return
|
|
1484
|
+
function ct(e) {
|
|
1485
|
+
const t = g("");
|
|
1486
|
+
return ee(() => {
|
|
1487
1487
|
e.id ? t.value = e.id : t.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
|
|
1488
1488
|
}), t;
|
|
1489
1489
|
}
|
|
1490
|
-
const
|
|
1491
|
-
function
|
|
1492
|
-
return
|
|
1490
|
+
const ut = Symbol("scheme");
|
|
1491
|
+
function Hr() {
|
|
1492
|
+
return be(ut, g("dark"));
|
|
1493
1493
|
}
|
|
1494
|
-
const
|
|
1494
|
+
const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
1495
1495
|
__name: "ColorInput",
|
|
1496
1496
|
props: {
|
|
1497
1497
|
modelValue: {},
|
|
@@ -1499,47 +1499,47 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1499
1499
|
},
|
|
1500
1500
|
emits: ["update:modelValue"],
|
|
1501
1501
|
setup(e) {
|
|
1502
|
-
const t =
|
|
1502
|
+
const t = U(e, "modelValue"), r = $t(), n = ct(r), a = g(null);
|
|
1503
1503
|
return (o, s) => {
|
|
1504
|
-
const
|
|
1505
|
-
return
|
|
1506
|
-
|
|
1507
|
-
id:
|
|
1504
|
+
const i = ir;
|
|
1505
|
+
return h(), b("div", null, [
|
|
1506
|
+
Te(w("input", {
|
|
1507
|
+
id: c(n),
|
|
1508
1508
|
ref_key: "input",
|
|
1509
1509
|
ref: a,
|
|
1510
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
1510
|
+
"onUpdate:modelValue": s[0] || (s[0] = (l) => t.value = l),
|
|
1511
1511
|
type: "color",
|
|
1512
1512
|
class: "pointer-events-none absolute opacity-0"
|
|
1513
|
-
}, null, 8,
|
|
1514
|
-
[
|
|
1513
|
+
}, null, 8, Nr), [
|
|
1514
|
+
[Ct, t.value]
|
|
1515
1515
|
]),
|
|
1516
|
-
|
|
1517
|
-
|
|
1516
|
+
w("label", { for: c(n) }, [
|
|
1517
|
+
Z(i, {
|
|
1518
1518
|
class: "cursor-pointer",
|
|
1519
1519
|
color: t.value ?? "#222"
|
|
1520
1520
|
}, null, 8, ["color"])
|
|
1521
|
-
], 8,
|
|
1521
|
+
], 8, Pr)
|
|
1522
1522
|
]);
|
|
1523
1523
|
};
|
|
1524
1524
|
}
|
|
1525
|
-
}),
|
|
1525
|
+
}), Ir = ["data-scheme", "data-theme"], Vr = /* @__PURE__ */ x({
|
|
1526
1526
|
__name: "ThemeProvider",
|
|
1527
1527
|
props: {
|
|
1528
1528
|
theme: {}
|
|
1529
1529
|
},
|
|
1530
1530
|
setup(e) {
|
|
1531
1531
|
const r = it(e.theme, !1);
|
|
1532
|
-
return (n, a) => (
|
|
1533
|
-
style: C([
|
|
1532
|
+
return (n, a) => (h(), b("div", {
|
|
1533
|
+
style: C([c(r)]),
|
|
1534
1534
|
"data-scheme": n.theme.scheme,
|
|
1535
1535
|
"data-theme": n.theme.name
|
|
1536
1536
|
}, [
|
|
1537
|
-
|
|
1538
|
-
], 12,
|
|
1537
|
+
k(n.$slots, "default")
|
|
1538
|
+
], 12, Ir));
|
|
1539
1539
|
}
|
|
1540
|
-
}),
|
|
1540
|
+
}), dt = /* @__PURE__ */ x({
|
|
1541
1541
|
__name: "FullscreenOverlay",
|
|
1542
|
-
props: /* @__PURE__ */
|
|
1542
|
+
props: /* @__PURE__ */ j({
|
|
1543
1543
|
persistent: { type: Boolean, default: !1 },
|
|
1544
1544
|
blur: { type: [String, Boolean], default: !1 },
|
|
1545
1545
|
wrapperClass: {}
|
|
@@ -1549,11 +1549,11 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1549
1549
|
}),
|
|
1550
1550
|
emits: ["update:modelValue"],
|
|
1551
1551
|
setup(e) {
|
|
1552
|
-
const t = e, r =
|
|
1553
|
-
function a(
|
|
1554
|
-
t.persistent ||
|
|
1552
|
+
const t = e, r = U(e, "modelValue"), n = g(null);
|
|
1553
|
+
function a(i) {
|
|
1554
|
+
t.persistent || i.target === n.value && (r.value = !1);
|
|
1555
1555
|
}
|
|
1556
|
-
const o =
|
|
1556
|
+
const o = m(() => {
|
|
1557
1557
|
switch (t.blur) {
|
|
1558
1558
|
case "sm":
|
|
1559
1559
|
return "backdrop-blur-sm";
|
|
@@ -1571,22 +1571,22 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1571
1571
|
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1572
1572
|
}, 300);
|
|
1573
1573
|
});
|
|
1574
|
-
const s =
|
|
1575
|
-
return (
|
|
1576
|
-
const
|
|
1577
|
-
return
|
|
1578
|
-
|
|
1574
|
+
const s = Or();
|
|
1575
|
+
return (i, l) => {
|
|
1576
|
+
const u = Vr;
|
|
1577
|
+
return h(), P(At, { to: "body" }, [
|
|
1578
|
+
Z(u, { theme: c(s) }, {
|
|
1579
1579
|
default: W(() => [
|
|
1580
|
-
|
|
1580
|
+
w("div", {
|
|
1581
1581
|
ref_key: "wrapperRef",
|
|
1582
1582
|
ref: n,
|
|
1583
|
-
class: y(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full bg-surface-lowest/50 transition-all duration-300 md:items-center", [o.value,
|
|
1583
|
+
class: y(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full bg-surface-lowest/50 transition-all duration-300 md:items-center", [o.value, i.wrapperClass, {
|
|
1584
1584
|
"op0 pointer-events-none": !r.value,
|
|
1585
1585
|
op100: r.value
|
|
1586
1586
|
}]]),
|
|
1587
1587
|
onClick: a
|
|
1588
1588
|
}, [
|
|
1589
|
-
|
|
1589
|
+
k(i.$slots, "default")
|
|
1590
1590
|
], 2)
|
|
1591
1591
|
]),
|
|
1592
1592
|
_: 3
|
|
@@ -1594,9 +1594,9 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1594
1594
|
]);
|
|
1595
1595
|
};
|
|
1596
1596
|
}
|
|
1597
|
-
}),
|
|
1597
|
+
}), Dr = { class: "flex justify-end p-4 md:px-6 md:py-4 md:pb-0" }, Fr = /* @__PURE__ */ w("i", { class: "i-tabler-x" }, null, -1), Lr = { class: "h-full flex flex-col items-center justify-center px-4 md:px-6" }, Un = /* @__PURE__ */ x({
|
|
1598
1598
|
__name: "Drawer",
|
|
1599
|
-
props: /* @__PURE__ */
|
|
1599
|
+
props: /* @__PURE__ */ j({
|
|
1600
1600
|
persistent: { type: Boolean, default: !1 },
|
|
1601
1601
|
blur: { type: [String, Boolean], default: !1 },
|
|
1602
1602
|
position: { default: "left" }
|
|
@@ -1606,21 +1606,21 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1606
1606
|
}),
|
|
1607
1607
|
emits: ["update:modelValue"],
|
|
1608
1608
|
setup(e) {
|
|
1609
|
-
const t = e, r =
|
|
1609
|
+
const t = e, r = U(e, "modelValue");
|
|
1610
1610
|
return F(() => {
|
|
1611
1611
|
r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
|
|
1612
1612
|
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1613
1613
|
}, 300);
|
|
1614
1614
|
}), (n, a) => {
|
|
1615
|
-
const o =
|
|
1616
|
-
return
|
|
1615
|
+
const o = at, s = dt;
|
|
1616
|
+
return h(), P(s, {
|
|
1617
1617
|
modelValue: r.value,
|
|
1618
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
1618
|
+
"onUpdate:modelValue": a[1] || (a[1] = (i) => r.value = i),
|
|
1619
1619
|
blur: t.blur,
|
|
1620
1620
|
persistent: t.persistent
|
|
1621
1621
|
}, {
|
|
1622
1622
|
default: W(() => [
|
|
1623
|
-
|
|
1623
|
+
Z(rt, {
|
|
1624
1624
|
"enter-from-class": n.position === "left" ? "-translate-x-1/1" : "translate-x-1/1",
|
|
1625
1625
|
"enter-to-class": (n.position === "left", "translate-x-0"),
|
|
1626
1626
|
"leave-from-class": (n.position === "left", "translate-x-0"),
|
|
@@ -1629,25 +1629,25 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1629
1629
|
"leave-active-class": "transition ease-in duration-200"
|
|
1630
1630
|
}, {
|
|
1631
1631
|
default: W(() => [
|
|
1632
|
-
r.value ? (
|
|
1632
|
+
r.value ? (h(), b("div", {
|
|
1633
1633
|
key: 0,
|
|
1634
1634
|
class: y(["fixed h-full w-full bg-surface-low md:w-md", n.position === "left" ? "left-0" : "right-0"])
|
|
1635
1635
|
}, [
|
|
1636
|
-
|
|
1637
|
-
|
|
1636
|
+
w("div", Dr, [
|
|
1637
|
+
Z(o, {
|
|
1638
1638
|
icon: "",
|
|
1639
1639
|
variant: "transparent",
|
|
1640
1640
|
class: "text-surface-on hover:text-surface-on",
|
|
1641
|
-
onPointerup: a[0] || (a[0] = (
|
|
1641
|
+
onPointerup: a[0] || (a[0] = (i) => r.value = !1)
|
|
1642
1642
|
}, {
|
|
1643
1643
|
default: W(() => [
|
|
1644
|
-
|
|
1644
|
+
Fr
|
|
1645
1645
|
]),
|
|
1646
1646
|
_: 1
|
|
1647
1647
|
})
|
|
1648
1648
|
]),
|
|
1649
|
-
|
|
1650
|
-
|
|
1649
|
+
w("div", Lr, [
|
|
1650
|
+
k(n.$slots, "default")
|
|
1651
1651
|
])
|
|
1652
1652
|
], 2)) : T("", !0)
|
|
1653
1653
|
]),
|
|
@@ -1658,7 +1658,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1658
1658
|
}, 8, ["modelValue", "blur", "persistent"]);
|
|
1659
1659
|
};
|
|
1660
1660
|
}
|
|
1661
|
-
}),
|
|
1661
|
+
}), Gn = /* @__PURE__ */ x({
|
|
1662
1662
|
__name: "Dropzone",
|
|
1663
1663
|
props: {
|
|
1664
1664
|
dashed: { type: Boolean, default: !0 },
|
|
@@ -1666,31 +1666,31 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1666
1666
|
},
|
|
1667
1667
|
emits: ["drop"],
|
|
1668
1668
|
setup(e, { emit: t }) {
|
|
1669
|
-
const r = e, n = t, a =
|
|
1669
|
+
const r = e, n = t, a = g(), { onChange: o, open: s } = er({
|
|
1670
1670
|
accept: r.accept
|
|
1671
1671
|
});
|
|
1672
|
-
o((
|
|
1673
|
-
|
|
1672
|
+
o((l) => {
|
|
1673
|
+
l ? n("drop", Array.from(l)) : n("drop", null);
|
|
1674
1674
|
});
|
|
1675
|
-
const { isOverDropZone:
|
|
1676
|
-
onDrop: (
|
|
1677
|
-
n("drop",
|
|
1675
|
+
const { isOverDropZone: i } = Yt(a, {
|
|
1676
|
+
onDrop: (l) => {
|
|
1677
|
+
n("drop", l);
|
|
1678
1678
|
}
|
|
1679
1679
|
});
|
|
1680
|
-
return (
|
|
1680
|
+
return (l, u) => (h(), b("div", {
|
|
1681
1681
|
ref_key: "dropZoneRef",
|
|
1682
1682
|
ref: a,
|
|
1683
1683
|
class: y([{
|
|
1684
|
-
"":
|
|
1685
|
-
" bg-surface-low": !
|
|
1686
|
-
"border-dashed":
|
|
1684
|
+
"": c(i),
|
|
1685
|
+
" bg-surface-low": !c(i),
|
|
1686
|
+
"border-dashed": l.dashed
|
|
1687
1687
|
}, "h-full w-full flex cursor-pointer items-center justify-center rounded"]),
|
|
1688
|
-
onPointerup:
|
|
1688
|
+
onPointerup: u[0] || (u[0] = () => c(s)())
|
|
1689
1689
|
}, [
|
|
1690
|
-
|
|
1690
|
+
k(l.$slots, "default")
|
|
1691
1691
|
], 34));
|
|
1692
1692
|
}
|
|
1693
|
-
}),
|
|
1693
|
+
}), qn = /* @__PURE__ */ x({
|
|
1694
1694
|
__name: "Image",
|
|
1695
1695
|
props: {
|
|
1696
1696
|
is: { default: "img" },
|
|
@@ -1704,16 +1704,16 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1704
1704
|
rounded: { default: "md" }
|
|
1705
1705
|
},
|
|
1706
1706
|
setup(e) {
|
|
1707
|
-
const t = e, r =
|
|
1707
|
+
const t = e, r = g(!1), n = g(null);
|
|
1708
1708
|
function a() {
|
|
1709
1709
|
r.value = !0;
|
|
1710
1710
|
}
|
|
1711
|
-
|
|
1711
|
+
ee(() => {
|
|
1712
1712
|
var s;
|
|
1713
1713
|
(s = n.value) != null && s.complete && a();
|
|
1714
1714
|
});
|
|
1715
|
-
const o =
|
|
1716
|
-
return (s,
|
|
1715
|
+
const o = G(t);
|
|
1716
|
+
return (s, i) => (h(), b("div", {
|
|
1717
1717
|
style: C({
|
|
1718
1718
|
height: s.height,
|
|
1719
1719
|
width: s.width,
|
|
@@ -1721,37 +1721,37 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1721
1721
|
maxWidth: s.maxWidth
|
|
1722
1722
|
})
|
|
1723
1723
|
}, [
|
|
1724
|
-
s.src ? (
|
|
1724
|
+
s.src ? (h(), P(ue(s.is), xe({
|
|
1725
1725
|
key: 0,
|
|
1726
1726
|
ref_key: "img",
|
|
1727
1727
|
ref: n,
|
|
1728
1728
|
style: [
|
|
1729
1729
|
s.style,
|
|
1730
|
-
|
|
1730
|
+
c(o).style
|
|
1731
1731
|
],
|
|
1732
1732
|
src: s.src,
|
|
1733
1733
|
class: ["h-full w-full object-cover", [
|
|
1734
1734
|
t.class,
|
|
1735
|
-
|
|
1735
|
+
c(o).class,
|
|
1736
1736
|
{
|
|
1737
|
-
hidden: !
|
|
1737
|
+
hidden: !c(r)
|
|
1738
1738
|
}
|
|
1739
1739
|
]]
|
|
1740
1740
|
}, s.$attrs, { onLoad: a }), null, 16, ["style", "src", "class"])) : T("", !0),
|
|
1741
|
-
|
|
1741
|
+
c(r) ? T("", !0) : (h(), b("div", {
|
|
1742
1742
|
key: 1,
|
|
1743
1743
|
class: y(["h-full w-full animate-pulse border-transparent bg-surface-high object-cover", [
|
|
1744
1744
|
t.class,
|
|
1745
|
-
|
|
1745
|
+
c(o).class
|
|
1746
1746
|
]]),
|
|
1747
1747
|
style: C([
|
|
1748
1748
|
s.style,
|
|
1749
|
-
|
|
1749
|
+
c(o).style
|
|
1750
1750
|
])
|
|
1751
1751
|
}, null, 6))
|
|
1752
1752
|
], 4));
|
|
1753
1753
|
}
|
|
1754
|
-
}),
|
|
1754
|
+
}), Wr = { class: "relative" }, Xn = /* @__PURE__ */ x({
|
|
1755
1755
|
__name: "Indicator",
|
|
1756
1756
|
props: {
|
|
1757
1757
|
color: { default: "primary" },
|
|
@@ -1760,7 +1760,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1760
1760
|
ping: { type: Boolean }
|
|
1761
1761
|
},
|
|
1762
1762
|
setup(e) {
|
|
1763
|
-
const t = e, r =
|
|
1763
|
+
const t = e, r = m(() => {
|
|
1764
1764
|
switch (t.size) {
|
|
1765
1765
|
case "sm":
|
|
1766
1766
|
return "w-2 h-2";
|
|
@@ -1771,7 +1771,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1771
1771
|
default:
|
|
1772
1772
|
return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `w-${t.size} h-${t.size}` : t.size;
|
|
1773
1773
|
}
|
|
1774
|
-
}), n =
|
|
1774
|
+
}), n = nt(), a = m(() => {
|
|
1775
1775
|
if (!n.label)
|
|
1776
1776
|
return "";
|
|
1777
1777
|
switch (t.size) {
|
|
@@ -1782,7 +1782,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1782
1782
|
case "lg":
|
|
1783
1783
|
return "text-lg children:px-2.5";
|
|
1784
1784
|
}
|
|
1785
|
-
}), o =
|
|
1785
|
+
}), o = m(() => {
|
|
1786
1786
|
switch (t.position) {
|
|
1787
1787
|
case "top-left":
|
|
1788
1788
|
return "top-0 left-0 -translate-x-1/2 -translate-y-1/2";
|
|
@@ -1793,7 +1793,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1793
1793
|
case "bottom-right":
|
|
1794
1794
|
return "bottom-0 right-0 translate-x-1/2 translate-y-1/2";
|
|
1795
1795
|
}
|
|
1796
|
-
}), s =
|
|
1796
|
+
}), s = m(() => {
|
|
1797
1797
|
switch (t.color) {
|
|
1798
1798
|
case "primary":
|
|
1799
1799
|
return "bg-primary-container text-primary-on";
|
|
@@ -1805,38 +1805,38 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1805
1805
|
return "bg-error-container text-error-on";
|
|
1806
1806
|
}
|
|
1807
1807
|
});
|
|
1808
|
-
return (
|
|
1809
|
-
|
|
1810
|
-
class: y([[
|
|
1808
|
+
return (i, l) => (h(), b("div", Wr, [
|
|
1809
|
+
w("div", {
|
|
1810
|
+
class: y([[c(o), c(a)], "absolute z-1"])
|
|
1811
1811
|
}, [
|
|
1812
|
-
t.ping ? (
|
|
1812
|
+
t.ping ? (h(), b("div", {
|
|
1813
1813
|
key: 0,
|
|
1814
1814
|
class: y(["absolute box-content animate-ping border-2 border-transparent rounded-full", [
|
|
1815
1815
|
{
|
|
1816
|
-
[
|
|
1816
|
+
[c(r)]: !i.$slots.label
|
|
1817
1817
|
},
|
|
1818
|
-
|
|
1818
|
+
c(s)
|
|
1819
1819
|
]])
|
|
1820
1820
|
}, [
|
|
1821
|
-
|
|
1821
|
+
i.$slots.label ? k(i.$slots, "label", { key: 0 }) : T("", !0)
|
|
1822
1822
|
], 2)) : T("", !0),
|
|
1823
|
-
|
|
1823
|
+
w("div", {
|
|
1824
1824
|
class: y(["top-0 box-content border-2 border-surface-low rounded-full", [
|
|
1825
1825
|
{
|
|
1826
|
-
[
|
|
1826
|
+
[c(r)]: !i.$slots.label
|
|
1827
1827
|
},
|
|
1828
|
-
|
|
1828
|
+
c(s)
|
|
1829
1829
|
]])
|
|
1830
1830
|
}, [
|
|
1831
|
-
|
|
1831
|
+
i.$slots.label ? k(i.$slots, "label", { key: 0 }) : T("", !0)
|
|
1832
1832
|
], 2)
|
|
1833
1833
|
], 2),
|
|
1834
|
-
|
|
1834
|
+
k(i.$slots, "default")
|
|
1835
1835
|
]));
|
|
1836
1836
|
}
|
|
1837
|
-
}),
|
|
1837
|
+
}), Yn = /* @__PURE__ */ x({
|
|
1838
1838
|
__name: "Modal",
|
|
1839
|
-
props: /* @__PURE__ */
|
|
1839
|
+
props: /* @__PURE__ */ j({
|
|
1840
1840
|
persistent: { type: Boolean, default: !1 },
|
|
1841
1841
|
blur: { type: [String, Boolean], default: !1 }
|
|
1842
1842
|
}, {
|
|
@@ -1845,14 +1845,14 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1845
1845
|
}),
|
|
1846
1846
|
emits: ["update:modelValue"],
|
|
1847
1847
|
setup(e) {
|
|
1848
|
-
const t = e, r =
|
|
1848
|
+
const t = e, r = U(e, "modelValue");
|
|
1849
1849
|
return F(() => {
|
|
1850
1850
|
r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
|
|
1851
1851
|
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1852
1852
|
}, 300);
|
|
1853
1853
|
}), (n, a) => {
|
|
1854
|
-
const o =
|
|
1855
|
-
return
|
|
1854
|
+
const o = dt;
|
|
1855
|
+
return h(), P(o, {
|
|
1856
1856
|
modelValue: r.value,
|
|
1857
1857
|
"onUpdate:modelValue": a[0] || (a[0] = (s) => r.value = s),
|
|
1858
1858
|
blur: t.blur,
|
|
@@ -1860,7 +1860,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1860
1860
|
"wrapper-class": "flex items-end justify-center"
|
|
1861
1861
|
}, {
|
|
1862
1862
|
default: W(() => [
|
|
1863
|
-
|
|
1863
|
+
Z(rt, {
|
|
1864
1864
|
"enter-from-class": "translate-y-1/2",
|
|
1865
1865
|
"enter-to-class": "translate-y-0",
|
|
1866
1866
|
"leave-from-class": "translate-y-0",
|
|
@@ -1869,7 +1869,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1869
1869
|
"leave-active-class": "transition ease-in duration-200"
|
|
1870
1870
|
}, {
|
|
1871
1871
|
default: W(() => [
|
|
1872
|
-
r.value ?
|
|
1872
|
+
r.value ? k(n.$slots, "default", { key: 0 }) : T("", !0)
|
|
1873
1873
|
]),
|
|
1874
1874
|
_: 3
|
|
1875
1875
|
})
|
|
@@ -1878,13 +1878,13 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1878
1878
|
}, 8, ["modelValue", "blur", "persistent"]);
|
|
1879
1879
|
};
|
|
1880
1880
|
}
|
|
1881
|
-
}),
|
|
1881
|
+
}), jr = {
|
|
1882
1882
|
key: 0,
|
|
1883
1883
|
class: "h-container w-container i-tabler-loader-2 shrink-0 animate-spin"
|
|
1884
|
-
},
|
|
1884
|
+
}, Ur = { key: 1 }, Gr = { class: "grow-1" }, qr = {
|
|
1885
1885
|
key: 2,
|
|
1886
1886
|
class: "text-sm text-surface-onlow"
|
|
1887
|
-
},
|
|
1887
|
+
}, Xr = /* @__PURE__ */ w("i", { class: "i-tabler-x" }, null, -1), Yr = /* @__PURE__ */ x({
|
|
1888
1888
|
__name: "Notification",
|
|
1889
1889
|
props: {
|
|
1890
1890
|
title: {},
|
|
@@ -1899,7 +1899,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1899
1899
|
},
|
|
1900
1900
|
emits: ["close"],
|
|
1901
1901
|
setup(e) {
|
|
1902
|
-
const t = e, r =
|
|
1902
|
+
const t = e, r = G(t), n = m(() => {
|
|
1903
1903
|
switch (t.color) {
|
|
1904
1904
|
case "secondary":
|
|
1905
1905
|
return "bg-secondary-container";
|
|
@@ -1910,7 +1910,7 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1910
1910
|
default:
|
|
1911
1911
|
return "bg-primary-container";
|
|
1912
1912
|
}
|
|
1913
|
-
}), a =
|
|
1913
|
+
}), a = m(() => {
|
|
1914
1914
|
switch (t.color) {
|
|
1915
1915
|
case "secondary":
|
|
1916
1916
|
return "text-secondary-container";
|
|
@@ -1923,114 +1923,114 @@ const Br = ["id"], Or = ["for"], Dn = /* @__PURE__ */ x({
|
|
|
1923
1923
|
}
|
|
1924
1924
|
});
|
|
1925
1925
|
return (o, s) => {
|
|
1926
|
-
const
|
|
1927
|
-
return
|
|
1926
|
+
const i = at;
|
|
1927
|
+
return h(), b("div", {
|
|
1928
1928
|
class: y(["relative min-h-16 min-w-80 w-full flex items-center gap-2 container-low p-3", [
|
|
1929
1929
|
{ "border-0": !o.withBorder },
|
|
1930
|
-
|
|
1930
|
+
c(r).class,
|
|
1931
1931
|
{
|
|
1932
1932
|
"max-w-100": !o.block,
|
|
1933
1933
|
"w-full": o.block
|
|
1934
1934
|
}
|
|
1935
1935
|
]]),
|
|
1936
|
-
style: C(
|
|
1936
|
+
style: C(c(r).style)
|
|
1937
1937
|
}, [
|
|
1938
|
-
o.icon ? (
|
|
1938
|
+
o.icon ? (h(), b("div", {
|
|
1939
1939
|
key: 0,
|
|
1940
|
-
class: y(["leading-0",
|
|
1940
|
+
class: y(["leading-0", c(a)])
|
|
1941
1941
|
}, [
|
|
1942
|
-
o.loading ? (
|
|
1942
|
+
o.loading ? (h(), b("i", jr)) : (h(), b("i", {
|
|
1943
1943
|
key: 1,
|
|
1944
1944
|
class: y(["h-container w-container shrink-0", o.icon])
|
|
1945
1945
|
}, null, 2))
|
|
1946
|
-
], 2)) : (
|
|
1947
|
-
|
|
1946
|
+
], 2)) : (h(), b("div", Ur, [
|
|
1947
|
+
w("div", {
|
|
1948
1948
|
class: y(["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full", [{
|
|
1949
1949
|
"animate-pulse": o.loading
|
|
1950
|
-
},
|
|
1950
|
+
}, c(n)]])
|
|
1951
1951
|
}, null, 2)
|
|
1952
1952
|
])),
|
|
1953
|
-
|
|
1954
|
-
o.title ? (
|
|
1953
|
+
w("div", Gr, [
|
|
1954
|
+
o.title ? (h(), b("div", {
|
|
1955
1955
|
key: 0,
|
|
1956
|
-
class: y([
|
|
1957
|
-
},
|
|
1958
|
-
o.$slots.message ?
|
|
1956
|
+
class: y([c(a), "text-base"])
|
|
1957
|
+
}, se(o.title), 3)) : T("", !0),
|
|
1958
|
+
o.$slots.message ? k(o.$slots, "message", { key: 1 }) : o.message ? (h(), b("div", qr, se(o.message), 1)) : T("", !0)
|
|
1959
1959
|
]),
|
|
1960
|
-
o.closeable ? (
|
|
1960
|
+
o.closeable ? (h(), P(i, {
|
|
1961
1961
|
key: 2,
|
|
1962
1962
|
icon: "",
|
|
1963
1963
|
variant: "transparent",
|
|
1964
1964
|
class: "text-surface-on hover:text-surface-on",
|
|
1965
|
-
onClick: s[0] || (s[0] = (
|
|
1965
|
+
onClick: s[0] || (s[0] = (l) => o.$emit("close"))
|
|
1966
1966
|
}, {
|
|
1967
1967
|
default: W(() => [
|
|
1968
|
-
|
|
1968
|
+
Xr
|
|
1969
1969
|
]),
|
|
1970
1970
|
_: 1
|
|
1971
1971
|
})) : T("", !0)
|
|
1972
1972
|
], 6);
|
|
1973
1973
|
};
|
|
1974
1974
|
}
|
|
1975
|
-
}),
|
|
1976
|
-
let
|
|
1977
|
-
const
|
|
1978
|
-
const t =
|
|
1979
|
-
t && t.forEach((r) =>
|
|
1980
|
-
},
|
|
1975
|
+
}), ft = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakSet();
|
|
1976
|
+
let J, Fe = 0, Le = 0;
|
|
1977
|
+
const X = "__aa_tgt", we = "__aa_del", Ae = "__aa_new", Kr = (e) => {
|
|
1978
|
+
const t = rn(e);
|
|
1979
|
+
t && t.forEach((r) => nn(r));
|
|
1980
|
+
}, Qr = (e) => {
|
|
1981
1981
|
e.forEach((t) => {
|
|
1982
|
-
t.target ===
|
|
1982
|
+
t.target === J && en(), O.has(t.target) && oe(t.target);
|
|
1983
1983
|
});
|
|
1984
1984
|
};
|
|
1985
|
-
function
|
|
1986
|
-
const t =
|
|
1985
|
+
function Jr(e) {
|
|
1986
|
+
const t = Ne.get(e);
|
|
1987
1987
|
t == null || t.disconnect();
|
|
1988
1988
|
let r = O.get(e), n = 0;
|
|
1989
1989
|
const a = 5;
|
|
1990
|
-
r || (r =
|
|
1991
|
-
const { offsetWidth: o, offsetHeight: s } =
|
|
1990
|
+
r || (r = ce(e), O.set(e, r));
|
|
1991
|
+
const { offsetWidth: o, offsetHeight: s } = J, l = [
|
|
1992
1992
|
r.top - a,
|
|
1993
1993
|
o - (r.left + a + r.width),
|
|
1994
1994
|
s - (r.top + a + r.height),
|
|
1995
1995
|
r.left - a
|
|
1996
|
-
].map((d) => `${-1 * Math.floor(d)}px`).join(" "),
|
|
1997
|
-
++n > 1 &&
|
|
1996
|
+
].map((d) => `${-1 * Math.floor(d)}px`).join(" "), u = new IntersectionObserver(() => {
|
|
1997
|
+
++n > 1 && oe(e);
|
|
1998
1998
|
}, {
|
|
1999
|
-
root:
|
|
1999
|
+
root: J,
|
|
2000
2000
|
threshold: 1,
|
|
2001
|
-
rootMargin:
|
|
2001
|
+
rootMargin: l
|
|
2002
2002
|
});
|
|
2003
|
-
|
|
2003
|
+
u.observe(e), Ne.set(e, u);
|
|
2004
2004
|
}
|
|
2005
|
-
function
|
|
2006
|
-
clearTimeout(
|
|
2007
|
-
const t =
|
|
2008
|
-
|
|
2009
|
-
const n =
|
|
2005
|
+
function oe(e) {
|
|
2006
|
+
clearTimeout(Ce.get(e));
|
|
2007
|
+
const t = Re(e), r = _e(t) ? 500 : t.duration;
|
|
2008
|
+
Ce.set(e, setTimeout(async () => {
|
|
2009
|
+
const n = ne.get(e);
|
|
2010
2010
|
try {
|
|
2011
|
-
await (n == null ? void 0 : n.finished), O.set(e,
|
|
2011
|
+
await (n == null ? void 0 : n.finished), O.set(e, ce(e)), Jr(e);
|
|
2012
2012
|
} catch {
|
|
2013
2013
|
}
|
|
2014
2014
|
}, r));
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2017
|
-
clearTimeout(
|
|
2018
|
-
|
|
2016
|
+
function en() {
|
|
2017
|
+
clearTimeout(Ce.get(J)), Ce.set(J, setTimeout(() => {
|
|
2018
|
+
ft.forEach((e) => vt(e, (t) => ht(() => oe(t))));
|
|
2019
2019
|
}, 100));
|
|
2020
2020
|
}
|
|
2021
|
-
function
|
|
2021
|
+
function tn(e) {
|
|
2022
2022
|
setTimeout(() => {
|
|
2023
|
-
|
|
2023
|
+
Zr.set(e, setInterval(() => ht(oe.bind(null, e)), 2e3));
|
|
2024
2024
|
}, Math.round(2e3 * Math.random()));
|
|
2025
2025
|
}
|
|
2026
|
-
function
|
|
2026
|
+
function ht(e) {
|
|
2027
2027
|
typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
|
|
2028
2028
|
}
|
|
2029
|
-
let
|
|
2030
|
-
typeof window < "u" && (
|
|
2029
|
+
let Pe, ae;
|
|
2030
|
+
typeof window < "u" && (J = document.documentElement, Pe = new MutationObserver(Kr), ae = new ResizeObserver(Qr), window.addEventListener("scroll", () => {
|
|
2031
2031
|
Le = window.scrollY, Fe = window.scrollX;
|
|
2032
|
-
}),
|
|
2033
|
-
function
|
|
2032
|
+
}), ae.observe(J));
|
|
2033
|
+
function rn(e) {
|
|
2034
2034
|
return e.reduce((n, a) => [
|
|
2035
2035
|
...n,
|
|
2036
2036
|
...Array.from(a.addedNodes),
|
|
@@ -2039,23 +2039,23 @@ function Jr(e) {
|
|
|
2039
2039
|
if (n === !1)
|
|
2040
2040
|
return !1;
|
|
2041
2041
|
if (a.target instanceof Element) {
|
|
2042
|
-
if (
|
|
2042
|
+
if (Oe(a.target), !n.has(a.target)) {
|
|
2043
2043
|
n.add(a.target);
|
|
2044
2044
|
for (let o = 0; o < a.target.children.length; o++) {
|
|
2045
2045
|
const s = a.target.children.item(o);
|
|
2046
2046
|
if (s) {
|
|
2047
|
-
if (
|
|
2047
|
+
if (we in s)
|
|
2048
2048
|
return !1;
|
|
2049
|
-
|
|
2049
|
+
Oe(a.target, s), n.add(s);
|
|
2050
2050
|
}
|
|
2051
2051
|
}
|
|
2052
2052
|
}
|
|
2053
2053
|
if (a.removedNodes.length)
|
|
2054
2054
|
for (let o = 0; o < a.removedNodes.length; o++) {
|
|
2055
2055
|
const s = a.removedNodes[o];
|
|
2056
|
-
if (
|
|
2056
|
+
if (we in s)
|
|
2057
2057
|
return !1;
|
|
2058
|
-
s instanceof Element && (n.add(s),
|
|
2058
|
+
s instanceof Element && (n.add(s), Oe(a.target, s), le.set(s, [
|
|
2059
2059
|
a.previousSibling,
|
|
2060
2060
|
a.nextSibling
|
|
2061
2061
|
]));
|
|
@@ -2064,18 +2064,18 @@ function Jr(e) {
|
|
|
2064
2064
|
return n;
|
|
2065
2065
|
}, /* @__PURE__ */ new Set());
|
|
2066
2066
|
}
|
|
2067
|
-
function
|
|
2068
|
-
!t && !(
|
|
2067
|
+
function Oe(e, t) {
|
|
2068
|
+
!t && !(X in e) ? Object.defineProperty(e, X, { value: e }) : t && !(X in t) && Object.defineProperty(t, X, { value: e });
|
|
2069
2069
|
}
|
|
2070
|
-
function
|
|
2070
|
+
function nn(e) {
|
|
2071
2071
|
var t;
|
|
2072
2072
|
const r = e.isConnected, n = O.has(e);
|
|
2073
|
-
r &&
|
|
2073
|
+
r && le.has(e) && le.delete(e), ne.has(e) && ((t = ne.get(e)) === null || t === void 0 || t.cancel()), Ae in e ? Qe(e) : n && r ? an(e) : n && !r ? sn(e) : Qe(e);
|
|
2074
2074
|
}
|
|
2075
2075
|
function L(e) {
|
|
2076
2076
|
return Number(e.replace(/[^0-9.\-]/g, ""));
|
|
2077
2077
|
}
|
|
2078
|
-
function
|
|
2078
|
+
function on(e) {
|
|
2079
2079
|
let t = e.parentElement;
|
|
2080
2080
|
for (; t; ) {
|
|
2081
2081
|
if (t.scrollLeft || t.scrollTop)
|
|
@@ -2084,8 +2084,8 @@ function tn(e) {
|
|
|
2084
2084
|
}
|
|
2085
2085
|
return { x: 0, y: 0 };
|
|
2086
2086
|
}
|
|
2087
|
-
function
|
|
2088
|
-
const t = e.getBoundingClientRect(), { x: r, y: n } =
|
|
2087
|
+
function ce(e) {
|
|
2088
|
+
const t = e.getBoundingClientRect(), { x: r, y: n } = on(e);
|
|
2089
2089
|
return {
|
|
2090
2090
|
top: t.top + n,
|
|
2091
2091
|
left: t.left + r,
|
|
@@ -2093,27 +2093,27 @@ function le(e) {
|
|
|
2093
2093
|
height: t.height
|
|
2094
2094
|
};
|
|
2095
2095
|
}
|
|
2096
|
-
function
|
|
2096
|
+
function pt(e, t, r) {
|
|
2097
2097
|
let n = t.width, a = t.height, o = r.width, s = r.height;
|
|
2098
|
-
const
|
|
2099
|
-
if (
|
|
2100
|
-
const
|
|
2101
|
-
n -= d, o -= d, a -=
|
|
2098
|
+
const i = getComputedStyle(e);
|
|
2099
|
+
if (i.getPropertyValue("box-sizing") === "content-box") {
|
|
2100
|
+
const u = L(i.paddingTop) + L(i.paddingBottom) + L(i.borderTopWidth) + L(i.borderBottomWidth), d = L(i.paddingLeft) + L(i.paddingRight) + L(i.borderRightWidth) + L(i.borderLeftWidth);
|
|
2101
|
+
n -= d, o -= d, a -= u, s -= u;
|
|
2102
2102
|
}
|
|
2103
2103
|
return [n, o, a, s].map(Math.round);
|
|
2104
2104
|
}
|
|
2105
|
-
function
|
|
2106
|
-
return
|
|
2105
|
+
function Re(e) {
|
|
2106
|
+
return X in e && ie.has(e[X]) ? ie.get(e[X]) : { duration: 250, easing: "ease-in-out" };
|
|
2107
2107
|
}
|
|
2108
|
-
function
|
|
2109
|
-
if (
|
|
2110
|
-
return e[
|
|
2108
|
+
function mt(e) {
|
|
2109
|
+
if (X in e)
|
|
2110
|
+
return e[X];
|
|
2111
2111
|
}
|
|
2112
2112
|
function We(e) {
|
|
2113
|
-
const t =
|
|
2114
|
-
return t ?
|
|
2113
|
+
const t = mt(e);
|
|
2114
|
+
return t ? ve.has(t) : !1;
|
|
2115
2115
|
}
|
|
2116
|
-
function
|
|
2116
|
+
function vt(e, ...t) {
|
|
2117
2117
|
t.forEach((r) => r(e, ie.has(e)));
|
|
2118
2118
|
for (let r = 0; r < e.children.length; r++) {
|
|
2119
2119
|
const n = e.children.item(r);
|
|
@@ -2123,24 +2123,24 @@ function mt(e, ...t) {
|
|
|
2123
2123
|
function je(e) {
|
|
2124
2124
|
return Array.isArray(e) ? e : [e];
|
|
2125
2125
|
}
|
|
2126
|
-
function
|
|
2126
|
+
function _e(e) {
|
|
2127
2127
|
return typeof e == "function";
|
|
2128
2128
|
}
|
|
2129
|
-
function
|
|
2130
|
-
const t = O.get(e), r =
|
|
2129
|
+
function an(e) {
|
|
2130
|
+
const t = O.get(e), r = ce(e);
|
|
2131
2131
|
if (!We(e))
|
|
2132
2132
|
return O.set(e, r);
|
|
2133
2133
|
let n;
|
|
2134
2134
|
if (!t)
|
|
2135
2135
|
return;
|
|
2136
|
-
const a =
|
|
2136
|
+
const a = Re(e);
|
|
2137
2137
|
if (typeof a != "function") {
|
|
2138
|
-
const o = t.left - r.left, s = t.top - r.top, [
|
|
2138
|
+
const o = t.left - r.left, s = t.top - r.top, [i, l, u, d] = pt(e, t, r), f = {
|
|
2139
2139
|
transform: `translate(${o}px, ${s}px)`
|
|
2140
|
-
},
|
|
2140
|
+
}, v = {
|
|
2141
2141
|
transform: "translate(0, 0)"
|
|
2142
2142
|
};
|
|
2143
|
-
|
|
2143
|
+
i !== l && (f.width = `${i}px`, v.width = `${l}px`), u !== d && (f.height = `${u}px`, v.height = `${d}px`), n = e.animate([f, v], {
|
|
2144
2144
|
duration: a.duration,
|
|
2145
2145
|
easing: a.easing
|
|
2146
2146
|
});
|
|
@@ -2148,13 +2148,13 @@ function rn(e) {
|
|
|
2148
2148
|
const [o] = je(a(e, "remain", t, r));
|
|
2149
2149
|
n = new Animation(o), n.play();
|
|
2150
2150
|
}
|
|
2151
|
-
|
|
2151
|
+
ne.set(e, n), O.set(e, r), n.addEventListener("finish", oe.bind(null, e));
|
|
2152
2152
|
}
|
|
2153
2153
|
function Qe(e) {
|
|
2154
|
-
|
|
2155
|
-
const t =
|
|
2154
|
+
Ae in e && delete e[Ae];
|
|
2155
|
+
const t = ce(e);
|
|
2156
2156
|
O.set(e, t);
|
|
2157
|
-
const r =
|
|
2157
|
+
const r = Re(e);
|
|
2158
2158
|
if (!We(e))
|
|
2159
2159
|
return;
|
|
2160
2160
|
let n;
|
|
@@ -2171,40 +2171,40 @@ function Qe(e) {
|
|
|
2171
2171
|
const [a] = je(r(e, "add", t));
|
|
2172
2172
|
n = new Animation(a), n.play();
|
|
2173
2173
|
}
|
|
2174
|
-
|
|
2174
|
+
ne.set(e, n), n.addEventListener("finish", oe.bind(null, e));
|
|
2175
2175
|
}
|
|
2176
2176
|
function Je(e, t) {
|
|
2177
2177
|
var r;
|
|
2178
|
-
e.remove(), O.delete(e),
|
|
2179
|
-
if (
|
|
2178
|
+
e.remove(), O.delete(e), le.delete(e), ne.delete(e), (r = Ne.get(e)) === null || r === void 0 || r.disconnect(), setTimeout(() => {
|
|
2179
|
+
if (we in e && delete e[we], Object.defineProperty(e, Ae, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
|
|
2180
2180
|
for (const n in t)
|
|
2181
2181
|
e.style[n] = "";
|
|
2182
2182
|
}, 0);
|
|
2183
2183
|
}
|
|
2184
|
-
function
|
|
2184
|
+
function sn(e) {
|
|
2185
2185
|
var t;
|
|
2186
|
-
if (!
|
|
2186
|
+
if (!le.has(e) || !O.has(e))
|
|
2187
2187
|
return;
|
|
2188
|
-
const [r, n] =
|
|
2189
|
-
Object.defineProperty(e,
|
|
2188
|
+
const [r, n] = le.get(e);
|
|
2189
|
+
Object.defineProperty(e, we, { value: !0, configurable: !0 });
|
|
2190
2190
|
const a = window.scrollX, o = window.scrollY;
|
|
2191
|
-
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t =
|
|
2191
|
+
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t = mt(e)) === null || t === void 0 || t.appendChild(e), !We(e))
|
|
2192
2192
|
return Je(e);
|
|
2193
|
-
const [s,
|
|
2194
|
-
(a !== Fe || o !== Le) &&
|
|
2195
|
-
let
|
|
2193
|
+
const [s, i, l, u] = cn(e), d = Re(e), f = O.get(e);
|
|
2194
|
+
(a !== Fe || o !== Le) && ln(e, a, o, d);
|
|
2195
|
+
let v, S = {
|
|
2196
2196
|
position: "absolute",
|
|
2197
2197
|
top: `${s}px`,
|
|
2198
|
-
left: `${
|
|
2199
|
-
width: `${
|
|
2200
|
-
height: `${
|
|
2198
|
+
left: `${i}px`,
|
|
2199
|
+
width: `${l}px`,
|
|
2200
|
+
height: `${u}px`,
|
|
2201
2201
|
margin: "0",
|
|
2202
2202
|
pointerEvents: "none",
|
|
2203
2203
|
transformOrigin: "center",
|
|
2204
2204
|
zIndex: "100"
|
|
2205
2205
|
};
|
|
2206
|
-
if (!
|
|
2207
|
-
Object.assign(e.style,
|
|
2206
|
+
if (!_e(d))
|
|
2207
|
+
Object.assign(e.style, S), v = e.animate([
|
|
2208
2208
|
{
|
|
2209
2209
|
transform: "scale(1)",
|
|
2210
2210
|
opacity: 1
|
|
@@ -2215,66 +2215,66 @@ function nn(e) {
|
|
|
2215
2215
|
}
|
|
2216
2216
|
], { duration: d.duration, easing: "ease-out" });
|
|
2217
2217
|
else {
|
|
2218
|
-
const [A,
|
|
2219
|
-
(
|
|
2218
|
+
const [A, z] = je(d(e, "remove", f));
|
|
2219
|
+
(z == null ? void 0 : z.styleReset) !== !1 && (S = (z == null ? void 0 : z.styleReset) || S, Object.assign(e.style, S)), v = new Animation(A), v.play();
|
|
2220
2220
|
}
|
|
2221
|
-
|
|
2221
|
+
ne.set(e, v), v.addEventListener("finish", Je.bind(null, e, S));
|
|
2222
2222
|
}
|
|
2223
|
-
function
|
|
2223
|
+
function ln(e, t, r, n) {
|
|
2224
2224
|
const a = Fe - t, o = Le - r, s = document.documentElement.style.scrollBehavior;
|
|
2225
|
-
if (getComputedStyle(
|
|
2225
|
+
if (getComputedStyle(J).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + a, window.scrollY + o), !e.parentElement)
|
|
2226
2226
|
return;
|
|
2227
|
-
const
|
|
2228
|
-
let
|
|
2227
|
+
const l = e.parentElement;
|
|
2228
|
+
let u = l.clientHeight, d = l.clientWidth;
|
|
2229
2229
|
const f = performance.now();
|
|
2230
|
-
function
|
|
2230
|
+
function v() {
|
|
2231
2231
|
requestAnimationFrame(() => {
|
|
2232
|
-
if (!
|
|
2233
|
-
const
|
|
2232
|
+
if (!_e(n)) {
|
|
2233
|
+
const S = u - l.clientHeight, A = d - l.clientWidth;
|
|
2234
2234
|
f + n.duration > performance.now() ? (window.scrollTo({
|
|
2235
2235
|
left: window.scrollX - A,
|
|
2236
|
-
top: window.scrollY -
|
|
2237
|
-
}),
|
|
2236
|
+
top: window.scrollY - S
|
|
2237
|
+
}), u = l.clientHeight, d = l.clientWidth, v()) : document.documentElement.style.scrollBehavior = s;
|
|
2238
2238
|
}
|
|
2239
2239
|
});
|
|
2240
2240
|
}
|
|
2241
|
-
|
|
2241
|
+
v();
|
|
2242
2242
|
}
|
|
2243
|
-
function
|
|
2244
|
-
const t = O.get(e), [r, , n] =
|
|
2243
|
+
function cn(e) {
|
|
2244
|
+
const t = O.get(e), [r, , n] = pt(e, t, ce(e));
|
|
2245
2245
|
let a = e.parentElement;
|
|
2246
2246
|
for (; a && (getComputedStyle(a).position === "static" || a instanceof HTMLBodyElement); )
|
|
2247
2247
|
a = a.parentElement;
|
|
2248
2248
|
a || (a = document.body);
|
|
2249
|
-
const o = getComputedStyle(a), s = O.get(a) ||
|
|
2250
|
-
return [
|
|
2249
|
+
const o = getComputedStyle(a), s = O.get(a) || ce(a), i = Math.round(t.top - s.top) - L(o.borderTopWidth), l = Math.round(t.left - s.left) - L(o.borderLeftWidth);
|
|
2250
|
+
return [i, l, r, n];
|
|
2251
2251
|
}
|
|
2252
|
-
function
|
|
2253
|
-
return
|
|
2252
|
+
function un(e, t = {}) {
|
|
2253
|
+
return Pe && ae && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !_e(t) && !t.disrespectUserMotionPreference || (ve.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), vt(e, oe, tn, (a) => ae == null ? void 0 : ae.observe(a)), _e(t) ? ie.set(e, t) : ie.set(e, { duration: 250, easing: "ease-in-out", ...t }), Pe.observe(e, { childList: !0 }), ft.add(e))), Object.freeze({
|
|
2254
2254
|
parent: e,
|
|
2255
2255
|
enable: () => {
|
|
2256
|
-
|
|
2256
|
+
ve.add(e);
|
|
2257
2257
|
},
|
|
2258
2258
|
disable: () => {
|
|
2259
|
-
|
|
2259
|
+
ve.delete(e);
|
|
2260
2260
|
},
|
|
2261
|
-
isEnabled: () =>
|
|
2261
|
+
isEnabled: () => ve.has(e)
|
|
2262
2262
|
});
|
|
2263
2263
|
}
|
|
2264
|
-
const
|
|
2264
|
+
const dn = {
|
|
2265
2265
|
mounted: (e, t) => {
|
|
2266
|
-
|
|
2266
|
+
un(e, t.value || {});
|
|
2267
2267
|
},
|
|
2268
2268
|
// ignore ssr see #96:
|
|
2269
2269
|
getSSRProps: () => ({})
|
|
2270
|
-
},
|
|
2270
|
+
}, fn = { class: "fixed z-20 flex flex-col gap-2 p-2" }, Zn = /* @__PURE__ */ x({
|
|
2271
2271
|
__name: "NotificationSystem",
|
|
2272
2272
|
setup(e) {
|
|
2273
|
-
const t =
|
|
2273
|
+
const t = gn();
|
|
2274
2274
|
return (r, n) => {
|
|
2275
|
-
const a =
|
|
2276
|
-
return
|
|
2277
|
-
(
|
|
2275
|
+
const a = Yr;
|
|
2276
|
+
return Te((h(), b("div", fn, [
|
|
2277
|
+
(h(!0), b(K, null, ye(c(t), (o) => (h(), P(a, {
|
|
2278
2278
|
key: o.hash,
|
|
2279
2279
|
closeable: "",
|
|
2280
2280
|
"with-border": "",
|
|
@@ -2283,14 +2283,14 @@ const ln = {
|
|
|
2283
2283
|
icon: o.icon,
|
|
2284
2284
|
loading: o.loading,
|
|
2285
2285
|
color: o.color,
|
|
2286
|
-
onClose: (s) =>
|
|
2286
|
+
onClose: (s) => c(t).splice(c(t).indexOf(o), 1)
|
|
2287
2287
|
}, null, 8, ["title", "message", "icon", "loading", "color", "onClose"]))), 128))
|
|
2288
2288
|
])), [
|
|
2289
|
-
[
|
|
2289
|
+
[c(dn)]
|
|
2290
2290
|
]);
|
|
2291
2291
|
};
|
|
2292
2292
|
}
|
|
2293
|
-
}),
|
|
2293
|
+
}), hn = { class: "relative" }, Kn = /* @__PURE__ */ x({
|
|
2294
2294
|
__name: "Overlay",
|
|
2295
2295
|
props: {
|
|
2296
2296
|
blur: { type: [Boolean, String], default: !1 },
|
|
@@ -2299,7 +2299,7 @@ const ln = {
|
|
|
2299
2299
|
color: { default: "black" }
|
|
2300
2300
|
},
|
|
2301
2301
|
setup(e) {
|
|
2302
|
-
const t = e, r =
|
|
2302
|
+
const t = e, r = m(() => {
|
|
2303
2303
|
switch (t.blur) {
|
|
2304
2304
|
case "sm":
|
|
2305
2305
|
return "backdrop-blur-sm";
|
|
@@ -2311,22 +2311,22 @@ const ln = {
|
|
|
2311
2311
|
default:
|
|
2312
2312
|
return "";
|
|
2313
2313
|
}
|
|
2314
|
-
}), n =
|
|
2314
|
+
}), n = G(t), a = g(null), o = p(t.color).toRgb(), s = m(() => ({
|
|
2315
2315
|
backgroundColor: `rgba(${o.r}, ${o.g}, ${o.b}, ${t.opacity / 100})`
|
|
2316
2316
|
}));
|
|
2317
|
-
return (
|
|
2318
|
-
|
|
2319
|
-
|
|
2317
|
+
return (i, l) => (h(), b("div", hn, [
|
|
2318
|
+
k(i.$slots, "default"),
|
|
2319
|
+
w("div", xe(i.$attrs, {
|
|
2320
2320
|
ref_key: "wrapperRef",
|
|
2321
2321
|
ref: a,
|
|
2322
|
-
class: [[
|
|
2323
|
-
style: [
|
|
2322
|
+
class: [[c(r), c(n).class], "absolute left-0 top-0 h-full w-full overflow-hidden md:items-center"],
|
|
2323
|
+
style: [c(n).style, c(s)]
|
|
2324
2324
|
}), [
|
|
2325
|
-
|
|
2325
|
+
k(i.$slots, "content")
|
|
2326
2326
|
], 16)
|
|
2327
2327
|
]));
|
|
2328
2328
|
}
|
|
2329
|
-
}),
|
|
2329
|
+
}), Qn = /* @__PURE__ */ x({
|
|
2330
2330
|
__name: "Paper",
|
|
2331
2331
|
props: {
|
|
2332
2332
|
size: { default: "md" },
|
|
@@ -2335,26 +2335,25 @@ const ln = {
|
|
|
2335
2335
|
is: { default: "div" }
|
|
2336
2336
|
},
|
|
2337
2337
|
setup(e) {
|
|
2338
|
-
const r =
|
|
2339
|
-
return (n, a) => (
|
|
2338
|
+
const r = G(e);
|
|
2339
|
+
return (n, a) => (h(), P(ue(n.is), {
|
|
2340
2340
|
class: y(["container-low rounded-lg p-4", [
|
|
2341
2341
|
{
|
|
2342
2342
|
"border-transparent": !n.withBorder
|
|
2343
2343
|
},
|
|
2344
|
-
|
|
2344
|
+
c(r).class
|
|
2345
2345
|
]]),
|
|
2346
|
-
style: C([
|
|
2346
|
+
style: C([c(r).style])
|
|
2347
2347
|
}, {
|
|
2348
2348
|
default: W(() => [
|
|
2349
|
-
|
|
2349
|
+
k(n.$slots, "default")
|
|
2350
2350
|
]),
|
|
2351
2351
|
_: 3
|
|
2352
2352
|
}, 8, ["class", "style"]));
|
|
2353
2353
|
}
|
|
2354
|
-
}),
|
|
2354
|
+
}), pn = ["placeholder", "type"], mn = /* @__PURE__ */ x({
|
|
2355
2355
|
__name: "TextField",
|
|
2356
|
-
props: {
|
|
2357
|
-
modelValue: {},
|
|
2356
|
+
props: /* @__PURE__ */ j({
|
|
2358
2357
|
onChange: {},
|
|
2359
2358
|
color: { default: "primary" },
|
|
2360
2359
|
error: { type: Boolean },
|
|
@@ -2363,11 +2362,14 @@ const ln = {
|
|
|
2363
2362
|
size: { default: "md" },
|
|
2364
2363
|
password: { type: Boolean },
|
|
2365
2364
|
placeholder: {}
|
|
2366
|
-
},
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2365
|
+
}, {
|
|
2366
|
+
modelValue: {},
|
|
2367
|
+
modelModifiers: {}
|
|
2368
|
+
}),
|
|
2369
|
+
emits: ["update:modelValue"],
|
|
2370
|
+
setup(e, { expose: t }) {
|
|
2371
|
+
const r = e, n = U(e, "modelValue"), a = m(() => {
|
|
2372
|
+
switch (r.size) {
|
|
2371
2373
|
case "sm":
|
|
2372
2374
|
return {
|
|
2373
2375
|
base: "h-6 px-2 py-1 text-xs"
|
|
@@ -2381,10 +2383,10 @@ const ln = {
|
|
|
2381
2383
|
base: "h-10 px-4 py-2 text-base"
|
|
2382
2384
|
};
|
|
2383
2385
|
}
|
|
2384
|
-
}),
|
|
2385
|
-
if (
|
|
2386
|
+
}), o = m(() => {
|
|
2387
|
+
if (r.error)
|
|
2386
2388
|
return "text-error-container bg-surface-base border-error-container focus:border-error-container";
|
|
2387
|
-
switch (
|
|
2389
|
+
switch (r.color) {
|
|
2388
2390
|
case "secondary":
|
|
2389
2391
|
return "text-surface-on bg-surface-base border-surface-border-base focus:border-secondary-container";
|
|
2390
2392
|
case "tertiary":
|
|
@@ -2395,29 +2397,22 @@ const ln = {
|
|
|
2395
2397
|
default:
|
|
2396
2398
|
return "text-surface-on bg-surface-base border-surface-border-base focus:border-primary-container";
|
|
2397
2399
|
}
|
|
2398
|
-
}),
|
|
2399
|
-
function d(f) {
|
|
2400
|
-
var h;
|
|
2401
|
-
a("update:modelValue", ((h = f.target) == null ? void 0 : h.value) ?? ""), a("input", f);
|
|
2402
|
-
}
|
|
2400
|
+
}), s = m(() => r.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), i = G(r), l = g(null);
|
|
2403
2401
|
return t({
|
|
2404
|
-
el:
|
|
2405
|
-
}), (
|
|
2402
|
+
el: l
|
|
2403
|
+
}), (u, d) => Te((h(), b("input", {
|
|
2406
2404
|
ref_key: "input",
|
|
2407
|
-
ref:
|
|
2408
|
-
|
|
2409
|
-
class: y(["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color", [
|
|
2410
|
-
style: C([
|
|
2411
|
-
placeholder:
|
|
2412
|
-
type:
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
onPointerdown: h[2] || (h[2] = (w) => f.$emit("pointerdown", w)),
|
|
2417
|
-
onPointerup: h[3] || (h[3] = (w) => f.$emit("pointerup", w))
|
|
2418
|
-
}, null, 46, dn));
|
|
2405
|
+
ref: l,
|
|
2406
|
+
"onUpdate:modelValue": d[0] || (d[0] = (f) => n.value = f),
|
|
2407
|
+
class: y(["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color", [c(o), c(s), c(i).class, c(a).base]]),
|
|
2408
|
+
style: C([c(i).style]),
|
|
2409
|
+
placeholder: u.placeholder,
|
|
2410
|
+
type: r.password ? "password" : "text"
|
|
2411
|
+
}, null, 14, pn)), [
|
|
2412
|
+
[Tt, n.value]
|
|
2413
|
+
]);
|
|
2419
2414
|
}
|
|
2420
|
-
}),
|
|
2415
|
+
}), vn = { class: "flex gap-2" }, Jn = /* @__PURE__ */ x({
|
|
2421
2416
|
__name: "PinInput",
|
|
2422
2417
|
props: {
|
|
2423
2418
|
modelValue: {},
|
|
@@ -2426,37 +2421,37 @@ const ln = {
|
|
|
2426
2421
|
password: { type: Boolean }
|
|
2427
2422
|
},
|
|
2428
2423
|
setup(e) {
|
|
2429
|
-
const t = e, r =
|
|
2424
|
+
const t = e, r = g([]);
|
|
2430
2425
|
function n(o) {
|
|
2431
2426
|
o.preventDefault(), o.stopPropagation();
|
|
2432
|
-
const s = r.value.findIndex((
|
|
2433
|
-
o.target.value = "", Array.from(
|
|
2434
|
-
s +
|
|
2427
|
+
const s = r.value.findIndex((l) => l.el === o.target), i = o.target.value ?? "";
|
|
2428
|
+
o.target.value = "", Array.from(i).forEach((l, u) => {
|
|
2429
|
+
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());
|
|
2435
2430
|
});
|
|
2436
2431
|
}
|
|
2437
2432
|
function a(o) {
|
|
2438
2433
|
o.preventDefault(), o.stopPropagation();
|
|
2439
2434
|
const s = o.target.value !== "";
|
|
2440
2435
|
o.target.value = "";
|
|
2441
|
-
const
|
|
2442
|
-
|
|
2436
|
+
const i = r.value.findIndex((l) => l.el === o.target);
|
|
2437
|
+
i !== 0 && (r.value[i - 1].el.focus(), r.value[i - 1].el.select(), s || (r.value[i - 1].el.value = ""));
|
|
2443
2438
|
}
|
|
2444
|
-
return (o, s) => (
|
|
2445
|
-
(
|
|
2439
|
+
return (o, s) => (h(), b("div", vn, [
|
|
2440
|
+
(h(!0), b(K, null, ye(t.length, (i) => (h(), P(mn, {
|
|
2446
2441
|
ref_for: !0,
|
|
2447
2442
|
ref_key: "inputs",
|
|
2448
2443
|
ref: r,
|
|
2449
|
-
key:
|
|
2444
|
+
key: i,
|
|
2450
2445
|
class: "w-8 text-center",
|
|
2451
2446
|
style: { padding: "0" },
|
|
2452
2447
|
password: t.password,
|
|
2453
|
-
onPointerup: s[0] || (s[0] = (
|
|
2454
|
-
onInput:
|
|
2455
|
-
onKeydown:
|
|
2448
|
+
onPointerup: s[0] || (s[0] = (l) => l.target.select()),
|
|
2449
|
+
onInput: ot(n, ["stop", "prevent"]),
|
|
2450
|
+
onKeydown: zt(a, ["backspace"])
|
|
2456
2451
|
}, null, 8, ["password"]))), 128))
|
|
2457
2452
|
]));
|
|
2458
2453
|
}
|
|
2459
|
-
}),
|
|
2454
|
+
}), eo = /* @__PURE__ */ x({
|
|
2460
2455
|
__name: "Progress",
|
|
2461
2456
|
props: {
|
|
2462
2457
|
value: { default: 0 },
|
|
@@ -2468,7 +2463,7 @@ const ln = {
|
|
|
2468
2463
|
loading: { type: Boolean, default: !1 }
|
|
2469
2464
|
},
|
|
2470
2465
|
setup(e) {
|
|
2471
|
-
const t = e, r =
|
|
2466
|
+
const t = e, r = m(() => {
|
|
2472
2467
|
switch (t.size) {
|
|
2473
2468
|
case "sm":
|
|
2474
2469
|
return "h-0.25";
|
|
@@ -2477,7 +2472,7 @@ const ln = {
|
|
|
2477
2472
|
case "lg":
|
|
2478
2473
|
return "h-1";
|
|
2479
2474
|
}
|
|
2480
|
-
}), n =
|
|
2475
|
+
}), n = m(() => {
|
|
2481
2476
|
switch (t.color) {
|
|
2482
2477
|
case "primary":
|
|
2483
2478
|
return "bg-primary-container";
|
|
@@ -2488,74 +2483,74 @@ const ln = {
|
|
|
2488
2483
|
case "error":
|
|
2489
2484
|
return "bg-error-7";
|
|
2490
2485
|
}
|
|
2491
|
-
}), a =
|
|
2492
|
-
return (o, s) => (
|
|
2493
|
-
class: y(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [
|
|
2494
|
-
style: C([
|
|
2486
|
+
}), a = G(t);
|
|
2487
|
+
return (o, s) => (h(), b("div", {
|
|
2488
|
+
class: y(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [c(r), c(a).class]]),
|
|
2489
|
+
style: C([c(a).style])
|
|
2495
2490
|
}, [
|
|
2496
|
-
o.loading ? (
|
|
2491
|
+
o.loading ? (h(), b("div", {
|
|
2497
2492
|
key: 1,
|
|
2498
|
-
class: y(["loading-progress h-full", [
|
|
2499
|
-
}, null, 2)) : (
|
|
2493
|
+
class: y(["loading-progress h-full", [c(n)]])
|
|
2494
|
+
}, null, 2)) : (h(), b("div", {
|
|
2500
2495
|
key: 0,
|
|
2501
|
-
class: y(["h-full", [
|
|
2496
|
+
class: y(["h-full", [c(n)]]),
|
|
2502
2497
|
style: C([{
|
|
2503
2498
|
width: `${(Number(o.value) - Number(o.min)) / (Number(o.max) - Number(o.min)) * 100}%`
|
|
2504
2499
|
}])
|
|
2505
2500
|
}, null, 6))
|
|
2506
2501
|
], 6));
|
|
2507
2502
|
}
|
|
2508
|
-
}),
|
|
2503
|
+
}), bt = {
|
|
2509
2504
|
primary: ["#e5f7ff", "#d3ebfa", "#a9d4f1", "#7cbde9", "#57a9e0", "#3f9cdc", "#3096dc", "#1f82c4", "#0f73b0", "#00649c", "#082f49"],
|
|
2510
2505
|
secondary: ["#e9fbf0", "#dcf1e3", "#badfc7", "#96cea9", "#77bf90", "#63b580", "#58b077", "#479a64", "#3b8a58", "#2c7749", "#022c22"],
|
|
2511
2506
|
tertiary: ["#fff7e1", "#ffedcd", "#fcd99e", "#f9c46b", "#f7b23f", "#f6a724", "#f5a113", "#da8c04", "#c37d00", "#aa6a00", "#572508"],
|
|
2512
2507
|
error: ["#ffeaea", "#fcd5d5", "#f2a8a9", "#ea7a7a", "#e25353", "#de3939", "#dd2b2b", "#c41e1f", "#af171a", "#9a0913", "#450a0a"],
|
|
2513
|
-
surface: ["#fefefe", "#fafafa", "#
|
|
2514
|
-
},
|
|
2508
|
+
surface: ["#fefefe", "#fafafa", "#f2f2f2", "#e8e8e8", "#c6c6c6", "#737373", "#525252", "#343434", "#262626", "#171717", "#121212"]
|
|
2509
|
+
}, Ie = {
|
|
2515
2510
|
name: "dark",
|
|
2516
2511
|
scheme: "dark",
|
|
2517
|
-
colors:
|
|
2518
|
-
},
|
|
2512
|
+
colors: bt
|
|
2513
|
+
}, bn = {
|
|
2519
2514
|
name: "light",
|
|
2520
2515
|
scheme: "light",
|
|
2521
|
-
colors:
|
|
2522
|
-
},
|
|
2523
|
-
function
|
|
2524
|
-
return
|
|
2516
|
+
colors: bt
|
|
2517
|
+
}, to = Symbol("Notifications"), gt = Et([]);
|
|
2518
|
+
function gn() {
|
|
2519
|
+
return gt;
|
|
2525
2520
|
}
|
|
2526
|
-
class
|
|
2521
|
+
class ro {
|
|
2527
2522
|
static show(t) {
|
|
2528
|
-
t.hash = Math.random().toString(36),
|
|
2523
|
+
t.hash = Math.random().toString(36), gt.push(t);
|
|
2529
2524
|
}
|
|
2530
2525
|
}
|
|
2531
|
-
const
|
|
2532
|
-
function
|
|
2526
|
+
const yt = Symbol("tabCurrent"), wt = Symbol("direction"), Ve = [0.96, 0.96, 0.907, 0.805, 0.697, 0.547, 0.518, 0.445, 0.395, 0.34, 0.28];
|
|
2527
|
+
function yn(e) {
|
|
2533
2528
|
const t = p(e).toHsl().l;
|
|
2534
|
-
return
|
|
2529
|
+
return Ve.reduce(
|
|
2535
2530
|
(r, n) => Math.abs(n - t) < Math.abs(r - t) ? n : r
|
|
2536
2531
|
);
|
|
2537
2532
|
}
|
|
2538
|
-
function
|
|
2539
|
-
const t = p(e), r =
|
|
2533
|
+
function wn(e) {
|
|
2534
|
+
const t = p(e), r = yn(t), n = Ve.findIndex((o) => o === r), a = Ve.map((o) => {
|
|
2540
2535
|
const s = p({ h: t.toHsl().h, s: t.toHsl().s, l: o });
|
|
2541
2536
|
return s.saturate(0 * 100), s;
|
|
2542
2537
|
});
|
|
2543
2538
|
return { baseColorIndex: n, colors: a.map((o) => o.toHexString()) };
|
|
2544
2539
|
}
|
|
2545
|
-
function
|
|
2546
|
-
return
|
|
2540
|
+
function no(e) {
|
|
2541
|
+
return wn(e).colors;
|
|
2547
2542
|
}
|
|
2548
|
-
const
|
|
2543
|
+
const oo = /* @__PURE__ */ x({
|
|
2549
2544
|
__name: "RokuProvider",
|
|
2550
2545
|
props: {
|
|
2551
2546
|
is: { default: "div" },
|
|
2552
2547
|
theme: { default() {
|
|
2553
|
-
return typeof window > "u" || document.documentElement.dataset.scheme === "dark" ?
|
|
2548
|
+
return typeof window > "u" || document.documentElement.dataset.scheme === "dark" ? Ie : bn;
|
|
2554
2549
|
} }
|
|
2555
2550
|
},
|
|
2556
2551
|
setup(e) {
|
|
2557
|
-
const t = e, r =
|
|
2558
|
-
|
|
2552
|
+
const t = e, r = g(0), n = g(0), a = g(t.theme.scheme);
|
|
2553
|
+
Q && (new ResizeObserver(() => {
|
|
2559
2554
|
const d = window.innerWidth - document.body.clientWidth;
|
|
2560
2555
|
d !== 0 && (r.value = d), n.value = d;
|
|
2561
2556
|
}).observe(document.body), new MutationObserver(() => {
|
|
@@ -2564,30 +2559,30 @@ const eo = /* @__PURE__ */ x({
|
|
|
2564
2559
|
attributes: !0,
|
|
2565
2560
|
attributeFilter: ["data-scheme"]
|
|
2566
2561
|
}));
|
|
2567
|
-
const o =
|
|
2562
|
+
const o = m(() => n.value === r.value ? "0px" : `${r.value}px`), s = rr();
|
|
2568
2563
|
F(() => {
|
|
2569
|
-
if (!
|
|
2564
|
+
if (!Q)
|
|
2570
2565
|
return "dark";
|
|
2571
2566
|
a.value === "dark" ? document.documentElement.dataset.scheme = "dark" : a.value === "light" ? document.documentElement.dataset.scheme = "light" : s.value === "dark" ? document.documentElement.dataset.scheme = "dark" : document.documentElement.dataset.scheme = "light", localStorage.setItem("scheme", document.documentElement.dataset.scheme);
|
|
2572
|
-
}),
|
|
2573
|
-
const
|
|
2574
|
-
return (
|
|
2567
|
+
}), ge(ut, a);
|
|
2568
|
+
const i = it(t.theme);
|
|
2569
|
+
return (l, u) => (h(), P(ue(l.is), {
|
|
2575
2570
|
style: C([
|
|
2576
|
-
|
|
2577
|
-
{ paddingRight:
|
|
2571
|
+
c(i),
|
|
2572
|
+
{ paddingRight: c(o) }
|
|
2578
2573
|
]),
|
|
2579
2574
|
class: "text-surface-on transition-background-color,border-color,color"
|
|
2580
2575
|
}, {
|
|
2581
2576
|
default: W(() => [
|
|
2582
|
-
|
|
2577
|
+
k(l.$slots, "default")
|
|
2583
2578
|
]),
|
|
2584
2579
|
_: 3
|
|
2585
2580
|
}, 8, ["style"]));
|
|
2586
2581
|
}
|
|
2587
|
-
}),
|
|
2582
|
+
}), _n = ["id"], xn = ["for"], kn = ["for"], Sn = /* @__PURE__ */ x({
|
|
2588
2583
|
inheritAttrs: !1,
|
|
2589
2584
|
__name: "Switch",
|
|
2590
|
-
props: /* @__PURE__ */
|
|
2585
|
+
props: /* @__PURE__ */ j({
|
|
2591
2586
|
size: { default: "md" },
|
|
2592
2587
|
animate: { type: Boolean, default: !0 },
|
|
2593
2588
|
options: {},
|
|
@@ -2605,9 +2600,9 @@ const eo = /* @__PURE__ */ x({
|
|
|
2605
2600
|
}),
|
|
2606
2601
|
emits: ["update:modelValue"],
|
|
2607
2602
|
setup(e) {
|
|
2608
|
-
const t = e, r =
|
|
2603
|
+
const t = e, r = U(e, "modelValue");
|
|
2609
2604
|
t.value && (r.value = t.value);
|
|
2610
|
-
const n =
|
|
2605
|
+
const n = g(null), a = g(!1), o = m(() => {
|
|
2611
2606
|
switch (t.size) {
|
|
2612
2607
|
case "sm":
|
|
2613
2608
|
return {
|
|
@@ -2634,13 +2629,13 @@ const eo = /* @__PURE__ */ x({
|
|
|
2634
2629
|
active: a.value ? "left-[calc(1.75rem-1px)]" : "left-[calc(2.25rem-1px)]"
|
|
2635
2630
|
};
|
|
2636
2631
|
}
|
|
2637
|
-
}), s =
|
|
2632
|
+
}), s = m(() => t.animate ? {
|
|
2638
2633
|
indicator: "transition-all",
|
|
2639
2634
|
progress: "transition-width"
|
|
2640
2635
|
} : {
|
|
2641
2636
|
indicator: "",
|
|
2642
2637
|
progress: ""
|
|
2643
|
-
}),
|
|
2638
|
+
}), i = ct(t), l = m(() => {
|
|
2644
2639
|
let d = "bg-primary-container";
|
|
2645
2640
|
switch (t.color) {
|
|
2646
2641
|
case "secondary":
|
|
@@ -2654,45 +2649,45 @@ const eo = /* @__PURE__ */ x({
|
|
|
2654
2649
|
break;
|
|
2655
2650
|
}
|
|
2656
2651
|
return {
|
|
2657
|
-
wrapper: r.value ? `border border-transparent ${d}` : "bg-surface-lowest border border-surface-border-
|
|
2652
|
+
wrapper: r.value ? `border border-transparent ${d}` : "bg-surface-lowest border border-surface-border-base",
|
|
2658
2653
|
indicator: t.disabled ? "bg-surface-high" : "bg-white text-primary-container"
|
|
2659
2654
|
};
|
|
2660
|
-
}),
|
|
2661
|
-
return (d, f) => (
|
|
2655
|
+
}), u = G(t);
|
|
2656
|
+
return (d, f) => (h(), b("div", {
|
|
2662
2657
|
role: "switch",
|
|
2663
2658
|
class: y(["relative flex items-center gap-2", {
|
|
2664
2659
|
"pointer-events-none filter-grayscale op60": t.disabled
|
|
2665
2660
|
}])
|
|
2666
2661
|
}, [
|
|
2667
|
-
|
|
2668
|
-
id:
|
|
2669
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
2662
|
+
Te(w("input", xe({
|
|
2663
|
+
id: c(i),
|
|
2664
|
+
"onUpdate:modelValue": f[0] || (f[0] = (v) => r.value = v)
|
|
2670
2665
|
}, d.$attrs, {
|
|
2671
2666
|
class: "hidden",
|
|
2672
2667
|
type: "checkbox"
|
|
2673
|
-
}), null, 16,
|
|
2674
|
-
[
|
|
2668
|
+
}), null, 16, _n), [
|
|
2669
|
+
[Rt, r.value]
|
|
2675
2670
|
]),
|
|
2676
|
-
|
|
2671
|
+
w("label", {
|
|
2677
2672
|
class: "leading-0 cursor-pointer!",
|
|
2678
|
-
for:
|
|
2673
|
+
for: c(i)
|
|
2679
2674
|
}, [
|
|
2680
|
-
|
|
2675
|
+
w("div", {
|
|
2681
2676
|
ref_key: "wrapper",
|
|
2682
2677
|
ref: n,
|
|
2683
|
-
class: y([[
|
|
2684
|
-
style: C([u
|
|
2685
|
-
onPointerdown: f[1] || (f[1] = (
|
|
2686
|
-
onPointerup: f[2] || (f[2] = (
|
|
2687
|
-
onPointerleave: f[3] || (f[3] = (
|
|
2688
|
-
onPointerenter: f[4] || (f[4] = (
|
|
2678
|
+
class: y([[c(o).wrapper, c(l).wrapper, c(u).class], "relative inline-block transition-all"]),
|
|
2679
|
+
style: C([c(u).style]),
|
|
2680
|
+
onPointerdown: f[1] || (f[1] = (v) => a.value = !0),
|
|
2681
|
+
onPointerup: f[2] || (f[2] = (v) => a.value = !1),
|
|
2682
|
+
onPointerleave: f[3] || (f[3] = (v) => a.value = !1),
|
|
2683
|
+
onPointerenter: f[4] || (f[4] = (v) => v.buttons === 1 && (a.value = !0))
|
|
2689
2684
|
}, [
|
|
2690
|
-
|
|
2691
|
-
class: y(["absolute top-50% -translate-y-50%", [
|
|
2692
|
-
style: C([u
|
|
2685
|
+
w("div", {
|
|
2686
|
+
class: y(["absolute top-50% -translate-y-50%", [c(o).indicator, c(l).indicator, c(s).indicator, r.value ? c(o).active : c(o).inactive, c(u).class]]),
|
|
2687
|
+
style: C([c(u).style])
|
|
2693
2688
|
}, null, 6),
|
|
2694
|
-
|
|
2695
|
-
class: y(["absolute top-1/2 -translate-y-50%", [
|
|
2689
|
+
w("i", {
|
|
2690
|
+
class: y(["absolute top-1/2 -translate-y-50%", [c(o).icon, {
|
|
2696
2691
|
[`left-0 text-${d.color}-on`]: r.value,
|
|
2697
2692
|
"right-0 text-surface-on ": !r.value,
|
|
2698
2693
|
[d.onIcon ?? ""]: r.value && d.onIcon,
|
|
@@ -2700,17 +2695,17 @@ const eo = /* @__PURE__ */ x({
|
|
|
2700
2695
|
}]])
|
|
2701
2696
|
}, null, 2)
|
|
2702
2697
|
], 38)
|
|
2703
|
-
], 8,
|
|
2704
|
-
d.label ? (
|
|
2698
|
+
], 8, xn),
|
|
2699
|
+
d.label ? (h(), b("label", {
|
|
2705
2700
|
key: 0,
|
|
2706
|
-
for:
|
|
2707
|
-
},
|
|
2701
|
+
for: c(i)
|
|
2702
|
+
}, se(d.label), 9, kn)) : T("", !0)
|
|
2708
2703
|
], 2));
|
|
2709
2704
|
}
|
|
2710
|
-
}),
|
|
2705
|
+
}), Mn = { class: "dark:hidden" }, $n = { class: "light:hidden" }, ao = /* @__PURE__ */ x({
|
|
2711
2706
|
__name: "SchemeSwitch",
|
|
2712
2707
|
setup(e) {
|
|
2713
|
-
const t =
|
|
2708
|
+
const t = Hr(), r = m({
|
|
2714
2709
|
get() {
|
|
2715
2710
|
return t.value === "dark";
|
|
2716
2711
|
},
|
|
@@ -2719,11 +2714,11 @@ const eo = /* @__PURE__ */ x({
|
|
|
2719
2714
|
}
|
|
2720
2715
|
});
|
|
2721
2716
|
F(() => {
|
|
2722
|
-
|
|
2717
|
+
Q && (r.value === !0 ? (document.documentElement.setAttribute("data-scheme", "dark"), localStorage.setItem("scheme", "dark")) : r.value === !1 && (document.documentElement.setAttribute("data-scheme", "light"), localStorage.setItem("scheme", "light")));
|
|
2723
2718
|
});
|
|
2724
|
-
const n =
|
|
2725
|
-
return
|
|
2726
|
-
if (
|
|
2719
|
+
const n = g(!0), a = g(!1);
|
|
2720
|
+
return ee(() => {
|
|
2721
|
+
if (Q) {
|
|
2727
2722
|
const o = localStorage.getItem("scheme");
|
|
2728
2723
|
o === "dark" ? r.value = !0 : o === "light" ? r.value = !1 : r.value = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
2729
2724
|
}
|
|
@@ -2731,20 +2726,20 @@ const eo = /* @__PURE__ */ x({
|
|
|
2731
2726
|
}), et(() => {
|
|
2732
2727
|
a.value = !0;
|
|
2733
2728
|
}), (o, s) => {
|
|
2734
|
-
const
|
|
2735
|
-
return
|
|
2736
|
-
|
|
2737
|
-
class: y({ hidden: !
|
|
2729
|
+
const i = Sn;
|
|
2730
|
+
return h(), b(K, null, [
|
|
2731
|
+
w("div", {
|
|
2732
|
+
class: y({ hidden: !c(n) })
|
|
2738
2733
|
}, [
|
|
2739
|
-
|
|
2740
|
-
|
|
2734
|
+
w("div", Mn, [
|
|
2735
|
+
Z(i, {
|
|
2741
2736
|
value: !1,
|
|
2742
2737
|
"on-icon": "i-tabler-moon",
|
|
2743
2738
|
"off-icon": "i-tabler-sun"
|
|
2744
2739
|
})
|
|
2745
2740
|
]),
|
|
2746
|
-
|
|
2747
|
-
|
|
2741
|
+
w("div", $n, [
|
|
2742
|
+
Z(i, {
|
|
2748
2743
|
value: !0,
|
|
2749
2744
|
color: "secondary",
|
|
2750
2745
|
"on-icon": "i-tabler-moon",
|
|
@@ -2752,13 +2747,13 @@ const eo = /* @__PURE__ */ x({
|
|
|
2752
2747
|
})
|
|
2753
2748
|
])
|
|
2754
2749
|
], 2),
|
|
2755
|
-
|
|
2756
|
-
class: y({ hidden:
|
|
2750
|
+
w("div", {
|
|
2751
|
+
class: y({ hidden: c(n) })
|
|
2757
2752
|
}, [
|
|
2758
|
-
|
|
2759
|
-
modelValue:
|
|
2760
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
2761
|
-
animate:
|
|
2753
|
+
Z(i, {
|
|
2754
|
+
modelValue: c(r),
|
|
2755
|
+
"onUpdate:modelValue": s[0] || (s[0] = (l) => Bt(r) ? r.value = l : null),
|
|
2756
|
+
animate: c(a),
|
|
2762
2757
|
color: "secondary",
|
|
2763
2758
|
"on-icon": "i-tabler-moon",
|
|
2764
2759
|
"off-icon": "i-tabler-sun"
|
|
@@ -2767,14 +2762,14 @@ const eo = /* @__PURE__ */ x({
|
|
|
2767
2762
|
], 64);
|
|
2768
2763
|
};
|
|
2769
2764
|
}
|
|
2770
|
-
}),
|
|
2765
|
+
}), Cn = { class: "w-full flex items-center" }, An = ["placeholder", "value"], Tn = /* @__PURE__ */ w("i", { class: "i-tabler-chevron-down pointer-events-none absolute right-2" }, null, -1), zn = {
|
|
2771
2766
|
key: 0,
|
|
2772
2767
|
class: "flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"
|
|
2773
|
-
},
|
|
2774
|
-
|
|
2775
|
-
],
|
|
2768
|
+
}, En = ["onPointerdown", "onHover"], Rn = { key: 0 }, Bn = /* @__PURE__ */ w("i", { class: "i-tabler-check h-3 w-3" }, null, -1), On = [
|
|
2769
|
+
Bn
|
|
2770
|
+
], so = /* @__PURE__ */ x({
|
|
2776
2771
|
__name: "Select",
|
|
2777
|
-
props: /* @__PURE__ */
|
|
2772
|
+
props: /* @__PURE__ */ j({
|
|
2778
2773
|
options: { default() {
|
|
2779
2774
|
return [];
|
|
2780
2775
|
} },
|
|
@@ -2786,42 +2781,42 @@ const eo = /* @__PURE__ */ x({
|
|
|
2786
2781
|
modelValue: { default: void 0 },
|
|
2787
2782
|
modelModifiers: {}
|
|
2788
2783
|
}),
|
|
2789
|
-
emits: /* @__PURE__ */
|
|
2784
|
+
emits: /* @__PURE__ */ j(["change"], ["update:modelValue"]),
|
|
2790
2785
|
setup(e, { emit: t }) {
|
|
2791
|
-
const r = e, n = t, a =
|
|
2786
|
+
const r = e, n = t, a = G(r), o = U(e, "modelValue"), s = g(null), i = g(null), { focused: l } = tr(s), u = m(() => r.options.map((_) => E(_)).indexOf(o.value)), d = g(-1), f = g(-1);
|
|
2792
2787
|
F(() => {
|
|
2793
|
-
|
|
2788
|
+
l.value || (f.value = -1);
|
|
2794
2789
|
}), F(() => {
|
|
2795
|
-
o.value =
|
|
2796
|
-
}),
|
|
2790
|
+
o.value = E(r.options[u.value]);
|
|
2791
|
+
}), de(o, () => {
|
|
2797
2792
|
n("change", o.value);
|
|
2798
2793
|
});
|
|
2799
|
-
const
|
|
2800
|
-
function
|
|
2794
|
+
const v = r.options, S = m(() => v[u.value]), A = m(() => z(S.value));
|
|
2795
|
+
function z(_) {
|
|
2801
2796
|
if (_)
|
|
2802
2797
|
return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.label;
|
|
2803
2798
|
}
|
|
2804
|
-
function
|
|
2799
|
+
function E(_) {
|
|
2805
2800
|
if (_)
|
|
2806
2801
|
return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.id;
|
|
2807
2802
|
}
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
}),
|
|
2811
|
-
|
|
2812
|
-
}),
|
|
2813
|
-
|
|
2803
|
+
te("ArrowDown", (_) => {
|
|
2804
|
+
l.value && (_.preventDefault(), f.value = (f.value + 1) % v.length);
|
|
2805
|
+
}), te("ArrowUp", (_) => {
|
|
2806
|
+
l.value && (_.preventDefault(), f.value = (f.value - 1 + v.length) % v.length);
|
|
2807
|
+
}), te("Enter", () => {
|
|
2808
|
+
l.value && f.value !== -1 && (o.value = E(v[f.value]), l.value = !1);
|
|
2814
2809
|
});
|
|
2815
|
-
function
|
|
2816
|
-
if (!
|
|
2817
|
-
|
|
2810
|
+
function he(_) {
|
|
2811
|
+
if (!l.value) {
|
|
2812
|
+
l.value = !0;
|
|
2818
2813
|
return;
|
|
2819
2814
|
}
|
|
2820
|
-
o.value =
|
|
2815
|
+
o.value = E(_), l.value = !1;
|
|
2821
2816
|
}
|
|
2822
|
-
const
|
|
2817
|
+
const Se = m(() => ({
|
|
2823
2818
|
input: "container-base focus:border-primary-container"
|
|
2824
|
-
})),
|
|
2819
|
+
})), Me = m(() => {
|
|
2825
2820
|
switch (r.size) {
|
|
2826
2821
|
case "sm":
|
|
2827
2822
|
return {
|
|
@@ -2840,48 +2835,48 @@ const eo = /* @__PURE__ */ x({
|
|
|
2840
2835
|
};
|
|
2841
2836
|
}
|
|
2842
2837
|
});
|
|
2843
|
-
return (_,
|
|
2838
|
+
return (_, pe) => (h(), b("div", {
|
|
2844
2839
|
ref_key: "wrapperRef",
|
|
2845
|
-
ref:
|
|
2840
|
+
ref: i,
|
|
2846
2841
|
class: "r-select-wrapper relative"
|
|
2847
2842
|
}, [
|
|
2848
|
-
|
|
2849
|
-
|
|
2843
|
+
w("div", Cn, [
|
|
2844
|
+
w("input", {
|
|
2850
2845
|
ref_key: "inputRef",
|
|
2851
2846
|
ref: s,
|
|
2852
|
-
class: y([[
|
|
2847
|
+
class: y([[c(Se).input, c(Me).wrapper, c(a).class], "r-select-input cursor-pointer border outline-none outline-none focus-visible:outline-2"]),
|
|
2853
2848
|
placeholder: _.placeholder,
|
|
2854
|
-
style: C([
|
|
2849
|
+
style: C([c(a).style]),
|
|
2855
2850
|
readonly: "",
|
|
2856
|
-
value:
|
|
2851
|
+
value: c(A),
|
|
2857
2852
|
"aria-haspopup": "listbox",
|
|
2858
2853
|
autocomplete: "off",
|
|
2859
|
-
onFocus:
|
|
2860
|
-
}, null, 46,
|
|
2861
|
-
|
|
2854
|
+
onFocus: pe[0] || (pe[0] = ($) => l.value = !0)
|
|
2855
|
+
}, null, 46, An),
|
|
2856
|
+
Tn
|
|
2862
2857
|
]),
|
|
2863
|
-
|
|
2858
|
+
c(l) ? (h(), b("div", {
|
|
2864
2859
|
key: 0,
|
|
2865
|
-
class: y([
|
|
2860
|
+
class: y([c(Me).dropdown, "absolute z-10 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1"])
|
|
2866
2861
|
}, [
|
|
2867
|
-
|
|
2868
|
-
key:
|
|
2862
|
+
c(v).length === 0 ? (h(), b("div", zn, se(_.noneText), 1)) : (h(!0), b(K, { key: 1 }, ye(c(v), ($, R) => (h(), b("div", {
|
|
2863
|
+
key: E($),
|
|
2869
2864
|
class: y([{
|
|
2870
|
-
"hover:bg-surface-high":
|
|
2871
|
-
"container-filled-primary":
|
|
2872
|
-
}, "flex cursor-pointer items-center justify-between gap-2 rounded p-1 px-2"]),
|
|
2873
|
-
onPointerdown: (B) =>
|
|
2874
|
-
onHover: (B) => d.value =
|
|
2865
|
+
"hover:bg-surface-high border-transparent": c(f) !== R,
|
|
2866
|
+
"container-filled-primary": c(f) === R
|
|
2867
|
+
}, "flex cursor-pointer items-center justify-between gap-2 border rounded p-1 px-2"]),
|
|
2868
|
+
onPointerdown: (B) => he($),
|
|
2869
|
+
onHover: (B) => d.value = R
|
|
2875
2870
|
}, [
|
|
2876
|
-
|
|
2877
|
-
$ ===
|
|
2878
|
-
], 42,
|
|
2871
|
+
Ot(se(z($)) + " ", 1),
|
|
2872
|
+
$ === c(S) ? (h(), b("div", Rn, On)) : T("", !0)
|
|
2873
|
+
], 42, En))), 128))
|
|
2879
2874
|
], 2)) : T("", !0)
|
|
2880
2875
|
], 512));
|
|
2881
2876
|
}
|
|
2882
|
-
}),
|
|
2877
|
+
}), Hn = { class: "relative inline-block w-full" }, lo = /* @__PURE__ */ x({
|
|
2883
2878
|
__name: "Slider",
|
|
2884
|
-
props: /* @__PURE__ */
|
|
2879
|
+
props: /* @__PURE__ */ j({
|
|
2885
2880
|
size: { default: "md" },
|
|
2886
2881
|
animate: { type: Boolean, default: !1 },
|
|
2887
2882
|
width: {},
|
|
@@ -2901,25 +2896,25 @@ const eo = /* @__PURE__ */ x({
|
|
|
2901
2896
|
emits: ["update:modelValue"],
|
|
2902
2897
|
setup(e) {
|
|
2903
2898
|
const t = e;
|
|
2904
|
-
function r($,
|
|
2899
|
+
function r($, R, B) {
|
|
2905
2900
|
const I = [];
|
|
2906
|
-
for (let
|
|
2907
|
-
I.push(
|
|
2908
|
-
return I[I.length - 1] !==
|
|
2901
|
+
for (let Y = $; Y <= R; Y += B)
|
|
2902
|
+
I.push(Y);
|
|
2903
|
+
return I[I.length - 1] !== R && I.push(R), I;
|
|
2909
2904
|
}
|
|
2910
|
-
function n($,
|
|
2905
|
+
function n($, R) {
|
|
2911
2906
|
const B = [];
|
|
2912
|
-
B.push(
|
|
2913
|
-
const I = (
|
|
2914
|
-
for (let
|
|
2915
|
-
B.push(
|
|
2916
|
-
return B.push(
|
|
2907
|
+
B.push(R[0]);
|
|
2908
|
+
const I = (R.length - 1) / ($ - 1);
|
|
2909
|
+
for (let Y = 1; Y < $ - 1; Y++)
|
|
2910
|
+
B.push(R[Math.round(Y * I)]);
|
|
2911
|
+
return B.push(R[R.length - 1]), B;
|
|
2917
2912
|
}
|
|
2918
|
-
const a =
|
|
2913
|
+
const a = m(() => t.options ? t.options.length : t.tickNum ?? 0), o = m(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), s = m(() => n(a.value, o.value)), i = U(e, "modelValue"), l = m(() => o.value.length ?? 0), u = g(o.value.includes(i.value) ? o.value.indexOf(i.value) : 0);
|
|
2919
2914
|
function d($) {
|
|
2920
2915
|
return o.value.indexOf($);
|
|
2921
2916
|
}
|
|
2922
|
-
const f =
|
|
2917
|
+
const f = m(() => {
|
|
2923
2918
|
switch (t.color) {
|
|
2924
2919
|
case "primary":
|
|
2925
2920
|
return "bg-primary-container";
|
|
@@ -2930,7 +2925,7 @@ const eo = /* @__PURE__ */ x({
|
|
|
2930
2925
|
case "error":
|
|
2931
2926
|
return "bg-error-container";
|
|
2932
2927
|
}
|
|
2933
|
-
}),
|
|
2928
|
+
}), v = m(() => `dark:bg-white bg-${t.color}-container`), S = m(() => {
|
|
2934
2929
|
switch (t.color) {
|
|
2935
2930
|
case "primary":
|
|
2936
2931
|
return "dark:bg-primary-container bg-white";
|
|
@@ -2943,38 +2938,38 @@ const eo = /* @__PURE__ */ x({
|
|
|
2943
2938
|
}
|
|
2944
2939
|
});
|
|
2945
2940
|
F(() => {
|
|
2946
|
-
|
|
2941
|
+
i.value = o.value[u.value];
|
|
2947
2942
|
});
|
|
2948
|
-
const A =
|
|
2949
|
-
function
|
|
2950
|
-
if (!
|
|
2943
|
+
const A = g(), z = g(), E = Kt(A), he = g(!1);
|
|
2944
|
+
function Se($) {
|
|
2945
|
+
if (!he.value)
|
|
2951
2946
|
return;
|
|
2952
2947
|
if (!($.buttons === 1)) {
|
|
2953
|
-
|
|
2948
|
+
he.value = !1;
|
|
2954
2949
|
return;
|
|
2955
2950
|
}
|
|
2956
2951
|
$.preventDefault(), $.stopPropagation();
|
|
2957
|
-
const { clientX: B } = $, I =
|
|
2958
|
-
if (
|
|
2959
|
-
|
|
2952
|
+
const { clientX: B } = $, I = E.left.value, _t = E.right.value - I, Be = Math.round((B - I) / _t * (l.value - 1));
|
|
2953
|
+
if (Be < 0) {
|
|
2954
|
+
u.value = 0;
|
|
2960
2955
|
return;
|
|
2961
2956
|
}
|
|
2962
|
-
if (
|
|
2963
|
-
|
|
2957
|
+
if (Be > l.value - 1) {
|
|
2958
|
+
u.value = l.value - 1;
|
|
2964
2959
|
return;
|
|
2965
2960
|
}
|
|
2966
|
-
|
|
2961
|
+
u.value = Be;
|
|
2967
2962
|
}
|
|
2968
2963
|
F(() => {
|
|
2969
|
-
|
|
2964
|
+
u.value = d(i.value);
|
|
2970
2965
|
});
|
|
2971
|
-
function
|
|
2972
|
-
$.preventDefault(), $.stopPropagation(),
|
|
2966
|
+
function Me($) {
|
|
2967
|
+
$.preventDefault(), $.stopPropagation(), he.value = !0, Se($);
|
|
2973
2968
|
}
|
|
2974
|
-
|
|
2975
|
-
|
|
2969
|
+
N(A, "pointerdown", Me), ee(() => {
|
|
2970
|
+
N(document, "pointermove", Se), u.value = Math.max(0, d(i.value));
|
|
2976
2971
|
});
|
|
2977
|
-
const _ =
|
|
2972
|
+
const _ = m(() => {
|
|
2978
2973
|
switch (t.size) {
|
|
2979
2974
|
case "sm":
|
|
2980
2975
|
return {
|
|
@@ -3007,120 +3002,225 @@ const eo = /* @__PURE__ */ x({
|
|
|
3007
3002
|
progress: "-mx-1.5"
|
|
3008
3003
|
};
|
|
3009
3004
|
}
|
|
3010
|
-
}),
|
|
3005
|
+
}), pe = m(() => t.animate ? {
|
|
3011
3006
|
indicator: "transition-left",
|
|
3012
3007
|
progress: "transition-width"
|
|
3013
3008
|
} : {
|
|
3014
3009
|
indicator: "",
|
|
3015
3010
|
progress: ""
|
|
3016
3011
|
});
|
|
3017
|
-
return ($,
|
|
3018
|
-
|
|
3012
|
+
return ($, R) => (h(), b("div", Hn, [
|
|
3013
|
+
w("div", {
|
|
3019
3014
|
ref_key: "wrapper",
|
|
3020
3015
|
ref: A,
|
|
3021
3016
|
type: "size",
|
|
3022
|
-
class: y(["w-full flex cursor-pointer items-center",
|
|
3023
|
-
onTouchmove:
|
|
3017
|
+
class: y(["w-full flex cursor-pointer items-center", c(_).wrapper]),
|
|
3018
|
+
onTouchmove: R[0] || (R[0] = ot(() => {
|
|
3024
3019
|
}, ["prevent"]))
|
|
3025
3020
|
}, [
|
|
3026
|
-
|
|
3027
|
-
class: y(["w-full rounded-full bg-surface-lowest transition-background-color,border-color,color",
|
|
3021
|
+
w("div", {
|
|
3022
|
+
class: y(["w-full rounded-full bg-surface-lowest transition-background-color,border-color,color", c(_).innerWrapper])
|
|
3028
3023
|
}, [
|
|
3029
|
-
|
|
3030
|
-
class: y(["relative flex",
|
|
3024
|
+
w("div", {
|
|
3025
|
+
class: y(["relative flex", c(_).content]),
|
|
3031
3026
|
style: C({
|
|
3032
3027
|
width: `${t.width}rem`,
|
|
3033
3028
|
minWidth: `${t.minWidth}rem`
|
|
3034
3029
|
})
|
|
3035
3030
|
}, [
|
|
3036
|
-
(
|
|
3031
|
+
(h(!0), b(K, null, ye(c(s), (B) => (h(), b("div", {
|
|
3037
3032
|
key: B,
|
|
3038
3033
|
style: C({
|
|
3039
|
-
left: `${d(B) / (
|
|
3034
|
+
left: `${d(B) / (c(l) - 1) * 100}%`
|
|
3040
3035
|
}),
|
|
3041
|
-
class: y(["absolute top-50% rounded-full bg-white",
|
|
3036
|
+
class: y(["absolute top-50% rounded-full bg-white", c(_).tick])
|
|
3042
3037
|
}, null, 6))), 128)),
|
|
3043
|
-
u
|
|
3038
|
+
c(u) !== -1 ? (h(), b("div", {
|
|
3044
3039
|
key: 0,
|
|
3045
3040
|
ref_key: "indicator",
|
|
3046
|
-
ref:
|
|
3047
|
-
class: y(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [
|
|
3041
|
+
ref: z,
|
|
3042
|
+
class: y(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [c(_).indicator, c(pe).indicator, c(v)]]),
|
|
3048
3043
|
style: C({
|
|
3049
|
-
left: `${u
|
|
3044
|
+
left: `${c(u) / (c(l) - 1) * 100}%`
|
|
3050
3045
|
})
|
|
3051
3046
|
}, [
|
|
3052
|
-
|
|
3053
|
-
class: y(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [
|
|
3047
|
+
w("div", {
|
|
3048
|
+
class: y(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [c(_).indicatorInner, c(S)]])
|
|
3054
3049
|
}, null, 2)
|
|
3055
3050
|
], 6)) : T("", !0),
|
|
3056
|
-
|
|
3057
|
-
class: y(["pointer-events-none h-full rounded-full", [
|
|
3051
|
+
w("div", {
|
|
3052
|
+
class: y(["pointer-events-none h-full rounded-full", [c(_).progress, c(pe).progress, c(f)]]),
|
|
3058
3053
|
style: C({
|
|
3059
|
-
width: `${u
|
|
3054
|
+
width: `${c(u) / (c(l) - 1) * 100}%`
|
|
3060
3055
|
})
|
|
3061
3056
|
}, null, 6)
|
|
3062
3057
|
], 6)
|
|
3063
3058
|
], 2)
|
|
3064
3059
|
], 34),
|
|
3065
|
-
|
|
3060
|
+
w("div", {
|
|
3066
3061
|
class: "relative mx-1 h-1em text-xs text-surface-onlow",
|
|
3067
3062
|
style: C({
|
|
3068
3063
|
width: `${t.width}rem`
|
|
3069
3064
|
})
|
|
3070
3065
|
}, [
|
|
3071
|
-
(
|
|
3066
|
+
(h(!0), b(K, null, ye(c(s), (B, I) => (h(), b("div", {
|
|
3072
3067
|
key: I,
|
|
3073
3068
|
style: C({
|
|
3074
|
-
left: `${d(B) / (
|
|
3069
|
+
left: `${d(B) / (c(l) - 1) * 100}%`
|
|
3075
3070
|
}),
|
|
3076
|
-
class: y(["absolute w-auto flex rounded-full -translate-x-50%",
|
|
3077
|
-
},
|
|
3071
|
+
class: y(["absolute w-auto flex rounded-full -translate-x-50%", c(_).tick])
|
|
3072
|
+
}, se(B), 7))), 128))
|
|
3078
3073
|
], 4)
|
|
3079
3074
|
]));
|
|
3080
3075
|
}
|
|
3076
|
+
}), Nn = { class: "h-full py-2" }, io = /* @__PURE__ */ x({
|
|
3077
|
+
__name: "TabItem",
|
|
3078
|
+
props: {
|
|
3079
|
+
value: {},
|
|
3080
|
+
color: { default: "primary" }
|
|
3081
|
+
},
|
|
3082
|
+
setup(e) {
|
|
3083
|
+
const t = e, r = be(yt, g("")), n = be(wt, m(() => "horizontal")), a = m(() => r.value === t.value);
|
|
3084
|
+
function o() {
|
|
3085
|
+
r.value = t.value;
|
|
3086
|
+
}
|
|
3087
|
+
const s = m(() => {
|
|
3088
|
+
switch (n.value) {
|
|
3089
|
+
case "horizontal":
|
|
3090
|
+
return "flex-col";
|
|
3091
|
+
case "vertical":
|
|
3092
|
+
return "flex-row-reverse";
|
|
3093
|
+
}
|
|
3094
|
+
}), i = m(() => {
|
|
3095
|
+
switch (n.value) {
|
|
3096
|
+
case "horizontal":
|
|
3097
|
+
return "absolute inset-0 top-100% h-2px w-full transition-background-color,border-color,color";
|
|
3098
|
+
case "vertical":
|
|
3099
|
+
return "absolute inset-0 right-100% h-full w-2px bg-primary-container transition-background-color,border-color,color";
|
|
3100
|
+
}
|
|
3101
|
+
}), l = m(() => a.value ? "bg-primary-container" : "bg-surface-lowest");
|
|
3102
|
+
return (u, d) => (h(), b("button", {
|
|
3103
|
+
type: "button",
|
|
3104
|
+
class: y(["relative min-w-20 flex items-center justify-center", [c(s)]]),
|
|
3105
|
+
onClick: o
|
|
3106
|
+
}, [
|
|
3107
|
+
c(a) ? (h(), b("div", {
|
|
3108
|
+
key: 0,
|
|
3109
|
+
class: y([c(i), c(l)])
|
|
3110
|
+
}, null, 2)) : (h(), b("div", {
|
|
3111
|
+
key: 1,
|
|
3112
|
+
class: y([c(i), c(l)])
|
|
3113
|
+
}, null, 2)),
|
|
3114
|
+
w("div", Nn, [
|
|
3115
|
+
k(u.$slots, "default")
|
|
3116
|
+
])
|
|
3117
|
+
], 2));
|
|
3118
|
+
}
|
|
3119
|
+
}), co = /* @__PURE__ */ x({
|
|
3120
|
+
__name: "Tabs",
|
|
3121
|
+
props: /* @__PURE__ */ j({
|
|
3122
|
+
defaultValue: {},
|
|
3123
|
+
direction: { default: "horizontal" }
|
|
3124
|
+
}, {
|
|
3125
|
+
modelValue: {},
|
|
3126
|
+
modelModifiers: {}
|
|
3127
|
+
}),
|
|
3128
|
+
emits: ["update:modelValue"],
|
|
3129
|
+
setup(e) {
|
|
3130
|
+
const t = e, r = nt(), n = m(() => {
|
|
3131
|
+
var u;
|
|
3132
|
+
const i = (u = r.default) == null ? void 0 : u.call(r);
|
|
3133
|
+
return (i == null ? void 0 : i.flatMap((d) => d.type === K ? d.children : d).filter((d) => {
|
|
3134
|
+
var f;
|
|
3135
|
+
return ((f = d == null ? void 0 : d.props) == null ? void 0 : f.value) !== void 0;
|
|
3136
|
+
}).map((d) => d.props.value)) ?? [];
|
|
3137
|
+
}), a = U(e, "modelValue");
|
|
3138
|
+
!a.value && n.value.length > 0 && (a.value = n.value[0]), ee(() => {
|
|
3139
|
+
t.defaultValue && (a.value = t.defaultValue);
|
|
3140
|
+
}), ge(yt, a);
|
|
3141
|
+
const o = m(() => t.direction);
|
|
3142
|
+
ge(wt, o), te("left", () => {
|
|
3143
|
+
if (t.direction !== "horizontal")
|
|
3144
|
+
return;
|
|
3145
|
+
const i = a.value ? n.value.indexOf(a.value) : 0;
|
|
3146
|
+
i > 0 ? a.value = n.value[i - 1] : a.value = n.value[n.value.length - 1];
|
|
3147
|
+
}), te("right", () => {
|
|
3148
|
+
if (t.direction !== "horizontal")
|
|
3149
|
+
return;
|
|
3150
|
+
const i = a.value ? n.value.indexOf(a.value) : 0;
|
|
3151
|
+
i < n.value.length - 1 ? a.value = n.value[i + 1] : a.value = n.value[0];
|
|
3152
|
+
}), te("up", () => {
|
|
3153
|
+
if (t.direction !== "vertical")
|
|
3154
|
+
return;
|
|
3155
|
+
const i = a.value ? n.value.indexOf(a.value) : 0;
|
|
3156
|
+
i > 0 ? a.value = n.value[i - 1] : a.value = n.value[n.value.length - 1];
|
|
3157
|
+
}), te("down", () => {
|
|
3158
|
+
if (t.direction !== "vertical")
|
|
3159
|
+
return;
|
|
3160
|
+
const i = a.value ? n.value.indexOf(a.value) : 0;
|
|
3161
|
+
i < n.value.length - 1 ? a.value = n.value[i + 1] : a.value = n.value[0];
|
|
3162
|
+
});
|
|
3163
|
+
const s = m(() => {
|
|
3164
|
+
switch (t.direction) {
|
|
3165
|
+
case "horizontal":
|
|
3166
|
+
return "flex-row";
|
|
3167
|
+
case "vertical":
|
|
3168
|
+
return "flex-col";
|
|
3169
|
+
}
|
|
3170
|
+
});
|
|
3171
|
+
return (i, l) => (h(), b("div", {
|
|
3172
|
+
class: y(["flex", [c(s)]])
|
|
3173
|
+
}, [
|
|
3174
|
+
k(i.$slots, "default")
|
|
3175
|
+
], 2));
|
|
3176
|
+
}
|
|
3081
3177
|
});
|
|
3082
3178
|
export {
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3179
|
+
In as AspectRatio,
|
|
3180
|
+
Ht as Avatar,
|
|
3181
|
+
at as Btn,
|
|
3182
|
+
Vn as ChatContainer,
|
|
3183
|
+
Dn as ChatMessage,
|
|
3184
|
+
Fn as ChatSystem,
|
|
3185
|
+
Ln as Chip,
|
|
3186
|
+
jn as ColorInput,
|
|
3187
|
+
ir as ColorSwatch,
|
|
3188
|
+
Un as Drawer,
|
|
3189
|
+
Gn as Dropzone,
|
|
3190
|
+
dt as FullscreenOverlay,
|
|
3191
|
+
qn as Image,
|
|
3192
|
+
Xn as Indicator,
|
|
3193
|
+
Yn as Modal,
|
|
3194
|
+
Yr as Notification,
|
|
3195
|
+
Zn as NotificationSystem,
|
|
3196
|
+
ro as Notifications,
|
|
3197
|
+
Kn as Overlay,
|
|
3198
|
+
Qn as Paper,
|
|
3199
|
+
Jn as PinInput,
|
|
3200
|
+
eo as Progress,
|
|
3201
|
+
oo as RokuProvider,
|
|
3202
|
+
ao as SchemeSwitch,
|
|
3203
|
+
so as Select,
|
|
3204
|
+
lo as Slider,
|
|
3205
|
+
Sn as Switch,
|
|
3206
|
+
io as TabItem,
|
|
3207
|
+
co as Tabs,
|
|
3208
|
+
mn as TextField,
|
|
3209
|
+
Vr as ThemeProvider,
|
|
3210
|
+
Ie as darkTheme,
|
|
3211
|
+
wt as directionSymbol,
|
|
3212
|
+
no as generateColors,
|
|
3213
|
+
wn as generateColorsMap,
|
|
3214
|
+
bn as lightTheme,
|
|
3215
|
+
to as notificationsSymbol,
|
|
3216
|
+
ut as schemeSymbol,
|
|
3217
|
+
yt as tabCurrentSymbol,
|
|
3218
|
+
bt as themeColors,
|
|
3219
|
+
Or as useCurrentTheme,
|
|
3220
|
+
Wn as useCurrentThemeScheme,
|
|
3221
|
+
ct as useId,
|
|
3222
|
+
gn as useNotifications,
|
|
3223
|
+
Br as useRootTheme,
|
|
3224
|
+
Hr as useScheme,
|
|
3125
3225
|
it as useThemeStyles
|
|
3126
3226
|
};
|