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