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