@validol4ik/uikit 0.3.6 → 0.3.8

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/uikit.es.js CHANGED
@@ -1,8 +1,4457 @@
1
- import { A, F as a, E as s, G as e } from "./index-B7i_chyx.js";
2
- import "vue";
1
+ import { computed as d, markRaw as fn, defineComponent as mt, h, withDirectives as vn, getCurrentInstance as le, unref as Je, ref as A, onBeforeUnmount as fe, Transition as dt, openBlock as ue, createBlock as $t, normalizeClass as Be, withCtx as xe, createElementBlock as se, createCommentVNode as Ce, renderSlot as yo, Fragment as rt, createTextVNode as Bt, toDisplayString as Ze, normalizeStyle as wo, defineAsyncComponent as mn, reactive as So, mergeProps as gn, withModifiers as hn, toRaw as Ue, onMounted as gt, watch as J, onBeforeUpdate as pn, inject as ko, nextTick as ce, onDeactivated as Pt, onActivated as bn, onUnmounted as xo, Teleport as Co, onBeforeMount as qo, onUpdated as _o, createVNode as it, createElementVNode as Wt } from "vue";
2
+ const yn = {
3
+ PRIMARY: "primary",
4
+ INFO: "info"
5
+ }, qe = {
6
+ SM: "sm",
7
+ MD: "md",
8
+ LG: "lg"
9
+ }, Eo = {
10
+ [qe.SM]: "3px 9px",
11
+ [qe.MD]: "5px 12px",
12
+ [qe.LG]: "9px 20px"
13
+ }, nl = {
14
+ xs: 18,
15
+ sm: 24,
16
+ md: 32,
17
+ lg: 38,
18
+ xl: 46
19
+ }, zt = {
20
+ size: String
21
+ };
22
+ function It(e, t = nl) {
23
+ return d(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null);
24
+ }
25
+ function dl(e, t, l, n) {
26
+ return Object.defineProperty(e, t, {
27
+ get: l,
28
+ set: n,
29
+ enumerable: !0
30
+ }), e;
31
+ }
32
+ function ve(e) {
33
+ return fn(mt(e));
34
+ }
35
+ function Vo(e) {
36
+ return fn(e);
37
+ }
38
+ function ke(e, t) {
39
+ return e !== void 0 && e() || t;
40
+ }
41
+ function Bo(e, t) {
42
+ if (e !== void 0) {
43
+ const l = e();
44
+ if (l != null)
45
+ return l.slice();
46
+ }
47
+ return t;
48
+ }
49
+ function Oe(e, t) {
50
+ return e !== void 0 ? t.concat(e()) : t;
51
+ }
52
+ function To(e, t) {
53
+ return e === void 0 ? t : t !== void 0 ? t.concat(e()) : e();
54
+ }
55
+ function $o(e, t, l, n, o, u) {
56
+ t.key = n + o;
57
+ const a = h(e, t, l);
58
+ return o === !0 ? vn(a, u()) : a;
59
+ }
60
+ const Tl = "0 0 24 24", $l = (e) => e, Kt = (e) => `ionicons ${e}`, wn = {
61
+ "mdi-": (e) => `mdi ${e}`,
62
+ "icon-": $l,
63
+ // fontawesome equiv
64
+ "bt-": (e) => `bt ${e}`,
65
+ "eva-": (e) => `eva ${e}`,
66
+ "ion-md": Kt,
67
+ "ion-ios": Kt,
68
+ "ion-logo": Kt,
69
+ "iconfont ": $l,
70
+ "ti-": (e) => `themify-icon ${e}`,
71
+ "bi-": (e) => `bootstrap-icons ${e}`
72
+ }, Sn = {
73
+ o_: "-outlined",
74
+ r_: "-round",
75
+ s_: "-sharp"
76
+ }, kn = {
77
+ sym_o_: "-outlined",
78
+ sym_r_: "-rounded",
79
+ sym_s_: "-sharp"
80
+ }, Ro = new RegExp("^(" + Object.keys(wn).join("|") + ")"), Lo = new RegExp("^(" + Object.keys(Sn).join("|") + ")"), Rl = new RegExp("^(" + Object.keys(kn).join("|") + ")"), Mo = /^[Mm]\s?[-+]?\.?\d/, Oo = /^img:/, Ao = /^svguse:/, Po = /^ion-/, zo = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, _e = ve({
81
+ name: "QIcon",
82
+ props: {
83
+ ...zt,
84
+ tag: {
85
+ type: String,
86
+ default: "i"
87
+ },
88
+ name: String,
89
+ color: String,
90
+ left: Boolean,
91
+ right: Boolean
92
+ },
93
+ setup(e, { slots: t }) {
94
+ const { proxy: { $q: l } } = le(), n = It(e), o = d(
95
+ () => "q-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "")
96
+ ), u = d(() => {
97
+ let a, r = e.name;
98
+ if (r === "none" || !r)
99
+ return { none: !0 };
100
+ if (l.iconMapFn !== null) {
101
+ const s = l.iconMapFn(r);
102
+ if (s !== void 0)
103
+ if (s.icon !== void 0) {
104
+ if (r = s.icon, r === "none" || !r)
105
+ return { none: !0 };
106
+ } else
107
+ return {
108
+ cls: s.cls,
109
+ content: s.content !== void 0 ? s.content : " "
110
+ };
111
+ }
112
+ if (Mo.test(r) === !0) {
113
+ const [s, y = Tl] = r.split("|");
114
+ return {
115
+ svg: !0,
116
+ viewBox: y,
117
+ nodes: s.split("&&").map((v) => {
118
+ const [c, m, x] = v.split("@@");
119
+ return h("path", { style: m, d: c, transform: x });
120
+ })
121
+ };
122
+ }
123
+ if (Oo.test(r) === !0)
124
+ return {
125
+ img: !0,
126
+ src: r.substring(4)
127
+ };
128
+ if (Ao.test(r) === !0) {
129
+ const [s, y = Tl] = r.split("|");
130
+ return {
131
+ svguse: !0,
132
+ src: s.substring(7),
133
+ viewBox: y
134
+ };
135
+ }
136
+ let g = " ";
137
+ const b = r.match(Ro);
138
+ if (b !== null)
139
+ a = wn[b[1]](r);
140
+ else if (zo.test(r) === !0)
141
+ a = r;
142
+ else if (Po.test(r) === !0)
143
+ a = `ionicons ion-${l.platform.is.ios === !0 ? "ios" : "md"}${r.substring(3)}`;
144
+ else if (Rl.test(r) === !0) {
145
+ a = "notranslate material-symbols";
146
+ const s = r.match(Rl);
147
+ s !== null && (r = r.substring(6), a += kn[s[1]]), g = r;
148
+ } else {
149
+ a = "notranslate material-icons";
150
+ const s = r.match(Lo);
151
+ s !== null && (r = r.substring(2), a += Sn[s[1]]), g = r;
152
+ }
153
+ return {
154
+ cls: a,
155
+ content: g
156
+ };
157
+ });
158
+ return () => {
159
+ const a = {
160
+ class: o.value,
161
+ style: n.value,
162
+ "aria-hidden": "true",
163
+ role: "presentation"
164
+ };
165
+ return u.value.none === !0 ? h(e.tag, a, ke(t.default)) : u.value.img === !0 ? h(e.tag, a, Oe(t.default, [
166
+ h("img", { src: u.value.src })
167
+ ])) : u.value.svg === !0 ? h(e.tag, a, Oe(t.default, [
168
+ h("svg", {
169
+ viewBox: u.value.viewBox || "0 0 24 24"
170
+ }, u.value.nodes)
171
+ ])) : u.value.svguse === !0 ? h(e.tag, a, Oe(t.default, [
172
+ h("svg", {
173
+ viewBox: u.value.viewBox
174
+ }, [
175
+ h("use", { "xlink:href": u.value.src })
176
+ ])
177
+ ])) : (u.value.cls !== void 0 && (a.class += " " + u.value.cls), h(e.tag, a, Oe(t.default, [
178
+ u.value.content
179
+ ])));
180
+ };
181
+ }
182
+ }), Io = {
183
+ size: {
184
+ type: [String, Number],
185
+ default: "1em"
186
+ },
187
+ color: String
188
+ };
189
+ function Fo(e) {
190
+ return {
191
+ cSize: d(() => e.size in nl ? `${nl[e.size]}px` : e.size),
192
+ classes: d(
193
+ () => "q-spinner" + (e.color ? ` text-${e.color}` : "")
194
+ )
195
+ };
196
+ }
197
+ const xn = ve({
198
+ name: "QSpinner",
199
+ props: {
200
+ ...Io,
201
+ thickness: {
202
+ type: Number,
203
+ default: 5
204
+ }
205
+ },
206
+ setup(e) {
207
+ const { cSize: t, classes: l } = Fo(e);
208
+ return () => h("svg", {
209
+ class: l.value + " q-spinner-mat",
210
+ width: t.value,
211
+ height: t.value,
212
+ viewBox: "25 25 50 50"
213
+ }, [
214
+ h("circle", {
215
+ class: "path",
216
+ cx: "50",
217
+ cy: "50",
218
+ r: "20",
219
+ fill: "none",
220
+ stroke: "currentColor",
221
+ "stroke-width": e.thickness,
222
+ "stroke-miterlimit": "10"
223
+ })
224
+ ]);
225
+ }
226
+ });
227
+ function ol(e, t) {
228
+ const l = e.style;
229
+ for (const n in t)
230
+ l[n] = t[n];
231
+ }
232
+ function Ho(e) {
233
+ if (e == null)
234
+ return;
235
+ if (typeof e == "string")
236
+ try {
237
+ return document.querySelector(e) || void 0;
238
+ } catch {
239
+ return;
240
+ }
241
+ const t = Je(e);
242
+ if (t)
243
+ return t.$el || t;
244
+ }
245
+ function Cn(e, t) {
246
+ if (e == null || e.contains(t) === !0)
247
+ return !0;
248
+ for (let l = e.nextElementSibling; l !== null; l = l.nextElementSibling)
249
+ if (l.contains(t))
250
+ return !0;
251
+ return !1;
252
+ }
253
+ const ae = {
254
+ hasPassive: !1,
255
+ passiveCapture: !0,
256
+ notPassiveCapture: !0
257
+ };
258
+ try {
259
+ const e = Object.defineProperty({}, "passive", {
260
+ get() {
261
+ Object.assign(ae, {
262
+ hasPassive: !0,
263
+ passive: { passive: !0 },
264
+ notPassive: { passive: !1 },
265
+ passiveCapture: { passive: !0, capture: !0 },
266
+ notPassiveCapture: { passive: !1, capture: !0 }
267
+ });
268
+ }
269
+ });
270
+ window.addEventListener("qtest", null, e), window.removeEventListener("qtest", null, e);
271
+ } catch {
272
+ }
273
+ function Do() {
274
+ }
275
+ function qn(e) {
276
+ 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]), {
277
+ top: e.clientY,
278
+ left: e.clientX
279
+ };
280
+ }
281
+ function jo(e) {
282
+ if (e.path)
283
+ return e.path;
284
+ if (e.composedPath)
285
+ return e.composedPath();
286
+ const t = [];
287
+ let l = e.target;
288
+ for (; l; ) {
289
+ if (t.push(l), l.tagName === "HTML")
290
+ return t.push(document), t.push(window), t;
291
+ l = l.parentElement;
292
+ }
293
+ }
294
+ function Ee(e) {
295
+ e.stopPropagation();
296
+ }
297
+ function be(e) {
298
+ e.cancelable !== !1 && e.preventDefault();
299
+ }
300
+ function te(e) {
301
+ e.cancelable !== !1 && e.preventDefault(), e.stopPropagation();
302
+ }
303
+ function il(e, t, l) {
304
+ const n = `__q_${t}_evt`;
305
+ e[n] = e[n] !== void 0 ? e[n].concat(l) : l, l.forEach((o) => {
306
+ o[0].addEventListener(o[1], e[o[2]], ae[o[3]]);
307
+ });
308
+ }
309
+ function _n(e, t) {
310
+ const l = `__q_${t}_evt`;
311
+ e[l] !== void 0 && (e[l].forEach((n) => {
312
+ n[0].removeEventListener(n[1], e[n[2]], ae[n[3]]);
313
+ }), e[l] = void 0);
314
+ }
315
+ function En(e) {
316
+ return e !== Object(e) || e.isComposing === !0 || e.qKeyEvent === !0;
317
+ }
318
+ function Fe(e, t) {
319
+ return En(e) === !0 ? !1 : [].concat(t).includes(e.keyCode);
320
+ }
321
+ function No(e, t = 250) {
322
+ let l = !1, n;
323
+ return function() {
324
+ return l === !1 && (l = !0, setTimeout(() => {
325
+ l = !1;
326
+ }, t), n = e.apply(this, arguments)), n;
327
+ };
328
+ }
329
+ function Ll(e, t, l, n) {
330
+ l.modifiers.stop === !0 && Ee(e);
331
+ const o = l.modifiers.color;
332
+ let u = l.modifiers.center;
333
+ u = u === !0 || n === !0;
334
+ const a = document.createElement("span"), r = document.createElement("span"), g = qn(e), { left: b, top: s, width: y, height: v } = t.getBoundingClientRect(), c = Math.sqrt(y * y + v * v), m = c / 2, x = `${(y - c) / 2}px`, p = u ? x : `${g.left - b - m}px`, O = `${(v - c) / 2}px`, B = u ? O : `${g.top - s - m}px`;
335
+ r.className = "q-ripple__inner", ol(r, {
336
+ height: `${c}px`,
337
+ width: `${c}px`,
338
+ transform: `translate3d(${p},${B},0) scale3d(.2,.2,1)`,
339
+ opacity: 0
340
+ }), a.className = `q-ripple${o ? " text-" + o : ""}`, a.setAttribute("dir", "ltr"), a.appendChild(r), t.appendChild(a);
341
+ const k = () => {
342
+ a.remove(), clearTimeout(L);
343
+ };
344
+ l.abort.push(k);
345
+ let L = setTimeout(() => {
346
+ r.classList.add("q-ripple__inner--enter"), r.style.transform = `translate3d(${x},${O},0) scale3d(1,1,1)`, r.style.opacity = 0.2, L = setTimeout(() => {
347
+ r.classList.remove("q-ripple__inner--enter"), r.classList.add("q-ripple__inner--leave"), r.style.opacity = 0, L = setTimeout(() => {
348
+ a.remove(), l.abort.splice(l.abort.indexOf(k), 1);
349
+ }, 275);
350
+ }, 250);
351
+ }, 50);
352
+ }
353
+ function Ml(e, { modifiers: t, value: l, arg: n }) {
354
+ const o = Object.assign({}, e.cfg.ripple, t, l);
355
+ e.modifiers = {
356
+ early: o.early === !0,
357
+ stop: o.stop === !0,
358
+ center: o.center === !0,
359
+ color: o.color || n,
360
+ keyCodes: [].concat(o.keyCodes || 13)
361
+ };
362
+ }
363
+ const Vn = Vo(
364
+ {
365
+ name: "ripple",
366
+ beforeMount(e, t) {
367
+ const l = t.instance.$.appContext.config.globalProperties.$q.config || {};
368
+ if (l.ripple === !1)
369
+ return;
370
+ const n = {
371
+ cfg: l,
372
+ enabled: t.value !== !1,
373
+ modifiers: {},
374
+ abort: [],
375
+ start(o) {
376
+ n.enabled === !0 && o.qSkipRipple !== !0 && o.type === (n.modifiers.early === !0 ? "pointerdown" : "click") && Ll(o, e, n, o.qKeyEvent === !0);
377
+ },
378
+ keystart: No((o) => {
379
+ n.enabled === !0 && o.qSkipRipple !== !0 && Fe(o, n.modifiers.keyCodes) === !0 && o.type === `key${n.modifiers.early === !0 ? "down" : "up"}` && Ll(o, e, n, !0);
380
+ }, 300)
381
+ };
382
+ Ml(n, t), e.__qripple = n, il(n, "main", [
383
+ [e, "pointerdown", "start", "passive"],
384
+ [e, "click", "start", "passive"],
385
+ [e, "keydown", "keystart", "passive"],
386
+ [e, "keyup", "keystart", "passive"]
387
+ ]);
388
+ },
389
+ updated(e, t) {
390
+ if (t.oldValue !== t.value) {
391
+ const l = e.__qripple;
392
+ l !== void 0 && (l.enabled = t.value !== !1, l.enabled === !0 && Object(t.value) === t.value && Ml(l, t));
393
+ }
394
+ },
395
+ beforeUnmount(e) {
396
+ const t = e.__qripple;
397
+ t !== void 0 && (t.abort.forEach((l) => {
398
+ l();
399
+ }), _n(t, "main"), delete e._qripple);
400
+ }
401
+ }
402
+ ), Bn = {
403
+ left: "start",
404
+ center: "center",
405
+ right: "end",
406
+ between: "between",
407
+ around: "around",
408
+ evenly: "evenly",
409
+ stretch: "stretch"
410
+ }, Wo = Object.keys(Bn), Ko = {
411
+ align: {
412
+ type: String,
413
+ validator: (e) => Wo.includes(e)
414
+ }
415
+ };
416
+ function Qo(e) {
417
+ return d(() => {
418
+ const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
419
+ return `${e.vertical === !0 ? "items" : "justify"}-${Bn[t]}`;
420
+ });
421
+ }
422
+ function Qt(e) {
423
+ if (Object(e.$parent) === e.$parent)
424
+ return e.$parent;
425
+ let { parent: t } = e.$;
426
+ for (; Object(t) === t; ) {
427
+ if (Object(t.proxy) === t.proxy)
428
+ return t.proxy;
429
+ t = t.parent;
430
+ }
431
+ }
432
+ function Tn(e) {
433
+ return e.appContext.config.globalProperties.$router !== void 0;
434
+ }
435
+ function $n(e) {
436
+ return e.isUnmounted === !0 || e.isDeactivated === !0;
437
+ }
438
+ function Ol(e) {
439
+ return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
440
+ }
441
+ function Al(e, t) {
442
+ return (e.aliasOf || e) === (t.aliasOf || t);
443
+ }
444
+ function Uo(e, t) {
445
+ for (const l in t) {
446
+ const n = t[l], o = e[l];
447
+ if (typeof n == "string") {
448
+ if (n !== o)
449
+ return !1;
450
+ } else if (Array.isArray(o) === !1 || o.length !== n.length || n.some((u, a) => u !== o[a]))
451
+ return !1;
452
+ }
453
+ return !0;
454
+ }
455
+ function Pl(e, t) {
456
+ return Array.isArray(t) === !0 ? e.length === t.length && e.every((l, n) => l === t[n]) : e.length === 1 && e[0] === t;
457
+ }
458
+ function Yo(e, t) {
459
+ return Array.isArray(e) === !0 ? Pl(e, t) : Array.isArray(t) === !0 ? Pl(t, e) : e === t;
460
+ }
461
+ function Xo(e, t) {
462
+ if (Object.keys(e).length !== Object.keys(t).length)
463
+ return !1;
464
+ for (const l in e)
465
+ if (Yo(e[l], t[l]) === !1)
466
+ return !1;
467
+ return !0;
468
+ }
469
+ const Rn = {
470
+ // router-link
471
+ to: [String, Object],
472
+ replace: Boolean,
473
+ // regular <a> link
474
+ href: String,
475
+ target: String,
476
+ // state
477
+ disable: Boolean
478
+ }, Go = {
479
+ ...Rn,
480
+ // router-link
481
+ exact: Boolean,
482
+ activeClass: {
483
+ type: String,
484
+ default: "q-router-link--active"
485
+ },
486
+ exactActiveClass: {
487
+ type: String,
488
+ default: "q-router-link--exact-active"
489
+ }
490
+ };
491
+ function Ln({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) {
492
+ const l = le(), { props: n, proxy: o, emit: u } = l, a = Tn(l), r = d(() => n.disable !== !0 && n.href !== void 0), g = t === !0 ? d(
493
+ () => a === !0 && n.disable !== !0 && r.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
494
+ ) : d(
495
+ () => a === !0 && r.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
496
+ ), b = d(() => g.value === !0 ? B(n.to) : null), s = d(() => b.value !== null), y = d(() => r.value === !0 || s.value === !0), v = d(() => n.type === "a" || y.value === !0 ? "a" : n.tag || e || "div"), c = d(() => r.value === !0 ? {
497
+ href: n.href,
498
+ target: n.target
499
+ } : s.value === !0 ? {
500
+ href: b.value.href,
501
+ target: n.target
502
+ } : {}), m = d(() => {
503
+ if (s.value === !1)
504
+ return -1;
505
+ const { matched: $ } = b.value, { length: V } = $, M = $[V - 1];
506
+ if (M === void 0)
507
+ return -1;
508
+ const P = o.$route.matched;
509
+ if (P.length === 0)
510
+ return -1;
511
+ const W = P.findIndex(
512
+ Al.bind(null, M)
513
+ );
514
+ if (W !== -1)
515
+ return W;
516
+ const G = Ol($[V - 2]);
517
+ return (
518
+ // we are dealing with nested routes
519
+ V > 1 && Ol(M) === G && P[P.length - 1].path !== G ? P.findIndex(
520
+ Al.bind(null, $[V - 2])
521
+ ) : W
522
+ );
523
+ }), x = d(
524
+ () => s.value === !0 && m.value !== -1 && Uo(o.$route.params, b.value.params)
525
+ ), p = d(
526
+ () => x.value === !0 && m.value === o.$route.matched.length - 1 && Xo(o.$route.params, b.value.params)
527
+ ), O = d(() => s.value === !0 ? p.value === !0 ? ` ${n.exactActiveClass} ${n.activeClass}` : n.exact === !0 ? "" : x.value === !0 ? ` ${n.activeClass}` : "" : "");
528
+ function B($) {
529
+ try {
530
+ return o.$router.resolve($);
531
+ } catch {
532
+ }
533
+ return null;
534
+ }
535
+ function k($, { returnRouterError: V, to: M = n.to, replace: P = n.replace } = {}) {
536
+ if (n.disable === !0)
537
+ return $.preventDefault(), Promise.resolve(!1);
538
+ if (
539
+ // don't redirect with control keys;
540
+ // should match RouterLink from Vue Router
541
+ $.metaKey || $.altKey || $.ctrlKey || $.shiftKey || $.button !== void 0 && $.button !== 0 || n.target === "_blank"
542
+ )
543
+ return Promise.resolve(!1);
544
+ $.preventDefault();
545
+ const W = o.$router[P === !0 ? "replace" : "push"](M);
546
+ return V === !0 ? W : W.then(() => {
547
+ }).catch(() => {
548
+ });
549
+ }
550
+ function L($) {
551
+ if (s.value === !0) {
552
+ const V = (M) => k($, M);
553
+ u("click", $, V), $.defaultPrevented !== !0 && V();
554
+ } else
555
+ u("click", $);
556
+ }
557
+ return {
558
+ hasRouterLink: s,
559
+ hasHrefLink: r,
560
+ hasLink: y,
561
+ linkTag: v,
562
+ resolvedLink: b,
563
+ linkIsActive: x,
564
+ linkIsExactActive: p,
565
+ linkClass: O,
566
+ linkAttrs: c,
567
+ getLink: B,
568
+ navigateToRouterLink: k,
569
+ navigateOnClick: L
570
+ };
571
+ }
572
+ const zl = {
573
+ none: 0,
574
+ xs: 4,
575
+ sm: 8,
576
+ md: 16,
577
+ lg: 24,
578
+ xl: 32
579
+ }, Zo = {
580
+ xs: 8,
581
+ sm: 10,
582
+ md: 14,
583
+ lg: 20,
584
+ xl: 24
585
+ }, Jo = ["button", "submit", "reset"], ei = /[^\s]\/[^\s]/, ti = ["flat", "outline", "push", "unelevated"];
586
+ function li(e, t) {
587
+ return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : t;
588
+ }
589
+ const ni = {
590
+ ...zt,
591
+ ...Rn,
592
+ type: {
593
+ type: String,
594
+ default: "button"
595
+ },
596
+ label: [Number, String],
597
+ icon: String,
598
+ iconRight: String,
599
+ ...ti.reduce(
600
+ (e, t) => (e[t] = Boolean) && e,
601
+ {}
602
+ ),
603
+ square: Boolean,
604
+ rounded: Boolean,
605
+ glossy: Boolean,
606
+ size: String,
607
+ fab: Boolean,
608
+ fabMini: Boolean,
609
+ padding: String,
610
+ color: String,
611
+ textColor: String,
612
+ noCaps: Boolean,
613
+ noWrap: Boolean,
614
+ dense: Boolean,
615
+ tabindex: [Number, String],
616
+ ripple: {
617
+ type: [Boolean, Object],
618
+ default: !0
619
+ },
620
+ align: {
621
+ ...Ko.align,
622
+ default: "center"
623
+ },
624
+ stack: Boolean,
625
+ stretch: Boolean,
626
+ loading: {
627
+ type: Boolean,
628
+ default: null
629
+ },
630
+ disable: Boolean
631
+ }, oi = {
632
+ ...ni,
633
+ round: Boolean
634
+ };
635
+ function ii(e) {
636
+ const t = It(e, Zo), l = Qo(e), { hasRouterLink: n, hasLink: o, linkTag: u, linkAttrs: a, navigateOnClick: r } = Ln({
637
+ fallbackTag: "button"
638
+ }), g = d(() => {
639
+ const p = e.fab === !1 && e.fabMini === !1 ? t.value : {};
640
+ return e.padding !== void 0 ? Object.assign({}, p, {
641
+ padding: e.padding.split(/\s+/).map((O) => O in zl ? zl[O] + "px" : O).join(" "),
642
+ minWidth: "0",
643
+ minHeight: "0"
644
+ }) : p;
645
+ }), b = d(
646
+ () => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
647
+ ), s = d(
648
+ () => e.disable !== !0 && e.loading !== !0
649
+ ), y = d(() => s.value === !0 ? e.tabindex || 0 : -1), v = d(() => li(e, "standard")), c = d(() => {
650
+ const p = { tabindex: y.value };
651
+ return o.value === !0 ? Object.assign(p, a.value) : Jo.includes(e.type) === !0 && (p.type = e.type), u.value === "a" ? (e.disable === !0 ? p["aria-disabled"] = "true" : p.href === void 0 && (p.role = "button"), n.value !== !0 && ei.test(e.type) === !0 && (p.type = e.type)) : e.disable === !0 && (p.disabled = "", p["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(p, {
652
+ role: "progressbar",
653
+ "aria-valuemin": 0,
654
+ "aria-valuemax": 100,
655
+ "aria-valuenow": e.percentage
656
+ }), p;
657
+ }), m = d(() => {
658
+ let p;
659
+ e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? p = `text-${e.textColor || e.color}` : p = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (p = `text-${e.textColor}`);
660
+ const O = e.round === !0 ? "round" : `rectangle${b.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
661
+ return `q-btn--${v.value} q-btn--${O}` + (p !== void 0 ? " " + p : "") + (s.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" : "");
662
+ }), x = d(
663
+ () => l.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
664
+ );
665
+ return {
666
+ classes: m,
667
+ style: g,
668
+ innerClasses: x,
669
+ attributes: c,
670
+ hasLink: o,
671
+ linkTag: u,
672
+ navigateOnClick: r,
673
+ isActionable: s
674
+ };
675
+ }
676
+ const { passiveCapture: he } = ae;
677
+ let Ye = null, Xe = null, Ge = null;
678
+ const ui = ve({
679
+ name: "QBtn",
680
+ props: {
681
+ ...oi,
682
+ percentage: Number,
683
+ darkPercentage: Boolean,
684
+ onTouchstart: [Function, Array]
685
+ },
686
+ emits: ["click", "keydown", "mousedown", "keyup"],
687
+ setup(e, { slots: t, emit: l }) {
688
+ const { proxy: n } = le(), {
689
+ classes: o,
690
+ style: u,
691
+ innerClasses: a,
692
+ attributes: r,
693
+ hasLink: g,
694
+ linkTag: b,
695
+ navigateOnClick: s,
696
+ isActionable: y
697
+ } = ii(e), v = A(null), c = A(null);
698
+ let m = null, x, p = null;
699
+ const O = d(
700
+ () => e.label !== void 0 && e.label !== null && e.label !== ""
701
+ ), B = d(() => e.disable === !0 || e.ripple === !1 ? !1 : {
702
+ keyCodes: g.value === !0 ? [13, 32] : [13],
703
+ ...e.ripple === !0 ? {} : e.ripple
704
+ }), k = d(() => ({ center: e.round })), L = d(() => {
705
+ const E = Math.max(0, Math.min(100, e.percentage));
706
+ return E > 0 ? { transition: "transform 0.6s", transform: `translateX(${E - 100}%)` } : {};
707
+ }), $ = d(() => {
708
+ if (e.loading === !0)
709
+ return {
710
+ onMousedown: K,
711
+ onTouchstart: K,
712
+ onClick: K,
713
+ onKeydown: K,
714
+ onKeyup: K
715
+ };
716
+ if (y.value === !0) {
717
+ const E = {
718
+ onClick: M,
719
+ onKeydown: P,
720
+ onMousedown: G
721
+ };
722
+ if (n.$q.platform.has.touch === !0) {
723
+ const j = e.onTouchstart !== void 0 ? "" : "Passive";
724
+ E[`onTouchstart${j}`] = W;
725
+ }
726
+ return E;
727
+ }
728
+ return {
729
+ // needed; especially for disabled <a> tags
730
+ onClick: te
731
+ };
732
+ }), V = d(() => ({
733
+ ref: v,
734
+ class: "q-btn q-btn-item non-selectable no-outline " + o.value,
735
+ style: u.value,
736
+ ...r.value,
737
+ ...$.value
738
+ }));
739
+ function M(E) {
740
+ if (v.value !== null) {
741
+ if (E !== void 0) {
742
+ if (E.defaultPrevented === !0)
743
+ return;
744
+ const j = document.activeElement;
745
+ if (e.type === "submit" && j !== document.body && v.value.contains(j) === !1 && j.contains(v.value) === !1) {
746
+ v.value.focus();
747
+ const Y = () => {
748
+ document.removeEventListener("keydown", te, !0), document.removeEventListener("keyup", Y, he), v.value !== null && v.value.removeEventListener("blur", Y, he);
749
+ };
750
+ document.addEventListener("keydown", te, !0), document.addEventListener("keyup", Y, he), v.value.addEventListener("blur", Y, he);
751
+ }
752
+ }
753
+ s(E);
754
+ }
755
+ }
756
+ function P(E) {
757
+ v.value !== null && (l("keydown", E), Fe(E, [13, 32]) === !0 && Xe !== v.value && (Xe !== null && R(), E.defaultPrevented !== !0 && (v.value.focus(), Xe = v.value, v.value.classList.add("q-btn--active"), document.addEventListener("keyup", U, !0), v.value.addEventListener("blur", U, he)), te(E)));
758
+ }
759
+ function W(E) {
760
+ v.value !== null && (l("touchstart", E), E.defaultPrevented !== !0 && (Ye !== v.value && (Ye !== null && R(), Ye = v.value, m = E.target, m.addEventListener("touchcancel", U, he), m.addEventListener("touchend", U, he)), x = !0, p !== null && clearTimeout(p), p = setTimeout(() => {
761
+ p = null, x = !1;
762
+ }, 200)));
763
+ }
764
+ function G(E) {
765
+ v.value !== null && (E.qSkipRipple = x === !0, l("mousedown", E), E.defaultPrevented !== !0 && Ge !== v.value && (Ge !== null && R(), Ge = v.value, v.value.classList.add("q-btn--active"), document.addEventListener("mouseup", U, he)));
766
+ }
767
+ function U(E) {
768
+ if (v.value !== null && !(E !== void 0 && E.type === "blur" && document.activeElement === v.value)) {
769
+ if (E !== void 0 && E.type === "keyup") {
770
+ if (Xe === v.value && Fe(E, [13, 32]) === !0) {
771
+ const j = new MouseEvent("click", E);
772
+ j.qKeyEvent = !0, E.defaultPrevented === !0 && be(j), E.cancelBubble === !0 && Ee(j), v.value.dispatchEvent(j), te(E), E.qKeyEvent = !0;
773
+ }
774
+ l("keyup", E);
775
+ }
776
+ R();
777
+ }
778
+ }
779
+ function R(E) {
780
+ const j = c.value;
781
+ E !== !0 && (Ye === v.value || Ge === v.value) && j !== null && j !== document.activeElement && (j.setAttribute("tabindex", -1), j.focus()), Ye === v.value && (m !== null && (m.removeEventListener("touchcancel", U, he), m.removeEventListener("touchend", U, he)), Ye = m = null), Ge === v.value && (document.removeEventListener("mouseup", U, he), Ge = null), Xe === v.value && (document.removeEventListener("keyup", U, !0), v.value !== null && v.value.removeEventListener("blur", U, he), Xe = null), v.value !== null && v.value.classList.remove("q-btn--active");
782
+ }
783
+ function K(E) {
784
+ te(E), E.qSkipRipple = !0;
785
+ }
786
+ return fe(() => {
787
+ R(!0);
788
+ }), Object.assign(n, {
789
+ click: (E) => {
790
+ y.value === !0 && M(E);
791
+ }
792
+ }), () => {
793
+ let E = [];
794
+ e.icon !== void 0 && E.push(
795
+ h(_e, {
796
+ name: e.icon,
797
+ left: e.stack !== !0 && O.value === !0,
798
+ role: "img"
799
+ })
800
+ ), O.value === !0 && E.push(
801
+ h("span", { class: "block" }, [e.label])
802
+ ), E = Oe(t.default, E), e.iconRight !== void 0 && e.round === !1 && E.push(
803
+ h(_e, {
804
+ name: e.iconRight,
805
+ right: e.stack !== !0 && O.value === !0,
806
+ role: "img"
807
+ })
808
+ );
809
+ const j = [
810
+ h("span", {
811
+ class: "q-focus-helper",
812
+ ref: c
813
+ })
814
+ ];
815
+ return e.loading === !0 && e.percentage !== void 0 && j.push(
816
+ h("span", {
817
+ class: "q-btn__progress absolute-full overflow-hidden" + (e.darkPercentage === !0 ? " q-btn__progress--dark" : "")
818
+ }, [
819
+ h("span", {
820
+ class: "q-btn__progress-indicator fit block",
821
+ style: L.value
822
+ })
823
+ ])
824
+ ), j.push(
825
+ h("span", {
826
+ class: "q-btn__content text-center col items-center q-anchor--skip " + a.value
827
+ }, E)
828
+ ), e.loading !== null && j.push(
829
+ h(dt, {
830
+ name: "q-transition--fade"
831
+ }, () => e.loading === !0 ? [
832
+ h("span", {
833
+ key: "loading",
834
+ class: "absolute-full flex flex-center"
835
+ }, t.loading !== void 0 ? t.loading() : [h(xn)])
836
+ ] : null)
837
+ ), vn(
838
+ h(
839
+ b.value,
840
+ V.value,
841
+ j
842
+ ),
843
+ [[
844
+ Vn,
845
+ B.value,
846
+ void 0,
847
+ k.value
848
+ ]]
849
+ );
850
+ };
851
+ }
852
+ }), ai = /* @__PURE__ */ mt({
853
+ __name: "index",
854
+ props: {
855
+ size: { default: qe.MD },
856
+ transparent: { type: Boolean },
857
+ flat: { type: Boolean },
858
+ rounded: { type: Boolean },
859
+ color: { default: yn.PRIMARY },
860
+ iconLeft: {},
861
+ iconRight: {},
862
+ iconMiddle: {},
863
+ disabled: { type: Boolean },
864
+ loading: { type: Boolean },
865
+ to: {},
866
+ href: {},
867
+ target: {},
868
+ submit: { type: Boolean },
869
+ ariaLabel: {},
870
+ label: {}
871
+ },
872
+ emits: ["click"],
873
+ setup(e) {
874
+ const t = e, l = d(() => [
875
+ "app-btn",
876
+ {
877
+ "app-btn_default": !t.transparent && !t.flat,
878
+ "app-btn_trans": t.transparent,
879
+ "app-btn_flat": t.flat,
880
+ "app-btn_rounded": t.rounded,
881
+ "app-btn_sm": t.size === qe.SM,
882
+ "app-btn_md": t.size === qe.MD,
883
+ "app-btn_lg": t.size === qe.LG,
884
+ "app-btn_icon-left": t.iconLeft,
885
+ "app-btn_icon-right": t.iconRight,
886
+ "app-btn_icon-middle": t.iconMiddle
887
+ },
888
+ `app-btn_${t.color}`
889
+ ]);
890
+ return (n, o) => (ue(), $t(Je(ui), {
891
+ "no-caps": "",
892
+ unelevated: "",
893
+ class: Be(l.value),
894
+ padding: Je(Eo)[n.size || Je(qe).MD],
895
+ loading: n.loading,
896
+ disable: n.disabled || void 0,
897
+ to: n.to,
898
+ href: n.href,
899
+ target: n.target,
900
+ type: n.submit ? "submit" : void 0,
901
+ "aria-label": n.ariaLabel,
902
+ onClick: o[0] || (o[0] = (u) => n.$emit("click", u))
903
+ }, {
904
+ default: xe(() => [
905
+ n.iconLeft || n.iconMiddle ? (ue(), se("i", {
906
+ key: 0,
907
+ class: Be([
908
+ "icon-kl",
909
+ n.iconLeft ? "icon-kl_left" : "icon-kl_middle",
910
+ `icon-kl-${n.iconLeft || n.iconMiddle}`,
911
+ n.transparent || n.flat ? `text-${n.color}` : "text-secondary"
912
+ ])
913
+ }, null, 2)) : Ce("", !0),
914
+ yo(n.$slots, "default", {}, void 0, !0),
915
+ n.label ? (ue(), se(rt, { key: 1 }, [
916
+ Bt(Ze(n.label), 1)
917
+ ], 64)) : Ce("", !0),
918
+ n.iconRight ? (ue(), se("i", {
919
+ key: 2,
920
+ class: Be([
921
+ "icon-kl",
922
+ "icon-kl_right",
923
+ `icon-kl-${n.iconRight}`,
924
+ n.transparent ? `text-${n.color}` : "text-secondary"
925
+ ])
926
+ }, null, 2)) : Ce("", !0)
927
+ ]),
928
+ _: 3
929
+ }, 8, ["class", "padding", "loading", "disable", "to", "href", "target", "type", "aria-label"]));
930
+ }
931
+ }), fl = (e, t) => {
932
+ const l = e.__vccOpts || e;
933
+ for (const [n, o] of t)
934
+ l[n] = o;
935
+ return l;
936
+ }, ri = /* @__PURE__ */ fl(ai, [["__scopeId", "data-v-ac94630a"]]), si = /* @__PURE__ */ mt({
937
+ __name: "index",
938
+ props: {
939
+ name: {},
940
+ size: {},
941
+ color: {}
942
+ },
943
+ setup(e) {
944
+ return (t, l) => (ue(), se("i", {
945
+ class: Be(["icon-kl", `icon-kl-${t.name}`, t.color ? `text-${t.color}` : ""]),
946
+ style: wo(t.size ? `font-size: ${t.size}` : void 0)
947
+ }, null, 6));
948
+ }
949
+ }), Fu = /* @__PURE__ */ fl(si, [["__scopeId", "data-v-73419357"]]), Hu = mn(
950
+ () => Promise.resolve().then(() => pi)
951
+ ), Du = mn(
952
+ () => Promise.resolve().then(() => zu)
953
+ ), ft = A(
954
+ !1
955
+ );
956
+ let ul;
957
+ function ci(e, t) {
958
+ const l = /(edg|edge|edga|edgios)\/([\w.]+)/.exec(e) || /(opr)[\/]([\w.]+)/.exec(e) || /(vivaldi)[\/]([\w.]+)/.exec(e) || /(chrome|crios)[\/]([\w.]+)/.exec(e) || /(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e) || /(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e) || /(firefox|fxios)[\/]([\w.]+)/.exec(e) || /(webkit)[\/]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[\/]([\w.]+)/.exec(e) || [];
959
+ return {
960
+ browser: l[5] || l[3] || l[1] || "",
961
+ version: l[4] || l[2] || "0",
962
+ platform: t[0] || ""
963
+ };
964
+ }
965
+ function di(e) {
966
+ return /(ipad)/.exec(e) || /(ipod)/.exec(e) || /(windows phone)/.exec(e) || /(iphone)/.exec(e) || /(kindle)/.exec(e) || /(silk)/.exec(e) || /(android)/.exec(e) || /(win)/.exec(e) || /(mac)/.exec(e) || /(linux)/.exec(e) || /(cros)/.exec(e) || /(playbook)/.exec(e) || /(bb)/.exec(e) || /(blackberry)/.exec(e) || [];
967
+ }
968
+ const Mn = "ontouchstart" in window || window.navigator.maxTouchPoints > 0;
969
+ function fi(e) {
970
+ const t = e.toLowerCase(), l = di(t), n = ci(t, l), o = {
971
+ mobile: !1,
972
+ desktop: !1,
973
+ cordova: !1,
974
+ capacitor: !1,
975
+ nativeMobile: !1,
976
+ // nativeMobileWrapper: void 0,
977
+ electron: !1,
978
+ bex: !1,
979
+ linux: !1,
980
+ mac: !1,
981
+ win: !1,
982
+ cros: !1,
983
+ chrome: !1,
984
+ firefox: !1,
985
+ opera: !1,
986
+ safari: !1,
987
+ vivaldi: !1,
988
+ edge: !1,
989
+ edgeChromium: !1,
990
+ ie: !1,
991
+ webkit: !1,
992
+ android: !1,
993
+ ios: !1,
994
+ ipad: !1,
995
+ iphone: !1,
996
+ ipod: !1,
997
+ kindle: !1,
998
+ winphone: !1,
999
+ blackberry: !1,
1000
+ playbook: !1,
1001
+ silk: !1
1002
+ };
1003
+ n.browser && (o[n.browser] = !0, o.version = n.version, o.versionNumber = parseInt(n.version, 10)), n.platform && (o[n.platform] = !0);
1004
+ const u = o.android || o.ios || o.bb || o.blackberry || o.ipad || o.iphone || o.ipod || o.kindle || o.playbook || o.silk || o["windows phone"];
1005
+ if (u === !0 || t.indexOf("mobile") !== -1 ? o.mobile = !0 : o.desktop = !0, o["windows phone"] && (o.winphone = !0, delete o["windows phone"]), o.edga || o.edgios || o.edg ? (o.edge = !0, n.browser = "edge") : o.crios ? (o.chrome = !0, n.browser = "chrome") : o.fxios && (o.firefox = !0, n.browser = "firefox"), (o.ipod || o.ipad || o.iphone) && (o.ios = !0), o.vivaldi && (n.browser = "vivaldi", o.vivaldi = !0), // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers
1006
+ (o.chrome || o.opr || o.safari || o.vivaldi || o.mobile === !0 && o.ios !== !0 && u !== !0) && (o.webkit = !0), o.opr && (n.browser = "opera", o.opera = !0), o.safari && (o.blackberry || o.bb ? (n.browser = "blackberry", o.blackberry = !0) : o.playbook ? (n.browser = "playbook", o.playbook = !0) : o.android ? (n.browser = "android", o.android = !0) : o.kindle ? (n.browser = "kindle", o.kindle = !0) : o.silk && (n.browser = "silk", o.silk = !0)), o.name = n.browser, o.platform = n.platform, t.indexOf("electron") !== -1)
1007
+ o.electron = !0;
1008
+ else if (document.location.href.indexOf("-extension://") !== -1)
1009
+ o.bex = !0;
1010
+ else {
1011
+ if (window.Capacitor !== void 0 ? (o.capacitor = !0, o.nativeMobile = !0, o.nativeMobileWrapper = "capacitor") : (window._cordovaNative !== void 0 || window.cordova !== void 0) && (o.cordova = !0, o.nativeMobile = !0, o.nativeMobileWrapper = "cordova"), ft.value === !0 && (ul = { is: { ...o } }), Mn === !0 && o.mac === !0 && (o.desktop === !0 && o.safari === !0 || o.nativeMobile === !0 && o.android !== !0 && o.ios !== !0 && o.ipad !== !0)) {
1012
+ delete o.mac, delete o.desktop;
1013
+ const a = Math.min(window.innerHeight, window.innerWidth) > 414 ? "ipad" : "iphone";
1014
+ Object.assign(o, {
1015
+ mobile: !0,
1016
+ ios: !0,
1017
+ platform: a,
1018
+ [a]: !0
1019
+ });
1020
+ }
1021
+ o.mobile !== !0 && window.navigator.userAgentData && window.navigator.userAgentData.mobile && (delete o.desktop, o.mobile = !0);
1022
+ }
1023
+ return o;
1024
+ }
1025
+ const Il = navigator.userAgent || navigator.vendor || window.opera, vi = {
1026
+ has: {
1027
+ touch: !1,
1028
+ webStorage: !1
1029
+ },
1030
+ within: { iframe: !1 }
1031
+ }, de = {
1032
+ userAgent: Il,
1033
+ is: fi(Il),
1034
+ has: {
1035
+ touch: Mn
1036
+ },
1037
+ within: {
1038
+ iframe: window.self !== window.top
1039
+ }
1040
+ }, al = {
1041
+ install(e) {
1042
+ const { $q: t } = e;
1043
+ ft.value === !0 ? (e.onSSRHydrated.push(() => {
1044
+ Object.assign(t.platform, de), ft.value = !1;
1045
+ }), t.platform = So(this)) : t.platform = this;
1046
+ }
1047
+ };
1048
+ {
1049
+ let e;
1050
+ dl(de.has, "webStorage", () => {
1051
+ if (e !== void 0)
1052
+ return e;
1053
+ try {
1054
+ if (window.localStorage)
1055
+ return e = !0, !0;
1056
+ } catch {
1057
+ }
1058
+ return e = !1, !1;
1059
+ }), Object.assign(al, de), ft.value === !0 && (Object.assign(al, ul, vi), ul = null);
1060
+ }
1061
+ const Pe = [];
1062
+ function On(e) {
1063
+ Pe[Pe.length - 1](e);
1064
+ }
1065
+ function vl(e) {
1066
+ de.is.desktop === !0 && (Pe.push(e), Pe.length === 1 && document.body.addEventListener("focusin", On));
1067
+ }
1068
+ function Rt(e) {
1069
+ const t = Pe.indexOf(e);
1070
+ t !== -1 && (Pe.splice(t, 1), Pe.length === 0 && document.body.removeEventListener("focusin", On));
1071
+ }
1072
+ function mi(e) {
1073
+ const t = document.createElement("textarea");
1074
+ t.value = e, t.contentEditable = "true", t.style.position = "fixed";
1075
+ const l = () => {
1076
+ };
1077
+ vl(l), document.body.appendChild(t), t.focus(), t.select();
1078
+ const n = document.execCommand("copy");
1079
+ return t.remove(), Rt(l), n;
1080
+ }
1081
+ function gi(e) {
1082
+ return navigator.clipboard !== void 0 ? navigator.clipboard.writeText(e) : new Promise((t, l) => {
1083
+ const n = mi(e);
1084
+ n ? t(!0) : l(n);
1085
+ });
1086
+ }
1087
+ const Ut = {
1088
+ COPY: "copy_o",
1089
+ COPIED: "copied_o"
1090
+ }, hi = /* @__PURE__ */ mt({
1091
+ __name: "index",
1092
+ props: {
1093
+ text: {},
1094
+ size: {},
1095
+ transparent: { type: Boolean, default: !0 },
1096
+ flat: { type: Boolean },
1097
+ rounded: { type: Boolean },
1098
+ color: { default: yn.INFO },
1099
+ iconLeft: {},
1100
+ iconRight: {},
1101
+ iconMiddle: {},
1102
+ disabled: { type: Boolean },
1103
+ loading: { type: Boolean },
1104
+ to: {},
1105
+ href: {},
1106
+ target: {},
1107
+ submit: { type: Boolean },
1108
+ ariaLabel: {},
1109
+ label: {}
1110
+ },
1111
+ setup(e) {
1112
+ const t = e, l = A(Ut.COPY), n = () => {
1113
+ l.value = Ut.COPIED, setTimeout(() => {
1114
+ l.value = Ut.COPY;
1115
+ }, 2e3);
1116
+ }, o = () => {
1117
+ gi(t.text).then(n).catch((u) => {
1118
+ console.log(u);
1119
+ });
1120
+ };
1121
+ return (u, a) => (ue(), $t(Je(ri), gn(t, {
1122
+ "icon-middle": l.value,
1123
+ onClick: hn(o, ["prevent"])
1124
+ }), null, 16, ["icon-middle"]));
1125
+ }
1126
+ }), pi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1127
+ __proto__: null,
1128
+ default: hi
1129
+ }, Symbol.toStringTag, { value: "Module" })), ht = {
1130
+ dark: {
1131
+ type: Boolean,
1132
+ default: null
1133
+ }
1134
+ };
1135
+ function pt(e, t) {
1136
+ return d(() => e.dark === null ? t.dark.isActive : e.dark);
1137
+ }
1138
+ function bi(e, t) {
1139
+ const l = A(null), n = d(() => e.disable === !0 ? null : h("span", {
1140
+ ref: l,
1141
+ class: "no-outline",
1142
+ tabindex: -1
1143
+ }));
1144
+ function o(u) {
1145
+ const a = t.value;
1146
+ u !== void 0 && u.type.indexOf("key") === 0 ? a !== null && document.activeElement !== a && a.contains(document.activeElement) === !0 && a.focus() : l.value !== null && (u === void 0 || a !== null && a.contains(u.target) === !0) && l.value.focus();
1147
+ }
1148
+ return {
1149
+ refocusTargetEl: n,
1150
+ refocusTarget: o
1151
+ };
1152
+ }
1153
+ const An = {
1154
+ name: String
1155
+ };
1156
+ function yi(e = {}) {
1157
+ return (t, l, n) => {
1158
+ t[l](
1159
+ h("input", {
1160
+ class: "hidden" + (n || ""),
1161
+ ...e.value
1162
+ })
1163
+ );
1164
+ };
1165
+ }
1166
+ function wi(e) {
1167
+ return d(() => e.name || e.for);
1168
+ }
1169
+ const Si = {
1170
+ xs: 30,
1171
+ sm: 35,
1172
+ md: 40,
1173
+ lg: 50,
1174
+ xl: 60
1175
+ }, ki = {
1176
+ ...ht,
1177
+ ...zt,
1178
+ ...An,
1179
+ modelValue: {
1180
+ required: !0,
1181
+ default: null
1182
+ },
1183
+ val: {},
1184
+ trueValue: { default: !0 },
1185
+ falseValue: { default: !1 },
1186
+ indeterminateValue: { default: null },
1187
+ checkedIcon: String,
1188
+ uncheckedIcon: String,
1189
+ indeterminateIcon: String,
1190
+ toggleOrder: {
1191
+ type: String,
1192
+ validator: (e) => e === "tf" || e === "ft"
1193
+ },
1194
+ toggleIndeterminate: Boolean,
1195
+ label: String,
1196
+ leftLabel: Boolean,
1197
+ color: String,
1198
+ keepColor: Boolean,
1199
+ dense: Boolean,
1200
+ disable: Boolean,
1201
+ tabindex: [String, Number]
1202
+ }, xi = ["update:modelValue"];
1203
+ function Ci(e, t) {
1204
+ const { props: l, slots: n, emit: o, proxy: u } = le(), { $q: a } = u, r = pt(l, a), g = A(null), { refocusTargetEl: b, refocusTarget: s } = bi(l, g), y = It(l, Si), v = d(
1205
+ () => l.val !== void 0 && Array.isArray(l.modelValue)
1206
+ ), c = d(() => {
1207
+ const R = Ue(l.val);
1208
+ return v.value === !0 ? l.modelValue.findIndex((K) => Ue(K) === R) : -1;
1209
+ }), m = d(() => v.value === !0 ? c.value !== -1 : Ue(l.modelValue) === Ue(l.trueValue)), x = d(() => v.value === !0 ? c.value === -1 : Ue(l.modelValue) === Ue(l.falseValue)), p = d(
1210
+ () => m.value === !1 && x.value === !1
1211
+ ), O = d(() => l.disable === !0 ? -1 : l.tabindex || 0), B = d(
1212
+ () => `q-${e} cursor-pointer no-outline row inline no-wrap items-center` + (l.disable === !0 ? " disabled" : "") + (r.value === !0 ? ` q-${e}--dark` : "") + (l.dense === !0 ? ` q-${e}--dense` : "") + (l.leftLabel === !0 ? " reverse" : "")
1213
+ ), k = d(() => {
1214
+ const R = m.value === !0 ? "truthy" : x.value === !0 ? "falsy" : "indet", K = l.color !== void 0 && (l.keepColor === !0 || x.value !== !0) ? ` text-${l.color}` : "";
1215
+ return `q-${e}__inner relative-position non-selectable q-${e}__inner--${R}${K}`;
1216
+ }), L = d(() => {
1217
+ const R = { type: "checkbox" };
1218
+ return l.name !== void 0 && Object.assign(R, {
1219
+ // see https://vuejs.org/guide/extras/render-function.html#creating-vnodes (.prop)
1220
+ ".checked": m.value,
1221
+ "^checked": m.value === !0 ? "checked" : void 0,
1222
+ name: l.name,
1223
+ value: v.value === !0 ? l.val : l.trueValue
1224
+ }), R;
1225
+ }), $ = yi(L), V = d(() => {
1226
+ const R = {
1227
+ tabindex: O.value,
1228
+ role: "checkbox",
1229
+ "aria-label": l.label,
1230
+ "aria-checked": p.value === !0 ? "mixed" : m.value === !0 ? "true" : "false"
1231
+ };
1232
+ return l.disable === !0 && (R["aria-disabled"] = "true"), R;
1233
+ });
1234
+ function M(R) {
1235
+ R !== void 0 && (te(R), s(R)), l.disable !== !0 && o("update:modelValue", P(), R);
1236
+ }
1237
+ function P() {
1238
+ if (v.value === !0) {
1239
+ if (m.value === !0) {
1240
+ const R = l.modelValue.slice();
1241
+ return R.splice(c.value, 1), R;
1242
+ }
1243
+ return l.modelValue.concat([l.val]);
1244
+ }
1245
+ if (m.value === !0) {
1246
+ if (l.toggleOrder !== "ft" || l.toggleIndeterminate === !1)
1247
+ return l.falseValue;
1248
+ } else if (x.value === !0) {
1249
+ if (l.toggleOrder === "ft" || l.toggleIndeterminate === !1)
1250
+ return l.trueValue;
1251
+ } else
1252
+ return l.toggleOrder !== "ft" ? l.trueValue : l.falseValue;
1253
+ return l.indeterminateValue;
1254
+ }
1255
+ function W(R) {
1256
+ (R.keyCode === 13 || R.keyCode === 32) && te(R);
1257
+ }
1258
+ function G(R) {
1259
+ (R.keyCode === 13 || R.keyCode === 32) && M(R);
1260
+ }
1261
+ const U = t(m, p);
1262
+ return Object.assign(u, { toggle: M }), () => {
1263
+ const R = U();
1264
+ l.disable !== !0 && $(
1265
+ R,
1266
+ "unshift",
1267
+ ` q-${e}__native absolute q-ma-none q-pa-none`
1268
+ );
1269
+ const K = [
1270
+ h("div", {
1271
+ class: k.value,
1272
+ style: y.value,
1273
+ "aria-hidden": "true"
1274
+ }, R)
1275
+ ];
1276
+ b.value !== null && K.push(b.value);
1277
+ const E = l.label !== void 0 ? Oe(n.default, [l.label]) : ke(n.default);
1278
+ return E !== void 0 && K.push(
1279
+ h("div", {
1280
+ class: `q-${e}__label q-anchor--skip`
1281
+ }, E)
1282
+ ), h("div", {
1283
+ ref: g,
1284
+ class: B.value,
1285
+ ...V.value,
1286
+ onClick: M,
1287
+ onKeydown: W,
1288
+ onKeyup: G
1289
+ }, K);
1290
+ };
1291
+ }
1292
+ const qi = () => h("div", {
1293
+ key: "svg",
1294
+ class: "q-checkbox__bg absolute"
1295
+ }, [
1296
+ h("svg", {
1297
+ class: "q-checkbox__svg fit absolute-full",
1298
+ viewBox: "0 0 24 24"
1299
+ }, [
1300
+ h("path", {
1301
+ class: "q-checkbox__truthy",
1302
+ fill: "none",
1303
+ d: "M1.73,12.91 8.1,19.28 22.79,4.59"
1304
+ }),
1305
+ h("path", {
1306
+ class: "q-checkbox__indet",
1307
+ d: "M4,14H20V10H4"
1308
+ })
1309
+ ])
1310
+ ]), _i = ve({
1311
+ name: "QCheckbox",
1312
+ props: ki,
1313
+ emits: xi,
1314
+ setup(e) {
1315
+ const t = qi();
1316
+ function l(n, o) {
1317
+ const u = d(
1318
+ () => (n.value === !0 ? e.checkedIcon : o.value === !0 ? e.indeterminateIcon : e.uncheckedIcon) || null
1319
+ );
1320
+ return () => u.value !== null ? [
1321
+ h("div", {
1322
+ key: "icon",
1323
+ class: "q-checkbox__icon-container absolute-full flex flex-center no-wrap"
1324
+ }, [
1325
+ h(_e, {
1326
+ class: "q-checkbox__icon",
1327
+ name: u.value
1328
+ })
1329
+ ])
1330
+ ] : [t];
1331
+ }
1332
+ return Ci("checkbox", l);
1333
+ }
1334
+ }), Tt = ve({
1335
+ name: "QItemSection",
1336
+ props: {
1337
+ avatar: Boolean,
1338
+ thumbnail: Boolean,
1339
+ side: Boolean,
1340
+ top: Boolean,
1341
+ noWrap: Boolean
1342
+ },
1343
+ setup(e, { slots: t }) {
1344
+ const l = d(
1345
+ () => `q-item__section column q-item__section--${e.avatar === !0 || e.side === !0 || e.thumbnail === !0 ? "side" : "main"}` + (e.top === !0 ? " q-item__section--top justify-start" : " justify-center") + (e.avatar === !0 ? " q-item__section--avatar" : "") + (e.thumbnail === !0 ? " q-item__section--thumbnail" : "") + (e.noWrap === !0 ? " q-item__section--nowrap" : "")
1346
+ );
1347
+ return () => h("div", { class: l.value }, ke(t.default));
1348
+ }
1349
+ }), Pn = ve({
1350
+ name: "QItemLabel",
1351
+ props: {
1352
+ overline: Boolean,
1353
+ caption: Boolean,
1354
+ header: Boolean,
1355
+ lines: [Number, String]
1356
+ },
1357
+ setup(e, { slots: t }) {
1358
+ const l = d(() => parseInt(e.lines, 10)), n = d(
1359
+ () => "q-item__label" + (e.overline === !0 ? " q-item__label--overline text-overline" : "") + (e.caption === !0 ? " q-item__label--caption text-caption" : "") + (e.header === !0 ? " q-item__label--header" : "") + (l.value === 1 ? " ellipsis" : "")
1360
+ ), o = d(() => e.lines !== void 0 && l.value > 1 ? {
1361
+ overflow: "hidden",
1362
+ display: "-webkit-box",
1363
+ "-webkit-box-orient": "vertical",
1364
+ "-webkit-line-clamp": l.value
1365
+ } : null);
1366
+ return () => h("div", {
1367
+ style: o.value,
1368
+ class: n.value
1369
+ }, ke(t.default));
1370
+ }
1371
+ }), zn = ve({
1372
+ name: "QItem",
1373
+ props: {
1374
+ ...ht,
1375
+ ...Go,
1376
+ tag: {
1377
+ type: String,
1378
+ default: "div"
1379
+ },
1380
+ active: {
1381
+ type: Boolean,
1382
+ default: null
1383
+ },
1384
+ clickable: Boolean,
1385
+ dense: Boolean,
1386
+ insetLevel: Number,
1387
+ tabindex: [String, Number],
1388
+ focused: Boolean,
1389
+ manualFocus: Boolean
1390
+ },
1391
+ emits: ["click", "keyup"],
1392
+ setup(e, { slots: t, emit: l }) {
1393
+ const { proxy: { $q: n } } = le(), o = pt(e, n), { hasLink: u, linkAttrs: a, linkClass: r, linkTag: g, navigateOnClick: b } = Ln(), s = A(null), y = A(null), v = d(
1394
+ () => e.clickable === !0 || u.value === !0 || e.tag === "label"
1395
+ ), c = d(
1396
+ () => e.disable !== !0 && v.value === !0
1397
+ ), m = d(
1398
+ () => "q-item q-item-type row no-wrap" + (e.dense === !0 ? " q-item--dense" : "") + (o.value === !0 ? " q-item--dark" : "") + (u.value === !0 && e.active === null ? r.value : e.active === !0 ? ` q-item--active${e.activeClass !== void 0 ? ` ${e.activeClass}` : ""}` : "") + (e.disable === !0 ? " disabled" : "") + (c.value === !0 ? " q-item--clickable q-link cursor-pointer " + (e.manualFocus === !0 ? "q-manual-focusable" : "q-focusable q-hoverable") + (e.focused === !0 ? " q-manual-focusable--focused" : "") : "")
1399
+ ), x = d(() => e.insetLevel === void 0 ? null : {
1400
+ ["padding" + (n.lang.rtl === !0 ? "Right" : "Left")]: 16 + e.insetLevel * 56 + "px"
1401
+ });
1402
+ function p(k) {
1403
+ c.value === !0 && (y.value !== null && (k.qKeyEvent !== !0 && document.activeElement === s.value ? y.value.focus() : document.activeElement === y.value && s.value.focus()), b(k));
1404
+ }
1405
+ function O(k) {
1406
+ if (c.value === !0 && Fe(k, [13, 32]) === !0) {
1407
+ te(k), k.qKeyEvent = !0;
1408
+ const L = new MouseEvent("click", k);
1409
+ L.qKeyEvent = !0, s.value.dispatchEvent(L);
1410
+ }
1411
+ l("keyup", k);
1412
+ }
1413
+ function B() {
1414
+ const k = Bo(t.default, []);
1415
+ return c.value === !0 && k.unshift(
1416
+ h("div", { class: "q-focus-helper", tabindex: -1, ref: y })
1417
+ ), k;
1418
+ }
1419
+ return () => {
1420
+ const k = {
1421
+ ref: s,
1422
+ class: m.value,
1423
+ style: x.value,
1424
+ role: "listitem",
1425
+ onClick: p,
1426
+ onKeyup: O
1427
+ };
1428
+ return c.value === !0 ? (k.tabindex = e.tabindex || "0", Object.assign(k, a.value)) : v.value === !0 && (k["aria-disabled"] = "true"), h(
1429
+ g.value,
1430
+ k,
1431
+ B()
1432
+ );
1433
+ };
1434
+ }
1435
+ }), Fl = (e) => e ? !0 : "Обовʼязкове поле";
1436
+ let Yt, xt = 0;
1437
+ const ie = new Array(256);
1438
+ for (let e = 0; e < 256; e++)
1439
+ ie[e] = (e + 256).toString(16).substring(1);
1440
+ const Ei = (() => {
1441
+ const e = typeof crypto < "u" ? crypto : typeof window < "u" ? window.crypto || window.msCrypto : void 0;
1442
+ if (e !== void 0) {
1443
+ if (e.randomBytes !== void 0)
1444
+ return e.randomBytes;
1445
+ if (e.getRandomValues !== void 0)
1446
+ return (t) => {
1447
+ const l = new Uint8Array(t);
1448
+ return e.getRandomValues(l), l;
1449
+ };
1450
+ }
1451
+ return (t) => {
1452
+ const l = [];
1453
+ for (let n = t; n > 0; n--)
1454
+ l.push(Math.floor(Math.random() * 256));
1455
+ return l;
1456
+ };
1457
+ })(), Hl = 4096;
1458
+ function rl() {
1459
+ (Yt === void 0 || xt + 16 > Hl) && (xt = 0, Yt = Ei(Hl));
1460
+ const e = Array.prototype.slice.call(Yt, xt, xt += 16);
1461
+ return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, ie[e[0]] + ie[e[1]] + ie[e[2]] + ie[e[3]] + "-" + ie[e[4]] + ie[e[5]] + "-" + ie[e[6]] + ie[e[7]] + "-" + ie[e[8]] + ie[e[9]] + "-" + ie[e[10]] + ie[e[11]] + ie[e[12]] + ie[e[13]] + ie[e[14]] + ie[e[15]];
1462
+ }
1463
+ function Vi(e) {
1464
+ return e ?? null;
1465
+ }
1466
+ function Dl(e, t) {
1467
+ return e ?? (t === !0 ? `f_${rl()}` : null);
1468
+ }
1469
+ function Bi({ getValue: e, required: t = !0 } = {}) {
1470
+ if (ft.value === !0) {
1471
+ const l = e !== void 0 ? A(Vi(e())) : A(null);
1472
+ return t === !0 && l.value === null && gt(() => {
1473
+ l.value = `f_${rl()}`;
1474
+ }), e !== void 0 && J(e, (n) => {
1475
+ l.value = Dl(n, t);
1476
+ }), l;
1477
+ }
1478
+ return e !== void 0 ? d(() => Dl(e(), t)) : A(`f_${rl()}`);
1479
+ }
1480
+ const jl = /^on[A-Z]/;
1481
+ function Ti() {
1482
+ const { attrs: e, vnode: t } = le(), l = {
1483
+ listeners: A({}),
1484
+ attributes: A({})
1485
+ };
1486
+ function n() {
1487
+ const o = {}, u = {};
1488
+ for (const a in e)
1489
+ a !== "class" && a !== "style" && jl.test(a) === !1 && (o[a] = e[a]);
1490
+ for (const a in t.props)
1491
+ jl.test(a) === !0 && (u[a] = t.props[a]);
1492
+ l.attributes.value = o, l.listeners.value = u;
1493
+ }
1494
+ return pn(n), n(), l;
1495
+ }
1496
+ const $i = "_q_fo_";
1497
+ function Ri({ validate: e, resetValidation: t, requiresQForm: l }) {
1498
+ const n = ko($i, !1);
1499
+ if (n !== !1) {
1500
+ const { props: o, proxy: u } = le();
1501
+ Object.assign(u, { validate: e, resetValidation: t }), J(() => o.disable, (a) => {
1502
+ a === !0 ? (typeof t == "function" && t(), n.unbindComponent(u)) : n.bindComponent(u);
1503
+ }), gt(() => {
1504
+ o.disable !== !0 && n.bindComponent(u);
1505
+ }), fe(() => {
1506
+ o.disable !== !0 && n.unbindComponent(u);
1507
+ });
1508
+ } else l === !0 && console.error("Parent QForm not found on useFormChild()!");
1509
+ }
1510
+ const Nl = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, Wl = /^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/, Kl = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, Ct = /^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/, qt = /^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/, Xt = {
1511
+ date: (e) => /^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),
1512
+ time: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),
1513
+ fulltime: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),
1514
+ timeOrFulltime: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e),
1515
+ // -- RFC 5322 --
1516
+ // -- Added in v2.6.6 --
1517
+ // This is a basic helper validation.
1518
+ // For something more complex (like RFC 822) you should write and use your own rule.
1519
+ // We won't be accepting PRs to enhance the one below because of the reason above.
1520
+ // eslint-disable-next-line
1521
+ email: (e) => /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),
1522
+ hexColor: (e) => Nl.test(e),
1523
+ hexaColor: (e) => Wl.test(e),
1524
+ hexOrHexaColor: (e) => Kl.test(e),
1525
+ rgbColor: (e) => Ct.test(e),
1526
+ rgbaColor: (e) => qt.test(e),
1527
+ rgbOrRgbaColor: (e) => Ct.test(e) || qt.test(e),
1528
+ hexOrRgbColor: (e) => Nl.test(e) || Ct.test(e),
1529
+ hexaOrRgbaColor: (e) => Wl.test(e) || qt.test(e),
1530
+ anyColor: (e) => Kl.test(e) || Ct.test(e) || qt.test(e)
1531
+ };
1532
+ function In(e, t = 250, l) {
1533
+ let n = null;
1534
+ function o() {
1535
+ const u = arguments, a = () => {
1536
+ n = null, l !== !0 && e.apply(this, u);
1537
+ };
1538
+ n !== null ? clearTimeout(n) : l === !0 && e.apply(this, u), n = setTimeout(a, t);
1539
+ }
1540
+ return o.cancel = () => {
1541
+ n !== null && clearTimeout(n);
1542
+ }, o;
1543
+ }
1544
+ const Li = [!0, !1, "ondemand"], Mi = {
1545
+ modelValue: {},
1546
+ error: {
1547
+ type: Boolean,
1548
+ default: null
1549
+ },
1550
+ errorMessage: String,
1551
+ noErrorIcon: Boolean,
1552
+ rules: Array,
1553
+ reactiveRules: Boolean,
1554
+ lazyRules: {
1555
+ type: [Boolean, String],
1556
+ default: !1,
1557
+ // statement unneeded but avoids future vue implementation changes
1558
+ validator: (e) => Li.includes(e)
1559
+ }
1560
+ };
1561
+ function Oi(e, t) {
1562
+ const { props: l, proxy: n } = le(), o = A(!1), u = A(null), a = A(!1);
1563
+ Ri({ validate: x, resetValidation: m });
1564
+ let r = 0, g;
1565
+ const b = d(
1566
+ () => l.rules !== void 0 && l.rules !== null && l.rules.length !== 0
1567
+ ), s = d(() => l.disable !== !0 && b.value === !0 && t.value === !1), y = d(
1568
+ () => l.error === !0 || o.value === !0
1569
+ ), v = d(() => typeof l.errorMessage == "string" && l.errorMessage.length !== 0 ? l.errorMessage : u.value);
1570
+ J(() => l.modelValue, () => {
1571
+ a.value = !0, s.value === !0 && l.lazyRules === !1 && p();
1572
+ });
1573
+ function c() {
1574
+ l.lazyRules !== "ondemand" && s.value === !0 && a.value === !0 && p();
1575
+ }
1576
+ J(() => l.reactiveRules, (O) => {
1577
+ O === !0 ? g === void 0 && (g = J(() => l.rules, c, { immediate: !0, deep: !0 })) : g !== void 0 && (g(), g = void 0);
1578
+ }, { immediate: !0 }), J(() => l.lazyRules, c), J(e, (O) => {
1579
+ O === !0 ? a.value = !0 : s.value === !0 && l.lazyRules !== "ondemand" && p();
1580
+ });
1581
+ function m() {
1582
+ r++, t.value = !1, a.value = !1, o.value = !1, u.value = null, p.cancel();
1583
+ }
1584
+ function x(O = l.modelValue) {
1585
+ if (l.disable === !0 || b.value === !1)
1586
+ return !0;
1587
+ const B = ++r, k = t.value !== !0 ? () => {
1588
+ a.value = !0;
1589
+ } : () => {
1590
+ }, L = (V, M) => {
1591
+ V === !0 && k(), o.value = V, u.value = M || null, t.value = !1;
1592
+ }, $ = [];
1593
+ for (let V = 0; V < l.rules.length; V++) {
1594
+ const M = l.rules[V];
1595
+ let P;
1596
+ if (typeof M == "function" ? P = M(O, Xt) : typeof M == "string" && Xt[M] !== void 0 && (P = Xt[M](O)), P === !1 || typeof P == "string")
1597
+ return L(!0, P), !1;
1598
+ P !== !0 && P !== void 0 && $.push(P);
1599
+ }
1600
+ return $.length === 0 ? (L(!1), !0) : (t.value = !0, Promise.all($).then(
1601
+ (V) => {
1602
+ if (V === void 0 || Array.isArray(V) === !1 || V.length === 0)
1603
+ return B === r && L(!1), !0;
1604
+ const M = V.find((P) => P === !1 || typeof P == "string");
1605
+ return B === r && L(M !== void 0, M), M === void 0;
1606
+ },
1607
+ (V) => (B === r && (console.error(V), L(!0)), !1)
1608
+ ));
1609
+ }
1610
+ const p = In(x, 0);
1611
+ return fe(() => {
1612
+ g !== void 0 && g(), p.cancel();
1613
+ }), Object.assign(n, { resetValidation: m, validate: x }), dl(n, "hasError", () => y.value), {
1614
+ isDirtyModel: a,
1615
+ hasRules: b,
1616
+ hasError: y,
1617
+ errorMessage: v,
1618
+ validate: x,
1619
+ resetValidation: m
1620
+ };
1621
+ }
1622
+ let Ae = [], vt = [];
1623
+ function Fn(e) {
1624
+ vt = vt.filter((t) => t !== e);
1625
+ }
1626
+ function Ai(e) {
1627
+ Fn(e), vt.push(e);
1628
+ }
1629
+ function Ql(e) {
1630
+ Fn(e), vt.length === 0 && Ae.length !== 0 && (Ae[Ae.length - 1](), Ae = []);
1631
+ }
1632
+ function ml(e) {
1633
+ vt.length === 0 ? e() : Ae.push(e);
1634
+ }
1635
+ function Pi(e) {
1636
+ Ae = Ae.filter((t) => t !== e);
1637
+ }
1638
+ function sl(e) {
1639
+ return e != null && ("" + e).length !== 0;
1640
+ }
1641
+ const zi = {
1642
+ ...ht,
1643
+ ...Mi,
1644
+ label: String,
1645
+ stackLabel: Boolean,
1646
+ hint: String,
1647
+ hideHint: Boolean,
1648
+ prefix: String,
1649
+ suffix: String,
1650
+ labelColor: String,
1651
+ color: String,
1652
+ bgColor: String,
1653
+ filled: Boolean,
1654
+ outlined: Boolean,
1655
+ borderless: Boolean,
1656
+ standout: [Boolean, String],
1657
+ square: Boolean,
1658
+ loading: Boolean,
1659
+ labelSlot: Boolean,
1660
+ bottomSlots: Boolean,
1661
+ hideBottomSpace: Boolean,
1662
+ rounded: Boolean,
1663
+ dense: Boolean,
1664
+ itemAligned: Boolean,
1665
+ counter: Boolean,
1666
+ clearable: Boolean,
1667
+ clearIcon: String,
1668
+ disable: Boolean,
1669
+ readonly: Boolean,
1670
+ autofocus: Boolean,
1671
+ for: String
1672
+ }, gl = {
1673
+ ...zi,
1674
+ maxlength: [Number, String]
1675
+ }, Hn = ["update:modelValue", "clear", "focus", "blur"];
1676
+ function Dn({ requiredForAttr: e = !0, tagProp: t, changeEvent: l = !1 } = {}) {
1677
+ const { props: n, proxy: o } = le(), u = pt(n, o.$q), a = Bi({
1678
+ required: e,
1679
+ getValue: () => n.for
1680
+ });
1681
+ return {
1682
+ requiredForAttr: e,
1683
+ changeEvent: l,
1684
+ tag: t === !0 ? d(() => n.tag) : { value: "label" },
1685
+ isDark: u,
1686
+ editable: d(
1687
+ () => n.disable !== !0 && n.readonly !== !0
1688
+ ),
1689
+ innerLoading: A(!1),
1690
+ focused: A(!1),
1691
+ hasPopupOpen: !1,
1692
+ splitAttrs: Ti(),
1693
+ targetUid: a,
1694
+ rootRef: A(null),
1695
+ targetRef: A(null),
1696
+ controlRef: A(null)
1697
+ /**
1698
+ * user supplied additionals:
1699
+
1700
+ * innerValue - computed
1701
+ * floatingLabel - computed
1702
+ * inputRef - computed
1703
+
1704
+ * fieldClass - computed
1705
+ * hasShadow - computed
1706
+
1707
+ * controlEvents - Object with fn(e)
1708
+
1709
+ * getControl - fn
1710
+ * getInnerAppend - fn
1711
+ * getControlChild - fn
1712
+ * getShadowControl - fn
1713
+ * showPopup - fn
1714
+ */
1715
+ };
1716
+ }
1717
+ function jn(e) {
1718
+ const { props: t, emit: l, slots: n, attrs: o, proxy: u } = le(), { $q: a } = u;
1719
+ let r = null;
1720
+ e.hasValue === void 0 && (e.hasValue = d(() => sl(t.modelValue))), e.emitValue === void 0 && (e.emitValue = (_) => {
1721
+ l("update:modelValue", _);
1722
+ }), e.controlEvents === void 0 && (e.controlEvents = {
1723
+ onFocusin: W,
1724
+ onFocusout: G
1725
+ }), Object.assign(e, {
1726
+ clearValue: U,
1727
+ onControlFocusin: W,
1728
+ onControlFocusout: G,
1729
+ focus: M
1730
+ }), e.computedCounter === void 0 && (e.computedCounter = d(() => {
1731
+ if (t.counter !== !1) {
1732
+ const _ = typeof t.modelValue == "string" || typeof t.modelValue == "number" ? ("" + t.modelValue).length : Array.isArray(t.modelValue) === !0 ? t.modelValue.length : 0, F = t.maxlength !== void 0 ? t.maxlength : t.maxValues;
1733
+ return _ + (F !== void 0 ? " / " + F : "");
1734
+ }
1735
+ }));
1736
+ const {
1737
+ isDirtyModel: g,
1738
+ hasRules: b,
1739
+ hasError: s,
1740
+ errorMessage: y,
1741
+ resetValidation: v
1742
+ } = Oi(e.focused, e.innerLoading), c = e.floatingLabel !== void 0 ? d(() => t.stackLabel === !0 || e.focused.value === !0 || e.floatingLabel.value === !0) : d(() => t.stackLabel === !0 || e.focused.value === !0 || e.hasValue.value === !0), m = d(
1743
+ () => t.bottomSlots === !0 || t.hint !== void 0 || b.value === !0 || t.counter === !0 || t.error !== null
1744
+ ), x = d(() => t.filled === !0 ? "filled" : t.outlined === !0 ? "outlined" : t.borderless === !0 ? "borderless" : t.standout ? "standout" : "standard"), p = d(
1745
+ () => `q-field row no-wrap items-start q-field--${x.value}` + (e.fieldClass !== void 0 ? ` ${e.fieldClass.value}` : "") + (t.rounded === !0 ? " q-field--rounded" : "") + (t.square === !0 ? " q-field--square" : "") + (c.value === !0 ? " q-field--float" : "") + (B.value === !0 ? " q-field--labeled" : "") + (t.dense === !0 ? " q-field--dense" : "") + (t.itemAligned === !0 ? " q-field--item-aligned q-item-type" : "") + (e.isDark.value === !0 ? " q-field--dark" : "") + (e.getControl === void 0 ? " q-field--auto-height" : "") + (e.focused.value === !0 ? " q-field--focused" : "") + (s.value === !0 ? " q-field--error" : "") + (s.value === !0 || e.focused.value === !0 ? " q-field--highlighted" : "") + (t.hideBottomSpace !== !0 && m.value === !0 ? " q-field--with-bottom" : "") + (t.disable === !0 ? " q-field--disabled" : t.readonly === !0 ? " q-field--readonly" : "")
1746
+ ), O = d(
1747
+ () => "q-field__control relative-position row no-wrap" + (t.bgColor !== void 0 ? ` bg-${t.bgColor}` : "") + (s.value === !0 ? " text-negative" : typeof t.standout == "string" && t.standout.length !== 0 && e.focused.value === !0 ? ` ${t.standout}` : t.color !== void 0 ? ` text-${t.color}` : "")
1748
+ ), B = d(
1749
+ () => t.labelSlot === !0 || t.label !== void 0
1750
+ ), k = d(
1751
+ () => "q-field__label no-pointer-events absolute ellipsis" + (t.labelColor !== void 0 && s.value !== !0 ? ` text-${t.labelColor}` : "")
1752
+ ), L = d(() => ({
1753
+ id: e.targetUid.value,
1754
+ editable: e.editable.value,
1755
+ focused: e.focused.value,
1756
+ floatingLabel: c.value,
1757
+ modelValue: t.modelValue,
1758
+ emitValue: e.emitValue
1759
+ })), $ = d(() => {
1760
+ const _ = {};
1761
+ return e.targetUid.value && (_.for = e.targetUid.value), t.disable === !0 && (_["aria-disabled"] = "true"), _;
1762
+ });
1763
+ function V() {
1764
+ const _ = document.activeElement;
1765
+ let F = e.targetRef !== void 0 && e.targetRef.value;
1766
+ F && (_ === null || _.id !== e.targetUid.value) && (F.hasAttribute("tabindex") === !0 || (F = F.querySelector("[tabindex]")), F && F !== _ && F.focus({ preventScroll: !0 }));
1767
+ }
1768
+ function M() {
1769
+ ml(V);
1770
+ }
1771
+ function P() {
1772
+ Pi(V);
1773
+ const _ = document.activeElement;
1774
+ _ !== null && e.rootRef.value.contains(_) && _.blur();
1775
+ }
1776
+ function W(_) {
1777
+ r !== null && (clearTimeout(r), r = null), e.editable.value === !0 && e.focused.value === !1 && (e.focused.value = !0, l("focus", _));
1778
+ }
1779
+ function G(_, F) {
1780
+ r !== null && clearTimeout(r), r = setTimeout(() => {
1781
+ r = null, !(document.hasFocus() === !0 && (e.hasPopupOpen === !0 || e.controlRef === void 0 || e.controlRef.value === null || e.controlRef.value.contains(document.activeElement) !== !1)) && (e.focused.value === !0 && (e.focused.value = !1, l("blur", _)), F !== void 0 && F());
1782
+ });
1783
+ }
1784
+ function U(_) {
1785
+ te(_), a.platform.is.mobile !== !0 ? (e.targetRef !== void 0 && e.targetRef.value || e.rootRef.value).focus() : e.rootRef.value.contains(document.activeElement) === !0 && document.activeElement.blur(), t.type === "file" && (e.inputRef.value.value = null), l("update:modelValue", null), e.changeEvent === !0 && l("change", null), l("clear", t.modelValue), ce(() => {
1786
+ const F = g.value;
1787
+ v(), g.value = F;
1788
+ });
1789
+ }
1790
+ function R(_) {
1791
+ [13, 32].includes(_.keyCode) && U(_);
1792
+ }
1793
+ function K() {
1794
+ const _ = [];
1795
+ return n.prepend !== void 0 && _.push(
1796
+ h("div", {
1797
+ class: "q-field__prepend q-field__marginal row no-wrap items-center",
1798
+ key: "prepend",
1799
+ onClick: be
1800
+ }, n.prepend())
1801
+ ), _.push(
1802
+ h("div", {
1803
+ class: "q-field__control-container col relative-position row no-wrap q-anchor--skip"
1804
+ }, E())
1805
+ ), s.value === !0 && t.noErrorIcon === !1 && _.push(
1806
+ Y("error", [
1807
+ h(_e, { name: a.iconSet.field.error, color: "negative" })
1808
+ ])
1809
+ ), t.loading === !0 || e.innerLoading.value === !0 ? _.push(
1810
+ Y(
1811
+ "inner-loading-append",
1812
+ n.loading !== void 0 ? n.loading() : [h(xn, { color: t.color })]
1813
+ )
1814
+ ) : t.clearable === !0 && e.hasValue.value === !0 && e.editable.value === !0 && _.push(
1815
+ Y("inner-clearable-append", [
1816
+ h(_e, {
1817
+ class: "q-field__focusable-action",
1818
+ name: t.clearIcon || a.iconSet.field.clear,
1819
+ tabindex: 0,
1820
+ role: "button",
1821
+ "aria-hidden": "false",
1822
+ "aria-label": a.lang.label.clear,
1823
+ onKeyup: R,
1824
+ onClick: U
1825
+ })
1826
+ ])
1827
+ ), n.append !== void 0 && _.push(
1828
+ h("div", {
1829
+ class: "q-field__append q-field__marginal row no-wrap items-center",
1830
+ key: "append",
1831
+ onClick: be
1832
+ }, n.append())
1833
+ ), e.getInnerAppend !== void 0 && _.push(
1834
+ Y("inner-append", e.getInnerAppend())
1835
+ ), e.getControlChild !== void 0 && _.push(
1836
+ e.getControlChild()
1837
+ ), _;
1838
+ }
1839
+ function E() {
1840
+ const _ = [];
1841
+ return t.prefix !== void 0 && t.prefix !== null && _.push(
1842
+ h("div", {
1843
+ class: "q-field__prefix no-pointer-events row items-center"
1844
+ }, t.prefix)
1845
+ ), e.getShadowControl !== void 0 && e.hasShadow.value === !0 && _.push(
1846
+ e.getShadowControl()
1847
+ ), e.getControl !== void 0 ? _.push(e.getControl()) : n.rawControl !== void 0 ? _.push(n.rawControl()) : n.control !== void 0 && _.push(
1848
+ h("div", {
1849
+ ref: e.targetRef,
1850
+ class: "q-field__native row",
1851
+ tabindex: -1,
1852
+ ...e.splitAttrs.attributes.value,
1853
+ "data-autofocus": t.autofocus === !0 || void 0
1854
+ }, n.control(L.value))
1855
+ ), B.value === !0 && _.push(
1856
+ h("div", {
1857
+ class: k.value
1858
+ }, ke(n.label, t.label))
1859
+ ), t.suffix !== void 0 && t.suffix !== null && _.push(
1860
+ h("div", {
1861
+ class: "q-field__suffix no-pointer-events row items-center"
1862
+ }, t.suffix)
1863
+ ), _.concat(ke(n.default));
1864
+ }
1865
+ function j() {
1866
+ let _, F;
1867
+ s.value === !0 ? y.value !== null ? (_ = [h("div", { role: "alert" }, y.value)], F = `q--slot-error-${y.value}`) : (_ = ke(n.error), F = "q--slot-error") : (t.hideHint !== !0 || e.focused.value === !0) && (t.hint !== void 0 ? (_ = [h("div", t.hint)], F = `q--slot-hint-${t.hint}`) : (_ = ke(n.hint), F = "q--slot-hint"));
1868
+ const ge = t.counter === !0 || n.counter !== void 0;
1869
+ if (t.hideBottomSpace === !0 && ge === !1 && _ === void 0)
1870
+ return;
1871
+ const f = h("div", {
1872
+ key: F,
1873
+ class: "q-field__messages col"
1874
+ }, _);
1875
+ return h("div", {
1876
+ class: "q-field__bottom row items-start q-field__bottom--" + (t.hideBottomSpace !== !0 ? "animated" : "stale"),
1877
+ onClick: be
1878
+ }, [
1879
+ t.hideBottomSpace === !0 ? f : h(dt, { name: "q-transition--field-message" }, () => f),
1880
+ ge === !0 ? h("div", {
1881
+ class: "q-field__counter"
1882
+ }, n.counter !== void 0 ? n.counter() : e.computedCounter.value) : null
1883
+ ]);
1884
+ }
1885
+ function Y(_, F) {
1886
+ return F === null ? null : h("div", {
1887
+ key: _,
1888
+ class: "q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"
1889
+ }, F);
1890
+ }
1891
+ let me = !1;
1892
+ return Pt(() => {
1893
+ me = !0;
1894
+ }), bn(() => {
1895
+ me === !0 && t.autofocus === !0 && u.focus();
1896
+ }), t.autofocus === !0 && gt(() => {
1897
+ u.focus();
1898
+ }), fe(() => {
1899
+ r !== null && clearTimeout(r);
1900
+ }), Object.assign(u, { focus: M, blur: P }), function() {
1901
+ const F = e.getControl === void 0 && n.control === void 0 ? {
1902
+ ...e.splitAttrs.attributes.value,
1903
+ "data-autofocus": t.autofocus === !0 || void 0,
1904
+ ...$.value
1905
+ } : $.value;
1906
+ return h(e.tag.value, {
1907
+ ref: e.rootRef,
1908
+ class: [
1909
+ p.value,
1910
+ o.class
1911
+ ],
1912
+ style: o.style,
1913
+ ...F
1914
+ }, [
1915
+ n.before !== void 0 ? h("div", {
1916
+ class: "q-field__before q-field__marginal row no-wrap items-center",
1917
+ onClick: be
1918
+ }, n.before()) : null,
1919
+ h("div", {
1920
+ class: "q-field__inner relative-position col self-stretch"
1921
+ }, [
1922
+ h("div", {
1923
+ ref: e.controlRef,
1924
+ class: O.value,
1925
+ tabindex: -1,
1926
+ ...e.controlEvents
1927
+ }, K()),
1928
+ m.value === !0 ? j() : null
1929
+ ]),
1930
+ n.after !== void 0 ? h("div", {
1931
+ class: "q-field__after q-field__marginal row no-wrap items-center",
1932
+ onClick: be
1933
+ }, n.after()) : null
1934
+ ]);
1935
+ };
1936
+ }
1937
+ const Ii = ve({
1938
+ name: "QField",
1939
+ inheritAttrs: !1,
1940
+ props: {
1941
+ ...gl,
1942
+ tag: {
1943
+ type: String,
1944
+ default: "label"
1945
+ }
1946
+ },
1947
+ emits: Hn,
1948
+ setup() {
1949
+ return jn(
1950
+ Dn({ tagProp: !0 })
1951
+ );
1952
+ }
1953
+ }), Fi = {
1954
+ xs: 8,
1955
+ sm: 10,
1956
+ md: 14,
1957
+ lg: 20,
1958
+ xl: 24
1959
+ }, Hi = ve({
1960
+ name: "QChip",
1961
+ props: {
1962
+ ...ht,
1963
+ ...zt,
1964
+ dense: Boolean,
1965
+ icon: String,
1966
+ iconRight: String,
1967
+ iconRemove: String,
1968
+ iconSelected: String,
1969
+ label: [String, Number],
1970
+ color: String,
1971
+ textColor: String,
1972
+ modelValue: {
1973
+ type: Boolean,
1974
+ default: !0
1975
+ },
1976
+ selected: {
1977
+ type: Boolean,
1978
+ default: null
1979
+ },
1980
+ square: Boolean,
1981
+ outline: Boolean,
1982
+ clickable: Boolean,
1983
+ removable: Boolean,
1984
+ removeAriaLabel: String,
1985
+ tabindex: [String, Number],
1986
+ disable: Boolean,
1987
+ ripple: {
1988
+ type: [Boolean, Object],
1989
+ default: !0
1990
+ }
1991
+ },
1992
+ emits: ["update:modelValue", "update:selected", "remove", "click"],
1993
+ setup(e, { slots: t, emit: l }) {
1994
+ const { proxy: { $q: n } } = le(), o = pt(e, n), u = It(e, Fi), a = d(() => e.selected === !0 || e.icon !== void 0), r = d(() => e.selected === !0 ? e.iconSelected || n.iconSet.chip.selected : e.icon), g = d(() => e.iconRemove || n.iconSet.chip.remove), b = d(
1995
+ () => e.disable === !1 && (e.clickable === !0 || e.selected !== null)
1996
+ ), s = d(() => {
1997
+ const p = e.outline === !0 && e.color || e.textColor;
1998
+ return "q-chip row inline no-wrap items-center" + (e.outline === !1 && e.color !== void 0 ? ` bg-${e.color}` : "") + (p ? ` text-${p} q-chip--colored` : "") + (e.disable === !0 ? " disabled" : "") + (e.dense === !0 ? " q-chip--dense" : "") + (e.outline === !0 ? " q-chip--outline" : "") + (e.selected === !0 ? " q-chip--selected" : "") + (b.value === !0 ? " q-chip--clickable cursor-pointer non-selectable q-hoverable" : "") + (e.square === !0 ? " q-chip--square" : "") + (o.value === !0 ? " q-chip--dark q-dark" : "");
1999
+ }), y = d(() => {
2000
+ const p = e.disable === !0 ? { tabindex: -1, "aria-disabled": "true" } : { tabindex: e.tabindex || 0 }, O = {
2001
+ ...p,
2002
+ role: "button",
2003
+ "aria-hidden": "false",
2004
+ "aria-label": e.removeAriaLabel || n.lang.label.remove
2005
+ };
2006
+ return { chip: p, remove: O };
2007
+ });
2008
+ function v(p) {
2009
+ p.keyCode === 13 && c(p);
2010
+ }
2011
+ function c(p) {
2012
+ e.disable || (l("update:selected", !e.selected), l("click", p));
2013
+ }
2014
+ function m(p) {
2015
+ (p.keyCode === void 0 || p.keyCode === 13) && (te(p), e.disable === !1 && (l("update:modelValue", !1), l("remove")));
2016
+ }
2017
+ function x() {
2018
+ const p = [];
2019
+ b.value === !0 && p.push(
2020
+ h("div", { class: "q-focus-helper" })
2021
+ ), a.value === !0 && p.push(
2022
+ h(_e, {
2023
+ class: "q-chip__icon q-chip__icon--left",
2024
+ name: r.value
2025
+ })
2026
+ );
2027
+ const O = e.label !== void 0 ? [h("div", { class: "ellipsis" }, [e.label])] : void 0;
2028
+ return p.push(
2029
+ h("div", {
2030
+ class: "q-chip__content col row no-wrap items-center q-anchor--skip"
2031
+ }, To(t.default, O))
2032
+ ), e.iconRight && p.push(
2033
+ h(_e, {
2034
+ class: "q-chip__icon q-chip__icon--right",
2035
+ name: e.iconRight
2036
+ })
2037
+ ), e.removable === !0 && p.push(
2038
+ h(_e, {
2039
+ class: "q-chip__icon q-chip__icon--remove cursor-pointer",
2040
+ name: g.value,
2041
+ ...y.value.remove,
2042
+ onClick: m,
2043
+ onKeyup: m
2044
+ })
2045
+ ), p;
2046
+ }
2047
+ return () => {
2048
+ if (e.modelValue === !1) return;
2049
+ const p = {
2050
+ class: s.value,
2051
+ style: u.value
2052
+ };
2053
+ return b.value === !0 && Object.assign(
2054
+ p,
2055
+ y.value.chip,
2056
+ { onClick: c, onKeyup: v }
2057
+ ), $o(
2058
+ "div",
2059
+ p,
2060
+ x(),
2061
+ "ripple",
2062
+ e.ripple !== !1 && e.disable !== !0,
2063
+ () => [[Vn, e.ripple]]
2064
+ );
2065
+ };
2066
+ }
2067
+ });
2068
+ function Di() {
2069
+ if (window.getSelection !== void 0) {
2070
+ const e = window.getSelection();
2071
+ e.empty !== void 0 ? e.empty() : e.removeAllRanges !== void 0 && (e.removeAllRanges(), al.is.mobile !== !0 && e.addRange(document.createRange()));
2072
+ } else document.selection !== void 0 && document.selection.empty();
2073
+ }
2074
+ const ji = {
2075
+ /* SSR does not know about Element */
2076
+ target: {
2077
+ type: [Boolean, String, Element],
2078
+ default: !0
2079
+ },
2080
+ noParentEvent: Boolean
2081
+ }, Ni = {
2082
+ ...ji,
2083
+ contextMenu: Boolean
2084
+ };
2085
+ function Wi({
2086
+ showing: e,
2087
+ avoidEmit: t,
2088
+ // required for QPopupProxy (true)
2089
+ configureAnchorEl: l
2090
+ // optional
2091
+ }) {
2092
+ const { props: n, proxy: o, emit: u } = le(), a = A(null);
2093
+ let r = null;
2094
+ function g(c) {
2095
+ return a.value === null ? !1 : c === void 0 || c.touches === void 0 || c.touches.length <= 1;
2096
+ }
2097
+ const b = {};
2098
+ l === void 0 && (Object.assign(b, {
2099
+ hide(c) {
2100
+ o.hide(c);
2101
+ },
2102
+ toggle(c) {
2103
+ o.toggle(c), c.qAnchorHandled = !0;
2104
+ },
2105
+ toggleKey(c) {
2106
+ Fe(c, 13) === !0 && b.toggle(c);
2107
+ },
2108
+ contextClick(c) {
2109
+ o.hide(c), be(c), ce(() => {
2110
+ o.show(c), c.qAnchorHandled = !0;
2111
+ });
2112
+ },
2113
+ prevent: be,
2114
+ mobileTouch(c) {
2115
+ if (b.mobileCleanup(c), g(c) !== !0)
2116
+ return;
2117
+ o.hide(c), a.value.classList.add("non-selectable");
2118
+ const m = c.target;
2119
+ il(b, "anchor", [
2120
+ [m, "touchmove", "mobileCleanup", "passive"],
2121
+ [m, "touchend", "mobileCleanup", "passive"],
2122
+ [m, "touchcancel", "mobileCleanup", "passive"],
2123
+ [a.value, "contextmenu", "prevent", "notPassive"]
2124
+ ]), r = setTimeout(() => {
2125
+ r = null, o.show(c), c.qAnchorHandled = !0;
2126
+ }, 300);
2127
+ },
2128
+ mobileCleanup(c) {
2129
+ a.value.classList.remove("non-selectable"), r !== null && (clearTimeout(r), r = null), e.value === !0 && c !== void 0 && Di();
2130
+ }
2131
+ }), l = function(c = n.contextMenu) {
2132
+ if (n.noParentEvent === !0 || a.value === null) return;
2133
+ let m;
2134
+ c === !0 ? o.$q.platform.is.mobile === !0 ? m = [
2135
+ [a.value, "touchstart", "mobileTouch", "passive"]
2136
+ ] : m = [
2137
+ [a.value, "mousedown", "hide", "passive"],
2138
+ [a.value, "contextmenu", "contextClick", "notPassive"]
2139
+ ] : m = [
2140
+ [a.value, "click", "toggle", "passive"],
2141
+ [a.value, "keyup", "toggleKey", "passive"]
2142
+ ], il(b, "anchor", m);
2143
+ });
2144
+ function s() {
2145
+ _n(b, "anchor");
2146
+ }
2147
+ function y(c) {
2148
+ for (a.value = c; a.value.classList.contains("q-anchor--skip"); )
2149
+ a.value = a.value.parentNode;
2150
+ l();
2151
+ }
2152
+ function v() {
2153
+ if (n.target === !1 || n.target === "" || o.$el.parentNode === null)
2154
+ a.value = null;
2155
+ else if (n.target === !0)
2156
+ y(o.$el.parentNode);
2157
+ else {
2158
+ let c = n.target;
2159
+ if (typeof n.target == "string")
2160
+ try {
2161
+ c = document.querySelector(n.target);
2162
+ } catch {
2163
+ c = void 0;
2164
+ }
2165
+ c != null ? (a.value = c.$el || c, l()) : (a.value = null, console.error(`Anchor: target "${n.target}" not found`));
2166
+ }
2167
+ }
2168
+ return J(() => n.contextMenu, (c) => {
2169
+ a.value !== null && (s(), l(c));
2170
+ }), J(() => n.target, () => {
2171
+ a.value !== null && s(), v();
2172
+ }), J(() => n.noParentEvent, (c) => {
2173
+ a.value !== null && (c === !0 ? s() : l());
2174
+ }), gt(() => {
2175
+ v(), t !== !0 && n.modelValue === !0 && a.value === null && u("update:modelValue", !1);
2176
+ }), fe(() => {
2177
+ r !== null && clearTimeout(r), s();
2178
+ }), {
2179
+ anchorEl: a,
2180
+ canShow: g,
2181
+ anchorEvents: b
2182
+ };
2183
+ }
2184
+ function Ki(e, t) {
2185
+ const l = A(null);
2186
+ let n;
2187
+ function o(r, g) {
2188
+ const b = `${g !== void 0 ? "add" : "remove"}EventListener`, s = g !== void 0 ? g : n;
2189
+ r !== window && r[b]("scroll", s, ae.passive), window[b]("scroll", s, ae.passive), n = g;
2190
+ }
2191
+ function u() {
2192
+ l.value !== null && (o(l.value), l.value = null);
2193
+ }
2194
+ const a = J(() => e.noParentEvent, () => {
2195
+ l.value !== null && (u(), t());
2196
+ });
2197
+ return fe(a), {
2198
+ localScrollTarget: l,
2199
+ unconfigureScrollTarget: u,
2200
+ changeScrollEvent: o
2201
+ };
2202
+ }
2203
+ const Nn = {
2204
+ modelValue: {
2205
+ type: Boolean,
2206
+ default: null
2207
+ },
2208
+ "onUpdate:modelValue": [Function, Array]
2209
+ }, Wn = [
2210
+ "beforeShow",
2211
+ "show",
2212
+ "beforeHide",
2213
+ "hide"
2214
+ ];
2215
+ function Kn({
2216
+ showing: e,
2217
+ canShow: t,
2218
+ // optional
2219
+ hideOnRouteChange: l,
2220
+ // optional
2221
+ handleShow: n,
2222
+ // optional
2223
+ handleHide: o,
2224
+ // optional
2225
+ processOnMount: u
2226
+ // optional
2227
+ }) {
2228
+ const a = le(), { props: r, emit: g, proxy: b } = a;
2229
+ let s;
2230
+ function y(B) {
2231
+ e.value === !0 ? m(B) : v(B);
2232
+ }
2233
+ function v(B) {
2234
+ if (r.disable === !0 || B !== void 0 && B.qAnchorHandled === !0 || t !== void 0 && t(B) !== !0)
2235
+ return;
2236
+ const k = r["onUpdate:modelValue"] !== void 0;
2237
+ k === !0 && (g("update:modelValue", !0), s = B, ce(() => {
2238
+ s === B && (s = void 0);
2239
+ })), (r.modelValue === null || k === !1) && c(B);
2240
+ }
2241
+ function c(B) {
2242
+ e.value !== !0 && (e.value = !0, g("beforeShow", B), n !== void 0 ? n(B) : g("show", B));
2243
+ }
2244
+ function m(B) {
2245
+ if (r.disable === !0)
2246
+ return;
2247
+ const k = r["onUpdate:modelValue"] !== void 0;
2248
+ k === !0 && (g("update:modelValue", !1), s = B, ce(() => {
2249
+ s === B && (s = void 0);
2250
+ })), (r.modelValue === null || k === !1) && x(B);
2251
+ }
2252
+ function x(B) {
2253
+ e.value !== !1 && (e.value = !1, g("beforeHide", B), o !== void 0 ? o(B) : g("hide", B));
2254
+ }
2255
+ function p(B) {
2256
+ r.disable === !0 && B === !0 ? r["onUpdate:modelValue"] !== void 0 && g("update:modelValue", !1) : B === !0 !== e.value && (B === !0 ? c : x)(s);
2257
+ }
2258
+ J(() => r.modelValue, p), l !== void 0 && Tn(a) === !0 && J(() => b.$route.fullPath, () => {
2259
+ l.value === !0 && e.value === !0 && m();
2260
+ }), gt(() => {
2261
+ p(r.modelValue);
2262
+ });
2263
+ const O = { show: v, hide: m, toggle: y };
2264
+ return Object.assign(b, O), O;
2265
+ }
2266
+ const Ul = {};
2267
+ let Qi = 1, Ui = document.body;
2268
+ function Yi(e, t) {
2269
+ const l = document.createElement("div");
2270
+ if (l.id = t !== void 0 ? `q-portal--${t}--${Qi++}` : e, Ul.globalNodes !== void 0) {
2271
+ const n = Ul.globalNodes.class;
2272
+ n !== void 0 && (l.className = n);
2273
+ }
2274
+ return Ui.appendChild(l), l;
2275
+ }
2276
+ function Xi(e) {
2277
+ e.remove();
2278
+ }
2279
+ const ct = [];
2280
+ function Gi(e, t) {
2281
+ do {
2282
+ if (e.$options.name === "QMenu") {
2283
+ if (e.hide(t), e.$props.separateClosePopup === !0)
2284
+ return Qt(e);
2285
+ } else if (e.__qPortal === !0) {
2286
+ const l = Qt(e);
2287
+ return l !== void 0 && l.$options.name === "QPopupProxy" ? (e.hide(t), l) : e;
2288
+ }
2289
+ e = Qt(e);
2290
+ } while (e != null);
2291
+ }
2292
+ const Zi = ve({
2293
+ name: "QPortal",
2294
+ setup(e, { slots: t }) {
2295
+ return () => t.default();
2296
+ }
2297
+ });
2298
+ function Ji(e) {
2299
+ for (e = e.parent; e != null; ) {
2300
+ if (e.type.name === "QGlobalDialog")
2301
+ return !0;
2302
+ if (e.type.name === "QDialog" || e.type.name === "QMenu")
2303
+ return !1;
2304
+ e = e.parent;
2305
+ }
2306
+ return !1;
2307
+ }
2308
+ function Qn(e, t, l, n) {
2309
+ const o = A(!1), u = A(!1);
2310
+ let a = null;
2311
+ const r = {}, g = n === "dialog" && Ji(e);
2312
+ function b(y) {
2313
+ if (y === !0) {
2314
+ Ql(r), u.value = !0;
2315
+ return;
2316
+ }
2317
+ u.value = !1, o.value === !1 && (g === !1 && a === null && (a = Yi(!1, n)), o.value = !0, ct.push(e.proxy), Ai(r));
2318
+ }
2319
+ function s(y) {
2320
+ if (u.value = !1, y !== !0) return;
2321
+ Ql(r), o.value = !1;
2322
+ const v = ct.indexOf(e.proxy);
2323
+ v !== -1 && ct.splice(v, 1), a !== null && (Xi(a), a = null);
2324
+ }
2325
+ return xo(() => {
2326
+ s(!0);
2327
+ }), e.proxy.__qPortal = !0, dl(e.proxy, "contentEl", () => t.value), {
2328
+ showPortal: b,
2329
+ hidePortal: s,
2330
+ portalIsActive: o,
2331
+ portalIsAccessible: u,
2332
+ renderPortal: () => g === !0 ? l() : o.value === !0 ? [h(Co, { to: a }, h(Zi, l))] : void 0
2333
+ };
2334
+ }
2335
+ const Un = {
2336
+ transitionShow: {
2337
+ type: String,
2338
+ default: "fade"
2339
+ },
2340
+ transitionHide: {
2341
+ type: String,
2342
+ default: "fade"
2343
+ },
2344
+ transitionDuration: {
2345
+ type: [String, Number],
2346
+ default: 300
2347
+ }
2348
+ };
2349
+ function Yn(e, t = () => {
2350
+ }, l = () => {
2351
+ }) {
2352
+ return {
2353
+ transitionProps: d(() => {
2354
+ const n = `q-transition--${e.transitionShow || t()}`, o = `q-transition--${e.transitionHide || l()}`;
2355
+ return {
2356
+ appear: !0,
2357
+ enterFromClass: `${n}-enter-from`,
2358
+ enterActiveClass: `${n}-enter-active`,
2359
+ enterToClass: `${n}-enter-to`,
2360
+ leaveFromClass: `${o}-leave-from`,
2361
+ leaveActiveClass: `${o}-leave-active`,
2362
+ leaveToClass: `${o}-leave-to`
2363
+ };
2364
+ }),
2365
+ transitionStyle: d(() => `--q-transition-duration: ${e.transitionDuration}ms`)
2366
+ };
2367
+ }
2368
+ function Xn() {
2369
+ let e;
2370
+ const t = le();
2371
+ function l() {
2372
+ e = void 0;
2373
+ }
2374
+ return Pt(l), fe(l), {
2375
+ removeTick: l,
2376
+ registerTick(n) {
2377
+ e = n, ce(() => {
2378
+ e === n && ($n(t) === !1 && e(), e = void 0);
2379
+ });
2380
+ }
2381
+ };
2382
+ }
2383
+ function Gn() {
2384
+ let e = null;
2385
+ const t = le();
2386
+ function l() {
2387
+ e !== null && (clearTimeout(e), e = null);
2388
+ }
2389
+ return Pt(l), fe(l), {
2390
+ removeTimeout: l,
2391
+ registerTimeout(n, o) {
2392
+ l(), $n(t) === !1 && (e = setTimeout(() => {
2393
+ e = null, n();
2394
+ }, o));
2395
+ }
2396
+ };
2397
+ }
2398
+ const eu = [Element, String], tu = [null, document, document.body, document.scrollingElement, document.documentElement];
2399
+ function lu(e, t) {
2400
+ let l = Ho(t);
2401
+ if (l === void 0) {
2402
+ if (e == null)
2403
+ return window;
2404
+ l = e.closest(".scroll,.scroll-y,.overflow-auto");
2405
+ }
2406
+ return tu.includes(l) ? window : l;
2407
+ }
2408
+ function nu(e) {
2409
+ return e === window ? window.pageYOffset || window.scrollY || document.body.scrollTop || 0 : e.scrollTop;
2410
+ }
2411
+ function ou(e) {
2412
+ return e === window ? window.pageXOffset || window.scrollX || document.body.scrollLeft || 0 : e.scrollLeft;
2413
+ }
2414
+ let _t;
2415
+ function iu() {
2416
+ if (_t !== void 0)
2417
+ return _t;
2418
+ const e = document.createElement("p"), t = document.createElement("div");
2419
+ ol(e, {
2420
+ width: "100%",
2421
+ height: "200px"
2422
+ }), ol(t, {
2423
+ position: "absolute",
2424
+ top: "0px",
2425
+ left: "0px",
2426
+ visibility: "hidden",
2427
+ width: "200px",
2428
+ height: "150px",
2429
+ overflow: "hidden"
2430
+ }), t.appendChild(e), document.body.appendChild(t);
2431
+ const l = e.offsetWidth;
2432
+ t.style.overflow = "scroll";
2433
+ let n = e.offsetWidth;
2434
+ return l === n && (n = t.clientWidth), t.remove(), _t = l - n, _t;
2435
+ }
2436
+ function uu(e, t = !0) {
2437
+ return !e || e.nodeType !== Node.ELEMENT_NODE ? !1 : t ? e.scrollHeight > e.clientHeight && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-y"])) : e.scrollWidth > e.clientWidth && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-x"]));
2438
+ }
2439
+ const ze = [];
2440
+ let tt;
2441
+ function au(e) {
2442
+ tt = e.keyCode === 27;
2443
+ }
2444
+ function ru() {
2445
+ tt === !0 && (tt = !1);
2446
+ }
2447
+ function su(e) {
2448
+ tt === !0 && (tt = !1, Fe(e, 27) === !0 && ze[ze.length - 1](e));
2449
+ }
2450
+ function Zn(e) {
2451
+ window[e]("keydown", au), window[e]("blur", ru), window[e]("keyup", su), tt = !1;
2452
+ }
2453
+ function Jn(e) {
2454
+ de.is.desktop === !0 && (ze.push(e), ze.length === 1 && Zn("addEventListener"));
2455
+ }
2456
+ function Lt(e) {
2457
+ const t = ze.indexOf(e);
2458
+ t !== -1 && (ze.splice(t, 1), ze.length === 0 && Zn("removeEventListener"));
2459
+ }
2460
+ const { notPassiveCapture: Mt } = ae, Ie = [];
2461
+ function Ot(e) {
2462
+ const t = e.target;
2463
+ if (t === void 0 || t.nodeType === 8 || t.classList.contains("no-pointer-events") === !0)
2464
+ return;
2465
+ let l = ct.length - 1;
2466
+ for (; l >= 0; ) {
2467
+ const n = ct[l].$;
2468
+ if (n.type.name === "QTooltip") {
2469
+ l--;
2470
+ continue;
2471
+ }
2472
+ if (n.type.name !== "QDialog")
2473
+ break;
2474
+ if (n.props.seamless !== !0)
2475
+ return;
2476
+ l--;
2477
+ }
2478
+ for (let n = Ie.length - 1; n >= 0; n--) {
2479
+ const o = Ie[n];
2480
+ if ((o.anchorEl.value === null || o.anchorEl.value.contains(t) === !1) && (t === document.body || o.innerRef.value !== null && o.innerRef.value.contains(t) === !1))
2481
+ e.qClickOutside = !0, o.onClickOutside(e);
2482
+ else
2483
+ return;
2484
+ }
2485
+ }
2486
+ function cu(e) {
2487
+ Ie.push(e), Ie.length === 1 && (document.addEventListener("mousedown", Ot, Mt), document.addEventListener("touchstart", Ot, Mt));
2488
+ }
2489
+ function Yl(e) {
2490
+ const t = Ie.findIndex((l) => l === e);
2491
+ t !== -1 && (Ie.splice(t, 1), Ie.length === 0 && (document.removeEventListener("mousedown", Ot, Mt), document.removeEventListener("touchstart", Ot, Mt)));
2492
+ }
2493
+ let Xl, Gl;
2494
+ function Zl(e) {
2495
+ const t = e.split(" ");
2496
+ return t.length !== 2 ? !1 : ["top", "center", "bottom"].includes(t[0]) !== !0 ? (console.error("Anchor/Self position must start with one of top/center/bottom"), !1) : ["left", "middle", "right", "start", "end"].includes(t[1]) !== !0 ? (console.error("Anchor/Self position must end with one of left/middle/right/start/end"), !1) : !0;
2497
+ }
2498
+ function du(e) {
2499
+ return e ? !(e.length !== 2 || typeof e[0] != "number" || typeof e[1] != "number") : !0;
2500
+ }
2501
+ const cl = {
2502
+ "start#ltr": "left",
2503
+ "start#rtl": "right",
2504
+ "end#ltr": "right",
2505
+ "end#rtl": "left"
2506
+ };
2507
+ ["left", "middle", "right"].forEach((e) => {
2508
+ cl[`${e}#ltr`] = e, cl[`${e}#rtl`] = e;
2509
+ });
2510
+ function Jl(e, t) {
2511
+ const l = e.split(" ");
2512
+ return {
2513
+ vertical: l[0],
2514
+ horizontal: cl[`${l[1]}#${t === !0 ? "rtl" : "ltr"}`]
2515
+ };
2516
+ }
2517
+ function fu(e, t) {
2518
+ let { top: l, left: n, right: o, bottom: u, width: a, height: r } = e.getBoundingClientRect();
2519
+ return t !== void 0 && (l -= t[1], n -= t[0], u += t[1], o += t[0], a += t[0], r += t[1]), {
2520
+ top: l,
2521
+ bottom: u,
2522
+ height: r,
2523
+ left: n,
2524
+ right: o,
2525
+ width: a,
2526
+ middle: n + (o - n) / 2,
2527
+ center: l + (u - l) / 2
2528
+ };
2529
+ }
2530
+ function vu(e, t, l) {
2531
+ let { top: n, left: o } = e.getBoundingClientRect();
2532
+ return n += t.top, o += t.left, l !== void 0 && (n += l[1], o += l[0]), {
2533
+ top: n,
2534
+ bottom: n + 1,
2535
+ height: 1,
2536
+ left: o,
2537
+ right: o + 1,
2538
+ width: 1,
2539
+ middle: o,
2540
+ center: n
2541
+ };
2542
+ }
2543
+ function mu(e, t) {
2544
+ return {
2545
+ top: 0,
2546
+ center: t / 2,
2547
+ bottom: t,
2548
+ left: 0,
2549
+ middle: e / 2,
2550
+ right: e
2551
+ };
2552
+ }
2553
+ function en(e, t, l, n) {
2554
+ return {
2555
+ top: e[l.vertical] - t[n.vertical],
2556
+ left: e[l.horizontal] - t[n.horizontal]
2557
+ };
2558
+ }
2559
+ function eo(e, t = 0) {
2560
+ if (e.targetEl === null || e.anchorEl === null || t > 5)
2561
+ return;
2562
+ if (e.targetEl.offsetHeight === 0 || e.targetEl.offsetWidth === 0) {
2563
+ setTimeout(() => {
2564
+ eo(e, t + 1);
2565
+ }, 10);
2566
+ return;
2567
+ }
2568
+ const {
2569
+ targetEl: l,
2570
+ offset: n,
2571
+ anchorEl: o,
2572
+ anchorOrigin: u,
2573
+ selfOrigin: a,
2574
+ absoluteOffset: r,
2575
+ fit: g,
2576
+ cover: b,
2577
+ maxHeight: s,
2578
+ maxWidth: y
2579
+ } = e;
2580
+ if (de.is.ios === !0 && window.visualViewport !== void 0) {
2581
+ const V = document.body.style, { offsetLeft: M, offsetTop: P } = window.visualViewport;
2582
+ M !== Xl && (V.setProperty("--q-pe-left", M + "px"), Xl = M), P !== Gl && (V.setProperty("--q-pe-top", P + "px"), Gl = P);
2583
+ }
2584
+ const { scrollLeft: v, scrollTop: c } = l, m = r === void 0 ? fu(o, b === !0 ? [0, 0] : n) : vu(o, r, n);
2585
+ Object.assign(l.style, {
2586
+ top: 0,
2587
+ left: 0,
2588
+ minWidth: null,
2589
+ minHeight: null,
2590
+ maxWidth: y,
2591
+ maxHeight: s,
2592
+ visibility: "visible"
2593
+ });
2594
+ const { offsetWidth: x, offsetHeight: p } = l, { elWidth: O, elHeight: B } = g === !0 || b === !0 ? { elWidth: Math.max(m.width, x), elHeight: b === !0 ? Math.max(m.height, p) : p } : { elWidth: x, elHeight: p };
2595
+ let k = { maxWidth: y, maxHeight: s };
2596
+ (g === !0 || b === !0) && (k.minWidth = m.width + "px", b === !0 && (k.minHeight = m.height + "px")), Object.assign(l.style, k);
2597
+ const L = mu(O, B);
2598
+ let $ = en(m, L, u, a);
2599
+ if (r === void 0 || n === void 0)
2600
+ Gt($, m, L, u, a);
2601
+ else {
2602
+ const { top: V, left: M } = $;
2603
+ Gt($, m, L, u, a);
2604
+ let P = !1;
2605
+ if ($.top !== V) {
2606
+ P = !0;
2607
+ const W = 2 * n[1];
2608
+ m.center = m.top -= W, m.bottom -= W + 2;
2609
+ }
2610
+ if ($.left !== M) {
2611
+ P = !0;
2612
+ const W = 2 * n[0];
2613
+ m.middle = m.left -= W, m.right -= W + 2;
2614
+ }
2615
+ P === !0 && ($ = en(m, L, u, a), Gt($, m, L, u, a));
2616
+ }
2617
+ k = {
2618
+ top: $.top + "px",
2619
+ left: $.left + "px"
2620
+ }, $.maxHeight !== void 0 && (k.maxHeight = $.maxHeight + "px", m.height > $.maxHeight && (k.minHeight = k.maxHeight)), $.maxWidth !== void 0 && (k.maxWidth = $.maxWidth + "px", m.width > $.maxWidth && (k.minWidth = k.maxWidth)), Object.assign(l.style, k), l.scrollTop !== c && (l.scrollTop = c), l.scrollLeft !== v && (l.scrollLeft = v);
2621
+ }
2622
+ function Gt(e, t, l, n, o) {
2623
+ const u = l.bottom, a = l.right, r = iu(), g = window.innerHeight - r, b = document.body.clientWidth;
2624
+ if (e.top < 0 || e.top + u > g)
2625
+ if (o.vertical === "center")
2626
+ e.top = t[n.vertical] > g / 2 ? Math.max(0, g - u) : 0, e.maxHeight = Math.min(u, g);
2627
+ else if (t[n.vertical] > g / 2) {
2628
+ const s = Math.min(
2629
+ g,
2630
+ n.vertical === "center" ? t.center : n.vertical === o.vertical ? t.bottom : t.top
2631
+ );
2632
+ e.maxHeight = Math.min(u, s), e.top = Math.max(0, s - u);
2633
+ } else
2634
+ e.top = Math.max(
2635
+ 0,
2636
+ n.vertical === "center" ? t.center : n.vertical === o.vertical ? t.top : t.bottom
2637
+ ), e.maxHeight = Math.min(u, g - e.top);
2638
+ if (e.left < 0 || e.left + a > b)
2639
+ if (e.maxWidth = Math.min(a, b), o.horizontal === "middle")
2640
+ e.left = t[n.horizontal] > b / 2 ? Math.max(0, b - a) : 0;
2641
+ else if (t[n.horizontal] > b / 2) {
2642
+ const s = Math.min(
2643
+ b,
2644
+ n.horizontal === "middle" ? t.middle : n.horizontal === o.horizontal ? t.right : t.left
2645
+ );
2646
+ e.maxWidth = Math.min(a, s), e.left = Math.max(0, s - e.maxWidth);
2647
+ } else
2648
+ e.left = Math.max(
2649
+ 0,
2650
+ n.horizontal === "middle" ? t.middle : n.horizontal === o.horizontal ? t.left : t.right
2651
+ ), e.maxWidth = Math.min(a, b - e.left);
2652
+ }
2653
+ const gu = ve({
2654
+ name: "QMenu",
2655
+ inheritAttrs: !1,
2656
+ props: {
2657
+ ...Ni,
2658
+ ...Nn,
2659
+ ...ht,
2660
+ ...Un,
2661
+ persistent: Boolean,
2662
+ autoClose: Boolean,
2663
+ separateClosePopup: Boolean,
2664
+ noRouteDismiss: Boolean,
2665
+ noRefocus: Boolean,
2666
+ noFocus: Boolean,
2667
+ fit: Boolean,
2668
+ cover: Boolean,
2669
+ square: Boolean,
2670
+ anchor: {
2671
+ type: String,
2672
+ validator: Zl
2673
+ },
2674
+ self: {
2675
+ type: String,
2676
+ validator: Zl
2677
+ },
2678
+ offset: {
2679
+ type: Array,
2680
+ validator: du
2681
+ },
2682
+ scrollTarget: eu,
2683
+ touchPosition: Boolean,
2684
+ maxHeight: {
2685
+ type: String,
2686
+ default: null
2687
+ },
2688
+ maxWidth: {
2689
+ type: String,
2690
+ default: null
2691
+ }
2692
+ },
2693
+ emits: [
2694
+ ...Wn,
2695
+ "click",
2696
+ "escapeKey"
2697
+ ],
2698
+ setup(e, { slots: t, emit: l, attrs: n }) {
2699
+ let o = null, u, a, r;
2700
+ const g = le(), { proxy: b } = g, { $q: s } = b, y = A(null), v = A(!1), c = d(
2701
+ () => e.persistent !== !0 && e.noRouteDismiss !== !0
2702
+ ), m = pt(e, s), { registerTick: x, removeTick: p } = Xn(), { registerTimeout: O } = Gn(), { transitionProps: B, transitionStyle: k } = Yn(e), { localScrollTarget: L, changeScrollEvent: $, unconfigureScrollTarget: V } = Ki(e, H), { anchorEl: M, canShow: P } = Wi({ showing: v }), { hide: W } = Kn({
2703
+ showing: v,
2704
+ canShow: P,
2705
+ handleShow: ge,
2706
+ handleHide: f,
2707
+ hideOnRouteChange: c,
2708
+ processOnMount: !0
2709
+ }), { showPortal: G, hidePortal: U, renderPortal: R } = Qn(g, y, Z, "menu"), K = {
2710
+ anchorEl: M,
2711
+ innerRef: y,
2712
+ onClickOutside(S) {
2713
+ if (e.persistent !== !0 && v.value === !0)
2714
+ return W(S), // always prevent touch event
2715
+ (S.type === "touchstart" || S.target.classList.contains("q-dialog__backdrop")) && te(S), !0;
2716
+ }
2717
+ }, E = d(
2718
+ () => Jl(
2719
+ e.anchor || (e.cover === !0 ? "center middle" : "bottom start"),
2720
+ s.lang.rtl
2721
+ )
2722
+ ), j = d(() => e.cover === !0 ? E.value : Jl(e.self || "top start", s.lang.rtl)), Y = d(
2723
+ () => (e.square === !0 ? " q-menu--square" : "") + (m.value === !0 ? " q-menu--dark q-dark" : "")
2724
+ ), me = d(() => e.autoClose === !0 ? { onClick: T } : {}), _ = d(
2725
+ () => v.value === !0 && e.persistent !== !0
2726
+ );
2727
+ J(_, (S) => {
2728
+ S === !0 ? (Jn(I), cu(K)) : (Lt(I), Yl(K));
2729
+ });
2730
+ function F() {
2731
+ ml(() => {
2732
+ let S = y.value;
2733
+ S && S.contains(document.activeElement) !== !0 && (S = S.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || S.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || S.querySelector("[autofocus], [data-autofocus]") || S, S.focus({ preventScroll: !0 }));
2734
+ });
2735
+ }
2736
+ function ge(S) {
2737
+ if (o = e.noRefocus === !1 ? document.activeElement : null, vl(D), G(), H(), u = void 0, S !== void 0 && (e.touchPosition || e.contextMenu)) {
2738
+ const ne = qn(S);
2739
+ if (ne.left !== void 0) {
2740
+ const { top: ye, left: He } = M.value.getBoundingClientRect();
2741
+ u = { left: ne.left - He, top: ne.top - ye };
2742
+ }
2743
+ }
2744
+ a === void 0 && (a = J(
2745
+ () => s.screen.width + "|" + s.screen.height + "|" + e.self + "|" + e.anchor + "|" + s.lang.rtl,
2746
+ z
2747
+ )), e.noFocus !== !0 && document.activeElement.blur(), x(() => {
2748
+ z(), e.noFocus !== !0 && F();
2749
+ }), O(() => {
2750
+ s.platform.is.ios === !0 && (r = e.autoClose, y.value.click()), z(), G(!0), l("show", S);
2751
+ }, e.transitionDuration);
2752
+ }
2753
+ function f(S) {
2754
+ p(), U(), w(!0), o !== null && // menu was hidden from code or ESC plugin
2755
+ (S === void 0 || S.qClickOutside !== !0) && (((S && S.type.indexOf("key") === 0 ? o.closest('[tabindex]:not([tabindex^="-"])') : void 0) || o).focus(), o = null), O(() => {
2756
+ U(!0), l("hide", S);
2757
+ }, e.transitionDuration);
2758
+ }
2759
+ function w(S) {
2760
+ u = void 0, a !== void 0 && (a(), a = void 0), (S === !0 || v.value === !0) && (Rt(D), V(), Yl(K), Lt(I)), S !== !0 && (o = null);
2761
+ }
2762
+ function H() {
2763
+ (M.value !== null || e.scrollTarget !== void 0) && (L.value = lu(M.value, e.scrollTarget), $(L.value, z));
2764
+ }
2765
+ function T(S) {
2766
+ r !== !0 ? (Gi(b, S), l("click", S)) : r = !1;
2767
+ }
2768
+ function D(S) {
2769
+ _.value === !0 && e.noFocus !== !0 && Cn(y.value, S.target) !== !0 && F();
2770
+ }
2771
+ function I(S) {
2772
+ l("escapeKey"), W(S);
2773
+ }
2774
+ function z() {
2775
+ eo({
2776
+ targetEl: y.value,
2777
+ offset: e.offset,
2778
+ anchorEl: M.value,
2779
+ anchorOrigin: E.value,
2780
+ selfOrigin: j.value,
2781
+ absoluteOffset: u,
2782
+ fit: e.fit,
2783
+ cover: e.cover,
2784
+ maxHeight: e.maxHeight,
2785
+ maxWidth: e.maxWidth
2786
+ });
2787
+ }
2788
+ function Z() {
2789
+ return h(
2790
+ dt,
2791
+ B.value,
2792
+ () => v.value === !0 ? h("div", {
2793
+ role: "menu",
2794
+ ...n,
2795
+ ref: y,
2796
+ tabindex: -1,
2797
+ class: [
2798
+ "q-menu q-position-engine scroll" + Y.value,
2799
+ n.class
2800
+ ],
2801
+ style: [
2802
+ n.style,
2803
+ k.value
2804
+ ],
2805
+ ...me.value
2806
+ }, ke(t.default)) : null
2807
+ );
2808
+ }
2809
+ return fe(w), Object.assign(b, { focus: F, updatePosition: z }), R;
2810
+ }
2811
+ });
2812
+ function hu(e, t, l) {
2813
+ function n() {
2814
+ }
2815
+ return fe(() => {
2816
+ e.value === !0 && void 0;
2817
+ }), {
2818
+ removeFromHistory: n,
2819
+ addToHistory() {
2820
+ }
2821
+ };
2822
+ }
2823
+ let ut = 0, Zt, Jt, st, el = !1, tn, ln, nn, Me = null;
2824
+ function pu(e) {
2825
+ bu(e) && te(e);
2826
+ }
2827
+ function bu(e) {
2828
+ if (e.target === document.body || e.target.classList.contains("q-layout__backdrop"))
2829
+ return !0;
2830
+ const t = jo(e), l = e.shiftKey && !e.deltaX, n = !l && Math.abs(e.deltaX) <= Math.abs(e.deltaY), o = l || n ? e.deltaY : e.deltaX;
2831
+ for (let u = 0; u < t.length; u++) {
2832
+ const a = t[u];
2833
+ if (uu(a, n))
2834
+ return n ? o < 0 && a.scrollTop === 0 ? !0 : o > 0 && a.scrollTop + a.clientHeight === a.scrollHeight : o < 0 && a.scrollLeft === 0 ? !0 : o > 0 && a.scrollLeft + a.clientWidth === a.scrollWidth;
2835
+ }
2836
+ return !0;
2837
+ }
2838
+ function on(e) {
2839
+ e.target === document && (document.scrollingElement.scrollTop = document.scrollingElement.scrollTop);
2840
+ }
2841
+ function Et(e) {
2842
+ el !== !0 && (el = !0, requestAnimationFrame(() => {
2843
+ el = !1;
2844
+ const { height: t } = e.target, { clientHeight: l, scrollTop: n } = document.scrollingElement;
2845
+ (st === void 0 || t !== window.innerHeight) && (st = l - t, document.scrollingElement.scrollTop = n), n > st && (document.scrollingElement.scrollTop -= Math.ceil((n - st) / 8));
2846
+ }));
2847
+ }
2848
+ function un(e) {
2849
+ const t = document.body, l = window.visualViewport !== void 0;
2850
+ if (e === "add") {
2851
+ const { overflowY: n, overflowX: o } = window.getComputedStyle(t);
2852
+ Zt = ou(window), Jt = nu(window), tn = t.style.left, ln = t.style.top, nn = window.location.href, t.style.left = `-${Zt}px`, t.style.top = `-${Jt}px`, o !== "hidden" && (o === "scroll" || t.scrollWidth > window.innerWidth) && t.classList.add("q-body--force-scrollbar-x"), n !== "hidden" && (n === "scroll" || t.scrollHeight > window.innerHeight) && t.classList.add("q-body--force-scrollbar-y"), t.classList.add("q-body--prevent-scroll"), document.qScrollPrevented = !0, de.is.ios === !0 && (l === !0 ? (window.scrollTo(0, 0), window.visualViewport.addEventListener("resize", Et, ae.passiveCapture), window.visualViewport.addEventListener("scroll", Et, ae.passiveCapture), window.scrollTo(0, 0)) : window.addEventListener("scroll", on, ae.passiveCapture));
2853
+ }
2854
+ de.is.desktop === !0 && de.is.mac === !0 && window[`${e}EventListener`]("wheel", pu, ae.notPassive), e === "remove" && (de.is.ios === !0 && (l === !0 ? (window.visualViewport.removeEventListener("resize", Et, ae.passiveCapture), window.visualViewport.removeEventListener("scroll", Et, ae.passiveCapture)) : window.removeEventListener("scroll", on, ae.passiveCapture)), t.classList.remove("q-body--prevent-scroll"), t.classList.remove("q-body--force-scrollbar-x"), t.classList.remove("q-body--force-scrollbar-y"), document.qScrollPrevented = !1, t.style.left = tn, t.style.top = ln, window.location.href === nn && window.scrollTo(Zt, Jt), st = void 0);
2855
+ }
2856
+ function yu(e) {
2857
+ let t = "add";
2858
+ if (e === !0) {
2859
+ if (ut++, Me !== null) {
2860
+ clearTimeout(Me), Me = null;
2861
+ return;
2862
+ }
2863
+ if (ut > 1)
2864
+ return;
2865
+ } else {
2866
+ if (ut === 0 || (ut--, ut > 0))
2867
+ return;
2868
+ if (t = "remove", de.is.ios === !0 && de.is.nativeMobile === !0) {
2869
+ Me !== null && clearTimeout(Me), Me = setTimeout(() => {
2870
+ un(t), Me = null;
2871
+ }, 100);
2872
+ return;
2873
+ }
2874
+ }
2875
+ un(t);
2876
+ }
2877
+ function wu() {
2878
+ let e;
2879
+ return {
2880
+ preventBodyScroll(t) {
2881
+ t !== e && (e !== void 0 || t === !0) && (e = t, yu(t));
2882
+ }
2883
+ };
2884
+ }
2885
+ let Vt = 0;
2886
+ const Su = {
2887
+ standard: "fixed-full flex-center",
2888
+ top: "fixed-top justify-center",
2889
+ bottom: "fixed-bottom justify-center",
2890
+ right: "fixed-right items-center",
2891
+ left: "fixed-left items-center"
2892
+ }, an = {
2893
+ standard: ["scale", "scale"],
2894
+ top: ["slide-down", "slide-up"],
2895
+ bottom: ["slide-up", "slide-down"],
2896
+ right: ["slide-left", "slide-right"],
2897
+ left: ["slide-right", "slide-left"]
2898
+ }, ku = ve({
2899
+ name: "QDialog",
2900
+ inheritAttrs: !1,
2901
+ props: {
2902
+ ...Nn,
2903
+ ...Un,
2904
+ transitionShow: String,
2905
+ // override useTransitionProps
2906
+ transitionHide: String,
2907
+ // override useTransitionProps
2908
+ persistent: Boolean,
2909
+ autoClose: Boolean,
2910
+ allowFocusOutside: Boolean,
2911
+ noEscDismiss: Boolean,
2912
+ noBackdropDismiss: Boolean,
2913
+ noRouteDismiss: Boolean,
2914
+ noRefocus: Boolean,
2915
+ noFocus: Boolean,
2916
+ noShake: Boolean,
2917
+ seamless: Boolean,
2918
+ maximized: Boolean,
2919
+ fullWidth: Boolean,
2920
+ fullHeight: Boolean,
2921
+ square: Boolean,
2922
+ backdropFilter: String,
2923
+ position: {
2924
+ type: String,
2925
+ default: "standard",
2926
+ validator: (e) => ["standard", "top", "bottom", "left", "right"].includes(e)
2927
+ }
2928
+ },
2929
+ emits: [
2930
+ ...Wn,
2931
+ "shake",
2932
+ "click",
2933
+ "escapeKey"
2934
+ ],
2935
+ setup(e, { slots: t, emit: l, attrs: n }) {
2936
+ const o = le(), u = A(null), a = A(!1), r = A(!1);
2937
+ let g = null, b = null, s, y;
2938
+ const v = d(
2939
+ () => e.persistent !== !0 && e.noRouteDismiss !== !0 && e.seamless !== !0
2940
+ ), { preventBodyScroll: c } = wu(), { registerTimeout: m } = Gn(), { registerTick: x, removeTick: p } = Xn(), { transitionProps: O, transitionStyle: B } = Yn(
2941
+ e,
2942
+ () => an[e.position][0],
2943
+ () => an[e.position][1]
2944
+ ), k = d(() => B.value + (e.backdropFilter !== void 0 ? `;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}` : "")), { showPortal: L, hidePortal: $, portalIsAccessible: V, renderPortal: M } = Qn(
2945
+ o,
2946
+ u,
2947
+ H,
2948
+ "dialog"
2949
+ ), { hide: P } = Kn({
2950
+ showing: a,
2951
+ hideOnRouteChange: v,
2952
+ handleShow: K,
2953
+ handleHide: E,
2954
+ processOnMount: !0
2955
+ });
2956
+ hu(a);
2957
+ const W = d(
2958
+ () => `q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized === !0 ? "maximized" : "minimized"} q-dialog__inner--${e.position} ${Su[e.position]}` + (r.value === !0 ? " q-dialog__inner--animating" : "") + (e.fullWidth === !0 ? " q-dialog__inner--fullwidth" : "") + (e.fullHeight === !0 ? " q-dialog__inner--fullheight" : "") + (e.square === !0 ? " q-dialog__inner--square" : "")
2959
+ ), G = d(() => a.value === !0 && e.seamless !== !0), U = d(() => e.autoClose === !0 ? { onClick: ge } : {}), R = d(() => [
2960
+ `q-dialog fullscreen no-pointer-events q-dialog--${G.value === !0 ? "modal" : "seamless"}`,
2961
+ n.class
2962
+ ]);
2963
+ J(() => e.maximized, (T) => {
2964
+ a.value === !0 && F(T);
2965
+ }), J(G, (T) => {
2966
+ c(T), T === !0 ? (vl(w), Jn(me)) : (Rt(w), Lt(me));
2967
+ });
2968
+ function K(T) {
2969
+ b = e.noRefocus === !1 && document.activeElement !== null ? document.activeElement : null, F(e.maximized), L(), r.value = !0, e.noFocus !== !0 ? (document.activeElement !== null && document.activeElement.blur(), x(j)) : p(), m(() => {
2970
+ if (o.proxy.$q.platform.is.ios === !0) {
2971
+ if (e.seamless !== !0 && document.activeElement) {
2972
+ const { top: D, bottom: I } = document.activeElement.getBoundingClientRect(), { innerHeight: z } = window, Z = window.visualViewport !== void 0 ? window.visualViewport.height : z;
2973
+ D > 0 && I > Z / 2 && (document.scrollingElement.scrollTop = Math.min(
2974
+ document.scrollingElement.scrollHeight - Z,
2975
+ I >= z ? 1 / 0 : Math.ceil(document.scrollingElement.scrollTop + I - Z / 2)
2976
+ )), document.activeElement.scrollIntoView();
2977
+ }
2978
+ y = !0, u.value.click(), y = !1;
2979
+ }
2980
+ L(!0), r.value = !1, l("show", T);
2981
+ }, e.transitionDuration);
2982
+ }
2983
+ function E(T) {
2984
+ p(), _(!0), r.value = !0, $(), b !== null && (((T && T.type.indexOf("key") === 0 ? b.closest('[tabindex]:not([tabindex^="-"])') : void 0) || b).focus(), b = null), m(() => {
2985
+ $(!0), r.value = !1, l("hide", T);
2986
+ }, e.transitionDuration);
2987
+ }
2988
+ function j(T) {
2989
+ ml(() => {
2990
+ let D = u.value;
2991
+ if (D !== null) {
2992
+ if (T !== void 0) {
2993
+ const I = D.querySelector(T);
2994
+ if (I !== null) {
2995
+ I.focus({ preventScroll: !0 });
2996
+ return;
2997
+ }
2998
+ }
2999
+ D.contains(document.activeElement) !== !0 && (D = D.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || D.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || D.querySelector("[autofocus], [data-autofocus]") || D, D.focus({ preventScroll: !0 }));
3000
+ }
3001
+ });
3002
+ }
3003
+ function Y(T) {
3004
+ T && typeof T.focus == "function" ? T.focus({ preventScroll: !0 }) : j(), l("shake");
3005
+ const D = u.value;
3006
+ D !== null && (D.classList.remove("q-animate--scale"), D.classList.add("q-animate--scale"), g !== null && clearTimeout(g), g = setTimeout(() => {
3007
+ g = null, u.value !== null && (D.classList.remove("q-animate--scale"), j());
3008
+ }, 170));
3009
+ }
3010
+ function me() {
3011
+ e.seamless !== !0 && (e.persistent === !0 || e.noEscDismiss === !0 ? e.maximized !== !0 && e.noShake !== !0 && Y() : (l("escapeKey"), P()));
3012
+ }
3013
+ function _(T) {
3014
+ g !== null && (clearTimeout(g), g = null), (T === !0 || a.value === !0) && (F(!1), e.seamless !== !0 && (c(!1), Rt(w), Lt(me))), T !== !0 && (b = null);
3015
+ }
3016
+ function F(T) {
3017
+ T === !0 ? s !== !0 && (Vt < 1 && document.body.classList.add("q-body--dialog"), Vt++, s = !0) : s === !0 && (Vt < 2 && document.body.classList.remove("q-body--dialog"), Vt--, s = !1);
3018
+ }
3019
+ function ge(T) {
3020
+ y !== !0 && (P(T), l("click", T));
3021
+ }
3022
+ function f(T) {
3023
+ e.persistent !== !0 && e.noBackdropDismiss !== !0 ? P(T) : e.noShake !== !0 && Y();
3024
+ }
3025
+ function w(T) {
3026
+ e.allowFocusOutside !== !0 && V.value === !0 && Cn(u.value, T.target) !== !0 && j('[tabindex]:not([tabindex="-1"])');
3027
+ }
3028
+ Object.assign(o.proxy, {
3029
+ // expose public methods
3030
+ focus: j,
3031
+ shake: Y,
3032
+ // private but needed by QSelect
3033
+ __updateRefocusTarget(T) {
3034
+ b = T || null;
3035
+ }
3036
+ }), fe(_);
3037
+ function H() {
3038
+ return h("div", {
3039
+ role: "dialog",
3040
+ "aria-modal": G.value === !0 ? "true" : "false",
3041
+ ...n,
3042
+ class: R.value
3043
+ }, [
3044
+ h(dt, {
3045
+ name: "q-transition--fade",
3046
+ appear: !0
3047
+ }, () => G.value === !0 ? h("div", {
3048
+ class: "q-dialog__backdrop fixed-full",
3049
+ style: k.value,
3050
+ "aria-hidden": "true",
3051
+ tabindex: -1,
3052
+ onClick: f
3053
+ }) : null),
3054
+ h(
3055
+ dt,
3056
+ O.value,
3057
+ () => a.value === !0 ? h("div", {
3058
+ ref: u,
3059
+ class: W.value,
3060
+ style: B.value,
3061
+ tabindex: -1,
3062
+ ...U.value
3063
+ }, ke(t.default)) : null
3064
+ )
3065
+ ]);
3066
+ }
3067
+ return M;
3068
+ }
3069
+ });
3070
+ let At = !1;
3071
+ {
3072
+ const e = document.createElement("div");
3073
+ e.setAttribute("dir", "rtl"), Object.assign(e.style, {
3074
+ width: "1px",
3075
+ height: "1px",
3076
+ overflow: "auto"
3077
+ });
3078
+ const t = document.createElement("div");
3079
+ Object.assign(t.style, {
3080
+ width: "1000px",
3081
+ height: "1px"
3082
+ }), document.body.appendChild(e), e.appendChild(t), e.scrollLeft = -1e3, At = e.scrollLeft >= 0, e.remove();
3083
+ }
3084
+ const pe = 1e3, xu = [
3085
+ "start",
3086
+ "center",
3087
+ "end",
3088
+ "start-force",
3089
+ "center-force",
3090
+ "end-force"
3091
+ ], to = Array.prototype.filter, Cu = window.getComputedStyle(document.body).overflowAnchor === void 0 ? Do : function(e, t) {
3092
+ e !== null && (e._qOverflowAnimationFrame !== void 0 && cancelAnimationFrame(e._qOverflowAnimationFrame), e._qOverflowAnimationFrame = requestAnimationFrame(() => {
3093
+ if (e === null)
3094
+ return;
3095
+ e._qOverflowAnimationFrame = void 0;
3096
+ const l = e.children || [];
3097
+ to.call(l, (o) => o.dataset && o.dataset.qVsAnchor !== void 0).forEach((o) => {
3098
+ delete o.dataset.qVsAnchor;
3099
+ });
3100
+ const n = l[t];
3101
+ n && n.dataset && (n.dataset.qVsAnchor = "");
3102
+ }));
3103
+ };
3104
+ function et(e, t) {
3105
+ return e + t;
3106
+ }
3107
+ function tl(e, t, l, n, o, u, a, r) {
3108
+ const g = e === window ? document.scrollingElement || document.documentElement : e, b = o === !0 ? "offsetWidth" : "offsetHeight", s = {
3109
+ scrollStart: 0,
3110
+ scrollViewSize: -a - r,
3111
+ scrollMaxSize: 0,
3112
+ offsetStart: -a,
3113
+ offsetEnd: -r
3114
+ };
3115
+ if (o === !0 ? (e === window ? (s.scrollStart = window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, s.scrollViewSize += document.documentElement.clientWidth) : (s.scrollStart = g.scrollLeft, s.scrollViewSize += g.clientWidth), s.scrollMaxSize = g.scrollWidth, u === !0 && (s.scrollStart = (At === !0 ? s.scrollMaxSize - s.scrollViewSize : 0) - s.scrollStart)) : (e === window ? (s.scrollStart = window.pageYOffset || window.scrollY || document.body.scrollTop || 0, s.scrollViewSize += document.documentElement.clientHeight) : (s.scrollStart = g.scrollTop, s.scrollViewSize += g.clientHeight), s.scrollMaxSize = g.scrollHeight), l !== null)
3116
+ for (let y = l.previousElementSibling; y !== null; y = y.previousElementSibling)
3117
+ y.classList.contains("q-virtual-scroll--skip") === !1 && (s.offsetStart += y[b]);
3118
+ if (n !== null)
3119
+ for (let y = n.nextElementSibling; y !== null; y = y.nextElementSibling)
3120
+ y.classList.contains("q-virtual-scroll--skip") === !1 && (s.offsetEnd += y[b]);
3121
+ if (t !== e) {
3122
+ const y = g.getBoundingClientRect(), v = t.getBoundingClientRect();
3123
+ o === !0 ? (s.offsetStart += v.left - y.left, s.offsetEnd -= v.width) : (s.offsetStart += v.top - y.top, s.offsetEnd -= v.height), e !== window && (s.offsetStart += s.scrollStart), s.offsetEnd += s.scrollMaxSize - s.offsetStart;
3124
+ }
3125
+ return s;
3126
+ }
3127
+ function rn(e, t, l, n) {
3128
+ t === "end" && (t = (e === window ? document.body : e)[l === !0 ? "scrollWidth" : "scrollHeight"]), e === window ? l === !0 ? (n === !0 && (t = (At === !0 ? document.body.scrollWidth - document.documentElement.clientWidth : 0) - t), window.scrollTo(t, window.pageYOffset || window.scrollY || document.body.scrollTop || 0)) : window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, t) : l === !0 ? (n === !0 && (t = (At === !0 ? e.scrollWidth - e.offsetWidth : 0) - t), e.scrollLeft = t) : e.scrollTop = t;
3129
+ }
3130
+ function at(e, t, l, n) {
3131
+ if (l >= n)
3132
+ return 0;
3133
+ const o = t.length, u = Math.floor(l / pe), a = Math.floor((n - 1) / pe) + 1;
3134
+ let r = e.slice(u, a).reduce(et, 0);
3135
+ return l % pe !== 0 && (r -= t.slice(u * pe, l).reduce(et, 0)), n % pe !== 0 && n !== o && (r -= t.slice(n, a * pe).reduce(et, 0)), r;
3136
+ }
3137
+ const qu = {
3138
+ virtualScrollSliceSize: {
3139
+ type: [Number, String],
3140
+ default: 10
3141
+ },
3142
+ virtualScrollSliceRatioBefore: {
3143
+ type: [Number, String],
3144
+ default: 1
3145
+ },
3146
+ virtualScrollSliceRatioAfter: {
3147
+ type: [Number, String],
3148
+ default: 1
3149
+ },
3150
+ virtualScrollItemSize: {
3151
+ type: [Number, String],
3152
+ default: 24
3153
+ },
3154
+ virtualScrollStickySizeStart: {
3155
+ type: [Number, String],
3156
+ default: 0
3157
+ },
3158
+ virtualScrollStickySizeEnd: {
3159
+ type: [Number, String],
3160
+ default: 0
3161
+ },
3162
+ tableColspan: [Number, String]
3163
+ }, sn = {
3164
+ virtualScrollHorizontal: Boolean,
3165
+ onVirtualScroll: Function,
3166
+ ...qu
3167
+ };
3168
+ function _u({
3169
+ virtualScrollLength: e,
3170
+ getVirtualScrollTarget: t,
3171
+ getVirtualScrollEl: l,
3172
+ virtualScrollItemSizeComputed: n
3173
+ // optional
3174
+ }) {
3175
+ const o = le(), { props: u, emit: a, proxy: r } = o, { $q: g } = r;
3176
+ let b, s, y, v = [], c;
3177
+ const m = A(0), x = A(0), p = A({}), O = A(null), B = A(null), k = A(null), L = A({ from: 0, to: 0 }), $ = d(() => u.tableColspan !== void 0 ? u.tableColspan : 100);
3178
+ n === void 0 && (n = d(() => u.virtualScrollItemSize));
3179
+ const V = d(() => n.value + ";" + u.virtualScrollHorizontal), M = d(
3180
+ () => V.value + ";" + u.virtualScrollSliceRatioBefore + ";" + u.virtualScrollSliceRatioAfter
3181
+ );
3182
+ J(M, () => {
3183
+ Y();
3184
+ }), J(V, P);
3185
+ function P() {
3186
+ j(s, !0);
3187
+ }
3188
+ function W(f) {
3189
+ j(f === void 0 ? s : f);
3190
+ }
3191
+ function G(f, w) {
3192
+ const H = t();
3193
+ if (H == null || H.nodeType === 8)
3194
+ return;
3195
+ const T = tl(
3196
+ H,
3197
+ l(),
3198
+ O.value,
3199
+ B.value,
3200
+ u.virtualScrollHorizontal,
3201
+ g.lang.rtl,
3202
+ u.virtualScrollStickySizeStart,
3203
+ u.virtualScrollStickySizeEnd
3204
+ );
3205
+ y !== T.scrollViewSize && Y(T.scrollViewSize), R(
3206
+ H,
3207
+ T,
3208
+ Math.min(e.value - 1, Math.max(0, parseInt(f, 10) || 0)),
3209
+ 0,
3210
+ xu.indexOf(w) !== -1 ? w : s !== -1 && f > s ? "end" : "start"
3211
+ );
3212
+ }
3213
+ function U() {
3214
+ const f = t();
3215
+ if (f == null || f.nodeType === 8)
3216
+ return;
3217
+ const w = tl(
3218
+ f,
3219
+ l(),
3220
+ O.value,
3221
+ B.value,
3222
+ u.virtualScrollHorizontal,
3223
+ g.lang.rtl,
3224
+ u.virtualScrollStickySizeStart,
3225
+ u.virtualScrollStickySizeEnd
3226
+ ), H = e.value - 1, T = w.scrollMaxSize - w.offsetStart - w.offsetEnd - x.value;
3227
+ if (b === w.scrollStart)
3228
+ return;
3229
+ if (w.scrollMaxSize <= 0) {
3230
+ R(f, w, 0, 0);
3231
+ return;
3232
+ }
3233
+ y !== w.scrollViewSize && Y(w.scrollViewSize), K(L.value.from);
3234
+ const D = Math.floor(w.scrollMaxSize - Math.max(w.scrollViewSize, w.offsetEnd) - Math.min(c[H], w.scrollViewSize / 2));
3235
+ if (D > 0 && Math.ceil(w.scrollStart) >= D) {
3236
+ R(
3237
+ f,
3238
+ w,
3239
+ H,
3240
+ w.scrollMaxSize - w.offsetEnd - v.reduce(et, 0)
3241
+ );
3242
+ return;
3243
+ }
3244
+ let I = 0, z = w.scrollStart - w.offsetStart, Z = z;
3245
+ if (z <= T && z + w.scrollViewSize >= m.value)
3246
+ z -= m.value, I = L.value.from, Z = z;
3247
+ else
3248
+ for (let S = 0; z >= v[S] && I < H; S++)
3249
+ z -= v[S], I += pe;
3250
+ for (; z > 0 && I < H; )
3251
+ z -= c[I], z > -w.scrollViewSize ? (I++, Z = z) : Z = c[I] + z;
3252
+ R(
3253
+ f,
3254
+ w,
3255
+ I,
3256
+ Z
3257
+ );
3258
+ }
3259
+ function R(f, w, H, T, D) {
3260
+ const I = typeof D == "string" && D.indexOf("-force") !== -1, z = I === !0 ? D.replace("-force", "") : D, Z = z !== void 0 ? z : "start";
3261
+ let S = Math.max(0, H - p.value[Z]), ne = S + p.value.total;
3262
+ ne > e.value && (ne = e.value, S = Math.max(0, ne - p.value.total)), b = w.scrollStart;
3263
+ const ye = S !== L.value.from || ne !== L.value.to;
3264
+ if (ye === !1 && z === void 0) {
3265
+ _(H);
3266
+ return;
3267
+ }
3268
+ const { activeElement: He } = document, we = k.value;
3269
+ ye === !0 && we !== null && we !== He && we.contains(He) === !0 && (we.addEventListener("focusout", E), setTimeout(() => {
3270
+ we !== null && we.removeEventListener("focusout", E);
3271
+ })), Cu(we, H - S);
3272
+ const bt = z !== void 0 ? c.slice(S, H).reduce(et, 0) : 0;
3273
+ if (ye === !0) {
3274
+ const Te = ne >= L.value.from && S <= L.value.to ? L.value.to : ne;
3275
+ L.value = { from: S, to: Te }, m.value = at(v, c, 0, S), x.value = at(v, c, ne, e.value), requestAnimationFrame(() => {
3276
+ L.value.to !== ne && b === w.scrollStart && (L.value = { from: L.value.from, to: ne }, x.value = at(v, c, ne, e.value));
3277
+ });
3278
+ }
3279
+ requestAnimationFrame(() => {
3280
+ if (b !== w.scrollStart)
3281
+ return;
3282
+ ye === !0 && K(S);
3283
+ const Te = c.slice(S, H).reduce(et, 0), $e = Te + w.offsetStart + m.value, yt = $e + c[H];
3284
+ let lt = $e + T;
3285
+ if (z !== void 0) {
3286
+ const Ft = Te - bt, nt = w.scrollStart + Ft;
3287
+ lt = I !== !0 && nt < $e && yt < nt + w.scrollViewSize ? nt : z === "end" ? yt - w.scrollViewSize : $e - (z === "start" ? 0 : Math.round((w.scrollViewSize - c[H]) / 2));
3288
+ }
3289
+ b = lt, rn(
3290
+ f,
3291
+ lt,
3292
+ u.virtualScrollHorizontal,
3293
+ g.lang.rtl
3294
+ ), _(H);
3295
+ });
3296
+ }
3297
+ function K(f) {
3298
+ const w = k.value;
3299
+ if (w) {
3300
+ const H = to.call(
3301
+ w.children,
3302
+ (S) => S.classList && S.classList.contains("q-virtual-scroll--skip") === !1
3303
+ ), T = H.length, D = u.virtualScrollHorizontal === !0 ? (S) => S.getBoundingClientRect().width : (S) => S.offsetHeight;
3304
+ let I = f, z, Z;
3305
+ for (let S = 0; S < T; ) {
3306
+ for (z = D(H[S]), S++; S < T && H[S].classList.contains("q-virtual-scroll--with-prev") === !0; )
3307
+ z += D(H[S]), S++;
3308
+ Z = z - c[I], Z !== 0 && (c[I] += Z, v[Math.floor(I / pe)] += Z), I++;
3309
+ }
3310
+ }
3311
+ }
3312
+ function E() {
3313
+ k.value !== null && k.value !== void 0 && k.value.focus();
3314
+ }
3315
+ function j(f, w) {
3316
+ const H = 1 * n.value;
3317
+ (w === !0 || Array.isArray(c) === !1) && (c = []);
3318
+ const T = c.length;
3319
+ c.length = e.value;
3320
+ for (let I = e.value - 1; I >= T; I--)
3321
+ c[I] = H;
3322
+ const D = Math.floor((e.value - 1) / pe);
3323
+ v = [];
3324
+ for (let I = 0; I <= D; I++) {
3325
+ let z = 0;
3326
+ const Z = Math.min((I + 1) * pe, e.value);
3327
+ for (let S = I * pe; S < Z; S++)
3328
+ z += c[S];
3329
+ v.push(z);
3330
+ }
3331
+ s = -1, b = void 0, m.value = at(v, c, 0, L.value.from), x.value = at(v, c, L.value.to, e.value), f >= 0 ? (K(L.value.from), ce(() => {
3332
+ G(f);
3333
+ })) : F();
3334
+ }
3335
+ function Y(f) {
3336
+ if (f === void 0 && typeof window < "u") {
3337
+ const z = t();
3338
+ z != null && z.nodeType !== 8 && (f = tl(
3339
+ z,
3340
+ l(),
3341
+ O.value,
3342
+ B.value,
3343
+ u.virtualScrollHorizontal,
3344
+ g.lang.rtl,
3345
+ u.virtualScrollStickySizeStart,
3346
+ u.virtualScrollStickySizeEnd
3347
+ ).scrollViewSize);
3348
+ }
3349
+ y = f;
3350
+ const w = parseFloat(u.virtualScrollSliceRatioBefore) || 0, H = parseFloat(u.virtualScrollSliceRatioAfter) || 0, T = 1 + w + H, D = f === void 0 || f <= 0 ? 1 : Math.ceil(f / n.value), I = Math.max(
3351
+ 1,
3352
+ D,
3353
+ Math.ceil((u.virtualScrollSliceSize > 0 ? u.virtualScrollSliceSize : 10) / T)
3354
+ );
3355
+ p.value = {
3356
+ total: Math.ceil(I * T),
3357
+ start: Math.ceil(I * w),
3358
+ center: Math.ceil(I * (0.5 + w)),
3359
+ end: Math.ceil(I * (1 + w)),
3360
+ view: D
3361
+ };
3362
+ }
3363
+ function me(f, w) {
3364
+ const H = u.virtualScrollHorizontal === !0 ? "width" : "height", T = {
3365
+ ["--q-virtual-scroll-item-" + H]: n.value + "px"
3366
+ };
3367
+ return [
3368
+ f === "tbody" ? h(f, {
3369
+ class: "q-virtual-scroll__padding",
3370
+ key: "before",
3371
+ ref: O
3372
+ }, [
3373
+ h("tr", [
3374
+ h("td", {
3375
+ style: { [H]: `${m.value}px`, ...T },
3376
+ colspan: $.value
3377
+ })
3378
+ ])
3379
+ ]) : h(f, {
3380
+ class: "q-virtual-scroll__padding",
3381
+ key: "before",
3382
+ ref: O,
3383
+ style: { [H]: `${m.value}px`, ...T }
3384
+ }),
3385
+ h(f, {
3386
+ class: "q-virtual-scroll__content",
3387
+ key: "content",
3388
+ ref: k,
3389
+ tabindex: -1
3390
+ }, w.flat()),
3391
+ f === "tbody" ? h(f, {
3392
+ class: "q-virtual-scroll__padding",
3393
+ key: "after",
3394
+ ref: B
3395
+ }, [
3396
+ h("tr", [
3397
+ h("td", {
3398
+ style: { [H]: `${x.value}px`, ...T },
3399
+ colspan: $.value
3400
+ })
3401
+ ])
3402
+ ]) : h(f, {
3403
+ class: "q-virtual-scroll__padding",
3404
+ key: "after",
3405
+ ref: B,
3406
+ style: { [H]: `${x.value}px`, ...T }
3407
+ })
3408
+ ];
3409
+ }
3410
+ function _(f) {
3411
+ s !== f && (u.onVirtualScroll !== void 0 && a("virtualScroll", {
3412
+ index: f,
3413
+ from: L.value.from,
3414
+ to: L.value.to - 1,
3415
+ direction: f < s ? "decrease" : "increase",
3416
+ ref: r
3417
+ }), s = f);
3418
+ }
3419
+ Y();
3420
+ const F = In(
3421
+ U,
3422
+ g.platform.is.ios === !0 ? 120 : 35
3423
+ );
3424
+ qo(() => {
3425
+ Y();
3426
+ });
3427
+ let ge = !1;
3428
+ return Pt(() => {
3429
+ ge = !0;
3430
+ }), bn(() => {
3431
+ if (ge !== !0) return;
3432
+ const f = t();
3433
+ b !== void 0 && f !== void 0 && f !== null && f.nodeType !== 8 ? rn(
3434
+ f,
3435
+ b,
3436
+ u.virtualScrollHorizontal,
3437
+ g.lang.rtl
3438
+ ) : G(s);
3439
+ }), fe(() => {
3440
+ F.cancel();
3441
+ }), Object.assign(r, { scrollTo: G, reset: P, refresh: W }), {
3442
+ virtualScrollSliceRange: L,
3443
+ virtualScrollSliceSizeComputed: p,
3444
+ setVirtualScrollSize: Y,
3445
+ onVirtualScrollEvt: F,
3446
+ localResetVirtualScroll: j,
3447
+ padVirtualScroll: me,
3448
+ scrollTo: G,
3449
+ reset: P,
3450
+ refresh: W
3451
+ };
3452
+ }
3453
+ const Eu = /[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/, Vu = /[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u, Bu = /[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/, Tu = /[a-z0-9_ -]$/i;
3454
+ function $u(e) {
3455
+ return function(l) {
3456
+ if (l.type === "compositionend" || l.type === "change") {
3457
+ if (l.target.qComposing !== !0) return;
3458
+ l.target.qComposing = !1, e(l);
3459
+ } else l.type === "compositionupdate" && l.target.qComposing !== !0 && typeof l.data == "string" && (de.is.firefox === !0 ? Tu.test(l.data) === !1 : Eu.test(l.data) === !0 || Vu.test(l.data) === !0 || Bu.test(l.data) === !0) === !0 && (l.target.qComposing = !0);
3460
+ };
3461
+ }
3462
+ function Ve(e, t) {
3463
+ if (e === t)
3464
+ return !0;
3465
+ if (e !== null && t !== null && typeof e == "object" && typeof t == "object") {
3466
+ if (e.constructor !== t.constructor)
3467
+ return !1;
3468
+ let l, n;
3469
+ if (e.constructor === Array) {
3470
+ if (l = e.length, l !== t.length)
3471
+ return !1;
3472
+ for (n = l; n-- !== 0; )
3473
+ if (Ve(e[n], t[n]) !== !0)
3474
+ return !1;
3475
+ return !0;
3476
+ }
3477
+ if (e.constructor === Map) {
3478
+ if (e.size !== t.size)
3479
+ return !1;
3480
+ let u = e.entries();
3481
+ for (n = u.next(); n.done !== !0; ) {
3482
+ if (t.has(n.value[0]) !== !0)
3483
+ return !1;
3484
+ n = u.next();
3485
+ }
3486
+ for (u = e.entries(), n = u.next(); n.done !== !0; ) {
3487
+ if (Ve(n.value[1], t.get(n.value[0])) !== !0)
3488
+ return !1;
3489
+ n = u.next();
3490
+ }
3491
+ return !0;
3492
+ }
3493
+ if (e.constructor === Set) {
3494
+ if (e.size !== t.size)
3495
+ return !1;
3496
+ const u = e.entries();
3497
+ for (n = u.next(); n.done !== !0; ) {
3498
+ if (t.has(n.value[0]) !== !0)
3499
+ return !1;
3500
+ n = u.next();
3501
+ }
3502
+ return !0;
3503
+ }
3504
+ if (e.buffer != null && e.buffer.constructor === ArrayBuffer) {
3505
+ if (l = e.length, l !== t.length)
3506
+ return !1;
3507
+ for (n = l; n-- !== 0; )
3508
+ if (e[n] !== t[n])
3509
+ return !1;
3510
+ return !0;
3511
+ }
3512
+ if (e.constructor === RegExp)
3513
+ return e.source === t.source && e.flags === t.flags;
3514
+ if (e.valueOf !== Object.prototype.valueOf)
3515
+ return e.valueOf() === t.valueOf();
3516
+ if (e.toString !== Object.prototype.toString)
3517
+ return e.toString() === t.toString();
3518
+ const o = Object.keys(e).filter((u) => e[u] !== void 0);
3519
+ if (l = o.length, l !== Object.keys(t).filter((u) => t[u] !== void 0).length)
3520
+ return !1;
3521
+ for (n = l; n-- !== 0; ) {
3522
+ const u = o[n];
3523
+ if (Ve(e[u], t[u]) !== !0)
3524
+ return !1;
3525
+ }
3526
+ return !0;
3527
+ }
3528
+ return e !== e && t !== t;
3529
+ }
3530
+ function cn(e, t, l) {
3531
+ if (l <= t)
3532
+ return t;
3533
+ const n = l - t + 1;
3534
+ let o = t + (e - t) % n;
3535
+ return o < t && (o = n + o), o === 0 ? 0 : o;
3536
+ }
3537
+ const dn = (e) => ["add", "add-unique", "toggle"].includes(e), Ru = ".*+?^${}()|[]\\", Lu = Object.keys(gl);
3538
+ function ll(e, t) {
3539
+ if (typeof e == "function") return e;
3540
+ const l = e !== void 0 ? e : t;
3541
+ return (n) => n !== null && typeof n == "object" && l in n ? n[l] : n;
3542
+ }
3543
+ const Mu = ve({
3544
+ name: "QSelect",
3545
+ inheritAttrs: !1,
3546
+ props: {
3547
+ ...sn,
3548
+ ...An,
3549
+ ...gl,
3550
+ // override of useFieldProps > modelValue
3551
+ modelValue: {
3552
+ required: !0
3553
+ },
3554
+ multiple: Boolean,
3555
+ displayValue: [String, Number],
3556
+ displayValueHtml: Boolean,
3557
+ dropdownIcon: String,
3558
+ options: {
3559
+ type: Array,
3560
+ default: () => []
3561
+ },
3562
+ optionValue: [Function, String],
3563
+ optionLabel: [Function, String],
3564
+ optionDisable: [Function, String],
3565
+ hideSelected: Boolean,
3566
+ hideDropdownIcon: Boolean,
3567
+ fillInput: Boolean,
3568
+ maxValues: [Number, String],
3569
+ optionsDense: Boolean,
3570
+ optionsDark: {
3571
+ type: Boolean,
3572
+ default: null
3573
+ },
3574
+ optionsSelectedClass: String,
3575
+ optionsHtml: Boolean,
3576
+ optionsCover: Boolean,
3577
+ menuShrink: Boolean,
3578
+ menuAnchor: String,
3579
+ menuSelf: String,
3580
+ menuOffset: Array,
3581
+ popupContentClass: String,
3582
+ popupContentStyle: [String, Array, Object],
3583
+ popupNoRouteDismiss: Boolean,
3584
+ useInput: Boolean,
3585
+ useChips: Boolean,
3586
+ newValueMode: {
3587
+ type: String,
3588
+ validator: dn
3589
+ },
3590
+ mapOptions: Boolean,
3591
+ emitValue: Boolean,
3592
+ disableTabSelection: Boolean,
3593
+ inputDebounce: {
3594
+ type: [Number, String],
3595
+ default: 500
3596
+ },
3597
+ inputClass: [Array, String, Object],
3598
+ inputStyle: [Array, String, Object],
3599
+ tabindex: {
3600
+ type: [String, Number],
3601
+ default: 0
3602
+ },
3603
+ autocomplete: String,
3604
+ transitionShow: {},
3605
+ transitionHide: {},
3606
+ transitionDuration: {},
3607
+ behavior: {
3608
+ type: String,
3609
+ validator: (e) => ["default", "menu", "dialog"].includes(e),
3610
+ default: "default"
3611
+ },
3612
+ // override of useVirtualScrollProps > virtualScrollItemSize (no default)
3613
+ virtualScrollItemSize: sn.virtualScrollItemSize.type,
3614
+ onNewValue: Function,
3615
+ onFilter: Function
3616
+ },
3617
+ emits: [
3618
+ ...Hn,
3619
+ "add",
3620
+ "remove",
3621
+ "inputValue",
3622
+ "keyup",
3623
+ "keypress",
3624
+ "keydown",
3625
+ "popupShow",
3626
+ "popupHide",
3627
+ "filterAbort"
3628
+ ],
3629
+ setup(e, { slots: t, emit: l }) {
3630
+ const { proxy: n } = le(), { $q: o } = n, u = A(!1), a = A(!1), r = A(-1), g = A(""), b = A(!1), s = A(!1);
3631
+ let y = null, v = null, c, m, x, p = null, O, B, k, L;
3632
+ const $ = A(null), V = A(null), M = A(null), P = A(null), W = A(null), G = wi(e), U = $u(ql), R = d(() => Array.isArray(e.options) ? e.options.length : 0), K = d(() => e.virtualScrollItemSize === void 0 ? e.optionsDense === !0 ? 24 : 48 : e.virtualScrollItemSize), {
3633
+ virtualScrollSliceRange: E,
3634
+ virtualScrollSliceSizeComputed: j,
3635
+ localResetVirtualScroll: Y,
3636
+ padVirtualScroll: me,
3637
+ onVirtualScrollEvt: _,
3638
+ scrollTo: F,
3639
+ setVirtualScrollSize: ge
3640
+ } = _u({
3641
+ virtualScrollLength: R,
3642
+ getVirtualScrollTarget: io,
3643
+ getVirtualScrollEl: xl,
3644
+ virtualScrollItemSizeComputed: K
3645
+ }), f = Dn(), w = d(() => {
3646
+ const i = e.mapOptions === !0 && e.multiple !== !0, C = e.modelValue !== void 0 && (e.modelValue !== null || i === !0) ? e.multiple === !0 && Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue] : [];
3647
+ if (e.mapOptions === !0 && Array.isArray(e.options) === !0) {
3648
+ const q = e.mapOptions === !0 && c !== void 0 ? c : [], N = C.map((X) => oo(X, q));
3649
+ return e.modelValue === null && i === !0 ? N.filter((X) => X !== null) : N;
3650
+ }
3651
+ return C;
3652
+ }), H = d(() => {
3653
+ const i = {};
3654
+ return Lu.forEach((C) => {
3655
+ const q = e[C];
3656
+ q !== void 0 && (i[C] = q);
3657
+ }), i;
3658
+ }), T = d(() => e.optionsDark === null ? f.isDark.value : e.optionsDark), D = d(() => sl(w.value)), I = d(() => {
3659
+ let i = "q-field__input q-placeholder col";
3660
+ return e.hideSelected === !0 || w.value.length === 0 ? [i, e.inputClass] : (i += " q-field__input--padding", e.inputClass === void 0 ? i : [i, e.inputClass]);
3661
+ }), z = d(
3662
+ () => (e.virtualScrollHorizontal === !0 ? "q-virtual-scroll--horizontal" : "") + (e.popupContentClass ? " " + e.popupContentClass : "")
3663
+ ), Z = d(() => R.value === 0), S = d(
3664
+ () => w.value.map((i) => re.value(i)).join(", ")
3665
+ ), ne = d(() => e.displayValue !== void 0 ? e.displayValue : S.value), ye = d(() => e.optionsHtml === !0 ? () => !0 : (i) => i != null && i.html === !0), He = d(() => e.displayValueHtml === !0 || e.displayValue === void 0 && (e.optionsHtml === !0 || w.value.some(ye.value))), we = d(() => f.focused.value === !0 ? e.tabindex : -1), bt = d(() => {
3666
+ const i = {
3667
+ tabindex: e.tabindex,
3668
+ role: "combobox",
3669
+ "aria-label": e.label,
3670
+ "aria-readonly": e.readonly === !0 ? "true" : "false",
3671
+ "aria-autocomplete": e.useInput === !0 ? "list" : "none",
3672
+ "aria-expanded": u.value === !0 ? "true" : "false",
3673
+ "aria-controls": `${f.targetUid.value}_lb`
3674
+ };
3675
+ return r.value >= 0 && (i["aria-activedescendant"] = `${f.targetUid.value}_${r.value}`), i;
3676
+ }), Te = d(() => ({
3677
+ id: `${f.targetUid.value}_lb`,
3678
+ role: "listbox",
3679
+ "aria-multiselectable": e.multiple === !0 ? "true" : "false"
3680
+ })), $e = d(() => w.value.map((i, C) => ({
3681
+ index: C,
3682
+ opt: i,
3683
+ html: ye.value(i),
3684
+ selected: !0,
3685
+ removeAtIndex: no,
3686
+ toggleOption: Re,
3687
+ tabindex: we.value
3688
+ }))), yt = d(() => {
3689
+ if (R.value === 0)
3690
+ return [];
3691
+ const { from: i, to: C } = E.value;
3692
+ return e.options.slice(i, C).map((q, N) => {
3693
+ const X = De.value(q) === !0, Q = Dt(q) === !0, oe = i + N, ee = {
3694
+ clickable: !0,
3695
+ active: Q,
3696
+ activeClass: nt.value,
3697
+ manualFocus: !0,
3698
+ focused: !1,
3699
+ disable: X,
3700
+ tabindex: -1,
3701
+ dense: e.optionsDense,
3702
+ dark: T.value,
3703
+ role: "option",
3704
+ "aria-selected": Q === !0 ? "true" : "false",
3705
+ id: `${f.targetUid.value}_${oe}`,
3706
+ onClick: () => {
3707
+ Re(q);
3708
+ }
3709
+ };
3710
+ return X !== !0 && (r.value === oe && (ee.focused = !0), o.platform.is.desktop === !0 && (ee.onMousemove = () => {
3711
+ u.value === !0 && je(oe);
3712
+ })), {
3713
+ index: oe,
3714
+ opt: q,
3715
+ html: ye.value(q),
3716
+ label: re.value(q),
3717
+ selected: ee.active,
3718
+ focused: ee.focused,
3719
+ toggleOption: Re,
3720
+ setOptionIndex: je,
3721
+ itemProps: ee
3722
+ };
3723
+ });
3724
+ }), lt = d(() => e.dropdownIcon !== void 0 ? e.dropdownIcon : o.iconSet.arrow.dropdown), Ft = d(
3725
+ () => e.optionsCover === !1 && e.outlined !== !0 && e.standout !== !0 && e.borderless !== !0 && e.rounded !== !0
3726
+ ), nt = d(() => e.optionsSelectedClass !== void 0 ? e.optionsSelectedClass : e.color !== void 0 ? `text-${e.color}` : ""), Se = d(() => ll(e.optionValue, "value")), re = d(() => ll(e.optionLabel, "label")), De = d(() => ll(e.optionDisable, "disable")), wt = d(() => w.value.map(Se.value)), lo = d(() => {
3727
+ const i = {
3728
+ onInput: ql,
3729
+ // Safari < 10.2 & UIWebView doesn't fire compositionend when
3730
+ // switching focus before confirming composition choice
3731
+ // this also fixes the issue where some browsers e.g. iOS Chrome
3732
+ // fires "change" instead of "input" on autocomplete.
3733
+ onChange: U,
3734
+ onKeydown: kl,
3735
+ onKeyup: wl,
3736
+ onKeypress: Sl,
3737
+ onFocus: bl,
3738
+ onClick(C) {
3739
+ m === !0 && Ee(C);
3740
+ }
3741
+ };
3742
+ return i.onCompositionstart = i.onCompositionupdate = i.onCompositionend = U, i;
3743
+ });
3744
+ J(w, (i) => {
3745
+ c = i, e.useInput === !0 && e.fillInput === !0 && e.multiple !== !0 && f.innerLoading.value !== !0 && (a.value !== !0 && u.value !== !0 || D.value !== !0) && (x !== !0 && Qe(), (a.value === !0 || u.value === !0) && Ne(""));
3746
+ }, { immediate: !0 }), J(() => e.fillInput, Qe), J(u, jt), J(R, bo);
3747
+ function hl(i) {
3748
+ return e.emitValue === !0 ? Se.value(i) : i;
3749
+ }
3750
+ function Ht(i) {
3751
+ if (i !== -1 && i < w.value.length)
3752
+ if (e.multiple === !0) {
3753
+ const C = e.modelValue.slice();
3754
+ l("remove", { index: i, value: C.splice(i, 1)[0] }), l("update:modelValue", C);
3755
+ } else
3756
+ l("update:modelValue", null);
3757
+ }
3758
+ function no(i) {
3759
+ Ht(i), f.focus();
3760
+ }
3761
+ function pl(i, C) {
3762
+ const q = hl(i);
3763
+ if (e.multiple !== !0) {
3764
+ e.fillInput === !0 && ot(
3765
+ re.value(i),
3766
+ !0,
3767
+ !0
3768
+ ), l("update:modelValue", q);
3769
+ return;
3770
+ }
3771
+ if (w.value.length === 0) {
3772
+ l("add", { index: 0, value: q }), l("update:modelValue", e.multiple === !0 ? [q] : q);
3773
+ return;
3774
+ }
3775
+ if (C === !0 && Dt(i) === !0 || e.maxValues !== void 0 && e.modelValue.length >= e.maxValues)
3776
+ return;
3777
+ const N = e.modelValue.slice();
3778
+ l("add", { index: N.length, value: q }), N.push(q), l("update:modelValue", N);
3779
+ }
3780
+ function Re(i, C) {
3781
+ if (f.editable.value !== !0 || i === void 0 || De.value(i) === !0)
3782
+ return;
3783
+ const q = Se.value(i);
3784
+ if (e.multiple !== !0) {
3785
+ C !== !0 && (ot(
3786
+ e.fillInput === !0 ? re.value(i) : "",
3787
+ !0,
3788
+ !0
3789
+ ), Le()), V.value !== null && V.value.focus(), (w.value.length === 0 || Ve(Se.value(w.value[0]), q) !== !0) && l("update:modelValue", e.emitValue === !0 ? q : i);
3790
+ return;
3791
+ }
3792
+ if ((m !== !0 || b.value === !0) && f.focus(), bl(), w.value.length === 0) {
3793
+ const Q = e.emitValue === !0 ? q : i;
3794
+ l("add", { index: 0, value: Q }), l("update:modelValue", e.multiple === !0 ? [Q] : Q);
3795
+ return;
3796
+ }
3797
+ const N = e.modelValue.slice(), X = wt.value.findIndex((Q) => Ve(Q, q));
3798
+ if (X !== -1)
3799
+ l("remove", { index: X, value: N.splice(X, 1)[0] });
3800
+ else {
3801
+ if (e.maxValues !== void 0 && N.length >= e.maxValues)
3802
+ return;
3803
+ const Q = e.emitValue === !0 ? q : i;
3804
+ l("add", { index: N.length, value: Q }), N.push(Q);
3805
+ }
3806
+ l("update:modelValue", N);
3807
+ }
3808
+ function je(i) {
3809
+ if (o.platform.is.desktop !== !0) return;
3810
+ const C = i !== -1 && i < R.value ? i : -1;
3811
+ r.value !== C && (r.value = C);
3812
+ }
3813
+ function St(i = 1, C) {
3814
+ if (u.value === !0) {
3815
+ let q = r.value;
3816
+ do
3817
+ q = cn(
3818
+ q + i,
3819
+ -1,
3820
+ R.value - 1
3821
+ );
3822
+ while (q !== -1 && q !== r.value && De.value(e.options[q]) === !0);
3823
+ r.value !== q && (je(q), F(q), C !== !0 && e.useInput === !0 && e.fillInput === !0 && kt(
3824
+ q >= 0 ? re.value(e.options[q]) : O,
3825
+ !0
3826
+ ));
3827
+ }
3828
+ }
3829
+ function oo(i, C) {
3830
+ const q = (N) => Ve(Se.value(N), i);
3831
+ return e.options.find(q) || C.find(q) || i;
3832
+ }
3833
+ function Dt(i) {
3834
+ const C = Se.value(i);
3835
+ return wt.value.find((q) => Ve(q, C)) !== void 0;
3836
+ }
3837
+ function bl(i) {
3838
+ e.useInput === !0 && V.value !== null && (i === void 0 || V.value === i.target && i.target.value === S.value) && V.value.select();
3839
+ }
3840
+ function yl(i) {
3841
+ Fe(i, 27) === !0 && u.value === !0 && (Ee(i), Le(), Qe()), l("keyup", i);
3842
+ }
3843
+ function wl(i) {
3844
+ const { value: C } = i.target;
3845
+ if (i.keyCode !== void 0) {
3846
+ yl(i);
3847
+ return;
3848
+ }
3849
+ if (i.target.value = "", y !== null && (clearTimeout(y), y = null), v !== null && (clearTimeout(v), v = null), Qe(), typeof C == "string" && C.length !== 0) {
3850
+ const q = C.toLocaleLowerCase(), N = (Q) => {
3851
+ const oe = e.options.find((ee) => String(Q.value(ee)).toLocaleLowerCase() === q);
3852
+ return oe === void 0 ? !1 : (w.value.indexOf(oe) === -1 ? Re(oe) : Le(), !0);
3853
+ }, X = (Q) => {
3854
+ N(Se) !== !0 && Q !== !0 && N(re) !== !0 && Ne(C, !0, () => X(!0));
3855
+ };
3856
+ X();
3857
+ } else
3858
+ f.clearValue(i);
3859
+ }
3860
+ function Sl(i) {
3861
+ l("keypress", i);
3862
+ }
3863
+ function kl(i) {
3864
+ if (l("keydown", i), En(i) === !0)
3865
+ return;
3866
+ const C = g.value.length !== 0 && (e.newValueMode !== void 0 || e.onNewValue !== void 0), q = i.shiftKey !== !0 && e.disableTabSelection !== !0 && e.multiple !== !0 && (r.value !== -1 || C === !0);
3867
+ if (i.keyCode === 27) {
3868
+ be(i);
3869
+ return;
3870
+ }
3871
+ if (i.keyCode === 9 && q === !1) {
3872
+ We();
3873
+ return;
3874
+ }
3875
+ if (i.target === void 0 || i.target.id !== f.targetUid.value || f.editable.value !== !0) return;
3876
+ if (i.keyCode === 40 && f.innerLoading.value !== !0 && u.value === !1) {
3877
+ te(i), Ke();
3878
+ return;
3879
+ }
3880
+ if (i.keyCode === 8 && (e.useChips === !0 || e.clearable === !0) && e.hideSelected !== !0 && g.value.length === 0) {
3881
+ e.multiple === !0 && Array.isArray(e.modelValue) === !0 ? Ht(e.modelValue.length - 1) : e.multiple !== !0 && e.modelValue !== null && l("update:modelValue", null);
3882
+ return;
3883
+ }
3884
+ (i.keyCode === 35 || i.keyCode === 36) && (typeof g.value != "string" || g.value.length === 0) && (te(i), r.value = -1, St(i.keyCode === 36 ? 1 : -1, e.multiple)), (i.keyCode === 33 || i.keyCode === 34) && j.value !== void 0 && (te(i), r.value = Math.max(
3885
+ -1,
3886
+ Math.min(
3887
+ R.value,
3888
+ r.value + (i.keyCode === 33 ? -1 : 1) * j.value.view
3889
+ )
3890
+ ), St(i.keyCode === 33 ? 1 : -1, e.multiple)), (i.keyCode === 38 || i.keyCode === 40) && (te(i), St(i.keyCode === 38 ? -1 : 1, e.multiple));
3891
+ const N = R.value;
3892
+ if ((k === void 0 || L < Date.now()) && (k = ""), N > 0 && e.useInput !== !0 && i.key !== void 0 && i.key.length === 1 && i.altKey === !1 && i.ctrlKey === !1 && i.metaKey === !1 && (i.keyCode !== 32 || k.length !== 0)) {
3893
+ u.value !== !0 && Ke(i);
3894
+ const X = i.key.toLocaleLowerCase(), Q = k.length === 1 && k[0] === X;
3895
+ L = Date.now() + 1500, Q === !1 && (te(i), k += X);
3896
+ const oe = new RegExp("^" + k.split("").map((Nt) => Ru.indexOf(Nt) !== -1 ? "\\" + Nt : Nt).join(".*"), "i");
3897
+ let ee = r.value;
3898
+ if (Q === !0 || ee < 0 || oe.test(re.value(e.options[ee])) !== !0)
3899
+ do
3900
+ ee = cn(ee + 1, -1, N - 1);
3901
+ while (ee !== r.value && (De.value(e.options[ee]) === !0 || oe.test(re.value(e.options[ee])) !== !0));
3902
+ r.value !== ee && ce(() => {
3903
+ je(ee), F(ee), ee >= 0 && e.useInput === !0 && e.fillInput === !0 && kt(re.value(e.options[ee]), !0);
3904
+ });
3905
+ return;
3906
+ }
3907
+ if (!(i.keyCode !== 13 && (i.keyCode !== 32 || e.useInput === !0 || k !== "") && (i.keyCode !== 9 || q === !1))) {
3908
+ if (i.keyCode !== 9 && te(i), r.value !== -1 && r.value < N) {
3909
+ Re(e.options[r.value]);
3910
+ return;
3911
+ }
3912
+ if (C === !0) {
3913
+ const X = (Q, oe) => {
3914
+ if (oe) {
3915
+ if (dn(oe) !== !0)
3916
+ return;
3917
+ } else
3918
+ oe = e.newValueMode;
3919
+ if (ot("", e.multiple !== !0, !0), Q == null)
3920
+ return;
3921
+ (oe === "toggle" ? Re : pl)(Q, oe === "add-unique"), e.multiple !== !0 && (V.value !== null && V.value.focus(), Le());
3922
+ };
3923
+ if (e.onNewValue !== void 0 ? l("newValue", g.value, X) : X(g.value), e.multiple !== !0)
3924
+ return;
3925
+ }
3926
+ u.value === !0 ? We() : f.innerLoading.value !== !0 && Ke();
3927
+ }
3928
+ }
3929
+ function xl() {
3930
+ return m === !0 ? W.value : M.value !== null && M.value.contentEl !== null ? M.value.contentEl : void 0;
3931
+ }
3932
+ function io() {
3933
+ return xl();
3934
+ }
3935
+ function uo() {
3936
+ return e.hideSelected === !0 ? [] : t["selected-item"] !== void 0 ? $e.value.map((i) => t["selected-item"](i)).slice() : t.selected !== void 0 ? [].concat(t.selected()) : e.useChips === !0 ? $e.value.map((i, C) => h(Hi, {
3937
+ key: "option-" + C,
3938
+ removable: f.editable.value === !0 && De.value(i.opt) !== !0,
3939
+ dense: !0,
3940
+ textColor: e.color,
3941
+ tabindex: we.value,
3942
+ onRemove() {
3943
+ i.removeAtIndex(C);
3944
+ }
3945
+ }, () => h("span", {
3946
+ class: "ellipsis",
3947
+ [i.html === !0 ? "innerHTML" : "textContent"]: re.value(i.opt)
3948
+ }))) : [
3949
+ h("span", {
3950
+ [He.value === !0 ? "innerHTML" : "textContent"]: ne.value
3951
+ })
3952
+ ];
3953
+ }
3954
+ function Cl() {
3955
+ if (Z.value === !0)
3956
+ return t["no-option"] !== void 0 ? t["no-option"]({ inputValue: g.value }) : void 0;
3957
+ const i = t.option !== void 0 ? t.option : (q) => h(zn, {
3958
+ key: q.index,
3959
+ ...q.itemProps
3960
+ }, () => h(
3961
+ Tt,
3962
+ () => h(
3963
+ Pn,
3964
+ () => h("span", {
3965
+ [q.html === !0 ? "innerHTML" : "textContent"]: q.label
3966
+ })
3967
+ )
3968
+ ));
3969
+ let C = me("div", yt.value.map(i));
3970
+ return t["before-options"] !== void 0 && (C = t["before-options"]().concat(C)), Oe(t["after-options"], C);
3971
+ }
3972
+ function ao(i, C) {
3973
+ const q = C === !0 ? { ...bt.value, ...f.splitAttrs.attributes.value } : void 0, N = {
3974
+ ref: C === !0 ? V : void 0,
3975
+ key: "i_t",
3976
+ class: I.value,
3977
+ style: e.inputStyle,
3978
+ value: g.value !== void 0 ? g.value : "",
3979
+ // required for Android in order to show ENTER key when in form
3980
+ type: "search",
3981
+ ...q,
3982
+ id: C === !0 ? f.targetUid.value : void 0,
3983
+ maxlength: e.maxlength,
3984
+ autocomplete: e.autocomplete,
3985
+ "data-autofocus": i === !0 || e.autofocus === !0 || void 0,
3986
+ disabled: e.disable === !0,
3987
+ readonly: e.readonly === !0,
3988
+ ...lo.value
3989
+ };
3990
+ return i !== !0 && m === !0 && (Array.isArray(N.class) === !0 ? N.class = [...N.class, "no-pointer-events"] : N.class += " no-pointer-events"), h("input", N);
3991
+ }
3992
+ function ql(i) {
3993
+ y !== null && (clearTimeout(y), y = null), v !== null && (clearTimeout(v), v = null), !(i && i.target && i.target.qComposing === !0) && (kt(i.target.value || ""), x = !0, O = g.value, f.focused.value !== !0 && (m !== !0 || b.value === !0) && f.focus(), e.onFilter !== void 0 && (y = setTimeout(() => {
3994
+ y = null, Ne(g.value);
3995
+ }, e.inputDebounce)));
3996
+ }
3997
+ function kt(i, C) {
3998
+ g.value !== i && (g.value = i, C === !0 || e.inputDebounce === 0 || e.inputDebounce === "0" ? l("inputValue", i) : v = setTimeout(() => {
3999
+ v = null, l("inputValue", i);
4000
+ }, e.inputDebounce));
4001
+ }
4002
+ function ot(i, C, q) {
4003
+ x = q !== !0, e.useInput === !0 && (kt(i, !0), (C === !0 || q !== !0) && (O = i), C !== !0 && Ne(i));
4004
+ }
4005
+ function Ne(i, C, q) {
4006
+ if (e.onFilter === void 0 || C !== !0 && f.focused.value !== !0)
4007
+ return;
4008
+ f.innerLoading.value === !0 ? l("filterAbort") : (f.innerLoading.value = !0, s.value = !0), i !== "" && e.multiple !== !0 && w.value.length !== 0 && x !== !0 && i === re.value(w.value[0]) && (i = "");
4009
+ const N = setTimeout(() => {
4010
+ u.value === !0 && (u.value = !1);
4011
+ }, 10);
4012
+ p !== null && clearTimeout(p), p = N, l(
4013
+ "filter",
4014
+ i,
4015
+ (X, Q) => {
4016
+ (C === !0 || f.focused.value === !0) && p === N && (clearTimeout(p), typeof X == "function" && X(), s.value = !1, ce(() => {
4017
+ f.innerLoading.value = !1, f.editable.value === !0 && (C === !0 ? u.value === !0 && Le() : u.value === !0 ? jt(!0) : u.value = !0), typeof Q == "function" && ce(() => {
4018
+ Q(n);
4019
+ }), typeof q == "function" && ce(() => {
4020
+ q(n);
4021
+ });
4022
+ }));
4023
+ },
4024
+ () => {
4025
+ f.focused.value === !0 && p === N && (clearTimeout(p), f.innerLoading.value = !1, s.value = !1), u.value === !0 && (u.value = !1);
4026
+ }
4027
+ );
4028
+ }
4029
+ function ro() {
4030
+ return h(gu, {
4031
+ ref: M,
4032
+ class: z.value,
4033
+ style: e.popupContentStyle,
4034
+ modelValue: u.value,
4035
+ fit: e.menuShrink !== !0,
4036
+ cover: e.optionsCover === !0 && Z.value !== !0 && e.useInput !== !0,
4037
+ anchor: e.menuAnchor,
4038
+ self: e.menuSelf,
4039
+ offset: e.menuOffset,
4040
+ dark: T.value,
4041
+ noParentEvent: !0,
4042
+ noRefocus: !0,
4043
+ noFocus: !0,
4044
+ noRouteDismiss: e.popupNoRouteDismiss,
4045
+ square: Ft.value,
4046
+ transitionShow: e.transitionShow,
4047
+ transitionHide: e.transitionHide,
4048
+ transitionDuration: e.transitionDuration,
4049
+ separateClosePopup: !0,
4050
+ ...Te.value,
4051
+ onScrollPassive: _,
4052
+ onBeforeShow: El,
4053
+ onBeforeHide: so,
4054
+ onShow: co
4055
+ }, Cl);
4056
+ }
4057
+ function so(i) {
4058
+ Vl(i), We();
4059
+ }
4060
+ function co() {
4061
+ ge();
4062
+ }
4063
+ function fo(i) {
4064
+ Ee(i), V.value !== null && V.value.focus(), b.value = !0, window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0);
4065
+ }
4066
+ function vo(i) {
4067
+ Ee(i), ce(() => {
4068
+ b.value = !1;
4069
+ });
4070
+ }
4071
+ function mo() {
4072
+ const i = [
4073
+ h(Ii, {
4074
+ class: `col-auto ${f.fieldClass.value}`,
4075
+ ...H.value,
4076
+ for: f.targetUid.value,
4077
+ dark: T.value,
4078
+ square: !0,
4079
+ loading: s.value,
4080
+ itemAligned: !1,
4081
+ filled: !0,
4082
+ stackLabel: g.value.length !== 0,
4083
+ ...f.splitAttrs.listeners.value,
4084
+ onFocus: fo,
4085
+ onBlur: vo
4086
+ }, {
4087
+ ...t,
4088
+ rawControl: () => f.getControl(!0),
4089
+ before: void 0,
4090
+ after: void 0
4091
+ })
4092
+ ];
4093
+ return u.value === !0 && i.push(
4094
+ h("div", {
4095
+ ref: W,
4096
+ class: z.value + " scroll",
4097
+ style: e.popupContentStyle,
4098
+ ...Te.value,
4099
+ onClick: be,
4100
+ onScrollPassive: _
4101
+ }, Cl())
4102
+ ), h(ku, {
4103
+ ref: P,
4104
+ modelValue: a.value,
4105
+ position: e.useInput === !0 ? "top" : void 0,
4106
+ transitionShow: B,
4107
+ transitionHide: e.transitionHide,
4108
+ transitionDuration: e.transitionDuration,
4109
+ noRouteDismiss: e.popupNoRouteDismiss,
4110
+ onBeforeShow: El,
4111
+ onBeforeHide: go,
4112
+ onHide: ho,
4113
+ onShow: po
4114
+ }, () => h("div", {
4115
+ class: "q-select__dialog" + (T.value === !0 ? " q-select__dialog--dark q-dark" : "") + (b.value === !0 ? " q-select__dialog--focused" : "")
4116
+ }, i));
4117
+ }
4118
+ function go(i) {
4119
+ Vl(i), P.value !== null && P.value.__updateRefocusTarget(
4120
+ f.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")
4121
+ ), f.focused.value = !1;
4122
+ }
4123
+ function ho(i) {
4124
+ Le(), f.focused.value === !1 && l("blur", i), Qe();
4125
+ }
4126
+ function po() {
4127
+ const i = document.activeElement;
4128
+ (i === null || i.id !== f.targetUid.value) && V.value !== null && V.value !== i && V.value.focus(), ge();
4129
+ }
4130
+ function We() {
4131
+ a.value !== !0 && (r.value = -1, u.value === !0 && (u.value = !1), f.focused.value === !1 && (p !== null && (clearTimeout(p), p = null), f.innerLoading.value === !0 && (l("filterAbort"), f.innerLoading.value = !1, s.value = !1)));
4132
+ }
4133
+ function Ke(i) {
4134
+ f.editable.value === !0 && (m === !0 ? (f.onControlFocusin(i), a.value = !0, ce(() => {
4135
+ f.focus();
4136
+ })) : f.focus(), e.onFilter !== void 0 ? Ne(g.value) : (Z.value !== !0 || t["no-option"] !== void 0) && (u.value = !0));
4137
+ }
4138
+ function Le() {
4139
+ a.value = !1, We();
4140
+ }
4141
+ function Qe() {
4142
+ e.useInput === !0 && ot(
4143
+ e.multiple !== !0 && e.fillInput === !0 && w.value.length !== 0 && re.value(w.value[0]) || "",
4144
+ !0,
4145
+ !0
4146
+ );
4147
+ }
4148
+ function jt(i) {
4149
+ let C = -1;
4150
+ if (i === !0) {
4151
+ if (w.value.length !== 0) {
4152
+ const q = Se.value(w.value[0]);
4153
+ C = e.options.findIndex((N) => Ve(Se.value(N), q));
4154
+ }
4155
+ Y(C);
4156
+ }
4157
+ je(C);
4158
+ }
4159
+ function bo(i, C) {
4160
+ u.value === !0 && f.innerLoading.value === !1 && (Y(-1, !0), ce(() => {
4161
+ u.value === !0 && f.innerLoading.value === !1 && (i > C ? Y() : jt(!0));
4162
+ }));
4163
+ }
4164
+ function _l() {
4165
+ a.value === !1 && M.value !== null && M.value.updatePosition();
4166
+ }
4167
+ function El(i) {
4168
+ i !== void 0 && Ee(i), l("popupShow", i), f.hasPopupOpen = !0, f.onControlFocusin(i);
4169
+ }
4170
+ function Vl(i) {
4171
+ i !== void 0 && Ee(i), l("popupHide", i), f.hasPopupOpen = !1, f.onControlFocusout(i);
4172
+ }
4173
+ function Bl() {
4174
+ m = o.platform.is.mobile !== !0 && e.behavior !== "dialog" ? !1 : e.behavior !== "menu" && (e.useInput === !0 ? t["no-option"] !== void 0 || e.onFilter !== void 0 || Z.value === !1 : !0), B = o.platform.is.ios === !0 && m === !0 && e.useInput === !0 ? "fade" : e.transitionShow;
4175
+ }
4176
+ return pn(Bl), _o(_l), Bl(), fe(() => {
4177
+ y !== null && clearTimeout(y), v !== null && clearTimeout(v);
4178
+ }), Object.assign(n, {
4179
+ showPopup: Ke,
4180
+ hidePopup: Le,
4181
+ removeAtIndex: Ht,
4182
+ add: pl,
4183
+ toggleOption: Re,
4184
+ getOptionIndex: () => r.value,
4185
+ setOptionIndex: je,
4186
+ moveOptionSelection: St,
4187
+ filter: Ne,
4188
+ updateMenuPosition: _l,
4189
+ updateInputValue: ot,
4190
+ isOptionSelected: Dt,
4191
+ getEmittingOptionValue: hl,
4192
+ isOptionDisabled: (...i) => De.value.apply(null, i) === !0,
4193
+ getOptionValue: (...i) => Se.value.apply(null, i),
4194
+ getOptionLabel: (...i) => re.value.apply(null, i)
4195
+ }), Object.assign(f, {
4196
+ innerValue: w,
4197
+ fieldClass: d(
4198
+ () => `q-select q-field--auto-height q-select--with${e.useInput !== !0 ? "out" : ""}-input q-select--with${e.useChips !== !0 ? "out" : ""}-chips q-select--${e.multiple === !0 ? "multiple" : "single"}`
4199
+ ),
4200
+ inputRef: $,
4201
+ targetRef: V,
4202
+ hasValue: D,
4203
+ showPopup: Ke,
4204
+ floatingLabel: d(
4205
+ () => e.hideSelected !== !0 && D.value === !0 || typeof g.value == "number" || g.value.length !== 0 || sl(e.displayValue)
4206
+ ),
4207
+ getControlChild: () => {
4208
+ if (f.editable.value !== !1 && (a.value === !0 || Z.value !== !0 || t["no-option"] !== void 0))
4209
+ return m === !0 ? mo() : ro();
4210
+ f.hasPopupOpen === !0 && (f.hasPopupOpen = !1);
4211
+ },
4212
+ controlEvents: {
4213
+ onFocusin(i) {
4214
+ f.onControlFocusin(i);
4215
+ },
4216
+ onFocusout(i) {
4217
+ f.onControlFocusout(i, () => {
4218
+ Qe(), We();
4219
+ });
4220
+ },
4221
+ onClick(i) {
4222
+ if (be(i), m !== !0 && u.value === !0) {
4223
+ We(), V.value !== null && V.value.focus();
4224
+ return;
4225
+ }
4226
+ Ke(i);
4227
+ }
4228
+ },
4229
+ getControl: (i) => {
4230
+ const C = uo(), q = i === !0 || a.value !== !0 || m !== !0;
4231
+ if (e.useInput === !0)
4232
+ C.push(ao(i, q));
4233
+ else if (f.editable.value === !0) {
4234
+ const X = q === !0 ? bt.value : void 0;
4235
+ C.push(
4236
+ h("input", {
4237
+ ref: q === !0 ? V : void 0,
4238
+ key: "d_t",
4239
+ class: "q-select__focus-target",
4240
+ id: q === !0 ? f.targetUid.value : void 0,
4241
+ value: ne.value,
4242
+ readonly: !0,
4243
+ "data-autofocus": i === !0 || e.autofocus === !0 || void 0,
4244
+ ...X,
4245
+ onKeydown: kl,
4246
+ onKeyup: yl,
4247
+ onKeypress: Sl
4248
+ })
4249
+ ), q === !0 && typeof e.autocomplete == "string" && e.autocomplete.length !== 0 && C.push(
4250
+ h("input", {
4251
+ class: "q-select__autocomplete-input",
4252
+ autocomplete: e.autocomplete,
4253
+ tabindex: -1,
4254
+ onKeyup: wl
4255
+ })
4256
+ );
4257
+ }
4258
+ if (G.value !== void 0 && e.disable !== !0 && wt.value.length !== 0) {
4259
+ const X = wt.value.map((Q) => h("option", { value: Q, selected: !0 }));
4260
+ C.push(
4261
+ h("select", {
4262
+ class: "hidden",
4263
+ name: G.value,
4264
+ multiple: e.multiple
4265
+ }, X)
4266
+ );
4267
+ }
4268
+ const N = e.useInput === !0 || q !== !0 ? void 0 : f.splitAttrs.attributes.value;
4269
+ return h("div", {
4270
+ class: "q-field__native row items-center",
4271
+ ...N,
4272
+ ...f.splitAttrs.listeners.value
4273
+ }, C);
4274
+ },
4275
+ getInnerAppend: () => e.loading !== !0 && s.value !== !0 && e.hideDropdownIcon !== !0 ? [
4276
+ h(_e, {
4277
+ class: "q-select__dropdown-icon" + (u.value === !0 ? " rotate-180" : ""),
4278
+ name: lt.value
4279
+ })
4280
+ ] : null
4281
+ }), jn(f);
4282
+ }
4283
+ }), Ou = { class: "app-select__amount" }, Au = /* @__PURE__ */ mt({
4284
+ __name: "index",
4285
+ props: {
4286
+ modelValue: {},
4287
+ size: { default: qe.MD },
4288
+ options: {},
4289
+ multiple: { type: Boolean },
4290
+ label: {},
4291
+ placeholder: {},
4292
+ required: { type: Boolean },
4293
+ clearable: { type: Boolean },
4294
+ disabled: { type: Boolean },
4295
+ loading: { type: Boolean },
4296
+ filtering: { type: Boolean },
4297
+ autofocus: { type: Boolean },
4298
+ rules: {},
4299
+ lazyRules: { type: [Boolean, String] }
4300
+ },
4301
+ emits: ["update:modelValue"],
4302
+ setup(e, { emit: t }) {
4303
+ const l = e, n = t, o = A(!1), u = A(""), a = d({
4304
+ get() {
4305
+ return l.modelValue;
4306
+ },
4307
+ set(c) {
4308
+ n("update:modelValue", c);
4309
+ }
4310
+ }), r = d(() => {
4311
+ var c;
4312
+ if (Array.isArray(a.value)) {
4313
+ if (l.multiple && a.value.length == 0)
4314
+ return l.placeholder;
4315
+ } else return ((c = a.value) == null ? void 0 : c.label) || l.placeholder || "";
4316
+ return "";
4317
+ }), g = d(() => !(!l.clearable || !l.modelValue || l.modelValue && Array.isArray(l.modelValue) && !l.modelValue.length)), b = d(() => u.value ? l.options.filter(
4318
+ (c) => c.label.toLowerCase().includes(u.value.toLowerCase())
4319
+ ) : l.options), s = d(() => {
4320
+ if (l.rules)
4321
+ return l.required ? [...l.rules, Fl] : l.rules;
4322
+ if (l.required)
4323
+ return [Fl];
4324
+ }), y = () => {
4325
+ a.value = void 0;
4326
+ }, v = (c, m) => {
4327
+ m(() => {
4328
+ u.value = c;
4329
+ });
4330
+ };
4331
+ return (c, m) => (ue(), se("div", {
4332
+ class: Be(["app-select", [{ "app-select_opened": o.value }, `app-select_${c.size}`]])
4333
+ }, [
4334
+ c.label ? (ue(), se("label", {
4335
+ key: 0,
4336
+ class: Be(["app-select__label", { "app-select__label_bold": c.required }])
4337
+ }, Ze(c.required ? `${c.label} *` : c.label), 3)) : Ce("", !0),
4338
+ it(Je(Mu), {
4339
+ standout: "",
4340
+ "hide-bottom-space": "",
4341
+ "hide-dropdown-icon": "",
4342
+ "no-error-icon": "",
4343
+ behavior: "menu",
4344
+ "popup-content-class": `app-select-menu app-select-menu_${c.size}`,
4345
+ placeholder: c.filtering && "Почніть вводити",
4346
+ "input-debounce": "50",
4347
+ modelValue: a.value,
4348
+ "onUpdate:modelValue": m[0] || (m[0] = (x) => a.value = x),
4349
+ options: b.value,
4350
+ multiple: c.multiple,
4351
+ "use-input": c.filtering && (Array.isArray(a.value) || !a.value),
4352
+ rules: s.value,
4353
+ "lazy-rules": c.lazyRules,
4354
+ autofocus: c.autofocus,
4355
+ disable: c.disabled,
4356
+ loading: c.loading,
4357
+ onFilter: v,
4358
+ onPopupShow: m[1] || (m[1] = (x) => o.value = !0),
4359
+ onPopupHide: m[2] || (m[2] = (x) => o.value = !1)
4360
+ }, {
4361
+ append: xe(() => [
4362
+ g.value ? (ue(), se("i", {
4363
+ key: 0,
4364
+ class: "icon-kl icon-kl-close app-select__clear",
4365
+ onClick: hn(y, ["stop", "prevent"])
4366
+ })) : Ce("", !0),
4367
+ m[3] || (m[3] = Wt("i", { class: "icon-kl icon-kl-arrow-down app-select__drop-icon" }, null, -1))
4368
+ ]),
4369
+ selected: xe(() => {
4370
+ var x, p;
4371
+ return [
4372
+ Array.isArray(a.value) ? (ue(), se(rt, { key: 0 }, [
4373
+ !c.filtering || a.value.length ? (ue(), se("span", {
4374
+ key: 0,
4375
+ class: Be([
4376
+ "app-select__selected",
4377
+ {
4378
+ "app-select__placeholder": !((x = a.value) != null && x.length) && c.placeholder
4379
+ }
4380
+ ])
4381
+ }, [
4382
+ (p = a.value) != null && p.length ? (ue(), se(rt, { key: 0 }, [
4383
+ m[4] || (m[4] = Bt(" Вибрано ")),
4384
+ Wt("span", Ou, Ze(a.value.length), 1)
4385
+ ], 64)) : (ue(), se(rt, { key: 1 }, [
4386
+ Bt(Ze(l.placeholder), 1)
4387
+ ], 64))
4388
+ ], 2)) : Ce("", !0)
4389
+ ], 64)) : (ue(), se(rt, { key: 1 }, [
4390
+ !c.filtering || a.value ? (ue(), se("span", {
4391
+ key: 0,
4392
+ class: Be([
4393
+ "app-select__selected",
4394
+ { "app-select__placeholder": !a.value && c.placeholder }
4395
+ ])
4396
+ }, Ze(r.value), 3)) : Ce("", !0)
4397
+ ], 64))
4398
+ ];
4399
+ }),
4400
+ option: xe((x) => [
4401
+ it(zn, gn({
4402
+ class: ["app-select__option", { "app-select__option_selected": x.selected }]
4403
+ }, x.itemProps), {
4404
+ default: xe(() => [
4405
+ l.multiple ? (ue(), $t(Tt, {
4406
+ key: 0,
4407
+ class: "option-multiple",
4408
+ avatar: ""
4409
+ }, {
4410
+ default: xe(() => [
4411
+ it(_i, {
4412
+ size: "30px",
4413
+ "model-value": x.selected,
4414
+ "onUpdate:modelValue": () => x.toggleOption(x.opt)
4415
+ }, null, 8, ["model-value", "onUpdate:modelValue"])
4416
+ ]),
4417
+ _: 2
4418
+ }, 1024)) : Ce("", !0),
4419
+ x.opt.done ? (ue(), $t(Tt, {
4420
+ key: 1,
4421
+ class: "option-done",
4422
+ avatar: ""
4423
+ }, {
4424
+ default: xe(() => m[5] || (m[5] = [
4425
+ Wt("i", { class: "icon-kl icon-kl-check option-done__icon" }, null, -1)
4426
+ ])),
4427
+ _: 1
4428
+ })) : Ce("", !0),
4429
+ it(Tt, null, {
4430
+ default: xe(() => [
4431
+ it(Pn, null, {
4432
+ default: xe(() => [
4433
+ Bt(Ze(x.opt.label), 1)
4434
+ ]),
4435
+ _: 2
4436
+ }, 1024)
4437
+ ]),
4438
+ _: 2
4439
+ }, 1024)
4440
+ ]),
4441
+ _: 2
4442
+ }, 1040, ["class"])
4443
+ ]),
4444
+ _: 1
4445
+ }, 8, ["popup-content-class", "placeholder", "modelValue", "options", "multiple", "use-input", "rules", "lazy-rules", "autofocus", "disable", "loading"])
4446
+ ], 2));
4447
+ }
4448
+ }), Pu = /* @__PURE__ */ fl(Au, [["__scopeId", "data-v-2646d558"]]), zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4449
+ __proto__: null,
4450
+ default: Pu
4451
+ }, Symbol.toStringTag, { value: "Module" }));
3
4452
  export {
4
- A as AppButton,
5
- a as AppButtonCopy,
6
- s as AppIcon,
7
- e as AppSelect
4453
+ ri as AppButton,
4454
+ Hu as AppButtonCopy,
4455
+ Fu as AppIcon,
4456
+ Du as AppSelect
8
4457
  };