vrembem 4.0.0-next.6 → 4.0.0-next.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/README.md +3 -7
- package/dev/index.css +1062 -865
- package/dev/index.css.map +1 -1
- package/dev/index.js +685 -685
- package/dev/index.js.map +1 -1
- package/dev/index.umd.cjs +685 -685
- package/dev/index.umd.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +304 -304
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +3 -3
- package/dist/index.umd.cjs.map +1 -1
- package/index.js +4 -4
- package/package.json +23 -23
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
var ze = (e, t, n) => {
|
|
2
2
|
if (!t.has(e))
|
|
3
3
|
throw TypeError("Cannot " + n);
|
|
4
|
-
}, j = (e, t, n) => (ze(e, t, "read from private field"), n ? n.call(e) : t.get(e)),
|
|
4
|
+
}, j = (e, t, n) => (ze(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Ht = (e, t, n) => {
|
|
5
5
|
if (t.has(e))
|
|
6
6
|
throw TypeError("Cannot add the same private member more than once");
|
|
7
7
|
t instanceof WeakSet ? t.add(e) : t.set(e, n);
|
|
8
|
-
}, nt = (e, t, n, i) => (ze(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n),
|
|
9
|
-
let
|
|
8
|
+
}, nt = (e, t, n, i) => (ze(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), R;
|
|
9
|
+
let An = class {
|
|
10
10
|
constructor(t, n) {
|
|
11
|
-
|
|
11
|
+
Ht(this, R, void 0), this.value = t, nt(this, R, n), this.mql = null;
|
|
12
12
|
}
|
|
13
13
|
get handler() {
|
|
14
|
-
return j(this,
|
|
14
|
+
return j(this, R);
|
|
15
15
|
}
|
|
16
16
|
// Unmount existing handler before setting a new one.
|
|
17
17
|
set handler(t) {
|
|
18
|
-
this.mql && this.mql.removeEventListener("change", j(this,
|
|
18
|
+
this.mql && this.mql.removeEventListener("change", j(this, R)), nt(this, R, t);
|
|
19
19
|
}
|
|
20
20
|
mount(t, n) {
|
|
21
|
-
return t && (this.value = t), n && nt(this,
|
|
21
|
+
return t && (this.value = t), n && nt(this, R, n), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), this.mql.addEventListener("change", j(this, R)), j(this, R).call(this, this.mql), this) : this;
|
|
22
22
|
}
|
|
23
23
|
unmount() {
|
|
24
|
-
return this.mql ? (this.mql.removeEventListener("change", j(this,
|
|
24
|
+
return this.mql ? (this.mql.removeEventListener("change", j(this, R)), this.value = null, nt(this, R, null), this.mql = null, this) : this;
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
let
|
|
27
|
+
R = /* @__PURE__ */ new WeakMap();
|
|
28
|
+
let In = class {
|
|
29
29
|
constructor() {
|
|
30
30
|
this.collection = [];
|
|
31
31
|
}
|
|
@@ -78,16 +78,16 @@ const p = {
|
|
|
78
78
|
`[contenteditable]${p.inert}${p.negTabIndex}`,
|
|
79
79
|
`[tabindex]${p.inert}${p.negTabIndex}`
|
|
80
80
|
];
|
|
81
|
-
var
|
|
82
|
-
let
|
|
81
|
+
var $t, at, lt;
|
|
82
|
+
let Mn = class {
|
|
83
83
|
constructor(t = null, n = "[data-focus]") {
|
|
84
|
-
|
|
84
|
+
Ht(this, $t, void 0), Ht(this, at, void 0), Ht(this, lt, void 0), this.el = t, this.selectorFocus = n, nt(this, at, Dn.bind(this)), nt(this, lt, jn.bind(this));
|
|
85
85
|
}
|
|
86
86
|
get focusable() {
|
|
87
|
-
return j(this,
|
|
87
|
+
return j(this, $t);
|
|
88
88
|
}
|
|
89
89
|
set focusable(t) {
|
|
90
|
-
nt(this,
|
|
90
|
+
nt(this, $t, t), j(this, $t).length ? (document.removeEventListener("keydown", j(this, lt)), document.addEventListener("keydown", j(this, at))) : (document.removeEventListener("keydown", j(this, at)), document.addEventListener("keydown", j(this, lt)));
|
|
91
91
|
}
|
|
92
92
|
get focusableFirst() {
|
|
93
93
|
return this.focusable[0];
|
|
@@ -111,24 +111,24 @@ let Dn = class {
|
|
|
111
111
|
}), t.scrollTop = r, i.focus(), n;
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
|
-
|
|
115
|
-
function
|
|
114
|
+
$t = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap();
|
|
115
|
+
function Dn(e) {
|
|
116
116
|
(e.key === "Tab" || e.keyCode === 9) && (e.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (e.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (e.preventDefault(), this.focusableFirst.focus()));
|
|
117
117
|
}
|
|
118
118
|
function jn(e) {
|
|
119
119
|
(e.key === "Tab" || e.keyCode === 9) && e.preventDefault();
|
|
120
120
|
}
|
|
121
121
|
function Ke() {
|
|
122
|
-
return getComputedStyle(document.body).getPropertyValue("--
|
|
122
|
+
return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
|
|
123
123
|
}
|
|
124
|
-
function Ge(e, t = document.body
|
|
125
|
-
if (
|
|
126
|
-
const
|
|
127
|
-
|
|
124
|
+
function Ge(e, t = document.body) {
|
|
125
|
+
if (e.slice(0, 2) !== "--") {
|
|
126
|
+
const i = Ke();
|
|
127
|
+
i && (e = `${i}${e}`), e = `--${e}`;
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
if (
|
|
131
|
-
return
|
|
129
|
+
const n = getComputedStyle(t).getPropertyValue(e).trim();
|
|
130
|
+
if (n)
|
|
131
|
+
return n;
|
|
132
132
|
throw new Error(`CSS variable "${e}" was not found!`);
|
|
133
133
|
}
|
|
134
134
|
function qn(e, t) {
|
|
@@ -155,7 +155,7 @@ function Nn(e, t, n) {
|
|
|
155
155
|
let s = null;
|
|
156
156
|
return i || (s = document.createComment("teleported #" + e.id), e.before(s)), t[n](e), i && t.remove(), s;
|
|
157
157
|
}
|
|
158
|
-
function Wn(e, t, n, i = "
|
|
158
|
+
function Wn(e, t, n, i = "transition-duration") {
|
|
159
159
|
return new Promise((r) => {
|
|
160
160
|
if (typeof i == "string") {
|
|
161
161
|
const s = Ge(i, e), a = !!s.includes("ms");
|
|
@@ -176,40 +176,40 @@ function Bn(e, t) {
|
|
|
176
176
|
e ? (n.inert = !0, n.setAttribute("aria-hidden", !0)) : (n.inert = null, n.removeAttribute("aria-hidden"));
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function Vn(e, t) {
|
|
180
180
|
Bn(!!e, t.selectorInert), _n(!!e, t.selectorOverflow);
|
|
181
181
|
}
|
|
182
182
|
const zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
183
183
|
__proto__: null,
|
|
184
|
-
Breakpoint:
|
|
185
|
-
Collection:
|
|
186
|
-
FocusTrap:
|
|
184
|
+
Breakpoint: An,
|
|
185
|
+
Collection: In,
|
|
186
|
+
FocusTrap: Mn,
|
|
187
187
|
cssVar: Ge,
|
|
188
188
|
getConfig: qn,
|
|
189
189
|
getPrefix: Ke,
|
|
190
190
|
localStore: Fn,
|
|
191
191
|
teleport: Nn,
|
|
192
192
|
transition: Wn,
|
|
193
|
-
updateGlobalState:
|
|
193
|
+
updateGlobalState: Vn
|
|
194
194
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
195
195
|
var Qe = (e, t, n) => {
|
|
196
196
|
if (!t.has(e))
|
|
197
197
|
throw TypeError("Cannot " + n);
|
|
198
|
-
},
|
|
198
|
+
}, Bt = (e, t, n) => (Qe(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Ie = (e, t, n) => {
|
|
199
199
|
if (t.has(e))
|
|
200
200
|
throw TypeError("Cannot add the same private member more than once");
|
|
201
201
|
t instanceof WeakSet ? t.add(e) : t.set(e, n);
|
|
202
202
|
}, Pe = (e, t, n, i) => (Qe(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), Ze = (e, t, n) => {
|
|
203
203
|
if (!t.has(e))
|
|
204
204
|
throw TypeError("Cannot " + n);
|
|
205
|
-
}, q = (e, t, n) => (Ze(e, t, "read from private field"), n ? n.call(e) : t.get(e)),
|
|
205
|
+
}, q = (e, t, n) => (Ze(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Jt = (e, t, n) => {
|
|
206
206
|
if (t.has(e))
|
|
207
207
|
throw TypeError("Cannot add the same private member more than once");
|
|
208
208
|
t instanceof WeakSet ? t.add(e) : t.set(e, n);
|
|
209
209
|
}, it = (e, t, n, i) => (Ze(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), H;
|
|
210
|
-
let
|
|
210
|
+
let Rn = class {
|
|
211
211
|
constructor(t, n) {
|
|
212
|
-
|
|
212
|
+
Jt(this, H, void 0), this.value = t, it(this, H, n), this.mql = null;
|
|
213
213
|
}
|
|
214
214
|
get handler() {
|
|
215
215
|
return q(this, H);
|
|
@@ -279,16 +279,16 @@ const g = {
|
|
|
279
279
|
`[contenteditable]${g.inert}${g.negTabIndex}`,
|
|
280
280
|
`[tabindex]${g.inert}${g.negTabIndex}`
|
|
281
281
|
];
|
|
282
|
-
var
|
|
282
|
+
var Et, ct, dt;
|
|
283
283
|
let zn = class {
|
|
284
284
|
constructor(t = null, n = "[data-focus]") {
|
|
285
|
-
|
|
285
|
+
Jt(this, Et, void 0), Jt(this, ct, void 0), Jt(this, dt, void 0), this.el = t, this.selectorFocus = n, it(this, ct, Kn.bind(this)), it(this, dt, Gn.bind(this));
|
|
286
286
|
}
|
|
287
287
|
get focusable() {
|
|
288
|
-
return q(this,
|
|
288
|
+
return q(this, Et);
|
|
289
289
|
}
|
|
290
290
|
set focusable(t) {
|
|
291
|
-
it(this,
|
|
291
|
+
it(this, Et, t), q(this, Et).length ? (document.removeEventListener("keydown", q(this, dt)), document.addEventListener("keydown", q(this, ct))) : (document.removeEventListener("keydown", q(this, ct)), document.addEventListener("keydown", q(this, dt)));
|
|
292
292
|
}
|
|
293
293
|
get focusableFirst() {
|
|
294
294
|
return this.focusable[0];
|
|
@@ -312,7 +312,7 @@ let zn = class {
|
|
|
312
312
|
}), t.scrollTop = r, i.focus(), n;
|
|
313
313
|
}
|
|
314
314
|
};
|
|
315
|
-
|
|
315
|
+
Et = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap();
|
|
316
316
|
function Kn(e) {
|
|
317
317
|
(e.key === "Tab" || e.keyCode === 9) && (e.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (e.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (e.preventDefault(), this.focusableFirst.focus()));
|
|
318
318
|
}
|
|
@@ -320,16 +320,16 @@ function Gn(e) {
|
|
|
320
320
|
(e.key === "Tab" || e.keyCode === 9) && e.preventDefault();
|
|
321
321
|
}
|
|
322
322
|
function Xe() {
|
|
323
|
-
return getComputedStyle(document.body).getPropertyValue("--
|
|
323
|
+
return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
|
|
324
324
|
}
|
|
325
|
-
function Qn(e, t = document.body
|
|
326
|
-
if (
|
|
327
|
-
const
|
|
328
|
-
|
|
325
|
+
function Qn(e, t = document.body) {
|
|
326
|
+
if (e.slice(0, 2) !== "--") {
|
|
327
|
+
const i = Xe();
|
|
328
|
+
i && (e = `${i}${e}`), e = `--${e}`;
|
|
329
329
|
}
|
|
330
|
-
const
|
|
331
|
-
if (
|
|
332
|
-
return
|
|
330
|
+
const n = getComputedStyle(t).getPropertyValue(e).trim();
|
|
331
|
+
if (n)
|
|
332
|
+
return n;
|
|
333
333
|
throw new Error(`CSS variable "${e}" was not found!`);
|
|
334
334
|
}
|
|
335
335
|
function Zn(e, t) {
|
|
@@ -347,7 +347,7 @@ function Xn(e, t = !0) {
|
|
|
347
347
|
}
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
function Ye(e, t, n, i = "
|
|
350
|
+
function Ye(e, t, n, i = "transition-duration") {
|
|
351
351
|
return new Promise((r) => {
|
|
352
352
|
if (typeof i == "string") {
|
|
353
353
|
const s = Qn(i, e), a = !!s.includes("ms");
|
|
@@ -368,11 +368,11 @@ function Un(e, t) {
|
|
|
368
368
|
e ? (n.inert = !0, n.setAttribute("aria-hidden", !0)) : (n.inert = null, n.removeAttribute("aria-hidden"));
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function ce(e, t) {
|
|
372
372
|
Un(!!e, t.selectorInert), Yn(!!e, t.selectorOverflow);
|
|
373
373
|
}
|
|
374
374
|
const ti = {
|
|
375
|
-
|
|
375
|
+
autoMount: !1,
|
|
376
376
|
// Data attributes
|
|
377
377
|
dataOpen: "drawer-open",
|
|
378
378
|
dataClose: "drawer-close",
|
|
@@ -401,9 +401,28 @@ const ti = {
|
|
|
401
401
|
storeKey: "VB:DrawerState",
|
|
402
402
|
setTabindex: !0,
|
|
403
403
|
transition: !0,
|
|
404
|
-
transitionDuration: "
|
|
404
|
+
transitionDuration: "drawer-transition-duration"
|
|
405
405
|
};
|
|
406
|
-
|
|
406
|
+
function ei(e) {
|
|
407
|
+
e.store === "opened" ? e.open(!1, !1) : e.store === "closed" ? e.close(!1, !1) : e.store === "indeterminate" ? e.state = "indeterminate" : e.el.classList.contains(e.getSetting("stateOpened")) ? e.open(!1, !1) : e.el.classList.contains(e.getSetting("stateClosed")) ? e.close(!1, !1) : e.state = "indeterminate";
|
|
408
|
+
}
|
|
409
|
+
async function ni(e) {
|
|
410
|
+
e.store === "opened" ? await e.open(!1, !1) : e.store === "closed" ? await e.close(!1, !1) : e.store === "indeterminate" ? e.state != "indeterminate" && (e.state = "indeterminate") : (e.state != e.inlineState && (e.state = e.inlineState), e.inlineState === "opened" ? await e.open(!1, !1) : e.inlineState === "closed" && await e.close(!1, !1));
|
|
411
|
+
}
|
|
412
|
+
function ii(e) {
|
|
413
|
+
const t = Xe(), n = e.getAttribute(`data-${this.settings.dataBreakpoint}`);
|
|
414
|
+
return this.settings.breakpoints && this.settings.breakpoints[n] ? this.settings.breakpoints[n] : getComputedStyle(document.body).getPropertyValue(`--${t}breakpoint-${n}`).trim() ? getComputedStyle(document.body).getPropertyValue(`--${t}breakpoint-${n}`).trim() : n;
|
|
415
|
+
}
|
|
416
|
+
function ft(e) {
|
|
417
|
+
const t = typeof e == "string" ? this.get(e) : this.get(e.id);
|
|
418
|
+
if (t)
|
|
419
|
+
return t;
|
|
420
|
+
throw new Error(`Drawer not found in collection with id of "${e.id || e}".`);
|
|
421
|
+
}
|
|
422
|
+
function Ue(e) {
|
|
423
|
+
e.state === "opened" ? e.mode === "modal" ? this.focusTrap.mount(e.dialog, this.settings.selectorFocus) : this.focusTrap.focus(e.dialog, this.settings.selectorFocus) : (e.trigger && (e.trigger.focus(), e.trigger = null), this.focusTrap.unmount());
|
|
424
|
+
}
|
|
425
|
+
async function ri(e) {
|
|
407
426
|
const t = e.target.closest(`
|
|
408
427
|
[data-${this.settings.dataOpen}],
|
|
409
428
|
[data-${this.settings.dataToggle}],
|
|
@@ -411,14 +430,14 @@ async function ei(e) {
|
|
|
411
430
|
`);
|
|
412
431
|
if (t) {
|
|
413
432
|
e.preventDefault(), t.matches(`[data-${this.settings.dataToggle}]`) && t.getAttribute(`data-${this.settings.dataToggle}`).trim().split(" ").forEach((n) => {
|
|
414
|
-
const i =
|
|
433
|
+
const i = ft.call(this, n);
|
|
415
434
|
return i.trigger = t, i.toggle();
|
|
416
435
|
}), t.matches(`[data-${this.settings.dataOpen}]`) && t.getAttribute(`data-${this.settings.dataOpen}`).trim().split(" ").forEach((n) => {
|
|
417
|
-
const i =
|
|
436
|
+
const i = ft.call(this, n);
|
|
418
437
|
return i.trigger = t, i.open();
|
|
419
438
|
}), t.matches(`[data-${this.settings.dataClose}]`) && t.getAttribute(`data-${this.settings.dataClose}`).trim().split(" ").forEach((n) => {
|
|
420
439
|
if (n) {
|
|
421
|
-
const i =
|
|
440
|
+
const i = ft.call(this, n);
|
|
422
441
|
return i.trigger = t, i.close();
|
|
423
442
|
} else {
|
|
424
443
|
const i = e.target.closest(this.settings.selectorDrawer);
|
|
@@ -431,11 +450,11 @@ async function ei(e) {
|
|
|
431
450
|
if (this.activeModal && e.target.matches(this.settings.selectorScreen))
|
|
432
451
|
return this.close(this.activeModal.id);
|
|
433
452
|
}
|
|
434
|
-
function
|
|
453
|
+
function si(e) {
|
|
435
454
|
if (e.key === "Escape" && this.activeModal)
|
|
436
455
|
return this.close(this.activeModal);
|
|
437
456
|
}
|
|
438
|
-
async function
|
|
457
|
+
async function ie(e, t = !0) {
|
|
439
458
|
const n = this.collection.findIndex((i) => i.id === e.id);
|
|
440
459
|
if (n >= 0) {
|
|
441
460
|
const i = this.collection[n];
|
|
@@ -445,54 +464,35 @@ async function ee(e, t = !0) {
|
|
|
445
464
|
}
|
|
446
465
|
return this.collection;
|
|
447
466
|
}
|
|
448
|
-
function
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
async function ri(e) {
|
|
452
|
-
e.store === "opened" ? await e.open(!1, !1) : e.store === "closed" ? await e.close(!1, !1) : e.store === "indeterminate" ? e.state != "indeterminate" && (e.state = "indeterminate") : (e.state != e.inlineState && (e.state = e.inlineState), e.inlineState === "opened" ? await e.open(!1, !1) : e.inlineState === "closed" && await e.close(!1, !1));
|
|
453
|
-
}
|
|
454
|
-
function si(e) {
|
|
455
|
-
const t = Xe(), n = e.getAttribute(`data-${this.settings.dataBreakpoint}`);
|
|
456
|
-
return this.settings.breakpoints && this.settings.breakpoints[n] ? this.settings.breakpoints[n] : getComputedStyle(document.body).getPropertyValue(`--${t}breakpoint-${n}`).trim() ? getComputedStyle(document.body).getPropertyValue(`--${t}breakpoint-${n}`).trim() : n;
|
|
457
|
-
}
|
|
458
|
-
function le(e) {
|
|
459
|
-
const t = typeof e == "string" ? this.get(e) : this.get(e.id);
|
|
460
|
-
if (t)
|
|
461
|
-
return t;
|
|
462
|
-
throw new Error(`Drawer not found in collection with id of "${e.id || e}".`);
|
|
463
|
-
}
|
|
464
|
-
function Ue(e) {
|
|
465
|
-
e.state === "opened" ? e.mode === "modal" ? this.focusTrap.mount(e.dialog, this.settings.selectorFocus) : this.focusTrap.focus(e.dialog, this.settings.selectorFocus) : (e.trigger && (e.trigger.focus(), e.trigger = null), this.focusTrap.unmount());
|
|
466
|
-
}
|
|
467
|
-
async function ce(e, t, n = !0) {
|
|
468
|
-
const i = le.call(this, e), r = { ...this.settings, ...i.settings };
|
|
467
|
+
async function de(e, t, n = !0) {
|
|
468
|
+
const i = ft.call(this, e), r = { ...this.settings, ...i.settings };
|
|
469
469
|
return t !== void 0 && (r.transition = t), (i.state === "closed" || i.state === "indeterminate") && (i.state = "opening", r.transition ? await Ye(i.el, {
|
|
470
470
|
start: r.stateClosing,
|
|
471
471
|
finish: r.stateClosed
|
|
472
472
|
}, {
|
|
473
473
|
start: r.stateOpening,
|
|
474
474
|
finish: r.stateOpened
|
|
475
|
-
}, r.transitionDuration) : (i.el.classList.add(r.stateOpened), i.el.classList.remove(r.stateClosed)), i.state = "opened", i.mode === "modal" &&
|
|
475
|
+
}, r.transitionDuration) : (i.el.classList.add(r.stateOpened), i.el.classList.remove(r.stateClosed)), i.state = "opened", i.mode === "modal" && ce(!0, r), n && Ue.call(this, i), i.el.dispatchEvent(new CustomEvent(r.customEventPrefix + "opened", {
|
|
476
476
|
detail: this,
|
|
477
477
|
bubbles: !0
|
|
478
478
|
}))), i;
|
|
479
479
|
}
|
|
480
|
-
async function
|
|
481
|
-
const i =
|
|
480
|
+
async function Gt(e, t, n = !0) {
|
|
481
|
+
const i = ft.call(this, e), r = { ...this.settings, ...i.settings };
|
|
482
482
|
return t !== void 0 && (r.transition = t), (i.state === "opened" || i.state === "indeterminate") && (i.state = "closing", document.activeElement.blur(), r.transition ? await Ye(i.el, {
|
|
483
483
|
start: r.stateOpening,
|
|
484
484
|
finish: r.stateOpened
|
|
485
485
|
}, {
|
|
486
486
|
start: r.stateClosing,
|
|
487
487
|
finish: r.stateClosed
|
|
488
|
-
}, r.transitionDuration) : (i.el.classList.add(r.stateClosed), i.el.classList.remove(r.stateOpened)), i.state = "closed", i.mode === "modal" &&
|
|
488
|
+
}, r.transitionDuration) : (i.el.classList.add(r.stateClosed), i.el.classList.remove(r.stateOpened)), i.state = "closed", i.mode === "modal" && ce(!1, r), n && Ue.call(this, i), i.el.dispatchEvent(new CustomEvent(r.customEventPrefix + "closed", {
|
|
489
489
|
detail: this,
|
|
490
490
|
bubbles: !0
|
|
491
491
|
}))), i;
|
|
492
492
|
}
|
|
493
493
|
async function tn(e, t, n) {
|
|
494
|
-
const i =
|
|
495
|
-
return i.state === "closed" ?
|
|
494
|
+
const i = ft.call(this, e);
|
|
495
|
+
return i.state === "closed" ? de.call(this, i, t, n) : Gt.call(this, i, t, n);
|
|
496
496
|
}
|
|
497
497
|
function oi(e) {
|
|
498
498
|
switch (e.mode) {
|
|
@@ -505,20 +505,20 @@ function oi(e) {
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
async function ai(e) {
|
|
508
|
-
return e.el.classList.remove(e.getSetting("classModal")), e.dialog.removeAttribute("aria-modal"),
|
|
508
|
+
return e.el.classList.remove(e.getSetting("classModal")), e.dialog.removeAttribute("aria-modal"), ce(!1, { ...this.settings, ...e.settings }), this.focusTrap.unmount(), await ni(e), e.el.dispatchEvent(new CustomEvent(e.getSetting("customEventPrefix") + "switchMode", {
|
|
509
509
|
detail: this,
|
|
510
510
|
bubbles: !0
|
|
511
511
|
})), e;
|
|
512
512
|
}
|
|
513
513
|
async function li(e) {
|
|
514
|
-
return e.el.classList.add(e.getSetting("classModal")), e.dialog.setAttribute("aria-modal", "true"), await
|
|
514
|
+
return e.el.classList.add(e.getSetting("classModal")), e.dialog.setAttribute("aria-modal", "true"), await Gt.call(this, e, !1, !1), e.el.dispatchEvent(new CustomEvent(e.getSetting("customEventPrefix") + "switchMode", {
|
|
515
515
|
detail: this,
|
|
516
516
|
bubbles: !0
|
|
517
517
|
})), e;
|
|
518
518
|
}
|
|
519
519
|
async function ci(e, t = {}) {
|
|
520
|
-
await
|
|
521
|
-
const n = this, i = new
|
|
520
|
+
await ie.call(this, e, !1);
|
|
521
|
+
const n = this, i = new Rn();
|
|
522
522
|
let r, s = "indeterminate";
|
|
523
523
|
const a = {
|
|
524
524
|
id: e.id,
|
|
@@ -528,7 +528,7 @@ async function ci(e, t = {}) {
|
|
|
528
528
|
settings: { ...Zn(e, this.settings.dataConfig), ...t },
|
|
529
529
|
inlineState: "indeterminate",
|
|
530
530
|
get breakpoint() {
|
|
531
|
-
return
|
|
531
|
+
return ii.call(n, e);
|
|
532
532
|
},
|
|
533
533
|
get store() {
|
|
534
534
|
return n.store.get(this.id);
|
|
@@ -546,16 +546,16 @@ async function ci(e, t = {}) {
|
|
|
546
546
|
s = o, this.mode === "inline" && o != "opening" && o != "closing" && (this.inlineState = o, this.getSetting("store") && n.store.set(this.id, o)), o === "indeterminate" && (this.el.classList.remove(this.getSetting("stateOpened")), this.el.classList.remove(this.getSetting("stateOpening")), this.el.classList.remove(this.getSetting("stateClosed")), this.el.classList.remove(this.getSetting("stateClosing")));
|
|
547
547
|
},
|
|
548
548
|
open(o, l) {
|
|
549
|
-
return
|
|
549
|
+
return de.call(n, this, o, l);
|
|
550
550
|
},
|
|
551
551
|
close(o, l) {
|
|
552
|
-
return
|
|
552
|
+
return Gt.call(n, this, o, l);
|
|
553
553
|
},
|
|
554
554
|
toggle(o, l) {
|
|
555
555
|
return tn.call(n, this, o, l);
|
|
556
556
|
},
|
|
557
557
|
deregister() {
|
|
558
|
-
return
|
|
558
|
+
return ie.call(n, this);
|
|
559
559
|
},
|
|
560
560
|
mountBreakpoint() {
|
|
561
561
|
const o = this.breakpoint, l = this.handleBreakpoint.bind(this);
|
|
@@ -574,29 +574,29 @@ async function ci(e, t = {}) {
|
|
|
574
574
|
};
|
|
575
575
|
this.collection.push(a);
|
|
576
576
|
const c = e.querySelector(a.getSetting("selectorDialog"));
|
|
577
|
-
return a.dialog = c || e, a.getSetting("setTabindex") && a.dialog.setAttribute("tabindex", "-1"), await
|
|
577
|
+
return a.dialog = c || e, a.getSetting("setTabindex") && a.dialog.setAttribute("tabindex", "-1"), await ei(a), a.inlineState = a.state, a.mode = e.classList.contains(a.getSetting("classModal")) ? "modal" : "inline", a.breakpoint && a.mountBreakpoint(), a;
|
|
578
578
|
}
|
|
579
|
-
var
|
|
579
|
+
var xt, Ot;
|
|
580
580
|
let Zr = class extends Hn {
|
|
581
581
|
constructor(t) {
|
|
582
|
-
super(),
|
|
582
|
+
super(), Ie(this, xt, void 0), Ie(this, Ot, void 0), this.defaults = ti, this.settings = { ...this.defaults, ...t }, this.focusTrap = new zn(), this.store = Xn(this.settings.storeKey, this.settings.store), Pe(this, xt, ri.bind(this)), Pe(this, Ot, si.bind(this)), this.settings.autoMount && this.mount();
|
|
583
583
|
}
|
|
584
584
|
get activeModal() {
|
|
585
585
|
return this.collection.find((t) => t.state === "opened" && t.mode === "modal");
|
|
586
586
|
}
|
|
587
|
-
async
|
|
587
|
+
async mount(t = null) {
|
|
588
588
|
t && (this.settings = { ...this.settings, ...t });
|
|
589
589
|
const n = document.querySelectorAll(this.settings.selectorDrawer);
|
|
590
|
-
return await this.registerCollection(n), this.settings.eventListeners && this.
|
|
590
|
+
return await this.registerCollection(n), this.settings.eventListeners && this.mountEventListeners(), this;
|
|
591
591
|
}
|
|
592
|
-
async
|
|
593
|
-
return await this.deregisterCollection(), this.settings.eventListeners && this.
|
|
592
|
+
async unmount() {
|
|
593
|
+
return await this.deregisterCollection(), this.settings.eventListeners && this.unmountEventListeners(), this;
|
|
594
594
|
}
|
|
595
|
-
|
|
596
|
-
document.addEventListener("click",
|
|
595
|
+
mountEventListeners() {
|
|
596
|
+
document.addEventListener("click", Bt(this, xt), !1), document.addEventListener("keydown", Bt(this, Ot), !1);
|
|
597
597
|
}
|
|
598
|
-
|
|
599
|
-
document.removeEventListener("click",
|
|
598
|
+
unmountEventListeners() {
|
|
599
|
+
document.removeEventListener("click", Bt(this, xt), !1), document.removeEventListener("keydown", Bt(this, Ot), !1);
|
|
600
600
|
}
|
|
601
601
|
register(t, n = {}) {
|
|
602
602
|
let i = typeof t == "string" ? document.getElementById(t) : t;
|
|
@@ -604,34 +604,34 @@ let Zr = class extends Hn {
|
|
|
604
604
|
}
|
|
605
605
|
deregister(t) {
|
|
606
606
|
let n = this.get(t.id || t);
|
|
607
|
-
return n ?
|
|
607
|
+
return n ? ie.call(this, n) : Promise.reject(new Error(`Failed to deregister; drawer does not exist in collection with ID of: "${t.id || t}".`));
|
|
608
608
|
}
|
|
609
609
|
open(t, n, i) {
|
|
610
|
-
return
|
|
610
|
+
return de.call(this, t, n, i);
|
|
611
611
|
}
|
|
612
612
|
close(t, n, i) {
|
|
613
|
-
return
|
|
613
|
+
return Gt.call(this, t, n, i);
|
|
614
614
|
}
|
|
615
615
|
toggle(t, n, i) {
|
|
616
616
|
return tn.call(this, t, n, i);
|
|
617
617
|
}
|
|
618
618
|
};
|
|
619
|
-
|
|
619
|
+
xt = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap();
|
|
620
620
|
var en = (e, t, n) => {
|
|
621
621
|
if (!t.has(e))
|
|
622
622
|
throw TypeError("Cannot " + n);
|
|
623
|
-
},
|
|
623
|
+
}, Vt = (e, t, n) => (en(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Me = (e, t, n) => {
|
|
624
624
|
if (t.has(e))
|
|
625
625
|
throw TypeError("Cannot add the same private member more than once");
|
|
626
626
|
t instanceof WeakSet ? t.add(e) : t.set(e, n);
|
|
627
|
-
},
|
|
627
|
+
}, De = (e, t, n, i) => (en(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), nn = (e, t, n) => {
|
|
628
628
|
if (!t.has(e))
|
|
629
629
|
throw TypeError("Cannot " + n);
|
|
630
|
-
}, Q = (e, t, n) => (nn(e, t, "read from private field"), n ? n.call(e) : t.get(e)),
|
|
630
|
+
}, Q = (e, t, n) => (nn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), te = (e, t, n) => {
|
|
631
631
|
if (t.has(e))
|
|
632
632
|
throw TypeError("Cannot add the same private member more than once");
|
|
633
633
|
t instanceof WeakSet ? t.add(e) : t.set(e, n);
|
|
634
|
-
},
|
|
634
|
+
}, ee = (e, t, n, i) => (nn(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n);
|
|
635
635
|
class di {
|
|
636
636
|
constructor() {
|
|
637
637
|
this.collection = [];
|
|
@@ -685,16 +685,16 @@ const m = {
|
|
|
685
685
|
`[contenteditable]${m.inert}${m.negTabIndex}`,
|
|
686
686
|
`[tabindex]${m.inert}${m.negTabIndex}`
|
|
687
687
|
];
|
|
688
|
-
var
|
|
688
|
+
var Lt, ut, ht;
|
|
689
689
|
class hi {
|
|
690
690
|
constructor(t = null, n = "[data-focus]") {
|
|
691
|
-
|
|
691
|
+
te(this, Lt, void 0), te(this, ut, void 0), te(this, ht, void 0), this.el = t, this.selectorFocus = n, ee(this, ut, fi.bind(this)), ee(this, ht, pi.bind(this));
|
|
692
692
|
}
|
|
693
693
|
get focusable() {
|
|
694
|
-
return Q(this,
|
|
694
|
+
return Q(this, Lt);
|
|
695
695
|
}
|
|
696
696
|
set focusable(t) {
|
|
697
|
-
|
|
697
|
+
ee(this, Lt, t), Q(this, Lt).length ? (document.removeEventListener("keydown", Q(this, ht)), document.addEventListener("keydown", Q(this, ut))) : (document.removeEventListener("keydown", Q(this, ut)), document.addEventListener("keydown", Q(this, ht)));
|
|
698
698
|
}
|
|
699
699
|
get focusableFirst() {
|
|
700
700
|
return this.focusable[0];
|
|
@@ -718,7 +718,7 @@ class hi {
|
|
|
718
718
|
}), t.scrollTop = r, i.focus(), n;
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
|
|
721
|
+
Lt = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap();
|
|
722
722
|
function fi(e) {
|
|
723
723
|
(e.key === "Tab" || e.keyCode === 9) && (e.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (e.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (e.preventDefault(), this.focusableFirst.focus()));
|
|
724
724
|
}
|
|
@@ -726,16 +726,16 @@ function pi(e) {
|
|
|
726
726
|
(e.key === "Tab" || e.keyCode === 9) && e.preventDefault();
|
|
727
727
|
}
|
|
728
728
|
function gi() {
|
|
729
|
-
return getComputedStyle(document.body).getPropertyValue("--
|
|
729
|
+
return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
|
|
730
730
|
}
|
|
731
|
-
function mi(e, t = document.body
|
|
732
|
-
if (
|
|
733
|
-
const
|
|
734
|
-
|
|
731
|
+
function mi(e, t = document.body) {
|
|
732
|
+
if (e.slice(0, 2) !== "--") {
|
|
733
|
+
const i = gi();
|
|
734
|
+
i && (e = `${i}${e}`), e = `--${e}`;
|
|
735
735
|
}
|
|
736
|
-
const
|
|
737
|
-
if (
|
|
738
|
-
return
|
|
736
|
+
const n = getComputedStyle(t).getPropertyValue(e).trim();
|
|
737
|
+
if (n)
|
|
738
|
+
return n;
|
|
739
739
|
throw new Error(`CSS variable "${e}" was not found!`);
|
|
740
740
|
}
|
|
741
741
|
function vi(e, t) {
|
|
@@ -751,7 +751,7 @@ function je(e, t, n) {
|
|
|
751
751
|
let s = null;
|
|
752
752
|
return i || (s = document.createComment("teleported #" + e.id), e.before(s)), t[n](e), i && t.remove(), s;
|
|
753
753
|
}
|
|
754
|
-
function rn(e, t, n, i = "
|
|
754
|
+
function rn(e, t, n, i = "transition-duration") {
|
|
755
755
|
return new Promise((r) => {
|
|
756
756
|
if (typeof i == "string") {
|
|
757
757
|
const s = mi(i, e), a = !!s.includes("ms");
|
|
@@ -776,7 +776,7 @@ function wi(e, t) {
|
|
|
776
776
|
yi(!!e, t.selectorInert), bi(!!e, t.selectorOverflow);
|
|
777
777
|
}
|
|
778
778
|
const $i = {
|
|
779
|
-
|
|
779
|
+
autoMount: !1,
|
|
780
780
|
// Data attributes
|
|
781
781
|
dataOpen: "modal-open",
|
|
782
782
|
dataClose: "modal-close",
|
|
@@ -802,8 +802,17 @@ const $i = {
|
|
|
802
802
|
teleportMethod: "append",
|
|
803
803
|
setTabindex: !0,
|
|
804
804
|
transition: !0,
|
|
805
|
-
transitionDuration: "
|
|
805
|
+
transitionDuration: "modal-transition-duration"
|
|
806
806
|
};
|
|
807
|
+
function It(e) {
|
|
808
|
+
const t = typeof e == "string" ? this.get(e) : this.get(e.id);
|
|
809
|
+
if (t)
|
|
810
|
+
return t;
|
|
811
|
+
throw new Error(`Modal not found in collection with id of "${e.id || e}".`);
|
|
812
|
+
}
|
|
813
|
+
function Qt() {
|
|
814
|
+
this.active ? this.focusTrap.mount(this.active.dialog, this.settings.selectorFocus) : (this.trigger && (this.trigger.focus(), this.trigger = null), this.focusTrap.unmount());
|
|
815
|
+
}
|
|
807
816
|
async function Ei(e) {
|
|
808
817
|
const t = e.target.closest(`
|
|
809
818
|
[data-${this.settings.dataOpen}],
|
|
@@ -812,11 +821,11 @@ async function Ei(e) {
|
|
|
812
821
|
`);
|
|
813
822
|
if (t) {
|
|
814
823
|
if (e.preventDefault(), t.matches(`[data-${this.settings.dataOpen}]`)) {
|
|
815
|
-
const n = t.getAttribute(`data-${this.settings.dataOpen}`).trim(), i =
|
|
824
|
+
const n = t.getAttribute(`data-${this.settings.dataOpen}`).trim(), i = It.call(this, n);
|
|
816
825
|
return e.target.closest(this.settings.selectorModal) || (this.trigger = t), i.open();
|
|
817
826
|
}
|
|
818
827
|
if (t.matches(`[data-${this.settings.dataReplace}]`)) {
|
|
819
|
-
const n = t.getAttribute(`data-${this.settings.dataReplace}`).trim(), i =
|
|
828
|
+
const n = t.getAttribute(`data-${this.settings.dataReplace}`).trim(), i = It.call(this, n);
|
|
820
829
|
return e.target.closest(this.settings.selectorModal) || (this.trigger = t), i.replace();
|
|
821
830
|
}
|
|
822
831
|
if (t.matches(`[data-${this.settings.dataClose}]`)) {
|
|
@@ -831,7 +840,7 @@ function xi(e) {
|
|
|
831
840
|
if (e.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
|
|
832
841
|
return this.close();
|
|
833
842
|
}
|
|
834
|
-
async function
|
|
843
|
+
async function re(e, t = !0) {
|
|
835
844
|
const n = this.collection.findIndex((i) => i.id === e.id);
|
|
836
845
|
if (n >= 0) {
|
|
837
846
|
const i = this.collection[n];
|
|
@@ -841,30 +850,21 @@ async function ne(e, t = !0) {
|
|
|
841
850
|
}
|
|
842
851
|
return this.collection;
|
|
843
852
|
}
|
|
844
|
-
function de(e) {
|
|
845
|
-
const t = typeof e == "string" ? this.get(e) : this.get(e.id);
|
|
846
|
-
if (t)
|
|
847
|
-
return t;
|
|
848
|
-
throw new Error(`Modal not found in collection with id of "${e.id || e}".`);
|
|
849
|
-
}
|
|
850
|
-
function Kt() {
|
|
851
|
-
this.active ? this.focusTrap.mount(this.active.dialog, this.settings.selectorFocus) : (this.trigger && (this.trigger.focus(), this.trigger = null), this.focusTrap.unmount());
|
|
852
|
-
}
|
|
853
853
|
async function ue(e, t, n = !0) {
|
|
854
|
-
const i =
|
|
854
|
+
const i = It.call(this, e), r = { ...this.settings, ...i.settings };
|
|
855
855
|
return t !== void 0 && (r.transition = t), this.stack.moveToTop(i), i.state === "closed" && (i.state = "opening", this.stack.add(i), r.transition ? await rn(i.el, {
|
|
856
856
|
start: r.stateClosing,
|
|
857
857
|
finish: r.stateClosed
|
|
858
858
|
}, {
|
|
859
859
|
start: r.stateOpening,
|
|
860
860
|
finish: r.stateOpened
|
|
861
|
-
}, r.transitionDuration) : (i.el.classList.add(r.stateOpened), i.el.classList.remove(r.stateClosed)), i.state = "opened"), n &&
|
|
861
|
+
}, r.transitionDuration) : (i.el.classList.add(r.stateOpened), i.el.classList.remove(r.stateClosed)), i.state = "opened"), n && Qt.call(this), i.el.dispatchEvent(new CustomEvent(r.customEventPrefix + "opened", {
|
|
862
862
|
detail: this,
|
|
863
863
|
bubbles: !0
|
|
864
864
|
})), i;
|
|
865
865
|
}
|
|
866
866
|
async function he(e, t, n = !0) {
|
|
867
|
-
const i = e ?
|
|
867
|
+
const i = e ? It.call(this, e) : this.active;
|
|
868
868
|
if (i && i.state === "opened") {
|
|
869
869
|
i.state = "closing";
|
|
870
870
|
const r = { ...this.settings, ...i.settings };
|
|
@@ -874,26 +874,26 @@ async function he(e, t, n = !0) {
|
|
|
874
874
|
}, {
|
|
875
875
|
start: r.stateClosing,
|
|
876
876
|
finish: r.stateClosed
|
|
877
|
-
}, r.transitionDuration) : (i.el.classList.add(r.stateClosed), i.el.classList.remove(r.stateOpened)), this.stack.remove(i), i.state = "closed", n &&
|
|
877
|
+
}, r.transitionDuration) : (i.el.classList.add(r.stateClosed), i.el.classList.remove(r.stateOpened)), this.stack.remove(i), i.state = "closed", n && Qt.call(this), i.el.dispatchEvent(new CustomEvent(r.customEventPrefix + "closed", {
|
|
878
878
|
detail: this,
|
|
879
879
|
bubbles: !0
|
|
880
880
|
}));
|
|
881
881
|
}
|
|
882
882
|
return i;
|
|
883
883
|
}
|
|
884
|
-
async function
|
|
884
|
+
async function se(e, t) {
|
|
885
885
|
const n = [];
|
|
886
886
|
return await Promise.all(this.stack.value.map(async (i) => {
|
|
887
887
|
e && e === i.id ? Promise.resolve() : n.push(await he.call(this, i, t, !1)), i.trigger = null;
|
|
888
888
|
})), n;
|
|
889
889
|
}
|
|
890
890
|
async function sn(e, t, n = !0) {
|
|
891
|
-
const i =
|
|
891
|
+
const i = It.call(this, e);
|
|
892
892
|
let r, s;
|
|
893
|
-
return i.state === "opened" ? (r = i, s = await
|
|
893
|
+
return i.state === "opened" ? (r = i, s = await se.call(this, i.id, t)) : (s = se.call(this, !1, t), r = ue.call(this, i, t, !1), await Promise.all([r, s])), n && Qt.call(this), { opened: r, closed: s };
|
|
894
894
|
}
|
|
895
895
|
async function Oi(e, t = {}) {
|
|
896
|
-
await
|
|
896
|
+
await re.call(this, e, !1);
|
|
897
897
|
const n = this, i = {
|
|
898
898
|
id: e.id,
|
|
899
899
|
state: "closed",
|
|
@@ -914,7 +914,7 @@ async function Oi(e, t = {}) {
|
|
|
914
914
|
return sn.call(n, this, s, a);
|
|
915
915
|
},
|
|
916
916
|
deregister() {
|
|
917
|
-
return
|
|
917
|
+
return re.call(n, this);
|
|
918
918
|
},
|
|
919
919
|
teleport(s = this.getSetting("teleport"), a = this.getSetting("teleportMethod")) {
|
|
920
920
|
return this.returnRef ? (console.error("Element has already been teleported:", this.el), !1) : (this.returnRef = je(this.el, s, a), this.el);
|
|
@@ -962,27 +962,27 @@ function Li(e) {
|
|
|
962
962
|
}
|
|
963
963
|
};
|
|
964
964
|
}
|
|
965
|
-
var
|
|
965
|
+
var kt, Tt;
|
|
966
966
|
let Yr = class extends di {
|
|
967
967
|
constructor(t) {
|
|
968
|
-
super(),
|
|
968
|
+
super(), Me(this, kt, void 0), Me(this, Tt, void 0), this.defaults = $i, this.settings = { ...this.defaults, ...t }, this.trigger = null, this.focusTrap = new hi(), this.stack = Li(this.settings), De(this, kt, Ei.bind(this)), De(this, Tt, xi.bind(this)), this.settings.autoMount && this.mount();
|
|
969
969
|
}
|
|
970
970
|
get active() {
|
|
971
971
|
return this.stack.top;
|
|
972
972
|
}
|
|
973
|
-
async
|
|
973
|
+
async mount(t) {
|
|
974
974
|
t && (this.settings = { ...this.settings, ...t });
|
|
975
975
|
const n = document.querySelectorAll(this.settings.selectorModal);
|
|
976
|
-
return await this.registerCollection(n), this.settings.eventListeners && this.
|
|
976
|
+
return await this.registerCollection(n), this.settings.eventListeners && this.mountEventListeners(), this;
|
|
977
977
|
}
|
|
978
|
-
async
|
|
979
|
-
return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.
|
|
978
|
+
async unmount() {
|
|
979
|
+
return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.unmountEventListeners(), this;
|
|
980
980
|
}
|
|
981
|
-
|
|
982
|
-
document.addEventListener("click",
|
|
981
|
+
mountEventListeners() {
|
|
982
|
+
document.addEventListener("click", Vt(this, kt), !1), document.addEventListener("keydown", Vt(this, Tt), !1);
|
|
983
983
|
}
|
|
984
|
-
|
|
985
|
-
document.removeEventListener("click",
|
|
984
|
+
unmountEventListeners() {
|
|
985
|
+
document.removeEventListener("click", Vt(this, kt), !1), document.removeEventListener("keydown", Vt(this, Tt), !1);
|
|
986
986
|
}
|
|
987
987
|
register(t, n = {}) {
|
|
988
988
|
let i = typeof t == "string" ? document.getElementById(t) : t;
|
|
@@ -990,7 +990,7 @@ let Yr = class extends di {
|
|
|
990
990
|
}
|
|
991
991
|
deregister(t) {
|
|
992
992
|
let n = this.get(t.id || t);
|
|
993
|
-
return n ?
|
|
993
|
+
return n ? re.call(this, n) : Promise.reject(new Error(`Failed to deregister; modal does not exist in collection with ID of: "${t.id || t}".`));
|
|
994
994
|
}
|
|
995
995
|
open(t, n, i) {
|
|
996
996
|
return ue.call(this, t, n, i);
|
|
@@ -1002,11 +1002,11 @@ let Yr = class extends di {
|
|
|
1002
1002
|
return sn.call(this, t, n, i);
|
|
1003
1003
|
}
|
|
1004
1004
|
async closeAll(t = !1, n, i = !0) {
|
|
1005
|
-
const r = await
|
|
1006
|
-
return i &&
|
|
1005
|
+
const r = await se.call(this, t, n);
|
|
1006
|
+
return i && Qt.call(this), r;
|
|
1007
1007
|
}
|
|
1008
1008
|
};
|
|
1009
|
-
|
|
1009
|
+
kt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap();
|
|
1010
1010
|
var on = (e, t, n) => {
|
|
1011
1011
|
if (!t.has(e))
|
|
1012
1012
|
throw TypeError("Cannot " + n);
|
|
@@ -1047,10 +1047,10 @@ class Si {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
1049
1049
|
function Ci() {
|
|
1050
|
-
return getComputedStyle(document.body).getPropertyValue("--
|
|
1050
|
+
return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
|
|
1051
1051
|
}
|
|
1052
|
-
const
|
|
1053
|
-
|
|
1052
|
+
const Ai = {
|
|
1053
|
+
autoMount: !1,
|
|
1054
1054
|
// Selectors
|
|
1055
1055
|
selectorPopover: ".popover",
|
|
1056
1056
|
selectorArrow: ".popover__arrow",
|
|
@@ -1077,7 +1077,7 @@ function an(e, t) {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
return i;
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function ne(e) {
|
|
1081
1081
|
let t;
|
|
1082
1082
|
const n = typeof e == "string" ? e.trim().split(" ") : [e];
|
|
1083
1083
|
switch (n.forEach(function(i, r) {
|
|
@@ -1116,7 +1116,7 @@ function te(e) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
return t;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function Ii(e) {
|
|
1120
1120
|
return [{
|
|
1121
1121
|
name: "offset",
|
|
1122
1122
|
options: {
|
|
@@ -1125,18 +1125,18 @@ function Ai(e) {
|
|
|
1125
1125
|
}, {
|
|
1126
1126
|
name: "preventOverflow",
|
|
1127
1127
|
options: {
|
|
1128
|
-
padding:
|
|
1128
|
+
padding: ne(e["overflow-padding"])
|
|
1129
1129
|
}
|
|
1130
1130
|
}, {
|
|
1131
1131
|
name: "flip",
|
|
1132
1132
|
options: {
|
|
1133
|
-
padding:
|
|
1133
|
+
padding: ne(e["flip-padding"])
|
|
1134
1134
|
}
|
|
1135
1135
|
}, {
|
|
1136
1136
|
name: "arrow",
|
|
1137
1137
|
options: {
|
|
1138
1138
|
element: e["arrow-element"],
|
|
1139
|
-
padding:
|
|
1139
|
+
padding: ne(e["arrow-padding"])
|
|
1140
1140
|
}
|
|
1141
1141
|
}];
|
|
1142
1142
|
}
|
|
@@ -1149,7 +1149,7 @@ function ln(e) {
|
|
|
1149
1149
|
function Pi(e) {
|
|
1150
1150
|
return typeof e == "string" ? e : typeof e.hasAttribute == "function" ? e.closest(this.settings.selectorPopover) ? (e = e.closest(this.settings.selectorPopover), e.id) : e.hasAttribute("aria-controls") ? e.getAttribute("aria-controls") : e.hasAttribute("aria-describedby") ? e.getAttribute("aria-describedby") : !1 : !1;
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function Mi(e) {
|
|
1153
1153
|
const t = Pi.call(this, e);
|
|
1154
1154
|
if (t) {
|
|
1155
1155
|
const n = document.querySelector(`#${t}`), i = document.querySelector(`[aria-controls="${t}"]`) || document.querySelector(`[aria-describedby="${t}"]`);
|
|
@@ -1177,7 +1177,7 @@ function dn(e) {
|
|
|
1177
1177
|
return !t && !n && e.close(), e;
|
|
1178
1178
|
}, 1);
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function Di(e) {
|
|
1181
1181
|
e.state === "opened" ? e.close() : (this.trigger = e.trigger, e.open(), un.call(this, e));
|
|
1182
1182
|
}
|
|
1183
1183
|
function ji(e) {
|
|
@@ -1202,11 +1202,11 @@ function un(e) {
|
|
|
1202
1202
|
) ? e.el && !e.el.classList.contains(t.settings.stateActive) && this.removeEventListener("click", n) : (e.el && e.el.classList.contains(t.settings.stateActive) && e.close(), this.removeEventListener("click", n));
|
|
1203
1203
|
});
|
|
1204
1204
|
}
|
|
1205
|
-
var P = "top", W = "bottom", _ = "right",
|
|
1206
|
-
return e.concat([t + "-" +
|
|
1207
|
-
}, []), fn = /* @__PURE__ */ [].concat(
|
|
1208
|
-
return e.concat([t, t + "-" +
|
|
1209
|
-
}, []), Ni = "beforeRead", Wi = "read", _i = "afterRead", Bi = "beforeMain",
|
|
1205
|
+
var P = "top", W = "bottom", _ = "right", M = "left", pe = "auto", Dt = [P, W, _, M], pt = "start", Pt = "end", qi = "clippingParents", hn = "viewport", wt = "popper", Fi = "reference", Fe = /* @__PURE__ */ Dt.reduce(function(e, t) {
|
|
1206
|
+
return e.concat([t + "-" + pt, t + "-" + Pt]);
|
|
1207
|
+
}, []), fn = /* @__PURE__ */ [].concat(Dt, [pe]).reduce(function(e, t) {
|
|
1208
|
+
return e.concat([t, t + "-" + pt, t + "-" + Pt]);
|
|
1209
|
+
}, []), Ni = "beforeRead", Wi = "read", _i = "afterRead", Bi = "beforeMain", Vi = "main", Ri = "afterMain", Hi = "beforeWrite", Ji = "write", zi = "afterWrite", Ki = [Ni, Wi, _i, Bi, Vi, Ri, Hi, Ji, zi];
|
|
1210
1210
|
function z(e) {
|
|
1211
1211
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
1212
1212
|
}
|
|
@@ -1278,20 +1278,20 @@ const Zi = {
|
|
|
1278
1278
|
function J(e) {
|
|
1279
1279
|
return e.split("-")[0];
|
|
1280
1280
|
}
|
|
1281
|
-
var rt = Math.max,
|
|
1282
|
-
function
|
|
1281
|
+
var rt = Math.max, Kt = Math.min, gt = Math.round;
|
|
1282
|
+
function oe() {
|
|
1283
1283
|
var e = navigator.userAgentData;
|
|
1284
1284
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
1285
1285
|
return t.brand + "/" + t.version;
|
|
1286
1286
|
}).join(" ") : navigator.userAgent;
|
|
1287
1287
|
}
|
|
1288
1288
|
function pn() {
|
|
1289
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
1289
|
+
return !/^((?!chrome|android).)*safari/i.test(oe());
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1291
|
+
function mt(e, t, n) {
|
|
1292
1292
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1293
1293
|
var i = e.getBoundingClientRect(), r = 1, s = 1;
|
|
1294
|
-
t && N(e) && (r = e.offsetWidth > 0 &&
|
|
1294
|
+
t && N(e) && (r = e.offsetWidth > 0 && gt(i.width) / e.offsetWidth || 1, s = e.offsetHeight > 0 && gt(i.height) / e.offsetHeight || 1);
|
|
1295
1295
|
var a = st(e) ? F(e) : window, c = a.visualViewport, o = !pn() && n, l = (i.left + (o && c ? c.offsetLeft : 0)) / r, d = (i.top + (o && c ? c.offsetTop : 0)) / s, b = i.width / r, v = i.height / s;
|
|
1296
1296
|
return {
|
|
1297
1297
|
width: b,
|
|
@@ -1305,7 +1305,7 @@ function gt(e, t, n) {
|
|
|
1305
1305
|
};
|
|
1306
1306
|
}
|
|
1307
1307
|
function me(e) {
|
|
1308
|
-
var t =
|
|
1308
|
+
var t = mt(e), n = e.offsetWidth, i = e.offsetHeight;
|
|
1309
1309
|
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - i) <= 1 && (i = t.height), {
|
|
1310
1310
|
x: e.offsetLeft,
|
|
1311
1311
|
y: e.offsetTop,
|
|
@@ -1339,7 +1339,7 @@ function Z(e) {
|
|
|
1339
1339
|
e.document
|
|
1340
1340
|
)) || window.document).documentElement;
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function Zt(e) {
|
|
1343
1343
|
return z(e) === "html" ? e : (
|
|
1344
1344
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
1345
1345
|
// $FlowFixMe[incompatible-return]
|
|
@@ -1356,13 +1356,13 @@ function Ne(e) {
|
|
|
1356
1356
|
G(e).position === "fixed" ? null : e.offsetParent;
|
|
1357
1357
|
}
|
|
1358
1358
|
function Yi(e) {
|
|
1359
|
-
var t = /firefox/i.test(
|
|
1359
|
+
var t = /firefox/i.test(oe()), n = /Trident/i.test(oe());
|
|
1360
1360
|
if (n && N(e)) {
|
|
1361
1361
|
var i = G(e);
|
|
1362
1362
|
if (i.position === "fixed")
|
|
1363
1363
|
return null;
|
|
1364
1364
|
}
|
|
1365
|
-
var r =
|
|
1365
|
+
var r = Zt(e);
|
|
1366
1366
|
for (ge(r) && (r = r.host); N(r) && ["html", "body"].indexOf(z(r)) < 0; ) {
|
|
1367
1367
|
var s = G(r);
|
|
1368
1368
|
if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || t && s.willChange === "filter" || t && s.filter && s.filter !== "none")
|
|
@@ -1371,7 +1371,7 @@ function Yi(e) {
|
|
|
1371
1371
|
}
|
|
1372
1372
|
return null;
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1374
|
+
function jt(e) {
|
|
1375
1375
|
for (var t = F(e), n = Ne(e); n && Xi(n) && G(n).position === "static"; )
|
|
1376
1376
|
n = Ne(n);
|
|
1377
1377
|
return n && (z(n) === "html" || z(n) === "body" && G(n).position === "static") ? t : n || Yi(e) || t;
|
|
@@ -1379,11 +1379,11 @@ function Dt(e) {
|
|
|
1379
1379
|
function ve(e) {
|
|
1380
1380
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1383
|
-
return rt(e,
|
|
1382
|
+
function Ct(e, t, n) {
|
|
1383
|
+
return rt(e, Kt(t, n));
|
|
1384
1384
|
}
|
|
1385
1385
|
function Ui(e, t, n) {
|
|
1386
|
-
var i =
|
|
1386
|
+
var i = Ct(e, t, n);
|
|
1387
1387
|
return i > n ? n : i;
|
|
1388
1388
|
}
|
|
1389
1389
|
function mn() {
|
|
@@ -1405,12 +1405,12 @@ function bn(e, t) {
|
|
|
1405
1405
|
var tr = function(e, t) {
|
|
1406
1406
|
return e = typeof e == "function" ? e(Object.assign({}, t.rects, {
|
|
1407
1407
|
placement: t.placement
|
|
1408
|
-
})) : e, vn(typeof e != "number" ? e : bn(e,
|
|
1408
|
+
})) : e, vn(typeof e != "number" ? e : bn(e, Dt));
|
|
1409
1409
|
};
|
|
1410
1410
|
function er(e) {
|
|
1411
|
-
var t, n = e.state, i = e.name, r = e.options, s = n.elements.arrow, a = n.modifiersData.popperOffsets, c = J(n.placement), o = ve(c), l = [
|
|
1411
|
+
var t, n = e.state, i = e.name, r = e.options, s = n.elements.arrow, a = n.modifiersData.popperOffsets, c = J(n.placement), o = ve(c), l = [M, _].indexOf(c) >= 0, d = l ? "height" : "width";
|
|
1412
1412
|
if (!(!s || !a)) {
|
|
1413
|
-
var b = tr(r.padding, n), v = me(s), h = o === "y" ? P :
|
|
1413
|
+
var b = tr(r.padding, n), v = me(s), h = o === "y" ? P : M, $ = o === "y" ? W : _, u = n.rects.reference[d] + n.rects.reference[o] - a[o] - n.rects.popper[d], w = a[o] - n.rects.reference[o], E = jt(s), O = E ? o === "y" ? E.clientHeight || 0 : E.clientWidth || 0 : 0, L = u / 2 - w / 2, f = b[h], y = O - v[d] - b[$], x = O / 2 - v[d] / 2 + L, k = Ct(f, x, y), T = o;
|
|
1414
1414
|
n.modifiersData[i] = (t = {}, t[T] = k, t.centerOffset = k - x, t);
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
@@ -1427,7 +1427,7 @@ const ir = {
|
|
|
1427
1427
|
requires: ["popperOffsets"],
|
|
1428
1428
|
requiresIfExists: ["preventOverflow"]
|
|
1429
1429
|
};
|
|
1430
|
-
function
|
|
1430
|
+
function vt(e) {
|
|
1431
1431
|
return e.split("-")[1];
|
|
1432
1432
|
}
|
|
1433
1433
|
var rr = {
|
|
@@ -1439,8 +1439,8 @@ var rr = {
|
|
|
1439
1439
|
function sr(e, t) {
|
|
1440
1440
|
var n = e.x, i = e.y, r = t.devicePixelRatio || 1;
|
|
1441
1441
|
return {
|
|
1442
|
-
x:
|
|
1443
|
-
y:
|
|
1442
|
+
x: gt(n * r) / r || 0,
|
|
1443
|
+
y: gt(i * r) / r || 0
|
|
1444
1444
|
};
|
|
1445
1445
|
}
|
|
1446
1446
|
function We(e) {
|
|
@@ -1452,10 +1452,10 @@ function We(e) {
|
|
|
1452
1452
|
y: u
|
|
1453
1453
|
};
|
|
1454
1454
|
h = w.x, u = w.y;
|
|
1455
|
-
var E = a.hasOwnProperty("x"), O = a.hasOwnProperty("y"), L =
|
|
1455
|
+
var E = a.hasOwnProperty("x"), O = a.hasOwnProperty("y"), L = M, f = P, y = window;
|
|
1456
1456
|
if (l) {
|
|
1457
|
-
var x =
|
|
1458
|
-
if (x === F(n) && (x = Z(n), G(x).position !== "static" && c === "absolute" && (k = "scrollHeight", T = "scrollWidth")), x = x, r === P || (r ===
|
|
1457
|
+
var x = jt(n), k = "clientHeight", T = "clientWidth";
|
|
1458
|
+
if (x === F(n) && (x = Z(n), G(x).position !== "static" && c === "absolute" && (k = "scrollHeight", T = "scrollWidth")), x = x, r === P || (r === M || r === _) && s === Pt) {
|
|
1459
1459
|
f = W;
|
|
1460
1460
|
var S = b && x === y && y.visualViewport ? y.visualViewport.height : (
|
|
1461
1461
|
// $FlowFixMe[prop-missing]
|
|
@@ -1463,7 +1463,7 @@ function We(e) {
|
|
|
1463
1463
|
);
|
|
1464
1464
|
u -= S - i.height, u *= o ? 1 : -1;
|
|
1465
1465
|
}
|
|
1466
|
-
if (r ===
|
|
1466
|
+
if (r === M || (r === P || r === W) && s === Pt) {
|
|
1467
1467
|
L = _;
|
|
1468
1468
|
var C = b && x === y && y.visualViewport ? y.visualViewport.width : (
|
|
1469
1469
|
// $FlowFixMe[prop-missing]
|
|
@@ -1472,7 +1472,7 @@ function We(e) {
|
|
|
1472
1472
|
h -= C - i.width, h *= o ? 1 : -1;
|
|
1473
1473
|
}
|
|
1474
1474
|
}
|
|
1475
|
-
var
|
|
1475
|
+
var A = Object.assign({
|
|
1476
1476
|
position: c
|
|
1477
1477
|
}, l && rr), B = d === !0 ? sr({
|
|
1478
1478
|
x: h,
|
|
@@ -1482,15 +1482,15 @@ function We(e) {
|
|
|
1482
1482
|
y: u
|
|
1483
1483
|
};
|
|
1484
1484
|
if (h = B.x, u = B.y, o) {
|
|
1485
|
-
var
|
|
1486
|
-
return Object.assign({},
|
|
1485
|
+
var I;
|
|
1486
|
+
return Object.assign({}, A, (I = {}, I[f] = O ? "0" : "", I[L] = E ? "0" : "", I.transform = (y.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + u + "px)" : "translate3d(" + h + "px, " + u + "px, 0)", I));
|
|
1487
1487
|
}
|
|
1488
|
-
return Object.assign({},
|
|
1488
|
+
return Object.assign({}, A, (t = {}, t[f] = O ? u + "px" : "", t[L] = E ? h + "px" : "", t.transform = "", t));
|
|
1489
1489
|
}
|
|
1490
1490
|
function or(e) {
|
|
1491
1491
|
var t = e.state, n = e.options, i = n.gpuAcceleration, r = i === void 0 ? !0 : i, s = n.adaptive, a = s === void 0 ? !0 : s, c = n.roundOffsets, o = c === void 0 ? !0 : c, l = {
|
|
1492
1492
|
placement: J(t.placement),
|
|
1493
|
-
variation:
|
|
1493
|
+
variation: vt(t.placement),
|
|
1494
1494
|
popper: t.elements.popper,
|
|
1495
1495
|
popperRect: t.rects.popper,
|
|
1496
1496
|
gpuAcceleration: r,
|
|
@@ -1517,17 +1517,17 @@ const ar = {
|
|
|
1517
1517
|
fn: or,
|
|
1518
1518
|
data: {}
|
|
1519
1519
|
};
|
|
1520
|
-
var
|
|
1520
|
+
var Rt = {
|
|
1521
1521
|
passive: !0
|
|
1522
1522
|
};
|
|
1523
1523
|
function lr(e) {
|
|
1524
1524
|
var t = e.state, n = e.instance, i = e.options, r = i.scroll, s = r === void 0 ? !0 : r, a = i.resize, c = a === void 0 ? !0 : a, o = F(t.elements.popper), l = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1525
1525
|
return s && l.forEach(function(d) {
|
|
1526
|
-
d.addEventListener("scroll", n.update,
|
|
1527
|
-
}), c && o.addEventListener("resize", n.update,
|
|
1526
|
+
d.addEventListener("scroll", n.update, Rt);
|
|
1527
|
+
}), c && o.addEventListener("resize", n.update, Rt), function() {
|
|
1528
1528
|
s && l.forEach(function(d) {
|
|
1529
|
-
d.removeEventListener("scroll", n.update,
|
|
1530
|
-
}), c && o.removeEventListener("resize", n.update,
|
|
1529
|
+
d.removeEventListener("scroll", n.update, Rt);
|
|
1530
|
+
}), c && o.removeEventListener("resize", n.update, Rt);
|
|
1531
1531
|
};
|
|
1532
1532
|
}
|
|
1533
1533
|
const cr = {
|
|
@@ -1545,7 +1545,7 @@ var dr = {
|
|
|
1545
1545
|
bottom: "top",
|
|
1546
1546
|
top: "bottom"
|
|
1547
1547
|
};
|
|
1548
|
-
function
|
|
1548
|
+
function zt(e) {
|
|
1549
1549
|
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1550
1550
|
return dr[t];
|
|
1551
1551
|
});
|
|
@@ -1567,7 +1567,7 @@ function be(e) {
|
|
|
1567
1567
|
};
|
|
1568
1568
|
}
|
|
1569
1569
|
function ye(e) {
|
|
1570
|
-
return
|
|
1570
|
+
return mt(Z(e)).left + be(e).scrollLeft;
|
|
1571
1571
|
}
|
|
1572
1572
|
function hr(e, t) {
|
|
1573
1573
|
var n = F(e), i = Z(e), r = n.visualViewport, s = i.clientWidth, a = i.clientHeight, c = 0, o = 0;
|
|
@@ -1597,18 +1597,18 @@ function we(e) {
|
|
|
1597
1597
|
return /auto|scroll|overlay|hidden/.test(n + r + i);
|
|
1598
1598
|
}
|
|
1599
1599
|
function yn(e) {
|
|
1600
|
-
return ["html", "body", "#document"].indexOf(z(e)) >= 0 ? e.ownerDocument.body : N(e) && we(e) ? e : yn(
|
|
1600
|
+
return ["html", "body", "#document"].indexOf(z(e)) >= 0 ? e.ownerDocument.body : N(e) && we(e) ? e : yn(Zt(e));
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function At(e, t) {
|
|
1603
1603
|
var n;
|
|
1604
1604
|
t === void 0 && (t = []);
|
|
1605
1605
|
var i = yn(e), r = i === ((n = e.ownerDocument) == null ? void 0 : n.body), s = F(i), a = r ? [s].concat(s.visualViewport || [], we(i) ? i : []) : i, c = t.concat(a);
|
|
1606
1606
|
return r ? c : (
|
|
1607
1607
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1608
|
-
c.concat(
|
|
1608
|
+
c.concat(At(Zt(a)))
|
|
1609
1609
|
);
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1611
|
+
function ae(e) {
|
|
1612
1612
|
return Object.assign({}, e, {
|
|
1613
1613
|
left: e.x,
|
|
1614
1614
|
top: e.y,
|
|
@@ -1617,14 +1617,14 @@ function se(e) {
|
|
|
1617
1617
|
});
|
|
1618
1618
|
}
|
|
1619
1619
|
function pr(e, t) {
|
|
1620
|
-
var n =
|
|
1620
|
+
var n = mt(e, !1, t === "fixed");
|
|
1621
1621
|
return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
1622
1622
|
}
|
|
1623
1623
|
function Be(e, t, n) {
|
|
1624
|
-
return t === hn ?
|
|
1624
|
+
return t === hn ? ae(hr(e, n)) : st(t) ? pr(t, n) : ae(fr(Z(e)));
|
|
1625
1625
|
}
|
|
1626
1626
|
function gr(e) {
|
|
1627
|
-
var t =
|
|
1627
|
+
var t = At(Zt(e)), n = ["absolute", "fixed"].indexOf(G(e).position) >= 0, i = n && N(e) ? jt(e) : e;
|
|
1628
1628
|
return st(i) ? t.filter(function(r) {
|
|
1629
1629
|
return st(r) && gn(r, i) && z(r) !== "body";
|
|
1630
1630
|
}) : [];
|
|
@@ -1632,12 +1632,12 @@ function gr(e) {
|
|
|
1632
1632
|
function mr(e, t, n, i) {
|
|
1633
1633
|
var r = t === "clippingParents" ? gr(e) : [].concat(t), s = [].concat(r, [n]), a = s[0], c = s.reduce(function(o, l) {
|
|
1634
1634
|
var d = Be(e, l, i);
|
|
1635
|
-
return o.top = rt(d.top, o.top), o.right =
|
|
1635
|
+
return o.top = rt(d.top, o.top), o.right = Kt(d.right, o.right), o.bottom = Kt(d.bottom, o.bottom), o.left = rt(d.left, o.left), o;
|
|
1636
1636
|
}, Be(e, a, i));
|
|
1637
1637
|
return c.width = c.right - c.left, c.height = c.bottom - c.top, c.x = c.left, c.y = c.top, c;
|
|
1638
1638
|
}
|
|
1639
1639
|
function wn(e) {
|
|
1640
|
-
var t = e.reference, n = e.element, i = e.placement, r = i ? J(i) : null, s = i ?
|
|
1640
|
+
var t = e.reference, n = e.element, i = e.placement, r = i ? J(i) : null, s = i ? vt(i) : null, a = t.x + t.width / 2 - n.width / 2, c = t.y + t.height / 2 - n.height / 2, o;
|
|
1641
1641
|
switch (r) {
|
|
1642
1642
|
case P:
|
|
1643
1643
|
o = {
|
|
@@ -1657,7 +1657,7 @@ function wn(e) {
|
|
|
1657
1657
|
y: c
|
|
1658
1658
|
};
|
|
1659
1659
|
break;
|
|
1660
|
-
case
|
|
1660
|
+
case M:
|
|
1661
1661
|
o = {
|
|
1662
1662
|
x: t.x - n.width,
|
|
1663
1663
|
y: c
|
|
@@ -1673,48 +1673,48 @@ function wn(e) {
|
|
|
1673
1673
|
if (l != null) {
|
|
1674
1674
|
var d = l === "y" ? "height" : "width";
|
|
1675
1675
|
switch (s) {
|
|
1676
|
-
case
|
|
1676
|
+
case pt:
|
|
1677
1677
|
o[l] = o[l] - (t[d] / 2 - n[d] / 2);
|
|
1678
1678
|
break;
|
|
1679
|
-
case
|
|
1679
|
+
case Pt:
|
|
1680
1680
|
o[l] = o[l] + (t[d] / 2 - n[d] / 2);
|
|
1681
1681
|
break;
|
|
1682
1682
|
}
|
|
1683
1683
|
}
|
|
1684
1684
|
return o;
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1686
|
+
function Mt(e, t) {
|
|
1687
1687
|
t === void 0 && (t = {});
|
|
1688
|
-
var n = t, i = n.placement, r = i === void 0 ? e.placement : i, s = n.strategy, a = s === void 0 ? e.strategy : s, c = n.boundary, o = c === void 0 ? qi : c, l = n.rootBoundary, d = l === void 0 ? hn : l, b = n.elementContext, v = b === void 0 ?
|
|
1688
|
+
var n = t, i = n.placement, r = i === void 0 ? e.placement : i, s = n.strategy, a = s === void 0 ? e.strategy : s, c = n.boundary, o = c === void 0 ? qi : c, l = n.rootBoundary, d = l === void 0 ? hn : l, b = n.elementContext, v = b === void 0 ? wt : b, h = n.altBoundary, $ = h === void 0 ? !1 : h, u = n.padding, w = u === void 0 ? 0 : u, E = vn(typeof w != "number" ? w : bn(w, Dt)), O = v === wt ? Fi : wt, L = e.rects.popper, f = e.elements[$ ? O : v], y = mr(st(f) ? f : f.contextElement || Z(e.elements.popper), o, d, a), x = mt(e.elements.reference), k = wn({
|
|
1689
1689
|
reference: x,
|
|
1690
1690
|
element: L,
|
|
1691
1691
|
strategy: "absolute",
|
|
1692
1692
|
placement: r
|
|
1693
|
-
}), T =
|
|
1693
|
+
}), T = ae(Object.assign({}, L, k)), S = v === wt ? T : x, C = {
|
|
1694
1694
|
top: y.top - S.top + E.top,
|
|
1695
1695
|
bottom: S.bottom - y.bottom + E.bottom,
|
|
1696
1696
|
left: y.left - S.left + E.left,
|
|
1697
1697
|
right: S.right - y.right + E.right
|
|
1698
|
-
},
|
|
1699
|
-
if (v ===
|
|
1700
|
-
var B =
|
|
1701
|
-
Object.keys(C).forEach(function(
|
|
1702
|
-
var X = [_, W].indexOf(
|
|
1703
|
-
C[
|
|
1698
|
+
}, A = e.modifiersData.offset;
|
|
1699
|
+
if (v === wt && A) {
|
|
1700
|
+
var B = A[r];
|
|
1701
|
+
Object.keys(C).forEach(function(I) {
|
|
1702
|
+
var X = [_, W].indexOf(I) >= 0 ? 1 : -1, Y = [P, W].indexOf(I) >= 0 ? "y" : "x";
|
|
1703
|
+
C[I] += B[Y] * X;
|
|
1704
1704
|
});
|
|
1705
1705
|
}
|
|
1706
1706
|
return C;
|
|
1707
1707
|
}
|
|
1708
1708
|
function vr(e, t) {
|
|
1709
1709
|
t === void 0 && (t = {});
|
|
1710
|
-
var n = t, i = n.placement, r = n.boundary, s = n.rootBoundary, a = n.padding, c = n.flipVariations, o = n.allowedAutoPlacements, l = o === void 0 ? fn : o, d =
|
|
1711
|
-
return
|
|
1712
|
-
}) :
|
|
1710
|
+
var n = t, i = n.placement, r = n.boundary, s = n.rootBoundary, a = n.padding, c = n.flipVariations, o = n.allowedAutoPlacements, l = o === void 0 ? fn : o, d = vt(i), b = d ? c ? Fe : Fe.filter(function($) {
|
|
1711
|
+
return vt($) === d;
|
|
1712
|
+
}) : Dt, v = b.filter(function($) {
|
|
1713
1713
|
return l.indexOf($) >= 0;
|
|
1714
1714
|
});
|
|
1715
1715
|
v.length === 0 && (v = b);
|
|
1716
1716
|
var h = v.reduce(function($, u) {
|
|
1717
|
-
return $[u] =
|
|
1717
|
+
return $[u] = Mt(e, {
|
|
1718
1718
|
placement: u,
|
|
1719
1719
|
boundary: r,
|
|
1720
1720
|
rootBoundary: s,
|
|
@@ -1728,13 +1728,13 @@ function vr(e, t) {
|
|
|
1728
1728
|
function br(e) {
|
|
1729
1729
|
if (J(e) === pe)
|
|
1730
1730
|
return [];
|
|
1731
|
-
var t =
|
|
1731
|
+
var t = zt(e);
|
|
1732
1732
|
return [_e(e), t, _e(t)];
|
|
1733
1733
|
}
|
|
1734
1734
|
function yr(e) {
|
|
1735
1735
|
var t = e.state, n = e.options, i = e.name;
|
|
1736
1736
|
if (!t.modifiersData[i]._skip) {
|
|
1737
|
-
for (var r = n.mainAxis, s = r === void 0 ? !0 : r, a = n.altAxis, c = a === void 0 ? !0 : a, o = n.fallbackPlacements, l = n.padding, d = n.boundary, b = n.rootBoundary, v = n.altBoundary, h = n.flipVariations, $ = h === void 0 ? !0 : h, u = n.allowedAutoPlacements, w = t.options.placement, E = J(w), O = E === w, L = o || (O || !$ ? [
|
|
1737
|
+
for (var r = n.mainAxis, s = r === void 0 ? !0 : r, a = n.altAxis, c = a === void 0 ? !0 : a, o = n.fallbackPlacements, l = n.padding, d = n.boundary, b = n.rootBoundary, v = n.altBoundary, h = n.flipVariations, $ = h === void 0 ? !0 : h, u = n.allowedAutoPlacements, w = t.options.placement, E = J(w), O = E === w, L = o || (O || !$ ? [zt(w)] : br(w)), f = [w].concat(L).reduce(function(tt, K) {
|
|
1738
1738
|
return tt.concat(J(K) === pe ? vr(t, {
|
|
1739
1739
|
placement: K,
|
|
1740
1740
|
boundary: d,
|
|
@@ -1744,37 +1744,37 @@ function yr(e) {
|
|
|
1744
1744
|
allowedAutoPlacements: u
|
|
1745
1745
|
}) : K);
|
|
1746
1746
|
}, []), y = t.rects.reference, x = t.rects.popper, k = /* @__PURE__ */ new Map(), T = !0, S = f[0], C = 0; C < f.length; C++) {
|
|
1747
|
-
var
|
|
1748
|
-
placement:
|
|
1747
|
+
var A = f[C], B = J(A), I = vt(A) === pt, X = [P, W].indexOf(B) >= 0, Y = X ? "width" : "height", D = Mt(t, {
|
|
1748
|
+
placement: A,
|
|
1749
1749
|
boundary: d,
|
|
1750
1750
|
rootBoundary: b,
|
|
1751
1751
|
altBoundary: v,
|
|
1752
1752
|
padding: l
|
|
1753
|
-
}),
|
|
1754
|
-
y[Y] > x[Y] && (
|
|
1755
|
-
var
|
|
1756
|
-
if (s && U.push(
|
|
1753
|
+
}), V = X ? I ? _ : M : I ? W : P;
|
|
1754
|
+
y[Y] > x[Y] && (V = zt(V));
|
|
1755
|
+
var qt = zt(V), U = [];
|
|
1756
|
+
if (s && U.push(D[B] <= 0), c && U.push(D[V] <= 0, D[qt] <= 0), U.every(function(tt) {
|
|
1757
1757
|
return tt;
|
|
1758
1758
|
})) {
|
|
1759
|
-
S =
|
|
1759
|
+
S = A, T = !1;
|
|
1760
1760
|
break;
|
|
1761
1761
|
}
|
|
1762
|
-
k.set(
|
|
1762
|
+
k.set(A, U);
|
|
1763
1763
|
}
|
|
1764
1764
|
if (T)
|
|
1765
|
-
for (var
|
|
1766
|
-
var K = f.find(function(
|
|
1767
|
-
var
|
|
1768
|
-
if (
|
|
1769
|
-
return
|
|
1765
|
+
for (var Ft = $ ? 3 : 1, Xt = function(tt) {
|
|
1766
|
+
var K = f.find(function(Wt) {
|
|
1767
|
+
var yt = k.get(Wt);
|
|
1768
|
+
if (yt)
|
|
1769
|
+
return yt.slice(0, tt).every(function(ot) {
|
|
1770
1770
|
return ot;
|
|
1771
1771
|
});
|
|
1772
1772
|
});
|
|
1773
1773
|
if (K)
|
|
1774
1774
|
return S = K, "break";
|
|
1775
|
-
},
|
|
1776
|
-
var
|
|
1777
|
-
if (
|
|
1775
|
+
}, bt = Ft; bt > 0; bt--) {
|
|
1776
|
+
var Nt = Xt(bt);
|
|
1777
|
+
if (Nt === "break")
|
|
1778
1778
|
break;
|
|
1779
1779
|
}
|
|
1780
1780
|
t.placement !== S && (t.modifiersData[i]._skip = !0, t.placement = S, t.reset = !0);
|
|
@@ -1790,7 +1790,7 @@ const wr = {
|
|
|
1790
1790
|
_skip: !1
|
|
1791
1791
|
}
|
|
1792
1792
|
};
|
|
1793
|
-
function
|
|
1793
|
+
function Ve(e, t, n) {
|
|
1794
1794
|
return n === void 0 && (n = {
|
|
1795
1795
|
x: 0,
|
|
1796
1796
|
y: 0
|
|
@@ -1801,17 +1801,17 @@ function Re(e, t, n) {
|
|
|
1801
1801
|
left: e.left - t.width - n.x
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1805
|
-
return [P, _, W,
|
|
1804
|
+
function Re(e) {
|
|
1805
|
+
return [P, _, W, M].some(function(t) {
|
|
1806
1806
|
return e[t] >= 0;
|
|
1807
1807
|
});
|
|
1808
1808
|
}
|
|
1809
1809
|
function $r(e) {
|
|
1810
|
-
var t = e.state, n = e.name, i = t.rects.reference, r = t.rects.popper, s = t.modifiersData.preventOverflow, a =
|
|
1810
|
+
var t = e.state, n = e.name, i = t.rects.reference, r = t.rects.popper, s = t.modifiersData.preventOverflow, a = Mt(t, {
|
|
1811
1811
|
elementContext: "reference"
|
|
1812
|
-
}), c =
|
|
1812
|
+
}), c = Mt(t, {
|
|
1813
1813
|
altBoundary: !0
|
|
1814
|
-
}), o =
|
|
1814
|
+
}), o = Ve(a, i), l = Ve(c, r, s), d = Re(o), b = Re(l);
|
|
1815
1815
|
t.modifiersData[n] = {
|
|
1816
1816
|
referenceClippingOffsets: o,
|
|
1817
1817
|
popperEscapeOffsets: l,
|
|
@@ -1830,10 +1830,10 @@ const Er = {
|
|
|
1830
1830
|
fn: $r
|
|
1831
1831
|
};
|
|
1832
1832
|
function xr(e, t, n) {
|
|
1833
|
-
var i = J(e), r = [
|
|
1833
|
+
var i = J(e), r = [M, P].indexOf(i) >= 0 ? -1 : 1, s = typeof n == "function" ? n(Object.assign({}, t, {
|
|
1834
1834
|
placement: e
|
|
1835
1835
|
})) : n, a = s[0], c = s[1];
|
|
1836
|
-
return a = a || 0, c = (c || 0) * r, [
|
|
1836
|
+
return a = a || 0, c = (c || 0) * r, [M, _].indexOf(i) >= 0 ? {
|
|
1837
1837
|
x: c,
|
|
1838
1838
|
y: a
|
|
1839
1839
|
} : {
|
|
@@ -1874,12 +1874,12 @@ function Sr(e) {
|
|
|
1874
1874
|
return e === "x" ? "y" : "x";
|
|
1875
1875
|
}
|
|
1876
1876
|
function Cr(e) {
|
|
1877
|
-
var t = e.state, n = e.options, i = e.name, r = n.mainAxis, s = r === void 0 ? !0 : r, a = n.altAxis, c = a === void 0 ? !1 : a, o = n.boundary, l = n.rootBoundary, d = n.altBoundary, b = n.padding, v = n.tether, h = v === void 0 ? !0 : v, $ = n.tetherOffset, u = $ === void 0 ? 0 : $, w =
|
|
1877
|
+
var t = e.state, n = e.options, i = e.name, r = n.mainAxis, s = r === void 0 ? !0 : r, a = n.altAxis, c = a === void 0 ? !1 : a, o = n.boundary, l = n.rootBoundary, d = n.altBoundary, b = n.padding, v = n.tether, h = v === void 0 ? !0 : v, $ = n.tetherOffset, u = $ === void 0 ? 0 : $, w = Mt(t, {
|
|
1878
1878
|
boundary: o,
|
|
1879
1879
|
rootBoundary: l,
|
|
1880
1880
|
padding: b,
|
|
1881
1881
|
altBoundary: d
|
|
1882
|
-
}), E = J(t.placement), O =
|
|
1882
|
+
}), E = J(t.placement), O = vt(t.placement), L = !O, f = ve(E), y = Sr(f), x = t.modifiersData.popperOffsets, k = t.rects.reference, T = t.rects.popper, S = typeof u == "function" ? u(Object.assign({}, t.rects, {
|
|
1883
1883
|
placement: t.placement
|
|
1884
1884
|
})) : u, C = typeof S == "number" ? {
|
|
1885
1885
|
mainAxis: S,
|
|
@@ -1887,48 +1887,48 @@ function Cr(e) {
|
|
|
1887
1887
|
} : Object.assign({
|
|
1888
1888
|
mainAxis: 0,
|
|
1889
1889
|
altAxis: 0
|
|
1890
|
-
}, S),
|
|
1890
|
+
}, S), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, B = {
|
|
1891
1891
|
x: 0,
|
|
1892
1892
|
y: 0
|
|
1893
1893
|
};
|
|
1894
1894
|
if (x) {
|
|
1895
1895
|
if (s) {
|
|
1896
|
-
var
|
|
1896
|
+
var I, X = f === "y" ? P : M, Y = f === "y" ? W : _, D = f === "y" ? "height" : "width", V = x[f], qt = V + w[X], U = V - w[Y], Ft = h ? -T[D] / 2 : 0, Xt = O === pt ? k[D] : T[D], bt = O === pt ? -T[D] : -k[D], Nt = t.elements.arrow, tt = h && Nt ? me(Nt) : {
|
|
1897
1897
|
width: 0,
|
|
1898
1898
|
height: 0
|
|
1899
|
-
}, K = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : mn(),
|
|
1900
|
-
x[f] = xe, B[f] = xe -
|
|
1899
|
+
}, K = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : mn(), Wt = K[X], yt = K[Y], ot = Ct(0, k[D], tt[D]), xn = L ? k[D] / 2 - Ft - ot - Wt - C.mainAxis : Xt - ot - Wt - C.mainAxis, On = L ? -k[D] / 2 + Ft + ot + yt + C.mainAxis : bt + ot + yt + C.mainAxis, Yt = t.elements.arrow && jt(t.elements.arrow), Ln = Yt ? f === "y" ? Yt.clientTop || 0 : Yt.clientLeft || 0 : 0, Ee = (I = A == null ? void 0 : A[f]) != null ? I : 0, kn = V + xn - Ee - Ln, Tn = V + On - Ee, xe = Ct(h ? Kt(qt, kn) : qt, V, h ? rt(U, Tn) : U);
|
|
1900
|
+
x[f] = xe, B[f] = xe - V;
|
|
1901
1901
|
}
|
|
1902
1902
|
if (c) {
|
|
1903
|
-
var Oe, Sn = f === "x" ? P :
|
|
1904
|
-
x[y] =
|
|
1903
|
+
var Oe, Sn = f === "x" ? P : M, Cn = f === "x" ? W : _, et = x[y], _t = y === "y" ? "height" : "width", Le = et + w[Sn], ke = et - w[Cn], Ut = [P, M].indexOf(E) !== -1, Te = (Oe = A == null ? void 0 : A[y]) != null ? Oe : 0, Se = Ut ? Le : et - k[_t] - T[_t] - Te + C.altAxis, Ce = Ut ? et + k[_t] + T[_t] - Te - C.altAxis : ke, Ae = h && Ut ? Ui(Se, et, Ce) : Ct(h ? Se : Le, et, h ? Ce : ke);
|
|
1904
|
+
x[y] = Ae, B[y] = Ae - et;
|
|
1905
1905
|
}
|
|
1906
1906
|
t.modifiersData[i] = B;
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
|
-
const
|
|
1909
|
+
const Ar = {
|
|
1910
1910
|
name: "preventOverflow",
|
|
1911
1911
|
enabled: !0,
|
|
1912
1912
|
phase: "main",
|
|
1913
1913
|
fn: Cr,
|
|
1914
1914
|
requiresIfExists: ["offset"]
|
|
1915
1915
|
};
|
|
1916
|
-
function
|
|
1916
|
+
function Ir(e) {
|
|
1917
1917
|
return {
|
|
1918
1918
|
scrollLeft: e.scrollLeft,
|
|
1919
1919
|
scrollTop: e.scrollTop
|
|
1920
1920
|
};
|
|
1921
1921
|
}
|
|
1922
1922
|
function Pr(e) {
|
|
1923
|
-
return e === F(e) || !N(e) ? be(e) :
|
|
1923
|
+
return e === F(e) || !N(e) ? be(e) : Ir(e);
|
|
1924
1924
|
}
|
|
1925
|
-
function
|
|
1926
|
-
var t = e.getBoundingClientRect(), n =
|
|
1925
|
+
function Mr(e) {
|
|
1926
|
+
var t = e.getBoundingClientRect(), n = gt(t.width) / e.offsetWidth || 1, i = gt(t.height) / e.offsetHeight || 1;
|
|
1927
1927
|
return n !== 1 || i !== 1;
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1929
|
+
function Dr(e, t, n) {
|
|
1930
1930
|
n === void 0 && (n = !1);
|
|
1931
|
-
var i = N(t), r = N(t) &&
|
|
1931
|
+
var i = N(t), r = N(t) && Mr(t), s = Z(t), a = mt(e, r, n), c = {
|
|
1932
1932
|
scrollLeft: 0,
|
|
1933
1933
|
scrollTop: 0
|
|
1934
1934
|
}, o = {
|
|
@@ -1936,7 +1936,7 @@ function Mr(e, t, n) {
|
|
|
1936
1936
|
y: 0
|
|
1937
1937
|
};
|
|
1938
1938
|
return (i || !i && !n) && ((z(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1939
|
-
we(s)) && (c = Pr(t)), N(t) ? (o =
|
|
1939
|
+
we(s)) && (c = Pr(t)), N(t) ? (o = mt(t, !0), o.x += t.clientLeft, o.y += t.clientTop) : s && (o.x = ye(s))), {
|
|
1940
1940
|
x: a.left + c.scrollLeft - o.x,
|
|
1941
1941
|
y: a.top + c.scrollTop - o.y,
|
|
1942
1942
|
width: a.width,
|
|
@@ -2025,8 +2025,8 @@ function Wr(e) {
|
|
|
2025
2025
|
setOptions: function(u) {
|
|
2026
2026
|
var w = typeof u == "function" ? u(l.options) : u;
|
|
2027
2027
|
$(), l.options = Object.assign({}, s, l.options, w), l.scrollParents = {
|
|
2028
|
-
reference: st(a) ?
|
|
2029
|
-
popper:
|
|
2028
|
+
reference: st(a) ? At(a) : a.contextElement ? At(a.contextElement) : [],
|
|
2029
|
+
popper: At(c)
|
|
2030
2030
|
};
|
|
2031
2031
|
var E = qr(Nr([].concat(i, l.options.modifiers)));
|
|
2032
2032
|
return l.orderedModifiers = E.filter(function(O) {
|
|
@@ -2043,7 +2043,7 @@ function Wr(e) {
|
|
|
2043
2043
|
var u = l.elements, w = u.reference, E = u.popper;
|
|
2044
2044
|
if (Je(w, E)) {
|
|
2045
2045
|
l.rects = {
|
|
2046
|
-
reference:
|
|
2046
|
+
reference: Dr(w, jt(E), l.options.strategy === "fixed"),
|
|
2047
2047
|
popper: me(E)
|
|
2048
2048
|
}, l.reset = !1, l.placement = l.options.placement, l.orderedModifiers.forEach(function(T) {
|
|
2049
2049
|
return l.modifiersData[T.name] = Object.assign({}, T.data);
|
|
@@ -2103,10 +2103,10 @@ function Wr(e) {
|
|
|
2103
2103
|
return v;
|
|
2104
2104
|
};
|
|
2105
2105
|
}
|
|
2106
|
-
var _r = [cr, Tr, ar, Zi, Lr, wr,
|
|
2106
|
+
var _r = [cr, Tr, ar, Zi, Lr, wr, Ar, ir, Er], Br = /* @__PURE__ */ Wr({
|
|
2107
2107
|
defaultModifiers: _r
|
|
2108
2108
|
});
|
|
2109
|
-
async function
|
|
2109
|
+
async function le(e) {
|
|
2110
2110
|
const t = this.collection.findIndex((n) => n.id === e.id);
|
|
2111
2111
|
if (t >= 0) {
|
|
2112
2112
|
const n = this.collection[t];
|
|
@@ -2131,12 +2131,12 @@ async function $e(e) {
|
|
|
2131
2131
|
placement: t.config.placement,
|
|
2132
2132
|
modifiers: [
|
|
2133
2133
|
{ name: "eventListeners", enabled: !0 },
|
|
2134
|
-
...
|
|
2134
|
+
...Ii(t.config)
|
|
2135
2135
|
]
|
|
2136
2136
|
}), t.popper.update(), t.state = "opened", t;
|
|
2137
2137
|
}
|
|
2138
|
-
async function
|
|
2139
|
-
|
|
2138
|
+
async function Vr(e, t) {
|
|
2139
|
+
le.call(this, e);
|
|
2140
2140
|
const n = this, i = {
|
|
2141
2141
|
id: e.id,
|
|
2142
2142
|
state: "closed",
|
|
@@ -2151,7 +2151,7 @@ async function Rr(e, t) {
|
|
|
2151
2151
|
return fe.call(n, this);
|
|
2152
2152
|
},
|
|
2153
2153
|
deregister() {
|
|
2154
|
-
return
|
|
2154
|
+
return le.call(n, this);
|
|
2155
2155
|
}
|
|
2156
2156
|
};
|
|
2157
2157
|
return i.trigger.hasAttribute("aria-controls") && i.trigger.setAttribute("aria-expanded", "false"), En.call(this, i), this.collection.push(i), i.el.classList.contains(this.settings.stateActive) && (await i.open(), un.call(this, i)), i;
|
|
@@ -2174,7 +2174,7 @@ function En(e) {
|
|
|
2174
2174
|
})) : (e.__eventListeners = [{
|
|
2175
2175
|
el: ["trigger"],
|
|
2176
2176
|
type: ["click"],
|
|
2177
|
-
listener:
|
|
2177
|
+
listener: Di.bind(this, e)
|
|
2178
2178
|
}], e.__eventListeners.forEach((t) => {
|
|
2179
2179
|
t.el.forEach((n) => {
|
|
2180
2180
|
t.type.forEach((i) => {
|
|
@@ -2183,36 +2183,36 @@ function En(e) {
|
|
|
2183
2183
|
});
|
|
2184
2184
|
}))), e;
|
|
2185
2185
|
}
|
|
2186
|
-
var
|
|
2186
|
+
var St;
|
|
2187
2187
|
class ts extends Si {
|
|
2188
2188
|
constructor(t) {
|
|
2189
|
-
super(), ki(this,
|
|
2189
|
+
super(), ki(this, St, void 0), this.defaults = Ai, this.settings = { ...this.defaults, ...t }, this.trigger = null, Ti(this, St, ji.bind(this)), this.settings.autoMount && this.mount();
|
|
2190
2190
|
}
|
|
2191
|
-
async
|
|
2191
|
+
async mount(t) {
|
|
2192
2192
|
t && (this.settings = { ...this.settings, ...t });
|
|
2193
2193
|
const n = document.querySelectorAll(this.settings.selectorPopover);
|
|
2194
|
-
return await this.registerCollection(n), this.settings.eventListeners && this.
|
|
2194
|
+
return await this.registerCollection(n), this.settings.eventListeners && this.mountEventListeners(!1), this;
|
|
2195
2195
|
}
|
|
2196
|
-
async
|
|
2197
|
-
return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.
|
|
2196
|
+
async unmount() {
|
|
2197
|
+
return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.unmountEventListeners(!1), this;
|
|
2198
2198
|
}
|
|
2199
|
-
|
|
2199
|
+
mountEventListeners(t = !0) {
|
|
2200
2200
|
t && this.collection.forEach((n) => {
|
|
2201
2201
|
En.call(this, n);
|
|
2202
|
-
}), document.addEventListener("keydown", qe(this,
|
|
2202
|
+
}), document.addEventListener("keydown", qe(this, St), !1);
|
|
2203
2203
|
}
|
|
2204
|
-
|
|
2204
|
+
unmountEventListeners(t = !0) {
|
|
2205
2205
|
t && this.collection.forEach((n) => {
|
|
2206
2206
|
$n(n);
|
|
2207
|
-
}), document.removeEventListener("keydown", qe(this,
|
|
2207
|
+
}), document.removeEventListener("keydown", qe(this, St), !1);
|
|
2208
2208
|
}
|
|
2209
2209
|
register(t) {
|
|
2210
|
-
const n =
|
|
2211
|
-
return n.error ? Promise.reject(n.error) :
|
|
2210
|
+
const n = Mi.call(this, t);
|
|
2211
|
+
return n.error ? Promise.reject(n.error) : Vr.call(this, n.popover, n.trigger);
|
|
2212
2212
|
}
|
|
2213
2213
|
deregister(t) {
|
|
2214
2214
|
let n = this.get(t.id || t);
|
|
2215
|
-
return n ?
|
|
2215
|
+
return n ? le.call(this, n) : Promise.reject(new Error(`Failed to deregister; popover does not exist in collection with ID of: "${t.id || t}".`));
|
|
2216
2216
|
}
|
|
2217
2217
|
open(t) {
|
|
2218
2218
|
return $e.call(this, t);
|
|
@@ -2221,7 +2221,7 @@ class ts extends Si {
|
|
|
2221
2221
|
return fe.call(this, t);
|
|
2222
2222
|
}
|
|
2223
2223
|
}
|
|
2224
|
-
|
|
2224
|
+
St = /* @__PURE__ */ new WeakMap();
|
|
2225
2225
|
export {
|
|
2226
2226
|
Zr as Drawer,
|
|
2227
2227
|
Yr as Modal,
|