vrembem 4.0.0-next.2 → 4.0.0-next.3
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/LICENSE +21 -0
- package/dev/index.css +0 -62
- package/dev/index.css.map +1 -1
- package/dev/index.js +379 -417
- package/dev/index.js.map +1 -1
- package/dev/index.umd.cjs +249 -287
- 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 +1005 -1042
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +2 -2
- package/dist/index.umd.cjs.map +1 -1
- package/index.js +0 -2
- package/index.scss +0 -1
- package/package.json +23 -24
package/dev/index.umd.cjs
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
if (e.has(t))
|
|
11
11
|
throw TypeError("Cannot add the same private member more than once");
|
|
12
12
|
e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
13
|
-
}, a = (t, e, n,
|
|
13
|
+
}, a = (t, e, n, i) => (b$2(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n);
|
|
14
14
|
var l$1;
|
|
15
15
|
let $$2 = class $ {
|
|
16
16
|
constructor(e, n) {
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
return await this.deregister(e), this.collection.push(e), this.collection;
|
|
41
41
|
}
|
|
42
42
|
async deregister(e) {
|
|
43
|
-
const n = this.collection.findIndex((
|
|
43
|
+
const n = this.collection.findIndex((i) => i === e);
|
|
44
44
|
if (n >= 0) {
|
|
45
|
-
const
|
|
46
|
-
Object.getOwnPropertyNames(
|
|
47
|
-
delete
|
|
45
|
+
const i = this.collection[n];
|
|
46
|
+
Object.getOwnPropertyNames(i).forEach((r2) => {
|
|
47
|
+
delete i[r2];
|
|
48
48
|
}), this.collection.splice(n, 1);
|
|
49
49
|
}
|
|
50
50
|
return this.collection;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
return this.collection;
|
|
61
61
|
}
|
|
62
62
|
get(e, n = "id") {
|
|
63
|
-
return this.collection.find((
|
|
63
|
+
return this.collection.find((i) => i[n] === e);
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
const s = {
|
|
@@ -115,10 +115,10 @@
|
|
|
115
115
|
(e.querySelector(n) || e).focus();
|
|
116
116
|
}
|
|
117
117
|
getFocusable(e = this.el) {
|
|
118
|
-
const n = [],
|
|
118
|
+
const n = [], i = document.activeElement, r2 = e.scrollTop;
|
|
119
119
|
return e.querySelectorAll(v$2.join(",")).forEach((m2) => {
|
|
120
120
|
m2.focus(), document.activeElement === m2 && n.push(m2);
|
|
121
|
-
}), e.scrollTop = r2,
|
|
121
|
+
}), e.scrollTop = r2, i.focus(), n;
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
124
|
f$2 = /* @__PURE__ */ new WeakMap(), d$1 = /* @__PURE__ */ new WeakMap(), u$2 = /* @__PURE__ */ new WeakMap();
|
|
@@ -129,49 +129,49 @@
|
|
|
129
129
|
(t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
|
|
130
130
|
}
|
|
131
131
|
function q$2(t, e) {
|
|
132
|
-
const
|
|
133
|
-
return
|
|
132
|
+
const i = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
|
|
133
|
+
return i ? JSON.parse(i) : {};
|
|
134
134
|
}
|
|
135
135
|
function I$3() {
|
|
136
136
|
return getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix").trim();
|
|
137
137
|
}
|
|
138
138
|
function C$2(t, e = true) {
|
|
139
|
-
const n = localStorage.getItem(t),
|
|
139
|
+
const n = localStorage.getItem(t), i = n ? JSON.parse(n) : {};
|
|
140
140
|
return {
|
|
141
141
|
get(r2) {
|
|
142
|
-
return r2 ?
|
|
142
|
+
return r2 ? i[r2] : i;
|
|
143
143
|
},
|
|
144
144
|
set(r2, c2) {
|
|
145
|
-
return c2 ?
|
|
145
|
+
return c2 ? i[r2] = c2 : delete i[r2], e && localStorage.setItem(t, JSON.stringify(i)), i;
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
function O$2(t, e, n) {
|
|
150
|
-
const
|
|
151
|
-
if (e =
|
|
150
|
+
const i = e.nodeType === Node.COMMENT_NODE, r2 = e.nodeType === Node.ELEMENT_NODE;
|
|
151
|
+
if (e = i || r2 ? e : document.querySelector(e), i && (n = "after"), !e)
|
|
152
152
|
throw new Error(`Not a valid teleport reference: '${e}'`);
|
|
153
153
|
if (typeof e[n] != "function")
|
|
154
154
|
throw new Error(`Not a valid teleport method: '${n}'`);
|
|
155
155
|
let c2 = null;
|
|
156
|
-
return
|
|
156
|
+
return i || (c2 = document.createComment("teleported #" + t.id), t.before(c2)), e[n](t), i && e.remove(), c2;
|
|
157
157
|
}
|
|
158
158
|
const S$3 = (t, e) => new Promise((n) => {
|
|
159
|
-
e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function
|
|
160
|
-
r2.target == t && (t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), n(t), this.removeEventListener("transitionend",
|
|
159
|
+
e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i(r2) {
|
|
160
|
+
r2.target == t && (t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), n(t), this.removeEventListener("transitionend", i));
|
|
161
161
|
})) : (t.classList.add(e.stateOpened), t.classList.remove(e.stateClosed), n(t));
|
|
162
162
|
}), F$3 = (t, e) => new Promise((n) => {
|
|
163
|
-
e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function
|
|
164
|
-
r2.target == t && (t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), n(t), this.removeEventListener("transitionend",
|
|
163
|
+
e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i(r2) {
|
|
164
|
+
r2.target == t && (t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), n(t), this.removeEventListener("transitionend", i));
|
|
165
165
|
})) : (t.classList.add(e.stateClosed), t.classList.remove(e.stateOpened), n(t));
|
|
166
166
|
});
|
|
167
167
|
function y$2(t, e) {
|
|
168
|
-
e && document.querySelectorAll(e).forEach((
|
|
169
|
-
t ?
|
|
168
|
+
e && document.querySelectorAll(e).forEach((i) => {
|
|
169
|
+
t ? i.style.overflow = "hidden" : i.style.removeProperty("overflow");
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
function L$2(t, e) {
|
|
173
|
-
e && document.querySelectorAll(e).forEach((
|
|
174
|
-
t ? (
|
|
173
|
+
e && document.querySelectorAll(e).forEach((i) => {
|
|
174
|
+
t ? (i.inert = true, i.setAttribute("aria-hidden", true)) : (i.inert = null, i.removeAttribute("aria-hidden"));
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
function k$3(t, e) {
|
|
@@ -190,43 +190,6 @@
|
|
|
190
190
|
teleport: O$2,
|
|
191
191
|
updateGlobalState: k$3
|
|
192
192
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
193
|
-
const i = {
|
|
194
|
-
autoInit: false,
|
|
195
|
-
stateAttr: "aria-checked",
|
|
196
|
-
stateValue: "mixed"
|
|
197
|
-
};
|
|
198
|
-
let r$2 = class r {
|
|
199
|
-
constructor(t) {
|
|
200
|
-
this.defaults = i, this.settings = { ...this.defaults, ...t }, this.__handlerClick = this.handlerClick.bind(this), this.settings.autoInit && this.init();
|
|
201
|
-
}
|
|
202
|
-
init(t = null) {
|
|
203
|
-
t && (this.settings = { ...this.settings, ...t });
|
|
204
|
-
const e = `[${this.settings.stateAttr}="${this.settings.stateValue}"]`, s2 = document.querySelectorAll(e);
|
|
205
|
-
this.setIndeterminate(s2), document.addEventListener("click", this.__handlerClick, false);
|
|
206
|
-
}
|
|
207
|
-
destroy() {
|
|
208
|
-
document.removeEventListener("click", this.__handlerClick, false);
|
|
209
|
-
}
|
|
210
|
-
handlerClick(t) {
|
|
211
|
-
const e = `[${this.settings.stateAttr}="${this.settings.stateValue}"]`, s2 = t.target.closest(e);
|
|
212
|
-
s2 && (this.removeAriaState(s2), this.setIndeterminate(s2));
|
|
213
|
-
}
|
|
214
|
-
setAriaState(t, e = this.settings.stateValue) {
|
|
215
|
-
t = t.forEach ? t : [t], t.forEach((s2) => {
|
|
216
|
-
s2.setAttribute(this.settings.stateAttr, e);
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
removeAriaState(t) {
|
|
220
|
-
t = t.forEach ? t : [t], t.forEach((e) => {
|
|
221
|
-
e.removeAttribute(this.settings.stateAttr);
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
setIndeterminate(t) {
|
|
225
|
-
t = t.forEach ? t : [t], t.forEach((e) => {
|
|
226
|
-
e.hasAttribute(this.settings.stateAttr) ? e.indeterminate = true : e.indeterminate = false;
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
193
|
var S$2 = (t, e, s2) => {
|
|
231
194
|
if (!e.has(t))
|
|
232
195
|
throw TypeError("Cannot " + s2);
|
|
@@ -235,7 +198,7 @@
|
|
|
235
198
|
if (e.has(t))
|
|
236
199
|
throw TypeError("Cannot add the same private member more than once");
|
|
237
200
|
e instanceof WeakSet ? e.add(t) : e.set(t, s2);
|
|
238
|
-
}, $$1 = (t, e, s2,
|
|
201
|
+
}, $$1 = (t, e, s2, i) => (S$2(t, e, "write to private field"), i ? i.call(t, s2) : e.set(t, s2), s2);
|
|
239
202
|
var I$2 = (t, e, s2) => {
|
|
240
203
|
if (!e.has(t))
|
|
241
204
|
throw TypeError("Cannot " + s2);
|
|
@@ -243,7 +206,7 @@
|
|
|
243
206
|
if (e.has(t))
|
|
244
207
|
throw TypeError("Cannot add the same private member more than once");
|
|
245
208
|
e instanceof WeakSet ? e.add(t) : e.set(t, s2);
|
|
246
|
-
}, h$1 = (t, e, s2,
|
|
209
|
+
}, h$1 = (t, e, s2, i) => (I$2(t, e, "write to private field"), i ? i.call(t, s2) : e.set(t, s2), s2), c$1;
|
|
247
210
|
let M$2 = class M {
|
|
248
211
|
constructor(e, s2) {
|
|
249
212
|
w$1(this, c$1, void 0), this.value = e, h$1(this, c$1, s2), this.mql = null;
|
|
@@ -271,11 +234,11 @@
|
|
|
271
234
|
return await this.deregister(e), this.collection.push(e), this.collection;
|
|
272
235
|
}
|
|
273
236
|
async deregister(e) {
|
|
274
|
-
const s2 = this.collection.findIndex((
|
|
237
|
+
const s2 = this.collection.findIndex((i) => i === e);
|
|
275
238
|
if (s2 >= 0) {
|
|
276
|
-
const
|
|
277
|
-
Object.getOwnPropertyNames(
|
|
278
|
-
delete
|
|
239
|
+
const i = this.collection[s2];
|
|
240
|
+
Object.getOwnPropertyNames(i).forEach((n) => {
|
|
241
|
+
delete i[n];
|
|
279
242
|
}), this.collection.splice(s2, 1);
|
|
280
243
|
}
|
|
281
244
|
return this.collection;
|
|
@@ -291,7 +254,7 @@
|
|
|
291
254
|
return this.collection;
|
|
292
255
|
}
|
|
293
256
|
get(e, s2 = "id") {
|
|
294
|
-
return this.collection.find((
|
|
257
|
+
return this.collection.find((i) => i[s2] === e);
|
|
295
258
|
}
|
|
296
259
|
};
|
|
297
260
|
const r$1 = {
|
|
@@ -343,10 +306,10 @@
|
|
|
343
306
|
(e.querySelector(s2) || e).focus();
|
|
344
307
|
}
|
|
345
308
|
getFocusable(e = this.el) {
|
|
346
|
-
const s2 = [],
|
|
309
|
+
const s2 = [], i = document.activeElement, n = e.scrollTop;
|
|
347
310
|
return e.querySelectorAll(F$2.join(",")).forEach((a2) => {
|
|
348
311
|
a2.focus(), document.activeElement === a2 && s2.push(a2);
|
|
349
|
-
}), e.scrollTop = n,
|
|
312
|
+
}), e.scrollTop = n, i.focus(), s2;
|
|
350
313
|
}
|
|
351
314
|
};
|
|
352
315
|
v$1 = /* @__PURE__ */ new WeakMap(), u$1 = /* @__PURE__ */ new WeakMap(), g$1 = /* @__PURE__ */ new WeakMap();
|
|
@@ -364,23 +327,23 @@
|
|
|
364
327
|
return getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix").trim();
|
|
365
328
|
}
|
|
366
329
|
function V(t, e = true) {
|
|
367
|
-
const s2 = localStorage.getItem(t),
|
|
330
|
+
const s2 = localStorage.getItem(t), i = s2 ? JSON.parse(s2) : {};
|
|
368
331
|
return {
|
|
369
332
|
get(n) {
|
|
370
|
-
return n ?
|
|
333
|
+
return n ? i[n] : i;
|
|
371
334
|
},
|
|
372
335
|
set(n, a2) {
|
|
373
|
-
return a2 ?
|
|
336
|
+
return a2 ? i[n] = a2 : delete i[n], e && localStorage.setItem(t, JSON.stringify(i)), i;
|
|
374
337
|
}
|
|
375
338
|
};
|
|
376
339
|
}
|
|
377
340
|
const J$2 = (t, e) => new Promise((s2) => {
|
|
378
|
-
e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function
|
|
379
|
-
n.target == t && (t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), s2(t), this.removeEventListener("transitionend",
|
|
341
|
+
e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i(n) {
|
|
342
|
+
n.target == t && (t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), s2(t), this.removeEventListener("transitionend", i));
|
|
380
343
|
})) : (t.classList.add(e.stateOpened), t.classList.remove(e.stateClosed), s2(t));
|
|
381
344
|
}), z$1 = (t, e) => new Promise((s2) => {
|
|
382
|
-
e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function
|
|
383
|
-
n.target == t && (t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), s2(t), this.removeEventListener("transitionend",
|
|
345
|
+
e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i(n) {
|
|
346
|
+
n.target == t && (t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), s2(t), this.removeEventListener("transitionend", i));
|
|
384
347
|
})) : (t.classList.add(e.stateClosed), t.classList.remove(e.stateOpened), s2(t));
|
|
385
348
|
});
|
|
386
349
|
function G$1(t, e) {
|
|
@@ -433,15 +396,15 @@
|
|
|
433
396
|
[data-${this.settings.dataClose}]
|
|
434
397
|
`);
|
|
435
398
|
if (e) {
|
|
436
|
-
t.preventDefault(), e.matches(`[data-${this.settings.dataToggle}]`) && e.getAttribute(`data-${this.settings.dataToggle}`).trim().split(" ").forEach((
|
|
437
|
-
const n = this.get(
|
|
399
|
+
t.preventDefault(), e.matches(`[data-${this.settings.dataToggle}]`) && e.getAttribute(`data-${this.settings.dataToggle}`).trim().split(" ").forEach((i) => {
|
|
400
|
+
const n = this.get(i);
|
|
438
401
|
n.trigger = e, n.toggle();
|
|
439
|
-
}), e.matches(`[data-${this.settings.dataOpen}]`) && e.getAttribute(`data-${this.settings.dataOpen}`).trim().split(" ").forEach((
|
|
440
|
-
const n = this.get(
|
|
402
|
+
}), e.matches(`[data-${this.settings.dataOpen}]`) && e.getAttribute(`data-${this.settings.dataOpen}`).trim().split(" ").forEach((i) => {
|
|
403
|
+
const n = this.get(i);
|
|
441
404
|
n.trigger = e, n.open();
|
|
442
|
-
}), e.matches(`[data-${this.settings.dataClose}]`) && e.getAttribute(`data-${this.settings.dataClose}`).trim().split(" ").forEach((
|
|
443
|
-
if (
|
|
444
|
-
const n = this.get(
|
|
405
|
+
}), e.matches(`[data-${this.settings.dataClose}]`) && e.getAttribute(`data-${this.settings.dataClose}`).trim().split(" ").forEach((i) => {
|
|
406
|
+
if (i) {
|
|
407
|
+
const n = this.get(i);
|
|
445
408
|
n.trigger = e, n.close();
|
|
446
409
|
} else {
|
|
447
410
|
const n = t.target.closest(this.settings.selectorDrawer);
|
|
@@ -461,11 +424,11 @@
|
|
|
461
424
|
async function L$1(t, e = true) {
|
|
462
425
|
if (!t)
|
|
463
426
|
return this.collection;
|
|
464
|
-
const s2 = this.collection.findIndex((
|
|
427
|
+
const s2 = this.collection.findIndex((i) => i.id === t.id);
|
|
465
428
|
if (s2 >= 0) {
|
|
466
|
-
const
|
|
467
|
-
e &&
|
|
468
|
-
delete
|
|
429
|
+
const i = this.collection[s2];
|
|
430
|
+
e && i.state === "opened" && await i.close(false), this.store.set(i.id), i.unmountBreakpoint(), Object.getOwnPropertyNames(i).forEach((n) => {
|
|
431
|
+
delete i[n];
|
|
469
432
|
}), this.collection.splice(s2, 1);
|
|
470
433
|
}
|
|
471
434
|
return this.collection;
|
|
@@ -486,8 +449,8 @@
|
|
|
486
449
|
function Y(t) {
|
|
487
450
|
const e = O$1.call(this, t);
|
|
488
451
|
if (e) {
|
|
489
|
-
const s2 = document.querySelector(`#${e}`),
|
|
490
|
-
return !s2 && !
|
|
452
|
+
const s2 = document.querySelector(`#${e}`), i = s2 ? s2.querySelector(this.settings.selectorDialog) : null;
|
|
453
|
+
return !s2 && !i ? { error: new Error(`No drawer elements found using the ID: "${e}".`) } : i ? { drawer: s2, dialog: i } : { error: new Error("Drawer is missing dialog element.") };
|
|
491
454
|
} else
|
|
492
455
|
return { error: new Error("Could not resolve the drawer ID.") };
|
|
493
456
|
}
|
|
@@ -498,22 +461,22 @@
|
|
|
498
461
|
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());
|
|
499
462
|
}
|
|
500
463
|
async function C$1(t, e, s2 = true) {
|
|
501
|
-
const
|
|
502
|
-
return e !== void 0 && (n.transition = e),
|
|
464
|
+
const i = y$1.call(this, t), n = { ...this.settings, ...i.settings };
|
|
465
|
+
return e !== void 0 && (n.transition = e), i.state === "closed" && (i.state = "opening", await J$2(i.el, n), i.mode === "modal" && k$2(true, n), i.state = "opened"), s2 && D$2.call(this, i), i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
|
|
503
466
|
detail: this,
|
|
504
467
|
bubbles: true
|
|
505
|
-
})),
|
|
468
|
+
})), i;
|
|
506
469
|
}
|
|
507
470
|
async function b$1(t, e, s2 = true) {
|
|
508
|
-
const
|
|
509
|
-
return e !== void 0 && (n.transition = e),
|
|
471
|
+
const i = y$1.call(this, t), n = { ...this.settings, ...i.settings };
|
|
472
|
+
return e !== void 0 && (n.transition = e), i.state === "opened" && (i.state = "closing", document.activeElement.blur(), await z$1(i.el, n), i.mode === "modal" && k$2(false, n), s2 && D$2.call(this, i), i.state = "closed", i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
|
|
510
473
|
detail: this,
|
|
511
474
|
bubbles: true
|
|
512
|
-
}))),
|
|
475
|
+
}))), i;
|
|
513
476
|
}
|
|
514
477
|
async function q$1(t, e, s2) {
|
|
515
|
-
const
|
|
516
|
-
return
|
|
478
|
+
const i = y$1.call(this, t);
|
|
479
|
+
return i.state === "closed" ? C$1.call(this, i, e, s2) : b$1.call(this, i, e, s2);
|
|
517
480
|
}
|
|
518
481
|
function Z$1(t) {
|
|
519
482
|
switch (t.mode) {
|
|
@@ -539,7 +502,7 @@
|
|
|
539
502
|
}
|
|
540
503
|
async function et$1(t, e) {
|
|
541
504
|
await L$1.call(this, t, false);
|
|
542
|
-
const s2 = this,
|
|
505
|
+
const s2 = this, i = new M$2(), n = {
|
|
543
506
|
open(o2, d2) {
|
|
544
507
|
return C$1.call(s2, this, o2, d2);
|
|
545
508
|
},
|
|
@@ -554,10 +517,10 @@
|
|
|
554
517
|
},
|
|
555
518
|
mountBreakpoint() {
|
|
556
519
|
const o2 = this.breakpoint, d2 = this.handleBreakpoint.bind(this);
|
|
557
|
-
return
|
|
520
|
+
return i.mount(o2, d2), this;
|
|
558
521
|
},
|
|
559
522
|
unmountBreakpoint() {
|
|
560
|
-
return
|
|
523
|
+
return i.unmount(), this;
|
|
561
524
|
},
|
|
562
525
|
handleBreakpoint(o2) {
|
|
563
526
|
return this.mode = o2.matches ? "inline" : "modal", this;
|
|
@@ -604,8 +567,8 @@
|
|
|
604
567
|
}
|
|
605
568
|
async init(s2 = null) {
|
|
606
569
|
s2 && (this.settings = { ...this.settings, ...s2 });
|
|
607
|
-
const
|
|
608
|
-
return await this.registerCollection(
|
|
570
|
+
const i = document.querySelectorAll(this.settings.selectorDrawer);
|
|
571
|
+
return await this.registerCollection(i), this.settings.eventListeners && this.initEventListeners(), this;
|
|
609
572
|
}
|
|
610
573
|
async destroy() {
|
|
611
574
|
return await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(), this;
|
|
@@ -617,21 +580,21 @@
|
|
|
617
580
|
document.removeEventListener("click", p$1(this, f$1), false), document.removeEventListener("keydown", p$1(this, m$1), false);
|
|
618
581
|
}
|
|
619
582
|
register(s2) {
|
|
620
|
-
const
|
|
621
|
-
return
|
|
583
|
+
const i = Y.call(this, s2);
|
|
584
|
+
return i.error ? Promise.reject(i.error) : et$1.call(this, i.drawer, i.dialog);
|
|
622
585
|
}
|
|
623
586
|
deregister(s2) {
|
|
624
|
-
const
|
|
625
|
-
return L$1.call(this,
|
|
587
|
+
const i = this.get(O$1.call(this, s2));
|
|
588
|
+
return L$1.call(this, i);
|
|
626
589
|
}
|
|
627
|
-
open(s2,
|
|
628
|
-
return C$1.call(this, s2,
|
|
590
|
+
open(s2, i, n) {
|
|
591
|
+
return C$1.call(this, s2, i, n);
|
|
629
592
|
}
|
|
630
|
-
close(s2,
|
|
631
|
-
return b$1.call(this, s2,
|
|
593
|
+
close(s2, i, n) {
|
|
594
|
+
return b$1.call(this, s2, i, n);
|
|
632
595
|
}
|
|
633
|
-
toggle(s2,
|
|
634
|
-
return q$1.call(this, s2,
|
|
596
|
+
toggle(s2, i, n) {
|
|
597
|
+
return q$1.call(this, s2, i, n);
|
|
635
598
|
}
|
|
636
599
|
};
|
|
637
600
|
f$1 = /* @__PURE__ */ new WeakMap(), m$1 = /* @__PURE__ */ new WeakMap();
|
|
@@ -643,7 +606,7 @@
|
|
|
643
606
|
if (t.has(e))
|
|
644
607
|
throw TypeError("Cannot add the same private member more than once");
|
|
645
608
|
t instanceof WeakSet ? t.add(e) : t.set(e, s2);
|
|
646
|
-
}, b = (e, t, s2,
|
|
609
|
+
}, b = (e, t, s2, i) => (I$1(e, t, "write to private field"), i ? i.call(e, s2) : t.set(e, s2), s2);
|
|
647
610
|
var k$1 = (e, t, s2) => {
|
|
648
611
|
if (!t.has(e))
|
|
649
612
|
throw TypeError("Cannot " + s2);
|
|
@@ -651,7 +614,7 @@
|
|
|
651
614
|
if (t.has(e))
|
|
652
615
|
throw TypeError("Cannot add the same private member more than once");
|
|
653
616
|
t instanceof WeakSet ? t.add(e) : t.set(e, s2);
|
|
654
|
-
}, E = (e, t, s2,
|
|
617
|
+
}, E = (e, t, s2, i) => (k$1(e, t, "write to private field"), i ? i.call(e, s2) : t.set(e, s2), s2);
|
|
655
618
|
class A {
|
|
656
619
|
constructor() {
|
|
657
620
|
this.collection = [];
|
|
@@ -660,11 +623,11 @@
|
|
|
660
623
|
return await this.deregister(t), this.collection.push(t), this.collection;
|
|
661
624
|
}
|
|
662
625
|
async deregister(t) {
|
|
663
|
-
const s2 = this.collection.findIndex((
|
|
626
|
+
const s2 = this.collection.findIndex((i) => i === t);
|
|
664
627
|
if (s2 >= 0) {
|
|
665
|
-
const
|
|
666
|
-
Object.getOwnPropertyNames(
|
|
667
|
-
delete
|
|
628
|
+
const i = this.collection[s2];
|
|
629
|
+
Object.getOwnPropertyNames(i).forEach((n) => {
|
|
630
|
+
delete i[n];
|
|
668
631
|
}), this.collection.splice(s2, 1);
|
|
669
632
|
}
|
|
670
633
|
return this.collection;
|
|
@@ -680,7 +643,7 @@
|
|
|
680
643
|
return this.collection;
|
|
681
644
|
}
|
|
682
645
|
get(t, s2 = "id") {
|
|
683
|
-
return this.collection.find((
|
|
646
|
+
return this.collection.find((i) => i[s2] === t);
|
|
684
647
|
}
|
|
685
648
|
}
|
|
686
649
|
const r = {
|
|
@@ -732,10 +695,10 @@
|
|
|
732
695
|
(t.querySelector(s2) || t).focus();
|
|
733
696
|
}
|
|
734
697
|
getFocusable(t = this.el) {
|
|
735
|
-
const s2 = [],
|
|
698
|
+
const s2 = [], i = document.activeElement, n = t.scrollTop;
|
|
736
699
|
return t.querySelectorAll(S$1.join(",")).forEach((l2) => {
|
|
737
700
|
l2.focus(), document.activeElement === l2 && s2.push(l2);
|
|
738
|
-
}), t.scrollTop = n,
|
|
701
|
+
}), t.scrollTop = n, i.focus(), s2;
|
|
739
702
|
}
|
|
740
703
|
};
|
|
741
704
|
g = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap();
|
|
@@ -750,21 +713,21 @@
|
|
|
750
713
|
return s2 ? JSON.parse(s2) : {};
|
|
751
714
|
}
|
|
752
715
|
function T$1(e, t, s2) {
|
|
753
|
-
const
|
|
754
|
-
if (t =
|
|
716
|
+
const i = t.nodeType === Node.COMMENT_NODE, n = t.nodeType === Node.ELEMENT_NODE;
|
|
717
|
+
if (t = i || n ? t : document.querySelector(t), i && (s2 = "after"), !t)
|
|
755
718
|
throw new Error(`Not a valid teleport reference: '${t}'`);
|
|
756
719
|
if (typeof t[s2] != "function")
|
|
757
720
|
throw new Error(`Not a valid teleport method: '${s2}'`);
|
|
758
721
|
let l2 = null;
|
|
759
|
-
return
|
|
722
|
+
return i || (l2 = document.createComment("teleported #" + e.id), e.before(l2)), t[s2](e), i && t.remove(), l2;
|
|
760
723
|
}
|
|
761
724
|
const D$1 = (e, t) => new Promise((s2) => {
|
|
762
|
-
t.transition ? (e.classList.remove(t.stateClosed), e.classList.add(t.stateOpening), e.addEventListener("transitionend", function
|
|
763
|
-
n.target == e && (e.classList.add(t.stateOpened), e.classList.remove(t.stateOpening), s2(e), this.removeEventListener("transitionend",
|
|
725
|
+
t.transition ? (e.classList.remove(t.stateClosed), e.classList.add(t.stateOpening), e.addEventListener("transitionend", function i(n) {
|
|
726
|
+
n.target == e && (e.classList.add(t.stateOpened), e.classList.remove(t.stateOpening), s2(e), this.removeEventListener("transitionend", i));
|
|
764
727
|
})) : (e.classList.add(t.stateOpened), e.classList.remove(t.stateClosed), s2(e));
|
|
765
728
|
}), F$1 = (e, t) => new Promise((s2) => {
|
|
766
|
-
t.transition ? (e.classList.add(t.stateClosing), e.classList.remove(t.stateOpened), e.addEventListener("transitionend", function
|
|
767
|
-
n.target == e && (e.classList.remove(t.stateClosing), e.classList.add(t.stateClosed), s2(e), this.removeEventListener("transitionend",
|
|
729
|
+
t.transition ? (e.classList.add(t.stateClosing), e.classList.remove(t.stateOpened), e.addEventListener("transitionend", function i(n) {
|
|
730
|
+
n.target == e && (e.classList.remove(t.stateClosing), e.classList.add(t.stateClosed), s2(e), this.removeEventListener("transitionend", i));
|
|
768
731
|
})) : (e.classList.add(t.stateClosed), e.classList.remove(t.stateOpened), s2(e));
|
|
769
732
|
});
|
|
770
733
|
function q(e, t) {
|
|
@@ -819,8 +782,8 @@
|
|
|
819
782
|
function G(e) {
|
|
820
783
|
const t = p.call(this, e);
|
|
821
784
|
if (t) {
|
|
822
|
-
const s2 = document.querySelector(`#${t}`),
|
|
823
|
-
return !s2 && !
|
|
785
|
+
const s2 = document.querySelector(`#${t}`), i = s2 ? s2.querySelector(this.settings.selectorDialog) : null;
|
|
786
|
+
return !s2 && !i ? { error: new Error(`No modal elements found using the ID: "${t}".`) } : i ? { modal: s2, dialog: i } : { error: new Error("Modal is missing dialog element.") };
|
|
824
787
|
} else
|
|
825
788
|
return { error: new Error("Could not resolve the modal ID.") };
|
|
826
789
|
}
|
|
@@ -833,8 +796,8 @@
|
|
|
833
796
|
);
|
|
834
797
|
if (t) {
|
|
835
798
|
e.preventDefault(), e.target.closest(this.settings.selectorModal) || (this.trigger = t);
|
|
836
|
-
const
|
|
837
|
-
return t.matches(`[data-${this.settings.dataOpen}]`) ?
|
|
799
|
+
const i = this.get(p.call(this, t));
|
|
800
|
+
return t.matches(`[data-${this.settings.dataOpen}]`) ? i.open() : i.replace();
|
|
838
801
|
}
|
|
839
802
|
if (t = e.target.closest(`[data-${this.settings.dataClose}]`), t) {
|
|
840
803
|
e.preventDefault();
|
|
@@ -851,48 +814,48 @@
|
|
|
851
814
|
async function w(e, t = true) {
|
|
852
815
|
if (!e)
|
|
853
816
|
return this.collection;
|
|
854
|
-
const s2 = this.collection.findIndex((
|
|
817
|
+
const s2 = this.collection.findIndex((i) => i.id === e.id);
|
|
855
818
|
if (s2 >= 0) {
|
|
856
|
-
const
|
|
857
|
-
t &&
|
|
858
|
-
delete
|
|
819
|
+
const i = this.collection[s2];
|
|
820
|
+
t && i.state === "opened" ? await i.close(false) : this.stack.remove(i), i.getSetting("teleport") && i.teleportReturn(), Object.getOwnPropertyNames(i).forEach((n) => {
|
|
821
|
+
delete i[n];
|
|
859
822
|
}), this.collection.splice(s2, 1);
|
|
860
823
|
}
|
|
861
824
|
return this.collection;
|
|
862
825
|
}
|
|
863
826
|
async function x(e, t, s2 = true) {
|
|
864
|
-
const
|
|
865
|
-
return t !== void 0 && (n.transition = t), this.stack.moveToTop(
|
|
827
|
+
const i = L.call(this, e), n = { ...this.settings, ...i.settings };
|
|
828
|
+
return t !== void 0 && (n.transition = t), this.stack.moveToTop(i), i.state === "closed" && (i.state = "opening", this.stack.add(i), await D$1(i.el, n), i.state = "opened"), s2 && m.call(this), i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
|
|
866
829
|
detail: this,
|
|
867
830
|
bubbles: true
|
|
868
|
-
})),
|
|
831
|
+
})), i;
|
|
869
832
|
}
|
|
870
833
|
async function C(e, t, s2 = true) {
|
|
871
|
-
const
|
|
872
|
-
if (
|
|
873
|
-
|
|
874
|
-
const n = { ...this.settings, ...
|
|
875
|
-
t !== void 0 && (n.transition = t), document.activeElement.blur(), await F$1(
|
|
834
|
+
const i = e ? L.call(this, e) : this.active;
|
|
835
|
+
if (i && i.state === "opened") {
|
|
836
|
+
i.state = "closing";
|
|
837
|
+
const n = { ...this.settings, ...i.settings };
|
|
838
|
+
t !== void 0 && (n.transition = t), document.activeElement.blur(), await F$1(i.el, n), this.stack.remove(i), s2 && m.call(this), i.state = "closed", i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
|
|
876
839
|
detail: this,
|
|
877
840
|
bubbles: true
|
|
878
841
|
}));
|
|
879
842
|
}
|
|
880
|
-
return
|
|
843
|
+
return i;
|
|
881
844
|
}
|
|
882
845
|
async function $(e, t) {
|
|
883
846
|
const s2 = [];
|
|
884
|
-
return await Promise.all(this.stack.value.map(async (
|
|
885
|
-
e && e ===
|
|
847
|
+
return await Promise.all(this.stack.value.map(async (i) => {
|
|
848
|
+
e && e === i.id ? Promise.resolve() : s2.push(await C.call(this, i, t, false)), i.trigger = null;
|
|
886
849
|
})), s2;
|
|
887
850
|
}
|
|
888
851
|
async function O(e, t, s2 = true) {
|
|
889
|
-
const
|
|
852
|
+
const i = L.call(this, e);
|
|
890
853
|
let n, l2;
|
|
891
|
-
return
|
|
854
|
+
return i.state === "opened" ? (n = i, l2 = await $.call(this, i.id, t)) : (n = x.call(this, i, t, false), l2 = $.call(this, false, t), await Promise.all([n, l2])), s2 && m.call(this), { opened: n, closed: l2 };
|
|
892
855
|
}
|
|
893
856
|
async function B$1(e, t) {
|
|
894
857
|
await w.call(this, e, false);
|
|
895
|
-
const s2 = this,
|
|
858
|
+
const s2 = this, i = {
|
|
896
859
|
open(l2, a2) {
|
|
897
860
|
return x.call(s2, this, l2, a2);
|
|
898
861
|
},
|
|
@@ -921,7 +884,7 @@
|
|
|
921
884
|
dialog: t,
|
|
922
885
|
returnRef: null,
|
|
923
886
|
settings: P(e, this.settings.dataConfig),
|
|
924
|
-
...
|
|
887
|
+
...i
|
|
925
888
|
};
|
|
926
889
|
return n.dialog.setAttribute("aria-modal", "true"), n.dialog.hasAttribute("role") || n.dialog.setAttribute("role", "dialog"), n.getSetting("setTabindex") && n.dialog.setAttribute("tabindex", "-1"), n.getSetting("teleport") && n.teleport(), this.collection.push(n), n.el.classList.contains(this.settings.stateOpened) ? await n.open(false) : (n.el.classList.remove(this.settings.stateOpening), n.el.classList.remove(this.settings.stateClosing), n.el.classList.add(this.settings.stateClosed)), n;
|
|
927
890
|
}
|
|
@@ -935,10 +898,10 @@
|
|
|
935
898
|
return t[t.length - 1];
|
|
936
899
|
},
|
|
937
900
|
updateIndex() {
|
|
938
|
-
t.forEach((s2,
|
|
901
|
+
t.forEach((s2, i) => {
|
|
939
902
|
s2.el.style.zIndex = null;
|
|
940
903
|
const n = getComputedStyle(s2.el)["z-index"];
|
|
941
|
-
s2.el.style.zIndex = parseInt(n) +
|
|
904
|
+
s2.el.style.zIndex = parseInt(n) + i + 1;
|
|
942
905
|
});
|
|
943
906
|
},
|
|
944
907
|
updateGlobalState() {
|
|
@@ -946,16 +909,16 @@
|
|
|
946
909
|
},
|
|
947
910
|
add(s2) {
|
|
948
911
|
s2.el.style.zIndex = null;
|
|
949
|
-
const
|
|
950
|
-
s2.el.style.zIndex = parseInt(
|
|
912
|
+
const i = getComputedStyle(s2.el)["z-index"];
|
|
913
|
+
s2.el.style.zIndex = parseInt(i) + t.length + 1, t.push(s2), this.updateGlobalState();
|
|
951
914
|
},
|
|
952
915
|
remove(s2) {
|
|
953
|
-
const
|
|
954
|
-
|
|
916
|
+
const i = t.findIndex((n) => n.id === s2.id);
|
|
917
|
+
i >= 0 && (s2.el.style.zIndex = null, t.splice(i, 1), this.updateGlobalState());
|
|
955
918
|
},
|
|
956
919
|
moveToTop(s2) {
|
|
957
|
-
const
|
|
958
|
-
|
|
920
|
+
const i = t.findIndex((n) => n.id === s2.id);
|
|
921
|
+
i >= 0 && (t.splice(i, 1), this.add(s2));
|
|
959
922
|
}
|
|
960
923
|
};
|
|
961
924
|
}
|
|
@@ -972,8 +935,8 @@
|
|
|
972
935
|
}
|
|
973
936
|
async init(s2) {
|
|
974
937
|
s2 && (this.settings = { ...this.settings, ...s2 });
|
|
975
|
-
const
|
|
976
|
-
return await this.registerCollection(
|
|
938
|
+
const i = document.querySelectorAll(this.settings.selectorModal);
|
|
939
|
+
return await this.registerCollection(i), this.settings.eventListeners && this.initEventListeners(), this;
|
|
977
940
|
}
|
|
978
941
|
async destroy() {
|
|
979
942
|
return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(), this;
|
|
@@ -985,24 +948,24 @@
|
|
|
985
948
|
document.removeEventListener("click", f(this, u), false), document.removeEventListener("keydown", f(this, h), false);
|
|
986
949
|
}
|
|
987
950
|
register(s2) {
|
|
988
|
-
const
|
|
989
|
-
return
|
|
951
|
+
const i = G.call(this, s2);
|
|
952
|
+
return i.error ? Promise.reject(i.error) : B$1.call(this, i.modal, i.dialog);
|
|
990
953
|
}
|
|
991
954
|
deregister(s2) {
|
|
992
|
-
const
|
|
993
|
-
return w.call(this,
|
|
955
|
+
const i = this.get(p.call(this, s2));
|
|
956
|
+
return w.call(this, i);
|
|
994
957
|
}
|
|
995
|
-
open(s2,
|
|
996
|
-
return x.call(this, s2,
|
|
958
|
+
open(s2, i, n) {
|
|
959
|
+
return x.call(this, s2, i, n);
|
|
997
960
|
}
|
|
998
|
-
close(s2,
|
|
999
|
-
return C.call(this, s2,
|
|
961
|
+
close(s2, i, n) {
|
|
962
|
+
return C.call(this, s2, i, n);
|
|
1000
963
|
}
|
|
1001
|
-
replace(s2,
|
|
1002
|
-
return O.call(this, s2,
|
|
964
|
+
replace(s2, i, n) {
|
|
965
|
+
return O.call(this, s2, i, n);
|
|
1003
966
|
}
|
|
1004
|
-
async closeAll(s2 = false,
|
|
1005
|
-
const l2 = await $.call(this, s2,
|
|
967
|
+
async closeAll(s2 = false, i, n = true) {
|
|
968
|
+
const l2 = await $.call(this, s2, i);
|
|
1006
969
|
return n && m.call(this), l2;
|
|
1007
970
|
}
|
|
1008
971
|
}
|
|
@@ -1015,7 +978,7 @@
|
|
|
1015
978
|
if (t.has(e))
|
|
1016
979
|
throw TypeError("Cannot add the same private member more than once");
|
|
1017
980
|
t instanceof WeakSet ? t.add(e) : t.set(e, r2);
|
|
1018
|
-
}, Ke = (e, t, r2,
|
|
981
|
+
}, Ke = (e, t, r2, i) => (Ue(e, t, "write to private field"), i ? i.call(e, r2) : t.set(e, r2), r2);
|
|
1019
982
|
class Ct {
|
|
1020
983
|
constructor() {
|
|
1021
984
|
this.collection = [];
|
|
@@ -1024,11 +987,11 @@
|
|
|
1024
987
|
return await this.deregister(t), this.collection.push(t), this.collection;
|
|
1025
988
|
}
|
|
1026
989
|
async deregister(t) {
|
|
1027
|
-
const r2 = this.collection.findIndex((
|
|
990
|
+
const r2 = this.collection.findIndex((i) => i === t);
|
|
1028
991
|
if (r2 >= 0) {
|
|
1029
|
-
const
|
|
1030
|
-
Object.getOwnPropertyNames(
|
|
1031
|
-
delete
|
|
992
|
+
const i = this.collection[r2];
|
|
993
|
+
Object.getOwnPropertyNames(i).forEach((n) => {
|
|
994
|
+
delete i[n];
|
|
1032
995
|
}), this.collection.splice(r2, 1);
|
|
1033
996
|
}
|
|
1034
997
|
return this.collection;
|
|
@@ -1044,7 +1007,7 @@
|
|
|
1044
1007
|
return this.collection;
|
|
1045
1008
|
}
|
|
1046
1009
|
get(t, r2 = "id") {
|
|
1047
|
-
return this.collection.find((
|
|
1010
|
+
return this.collection.find((i) => i[r2] === t);
|
|
1048
1011
|
}
|
|
1049
1012
|
}
|
|
1050
1013
|
function kt() {
|
|
@@ -1063,7 +1026,7 @@
|
|
|
1063
1026
|
placement: "bottom"
|
|
1064
1027
|
};
|
|
1065
1028
|
function ot(e, t) {
|
|
1066
|
-
const r2 = getComputedStyle(e),
|
|
1029
|
+
const r2 = getComputedStyle(e), i = {
|
|
1067
1030
|
placement: t.placement,
|
|
1068
1031
|
event: t.eventType,
|
|
1069
1032
|
offset: 0,
|
|
@@ -1072,17 +1035,17 @@
|
|
|
1072
1035
|
"arrow-element": t.selectorArrow,
|
|
1073
1036
|
"arrow-padding": 0
|
|
1074
1037
|
};
|
|
1075
|
-
for (const n in
|
|
1038
|
+
for (const n in i) {
|
|
1076
1039
|
const o2 = kt(), l2 = r2.getPropertyValue(`--${o2}popover-${n}`).trim();
|
|
1077
|
-
l2 && (
|
|
1040
|
+
l2 && (i[n] = l2);
|
|
1078
1041
|
}
|
|
1079
|
-
return
|
|
1042
|
+
return i;
|
|
1080
1043
|
}
|
|
1081
1044
|
function Pe(e) {
|
|
1082
1045
|
let t;
|
|
1083
1046
|
const r2 = typeof e == "string" ? e.trim().split(" ") : [e];
|
|
1084
|
-
switch (r2.forEach(function(
|
|
1085
|
-
r2[n] = parseInt(
|
|
1047
|
+
switch (r2.forEach(function(i, n) {
|
|
1048
|
+
r2[n] = parseInt(i, 10);
|
|
1086
1049
|
}), r2.length) {
|
|
1087
1050
|
case 1:
|
|
1088
1051
|
t = r2[0];
|
|
@@ -1153,8 +1116,8 @@
|
|
|
1153
1116
|
function Bt(e) {
|
|
1154
1117
|
const t = st.call(this, e);
|
|
1155
1118
|
if (t) {
|
|
1156
|
-
const r2 = document.querySelector(`#${t}`),
|
|
1157
|
-
return !
|
|
1119
|
+
const r2 = document.querySelector(`#${t}`), i = document.querySelector(`[aria-controls="${t}"]`) || document.querySelector(`[aria-describedby="${t}"]`);
|
|
1120
|
+
return !i && !r2 ? { error: new Error(`No popover elements found using the ID: "${t}".`) } : i ? r2 ? { popover: r2, trigger: i } : { error: new Error("No popover associated with the provided popover trigger.") } : { error: new Error("No popover trigger associated with the provided popover.") };
|
|
1158
1121
|
} else
|
|
1159
1122
|
return { error: new Error("Could not resolve the popover ID.") };
|
|
1160
1123
|
}
|
|
@@ -1197,8 +1160,8 @@
|
|
|
1197
1160
|
}
|
|
1198
1161
|
function ft(e) {
|
|
1199
1162
|
const t = this;
|
|
1200
|
-
document.addEventListener("click", function r2(
|
|
1201
|
-
|
|
1163
|
+
document.addEventListener("click", function r2(i) {
|
|
1164
|
+
i.target.closest(
|
|
1202
1165
|
`#${e.id}, [aria-controls="${e.id}"], [aria-describedby="${e.id}"]`
|
|
1203
1166
|
) ? e.el && !e.el.classList.contains(t.settings.stateActive) && this.removeEventListener("click", r2) : (e.el && e.el.classList.contains(t.settings.stateActive) && e.close(), this.removeEventListener("click", r2));
|
|
1204
1167
|
});
|
|
@@ -1237,8 +1200,8 @@
|
|
|
1237
1200
|
function Ut(e) {
|
|
1238
1201
|
var t = e.state;
|
|
1239
1202
|
Object.keys(t.elements).forEach(function(r2) {
|
|
1240
|
-
var
|
|
1241
|
-
!T(o2) || !N(o2) || (Object.assign(o2.style,
|
|
1203
|
+
var i = t.styles[r2] || {}, n = t.attributes[r2] || {}, o2 = t.elements[r2];
|
|
1204
|
+
!T(o2) || !N(o2) || (Object.assign(o2.style, i), Object.keys(n).forEach(function(l2) {
|
|
1242
1205
|
var s2 = n[l2];
|
|
1243
1206
|
s2 === false ? o2.removeAttribute(l2) : o2.setAttribute(l2, s2 === true ? "" : s2);
|
|
1244
1207
|
}));
|
|
@@ -1258,8 +1221,8 @@
|
|
|
1258
1221
|
reference: {}
|
|
1259
1222
|
};
|
|
1260
1223
|
return Object.assign(t.elements.popper.style, r2.popper), t.styles = r2, t.elements.arrow && Object.assign(t.elements.arrow.style, r2.arrow), function() {
|
|
1261
|
-
Object.keys(t.elements).forEach(function(
|
|
1262
|
-
var n = t.elements[
|
|
1224
|
+
Object.keys(t.elements).forEach(function(i) {
|
|
1225
|
+
var n = t.elements[i], o2 = t.attributes[i] || {}, l2 = Object.keys(t.styles.hasOwnProperty(i) ? t.styles[i] : r2[i]), s2 = l2.reduce(function(a2, f2) {
|
|
1263
1226
|
return a2[f2] = "", a2;
|
|
1264
1227
|
}, {});
|
|
1265
1228
|
!T(n) || !N(n) || (Object.assign(n.style, s2), Object.keys(o2).forEach(function(a2) {
|
|
@@ -1291,9 +1254,9 @@
|
|
|
1291
1254
|
}
|
|
1292
1255
|
function ee(e, t, r2) {
|
|
1293
1256
|
t === void 0 && (t = false), r2 === void 0 && (r2 = false);
|
|
1294
|
-
var
|
|
1295
|
-
t && T(e) && (n = e.offsetWidth > 0 && Z(
|
|
1296
|
-
var l2 = K(e) ? B(e) : window, s2 = l2.visualViewport, a2 = !dt() && r2, f2 = (
|
|
1257
|
+
var i = e.getBoundingClientRect(), n = 1, o2 = 1;
|
|
1258
|
+
t && T(e) && (n = e.offsetWidth > 0 && Z(i.width) / e.offsetWidth || 1, o2 = e.offsetHeight > 0 && Z(i.height) / e.offsetHeight || 1);
|
|
1259
|
+
var l2 = K(e) ? B(e) : window, s2 = l2.visualViewport, a2 = !dt() && r2, 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;
|
|
1297
1260
|
return {
|
|
1298
1261
|
width: h2,
|
|
1299
1262
|
height: y2,
|
|
@@ -1306,12 +1269,12 @@
|
|
|
1306
1269
|
};
|
|
1307
1270
|
}
|
|
1308
1271
|
function Be(e) {
|
|
1309
|
-
var t = ee(e), r2 = e.offsetWidth,
|
|
1310
|
-
return Math.abs(t.width - r2) <= 1 && (r2 = t.width), Math.abs(t.height -
|
|
1272
|
+
var t = ee(e), r2 = e.offsetWidth, i = e.offsetHeight;
|
|
1273
|
+
return Math.abs(t.width - r2) <= 1 && (r2 = t.width), Math.abs(t.height - i) <= 1 && (i = t.height), {
|
|
1311
1274
|
x: e.offsetLeft,
|
|
1312
1275
|
y: e.offsetTop,
|
|
1313
1276
|
width: r2,
|
|
1314
|
-
height:
|
|
1277
|
+
height: i
|
|
1315
1278
|
};
|
|
1316
1279
|
}
|
|
1317
1280
|
function vt(e, t) {
|
|
@@ -1319,12 +1282,12 @@
|
|
|
1319
1282
|
if (e.contains(t))
|
|
1320
1283
|
return true;
|
|
1321
1284
|
if (r2 && Re(r2)) {
|
|
1322
|
-
var
|
|
1285
|
+
var i = t;
|
|
1323
1286
|
do {
|
|
1324
|
-
if (
|
|
1287
|
+
if (i && e.isSameNode(i))
|
|
1325
1288
|
return true;
|
|
1326
|
-
|
|
1327
|
-
} while (
|
|
1289
|
+
i = i.parentNode || i.host;
|
|
1290
|
+
} while (i);
|
|
1328
1291
|
}
|
|
1329
1292
|
return false;
|
|
1330
1293
|
}
|
|
@@ -1359,8 +1322,8 @@
|
|
|
1359
1322
|
function Jt(e) {
|
|
1360
1323
|
var t = /firefox/i.test(Le()), r2 = /Trident/i.test(Le());
|
|
1361
1324
|
if (r2 && T(e)) {
|
|
1362
|
-
var
|
|
1363
|
-
if (
|
|
1325
|
+
var i = I(e);
|
|
1326
|
+
if (i.position === "fixed")
|
|
1364
1327
|
return null;
|
|
1365
1328
|
}
|
|
1366
1329
|
var n = we(e);
|
|
@@ -1384,8 +1347,8 @@
|
|
|
1384
1347
|
return _(e, ye(t, r2));
|
|
1385
1348
|
}
|
|
1386
1349
|
function Qt(e, t, r2) {
|
|
1387
|
-
var
|
|
1388
|
-
return
|
|
1350
|
+
var i = oe(e, t, r2);
|
|
1351
|
+
return i > r2 ? r2 : i;
|
|
1389
1352
|
}
|
|
1390
1353
|
function ht() {
|
|
1391
1354
|
return {
|
|
@@ -1399,8 +1362,8 @@
|
|
|
1399
1362
|
return Object.assign({}, ht(), e);
|
|
1400
1363
|
}
|
|
1401
1364
|
function mt(e, t) {
|
|
1402
|
-
return t.reduce(function(r2,
|
|
1403
|
-
return r2[
|
|
1365
|
+
return t.reduce(function(r2, i) {
|
|
1366
|
+
return r2[i] = e, r2;
|
|
1404
1367
|
}, {});
|
|
1405
1368
|
}
|
|
1406
1369
|
var Zt = function(t, r2) {
|
|
@@ -1409,14 +1372,14 @@
|
|
|
1409
1372
|
})) : t, gt(typeof t != "number" ? t : mt(t, le));
|
|
1410
1373
|
};
|
|
1411
1374
|
function er(e) {
|
|
1412
|
-
var t, r2 = e.state,
|
|
1375
|
+
var t, r2 = e.state, i = e.name, n = e.options, o2 = r2.elements.arrow, l2 = r2.modifiersData.popperOffsets, s2 = H(r2.placement), a2 = Te(s2), f2 = [D, M].indexOf(s2) >= 0, c2 = f2 ? "height" : "width";
|
|
1413
1376
|
if (!(!o2 || !l2)) {
|
|
1414
1377
|
var h2 = Zt(n.padding, r2), y2 = Be(o2), u2 = a2 === "y" ? k : D, b2 = a2 === "y" ? S : M, v2 = r2.rects.reference[c2] + r2.rects.reference[a2] - l2[a2] - r2.rects.popper[c2], d2 = l2[a2] - r2.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;
|
|
1415
|
-
r2.modifiersData[
|
|
1378
|
+
r2.modifiersData[i] = (t = {}, t[L2] = x2, t.centerOffset = x2 - m2, t);
|
|
1416
1379
|
}
|
|
1417
1380
|
}
|
|
1418
1381
|
function tr(e) {
|
|
1419
|
-
var t = e.state, r2 = e.options,
|
|
1382
|
+
var t = e.state, r2 = e.options, i = r2.element, n = i === void 0 ? "[data-popper-arrow]" : i;
|
|
1420
1383
|
n != null && (typeof n == "string" && (n = t.elements.popper.querySelector(n), !n) || vt(t.elements.popper, n) && (t.elements.arrow = n));
|
|
1421
1384
|
}
|
|
1422
1385
|
const rr = {
|
|
@@ -1438,14 +1401,14 @@
|
|
|
1438
1401
|
left: "auto"
|
|
1439
1402
|
};
|
|
1440
1403
|
function nr(e, t) {
|
|
1441
|
-
var r2 = e.x,
|
|
1404
|
+
var r2 = e.x, i = e.y, n = t.devicePixelRatio || 1;
|
|
1442
1405
|
return {
|
|
1443
1406
|
x: Z(r2 * n) / n || 0,
|
|
1444
|
-
y: Z(
|
|
1407
|
+
y: Z(i * n) / n || 0
|
|
1445
1408
|
};
|
|
1446
1409
|
}
|
|
1447
1410
|
function Qe(e) {
|
|
1448
|
-
var t, r2 = e.popper,
|
|
1411
|
+
var t, r2 = 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({
|
|
1449
1412
|
x: u2,
|
|
1450
1413
|
y: v2
|
|
1451
1414
|
}) : {
|
|
@@ -1462,7 +1425,7 @@
|
|
|
1462
1425
|
// $FlowFixMe[prop-missing]
|
|
1463
1426
|
m2[x2]
|
|
1464
1427
|
);
|
|
1465
|
-
v2 -= P2 -
|
|
1428
|
+
v2 -= P2 - i.height, v2 *= a2 ? 1 : -1;
|
|
1466
1429
|
}
|
|
1467
1430
|
if (n === D || (n === k || n === S) && o2 === se) {
|
|
1468
1431
|
E2 = M;
|
|
@@ -1470,7 +1433,7 @@
|
|
|
1470
1433
|
// $FlowFixMe[prop-missing]
|
|
1471
1434
|
m2[L2]
|
|
1472
1435
|
);
|
|
1473
|
-
u2 -= A2 -
|
|
1436
|
+
u2 -= A2 - i.width, u2 *= a2 ? 1 : -1;
|
|
1474
1437
|
}
|
|
1475
1438
|
}
|
|
1476
1439
|
var $2 = Object.assign({
|
|
@@ -1489,7 +1452,7 @@
|
|
|
1489
1452
|
return Object.assign({}, $2, (t = {}, t[p2] = O2 ? v2 + "px" : "", t[E2] = w2 ? u2 + "px" : "", t.transform = "", t));
|
|
1490
1453
|
}
|
|
1491
1454
|
function or(e) {
|
|
1492
|
-
var t = e.state, r2 = e.options,
|
|
1455
|
+
var t = e.state, r2 = e.options, i = r2.gpuAcceleration, n = i === void 0 ? true : i, o2 = r2.adaptive, l2 = o2 === void 0 ? true : o2, s2 = r2.roundOffsets, a2 = s2 === void 0 ? true : s2, f2 = {
|
|
1493
1456
|
placement: H(t.placement),
|
|
1494
1457
|
variation: te(t.placement),
|
|
1495
1458
|
popper: t.elements.popper,
|
|
@@ -1522,7 +1485,7 @@
|
|
|
1522
1485
|
passive: true
|
|
1523
1486
|
};
|
|
1524
1487
|
function sr(e) {
|
|
1525
|
-
var t = e.state, r2 = e.instance,
|
|
1488
|
+
var t = e.state, r2 = 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);
|
|
1526
1489
|
return o2 && f2.forEach(function(c2) {
|
|
1527
1490
|
c2.addEventListener("scroll", r2.update, ge);
|
|
1528
1491
|
}), s2 && a2.addEventListener("resize", r2.update, ge), function() {
|
|
@@ -1561,17 +1524,17 @@
|
|
|
1561
1524
|
});
|
|
1562
1525
|
}
|
|
1563
1526
|
function Se(e) {
|
|
1564
|
-
var t = B(e), r2 = t.pageXOffset,
|
|
1527
|
+
var t = B(e), r2 = t.pageXOffset, i = t.pageYOffset;
|
|
1565
1528
|
return {
|
|
1566
1529
|
scrollLeft: r2,
|
|
1567
|
-
scrollTop:
|
|
1530
|
+
scrollTop: i
|
|
1568
1531
|
};
|
|
1569
1532
|
}
|
|
1570
1533
|
function Me(e) {
|
|
1571
1534
|
return ee(F(e)).left + Se(e).scrollLeft;
|
|
1572
1535
|
}
|
|
1573
1536
|
function ur(e, t) {
|
|
1574
|
-
var r2 = B(e),
|
|
1537
|
+
var r2 = B(e), i = F(e), n = r2.visualViewport, o2 = i.clientWidth, l2 = i.clientHeight, s2 = 0, a2 = 0;
|
|
1575
1538
|
if (n) {
|
|
1576
1539
|
o2 = n.width, l2 = n.height;
|
|
1577
1540
|
var f2 = dt();
|
|
@@ -1585,7 +1548,7 @@
|
|
|
1585
1548
|
};
|
|
1586
1549
|
}
|
|
1587
1550
|
function pr(e) {
|
|
1588
|
-
var t, r2 = F(e),
|
|
1551
|
+
var t, r2 = F(e), i = Se(e), n = (t = e.ownerDocument) == null ? void 0 : t.body, o2 = _(r2.scrollWidth, r2.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), l2 = _(r2.scrollHeight, r2.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), s2 = -i.scrollLeft + Me(e), a2 = -i.scrollTop;
|
|
1589
1552
|
return I(n || r2).direction === "rtl" && (s2 += _(r2.clientWidth, n ? n.clientWidth : 0) - o2), {
|
|
1590
1553
|
width: o2,
|
|
1591
1554
|
height: l2,
|
|
@@ -1594,8 +1557,8 @@
|
|
|
1594
1557
|
};
|
|
1595
1558
|
}
|
|
1596
1559
|
function We(e) {
|
|
1597
|
-
var t = I(e), r2 = t.overflow,
|
|
1598
|
-
return /auto|scroll|overlay|hidden/.test(r2 + n +
|
|
1560
|
+
var t = I(e), r2 = t.overflow, i = t.overflowX, n = t.overflowY;
|
|
1561
|
+
return /auto|scroll|overlay|hidden/.test(r2 + n + i);
|
|
1599
1562
|
}
|
|
1600
1563
|
function yt(e) {
|
|
1601
1564
|
return ["html", "body", "#document"].indexOf(N(e)) >= 0 ? e.ownerDocument.body : T(e) && We(e) ? e : yt(we(e));
|
|
@@ -1603,7 +1566,7 @@
|
|
|
1603
1566
|
function ae(e, t) {
|
|
1604
1567
|
var r2;
|
|
1605
1568
|
t === void 0 && (t = []);
|
|
1606
|
-
var
|
|
1569
|
+
var i = yt(e), n = i === ((r2 = e.ownerDocument) == null ? void 0 : r2.body), o2 = B(i), l2 = n ? [o2].concat(o2.visualViewport || [], We(i) ? i : []) : i, s2 = t.concat(l2);
|
|
1607
1570
|
return n ? s2 : (
|
|
1608
1571
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1609
1572
|
s2.concat(ae(we(l2)))
|
|
@@ -1625,20 +1588,20 @@
|
|
|
1625
1588
|
return t === ut ? $e(ur(e, r2)) : K(t) ? dr(t, r2) : $e(pr(F(e)));
|
|
1626
1589
|
}
|
|
1627
1590
|
function vr(e) {
|
|
1628
|
-
var t = ae(we(e)), r2 = ["absolute", "fixed"].indexOf(I(e).position) >= 0,
|
|
1629
|
-
return K(
|
|
1630
|
-
return K(n) && vt(n,
|
|
1591
|
+
var t = ae(we(e)), r2 = ["absolute", "fixed"].indexOf(I(e).position) >= 0, i = r2 && T(e) ? fe(e) : e;
|
|
1592
|
+
return K(i) ? t.filter(function(n) {
|
|
1593
|
+
return K(n) && vt(n, i) && N(n) !== "body";
|
|
1631
1594
|
}) : [];
|
|
1632
1595
|
}
|
|
1633
|
-
function hr(e, t, r2,
|
|
1596
|
+
function hr(e, t, r2, i) {
|
|
1634
1597
|
var n = t === "clippingParents" ? vr(e) : [].concat(t), o2 = [].concat(n, [r2]), l2 = o2[0], s2 = o2.reduce(function(a2, f2) {
|
|
1635
|
-
var c2 = et(e, f2,
|
|
1598
|
+
var c2 = et(e, f2, i);
|
|
1636
1599
|
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;
|
|
1637
|
-
}, et(e, l2,
|
|
1600
|
+
}, et(e, l2, i));
|
|
1638
1601
|
return s2.width = s2.right - s2.left, s2.height = s2.bottom - s2.top, s2.x = s2.left, s2.y = s2.top, s2;
|
|
1639
1602
|
}
|
|
1640
1603
|
function wt(e) {
|
|
1641
|
-
var t = e.reference, r2 = e.element,
|
|
1604
|
+
var t = e.reference, r2 = e.element, i = e.placement, n = i ? H(i) : null, o2 = i ? te(i) : null, l2 = t.x + t.width / 2 - r2.width / 2, s2 = t.y + t.height / 2 - r2.height / 2, a2;
|
|
1642
1605
|
switch (n) {
|
|
1643
1606
|
case k:
|
|
1644
1607
|
a2 = {
|
|
@@ -1686,7 +1649,7 @@
|
|
|
1686
1649
|
}
|
|
1687
1650
|
function ce(e, t) {
|
|
1688
1651
|
t === void 0 && (t = {});
|
|
1689
|
-
var r2 = t,
|
|
1652
|
+
var r2 = t, i = r2.placement, n = i === void 0 ? e.placement : i, o2 = r2.strategy, l2 = o2 === void 0 ? e.strategy : o2, s2 = r2.boundary, a2 = s2 === void 0 ? Mt : s2, f2 = r2.rootBoundary, c2 = f2 === void 0 ? ut : f2, h2 = r2.elementContext, y2 = h2 === void 0 ? ne : h2, u2 = r2.altBoundary, b2 = u2 === void 0 ? false : u2, v2 = r2.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 = hr(K(p2) ? p2 : p2.contextElement || F(e.elements.popper), a2, c2, l2), m2 = ee(e.elements.reference), x2 = wt({
|
|
1690
1653
|
reference: m2,
|
|
1691
1654
|
element: E2,
|
|
1692
1655
|
strategy: "absolute",
|
|
@@ -1708,7 +1671,7 @@
|
|
|
1708
1671
|
}
|
|
1709
1672
|
function gr(e, t) {
|
|
1710
1673
|
t === void 0 && (t = {});
|
|
1711
|
-
var r2 = t,
|
|
1674
|
+
var r2 = t, i = r2.placement, n = r2.boundary, o2 = r2.rootBoundary, l2 = r2.padding, s2 = r2.flipVariations, a2 = r2.allowedAutoPlacements, f2 = a2 === void 0 ? pt : a2, c2 = te(i), h2 = c2 ? s2 ? Ge : Ge.filter(function(b2) {
|
|
1712
1675
|
return te(b2) === c2;
|
|
1713
1676
|
}) : le, y2 = h2.filter(function(b2) {
|
|
1714
1677
|
return f2.indexOf(b2) >= 0;
|
|
@@ -1733,8 +1696,8 @@
|
|
|
1733
1696
|
return [Ze(e), t, Ze(t)];
|
|
1734
1697
|
}
|
|
1735
1698
|
function yr(e) {
|
|
1736
|
-
var t = e.state, r2 = e.options,
|
|
1737
|
-
if (!t.modifiersData[
|
|
1699
|
+
var t = e.state, r2 = e.options, i = e.name;
|
|
1700
|
+
if (!t.modifiersData[i]._skip) {
|
|
1738
1701
|
for (var n = r2.mainAxis, o2 = n === void 0 ? true : n, l2 = r2.altAxis, s2 = l2 === void 0 ? true : l2, a2 = r2.fallbackPlacements, f2 = r2.padding, c2 = r2.boundary, h2 = r2.rootBoundary, y2 = r2.altBoundary, u2 = r2.flipVariations, b2 = u2 === void 0 ? true : u2, v2 = r2.allowedAutoPlacements, d2 = t.options.placement, w2 = H(d2), O2 = w2 === d2, E2 = a2 || (O2 || !b2 ? [me(d2)] : mr(d2)), p2 = [d2].concat(E2).reduce(function(G2, V2) {
|
|
1739
1702
|
return G2.concat(H(V2) === De ? gr(t, {
|
|
1740
1703
|
placement: V2,
|
|
@@ -1778,7 +1741,7 @@
|
|
|
1778
1741
|
if (de === "break")
|
|
1779
1742
|
break;
|
|
1780
1743
|
}
|
|
1781
|
-
t.placement !== P2 && (t.modifiersData[
|
|
1744
|
+
t.placement !== P2 && (t.modifiersData[i]._skip = true, t.placement = P2, t.reset = true);
|
|
1782
1745
|
}
|
|
1783
1746
|
}
|
|
1784
1747
|
const wr = {
|
|
@@ -1808,11 +1771,11 @@
|
|
|
1808
1771
|
});
|
|
1809
1772
|
}
|
|
1810
1773
|
function br(e) {
|
|
1811
|
-
var t = e.state, r2 = e.name,
|
|
1774
|
+
var t = e.state, r2 = e.name, i = t.rects.reference, n = t.rects.popper, o2 = t.modifiersData.preventOverflow, l2 = ce(t, {
|
|
1812
1775
|
elementContext: "reference"
|
|
1813
1776
|
}), s2 = ce(t, {
|
|
1814
1777
|
altBoundary: true
|
|
1815
|
-
}), a2 = tt(l2,
|
|
1778
|
+
}), a2 = tt(l2, i), f2 = tt(s2, n, o2), c2 = rt(a2), h2 = rt(f2);
|
|
1816
1779
|
t.modifiersData[r2] = {
|
|
1817
1780
|
referenceClippingOffsets: a2,
|
|
1818
1781
|
popperEscapeOffsets: f2,
|
|
@@ -1831,10 +1794,10 @@
|
|
|
1831
1794
|
fn: br
|
|
1832
1795
|
};
|
|
1833
1796
|
function Or(e, t, r2) {
|
|
1834
|
-
var
|
|
1797
|
+
var i = H(e), n = [D, k].indexOf(i) >= 0 ? -1 : 1, o2 = typeof r2 == "function" ? r2(Object.assign({}, t, {
|
|
1835
1798
|
placement: e
|
|
1836
1799
|
})) : r2, l2 = o2[0], s2 = o2[1];
|
|
1837
|
-
return l2 = l2 || 0, s2 = (s2 || 0) * n, [D, M].indexOf(
|
|
1800
|
+
return l2 = l2 || 0, s2 = (s2 || 0) * n, [D, M].indexOf(i) >= 0 ? {
|
|
1838
1801
|
x: s2,
|
|
1839
1802
|
y: l2
|
|
1840
1803
|
} : {
|
|
@@ -1843,10 +1806,10 @@
|
|
|
1843
1806
|
};
|
|
1844
1807
|
}
|
|
1845
1808
|
function Er(e) {
|
|
1846
|
-
var t = e.state, r2 = e.options,
|
|
1809
|
+
var t = e.state, r2 = e.options, i = e.name, n = r2.offset, o2 = n === void 0 ? [0, 0] : n, l2 = pt.reduce(function(c2, h2) {
|
|
1847
1810
|
return c2[h2] = Or(h2, t.rects, o2), c2;
|
|
1848
1811
|
}, {}), s2 = l2[t.placement], a2 = s2.x, f2 = s2.y;
|
|
1849
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a2, t.modifiersData.popperOffsets.y += f2), t.modifiersData[
|
|
1812
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a2, t.modifiersData.popperOffsets.y += f2), t.modifiersData[i] = l2;
|
|
1850
1813
|
}
|
|
1851
1814
|
const Ar = {
|
|
1852
1815
|
name: "offset",
|
|
@@ -1875,7 +1838,7 @@
|
|
|
1875
1838
|
return e === "x" ? "y" : "x";
|
|
1876
1839
|
}
|
|
1877
1840
|
function Cr(e) {
|
|
1878
|
-
var t = e.state, r2 = e.options,
|
|
1841
|
+
var t = e.state, r2 = e.options, i = e.name, n = r2.mainAxis, o2 = n === void 0 ? true : n, l2 = r2.altAxis, s2 = l2 === void 0 ? false : l2, a2 = r2.boundary, f2 = r2.rootBoundary, c2 = r2.altBoundary, h2 = r2.padding, y2 = r2.tether, u2 = y2 === void 0 ? true : y2, b2 = r2.tetherOffset, v2 = b2 === void 0 ? 0 : b2, d2 = ce(t, {
|
|
1879
1842
|
boundary: a2,
|
|
1880
1843
|
rootBoundary: f2,
|
|
1881
1844
|
padding: h2,
|
|
@@ -1904,7 +1867,7 @@
|
|
|
1904
1867
|
var Ie, Lt = p2 === "x" ? k : D, $t = p2 === "x" ? S : M, U2 = m2[g2], he = g2 === "y" ? "height" : "width", Ve = U2 + d2[Lt], Fe = U2 - d2[$t], Ee = [k, D].indexOf(w2) !== -1, qe = (Ie = $2 == null ? void 0 : $2[g2]) != null ? Ie : 0, Xe = Ee ? Ve : U2 - x2[he] - L2[he] - qe + A2.altAxis, Ye = Ee ? U2 + x2[he] + L2[he] - qe - A2.altAxis : Fe, ze = u2 && Ee ? Qt(Xe, U2, Ye) : oe(u2 ? Xe : Ve, U2, u2 ? Ye : Fe);
|
|
1905
1868
|
m2[g2] = ze, W2[g2] = ze - U2;
|
|
1906
1869
|
}
|
|
1907
|
-
t.modifiersData[
|
|
1870
|
+
t.modifiersData[i] = W2;
|
|
1908
1871
|
}
|
|
1909
1872
|
}
|
|
1910
1873
|
const kr = {
|
|
@@ -1924,19 +1887,19 @@
|
|
|
1924
1887
|
return e === B(e) || !T(e) ? Se(e) : Dr(e);
|
|
1925
1888
|
}
|
|
1926
1889
|
function Br(e) {
|
|
1927
|
-
var t = e.getBoundingClientRect(), r2 = Z(t.width) / e.offsetWidth || 1,
|
|
1928
|
-
return r2 !== 1 ||
|
|
1890
|
+
var t = e.getBoundingClientRect(), r2 = Z(t.width) / e.offsetWidth || 1, i = Z(t.height) / e.offsetHeight || 1;
|
|
1891
|
+
return r2 !== 1 || i !== 1;
|
|
1929
1892
|
}
|
|
1930
1893
|
function Tr(e, t, r2) {
|
|
1931
1894
|
r2 === void 0 && (r2 = false);
|
|
1932
|
-
var
|
|
1895
|
+
var i = T(t), n = T(t) && Br(t), o2 = F(t), l2 = ee(e, n, r2), s2 = {
|
|
1933
1896
|
scrollLeft: 0,
|
|
1934
1897
|
scrollTop: 0
|
|
1935
1898
|
}, a2 = {
|
|
1936
1899
|
x: 0,
|
|
1937
1900
|
y: 0
|
|
1938
1901
|
};
|
|
1939
|
-
return (
|
|
1902
|
+
return (i || !i && !r2) && ((N(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1940
1903
|
We(o2)) && (s2 = Rr(t)), T(t) ? (a2 = ee(t, true), a2.x += t.clientLeft, a2.y += t.clientTop) : o2 && (a2.x = Me(o2))), {
|
|
1941
1904
|
x: l2.left + s2.scrollLeft - a2.x,
|
|
1942
1905
|
y: l2.top + s2.scrollTop - a2.y,
|
|
@@ -1945,7 +1908,7 @@
|
|
|
1945
1908
|
};
|
|
1946
1909
|
}
|
|
1947
1910
|
function Sr(e) {
|
|
1948
|
-
var t = /* @__PURE__ */ new Map(), r2 = /* @__PURE__ */ new Set(),
|
|
1911
|
+
var t = /* @__PURE__ */ new Map(), r2 = /* @__PURE__ */ new Set(), i = [];
|
|
1949
1912
|
e.forEach(function(o2) {
|
|
1950
1913
|
t.set(o2.name, o2);
|
|
1951
1914
|
});
|
|
@@ -1957,17 +1920,17 @@
|
|
|
1957
1920
|
var a2 = t.get(s2);
|
|
1958
1921
|
a2 && n(a2);
|
|
1959
1922
|
}
|
|
1960
|
-
}),
|
|
1923
|
+
}), i.push(o2);
|
|
1961
1924
|
}
|
|
1962
1925
|
return e.forEach(function(o2) {
|
|
1963
1926
|
r2.has(o2.name) || n(o2);
|
|
1964
|
-
}),
|
|
1927
|
+
}), i;
|
|
1965
1928
|
}
|
|
1966
1929
|
function Mr(e) {
|
|
1967
1930
|
var t = Sr(e);
|
|
1968
|
-
return zt.reduce(function(r2,
|
|
1931
|
+
return zt.reduce(function(r2, i) {
|
|
1969
1932
|
return r2.concat(t.filter(function(n) {
|
|
1970
|
-
return n.phase ===
|
|
1933
|
+
return n.phase === i;
|
|
1971
1934
|
}));
|
|
1972
1935
|
}, []);
|
|
1973
1936
|
}
|
|
@@ -1982,12 +1945,12 @@
|
|
|
1982
1945
|
};
|
|
1983
1946
|
}
|
|
1984
1947
|
function jr(e) {
|
|
1985
|
-
var t = e.reduce(function(r2,
|
|
1986
|
-
var n = r2[
|
|
1987
|
-
return r2[
|
|
1988
|
-
options: Object.assign({}, n.options,
|
|
1989
|
-
data: Object.assign({}, n.data,
|
|
1990
|
-
}) :
|
|
1948
|
+
var t = e.reduce(function(r2, i) {
|
|
1949
|
+
var n = r2[i.name];
|
|
1950
|
+
return r2[i.name] = n ? Object.assign({}, n, i, {
|
|
1951
|
+
options: Object.assign({}, n.options, i.options),
|
|
1952
|
+
data: Object.assign({}, n.data, i.data)
|
|
1953
|
+
}) : i, r2;
|
|
1991
1954
|
}, {});
|
|
1992
1955
|
return Object.keys(t).map(function(r2) {
|
|
1993
1956
|
return t[r2];
|
|
@@ -2001,13 +1964,13 @@
|
|
|
2001
1964
|
function nt() {
|
|
2002
1965
|
for (var e = arguments.length, t = new Array(e), r2 = 0; r2 < e; r2++)
|
|
2003
1966
|
t[r2] = arguments[r2];
|
|
2004
|
-
return !t.some(function(
|
|
2005
|
-
return !(
|
|
1967
|
+
return !t.some(function(i) {
|
|
1968
|
+
return !(i && typeof i.getBoundingClientRect == "function");
|
|
2006
1969
|
});
|
|
2007
1970
|
}
|
|
2008
1971
|
function Hr(e) {
|
|
2009
1972
|
e === void 0 && (e = {});
|
|
2010
|
-
var t = e, r2 = t.defaultModifiers,
|
|
1973
|
+
var t = e, r2 = t.defaultModifiers, i = r2 === void 0 ? [] : r2, n = t.defaultOptions, o2 = n === void 0 ? it : n;
|
|
2011
1974
|
return function(s2, a2, f2) {
|
|
2012
1975
|
f2 === void 0 && (f2 = o2);
|
|
2013
1976
|
var c2 = {
|
|
@@ -2029,7 +1992,7 @@
|
|
|
2029
1992
|
reference: K(s2) ? ae(s2) : s2.contextElement ? ae(s2.contextElement) : [],
|
|
2030
1993
|
popper: ae(a2)
|
|
2031
1994
|
};
|
|
2032
|
-
var E2 = Mr(jr([].concat(
|
|
1995
|
+
var E2 = Mr(jr([].concat(i, c2.options.modifiers)));
|
|
2033
1996
|
return c2.orderedModifiers = E2.filter(function(p2) {
|
|
2034
1997
|
return p2.enabled;
|
|
2035
1998
|
}), b2(), u2.update();
|
|
@@ -2113,8 +2076,8 @@
|
|
|
2113
2076
|
const t = this.collection.findIndex((r2) => r2.id === e.id);
|
|
2114
2077
|
if (t >= 0) {
|
|
2115
2078
|
const r2 = this.collection[t];
|
|
2116
|
-
r2.state === "opened" && r2.close(), r2.popper.destroy(), bt(r2), Object.getOwnPropertyNames(r2).forEach((
|
|
2117
|
-
delete r2[
|
|
2079
|
+
r2.state === "opened" && r2.close(), r2.popper.destroy(), bt(r2), Object.getOwnPropertyNames(r2).forEach((i) => {
|
|
2080
|
+
delete r2[i];
|
|
2118
2081
|
}), this.collection.splice(t, 1);
|
|
2119
2082
|
}
|
|
2120
2083
|
return this.collection;
|
|
@@ -2122,8 +2085,8 @@
|
|
|
2122
2085
|
function bt(e) {
|
|
2123
2086
|
return e.__eventListeners && (e.__eventListeners.forEach((t) => {
|
|
2124
2087
|
t.el.forEach((r2) => {
|
|
2125
|
-
t.type.forEach((
|
|
2126
|
-
e[r2].removeEventListener(
|
|
2088
|
+
t.type.forEach((i) => {
|
|
2089
|
+
e[r2].removeEventListener(i, t.listener, false);
|
|
2127
2090
|
});
|
|
2128
2091
|
});
|
|
2129
2092
|
}), delete e.__eventListeners), e;
|
|
@@ -2140,7 +2103,7 @@
|
|
|
2140
2103
|
}
|
|
2141
2104
|
async function Vr(e, t) {
|
|
2142
2105
|
Ce.call(this, e);
|
|
2143
|
-
const r2 = this,
|
|
2106
|
+
const r2 = this, i = {
|
|
2144
2107
|
open() {
|
|
2145
2108
|
return je.call(r2, this);
|
|
2146
2109
|
},
|
|
@@ -2157,7 +2120,7 @@
|
|
|
2157
2120
|
trigger: t,
|
|
2158
2121
|
popper: Ir(t, e),
|
|
2159
2122
|
config: ot(e, this.settings),
|
|
2160
|
-
...
|
|
2123
|
+
...i
|
|
2161
2124
|
};
|
|
2162
2125
|
return n.trigger.hasAttribute("aria-controls") && n.trigger.setAttribute("aria-expanded", "false"), xt.call(this, n), this.collection.push(n), n.el.classList.contains(this.settings.stateActive) && (await n.open(), ft.call(this, n)), n;
|
|
2163
2126
|
}
|
|
@@ -2171,9 +2134,9 @@
|
|
|
2171
2134
|
type: ["mouseleave", "focusout"],
|
|
2172
2135
|
listener: lt.bind(this, e)
|
|
2173
2136
|
}], e.__eventListeners.forEach((r2) => {
|
|
2174
|
-
r2.el.forEach((
|
|
2137
|
+
r2.el.forEach((i) => {
|
|
2175
2138
|
r2.type.forEach((n) => {
|
|
2176
|
-
e[
|
|
2139
|
+
e[i].addEventListener(n, r2.listener, false);
|
|
2177
2140
|
});
|
|
2178
2141
|
});
|
|
2179
2142
|
})) : (e.__eventListeners = [{
|
|
@@ -2181,9 +2144,9 @@
|
|
|
2181
2144
|
type: ["click"],
|
|
2182
2145
|
listener: Tt.bind(this, e)
|
|
2183
2146
|
}], e.__eventListeners.forEach((r2) => {
|
|
2184
|
-
r2.el.forEach((
|
|
2147
|
+
r2.el.forEach((i) => {
|
|
2185
2148
|
r2.type.forEach((n) => {
|
|
2186
|
-
e[
|
|
2149
|
+
e[i].addEventListener(n, r2.listener, false);
|
|
2187
2150
|
});
|
|
2188
2151
|
});
|
|
2189
2152
|
}))), e;
|
|
@@ -2197,29 +2160,29 @@
|
|
|
2197
2160
|
}
|
|
2198
2161
|
async init(r2) {
|
|
2199
2162
|
r2 && (this.settings = { ...this.settings, ...r2 });
|
|
2200
|
-
const
|
|
2201
|
-
return await this.registerCollection(
|
|
2163
|
+
const i = document.querySelectorAll(this.settings.selectorPopover);
|
|
2164
|
+
return await this.registerCollection(i), this.settings.eventListeners && this.initEventListeners(false), this;
|
|
2202
2165
|
}
|
|
2203
2166
|
async destroy() {
|
|
2204
2167
|
return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(false), this;
|
|
2205
2168
|
}
|
|
2206
2169
|
initEventListeners(r2 = true) {
|
|
2207
|
-
r2 && this.collection.forEach((
|
|
2208
|
-
xt.call(this,
|
|
2170
|
+
r2 && this.collection.forEach((i) => {
|
|
2171
|
+
xt.call(this, i);
|
|
2209
2172
|
}), document.addEventListener("keydown", Ae(this, J), false);
|
|
2210
2173
|
}
|
|
2211
2174
|
destroyEventListeners(r2 = true) {
|
|
2212
|
-
r2 && this.collection.forEach((
|
|
2213
|
-
bt(
|
|
2175
|
+
r2 && this.collection.forEach((i) => {
|
|
2176
|
+
bt(i);
|
|
2214
2177
|
}), document.removeEventListener("keydown", Ae(this, J), false);
|
|
2215
2178
|
}
|
|
2216
2179
|
register(r2) {
|
|
2217
|
-
const
|
|
2218
|
-
return
|
|
2180
|
+
const i = Bt.call(this, r2);
|
|
2181
|
+
return i.error ? Promise.reject(i.error) : Vr.call(this, i.popover, i.trigger);
|
|
2219
2182
|
}
|
|
2220
2183
|
deregister(r2) {
|
|
2221
|
-
const
|
|
2222
|
-
return Ce.call(this,
|
|
2184
|
+
const i = this.get(st.call(this, r2));
|
|
2185
|
+
return Ce.call(this, i);
|
|
2223
2186
|
}
|
|
2224
2187
|
open(r2) {
|
|
2225
2188
|
return je.call(this, r2);
|
|
@@ -2229,7 +2192,6 @@
|
|
|
2229
2192
|
}
|
|
2230
2193
|
}
|
|
2231
2194
|
J = /* @__PURE__ */ new WeakMap();
|
|
2232
|
-
exports2.Checkbox = r$2;
|
|
2233
2195
|
exports2.Drawer = it$1;
|
|
2234
2196
|
exports2.Modal = U;
|
|
2235
2197
|
exports2.Popover = qr;
|