@vonage/vivid 5.8.0 → 5.10.0
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/bundled/affix.js +1 -1
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/data-grid.options.cjs +1 -0
- package/bundled/data-grid.options.js +29 -0
- package/bundled/definition10.js +4 -4
- package/bundled/definition2.cjs +1 -1
- package/bundled/definition2.js +1 -1
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition7.js +3 -3
- package/bundled/definition9.cjs +9 -9
- package/bundled/definition9.js +113 -1342
- package/bundled/floating-ui.dom.cjs +1 -0
- package/bundled/floating-ui.dom.js +1242 -0
- package/bundled/host-semantics.js +4 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +21 -16
- package/bundled/mixins.cjs +2 -2
- package/bundled/mixins.js +6 -6
- package/bundled/slottable-request.cjs +4 -0
- package/bundled/slottable-request.js +2907 -0
- package/bundled/vivid-element.cjs +3 -3
- package/bundled/vivid-element.js +89 -69
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/card/index.cjs +10 -10
- package/card/index.js +42 -42
- package/combobox/definition.cjs +14 -15
- package/combobox/definition.js +15 -16
- package/combobox/index.cjs +4 -4
- package/combobox/index.js +82 -87
- package/country/definition.cjs +340 -0
- package/country/definition.js +334 -0
- package/country/index.cjs +12 -0
- package/country/index.js +317 -0
- package/custom-elements.json +4835 -613
- package/data-grid/definition.cjs +23 -49
- package/data-grid/definition.js +1 -27
- package/data-grid/index.cjs +27 -27
- package/data-grid/index.js +44 -64
- package/file-picker/definition.cjs +10 -8
- package/file-picker/definition.js +10 -8
- package/file-picker/index.cjs +5 -5
- package/file-picker/index.js +12 -12
- package/icon/definition.cjs +1 -1
- package/icon/definition.js +1 -1
- package/index.cjs +38 -4
- package/index.js +7 -2
- package/lib/components.d.ts +6 -1
- package/lib/country/countries-data.d.ts +6 -0
- package/lib/country/country-code-to-flag-icon.d.ts +5 -0
- package/lib/country/country.d.ts +5 -0
- package/lib/country/country.template.d.ts +3 -0
- package/lib/country/definition.d.ts +3 -0
- package/lib/popover/definition.d.ts +4 -0
- package/lib/popover/locale.d.ts +3 -0
- package/lib/popover/popover.d.ts +781 -0
- package/lib/popover/popover.template.d.ts +3 -0
- package/lib/rich-text-editor/locale.d.ts +2 -0
- package/lib/rich-text-editor/popover.d.ts +1 -0
- package/lib/rich-text-editor/rte/config.d.ts +5 -1
- package/lib/rich-text-editor/rte/document.d.ts +2 -0
- package/lib/rich-text-editor/rte/exports.d.ts +5 -0
- package/lib/rich-text-editor/rte/feature.d.ts +7 -1
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/input-rules.d.ts +15 -0
- package/lib/rich-text-editor/rte/instance.d.ts +4 -2
- package/lib/rich-text-editor/rte/utils/feature-state.d.ts +8 -0
- package/lib/rich-text-editor/rte/utils/text-before-cursor.d.ts +2 -0
- package/lib/rich-text-editor/rte/utils/ui.d.ts +2 -0
- package/lib/rich-text-editor/rte/view.d.ts +30 -0
- package/lib/rich-text-view/definition.d.ts +5 -0
- package/lib/rich-text-view/rich-text-view.d.ts +19 -0
- package/lib/rich-text-view/rich-text-view.template.d.ts +3 -0
- package/lib/selectable-box/selectable-box.d.ts +1 -0
- package/lib/status/definition.d.ts +4 -0
- package/lib/status/status.d.ts +388 -0
- package/lib/status/status.template.d.ts +3 -0
- package/lib/table/definition.d.ts +8 -0
- package/lib/table/table-body.d.ts +3 -0
- package/lib/table/table-body.template.d.ts +3 -0
- package/lib/table/table-cell.d.ts +381 -0
- package/lib/table/table-cell.template.d.ts +3 -0
- package/lib/table/table-head.d.ts +3 -0
- package/lib/table/table-head.template.d.ts +3 -0
- package/lib/table/table-header-cell.d.ts +381 -0
- package/lib/table/table-header-cell.template.d.ts +3 -0
- package/lib/table/table-row.d.ts +381 -0
- package/lib/table/table-row.template.d.ts +3 -0
- package/lib/table/table.d.ts +3 -0
- package/lib/table/table.template.d.ts +3 -0
- package/lib/tag/tag.d.ts +1 -1
- package/lib/tag-name-map.d.ts +11 -1
- package/locales/de-DE.cjs +6 -1
- package/locales/de-DE.js +6 -1
- package/locales/en-GB.cjs +6 -1
- package/locales/en-GB.js +6 -1
- package/locales/en-US.cjs +6 -1
- package/locales/en-US.js +6 -1
- package/locales/ja-JP.cjs +6 -1
- package/locales/ja-JP.js +6 -1
- package/locales/zh-CN.cjs +6 -1
- package/locales/zh-CN.js +6 -1
- package/package.json +10 -9
- package/popover/definition.cjs +363 -0
- package/popover/definition.js +357 -0
- package/popover/index.cjs +27 -0
- package/popover/index.js +263 -0
- package/rich-text-editor/definition.cjs +12125 -14657
- package/rich-text-editor/definition.js +8876 -11412
- package/rich-text-editor/index.cjs +20 -22
- package/rich-text-editor/index.js +5046 -7096
- package/rich-text-view/definition.cjs +171 -0
- package/rich-text-view/definition.js +165 -0
- package/rich-text-view/index.cjs +1 -0
- package/rich-text-view/index.js +103 -0
- package/selectable-box/definition.cjs +16 -5
- package/selectable-box/definition.js +16 -5
- package/selectable-box/index.cjs +11 -9
- package/selectable-box/index.js +86 -78
- package/shared/localization/Locale.d.ts +2 -0
- package/shared/utils/slottable-request.d.ts +7 -0
- package/status/definition.cjs +76 -0
- package/status/definition.js +70 -0
- package/status/index.cjs +11 -0
- package/status/index.js +55 -0
- package/styles/core/all.css +2 -2
- package/styles/core/theme.css +2 -2
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/table/definition.cjs +168 -0
- package/table/definition.js +152 -0
- package/table/index.cjs +37 -0
- package/table/index.js +107 -0
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag/index.cjs +24 -24
- package/tag/index.js +89 -89
- package/unbundled/_commonjsHelpers.cjs +26 -0
- package/unbundled/_commonjsHelpers.js +26 -1
- package/unbundled/data-grid.options.cjs +34 -0
- package/unbundled/data-grid.options.js +28 -0
- package/unbundled/definition.cjs +1 -1
- package/unbundled/definition.js +1 -1
- package/unbundled/slottable-request.cjs +3702 -0
- package/unbundled/slottable-request.js +3684 -0
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +11 -1
- package/video-player/definition.js +12 -2
- package/video-player/index.cjs +30 -30
- package/video-player/index.js +705 -702
- package/vivid.api.json +1957 -143
package/bundled/definition9.js
CHANGED
|
@@ -1,1251 +1,22 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { E as
|
|
3
|
-
import { V as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
right: "left",
|
|
13
|
-
bottom: "top",
|
|
14
|
-
top: "bottom"
|
|
15
|
-
}, ae = {
|
|
16
|
-
start: "end",
|
|
17
|
-
end: "start"
|
|
1
|
+
import { B as b, b as f } from "./definition3.js";
|
|
2
|
+
import { E as g, e as v } from "./definition4.js";
|
|
3
|
+
import { V as w, a as l, n as y, o as x, h as c, c as P, d as E } from "./vivid-element.js";
|
|
4
|
+
import { i as $, a as u, f as k, h as C, s as F, b as z, c as V, o as A, d as _, e as D } from "./floating-ui.dom.js";
|
|
5
|
+
import { r as d } from "./ref.js";
|
|
6
|
+
import { w as m } from "./when.js";
|
|
7
|
+
import { c as B } from "./class-names.js";
|
|
8
|
+
var j = Object.defineProperty, s = (r, t, e, o) => {
|
|
9
|
+
for (var a = void 0, p = r.length - 1, h; p >= 0; p--)
|
|
10
|
+
(h = r[p]) && (a = h(t, e, a) || a);
|
|
11
|
+
return a && j(t, e, a), a;
|
|
18
12
|
};
|
|
19
|
-
|
|
20
|
-
return E(t, H(e, n));
|
|
21
|
-
}
|
|
22
|
-
function U(t, e) {
|
|
23
|
-
return typeof t == "function" ? t(e) : t;
|
|
24
|
-
}
|
|
25
|
-
function M(t) {
|
|
26
|
-
return t.split("-")[0];
|
|
27
|
-
}
|
|
28
|
-
function W(t) {
|
|
29
|
-
return t.split("-")[1];
|
|
30
|
-
}
|
|
31
|
-
function _t(t) {
|
|
32
|
-
return t === "x" ? "y" : "x";
|
|
33
|
-
}
|
|
34
|
-
function bt(t) {
|
|
35
|
-
return t === "y" ? "height" : "width";
|
|
36
|
-
}
|
|
37
|
-
const fe = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
38
|
-
function z(t) {
|
|
39
|
-
return fe.has(M(t)) ? "y" : "x";
|
|
40
|
-
}
|
|
41
|
-
function vt(t) {
|
|
42
|
-
return _t(z(t));
|
|
43
|
-
}
|
|
44
|
-
function Nt(t, e, n) {
|
|
45
|
-
n === void 0 && (n = !1);
|
|
46
|
-
const o = W(t), i = vt(t), r = bt(i);
|
|
47
|
-
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
48
|
-
return e.reference[r] > e.floating[r] && (s = ft(s)), [s, ft(s)];
|
|
49
|
-
}
|
|
50
|
-
function ue(t) {
|
|
51
|
-
const e = ft(t);
|
|
52
|
-
return [at(t), e, at(e)];
|
|
53
|
-
}
|
|
54
|
-
function at(t) {
|
|
55
|
-
return t.replace(/start|end/g, (e) => ae[e]);
|
|
56
|
-
}
|
|
57
|
-
const Lt = ["left", "right"], Tt = ["right", "left"], de = ["top", "bottom"], pe = ["bottom", "top"];
|
|
58
|
-
function me(t, e, n) {
|
|
59
|
-
switch (t) {
|
|
60
|
-
case "top":
|
|
61
|
-
case "bottom":
|
|
62
|
-
return n ? e ? Tt : Lt : e ? Lt : Tt;
|
|
63
|
-
case "left":
|
|
64
|
-
case "right":
|
|
65
|
-
return e ? de : pe;
|
|
66
|
-
default:
|
|
67
|
-
return [];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
function he(t, e, n, o) {
|
|
71
|
-
const i = W(t);
|
|
72
|
-
let r = me(M(t), n === "start", o);
|
|
73
|
-
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(at)))), r;
|
|
74
|
-
}
|
|
75
|
-
function ft(t) {
|
|
76
|
-
return t.replace(/left|right|bottom|top/g, (e) => ce[e]);
|
|
77
|
-
}
|
|
78
|
-
function ge(t) {
|
|
79
|
-
return {
|
|
80
|
-
top: 0,
|
|
81
|
-
right: 0,
|
|
82
|
-
bottom: 0,
|
|
83
|
-
left: 0,
|
|
84
|
-
...t
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
function At(t) {
|
|
88
|
-
return typeof t != "number" ? ge(t) : {
|
|
89
|
-
top: t,
|
|
90
|
-
right: t,
|
|
91
|
-
bottom: t,
|
|
92
|
-
left: t
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
function tt(t) {
|
|
96
|
-
const {
|
|
97
|
-
x: e,
|
|
98
|
-
y: n,
|
|
99
|
-
width: o,
|
|
100
|
-
height: i
|
|
101
|
-
} = t;
|
|
102
|
-
return {
|
|
103
|
-
width: o,
|
|
104
|
-
height: i,
|
|
105
|
-
top: n,
|
|
106
|
-
left: e,
|
|
107
|
-
right: e + o,
|
|
108
|
-
bottom: n + i,
|
|
109
|
-
x: e,
|
|
110
|
-
y: n
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
function Dt(t, e, n) {
|
|
114
|
-
let {
|
|
115
|
-
reference: o,
|
|
116
|
-
floating: i
|
|
117
|
-
} = t;
|
|
118
|
-
const r = z(e), s = vt(e), l = bt(s), a = M(e), f = r === "y", u = o.x + o.width / 2 - i.width / 2, c = o.y + o.height / 2 - i.height / 2, p = o[l] / 2 - i[l] / 2;
|
|
119
|
-
let d;
|
|
120
|
-
switch (a) {
|
|
121
|
-
case "top":
|
|
122
|
-
d = {
|
|
123
|
-
x: u,
|
|
124
|
-
y: o.y - i.height
|
|
125
|
-
};
|
|
126
|
-
break;
|
|
127
|
-
case "bottom":
|
|
128
|
-
d = {
|
|
129
|
-
x: u,
|
|
130
|
-
y: o.y + o.height
|
|
131
|
-
};
|
|
132
|
-
break;
|
|
133
|
-
case "right":
|
|
134
|
-
d = {
|
|
135
|
-
x: o.x + o.width,
|
|
136
|
-
y: c
|
|
137
|
-
};
|
|
138
|
-
break;
|
|
139
|
-
case "left":
|
|
140
|
-
d = {
|
|
141
|
-
x: o.x - i.width,
|
|
142
|
-
y: c
|
|
143
|
-
};
|
|
144
|
-
break;
|
|
145
|
-
default:
|
|
146
|
-
d = {
|
|
147
|
-
x: o.x,
|
|
148
|
-
y: o.y
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
switch (W(e)) {
|
|
152
|
-
case "start":
|
|
153
|
-
d[s] -= p * (n && f ? -1 : 1);
|
|
154
|
-
break;
|
|
155
|
-
case "end":
|
|
156
|
-
d[s] += p * (n && f ? -1 : 1);
|
|
157
|
-
break;
|
|
158
|
-
}
|
|
159
|
-
return d;
|
|
160
|
-
}
|
|
161
|
-
const we = async (t, e, n) => {
|
|
162
|
-
const {
|
|
163
|
-
placement: o = "bottom",
|
|
164
|
-
strategy: i = "absolute",
|
|
165
|
-
middleware: r = [],
|
|
166
|
-
platform: s
|
|
167
|
-
} = n, l = r.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
168
|
-
let f = await s.getElementRects({
|
|
169
|
-
reference: t,
|
|
170
|
-
floating: e,
|
|
171
|
-
strategy: i
|
|
172
|
-
}), {
|
|
173
|
-
x: u,
|
|
174
|
-
y: c
|
|
175
|
-
} = Dt(f, o, a), p = o, d = {}, m = 0;
|
|
176
|
-
for (let h = 0; h < l.length; h++) {
|
|
177
|
-
const {
|
|
178
|
-
name: g,
|
|
179
|
-
fn: w
|
|
180
|
-
} = l[h], {
|
|
181
|
-
x,
|
|
182
|
-
y: b,
|
|
183
|
-
data: A,
|
|
184
|
-
reset: v
|
|
185
|
-
} = await w({
|
|
186
|
-
x: u,
|
|
187
|
-
y: c,
|
|
188
|
-
initialPlacement: o,
|
|
189
|
-
placement: p,
|
|
190
|
-
strategy: i,
|
|
191
|
-
middlewareData: d,
|
|
192
|
-
rects: f,
|
|
193
|
-
platform: s,
|
|
194
|
-
elements: {
|
|
195
|
-
reference: t,
|
|
196
|
-
floating: e
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
u = x ?? u, c = b ?? c, d = {
|
|
200
|
-
...d,
|
|
201
|
-
[g]: {
|
|
202
|
-
...d[g],
|
|
203
|
-
...A
|
|
204
|
-
}
|
|
205
|
-
}, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (p = v.placement), v.rects && (f = v.rects === !0 ? await s.getElementRects({
|
|
206
|
-
reference: t,
|
|
207
|
-
floating: e,
|
|
208
|
-
strategy: i
|
|
209
|
-
}) : v.rects), {
|
|
210
|
-
x: u,
|
|
211
|
-
y: c
|
|
212
|
-
} = Dt(f, p, a)), h = -1);
|
|
213
|
-
}
|
|
214
|
-
return {
|
|
215
|
-
x: u,
|
|
216
|
-
y: c,
|
|
217
|
-
placement: p,
|
|
218
|
-
strategy: i,
|
|
219
|
-
middlewareData: d
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
async function et(t, e) {
|
|
223
|
-
var n;
|
|
224
|
-
e === void 0 && (e = {});
|
|
225
|
-
const {
|
|
226
|
-
x: o,
|
|
227
|
-
y: i,
|
|
228
|
-
platform: r,
|
|
229
|
-
rects: s,
|
|
230
|
-
elements: l,
|
|
231
|
-
strategy: a
|
|
232
|
-
} = t, {
|
|
233
|
-
boundary: f = "clippingAncestors",
|
|
234
|
-
rootBoundary: u = "viewport",
|
|
235
|
-
elementContext: c = "floating",
|
|
236
|
-
altBoundary: p = !1,
|
|
237
|
-
padding: d = 0
|
|
238
|
-
} = U(e, t), m = At(d), g = l[p ? c === "floating" ? "reference" : "floating" : c], w = tt(await r.getClippingRect({
|
|
239
|
-
element: (n = await (r.isElement == null ? void 0 : r.isElement(g))) == null || n ? g : g.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
|
|
240
|
-
boundary: f,
|
|
241
|
-
rootBoundary: u,
|
|
242
|
-
strategy: a
|
|
243
|
-
})), x = c === "floating" ? {
|
|
244
|
-
x: o,
|
|
245
|
-
y: i,
|
|
246
|
-
width: s.floating.width,
|
|
247
|
-
height: s.floating.height
|
|
248
|
-
} : s.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), A = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
|
|
249
|
-
x: 1,
|
|
250
|
-
y: 1
|
|
251
|
-
} : {
|
|
252
|
-
x: 1,
|
|
253
|
-
y: 1
|
|
254
|
-
}, v = tt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
255
|
-
elements: l,
|
|
256
|
-
rect: x,
|
|
257
|
-
offsetParent: b,
|
|
258
|
-
strategy: a
|
|
259
|
-
}) : x);
|
|
260
|
-
return {
|
|
261
|
-
top: (w.top - v.top + m.top) / A.y,
|
|
262
|
-
bottom: (v.bottom - w.bottom + m.bottom) / A.y,
|
|
263
|
-
left: (w.left - v.left + m.left) / A.x,
|
|
264
|
-
right: (v.right - w.right + m.right) / A.x
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
const xe = (t) => ({
|
|
268
|
-
name: "arrow",
|
|
269
|
-
options: t,
|
|
270
|
-
async fn(e) {
|
|
271
|
-
const {
|
|
272
|
-
x: n,
|
|
273
|
-
y: o,
|
|
274
|
-
placement: i,
|
|
275
|
-
rects: r,
|
|
276
|
-
platform: s,
|
|
277
|
-
elements: l,
|
|
278
|
-
middlewareData: a
|
|
279
|
-
} = e, {
|
|
280
|
-
element: f,
|
|
281
|
-
padding: u = 0
|
|
282
|
-
} = U(t, e) || {};
|
|
283
|
-
if (f == null)
|
|
284
|
-
return {};
|
|
285
|
-
const c = At(u), p = {
|
|
286
|
-
x: n,
|
|
287
|
-
y: o
|
|
288
|
-
}, d = vt(i), m = bt(d), h = await s.getDimensions(f), g = d === "y", w = g ? "top" : "left", x = g ? "bottom" : "right", b = g ? "clientHeight" : "clientWidth", A = r.reference[m] + r.reference[d] - p[d] - r.floating[m], v = p[d] - r.reference[d], O = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(f));
|
|
289
|
-
let R = O ? O[b] : 0;
|
|
290
|
-
(!R || !await (s.isElement == null ? void 0 : s.isElement(O))) && (R = l.floating[b] || r.floating[m]);
|
|
291
|
-
const F = A / 2 - v / 2, S = R / 2 - h[m] / 2 - 1, y = H(c[w], S), C = H(c[x], S), L = y, T = R - h[m] - C, P = R / 2 - h[m] / 2 + F, V = xt(L, P, T), B = !a.arrow && W(i) != null && P !== V && r.reference[m] / 2 - (P < L ? y : C) - h[m] / 2 < 0, D = B ? P < L ? P - L : P - T : 0;
|
|
292
|
-
return {
|
|
293
|
-
[d]: p[d] + D,
|
|
294
|
-
data: {
|
|
295
|
-
[d]: V,
|
|
296
|
-
centerOffset: P - V - D,
|
|
297
|
-
...B && {
|
|
298
|
-
alignmentOffset: D
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
reset: B
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
});
|
|
305
|
-
function ye(t, e, n) {
|
|
306
|
-
return (t ? [...n.filter((i) => W(i) === t), ...n.filter((i) => W(i) !== t)] : n.filter((i) => M(i) === i)).filter((i) => t ? W(i) === t || (e ? at(i) !== i : !1) : !0);
|
|
307
|
-
}
|
|
308
|
-
const be = function(t) {
|
|
309
|
-
return t === void 0 && (t = {}), {
|
|
310
|
-
name: "autoPlacement",
|
|
311
|
-
options: t,
|
|
312
|
-
async fn(e) {
|
|
313
|
-
var n, o, i;
|
|
314
|
-
const {
|
|
315
|
-
rects: r,
|
|
316
|
-
middlewareData: s,
|
|
317
|
-
placement: l,
|
|
318
|
-
platform: a,
|
|
319
|
-
elements: f
|
|
320
|
-
} = e, {
|
|
321
|
-
crossAxis: u = !1,
|
|
322
|
-
alignment: c,
|
|
323
|
-
allowedPlacements: p = St,
|
|
324
|
-
autoAlignment: d = !0,
|
|
325
|
-
...m
|
|
326
|
-
} = U(t, e), h = c !== void 0 || p === St ? ye(c || null, d, p) : p, g = await et(e, m), w = ((n = s.autoPlacement) == null ? void 0 : n.index) || 0, x = h[w];
|
|
327
|
-
if (x == null)
|
|
328
|
-
return {};
|
|
329
|
-
const b = Nt(x, r, await (a.isRTL == null ? void 0 : a.isRTL(f.floating)));
|
|
330
|
-
if (l !== x)
|
|
331
|
-
return {
|
|
332
|
-
reset: {
|
|
333
|
-
placement: h[0]
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
const A = [g[M(x)], g[b[0]], g[b[1]]], v = [...((o = s.autoPlacement) == null ? void 0 : o.overflows) || [], {
|
|
337
|
-
placement: x,
|
|
338
|
-
overflows: A
|
|
339
|
-
}], O = h[w + 1];
|
|
340
|
-
if (O)
|
|
341
|
-
return {
|
|
342
|
-
data: {
|
|
343
|
-
index: w + 1,
|
|
344
|
-
overflows: v
|
|
345
|
-
},
|
|
346
|
-
reset: {
|
|
347
|
-
placement: O
|
|
348
|
-
}
|
|
349
|
-
};
|
|
350
|
-
const R = v.map((y) => {
|
|
351
|
-
const C = W(y.placement);
|
|
352
|
-
return [y.placement, C && u ? (
|
|
353
|
-
// Check along the mainAxis and main crossAxis side.
|
|
354
|
-
y.overflows.slice(0, 2).reduce((L, T) => L + T, 0)
|
|
355
|
-
) : (
|
|
356
|
-
// Check only the mainAxis.
|
|
357
|
-
y.overflows[0]
|
|
358
|
-
), y.overflows];
|
|
359
|
-
}).sort((y, C) => y[1] - C[1]), S = ((i = R.filter((y) => y[2].slice(
|
|
360
|
-
0,
|
|
361
|
-
// Aligned placements should not check their opposite crossAxis
|
|
362
|
-
// side.
|
|
363
|
-
W(y[0]) ? 2 : 3
|
|
364
|
-
).every((C) => C <= 0))[0]) == null ? void 0 : i[0]) || R[0][0];
|
|
365
|
-
return S !== l ? {
|
|
366
|
-
data: {
|
|
367
|
-
index: w + 1,
|
|
368
|
-
overflows: v
|
|
369
|
-
},
|
|
370
|
-
reset: {
|
|
371
|
-
placement: S
|
|
372
|
-
}
|
|
373
|
-
} : {};
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
}, ve = function(t) {
|
|
377
|
-
return t === void 0 && (t = {}), {
|
|
378
|
-
name: "flip",
|
|
379
|
-
options: t,
|
|
380
|
-
async fn(e) {
|
|
381
|
-
var n, o;
|
|
382
|
-
const {
|
|
383
|
-
placement: i,
|
|
384
|
-
middlewareData: r,
|
|
385
|
-
rects: s,
|
|
386
|
-
initialPlacement: l,
|
|
387
|
-
platform: a,
|
|
388
|
-
elements: f
|
|
389
|
-
} = e, {
|
|
390
|
-
mainAxis: u = !0,
|
|
391
|
-
crossAxis: c = !0,
|
|
392
|
-
fallbackPlacements: p,
|
|
393
|
-
fallbackStrategy: d = "bestFit",
|
|
394
|
-
fallbackAxisSideDirection: m = "none",
|
|
395
|
-
flipAlignment: h = !0,
|
|
396
|
-
...g
|
|
397
|
-
} = U(t, e);
|
|
398
|
-
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
399
|
-
return {};
|
|
400
|
-
const w = M(i), x = z(l), b = M(l) === l, A = await (a.isRTL == null ? void 0 : a.isRTL(f.floating)), v = p || (b || !h ? [ft(l)] : ue(l)), O = m !== "none";
|
|
401
|
-
!p && O && v.push(...he(l, h, m, A));
|
|
402
|
-
const R = [l, ...v], F = await et(e, g), S = [];
|
|
403
|
-
let y = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
404
|
-
if (u && S.push(F[w]), c) {
|
|
405
|
-
const P = Nt(i, s, A);
|
|
406
|
-
S.push(F[P[0]], F[P[1]]);
|
|
407
|
-
}
|
|
408
|
-
if (y = [...y, {
|
|
409
|
-
placement: i,
|
|
410
|
-
overflows: S
|
|
411
|
-
}], !S.every((P) => P <= 0)) {
|
|
412
|
-
var C, L;
|
|
413
|
-
const P = (((C = r.flip) == null ? void 0 : C.index) || 0) + 1, V = R[P];
|
|
414
|
-
if (V && (!(c === "alignment" ? x !== z(V) : !1) || // We leave the current main axis only if every placement on that axis
|
|
415
|
-
// overflows the main axis.
|
|
416
|
-
y.every((k) => z(k.placement) === x ? k.overflows[0] > 0 : !0)))
|
|
417
|
-
return {
|
|
418
|
-
data: {
|
|
419
|
-
index: P,
|
|
420
|
-
overflows: y
|
|
421
|
-
},
|
|
422
|
-
reset: {
|
|
423
|
-
placement: V
|
|
424
|
-
}
|
|
425
|
-
};
|
|
426
|
-
let B = (L = y.filter((D) => D.overflows[0] <= 0).sort((D, k) => D.overflows[1] - k.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
427
|
-
if (!B)
|
|
428
|
-
switch (d) {
|
|
429
|
-
case "bestFit": {
|
|
430
|
-
var T;
|
|
431
|
-
const D = (T = y.filter((k) => {
|
|
432
|
-
if (O) {
|
|
433
|
-
const K = z(k.placement);
|
|
434
|
-
return K === x || // Create a bias to the `y` side axis due to horizontal
|
|
435
|
-
// reading directions favoring greater width.
|
|
436
|
-
K === "y";
|
|
437
|
-
}
|
|
438
|
-
return !0;
|
|
439
|
-
}).map((k) => [k.placement, k.overflows.filter((K) => K > 0).reduce((K, Jt) => K + Jt, 0)]).sort((k, K) => k[1] - K[1])[0]) == null ? void 0 : T[0];
|
|
440
|
-
D && (B = D);
|
|
441
|
-
break;
|
|
442
|
-
}
|
|
443
|
-
case "initialPlacement":
|
|
444
|
-
B = l;
|
|
445
|
-
break;
|
|
446
|
-
}
|
|
447
|
-
if (i !== B)
|
|
448
|
-
return {
|
|
449
|
-
reset: {
|
|
450
|
-
placement: B
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
return {};
|
|
455
|
-
}
|
|
456
|
-
};
|
|
457
|
-
};
|
|
458
|
-
function kt(t, e) {
|
|
459
|
-
return {
|
|
460
|
-
top: t.top - e.height,
|
|
461
|
-
right: t.right - e.width,
|
|
462
|
-
bottom: t.bottom - e.height,
|
|
463
|
-
left: t.left - e.width
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
function $t(t) {
|
|
467
|
-
return Ht.some((e) => t[e] >= 0);
|
|
468
|
-
}
|
|
469
|
-
const Ae = function(t) {
|
|
470
|
-
return t === void 0 && (t = {}), {
|
|
471
|
-
name: "hide",
|
|
472
|
-
options: t,
|
|
473
|
-
async fn(e) {
|
|
474
|
-
const {
|
|
475
|
-
rects: n
|
|
476
|
-
} = e, {
|
|
477
|
-
strategy: o = "referenceHidden",
|
|
478
|
-
...i
|
|
479
|
-
} = U(t, e);
|
|
480
|
-
switch (o) {
|
|
481
|
-
case "referenceHidden": {
|
|
482
|
-
const r = await et(e, {
|
|
483
|
-
...i,
|
|
484
|
-
elementContext: "reference"
|
|
485
|
-
}), s = kt(r, n.reference);
|
|
486
|
-
return {
|
|
487
|
-
data: {
|
|
488
|
-
referenceHiddenOffsets: s,
|
|
489
|
-
referenceHidden: $t(s)
|
|
490
|
-
}
|
|
491
|
-
};
|
|
492
|
-
}
|
|
493
|
-
case "escaped": {
|
|
494
|
-
const r = await et(e, {
|
|
495
|
-
...i,
|
|
496
|
-
altBoundary: !0
|
|
497
|
-
}), s = kt(r, n.floating);
|
|
498
|
-
return {
|
|
499
|
-
data: {
|
|
500
|
-
escapedOffsets: s,
|
|
501
|
-
escaped: $t(s)
|
|
502
|
-
}
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
|
-
default:
|
|
506
|
-
return {};
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
};
|
|
511
|
-
function zt(t) {
|
|
512
|
-
const e = H(...t.map((r) => r.left)), n = H(...t.map((r) => r.top)), o = E(...t.map((r) => r.right)), i = E(...t.map((r) => r.bottom));
|
|
513
|
-
return {
|
|
514
|
-
x: e,
|
|
515
|
-
y: n,
|
|
516
|
-
width: o - e,
|
|
517
|
-
height: i - n
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
function Re(t) {
|
|
521
|
-
const e = t.slice().sort((i, r) => i.y - r.y), n = [];
|
|
522
|
-
let o = null;
|
|
523
|
-
for (let i = 0; i < e.length; i++) {
|
|
524
|
-
const r = e[i];
|
|
525
|
-
!o || r.y - o.y > o.height / 2 ? n.push([r]) : n[n.length - 1].push(r), o = r;
|
|
526
|
-
}
|
|
527
|
-
return n.map((i) => tt(zt(i)));
|
|
528
|
-
}
|
|
529
|
-
const Oe = function(t) {
|
|
530
|
-
return t === void 0 && (t = {}), {
|
|
531
|
-
name: "inline",
|
|
532
|
-
options: t,
|
|
533
|
-
async fn(e) {
|
|
534
|
-
const {
|
|
535
|
-
placement: n,
|
|
536
|
-
elements: o,
|
|
537
|
-
rects: i,
|
|
538
|
-
platform: r,
|
|
539
|
-
strategy: s
|
|
540
|
-
} = e, {
|
|
541
|
-
padding: l = 2,
|
|
542
|
-
x: a,
|
|
543
|
-
y: f
|
|
544
|
-
} = U(t, e), u = Array.from(await (r.getClientRects == null ? void 0 : r.getClientRects(o.reference)) || []), c = Re(u), p = tt(zt(u)), d = At(l);
|
|
545
|
-
function m() {
|
|
546
|
-
if (c.length === 2 && c[0].left > c[1].right && a != null && f != null)
|
|
547
|
-
return c.find((g) => a > g.left - d.left && a < g.right + d.right && f > g.top - d.top && f < g.bottom + d.bottom) || p;
|
|
548
|
-
if (c.length >= 2) {
|
|
549
|
-
if (z(n) === "y") {
|
|
550
|
-
const y = c[0], C = c[c.length - 1], L = M(n) === "top", T = y.top, P = C.bottom, V = L ? y.left : C.left, B = L ? y.right : C.right, D = B - V, k = P - T;
|
|
551
|
-
return {
|
|
552
|
-
top: T,
|
|
553
|
-
bottom: P,
|
|
554
|
-
left: V,
|
|
555
|
-
right: B,
|
|
556
|
-
width: D,
|
|
557
|
-
height: k,
|
|
558
|
-
x: V,
|
|
559
|
-
y: T
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
const g = M(n) === "left", w = E(...c.map((y) => y.right)), x = H(...c.map((y) => y.left)), b = c.filter((y) => g ? y.left === x : y.right === w), A = b[0].top, v = b[b.length - 1].bottom, O = x, R = w, F = R - O, S = v - A;
|
|
563
|
-
return {
|
|
564
|
-
top: A,
|
|
565
|
-
bottom: v,
|
|
566
|
-
left: O,
|
|
567
|
-
right: R,
|
|
568
|
-
width: F,
|
|
569
|
-
height: S,
|
|
570
|
-
x: O,
|
|
571
|
-
y: A
|
|
572
|
-
};
|
|
573
|
-
}
|
|
574
|
-
return p;
|
|
575
|
-
}
|
|
576
|
-
const h = await r.getElementRects({
|
|
577
|
-
reference: {
|
|
578
|
-
getBoundingClientRect: m
|
|
579
|
-
},
|
|
580
|
-
floating: o.floating,
|
|
581
|
-
strategy: s
|
|
582
|
-
});
|
|
583
|
-
return i.reference.x !== h.reference.x || i.reference.y !== h.reference.y || i.reference.width !== h.reference.width || i.reference.height !== h.reference.height ? {
|
|
584
|
-
reset: {
|
|
585
|
-
rects: h
|
|
586
|
-
}
|
|
587
|
-
} : {};
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
}, Ce = /* @__PURE__ */ new Set(["left", "top"]);
|
|
591
|
-
async function Pe(t, e) {
|
|
592
|
-
const {
|
|
593
|
-
placement: n,
|
|
594
|
-
platform: o,
|
|
595
|
-
elements: i
|
|
596
|
-
} = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = M(n), l = W(n), a = z(n) === "y", f = Ce.has(s) ? -1 : 1, u = r && a ? -1 : 1, c = U(e, t);
|
|
597
|
-
let {
|
|
598
|
-
mainAxis: p,
|
|
599
|
-
crossAxis: d,
|
|
600
|
-
alignmentAxis: m
|
|
601
|
-
} = typeof c == "number" ? {
|
|
602
|
-
mainAxis: c,
|
|
603
|
-
crossAxis: 0,
|
|
604
|
-
alignmentAxis: null
|
|
605
|
-
} : {
|
|
606
|
-
mainAxis: c.mainAxis || 0,
|
|
607
|
-
crossAxis: c.crossAxis || 0,
|
|
608
|
-
alignmentAxis: c.alignmentAxis
|
|
609
|
-
};
|
|
610
|
-
return l && typeof m == "number" && (d = l === "end" ? m * -1 : m), a ? {
|
|
611
|
-
x: d * u,
|
|
612
|
-
y: p * f
|
|
613
|
-
} : {
|
|
614
|
-
x: p * f,
|
|
615
|
-
y: d * u
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
const Ee = function(t) {
|
|
619
|
-
return t === void 0 && (t = 0), {
|
|
620
|
-
name: "offset",
|
|
621
|
-
options: t,
|
|
622
|
-
async fn(e) {
|
|
623
|
-
var n, o;
|
|
624
|
-
const {
|
|
625
|
-
x: i,
|
|
626
|
-
y: r,
|
|
627
|
-
placement: s,
|
|
628
|
-
middlewareData: l
|
|
629
|
-
} = e, a = await Pe(e, t);
|
|
630
|
-
return s === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
|
|
631
|
-
x: i + a.x,
|
|
632
|
-
y: r + a.y,
|
|
633
|
-
data: {
|
|
634
|
-
...a,
|
|
635
|
-
placement: s
|
|
636
|
-
}
|
|
637
|
-
};
|
|
638
|
-
}
|
|
639
|
-
};
|
|
640
|
-
}, Se = function(t) {
|
|
641
|
-
return t === void 0 && (t = {}), {
|
|
642
|
-
name: "shift",
|
|
643
|
-
options: t,
|
|
644
|
-
async fn(e) {
|
|
645
|
-
const {
|
|
646
|
-
x: n,
|
|
647
|
-
y: o,
|
|
648
|
-
placement: i
|
|
649
|
-
} = e, {
|
|
650
|
-
mainAxis: r = !0,
|
|
651
|
-
crossAxis: s = !1,
|
|
652
|
-
limiter: l = {
|
|
653
|
-
fn: (g) => {
|
|
654
|
-
let {
|
|
655
|
-
x: w,
|
|
656
|
-
y: x
|
|
657
|
-
} = g;
|
|
658
|
-
return {
|
|
659
|
-
x: w,
|
|
660
|
-
y: x
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
},
|
|
664
|
-
...a
|
|
665
|
-
} = U(t, e), f = {
|
|
666
|
-
x: n,
|
|
667
|
-
y: o
|
|
668
|
-
}, u = await et(e, a), c = z(M(i)), p = _t(c);
|
|
669
|
-
let d = f[p], m = f[c];
|
|
670
|
-
if (r) {
|
|
671
|
-
const g = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", x = d + u[g], b = d - u[w];
|
|
672
|
-
d = xt(x, d, b);
|
|
673
|
-
}
|
|
674
|
-
if (s) {
|
|
675
|
-
const g = c === "y" ? "top" : "left", w = c === "y" ? "bottom" : "right", x = m + u[g], b = m - u[w];
|
|
676
|
-
m = xt(x, m, b);
|
|
677
|
-
}
|
|
678
|
-
const h = l.fn({
|
|
679
|
-
...e,
|
|
680
|
-
[p]: d,
|
|
681
|
-
[c]: m
|
|
682
|
-
});
|
|
683
|
-
return {
|
|
684
|
-
...h,
|
|
685
|
-
data: {
|
|
686
|
-
x: h.x - n,
|
|
687
|
-
y: h.y - o,
|
|
688
|
-
enabled: {
|
|
689
|
-
[p]: r,
|
|
690
|
-
[c]: s
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
};
|
|
694
|
-
}
|
|
695
|
-
};
|
|
696
|
-
}, Le = function(t) {
|
|
697
|
-
return t === void 0 && (t = {}), {
|
|
698
|
-
name: "size",
|
|
699
|
-
options: t,
|
|
700
|
-
async fn(e) {
|
|
701
|
-
var n, o;
|
|
702
|
-
const {
|
|
703
|
-
placement: i,
|
|
704
|
-
rects: r,
|
|
705
|
-
platform: s,
|
|
706
|
-
elements: l
|
|
707
|
-
} = e, {
|
|
708
|
-
apply: a = () => {
|
|
709
|
-
},
|
|
710
|
-
...f
|
|
711
|
-
} = U(t, e), u = await et(e, f), c = M(i), p = W(i), d = z(i) === "y", {
|
|
712
|
-
width: m,
|
|
713
|
-
height: h
|
|
714
|
-
} = r.floating;
|
|
715
|
-
let g, w;
|
|
716
|
-
c === "top" || c === "bottom" ? (g = c, w = p === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (w = c, g = p === "end" ? "top" : "bottom");
|
|
717
|
-
const x = h - u.top - u.bottom, b = m - u.left - u.right, A = H(h - u[g], x), v = H(m - u[w], b), O = !e.middlewareData.shift;
|
|
718
|
-
let R = A, F = v;
|
|
719
|
-
if ((n = e.middlewareData.shift) != null && n.enabled.x && (F = b), (o = e.middlewareData.shift) != null && o.enabled.y && (R = x), O && !p) {
|
|
720
|
-
const y = E(u.left, 0), C = E(u.right, 0), L = E(u.top, 0), T = E(u.bottom, 0);
|
|
721
|
-
d ? F = m - 2 * (y !== 0 || C !== 0 ? y + C : E(u.left, u.right)) : R = h - 2 * (L !== 0 || T !== 0 ? L + T : E(u.top, u.bottom));
|
|
722
|
-
}
|
|
723
|
-
await a({
|
|
724
|
-
...e,
|
|
725
|
-
availableWidth: F,
|
|
726
|
-
availableHeight: R
|
|
727
|
-
});
|
|
728
|
-
const S = await s.getDimensions(l.floating);
|
|
729
|
-
return m !== S.width || h !== S.height ? {
|
|
730
|
-
reset: {
|
|
731
|
-
rects: !0
|
|
732
|
-
}
|
|
733
|
-
} : {};
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
};
|
|
737
|
-
function ut() {
|
|
738
|
-
return typeof window < "u";
|
|
739
|
-
}
|
|
740
|
-
function ot(t) {
|
|
741
|
-
return jt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
742
|
-
}
|
|
743
|
-
function $(t) {
|
|
744
|
-
var e;
|
|
745
|
-
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
746
|
-
}
|
|
747
|
-
function I(t) {
|
|
748
|
-
var e;
|
|
749
|
-
return (e = (jt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
750
|
-
}
|
|
751
|
-
function jt(t) {
|
|
752
|
-
return ut() ? t instanceof Node || t instanceof $(t).Node : !1;
|
|
753
|
-
}
|
|
754
|
-
function _(t) {
|
|
755
|
-
return ut() ? t instanceof Element || t instanceof $(t).Element : !1;
|
|
756
|
-
}
|
|
757
|
-
function X(t) {
|
|
758
|
-
return ut() ? t instanceof HTMLElement || t instanceof $(t).HTMLElement : !1;
|
|
759
|
-
}
|
|
760
|
-
function Ft(t) {
|
|
761
|
-
return !ut() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof $(t).ShadowRoot;
|
|
762
|
-
}
|
|
763
|
-
const Te = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
764
|
-
function rt(t) {
|
|
765
|
-
const {
|
|
766
|
-
overflow: e,
|
|
767
|
-
overflowX: n,
|
|
768
|
-
overflowY: o,
|
|
769
|
-
display: i
|
|
770
|
-
} = N(t);
|
|
771
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Te.has(i);
|
|
772
|
-
}
|
|
773
|
-
const De = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
774
|
-
function ke(t) {
|
|
775
|
-
return De.has(ot(t));
|
|
776
|
-
}
|
|
777
|
-
const $e = [":popover-open", ":modal"];
|
|
778
|
-
function dt(t) {
|
|
779
|
-
return $e.some((e) => {
|
|
780
|
-
try {
|
|
781
|
-
return t.matches(e);
|
|
782
|
-
} catch {
|
|
783
|
-
return !1;
|
|
784
|
-
}
|
|
785
|
-
});
|
|
786
|
-
}
|
|
787
|
-
const Fe = ["transform", "translate", "scale", "rotate", "perspective"], Be = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Me = ["paint", "layout", "strict", "content"];
|
|
788
|
-
function Rt(t) {
|
|
789
|
-
const e = Ot(), n = _(t) ? N(t) : t;
|
|
790
|
-
return Fe.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || Be.some((o) => (n.willChange || "").includes(o)) || Me.some((o) => (n.contain || "").includes(o));
|
|
791
|
-
}
|
|
792
|
-
function Ve(t) {
|
|
793
|
-
let e = G(t);
|
|
794
|
-
for (; X(e) && !nt(e); ) {
|
|
795
|
-
if (Rt(e))
|
|
796
|
-
return e;
|
|
797
|
-
if (dt(e))
|
|
798
|
-
return null;
|
|
799
|
-
e = G(e);
|
|
800
|
-
}
|
|
801
|
-
return null;
|
|
802
|
-
}
|
|
803
|
-
function Ot() {
|
|
804
|
-
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
805
|
-
}
|
|
806
|
-
const We = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
807
|
-
function nt(t) {
|
|
808
|
-
return We.has(ot(t));
|
|
809
|
-
}
|
|
810
|
-
function N(t) {
|
|
811
|
-
return $(t).getComputedStyle(t);
|
|
812
|
-
}
|
|
813
|
-
function pt(t) {
|
|
814
|
-
return _(t) ? {
|
|
815
|
-
scrollLeft: t.scrollLeft,
|
|
816
|
-
scrollTop: t.scrollTop
|
|
817
|
-
} : {
|
|
818
|
-
scrollLeft: t.scrollX,
|
|
819
|
-
scrollTop: t.scrollY
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
function G(t) {
|
|
823
|
-
if (ot(t) === "html")
|
|
824
|
-
return t;
|
|
825
|
-
const e = (
|
|
826
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
827
|
-
t.assignedSlot || // DOM Element detected.
|
|
828
|
-
t.parentNode || // ShadowRoot detected.
|
|
829
|
-
Ft(t) && t.host || // Fallback.
|
|
830
|
-
I(t)
|
|
831
|
-
);
|
|
832
|
-
return Ft(e) ? e.host : e;
|
|
833
|
-
}
|
|
834
|
-
function Xt(t) {
|
|
835
|
-
const e = G(t);
|
|
836
|
-
return nt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : X(e) && rt(e) ? e : Xt(e);
|
|
837
|
-
}
|
|
838
|
-
function it(t, e, n) {
|
|
839
|
-
var o;
|
|
840
|
-
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
841
|
-
const i = Xt(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = $(i);
|
|
842
|
-
if (r) {
|
|
843
|
-
const l = yt(s);
|
|
844
|
-
return e.concat(s, s.visualViewport || [], rt(i) ? i : [], l && n ? it(l) : []);
|
|
845
|
-
}
|
|
846
|
-
return e.concat(i, it(i, [], n));
|
|
847
|
-
}
|
|
848
|
-
function yt(t) {
|
|
849
|
-
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
850
|
-
}
|
|
851
|
-
function It(t) {
|
|
852
|
-
const e = N(t);
|
|
853
|
-
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
854
|
-
const i = X(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, l = ct(n) !== r || ct(o) !== s;
|
|
855
|
-
return l && (n = r, o = s), {
|
|
856
|
-
width: n,
|
|
857
|
-
height: o,
|
|
858
|
-
$: l
|
|
859
|
-
};
|
|
860
|
-
}
|
|
861
|
-
function Ct(t) {
|
|
862
|
-
return _(t) ? t : t.contextElement;
|
|
863
|
-
}
|
|
864
|
-
function Z(t) {
|
|
865
|
-
const e = Ct(t);
|
|
866
|
-
if (!X(e))
|
|
867
|
-
return j(1);
|
|
868
|
-
const n = e.getBoundingClientRect(), {
|
|
869
|
-
width: o,
|
|
870
|
-
height: i,
|
|
871
|
-
$: r
|
|
872
|
-
} = It(e);
|
|
873
|
-
let s = (r ? ct(n.width) : n.width) / o, l = (r ? ct(n.height) : n.height) / i;
|
|
874
|
-
return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
875
|
-
x: s,
|
|
876
|
-
y: l
|
|
877
|
-
};
|
|
878
|
-
}
|
|
879
|
-
const He = /* @__PURE__ */ j(0);
|
|
880
|
-
function Yt(t) {
|
|
881
|
-
const e = $(t);
|
|
882
|
-
return !Ot() || !e.visualViewport ? He : {
|
|
883
|
-
x: e.visualViewport.offsetLeft,
|
|
884
|
-
y: e.visualViewport.offsetTop
|
|
885
|
-
};
|
|
886
|
-
}
|
|
887
|
-
function _e(t, e, n) {
|
|
888
|
-
return e === void 0 && (e = !1), !n || e && n !== $(t) ? !1 : e;
|
|
889
|
-
}
|
|
890
|
-
function Q(t, e, n, o) {
|
|
891
|
-
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
892
|
-
const i = t.getBoundingClientRect(), r = Ct(t);
|
|
893
|
-
let s = j(1);
|
|
894
|
-
e && (o ? _(o) && (s = Z(o)) : s = Z(t));
|
|
895
|
-
const l = _e(r, n, o) ? Yt(r) : j(0);
|
|
896
|
-
let a = (i.left + l.x) / s.x, f = (i.top + l.y) / s.y, u = i.width / s.x, c = i.height / s.y;
|
|
897
|
-
if (r) {
|
|
898
|
-
const p = $(r), d = o && _(o) ? $(o) : o;
|
|
899
|
-
let m = p, h = yt(m);
|
|
900
|
-
for (; h && o && d !== m; ) {
|
|
901
|
-
const g = Z(h), w = h.getBoundingClientRect(), x = N(h), b = w.left + (h.clientLeft + parseFloat(x.paddingLeft)) * g.x, A = w.top + (h.clientTop + parseFloat(x.paddingTop)) * g.y;
|
|
902
|
-
a *= g.x, f *= g.y, u *= g.x, c *= g.y, a += b, f += A, m = $(h), h = yt(m);
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
return tt({
|
|
906
|
-
width: u,
|
|
907
|
-
height: c,
|
|
908
|
-
x: a,
|
|
909
|
-
y: f
|
|
910
|
-
});
|
|
911
|
-
}
|
|
912
|
-
function mt(t, e) {
|
|
913
|
-
const n = pt(t).scrollLeft;
|
|
914
|
-
return e ? e.left + n : Q(I(t)).left + n;
|
|
915
|
-
}
|
|
916
|
-
function Ut(t, e) {
|
|
917
|
-
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - mt(t, n), i = n.top + e.scrollTop;
|
|
918
|
-
return {
|
|
919
|
-
x: o,
|
|
920
|
-
y: i
|
|
921
|
-
};
|
|
922
|
-
}
|
|
923
|
-
function Ne(t) {
|
|
924
|
-
let {
|
|
925
|
-
elements: e,
|
|
926
|
-
rect: n,
|
|
927
|
-
offsetParent: o,
|
|
928
|
-
strategy: i
|
|
929
|
-
} = t;
|
|
930
|
-
const r = i === "fixed", s = I(o), l = e ? dt(e.floating) : !1;
|
|
931
|
-
if (o === s || l && r)
|
|
932
|
-
return n;
|
|
933
|
-
let a = {
|
|
934
|
-
scrollLeft: 0,
|
|
935
|
-
scrollTop: 0
|
|
936
|
-
}, f = j(1);
|
|
937
|
-
const u = j(0), c = X(o);
|
|
938
|
-
if ((c || !c && !r) && ((ot(o) !== "body" || rt(s)) && (a = pt(o)), X(o))) {
|
|
939
|
-
const d = Q(o);
|
|
940
|
-
f = Z(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
|
|
941
|
-
}
|
|
942
|
-
const p = s && !c && !r ? Ut(s, a) : j(0);
|
|
943
|
-
return {
|
|
944
|
-
width: n.width * f.x,
|
|
945
|
-
height: n.height * f.y,
|
|
946
|
-
x: n.x * f.x - a.scrollLeft * f.x + u.x + p.x,
|
|
947
|
-
y: n.y * f.y - a.scrollTop * f.y + u.y + p.y
|
|
948
|
-
};
|
|
949
|
-
}
|
|
950
|
-
function ze(t) {
|
|
951
|
-
return Array.from(t.getClientRects());
|
|
952
|
-
}
|
|
953
|
-
function je(t) {
|
|
954
|
-
const e = I(t), n = pt(t), o = t.ownerDocument.body, i = E(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = E(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
955
|
-
let s = -n.scrollLeft + mt(t);
|
|
956
|
-
const l = -n.scrollTop;
|
|
957
|
-
return N(o).direction === "rtl" && (s += E(e.clientWidth, o.clientWidth) - i), {
|
|
958
|
-
width: i,
|
|
959
|
-
height: r,
|
|
960
|
-
x: s,
|
|
961
|
-
y: l
|
|
962
|
-
};
|
|
963
|
-
}
|
|
964
|
-
const Bt = 25;
|
|
965
|
-
function Xe(t, e) {
|
|
966
|
-
const n = $(t), o = I(t), i = n.visualViewport;
|
|
967
|
-
let r = o.clientWidth, s = o.clientHeight, l = 0, a = 0;
|
|
968
|
-
if (i) {
|
|
969
|
-
r = i.width, s = i.height;
|
|
970
|
-
const u = Ot();
|
|
971
|
-
(!u || u && e === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
|
|
972
|
-
}
|
|
973
|
-
const f = mt(o);
|
|
974
|
-
if (f <= 0) {
|
|
975
|
-
const u = o.ownerDocument, c = u.body, p = getComputedStyle(c), d = u.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, m = Math.abs(o.clientWidth - c.clientWidth - d);
|
|
976
|
-
m <= Bt && (r -= m);
|
|
977
|
-
} else f <= Bt && (r += f);
|
|
978
|
-
return {
|
|
979
|
-
width: r,
|
|
980
|
-
height: s,
|
|
981
|
-
x: l,
|
|
982
|
-
y: a
|
|
983
|
-
};
|
|
984
|
-
}
|
|
985
|
-
const Ie = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
986
|
-
function Ye(t, e) {
|
|
987
|
-
const n = Q(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = X(t) ? Z(t) : j(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, a = i * r.x, f = o * r.y;
|
|
988
|
-
return {
|
|
989
|
-
width: s,
|
|
990
|
-
height: l,
|
|
991
|
-
x: a,
|
|
992
|
-
y: f
|
|
993
|
-
};
|
|
994
|
-
}
|
|
995
|
-
function Mt(t, e, n) {
|
|
996
|
-
let o;
|
|
997
|
-
if (e === "viewport")
|
|
998
|
-
o = Xe(t, n);
|
|
999
|
-
else if (e === "document")
|
|
1000
|
-
o = je(I(t));
|
|
1001
|
-
else if (_(e))
|
|
1002
|
-
o = Ye(e, n);
|
|
1003
|
-
else {
|
|
1004
|
-
const i = Yt(t);
|
|
1005
|
-
o = {
|
|
1006
|
-
x: e.x - i.x,
|
|
1007
|
-
y: e.y - i.y,
|
|
1008
|
-
width: e.width,
|
|
1009
|
-
height: e.height
|
|
1010
|
-
};
|
|
1011
|
-
}
|
|
1012
|
-
return tt(o);
|
|
1013
|
-
}
|
|
1014
|
-
function qt(t, e) {
|
|
1015
|
-
const n = G(t);
|
|
1016
|
-
return n === e || !_(n) || nt(n) ? !1 : N(n).position === "fixed" || qt(n, e);
|
|
1017
|
-
}
|
|
1018
|
-
function Ue(t, e) {
|
|
1019
|
-
const n = e.get(t);
|
|
1020
|
-
if (n)
|
|
1021
|
-
return n;
|
|
1022
|
-
let o = it(t, [], !1).filter((l) => _(l) && ot(l) !== "body"), i = null;
|
|
1023
|
-
const r = N(t).position === "fixed";
|
|
1024
|
-
let s = r ? G(t) : t;
|
|
1025
|
-
for (; _(s) && !nt(s); ) {
|
|
1026
|
-
const l = N(s), a = Rt(s);
|
|
1027
|
-
!a && l.position === "fixed" && (i = null), (r ? !a && !i : !a && l.position === "static" && !!i && Ie.has(i.position) || rt(s) && !a && qt(t, s)) ? o = o.filter((u) => u !== s) : i = l, s = G(s);
|
|
1028
|
-
}
|
|
1029
|
-
return e.set(t, o), o;
|
|
1030
|
-
}
|
|
1031
|
-
function qe(t) {
|
|
1032
|
-
let {
|
|
1033
|
-
element: e,
|
|
1034
|
-
boundary: n,
|
|
1035
|
-
rootBoundary: o,
|
|
1036
|
-
strategy: i
|
|
1037
|
-
} = t;
|
|
1038
|
-
const s = [...n === "clippingAncestors" ? dt(e) ? [] : Ue(e, this._c) : [].concat(n), o], l = s[0], a = s.reduce((f, u) => {
|
|
1039
|
-
const c = Mt(e, u, i);
|
|
1040
|
-
return f.top = E(c.top, f.top), f.right = H(c.right, f.right), f.bottom = H(c.bottom, f.bottom), f.left = E(c.left, f.left), f;
|
|
1041
|
-
}, Mt(e, l, i));
|
|
1042
|
-
return {
|
|
1043
|
-
width: a.right - a.left,
|
|
1044
|
-
height: a.bottom - a.top,
|
|
1045
|
-
x: a.left,
|
|
1046
|
-
y: a.top
|
|
1047
|
-
};
|
|
1048
|
-
}
|
|
1049
|
-
function Ke(t) {
|
|
1050
|
-
const {
|
|
1051
|
-
width: e,
|
|
1052
|
-
height: n
|
|
1053
|
-
} = It(t);
|
|
1054
|
-
return {
|
|
1055
|
-
width: e,
|
|
1056
|
-
height: n
|
|
1057
|
-
};
|
|
1058
|
-
}
|
|
1059
|
-
function Ge(t, e, n) {
|
|
1060
|
-
const o = X(e), i = I(e), r = n === "fixed", s = Q(t, !0, r, e);
|
|
1061
|
-
let l = {
|
|
1062
|
-
scrollLeft: 0,
|
|
1063
|
-
scrollTop: 0
|
|
1064
|
-
};
|
|
1065
|
-
const a = j(0);
|
|
1066
|
-
function f() {
|
|
1067
|
-
a.x = mt(i);
|
|
1068
|
-
}
|
|
1069
|
-
if (o || !o && !r)
|
|
1070
|
-
if ((ot(e) !== "body" || rt(i)) && (l = pt(e)), o) {
|
|
1071
|
-
const d = Q(e, !0, r, e);
|
|
1072
|
-
a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
|
|
1073
|
-
} else i && f();
|
|
1074
|
-
r && !o && i && f();
|
|
1075
|
-
const u = i && !o && !r ? Ut(i, l) : j(0), c = s.left + l.scrollLeft - a.x - u.x, p = s.top + l.scrollTop - a.y - u.y;
|
|
1076
|
-
return {
|
|
1077
|
-
x: c,
|
|
1078
|
-
y: p,
|
|
1079
|
-
width: s.width,
|
|
1080
|
-
height: s.height
|
|
1081
|
-
};
|
|
1082
|
-
}
|
|
1083
|
-
function wt(t) {
|
|
1084
|
-
return N(t).position === "static";
|
|
1085
|
-
}
|
|
1086
|
-
function Vt(t, e) {
|
|
1087
|
-
if (!X(t) || N(t).position === "fixed")
|
|
1088
|
-
return null;
|
|
1089
|
-
if (e)
|
|
1090
|
-
return e(t);
|
|
1091
|
-
let n = t.offsetParent;
|
|
1092
|
-
return I(t) === n && (n = n.ownerDocument.body), n;
|
|
1093
|
-
}
|
|
1094
|
-
function Kt(t, e) {
|
|
1095
|
-
const n = $(t);
|
|
1096
|
-
if (dt(t))
|
|
1097
|
-
return n;
|
|
1098
|
-
if (!X(t)) {
|
|
1099
|
-
let i = G(t);
|
|
1100
|
-
for (; i && !nt(i); ) {
|
|
1101
|
-
if (_(i) && !wt(i))
|
|
1102
|
-
return i;
|
|
1103
|
-
i = G(i);
|
|
1104
|
-
}
|
|
1105
|
-
return n;
|
|
1106
|
-
}
|
|
1107
|
-
let o = Vt(t, e);
|
|
1108
|
-
for (; o && ke(o) && wt(o); )
|
|
1109
|
-
o = Vt(o, e);
|
|
1110
|
-
return o && nt(o) && wt(o) && !Rt(o) ? n : o || Ve(t) || n;
|
|
1111
|
-
}
|
|
1112
|
-
const Je = async function(t) {
|
|
1113
|
-
const e = this.getOffsetParent || Kt, n = this.getDimensions, o = await n(t.floating);
|
|
1114
|
-
return {
|
|
1115
|
-
reference: Ge(t.reference, await e(t.floating), t.strategy),
|
|
1116
|
-
floating: {
|
|
1117
|
-
x: 0,
|
|
1118
|
-
y: 0,
|
|
1119
|
-
width: o.width,
|
|
1120
|
-
height: o.height
|
|
1121
|
-
}
|
|
1122
|
-
};
|
|
1123
|
-
};
|
|
1124
|
-
function Qe(t) {
|
|
1125
|
-
return N(t).direction === "rtl";
|
|
1126
|
-
}
|
|
1127
|
-
const Ze = {
|
|
1128
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: Ne,
|
|
1129
|
-
getDocumentElement: I,
|
|
1130
|
-
getClippingRect: qe,
|
|
1131
|
-
getOffsetParent: Kt,
|
|
1132
|
-
getElementRects: Je,
|
|
1133
|
-
getClientRects: ze,
|
|
1134
|
-
getDimensions: Ke,
|
|
1135
|
-
getScale: Z,
|
|
1136
|
-
isElement: _,
|
|
1137
|
-
isRTL: Qe
|
|
1138
|
-
};
|
|
1139
|
-
function Gt(t, e) {
|
|
1140
|
-
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1141
|
-
}
|
|
1142
|
-
function tn(t, e) {
|
|
1143
|
-
let n = null, o;
|
|
1144
|
-
const i = I(t);
|
|
1145
|
-
function r() {
|
|
1146
|
-
var l;
|
|
1147
|
-
clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
|
|
1148
|
-
}
|
|
1149
|
-
function s(l, a) {
|
|
1150
|
-
l === void 0 && (l = !1), a === void 0 && (a = 1), r();
|
|
1151
|
-
const f = t.getBoundingClientRect(), {
|
|
1152
|
-
left: u,
|
|
1153
|
-
top: c,
|
|
1154
|
-
width: p,
|
|
1155
|
-
height: d
|
|
1156
|
-
} = f;
|
|
1157
|
-
if (l || e(), !p || !d)
|
|
1158
|
-
return;
|
|
1159
|
-
const m = st(c), h = st(i.clientWidth - (u + p)), g = st(i.clientHeight - (c + d)), w = st(u), b = {
|
|
1160
|
-
rootMargin: -m + "px " + -h + "px " + -g + "px " + -w + "px",
|
|
1161
|
-
threshold: E(0, H(1, a)) || 1
|
|
1162
|
-
};
|
|
1163
|
-
let A = !0;
|
|
1164
|
-
function v(O) {
|
|
1165
|
-
const R = O[0].intersectionRatio;
|
|
1166
|
-
if (R !== a) {
|
|
1167
|
-
if (!A)
|
|
1168
|
-
return s();
|
|
1169
|
-
R ? s(!1, R) : o = setTimeout(() => {
|
|
1170
|
-
s(!1, 1e-7);
|
|
1171
|
-
}, 1e3);
|
|
1172
|
-
}
|
|
1173
|
-
R === 1 && !Gt(f, t.getBoundingClientRect()) && s(), A = !1;
|
|
1174
|
-
}
|
|
1175
|
-
try {
|
|
1176
|
-
n = new IntersectionObserver(v, {
|
|
1177
|
-
...b,
|
|
1178
|
-
// Handle <iframe>s
|
|
1179
|
-
root: i.ownerDocument
|
|
1180
|
-
});
|
|
1181
|
-
} catch {
|
|
1182
|
-
n = new IntersectionObserver(v, b);
|
|
1183
|
-
}
|
|
1184
|
-
n.observe(t);
|
|
1185
|
-
}
|
|
1186
|
-
return s(!0), r;
|
|
1187
|
-
}
|
|
1188
|
-
function en(t, e, n, o) {
|
|
1189
|
-
o === void 0 && (o = {});
|
|
1190
|
-
const {
|
|
1191
|
-
ancestorScroll: i = !0,
|
|
1192
|
-
ancestorResize: r = !0,
|
|
1193
|
-
elementResize: s = typeof ResizeObserver == "function",
|
|
1194
|
-
layoutShift: l = typeof IntersectionObserver == "function",
|
|
1195
|
-
animationFrame: a = !1
|
|
1196
|
-
} = o, f = Ct(t), u = i || r ? [...f ? it(f) : [], ...it(e)] : [];
|
|
1197
|
-
u.forEach((w) => {
|
|
1198
|
-
i && w.addEventListener("scroll", n, {
|
|
1199
|
-
passive: !0
|
|
1200
|
-
}), r && w.addEventListener("resize", n);
|
|
1201
|
-
});
|
|
1202
|
-
const c = f && l ? tn(f, n) : null;
|
|
1203
|
-
let p = -1, d = null;
|
|
1204
|
-
s && (d = new ResizeObserver((w) => {
|
|
1205
|
-
let [x] = w;
|
|
1206
|
-
x && x.target === f && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1207
|
-
var b;
|
|
1208
|
-
(b = d) == null || b.observe(e);
|
|
1209
|
-
})), n();
|
|
1210
|
-
}), f && !a && d.observe(f), d.observe(e));
|
|
1211
|
-
let m, h = a ? Q(t) : null;
|
|
1212
|
-
a && g();
|
|
1213
|
-
function g() {
|
|
1214
|
-
const w = Q(t);
|
|
1215
|
-
h && !Gt(h, w) && n(), h = w, m = requestAnimationFrame(g);
|
|
1216
|
-
}
|
|
1217
|
-
return n(), () => {
|
|
1218
|
-
var w;
|
|
1219
|
-
u.forEach((x) => {
|
|
1220
|
-
i && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
|
|
1221
|
-
}), c?.(), (w = d) == null || w.disconnect(), d = null, a && cancelAnimationFrame(m);
|
|
1222
|
-
};
|
|
1223
|
-
}
|
|
1224
|
-
const nn = Ee, Wt = be, on = Se, rn = ve, sn = Le, ln = Ae, cn = xe, an = Oe, fn = (t, e, n) => {
|
|
1225
|
-
const o = /* @__PURE__ */ new Map(), i = {
|
|
1226
|
-
platform: Ze,
|
|
1227
|
-
...n
|
|
1228
|
-
}, r = {
|
|
1229
|
-
...i.platform,
|
|
1230
|
-
_c: o
|
|
1231
|
-
};
|
|
1232
|
-
return we(t, e, {
|
|
1233
|
-
...i,
|
|
1234
|
-
platform: r
|
|
1235
|
-
});
|
|
1236
|
-
};
|
|
1237
|
-
var un = Object.defineProperty, q = (t, e, n, o) => {
|
|
1238
|
-
for (var i = void 0, r = t.length - 1, s; r >= 0; r--)
|
|
1239
|
-
(s = t[r]) && (i = s(e, n, i) || i);
|
|
1240
|
-
return i && un(e, n, i), i;
|
|
1241
|
-
};
|
|
1242
|
-
const lt = {
|
|
13
|
+
const n = {
|
|
1243
14
|
Flip: "flip",
|
|
1244
15
|
AutoPlacementHorizontal: "auto-placement-horizontal",
|
|
1245
16
|
AutoPlacementVertical: "auto-placement-vertical"
|
|
1246
|
-
},
|
|
1247
|
-
[
|
|
1248
|
-
[
|
|
17
|
+
}, H = {
|
|
18
|
+
[n.Flip]: k(),
|
|
19
|
+
[n.AutoPlacementHorizontal]: u({
|
|
1249
20
|
allowedPlacements: [
|
|
1250
21
|
"bottom",
|
|
1251
22
|
"top",
|
|
@@ -1255,7 +26,7 @@ const lt = {
|
|
|
1255
26
|
"top-end"
|
|
1256
27
|
]
|
|
1257
28
|
}),
|
|
1258
|
-
[
|
|
29
|
+
[n.AutoPlacementVertical]: u({
|
|
1259
30
|
allowedPlacements: [
|
|
1260
31
|
"left",
|
|
1261
32
|
"right",
|
|
@@ -1266,33 +37,33 @@ const lt = {
|
|
|
1266
37
|
]
|
|
1267
38
|
})
|
|
1268
39
|
};
|
|
1269
|
-
class
|
|
40
|
+
class i extends w {
|
|
1270
41
|
constructor() {
|
|
1271
|
-
super(...arguments), this.open = !1, this.dismissible = !1, this.arrow = !1, this.alternate = !1, this.placementStrategy =
|
|
1272
|
-
}
|
|
1273
|
-
get #
|
|
1274
|
-
let
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
apply({ availableWidth: o, availableHeight:
|
|
1280
|
-
Object.assign(
|
|
42
|
+
super(...arguments), this.open = !1, this.dismissible = !1, this.arrow = !1, this.alternate = !1, this.placementStrategy = n.Flip, this.animationFrame = !1, this.strategy = "fixed", this.offset = null, this.#r = () => (this.#e = this.updatePosition(), this.#e);
|
|
43
|
+
}
|
|
44
|
+
get #i() {
|
|
45
|
+
let t = [
|
|
46
|
+
$(),
|
|
47
|
+
H[this.placementStrategy],
|
|
48
|
+
C(),
|
|
49
|
+
F({
|
|
50
|
+
apply({ availableWidth: o, availableHeight: a, elements: p }) {
|
|
51
|
+
Object.assign(p.floating.style, {
|
|
1281
52
|
maxWidth: `${o}px`,
|
|
1282
|
-
maxHeight: `${
|
|
53
|
+
maxHeight: `${a}px`
|
|
1283
54
|
});
|
|
1284
55
|
}
|
|
1285
56
|
}),
|
|
1286
|
-
|
|
1287
|
-
],
|
|
1288
|
-
return this.arrow && (
|
|
1289
|
-
...
|
|
1290
|
-
|
|
1291
|
-
]),
|
|
57
|
+
z()
|
|
58
|
+
], e = this.offset ?? 0;
|
|
59
|
+
return this.arrow && (e += 12, t = [
|
|
60
|
+
...t,
|
|
61
|
+
V({ element: this.arrowEl, padding: 10 })
|
|
62
|
+
]), e > 0 && t.unshift(A(e)), t;
|
|
1292
63
|
}
|
|
1293
|
-
#
|
|
1294
|
-
openChanged(
|
|
1295
|
-
this.#
|
|
64
|
+
#a;
|
|
65
|
+
openChanged(t, e) {
|
|
66
|
+
this.#o(), this.#t(), this.$emit(e ? "vwc-popup:open" : "vwc-popup:close");
|
|
1296
67
|
}
|
|
1297
68
|
/**
|
|
1298
69
|
* @internal
|
|
@@ -1310,29 +81,29 @@ class Y extends ne {
|
|
|
1310
81
|
* @internal
|
|
1311
82
|
*/
|
|
1312
83
|
strategyChanged() {
|
|
1313
|
-
this.#
|
|
84
|
+
this.#o();
|
|
1314
85
|
}
|
|
1315
86
|
connectedCallback() {
|
|
1316
|
-
super.connectedCallback(), this.#
|
|
87
|
+
super.connectedCallback(), this.#o(), this.#t();
|
|
1317
88
|
}
|
|
1318
89
|
disconnectedCallback() {
|
|
1319
90
|
super.disconnectedCallback(), this.#t();
|
|
1320
91
|
}
|
|
1321
92
|
#t() {
|
|
1322
|
-
this.#
|
|
93
|
+
this.#a?.(), this.open && this.controlEl && this.controlEl.classList.add("open"), this.anchorEl && this.open && this.popupEl && (this.#a = _(
|
|
1323
94
|
this.anchorEl,
|
|
1324
95
|
this.popupEl,
|
|
1325
|
-
this.#
|
|
96
|
+
this.#r,
|
|
1326
97
|
{
|
|
1327
98
|
animationFrame: this.animationFrame
|
|
1328
99
|
}
|
|
1329
100
|
));
|
|
1330
101
|
}
|
|
1331
|
-
#
|
|
102
|
+
#o() {
|
|
1332
103
|
this.popupEl && this.strategy === "fixed" && (this.open ? this.popupEl.showPopover() : this.popupEl.hidePopover());
|
|
1333
104
|
}
|
|
1334
|
-
#
|
|
1335
|
-
#
|
|
105
|
+
#e;
|
|
106
|
+
#r;
|
|
1336
107
|
/**
|
|
1337
108
|
* Updates popup's position
|
|
1338
109
|
*
|
|
@@ -1341,31 +112,31 @@ class Y extends ne {
|
|
|
1341
112
|
async updatePosition() {
|
|
1342
113
|
if (!this.open || !this.anchorEl)
|
|
1343
114
|
return;
|
|
1344
|
-
const
|
|
115
|
+
const t = await D(this.anchorEl, this.popupEl, {
|
|
1345
116
|
placement: this.placement,
|
|
1346
117
|
strategy: this.strategy,
|
|
1347
|
-
middleware: this.#
|
|
118
|
+
middleware: this.#i
|
|
1348
119
|
});
|
|
1349
|
-
this.#s(
|
|
120
|
+
this.#s(t), this.arrow && this.#p(t);
|
|
1350
121
|
}
|
|
1351
|
-
#s(
|
|
1352
|
-
const { x:
|
|
122
|
+
#s(t) {
|
|
123
|
+
const { x: e, y: o } = t, { referenceHidden: a } = t.middlewareData.hide;
|
|
1353
124
|
Object.assign(this.popupEl.style, {
|
|
1354
|
-
left: `${
|
|
125
|
+
left: `${e}px`,
|
|
1355
126
|
top: `${o}px`,
|
|
1356
|
-
visibility:
|
|
127
|
+
visibility: a ? "hidden" : "visible"
|
|
1357
128
|
});
|
|
1358
129
|
}
|
|
1359
|
-
#
|
|
1360
|
-
const { x:
|
|
130
|
+
#p(t) {
|
|
131
|
+
const { x: e, y: o } = t.middlewareData.arrow, a = {
|
|
1361
132
|
left: "calc(100% - 4px)",
|
|
1362
133
|
right: "-4px",
|
|
1363
134
|
top: "calc(100% - 4px)",
|
|
1364
135
|
bottom: "-4px"
|
|
1365
|
-
},
|
|
136
|
+
}, p = t.placement.split("-")[0];
|
|
1366
137
|
Object.assign(this.arrowEl.style, {
|
|
1367
|
-
left:
|
|
1368
|
-
top: o ? `${o}px` :
|
|
138
|
+
left: e ? `${e}px` : a[p],
|
|
139
|
+
top: o ? `${o}px` : a[p]
|
|
1369
140
|
});
|
|
1370
141
|
}
|
|
1371
142
|
get anchorEl() {
|
|
@@ -1376,90 +147,90 @@ class Y extends ne {
|
|
|
1376
147
|
* Unlike toggling the `open` attribute, show() will wait for the popup to become visible and positioned correctly.
|
|
1377
148
|
*/
|
|
1378
149
|
show() {
|
|
1379
|
-
return this.open = !0, this.#
|
|
150
|
+
return this.open = !0, this.#e ?? Promise.resolve();
|
|
1380
151
|
}
|
|
1381
152
|
hide() {
|
|
1382
153
|
this.open = !1;
|
|
1383
154
|
}
|
|
1384
155
|
}
|
|
1385
|
-
|
|
1386
|
-
|
|
156
|
+
s([
|
|
157
|
+
l({
|
|
1387
158
|
mode: "boolean"
|
|
1388
159
|
})
|
|
1389
|
-
],
|
|
1390
|
-
|
|
1391
|
-
|
|
160
|
+
], i.prototype, "open");
|
|
161
|
+
s([
|
|
162
|
+
l({
|
|
1392
163
|
mode: "boolean"
|
|
1393
164
|
})
|
|
1394
|
-
],
|
|
1395
|
-
|
|
1396
|
-
|
|
165
|
+
], i.prototype, "dismissible");
|
|
166
|
+
s([
|
|
167
|
+
l({
|
|
1397
168
|
mode: "boolean"
|
|
1398
169
|
})
|
|
1399
|
-
],
|
|
1400
|
-
|
|
1401
|
-
|
|
170
|
+
], i.prototype, "arrow");
|
|
171
|
+
s([
|
|
172
|
+
l({
|
|
1402
173
|
mode: "boolean"
|
|
1403
174
|
})
|
|
1404
|
-
],
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
],
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
],
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
],
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
],
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
],
|
|
1420
|
-
const
|
|
175
|
+
], i.prototype, "alternate");
|
|
176
|
+
s([
|
|
177
|
+
l({ mode: "fromView" })
|
|
178
|
+
], i.prototype, "placement");
|
|
179
|
+
s([
|
|
180
|
+
l({ mode: "boolean", attribute: "animation-frame" })
|
|
181
|
+
], i.prototype, "animationFrame");
|
|
182
|
+
s([
|
|
183
|
+
l({ mode: "fromView" })
|
|
184
|
+
], i.prototype, "strategy");
|
|
185
|
+
s([
|
|
186
|
+
l({ attribute: "offset", converter: y })
|
|
187
|
+
], i.prototype, "offset");
|
|
188
|
+
s([
|
|
189
|
+
x
|
|
190
|
+
], i.prototype, "anchor");
|
|
191
|
+
const O = ":host{display:var(--_popup-display, inline)}.control{border-radius:inherit;background:var(--vvd-color-surface-4dp);contain:layout}.control:not(.open){display:none}.popup-wrapper{white-space:initial;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.popup-wrapper{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.popup-wrapper ::-webkit-scrollbar{width:4px}.popup-wrapper ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.popup-wrapper ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.popup-wrapper{z-index:var(--_popup-z-index, 10);overflow:visible;padding:0;border:none;border-radius:8px;margin:0;inline-size:max-content;min-inline-size:fit-content}.popup-wrapper:not(.absolute){position:fixed}.popup-wrapper.absolute{position:absolute;top:0;left:0}.popup-content{display:grid;color:var(--vvd-color-canvas-text)}.dismissible .popup-content{align-content:start;grid-template-columns:1fr auto}.arrow{position:absolute;z-index:-1;width:8px;height:8px;background:var(--vvd-color-surface-4dp);transform:rotate(45deg)}.dismissible-button{align-self:flex-start;margin-block-start:4px;margin-inline-end:4px}", S = ({ open: r, dismissible: t, alternate: e }) => B(
|
|
1421
192
|
"control",
|
|
1422
|
-
["open", !!
|
|
1423
|
-
["dismissible", !!
|
|
1424
|
-
["alternate", !!
|
|
193
|
+
["open", !!r],
|
|
194
|
+
["dismissible", !!t],
|
|
195
|
+
["alternate", !!e]
|
|
1425
196
|
);
|
|
1426
|
-
function
|
|
1427
|
-
return
|
|
1428
|
-
}
|
|
1429
|
-
const
|
|
1430
|
-
const
|
|
1431
|
-
return
|
|
1432
|
-
<${
|
|
1433
|
-
<div popover="${
|
|
1434
|
-
<div ${
|
|
197
|
+
function U(r) {
|
|
198
|
+
return r.strategy && r.strategy === "fixed" ? "manual" : null;
|
|
199
|
+
}
|
|
200
|
+
const T = (r) => {
|
|
201
|
+
const t = r.tagFor(g), e = r.tagFor(b);
|
|
202
|
+
return c`
|
|
203
|
+
<${t}>
|
|
204
|
+
<div popover="${U}" class="popup-wrapper ${(o) => o.strategy}" ${d("popupEl")} part="popup-base">
|
|
205
|
+
<div ${d("controlEl")} class="${S}" aria-hidden="${(o) => o.open ? "false" : "true"}"
|
|
1435
206
|
part="${(o) => o.alternate ? "vvd-theme-alternate" : ""}">
|
|
1436
207
|
<div class="popup-content">
|
|
1437
208
|
<slot></slot>
|
|
1438
|
-
${
|
|
209
|
+
${m(
|
|
1439
210
|
(o) => o.dismissible,
|
|
1440
|
-
|
|
1441
|
-
class="dismissible-button" icon="close-small-solid" shape="pill"></${
|
|
211
|
+
c`<${e} size="condensed" @click="${(o) => o.open = !1}"
|
|
212
|
+
class="dismissible-button" icon="close-small-solid" shape="pill"></${e}>`
|
|
1442
213
|
)}
|
|
1443
214
|
</div>
|
|
1444
|
-
${
|
|
215
|
+
${m(
|
|
1445
216
|
(o) => o.arrow,
|
|
1446
|
-
|
|
217
|
+
c`<div class="arrow" ${d("arrowEl")}></div>`
|
|
1447
218
|
)}
|
|
1448
219
|
</div>
|
|
1449
220
|
</div>
|
|
1450
|
-
</${
|
|
1451
|
-
},
|
|
221
|
+
</${t}>`;
|
|
222
|
+
}, N = E(
|
|
1452
223
|
"popup",
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
[
|
|
224
|
+
i,
|
|
225
|
+
T,
|
|
226
|
+
[v, f],
|
|
1456
227
|
{
|
|
1457
|
-
styles:
|
|
228
|
+
styles: O
|
|
1458
229
|
}
|
|
1459
|
-
),
|
|
230
|
+
), G = P(N);
|
|
1460
231
|
export {
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
232
|
+
i as P,
|
|
233
|
+
n as a,
|
|
234
|
+
N as p,
|
|
235
|
+
G as r
|
|
1465
236
|
};
|