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