@vonage/vivid 5.3.0 → 5.5.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/accordion-item/definition.js +1 -1
- package/alert/definition.cjs +1 -1
- package/alert/definition.js +2 -2
- package/badge/definition.js +1 -1
- package/banner/definition.js +1 -1
- package/bundled/base-color-picker.cjs +18 -13
- package/bundled/base-color-picker.js +98 -81
- package/bundled/calendar-picker.template.cjs +7 -7
- package/bundled/calendar-picker.template.js +102 -102
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/definition10.cjs +1 -1
- package/bundled/definition10.js +2 -2
- package/bundled/definition11.cjs +12 -19
- package/bundled/definition11.js +87 -66
- package/bundled/definition12.cjs +19 -10
- package/bundled/definition12.js +217 -36
- package/bundled/definition13.cjs +10 -1
- package/bundled/definition13.js +38 -14
- package/bundled/definition14.cjs +1 -5
- package/bundled/definition14.js +15 -24
- package/bundled/definition15.cjs +5 -30
- package/bundled/definition15.js +22 -73
- package/bundled/definition16.cjs +30 -19
- package/bundled/definition16.js +74 -97
- package/bundled/definition17.cjs +19 -13
- package/bundled/definition17.js +83 -117
- package/bundled/definition18.cjs +13 -12
- package/bundled/definition18.js +114 -71
- package/bundled/definition19.cjs +26 -27
- package/bundled/definition19.js +171 -180
- package/bundled/definition2.cjs +9 -9
- package/bundled/definition2.js +84 -129
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition6.cjs +3 -3
- package/bundled/definition6.js +19 -19
- package/bundled/definition9.cjs +5 -5
- package/bundled/definition9.js +394 -392
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +82 -102
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +48 -31
- package/bundled/mixins.cjs +1 -1
- package/bundled/mixins.js +1 -1
- package/bundled/picker-field.template.cjs +14 -14
- package/bundled/picker-field.template.js +35 -56
- package/bundled/time-selection-picker.template.cjs +12 -12
- package/bundled/time-selection-picker.template.js +13 -12
- package/bundled/trapped-focus.cjs +1 -0
- package/bundled/trapped-focus.js +26 -0
- package/bundled/vivid-element.cjs +5 -1
- package/bundled/vivid-element.js +401 -358
- package/calendar/index.cjs +13 -13
- package/calendar/index.js +171 -143
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/color-picker/definition.cjs +209 -113
- package/color-picker/definition.js +209 -113
- package/color-picker/index.cjs +104 -75
- package/color-picker/index.js +412 -326
- package/combobox/definition.cjs +7 -27
- package/combobox/definition.js +8 -28
- package/combobox/index.cjs +6 -6
- package/combobox/index.js +57 -71
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +354 -2
- package/data-grid/index.cjs +1 -1
- package/data-grid/index.js +1 -1
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +139 -0
- package/dial-pad/definition.js +139 -0
- package/dial-pad/index.cjs +27 -20
- package/dial-pad/index.js +177 -100
- package/dialog/definition.cjs +2 -2
- package/dialog/definition.js +2 -2
- package/dialog/index.cjs +7 -7
- package/dialog/index.js +6 -6
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/elevation/definition.cjs +1 -1
- package/elevation/definition.js +1 -1
- package/fab/definition.js +1 -1
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/icon/definition.cjs +56 -22
- package/icon/definition.js +56 -22
- package/index.cjs +3 -4
- package/index.js +2 -3
- package/lib/accordion/accordion.d.ts +1 -1
- package/lib/accordion/definition.d.ts +1 -1
- package/lib/audio-player/audio-player.d.ts +1 -1
- package/lib/color-picker/color-picker.d.ts +390 -12
- package/lib/color-picker/locale.d.ts +4 -0
- package/lib/combobox/combobox.d.ts +1 -0
- package/lib/combobox/combobox.options.d.ts +1 -1
- package/lib/date-picker/date-picker.d.ts +38 -38
- package/lib/date-range-picker/date-range-picker.d.ts +20 -20
- package/lib/date-time-picker/date-time-picker.d.ts +40 -40
- package/lib/dial-pad/dial-pad.d.ts +1 -0
- package/lib/divider/divider.d.ts +1 -1
- package/lib/icon/icon.d.ts +1 -0
- package/lib/menu-item/menu-item-role.d.ts +1 -1
- package/lib/popup/popup.d.ts +1 -1
- package/lib/searchable-select/locale.d.ts +4 -0
- package/lib/searchable-select/searchable-select.d.ts +3 -0
- package/lib/select/select.d.ts +3 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +2 -1
- package/lib/slider/slider.d.ts +1 -1
- package/lib/tabs/tabs.d.ts +2 -2
- package/lib/text-area/text-area.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/lib/time-picker/time-picker.d.ts +20 -20
- package/locales/de-DE.cjs +20 -3
- package/locales/de-DE.js +20 -3
- package/locales/en-GB.cjs +21 -4
- package/locales/en-GB.js +21 -4
- package/locales/en-US.cjs +21 -4
- package/locales/en-US.js +21 -4
- package/locales/ja-JP.cjs +20 -3
- package/locales/ja-JP.js +20 -3
- package/locales/zh-CN.cjs +19 -2
- package/locales/zh-CN.js +19 -2
- package/menu/definition.cjs +4 -4
- package/menu/definition.js +4 -4
- package/nav-disclosure/definition.js +1 -1
- package/nav-item/definition.js +1 -1
- package/note/definition.js +1 -1
- package/number-field/definition.js +1 -1
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +3 -3
- package/option/definition.cjs +6 -77
- package/option/definition.js +3 -78
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +31 -5
- package/popup/definition.cjs +2 -2
- package/popup/definition.js +2 -2
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +1 -1
- package/radio-group/index.js +1 -1
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/rich-text-editor/definition.cjs +2 -3
- package/rich-text-editor/definition.js +1 -2
- package/rich-text-editor/index.cjs +27 -27
- package/rich-text-editor/index.js +1209 -1199
- package/searchable-select/definition.cjs +103 -11
- package/searchable-select/definition.js +103 -11
- package/searchable-select/index.cjs +81 -69
- package/searchable-select/index.js +359 -273
- package/select/definition.cjs +30 -44
- package/select/definition.js +30 -44
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +2 -2
- package/shared/aria/aria-mixin.d.ts +1 -1
- package/shared/color-picker/base-color-picker.d.ts +2 -1
- package/shared/foundation/listbox/listbox.d.ts +4 -0
- package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
- package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
- package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
- package/simple-color-picker/definition.cjs +9 -7
- package/simple-color-picker/definition.js +9 -7
- package/simple-color-picker/index.cjs +6 -6
- package/simple-color-picker/index.js +41 -39
- package/slider/definition.cjs +1 -1
- package/slider/definition.js +1 -1
- package/split-button/definition.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- 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/tab/definition.js +1 -1
- package/tag/definition.cjs +34 -14
- package/tag/definition.js +35 -15
- package/tag/index.cjs +25 -12
- package/tag/index.js +64 -47
- package/tag-group/definition.cjs +1 -2
- package/tag-group/definition.js +1 -2
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +11 -12
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +2 -2
- package/text-field/definition.js +1 -1
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/definition.cjs +1 -1
- package/toggletip/definition.js +1 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/definition.cjs +3 -3
- package/tooltip/definition.js +3 -3
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +1 -1
- package/unbundled/affix.js +1 -1
- package/unbundled/base-color-picker.cjs +36 -18
- package/unbundled/base-color-picker.js +36 -18
- package/unbundled/calendar-picker.template.cjs +2 -2
- package/unbundled/calendar-picker.template.js +2 -2
- package/unbundled/definition.js +1 -1
- package/unbundled/definition2.js +1 -1
- package/unbundled/definition3.cjs +222 -141
- package/unbundled/definition3.js +220 -139
- package/unbundled/definition4.cjs +145 -235
- package/unbundled/definition4.js +143 -233
- package/unbundled/definition5.cjs +269 -27
- package/unbundled/definition5.js +267 -26
- package/unbundled/definition6.cjs +56 -0
- package/unbundled/definition6.js +52 -0
- package/unbundled/listbox.cjs +41 -63
- package/unbundled/listbox.js +39 -61
- package/unbundled/picker-field.template.cjs +3 -36
- package/unbundled/picker-field.template.js +3 -35
- package/unbundled/slider.template.cjs +1 -1
- package/unbundled/slider.template.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +2 -1
- package/unbundled/time-selection-picker.template.js +2 -1
- package/unbundled/trapped-focus.cjs +37 -0
- package/unbundled/trapped-focus.js +34 -0
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +56 -16
- package/video-player/definition.js +56 -16
- package/video-player/index.cjs +36 -36
- package/video-player/index.js +2461 -2445
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +285 -38
- package/bundled/_has.cjs +0 -1
- package/bundled/_has.js +0 -34
- package/bundled/option.cjs +0 -1
- package/bundled/option.js +0 -158
- package/unbundled/option.cjs +0 -217
- package/unbundled/option.js +0 -214
package/bundled/definition9.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { E as
|
|
3
|
-
import { V as
|
|
4
|
-
import { r as
|
|
5
|
-
import { w as
|
|
6
|
-
import { c as
|
|
7
|
-
const
|
|
1
|
+
import { B as Gt, b as Jt } from "./definition3.js";
|
|
2
|
+
import { E as Qt, e as Zt } from "./definition4.js";
|
|
3
|
+
import { V as te, a as G, n as ee, o as ne, h as ht, c as oe, d as ie } from "./vivid-element.js";
|
|
4
|
+
import { r as gt } from "./ref.js";
|
|
5
|
+
import { w as Pt } from "./when.js";
|
|
6
|
+
import { c as re } from "./class-names.js";
|
|
7
|
+
const Wt = ["top", "right", "bottom", "left"], Ct = ["start", "end"], Et = /* @__PURE__ */ Wt.reduce((t, e) => t.concat(e, e + "-" + Ct[0], e + "-" + Ct[1]), []), W = Math.min, E = Math.max, ct = Math.round, st = Math.floor, z = (t) => ({
|
|
8
8
|
x: t,
|
|
9
9
|
y: t
|
|
10
|
-
}),
|
|
10
|
+
}), se = {
|
|
11
11
|
left: "right",
|
|
12
12
|
right: "left",
|
|
13
13
|
bottom: "top",
|
|
14
14
|
top: "bottom"
|
|
15
|
-
},
|
|
15
|
+
}, le = {
|
|
16
16
|
start: "end",
|
|
17
17
|
end: "start"
|
|
18
18
|
};
|
|
19
|
-
function
|
|
20
|
-
return
|
|
19
|
+
function ce(t, e, n) {
|
|
20
|
+
return E(t, W(e, n));
|
|
21
21
|
}
|
|
22
22
|
function J(t, e) {
|
|
23
23
|
return typeof t == "function" ? t(e) : t;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function H(t) {
|
|
26
26
|
return t.split("-")[0];
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function V(t) {
|
|
29
29
|
return t.split("-")[1];
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function ae(t) {
|
|
32
32
|
return t === "x" ? "y" : "x";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function yt(t) {
|
|
35
35
|
return t === "y" ? "height" : "width";
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
function
|
|
39
|
-
return
|
|
37
|
+
const fe = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
38
|
+
function Y(t) {
|
|
39
|
+
return fe.has(H(t)) ? "y" : "x";
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
41
|
+
function vt(t) {
|
|
42
|
+
return ae(Y(t));
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Ht(t, e, n) {
|
|
45
45
|
n === void 0 && (n = !1);
|
|
46
|
-
const o =
|
|
46
|
+
const o = V(t), i = vt(t), r = yt(i);
|
|
47
47
|
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
48
48
|
return e.reference[r] > e.floating[r] && (s = ft(s)), [s, ft(s)];
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function ue(t) {
|
|
51
51
|
const e = ft(t);
|
|
52
52
|
return [at(t), e, at(e)];
|
|
53
53
|
}
|
|
54
54
|
function at(t) {
|
|
55
|
-
return t.replace(/start|end/g, (e) =>
|
|
55
|
+
return t.replace(/start|end/g, (e) => le[e]);
|
|
56
56
|
}
|
|
57
|
-
const St = ["left", "right"],
|
|
58
|
-
function
|
|
57
|
+
const St = ["left", "right"], Lt = ["right", "left"], pe = ["top", "bottom"], de = ["bottom", "top"];
|
|
58
|
+
function me(t, e, n) {
|
|
59
59
|
switch (t) {
|
|
60
60
|
case "top":
|
|
61
61
|
case "bottom":
|
|
62
|
-
return n ? e ?
|
|
62
|
+
return n ? e ? Lt : St : e ? St : Lt;
|
|
63
63
|
case "left":
|
|
64
64
|
case "right":
|
|
65
|
-
return e ?
|
|
65
|
+
return e ? pe : de;
|
|
66
66
|
default:
|
|
67
67
|
return [];
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
const i =
|
|
72
|
-
let r =
|
|
70
|
+
function he(t, e, n, o) {
|
|
71
|
+
const i = V(t);
|
|
72
|
+
let r = me(H(t), n === "start", o);
|
|
73
73
|
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(at)))), r;
|
|
74
74
|
}
|
|
75
75
|
function ft(t) {
|
|
76
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
76
|
+
return t.replace(/left|right|bottom|top/g, (e) => se[e]);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function ge(t) {
|
|
79
79
|
return {
|
|
80
80
|
top: 0,
|
|
81
81
|
right: 0,
|
|
@@ -84,8 +84,8 @@ function he(t) {
|
|
|
84
84
|
...t
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
return typeof t != "number" ?
|
|
87
|
+
function xt(t) {
|
|
88
|
+
return typeof t != "number" ? ge(t) : {
|
|
89
89
|
top: t,
|
|
90
90
|
right: t,
|
|
91
91
|
bottom: t,
|
|
@@ -110,55 +110,55 @@ function tt(t) {
|
|
|
110
110
|
y: n
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function Tt(t, e, n) {
|
|
114
114
|
let {
|
|
115
115
|
reference: o,
|
|
116
116
|
floating: i
|
|
117
117
|
} = t;
|
|
118
|
-
const r =
|
|
119
|
-
let
|
|
118
|
+
const r = Y(e), s = vt(e), l = yt(s), c = H(e), a = r === "y", u = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, d = o[l] / 2 - i[l] / 2;
|
|
119
|
+
let p;
|
|
120
120
|
switch (c) {
|
|
121
121
|
case "top":
|
|
122
|
-
|
|
123
|
-
x:
|
|
122
|
+
p = {
|
|
123
|
+
x: u,
|
|
124
124
|
y: o.y - i.height
|
|
125
125
|
};
|
|
126
126
|
break;
|
|
127
127
|
case "bottom":
|
|
128
|
-
|
|
129
|
-
x:
|
|
128
|
+
p = {
|
|
129
|
+
x: u,
|
|
130
130
|
y: o.y + o.height
|
|
131
131
|
};
|
|
132
132
|
break;
|
|
133
133
|
case "right":
|
|
134
|
-
|
|
134
|
+
p = {
|
|
135
135
|
x: o.x + o.width,
|
|
136
136
|
y: f
|
|
137
137
|
};
|
|
138
138
|
break;
|
|
139
139
|
case "left":
|
|
140
|
-
|
|
140
|
+
p = {
|
|
141
141
|
x: o.x - i.width,
|
|
142
142
|
y: f
|
|
143
143
|
};
|
|
144
144
|
break;
|
|
145
145
|
default:
|
|
146
|
-
|
|
146
|
+
p = {
|
|
147
147
|
x: o.x,
|
|
148
148
|
y: o.y
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
switch (
|
|
151
|
+
switch (V(e)) {
|
|
152
152
|
case "start":
|
|
153
|
-
|
|
153
|
+
p[s] -= d * (n && a ? -1 : 1);
|
|
154
154
|
break;
|
|
155
155
|
case "end":
|
|
156
|
-
|
|
156
|
+
p[s] += d * (n && a ? -1 : 1);
|
|
157
157
|
break;
|
|
158
158
|
}
|
|
159
|
-
return
|
|
159
|
+
return p;
|
|
160
160
|
}
|
|
161
|
-
const
|
|
161
|
+
const we = async (t, e, n) => {
|
|
162
162
|
const {
|
|
163
163
|
placement: o = "bottom",
|
|
164
164
|
strategy: i = "absolute",
|
|
@@ -170,25 +170,25 @@ const ge = async (t, e, n) => {
|
|
|
170
170
|
floating: e,
|
|
171
171
|
strategy: i
|
|
172
172
|
}), {
|
|
173
|
-
x:
|
|
173
|
+
x: u,
|
|
174
174
|
y: f
|
|
175
|
-
} =
|
|
176
|
-
for (let
|
|
175
|
+
} = Tt(a, o, c), d = o, p = {}, m = 0;
|
|
176
|
+
for (let h = 0; h < l.length; h++) {
|
|
177
177
|
const {
|
|
178
178
|
name: g,
|
|
179
179
|
fn: w
|
|
180
|
-
} = l[
|
|
181
|
-
x,
|
|
182
|
-
y,
|
|
180
|
+
} = l[h], {
|
|
181
|
+
x: y,
|
|
182
|
+
y: v,
|
|
183
183
|
data: R,
|
|
184
|
-
reset:
|
|
184
|
+
reset: x
|
|
185
185
|
} = await w({
|
|
186
|
-
x:
|
|
186
|
+
x: u,
|
|
187
187
|
y: f,
|
|
188
188
|
initialPlacement: o,
|
|
189
189
|
placement: d,
|
|
190
190
|
strategy: i,
|
|
191
|
-
middlewareData:
|
|
191
|
+
middlewareData: p,
|
|
192
192
|
rects: a,
|
|
193
193
|
platform: s,
|
|
194
194
|
elements: {
|
|
@@ -196,27 +196,27 @@ const ge = async (t, e, n) => {
|
|
|
196
196
|
floating: e
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
|
-
|
|
200
|
-
...
|
|
199
|
+
u = y ?? u, f = v ?? f, p = {
|
|
200
|
+
...p,
|
|
201
201
|
[g]: {
|
|
202
|
-
...
|
|
202
|
+
...p[g],
|
|
203
203
|
...R
|
|
204
204
|
}
|
|
205
|
-
},
|
|
205
|
+
}, x && m <= 50 && (m++, typeof x == "object" && (x.placement && (d = x.placement), x.rects && (a = x.rects === !0 ? await s.getElementRects({
|
|
206
206
|
reference: t,
|
|
207
207
|
floating: e,
|
|
208
208
|
strategy: i
|
|
209
|
-
}) :
|
|
210
|
-
x:
|
|
209
|
+
}) : x.rects), {
|
|
210
|
+
x: u,
|
|
211
211
|
y: f
|
|
212
|
-
} =
|
|
212
|
+
} = Tt(a, d, c)), h = -1);
|
|
213
213
|
}
|
|
214
214
|
return {
|
|
215
|
-
x:
|
|
215
|
+
x: u,
|
|
216
216
|
y: f,
|
|
217
217
|
placement: d,
|
|
218
218
|
strategy: i,
|
|
219
|
-
middlewareData:
|
|
219
|
+
middlewareData: p
|
|
220
220
|
};
|
|
221
221
|
};
|
|
222
222
|
async function ot(t, e) {
|
|
@@ -231,40 +231,40 @@ async function ot(t, e) {
|
|
|
231
231
|
strategy: c
|
|
232
232
|
} = t, {
|
|
233
233
|
boundary: a = "clippingAncestors",
|
|
234
|
-
rootBoundary:
|
|
234
|
+
rootBoundary: u = "viewport",
|
|
235
235
|
elementContext: f = "floating",
|
|
236
236
|
altBoundary: d = !1,
|
|
237
|
-
padding:
|
|
238
|
-
} = J(e, t),
|
|
237
|
+
padding: p = 0
|
|
238
|
+
} = J(e, t), m = xt(p), g = l[d ? f === "floating" ? "reference" : "floating" : f], w = tt(await r.getClippingRect({
|
|
239
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
240
|
boundary: a,
|
|
241
|
-
rootBoundary:
|
|
241
|
+
rootBoundary: u,
|
|
242
242
|
strategy: c
|
|
243
|
-
})),
|
|
243
|
+
})), y = f === "floating" ? {
|
|
244
244
|
x: o,
|
|
245
245
|
y: i,
|
|
246
246
|
width: s.floating.width,
|
|
247
247
|
height: s.floating.height
|
|
248
|
-
} : s.reference,
|
|
248
|
+
} : s.reference, v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), R = await (r.isElement == null ? void 0 : r.isElement(v)) ? await (r.getScale == null ? void 0 : r.getScale(v)) || {
|
|
249
249
|
x: 1,
|
|
250
250
|
y: 1
|
|
251
251
|
} : {
|
|
252
252
|
x: 1,
|
|
253
253
|
y: 1
|
|
254
|
-
},
|
|
254
|
+
}, x = tt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
255
255
|
elements: l,
|
|
256
|
-
rect:
|
|
257
|
-
offsetParent:
|
|
256
|
+
rect: y,
|
|
257
|
+
offsetParent: v,
|
|
258
258
|
strategy: c
|
|
259
|
-
}) :
|
|
259
|
+
}) : y);
|
|
260
260
|
return {
|
|
261
|
-
top: (w.top -
|
|
262
|
-
bottom: (
|
|
263
|
-
left: (w.left -
|
|
264
|
-
right: (
|
|
261
|
+
top: (w.top - x.top + m.top) / R.y,
|
|
262
|
+
bottom: (x.bottom - w.bottom + m.bottom) / R.y,
|
|
263
|
+
left: (w.left - x.left + m.left) / R.x,
|
|
264
|
+
right: (x.right - w.right + m.right) / R.x
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
const
|
|
267
|
+
const be = (t) => ({
|
|
268
268
|
name: "arrow",
|
|
269
269
|
options: t,
|
|
270
270
|
async fn(e) {
|
|
@@ -278,22 +278,22 @@ const we = (t) => ({
|
|
|
278
278
|
middlewareData: c
|
|
279
279
|
} = e, {
|
|
280
280
|
element: a,
|
|
281
|
-
padding:
|
|
281
|
+
padding: u = 0
|
|
282
282
|
} = J(t, e) || {};
|
|
283
283
|
if (a == null)
|
|
284
284
|
return {};
|
|
285
|
-
const f =
|
|
285
|
+
const f = xt(u), d = {
|
|
286
286
|
x: n,
|
|
287
287
|
y: o
|
|
288
|
-
},
|
|
289
|
-
let O =
|
|
290
|
-
(!O || !await (s.isElement == null ? void 0 : s.isElement(
|
|
291
|
-
const
|
|
288
|
+
}, p = vt(i), m = yt(p), h = await s.getDimensions(a), g = p === "y", w = g ? "top" : "left", y = g ? "bottom" : "right", v = g ? "clientHeight" : "clientWidth", R = r.reference[m] + r.reference[p] - d[p] - r.floating[m], x = d[p] - r.reference[p], A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
|
|
289
|
+
let O = A ? A[v] : 0;
|
|
290
|
+
(!O || !await (s.isElement == null ? void 0 : s.isElement(A))) && (O = l.floating[v] || r.floating[m]);
|
|
291
|
+
const $ = R / 2 - x / 2, S = O / 2 - h[m] / 2 - 1, b = W(f[w], S), P = W(f[y], S), L = b, T = O - h[m] - P, C = O / 2 - h[m] / 2 + $, M = ce(L, C, T), B = !c.arrow && V(i) != null && C !== M && r.reference[m] / 2 - (C < L ? b : P) - h[m] / 2 < 0, D = B ? C < L ? C - L : C - T : 0;
|
|
292
292
|
return {
|
|
293
|
-
[
|
|
293
|
+
[p]: d[p] + D,
|
|
294
294
|
data: {
|
|
295
|
-
[
|
|
296
|
-
centerOffset:
|
|
295
|
+
[p]: M,
|
|
296
|
+
centerOffset: C - M - D,
|
|
297
297
|
...B && {
|
|
298
298
|
alignmentOffset: D
|
|
299
299
|
}
|
|
@@ -302,10 +302,10 @@ const we = (t) => ({
|
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
|
-
function
|
|
306
|
-
return (t ? [...n.filter((i) =>
|
|
305
|
+
function ye(t, e, n) {
|
|
306
|
+
return (t ? [...n.filter((i) => V(i) === t), ...n.filter((i) => V(i) !== t)] : n.filter((i) => H(i) === i)).filter((i) => t ? V(i) === t || (e ? at(i) !== i : !1) : !0);
|
|
307
307
|
}
|
|
308
|
-
const
|
|
308
|
+
const ve = function(t) {
|
|
309
309
|
return t === void 0 && (t = {}), {
|
|
310
310
|
name: "autoPlacement",
|
|
311
311
|
options: t,
|
|
@@ -318,54 +318,54 @@ const xe = function(t) {
|
|
|
318
318
|
platform: c,
|
|
319
319
|
elements: a
|
|
320
320
|
} = e, {
|
|
321
|
-
crossAxis:
|
|
321
|
+
crossAxis: u = !1,
|
|
322
322
|
alignment: f,
|
|
323
|
-
allowedPlacements: d =
|
|
324
|
-
autoAlignment:
|
|
325
|
-
...
|
|
326
|
-
} = J(t, e),
|
|
327
|
-
if (
|
|
323
|
+
allowedPlacements: d = Et,
|
|
324
|
+
autoAlignment: p = !0,
|
|
325
|
+
...m
|
|
326
|
+
} = J(t, e), h = f !== void 0 || d === Et ? ye(f || null, p, d) : d, g = await ot(e, m), w = ((n = s.autoPlacement) == null ? void 0 : n.index) || 0, y = h[w];
|
|
327
|
+
if (y == null)
|
|
328
328
|
return {};
|
|
329
|
-
const
|
|
330
|
-
if (l !==
|
|
329
|
+
const v = Ht(y, r, await (c.isRTL == null ? void 0 : c.isRTL(a.floating)));
|
|
330
|
+
if (l !== y)
|
|
331
331
|
return {
|
|
332
332
|
reset: {
|
|
333
|
-
placement:
|
|
333
|
+
placement: h[0]
|
|
334
334
|
}
|
|
335
335
|
};
|
|
336
|
-
const R = [g[
|
|
337
|
-
placement:
|
|
336
|
+
const R = [g[H(y)], g[v[0]], g[v[1]]], x = [...((o = s.autoPlacement) == null ? void 0 : o.overflows) || [], {
|
|
337
|
+
placement: y,
|
|
338
338
|
overflows: R
|
|
339
|
-
}],
|
|
340
|
-
if (
|
|
339
|
+
}], A = h[w + 1];
|
|
340
|
+
if (A)
|
|
341
341
|
return {
|
|
342
342
|
data: {
|
|
343
343
|
index: w + 1,
|
|
344
|
-
overflows:
|
|
344
|
+
overflows: x
|
|
345
345
|
},
|
|
346
346
|
reset: {
|
|
347
|
-
placement:
|
|
347
|
+
placement: A
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
|
-
const O =
|
|
351
|
-
const
|
|
352
|
-
return [
|
|
350
|
+
const O = x.map((b) => {
|
|
351
|
+
const P = V(b.placement);
|
|
352
|
+
return [b.placement, P && u ? (
|
|
353
353
|
// Check along the mainAxis and main crossAxis side.
|
|
354
|
-
|
|
354
|
+
b.overflows.slice(0, 2).reduce((L, T) => L + T, 0)
|
|
355
355
|
) : (
|
|
356
356
|
// Check only the mainAxis.
|
|
357
|
-
|
|
358
|
-
),
|
|
359
|
-
}).sort((
|
|
357
|
+
b.overflows[0]
|
|
358
|
+
), b.overflows];
|
|
359
|
+
}).sort((b, P) => b[1] - P[1]), S = ((i = O.filter((b) => b[2].slice(
|
|
360
360
|
0,
|
|
361
361
|
// Aligned placements should not check their opposite crossAxis
|
|
362
362
|
// side.
|
|
363
|
-
|
|
364
|
-
).every((
|
|
363
|
+
V(b[0]) ? 2 : 3
|
|
364
|
+
).every((P) => P <= 0))[0]) == null ? void 0 : i[0]) || O[0][0];
|
|
365
365
|
return S !== l ? {
|
|
366
366
|
data: {
|
|
367
367
|
index: w + 1,
|
|
368
|
-
overflows:
|
|
368
|
+
overflows: x
|
|
369
369
|
},
|
|
370
370
|
reset: {
|
|
371
371
|
placement: S
|
|
@@ -373,7 +373,7 @@ const xe = function(t) {
|
|
|
373
373
|
} : {};
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
|
-
},
|
|
376
|
+
}, xe = function(t) {
|
|
377
377
|
return t === void 0 && (t = {}), {
|
|
378
378
|
name: "flip",
|
|
379
379
|
options: t,
|
|
@@ -387,56 +387,56 @@ const xe = function(t) {
|
|
|
387
387
|
platform: c,
|
|
388
388
|
elements: a
|
|
389
389
|
} = e, {
|
|
390
|
-
mainAxis:
|
|
390
|
+
mainAxis: u = !0,
|
|
391
391
|
crossAxis: f = !0,
|
|
392
392
|
fallbackPlacements: d,
|
|
393
|
-
fallbackStrategy:
|
|
394
|
-
fallbackAxisSideDirection:
|
|
395
|
-
flipAlignment:
|
|
393
|
+
fallbackStrategy: p = "bestFit",
|
|
394
|
+
fallbackAxisSideDirection: m = "none",
|
|
395
|
+
flipAlignment: h = !0,
|
|
396
396
|
...g
|
|
397
397
|
} = J(t, e);
|
|
398
398
|
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
399
399
|
return {};
|
|
400
|
-
const w =
|
|
401
|
-
!d &&
|
|
402
|
-
const O = [l, ...
|
|
403
|
-
let
|
|
404
|
-
if (
|
|
405
|
-
const
|
|
406
|
-
S.push(
|
|
400
|
+
const w = H(i), y = Y(l), v = H(l) === l, R = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), x = d || (v || !h ? [ft(l)] : ue(l)), A = m !== "none";
|
|
401
|
+
!d && A && x.push(...he(l, h, m, R));
|
|
402
|
+
const O = [l, ...x], $ = await ot(e, g), S = [];
|
|
403
|
+
let b = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
404
|
+
if (u && S.push($[w]), f) {
|
|
405
|
+
const C = Ht(i, s, R);
|
|
406
|
+
S.push($[C[0]], $[C[1]]);
|
|
407
407
|
}
|
|
408
|
-
if (
|
|
408
|
+
if (b = [...b, {
|
|
409
409
|
placement: i,
|
|
410
410
|
overflows: S
|
|
411
|
-
}], !S.every((
|
|
412
|
-
var
|
|
413
|
-
const
|
|
414
|
-
if (
|
|
411
|
+
}], !S.every((C) => C <= 0)) {
|
|
412
|
+
var P, L;
|
|
413
|
+
const C = (((P = r.flip) == null ? void 0 : P.index) || 0) + 1, M = O[C];
|
|
414
|
+
if (M && (!(f === "alignment" ? y !== Y(M) : !1) || // We leave the current main axis only if every placement on that axis
|
|
415
415
|
// overflows the main axis.
|
|
416
|
-
|
|
416
|
+
b.every((k) => Y(k.placement) === y ? k.overflows[0] > 0 : !0)))
|
|
417
417
|
return {
|
|
418
418
|
data: {
|
|
419
|
-
index:
|
|
420
|
-
overflows:
|
|
419
|
+
index: C,
|
|
420
|
+
overflows: b
|
|
421
421
|
},
|
|
422
422
|
reset: {
|
|
423
|
-
placement:
|
|
423
|
+
placement: M
|
|
424
424
|
}
|
|
425
425
|
};
|
|
426
|
-
let B = (
|
|
426
|
+
let B = (L = b.filter((D) => D.overflows[0] <= 0).sort((D, k) => D.overflows[1] - k.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
427
427
|
if (!B)
|
|
428
|
-
switch (
|
|
428
|
+
switch (p) {
|
|
429
429
|
case "bestFit": {
|
|
430
|
-
var
|
|
431
|
-
const D = (
|
|
432
|
-
if (
|
|
433
|
-
const q =
|
|
434
|
-
return q ===
|
|
430
|
+
var T;
|
|
431
|
+
const D = (T = b.filter((k) => {
|
|
432
|
+
if (A) {
|
|
433
|
+
const q = Y(k.placement);
|
|
434
|
+
return q === y || // Create a bias to the `y` side axis due to horizontal
|
|
435
435
|
// reading directions favoring greater width.
|
|
436
436
|
q === "y";
|
|
437
437
|
}
|
|
438
438
|
return !0;
|
|
439
|
-
}).map((k) => [k.placement, k.overflows.filter((q) => q > 0).reduce((q,
|
|
439
|
+
}).map((k) => [k.placement, k.overflows.filter((q) => q > 0).reduce((q, Kt) => q + Kt, 0)]).sort((k, q) => k[1] - q[1])[0]) == null ? void 0 : T[0];
|
|
440
440
|
D && (B = D);
|
|
441
441
|
break;
|
|
442
442
|
}
|
|
@@ -464,9 +464,9 @@ function Dt(t, e) {
|
|
|
464
464
|
};
|
|
465
465
|
}
|
|
466
466
|
function kt(t) {
|
|
467
|
-
return
|
|
467
|
+
return Wt.some((e) => t[e] >= 0);
|
|
468
468
|
}
|
|
469
|
-
const
|
|
469
|
+
const Re = function(t) {
|
|
470
470
|
return t === void 0 && (t = {}), {
|
|
471
471
|
name: "hide",
|
|
472
472
|
options: t,
|
|
@@ -509,7 +509,7 @@ const be = function(t) {
|
|
|
509
509
|
};
|
|
510
510
|
};
|
|
511
511
|
function _t(t) {
|
|
512
|
-
const e =
|
|
512
|
+
const e = W(...t.map((r) => r.left)), n = W(...t.map((r) => r.top)), o = E(...t.map((r) => r.right)), i = E(...t.map((r) => r.bottom));
|
|
513
513
|
return {
|
|
514
514
|
x: e,
|
|
515
515
|
y: n,
|
|
@@ -517,7 +517,7 @@ function _t(t) {
|
|
|
517
517
|
height: i - n
|
|
518
518
|
};
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Oe(t) {
|
|
521
521
|
const e = t.slice().sort((i, r) => i.y - r.y), n = [];
|
|
522
522
|
let o = null;
|
|
523
523
|
for (let i = 0; i < e.length; i++) {
|
|
@@ -526,7 +526,7 @@ function Re(t) {
|
|
|
526
526
|
}
|
|
527
527
|
return n.map((i) => tt(_t(i)));
|
|
528
528
|
}
|
|
529
|
-
const
|
|
529
|
+
const Ae = function(t) {
|
|
530
530
|
return t === void 0 && (t = {}), {
|
|
531
531
|
name: "inline",
|
|
532
532
|
options: t,
|
|
@@ -541,63 +541,63 @@ const Oe = function(t) {
|
|
|
541
541
|
padding: l = 2,
|
|
542
542
|
x: c,
|
|
543
543
|
y: a
|
|
544
|
-
} = J(t, e),
|
|
545
|
-
function
|
|
544
|
+
} = J(t, e), u = Array.from(await (r.getClientRects == null ? void 0 : r.getClientRects(o.reference)) || []), f = Oe(u), d = tt(_t(u)), p = xt(l);
|
|
545
|
+
function m() {
|
|
546
546
|
if (f.length === 2 && f[0].left > f[1].right && c != null && a != null)
|
|
547
|
-
return f.find((g) => c > g.left -
|
|
547
|
+
return f.find((g) => c > g.left - p.left && c < g.right + p.right && a > g.top - p.top && a < g.bottom + p.bottom) || d;
|
|
548
548
|
if (f.length >= 2) {
|
|
549
|
-
if (
|
|
550
|
-
const
|
|
549
|
+
if (Y(n) === "y") {
|
|
550
|
+
const b = f[0], P = f[f.length - 1], L = H(n) === "top", T = b.top, C = P.bottom, M = L ? b.left : P.left, B = L ? b.right : P.right, D = B - M, k = C - T;
|
|
551
551
|
return {
|
|
552
|
-
top:
|
|
553
|
-
bottom:
|
|
554
|
-
left:
|
|
552
|
+
top: T,
|
|
553
|
+
bottom: C,
|
|
554
|
+
left: M,
|
|
555
555
|
right: B,
|
|
556
556
|
width: D,
|
|
557
557
|
height: k,
|
|
558
|
-
x:
|
|
559
|
-
y:
|
|
558
|
+
x: M,
|
|
559
|
+
y: T
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
|
-
const g =
|
|
562
|
+
const g = H(n) === "left", w = E(...f.map((b) => b.right)), y = W(...f.map((b) => b.left)), v = f.filter((b) => g ? b.left === y : b.right === w), R = v[0].top, x = v[v.length - 1].bottom, A = y, O = w, $ = O - A, S = x - R;
|
|
563
563
|
return {
|
|
564
564
|
top: R,
|
|
565
|
-
bottom:
|
|
566
|
-
left:
|
|
565
|
+
bottom: x,
|
|
566
|
+
left: A,
|
|
567
567
|
right: O,
|
|
568
|
-
width:
|
|
568
|
+
width: $,
|
|
569
569
|
height: S,
|
|
570
|
-
x:
|
|
570
|
+
x: A,
|
|
571
571
|
y: R
|
|
572
572
|
};
|
|
573
573
|
}
|
|
574
574
|
return d;
|
|
575
575
|
}
|
|
576
|
-
const
|
|
576
|
+
const h = await r.getElementRects({
|
|
577
577
|
reference: {
|
|
578
|
-
getBoundingClientRect:
|
|
578
|
+
getBoundingClientRect: m
|
|
579
579
|
},
|
|
580
580
|
floating: o.floating,
|
|
581
581
|
strategy: s
|
|
582
582
|
});
|
|
583
|
-
return i.reference.x !==
|
|
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
584
|
reset: {
|
|
585
|
-
rects:
|
|
585
|
+
rects: h
|
|
586
586
|
}
|
|
587
587
|
} : {};
|
|
588
588
|
}
|
|
589
589
|
};
|
|
590
590
|
}, Pe = /* @__PURE__ */ new Set(["left", "top"]);
|
|
591
|
-
async function
|
|
591
|
+
async function Ce(t, e) {
|
|
592
592
|
const {
|
|
593
593
|
placement: n,
|
|
594
594
|
platform: o,
|
|
595
595
|
elements: i
|
|
596
|
-
} = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s =
|
|
596
|
+
} = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = H(n), l = V(n), c = Y(n) === "y", a = Pe.has(s) ? -1 : 1, u = r && c ? -1 : 1, f = J(e, t);
|
|
597
597
|
let {
|
|
598
598
|
mainAxis: d,
|
|
599
|
-
crossAxis:
|
|
600
|
-
alignmentAxis:
|
|
599
|
+
crossAxis: p,
|
|
600
|
+
alignmentAxis: m
|
|
601
601
|
} = typeof f == "number" ? {
|
|
602
602
|
mainAxis: f,
|
|
603
603
|
crossAxis: 0,
|
|
@@ -607,12 +607,12 @@ async function Ae(t, e) {
|
|
|
607
607
|
crossAxis: f.crossAxis || 0,
|
|
608
608
|
alignmentAxis: f.alignmentAxis
|
|
609
609
|
};
|
|
610
|
-
return l && typeof
|
|
611
|
-
x:
|
|
610
|
+
return l && typeof m == "number" && (p = l === "end" ? m * -1 : m), c ? {
|
|
611
|
+
x: p * u,
|
|
612
612
|
y: d * a
|
|
613
613
|
} : {
|
|
614
614
|
x: d * a,
|
|
615
|
-
y:
|
|
615
|
+
y: p * u
|
|
616
616
|
};
|
|
617
617
|
}
|
|
618
618
|
const Ee = function(t) {
|
|
@@ -626,7 +626,7 @@ const Ee = function(t) {
|
|
|
626
626
|
y: r,
|
|
627
627
|
placement: s,
|
|
628
628
|
middlewareData: l
|
|
629
|
-
} = e, c = await
|
|
629
|
+
} = e, c = await Ce(e, t);
|
|
630
630
|
return s === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
|
|
631
631
|
x: i + c.x,
|
|
632
632
|
y: r + c.y,
|
|
@@ -637,7 +637,7 @@ const Ee = function(t) {
|
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
639
|
};
|
|
640
|
-
},
|
|
640
|
+
}, Se = function(t) {
|
|
641
641
|
return t === void 0 && (t = {}), {
|
|
642
642
|
name: "size",
|
|
643
643
|
options: t,
|
|
@@ -652,25 +652,25 @@ const Ee = function(t) {
|
|
|
652
652
|
apply: c = () => {
|
|
653
653
|
},
|
|
654
654
|
...a
|
|
655
|
-
} = J(t, e),
|
|
656
|
-
width:
|
|
657
|
-
height:
|
|
655
|
+
} = J(t, e), u = await ot(e, a), f = H(i), d = V(i), p = Y(i) === "y", {
|
|
656
|
+
width: m,
|
|
657
|
+
height: h
|
|
658
658
|
} = r.floating;
|
|
659
659
|
let g, w;
|
|
660
660
|
f === "top" || f === "bottom" ? (g = f, w = d === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (w = f, g = d === "end" ? "top" : "bottom");
|
|
661
|
-
const
|
|
662
|
-
let O = R,
|
|
663
|
-
if ((n = e.middlewareData.shift) != null && n.enabled.x && (
|
|
664
|
-
const
|
|
665
|
-
|
|
661
|
+
const y = h - u.top - u.bottom, v = m - u.left - u.right, R = W(h - u[g], y), x = W(m - u[w], v), A = !e.middlewareData.shift;
|
|
662
|
+
let O = R, $ = x;
|
|
663
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && ($ = v), (o = e.middlewareData.shift) != null && o.enabled.y && (O = y), A && !d) {
|
|
664
|
+
const b = E(u.left, 0), P = E(u.right, 0), L = E(u.top, 0), T = E(u.bottom, 0);
|
|
665
|
+
p ? $ = m - 2 * (b !== 0 || P !== 0 ? b + P : E(u.left, u.right)) : O = h - 2 * (L !== 0 || T !== 0 ? L + T : E(u.top, u.bottom));
|
|
666
666
|
}
|
|
667
667
|
await c({
|
|
668
668
|
...e,
|
|
669
|
-
availableWidth:
|
|
669
|
+
availableWidth: $,
|
|
670
670
|
availableHeight: O
|
|
671
671
|
});
|
|
672
672
|
const S = await s.getDimensions(l.floating);
|
|
673
|
-
return
|
|
673
|
+
return m !== S.width || h !== S.height ? {
|
|
674
674
|
reset: {
|
|
675
675
|
rects: !0
|
|
676
676
|
}
|
|
@@ -684,43 +684,43 @@ function ut() {
|
|
|
684
684
|
function nt(t) {
|
|
685
685
|
return Nt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function F(t) {
|
|
688
688
|
var e;
|
|
689
689
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function X(t) {
|
|
692
692
|
var e;
|
|
693
693
|
return (e = (Nt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
694
694
|
}
|
|
695
695
|
function Nt(t) {
|
|
696
|
-
return ut() ? t instanceof Node || t instanceof
|
|
696
|
+
return ut() ? t instanceof Node || t instanceof F(t).Node : !1;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
699
|
-
return ut() ? t instanceof Element || t instanceof
|
|
698
|
+
function _(t) {
|
|
699
|
+
return ut() ? t instanceof Element || t instanceof F(t).Element : !1;
|
|
700
700
|
}
|
|
701
701
|
function j(t) {
|
|
702
|
-
return ut() ? t instanceof HTMLElement || t instanceof
|
|
702
|
+
return ut() ? t instanceof HTMLElement || t instanceof F(t).HTMLElement : !1;
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
return !ut() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
704
|
+
function Ft(t) {
|
|
705
|
+
return !ut() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof F(t).ShadowRoot;
|
|
706
706
|
}
|
|
707
|
-
const
|
|
707
|
+
const Le = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
708
708
|
function rt(t) {
|
|
709
709
|
const {
|
|
710
710
|
overflow: e,
|
|
711
711
|
overflowX: n,
|
|
712
712
|
overflowY: o,
|
|
713
713
|
display: i
|
|
714
|
-
} =
|
|
715
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !
|
|
714
|
+
} = N(t);
|
|
715
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Le.has(i);
|
|
716
716
|
}
|
|
717
717
|
const Te = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
718
|
-
function
|
|
718
|
+
function De(t) {
|
|
719
719
|
return Te.has(nt(t));
|
|
720
720
|
}
|
|
721
|
-
const
|
|
721
|
+
const ke = [":popover-open", ":modal"];
|
|
722
722
|
function pt(t) {
|
|
723
|
-
return
|
|
723
|
+
return ke.some((e) => {
|
|
724
724
|
try {
|
|
725
725
|
return t.matches(e);
|
|
726
726
|
} catch {
|
|
@@ -728,15 +728,15 @@ function pt(t) {
|
|
|
728
728
|
}
|
|
729
729
|
});
|
|
730
730
|
}
|
|
731
|
-
const
|
|
732
|
-
function
|
|
733
|
-
const e =
|
|
734
|
-
return
|
|
731
|
+
const Fe = ["transform", "translate", "scale", "rotate", "perspective"], $e = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Be = ["paint", "layout", "strict", "content"];
|
|
732
|
+
function Rt(t) {
|
|
733
|
+
const e = Ot(), n = _(t) ? N(t) : t;
|
|
734
|
+
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) || $e.some((o) => (n.willChange || "").includes(o)) || Be.some((o) => (n.contain || "").includes(o));
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function Me(t) {
|
|
737
737
|
let e = K(t);
|
|
738
738
|
for (; j(e) && !et(e); ) {
|
|
739
|
-
if (
|
|
739
|
+
if (Rt(e))
|
|
740
740
|
return e;
|
|
741
741
|
if (pt(e))
|
|
742
742
|
return null;
|
|
@@ -744,18 +744,18 @@ function Be(t) {
|
|
|
744
744
|
}
|
|
745
745
|
return null;
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function Ot() {
|
|
748
748
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
749
749
|
}
|
|
750
750
|
const Ve = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
751
751
|
function et(t) {
|
|
752
752
|
return Ve.has(nt(t));
|
|
753
753
|
}
|
|
754
|
-
function
|
|
755
|
-
return
|
|
754
|
+
function N(t) {
|
|
755
|
+
return F(t).getComputedStyle(t);
|
|
756
756
|
}
|
|
757
757
|
function dt(t) {
|
|
758
|
-
return
|
|
758
|
+
return _(t) ? {
|
|
759
759
|
scrollLeft: t.scrollLeft,
|
|
760
760
|
scrollTop: t.scrollTop
|
|
761
761
|
} : {
|
|
@@ -770,30 +770,30 @@ function K(t) {
|
|
|
770
770
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
771
771
|
t.assignedSlot || // DOM Element detected.
|
|
772
772
|
t.parentNode || // ShadowRoot detected.
|
|
773
|
-
|
|
774
|
-
|
|
773
|
+
Ft(t) && t.host || // Fallback.
|
|
774
|
+
X(t)
|
|
775
775
|
);
|
|
776
|
-
return
|
|
776
|
+
return Ft(e) ? e.host : e;
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function zt(t) {
|
|
779
779
|
const e = K(t);
|
|
780
|
-
return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : j(e) && rt(e) ? e :
|
|
780
|
+
return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : j(e) && rt(e) ? e : zt(e);
|
|
781
781
|
}
|
|
782
782
|
function it(t, e, n) {
|
|
783
783
|
var o;
|
|
784
784
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
785
|
-
const i =
|
|
785
|
+
const i = zt(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = F(i);
|
|
786
786
|
if (r) {
|
|
787
|
-
const l =
|
|
787
|
+
const l = bt(s);
|
|
788
788
|
return e.concat(s, s.visualViewport || [], rt(i) ? i : [], l && n ? it(l) : []);
|
|
789
789
|
}
|
|
790
790
|
return e.concat(i, it(i, [], n));
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function bt(t) {
|
|
793
793
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
const e =
|
|
795
|
+
function jt(t) {
|
|
796
|
+
const e = N(t);
|
|
797
797
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
798
798
|
const i = j(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, l = ct(n) !== r || ct(o) !== s;
|
|
799
799
|
return l && (n = r, o = s), {
|
|
@@ -802,70 +802,66 @@ function zt(t) {
|
|
|
802
802
|
$: l
|
|
803
803
|
};
|
|
804
804
|
}
|
|
805
|
-
function
|
|
806
|
-
return
|
|
805
|
+
function At(t) {
|
|
806
|
+
return _(t) ? t : t.contextElement;
|
|
807
807
|
}
|
|
808
808
|
function Z(t) {
|
|
809
|
-
const e =
|
|
809
|
+
const e = At(t);
|
|
810
810
|
if (!j(e))
|
|
811
811
|
return z(1);
|
|
812
812
|
const n = e.getBoundingClientRect(), {
|
|
813
813
|
width: o,
|
|
814
814
|
height: i,
|
|
815
815
|
$: r
|
|
816
|
-
} =
|
|
816
|
+
} = jt(e);
|
|
817
817
|
let s = (r ? ct(n.width) : n.width) / o, l = (r ? ct(n.height) : n.height) / i;
|
|
818
818
|
return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
819
819
|
x: s,
|
|
820
820
|
y: l
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
|
-
const
|
|
824
|
-
function
|
|
825
|
-
const e =
|
|
826
|
-
return !
|
|
823
|
+
const We = /* @__PURE__ */ z(0);
|
|
824
|
+
function Xt(t) {
|
|
825
|
+
const e = F(t);
|
|
826
|
+
return !Ot() || !e.visualViewport ? We : {
|
|
827
827
|
x: e.visualViewport.offsetLeft,
|
|
828
828
|
y: e.visualViewport.offsetTop
|
|
829
829
|
};
|
|
830
830
|
}
|
|
831
|
-
function
|
|
832
|
-
return e === void 0 && (e = !1), !n || e && n !==
|
|
831
|
+
function He(t, e, n) {
|
|
832
|
+
return e === void 0 && (e = !1), !n || e && n !== F(t) ? !1 : e;
|
|
833
833
|
}
|
|
834
834
|
function Q(t, e, n, o) {
|
|
835
835
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
836
|
-
const i = t.getBoundingClientRect(), r =
|
|
836
|
+
const i = t.getBoundingClientRect(), r = At(t);
|
|
837
837
|
let s = z(1);
|
|
838
|
-
e && (o ?
|
|
839
|
-
const l =
|
|
840
|
-
let c = (i.left + l.x) / s.x, a = (i.top + l.y) / s.y,
|
|
838
|
+
e && (o ? _(o) && (s = Z(o)) : s = Z(t));
|
|
839
|
+
const l = He(r, n, o) ? Xt(r) : z(0);
|
|
840
|
+
let c = (i.left + l.x) / s.x, a = (i.top + l.y) / s.y, u = i.width / s.x, f = i.height / s.y;
|
|
841
841
|
if (r) {
|
|
842
|
-
const d =
|
|
843
|
-
let
|
|
844
|
-
for (;
|
|
845
|
-
const g = Z(
|
|
846
|
-
c *= g.x, a *= g.y,
|
|
842
|
+
const d = F(r), p = o && _(o) ? F(o) : o;
|
|
843
|
+
let m = d, h = bt(m);
|
|
844
|
+
for (; h && o && p !== m; ) {
|
|
845
|
+
const g = Z(h), w = h.getBoundingClientRect(), y = N(h), v = w.left + (h.clientLeft + parseFloat(y.paddingLeft)) * g.x, R = w.top + (h.clientTop + parseFloat(y.paddingTop)) * g.y;
|
|
846
|
+
c *= g.x, a *= g.y, u *= g.x, f *= g.y, c += v, a += R, m = F(h), h = bt(m);
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
849
|
return tt({
|
|
850
|
-
width:
|
|
850
|
+
width: u,
|
|
851
851
|
height: f,
|
|
852
852
|
x: c,
|
|
853
853
|
y: a
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function mt(t, e) {
|
|
857
857
|
const n = dt(t).scrollLeft;
|
|
858
|
-
return e ? e.left + n : Q(
|
|
858
|
+
return e ? e.left + n : Q(X(t)).left + n;
|
|
859
859
|
}
|
|
860
|
-
function
|
|
861
|
-
n
|
|
862
|
-
const o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - (n ? 0 : (
|
|
863
|
-
// RTL <body> scrollbar.
|
|
864
|
-
Pt(t, o)
|
|
865
|
-
)), r = o.top + e.scrollTop;
|
|
860
|
+
function It(t, e) {
|
|
861
|
+
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - mt(t, n), i = n.top + e.scrollTop;
|
|
866
862
|
return {
|
|
867
|
-
x:
|
|
868
|
-
y:
|
|
863
|
+
x: o,
|
|
864
|
+
y: i
|
|
869
865
|
};
|
|
870
866
|
}
|
|
871
867
|
function _e(t) {
|
|
@@ -875,48 +871,54 @@ function _e(t) {
|
|
|
875
871
|
offsetParent: o,
|
|
876
872
|
strategy: i
|
|
877
873
|
} = t;
|
|
878
|
-
const r = i === "fixed", s =
|
|
874
|
+
const r = i === "fixed", s = X(o), l = e ? pt(e.floating) : !1;
|
|
879
875
|
if (o === s || l && r)
|
|
880
876
|
return n;
|
|
881
877
|
let c = {
|
|
882
878
|
scrollLeft: 0,
|
|
883
879
|
scrollTop: 0
|
|
884
880
|
}, a = z(1);
|
|
885
|
-
const
|
|
881
|
+
const u = z(0), f = j(o);
|
|
886
882
|
if ((f || !f && !r) && ((nt(o) !== "body" || rt(s)) && (c = dt(o)), j(o))) {
|
|
887
|
-
const
|
|
888
|
-
a = Z(o),
|
|
883
|
+
const p = Q(o);
|
|
884
|
+
a = Z(o), u.x = p.x + o.clientLeft, u.y = p.y + o.clientTop;
|
|
889
885
|
}
|
|
890
|
-
const d = s && !f && !r ?
|
|
886
|
+
const d = s && !f && !r ? It(s, c) : z(0);
|
|
891
887
|
return {
|
|
892
888
|
width: n.width * a.x,
|
|
893
889
|
height: n.height * a.y,
|
|
894
|
-
x: n.x * a.x - c.scrollLeft * a.x +
|
|
895
|
-
y: n.y * a.y - c.scrollTop * a.y +
|
|
890
|
+
x: n.x * a.x - c.scrollLeft * a.x + u.x + d.x,
|
|
891
|
+
y: n.y * a.y - c.scrollTop * a.y + u.y + d.y
|
|
896
892
|
};
|
|
897
893
|
}
|
|
898
894
|
function Ne(t) {
|
|
899
895
|
return Array.from(t.getClientRects());
|
|
900
896
|
}
|
|
901
|
-
function
|
|
902
|
-
const e =
|
|
903
|
-
let s = -n.scrollLeft +
|
|
897
|
+
function ze(t) {
|
|
898
|
+
const e = X(t), n = dt(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);
|
|
899
|
+
let s = -n.scrollLeft + mt(t);
|
|
904
900
|
const l = -n.scrollTop;
|
|
905
|
-
return
|
|
901
|
+
return N(o).direction === "rtl" && (s += E(e.clientWidth, o.clientWidth) - i), {
|
|
906
902
|
width: i,
|
|
907
903
|
height: r,
|
|
908
904
|
x: s,
|
|
909
905
|
y: l
|
|
910
906
|
};
|
|
911
907
|
}
|
|
912
|
-
|
|
913
|
-
|
|
908
|
+
const $t = 25;
|
|
909
|
+
function je(t, e) {
|
|
910
|
+
const n = F(t), o = X(t), i = n.visualViewport;
|
|
914
911
|
let r = o.clientWidth, s = o.clientHeight, l = 0, c = 0;
|
|
915
912
|
if (i) {
|
|
916
913
|
r = i.width, s = i.height;
|
|
917
|
-
const
|
|
918
|
-
(!
|
|
914
|
+
const u = Ot();
|
|
915
|
+
(!u || u && e === "fixed") && (l = i.offsetLeft, c = i.offsetTop);
|
|
919
916
|
}
|
|
917
|
+
const a = mt(o);
|
|
918
|
+
if (a <= 0) {
|
|
919
|
+
const u = o.ownerDocument, f = u.body, d = getComputedStyle(f), p = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, m = Math.abs(o.clientWidth - f.clientWidth - p);
|
|
920
|
+
m <= $t && (r -= m);
|
|
921
|
+
} else a <= $t && (r += a);
|
|
920
922
|
return {
|
|
921
923
|
width: r,
|
|
922
924
|
height: s,
|
|
@@ -924,8 +926,8 @@ function ze(t, e) {
|
|
|
924
926
|
y: c
|
|
925
927
|
};
|
|
926
928
|
}
|
|
927
|
-
const
|
|
928
|
-
function
|
|
929
|
+
const Xe = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
930
|
+
function Ie(t, e) {
|
|
929
931
|
const n = Q(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = j(t) ? Z(t) : z(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, c = i * r.x, a = o * r.y;
|
|
930
932
|
return {
|
|
931
933
|
width: s,
|
|
@@ -934,16 +936,16 @@ function Ye(t, e) {
|
|
|
934
936
|
y: a
|
|
935
937
|
};
|
|
936
938
|
}
|
|
937
|
-
function
|
|
939
|
+
function Bt(t, e, n) {
|
|
938
940
|
let o;
|
|
939
941
|
if (e === "viewport")
|
|
940
|
-
o =
|
|
942
|
+
o = je(t, n);
|
|
941
943
|
else if (e === "document")
|
|
942
|
-
o =
|
|
943
|
-
else if (
|
|
944
|
-
o =
|
|
944
|
+
o = ze(X(t));
|
|
945
|
+
else if (_(e))
|
|
946
|
+
o = Ie(e, n);
|
|
945
947
|
else {
|
|
946
|
-
const i =
|
|
948
|
+
const i = Xt(t);
|
|
947
949
|
o = {
|
|
948
950
|
x: e.x - i.x,
|
|
949
951
|
y: e.y - i.y,
|
|
@@ -953,34 +955,34 @@ function Ft(t, e, n) {
|
|
|
953
955
|
}
|
|
954
956
|
return tt(o);
|
|
955
957
|
}
|
|
956
|
-
function
|
|
958
|
+
function Yt(t, e) {
|
|
957
959
|
const n = K(t);
|
|
958
|
-
return n === e || !
|
|
960
|
+
return n === e || !_(n) || et(n) ? !1 : N(n).position === "fixed" || Yt(n, e);
|
|
959
961
|
}
|
|
960
|
-
function
|
|
962
|
+
function Ye(t, e) {
|
|
961
963
|
const n = e.get(t);
|
|
962
964
|
if (n)
|
|
963
965
|
return n;
|
|
964
|
-
let o = it(t, [], !1).filter((l) =>
|
|
965
|
-
const r =
|
|
966
|
+
let o = it(t, [], !1).filter((l) => _(l) && nt(l) !== "body"), i = null;
|
|
967
|
+
const r = N(t).position === "fixed";
|
|
966
968
|
let s = r ? K(t) : t;
|
|
967
|
-
for (;
|
|
968
|
-
const l =
|
|
969
|
-
!c && l.position === "fixed" && (i = null), (r ? !c && !i : !c && l.position === "static" && !!i &&
|
|
969
|
+
for (; _(s) && !et(s); ) {
|
|
970
|
+
const l = N(s), c = Rt(s);
|
|
971
|
+
!c && l.position === "fixed" && (i = null), (r ? !c && !i : !c && l.position === "static" && !!i && Xe.has(i.position) || rt(s) && !c && Yt(t, s)) ? o = o.filter((u) => u !== s) : i = l, s = K(s);
|
|
970
972
|
}
|
|
971
973
|
return e.set(t, o), o;
|
|
972
974
|
}
|
|
973
|
-
function
|
|
975
|
+
function Ue(t) {
|
|
974
976
|
let {
|
|
975
977
|
element: e,
|
|
976
978
|
boundary: n,
|
|
977
979
|
rootBoundary: o,
|
|
978
980
|
strategy: i
|
|
979
981
|
} = t;
|
|
980
|
-
const s = [...n === "clippingAncestors" ? pt(e) ? [] :
|
|
981
|
-
const f =
|
|
982
|
-
return a.top =
|
|
983
|
-
},
|
|
982
|
+
const s = [...n === "clippingAncestors" ? pt(e) ? [] : Ye(e, this._c) : [].concat(n), o], l = s[0], c = s.reduce((a, u) => {
|
|
983
|
+
const f = Bt(e, u, i);
|
|
984
|
+
return a.top = E(f.top, a.top), a.right = W(f.right, a.right), a.bottom = W(f.bottom, a.bottom), a.left = E(f.left, a.left), a;
|
|
985
|
+
}, Bt(e, l, i));
|
|
984
986
|
return {
|
|
985
987
|
width: c.right - c.left,
|
|
986
988
|
height: c.bottom - c.top,
|
|
@@ -988,33 +990,33 @@ function Xe(t) {
|
|
|
988
990
|
y: c.top
|
|
989
991
|
};
|
|
990
992
|
}
|
|
991
|
-
function
|
|
993
|
+
function qe(t) {
|
|
992
994
|
const {
|
|
993
995
|
width: e,
|
|
994
996
|
height: n
|
|
995
|
-
} =
|
|
997
|
+
} = jt(t);
|
|
996
998
|
return {
|
|
997
999
|
width: e,
|
|
998
1000
|
height: n
|
|
999
1001
|
};
|
|
1000
1002
|
}
|
|
1001
|
-
function
|
|
1002
|
-
const o = j(e), i =
|
|
1003
|
+
function Ke(t, e, n) {
|
|
1004
|
+
const o = j(e), i = X(e), r = n === "fixed", s = Q(t, !0, r, e);
|
|
1003
1005
|
let l = {
|
|
1004
1006
|
scrollLeft: 0,
|
|
1005
1007
|
scrollTop: 0
|
|
1006
1008
|
};
|
|
1007
1009
|
const c = z(0);
|
|
1008
1010
|
function a() {
|
|
1009
|
-
c.x =
|
|
1011
|
+
c.x = mt(i);
|
|
1010
1012
|
}
|
|
1011
1013
|
if (o || !o && !r)
|
|
1012
1014
|
if ((nt(e) !== "body" || rt(i)) && (l = dt(e)), o) {
|
|
1013
|
-
const
|
|
1014
|
-
c.x =
|
|
1015
|
+
const p = Q(e, !0, r, e);
|
|
1016
|
+
c.x = p.x + e.clientLeft, c.y = p.y + e.clientTop;
|
|
1015
1017
|
} else i && a();
|
|
1016
1018
|
r && !o && i && a();
|
|
1017
|
-
const
|
|
1019
|
+
const u = i && !o && !r ? It(i, l) : z(0), f = s.left + l.scrollLeft - c.x - u.x, d = s.top + l.scrollTop - c.y - u.y;
|
|
1018
1020
|
return {
|
|
1019
1021
|
x: f,
|
|
1020
1022
|
y: d,
|
|
@@ -1022,39 +1024,39 @@ function qe(t, e, n) {
|
|
|
1022
1024
|
height: s.height
|
|
1023
1025
|
};
|
|
1024
1026
|
}
|
|
1025
|
-
function
|
|
1026
|
-
return
|
|
1027
|
+
function wt(t) {
|
|
1028
|
+
return N(t).position === "static";
|
|
1027
1029
|
}
|
|
1028
|
-
function
|
|
1029
|
-
if (!j(t) ||
|
|
1030
|
+
function Mt(t, e) {
|
|
1031
|
+
if (!j(t) || N(t).position === "fixed")
|
|
1030
1032
|
return null;
|
|
1031
1033
|
if (e)
|
|
1032
1034
|
return e(t);
|
|
1033
1035
|
let n = t.offsetParent;
|
|
1034
|
-
return
|
|
1036
|
+
return X(t) === n && (n = n.ownerDocument.body), n;
|
|
1035
1037
|
}
|
|
1036
|
-
function
|
|
1037
|
-
const n =
|
|
1038
|
+
function Ut(t, e) {
|
|
1039
|
+
const n = F(t);
|
|
1038
1040
|
if (pt(t))
|
|
1039
1041
|
return n;
|
|
1040
1042
|
if (!j(t)) {
|
|
1041
1043
|
let i = K(t);
|
|
1042
1044
|
for (; i && !et(i); ) {
|
|
1043
|
-
if (
|
|
1045
|
+
if (_(i) && !wt(i))
|
|
1044
1046
|
return i;
|
|
1045
1047
|
i = K(i);
|
|
1046
1048
|
}
|
|
1047
1049
|
return n;
|
|
1048
1050
|
}
|
|
1049
|
-
let o =
|
|
1050
|
-
for (; o &&
|
|
1051
|
-
o =
|
|
1052
|
-
return o && et(o) &&
|
|
1051
|
+
let o = Mt(t, e);
|
|
1052
|
+
for (; o && De(o) && wt(o); )
|
|
1053
|
+
o = Mt(o, e);
|
|
1054
|
+
return o && et(o) && wt(o) && !Rt(o) ? n : o || Me(t) || n;
|
|
1053
1055
|
}
|
|
1054
|
-
const
|
|
1055
|
-
const e = this.getOffsetParent ||
|
|
1056
|
+
const Ge = async function(t) {
|
|
1057
|
+
const e = this.getOffsetParent || Ut, n = this.getDimensions, o = await n(t.floating);
|
|
1056
1058
|
return {
|
|
1057
|
-
reference:
|
|
1059
|
+
reference: Ke(t.reference, await e(t.floating), t.strategy),
|
|
1058
1060
|
floating: {
|
|
1059
1061
|
x: 0,
|
|
1060
1062
|
y: 0,
|
|
@@ -1063,27 +1065,27 @@ const Ke = async function(t) {
|
|
|
1063
1065
|
}
|
|
1064
1066
|
};
|
|
1065
1067
|
};
|
|
1066
|
-
function
|
|
1067
|
-
return
|
|
1068
|
+
function Je(t) {
|
|
1069
|
+
return N(t).direction === "rtl";
|
|
1068
1070
|
}
|
|
1069
|
-
const
|
|
1071
|
+
const Qe = {
|
|
1070
1072
|
convertOffsetParentRelativeRectToViewportRelativeRect: _e,
|
|
1071
|
-
getDocumentElement:
|
|
1072
|
-
getClippingRect:
|
|
1073
|
-
getOffsetParent:
|
|
1074
|
-
getElementRects:
|
|
1073
|
+
getDocumentElement: X,
|
|
1074
|
+
getClippingRect: Ue,
|
|
1075
|
+
getOffsetParent: Ut,
|
|
1076
|
+
getElementRects: Ge,
|
|
1075
1077
|
getClientRects: Ne,
|
|
1076
|
-
getDimensions:
|
|
1078
|
+
getDimensions: qe,
|
|
1077
1079
|
getScale: Z,
|
|
1078
|
-
isElement:
|
|
1079
|
-
isRTL:
|
|
1080
|
+
isElement: _,
|
|
1081
|
+
isRTL: Je
|
|
1080
1082
|
};
|
|
1081
|
-
function
|
|
1083
|
+
function qt(t, e) {
|
|
1082
1084
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1083
1085
|
}
|
|
1084
|
-
function
|
|
1086
|
+
function Ze(t, e) {
|
|
1085
1087
|
let n = null, o;
|
|
1086
|
-
const i =
|
|
1088
|
+
const i = X(t);
|
|
1087
1089
|
function r() {
|
|
1088
1090
|
var l;
|
|
1089
1091
|
clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
|
|
@@ -1091,20 +1093,20 @@ function Qe(t, e) {
|
|
|
1091
1093
|
function s(l, c) {
|
|
1092
1094
|
l === void 0 && (l = !1), c === void 0 && (c = 1), r();
|
|
1093
1095
|
const a = t.getBoundingClientRect(), {
|
|
1094
|
-
left:
|
|
1096
|
+
left: u,
|
|
1095
1097
|
top: f,
|
|
1096
1098
|
width: d,
|
|
1097
|
-
height:
|
|
1099
|
+
height: p
|
|
1098
1100
|
} = a;
|
|
1099
|
-
if (l || e(), !d || !
|
|
1101
|
+
if (l || e(), !d || !p)
|
|
1100
1102
|
return;
|
|
1101
|
-
const
|
|
1102
|
-
rootMargin: -
|
|
1103
|
-
threshold:
|
|
1103
|
+
const m = st(f), h = st(i.clientWidth - (u + d)), g = st(i.clientHeight - (f + p)), w = st(u), v = {
|
|
1104
|
+
rootMargin: -m + "px " + -h + "px " + -g + "px " + -w + "px",
|
|
1105
|
+
threshold: E(0, W(1, c)) || 1
|
|
1104
1106
|
};
|
|
1105
1107
|
let R = !0;
|
|
1106
|
-
function
|
|
1107
|
-
const O =
|
|
1108
|
+
function x(A) {
|
|
1109
|
+
const O = A[0].intersectionRatio;
|
|
1108
1110
|
if (O !== c) {
|
|
1109
1111
|
if (!R)
|
|
1110
1112
|
return s();
|
|
@@ -1112,22 +1114,22 @@ function Qe(t, e) {
|
|
|
1112
1114
|
s(!1, 1e-7);
|
|
1113
1115
|
}, 1e3);
|
|
1114
1116
|
}
|
|
1115
|
-
O === 1 && !
|
|
1117
|
+
O === 1 && !qt(a, t.getBoundingClientRect()) && s(), R = !1;
|
|
1116
1118
|
}
|
|
1117
1119
|
try {
|
|
1118
|
-
n = new IntersectionObserver(
|
|
1119
|
-
...
|
|
1120
|
+
n = new IntersectionObserver(x, {
|
|
1121
|
+
...v,
|
|
1120
1122
|
// Handle <iframe>s
|
|
1121
1123
|
root: i.ownerDocument
|
|
1122
1124
|
});
|
|
1123
1125
|
} catch {
|
|
1124
|
-
n = new IntersectionObserver(
|
|
1126
|
+
n = new IntersectionObserver(x, v);
|
|
1125
1127
|
}
|
|
1126
1128
|
n.observe(t);
|
|
1127
1129
|
}
|
|
1128
1130
|
return s(!0), r;
|
|
1129
1131
|
}
|
|
1130
|
-
function
|
|
1132
|
+
function tn(t, e, n, o) {
|
|
1131
1133
|
o === void 0 && (o = {});
|
|
1132
1134
|
const {
|
|
1133
1135
|
ancestorScroll: i = !0,
|
|
@@ -1135,58 +1137,58 @@ function Ze(t, e, n, o) {
|
|
|
1135
1137
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1136
1138
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
1137
1139
|
animationFrame: c = !1
|
|
1138
|
-
} = o, a =
|
|
1139
|
-
|
|
1140
|
+
} = o, a = At(t), u = i || r ? [...a ? it(a) : [], ...it(e)] : [];
|
|
1141
|
+
u.forEach((w) => {
|
|
1140
1142
|
i && w.addEventListener("scroll", n, {
|
|
1141
1143
|
passive: !0
|
|
1142
1144
|
}), r && w.addEventListener("resize", n);
|
|
1143
1145
|
});
|
|
1144
|
-
const f = a && l ?
|
|
1145
|
-
let d = -1,
|
|
1146
|
-
s && (
|
|
1147
|
-
let [
|
|
1148
|
-
|
|
1149
|
-
var
|
|
1150
|
-
(
|
|
1146
|
+
const f = a && l ? Ze(a, n) : null;
|
|
1147
|
+
let d = -1, p = null;
|
|
1148
|
+
s && (p = new ResizeObserver((w) => {
|
|
1149
|
+
let [y] = w;
|
|
1150
|
+
y && y.target === a && p && (p.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1151
|
+
var v;
|
|
1152
|
+
(v = p) == null || v.observe(e);
|
|
1151
1153
|
})), n();
|
|
1152
|
-
}), a && !c &&
|
|
1153
|
-
let
|
|
1154
|
+
}), a && !c && p.observe(a), p.observe(e));
|
|
1155
|
+
let m, h = c ? Q(t) : null;
|
|
1154
1156
|
c && g();
|
|
1155
1157
|
function g() {
|
|
1156
1158
|
const w = Q(t);
|
|
1157
|
-
|
|
1159
|
+
h && !qt(h, w) && n(), h = w, m = requestAnimationFrame(g);
|
|
1158
1160
|
}
|
|
1159
1161
|
return n(), () => {
|
|
1160
1162
|
var w;
|
|
1161
|
-
|
|
1162
|
-
i &&
|
|
1163
|
-
}), f?.(), (w =
|
|
1163
|
+
u.forEach((y) => {
|
|
1164
|
+
i && y.removeEventListener("scroll", n), r && y.removeEventListener("resize", n);
|
|
1165
|
+
}), f?.(), (w = p) == null || w.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
1164
1166
|
};
|
|
1165
1167
|
}
|
|
1166
|
-
const
|
|
1168
|
+
const en = Ee, Vt = ve, nn = xe, on = Se, rn = Re, sn = be, ln = Ae, cn = (t, e, n) => {
|
|
1167
1169
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
1168
|
-
platform:
|
|
1170
|
+
platform: Qe,
|
|
1169
1171
|
...n
|
|
1170
1172
|
}, r = {
|
|
1171
1173
|
...i.platform,
|
|
1172
1174
|
_c: o
|
|
1173
1175
|
};
|
|
1174
|
-
return
|
|
1176
|
+
return we(t, e, {
|
|
1175
1177
|
...i,
|
|
1176
1178
|
platform: r
|
|
1177
1179
|
});
|
|
1178
1180
|
};
|
|
1179
|
-
var
|
|
1181
|
+
var an = Object.defineProperty, U = (t, e, n, o) => {
|
|
1180
1182
|
for (var i = void 0, r = t.length - 1, s; r >= 0; r--)
|
|
1181
1183
|
(s = t[r]) && (i = s(e, n, i) || i);
|
|
1182
|
-
return i &&
|
|
1184
|
+
return i && an(e, n, i), i;
|
|
1183
1185
|
};
|
|
1184
1186
|
const lt = {
|
|
1185
1187
|
Flip: "flip",
|
|
1186
1188
|
AutoPlacementHorizontal: "auto-placement-horizontal",
|
|
1187
1189
|
AutoPlacementVertical: "auto-placement-vertical"
|
|
1188
|
-
},
|
|
1189
|
-
[lt.Flip]:
|
|
1190
|
+
}, fn = {
|
|
1191
|
+
[lt.Flip]: nn(),
|
|
1190
1192
|
[lt.AutoPlacementHorizontal]: Vt({
|
|
1191
1193
|
allowedPlacements: [
|
|
1192
1194
|
"bottom",
|
|
@@ -1208,16 +1210,16 @@ const lt = {
|
|
|
1208
1210
|
]
|
|
1209
1211
|
})
|
|
1210
1212
|
};
|
|
1211
|
-
class I extends
|
|
1213
|
+
class I extends te {
|
|
1212
1214
|
constructor() {
|
|
1213
1215
|
super(...arguments), this.open = !1, this.dismissible = !1, this.arrow = !1, this.alternate = !1, this.placementStrategy = lt.Flip, this.animationFrame = !1, this.strategy = "fixed", this.offset = null, this.#i = () => (this.#n = this.updatePosition(), this.#n);
|
|
1214
1216
|
}
|
|
1215
1217
|
get #r() {
|
|
1216
1218
|
let e = [
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1219
|
+
ln(),
|
|
1220
|
+
fn[this.placementStrategy],
|
|
1221
|
+
rn(),
|
|
1222
|
+
on({
|
|
1221
1223
|
apply({ availableWidth: o, availableHeight: i, elements: r }) {
|
|
1222
1224
|
Object.assign(r.floating.style, {
|
|
1223
1225
|
maxWidth: `${o}px`,
|
|
@@ -1228,8 +1230,8 @@ class I extends Zt {
|
|
|
1228
1230
|
], n = this.offset ?? 0;
|
|
1229
1231
|
return this.arrow && (n += 12, e = [
|
|
1230
1232
|
...e,
|
|
1231
|
-
|
|
1232
|
-
]), n > 0 && e.unshift(
|
|
1233
|
+
sn({ element: this.arrowEl, padding: 10 })
|
|
1234
|
+
]), n > 0 && e.unshift(en(n)), e;
|
|
1233
1235
|
}
|
|
1234
1236
|
#o;
|
|
1235
1237
|
openChanged(e, n) {
|
|
@@ -1260,7 +1262,7 @@ class I extends Zt {
|
|
|
1260
1262
|
super.disconnectedCallback(), this.#t();
|
|
1261
1263
|
}
|
|
1262
1264
|
#t() {
|
|
1263
|
-
this.#o?.(), this.open && this.controlEl && this.controlEl.classList.add("open"), this.anchorEl && this.open && this.popupEl && (this.#o =
|
|
1265
|
+
this.#o?.(), this.open && this.controlEl && this.controlEl.classList.add("open"), this.anchorEl && this.open && this.popupEl && (this.#o = tn(
|
|
1264
1266
|
this.anchorEl,
|
|
1265
1267
|
this.popupEl,
|
|
1266
1268
|
this.#i,
|
|
@@ -1282,7 +1284,7 @@ class I extends Zt {
|
|
|
1282
1284
|
async updatePosition() {
|
|
1283
1285
|
if (!this.open || !this.anchorEl)
|
|
1284
1286
|
return;
|
|
1285
|
-
const e = await
|
|
1287
|
+
const e = await cn(this.anchorEl, this.popupEl, {
|
|
1286
1288
|
placement: this.placement,
|
|
1287
1289
|
strategy: this.strategy,
|
|
1288
1290
|
middleware: this.#r
|
|
@@ -1353,54 +1355,54 @@ U([
|
|
|
1353
1355
|
G({ mode: "fromView" })
|
|
1354
1356
|
], I.prototype, "strategy");
|
|
1355
1357
|
U([
|
|
1356
|
-
G({ attribute: "offset", converter:
|
|
1358
|
+
G({ attribute: "offset", converter: ee })
|
|
1357
1359
|
], I.prototype, "offset");
|
|
1358
1360
|
U([
|
|
1359
|
-
|
|
1361
|
+
ne
|
|
1360
1362
|
], I.prototype, "anchor");
|
|
1361
|
-
const
|
|
1363
|
+
const un = ":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}.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}", pn = ({ open: t, dismissible: e, alternate: n }) => re(
|
|
1362
1364
|
"control",
|
|
1363
1365
|
["open", !!t],
|
|
1364
1366
|
["dismissible", !!e],
|
|
1365
1367
|
["alternate", !!n]
|
|
1366
1368
|
);
|
|
1367
|
-
function
|
|
1369
|
+
function dn(t) {
|
|
1368
1370
|
return t.strategy && t.strategy === "fixed" ? "manual" : null;
|
|
1369
1371
|
}
|
|
1370
|
-
const
|
|
1371
|
-
const e = t.tagFor(
|
|
1372
|
-
return
|
|
1372
|
+
const mn = (t) => {
|
|
1373
|
+
const e = t.tagFor(Qt), n = t.tagFor(Gt);
|
|
1374
|
+
return ht`
|
|
1373
1375
|
<${e}>
|
|
1374
|
-
<div popover="${
|
|
1375
|
-
<div ${
|
|
1376
|
+
<div popover="${dn}" class="popup-wrapper ${(o) => o.strategy}" ${gt("popupEl")} part="popup-base">
|
|
1377
|
+
<div ${gt("controlEl")} class="${pn}" aria-hidden="${(o) => o.open ? "false" : "true"}"
|
|
1376
1378
|
part="${(o) => o.alternate ? "vvd-theme-alternate" : ""}">
|
|
1377
1379
|
<div class="popup-content">
|
|
1378
1380
|
<slot></slot>
|
|
1379
|
-
${
|
|
1381
|
+
${Pt(
|
|
1380
1382
|
(o) => o.dismissible,
|
|
1381
|
-
|
|
1383
|
+
ht`<${n} size="condensed" @click="${(o) => o.open = !1}"
|
|
1382
1384
|
class="dismissible-button" icon="close-small-solid" shape="pill"></${n}>`
|
|
1383
1385
|
)}
|
|
1384
1386
|
</div>
|
|
1385
|
-
${
|
|
1387
|
+
${Pt(
|
|
1386
1388
|
(o) => o.arrow,
|
|
1387
|
-
|
|
1389
|
+
ht`<div class="arrow" ${gt("arrowEl")}></div>`
|
|
1388
1390
|
)}
|
|
1389
1391
|
</div>
|
|
1390
1392
|
</div>
|
|
1391
1393
|
</${e}>`;
|
|
1392
|
-
},
|
|
1394
|
+
}, hn = ie(
|
|
1393
1395
|
"popup",
|
|
1394
1396
|
I,
|
|
1395
|
-
|
|
1396
|
-
[
|
|
1397
|
+
mn,
|
|
1398
|
+
[Zt, Jt],
|
|
1397
1399
|
{
|
|
1398
|
-
styles:
|
|
1400
|
+
styles: un
|
|
1399
1401
|
}
|
|
1400
|
-
),
|
|
1402
|
+
), Rn = oe(hn);
|
|
1401
1403
|
export {
|
|
1402
1404
|
I as P,
|
|
1403
1405
|
lt as a,
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
+
hn as p,
|
|
1407
|
+
Rn as r
|
|
1406
1408
|
};
|