@validol4ik/uikit 0.4.3 → 0.4.5

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.
@@ -1,15 +1,6 @@
1
- import { computed as x, ref as T, onMounted as ne, watch as S, getCurrentInstance as R, nextTick as Q, onBeforeUnmount as z, onUnmounted as Qe, h as _, Teleport as _e, onDeactivated as Se, Transition as Ie } from "vue";
1
+ import { ref as T, onMounted as oe, watch as S, computed as E, getCurrentInstance as R, nextTick as I, onBeforeUnmount as z, onUnmounted as Ie, h as Q, Teleport as Qe, onDeactivated as Se, Transition as _e } from "vue";
2
2
  import { i as Ne, P as Ke, b as je, c as Ce, r as Ue, a as Ge } from "./focusout-DjvPXP_b.js";
3
- import { x as ce, p as de, i as Pe, y as Xe, l as J, z as Ye, B as X, c as ke, D as He, E as Ze, F as fe, h as Je, G as et, n as tt, s as nt } from "./index-BMsh_Kya.js";
4
- const ot = {
5
- dark: {
6
- type: Boolean,
7
- default: null
8
- }
9
- };
10
- function lt(e, t) {
11
- return x(() => e.dark === null ? t.dark.isActive : e.dark);
12
- }
3
+ import { z as ce, p as de, i as Pe, B as Xe, n as J, D as Ye, E as X, c as He, F as ke, G as Ze, H as fe, u as Je, h as et, I as tt, q as ot, s as nt, e as lt } from "./index-DYNR39SC.js";
13
4
  let Y, V = 0;
14
5
  const y = new Array(256);
15
6
  for (let e = 0; e < 256; e++)
@@ -21,15 +12,15 @@ const it = (() => {
21
12
  return e.randomBytes;
22
13
  if (e.getRandomValues !== void 0)
23
14
  return (t) => {
24
- const n = new Uint8Array(t);
25
- return e.getRandomValues(n), n;
15
+ const o = new Uint8Array(t);
16
+ return e.getRandomValues(o), o;
26
17
  };
27
18
  }
28
19
  return (t) => {
29
- const n = [];
30
- for (let o = t; o > 0; o--)
31
- n.push(Math.floor(Math.random() * 256));
32
- return n;
20
+ const o = [];
21
+ for (let n = t; n > 0; n--)
22
+ o.push(Math.floor(Math.random() * 256));
23
+ return o;
33
24
  };
34
25
  })(), me = 4096;
35
26
  function ee() {
@@ -45,14 +36,14 @@ function he(e, t) {
45
36
  }
46
37
  function Nt({ getValue: e, required: t = !0 } = {}) {
47
38
  if (Ne.value === !0) {
48
- const n = e !== void 0 ? T(ut(e())) : T(null);
49
- return t === !0 && n.value === null && ne(() => {
50
- n.value = `f_${ee()}`;
51
- }), e !== void 0 && S(e, (o) => {
52
- n.value = he(o, t);
53
- }), n;
39
+ const o = e !== void 0 ? T(ut(e())) : T(null);
40
+ return t === !0 && o.value === null && oe(() => {
41
+ o.value = `f_${ee()}`;
42
+ }), e !== void 0 && S(e, (n) => {
43
+ o.value = he(n, t);
44
+ }), o;
54
45
  }
55
- return e !== void 0 ? x(() => he(e(), t)) : T(`f_${ee()}`);
46
+ return e !== void 0 ? E(() => he(e(), t)) : T(`f_${ee()}`);
56
47
  }
57
48
  let W = [], D = [];
58
49
  function Me(e) {
@@ -91,16 +82,16 @@ function ft({
91
82
  showing: e,
92
83
  avoidEmit: t,
93
84
  // required for QPopupProxy (true)
94
- configureAnchorEl: n
85
+ configureAnchorEl: o
95
86
  // optional
96
87
  }) {
97
- const { props: o, proxy: l, emit: f } = R(), i = T(null);
88
+ const { props: n, proxy: l, emit: f } = R(), i = T(null);
98
89
  let a = null;
99
90
  function m(u) {
100
91
  return i.value === null ? !1 : u === void 0 || u.touches === void 0 || u.touches.length <= 1;
101
92
  }
102
93
  const c = {};
103
- n === void 0 && (Object.assign(c, {
94
+ o === void 0 && (Object.assign(c, {
104
95
  hide(u) {
105
96
  l.hide(u);
106
97
  },
@@ -111,7 +102,7 @@ function ft({
111
102
  Pe(u, 13) === !0 && c.toggle(u);
112
103
  },
113
104
  contextClick(u) {
114
- l.hide(u), de(u), Q(() => {
105
+ l.hide(u), de(u), I(() => {
115
106
  l.show(u), u.qAnchorHandled = !0;
116
107
  });
117
108
  },
@@ -133,8 +124,8 @@ function ft({
133
124
  mobileCleanup(u) {
134
125
  i.value.classList.remove("non-selectable"), a !== null && (clearTimeout(a), a = null), e.value === !0 && u !== void 0 && st();
135
126
  }
136
- }), n = function(u = o.contextMenu) {
137
- if (o.noParentEvent === !0 || i.value === null) return;
127
+ }), o = function(u = n.contextMenu) {
128
+ if (n.noParentEvent === !0 || i.value === null) return;
138
129
  let d;
139
130
  u === !0 ? l.$q.platform.is.mobile === !0 ? d = [
140
131
  [i.value, "touchstart", "mobileTouch", "passive"]
@@ -152,32 +143,32 @@ function ft({
152
143
  function g(u) {
153
144
  for (i.value = u; i.value.classList.contains("q-anchor--skip"); )
154
145
  i.value = i.value.parentNode;
155
- n();
146
+ o();
156
147
  }
157
148
  function p() {
158
- if (o.target === !1 || o.target === "" || l.$el.parentNode === null)
149
+ if (n.target === !1 || n.target === "" || l.$el.parentNode === null)
159
150
  i.value = null;
160
- else if (o.target === !0)
151
+ else if (n.target === !0)
161
152
  g(l.$el.parentNode);
162
153
  else {
163
- let u = o.target;
164
- if (typeof o.target == "string")
154
+ let u = n.target;
155
+ if (typeof n.target == "string")
165
156
  try {
166
- u = document.querySelector(o.target);
157
+ u = document.querySelector(n.target);
167
158
  } catch {
168
159
  u = void 0;
169
160
  }
170
- u != null ? (i.value = u.$el || u, n()) : (i.value = null, console.error(`Anchor: target "${o.target}" not found`));
161
+ u != null ? (i.value = u.$el || u, o()) : (i.value = null, console.error(`Anchor: target "${n.target}" not found`));
171
162
  }
172
163
  }
173
- return S(() => o.contextMenu, (u) => {
174
- i.value !== null && (r(), n(u));
175
- }), S(() => o.target, () => {
164
+ return S(() => n.contextMenu, (u) => {
165
+ i.value !== null && (r(), o(u));
166
+ }), S(() => n.target, () => {
176
167
  i.value !== null && r(), p();
177
- }), S(() => o.noParentEvent, (u) => {
178
- i.value !== null && (u === !0 ? r() : n());
179
- }), ne(() => {
180
- p(), t !== !0 && o.modelValue === !0 && i.value === null && f("update:modelValue", !1);
168
+ }), S(() => n.noParentEvent, (u) => {
169
+ i.value !== null && (u === !0 ? r() : o());
170
+ }), oe(() => {
171
+ p(), t !== !0 && n.modelValue === !0 && i.value === null && f("update:modelValue", !1);
181
172
  }), z(() => {
182
173
  a !== null && clearTimeout(a), r();
183
174
  }), {
@@ -187,20 +178,20 @@ function ft({
187
178
  };
188
179
  }
189
180
  function mt(e, t) {
190
- const n = T(null);
191
- let o;
181
+ const o = T(null);
182
+ let n;
192
183
  function l(a, m) {
193
- const c = `${m !== void 0 ? "add" : "remove"}EventListener`, r = m !== void 0 ? m : o;
194
- a !== window && a[c]("scroll", r, J.passive), window[c]("scroll", r, J.passive), o = m;
184
+ const c = `${m !== void 0 ? "add" : "remove"}EventListener`, r = m !== void 0 ? m : n;
185
+ a !== window && a[c]("scroll", r, J.passive), window[c]("scroll", r, J.passive), n = m;
195
186
  }
196
187
  function f() {
197
- n.value !== null && (l(n.value), n.value = null);
188
+ o.value !== null && (l(o.value), o.value = null);
198
189
  }
199
190
  const i = S(() => e.noParentEvent, () => {
200
- n.value !== null && (f(), t());
191
+ o.value !== null && (f(), t());
201
192
  });
202
193
  return z(i), {
203
- localScrollTarget: n,
194
+ localScrollTarget: o,
204
195
  unconfigureScrollTarget: f,
205
196
  changeScrollEvent: l
206
197
  };
@@ -221,9 +212,9 @@ function gt({
221
212
  showing: e,
222
213
  canShow: t,
223
214
  // optional
224
- hideOnRouteChange: n,
215
+ hideOnRouteChange: o,
225
216
  // optional
226
- handleShow: o,
217
+ handleShow: n,
227
218
  // optional
228
219
  handleHide: l,
229
220
  // optional
@@ -239,30 +230,30 @@ function gt({
239
230
  if (a.disable === !0 || h !== void 0 && h.qAnchorHandled === !0 || t !== void 0 && t(h) !== !0)
240
231
  return;
241
232
  const v = a["onUpdate:modelValue"] !== void 0;
242
- v === !0 && (m("update:modelValue", !0), r = h, Q(() => {
233
+ v === !0 && (m("update:modelValue", !0), r = h, I(() => {
243
234
  r === h && (r = void 0);
244
235
  })), (a.modelValue === null || v === !1) && u(h);
245
236
  }
246
237
  function u(h) {
247
- e.value !== !0 && (e.value = !0, m("beforeShow", h), o !== void 0 ? o(h) : m("show", h));
238
+ e.value !== !0 && (e.value = !0, m("beforeShow", h), n !== void 0 ? n(h) : m("show", h));
248
239
  }
249
240
  function d(h) {
250
241
  if (a.disable === !0)
251
242
  return;
252
243
  const v = a["onUpdate:modelValue"] !== void 0;
253
- v === !0 && (m("update:modelValue", !1), r = h, Q(() => {
244
+ v === !0 && (m("update:modelValue", !1), r = h, I(() => {
254
245
  r === h && (r = void 0);
255
- })), (a.modelValue === null || v === !1) && H(h);
246
+ })), (a.modelValue === null || v === !1) && k(h);
256
247
  }
257
- function H(h) {
248
+ function k(h) {
258
249
  e.value !== !1 && (e.value = !1, m("beforeHide", h), l !== void 0 ? l(h) : m("hide", h));
259
250
  }
260
251
  function C(h) {
261
- a.disable === !0 && h === !0 ? a["onUpdate:modelValue"] !== void 0 && m("update:modelValue", !1) : h === !0 !== e.value && (h === !0 ? u : H)(r);
252
+ a.disable === !0 && h === !0 ? a["onUpdate:modelValue"] !== void 0 && m("update:modelValue", !1) : h === !0 !== e.value && (h === !0 ? u : k)(r);
262
253
  }
263
- S(() => a.modelValue, C), n !== void 0 && Ye(i) === !0 && S(() => c.$route.fullPath, () => {
264
- n.value === !0 && e.value === !0 && d();
265
- }), ne(() => {
254
+ S(() => a.modelValue, C), o !== void 0 && Ye(i) === !0 && S(() => c.$route.fullPath, () => {
255
+ o.value === !0 && e.value === !0 && d();
256
+ }), oe(() => {
266
257
  C(a.modelValue);
267
258
  });
268
259
  const M = { show: p, hide: d, toggle: g };
@@ -271,30 +262,30 @@ function gt({
271
262
  const ge = {};
272
263
  let pt = 1, wt = document.body;
273
264
  function yt(e, t) {
274
- const n = document.createElement("div");
275
- if (n.id = t !== void 0 ? `q-portal--${t}--${pt++}` : e, ge.globalNodes !== void 0) {
276
- const o = ge.globalNodes.class;
277
- o !== void 0 && (n.className = o);
265
+ const o = document.createElement("div");
266
+ if (o.id = t !== void 0 ? `q-portal--${t}--${pt++}` : e, ge.globalNodes !== void 0) {
267
+ const n = ge.globalNodes.class;
268
+ n !== void 0 && (o.className = n);
278
269
  }
279
- return wt.appendChild(n), n;
270
+ return wt.appendChild(o), o;
280
271
  }
281
272
  function bt(e) {
282
273
  e.remove();
283
274
  }
284
- const L = [];
275
+ const B = [];
285
276
  function xt(e, t) {
286
277
  do {
287
278
  if (e.$options.name === "QMenu") {
288
279
  if (e.hide(t), e.$props.separateClosePopup === !0)
289
280
  return X(e);
290
281
  } else if (e.__qPortal === !0) {
291
- const n = X(e);
292
- return n !== void 0 && n.$options.name === "QPopupProxy" ? (e.hide(t), n) : e;
282
+ const o = X(e);
283
+ return o !== void 0 && o.$options.name === "QPopupProxy" ? (e.hide(t), o) : e;
293
284
  }
294
285
  e = X(e);
295
286
  } while (e != null);
296
287
  }
297
- const Et = ke({
288
+ const Et = He({
298
289
  name: "QPortal",
299
290
  setup(e, { slots: t }) {
300
291
  return () => t.default();
@@ -310,31 +301,31 @@ function Tt(e) {
310
301
  }
311
302
  return !1;
312
303
  }
313
- function St(e, t, n, o) {
304
+ function St(e, t, o, n) {
314
305
  const l = T(!1), f = T(!1);
315
306
  let i = null;
316
- const a = {}, m = o === "dialog" && Tt(e);
307
+ const a = {}, m = n === "dialog" && Tt(e);
317
308
  function c(g) {
318
309
  if (g === !0) {
319
310
  ve(a), f.value = !0;
320
311
  return;
321
312
  }
322
- f.value = !1, l.value === !1 && (m === !1 && i === null && (i = yt(!1, o)), l.value = !0, L.push(e.proxy), at(a));
313
+ f.value = !1, l.value === !1 && (m === !1 && i === null && (i = yt(!1, n)), l.value = !0, B.push(e.proxy), at(a));
323
314
  }
324
315
  function r(g) {
325
316
  if (f.value = !1, g !== !0) return;
326
317
  ve(a), l.value = !1;
327
- const p = L.indexOf(e.proxy);
328
- p !== -1 && L.splice(p, 1), i !== null && (bt(i), i = null);
318
+ const p = B.indexOf(e.proxy);
319
+ p !== -1 && B.splice(p, 1), i !== null && (bt(i), i = null);
329
320
  }
330
- return Qe(() => {
321
+ return Ie(() => {
331
322
  r(!0);
332
323
  }), e.proxy.__qPortal = !0, je(e.proxy, "contentEl", () => t.value), {
333
324
  showPortal: c,
334
325
  hidePortal: r,
335
326
  portalIsActive: l,
336
327
  portalIsAccessible: f,
337
- renderPortal: () => m === !0 ? n() : l.value === !0 ? [_(_e, { to: i }, _(Et, n))] : void 0
328
+ renderPortal: () => m === !0 ? o() : l.value === !0 ? [Q(Qe, { to: i }, Q(Et, o))] : void 0
338
329
  };
339
330
  }
340
331
  const Ct = {
@@ -352,63 +343,63 @@ const Ct = {
352
343
  }
353
344
  };
354
345
  function Pt(e, t = () => {
355
- }, n = () => {
346
+ }, o = () => {
356
347
  }) {
357
348
  return {
358
- transitionProps: x(() => {
359
- const o = `q-transition--${e.transitionShow || t()}`, l = `q-transition--${e.transitionHide || n()}`;
349
+ transitionProps: E(() => {
350
+ const n = `q-transition--${e.transitionShow || t()}`, l = `q-transition--${e.transitionHide || o()}`;
360
351
  return {
361
352
  appear: !0,
362
- enterFromClass: `${o}-enter-from`,
363
- enterActiveClass: `${o}-enter-active`,
364
- enterToClass: `${o}-enter-to`,
353
+ enterFromClass: `${n}-enter-from`,
354
+ enterActiveClass: `${n}-enter-active`,
355
+ enterToClass: `${n}-enter-to`,
365
356
  leaveFromClass: `${l}-leave-from`,
366
357
  leaveActiveClass: `${l}-leave-active`,
367
358
  leaveToClass: `${l}-leave-to`
368
359
  };
369
360
  }),
370
- transitionStyle: x(() => `--q-transition-duration: ${e.transitionDuration}ms`)
361
+ transitionStyle: E(() => `--q-transition-duration: ${e.transitionDuration}ms`)
371
362
  };
372
363
  }
373
- function kt() {
364
+ function Ht() {
374
365
  let e;
375
366
  const t = R();
376
- function n() {
367
+ function o() {
377
368
  e = void 0;
378
369
  }
379
- return Se(n), z(n), {
380
- removeTick: n,
381
- registerTick(o) {
382
- e = o, Q(() => {
383
- e === o && (He(t) === !1 && e(), e = void 0);
370
+ return Se(o), z(o), {
371
+ removeTick: o,
372
+ registerTick(n) {
373
+ e = n, I(() => {
374
+ e === n && (ke(t) === !1 && e(), e = void 0);
384
375
  });
385
376
  }
386
377
  };
387
378
  }
388
- function Ht() {
379
+ function kt() {
389
380
  let e = null;
390
381
  const t = R();
391
- function n() {
382
+ function o() {
392
383
  e !== null && (clearTimeout(e), e = null);
393
384
  }
394
- return Se(n), z(n), {
395
- removeTimeout: n,
396
- registerTimeout(o, l) {
397
- n(), He(t) === !1 && (e = setTimeout(() => {
398
- e = null, o();
385
+ return Se(o), z(o), {
386
+ removeTimeout: o,
387
+ registerTimeout(n, l) {
388
+ o(), ke(t) === !1 && (e = setTimeout(() => {
389
+ e = null, n();
399
390
  }, l));
400
391
  }
401
392
  };
402
393
  }
403
394
  const Mt = [Element, String], Wt = [null, document, document.body, document.scrollingElement, document.documentElement];
404
- function $t(e, t) {
405
- let n = Ze(t);
406
- if (n === void 0) {
395
+ function qt(e, t) {
396
+ let o = Ze(t);
397
+ if (o === void 0) {
407
398
  if (e == null)
408
399
  return window;
409
- n = e.closest(".scroll,.scroll-y,.overflow-auto");
400
+ o = e.closest(".scroll,.scroll-y,.overflow-auto");
410
401
  }
411
- return Wt.includes(n) ? window : n;
402
+ return Wt.includes(o) ? window : o;
412
403
  }
413
404
  function jt(e) {
414
405
  return e === window ? window.pageYOffset || window.scrollY || document.body.scrollTop || 0 : e.scrollTop;
@@ -417,7 +408,7 @@ function Ut(e) {
417
408
  return e === window ? window.pageXOffset || window.scrollX || document.body.scrollLeft || 0 : e.scrollLeft;
418
409
  }
419
410
  let O;
420
- function qt() {
411
+ function $t() {
421
412
  if (O !== void 0)
422
413
  return O;
423
414
  const e = document.createElement("p"), t = document.createElement("div");
@@ -433,55 +424,55 @@ function qt() {
433
424
  height: "150px",
434
425
  overflow: "hidden"
435
426
  }), t.appendChild(e), document.body.appendChild(t);
436
- const n = e.offsetWidth;
427
+ const o = e.offsetWidth;
437
428
  t.style.overflow = "scroll";
438
- let o = e.offsetWidth;
439
- return n === o && (o = t.clientWidth), t.remove(), O = n - o, O;
429
+ let n = e.offsetWidth;
430
+ return o === n && (n = t.clientWidth), t.remove(), O = o - n, O;
440
431
  }
441
432
  function Gt(e, t = !0) {
442
433
  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"]));
443
434
  }
444
- const $ = [];
445
- let B;
446
- function At(e) {
447
- B = e.keyCode === 27;
435
+ const q = [];
436
+ let L;
437
+ function Ft(e) {
438
+ L = e.keyCode === 27;
448
439
  }
449
- function Bt() {
450
- B === !0 && (B = !1);
440
+ function Lt() {
441
+ L === !0 && (L = !1);
451
442
  }
452
- function Ft(e) {
453
- B === !0 && (B = !1, Pe(e, 27) === !0 && $[$.length - 1](e));
443
+ function At(e) {
444
+ L === !0 && (L = !1, Pe(e, 27) === !0 && q[q.length - 1](e));
454
445
  }
455
446
  function We(e) {
456
- window[e]("keydown", At), window[e]("blur", Bt), window[e]("keyup", Ft), B = !1;
447
+ window[e]("keydown", Ft), window[e]("blur", Lt), window[e]("keyup", At), L = !1;
457
448
  }
458
- function Lt(e) {
459
- Ce.is.desktop === !0 && ($.push(e), $.length === 1 && We("addEventListener"));
449
+ function Bt(e) {
450
+ Ce.is.desktop === !0 && (q.push(e), q.length === 1 && We("addEventListener"));
460
451
  }
461
452
  function pe(e) {
462
- const t = $.indexOf(e);
463
- t !== -1 && ($.splice(t, 1), $.length === 0 && We("removeEventListener"));
453
+ const t = q.indexOf(e);
454
+ t !== -1 && (q.splice(t, 1), q.length === 0 && We("removeEventListener"));
464
455
  }
465
- const { notPassiveCapture: I } = J, q = [];
456
+ const { notPassiveCapture: _ } = J, $ = [];
466
457
  function N(e) {
467
458
  const t = e.target;
468
459
  if (t === void 0 || t.nodeType === 8 || t.classList.contains("no-pointer-events") === !0)
469
460
  return;
470
- let n = L.length - 1;
471
- for (; n >= 0; ) {
472
- const o = L[n].$;
473
- if (o.type.name === "QTooltip") {
474
- n--;
461
+ let o = B.length - 1;
462
+ for (; o >= 0; ) {
463
+ const n = B[o].$;
464
+ if (n.type.name === "QTooltip") {
465
+ o--;
475
466
  continue;
476
467
  }
477
- if (o.type.name !== "QDialog")
468
+ if (n.type.name !== "QDialog")
478
469
  break;
479
- if (o.props.seamless !== !0)
470
+ if (n.props.seamless !== !0)
480
471
  return;
481
- n--;
472
+ o--;
482
473
  }
483
- for (let o = q.length - 1; o >= 0; o--) {
484
- const l = q[o];
474
+ for (let n = $.length - 1; n >= 0; n--) {
475
+ const l = $[n];
485
476
  if ((l.anchorEl.value === null || l.anchorEl.value.contains(t) === !1) && (t === document.body || l.innerRef.value !== null && l.innerRef.value.contains(t) === !1))
486
477
  e.qClickOutside = !0, l.onClickOutside(e);
487
478
  else
@@ -489,11 +480,11 @@ function N(e) {
489
480
  }
490
481
  }
491
482
  function Dt(e) {
492
- q.push(e), q.length === 1 && (document.addEventListener("mousedown", N, I), document.addEventListener("touchstart", N, I));
483
+ $.push(e), $.length === 1 && (document.addEventListener("mousedown", N, _), document.addEventListener("touchstart", N, _));
493
484
  }
494
485
  function we(e) {
495
- const t = q.findIndex((n) => n === e);
496
- t !== -1 && (q.splice(t, 1), q.length === 0 && (document.removeEventListener("mousedown", N, I), document.removeEventListener("touchstart", N, I)));
486
+ const t = $.findIndex((o) => o === e);
487
+ t !== -1 && ($.splice(t, 1), $.length === 0 && (document.removeEventListener("mousedown", N, _), document.removeEventListener("touchstart", N, _)));
497
488
  }
498
489
  let ye, be;
499
490
  function xe(e) {
@@ -513,36 +504,36 @@ const te = {
513
504
  te[`${e}#ltr`] = e, te[`${e}#rtl`] = e;
514
505
  });
515
506
  function Ee(e, t) {
516
- const n = e.split(" ");
507
+ const o = e.split(" ");
517
508
  return {
518
- vertical: n[0],
519
- horizontal: te[`${n[1]}#${t === !0 ? "rtl" : "ltr"}`]
509
+ vertical: o[0],
510
+ horizontal: te[`${o[1]}#${t === !0 ? "rtl" : "ltr"}`]
520
511
  };
521
512
  }
522
513
  function zt(e, t) {
523
- let { top: n, left: o, right: l, bottom: f, width: i, height: a } = e.getBoundingClientRect();
524
- return t !== void 0 && (n -= t[1], o -= t[0], f += t[1], l += t[0], i += t[0], a += t[1]), {
525
- top: n,
514
+ let { top: o, left: n, right: l, bottom: f, width: i, height: a } = e.getBoundingClientRect();
515
+ return t !== void 0 && (o -= t[1], n -= t[0], f += t[1], l += t[0], i += t[0], a += t[1]), {
516
+ top: o,
526
517
  bottom: f,
527
518
  height: a,
528
- left: o,
519
+ left: n,
529
520
  right: l,
530
521
  width: i,
531
- middle: o + (l - o) / 2,
532
- center: n + (f - n) / 2
522
+ middle: n + (l - n) / 2,
523
+ center: o + (f - o) / 2
533
524
  };
534
525
  }
535
- function Vt(e, t, n) {
536
- let { top: o, left: l } = e.getBoundingClientRect();
537
- return o += t.top, l += t.left, n !== void 0 && (o += n[1], l += n[0]), {
538
- top: o,
539
- bottom: o + 1,
526
+ function Vt(e, t, o) {
527
+ let { top: n, left: l } = e.getBoundingClientRect();
528
+ return n += t.top, l += t.left, o !== void 0 && (n += o[1], l += o[0]), {
529
+ top: n,
530
+ bottom: n + 1,
540
531
  height: 1,
541
532
  left: l,
542
533
  right: l + 1,
543
534
  width: 1,
544
535
  middle: l,
545
- center: o
536
+ center: n
546
537
  };
547
538
  }
548
539
  function Ot(e, t) {
@@ -555,24 +546,24 @@ function Ot(e, t) {
555
546
  right: e
556
547
  };
557
548
  }
558
- function Te(e, t, n, o) {
549
+ function Te(e, t, o, n) {
559
550
  return {
560
- top: e[n.vertical] - t[o.vertical],
561
- left: e[n.horizontal] - t[o.horizontal]
551
+ top: e[o.vertical] - t[n.vertical],
552
+ left: e[o.horizontal] - t[n.horizontal]
562
553
  };
563
554
  }
564
- function $e(e, t = 0) {
555
+ function qe(e, t = 0) {
565
556
  if (e.targetEl === null || e.anchorEl === null || t > 5)
566
557
  return;
567
558
  if (e.targetEl.offsetHeight === 0 || e.targetEl.offsetWidth === 0) {
568
559
  setTimeout(() => {
569
- $e(e, t + 1);
560
+ qe(e, t + 1);
570
561
  }, 10);
571
562
  return;
572
563
  }
573
564
  const {
574
- targetEl: n,
575
- offset: o,
565
+ targetEl: o,
566
+ offset: n,
576
567
  anchorEl: l,
577
568
  anchorOrigin: f,
578
569
  selfOrigin: i,
@@ -583,11 +574,11 @@ function $e(e, t = 0) {
583
574
  maxWidth: g
584
575
  } = e;
585
576
  if (Ce.is.ios === !0 && window.visualViewport !== void 0) {
586
- const A = document.body.style, { offsetLeft: b, offsetTop: E } = window.visualViewport;
587
- b !== ye && (A.setProperty("--q-pe-left", b + "px"), ye = b), E !== be && (A.setProperty("--q-pe-top", E + "px"), be = E);
577
+ const F = document.body.style, { offsetLeft: b, offsetTop: x } = window.visualViewport;
578
+ b !== ye && (F.setProperty("--q-pe-left", b + "px"), ye = b), x !== be && (F.setProperty("--q-pe-top", x + "px"), be = x);
588
579
  }
589
- const { scrollLeft: p, scrollTop: u } = n, d = a === void 0 ? zt(l, c === !0 ? [0, 0] : o) : Vt(l, a, o);
590
- Object.assign(n.style, {
580
+ const { scrollLeft: p, scrollTop: u } = o, d = a === void 0 ? zt(l, c === !0 ? [0, 0] : n) : Vt(l, a, n);
581
+ Object.assign(o.style, {
591
582
  top: 0,
592
583
  left: 0,
593
584
  minWidth: null,
@@ -596,72 +587,72 @@ function $e(e, t = 0) {
596
587
  maxHeight: r,
597
588
  visibility: "visible"
598
589
  });
599
- const { offsetWidth: H, offsetHeight: C } = n, { elWidth: M, elHeight: h } = m === !0 || c === !0 ? { elWidth: Math.max(d.width, H), elHeight: c === !0 ? Math.max(d.height, C) : C } : { elWidth: H, elHeight: C };
590
+ const { offsetWidth: k, offsetHeight: C } = o, { elWidth: M, elHeight: h } = m === !0 || c === !0 ? { elWidth: Math.max(d.width, k), elHeight: c === !0 ? Math.max(d.height, C) : C } : { elWidth: k, elHeight: C };
600
591
  let v = { maxWidth: g, maxHeight: r };
601
- (m === !0 || c === !0) && (v.minWidth = d.width + "px", c === !0 && (v.minHeight = d.height + "px")), Object.assign(n.style, v);
592
+ (m === !0 || c === !0) && (v.minWidth = d.width + "px", c === !0 && (v.minHeight = d.height + "px")), Object.assign(o.style, v);
602
593
  const P = Ot(M, h);
603
594
  let w = Te(d, P, f, i);
604
- if (a === void 0 || o === void 0)
595
+ if (a === void 0 || n === void 0)
605
596
  Z(w, d, P, f, i);
606
597
  else {
607
- const { top: A, left: b } = w;
598
+ const { top: F, left: b } = w;
608
599
  Z(w, d, P, f, i);
609
- let E = !1;
610
- if (w.top !== A) {
611
- E = !0;
612
- const k = 2 * o[1];
613
- d.center = d.top -= k, d.bottom -= k + 2;
600
+ let x = !1;
601
+ if (w.top !== F) {
602
+ x = !0;
603
+ const H = 2 * n[1];
604
+ d.center = d.top -= H, d.bottom -= H + 2;
614
605
  }
615
606
  if (w.left !== b) {
616
- E = !0;
617
- const k = 2 * o[0];
618
- d.middle = d.left -= k, d.right -= k + 2;
607
+ x = !0;
608
+ const H = 2 * n[0];
609
+ d.middle = d.left -= H, d.right -= H + 2;
619
610
  }
620
- E === !0 && (w = Te(d, P, f, i), Z(w, d, P, f, i));
611
+ x === !0 && (w = Te(d, P, f, i), Z(w, d, P, f, i));
621
612
  }
622
613
  v = {
623
614
  top: w.top + "px",
624
615
  left: w.left + "px"
625
- }, w.maxHeight !== void 0 && (v.maxHeight = w.maxHeight + "px", d.height > w.maxHeight && (v.minHeight = v.maxHeight)), w.maxWidth !== void 0 && (v.maxWidth = w.maxWidth + "px", d.width > w.maxWidth && (v.minWidth = v.maxWidth)), Object.assign(n.style, v), n.scrollTop !== u && (n.scrollTop = u), n.scrollLeft !== p && (n.scrollLeft = p);
616
+ }, w.maxHeight !== void 0 && (v.maxHeight = w.maxHeight + "px", d.height > w.maxHeight && (v.minHeight = v.maxHeight)), w.maxWidth !== void 0 && (v.maxWidth = w.maxWidth + "px", d.width > w.maxWidth && (v.minWidth = v.maxWidth)), Object.assign(o.style, v), o.scrollTop !== u && (o.scrollTop = u), o.scrollLeft !== p && (o.scrollLeft = p);
626
617
  }
627
- function Z(e, t, n, o, l) {
628
- const f = n.bottom, i = n.right, a = qt(), m = window.innerHeight - a, c = document.body.clientWidth;
618
+ function Z(e, t, o, n, l) {
619
+ const f = o.bottom, i = o.right, a = $t(), m = window.innerHeight - a, c = document.body.clientWidth;
629
620
  if (e.top < 0 || e.top + f > m)
630
621
  if (l.vertical === "center")
631
- e.top = t[o.vertical] > m / 2 ? Math.max(0, m - f) : 0, e.maxHeight = Math.min(f, m);
632
- else if (t[o.vertical] > m / 2) {
622
+ e.top = t[n.vertical] > m / 2 ? Math.max(0, m - f) : 0, e.maxHeight = Math.min(f, m);
623
+ else if (t[n.vertical] > m / 2) {
633
624
  const r = Math.min(
634
625
  m,
635
- o.vertical === "center" ? t.center : o.vertical === l.vertical ? t.bottom : t.top
626
+ n.vertical === "center" ? t.center : n.vertical === l.vertical ? t.bottom : t.top
636
627
  );
637
628
  e.maxHeight = Math.min(f, r), e.top = Math.max(0, r - f);
638
629
  } else
639
630
  e.top = Math.max(
640
631
  0,
641
- o.vertical === "center" ? t.center : o.vertical === l.vertical ? t.top : t.bottom
632
+ n.vertical === "center" ? t.center : n.vertical === l.vertical ? t.top : t.bottom
642
633
  ), e.maxHeight = Math.min(f, m - e.top);
643
634
  if (e.left < 0 || e.left + i > c)
644
635
  if (e.maxWidth = Math.min(i, c), l.horizontal === "middle")
645
- e.left = t[o.horizontal] > c / 2 ? Math.max(0, c - i) : 0;
646
- else if (t[o.horizontal] > c / 2) {
636
+ e.left = t[n.horizontal] > c / 2 ? Math.max(0, c - i) : 0;
637
+ else if (t[n.horizontal] > c / 2) {
647
638
  const r = Math.min(
648
639
  c,
649
- o.horizontal === "middle" ? t.middle : o.horizontal === l.horizontal ? t.right : t.left
640
+ n.horizontal === "middle" ? t.middle : n.horizontal === l.horizontal ? t.right : t.left
650
641
  );
651
642
  e.maxWidth = Math.min(i, r), e.left = Math.max(0, r - e.maxWidth);
652
643
  } else
653
644
  e.left = Math.max(
654
645
  0,
655
- o.horizontal === "middle" ? t.middle : o.horizontal === l.horizontal ? t.left : t.right
646
+ n.horizontal === "middle" ? t.middle : n.horizontal === l.horizontal ? t.left : t.right
656
647
  ), e.maxWidth = Math.min(i, c - e.left);
657
648
  }
658
- const Xt = ke({
649
+ const Xt = He({
659
650
  name: "QMenu",
660
651
  inheritAttrs: !1,
661
652
  props: {
662
653
  ...dt,
663
654
  ...ht,
664
- ...ot,
655
+ ...lt,
665
656
  ...Ct,
666
657
  persistent: Boolean,
667
658
  autoClose: Boolean,
@@ -700,37 +691,37 @@ const Xt = ke({
700
691
  "click",
701
692
  "escapeKey"
702
693
  ],
703
- setup(e, { slots: t, emit: n, attrs: o }) {
694
+ setup(e, { slots: t, emit: o, attrs: n }) {
704
695
  let l = null, f, i, a;
705
- const m = R(), { proxy: c } = m, { $q: r } = c, g = T(null), p = T(!1), u = x(
696
+ const m = R(), { proxy: c } = m, { $q: r } = c, g = T(null), p = T(!1), u = E(
706
697
  () => e.persistent !== !0 && e.noRouteDismiss !== !0
707
- ), d = lt(e, r), { registerTick: H, removeTick: C } = kt(), { registerTimeout: M } = Ht(), { transitionProps: h, transitionStyle: v } = Pt(e), { localScrollTarget: P, changeScrollEvent: w, unconfigureScrollTarget: A } = mt(e, re), { anchorEl: b, canShow: E } = ft({ showing: p }), { hide: k } = gt({
698
+ ), d = Je(e, r), { registerTick: k, removeTick: C } = Ht(), { registerTimeout: M } = kt(), { transitionProps: h, transitionStyle: v } = Pt(e), { localScrollTarget: P, changeScrollEvent: w, unconfigureScrollTarget: F } = mt(e, re), { anchorEl: b, canShow: x } = ft({ showing: p }), { hide: H } = gt({
708
699
  showing: p,
709
- canShow: E,
710
- handleShow: Le,
700
+ canShow: x,
701
+ handleShow: Be,
711
702
  handleHide: De,
712
703
  hideOnRouteChange: u,
713
704
  processOnMount: !0
714
- }), { showPortal: oe, hidePortal: le, renderPortal: qe } = St(m, g, ze, "menu"), K = {
705
+ }), { showPortal: ne, hidePortal: le, renderPortal: $e } = St(m, g, ze, "menu"), K = {
715
706
  anchorEl: b,
716
707
  innerRef: g,
717
708
  onClickOutside(s) {
718
709
  if (e.persistent !== !0 && p.value === !0)
719
- return k(s), // always prevent touch event
710
+ return H(s), // always prevent touch event
720
711
  (s.type === "touchstart" || s.target.classList.contains("q-dialog__backdrop")) && nt(s), !0;
721
712
  }
722
- }, ie = x(
713
+ }, ie = E(
723
714
  () => Ee(
724
715
  e.anchor || (e.cover === !0 ? "center middle" : "bottom start"),
725
716
  r.lang.rtl
726
717
  )
727
- ), Ae = x(() => e.cover === !0 ? ie.value : Ee(e.self || "top start", r.lang.rtl)), Be = x(
718
+ ), Fe = E(() => e.cover === !0 ? ie.value : Ee(e.self || "top start", r.lang.rtl)), Le = E(
728
719
  () => (e.square === !0 ? " q-menu--square" : "") + (d.value === !0 ? " q-menu--dark q-dark" : "")
729
- ), Fe = x(() => e.autoClose === !0 ? { onClick: Re } : {}), ue = x(
720
+ ), Ae = E(() => e.autoClose === !0 ? { onClick: Re } : {}), ue = E(
730
721
  () => p.value === !0 && e.persistent !== !0
731
722
  );
732
723
  S(ue, (s) => {
733
- s === !0 ? (Lt(U), Dt(K)) : (pe(U), we(K));
724
+ s === !0 ? (Bt(U), Dt(K)) : (pe(U), we(K));
734
725
  });
735
726
  function j() {
736
727
  rt(() => {
@@ -738,9 +729,9 @@ const Xt = ke({
738
729
  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 }));
739
730
  });
740
731
  }
741
- function Le(s) {
742
- if (l = e.noRefocus === !1 ? document.activeElement : null, Ge(se), oe(), re(), f = void 0, s !== void 0 && (e.touchPosition || e.contextMenu)) {
743
- const G = et(s);
732
+ function Be(s) {
733
+ if (l = e.noRefocus === !1 ? document.activeElement : null, Ge(se), ne(), re(), f = void 0, s !== void 0 && (e.touchPosition || e.contextMenu)) {
734
+ const G = tt(s);
744
735
  if (G.left !== void 0) {
745
736
  const { top: Ve, left: Oe } = b.value.getBoundingClientRect();
746
737
  f = { left: G.left - Oe, top: G.top - Ve };
@@ -748,41 +739,41 @@ const Xt = ke({
748
739
  }
749
740
  i === void 0 && (i = S(
750
741
  () => r.screen.width + "|" + r.screen.height + "|" + e.self + "|" + e.anchor + "|" + r.lang.rtl,
751
- F
752
- )), e.noFocus !== !0 && document.activeElement.blur(), H(() => {
753
- F(), e.noFocus !== !0 && j();
742
+ A
743
+ )), e.noFocus !== !0 && document.activeElement.blur(), k(() => {
744
+ A(), e.noFocus !== !0 && j();
754
745
  }), M(() => {
755
- r.platform.is.ios === !0 && (a = e.autoClose, g.value.click()), F(), oe(!0), n("show", s);
746
+ r.platform.is.ios === !0 && (a = e.autoClose, g.value.click()), A(), ne(!0), o("show", s);
756
747
  }, e.transitionDuration);
757
748
  }
758
749
  function De(s) {
759
750
  C(), le(), ae(!0), l !== null && // menu was hidden from code or ESC plugin
760
751
  (s === void 0 || s.qClickOutside !== !0) && (((s && s.type.indexOf("key") === 0 ? l.closest('[tabindex]:not([tabindex^="-"])') : void 0) || l).focus(), l = null), M(() => {
761
- le(!0), n("hide", s);
752
+ le(!0), o("hide", s);
762
753
  }, e.transitionDuration);
763
754
  }
764
755
  function ae(s) {
765
- f = void 0, i !== void 0 && (i(), i = void 0), (s === !0 || p.value === !0) && (Ue(se), A(), we(K), pe(U)), s !== !0 && (l = null);
756
+ f = void 0, i !== void 0 && (i(), i = void 0), (s === !0 || p.value === !0) && (Ue(se), F(), we(K), pe(U)), s !== !0 && (l = null);
766
757
  }
767
758
  function re() {
768
- (b.value !== null || e.scrollTarget !== void 0) && (P.value = $t(b.value, e.scrollTarget), w(P.value, F));
759
+ (b.value !== null || e.scrollTarget !== void 0) && (P.value = qt(b.value, e.scrollTarget), w(P.value, A));
769
760
  }
770
761
  function Re(s) {
771
- a !== !0 ? (xt(c, s), n("click", s)) : a = !1;
762
+ a !== !0 ? (xt(c, s), o("click", s)) : a = !1;
772
763
  }
773
764
  function se(s) {
774
- ue.value === !0 && e.noFocus !== !0 && tt(g.value, s.target) !== !0 && j();
765
+ ue.value === !0 && e.noFocus !== !0 && ot(g.value, s.target) !== !0 && j();
775
766
  }
776
767
  function U(s) {
777
- n("escapeKey"), k(s);
768
+ o("escapeKey"), H(s);
778
769
  }
779
- function F() {
780
- $e({
770
+ function A() {
771
+ qe({
781
772
  targetEl: g.value,
782
773
  offset: e.offset,
783
774
  anchorEl: b.value,
784
775
  anchorOrigin: ie.value,
785
- selfOrigin: Ae.value,
776
+ selfOrigin: Fe.value,
786
777
  absoluteOffset: f,
787
778
  fit: e.fit,
788
779
  cover: e.cover,
@@ -791,47 +782,45 @@ const Xt = ke({
791
782
  });
792
783
  }
793
784
  function ze() {
794
- return _(
795
- Ie,
785
+ return Q(
786
+ _e,
796
787
  h.value,
797
- () => p.value === !0 ? _("div", {
788
+ () => p.value === !0 ? Q("div", {
798
789
  role: "menu",
799
- ...o,
790
+ ...n,
800
791
  ref: g,
801
792
  tabindex: -1,
802
793
  class: [
803
- "q-menu q-position-engine scroll" + Be.value,
804
- o.class
794
+ "q-menu q-position-engine scroll" + Le.value,
795
+ n.class
805
796
  ],
806
797
  style: [
807
- o.style,
798
+ n.style,
808
799
  v.value
809
800
  ],
810
- ...Fe.value
811
- }, Je(t.default)) : null
801
+ ...Ae.value
802
+ }, et(t.default)) : null
812
803
  );
813
804
  }
814
- return z(ae), Object.assign(c, { focus: j, updatePosition: F }), qe;
805
+ return z(ae), Object.assign(c, { focus: j, updatePosition: A }), $e;
815
806
  }
816
807
  });
817
808
  export {
818
809
  Xt as Q,
819
- ot as a,
820
- Nt as b,
821
- rt as c,
822
- jt as d,
823
- Ht as e,
824
- kt as f,
810
+ rt as a,
811
+ jt as b,
812
+ kt as c,
813
+ Ht as d,
814
+ Pt as e,
815
+ St as f,
825
816
  Ut as g,
826
817
  Gt as h,
827
- Pt as i,
828
- St as j,
829
- gt as k,
830
- pe as l,
831
- vt as m,
832
- Ct as n,
833
- ht as o,
834
- Lt as p,
818
+ gt as i,
819
+ pe as j,
820
+ vt as k,
821
+ Ct as l,
822
+ ht as m,
823
+ Bt as n,
835
824
  Kt as r,
836
- lt as u
825
+ Nt as u
837
826
  };