vrembem 4.0.0-next.8 → 4.0.0-next.9
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/dev/index.css +3673 -2154
- package/dev/index.css.map +1 -1
- package/dev/index.js +458 -490
- package/dev/index.js.map +1 -1
- package/dev/index.umd.cjs +408 -440
- 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 +953 -989
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +3 -3
- package/dist/index.umd.cjs.map +1 -1
- package/index.scss +2 -3
- package/package.json +22 -23
package/dev/index.umd.cjs
CHANGED
|
@@ -2,19 +2,15 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.vrembem = {}));
|
|
3
3
|
})(this, function(exports2) {
|
|
4
4
|
"use strict";
|
|
5
|
-
var b$2 = (t
|
|
6
|
-
|
|
7
|
-
throw TypeError("Cannot " + n);
|
|
5
|
+
var b$2 = (t) => {
|
|
6
|
+
throw TypeError(t);
|
|
8
7
|
};
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
12
|
-
e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
13
|
-
}, a$1 = (t, e, n, i) => (b$2(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n);
|
|
8
|
+
var g$2 = (t, e, n) => e.has(t) || b$2("Cannot " + n);
|
|
9
|
+
var o$2 = (t, e, n) => (g$2(t, e, "read from private field"), n ? n.call(t) : e.get(t)), m$2 = (t, e, n) => e.has(t) ? b$2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), a$1 = (t, e, n, i) => (g$2(t, e, "write to private field"), e.set(t, n), n);
|
|
14
10
|
var l$1;
|
|
15
|
-
let
|
|
11
|
+
let L$2 = class L {
|
|
16
12
|
constructor(e, n) {
|
|
17
|
-
m$2(this, l$1
|
|
13
|
+
m$2(this, l$1);
|
|
18
14
|
this.value = e, a$1(this, l$1, n), this.mql = null;
|
|
19
15
|
}
|
|
20
16
|
get handler() {
|
|
@@ -32,7 +28,7 @@
|
|
|
32
28
|
}
|
|
33
29
|
};
|
|
34
30
|
l$1 = /* @__PURE__ */ new WeakMap();
|
|
35
|
-
let
|
|
31
|
+
let S$3 = class S {
|
|
36
32
|
constructor() {
|
|
37
33
|
this.collection = [];
|
|
38
34
|
}
|
|
@@ -67,7 +63,7 @@
|
|
|
67
63
|
inert: ":not([inert]):not([inert] *)",
|
|
68
64
|
negTabIndex: ':not([tabindex^="-"])',
|
|
69
65
|
disabled: ":not(:disabled)"
|
|
70
|
-
},
|
|
66
|
+
}, $$2 = [
|
|
71
67
|
`a[href]${s.inert}${s.negTabIndex}`,
|
|
72
68
|
`area[href]${s.inert}${s.negTabIndex}`,
|
|
73
69
|
`input:not([type="hidden"]):not([type="radio"])${s.inert}${s.negTabIndex}${s.disabled}`,
|
|
@@ -86,12 +82,12 @@
|
|
|
86
82
|
`[tabindex]${s.inert}${s.negTabIndex}`
|
|
87
83
|
];
|
|
88
84
|
var f$2, u$1, d$2;
|
|
89
|
-
let
|
|
85
|
+
let q$2 = class q {
|
|
90
86
|
constructor(e = null, n = "[data-focus]") {
|
|
91
|
-
m$2(this, f$2
|
|
92
|
-
m$2(this, u$1
|
|
93
|
-
m$2(this, d$2
|
|
94
|
-
this.el = e, this.selectorFocus = n, a$1(this, u$1,
|
|
87
|
+
m$2(this, f$2);
|
|
88
|
+
m$2(this, u$1);
|
|
89
|
+
m$2(this, d$2);
|
|
90
|
+
this.el = e, this.selectorFocus = n, a$1(this, u$1, v$2.bind(this)), a$1(this, d$2, y$2.bind(this));
|
|
95
91
|
}
|
|
96
92
|
get focusable() {
|
|
97
93
|
return o$2(this, f$2);
|
|
@@ -116,24 +112,24 @@
|
|
|
116
112
|
}
|
|
117
113
|
getFocusable(e = this.el) {
|
|
118
114
|
const n = [], i = document.activeElement, r = e.scrollTop;
|
|
119
|
-
return e.querySelectorAll(
|
|
115
|
+
return e.querySelectorAll($$2.join(",")).forEach((h2) => {
|
|
120
116
|
h2.focus(), document.activeElement === h2 && n.push(h2);
|
|
121
117
|
}), e.scrollTop = r, i.focus(), n;
|
|
122
118
|
}
|
|
123
119
|
};
|
|
124
120
|
f$2 = /* @__PURE__ */ new WeakMap(), u$1 = /* @__PURE__ */ new WeakMap(), d$2 = /* @__PURE__ */ new WeakMap();
|
|
125
|
-
function
|
|
121
|
+
function v$2(t) {
|
|
126
122
|
(t.key === "Tab" || t.keyCode === 9) && (t.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (t.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (t.preventDefault(), this.focusableFirst.focus()));
|
|
127
123
|
}
|
|
128
|
-
function
|
|
124
|
+
function y$2(t) {
|
|
129
125
|
(t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
|
|
130
126
|
}
|
|
131
|
-
function
|
|
127
|
+
function T$2() {
|
|
132
128
|
return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
|
|
133
129
|
}
|
|
134
|
-
function
|
|
130
|
+
function E$2(t, e = document.body) {
|
|
135
131
|
if (t.slice(0, 2) !== "--") {
|
|
136
|
-
const i =
|
|
132
|
+
const i = T$2();
|
|
137
133
|
i && (t = `${i}${t}`), t = `--${t}`;
|
|
138
134
|
}
|
|
139
135
|
const n = getComputedStyle(e).getPropertyValue(t).trim();
|
|
@@ -141,11 +137,11 @@
|
|
|
141
137
|
return n;
|
|
142
138
|
throw new Error(`CSS variable "${t}" was not found!`);
|
|
143
139
|
}
|
|
144
|
-
function
|
|
140
|
+
function F$3(t, e) {
|
|
145
141
|
const i = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
|
|
146
142
|
return i ? JSON.parse(i) : {};
|
|
147
143
|
}
|
|
148
|
-
function
|
|
144
|
+
function k$3(t, e = true) {
|
|
149
145
|
const n = localStorage.getItem(t), i = n ? JSON.parse(n) : {};
|
|
150
146
|
return {
|
|
151
147
|
get(r) {
|
|
@@ -156,19 +152,17 @@
|
|
|
156
152
|
}
|
|
157
153
|
};
|
|
158
154
|
}
|
|
159
|
-
function
|
|
155
|
+
function w$2(t, e, n) {
|
|
160
156
|
const i = e.nodeType === Node.COMMENT_NODE, r = e.nodeType === Node.ELEMENT_NODE;
|
|
161
|
-
if (e = i || r ? e : document.querySelector(e), i && (n = "after"), !e)
|
|
162
|
-
|
|
163
|
-
if (typeof e[n] != "function")
|
|
164
|
-
throw new Error(`Not a valid teleport method: '${n}'`);
|
|
157
|
+
if (e = i || r ? e : document.querySelector(e), i && (n = "after"), !e) throw new Error(`Not a valid teleport reference: '${e}'`);
|
|
158
|
+
if (typeof e[n] != "function") throw new Error(`Not a valid teleport method: '${n}'`);
|
|
165
159
|
let c2 = null;
|
|
166
160
|
return i || (c2 = document.createComment("teleported #" + t.id), t.before(c2)), e[n](t), i && e.remove(), c2;
|
|
167
161
|
}
|
|
168
|
-
function
|
|
162
|
+
function C$2(t, e, n, i = "transition-duration") {
|
|
169
163
|
return new Promise((r) => {
|
|
170
164
|
if (typeof i == "string") {
|
|
171
|
-
const c2 =
|
|
165
|
+
const c2 = E$2(i, t), h2 = !!c2.includes("ms");
|
|
172
166
|
i = parseFloat(c2) * (h2 ? 1 : 1e3);
|
|
173
167
|
}
|
|
174
168
|
t.classList.remove(e.finish), t.classList.add(n.start), setTimeout(() => {
|
|
@@ -176,52 +170,43 @@
|
|
|
176
170
|
}, i);
|
|
177
171
|
});
|
|
178
172
|
}
|
|
179
|
-
function
|
|
173
|
+
function p$2(t, e) {
|
|
180
174
|
e && document.querySelectorAll(e).forEach((i) => {
|
|
181
175
|
t ? i.style.overflow = "hidden" : i.style.removeProperty("overflow");
|
|
182
176
|
});
|
|
183
177
|
}
|
|
184
|
-
function
|
|
178
|
+
function x$2(t, e) {
|
|
185
179
|
e && document.querySelectorAll(e).forEach((i) => {
|
|
186
180
|
t ? (i.inert = true, i.setAttribute("aria-hidden", true)) : (i.inert = null, i.removeAttribute("aria-hidden"));
|
|
187
181
|
});
|
|
188
182
|
}
|
|
189
|
-
function
|
|
190
|
-
|
|
183
|
+
function N$3(t, e) {
|
|
184
|
+
x$2(!!t, e.selectorInert), p$2(!!t, e.selectorOverflow);
|
|
191
185
|
}
|
|
192
186
|
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
193
187
|
__proto__: null,
|
|
194
|
-
Breakpoint:
|
|
195
|
-
Collection:
|
|
196
|
-
FocusTrap:
|
|
197
|
-
cssVar:
|
|
198
|
-
getConfig:
|
|
199
|
-
getPrefix:
|
|
200
|
-
localStore:
|
|
201
|
-
teleport:
|
|
202
|
-
transition:
|
|
203
|
-
updateGlobalState:
|
|
188
|
+
Breakpoint: L$2,
|
|
189
|
+
Collection: S$3,
|
|
190
|
+
FocusTrap: q$2,
|
|
191
|
+
cssVar: E$2,
|
|
192
|
+
getConfig: F$3,
|
|
193
|
+
getPrefix: T$2,
|
|
194
|
+
localStore: k$3,
|
|
195
|
+
teleport: w$2,
|
|
196
|
+
transition: C$2,
|
|
197
|
+
updateGlobalState: N$3
|
|
204
198
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
205
|
-
var I$1 = (t
|
|
206
|
-
|
|
207
|
-
throw TypeError("Cannot " + e);
|
|
199
|
+
var I$1 = (t) => {
|
|
200
|
+
throw TypeError(t);
|
|
208
201
|
};
|
|
209
|
-
var
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
if (!s2.has(t))
|
|
216
|
-
throw TypeError("Cannot " + e);
|
|
217
|
-
}, l = (t, s2, e) => (O$1(t, s2, "read from private field"), e ? e.call(t) : s2.get(t)), $$1 = (t, s2, e) => {
|
|
218
|
-
if (s2.has(t))
|
|
219
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
220
|
-
s2 instanceof WeakSet ? s2.add(t) : s2.set(t, e);
|
|
221
|
-
}, h$1 = (t, s2, e, i) => (O$1(t, s2, "write to private field"), i ? i.call(t, e) : s2.set(t, e), e), d$1;
|
|
222
|
-
let P$1 = class P {
|
|
202
|
+
var O$1 = (t, s2, e) => s2.has(t) || I$1("Cannot " + e);
|
|
203
|
+
var w$1 = (t, s2, e) => (O$1(t, s2, "read from private field"), e ? e.call(t) : s2.get(t)), S$2 = (t, s2, e) => s2.has(t) ? I$1("Cannot add the same private member more than once") : s2 instanceof WeakSet ? s2.add(t) : s2.set(t, e), k$2 = (t, s2, e, i) => (O$1(t, s2, "write to private field"), s2.set(t, e), e);
|
|
204
|
+
var M$2 = (t) => {
|
|
205
|
+
throw TypeError(t);
|
|
206
|
+
}, y$1 = (t, s2, e) => s2.has(t) || M$2("Cannot " + e), l = (t, s2, e) => (y$1(t, s2, "read from private field"), e ? e.call(t) : s2.get(t)), $$1 = (t, s2, e) => s2.has(t) ? M$2("Cannot add the same private member more than once") : s2 instanceof WeakSet ? s2.add(t) : s2.set(t, e), h$1 = (t, s2, e, i) => (y$1(t, s2, "write to private field"), s2.set(t, e), e), d$1;
|
|
207
|
+
let B$2 = class B {
|
|
223
208
|
constructor(s2, e) {
|
|
224
|
-
$$1(this, d$1
|
|
209
|
+
$$1(this, d$1), this.value = s2, h$1(this, d$1, e), this.mql = null;
|
|
225
210
|
}
|
|
226
211
|
get handler() {
|
|
227
212
|
return l(this, d$1);
|
|
@@ -238,7 +223,7 @@
|
|
|
238
223
|
}
|
|
239
224
|
};
|
|
240
225
|
d$1 = /* @__PURE__ */ new WeakMap();
|
|
241
|
-
let
|
|
226
|
+
let j$1 = class j {
|
|
242
227
|
constructor() {
|
|
243
228
|
this.collection = [];
|
|
244
229
|
}
|
|
@@ -273,7 +258,7 @@
|
|
|
273
258
|
inert: ":not([inert]):not([inert] *)",
|
|
274
259
|
negTabIndex: ':not([tabindex^="-"])',
|
|
275
260
|
disabled: ":not(:disabled)"
|
|
276
|
-
},
|
|
261
|
+
}, N$2 = [
|
|
277
262
|
`a[href]${o$1.inert}${o$1.negTabIndex}`,
|
|
278
263
|
`area[href]${o$1.inert}${o$1.negTabIndex}`,
|
|
279
264
|
`input:not([type="hidden"]):not([type="radio"])${o$1.inert}${o$1.negTabIndex}${o$1.disabled}`,
|
|
@@ -292,9 +277,9 @@
|
|
|
292
277
|
`[tabindex]${o$1.inert}${o$1.negTabIndex}`
|
|
293
278
|
];
|
|
294
279
|
var v$1, g$1, f$1;
|
|
295
|
-
let
|
|
280
|
+
let q$1 = class q {
|
|
296
281
|
constructor(s2 = null, e = "[data-focus]") {
|
|
297
|
-
$$1(this, v$1
|
|
282
|
+
$$1(this, v$1), $$1(this, g$1), $$1(this, f$1), this.el = s2, this.selectorFocus = e, h$1(this, g$1, K$2.bind(this)), h$1(this, f$1, V$2.bind(this));
|
|
298
283
|
}
|
|
299
284
|
get focusable() {
|
|
300
285
|
return l(this, v$1);
|
|
@@ -319,24 +304,24 @@
|
|
|
319
304
|
}
|
|
320
305
|
getFocusable(s2 = this.el) {
|
|
321
306
|
const e = [], i = document.activeElement, n = s2.scrollTop;
|
|
322
|
-
return s2.querySelectorAll(
|
|
307
|
+
return s2.querySelectorAll(N$2.join(",")).forEach((c2) => {
|
|
323
308
|
c2.focus(), document.activeElement === c2 && e.push(c2);
|
|
324
309
|
}), s2.scrollTop = n, i.focus(), e;
|
|
325
310
|
}
|
|
326
311
|
};
|
|
327
312
|
v$1 = /* @__PURE__ */ new WeakMap(), g$1 = /* @__PURE__ */ new WeakMap(), f$1 = /* @__PURE__ */ new WeakMap();
|
|
328
|
-
function
|
|
313
|
+
function K$2(t) {
|
|
329
314
|
(t.key === "Tab" || t.keyCode === 9) && (t.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (t.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (t.preventDefault(), this.focusableFirst.focus()));
|
|
330
315
|
}
|
|
331
|
-
function
|
|
316
|
+
function V$2(t) {
|
|
332
317
|
(t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
|
|
333
318
|
}
|
|
334
|
-
function
|
|
319
|
+
function D$2() {
|
|
335
320
|
return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
|
|
336
321
|
}
|
|
337
|
-
function
|
|
322
|
+
function W$1(t, s2 = document.body) {
|
|
338
323
|
if (t.slice(0, 2) !== "--") {
|
|
339
|
-
const i =
|
|
324
|
+
const i = D$2();
|
|
340
325
|
i && (t = `${i}${t}`), t = `--${t}`;
|
|
341
326
|
}
|
|
342
327
|
const e = getComputedStyle(s2).getPropertyValue(t).trim();
|
|
@@ -344,11 +329,11 @@
|
|
|
344
329
|
return e;
|
|
345
330
|
throw new Error(`CSS variable "${t}" was not found!`);
|
|
346
331
|
}
|
|
347
|
-
function
|
|
332
|
+
function _$2(t, s2) {
|
|
348
333
|
const e = (t.getAttribute(`data-${s2}`) || "").replace(/'/g, '"');
|
|
349
334
|
return e ? JSON.parse(e) : {};
|
|
350
335
|
}
|
|
351
|
-
function
|
|
336
|
+
function J$2(t, s2 = true) {
|
|
352
337
|
const e = localStorage.getItem(t), i = e ? JSON.parse(e) : {};
|
|
353
338
|
return {
|
|
354
339
|
get(n) {
|
|
@@ -359,10 +344,10 @@
|
|
|
359
344
|
}
|
|
360
345
|
};
|
|
361
346
|
}
|
|
362
|
-
function
|
|
347
|
+
function F$2(t, s2, e, i = "transition-duration") {
|
|
363
348
|
return new Promise((n) => {
|
|
364
349
|
if (typeof i == "string") {
|
|
365
|
-
const c2 =
|
|
350
|
+
const c2 = W$1(i, t), r = !!c2.includes("ms");
|
|
366
351
|
i = parseFloat(c2) * (r ? 1 : 1e3);
|
|
367
352
|
}
|
|
368
353
|
t.classList.remove(s2.finish), t.classList.add(e.start), setTimeout(() => {
|
|
@@ -370,20 +355,20 @@
|
|
|
370
355
|
}, i);
|
|
371
356
|
});
|
|
372
357
|
}
|
|
373
|
-
function
|
|
358
|
+
function z$1(t, s2) {
|
|
374
359
|
s2 && document.querySelectorAll(s2).forEach((e) => {
|
|
375
360
|
t ? e.style.overflow = "hidden" : e.style.removeProperty("overflow");
|
|
376
361
|
});
|
|
377
362
|
}
|
|
378
|
-
function
|
|
363
|
+
function G$1(t, s2) {
|
|
379
364
|
s2 && document.querySelectorAll(s2).forEach((e) => {
|
|
380
365
|
t ? (e.inert = true, e.setAttribute("aria-hidden", true)) : (e.inert = null, e.removeAttribute("aria-hidden"));
|
|
381
366
|
});
|
|
382
367
|
}
|
|
383
368
|
function C$1(t, s2) {
|
|
384
|
-
|
|
369
|
+
G$1(!!t, s2.selectorInert), z$1(!!t, s2.selectorOverflow);
|
|
385
370
|
}
|
|
386
|
-
const
|
|
371
|
+
const H$1 = {
|
|
387
372
|
autoMount: false,
|
|
388
373
|
// Data attributes
|
|
389
374
|
dataOpen: "drawer-open",
|
|
@@ -415,14 +400,14 @@
|
|
|
415
400
|
transition: true,
|
|
416
401
|
transitionDuration: "drawer-transition-duration"
|
|
417
402
|
};
|
|
418
|
-
function
|
|
403
|
+
function Q$2(t) {
|
|
419
404
|
t.store === "opened" ? t.open(false, false) : t.store === "closed" ? t.close(false, false) : t.store === "indeterminate" ? t.state = "indeterminate" : t.el.classList.contains(t.getSetting("stateOpened")) ? t.open(false, false) : t.el.classList.contains(t.getSetting("stateClosed")) ? t.close(false, false) : t.state = "indeterminate";
|
|
420
405
|
}
|
|
421
|
-
async function
|
|
406
|
+
async function R$1(t) {
|
|
422
407
|
t.store === "opened" ? await t.open(false, false) : t.store === "closed" ? await t.close(false, false) : t.store === "indeterminate" ? t.state != "indeterminate" && (t.state = "indeterminate") : (t.state != t.inlineState && (t.state = t.inlineState), t.inlineState === "opened" ? await t.open(false, false) : t.inlineState === "closed" && await t.close(false, false));
|
|
423
408
|
}
|
|
424
|
-
function
|
|
425
|
-
const s2 =
|
|
409
|
+
function U(t) {
|
|
410
|
+
const s2 = D$2(), e = t.getAttribute(`data-${this.settings.dataBreakpoint}`);
|
|
426
411
|
return this.settings.breakpoints && this.settings.breakpoints[e] ? this.settings.breakpoints[e] : getComputedStyle(document.body).getPropertyValue(`--${s2}breakpoint-${e}`).trim() ? getComputedStyle(document.body).getPropertyValue(`--${s2}breakpoint-${e}`).trim() : e;
|
|
427
412
|
}
|
|
428
413
|
function m$1(t) {
|
|
@@ -431,10 +416,10 @@
|
|
|
431
416
|
return s2;
|
|
432
417
|
throw new Error(`Drawer not found in collection with id of "${t.id || t}".`);
|
|
433
418
|
}
|
|
434
|
-
function
|
|
419
|
+
function P$1(t) {
|
|
435
420
|
t.state === "opened" ? t.mode === "modal" ? this.focusTrap.mount(t.dialog, this.settings.selectorFocus) : this.focusTrap.focus(t.dialog, this.settings.selectorFocus) : (t.trigger && (t.trigger.focus(), t.trigger = null), this.focusTrap.unmount());
|
|
436
421
|
}
|
|
437
|
-
async function
|
|
422
|
+
async function X(t) {
|
|
438
423
|
const s2 = t.target.closest(`
|
|
439
424
|
[data-${this.settings.dataOpen}],
|
|
440
425
|
[data-${this.settings.dataToggle}],
|
|
@@ -453,8 +438,7 @@
|
|
|
453
438
|
return n.trigger = s2, n.close();
|
|
454
439
|
} else {
|
|
455
440
|
const n = t.target.closest(this.settings.selectorDrawer);
|
|
456
|
-
if (n)
|
|
457
|
-
return this.close(n);
|
|
441
|
+
if (n) return this.close(n);
|
|
458
442
|
}
|
|
459
443
|
});
|
|
460
444
|
return;
|
|
@@ -462,11 +446,11 @@
|
|
|
462
446
|
if (this.activeModal && t.target.matches(this.settings.selectorScreen))
|
|
463
447
|
return this.close(this.activeModal.id);
|
|
464
448
|
}
|
|
465
|
-
function
|
|
449
|
+
function Y(t) {
|
|
466
450
|
if (t.key === "Escape" && this.activeModal)
|
|
467
451
|
return this.close(this.activeModal);
|
|
468
452
|
}
|
|
469
|
-
async function
|
|
453
|
+
async function L$1(t, s2 = true) {
|
|
470
454
|
const e = this.collection.findIndex((i) => i.id === t.id);
|
|
471
455
|
if (e >= 0) {
|
|
472
456
|
const i = this.collection[e];
|
|
@@ -478,69 +462,69 @@
|
|
|
478
462
|
}
|
|
479
463
|
async function x$1(t, s2, e = true) {
|
|
480
464
|
const i = m$1.call(this, t), n = { ...this.settings, ...i.settings };
|
|
481
|
-
return s2 !== void 0 && (n.transition = s2), (i.state === "closed" || i.state === "indeterminate") && (i.state = "opening", n.transition ? await
|
|
465
|
+
return s2 !== void 0 && (n.transition = s2), (i.state === "closed" || i.state === "indeterminate") && (i.state = "opening", n.transition ? await F$2(i.el, {
|
|
482
466
|
start: n.stateClosing,
|
|
483
467
|
finish: n.stateClosed
|
|
484
468
|
}, {
|
|
485
469
|
start: n.stateOpening,
|
|
486
470
|
finish: n.stateOpened
|
|
487
|
-
}, n.transitionDuration) : (i.el.classList.add(n.stateOpened), i.el.classList.remove(n.stateClosed)), i.state = "opened", i.mode === "modal" && C$1(true, n), e &&
|
|
471
|
+
}, n.transitionDuration) : (i.el.classList.add(n.stateOpened), i.el.classList.remove(n.stateClosed)), i.state = "opened", i.mode === "modal" && C$1(true, n), e && P$1.call(this, i), i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
|
|
488
472
|
detail: this,
|
|
489
473
|
bubbles: true
|
|
490
474
|
}))), i;
|
|
491
475
|
}
|
|
492
476
|
async function E$1(t, s2, e = true) {
|
|
493
477
|
const i = m$1.call(this, t), n = { ...this.settings, ...i.settings };
|
|
494
|
-
return s2 !== void 0 && (n.transition = s2), (i.state === "opened" || i.state === "indeterminate") && (i.state = "closing", document.activeElement.blur(), n.transition ? await
|
|
478
|
+
return s2 !== void 0 && (n.transition = s2), (i.state === "opened" || i.state === "indeterminate") && (i.state = "closing", document.activeElement.blur(), n.transition ? await F$2(i.el, {
|
|
495
479
|
start: n.stateOpening,
|
|
496
480
|
finish: n.stateOpened
|
|
497
481
|
}, {
|
|
498
482
|
start: n.stateClosing,
|
|
499
483
|
finish: n.stateClosed
|
|
500
|
-
}, n.transitionDuration) : (i.el.classList.add(n.stateClosed), i.el.classList.remove(n.stateOpened)), i.state = "closed", i.mode === "modal" && C$1(false, n), e &&
|
|
484
|
+
}, n.transitionDuration) : (i.el.classList.add(n.stateClosed), i.el.classList.remove(n.stateOpened)), i.state = "closed", i.mode === "modal" && C$1(false, n), e && P$1.call(this, i), i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
|
|
501
485
|
detail: this,
|
|
502
486
|
bubbles: true
|
|
503
487
|
}))), i;
|
|
504
488
|
}
|
|
505
|
-
async function
|
|
489
|
+
async function A$1(t, s2, e) {
|
|
506
490
|
const i = m$1.call(this, t);
|
|
507
491
|
return i.state === "closed" ? x$1.call(this, i, s2, e) : E$1.call(this, i, s2, e);
|
|
508
492
|
}
|
|
509
|
-
function
|
|
493
|
+
function Z$1(t) {
|
|
510
494
|
switch (t.mode) {
|
|
511
495
|
case "inline":
|
|
512
|
-
return
|
|
496
|
+
return tt$1.call(this, t);
|
|
513
497
|
case "modal":
|
|
514
|
-
return
|
|
498
|
+
return et$1.call(this, t);
|
|
515
499
|
default:
|
|
516
500
|
throw new Error(`"${t.mode}" is not a valid drawer mode.`);
|
|
517
501
|
}
|
|
518
502
|
}
|
|
519
|
-
async function
|
|
520
|
-
return t.el.classList.remove(t.getSetting("classModal")), t.dialog.removeAttribute("aria-modal"), C$1(false, { ...this.settings, ...t.settings }), this.focusTrap.unmount(), await
|
|
503
|
+
async function tt$1(t) {
|
|
504
|
+
return t.el.classList.remove(t.getSetting("classModal")), t.dialog.removeAttribute("aria-modal"), C$1(false, { ...this.settings, ...t.settings }), this.focusTrap.unmount(), await R$1(t), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
|
|
521
505
|
detail: this,
|
|
522
506
|
bubbles: true
|
|
523
507
|
})), t;
|
|
524
508
|
}
|
|
525
|
-
async function
|
|
509
|
+
async function et$1(t) {
|
|
526
510
|
return t.el.classList.add(t.getSetting("classModal")), t.dialog.setAttribute("aria-modal", "true"), await E$1.call(this, t, false, false), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
|
|
527
511
|
detail: this,
|
|
528
512
|
bubbles: true
|
|
529
513
|
})), t;
|
|
530
514
|
}
|
|
531
|
-
async function
|
|
532
|
-
await
|
|
533
|
-
const e = this, i = new
|
|
515
|
+
async function st$1(t, s2 = {}) {
|
|
516
|
+
await L$1.call(this, t, false);
|
|
517
|
+
const e = this, i = new B$2();
|
|
534
518
|
let n, c2 = "indeterminate";
|
|
535
519
|
const r = {
|
|
536
520
|
id: t.id,
|
|
537
521
|
el: t,
|
|
538
522
|
dialog: null,
|
|
539
523
|
trigger: null,
|
|
540
|
-
settings: { ...
|
|
524
|
+
settings: { ..._$2(t, this.settings.dataConfig), ...s2 },
|
|
541
525
|
inlineState: "indeterminate",
|
|
542
526
|
get breakpoint() {
|
|
543
|
-
return
|
|
527
|
+
return U.call(e, t);
|
|
544
528
|
},
|
|
545
529
|
get store() {
|
|
546
530
|
return e.store.get(this.id);
|
|
@@ -549,7 +533,7 @@
|
|
|
549
533
|
return n;
|
|
550
534
|
},
|
|
551
535
|
set mode(a2) {
|
|
552
|
-
n = a2,
|
|
536
|
+
n = a2, Z$1.call(e, this);
|
|
553
537
|
},
|
|
554
538
|
get state() {
|
|
555
539
|
return c2;
|
|
@@ -564,10 +548,10 @@
|
|
|
564
548
|
return E$1.call(e, this, a2, u2);
|
|
565
549
|
},
|
|
566
550
|
toggle(a2, u2) {
|
|
567
|
-
return
|
|
551
|
+
return A$1.call(e, this, a2, u2);
|
|
568
552
|
},
|
|
569
553
|
deregister() {
|
|
570
|
-
return
|
|
554
|
+
return L$1.call(e, this);
|
|
571
555
|
},
|
|
572
556
|
mountBreakpoint() {
|
|
573
557
|
const a2 = this.breakpoint, u2 = this.handleBreakpoint.bind(this);
|
|
@@ -586,15 +570,15 @@
|
|
|
586
570
|
};
|
|
587
571
|
this.collection.push(r);
|
|
588
572
|
const T2 = t.querySelector(r.getSetting("selectorDialog"));
|
|
589
|
-
return r.dialog = T2 || t, r.getSetting("setTabindex") && r.dialog.setAttribute("tabindex", "-1"), await
|
|
573
|
+
return r.dialog = T2 || t, r.getSetting("setTabindex") && r.dialog.setAttribute("tabindex", "-1"), await Q$2(r), r.inlineState = r.state, r.mode = t.classList.contains(r.getSetting("classModal")) ? "modal" : "inline", r.breakpoint && r.mountBreakpoint(), r;
|
|
590
574
|
}
|
|
591
575
|
var p$1, b$1;
|
|
592
|
-
let
|
|
576
|
+
let nt$1 = class nt extends j$1 {
|
|
593
577
|
constructor(e) {
|
|
594
578
|
super();
|
|
595
|
-
S$2(this, p$1
|
|
596
|
-
S$2(this, b$1
|
|
597
|
-
this.defaults =
|
|
579
|
+
S$2(this, p$1);
|
|
580
|
+
S$2(this, b$1);
|
|
581
|
+
this.defaults = H$1, this.settings = { ...this.defaults, ...e }, this.focusTrap = new q$1(), this.store = J$2(this.settings.storeKey, this.settings.store), k$2(this, p$1, X.bind(this)), k$2(this, b$1, Y.bind(this)), this.settings.autoMount && this.mount();
|
|
598
582
|
}
|
|
599
583
|
get activeModal() {
|
|
600
584
|
return this.collection.find((e) => e.state === "opened" && e.mode === "modal");
|
|
@@ -615,11 +599,11 @@
|
|
|
615
599
|
}
|
|
616
600
|
register(e, i = {}) {
|
|
617
601
|
let n = typeof e == "string" ? document.getElementById(e) : e;
|
|
618
|
-
return n ?
|
|
602
|
+
return n ? st$1.call(this, n, i) : Promise.reject(new Error(`Failed to register; drawer not found with ID of: "${e.id || e}".`));
|
|
619
603
|
}
|
|
620
604
|
deregister(e) {
|
|
621
605
|
let i = this.get(e.id || e);
|
|
622
|
-
return i ?
|
|
606
|
+
return i ? L$1.call(this, i) : Promise.reject(new Error(`Failed to deregister; drawer does not exist in collection with ID of: "${e.id || e}".`));
|
|
623
607
|
}
|
|
624
608
|
open(e, i, n) {
|
|
625
609
|
return x$1.call(this, e, i, n);
|
|
@@ -628,46 +612,37 @@
|
|
|
628
612
|
return E$1.call(this, e, i, n);
|
|
629
613
|
}
|
|
630
614
|
toggle(e, i, n) {
|
|
631
|
-
return
|
|
615
|
+
return A$1.call(this, e, i, n);
|
|
632
616
|
}
|
|
633
617
|
};
|
|
634
618
|
p$1 = /* @__PURE__ */ new WeakMap(), b$1 = /* @__PURE__ */ new WeakMap();
|
|
635
|
-
var L = (i
|
|
636
|
-
|
|
637
|
-
throw TypeError("Cannot " + t);
|
|
619
|
+
var L = (i) => {
|
|
620
|
+
throw TypeError(i);
|
|
638
621
|
};
|
|
639
|
-
var
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
},
|
|
644
|
-
|
|
645
|
-
if (!s2.has(i))
|
|
646
|
-
throw TypeError("Cannot " + t);
|
|
647
|
-
}, a = (i, s2, t) => (I(i, s2, "read from private field"), t ? t.call(i) : s2.get(i)), y = (i, s2, t) => {
|
|
648
|
-
if (s2.has(i))
|
|
649
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
650
|
-
s2 instanceof WeakSet ? s2.add(i) : s2.set(i, t);
|
|
651
|
-
}, w = (i, s2, t, e) => (I(i, s2, "write to private field"), e ? e.call(i, t) : s2.set(i, t), t);
|
|
652
|
-
class O {
|
|
622
|
+
var I = (i, e, t) => e.has(i) || L("Cannot " + t);
|
|
623
|
+
var f = (i, e, t) => (I(i, e, "read from private field"), t ? t.call(i) : e.get(i)), v = (i, e, t) => e.has(i) ? L("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), b = (i, e, t, s2) => (I(i, e, "write to private field"), e.set(i, t), t);
|
|
624
|
+
var S$1 = (i) => {
|
|
625
|
+
throw TypeError(i);
|
|
626
|
+
}, k$1 = (i, e, t) => e.has(i) || S$1("Cannot " + t), a = (i, e, t) => (k$1(i, e, "read from private field"), t ? t.call(i) : e.get(i)), y = (i, e, t) => e.has(i) ? S$1("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), w = (i, e, t, s2) => (k$1(i, e, "write to private field"), e.set(i, t), t);
|
|
627
|
+
class A {
|
|
653
628
|
constructor() {
|
|
654
629
|
this.collection = [];
|
|
655
630
|
}
|
|
656
|
-
async register(
|
|
657
|
-
return await this.deregister(
|
|
631
|
+
async register(e) {
|
|
632
|
+
return await this.deregister(e), this.collection.push(e), this.collection;
|
|
658
633
|
}
|
|
659
|
-
async deregister(
|
|
660
|
-
const t = this.collection.findIndex((
|
|
634
|
+
async deregister(e) {
|
|
635
|
+
const t = this.collection.findIndex((s2) => s2 === e);
|
|
661
636
|
if (t >= 0) {
|
|
662
|
-
const
|
|
663
|
-
Object.getOwnPropertyNames(
|
|
664
|
-
delete
|
|
637
|
+
const s2 = this.collection[t];
|
|
638
|
+
Object.getOwnPropertyNames(s2).forEach((n) => {
|
|
639
|
+
delete s2[n];
|
|
665
640
|
}), this.collection.splice(t, 1);
|
|
666
641
|
}
|
|
667
642
|
return this.collection;
|
|
668
643
|
}
|
|
669
|
-
async registerCollection(
|
|
670
|
-
return await Promise.all(Array.from(
|
|
644
|
+
async registerCollection(e) {
|
|
645
|
+
return await Promise.all(Array.from(e, (t) => {
|
|
671
646
|
this.register(t);
|
|
672
647
|
})), this.collection;
|
|
673
648
|
}
|
|
@@ -676,15 +651,15 @@
|
|
|
676
651
|
await this.deregister(this.collection[0]);
|
|
677
652
|
return this.collection;
|
|
678
653
|
}
|
|
679
|
-
get(
|
|
680
|
-
return this.collection.find((
|
|
654
|
+
get(e, t = "id") {
|
|
655
|
+
return this.collection.find((s2) => s2[t] === e);
|
|
681
656
|
}
|
|
682
657
|
}
|
|
683
658
|
const o = {
|
|
684
659
|
inert: ":not([inert]):not([inert] *)",
|
|
685
660
|
negTabIndex: ':not([tabindex^="-"])',
|
|
686
661
|
disabled: ":not(:disabled)"
|
|
687
|
-
},
|
|
662
|
+
}, F$1 = [
|
|
688
663
|
`a[href]${o.inert}${o.negTabIndex}`,
|
|
689
664
|
`area[href]${o.inert}${o.negTabIndex}`,
|
|
690
665
|
`input:not([type="hidden"]):not([type="radio"])${o.inert}${o.negTabIndex}${o.disabled}`,
|
|
@@ -703,15 +678,15 @@
|
|
|
703
678
|
`[tabindex]${o.inert}${o.negTabIndex}`
|
|
704
679
|
];
|
|
705
680
|
var g, c, d;
|
|
706
|
-
class
|
|
707
|
-
constructor(
|
|
708
|
-
y(this, g
|
|
681
|
+
class P {
|
|
682
|
+
constructor(e = null, t = "[data-focus]") {
|
|
683
|
+
y(this, g), y(this, c), y(this, d), this.el = e, this.selectorFocus = t, w(this, c, R.bind(this)), w(this, d, D$1.bind(this));
|
|
709
684
|
}
|
|
710
685
|
get focusable() {
|
|
711
686
|
return a(this, g);
|
|
712
687
|
}
|
|
713
|
-
set focusable(
|
|
714
|
-
w(this, g,
|
|
688
|
+
set focusable(e) {
|
|
689
|
+
w(this, g, e), a(this, g).length ? (document.removeEventListener("keydown", a(this, d)), document.addEventListener("keydown", a(this, c))) : (document.removeEventListener("keydown", a(this, c)), document.addEventListener("keydown", a(this, d)));
|
|
715
690
|
}
|
|
716
691
|
get focusableFirst() {
|
|
717
692
|
return this.focusable[0];
|
|
@@ -719,80 +694,78 @@
|
|
|
719
694
|
get focusableLast() {
|
|
720
695
|
return this.focusable[this.focusable.length - 1];
|
|
721
696
|
}
|
|
722
|
-
mount(
|
|
723
|
-
|
|
697
|
+
mount(e, t) {
|
|
698
|
+
e && (this.el = e), t && (this.selectorFocus = t), this.focusable = this.getFocusable(), this.focus();
|
|
724
699
|
}
|
|
725
700
|
unmount() {
|
|
726
701
|
this.el = null, this.focusable = [], document.removeEventListener("keydown", a(this, c)), document.removeEventListener("keydown", a(this, d));
|
|
727
702
|
}
|
|
728
|
-
focus(
|
|
729
|
-
(
|
|
703
|
+
focus(e = this.el, t = this.selectorFocus) {
|
|
704
|
+
(e.querySelector(t) || e).focus();
|
|
730
705
|
}
|
|
731
|
-
getFocusable(
|
|
732
|
-
const t = [],
|
|
733
|
-
return
|
|
706
|
+
getFocusable(e = this.el) {
|
|
707
|
+
const t = [], s2 = document.activeElement, n = e.scrollTop;
|
|
708
|
+
return e.querySelectorAll(F$1.join(",")).forEach((r) => {
|
|
734
709
|
r.focus(), document.activeElement === r && t.push(r);
|
|
735
|
-
}),
|
|
710
|
+
}), e.scrollTop = n, s2.focus(), t;
|
|
736
711
|
}
|
|
737
712
|
}
|
|
738
713
|
g = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap();
|
|
739
|
-
function
|
|
714
|
+
function R(i) {
|
|
740
715
|
(i.key === "Tab" || i.keyCode === 9) && (i.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (i.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (i.preventDefault(), this.focusableFirst.focus()));
|
|
741
716
|
}
|
|
742
|
-
function
|
|
717
|
+
function D$1(i) {
|
|
743
718
|
(i.key === "Tab" || i.keyCode === 9) && i.preventDefault();
|
|
744
719
|
}
|
|
745
|
-
function
|
|
720
|
+
function N$1() {
|
|
746
721
|
return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
|
|
747
722
|
}
|
|
748
|
-
function
|
|
723
|
+
function z(i, e = document.body) {
|
|
749
724
|
if (i.slice(0, 2) !== "--") {
|
|
750
|
-
const
|
|
751
|
-
|
|
725
|
+
const s2 = N$1();
|
|
726
|
+
s2 && (i = `${s2}${i}`), i = `--${i}`;
|
|
752
727
|
}
|
|
753
|
-
const t = getComputedStyle(
|
|
728
|
+
const t = getComputedStyle(e).getPropertyValue(i).trim();
|
|
754
729
|
if (t)
|
|
755
730
|
return t;
|
|
756
731
|
throw new Error(`CSS variable "${i}" was not found!`);
|
|
757
732
|
}
|
|
758
|
-
function
|
|
759
|
-
const t = (i.getAttribute(`data-${
|
|
733
|
+
function j(i, e) {
|
|
734
|
+
const t = (i.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
|
|
760
735
|
return t ? JSON.parse(t) : {};
|
|
761
736
|
}
|
|
762
|
-
function T$1(i,
|
|
763
|
-
const
|
|
764
|
-
if (
|
|
765
|
-
|
|
766
|
-
if (typeof s2[t] != "function")
|
|
767
|
-
throw new Error(`Not a valid teleport method: '${t}'`);
|
|
737
|
+
function T$1(i, e, t) {
|
|
738
|
+
const s2 = e.nodeType === Node.COMMENT_NODE, n = e.nodeType === Node.ELEMENT_NODE;
|
|
739
|
+
if (e = s2 || n ? e : document.querySelector(e), s2 && (t = "after"), !e) throw new Error(`Not a valid teleport reference: '${e}'`);
|
|
740
|
+
if (typeof e[t] != "function") throw new Error(`Not a valid teleport method: '${t}'`);
|
|
768
741
|
let r = null;
|
|
769
|
-
return
|
|
742
|
+
return s2 || (r = document.createComment("teleported #" + i.id), i.before(r)), e[t](i), s2 && e.remove(), r;
|
|
770
743
|
}
|
|
771
|
-
function
|
|
744
|
+
function O(i, e, t, s2 = "transition-duration") {
|
|
772
745
|
return new Promise((n) => {
|
|
773
|
-
if (typeof
|
|
774
|
-
const r =
|
|
775
|
-
|
|
746
|
+
if (typeof s2 == "string") {
|
|
747
|
+
const r = z(s2, i), l2 = !!r.includes("ms");
|
|
748
|
+
s2 = parseFloat(r) * (l2 ? 1 : 1e3);
|
|
776
749
|
}
|
|
777
|
-
i.classList.remove(
|
|
750
|
+
i.classList.remove(e.finish), i.classList.add(t.start), setTimeout(() => {
|
|
778
751
|
i.classList.add(t.finish), i.classList.remove(t.start), n(i);
|
|
779
|
-
},
|
|
752
|
+
}, s2);
|
|
780
753
|
});
|
|
781
754
|
}
|
|
782
|
-
function
|
|
783
|
-
|
|
755
|
+
function W(i, e) {
|
|
756
|
+
e && document.querySelectorAll(e).forEach((t) => {
|
|
784
757
|
i ? t.style.overflow = "hidden" : t.style.removeProperty("overflow");
|
|
785
758
|
});
|
|
786
759
|
}
|
|
787
|
-
function
|
|
788
|
-
|
|
760
|
+
function _$1(i, e) {
|
|
761
|
+
e && document.querySelectorAll(e).forEach((t) => {
|
|
789
762
|
i ? (t.inert = true, t.setAttribute("aria-hidden", true)) : (t.inert = null, t.removeAttribute("aria-hidden"));
|
|
790
763
|
});
|
|
791
764
|
}
|
|
792
|
-
function
|
|
793
|
-
|
|
765
|
+
function G(i, e) {
|
|
766
|
+
_$1(!!i, e.selectorInert), W(!!i, e.selectorOverflow);
|
|
794
767
|
}
|
|
795
|
-
const
|
|
768
|
+
const K$1 = {
|
|
796
769
|
autoMount: false,
|
|
797
770
|
// Data attributes
|
|
798
771
|
dataOpen: "modal-open",
|
|
@@ -822,96 +795,96 @@
|
|
|
822
795
|
transitionDuration: "modal-transition-duration"
|
|
823
796
|
};
|
|
824
797
|
function m(i) {
|
|
825
|
-
const
|
|
826
|
-
if (
|
|
827
|
-
return
|
|
798
|
+
const e = typeof i == "string" ? this.get(i) : this.get(i.id);
|
|
799
|
+
if (e)
|
|
800
|
+
return e;
|
|
828
801
|
throw new Error(`Modal not found in collection with id of "${i.id || i}".`);
|
|
829
802
|
}
|
|
830
803
|
function p() {
|
|
831
804
|
this.active ? this.focusTrap.mount(this.active.dialog, this.settings.selectorFocus) : (this.trigger && (this.trigger.focus(), this.trigger = null), this.focusTrap.unmount());
|
|
832
805
|
}
|
|
833
|
-
async function
|
|
834
|
-
const
|
|
806
|
+
async function V$1(i) {
|
|
807
|
+
const e = i.target.closest(`
|
|
835
808
|
[data-${this.settings.dataOpen}],
|
|
836
809
|
[data-${this.settings.dataReplace}],
|
|
837
810
|
[data-${this.settings.dataClose}]
|
|
838
811
|
`);
|
|
839
|
-
if (
|
|
840
|
-
if (i.preventDefault(),
|
|
841
|
-
const t =
|
|
842
|
-
return i.target.closest(this.settings.selectorModal) || (this.trigger =
|
|
812
|
+
if (e) {
|
|
813
|
+
if (i.preventDefault(), e.matches(`[data-${this.settings.dataOpen}]`)) {
|
|
814
|
+
const t = e.getAttribute(`data-${this.settings.dataOpen}`).trim(), s2 = m.call(this, t);
|
|
815
|
+
return i.target.closest(this.settings.selectorModal) || (this.trigger = e), s2.open();
|
|
843
816
|
}
|
|
844
|
-
if (
|
|
845
|
-
const t =
|
|
846
|
-
return i.target.closest(this.settings.selectorModal) || (this.trigger =
|
|
817
|
+
if (e.matches(`[data-${this.settings.dataReplace}]`)) {
|
|
818
|
+
const t = e.getAttribute(`data-${this.settings.dataReplace}`).trim(), s2 = m.call(this, t);
|
|
819
|
+
return i.target.closest(this.settings.selectorModal) || (this.trigger = e), s2.replace();
|
|
847
820
|
}
|
|
848
|
-
if (
|
|
849
|
-
const t =
|
|
821
|
+
if (e.matches(`[data-${this.settings.dataClose}]`)) {
|
|
822
|
+
const t = e.getAttribute(`data-${this.settings.dataClose}`).trim();
|
|
850
823
|
return t === "*" ? this.closeAll() : this.close(t);
|
|
851
824
|
}
|
|
852
825
|
}
|
|
853
826
|
if (this.active && i.target.matches(this.settings.selectorScreen) && !this.active.required)
|
|
854
827
|
return this.close(this.active.id);
|
|
855
828
|
}
|
|
856
|
-
function
|
|
829
|
+
function q(i) {
|
|
857
830
|
if (i.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
|
|
858
831
|
return this.close();
|
|
859
832
|
}
|
|
860
|
-
async function E(i,
|
|
861
|
-
const t = this.collection.findIndex((
|
|
833
|
+
async function E(i, e = true) {
|
|
834
|
+
const t = this.collection.findIndex((s2) => s2.id === i.id);
|
|
862
835
|
if (t >= 0) {
|
|
863
|
-
const
|
|
864
|
-
|
|
865
|
-
delete
|
|
836
|
+
const s2 = this.collection[t];
|
|
837
|
+
e && s2.state === "opened" ? await s2.close(false) : this.stack.remove(s2), s2.getSetting("teleport") && s2.teleportReturn(), Object.getOwnPropertyNames(s2).forEach((n) => {
|
|
838
|
+
delete s2[n];
|
|
866
839
|
}), this.collection.splice(t, 1);
|
|
867
840
|
}
|
|
868
841
|
return this.collection;
|
|
869
842
|
}
|
|
870
|
-
async function x(i,
|
|
871
|
-
const
|
|
872
|
-
return
|
|
843
|
+
async function x(i, e, t = true) {
|
|
844
|
+
const s2 = m.call(this, i), n = { ...this.settings, ...s2.settings };
|
|
845
|
+
return e !== void 0 && (n.transition = e), this.stack.moveToTop(s2), s2.state === "closed" && (s2.state = "opening", this.stack.add(s2), n.transition ? await O(s2.el, {
|
|
873
846
|
start: n.stateClosing,
|
|
874
847
|
finish: n.stateClosed
|
|
875
848
|
}, {
|
|
876
849
|
start: n.stateOpening,
|
|
877
850
|
finish: n.stateOpened
|
|
878
|
-
}, n.transitionDuration) : (
|
|
851
|
+
}, n.transitionDuration) : (s2.el.classList.add(n.stateOpened), s2.el.classList.remove(n.stateClosed)), s2.state = "opened"), t && p.call(this), s2.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
|
|
879
852
|
detail: this,
|
|
880
853
|
bubbles: true
|
|
881
|
-
})),
|
|
882
|
-
}
|
|
883
|
-
async function C(i,
|
|
884
|
-
const
|
|
885
|
-
if (
|
|
886
|
-
|
|
887
|
-
const n = { ...this.settings, ...
|
|
888
|
-
|
|
854
|
+
})), s2;
|
|
855
|
+
}
|
|
856
|
+
async function C(i, e, t = true) {
|
|
857
|
+
const s2 = i ? m.call(this, i) : this.active;
|
|
858
|
+
if (s2 && s2.state === "opened") {
|
|
859
|
+
s2.state = "closing";
|
|
860
|
+
const n = { ...this.settings, ...s2.settings };
|
|
861
|
+
e !== void 0 && (n.transition = e), document.activeElement.blur(), n.transition ? await O(s2.el, {
|
|
889
862
|
start: n.stateOpening,
|
|
890
863
|
finish: n.stateOpened
|
|
891
864
|
}, {
|
|
892
865
|
start: n.stateClosing,
|
|
893
866
|
finish: n.stateClosed
|
|
894
|
-
}, n.transitionDuration) : (
|
|
867
|
+
}, n.transitionDuration) : (s2.el.classList.add(n.stateClosed), s2.el.classList.remove(n.stateOpened)), this.stack.remove(s2), s2.state = "closed", t && p.call(this), s2.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
|
|
895
868
|
detail: this,
|
|
896
869
|
bubbles: true
|
|
897
870
|
}));
|
|
898
871
|
}
|
|
899
|
-
return
|
|
872
|
+
return s2;
|
|
900
873
|
}
|
|
901
|
-
async function $(i,
|
|
874
|
+
async function $(i, e) {
|
|
902
875
|
const t = [];
|
|
903
|
-
return await Promise.all(this.stack.value.map(async (
|
|
904
|
-
i && i ===
|
|
876
|
+
return await Promise.all(this.stack.value.map(async (s2) => {
|
|
877
|
+
i && i === s2.id ? Promise.resolve() : t.push(await C.call(this, s2, e, false)), s2.trigger = null;
|
|
905
878
|
})), t;
|
|
906
879
|
}
|
|
907
|
-
async function
|
|
908
|
-
const
|
|
880
|
+
async function M$1(i, e, t = true) {
|
|
881
|
+
const s2 = m.call(this, i);
|
|
909
882
|
let n, r;
|
|
910
|
-
return
|
|
883
|
+
return s2.state === "opened" ? (n = s2, r = await $.call(this, s2.id, e)) : (r = $.call(this, false, e), n = x.call(this, s2, e, false), await Promise.all([n, r])), t && p.call(this), { opened: n, closed: r };
|
|
911
884
|
}
|
|
912
|
-
async function
|
|
885
|
+
async function B$1(i, e = {}) {
|
|
913
886
|
await E.call(this, i, false);
|
|
914
|
-
const t = this,
|
|
887
|
+
const t = this, s2 = {
|
|
915
888
|
id: i.id,
|
|
916
889
|
state: "closed",
|
|
917
890
|
el: i,
|
|
@@ -920,7 +893,7 @@
|
|
|
920
893
|
return this.dialog.matches(this.getSetting("selectorRequired"));
|
|
921
894
|
},
|
|
922
895
|
returnRef: null,
|
|
923
|
-
settings: { ...
|
|
896
|
+
settings: { ...j(i, this.settings.dataConfig), ...e },
|
|
924
897
|
open(r, l2) {
|
|
925
898
|
return x.call(t, this, r, l2);
|
|
926
899
|
},
|
|
@@ -928,7 +901,7 @@
|
|
|
928
901
|
return C.call(t, this, r, l2);
|
|
929
902
|
},
|
|
930
903
|
replace(r, l2) {
|
|
931
|
-
return
|
|
904
|
+
return M$1.call(t, this, r, l2);
|
|
932
905
|
},
|
|
933
906
|
deregister() {
|
|
934
907
|
return E.call(t, this);
|
|
@@ -942,58 +915,58 @@
|
|
|
942
915
|
getSetting(r) {
|
|
943
916
|
return r in this.settings ? this.settings[r] : t.settings[r];
|
|
944
917
|
}
|
|
945
|
-
}, n = i.querySelector(
|
|
946
|
-
return
|
|
918
|
+
}, n = i.querySelector(s2.getSetting("selectorDialog"));
|
|
919
|
+
return s2.dialog = n || i, s2.dialog.setAttribute("aria-modal", "true"), s2.dialog.hasAttribute("role") || s2.dialog.setAttribute("role", "dialog"), s2.getSetting("setTabindex") && s2.dialog.setAttribute("tabindex", "-1"), s2.getSetting("teleport") && s2.teleport(), this.collection.push(s2), s2.el.classList.contains(this.settings.stateOpened) ? await s2.open(false) : (s2.el.classList.remove(this.settings.stateOpening), s2.el.classList.remove(this.settings.stateClosing), s2.el.classList.add(this.settings.stateClosed)), s2;
|
|
947
920
|
}
|
|
948
|
-
function
|
|
949
|
-
const
|
|
921
|
+
function J$1(i) {
|
|
922
|
+
const e = [];
|
|
950
923
|
return {
|
|
951
924
|
get value() {
|
|
952
|
-
return [...
|
|
925
|
+
return [...e];
|
|
953
926
|
},
|
|
954
927
|
get top() {
|
|
955
|
-
return
|
|
928
|
+
return e[e.length - 1];
|
|
956
929
|
},
|
|
957
930
|
updateIndex() {
|
|
958
|
-
|
|
931
|
+
e.forEach((t, s2) => {
|
|
959
932
|
t.el.style.zIndex = null;
|
|
960
933
|
const n = getComputedStyle(t.el)["z-index"];
|
|
961
|
-
t.el.style.zIndex = parseInt(n) +
|
|
934
|
+
t.el.style.zIndex = parseInt(n) + s2 + 1;
|
|
962
935
|
});
|
|
963
936
|
},
|
|
964
937
|
updateGlobalState() {
|
|
965
|
-
|
|
938
|
+
G(this.top, i), this.updateIndex();
|
|
966
939
|
},
|
|
967
940
|
add(t) {
|
|
968
941
|
t.el.style.zIndex = null;
|
|
969
|
-
const
|
|
970
|
-
t.el.style.zIndex = parseInt(
|
|
942
|
+
const s2 = getComputedStyle(t.el)["z-index"];
|
|
943
|
+
t.el.style.zIndex = parseInt(s2) + e.length + 1, e.push(t), this.updateGlobalState();
|
|
971
944
|
},
|
|
972
945
|
remove(t) {
|
|
973
|
-
const
|
|
974
|
-
|
|
946
|
+
const s2 = e.findIndex((n) => n.id === t.id);
|
|
947
|
+
s2 >= 0 && (t.el.style.zIndex = null, e.splice(s2, 1), this.updateGlobalState());
|
|
975
948
|
},
|
|
976
949
|
moveToTop(t) {
|
|
977
|
-
const
|
|
978
|
-
|
|
950
|
+
const s2 = e.findIndex((n) => n.id === t.id);
|
|
951
|
+
s2 >= 0 && (e.splice(s2, 1), this.add(t));
|
|
979
952
|
}
|
|
980
953
|
};
|
|
981
954
|
}
|
|
982
955
|
var u, h;
|
|
983
|
-
let
|
|
956
|
+
let Q$1 = class Q extends A {
|
|
984
957
|
constructor(t) {
|
|
985
958
|
super();
|
|
986
|
-
v(this, u
|
|
987
|
-
v(this, h
|
|
988
|
-
this.defaults =
|
|
959
|
+
v(this, u);
|
|
960
|
+
v(this, h);
|
|
961
|
+
this.defaults = K$1, this.settings = { ...this.defaults, ...t }, this.trigger = null, this.focusTrap = new P(), this.stack = J$1(this.settings), b(this, u, V$1.bind(this)), b(this, h, q.bind(this)), this.settings.autoMount && this.mount();
|
|
989
962
|
}
|
|
990
963
|
get active() {
|
|
991
964
|
return this.stack.top;
|
|
992
965
|
}
|
|
993
966
|
async mount(t) {
|
|
994
967
|
t && (this.settings = { ...this.settings, ...t });
|
|
995
|
-
const
|
|
996
|
-
return await this.registerCollection(
|
|
968
|
+
const s2 = document.querySelectorAll(this.settings.selectorModal);
|
|
969
|
+
return await this.registerCollection(s2), this.settings.eventListeners && this.mountEventListeners(), this;
|
|
997
970
|
}
|
|
998
971
|
async unmount() {
|
|
999
972
|
return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.unmountEventListeners(), this;
|
|
@@ -1004,39 +977,35 @@
|
|
|
1004
977
|
unmountEventListeners() {
|
|
1005
978
|
document.removeEventListener("click", f(this, u), false), document.removeEventListener("keydown", f(this, h), false);
|
|
1006
979
|
}
|
|
1007
|
-
register(t,
|
|
980
|
+
register(t, s2 = {}) {
|
|
1008
981
|
let n = typeof t == "string" ? document.getElementById(t) : t;
|
|
1009
|
-
return n ?
|
|
982
|
+
return n ? B$1.call(this, n, s2) : Promise.reject(new Error(`Failed to register; modal not found with ID of: "${t.id || t}".`));
|
|
1010
983
|
}
|
|
1011
984
|
deregister(t) {
|
|
1012
|
-
let
|
|
1013
|
-
return
|
|
985
|
+
let s2 = this.get(t.id || t);
|
|
986
|
+
return s2 ? E.call(this, s2) : Promise.reject(new Error(`Failed to deregister; modal does not exist in collection with ID of: "${t.id || t}".`));
|
|
1014
987
|
}
|
|
1015
|
-
open(t,
|
|
1016
|
-
return x.call(this, t,
|
|
988
|
+
open(t, s2, n) {
|
|
989
|
+
return x.call(this, t, s2, n);
|
|
1017
990
|
}
|
|
1018
|
-
close(t,
|
|
1019
|
-
return C.call(this, t,
|
|
991
|
+
close(t, s2, n) {
|
|
992
|
+
return C.call(this, t, s2, n);
|
|
1020
993
|
}
|
|
1021
|
-
replace(t,
|
|
1022
|
-
return
|
|
994
|
+
replace(t, s2, n) {
|
|
995
|
+
return M$1.call(this, t, s2, n);
|
|
1023
996
|
}
|
|
1024
|
-
async closeAll(t = false,
|
|
1025
|
-
const r = await $.call(this, t,
|
|
997
|
+
async closeAll(t = false, s2, n = true) {
|
|
998
|
+
const r = await $.call(this, t, s2);
|
|
1026
999
|
return n && p.call(this), r;
|
|
1027
1000
|
}
|
|
1028
1001
|
};
|
|
1029
1002
|
u = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
|
|
1030
|
-
var Ue = (e
|
|
1031
|
-
|
|
1032
|
-
throw TypeError("Cannot " + r);
|
|
1003
|
+
var Ue = (e) => {
|
|
1004
|
+
throw TypeError(e);
|
|
1033
1005
|
};
|
|
1034
|
-
var
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
t instanceof WeakSet ? t.add(e) : t.set(e, r);
|
|
1038
|
-
}, Ke = (e, t, r, i) => (Ue(e, t, "write to private field"), i ? i.call(e, r) : t.set(e, r), r);
|
|
1039
|
-
class $t {
|
|
1006
|
+
var _e = (e, t, r) => t.has(e) || Ue("Cannot " + r);
|
|
1007
|
+
var Ae = (e, t, r) => (_e(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Ke = (e, t, r) => t.has(e) ? Ue("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Ge = (e, t, r, i) => (_e(e, t, "write to private field"), t.set(e, r), r);
|
|
1008
|
+
class Ct {
|
|
1040
1009
|
constructor() {
|
|
1041
1010
|
this.collection = [];
|
|
1042
1011
|
}
|
|
@@ -1067,10 +1036,10 @@
|
|
|
1067
1036
|
return this.collection.find((i) => i[r] === t);
|
|
1068
1037
|
}
|
|
1069
1038
|
}
|
|
1070
|
-
function
|
|
1039
|
+
function kt() {
|
|
1071
1040
|
return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
|
|
1072
1041
|
}
|
|
1073
|
-
const
|
|
1042
|
+
const Dt = {
|
|
1074
1043
|
autoMount: false,
|
|
1075
1044
|
// Selectors
|
|
1076
1045
|
selectorPopover: ".popover",
|
|
@@ -1082,7 +1051,7 @@
|
|
|
1082
1051
|
eventType: "click",
|
|
1083
1052
|
placement: "bottom"
|
|
1084
1053
|
};
|
|
1085
|
-
function
|
|
1054
|
+
function at(e, t) {
|
|
1086
1055
|
const r = getComputedStyle(e), i = {
|
|
1087
1056
|
placement: t.placement,
|
|
1088
1057
|
event: t.eventType,
|
|
@@ -1093,7 +1062,7 @@
|
|
|
1093
1062
|
"arrow-padding": 0
|
|
1094
1063
|
};
|
|
1095
1064
|
for (const n in i) {
|
|
1096
|
-
const o2 =
|
|
1065
|
+
const o2 = kt(), l2 = r.getPropertyValue(`--${o2}popover-${n}`).trim();
|
|
1097
1066
|
l2 && (i[n] = l2);
|
|
1098
1067
|
}
|
|
1099
1068
|
return i;
|
|
@@ -1137,7 +1106,7 @@
|
|
|
1137
1106
|
}
|
|
1138
1107
|
return t;
|
|
1139
1108
|
}
|
|
1140
|
-
function
|
|
1109
|
+
function Rt(e) {
|
|
1141
1110
|
return [{
|
|
1142
1111
|
name: "offset",
|
|
1143
1112
|
options: {
|
|
@@ -1161,17 +1130,17 @@
|
|
|
1161
1130
|
}
|
|
1162
1131
|
}];
|
|
1163
1132
|
}
|
|
1164
|
-
function
|
|
1133
|
+
function st(e) {
|
|
1165
1134
|
const t = typeof e == "string" ? this.get(e) : this.get(e.id);
|
|
1166
1135
|
if (t)
|
|
1167
1136
|
return t;
|
|
1168
1137
|
throw new Error(`Popover not found in collection with id of "${e}".`);
|
|
1169
1138
|
}
|
|
1170
|
-
function
|
|
1139
|
+
function Bt(e) {
|
|
1171
1140
|
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") : false : false;
|
|
1172
1141
|
}
|
|
1173
|
-
function
|
|
1174
|
-
const t =
|
|
1142
|
+
function Tt(e) {
|
|
1143
|
+
const t = Bt.call(this, e);
|
|
1175
1144
|
if (t) {
|
|
1176
1145
|
const r = document.querySelector(`#${t}`), i = document.querySelector(`[aria-controls="${t}"]`) || document.querySelector(`[aria-describedby="${t}"]`);
|
|
1177
1146
|
return !i && !r ? { error: new Error(`No popover elements found using the ID: "${t}".`) } : i ? r ? { popover: r, trigger: i } : { error: new Error("No popover associated with the provided popover trigger.") } : { error: new Error("No popover trigger associated with the provided popover.") };
|
|
@@ -1179,18 +1148,18 @@
|
|
|
1179
1148
|
return { error: new Error("Could not resolve the popover ID.") };
|
|
1180
1149
|
}
|
|
1181
1150
|
async function ke(e) {
|
|
1182
|
-
const t = e ?
|
|
1151
|
+
const t = e ? st.call(this, e) : await ct.call(this);
|
|
1183
1152
|
return t && t.state === "opened" && (t.el.classList.remove(this.settings.stateActive), t.trigger.hasAttribute("aria-controls") && t.trigger.setAttribute("aria-expanded", "false"), t.popper.setOptions({
|
|
1184
1153
|
modifiers: [{ name: "eventListeners", enabled: false }]
|
|
1185
1154
|
}), t.state = "closed", t.trigger === this.trigger && (this.trigger = null)), t;
|
|
1186
1155
|
}
|
|
1187
|
-
async function
|
|
1156
|
+
async function ct() {
|
|
1188
1157
|
const e = [];
|
|
1189
1158
|
return await Promise.all(this.collection.map(async (t) => {
|
|
1190
1159
|
t.state === "opened" && e.push(await ke.call(this, t));
|
|
1191
1160
|
})), e;
|
|
1192
1161
|
}
|
|
1193
|
-
function
|
|
1162
|
+
function lt(e) {
|
|
1194
1163
|
e.state == "opened" && setTimeout(() => {
|
|
1195
1164
|
const t = e.el.closest(":hover") === e.el || e.trigger.closest(":hover") === e.trigger, r = document.activeElement.closest(
|
|
1196
1165
|
`#${e.id}, [aria-controls="${e.id}"], [aria-describedby="${e.id}"]`
|
|
@@ -1198,24 +1167,24 @@
|
|
|
1198
1167
|
return !t && !r && e.close(), e;
|
|
1199
1168
|
}, 1);
|
|
1200
1169
|
}
|
|
1201
|
-
function Tt(e) {
|
|
1202
|
-
e.state === "opened" ? e.close() : (this.trigger = e.trigger, e.open(), lt.call(this, e));
|
|
1203
|
-
}
|
|
1204
1170
|
function St(e) {
|
|
1171
|
+
e.state === "opened" ? e.close() : (this.trigger = e.trigger, e.open(), ft.call(this, e));
|
|
1172
|
+
}
|
|
1173
|
+
function Mt(e) {
|
|
1205
1174
|
switch (e.key) {
|
|
1206
1175
|
case "Escape":
|
|
1207
|
-
this.trigger && this.trigger.focus(),
|
|
1176
|
+
this.trigger && this.trigger.focus(), ct.call(this);
|
|
1208
1177
|
return;
|
|
1209
1178
|
case "Tab":
|
|
1210
1179
|
this.collection.forEach((t) => {
|
|
1211
|
-
|
|
1180
|
+
lt.call(this, t);
|
|
1212
1181
|
});
|
|
1213
1182
|
return;
|
|
1214
1183
|
default:
|
|
1215
1184
|
return;
|
|
1216
1185
|
}
|
|
1217
1186
|
}
|
|
1218
|
-
function
|
|
1187
|
+
function ft(e) {
|
|
1219
1188
|
const t = this;
|
|
1220
1189
|
document.addEventListener("click", function r(i) {
|
|
1221
1190
|
i.target.closest(
|
|
@@ -1223,11 +1192,11 @@
|
|
|
1223
1192
|
) ? e.el && !e.el.classList.contains(t.settings.stateActive) && this.removeEventListener("click", r) : (e.el && e.el.classList.contains(t.settings.stateActive) && e.close(), this.removeEventListener("click", r));
|
|
1224
1193
|
});
|
|
1225
1194
|
}
|
|
1226
|
-
var k = "top", S = "bottom", M = "right", D = "left", De = "auto", le = [k, S, M, D], Q = "start", se = "end",
|
|
1195
|
+
var k = "top", S = "bottom", M = "right", D = "left", De = "auto", le = [k, S, M, D], Q = "start", se = "end", jt = "clippingParents", ut = "viewport", ne = "popper", Wt = "reference", Je = /* @__PURE__ */ le.reduce(function(e, t) {
|
|
1227
1196
|
return e.concat([t + "-" + Q, t + "-" + se]);
|
|
1228
|
-
}, []),
|
|
1197
|
+
}, []), pt = /* @__PURE__ */ [].concat(le, [De]).reduce(function(e, t) {
|
|
1229
1198
|
return e.concat([t, t + "-" + Q, t + "-" + se]);
|
|
1230
|
-
}, []),
|
|
1199
|
+
}, []), Ht = "beforeRead", Nt = "read", Vt = "afterRead", It = "beforeMain", Ft = "main", Xt = "afterMain", Yt = "beforeWrite", qt = "write", zt = "afterWrite", Ut = [Ht, Nt, Vt, It, Ft, Xt, Yt, qt, zt];
|
|
1231
1200
|
function N(e) {
|
|
1232
1201
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
1233
1202
|
}
|
|
@@ -1254,7 +1223,7 @@
|
|
|
1254
1223
|
var t = B(e).ShadowRoot;
|
|
1255
1224
|
return e instanceof t || e instanceof ShadowRoot;
|
|
1256
1225
|
}
|
|
1257
|
-
function
|
|
1226
|
+
function _t(e) {
|
|
1258
1227
|
var t = e.state;
|
|
1259
1228
|
Object.keys(t.elements).forEach(function(r) {
|
|
1260
1229
|
var i = t.styles[r] || {}, n = t.attributes[r] || {}, o2 = t.elements[r];
|
|
@@ -1264,7 +1233,7 @@
|
|
|
1264
1233
|
}));
|
|
1265
1234
|
});
|
|
1266
1235
|
}
|
|
1267
|
-
function
|
|
1236
|
+
function Kt(e) {
|
|
1268
1237
|
var t = e.state, r = {
|
|
1269
1238
|
popper: {
|
|
1270
1239
|
position: t.options.strategy,
|
|
@@ -1288,12 +1257,12 @@
|
|
|
1288
1257
|
});
|
|
1289
1258
|
};
|
|
1290
1259
|
}
|
|
1291
|
-
const
|
|
1260
|
+
const Gt = {
|
|
1292
1261
|
name: "applyStyles",
|
|
1293
1262
|
enabled: true,
|
|
1294
1263
|
phase: "write",
|
|
1295
|
-
fn:
|
|
1296
|
-
effect:
|
|
1264
|
+
fn: _t,
|
|
1265
|
+
effect: Kt,
|
|
1297
1266
|
requires: ["computeStyles"]
|
|
1298
1267
|
};
|
|
1299
1268
|
function H(e) {
|
|
@@ -1306,14 +1275,14 @@
|
|
|
1306
1275
|
return t.brand + "/" + t.version;
|
|
1307
1276
|
}).join(" ") : navigator.userAgent;
|
|
1308
1277
|
}
|
|
1309
|
-
function
|
|
1278
|
+
function dt() {
|
|
1310
1279
|
return !/^((?!chrome|android).)*safari/i.test(Le());
|
|
1311
1280
|
}
|
|
1312
1281
|
function ee(e, t, r) {
|
|
1313
1282
|
t === void 0 && (t = false), r === void 0 && (r = false);
|
|
1314
1283
|
var i = e.getBoundingClientRect(), n = 1, o2 = 1;
|
|
1315
1284
|
t && T(e) && (n = e.offsetWidth > 0 && Z(i.width) / e.offsetWidth || 1, o2 = e.offsetHeight > 0 && Z(i.height) / e.offsetHeight || 1);
|
|
1316
|
-
var l2 = K(e) ? B(e) : window, s2 = l2.visualViewport, a2 = !
|
|
1285
|
+
var l2 = K(e) ? B(e) : window, s2 = l2.visualViewport, a2 = !dt() && r, f2 = (i.left + (a2 && s2 ? s2.offsetLeft : 0)) / n, c2 = (i.top + (a2 && s2 ? s2.offsetTop : 0)) / o2, h2 = i.width / n, y2 = i.height / o2;
|
|
1317
1286
|
return {
|
|
1318
1287
|
width: h2,
|
|
1319
1288
|
height: y2,
|
|
@@ -1334,7 +1303,7 @@
|
|
|
1334
1303
|
height: i
|
|
1335
1304
|
};
|
|
1336
1305
|
}
|
|
1337
|
-
function
|
|
1306
|
+
function vt(e, t) {
|
|
1338
1307
|
var r = t.getRootNode && t.getRootNode();
|
|
1339
1308
|
if (e.contains(t))
|
|
1340
1309
|
return true;
|
|
@@ -1351,7 +1320,7 @@
|
|
|
1351
1320
|
function V(e) {
|
|
1352
1321
|
return B(e).getComputedStyle(e);
|
|
1353
1322
|
}
|
|
1354
|
-
function
|
|
1323
|
+
function Jt(e) {
|
|
1355
1324
|
return ["table", "td", "th"].indexOf(N(e)) >= 0;
|
|
1356
1325
|
}
|
|
1357
1326
|
function F(e) {
|
|
@@ -1372,11 +1341,11 @@
|
|
|
1372
1341
|
F(e)
|
|
1373
1342
|
);
|
|
1374
1343
|
}
|
|
1375
|
-
function
|
|
1344
|
+
function Qe(e) {
|
|
1376
1345
|
return !T(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
1377
1346
|
V(e).position === "fixed" ? null : e.offsetParent;
|
|
1378
1347
|
}
|
|
1379
|
-
function
|
|
1348
|
+
function Qt(e) {
|
|
1380
1349
|
var t = /firefox/i.test(Le()), r = /Trident/i.test(Le());
|
|
1381
1350
|
if (r && T(e)) {
|
|
1382
1351
|
var i = V(e);
|
|
@@ -1393,9 +1362,9 @@
|
|
|
1393
1362
|
return null;
|
|
1394
1363
|
}
|
|
1395
1364
|
function fe(e) {
|
|
1396
|
-
for (var t = B(e), r =
|
|
1397
|
-
r =
|
|
1398
|
-
return r && (N(r) === "html" || N(r) === "body" && V(r).position === "static") ? t : r ||
|
|
1365
|
+
for (var t = B(e), r = Qe(e); r && Jt(r) && V(r).position === "static"; )
|
|
1366
|
+
r = Qe(r);
|
|
1367
|
+
return r && (N(r) === "html" || N(r) === "body" && V(r).position === "static") ? t : r || Qt(e) || t;
|
|
1399
1368
|
}
|
|
1400
1369
|
function Te(e) {
|
|
1401
1370
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
@@ -1403,11 +1372,11 @@
|
|
|
1403
1372
|
function oe(e, t, r) {
|
|
1404
1373
|
return _(e, ye(t, r));
|
|
1405
1374
|
}
|
|
1406
|
-
function
|
|
1375
|
+
function Zt(e, t, r) {
|
|
1407
1376
|
var i = oe(e, t, r);
|
|
1408
1377
|
return i > r ? r : i;
|
|
1409
1378
|
}
|
|
1410
|
-
function
|
|
1379
|
+
function ht() {
|
|
1411
1380
|
return {
|
|
1412
1381
|
top: 0,
|
|
1413
1382
|
right: 0,
|
|
@@ -1415,56 +1384,56 @@
|
|
|
1415
1384
|
left: 0
|
|
1416
1385
|
};
|
|
1417
1386
|
}
|
|
1418
|
-
function
|
|
1419
|
-
return Object.assign({},
|
|
1387
|
+
function gt(e) {
|
|
1388
|
+
return Object.assign({}, ht(), e);
|
|
1420
1389
|
}
|
|
1421
|
-
function
|
|
1390
|
+
function mt(e, t) {
|
|
1422
1391
|
return t.reduce(function(r, i) {
|
|
1423
1392
|
return r[i] = e, r;
|
|
1424
1393
|
}, {});
|
|
1425
1394
|
}
|
|
1426
|
-
var
|
|
1395
|
+
var er = function(t, r) {
|
|
1427
1396
|
return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
|
|
1428
1397
|
placement: r.placement
|
|
1429
|
-
})) : t,
|
|
1398
|
+
})) : t, gt(typeof t != "number" ? t : mt(t, le));
|
|
1430
1399
|
};
|
|
1431
|
-
function
|
|
1400
|
+
function tr(e) {
|
|
1432
1401
|
var t, r = e.state, i = e.name, n = e.options, o2 = r.elements.arrow, l2 = r.modifiersData.popperOffsets, s2 = H(r.placement), a2 = Te(s2), f2 = [D, M].indexOf(s2) >= 0, c2 = f2 ? "height" : "width";
|
|
1433
1402
|
if (!(!o2 || !l2)) {
|
|
1434
|
-
var h2 =
|
|
1403
|
+
var h2 = er(n.padding, r), y2 = Be(o2), u2 = a2 === "y" ? k : D, b2 = a2 === "y" ? S : M, v2 = r.rects.reference[c2] + r.rects.reference[a2] - l2[a2] - r.rects.popper[c2], d2 = l2[a2] - r.rects.reference[a2], w2 = fe(o2), O2 = w2 ? a2 === "y" ? w2.clientHeight || 0 : w2.clientWidth || 0 : 0, E2 = v2 / 2 - d2 / 2, p2 = h2[u2], g2 = O2 - y2[c2] - h2[b2], m2 = O2 / 2 - y2[c2] / 2 + E2, x2 = oe(p2, m2, g2), L2 = a2;
|
|
1435
1404
|
r.modifiersData[i] = (t = {}, t[L2] = x2, t.centerOffset = x2 - m2, t);
|
|
1436
1405
|
}
|
|
1437
1406
|
}
|
|
1438
|
-
function
|
|
1407
|
+
function rr(e) {
|
|
1439
1408
|
var t = e.state, r = e.options, i = r.element, n = i === void 0 ? "[data-popper-arrow]" : i;
|
|
1440
|
-
n != null && (typeof n == "string" && (n = t.elements.popper.querySelector(n), !n) ||
|
|
1409
|
+
n != null && (typeof n == "string" && (n = t.elements.popper.querySelector(n), !n) || vt(t.elements.popper, n) && (t.elements.arrow = n));
|
|
1441
1410
|
}
|
|
1442
|
-
const
|
|
1411
|
+
const ir = {
|
|
1443
1412
|
name: "arrow",
|
|
1444
1413
|
enabled: true,
|
|
1445
1414
|
phase: "main",
|
|
1446
|
-
fn:
|
|
1447
|
-
effect:
|
|
1415
|
+
fn: tr,
|
|
1416
|
+
effect: rr,
|
|
1448
1417
|
requires: ["popperOffsets"],
|
|
1449
1418
|
requiresIfExists: ["preventOverflow"]
|
|
1450
1419
|
};
|
|
1451
1420
|
function te(e) {
|
|
1452
1421
|
return e.split("-")[1];
|
|
1453
1422
|
}
|
|
1454
|
-
var
|
|
1423
|
+
var nr = {
|
|
1455
1424
|
top: "auto",
|
|
1456
1425
|
right: "auto",
|
|
1457
1426
|
bottom: "auto",
|
|
1458
1427
|
left: "auto"
|
|
1459
1428
|
};
|
|
1460
|
-
function
|
|
1429
|
+
function or(e, t) {
|
|
1461
1430
|
var r = e.x, i = e.y, n = t.devicePixelRatio || 1;
|
|
1462
1431
|
return {
|
|
1463
1432
|
x: Z(r * n) / n || 0,
|
|
1464
1433
|
y: Z(i * n) / n || 0
|
|
1465
1434
|
};
|
|
1466
1435
|
}
|
|
1467
|
-
function
|
|
1436
|
+
function Ze(e) {
|
|
1468
1437
|
var t, r = e.popper, i = e.popperRect, n = e.placement, o2 = e.variation, l2 = e.offsets, s2 = e.position, a2 = e.gpuAcceleration, f2 = e.adaptive, c2 = e.roundOffsets, h2 = e.isFixed, y2 = l2.x, u2 = y2 === void 0 ? 0 : y2, b2 = l2.y, v2 = b2 === void 0 ? 0 : b2, d2 = typeof c2 == "function" ? c2({
|
|
1469
1438
|
x: u2,
|
|
1470
1439
|
y: v2
|
|
@@ -1495,7 +1464,7 @@
|
|
|
1495
1464
|
}
|
|
1496
1465
|
var $2 = Object.assign({
|
|
1497
1466
|
position: s2
|
|
1498
|
-
}, f2 &&
|
|
1467
|
+
}, f2 && nr), j2 = c2 === true ? or({
|
|
1499
1468
|
x: u2,
|
|
1500
1469
|
y: v2
|
|
1501
1470
|
}, B(r)) : {
|
|
@@ -1508,7 +1477,7 @@
|
|
|
1508
1477
|
}
|
|
1509
1478
|
return Object.assign({}, $2, (t = {}, t[p2] = O2 ? v2 + "px" : "", t[E2] = w2 ? u2 + "px" : "", t.transform = "", t));
|
|
1510
1479
|
}
|
|
1511
|
-
function
|
|
1480
|
+
function ar(e) {
|
|
1512
1481
|
var t = e.state, r = e.options, i = r.gpuAcceleration, n = i === void 0 ? true : i, o2 = r.adaptive, l2 = o2 === void 0 ? true : o2, s2 = r.roundOffsets, a2 = s2 === void 0 ? true : s2, f2 = {
|
|
1513
1482
|
placement: H(t.placement),
|
|
1514
1483
|
variation: te(t.placement),
|
|
@@ -1517,12 +1486,12 @@
|
|
|
1517
1486
|
gpuAcceleration: n,
|
|
1518
1487
|
isFixed: t.options.strategy === "fixed"
|
|
1519
1488
|
};
|
|
1520
|
-
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper,
|
|
1489
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ze(Object.assign({}, f2, {
|
|
1521
1490
|
offsets: t.modifiersData.popperOffsets,
|
|
1522
1491
|
position: t.options.strategy,
|
|
1523
1492
|
adaptive: l2,
|
|
1524
1493
|
roundOffsets: a2
|
|
1525
|
-
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow,
|
|
1494
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ze(Object.assign({}, f2, {
|
|
1526
1495
|
offsets: t.modifiersData.arrow,
|
|
1527
1496
|
position: "absolute",
|
|
1528
1497
|
adaptive: false,
|
|
@@ -1531,17 +1500,17 @@
|
|
|
1531
1500
|
"data-popper-placement": t.placement
|
|
1532
1501
|
});
|
|
1533
1502
|
}
|
|
1534
|
-
const
|
|
1503
|
+
const sr = {
|
|
1535
1504
|
name: "computeStyles",
|
|
1536
1505
|
enabled: true,
|
|
1537
1506
|
phase: "beforeWrite",
|
|
1538
|
-
fn:
|
|
1507
|
+
fn: ar,
|
|
1539
1508
|
data: {}
|
|
1540
1509
|
};
|
|
1541
1510
|
var ge = {
|
|
1542
1511
|
passive: true
|
|
1543
1512
|
};
|
|
1544
|
-
function
|
|
1513
|
+
function cr(e) {
|
|
1545
1514
|
var t = e.state, r = e.instance, i = e.options, n = i.scroll, o2 = n === void 0 ? true : n, l2 = i.resize, s2 = l2 === void 0 ? true : l2, a2 = B(t.elements.popper), f2 = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1546
1515
|
return o2 && f2.forEach(function(c2) {
|
|
1547
1516
|
c2.addEventListener("scroll", r.update, ge);
|
|
@@ -1551,16 +1520,16 @@
|
|
|
1551
1520
|
}), s2 && a2.removeEventListener("resize", r.update, ge);
|
|
1552
1521
|
};
|
|
1553
1522
|
}
|
|
1554
|
-
const
|
|
1523
|
+
const lr = {
|
|
1555
1524
|
name: "eventListeners",
|
|
1556
1525
|
enabled: true,
|
|
1557
1526
|
phase: "write",
|
|
1558
1527
|
fn: function() {
|
|
1559
1528
|
},
|
|
1560
|
-
effect:
|
|
1529
|
+
effect: cr,
|
|
1561
1530
|
data: {}
|
|
1562
1531
|
};
|
|
1563
|
-
var
|
|
1532
|
+
var fr = {
|
|
1564
1533
|
left: "right",
|
|
1565
1534
|
right: "left",
|
|
1566
1535
|
bottom: "top",
|
|
@@ -1568,16 +1537,16 @@
|
|
|
1568
1537
|
};
|
|
1569
1538
|
function me(e) {
|
|
1570
1539
|
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1571
|
-
return
|
|
1540
|
+
return fr[t];
|
|
1572
1541
|
});
|
|
1573
1542
|
}
|
|
1574
|
-
var
|
|
1543
|
+
var ur = {
|
|
1575
1544
|
start: "end",
|
|
1576
1545
|
end: "start"
|
|
1577
1546
|
};
|
|
1578
|
-
function
|
|
1547
|
+
function et(e) {
|
|
1579
1548
|
return e.replace(/start|end/g, function(t) {
|
|
1580
|
-
return
|
|
1549
|
+
return ur[t];
|
|
1581
1550
|
});
|
|
1582
1551
|
}
|
|
1583
1552
|
function Se(e) {
|
|
@@ -1590,11 +1559,11 @@
|
|
|
1590
1559
|
function Me(e) {
|
|
1591
1560
|
return ee(F(e)).left + Se(e).scrollLeft;
|
|
1592
1561
|
}
|
|
1593
|
-
function
|
|
1562
|
+
function pr(e, t) {
|
|
1594
1563
|
var r = B(e), i = F(e), n = r.visualViewport, o2 = i.clientWidth, l2 = i.clientHeight, s2 = 0, a2 = 0;
|
|
1595
1564
|
if (n) {
|
|
1596
1565
|
o2 = n.width, l2 = n.height;
|
|
1597
|
-
var f2 =
|
|
1566
|
+
var f2 = dt();
|
|
1598
1567
|
(f2 || !f2 && t === "fixed") && (s2 = n.offsetLeft, a2 = n.offsetTop);
|
|
1599
1568
|
}
|
|
1600
1569
|
return {
|
|
@@ -1604,7 +1573,7 @@
|
|
|
1604
1573
|
y: a2
|
|
1605
1574
|
};
|
|
1606
1575
|
}
|
|
1607
|
-
function
|
|
1576
|
+
function dr(e) {
|
|
1608
1577
|
var t, r = F(e), i = Se(e), n = (t = e.ownerDocument) == null ? void 0 : t.body, o2 = _(r.scrollWidth, r.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), l2 = _(r.scrollHeight, r.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), s2 = -i.scrollLeft + Me(e), a2 = -i.scrollTop;
|
|
1609
1578
|
return V(n || r).direction === "rtl" && (s2 += _(r.clientWidth, n ? n.clientWidth : 0) - o2), {
|
|
1610
1579
|
width: o2,
|
|
@@ -1617,13 +1586,13 @@
|
|
|
1617
1586
|
var t = V(e), r = t.overflow, i = t.overflowX, n = t.overflowY;
|
|
1618
1587
|
return /auto|scroll|overlay|hidden/.test(r + n + i);
|
|
1619
1588
|
}
|
|
1620
|
-
function
|
|
1621
|
-
return ["html", "body", "#document"].indexOf(N(e)) >= 0 ? e.ownerDocument.body : T(e) && je(e) ? e :
|
|
1589
|
+
function yt(e) {
|
|
1590
|
+
return ["html", "body", "#document"].indexOf(N(e)) >= 0 ? e.ownerDocument.body : T(e) && je(e) ? e : yt(we(e));
|
|
1622
1591
|
}
|
|
1623
1592
|
function ae(e, t) {
|
|
1624
1593
|
var r;
|
|
1625
1594
|
t === void 0 && (t = []);
|
|
1626
|
-
var i =
|
|
1595
|
+
var i = yt(e), n = i === ((r = e.ownerDocument) == null ? void 0 : r.body), o2 = B(i), l2 = n ? [o2].concat(o2.visualViewport || [], je(i) ? i : []) : i, s2 = t.concat(l2);
|
|
1627
1596
|
return n ? s2 : (
|
|
1628
1597
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1629
1598
|
s2.concat(ae(we(l2)))
|
|
@@ -1637,27 +1606,27 @@
|
|
|
1637
1606
|
bottom: e.y + e.height
|
|
1638
1607
|
});
|
|
1639
1608
|
}
|
|
1640
|
-
function
|
|
1609
|
+
function vr(e, t) {
|
|
1641
1610
|
var r = ee(e, false, t === "fixed");
|
|
1642
1611
|
return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
|
|
1643
1612
|
}
|
|
1644
|
-
function
|
|
1645
|
-
return t ===
|
|
1613
|
+
function tt(e, t, r) {
|
|
1614
|
+
return t === ut ? $e(pr(e, r)) : K(t) ? vr(t, r) : $e(dr(F(e)));
|
|
1646
1615
|
}
|
|
1647
|
-
function
|
|
1616
|
+
function hr(e) {
|
|
1648
1617
|
var t = ae(we(e)), r = ["absolute", "fixed"].indexOf(V(e).position) >= 0, i = r && T(e) ? fe(e) : e;
|
|
1649
1618
|
return K(i) ? t.filter(function(n) {
|
|
1650
|
-
return K(n) &&
|
|
1619
|
+
return K(n) && vt(n, i) && N(n) !== "body";
|
|
1651
1620
|
}) : [];
|
|
1652
1621
|
}
|
|
1653
|
-
function
|
|
1654
|
-
var n = t === "clippingParents" ?
|
|
1655
|
-
var c2 =
|
|
1622
|
+
function gr(e, t, r, i) {
|
|
1623
|
+
var n = t === "clippingParents" ? hr(e) : [].concat(t), o2 = [].concat(n, [r]), l2 = o2[0], s2 = o2.reduce(function(a2, f2) {
|
|
1624
|
+
var c2 = tt(e, f2, i);
|
|
1656
1625
|
return a2.top = _(c2.top, a2.top), a2.right = ye(c2.right, a2.right), a2.bottom = ye(c2.bottom, a2.bottom), a2.left = _(c2.left, a2.left), a2;
|
|
1657
|
-
},
|
|
1626
|
+
}, tt(e, l2, i));
|
|
1658
1627
|
return s2.width = s2.right - s2.left, s2.height = s2.bottom - s2.top, s2.x = s2.left, s2.y = s2.top, s2;
|
|
1659
1628
|
}
|
|
1660
|
-
function
|
|
1629
|
+
function wt(e) {
|
|
1661
1630
|
var t = e.reference, r = e.element, i = e.placement, n = i ? H(i) : null, o2 = i ? te(i) : null, l2 = t.x + t.width / 2 - r.width / 2, s2 = t.y + t.height / 2 - r.height / 2, a2;
|
|
1662
1631
|
switch (n) {
|
|
1663
1632
|
case k:
|
|
@@ -1706,7 +1675,7 @@
|
|
|
1706
1675
|
}
|
|
1707
1676
|
function ce(e, t) {
|
|
1708
1677
|
t === void 0 && (t = {});
|
|
1709
|
-
var r = t, i = r.placement, n = i === void 0 ? e.placement : i, o2 = r.strategy, l2 = o2 === void 0 ? e.strategy : o2, s2 = r.boundary, a2 = s2 === void 0 ?
|
|
1678
|
+
var r = t, i = r.placement, n = i === void 0 ? e.placement : i, o2 = r.strategy, l2 = o2 === void 0 ? e.strategy : o2, s2 = r.boundary, a2 = s2 === void 0 ? jt : s2, f2 = r.rootBoundary, c2 = f2 === void 0 ? ut : f2, h2 = r.elementContext, y2 = h2 === void 0 ? ne : h2, u2 = r.altBoundary, b2 = u2 === void 0 ? false : u2, v2 = r.padding, d2 = v2 === void 0 ? 0 : v2, w2 = gt(typeof d2 != "number" ? d2 : mt(d2, le)), O2 = y2 === ne ? Wt : ne, E2 = e.rects.popper, p2 = e.elements[b2 ? O2 : y2], g2 = gr(K(p2) ? p2 : p2.contextElement || F(e.elements.popper), a2, c2, l2), m2 = ee(e.elements.reference), x2 = wt({
|
|
1710
1679
|
reference: m2,
|
|
1711
1680
|
element: E2,
|
|
1712
1681
|
strategy: "absolute",
|
|
@@ -1726,9 +1695,9 @@
|
|
|
1726
1695
|
}
|
|
1727
1696
|
return A2;
|
|
1728
1697
|
}
|
|
1729
|
-
function
|
|
1698
|
+
function mr(e, t) {
|
|
1730
1699
|
t === void 0 && (t = {});
|
|
1731
|
-
var r = t, i = r.placement, n = r.boundary, o2 = r.rootBoundary, l2 = r.padding, s2 = r.flipVariations, a2 = r.allowedAutoPlacements, f2 = a2 === void 0 ?
|
|
1700
|
+
var r = t, i = r.placement, n = r.boundary, o2 = r.rootBoundary, l2 = r.padding, s2 = r.flipVariations, a2 = r.allowedAutoPlacements, f2 = a2 === void 0 ? pt : a2, c2 = te(i), h2 = c2 ? s2 ? Je : Je.filter(function(b2) {
|
|
1732
1701
|
return te(b2) === c2;
|
|
1733
1702
|
}) : le, y2 = h2.filter(function(b2) {
|
|
1734
1703
|
return f2.indexOf(b2) >= 0;
|
|
@@ -1746,17 +1715,17 @@
|
|
|
1746
1715
|
return u2[b2] - u2[v2];
|
|
1747
1716
|
});
|
|
1748
1717
|
}
|
|
1749
|
-
function
|
|
1718
|
+
function yr(e) {
|
|
1750
1719
|
if (H(e) === De)
|
|
1751
1720
|
return [];
|
|
1752
1721
|
var t = me(e);
|
|
1753
|
-
return [
|
|
1722
|
+
return [et(e), t, et(t)];
|
|
1754
1723
|
}
|
|
1755
|
-
function
|
|
1724
|
+
function wr(e) {
|
|
1756
1725
|
var t = e.state, r = e.options, i = e.name;
|
|
1757
1726
|
if (!t.modifiersData[i]._skip) {
|
|
1758
|
-
for (var n = r.mainAxis, o2 = n === void 0 ? true : n, l2 = r.altAxis, s2 = l2 === void 0 ? true : l2, a2 = r.fallbackPlacements, f2 = r.padding, c2 = r.boundary, h2 = r.rootBoundary, y2 = r.altBoundary, u2 = r.flipVariations, b2 = u2 === void 0 ? true : u2, v2 = r.allowedAutoPlacements, d2 = t.options.placement, w2 = H(d2), O2 = w2 === d2, E2 = a2 || (O2 || !b2 ? [me(d2)] :
|
|
1759
|
-
return G2.concat(H(I2) === De ?
|
|
1727
|
+
for (var n = r.mainAxis, o2 = n === void 0 ? true : n, l2 = r.altAxis, s2 = l2 === void 0 ? true : l2, a2 = r.fallbackPlacements, f2 = r.padding, c2 = r.boundary, h2 = r.rootBoundary, y2 = r.altBoundary, u2 = r.flipVariations, b2 = u2 === void 0 ? true : u2, v2 = r.allowedAutoPlacements, d2 = t.options.placement, w2 = H(d2), O2 = w2 === d2, E2 = a2 || (O2 || !b2 ? [me(d2)] : yr(d2)), p2 = [d2].concat(E2).reduce(function(G2, I2) {
|
|
1728
|
+
return G2.concat(H(I2) === De ? mr(t, {
|
|
1760
1729
|
placement: I2,
|
|
1761
1730
|
boundary: c2,
|
|
1762
1731
|
rootBoundary: h2,
|
|
@@ -1795,23 +1764,22 @@
|
|
|
1795
1764
|
return P2 = ie, "break";
|
|
1796
1765
|
}, re = pe; re > 0; re--) {
|
|
1797
1766
|
var de = be(re);
|
|
1798
|
-
if (de === "break")
|
|
1799
|
-
break;
|
|
1767
|
+
if (de === "break") break;
|
|
1800
1768
|
}
|
|
1801
1769
|
t.placement !== P2 && (t.modifiersData[i]._skip = true, t.placement = P2, t.reset = true);
|
|
1802
1770
|
}
|
|
1803
1771
|
}
|
|
1804
|
-
const
|
|
1772
|
+
const br = {
|
|
1805
1773
|
name: "flip",
|
|
1806
1774
|
enabled: true,
|
|
1807
1775
|
phase: "main",
|
|
1808
|
-
fn:
|
|
1776
|
+
fn: wr,
|
|
1809
1777
|
requiresIfExists: ["offset"],
|
|
1810
1778
|
data: {
|
|
1811
1779
|
_skip: false
|
|
1812
1780
|
}
|
|
1813
1781
|
};
|
|
1814
|
-
function
|
|
1782
|
+
function rt(e, t, r) {
|
|
1815
1783
|
return r === void 0 && (r = {
|
|
1816
1784
|
x: 0,
|
|
1817
1785
|
y: 0
|
|
@@ -1822,17 +1790,17 @@
|
|
|
1822
1790
|
left: e.left - t.width - r.x
|
|
1823
1791
|
};
|
|
1824
1792
|
}
|
|
1825
|
-
function
|
|
1793
|
+
function it(e) {
|
|
1826
1794
|
return [k, M, S, D].some(function(t) {
|
|
1827
1795
|
return e[t] >= 0;
|
|
1828
1796
|
});
|
|
1829
1797
|
}
|
|
1830
|
-
function
|
|
1798
|
+
function xr(e) {
|
|
1831
1799
|
var t = e.state, r = e.name, i = t.rects.reference, n = t.rects.popper, o2 = t.modifiersData.preventOverflow, l2 = ce(t, {
|
|
1832
1800
|
elementContext: "reference"
|
|
1833
1801
|
}), s2 = ce(t, {
|
|
1834
1802
|
altBoundary: true
|
|
1835
|
-
}), a2 =
|
|
1803
|
+
}), a2 = rt(l2, i), f2 = rt(s2, n, o2), c2 = it(a2), h2 = it(f2);
|
|
1836
1804
|
t.modifiersData[r] = {
|
|
1837
1805
|
referenceClippingOffsets: a2,
|
|
1838
1806
|
popperEscapeOffsets: f2,
|
|
@@ -1843,14 +1811,14 @@
|
|
|
1843
1811
|
"data-popper-escaped": h2
|
|
1844
1812
|
});
|
|
1845
1813
|
}
|
|
1846
|
-
const
|
|
1814
|
+
const Or = {
|
|
1847
1815
|
name: "hide",
|
|
1848
1816
|
enabled: true,
|
|
1849
1817
|
phase: "main",
|
|
1850
1818
|
requiresIfExists: ["preventOverflow"],
|
|
1851
|
-
fn:
|
|
1819
|
+
fn: xr
|
|
1852
1820
|
};
|
|
1853
|
-
function
|
|
1821
|
+
function Er(e, t, r) {
|
|
1854
1822
|
var i = H(e), n = [D, k].indexOf(i) >= 0 ? -1 : 1, o2 = typeof r == "function" ? r(Object.assign({}, t, {
|
|
1855
1823
|
placement: e
|
|
1856
1824
|
})) : r, l2 = o2[0], s2 = o2[1];
|
|
@@ -1862,45 +1830,45 @@
|
|
|
1862
1830
|
y: s2
|
|
1863
1831
|
};
|
|
1864
1832
|
}
|
|
1865
|
-
function
|
|
1866
|
-
var t = e.state, r = e.options, i = e.name, n = r.offset, o2 = n === void 0 ? [0, 0] : n, l2 =
|
|
1867
|
-
return c2[h2] =
|
|
1833
|
+
function Ar(e) {
|
|
1834
|
+
var t = e.state, r = e.options, i = e.name, n = r.offset, o2 = n === void 0 ? [0, 0] : n, l2 = pt.reduce(function(c2, h2) {
|
|
1835
|
+
return c2[h2] = Er(h2, t.rects, o2), c2;
|
|
1868
1836
|
}, {}), s2 = l2[t.placement], a2 = s2.x, f2 = s2.y;
|
|
1869
1837
|
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a2, t.modifiersData.popperOffsets.y += f2), t.modifiersData[i] = l2;
|
|
1870
1838
|
}
|
|
1871
|
-
const
|
|
1839
|
+
const Pr = {
|
|
1872
1840
|
name: "offset",
|
|
1873
1841
|
enabled: true,
|
|
1874
1842
|
phase: "main",
|
|
1875
1843
|
requires: ["popperOffsets"],
|
|
1876
|
-
fn:
|
|
1844
|
+
fn: Ar
|
|
1877
1845
|
};
|
|
1878
|
-
function
|
|
1846
|
+
function Lr(e) {
|
|
1879
1847
|
var t = e.state, r = e.name;
|
|
1880
|
-
t.modifiersData[r] =
|
|
1848
|
+
t.modifiersData[r] = wt({
|
|
1881
1849
|
reference: t.rects.reference,
|
|
1882
1850
|
element: t.rects.popper,
|
|
1883
1851
|
strategy: "absolute",
|
|
1884
1852
|
placement: t.placement
|
|
1885
1853
|
});
|
|
1886
1854
|
}
|
|
1887
|
-
const
|
|
1855
|
+
const $r = {
|
|
1888
1856
|
name: "popperOffsets",
|
|
1889
1857
|
enabled: true,
|
|
1890
1858
|
phase: "read",
|
|
1891
|
-
fn:
|
|
1859
|
+
fn: Lr,
|
|
1892
1860
|
data: {}
|
|
1893
1861
|
};
|
|
1894
|
-
function
|
|
1862
|
+
function Cr(e) {
|
|
1895
1863
|
return e === "x" ? "y" : "x";
|
|
1896
1864
|
}
|
|
1897
|
-
function
|
|
1865
|
+
function kr(e) {
|
|
1898
1866
|
var t = e.state, r = e.options, i = e.name, n = r.mainAxis, o2 = n === void 0 ? true : n, l2 = r.altAxis, s2 = l2 === void 0 ? false : l2, a2 = r.boundary, f2 = r.rootBoundary, c2 = r.altBoundary, h2 = r.padding, y2 = r.tether, u2 = y2 === void 0 ? true : y2, b2 = r.tetherOffset, v2 = b2 === void 0 ? 0 : b2, d2 = ce(t, {
|
|
1899
1867
|
boundary: a2,
|
|
1900
1868
|
rootBoundary: f2,
|
|
1901
1869
|
padding: h2,
|
|
1902
1870
|
altBoundary: c2
|
|
1903
|
-
}), w2 = H(t.placement), O2 = te(t.placement), E2 = !O2, p2 = Te(w2), g2 =
|
|
1871
|
+
}), w2 = H(t.placement), O2 = te(t.placement), E2 = !O2, p2 = Te(w2), g2 = Cr(p2), m2 = t.modifiersData.popperOffsets, x2 = t.rects.reference, L2 = t.rects.popper, P2 = typeof v2 == "function" ? v2(Object.assign({}, t.rects, {
|
|
1904
1872
|
placement: t.placement
|
|
1905
1873
|
})) : v2, A2 = typeof P2 == "number" ? {
|
|
1906
1874
|
mainAxis: P2,
|
|
@@ -1917,39 +1885,39 @@
|
|
|
1917
1885
|
var C2, X2 = p2 === "y" ? k : D, Y2 = p2 === "y" ? S : M, R2 = p2 === "y" ? "height" : "width", W2 = m2[p2], ue = W2 + d2[X2], q2 = W2 - d2[Y2], pe = u2 ? -L2[R2] / 2 : 0, be = O2 === Q ? x2[R2] : L2[R2], re = O2 === Q ? -L2[R2] : -x2[R2], de = t.elements.arrow, G2 = u2 && de ? Be(de) : {
|
|
1918
1886
|
width: 0,
|
|
1919
1887
|
height: 0
|
|
1920
|
-
}, I2 = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding :
|
|
1888
|
+
}, I2 = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ht(), ie = I2[X2], ve = I2[Y2], z2 = oe(0, x2[R2], G2[R2]), xe = E2 ? x2[R2] / 2 - pe - z2 - ie - A2.mainAxis : be - z2 - ie - A2.mainAxis, Ot = E2 ? -x2[R2] / 2 + pe + z2 + ve + A2.mainAxis : re + z2 + ve + A2.mainAxis, Oe = t.elements.arrow && fe(t.elements.arrow), Et = Oe ? p2 === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, He = (C2 = $2 == null ? void 0 : $2[p2]) != null ? C2 : 0, At = W2 + xe - He - Et, Pt = W2 + Ot - He, Ne = oe(u2 ? ye(ue, At) : ue, W2, u2 ? _(q2, Pt) : q2);
|
|
1921
1889
|
m2[p2] = Ne, j2[p2] = Ne - W2;
|
|
1922
1890
|
}
|
|
1923
1891
|
if (s2) {
|
|
1924
|
-
var Ve,
|
|
1892
|
+
var Ve, Lt = p2 === "x" ? k : D, $t = p2 === "x" ? S : M, U2 = m2[g2], he = g2 === "y" ? "height" : "width", Ie = U2 + d2[Lt], Fe = U2 - d2[$t], Ee = [k, D].indexOf(w2) !== -1, Xe = (Ve = $2 == null ? void 0 : $2[g2]) != null ? Ve : 0, Ye = Ee ? Ie : U2 - x2[he] - L2[he] - Xe + A2.altAxis, qe = Ee ? U2 + x2[he] + L2[he] - Xe - A2.altAxis : Fe, ze = u2 && Ee ? Zt(Ye, U2, qe) : oe(u2 ? Ye : Ie, U2, u2 ? qe : Fe);
|
|
1925
1893
|
m2[g2] = ze, j2[g2] = ze - U2;
|
|
1926
1894
|
}
|
|
1927
1895
|
t.modifiersData[i] = j2;
|
|
1928
1896
|
}
|
|
1929
1897
|
}
|
|
1930
|
-
const
|
|
1898
|
+
const Dr = {
|
|
1931
1899
|
name: "preventOverflow",
|
|
1932
1900
|
enabled: true,
|
|
1933
1901
|
phase: "main",
|
|
1934
|
-
fn:
|
|
1902
|
+
fn: kr,
|
|
1935
1903
|
requiresIfExists: ["offset"]
|
|
1936
1904
|
};
|
|
1937
|
-
function
|
|
1905
|
+
function Rr(e) {
|
|
1938
1906
|
return {
|
|
1939
1907
|
scrollLeft: e.scrollLeft,
|
|
1940
1908
|
scrollTop: e.scrollTop
|
|
1941
1909
|
};
|
|
1942
1910
|
}
|
|
1943
|
-
function Rr(e) {
|
|
1944
|
-
return e === B(e) || !T(e) ? Se(e) : Dr(e);
|
|
1945
|
-
}
|
|
1946
1911
|
function Br(e) {
|
|
1912
|
+
return e === B(e) || !T(e) ? Se(e) : Rr(e);
|
|
1913
|
+
}
|
|
1914
|
+
function Tr(e) {
|
|
1947
1915
|
var t = e.getBoundingClientRect(), r = Z(t.width) / e.offsetWidth || 1, i = Z(t.height) / e.offsetHeight || 1;
|
|
1948
1916
|
return r !== 1 || i !== 1;
|
|
1949
1917
|
}
|
|
1950
|
-
function
|
|
1918
|
+
function Sr(e, t, r) {
|
|
1951
1919
|
r === void 0 && (r = false);
|
|
1952
|
-
var i = T(t), n = T(t) &&
|
|
1920
|
+
var i = T(t), n = T(t) && Tr(t), o2 = F(t), l2 = ee(e, n, r), s2 = {
|
|
1953
1921
|
scrollLeft: 0,
|
|
1954
1922
|
scrollTop: 0
|
|
1955
1923
|
}, a2 = {
|
|
@@ -1957,14 +1925,14 @@
|
|
|
1957
1925
|
y: 0
|
|
1958
1926
|
};
|
|
1959
1927
|
return (i || !i && !r) && ((N(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1960
|
-
je(o2)) && (s2 =
|
|
1928
|
+
je(o2)) && (s2 = Br(t)), T(t) ? (a2 = ee(t, true), a2.x += t.clientLeft, a2.y += t.clientTop) : o2 && (a2.x = Me(o2))), {
|
|
1961
1929
|
x: l2.left + s2.scrollLeft - a2.x,
|
|
1962
1930
|
y: l2.top + s2.scrollTop - a2.y,
|
|
1963
1931
|
width: l2.width,
|
|
1964
1932
|
height: l2.height
|
|
1965
1933
|
};
|
|
1966
1934
|
}
|
|
1967
|
-
function
|
|
1935
|
+
function Mr(e) {
|
|
1968
1936
|
var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), i = [];
|
|
1969
1937
|
e.forEach(function(o2) {
|
|
1970
1938
|
t.set(o2.name, o2);
|
|
@@ -1983,15 +1951,15 @@
|
|
|
1983
1951
|
r.has(o2.name) || n(o2);
|
|
1984
1952
|
}), i;
|
|
1985
1953
|
}
|
|
1986
|
-
function
|
|
1987
|
-
var t =
|
|
1988
|
-
return
|
|
1954
|
+
function jr(e) {
|
|
1955
|
+
var t = Mr(e);
|
|
1956
|
+
return Ut.reduce(function(r, i) {
|
|
1989
1957
|
return r.concat(t.filter(function(n) {
|
|
1990
1958
|
return n.phase === i;
|
|
1991
1959
|
}));
|
|
1992
1960
|
}, []);
|
|
1993
1961
|
}
|
|
1994
|
-
function
|
|
1962
|
+
function Wr(e) {
|
|
1995
1963
|
var t;
|
|
1996
1964
|
return function() {
|
|
1997
1965
|
return t || (t = new Promise(function(r) {
|
|
@@ -2001,7 +1969,7 @@
|
|
|
2001
1969
|
})), t;
|
|
2002
1970
|
};
|
|
2003
1971
|
}
|
|
2004
|
-
function
|
|
1972
|
+
function Hr(e) {
|
|
2005
1973
|
var t = e.reduce(function(r, i) {
|
|
2006
1974
|
var n = r[i.name];
|
|
2007
1975
|
return r[i.name] = n ? Object.assign({}, n, i, {
|
|
@@ -2013,27 +1981,27 @@
|
|
|
2013
1981
|
return t[r];
|
|
2014
1982
|
});
|
|
2015
1983
|
}
|
|
2016
|
-
var
|
|
1984
|
+
var nt = {
|
|
2017
1985
|
placement: "bottom",
|
|
2018
1986
|
modifiers: [],
|
|
2019
1987
|
strategy: "absolute"
|
|
2020
1988
|
};
|
|
2021
|
-
function
|
|
1989
|
+
function ot() {
|
|
2022
1990
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
2023
1991
|
t[r] = arguments[r];
|
|
2024
1992
|
return !t.some(function(i) {
|
|
2025
1993
|
return !(i && typeof i.getBoundingClientRect == "function");
|
|
2026
1994
|
});
|
|
2027
1995
|
}
|
|
2028
|
-
function
|
|
1996
|
+
function Nr(e) {
|
|
2029
1997
|
e === void 0 && (e = {});
|
|
2030
|
-
var t = e, r = t.defaultModifiers, i = r === void 0 ? [] : r, n = t.defaultOptions, o2 = n === void 0 ?
|
|
1998
|
+
var t = e, r = t.defaultModifiers, i = r === void 0 ? [] : r, n = t.defaultOptions, o2 = n === void 0 ? nt : n;
|
|
2031
1999
|
return function(s2, a2, f2) {
|
|
2032
2000
|
f2 === void 0 && (f2 = o2);
|
|
2033
2001
|
var c2 = {
|
|
2034
2002
|
placement: "bottom",
|
|
2035
2003
|
orderedModifiers: [],
|
|
2036
|
-
options: Object.assign({},
|
|
2004
|
+
options: Object.assign({}, nt, o2),
|
|
2037
2005
|
modifiersData: {},
|
|
2038
2006
|
elements: {
|
|
2039
2007
|
reference: s2,
|
|
@@ -2049,7 +2017,7 @@
|
|
|
2049
2017
|
reference: K(s2) ? ae(s2) : s2.contextElement ? ae(s2.contextElement) : [],
|
|
2050
2018
|
popper: ae(a2)
|
|
2051
2019
|
};
|
|
2052
|
-
var E2 =
|
|
2020
|
+
var E2 = jr(Hr([].concat(i, c2.options.modifiers)));
|
|
2053
2021
|
return c2.orderedModifiers = E2.filter(function(p2) {
|
|
2054
2022
|
return p2.enabled;
|
|
2055
2023
|
}), b2(), u2.update();
|
|
@@ -2062,9 +2030,9 @@
|
|
|
2062
2030
|
forceUpdate: function() {
|
|
2063
2031
|
if (!y2) {
|
|
2064
2032
|
var w2 = c2.elements, O2 = w2.reference, E2 = w2.popper;
|
|
2065
|
-
if (
|
|
2033
|
+
if (ot(O2, E2)) {
|
|
2066
2034
|
c2.rects = {
|
|
2067
|
-
reference:
|
|
2035
|
+
reference: Sr(O2, fe(E2), c2.options.strategy === "fixed"),
|
|
2068
2036
|
popper: Be(E2)
|
|
2069
2037
|
}, c2.reset = false, c2.placement = c2.options.placement, c2.orderedModifiers.forEach(function(A2) {
|
|
2070
2038
|
return c2.modifiersData[A2.name] = Object.assign({}, A2.data);
|
|
@@ -2087,7 +2055,7 @@
|
|
|
2087
2055
|
},
|
|
2088
2056
|
// Async and optimistically optimized update – it will not be executed if
|
|
2089
2057
|
// not necessary (debounced to run at most once-per-tick)
|
|
2090
|
-
update:
|
|
2058
|
+
update: Wr(function() {
|
|
2091
2059
|
return new Promise(function(d2) {
|
|
2092
2060
|
u2.forceUpdate(), d2(c2);
|
|
2093
2061
|
});
|
|
@@ -2096,7 +2064,7 @@
|
|
|
2096
2064
|
v2(), y2 = true;
|
|
2097
2065
|
}
|
|
2098
2066
|
};
|
|
2099
|
-
if (!
|
|
2067
|
+
if (!ot(s2, a2))
|
|
2100
2068
|
return u2;
|
|
2101
2069
|
u2.setOptions(f2).then(function(d2) {
|
|
2102
2070
|
!y2 && f2.onFirstUpdate && f2.onFirstUpdate(d2);
|
|
@@ -2124,20 +2092,20 @@
|
|
|
2124
2092
|
return u2;
|
|
2125
2093
|
};
|
|
2126
2094
|
}
|
|
2127
|
-
var
|
|
2128
|
-
defaultModifiers:
|
|
2095
|
+
var Vr = [lr, $r, sr, Gt, Pr, br, Dr, ir, Or], Ir = /* @__PURE__ */ Nr({
|
|
2096
|
+
defaultModifiers: Vr
|
|
2129
2097
|
});
|
|
2130
2098
|
async function Ce(e) {
|
|
2131
2099
|
const t = this.collection.findIndex((r) => r.id === e.id);
|
|
2132
2100
|
if (t >= 0) {
|
|
2133
2101
|
const r = this.collection[t];
|
|
2134
|
-
r.state === "opened" && r.close(), r.popper.destroy(),
|
|
2102
|
+
r.state === "opened" && r.close(), r.popper.destroy(), bt(r), Object.getOwnPropertyNames(r).forEach((i) => {
|
|
2135
2103
|
delete r[i];
|
|
2136
2104
|
}), this.collection.splice(t, 1);
|
|
2137
2105
|
}
|
|
2138
2106
|
return this.collection;
|
|
2139
2107
|
}
|
|
2140
|
-
function
|
|
2108
|
+
function bt(e) {
|
|
2141
2109
|
return e.__eventListeners && (e.__eventListeners.forEach((t) => {
|
|
2142
2110
|
t.el.forEach((r) => {
|
|
2143
2111
|
t.type.forEach((i) => {
|
|
@@ -2147,24 +2115,24 @@
|
|
|
2147
2115
|
}), delete e.__eventListeners), e;
|
|
2148
2116
|
}
|
|
2149
2117
|
async function We(e) {
|
|
2150
|
-
const t =
|
|
2151
|
-
return t.el.classList.add(this.settings.stateActive), t.trigger.hasAttribute("aria-controls") && t.trigger.setAttribute("aria-expanded", "true"), t.config =
|
|
2118
|
+
const t = st.call(this, e);
|
|
2119
|
+
return t.el.classList.add(this.settings.stateActive), t.trigger.hasAttribute("aria-controls") && t.trigger.setAttribute("aria-expanded", "true"), t.config = at(t.el, this.settings), t.popper.setOptions({
|
|
2152
2120
|
placement: t.config.placement,
|
|
2153
2121
|
modifiers: [
|
|
2154
2122
|
{ name: "eventListeners", enabled: true },
|
|
2155
|
-
...
|
|
2123
|
+
...Rt(t.config)
|
|
2156
2124
|
]
|
|
2157
2125
|
}), t.popper.update(), t.state = "opened", t;
|
|
2158
2126
|
}
|
|
2159
|
-
async function
|
|
2127
|
+
async function Fr(e, t) {
|
|
2160
2128
|
Ce.call(this, e);
|
|
2161
2129
|
const r = this, i = {
|
|
2162
2130
|
id: e.id,
|
|
2163
2131
|
state: "closed",
|
|
2164
2132
|
el: e,
|
|
2165
2133
|
trigger: t,
|
|
2166
|
-
popper:
|
|
2167
|
-
config:
|
|
2134
|
+
popper: Ir(t, e),
|
|
2135
|
+
config: at(e, this.settings),
|
|
2168
2136
|
open() {
|
|
2169
2137
|
return We.call(r, this);
|
|
2170
2138
|
},
|
|
@@ -2175,9 +2143,9 @@
|
|
|
2175
2143
|
return Ce.call(r, this);
|
|
2176
2144
|
}
|
|
2177
2145
|
};
|
|
2178
|
-
return i.trigger.hasAttribute("aria-controls") && i.trigger.setAttribute("aria-expanded", "false"),
|
|
2146
|
+
return i.trigger.hasAttribute("aria-controls") && i.trigger.setAttribute("aria-expanded", "false"), xt.call(this, i), this.collection.push(i), i.el.classList.contains(this.settings.stateActive) && (await i.open(), ft.call(this, i)), i;
|
|
2179
2147
|
}
|
|
2180
|
-
function
|
|
2148
|
+
function xt(e) {
|
|
2181
2149
|
return e.__eventListeners || (e.config.event === "hover" ? (e.__eventListeners = [{
|
|
2182
2150
|
el: ["trigger"],
|
|
2183
2151
|
type: ["mouseenter", "focus"],
|
|
@@ -2185,7 +2153,7 @@
|
|
|
2185
2153
|
}, {
|
|
2186
2154
|
el: ["el", "trigger"],
|
|
2187
2155
|
type: ["mouseleave", "focusout"],
|
|
2188
|
-
listener:
|
|
2156
|
+
listener: lt.bind(this, e)
|
|
2189
2157
|
}], e.__eventListeners.forEach((r) => {
|
|
2190
2158
|
r.el.forEach((i) => {
|
|
2191
2159
|
r.type.forEach((n) => {
|
|
@@ -2195,7 +2163,7 @@
|
|
|
2195
2163
|
})) : (e.__eventListeners = [{
|
|
2196
2164
|
el: ["trigger"],
|
|
2197
2165
|
type: ["click"],
|
|
2198
|
-
listener:
|
|
2166
|
+
listener: St.bind(this, e)
|
|
2199
2167
|
}], e.__eventListeners.forEach((r) => {
|
|
2200
2168
|
r.el.forEach((i) => {
|
|
2201
2169
|
r.type.forEach((n) => {
|
|
@@ -2205,11 +2173,11 @@
|
|
|
2205
2173
|
}))), e;
|
|
2206
2174
|
}
|
|
2207
2175
|
var J;
|
|
2208
|
-
class
|
|
2176
|
+
class Yr extends Ct {
|
|
2209
2177
|
constructor(r) {
|
|
2210
2178
|
super();
|
|
2211
|
-
|
|
2212
|
-
this.defaults =
|
|
2179
|
+
Ke(this, J);
|
|
2180
|
+
this.defaults = Dt, this.settings = { ...this.defaults, ...r }, this.trigger = null, Ge(this, J, Mt.bind(this)), this.settings.autoMount && this.mount();
|
|
2213
2181
|
}
|
|
2214
2182
|
async mount(r) {
|
|
2215
2183
|
r && (this.settings = { ...this.settings, ...r });
|
|
@@ -2221,17 +2189,17 @@
|
|
|
2221
2189
|
}
|
|
2222
2190
|
mountEventListeners(r = true) {
|
|
2223
2191
|
r && this.collection.forEach((i) => {
|
|
2224
|
-
|
|
2192
|
+
xt.call(this, i);
|
|
2225
2193
|
}), document.addEventListener("keydown", Ae(this, J), false);
|
|
2226
2194
|
}
|
|
2227
2195
|
unmountEventListeners(r = true) {
|
|
2228
2196
|
r && this.collection.forEach((i) => {
|
|
2229
|
-
|
|
2197
|
+
bt(i);
|
|
2230
2198
|
}), document.removeEventListener("keydown", Ae(this, J), false);
|
|
2231
2199
|
}
|
|
2232
2200
|
register(r) {
|
|
2233
|
-
const i =
|
|
2234
|
-
return i.error ? Promise.reject(i.error) :
|
|
2201
|
+
const i = Tt.call(this, r);
|
|
2202
|
+
return i.error ? Promise.reject(i.error) : Fr.call(this, i.popover, i.trigger);
|
|
2235
2203
|
}
|
|
2236
2204
|
deregister(r) {
|
|
2237
2205
|
let i = this.get(r.id || r);
|
|
@@ -2245,9 +2213,9 @@
|
|
|
2245
2213
|
}
|
|
2246
2214
|
}
|
|
2247
2215
|
J = /* @__PURE__ */ new WeakMap();
|
|
2248
|
-
exports2.Drawer =
|
|
2249
|
-
exports2.Modal =
|
|
2250
|
-
exports2.Popover =
|
|
2216
|
+
exports2.Drawer = nt$1;
|
|
2217
|
+
exports2.Modal = Q$1;
|
|
2218
|
+
exports2.Popover = Yr;
|
|
2251
2219
|
exports2.core = index;
|
|
2252
2220
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
2253
2221
|
});
|