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