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