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