@validol4ik/uikit 0.7.1 → 0.7.4

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.
@@ -0,0 +1,1670 @@
1
+ import { computed as r, markRaw as Ee, defineComponent as K, h as m, withDirectives as oe, getCurrentInstance as ee, unref as Z, ref as W, onBeforeUnmount as Fe, Transition as Qe, createBlock as ae, openBlock as b, normalizeClass as L, withCtx as Ue, createElementBlock as _, createCommentVNode as A, renderSlot as se, Fragment as ie, createTextVNode as Le, toDisplayString as Y, createElementVNode as T, toRaw as Q, createVNode as He, normalizeStyle as re, watch as Xe, onMounted as We, renderList as Pe, withKeys as Ye, vModelText as Ge, nextTick as he, mergeModels as Je, useModel as Ze, defineAsyncComponent as pe } from "vue";
2
+ const _n = ({ app: e }) => {
3
+ const t = e.config.globalProperties.$q;
4
+ t.iconMapFn = (n) => {
5
+ if (n.startsWith("icon-kl:"))
6
+ return {
7
+ cls: `icon-kl icon-kl-${n.slice(8)}`
8
+ };
9
+ };
10
+ }, Re = {
11
+ PRIMARY: "primary",
12
+ INFO: "info"
13
+ }, z = {
14
+ SM: "sm",
15
+ MD: "md",
16
+ LG: "lg",
17
+ XL: "xl"
18
+ }, et = {
19
+ [z.SM]: "3px 9px",
20
+ [z.MD]: "5px 12px",
21
+ [z.LG]: "6px 15px",
22
+ [z.XL]: "9px 20px"
23
+ }, me = {
24
+ xs: 18,
25
+ sm: 24,
26
+ md: 32,
27
+ lg: 38,
28
+ xl: 46
29
+ }, ue = {
30
+ size: String
31
+ };
32
+ function ce(e, t = me) {
33
+ return r(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null);
34
+ }
35
+ function te(e) {
36
+ return Ee(K(e));
37
+ }
38
+ function Me(e) {
39
+ return Ee(e);
40
+ }
41
+ function Ae(e, t) {
42
+ return e !== void 0 && e() || t;
43
+ }
44
+ function $n(e, t) {
45
+ if (e !== void 0) {
46
+ const n = e();
47
+ if (n != null)
48
+ return n.slice();
49
+ }
50
+ return t;
51
+ }
52
+ function N(e, t) {
53
+ return e !== void 0 ? t.concat(e()) : t;
54
+ }
55
+ function qn(e, t) {
56
+ return e === void 0 ? t : t !== void 0 ? t.concat(e()) : e();
57
+ }
58
+ function Sn(e, t, n, a, s, l) {
59
+ t.key = a + s;
60
+ const o = m(e, t, n);
61
+ return s === !0 ? oe(o, l()) : o;
62
+ }
63
+ const be = "0 0 24 24", fe = (e) => e, ve = (e) => `ionicons ${e}`, Ve = {
64
+ "mdi-": (e) => `mdi ${e}`,
65
+ "icon-": fe,
66
+ // fontawesome equiv
67
+ "bt-": (e) => `bt ${e}`,
68
+ "eva-": (e) => `eva ${e}`,
69
+ "ion-md": ve,
70
+ "ion-ios": ve,
71
+ "ion-logo": ve,
72
+ "iconfont ": fe,
73
+ "ti-": (e) => `themify-icon ${e}`,
74
+ "bi-": (e) => `bootstrap-icons ${e}`,
75
+ "i-": fe
76
+ // UnoCSS pure icons
77
+ }, Ie = {
78
+ o_: "-outlined",
79
+ r_: "-round",
80
+ s_: "-sharp"
81
+ }, Te = {
82
+ sym_o_: "-outlined",
83
+ sym_r_: "-rounded",
84
+ sym_s_: "-sharp"
85
+ }, tt = new RegExp("^(" + Object.keys(Ve).join("|") + ")"), nt = new RegExp("^(" + Object.keys(Ie).join("|") + ")"), ke = new RegExp("^(" + Object.keys(Te).join("|") + ")"), at = /^[Mm]\s?[-+]?\.?\d/, lt = /^img:/, ot = /^svguse:/, st = /^ion-/, it = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, ge = te({
86
+ name: "QIcon",
87
+ props: {
88
+ ...ue,
89
+ tag: {
90
+ type: String,
91
+ default: "i"
92
+ },
93
+ name: String,
94
+ color: String,
95
+ left: Boolean,
96
+ right: Boolean
97
+ },
98
+ setup(e, { slots: t }) {
99
+ const { proxy: { $q: n } } = ee(), a = ce(e), s = r(
100
+ () => "q-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "")
101
+ ), l = r(() => {
102
+ let o, i = e.name;
103
+ if (i === "none" || !i)
104
+ return { none: !0 };
105
+ if (n.iconMapFn !== null) {
106
+ const f = n.iconMapFn(i);
107
+ if (f !== void 0)
108
+ if (f.icon !== void 0) {
109
+ if (i = f.icon, i === "none" || !i)
110
+ return { none: !0 };
111
+ } else
112
+ return {
113
+ cls: f.cls,
114
+ content: f.content !== void 0 ? f.content : " "
115
+ };
116
+ }
117
+ if (at.test(i) === !0) {
118
+ const [f, S = be] = i.split("|");
119
+ return {
120
+ svg: !0,
121
+ viewBox: S,
122
+ nodes: f.split("&&").map((d) => {
123
+ const [q, u, g] = d.split("@@");
124
+ return m("path", { style: u, d: q, transform: g });
125
+ })
126
+ };
127
+ }
128
+ if (lt.test(i) === !0)
129
+ return {
130
+ img: !0,
131
+ src: i.substring(4)
132
+ };
133
+ if (ot.test(i) === !0) {
134
+ const [f, S = be] = i.split("|");
135
+ return {
136
+ svguse: !0,
137
+ src: f.substring(7),
138
+ viewBox: S
139
+ };
140
+ }
141
+ let $ = " ";
142
+ const y = i.match(tt);
143
+ if (y !== null)
144
+ o = Ve[y[1]](i);
145
+ else if (it.test(i) === !0)
146
+ o = i;
147
+ else if (st.test(i) === !0)
148
+ o = `ionicons ion-${n.platform.is.ios === !0 ? "ios" : "md"}${i.substring(3)}`;
149
+ else if (ke.test(i) === !0) {
150
+ o = "notranslate material-symbols";
151
+ const f = i.match(ke);
152
+ f !== null && (i = i.substring(6), o += Te[f[1]]), $ = i;
153
+ } else {
154
+ o = "notranslate material-icons";
155
+ const f = i.match(nt);
156
+ f !== null && (i = i.substring(2), o += Ie[f[1]]), $ = i;
157
+ }
158
+ return {
159
+ cls: o,
160
+ content: $
161
+ };
162
+ });
163
+ return () => {
164
+ const o = {
165
+ class: s.value,
166
+ style: a.value,
167
+ "aria-hidden": "true"
168
+ };
169
+ return l.value.none === !0 ? m(e.tag, o, Ae(t.default)) : l.value.img === !0 ? m(e.tag, o, N(t.default, [
170
+ m("img", { src: l.value.src })
171
+ ])) : l.value.svg === !0 ? m(e.tag, o, N(t.default, [
172
+ m("svg", {
173
+ viewBox: l.value.viewBox || "0 0 24 24"
174
+ }, l.value.nodes)
175
+ ])) : l.value.svguse === !0 ? m(e.tag, o, N(t.default, [
176
+ m("svg", {
177
+ viewBox: l.value.viewBox
178
+ }, [
179
+ m("use", { "xlink:href": l.value.src })
180
+ ])
181
+ ])) : (l.value.cls !== void 0 && (o.class += " " + l.value.cls), m(e.tag, o, N(t.default, [
182
+ l.value.content
183
+ ])));
184
+ };
185
+ }
186
+ }), rt = {
187
+ size: {
188
+ type: [String, Number],
189
+ default: "1em"
190
+ },
191
+ color: String
192
+ };
193
+ function ut(e) {
194
+ return {
195
+ cSize: r(() => e.size in me ? `${me[e.size]}px` : e.size),
196
+ classes: r(
197
+ () => "q-spinner" + (e.color ? ` text-${e.color}` : "")
198
+ )
199
+ };
200
+ }
201
+ const ze = te({
202
+ name: "QSpinner",
203
+ props: {
204
+ ...rt,
205
+ thickness: {
206
+ type: Number,
207
+ default: 5
208
+ }
209
+ },
210
+ setup(e) {
211
+ const { cSize: t, classes: n } = ut(e);
212
+ return () => m("svg", {
213
+ class: n.value + " q-spinner-mat",
214
+ width: t.value,
215
+ height: t.value,
216
+ viewBox: "25 25 50 50"
217
+ }, [
218
+ m("circle", {
219
+ class: "path",
220
+ cx: "50",
221
+ cy: "50",
222
+ r: "20",
223
+ fill: "none",
224
+ stroke: "currentColor",
225
+ "stroke-width": e.thickness,
226
+ "stroke-miterlimit": "10"
227
+ })
228
+ ]);
229
+ }
230
+ });
231
+ function ct(e, t) {
232
+ const n = e.style;
233
+ for (const a in t)
234
+ n[a] = t[a];
235
+ }
236
+ function Cn(e) {
237
+ if (e == null)
238
+ return;
239
+ if (typeof e == "string")
240
+ try {
241
+ return document.querySelector(e) || void 0;
242
+ } catch {
243
+ return;
244
+ }
245
+ const t = Z(e);
246
+ if (t)
247
+ return t.$el || t;
248
+ }
249
+ function Bn(e, t) {
250
+ if (e == null || e.contains(t) === !0)
251
+ return !0;
252
+ for (let n = e.nextElementSibling; n !== null; n = n.nextElementSibling)
253
+ if (n.contains(t))
254
+ return !0;
255
+ return !1;
256
+ }
257
+ const de = {
258
+ hasPassive: !1,
259
+ passiveCapture: !0,
260
+ notPassiveCapture: !0
261
+ };
262
+ try {
263
+ const e = Object.defineProperty({}, "passive", {
264
+ get() {
265
+ Object.assign(de, {
266
+ hasPassive: !0,
267
+ passive: { passive: !0 },
268
+ notPassive: { passive: !1 },
269
+ passiveCapture: { passive: !0, capture: !0 },
270
+ notPassiveCapture: { passive: !1, capture: !0 }
271
+ });
272
+ }
273
+ });
274
+ window.addEventListener("qtest", null, e), window.removeEventListener("qtest", null, e);
275
+ } catch {
276
+ }
277
+ function wn() {
278
+ }
279
+ function dt(e) {
280
+ return e.touches && e.touches[0] ? e = e.touches[0] : e.changedTouches && e.changedTouches[0] ? e = e.changedTouches[0] : e.targetTouches && e.targetTouches[0] && (e = e.targetTouches[0]), {
281
+ top: e.clientY,
282
+ left: e.clientX
283
+ };
284
+ }
285
+ function En(e) {
286
+ if (e.path)
287
+ return e.path;
288
+ if (e.composedPath)
289
+ return e.composedPath();
290
+ const t = [];
291
+ let n = e.target;
292
+ for (; n; ) {
293
+ if (t.push(n), n.tagName === "HTML")
294
+ return t.push(document), t.push(window), t;
295
+ n = n.parentElement;
296
+ }
297
+ }
298
+ function Oe(e) {
299
+ e.stopPropagation();
300
+ }
301
+ function ft(e) {
302
+ e.cancelable !== !1 && e.preventDefault();
303
+ }
304
+ function D(e) {
305
+ e.cancelable !== !1 && e.preventDefault(), e.stopPropagation();
306
+ }
307
+ function vt(e, t, n) {
308
+ const a = `__q_${t}_evt`;
309
+ e[a] = e[a] !== void 0 ? e[a].concat(n) : n, n.forEach((s) => {
310
+ s[0].addEventListener(s[1], e[s[2]], de[s[3]]);
311
+ });
312
+ }
313
+ function mt(e, t) {
314
+ const n = `__q_${t}_evt`;
315
+ e[n] !== void 0 && (e[n].forEach((a) => {
316
+ a[0].removeEventListener(a[1], e[a[2]], de[a[3]]);
317
+ }), e[n] = void 0);
318
+ }
319
+ function gt(e) {
320
+ return e !== Object(e) || e.isComposing === !0 || e.qKeyEvent === !0;
321
+ }
322
+ function le(e, t) {
323
+ return gt(e) === !0 ? !1 : [].concat(t).includes(e.keyCode);
324
+ }
325
+ function pt(e, t = 250) {
326
+ let n = !1, a;
327
+ return function() {
328
+ return n === !1 && (n = !0, setTimeout(() => {
329
+ n = !1;
330
+ }, t), a = e.apply(this, arguments)), a;
331
+ };
332
+ }
333
+ function ye(e, t, n, a) {
334
+ n.modifiers.stop === !0 && Oe(e);
335
+ const s = n.modifiers.color;
336
+ let l = n.modifiers.center;
337
+ l = l === !0 || a === !0;
338
+ const o = document.createElement("span"), i = document.createElement("span"), $ = dt(e), { left: y, top: f, width: S, height: d } = t.getBoundingClientRect(), q = Math.sqrt(S * S + d * d), u = q / 2, g = `${(S - q) / 2}px`, v = l ? g : `${$.left - y - u}px`, h = `${(d - q) / 2}px`, C = l ? h : `${$.top - f - u}px`;
339
+ i.className = "q-ripple__inner", ct(i, {
340
+ height: `${q}px`,
341
+ width: `${q}px`,
342
+ transform: `translate3d(${v},${C},0) scale3d(.2,.2,1)`,
343
+ opacity: 0
344
+ }), o.className = `q-ripple${s ? " text-" + s : ""}`, o.setAttribute("dir", "ltr"), o.appendChild(i), t.appendChild(o);
345
+ const w = () => {
346
+ o.remove(), clearTimeout(E);
347
+ };
348
+ n.abort.push(w);
349
+ let E = setTimeout(() => {
350
+ i.classList.add("q-ripple__inner--enter"), i.style.transform = `translate3d(${g},${h},0) scale3d(1,1,1)`, i.style.opacity = 0.2, E = setTimeout(() => {
351
+ i.classList.remove("q-ripple__inner--enter"), i.classList.add("q-ripple__inner--leave"), i.style.opacity = 0, E = setTimeout(() => {
352
+ o.remove(), n.abort.splice(n.abort.indexOf(w), 1);
353
+ }, 275);
354
+ }, 250);
355
+ }, 50);
356
+ }
357
+ function _e(e, { modifiers: t, value: n, arg: a }) {
358
+ const s = Object.assign({}, e.cfg.ripple, t, n);
359
+ e.modifiers = {
360
+ early: s.early === !0,
361
+ stop: s.stop === !0,
362
+ center: s.center === !0,
363
+ color: s.color || a,
364
+ keyCodes: [].concat(s.keyCodes || 13)
365
+ };
366
+ }
367
+ const ht = Me(
368
+ {
369
+ name: "ripple",
370
+ beforeMount(e, t) {
371
+ const n = t.instance.$.appContext.config.globalProperties.$q.config || {};
372
+ if (n.ripple === !1) return;
373
+ const a = {
374
+ cfg: n,
375
+ enabled: t.value !== !1,
376
+ modifiers: {},
377
+ abort: [],
378
+ start(s) {
379
+ a.enabled === !0 && s.qSkipRipple !== !0 && s.type === (a.modifiers.early === !0 ? "pointerdown" : "click") && ye(s, e, a, s.qKeyEvent === !0);
380
+ },
381
+ keystart: pt((s) => {
382
+ a.enabled === !0 && s.qSkipRipple !== !0 && le(s, a.modifiers.keyCodes) === !0 && s.type === `key${a.modifiers.early === !0 ? "down" : "up"}` && ye(s, e, a, !0);
383
+ }, 300)
384
+ };
385
+ _e(a, t), e.__qripple = a, vt(a, "main", [
386
+ [e, "pointerdown", "start", "passive"],
387
+ [e, "click", "start", "passive"],
388
+ [e, "keydown", "keystart", "passive"],
389
+ [e, "keyup", "keystart", "passive"]
390
+ ]);
391
+ },
392
+ updated(e, t) {
393
+ if (t.oldValue !== t.value) {
394
+ const n = e.__qripple;
395
+ n !== void 0 && (n.enabled = t.value !== !1, n.enabled === !0 && Object(t.value) === t.value && _e(n, t));
396
+ }
397
+ },
398
+ beforeUnmount(e) {
399
+ const t = e.__qripple;
400
+ t !== void 0 && (t.abort.forEach((n) => {
401
+ n();
402
+ }), mt(t, "main"), delete e._qripple);
403
+ }
404
+ }
405
+ ), je = {
406
+ left: "start",
407
+ center: "center",
408
+ right: "end",
409
+ between: "between",
410
+ around: "around",
411
+ evenly: "evenly",
412
+ stretch: "stretch"
413
+ }, bt = Object.keys(je), kt = {
414
+ align: {
415
+ type: String,
416
+ validator: (e) => bt.includes(e)
417
+ }
418
+ };
419
+ function yt(e) {
420
+ return r(() => {
421
+ const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
422
+ return `${e.vertical === !0 ? "items" : "justify"}-${je[t]}`;
423
+ });
424
+ }
425
+ function ne(e) {
426
+ if (Object(e.$parent) === e.$parent)
427
+ return e.$parent;
428
+ let { parent: t } = e.$;
429
+ for (; Object(t) === t; ) {
430
+ if (Object(t.proxy) === t.proxy)
431
+ return t.proxy;
432
+ t = t.parent;
433
+ }
434
+ }
435
+ function _t(e) {
436
+ return e.appContext.config.globalProperties.$router !== void 0;
437
+ }
438
+ function Ln(e) {
439
+ return e.isUnmounted === !0 || e.isDeactivated === !0;
440
+ }
441
+ function $e(e) {
442
+ return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
443
+ }
444
+ function qe(e, t) {
445
+ return (e.aliasOf || e) === (t.aliasOf || t);
446
+ }
447
+ function $t(e, t) {
448
+ for (const n in t) {
449
+ const a = t[n], s = e[n];
450
+ if (typeof a == "string") {
451
+ if (a !== s)
452
+ return !1;
453
+ } else if (Array.isArray(s) === !1 || s.length !== a.length || a.some((l, o) => l !== s[o]))
454
+ return !1;
455
+ }
456
+ return !0;
457
+ }
458
+ function Se(e, t) {
459
+ return Array.isArray(t) === !0 ? e.length === t.length && e.every((n, a) => n === t[a]) : e.length === 1 && e[0] === t;
460
+ }
461
+ function qt(e, t) {
462
+ return Array.isArray(e) === !0 ? Se(e, t) : Array.isArray(t) === !0 ? Se(t, e) : e === t;
463
+ }
464
+ function St(e, t) {
465
+ if (Object.keys(e).length !== Object.keys(t).length)
466
+ return !1;
467
+ for (const n in e)
468
+ if (qt(e[n], t[n]) === !1)
469
+ return !1;
470
+ return !0;
471
+ }
472
+ const De = {
473
+ // router-link
474
+ to: [String, Object],
475
+ replace: Boolean,
476
+ // regular <a> link
477
+ href: String,
478
+ target: String,
479
+ // state
480
+ disable: Boolean
481
+ }, Pn = {
482
+ ...De,
483
+ // router-link
484
+ exact: Boolean,
485
+ activeClass: {
486
+ type: String,
487
+ default: "q-router-link--active"
488
+ },
489
+ exactActiveClass: {
490
+ type: String,
491
+ default: "q-router-link--exact-active"
492
+ }
493
+ };
494
+ function Ct({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) {
495
+ const n = ee(), { props: a, proxy: s, emit: l } = n, o = _t(n), i = r(() => a.disable !== !0 && a.href !== void 0), $ = t === !0 ? r(
496
+ () => o === !0 && a.disable !== !0 && i.value !== !0 && a.to !== void 0 && a.to !== null && a.to !== ""
497
+ ) : r(
498
+ () => o === !0 && i.value !== !0 && a.to !== void 0 && a.to !== null && a.to !== ""
499
+ ), y = r(() => $.value === !0 ? C(a.to) : null), f = r(() => y.value !== null), S = r(() => i.value === !0 || f.value === !0), d = r(() => a.type === "a" || S.value === !0 ? "a" : a.tag || e || "div"), q = r(() => i.value === !0 ? {
500
+ href: a.href,
501
+ target: a.target
502
+ } : f.value === !0 ? {
503
+ href: y.value.href,
504
+ target: a.target
505
+ } : {}), u = r(() => {
506
+ if (f.value === !1)
507
+ return -1;
508
+ const { matched: k } = y.value, { length: P } = k, R = k[P - 1];
509
+ if (R === void 0)
510
+ return -1;
511
+ const O = s.$route.matched;
512
+ if (O.length === 0)
513
+ return -1;
514
+ const j = O.findIndex(
515
+ qe.bind(null, R)
516
+ );
517
+ if (j !== -1)
518
+ return j;
519
+ const F = $e(k[P - 2]);
520
+ return (
521
+ // we are dealing with nested routes
522
+ P > 1 && $e(R) === F && O[O.length - 1].path !== F ? O.findIndex(
523
+ qe.bind(null, k[P - 2])
524
+ ) : j
525
+ );
526
+ }), g = r(
527
+ () => f.value === !0 && u.value !== -1 && $t(s.$route.params, y.value.params)
528
+ ), v = r(
529
+ () => g.value === !0 && u.value === s.$route.matched.length - 1 && St(s.$route.params, y.value.params)
530
+ ), h = r(() => f.value === !0 ? v.value === !0 ? ` ${a.exactActiveClass} ${a.activeClass}` : a.exact === !0 ? "" : g.value === !0 ? ` ${a.activeClass}` : "" : "");
531
+ function C(k) {
532
+ try {
533
+ return s.$router.resolve(k);
534
+ } catch {
535
+ }
536
+ return null;
537
+ }
538
+ function w(k, { returnRouterError: P, to: R = a.to, replace: O = a.replace } = {}) {
539
+ if (a.disable === !0)
540
+ return k.preventDefault(), Promise.resolve(!1);
541
+ if (
542
+ // don't redirect with control keys;
543
+ // should match RouterLink from Vue Router
544
+ k.metaKey || k.altKey || k.ctrlKey || k.shiftKey || k.button !== void 0 && k.button !== 0 || a.target === "_blank"
545
+ )
546
+ return Promise.resolve(!1);
547
+ k.preventDefault();
548
+ const j = s.$router[O === !0 ? "replace" : "push"](R);
549
+ return P === !0 ? j : j.then(() => {
550
+ }).catch(() => {
551
+ });
552
+ }
553
+ function E(k) {
554
+ if (f.value === !0) {
555
+ const P = (R) => w(k, R);
556
+ l("click", k, P), k.defaultPrevented !== !0 && P();
557
+ } else
558
+ l("click", k);
559
+ }
560
+ return {
561
+ hasRouterLink: f,
562
+ hasHrefLink: i,
563
+ hasLink: S,
564
+ linkTag: d,
565
+ resolvedLink: y,
566
+ linkIsActive: g,
567
+ linkIsExactActive: v,
568
+ linkClass: h,
569
+ linkAttrs: q,
570
+ getLink: C,
571
+ navigateToRouterLink: w,
572
+ navigateOnClick: E
573
+ };
574
+ }
575
+ const Ce = {
576
+ none: 0,
577
+ xs: 4,
578
+ sm: 8,
579
+ md: 16,
580
+ lg: 24,
581
+ xl: 32
582
+ }, Bt = {
583
+ xs: 8,
584
+ sm: 10,
585
+ md: 14,
586
+ lg: 20,
587
+ xl: 24
588
+ }, wt = ["button", "submit", "reset"], Et = /[^\s]\/[^\s]/, Lt = ["flat", "outline", "push", "unelevated"];
589
+ function xe(e, t) {
590
+ return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : t;
591
+ }
592
+ function Rn(e) {
593
+ const t = xe(e);
594
+ return t !== void 0 ? { [t]: !0 } : {};
595
+ }
596
+ const Pt = {
597
+ ...ue,
598
+ ...De,
599
+ type: {
600
+ type: String,
601
+ default: "button"
602
+ },
603
+ label: [Number, String],
604
+ icon: String,
605
+ iconRight: String,
606
+ ...Lt.reduce(
607
+ (e, t) => (e[t] = Boolean) && e,
608
+ {}
609
+ ),
610
+ square: Boolean,
611
+ rounded: Boolean,
612
+ glossy: Boolean,
613
+ size: String,
614
+ fab: Boolean,
615
+ fabMini: Boolean,
616
+ padding: String,
617
+ color: String,
618
+ textColor: String,
619
+ noCaps: Boolean,
620
+ noWrap: Boolean,
621
+ dense: Boolean,
622
+ tabindex: [Number, String],
623
+ ripple: {
624
+ type: [Boolean, Object],
625
+ default: !0
626
+ },
627
+ align: {
628
+ ...kt.align,
629
+ default: "center"
630
+ },
631
+ stack: Boolean,
632
+ stretch: Boolean,
633
+ loading: {
634
+ type: Boolean,
635
+ default: null
636
+ },
637
+ disable: Boolean
638
+ }, Rt = {
639
+ ...Pt,
640
+ round: Boolean
641
+ };
642
+ function Mt(e) {
643
+ const t = ce(e, Bt), n = yt(e), { hasRouterLink: a, hasLink: s, linkTag: l, linkAttrs: o, navigateOnClick: i } = Ct({
644
+ fallbackTag: "button"
645
+ }), $ = r(() => {
646
+ const v = e.fab === !1 && e.fabMini === !1 ? t.value : {};
647
+ return e.padding !== void 0 ? Object.assign({}, v, {
648
+ padding: e.padding.split(/\s+/).map((h) => h in Ce ? Ce[h] + "px" : h).join(" "),
649
+ minWidth: "0",
650
+ minHeight: "0"
651
+ }) : v;
652
+ }), y = r(
653
+ () => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
654
+ ), f = r(
655
+ () => e.disable !== !0 && e.loading !== !0
656
+ ), S = r(() => f.value === !0 ? e.tabindex || 0 : -1), d = r(() => xe(e, "standard")), q = r(() => {
657
+ const v = { tabindex: S.value };
658
+ return s.value === !0 ? Object.assign(v, o.value) : wt.includes(e.type) === !0 && (v.type = e.type), l.value === "a" ? (e.disable === !0 ? v["aria-disabled"] = "true" : v.href === void 0 && (v.role = "button"), a.value !== !0 && Et.test(e.type) === !0 && (v.type = e.type)) : e.disable === !0 && (v.disabled = "", v["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(v, {
659
+ role: "progressbar",
660
+ "aria-valuemin": 0,
661
+ "aria-valuemax": 100,
662
+ "aria-valuenow": e.percentage
663
+ }), v;
664
+ }), u = r(() => {
665
+ let v;
666
+ e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? v = `text-${e.textColor || e.color}` : v = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (v = `text-${e.textColor}`);
667
+ const h = e.round === !0 ? "round" : `rectangle${y.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
668
+ return `q-btn--${d.value} q-btn--${h}` + (v !== void 0 ? " " + v : "") + (f.value === !0 ? " q-btn--actionable q-focusable q-hoverable" : e.disable === !0 ? " disabled" : "") + (e.fab === !0 ? " q-btn--fab" : e.fabMini === !0 ? " q-btn--fab-mini" : "") + (e.noCaps === !0 ? " q-btn--no-uppercase" : "") + (e.dense === !0 ? " q-btn--dense" : "") + (e.stretch === !0 ? " no-border-radius self-stretch" : "") + (e.glossy === !0 ? " glossy" : "") + (e.square ? " q-btn--square" : "");
669
+ }), g = r(
670
+ () => n.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
671
+ );
672
+ return {
673
+ classes: u,
674
+ style: $,
675
+ innerClasses: g,
676
+ attributes: q,
677
+ hasLink: s,
678
+ linkTag: l,
679
+ navigateOnClick: i,
680
+ isActionable: f
681
+ };
682
+ }
683
+ const { passiveCapture: I } = de;
684
+ let U = null, H = null, X = null;
685
+ const At = te({
686
+ name: "QBtn",
687
+ props: {
688
+ ...Rt,
689
+ percentage: Number,
690
+ darkPercentage: Boolean,
691
+ onTouchstart: [Function, Array]
692
+ },
693
+ emits: ["click", "keydown", "mousedown", "keyup"],
694
+ setup(e, { slots: t, emit: n }) {
695
+ const { proxy: a } = ee(), {
696
+ classes: s,
697
+ style: l,
698
+ innerClasses: o,
699
+ attributes: i,
700
+ hasLink: $,
701
+ linkTag: y,
702
+ navigateOnClick: f,
703
+ isActionable: S
704
+ } = Mt(e), d = W(null), q = W(null);
705
+ let u = null, g, v = null;
706
+ const h = r(
707
+ () => e.label !== void 0 && e.label !== null && e.label !== ""
708
+ ), C = r(() => e.disable === !0 || e.ripple === !1 ? !1 : {
709
+ keyCodes: $.value === !0 ? [13, 32] : [13],
710
+ ...e.ripple === !0 ? {} : e.ripple
711
+ }), w = r(() => ({ center: e.round })), E = r(() => {
712
+ const c = Math.max(0, Math.min(100, e.percentage));
713
+ return c > 0 ? { transition: "transform 0.6s", transform: `translateX(${c - 100}%)` } : {};
714
+ }), k = r(() => {
715
+ if (e.loading === !0)
716
+ return {
717
+ onMousedown: M,
718
+ onTouchstart: M,
719
+ onClick: M,
720
+ onKeydown: M,
721
+ onKeyup: M
722
+ };
723
+ if (S.value === !0) {
724
+ const c = {
725
+ onClick: R,
726
+ onKeydown: O,
727
+ onMousedown: F
728
+ };
729
+ if (a.$q.platform.has.touch === !0) {
730
+ const B = e.onTouchstart !== void 0 ? "" : "Passive";
731
+ c[`onTouchstart${B}`] = j;
732
+ }
733
+ return c;
734
+ }
735
+ return {
736
+ // needed; especially for disabled <a> tags
737
+ onClick: D
738
+ };
739
+ }), P = r(() => ({
740
+ ref: d,
741
+ class: "q-btn q-btn-item non-selectable no-outline " + s.value,
742
+ style: l.value,
743
+ ...i.value,
744
+ ...k.value
745
+ }));
746
+ function R(c) {
747
+ if (d.value !== null) {
748
+ if (c !== void 0) {
749
+ if (c.defaultPrevented === !0) return;
750
+ const B = document.activeElement;
751
+ if (e.type === "submit" && B !== document.body && d.value.contains(B) === !1 && B.contains(d.value) === !1) {
752
+ c.qAvoidFocus !== !0 && d.value.focus();
753
+ const x = () => {
754
+ var J;
755
+ document.removeEventListener("keydown", D, !0), document.removeEventListener("keyup", x, I), (J = d.value) == null || J.removeEventListener("blur", x, I);
756
+ };
757
+ document.addEventListener("keydown", D, !0), document.addEventListener("keyup", x, I), d.value.addEventListener("blur", x, I);
758
+ }
759
+ }
760
+ f(c);
761
+ }
762
+ }
763
+ function O(c) {
764
+ d.value !== null && (n("keydown", c), le(c, [13, 32]) === !0 && H !== d.value && (H !== null && p(), c.defaultPrevented !== !0 && (c.qAvoidFocus !== !0 && d.value.focus(), H = d.value, d.value.classList.add("q-btn--active"), document.addEventListener("keyup", V, !0), d.value.addEventListener("blur", V, I)), D(c)));
765
+ }
766
+ function j(c) {
767
+ d.value !== null && (n("touchstart", c), c.defaultPrevented !== !0 && (U !== d.value && (U !== null && p(), U = d.value, u = c.target, u.addEventListener("touchcancel", V, I), u.addEventListener("touchend", V, I)), g = !0, v !== null && clearTimeout(v), v = setTimeout(() => {
768
+ v = null, g = !1;
769
+ }, 200)));
770
+ }
771
+ function F(c) {
772
+ d.value !== null && (c.qSkipRipple = g === !0, n("mousedown", c), c.defaultPrevented !== !0 && X !== d.value && (X !== null && p(), X = d.value, d.value.classList.add("q-btn--active"), document.addEventListener("mouseup", V, I)));
773
+ }
774
+ function V(c) {
775
+ if (d.value !== null && !((c == null ? void 0 : c.type) === "blur" && document.activeElement === d.value)) {
776
+ if ((c == null ? void 0 : c.type) === "keyup") {
777
+ if (H === d.value && le(c, [13, 32]) === !0) {
778
+ const B = new MouseEvent("click", c);
779
+ B.qKeyEvent = !0, c.defaultPrevented === !0 && ft(B), c.cancelBubble === !0 && Oe(B), d.value.dispatchEvent(B), D(c), c.qKeyEvent = !0;
780
+ }
781
+ n("keyup", c);
782
+ }
783
+ p();
784
+ }
785
+ }
786
+ function p(c) {
787
+ var x, J;
788
+ const B = q.value;
789
+ c !== !0 && (U === d.value || X === d.value) && B !== null && B !== document.activeElement && (B.setAttribute("tabindex", -1), B.focus()), U === d.value && (u !== null && (u.removeEventListener("touchcancel", V, I), u.removeEventListener("touchend", V, I)), U = u = null), X === d.value && (document.removeEventListener("mouseup", V, I), X = null), H === d.value && (document.removeEventListener("keyup", V, !0), (x = d.value) == null || x.removeEventListener("blur", V, I), H = null), (J = d.value) == null || J.classList.remove("q-btn--active");
790
+ }
791
+ function M(c) {
792
+ D(c), c.qSkipRipple = !0;
793
+ }
794
+ return Fe(() => {
795
+ p(!0);
796
+ }), Object.assign(a, {
797
+ click: (c) => {
798
+ S.value === !0 && R(c);
799
+ }
800
+ }), () => {
801
+ let c = [];
802
+ e.icon !== void 0 && c.push(
803
+ m(ge, {
804
+ name: e.icon,
805
+ left: e.stack !== !0 && h.value === !0,
806
+ role: "img"
807
+ })
808
+ ), h.value === !0 && c.push(
809
+ m("span", { class: "block" }, [e.label])
810
+ ), c = N(t.default, c), e.iconRight !== void 0 && e.round === !1 && c.push(
811
+ m(ge, {
812
+ name: e.iconRight,
813
+ right: e.stack !== !0 && h.value === !0,
814
+ role: "img"
815
+ })
816
+ );
817
+ const B = [
818
+ m("span", {
819
+ class: "q-focus-helper",
820
+ ref: q
821
+ })
822
+ ];
823
+ return e.loading === !0 && e.percentage !== void 0 && B.push(
824
+ m("span", {
825
+ class: "q-btn__progress absolute-full overflow-hidden" + (e.darkPercentage === !0 ? " q-btn__progress--dark" : "")
826
+ }, [
827
+ m("span", {
828
+ class: "q-btn__progress-indicator fit block",
829
+ style: E.value
830
+ })
831
+ ])
832
+ ), B.push(
833
+ m("span", {
834
+ class: "q-btn__content text-center col items-center q-anchor--skip " + o.value
835
+ }, c)
836
+ ), e.loading !== null && B.push(
837
+ m(Qe, {
838
+ name: "q-transition--fade"
839
+ }, () => e.loading === !0 ? [
840
+ m("span", {
841
+ key: "loading",
842
+ class: "absolute-full flex flex-center"
843
+ }, t.loading !== void 0 ? t.loading() : [m(ze)])
844
+ ] : null)
845
+ ), oe(
846
+ m(
847
+ y.value,
848
+ P.value,
849
+ B
850
+ ),
851
+ [[
852
+ ht,
853
+ C.value,
854
+ void 0,
855
+ w.value
856
+ ]]
857
+ );
858
+ };
859
+ }
860
+ }), Vt = /* @__PURE__ */ K({
861
+ __name: "AppButton",
862
+ props: {
863
+ size: { default: z.MD },
864
+ transparent: { type: Boolean },
865
+ flat: { type: Boolean },
866
+ rounded: { type: Boolean },
867
+ color: { default: Re.PRIMARY },
868
+ iconLeft: {},
869
+ iconRight: {},
870
+ iconMiddle: {},
871
+ disabled: { type: Boolean },
872
+ loading: { type: Boolean },
873
+ to: {},
874
+ href: {},
875
+ target: {},
876
+ submit: { type: Boolean },
877
+ ariaLabel: {},
878
+ label: {},
879
+ download: {}
880
+ },
881
+ emits: ["click"],
882
+ setup(e) {
883
+ const t = e, n = r(() => [
884
+ "app-btn",
885
+ {
886
+ "app-btn_default": !t.transparent && !t.flat,
887
+ "app-btn_trans": t.transparent,
888
+ "app-btn_flat": t.flat,
889
+ "app-btn_rounded": t.rounded,
890
+ "app-btn_icon-left": t.iconLeft,
891
+ "app-btn_icon-right": t.iconRight,
892
+ "app-btn_icon-middle": t.iconMiddle
893
+ },
894
+ `app-btn_${t.size}`,
895
+ `app-btn_${t.color}`
896
+ ]);
897
+ return (a, s) => (b(), ae(Z(At), {
898
+ "no-caps": "",
899
+ unelevated: "",
900
+ class: L(n.value),
901
+ padding: Z(et)[a.size || Z(z).MD],
902
+ loading: a.loading,
903
+ disable: a.disabled || void 0,
904
+ to: a.to,
905
+ href: a.href,
906
+ target: a.target,
907
+ type: a.submit ? "submit" : void 0,
908
+ "aria-label": a.ariaLabel,
909
+ download: a.download,
910
+ onClick: s[0] || (s[0] = (l) => a.$emit("click", l))
911
+ }, {
912
+ default: Ue(() => [
913
+ a.iconLeft || a.iconMiddle ? (b(), _("i", {
914
+ key: 0,
915
+ class: L([
916
+ "icon-kl",
917
+ a.iconLeft ? "icon-kl_left" : "icon-kl_middle",
918
+ `icon-kl-${a.iconLeft || a.iconMiddle}`,
919
+ a.transparent || a.flat ? `text-${a.color}` : "text-secondary"
920
+ ])
921
+ }, null, 2)) : A("", !0),
922
+ se(a.$slots, "default", {}, void 0, !0),
923
+ a.label ? (b(), _(ie, { key: 1 }, [
924
+ Le(Y(a.label), 1)
925
+ ], 64)) : A("", !0),
926
+ a.iconRight ? (b(), _("i", {
927
+ key: 2,
928
+ class: L([
929
+ "icon-kl",
930
+ "icon-kl_right",
931
+ `icon-kl-${a.iconRight}`,
932
+ a.transparent ? `text-${a.color}` : "text-secondary"
933
+ ])
934
+ }, null, 2)) : A("", !0)
935
+ ]),
936
+ _: 3
937
+ }, 8, ["class", "padding", "loading", "disable", "to", "href", "target", "type", "aria-label", "download"]));
938
+ }
939
+ }), G = (e, t) => {
940
+ const n = e.__vccOpts || e;
941
+ for (const [a, s] of t)
942
+ n[a] = s;
943
+ return n;
944
+ }, Mn = /* @__PURE__ */ G(Vt, [["__scopeId", "data-v-44d5548c"]]), It = {
945
+ key: 0,
946
+ class: "app-toggle__label app-toggle__label_left"
947
+ }, Tt = { class: "app-toggle__container" }, zt = ["checked", "disabled"], Ot = { class: "app-toggle__thumb" }, jt = {
948
+ key: 1,
949
+ class: "app-toggle__label"
950
+ }, Dt = /* @__PURE__ */ K({
951
+ __name: "AppToggle",
952
+ props: {
953
+ modelValue: { type: Boolean },
954
+ size: { default: z.MD },
955
+ label: {},
956
+ disabled: { type: Boolean },
957
+ color: { default: Re.PRIMARY },
958
+ iconColor: {},
959
+ icon: {},
960
+ iconActive: {},
961
+ labelLeft: { type: Boolean }
962
+ },
963
+ emits: ["update:modelValue"],
964
+ setup(e, { emit: t }) {
965
+ const n = e, a = t, s = r({
966
+ get: () => n.modelValue,
967
+ set: (o) => {
968
+ a("update:modelValue", o);
969
+ }
970
+ }), l = r(() => [
971
+ "app-toggle",
972
+ {
973
+ "app-toggle_active": s.value,
974
+ "app-toggle_disabled": n.disabled
975
+ },
976
+ `app-toggle_${n.size}`,
977
+ `app-toggle_${n.color}`
978
+ ]);
979
+ return (o, i) => (b(), _("div", {
980
+ class: L(l.value)
981
+ }, [
982
+ o.label && o.labelLeft ? (b(), _("span", It, Y(o.label), 1)) : A("", !0),
983
+ T("label", Tt, [
984
+ T("input", {
985
+ type: "checkbox",
986
+ checked: s.value,
987
+ onChange: i[0] || (i[0] = ($) => s.value = !s.value),
988
+ disabled: o.disabled,
989
+ class: "app-toggle__input"
990
+ }, null, 40, zt),
991
+ T("span", {
992
+ class: L(["app-toggle__slider", s.value ? `bg-${o.color}` : ""])
993
+ }, [
994
+ T("span", Ot, [
995
+ o.icon && !o.modelValue ? (b(), _("i", {
996
+ key: 0,
997
+ class: L(["icon-kl", `icon-kl-${o.icon}`, "app-toggle__icon"])
998
+ }, null, 2)) : A("", !0),
999
+ o.modelValue && (o.iconActive || o.icon) ? (b(), _("i", {
1000
+ key: 1,
1001
+ class: L([
1002
+ "icon-kl",
1003
+ `icon-kl-${o.iconActive || o.icon}`,
1004
+ "app-toggle__icon",
1005
+ s.value ? `text-${o.iconColor}` : ""
1006
+ ])
1007
+ }, null, 2)) : A("", !0)
1008
+ ])
1009
+ ], 2),
1010
+ se(o.$slots, "default", {}, void 0, !0)
1011
+ ]),
1012
+ o.label && !o.labelLeft ? (b(), _("span", jt, Y(o.label), 1)) : A("", !0)
1013
+ ], 2));
1014
+ }
1015
+ }), xt = /* @__PURE__ */ G(Dt, [["__scopeId", "data-v-c6702cb0"]]), Ne = {
1016
+ dark: {
1017
+ type: Boolean,
1018
+ default: null
1019
+ }
1020
+ };
1021
+ function Ke(e, t) {
1022
+ return r(() => e.dark === null ? t.dark.isActive : e.dark);
1023
+ }
1024
+ function Nt(e, t) {
1025
+ const n = W(null), a = r(() => e.disable === !0 ? null : m("span", {
1026
+ ref: n,
1027
+ class: "no-outline",
1028
+ tabindex: -1
1029
+ }));
1030
+ function s(l) {
1031
+ const o = t.value;
1032
+ (l == null ? void 0 : l.qAvoidFocus) !== !0 && ((l == null ? void 0 : l.type.indexOf("key")) === 0 ? document.activeElement !== o && (o == null ? void 0 : o.contains(document.activeElement)) === !0 && o.focus() : n.value !== null && (l === void 0 || (o == null ? void 0 : o.contains(l.target)) === !0) && n.value.focus());
1033
+ }
1034
+ return {
1035
+ refocusTargetEl: a,
1036
+ refocusTarget: s
1037
+ };
1038
+ }
1039
+ const Kt = {
1040
+ name: String
1041
+ };
1042
+ function Ft(e = {}) {
1043
+ return (t, n, a) => {
1044
+ t[n](
1045
+ m("input", {
1046
+ class: "hidden" + (a || ""),
1047
+ ...e.value
1048
+ })
1049
+ );
1050
+ };
1051
+ }
1052
+ function An(e) {
1053
+ return r(() => e.name || e.for);
1054
+ }
1055
+ const Qt = {
1056
+ xs: 30,
1057
+ sm: 35,
1058
+ md: 40,
1059
+ lg: 50,
1060
+ xl: 60
1061
+ }, Ut = {
1062
+ ...Ne,
1063
+ ...ue,
1064
+ ...Kt,
1065
+ modelValue: {
1066
+ required: !0,
1067
+ default: null
1068
+ },
1069
+ val: {},
1070
+ trueValue: { default: !0 },
1071
+ falseValue: { default: !1 },
1072
+ indeterminateValue: { default: null },
1073
+ checkedIcon: String,
1074
+ uncheckedIcon: String,
1075
+ indeterminateIcon: String,
1076
+ toggleOrder: {
1077
+ type: String,
1078
+ validator: (e) => e === "tf" || e === "ft"
1079
+ },
1080
+ toggleIndeterminate: Boolean,
1081
+ label: String,
1082
+ leftLabel: Boolean,
1083
+ color: String,
1084
+ keepColor: Boolean,
1085
+ dense: Boolean,
1086
+ disable: Boolean,
1087
+ tabindex: [String, Number]
1088
+ }, Ht = ["update:modelValue"];
1089
+ function Xt(e, t) {
1090
+ const { props: n, slots: a, emit: s, proxy: l } = ee(), { $q: o } = l, i = Ke(n, o), $ = W(null), { refocusTargetEl: y, refocusTarget: f } = Nt(n, $), S = ce(n, Qt), d = r(
1091
+ () => n.val !== void 0 && Array.isArray(n.modelValue)
1092
+ ), q = r(() => {
1093
+ const p = Q(n.val);
1094
+ return d.value === !0 ? n.modelValue.findIndex((M) => Q(M) === p) : -1;
1095
+ }), u = r(() => d.value === !0 ? q.value !== -1 : Q(n.modelValue) === Q(n.trueValue)), g = r(() => d.value === !0 ? q.value === -1 : Q(n.modelValue) === Q(n.falseValue)), v = r(
1096
+ () => u.value === !1 && g.value === !1
1097
+ ), h = r(() => n.disable === !0 ? -1 : n.tabindex || 0), C = r(
1098
+ () => `q-${e} cursor-pointer no-outline row inline no-wrap items-center` + (n.disable === !0 ? " disabled" : "") + (i.value === !0 ? ` q-${e}--dark` : "") + (n.dense === !0 ? ` q-${e}--dense` : "") + (n.leftLabel === !0 ? " reverse" : "")
1099
+ ), w = r(() => {
1100
+ const p = u.value === !0 ? "truthy" : g.value === !0 ? "falsy" : "indet", M = n.color !== void 0 && (n.keepColor === !0 || g.value !== !0) ? ` text-${n.color}` : "";
1101
+ return `q-${e}__inner relative-position non-selectable q-${e}__inner--${p}${M}`;
1102
+ }), E = r(() => {
1103
+ const p = { type: "checkbox" };
1104
+ return n.name !== void 0 && Object.assign(p, {
1105
+ // see https://vuejs.org/guide/extras/render-function.html#creating-vnodes (.prop)
1106
+ ".checked": u.value,
1107
+ "^checked": u.value === !0 ? "checked" : void 0,
1108
+ name: n.name,
1109
+ value: d.value === !0 ? n.val : n.trueValue
1110
+ }), p;
1111
+ }), k = Ft(E), P = r(() => {
1112
+ const p = {
1113
+ tabindex: h.value,
1114
+ role: "checkbox",
1115
+ "aria-label": n.label,
1116
+ "aria-checked": v.value === !0 ? "mixed" : u.value === !0 ? "true" : "false"
1117
+ };
1118
+ return n.disable === !0 && (p["aria-disabled"] = "true"), p;
1119
+ });
1120
+ function R(p) {
1121
+ p !== void 0 && (D(p), f(p)), n.disable !== !0 && s("update:modelValue", O(), p);
1122
+ }
1123
+ function O() {
1124
+ if (d.value === !0) {
1125
+ if (u.value === !0) {
1126
+ const p = n.modelValue.slice();
1127
+ return p.splice(q.value, 1), p;
1128
+ }
1129
+ return n.modelValue.concat([n.val]);
1130
+ }
1131
+ if (u.value === !0) {
1132
+ if (n.toggleOrder !== "ft" || n.toggleIndeterminate === !1)
1133
+ return n.falseValue;
1134
+ } else if (g.value === !0) {
1135
+ if (n.toggleOrder === "ft" || n.toggleIndeterminate === !1)
1136
+ return n.trueValue;
1137
+ } else
1138
+ return n.toggleOrder !== "ft" ? n.trueValue : n.falseValue;
1139
+ return n.indeterminateValue;
1140
+ }
1141
+ function j(p) {
1142
+ (p.keyCode === 13 || p.keyCode === 32) && D(p);
1143
+ }
1144
+ function F(p) {
1145
+ (p.keyCode === 13 || p.keyCode === 32) && R(p);
1146
+ }
1147
+ const V = t(u, v);
1148
+ return Object.assign(l, { toggle: R }), () => {
1149
+ const p = V();
1150
+ n.disable !== !0 && k(
1151
+ p,
1152
+ "unshift",
1153
+ ` q-${e}__native absolute q-ma-none q-pa-none`
1154
+ );
1155
+ const M = [
1156
+ m("div", {
1157
+ class: w.value,
1158
+ style: S.value,
1159
+ "aria-hidden": "true"
1160
+ }, p)
1161
+ ];
1162
+ y.value !== null && M.push(y.value);
1163
+ const c = n.label !== void 0 ? N(a.default, [n.label]) : Ae(a.default);
1164
+ return c !== void 0 && M.push(
1165
+ m("div", {
1166
+ class: `q-${e}__label q-anchor--skip`
1167
+ }, c)
1168
+ ), m("div", {
1169
+ ref: $,
1170
+ class: C.value,
1171
+ ...P.value,
1172
+ onClick: R,
1173
+ onKeydown: j,
1174
+ onKeyup: F
1175
+ }, M);
1176
+ };
1177
+ }
1178
+ const Wt = () => m("div", {
1179
+ key: "svg",
1180
+ class: "q-checkbox__bg absolute"
1181
+ }, [
1182
+ m("svg", {
1183
+ class: "q-checkbox__svg fit absolute-full",
1184
+ viewBox: "0 0 24 24"
1185
+ }, [
1186
+ m("path", {
1187
+ class: "q-checkbox__truthy",
1188
+ fill: "none",
1189
+ d: "M1.73,12.91 8.1,19.28 22.79,4.59"
1190
+ }),
1191
+ m("path", {
1192
+ class: "q-checkbox__indet",
1193
+ d: "M4,14H20V10H4"
1194
+ })
1195
+ ])
1196
+ ]), Yt = te({
1197
+ name: "QCheckbox",
1198
+ props: Ut,
1199
+ emits: Ht,
1200
+ setup(e) {
1201
+ const t = Wt();
1202
+ function n(a, s) {
1203
+ const l = r(
1204
+ () => (a.value === !0 ? e.checkedIcon : s.value === !0 ? e.indeterminateIcon : e.uncheckedIcon) || null
1205
+ );
1206
+ return () => l.value !== null ? [
1207
+ m("div", {
1208
+ key: "icon",
1209
+ class: "q-checkbox__icon-container absolute-full flex flex-center no-wrap"
1210
+ }, [
1211
+ m(ge, {
1212
+ class: "q-checkbox__icon",
1213
+ name: l.value
1214
+ })
1215
+ ])
1216
+ ] : [t];
1217
+ }
1218
+ return Xt("checkbox", n);
1219
+ }
1220
+ }), Gt = [];
1221
+ function Jt(e) {
1222
+ return Gt.find(
1223
+ (t) => t.contentEl !== null && t.contentEl.contains(e)
1224
+ );
1225
+ }
1226
+ function Zt(e, t) {
1227
+ do {
1228
+ if (e.$options.name === "QMenu") {
1229
+ if (e.hide(t), e.$props.separateClosePopup === !0)
1230
+ return ne(e);
1231
+ } else if (e.__qPortal === !0) {
1232
+ const n = ne(e);
1233
+ return (n == null ? void 0 : n.$options.name) === "QPopupProxy" ? (e.hide(t), n) : e;
1234
+ }
1235
+ e = ne(e);
1236
+ } while (e != null);
1237
+ }
1238
+ function en(e, t, n) {
1239
+ for (; n !== 0 && e !== void 0 && e !== null; ) {
1240
+ if (e.__qPortal === !0) {
1241
+ if (n--, e.$options.name === "QMenu") {
1242
+ e = Zt(e, t);
1243
+ continue;
1244
+ }
1245
+ e.hide(t);
1246
+ }
1247
+ e = ne(e);
1248
+ }
1249
+ }
1250
+ function Be(e) {
1251
+ if (e === !1)
1252
+ return 0;
1253
+ if (e === !0 || e === void 0)
1254
+ return 1;
1255
+ const t = parseInt(e, 10);
1256
+ return isNaN(t) ? 0 : t;
1257
+ }
1258
+ const tn = Me(
1259
+ {
1260
+ name: "close-popup",
1261
+ beforeMount(e, { value: t }) {
1262
+ const n = {
1263
+ depth: Be(t),
1264
+ handler(a) {
1265
+ n.depth !== 0 && setTimeout(() => {
1266
+ const s = Jt(e);
1267
+ s !== void 0 && en(s, a, n.depth);
1268
+ });
1269
+ },
1270
+ handlerKey(a) {
1271
+ le(a, 13) === !0 && n.handler(a);
1272
+ }
1273
+ };
1274
+ e.__qclosepopup = n, e.addEventListener("click", n.handler), e.addEventListener("keyup", n.handlerKey);
1275
+ },
1276
+ updated(e, { value: t, oldValue: n }) {
1277
+ t !== n && (e.__qclosepopup.depth = Be(t));
1278
+ },
1279
+ beforeUnmount(e) {
1280
+ const t = e.__qclosepopup;
1281
+ e.removeEventListener("click", t.handler), e.removeEventListener("keyup", t.handlerKey), delete e.__qclosepopup;
1282
+ }
1283
+ }
1284
+ ), nn = {
1285
+ key: 0,
1286
+ class: "menu-item__loading"
1287
+ }, an = {
1288
+ key: 0,
1289
+ class: "menu-item__checked"
1290
+ }, ln = {
1291
+ key: 2,
1292
+ class: "menu-item__icon"
1293
+ }, on = { class: "menu-item__label" }, sn = {
1294
+ key: 3,
1295
+ class: "menu-item__icon-right icon-kl icon-kl-arrow-right"
1296
+ }, rn = /* @__PURE__ */ K({
1297
+ __name: "PopupItem",
1298
+ props: {
1299
+ label: {},
1300
+ icon: {},
1301
+ iconSize: {},
1302
+ color: {},
1303
+ iconRight: {},
1304
+ noArrow: { type: Boolean },
1305
+ toggle: { type: Boolean },
1306
+ checkbox: { type: Boolean },
1307
+ active: { type: Boolean },
1308
+ modelValue: { type: Boolean },
1309
+ persistent: { type: Boolean },
1310
+ loading: { type: Boolean },
1311
+ disabled: { type: Boolean },
1312
+ gap: { type: Boolean },
1313
+ checked: { type: Boolean },
1314
+ isMobile: { type: Boolean }
1315
+ },
1316
+ emits: ["update:modelValue"],
1317
+ setup(e, { emit: t }) {
1318
+ const n = e, a = t, s = () => {
1319
+ (n.toggle || n.checkbox) && !n.disabled && a("update:modelValue", !n.modelValue);
1320
+ };
1321
+ return (l, o) => oe((b(), _("div", {
1322
+ class: L(["menu-item", [
1323
+ { "menu-item_gap": l.gap },
1324
+ { "menu-item_disabled": l.disabled },
1325
+ { "menu-item_active": l.active },
1326
+ { "menu-item_mobile": l.isMobile }
1327
+ ]]),
1328
+ onClick: s
1329
+ }, [
1330
+ T("div", {
1331
+ class: L(["row items-center no-wrap", `text-${l.color ? l.color : "dark"}`])
1332
+ }, [
1333
+ l.loading ? (b(), _("div", nn, [
1334
+ He(Z(ze), {
1335
+ size: "19px",
1336
+ color: l.color ? l.color : "dark"
1337
+ }, null, 8, ["color"])
1338
+ ])) : (b(), _(ie, { key: 1 }, [
1339
+ l.checked ? (b(), _("div", an, [...o[2] || (o[2] = [
1340
+ T("i", { class: "icon-kl icon-kl-check" }, null, -1)
1341
+ ])])) : A("", !0),
1342
+ l.checkbox ? (b(), ae(Yt, {
1343
+ key: 1,
1344
+ class: "menu-item__checkbox",
1345
+ size: "34px",
1346
+ "model-value": l.modelValue,
1347
+ "onUpdate:modelValue": o[0] || (o[0] = (i) => a("update:modelValue", i))
1348
+ }, null, 8, ["model-value"])) : A("", !0),
1349
+ l.icon ? (b(), _("div", ln, [
1350
+ T("i", {
1351
+ class: L(`icon-kl icon-kl-${l.icon}`),
1352
+ style: re({ fontSize: l.iconSize || "27px" })
1353
+ }, null, 6)
1354
+ ])) : A("", !0)
1355
+ ], 64)),
1356
+ T("span", on, Y(l.label), 1)
1357
+ ], 2),
1358
+ l.$slots.right ? se(l.$slots, "right", { key: 0 }, void 0, !0) : l.toggle ? (b(), ae(xt, {
1359
+ key: 1,
1360
+ class: "menu-item__toggle",
1361
+ "model-value": l.modelValue,
1362
+ disabled: l.disabled || l.loading,
1363
+ "onUpdate:modelValue": o[1] || (o[1] = (i) => a("update:modelValue", i))
1364
+ }, null, 8, ["model-value", "disabled"])) : l.iconRight ? (b(), _("i", {
1365
+ key: 2,
1366
+ class: L([
1367
+ "menu-item__icon-right menu-item__icon-right_custom icon-kl",
1368
+ `icon-kl-${l.iconRight}`
1369
+ ])
1370
+ }, null, 2)) : !l.noArrow && !l.loading ? (b(), _("i", sn)) : A("", !0)
1371
+ ], 2)), [
1372
+ [tn, !l.toggle && !l.checkbox && !l.persistent && !l.disabled]
1373
+ ]);
1374
+ }
1375
+ }), Vn = /* @__PURE__ */ G(rn, [["__scopeId", "data-v-756923ba"]]), un = /* @__PURE__ */ K({
1376
+ __name: "AppIcon",
1377
+ props: {
1378
+ name: {},
1379
+ size: {},
1380
+ color: {}
1381
+ },
1382
+ setup(e) {
1383
+ return (t, n) => (b(), _("i", {
1384
+ class: L(["icon-kl", `icon-kl-${t.name}`, t.color ? `text-${t.color}` : ""]),
1385
+ style: re(t.size ? `font-size: ${t.size}` : void 0)
1386
+ }, null, 6));
1387
+ }
1388
+ }), In = /* @__PURE__ */ G(un, [["__scopeId", "data-v-941765ee"]]), cn = {
1389
+ xs: 2,
1390
+ sm: 4,
1391
+ md: 6,
1392
+ lg: 10,
1393
+ xl: 14
1394
+ };
1395
+ function we(e, t, n) {
1396
+ return {
1397
+ transform: t === !0 ? `translateX(${n.lang.rtl === !0 ? "-" : ""}100%) scale3d(${-e},1,1)` : `scale3d(${e},1,1)`
1398
+ };
1399
+ }
1400
+ const dn = te({
1401
+ name: "QLinearProgress",
1402
+ props: {
1403
+ ...Ne,
1404
+ ...ue,
1405
+ value: {
1406
+ type: Number,
1407
+ default: 0
1408
+ },
1409
+ buffer: Number,
1410
+ color: String,
1411
+ trackColor: String,
1412
+ reverse: Boolean,
1413
+ stripe: Boolean,
1414
+ indeterminate: Boolean,
1415
+ query: Boolean,
1416
+ rounded: Boolean,
1417
+ animationSpeed: {
1418
+ type: [String, Number],
1419
+ default: 2100
1420
+ },
1421
+ instantFeedback: Boolean
1422
+ },
1423
+ setup(e, { slots: t }) {
1424
+ const { proxy: n } = ee(), a = Ke(e, n.$q), s = ce(e, cn), l = r(() => e.indeterminate === !0 || e.query === !0), o = r(() => e.reverse !== e.query), i = r(() => ({
1425
+ ...s.value !== null ? s.value : {},
1426
+ "--q-linear-progress-speed": `${e.animationSpeed}ms`
1427
+ })), $ = r(
1428
+ () => "q-linear-progress" + (e.color !== void 0 ? ` text-${e.color}` : "") + (e.reverse === !0 || e.query === !0 ? " q-linear-progress--reverse" : "") + (e.rounded === !0 ? " rounded-borders" : "")
1429
+ ), y = r(() => we(e.buffer !== void 0 ? e.buffer : 1, o.value, n.$q)), f = r(() => `with${e.instantFeedback === !0 ? "out" : ""}-transition`), S = r(
1430
+ () => `q-linear-progress__track absolute-full q-linear-progress__track--${f.value} q-linear-progress__track--${a.value === !0 ? "dark" : "light"}` + (e.trackColor !== void 0 ? ` bg-${e.trackColor}` : "")
1431
+ ), d = r(() => we(l.value === !0 ? 1 : e.value, o.value, n.$q)), q = r(
1432
+ () => `q-linear-progress__model absolute-full q-linear-progress__model--${f.value} q-linear-progress__model--${l.value === !0 ? "in" : ""}determinate`
1433
+ ), u = r(() => ({ width: `${e.value * 100}%` })), g = r(
1434
+ () => `q-linear-progress__stripe absolute-${e.reverse === !0 ? "right" : "left"} q-linear-progress__stripe--${f.value}`
1435
+ );
1436
+ return () => {
1437
+ const v = [
1438
+ m("div", {
1439
+ class: S.value,
1440
+ style: y.value
1441
+ }),
1442
+ m("div", {
1443
+ class: q.value,
1444
+ style: d.value
1445
+ })
1446
+ ];
1447
+ return e.stripe === !0 && l.value === !1 && v.push(
1448
+ m("div", {
1449
+ class: g.value,
1450
+ style: u.value
1451
+ })
1452
+ ), m("div", {
1453
+ class: $.value,
1454
+ style: i.value,
1455
+ role: "progressbar",
1456
+ "aria-valuemin": 0,
1457
+ "aria-valuemax": 1,
1458
+ "aria-valuenow": e.indeterminate === !0 ? void 0 : e.value
1459
+ }, N(t.default, v));
1460
+ };
1461
+ }
1462
+ }), fn = {
1463
+ key: 0,
1464
+ class: "code-field__label"
1465
+ }, vn = { class: "code-field__inputs" }, mn = ["onUpdate:modelValue", "disabled", "onInput", "onKeydown", "onPaste"], gn = /* @__PURE__ */ K({
1466
+ __name: "AppCodeInput",
1467
+ props: {
1468
+ length: { default: 5 },
1469
+ size: { default: z.MD },
1470
+ label: {},
1471
+ disabled: { type: Boolean },
1472
+ loading: { type: Boolean },
1473
+ autofocus: { type: Boolean },
1474
+ color: {}
1475
+ },
1476
+ emits: ["update:modelValue", "completed"],
1477
+ setup(e, { expose: t, emit: n }) {
1478
+ const a = e, s = n, l = W(Array(a.length).fill("")), o = W([]), i = r(() => [
1479
+ "code-field",
1480
+ {
1481
+ "code-field_disabled": a.disabled || a.loading
1482
+ },
1483
+ `code-field_${a.size}`,
1484
+ `code-field_${a.color}`
1485
+ ]), $ = r(() => {
1486
+ let u = "";
1487
+ return a.size == z.SM && (u += `width: ${a.length * 26 + (a.length - 1) * 5}px`), a.size == z.MD && (u += `width: ${a.length * 32 + (a.length - 1) * 8}px`), a.size == z.LG && (u += `width: ${a.length * 44 + (a.length - 1) * 10}px`), u;
1488
+ }), y = (u, g) => {
1489
+ var C;
1490
+ const h = u.target.value;
1491
+ if (h.length === 1)
1492
+ g < a.length - 1 && o.value && ((C = o.value[g + 1]) == null || C.focus());
1493
+ else if (h.length > 1) {
1494
+ const w = h.slice(0, a.length - g).split("");
1495
+ w.forEach((E, k) => {
1496
+ l.value[g + k] = E;
1497
+ }), he(() => {
1498
+ var E;
1499
+ o.value && ((E = o.value[Math.min(g + w.length, a.length - 1)]) == null || E.focus());
1500
+ });
1501
+ }
1502
+ }, f = (u) => {
1503
+ var g;
1504
+ l.value[u] === "" && o.value && u > 0 && ((g = o.value[u - 1]) == null || g.focus());
1505
+ }, S = (u, g) => {
1506
+ var C;
1507
+ u.preventDefault();
1508
+ const v = ((C = u.clipboardData) == null ? void 0 : C.getData("text")) ?? "";
1509
+ if (!v) return;
1510
+ const h = v.slice(0, a.length - g).split("");
1511
+ h.forEach((w, E) => {
1512
+ l.value[g + E] = w;
1513
+ }), he(() => {
1514
+ var w;
1515
+ o.value && ((w = o.value[Math.min(g + h.length, a.length - 1)]) == null || w.focus());
1516
+ });
1517
+ };
1518
+ Xe(
1519
+ l,
1520
+ (u) => {
1521
+ const g = u.join("");
1522
+ d(g);
1523
+ },
1524
+ { deep: !0 }
1525
+ );
1526
+ const d = (u) => {
1527
+ s("update:modelValue", u), u.length === a.length && !u.includes(" ") && s("completed", u);
1528
+ }, q = (u) => {
1529
+ u && (l.value = u.split("").slice(0, a.length));
1530
+ };
1531
+ return We(() => {
1532
+ a.autofocus && o.value && o.value[0] && o.value[0].focus();
1533
+ }), t({
1534
+ injectCode: q
1535
+ }), (u, g) => (b(), _("div", {
1536
+ class: L(i.value),
1537
+ style: re($.value)
1538
+ }, [
1539
+ u.label ? (b(), _("label", fn, Y(u.label), 1)) : A("", !0),
1540
+ T("div", vn, [
1541
+ (b(!0), _(ie, null, Pe(u.length, (v, h) => oe((b(), _("input", {
1542
+ key: h,
1543
+ "onUpdate:modelValue": (C) => l.value[h] = C,
1544
+ ref_for: !0,
1545
+ ref_key: "inputRefs",
1546
+ ref: o,
1547
+ type: "number",
1548
+ maxlength: "1",
1549
+ class: "code-field__input",
1550
+ disabled: u.disabled || u.loading,
1551
+ onInput: (C) => y(C, h),
1552
+ onKeydown: Ye((C) => f(h), ["backspace"]),
1553
+ onPaste: (C) => S(C, h)
1554
+ }, null, 40, mn)), [
1555
+ [Ge, l.value[h]]
1556
+ ])), 128))
1557
+ ]),
1558
+ u.loading ? (b(), ae(dn, {
1559
+ key: 1,
1560
+ indeterminate: "",
1561
+ rounded: "",
1562
+ color: u.color,
1563
+ class: "code-field__loading"
1564
+ }, null, 8, ["color"])) : A("", !0)
1565
+ ], 6));
1566
+ }
1567
+ }), Tn = /* @__PURE__ */ G(gn, [["__scopeId", "data-v-4e11db87"]]), pn = { class: "app-segment__track" }, hn = { class: "app-segment__buttons" }, bn = ["onClick", "disabled"], kn = /* @__PURE__ */ K({
1568
+ __name: "AppSegment",
1569
+ props: /* @__PURE__ */ Je({
1570
+ options: {},
1571
+ disabled: { type: Boolean },
1572
+ size: { default: z.MD }
1573
+ }, {
1574
+ modelValue: {},
1575
+ modelModifiers: {}
1576
+ }),
1577
+ emits: ["update:modelValue"],
1578
+ setup(e) {
1579
+ const t = Ze(e, "modelValue"), n = e, a = r(
1580
+ () => n.options.findIndex((l) => l.value === t.value)
1581
+ );
1582
+ function s(l) {
1583
+ n.disabled || (t.value = l);
1584
+ }
1585
+ return (l, o) => (b(), _("div", {
1586
+ class: L(["app-segment", [{ "app-segment_disabled": l.disabled }, `app-segment_${l.size}`]])
1587
+ }, [
1588
+ T("div", pn, [
1589
+ T("div", {
1590
+ class: "app-segment__thumb",
1591
+ style: re({
1592
+ width: `${100 / l.options.length}%`,
1593
+ transform: `translateX(${a.value * 100}%)`
1594
+ })
1595
+ }, null, 4)
1596
+ ]),
1597
+ T("div", hn, [
1598
+ (b(!0), _(ie, null, Pe(l.options, (i, $) => (b(), _("button", {
1599
+ key: $,
1600
+ class: L(["app-segment__btn", { active: t.value === i.value }]),
1601
+ onClick: (y) => s(i.value),
1602
+ disabled: l.disabled
1603
+ }, [
1604
+ se(l.$slots, "option", { option: i }, () => [
1605
+ Le(Y(i.label), 1)
1606
+ ], !0)
1607
+ ], 10, bn))), 128))
1608
+ ])
1609
+ ], 2));
1610
+ }
1611
+ }), zn = /* @__PURE__ */ G(kn, [["__scopeId", "data-v-ff56abdf"]]), On = pe(
1612
+ () => import("./AppButtonCopy-CQItDNqg.js")
1613
+ ), jn = pe(
1614
+ () => import("./AppSelect-BSBsAKPs.js")
1615
+ ), Dn = pe(
1616
+ () => import("./DropdownButton-B-NTZXjl.js")
1617
+ );
1618
+ export {
1619
+ Mn as A,
1620
+ At as B,
1621
+ Re as C,
1622
+ vt as D,
1623
+ mt as E,
1624
+ _t as F,
1625
+ Gt as G,
1626
+ Ln as H,
1627
+ Cn as I,
1628
+ ct as J,
1629
+ dt as K,
1630
+ Zt as L,
1631
+ Dn as M,
1632
+ On as N,
1633
+ jn as O,
1634
+ Vn as P,
1635
+ ge as Q,
1636
+ ht as R,
1637
+ z as S,
1638
+ zn as T,
1639
+ Tn as U,
1640
+ xt as V,
1641
+ In as W,
1642
+ _n as X,
1643
+ G as _,
1644
+ Ke as a,
1645
+ ze as b,
1646
+ te as c,
1647
+ ue as d,
1648
+ ce as e,
1649
+ Sn as f,
1650
+ qn as g,
1651
+ Ae as h,
1652
+ Pn as i,
1653
+ Ct as j,
1654
+ le as k,
1655
+ $n as l,
1656
+ de as m,
1657
+ En as n,
1658
+ Bn as o,
1659
+ ft as p,
1660
+ wn as q,
1661
+ Kt as r,
1662
+ D as s,
1663
+ An as t,
1664
+ Ne as u,
1665
+ gt as v,
1666
+ Oe as w,
1667
+ N as x,
1668
+ Pt as y,
1669
+ Rn as z
1670
+ };