@viasat/beam-web-components 2.10.0 → 2.10.2
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/Tooltip/Tooltip.js +873 -822
- package/custom-elements.json +2635 -2635
- package/local/Tooltip/Tooltip.js +868 -817
- package/package.json +6 -6
- package/vscode.html-custom-data.json +280 -280
package/local/Tooltip/Tooltip.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { r as xt, i as he, x as
|
|
2
|
-
import { n as
|
|
3
|
-
import { e as zt, n as
|
|
4
|
-
import { e as ge, f as
|
|
1
|
+
import { r as xt, i as he, x as Xt, a as qt } from "../chunks/lit-element.CJtt9wj5.js";
|
|
2
|
+
import { n as b, c as Gt } from "../chunks/register-custom-element.vod7zfGv.js";
|
|
3
|
+
import { e as zt, n as Dt } from "../chunks/ref.B7e1Hu4F.js";
|
|
4
|
+
import { e as ge, f as Tt, h as ve, g as Zt, c as bt } from "../chunks/classNames.C6fNrXWF.js";
|
|
5
5
|
import { p as be, t as ye } from "../chunks/constants.jOWREYQE.js";
|
|
6
6
|
import { e as we, f as xe } from "../chunks/tokens.CTW8Tt94.js";
|
|
7
|
-
import { c as Ce, d as
|
|
7
|
+
import { c as Ce, d as kt, m as $t, r as Oe, h as Ae, e as Jt, f as Bt } from "../chunks/helpers.BWcXAteC.js";
|
|
8
8
|
import { r as Ee } from "../chunks/state.CqiuSzAl.js";
|
|
9
|
-
const Qt = `:root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]{--bm-comp-tooltip-color-bg: var(--bm-sem-color-surface-inverse, #202e39);--bm-comp-tooltip-color-text: var( --bm-sem-color-text-primary-inverse, #ffffff );--bm-comp-tooltip-color-icon-trigger: var( --bm-sem-color-icon-secondary, #576775 );--bm-comp-tooltip-radius: var(--bm-sem-radius-sm, .25rem);--bm-comp-tooltip-space-x: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-y: var(--bm-sem-space-50, .5rem);--bm-comp-tooltip-space-arrow: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-offset: var(--bm-sem-space-25, .25rem);--bm-comp-tooltip-size-arrow-width: .625rem;--bm-comp-tooltip-size-arrow-height: var( --bm-primitive-dimension-25, .25rem );--bm-comp-tooltip-size-width: var(--bm-primitive-dimension-1500, 15rem);--bm-comp-tooltip-size-icon-trigger-xs: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-tooltip-size-icon-trigger-sm: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-tooltip-size-icon-trigger-md: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-tooltip-size-icon-trigger-lg: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-tooltip-size-icon-trigger-xl: var(--bm-sem-size-icon-xl, 1.75rem);--bm-comp-tooltip-typo-body: var( --bm-sem-typo-compact-body-sm, 400 .875rem/1rem "Source Sans Pro" )}:host,.bm-dark,.bm-light .bm-inverse,[data-bm-theme~=bm-dark]{--bm-comp-tooltip-color-bg: var(--bm-sem-color-surface-inverse, #ffffff);--bm-comp-tooltip-color-text: var( --bm-sem-color-text-primary-inverse, #141d24 );--bm-comp-tooltip-color-icon-trigger: var( --bm-sem-color-icon-secondary, #c3cdd5 );--bm-comp-tooltip-radius: var(--bm-sem-radius-sm, .25rem);--bm-comp-tooltip-space-x: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-y: var(--bm-sem-space-50, .5rem);--bm-comp-tooltip-space-arrow: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-offset: var(--bm-sem-space-25, .25rem);--bm-comp-tooltip-size-arrow-width: .625rem;--bm-comp-tooltip-size-arrow-height: var( --bm-primitive-dimension-25, .25rem );--bm-comp-tooltip-size-width: var(--bm-primitive-dimension-1500, 15rem);--bm-comp-tooltip-size-icon-trigger-xs: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-tooltip-size-icon-trigger-sm: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-tooltip-size-icon-trigger-md: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-tooltip-size-icon-trigger-lg: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-tooltip-size-icon-trigger-xl: var(--bm-sem-size-icon-xl, 1.75rem);--bm-comp-tooltip-typo-body: var( --bm-sem-typo-compact-body-sm, 400 .875rem/1rem "Source Sans Pro" )}.bm-tooltip__icon-trigger{border:none;background:none;padding:0;margin:0;display:flex;cursor:pointer;color:var(--bm-comp-tooltip-color-icon-trigger)}.bm-tooltip{z-index:999;background-color:var(--bm-comp-tooltip-color-bg);border-radius:var(--bm-comp-tooltip-radius);max-width:var(--bm-comp-tooltip-size-width);padding:var(--bm-comp-tooltip-space-y) var(--bm-comp-tooltip-space-x);color:var(--bm-comp-tooltip-color-text);font:var(--bm-comp-tooltip-typo-body);offset:var(--bm-comp-tooltip-space-offset);transition-property:opacity}.bm-tooltip[data-status=open]{transition-duration:0s}.bm-tooltip[data-status=close]{transition-duration:.2s}.bm-tooltip[data-status=initial],.bm-tooltip[data-status=close]{opacity:0}.bm-tooltip__arrow{offset:var(--bm-comp-tooltip-space-arrow);-webkit-mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="4" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.515c.69.647 1.81.647 2.5 0L10 0H0l3.75 3.515Z" fill="%23202E39"/></svg>');-webkit-mask-size:cover;-webkit-mask-position:center;-webkit-mask-repeat:no-repeat;mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="4" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.515c.69.647 1.81.647 2.5 0L10 0H0l3.75 3.515Z" fill="%23202E39"/></svg>');mask-size:cover;mask-position:center;mask-repeat:no-repeat;scale:1.05;width:var(--bm-comp-tooltip-size-arrow-width);height:var(--bm-comp-tooltip-size-arrow-height);background-color:var(--bm-comp-tooltip-color-bg)}.bm-tooltip__icon-trigger svg{background:none;border:none}.bm-tooltip__icon-trigger:focus-visible{border-radius:var(--bm-sem-radius-round);outline-offset:0px;outline:var(--bm-sem-border-width-focus) solid var(--bm-sem-color-border-focus)}.bm-tooltip__icon-trigger--disabled{opacity:var(--bm-sem-opacity-disabled);cursor:inherit}.bm-tooltip__icon-trigger--xs{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-xs);width:var(--bm-comp-tooltip-size-icon-trigger-xs)}.bm-tooltip__icon-trigger--xs svg{height:var(--bm-comp-tooltip-size-icon-trigger-xs);width:var(--bm-comp-tooltip-size-icon-trigger-xs)}.bm-tooltip__icon-trigger--sm{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-sm);width:var(--bm-comp-tooltip-size-icon-trigger-sm)}.bm-tooltip__icon-trigger--sm svg{height:var(--bm-comp-tooltip-size-icon-trigger-sm);width:var(--bm-comp-tooltip-size-icon-trigger-sm)}.bm-tooltip__icon-trigger--md{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-md);width:var(--bm-comp-tooltip-size-icon-trigger-md)}.bm-tooltip__icon-trigger--md svg{height:var(--bm-comp-tooltip-size-icon-trigger-md);width:var(--bm-comp-tooltip-size-icon-trigger-md)}.bm-tooltip__icon-trigger--lg{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-lg);width:var(--bm-comp-tooltip-size-icon-trigger-lg)}.bm-tooltip__icon-trigger--lg svg{height:var(--bm-comp-tooltip-size-icon-trigger-lg);width:var(--bm-comp-tooltip-size-icon-trigger-lg)}.bm-tooltip__icon-trigger--xl{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-xl);width:var(--bm-comp-tooltip-size-icon-trigger-xl)}.bm-tooltip__icon-trigger--xl svg{height:var(--bm-comp-tooltip-size-icon-trigger-xl);width:var(--bm-comp-tooltip-size-icon-trigger-xl)}`, te = ["top", "right", "bottom", "left"], Ht = ["start", "end"], Ft = /* @__PURE__ */ te.reduce((
|
|
10
|
-
x:
|
|
11
|
-
y:
|
|
9
|
+
const Qt = `:root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]{--bm-comp-tooltip-color-bg: var(--bm-sem-color-surface-inverse, #202e39);--bm-comp-tooltip-color-text: var( --bm-sem-color-text-primary-inverse, #ffffff );--bm-comp-tooltip-color-icon-trigger: var( --bm-sem-color-icon-secondary, #576775 );--bm-comp-tooltip-radius: var(--bm-sem-radius-sm, .25rem);--bm-comp-tooltip-space-x: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-y: var(--bm-sem-space-50, .5rem);--bm-comp-tooltip-space-arrow: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-offset: var(--bm-sem-space-25, .25rem);--bm-comp-tooltip-size-arrow-width: .625rem;--bm-comp-tooltip-size-arrow-height: var( --bm-primitive-dimension-25, .25rem );--bm-comp-tooltip-size-width: var(--bm-primitive-dimension-1500, 15rem);--bm-comp-tooltip-size-icon-trigger-xs: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-tooltip-size-icon-trigger-sm: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-tooltip-size-icon-trigger-md: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-tooltip-size-icon-trigger-lg: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-tooltip-size-icon-trigger-xl: var(--bm-sem-size-icon-xl, 1.75rem);--bm-comp-tooltip-typo-body: var( --bm-sem-typo-compact-body-sm, 400 .875rem/1rem "Source Sans Pro" )}:host,.bm-dark,.bm-light .bm-inverse,[data-bm-theme~=bm-dark]{--bm-comp-tooltip-color-bg: var(--bm-sem-color-surface-inverse, #ffffff);--bm-comp-tooltip-color-text: var( --bm-sem-color-text-primary-inverse, #141d24 );--bm-comp-tooltip-color-icon-trigger: var( --bm-sem-color-icon-secondary, #c3cdd5 );--bm-comp-tooltip-radius: var(--bm-sem-radius-sm, .25rem);--bm-comp-tooltip-space-x: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-y: var(--bm-sem-space-50, .5rem);--bm-comp-tooltip-space-arrow: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-offset: var(--bm-sem-space-25, .25rem);--bm-comp-tooltip-size-arrow-width: .625rem;--bm-comp-tooltip-size-arrow-height: var( --bm-primitive-dimension-25, .25rem );--bm-comp-tooltip-size-width: var(--bm-primitive-dimension-1500, 15rem);--bm-comp-tooltip-size-icon-trigger-xs: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-tooltip-size-icon-trigger-sm: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-tooltip-size-icon-trigger-md: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-tooltip-size-icon-trigger-lg: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-tooltip-size-icon-trigger-xl: var(--bm-sem-size-icon-xl, 1.75rem);--bm-comp-tooltip-typo-body: var( --bm-sem-typo-compact-body-sm, 400 .875rem/1rem "Source Sans Pro" )}.bm-tooltip__icon-trigger{border:none;background:none;padding:0;margin:0;display:flex;cursor:pointer;color:var(--bm-comp-tooltip-color-icon-trigger)}.bm-tooltip{z-index:999;background-color:var(--bm-comp-tooltip-color-bg);border-radius:var(--bm-comp-tooltip-radius);max-width:var(--bm-comp-tooltip-size-width);padding:var(--bm-comp-tooltip-space-y) var(--bm-comp-tooltip-space-x);color:var(--bm-comp-tooltip-color-text);font:var(--bm-comp-tooltip-typo-body);offset:var(--bm-comp-tooltip-space-offset);transition-property:opacity}.bm-tooltip[data-status=open]{transition-duration:0s}.bm-tooltip[data-status=close]{transition-duration:.2s}.bm-tooltip[data-status=initial],.bm-tooltip[data-status=close]{opacity:0}.bm-tooltip__arrow{offset:var(--bm-comp-tooltip-space-arrow);-webkit-mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="4" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.515c.69.647 1.81.647 2.5 0L10 0H0l3.75 3.515Z" fill="%23202E39"/></svg>');-webkit-mask-size:cover;-webkit-mask-position:center;-webkit-mask-repeat:no-repeat;mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="4" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.515c.69.647 1.81.647 2.5 0L10 0H0l3.75 3.515Z" fill="%23202E39"/></svg>');mask-size:cover;mask-position:center;mask-repeat:no-repeat;scale:1.05;width:var(--bm-comp-tooltip-size-arrow-width);height:var(--bm-comp-tooltip-size-arrow-height);background-color:var(--bm-comp-tooltip-color-bg)}.bm-tooltip__icon-trigger svg{background:none;border:none}.bm-tooltip__icon-trigger:focus-visible{border-radius:var(--bm-sem-radius-round);outline-offset:0px;outline:var(--bm-sem-border-width-focus) solid var(--bm-sem-color-border-focus)}.bm-tooltip__icon-trigger--disabled{opacity:var(--bm-sem-opacity-disabled);cursor:inherit}.bm-tooltip__icon-trigger--xs{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-xs);width:var(--bm-comp-tooltip-size-icon-trigger-xs)}.bm-tooltip__icon-trigger--xs svg{height:var(--bm-comp-tooltip-size-icon-trigger-xs);width:var(--bm-comp-tooltip-size-icon-trigger-xs)}.bm-tooltip__icon-trigger--sm{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-sm);width:var(--bm-comp-tooltip-size-icon-trigger-sm)}.bm-tooltip__icon-trigger--sm svg{height:var(--bm-comp-tooltip-size-icon-trigger-sm);width:var(--bm-comp-tooltip-size-icon-trigger-sm)}.bm-tooltip__icon-trigger--md{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-md);width:var(--bm-comp-tooltip-size-icon-trigger-md)}.bm-tooltip__icon-trigger--md svg{height:var(--bm-comp-tooltip-size-icon-trigger-md);width:var(--bm-comp-tooltip-size-icon-trigger-md)}.bm-tooltip__icon-trigger--lg{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-lg);width:var(--bm-comp-tooltip-size-icon-trigger-lg)}.bm-tooltip__icon-trigger--lg svg{height:var(--bm-comp-tooltip-size-icon-trigger-lg);width:var(--bm-comp-tooltip-size-icon-trigger-lg)}.bm-tooltip__icon-trigger--xl{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-xl);width:var(--bm-comp-tooltip-size-icon-trigger-xl)}.bm-tooltip__icon-trigger--xl svg{height:var(--bm-comp-tooltip-size-icon-trigger-xl);width:var(--bm-comp-tooltip-size-icon-trigger-xl)}`, te = ["top", "right", "bottom", "left"], Ht = ["start", "end"], Ft = /* @__PURE__ */ te.reduce((e, t) => e.concat(t, t + "-" + Ht[0], t + "-" + Ht[1]), []), q = Math.min, _ = Math.max, ft = Math.round, ct = Math.floor, W = (e) => ({
|
|
10
|
+
x: e,
|
|
11
|
+
y: e
|
|
12
12
|
}), Pe = {
|
|
13
13
|
left: "right",
|
|
14
14
|
right: "left",
|
|
@@ -18,162 +18,162 @@ const Qt = `:root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]
|
|
|
18
18
|
start: "end",
|
|
19
19
|
end: "start"
|
|
20
20
|
};
|
|
21
|
-
function yt(
|
|
22
|
-
return
|
|
21
|
+
function yt(e, t, i) {
|
|
22
|
+
return _(e, q(t, i));
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return typeof
|
|
24
|
+
function Z(e, t) {
|
|
25
|
+
return typeof e == "function" ? e(t) : e;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return
|
|
27
|
+
function $(e) {
|
|
28
|
+
return e.split("-")[0];
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
return
|
|
30
|
+
function H(e) {
|
|
31
|
+
return e.split("-")[1];
|
|
32
32
|
}
|
|
33
|
-
function Ct(
|
|
34
|
-
return
|
|
33
|
+
function Ct(e) {
|
|
34
|
+
return e === "x" ? "y" : "x";
|
|
35
35
|
}
|
|
36
|
-
function Ot(
|
|
37
|
-
return
|
|
36
|
+
function Ot(e) {
|
|
37
|
+
return e === "y" ? "height" : "width";
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return ["top", "bottom"].includes(
|
|
39
|
+
function Q(e) {
|
|
40
|
+
return ["top", "bottom"].includes($(e)) ? "y" : "x";
|
|
41
41
|
}
|
|
42
|
-
function At(
|
|
43
|
-
return Ct(
|
|
42
|
+
function At(e) {
|
|
43
|
+
return Ct(Q(e));
|
|
44
44
|
}
|
|
45
|
-
function ee(
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
let s = o === "x" ?
|
|
49
|
-
return
|
|
45
|
+
function ee(e, t, i) {
|
|
46
|
+
i === void 0 && (i = !1);
|
|
47
|
+
const n = H(e), o = At(e), r = Ot(o);
|
|
48
|
+
let s = o === "x" ? n === (i ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
49
|
+
return t.reference[r] > t.floating[r] && (s = st(s)), [s, st(s)];
|
|
50
50
|
}
|
|
51
|
-
function Le(
|
|
52
|
-
const
|
|
53
|
-
return [pt(
|
|
51
|
+
function Le(e) {
|
|
52
|
+
const t = st(e);
|
|
53
|
+
return [pt(e), t, pt(t)];
|
|
54
54
|
}
|
|
55
|
-
function pt(
|
|
56
|
-
return
|
|
55
|
+
function pt(e) {
|
|
56
|
+
return e.replace(/start|end/g, (t) => Re[t]);
|
|
57
57
|
}
|
|
58
|
-
function Se(
|
|
59
|
-
const
|
|
60
|
-
switch (
|
|
58
|
+
function Se(e, t, i) {
|
|
59
|
+
const n = ["left", "right"], o = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
|
|
60
|
+
switch (e) {
|
|
61
61
|
case "top":
|
|
62
62
|
case "bottom":
|
|
63
|
-
return
|
|
63
|
+
return i ? t ? o : n : t ? n : o;
|
|
64
64
|
case "left":
|
|
65
65
|
case "right":
|
|
66
|
-
return
|
|
66
|
+
return t ? r : s;
|
|
67
67
|
default:
|
|
68
68
|
return [];
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
function _e(t,
|
|
72
|
-
const o =
|
|
73
|
-
let r = Se(
|
|
74
|
-
return o && (r = r.map((s) => s + "-" + o),
|
|
71
|
+
function _e(e, t, i, n) {
|
|
72
|
+
const o = H(e);
|
|
73
|
+
let r = Se($(e), i === "start", n);
|
|
74
|
+
return o && (r = r.map((s) => s + "-" + o), t && (r = r.concat(r.map(pt)))), r;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return
|
|
76
|
+
function st(e) {
|
|
77
|
+
return e.replace(/left|right|bottom|top/g, (t) => Pe[t]);
|
|
78
78
|
}
|
|
79
|
-
function ze(
|
|
79
|
+
function ze(e) {
|
|
80
80
|
return {
|
|
81
81
|
top: 0,
|
|
82
82
|
right: 0,
|
|
83
83
|
bottom: 0,
|
|
84
84
|
left: 0,
|
|
85
|
-
...
|
|
85
|
+
...e
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
-
function oe(
|
|
89
|
-
return typeof
|
|
90
|
-
top:
|
|
91
|
-
right:
|
|
92
|
-
bottom:
|
|
93
|
-
left:
|
|
88
|
+
function oe(e) {
|
|
89
|
+
return typeof e != "number" ? ze(e) : {
|
|
90
|
+
top: e,
|
|
91
|
+
right: e,
|
|
92
|
+
bottom: e,
|
|
93
|
+
left: e
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
function mt(
|
|
96
|
+
function mt(e) {
|
|
97
97
|
const {
|
|
98
|
-
x:
|
|
99
|
-
y:
|
|
100
|
-
width:
|
|
98
|
+
x: t,
|
|
99
|
+
y: i,
|
|
100
|
+
width: n,
|
|
101
101
|
height: o
|
|
102
|
-
} =
|
|
102
|
+
} = e;
|
|
103
103
|
return {
|
|
104
|
-
width:
|
|
104
|
+
width: n,
|
|
105
105
|
height: o,
|
|
106
|
-
top:
|
|
107
|
-
left:
|
|
108
|
-
right:
|
|
109
|
-
bottom:
|
|
110
|
-
x:
|
|
111
|
-
y:
|
|
106
|
+
top: i,
|
|
107
|
+
left: t,
|
|
108
|
+
right: t + n,
|
|
109
|
+
bottom: i + o,
|
|
110
|
+
x: t,
|
|
111
|
+
y: i
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
function Mt(
|
|
114
|
+
function Mt(e, t, i) {
|
|
115
115
|
let {
|
|
116
|
-
reference:
|
|
116
|
+
reference: n,
|
|
117
117
|
floating: o
|
|
118
|
-
} =
|
|
119
|
-
const r =
|
|
120
|
-
let
|
|
118
|
+
} = e;
|
|
119
|
+
const r = Q(t), s = At(t), l = Ot(s), c = $(t), a = r === "y", f = n.x + n.width / 2 - o.width / 2, p = n.y + n.height / 2 - o.height / 2, d = n[l] / 2 - o[l] / 2;
|
|
120
|
+
let m;
|
|
121
121
|
switch (c) {
|
|
122
122
|
case "top":
|
|
123
|
-
|
|
124
|
-
x:
|
|
125
|
-
y:
|
|
123
|
+
m = {
|
|
124
|
+
x: f,
|
|
125
|
+
y: n.y - o.height
|
|
126
126
|
};
|
|
127
127
|
break;
|
|
128
128
|
case "bottom":
|
|
129
|
-
|
|
130
|
-
x:
|
|
131
|
-
y:
|
|
129
|
+
m = {
|
|
130
|
+
x: f,
|
|
131
|
+
y: n.y + n.height
|
|
132
132
|
};
|
|
133
133
|
break;
|
|
134
134
|
case "right":
|
|
135
|
-
|
|
136
|
-
x:
|
|
137
|
-
y:
|
|
135
|
+
m = {
|
|
136
|
+
x: n.x + n.width,
|
|
137
|
+
y: p
|
|
138
138
|
};
|
|
139
139
|
break;
|
|
140
140
|
case "left":
|
|
141
|
-
|
|
142
|
-
x:
|
|
143
|
-
y:
|
|
141
|
+
m = {
|
|
142
|
+
x: n.x - o.width,
|
|
143
|
+
y: p
|
|
144
144
|
};
|
|
145
145
|
break;
|
|
146
146
|
default:
|
|
147
|
-
|
|
148
|
-
x:
|
|
149
|
-
y:
|
|
147
|
+
m = {
|
|
148
|
+
x: n.x,
|
|
149
|
+
y: n.y
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
switch (
|
|
152
|
+
switch (H(t)) {
|
|
153
153
|
case "start":
|
|
154
|
-
|
|
154
|
+
m[s] -= d * (i && a ? -1 : 1);
|
|
155
155
|
break;
|
|
156
156
|
case "end":
|
|
157
|
-
|
|
157
|
+
m[s] += d * (i && a ? -1 : 1);
|
|
158
158
|
break;
|
|
159
159
|
}
|
|
160
|
-
return
|
|
160
|
+
return m;
|
|
161
161
|
}
|
|
162
|
-
const
|
|
162
|
+
const De = async (e, t, i) => {
|
|
163
163
|
const {
|
|
164
|
-
placement:
|
|
164
|
+
placement: n = "bottom",
|
|
165
165
|
strategy: o = "absolute",
|
|
166
166
|
middleware: r = [],
|
|
167
167
|
platform: s
|
|
168
|
-
} =
|
|
168
|
+
} = i, l = r.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
169
169
|
let a = await s.getElementRects({
|
|
170
|
-
reference:
|
|
171
|
-
floating:
|
|
170
|
+
reference: e,
|
|
171
|
+
floating: t,
|
|
172
172
|
strategy: o
|
|
173
173
|
}), {
|
|
174
|
-
x:
|
|
175
|
-
y:
|
|
176
|
-
} = Mt(a,
|
|
174
|
+
x: f,
|
|
175
|
+
y: p
|
|
176
|
+
} = Mt(a, n, c), d = n, m = {}, v = 0;
|
|
177
177
|
for (let g = 0; g < l.length; g++) {
|
|
178
178
|
const {
|
|
179
179
|
name: h,
|
|
@@ -181,72 +181,72 @@ const Te = async (t, e, n) => {
|
|
|
181
181
|
} = l[g], {
|
|
182
182
|
x: y,
|
|
183
183
|
y: w,
|
|
184
|
-
data:
|
|
184
|
+
data: O,
|
|
185
185
|
reset: x
|
|
186
186
|
} = await u({
|
|
187
|
-
x:
|
|
188
|
-
y:
|
|
189
|
-
initialPlacement:
|
|
187
|
+
x: f,
|
|
188
|
+
y: p,
|
|
189
|
+
initialPlacement: n,
|
|
190
190
|
placement: d,
|
|
191
191
|
strategy: o,
|
|
192
|
-
middlewareData:
|
|
192
|
+
middlewareData: m,
|
|
193
193
|
rects: a,
|
|
194
194
|
platform: s,
|
|
195
195
|
elements: {
|
|
196
|
-
reference:
|
|
197
|
-
floating:
|
|
196
|
+
reference: e,
|
|
197
|
+
floating: t
|
|
198
198
|
}
|
|
199
199
|
});
|
|
200
|
-
|
|
201
|
-
...
|
|
200
|
+
f = y ?? f, p = w ?? p, m = {
|
|
201
|
+
...m,
|
|
202
202
|
[h]: {
|
|
203
|
-
...
|
|
204
|
-
...
|
|
203
|
+
...m[h],
|
|
204
|
+
...O
|
|
205
205
|
}
|
|
206
|
-
}, x &&
|
|
207
|
-
reference:
|
|
208
|
-
floating:
|
|
206
|
+
}, x && v <= 50 && (v++, typeof x == "object" && (x.placement && (d = x.placement), x.rects && (a = x.rects === !0 ? await s.getElementRects({
|
|
207
|
+
reference: e,
|
|
208
|
+
floating: t,
|
|
209
209
|
strategy: o
|
|
210
210
|
}) : x.rects), {
|
|
211
|
-
x:
|
|
212
|
-
y:
|
|
211
|
+
x: f,
|
|
212
|
+
y: p
|
|
213
213
|
} = Mt(a, d, c)), g = -1);
|
|
214
214
|
}
|
|
215
215
|
return {
|
|
216
|
-
x:
|
|
217
|
-
y:
|
|
216
|
+
x: f,
|
|
217
|
+
y: p,
|
|
218
218
|
placement: d,
|
|
219
219
|
strategy: o,
|
|
220
|
-
middlewareData:
|
|
220
|
+
middlewareData: m
|
|
221
221
|
};
|
|
222
222
|
};
|
|
223
|
-
async function
|
|
224
|
-
var
|
|
225
|
-
|
|
223
|
+
async function ot(e, t) {
|
|
224
|
+
var i;
|
|
225
|
+
t === void 0 && (t = {});
|
|
226
226
|
const {
|
|
227
|
-
x:
|
|
227
|
+
x: n,
|
|
228
228
|
y: o,
|
|
229
229
|
platform: r,
|
|
230
230
|
rects: s,
|
|
231
231
|
elements: l,
|
|
232
232
|
strategy: c
|
|
233
|
-
} =
|
|
233
|
+
} = e, {
|
|
234
234
|
boundary: a = "clippingAncestors",
|
|
235
|
-
rootBoundary:
|
|
236
|
-
elementContext:
|
|
235
|
+
rootBoundary: f = "viewport",
|
|
236
|
+
elementContext: p = "floating",
|
|
237
237
|
altBoundary: d = !1,
|
|
238
|
-
padding:
|
|
239
|
-
} =
|
|
240
|
-
element: (
|
|
238
|
+
padding: m = 0
|
|
239
|
+
} = Z(t, e), v = oe(m), h = l[d ? p === "floating" ? "reference" : "floating" : p], u = mt(await r.getClippingRect({
|
|
240
|
+
element: (i = await (r.isElement == null ? void 0 : r.isElement(h))) == null || i ? h : h.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
|
|
241
241
|
boundary: a,
|
|
242
|
-
rootBoundary:
|
|
242
|
+
rootBoundary: f,
|
|
243
243
|
strategy: c
|
|
244
|
-
})), y =
|
|
245
|
-
x:
|
|
244
|
+
})), y = p === "floating" ? {
|
|
245
|
+
x: n,
|
|
246
246
|
y: o,
|
|
247
247
|
width: s.floating.width,
|
|
248
248
|
height: s.floating.height
|
|
249
|
-
} : s.reference, w = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)),
|
|
249
|
+
} : s.reference, w = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), O = await (r.isElement == null ? void 0 : r.isElement(w)) ? await (r.getScale == null ? void 0 : r.getScale(w)) || {
|
|
250
250
|
x: 1,
|
|
251
251
|
y: 1
|
|
252
252
|
} : {
|
|
@@ -259,34 +259,34 @@ async function st(t, e) {
|
|
|
259
259
|
strategy: c
|
|
260
260
|
}) : y);
|
|
261
261
|
return {
|
|
262
|
-
top: (u.top - x.top +
|
|
263
|
-
bottom: (x.bottom - u.bottom +
|
|
264
|
-
left: (u.left - x.left +
|
|
265
|
-
right: (x.right - u.right +
|
|
262
|
+
top: (u.top - x.top + v.top) / O.y,
|
|
263
|
+
bottom: (x.bottom - u.bottom + v.bottom) / O.y,
|
|
264
|
+
left: (u.left - x.left + v.left) / O.x,
|
|
265
|
+
right: (x.right - u.right + v.right) / O.x
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
return (
|
|
268
|
+
function Te(e, t, i) {
|
|
269
|
+
return (e ? [...i.filter((o) => H(o) === e), ...i.filter((o) => H(o) !== e)] : i.filter((o) => $(o) === o)).filter((o) => e ? H(o) === e || (t ? pt(o) !== o : !1) : !0);
|
|
270
270
|
}
|
|
271
|
-
const
|
|
272
|
-
return
|
|
271
|
+
const ke = function(e) {
|
|
272
|
+
return e === void 0 && (e = {}), {
|
|
273
273
|
name: "autoPlacement",
|
|
274
|
-
options:
|
|
275
|
-
async fn(
|
|
276
|
-
var
|
|
274
|
+
options: e,
|
|
275
|
+
async fn(t) {
|
|
276
|
+
var i, n, o;
|
|
277
277
|
const {
|
|
278
278
|
rects: r,
|
|
279
279
|
middlewareData: s,
|
|
280
280
|
placement: l,
|
|
281
281
|
platform: c,
|
|
282
282
|
elements: a
|
|
283
|
-
} =
|
|
284
|
-
crossAxis:
|
|
285
|
-
alignment:
|
|
283
|
+
} = t, {
|
|
284
|
+
crossAxis: f = !1,
|
|
285
|
+
alignment: p,
|
|
286
286
|
allowedPlacements: d = Ft,
|
|
287
|
-
autoAlignment:
|
|
288
|
-
...
|
|
289
|
-
} =
|
|
287
|
+
autoAlignment: m = !0,
|
|
288
|
+
...v
|
|
289
|
+
} = Z(e, t), g = p !== void 0 || d === Ft ? Te(p || null, m, d) : d, h = await ot(t, v), u = ((i = s.autoPlacement) == null ? void 0 : i.index) || 0, y = g[u];
|
|
290
290
|
if (y == null)
|
|
291
291
|
return {};
|
|
292
292
|
const w = ee(y, r, await (c.isRTL == null ? void 0 : c.isRTL(a.floating)));
|
|
@@ -296,9 +296,9 @@ const De = function(t) {
|
|
|
296
296
|
placement: g[0]
|
|
297
297
|
}
|
|
298
298
|
};
|
|
299
|
-
const
|
|
299
|
+
const O = [h[$(y)], h[w[0]], h[w[1]]], x = [...((n = s.autoPlacement) == null ? void 0 : n.overflows) || [], {
|
|
300
300
|
placement: y,
|
|
301
|
-
overflows:
|
|
301
|
+
overflows: O
|
|
302
302
|
}], D = g[u + 1];
|
|
303
303
|
if (D)
|
|
304
304
|
return {
|
|
@@ -310,38 +310,38 @@ const De = function(t) {
|
|
|
310
310
|
placement: D
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
|
-
const
|
|
314
|
-
const S =
|
|
315
|
-
return [
|
|
313
|
+
const P = x.map((C) => {
|
|
314
|
+
const S = H(C.placement);
|
|
315
|
+
return [C.placement, S && f ? (
|
|
316
316
|
// Check along the mainAxis and main crossAxis side.
|
|
317
|
-
|
|
317
|
+
C.overflows.slice(0, 2).reduce((j, k) => j + k, 0)
|
|
318
318
|
) : (
|
|
319
319
|
// Check only the mainAxis.
|
|
320
|
-
|
|
321
|
-
),
|
|
322
|
-
}).sort((
|
|
320
|
+
C.overflows[0]
|
|
321
|
+
), C.overflows];
|
|
322
|
+
}).sort((C, S) => C[1] - S[1]), T = ((o = P.filter((C) => C[2].slice(
|
|
323
323
|
0,
|
|
324
324
|
// Aligned placements should not check their opposite crossAxis
|
|
325
325
|
// side.
|
|
326
|
-
|
|
327
|
-
).every((S) => S <= 0))[0]) == null ? void 0 : o[0]) ||
|
|
328
|
-
return
|
|
326
|
+
H(C[0]) ? 2 : 3
|
|
327
|
+
).every((S) => S <= 0))[0]) == null ? void 0 : o[0]) || P[0][0];
|
|
328
|
+
return T !== l ? {
|
|
329
329
|
data: {
|
|
330
330
|
index: u + 1,
|
|
331
331
|
overflows: x
|
|
332
332
|
},
|
|
333
333
|
reset: {
|
|
334
|
-
placement:
|
|
334
|
+
placement: T
|
|
335
335
|
}
|
|
336
336
|
} : {};
|
|
337
337
|
}
|
|
338
338
|
};
|
|
339
|
-
}, $e = function(
|
|
340
|
-
return
|
|
339
|
+
}, $e = function(e) {
|
|
340
|
+
return e === void 0 && (e = {}), {
|
|
341
341
|
name: "flip",
|
|
342
|
-
options:
|
|
343
|
-
async fn(
|
|
344
|
-
var
|
|
342
|
+
options: e,
|
|
343
|
+
async fn(t) {
|
|
344
|
+
var i, n;
|
|
345
345
|
const {
|
|
346
346
|
placement: o,
|
|
347
347
|
middlewareData: r,
|
|
@@ -349,66 +349,66 @@ const De = function(t) {
|
|
|
349
349
|
initialPlacement: l,
|
|
350
350
|
platform: c,
|
|
351
351
|
elements: a
|
|
352
|
-
} =
|
|
353
|
-
mainAxis:
|
|
354
|
-
crossAxis:
|
|
352
|
+
} = t, {
|
|
353
|
+
mainAxis: f = !0,
|
|
354
|
+
crossAxis: p = !0,
|
|
355
355
|
fallbackPlacements: d,
|
|
356
|
-
fallbackStrategy:
|
|
357
|
-
fallbackAxisSideDirection:
|
|
356
|
+
fallbackStrategy: m = "bestFit",
|
|
357
|
+
fallbackAxisSideDirection: v = "none",
|
|
358
358
|
flipAlignment: g = !0,
|
|
359
359
|
...h
|
|
360
|
-
} =
|
|
361
|
-
if ((
|
|
360
|
+
} = Z(e, t);
|
|
361
|
+
if ((i = r.arrow) != null && i.alignmentOffset)
|
|
362
362
|
return {};
|
|
363
|
-
const u =
|
|
364
|
-
!d && D && x.push(..._e(l, g,
|
|
365
|
-
const
|
|
366
|
-
let
|
|
367
|
-
if (
|
|
368
|
-
const
|
|
369
|
-
|
|
363
|
+
const u = $(o), y = Q(l), w = $(l) === l, O = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), x = d || (w || !g ? [st(l)] : Le(l)), D = v !== "none";
|
|
364
|
+
!d && D && x.push(..._e(l, g, v, O));
|
|
365
|
+
const P = [l, ...x], L = await ot(t, h), T = [];
|
|
366
|
+
let C = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
367
|
+
if (f && T.push(L[u]), p) {
|
|
368
|
+
const I = ee(o, s, O);
|
|
369
|
+
T.push(L[I[0]], L[I[1]]);
|
|
370
370
|
}
|
|
371
|
-
if (
|
|
371
|
+
if (C = [...C, {
|
|
372
372
|
placement: o,
|
|
373
|
-
overflows:
|
|
374
|
-
}], !
|
|
375
|
-
var S,
|
|
376
|
-
const
|
|
377
|
-
if (
|
|
373
|
+
overflows: T
|
|
374
|
+
}], !T.every((I) => I <= 0)) {
|
|
375
|
+
var S, j;
|
|
376
|
+
const I = (((S = r.flip) == null ? void 0 : S.index) || 0) + 1, Y = P[I];
|
|
377
|
+
if (Y)
|
|
378
378
|
return {
|
|
379
379
|
data: {
|
|
380
|
-
index:
|
|
381
|
-
overflows:
|
|
380
|
+
index: I,
|
|
381
|
+
overflows: C
|
|
382
382
|
},
|
|
383
383
|
reset: {
|
|
384
|
-
placement:
|
|
384
|
+
placement: Y
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
|
-
let
|
|
388
|
-
if (!
|
|
389
|
-
switch (
|
|
387
|
+
let X = (j = C.filter((K) => K.overflows[0] <= 0).sort((K, N) => K.overflows[1] - N.overflows[1])[0]) == null ? void 0 : j.placement;
|
|
388
|
+
if (!X)
|
|
389
|
+
switch (m) {
|
|
390
390
|
case "bestFit": {
|
|
391
|
-
var
|
|
392
|
-
const
|
|
391
|
+
var k;
|
|
392
|
+
const K = (k = C.filter((N) => {
|
|
393
393
|
if (D) {
|
|
394
|
-
const
|
|
395
|
-
return
|
|
394
|
+
const B = Q(N.placement);
|
|
395
|
+
return B === y || // Create a bias to the `y` side axis due to horizontal
|
|
396
396
|
// reading directions favoring greater width.
|
|
397
|
-
|
|
397
|
+
B === "y";
|
|
398
398
|
}
|
|
399
399
|
return !0;
|
|
400
|
-
}).map((
|
|
401
|
-
|
|
400
|
+
}).map((N) => [N.placement, N.overflows.filter((B) => B > 0).reduce((B, gt) => B + gt, 0)]).sort((N, B) => N[1] - B[1])[0]) == null ? void 0 : k[0];
|
|
401
|
+
K && (X = K);
|
|
402
402
|
break;
|
|
403
403
|
}
|
|
404
404
|
case "initialPlacement":
|
|
405
|
-
|
|
405
|
+
X = l;
|
|
406
406
|
break;
|
|
407
407
|
}
|
|
408
|
-
if (o !==
|
|
408
|
+
if (o !== X)
|
|
409
409
|
return {
|
|
410
410
|
reset: {
|
|
411
|
-
placement:
|
|
411
|
+
placement: X
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
414
|
}
|
|
@@ -416,34 +416,34 @@ const De = function(t) {
|
|
|
416
416
|
}
|
|
417
417
|
};
|
|
418
418
|
};
|
|
419
|
-
function jt(
|
|
419
|
+
function jt(e, t) {
|
|
420
420
|
return {
|
|
421
|
-
top:
|
|
422
|
-
right:
|
|
423
|
-
bottom:
|
|
424
|
-
left:
|
|
421
|
+
top: e.top - t.height,
|
|
422
|
+
right: e.right - t.width,
|
|
423
|
+
bottom: e.bottom - t.height,
|
|
424
|
+
left: e.left - t.width
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
function It(
|
|
428
|
-
return te.some((
|
|
427
|
+
function It(e) {
|
|
428
|
+
return te.some((t) => e[t] >= 0);
|
|
429
429
|
}
|
|
430
|
-
const Be = function(
|
|
431
|
-
return
|
|
430
|
+
const Be = function(e) {
|
|
431
|
+
return e === void 0 && (e = {}), {
|
|
432
432
|
name: "hide",
|
|
433
|
-
options:
|
|
434
|
-
async fn(
|
|
433
|
+
options: e,
|
|
434
|
+
async fn(t) {
|
|
435
435
|
const {
|
|
436
|
-
rects:
|
|
437
|
-
} =
|
|
438
|
-
strategy:
|
|
436
|
+
rects: i
|
|
437
|
+
} = t, {
|
|
438
|
+
strategy: n = "referenceHidden",
|
|
439
439
|
...o
|
|
440
|
-
} =
|
|
441
|
-
switch (
|
|
440
|
+
} = Z(e, t);
|
|
441
|
+
switch (n) {
|
|
442
442
|
case "referenceHidden": {
|
|
443
|
-
const r = await
|
|
443
|
+
const r = await ot(t, {
|
|
444
444
|
...o,
|
|
445
445
|
elementContext: "reference"
|
|
446
|
-
}), s = jt(r,
|
|
446
|
+
}), s = jt(r, i.reference);
|
|
447
447
|
return {
|
|
448
448
|
data: {
|
|
449
449
|
referenceHiddenOffsets: s,
|
|
@@ -452,10 +452,10 @@ const Be = function(t) {
|
|
|
452
452
|
};
|
|
453
453
|
}
|
|
454
454
|
case "escaped": {
|
|
455
|
-
const r = await
|
|
455
|
+
const r = await ot(t, {
|
|
456
456
|
...o,
|
|
457
457
|
altBoundary: !0
|
|
458
|
-
}), s = jt(r,
|
|
458
|
+
}), s = jt(r, i.floating);
|
|
459
459
|
return {
|
|
460
460
|
data: {
|
|
461
461
|
escapedOffsets: s,
|
|
@@ -469,46 +469,46 @@ const Be = function(t) {
|
|
|
469
469
|
}
|
|
470
470
|
};
|
|
471
471
|
};
|
|
472
|
-
async function He(
|
|
472
|
+
async function He(e, t) {
|
|
473
473
|
const {
|
|
474
|
-
placement:
|
|
475
|
-
platform:
|
|
474
|
+
placement: i,
|
|
475
|
+
platform: n,
|
|
476
476
|
elements: o
|
|
477
|
-
} =
|
|
477
|
+
} = e, r = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), s = $(i), l = H(i), c = Q(i) === "y", a = ["left", "top"].includes(s) ? -1 : 1, f = r && c ? -1 : 1, p = Z(t, e);
|
|
478
478
|
let {
|
|
479
479
|
mainAxis: d,
|
|
480
|
-
crossAxis:
|
|
481
|
-
alignmentAxis:
|
|
482
|
-
} = typeof
|
|
483
|
-
mainAxis:
|
|
480
|
+
crossAxis: m,
|
|
481
|
+
alignmentAxis: v
|
|
482
|
+
} = typeof p == "number" ? {
|
|
483
|
+
mainAxis: p,
|
|
484
484
|
crossAxis: 0,
|
|
485
485
|
alignmentAxis: null
|
|
486
486
|
} : {
|
|
487
|
-
mainAxis:
|
|
488
|
-
crossAxis:
|
|
489
|
-
alignmentAxis:
|
|
487
|
+
mainAxis: p.mainAxis || 0,
|
|
488
|
+
crossAxis: p.crossAxis || 0,
|
|
489
|
+
alignmentAxis: p.alignmentAxis
|
|
490
490
|
};
|
|
491
|
-
return l && typeof
|
|
492
|
-
x:
|
|
491
|
+
return l && typeof v == "number" && (m = l === "end" ? v * -1 : v), c ? {
|
|
492
|
+
x: m * f,
|
|
493
493
|
y: d * a
|
|
494
494
|
} : {
|
|
495
495
|
x: d * a,
|
|
496
|
-
y:
|
|
496
|
+
y: m * f
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
|
-
const Fe = function(
|
|
500
|
-
return
|
|
499
|
+
const Fe = function(e) {
|
|
500
|
+
return e === void 0 && (e = 0), {
|
|
501
501
|
name: "offset",
|
|
502
|
-
options:
|
|
503
|
-
async fn(
|
|
504
|
-
var
|
|
502
|
+
options: e,
|
|
503
|
+
async fn(t) {
|
|
504
|
+
var i, n;
|
|
505
505
|
const {
|
|
506
506
|
x: o,
|
|
507
507
|
y: r,
|
|
508
508
|
placement: s,
|
|
509
509
|
middlewareData: l
|
|
510
|
-
} =
|
|
511
|
-
return s === ((
|
|
510
|
+
} = t, c = await He(t, e);
|
|
511
|
+
return s === ((i = l.offset) == null ? void 0 : i.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
|
|
512
512
|
x: o + c.x,
|
|
513
513
|
y: r + c.y,
|
|
514
514
|
data: {
|
|
@@ -518,16 +518,16 @@ const Fe = function(t) {
|
|
|
518
518
|
};
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
|
-
}, Me = function(
|
|
522
|
-
return
|
|
521
|
+
}, Me = function(e) {
|
|
522
|
+
return e === void 0 && (e = {}), {
|
|
523
523
|
name: "shift",
|
|
524
|
-
options:
|
|
525
|
-
async fn(
|
|
524
|
+
options: e,
|
|
525
|
+
async fn(t) {
|
|
526
526
|
const {
|
|
527
|
-
x:
|
|
528
|
-
y:
|
|
527
|
+
x: i,
|
|
528
|
+
y: n,
|
|
529
529
|
placement: o
|
|
530
|
-
} =
|
|
530
|
+
} = t, {
|
|
531
531
|
mainAxis: r = !0,
|
|
532
532
|
crossAxis: s = !1,
|
|
533
533
|
limiter: l = {
|
|
@@ -543,271 +543,311 @@ const Fe = function(t) {
|
|
|
543
543
|
}
|
|
544
544
|
},
|
|
545
545
|
...c
|
|
546
|
-
} =
|
|
547
|
-
x:
|
|
548
|
-
y:
|
|
549
|
-
},
|
|
550
|
-
let
|
|
546
|
+
} = Z(e, t), a = {
|
|
547
|
+
x: i,
|
|
548
|
+
y: n
|
|
549
|
+
}, f = await ot(t, c), p = Q($(o)), d = Ct(p);
|
|
550
|
+
let m = a[d], v = a[p];
|
|
551
551
|
if (r) {
|
|
552
|
-
const h = d === "y" ? "top" : "left", u = d === "y" ? "bottom" : "right", y =
|
|
553
|
-
|
|
552
|
+
const h = d === "y" ? "top" : "left", u = d === "y" ? "bottom" : "right", y = m + f[h], w = m - f[u];
|
|
553
|
+
m = yt(y, m, w);
|
|
554
554
|
}
|
|
555
555
|
if (s) {
|
|
556
|
-
const h =
|
|
557
|
-
|
|
556
|
+
const h = p === "y" ? "top" : "left", u = p === "y" ? "bottom" : "right", y = v + f[h], w = v - f[u];
|
|
557
|
+
v = yt(y, v, w);
|
|
558
558
|
}
|
|
559
559
|
const g = l.fn({
|
|
560
|
-
...
|
|
561
|
-
[d]:
|
|
562
|
-
[
|
|
560
|
+
...t,
|
|
561
|
+
[d]: m,
|
|
562
|
+
[p]: v
|
|
563
563
|
});
|
|
564
564
|
return {
|
|
565
565
|
...g,
|
|
566
566
|
data: {
|
|
567
|
-
x: g.x -
|
|
568
|
-
y: g.y -
|
|
567
|
+
x: g.x - i,
|
|
568
|
+
y: g.y - n,
|
|
569
569
|
enabled: {
|
|
570
570
|
[d]: r,
|
|
571
|
-
[
|
|
571
|
+
[p]: s
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
576
|
};
|
|
577
|
+
}, je = function(e) {
|
|
578
|
+
return e === void 0 && (e = {}), {
|
|
579
|
+
name: "size",
|
|
580
|
+
options: e,
|
|
581
|
+
async fn(t) {
|
|
582
|
+
var i, n;
|
|
583
|
+
const {
|
|
584
|
+
placement: o,
|
|
585
|
+
rects: r,
|
|
586
|
+
platform: s,
|
|
587
|
+
elements: l
|
|
588
|
+
} = t, {
|
|
589
|
+
apply: c = () => {
|
|
590
|
+
},
|
|
591
|
+
...a
|
|
592
|
+
} = Z(e, t), f = await ot(t, a), p = $(o), d = H(o), m = Q(o) === "y", {
|
|
593
|
+
width: v,
|
|
594
|
+
height: g
|
|
595
|
+
} = r.floating;
|
|
596
|
+
let h, u;
|
|
597
|
+
p === "top" || p === "bottom" ? (h = p, u = d === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (u = p, h = d === "end" ? "top" : "bottom");
|
|
598
|
+
const y = g - f.top - f.bottom, w = v - f.left - f.right, O = q(g - f[h], y), x = q(v - f[u], w), D = !t.middlewareData.shift;
|
|
599
|
+
let P = O, L = x;
|
|
600
|
+
if ((i = t.middlewareData.shift) != null && i.enabled.x && (L = w), (n = t.middlewareData.shift) != null && n.enabled.y && (P = y), D && !d) {
|
|
601
|
+
const C = _(f.left, 0), S = _(f.right, 0), j = _(f.top, 0), k = _(f.bottom, 0);
|
|
602
|
+
m ? L = v - 2 * (C !== 0 || S !== 0 ? C + S : _(f.left, f.right)) : P = g - 2 * (j !== 0 || k !== 0 ? j + k : _(f.top, f.bottom));
|
|
603
|
+
}
|
|
604
|
+
await c({
|
|
605
|
+
...t,
|
|
606
|
+
availableWidth: L,
|
|
607
|
+
availableHeight: P
|
|
608
|
+
});
|
|
609
|
+
const T = await s.getDimensions(l.floating);
|
|
610
|
+
return v !== T.width || g !== T.height ? {
|
|
611
|
+
reset: {
|
|
612
|
+
rects: !0
|
|
613
|
+
}
|
|
614
|
+
} : {};
|
|
615
|
+
}
|
|
616
|
+
};
|
|
577
617
|
};
|
|
578
618
|
function dt() {
|
|
579
619
|
return typeof window < "u";
|
|
580
620
|
}
|
|
581
|
-
function nt(
|
|
582
|
-
return
|
|
621
|
+
function nt(e) {
|
|
622
|
+
return ie(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
583
623
|
}
|
|
584
|
-
function
|
|
585
|
-
var
|
|
586
|
-
return (
|
|
624
|
+
function z(e) {
|
|
625
|
+
var t;
|
|
626
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
587
627
|
}
|
|
588
|
-
function
|
|
589
|
-
var
|
|
590
|
-
return (
|
|
628
|
+
function U(e) {
|
|
629
|
+
var t;
|
|
630
|
+
return (t = (ie(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
591
631
|
}
|
|
592
|
-
function
|
|
593
|
-
return dt() ?
|
|
632
|
+
function ie(e) {
|
|
633
|
+
return dt() ? e instanceof Node || e instanceof z(e).Node : !1;
|
|
594
634
|
}
|
|
595
|
-
function
|
|
596
|
-
return dt() ?
|
|
635
|
+
function F(e) {
|
|
636
|
+
return dt() ? e instanceof Element || e instanceof z(e).Element : !1;
|
|
597
637
|
}
|
|
598
|
-
function
|
|
599
|
-
return dt() ?
|
|
638
|
+
function V(e) {
|
|
639
|
+
return dt() ? e instanceof HTMLElement || e instanceof z(e).HTMLElement : !1;
|
|
600
640
|
}
|
|
601
|
-
function Nt(
|
|
602
|
-
return !dt() || typeof ShadowRoot > "u" ? !1 :
|
|
641
|
+
function Nt(e) {
|
|
642
|
+
return !dt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof z(e).ShadowRoot;
|
|
603
643
|
}
|
|
604
|
-
function lt(
|
|
644
|
+
function lt(e) {
|
|
605
645
|
const {
|
|
606
|
-
overflow:
|
|
607
|
-
overflowX:
|
|
608
|
-
overflowY:
|
|
646
|
+
overflow: t,
|
|
647
|
+
overflowX: i,
|
|
648
|
+
overflowY: n,
|
|
609
649
|
display: o
|
|
610
|
-
} =
|
|
611
|
-
return /auto|scroll|overlay|hidden|clip/.test(
|
|
650
|
+
} = M(e);
|
|
651
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + n + i) && !["inline", "contents"].includes(o);
|
|
612
652
|
}
|
|
613
|
-
function
|
|
614
|
-
return ["table", "td", "th"].includes(nt(
|
|
653
|
+
function Ie(e) {
|
|
654
|
+
return ["table", "td", "th"].includes(nt(e));
|
|
615
655
|
}
|
|
616
|
-
function ut(
|
|
617
|
-
return [":popover-open", ":modal"].some((
|
|
656
|
+
function ut(e) {
|
|
657
|
+
return [":popover-open", ":modal"].some((t) => {
|
|
618
658
|
try {
|
|
619
|
-
return
|
|
659
|
+
return e.matches(t);
|
|
620
660
|
} catch {
|
|
621
661
|
return !1;
|
|
622
662
|
}
|
|
623
663
|
});
|
|
624
664
|
}
|
|
625
|
-
function Et(
|
|
626
|
-
const
|
|
627
|
-
return ["transform", "translate", "scale", "rotate", "perspective"].some((
|
|
665
|
+
function Et(e) {
|
|
666
|
+
const t = Pt(), i = F(e) ? M(e) : e;
|
|
667
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => i[n] ? i[n] !== "none" : !1) || (i.containerType ? i.containerType !== "normal" : !1) || !t && (i.backdropFilter ? i.backdropFilter !== "none" : !1) || !t && (i.filter ? i.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (i.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (i.contain || "").includes(n));
|
|
628
668
|
}
|
|
629
|
-
function
|
|
630
|
-
let
|
|
631
|
-
for (;
|
|
632
|
-
if (Et(
|
|
633
|
-
return
|
|
634
|
-
if (ut(
|
|
669
|
+
function Ne(e) {
|
|
670
|
+
let t = G(e);
|
|
671
|
+
for (; V(t) && !it(t); ) {
|
|
672
|
+
if (Et(t))
|
|
673
|
+
return t;
|
|
674
|
+
if (ut(t))
|
|
635
675
|
return null;
|
|
636
|
-
|
|
676
|
+
t = G(t);
|
|
637
677
|
}
|
|
638
678
|
return null;
|
|
639
679
|
}
|
|
640
680
|
function Pt() {
|
|
641
681
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
642
682
|
}
|
|
643
|
-
function
|
|
644
|
-
return ["html", "body", "#document"].includes(nt(
|
|
683
|
+
function it(e) {
|
|
684
|
+
return ["html", "body", "#document"].includes(nt(e));
|
|
645
685
|
}
|
|
646
|
-
function
|
|
647
|
-
return
|
|
686
|
+
function M(e) {
|
|
687
|
+
return z(e).getComputedStyle(e);
|
|
648
688
|
}
|
|
649
|
-
function ht(
|
|
650
|
-
return
|
|
651
|
-
scrollLeft:
|
|
652
|
-
scrollTop:
|
|
689
|
+
function ht(e) {
|
|
690
|
+
return F(e) ? {
|
|
691
|
+
scrollLeft: e.scrollLeft,
|
|
692
|
+
scrollTop: e.scrollTop
|
|
653
693
|
} : {
|
|
654
|
-
scrollLeft:
|
|
655
|
-
scrollTop:
|
|
694
|
+
scrollLeft: e.scrollX,
|
|
695
|
+
scrollTop: e.scrollY
|
|
656
696
|
};
|
|
657
697
|
}
|
|
658
|
-
function
|
|
659
|
-
if (nt(
|
|
660
|
-
return
|
|
661
|
-
const
|
|
698
|
+
function G(e) {
|
|
699
|
+
if (nt(e) === "html")
|
|
700
|
+
return e;
|
|
701
|
+
const t = (
|
|
662
702
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
Nt(
|
|
666
|
-
|
|
703
|
+
e.assignedSlot || // DOM Element detected.
|
|
704
|
+
e.parentNode || // ShadowRoot detected.
|
|
705
|
+
Nt(e) && e.host || // Fallback.
|
|
706
|
+
U(e)
|
|
667
707
|
);
|
|
668
|
-
return Nt(
|
|
708
|
+
return Nt(t) ? t.host : t;
|
|
669
709
|
}
|
|
670
|
-
function
|
|
671
|
-
const
|
|
672
|
-
return
|
|
710
|
+
function ne(e) {
|
|
711
|
+
const t = G(e);
|
|
712
|
+
return it(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : V(t) && lt(t) ? t : ne(t);
|
|
673
713
|
}
|
|
674
|
-
function rt(
|
|
675
|
-
var
|
|
676
|
-
|
|
677
|
-
const o =
|
|
714
|
+
function rt(e, t, i) {
|
|
715
|
+
var n;
|
|
716
|
+
t === void 0 && (t = []), i === void 0 && (i = !0);
|
|
717
|
+
const o = ne(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), s = z(o);
|
|
678
718
|
if (r) {
|
|
679
719
|
const l = wt(s);
|
|
680
|
-
return
|
|
720
|
+
return t.concat(s, s.visualViewport || [], lt(o) ? o : [], l && i ? rt(l) : []);
|
|
681
721
|
}
|
|
682
|
-
return
|
|
722
|
+
return t.concat(o, rt(o, [], i));
|
|
683
723
|
}
|
|
684
|
-
function wt(
|
|
685
|
-
return
|
|
724
|
+
function wt(e) {
|
|
725
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
686
726
|
}
|
|
687
|
-
function se(
|
|
688
|
-
const
|
|
689
|
-
let
|
|
690
|
-
const o =
|
|
691
|
-
return l && (
|
|
692
|
-
width:
|
|
693
|
-
height:
|
|
727
|
+
function se(e) {
|
|
728
|
+
const t = M(e);
|
|
729
|
+
let i = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
|
|
730
|
+
const o = V(e), r = o ? e.offsetWidth : i, s = o ? e.offsetHeight : n, l = ft(i) !== r || ft(n) !== s;
|
|
731
|
+
return l && (i = r, n = s), {
|
|
732
|
+
width: i,
|
|
733
|
+
height: n,
|
|
694
734
|
$: l
|
|
695
735
|
};
|
|
696
736
|
}
|
|
697
|
-
function Rt(
|
|
698
|
-
return
|
|
737
|
+
function Rt(e) {
|
|
738
|
+
return F(e) ? e : e.contextElement;
|
|
699
739
|
}
|
|
700
|
-
function
|
|
701
|
-
const
|
|
702
|
-
if (!
|
|
703
|
-
return
|
|
704
|
-
const
|
|
705
|
-
width:
|
|
740
|
+
function et(e) {
|
|
741
|
+
const t = Rt(e);
|
|
742
|
+
if (!V(t))
|
|
743
|
+
return W(1);
|
|
744
|
+
const i = t.getBoundingClientRect(), {
|
|
745
|
+
width: n,
|
|
706
746
|
height: o,
|
|
707
747
|
$: r
|
|
708
|
-
} = se(
|
|
709
|
-
let s = (r ? ft(
|
|
748
|
+
} = se(t);
|
|
749
|
+
let s = (r ? ft(i.width) : i.width) / n, l = (r ? ft(i.height) : i.height) / o;
|
|
710
750
|
return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
711
751
|
x: s,
|
|
712
752
|
y: l
|
|
713
753
|
};
|
|
714
754
|
}
|
|
715
|
-
const
|
|
716
|
-
function re(
|
|
717
|
-
const
|
|
718
|
-
return !Pt() || !
|
|
719
|
-
x:
|
|
720
|
-
y:
|
|
755
|
+
const We = /* @__PURE__ */ W(0);
|
|
756
|
+
function re(e) {
|
|
757
|
+
const t = z(e);
|
|
758
|
+
return !Pt() || !t.visualViewport ? We : {
|
|
759
|
+
x: t.visualViewport.offsetLeft,
|
|
760
|
+
y: t.visualViewport.offsetTop
|
|
721
761
|
};
|
|
722
762
|
}
|
|
723
|
-
function
|
|
724
|
-
return
|
|
763
|
+
function Ve(e, t, i) {
|
|
764
|
+
return t === void 0 && (t = !1), !i || t && i !== z(e) ? !1 : t;
|
|
725
765
|
}
|
|
726
|
-
function
|
|
727
|
-
|
|
728
|
-
const o =
|
|
729
|
-
let s =
|
|
730
|
-
|
|
731
|
-
const l =
|
|
732
|
-
let c = (o.left + l.x) / s.x, a = (o.top + l.y) / s.y,
|
|
766
|
+
function tt(e, t, i, n) {
|
|
767
|
+
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
768
|
+
const o = e.getBoundingClientRect(), r = Rt(e);
|
|
769
|
+
let s = W(1);
|
|
770
|
+
t && (n ? F(n) && (s = et(n)) : s = et(e));
|
|
771
|
+
const l = Ve(r, i, n) ? re(r) : W(0);
|
|
772
|
+
let c = (o.left + l.x) / s.x, a = (o.top + l.y) / s.y, f = o.width / s.x, p = o.height / s.y;
|
|
733
773
|
if (r) {
|
|
734
|
-
const d =
|
|
735
|
-
let
|
|
736
|
-
for (; g &&
|
|
737
|
-
const h =
|
|
738
|
-
c *= h.x, a *= h.y,
|
|
774
|
+
const d = z(r), m = n && F(n) ? z(n) : n;
|
|
775
|
+
let v = d, g = wt(v);
|
|
776
|
+
for (; g && n && m !== v; ) {
|
|
777
|
+
const h = et(g), u = g.getBoundingClientRect(), y = M(g), w = u.left + (g.clientLeft + parseFloat(y.paddingLeft)) * h.x, O = u.top + (g.clientTop + parseFloat(y.paddingTop)) * h.y;
|
|
778
|
+
c *= h.x, a *= h.y, f *= h.x, p *= h.y, c += w, a += O, v = z(g), g = wt(v);
|
|
739
779
|
}
|
|
740
780
|
}
|
|
741
781
|
return mt({
|
|
742
|
-
width:
|
|
743
|
-
height:
|
|
782
|
+
width: f,
|
|
783
|
+
height: p,
|
|
744
784
|
x: c,
|
|
745
785
|
y: a
|
|
746
786
|
});
|
|
747
787
|
}
|
|
748
|
-
function Lt(
|
|
749
|
-
const
|
|
750
|
-
return
|
|
788
|
+
function Lt(e, t) {
|
|
789
|
+
const i = ht(e).scrollLeft;
|
|
790
|
+
return t ? t.left + i : tt(U(e)).left + i;
|
|
751
791
|
}
|
|
752
|
-
function le(
|
|
753
|
-
|
|
754
|
-
const
|
|
792
|
+
function le(e, t, i) {
|
|
793
|
+
i === void 0 && (i = !1);
|
|
794
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - (i ? 0 : (
|
|
755
795
|
// RTL <body> scrollbar.
|
|
756
|
-
Lt(
|
|
757
|
-
)), r =
|
|
796
|
+
Lt(e, n)
|
|
797
|
+
)), r = n.top + t.scrollTop;
|
|
758
798
|
return {
|
|
759
799
|
x: o,
|
|
760
800
|
y: r
|
|
761
801
|
};
|
|
762
802
|
}
|
|
763
|
-
function Ue(
|
|
803
|
+
function Ue(e) {
|
|
764
804
|
let {
|
|
765
|
-
elements:
|
|
766
|
-
rect:
|
|
767
|
-
offsetParent:
|
|
805
|
+
elements: t,
|
|
806
|
+
rect: i,
|
|
807
|
+
offsetParent: n,
|
|
768
808
|
strategy: o
|
|
769
|
-
} =
|
|
770
|
-
const r = o === "fixed", s =
|
|
771
|
-
if (
|
|
772
|
-
return
|
|
809
|
+
} = e;
|
|
810
|
+
const r = o === "fixed", s = U(n), l = t ? ut(t.floating) : !1;
|
|
811
|
+
if (n === s || l && r)
|
|
812
|
+
return i;
|
|
773
813
|
let c = {
|
|
774
814
|
scrollLeft: 0,
|
|
775
815
|
scrollTop: 0
|
|
776
|
-
}, a =
|
|
777
|
-
const
|
|
778
|
-
if ((
|
|
779
|
-
const
|
|
780
|
-
a =
|
|
816
|
+
}, a = W(1);
|
|
817
|
+
const f = W(0), p = V(n);
|
|
818
|
+
if ((p || !p && !r) && ((nt(n) !== "body" || lt(s)) && (c = ht(n)), V(n))) {
|
|
819
|
+
const m = tt(n);
|
|
820
|
+
a = et(n), f.x = m.x + n.clientLeft, f.y = m.y + n.clientTop;
|
|
781
821
|
}
|
|
782
|
-
const d = s && !
|
|
822
|
+
const d = s && !p && !r ? le(s, c, !0) : W(0);
|
|
783
823
|
return {
|
|
784
|
-
width:
|
|
785
|
-
height:
|
|
786
|
-
x:
|
|
787
|
-
y:
|
|
824
|
+
width: i.width * a.x,
|
|
825
|
+
height: i.height * a.y,
|
|
826
|
+
x: i.x * a.x - c.scrollLeft * a.x + f.x + d.x,
|
|
827
|
+
y: i.y * a.y - c.scrollTop * a.y + f.y + d.y
|
|
788
828
|
};
|
|
789
829
|
}
|
|
790
|
-
function
|
|
791
|
-
return Array.from(
|
|
830
|
+
function Ye(e) {
|
|
831
|
+
return Array.from(e.getClientRects());
|
|
792
832
|
}
|
|
793
|
-
function Ke(
|
|
794
|
-
const
|
|
795
|
-
let s = -
|
|
796
|
-
const l = -
|
|
797
|
-
return
|
|
833
|
+
function Ke(e) {
|
|
834
|
+
const t = U(e), i = ht(e), n = e.ownerDocument.body, o = _(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), r = _(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
|
|
835
|
+
let s = -i.scrollLeft + Lt(e);
|
|
836
|
+
const l = -i.scrollTop;
|
|
837
|
+
return M(n).direction === "rtl" && (s += _(t.clientWidth, n.clientWidth) - o), {
|
|
798
838
|
width: o,
|
|
799
839
|
height: r,
|
|
800
840
|
x: s,
|
|
801
841
|
y: l
|
|
802
842
|
};
|
|
803
843
|
}
|
|
804
|
-
function Xe(
|
|
805
|
-
const
|
|
806
|
-
let r =
|
|
844
|
+
function Xe(e, t) {
|
|
845
|
+
const i = z(e), n = U(e), o = i.visualViewport;
|
|
846
|
+
let r = n.clientWidth, s = n.clientHeight, l = 0, c = 0;
|
|
807
847
|
if (o) {
|
|
808
848
|
r = o.width, s = o.height;
|
|
809
849
|
const a = Pt();
|
|
810
|
-
(!a || a &&
|
|
850
|
+
(!a || a && t === "fixed") && (l = o.offsetLeft, c = o.offsetTop);
|
|
811
851
|
}
|
|
812
852
|
return {
|
|
813
853
|
width: r,
|
|
@@ -816,8 +856,8 @@ function Xe(t, e) {
|
|
|
816
856
|
y: c
|
|
817
857
|
};
|
|
818
858
|
}
|
|
819
|
-
function
|
|
820
|
-
const
|
|
859
|
+
function qe(e, t) {
|
|
860
|
+
const i = tt(e, !0, t === "fixed"), n = i.top + e.clientTop, o = i.left + e.clientLeft, r = V(e) ? et(e) : W(1), s = e.clientWidth * r.x, l = e.clientHeight * r.y, c = o * r.x, a = n * r.y;
|
|
821
861
|
return {
|
|
822
862
|
width: s,
|
|
823
863
|
height: l,
|
|
@@ -825,53 +865,53 @@ function Ye(t, e) {
|
|
|
825
865
|
y: a
|
|
826
866
|
};
|
|
827
867
|
}
|
|
828
|
-
function Wt(
|
|
829
|
-
let
|
|
830
|
-
if (
|
|
831
|
-
|
|
832
|
-
else if (
|
|
833
|
-
|
|
834
|
-
else if (
|
|
835
|
-
|
|
868
|
+
function Wt(e, t, i) {
|
|
869
|
+
let n;
|
|
870
|
+
if (t === "viewport")
|
|
871
|
+
n = Xe(e, i);
|
|
872
|
+
else if (t === "document")
|
|
873
|
+
n = Ke(U(e));
|
|
874
|
+
else if (F(t))
|
|
875
|
+
n = qe(t, i);
|
|
836
876
|
else {
|
|
837
|
-
const o = re(
|
|
838
|
-
|
|
839
|
-
x:
|
|
840
|
-
y:
|
|
841
|
-
width:
|
|
842
|
-
height:
|
|
877
|
+
const o = re(e);
|
|
878
|
+
n = {
|
|
879
|
+
x: t.x - o.x,
|
|
880
|
+
y: t.y - o.y,
|
|
881
|
+
width: t.width,
|
|
882
|
+
height: t.height
|
|
843
883
|
};
|
|
844
884
|
}
|
|
845
|
-
return mt(
|
|
846
|
-
}
|
|
847
|
-
function ce(
|
|
848
|
-
const
|
|
849
|
-
return
|
|
850
|
-
}
|
|
851
|
-
function
|
|
852
|
-
const
|
|
853
|
-
if (
|
|
854
|
-
return
|
|
855
|
-
let
|
|
856
|
-
const r =
|
|
857
|
-
let s = r ?
|
|
858
|
-
for (;
|
|
859
|
-
const l =
|
|
860
|
-
!c && l.position === "fixed" && (o = null), (r ? !c && !o : !c && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || lt(s) && !c && ce(
|
|
885
|
+
return mt(n);
|
|
886
|
+
}
|
|
887
|
+
function ce(e, t) {
|
|
888
|
+
const i = G(e);
|
|
889
|
+
return i === t || !F(i) || it(i) ? !1 : M(i).position === "fixed" || ce(i, t);
|
|
890
|
+
}
|
|
891
|
+
function Ge(e, t) {
|
|
892
|
+
const i = t.get(e);
|
|
893
|
+
if (i)
|
|
894
|
+
return i;
|
|
895
|
+
let n = rt(e, [], !1).filter((l) => F(l) && nt(l) !== "body"), o = null;
|
|
896
|
+
const r = M(e).position === "fixed";
|
|
897
|
+
let s = r ? G(e) : e;
|
|
898
|
+
for (; F(s) && !it(s); ) {
|
|
899
|
+
const l = M(s), c = Et(s);
|
|
900
|
+
!c && l.position === "fixed" && (o = null), (r ? !c && !o : !c && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || lt(s) && !c && ce(e, s)) ? n = n.filter((f) => f !== s) : o = l, s = G(s);
|
|
861
901
|
}
|
|
862
|
-
return
|
|
902
|
+
return t.set(e, n), n;
|
|
863
903
|
}
|
|
864
|
-
function
|
|
904
|
+
function Ze(e) {
|
|
865
905
|
let {
|
|
866
|
-
element:
|
|
867
|
-
boundary:
|
|
868
|
-
rootBoundary:
|
|
906
|
+
element: t,
|
|
907
|
+
boundary: i,
|
|
908
|
+
rootBoundary: n,
|
|
869
909
|
strategy: o
|
|
870
|
-
} =
|
|
871
|
-
const s = [...
|
|
872
|
-
const
|
|
873
|
-
return a.top =
|
|
874
|
-
}, Wt(
|
|
910
|
+
} = e;
|
|
911
|
+
const s = [...i === "clippingAncestors" ? ut(t) ? [] : Ge(t, this._c) : [].concat(i), n], l = s[0], c = s.reduce((a, f) => {
|
|
912
|
+
const p = Wt(t, f, o);
|
|
913
|
+
return a.top = _(p.top, a.top), a.right = q(p.right, a.right), a.bottom = q(p.bottom, a.bottom), a.left = _(p.left, a.left), a;
|
|
914
|
+
}, Wt(t, l, o));
|
|
875
915
|
return {
|
|
876
916
|
width: c.right - c.left,
|
|
877
917
|
height: c.bottom - c.top,
|
|
@@ -879,256 +919,267 @@ function Ge(t) {
|
|
|
879
919
|
y: c.top
|
|
880
920
|
};
|
|
881
921
|
}
|
|
882
|
-
function
|
|
922
|
+
function Je(e) {
|
|
883
923
|
const {
|
|
884
|
-
width:
|
|
885
|
-
height:
|
|
886
|
-
} = se(
|
|
924
|
+
width: t,
|
|
925
|
+
height: i
|
|
926
|
+
} = se(e);
|
|
887
927
|
return {
|
|
888
|
-
width:
|
|
889
|
-
height:
|
|
928
|
+
width: t,
|
|
929
|
+
height: i
|
|
890
930
|
};
|
|
891
931
|
}
|
|
892
|
-
function
|
|
893
|
-
const
|
|
932
|
+
function Qe(e, t, i) {
|
|
933
|
+
const n = V(t), o = U(t), r = i === "fixed", s = tt(e, !0, r, t);
|
|
894
934
|
let l = {
|
|
895
935
|
scrollLeft: 0,
|
|
896
936
|
scrollTop: 0
|
|
897
937
|
};
|
|
898
|
-
const c =
|
|
899
|
-
if (
|
|
900
|
-
if ((nt(
|
|
901
|
-
const d =
|
|
902
|
-
c.x = d.x +
|
|
938
|
+
const c = W(0);
|
|
939
|
+
if (n || !n && !r)
|
|
940
|
+
if ((nt(t) !== "body" || lt(o)) && (l = ht(t)), n) {
|
|
941
|
+
const d = tt(t, !0, r, t);
|
|
942
|
+
c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
|
|
903
943
|
} else o && (c.x = Lt(o));
|
|
904
|
-
const a = o && !
|
|
944
|
+
const a = o && !n && !r ? le(o, l) : W(0), f = s.left + l.scrollLeft - c.x - a.x, p = s.top + l.scrollTop - c.y - a.y;
|
|
905
945
|
return {
|
|
906
|
-
x:
|
|
907
|
-
y:
|
|
946
|
+
x: f,
|
|
947
|
+
y: p,
|
|
908
948
|
width: s.width,
|
|
909
949
|
height: s.height
|
|
910
950
|
};
|
|
911
951
|
}
|
|
912
|
-
function vt(
|
|
913
|
-
return
|
|
952
|
+
function vt(e) {
|
|
953
|
+
return M(e).position === "static";
|
|
914
954
|
}
|
|
915
|
-
function
|
|
916
|
-
if (!
|
|
955
|
+
function Vt(e, t) {
|
|
956
|
+
if (!V(e) || M(e).position === "fixed")
|
|
917
957
|
return null;
|
|
918
|
-
if (
|
|
919
|
-
return e
|
|
920
|
-
let
|
|
921
|
-
return
|
|
922
|
-
}
|
|
923
|
-
function ae(
|
|
924
|
-
const
|
|
925
|
-
if (ut(
|
|
926
|
-
return
|
|
927
|
-
if (!
|
|
928
|
-
let o =
|
|
929
|
-
for (; o && !
|
|
930
|
-
if (
|
|
958
|
+
if (t)
|
|
959
|
+
return t(e);
|
|
960
|
+
let i = e.offsetParent;
|
|
961
|
+
return U(e) === i && (i = i.ownerDocument.body), i;
|
|
962
|
+
}
|
|
963
|
+
function ae(e, t) {
|
|
964
|
+
const i = z(e);
|
|
965
|
+
if (ut(e))
|
|
966
|
+
return i;
|
|
967
|
+
if (!V(e)) {
|
|
968
|
+
let o = G(e);
|
|
969
|
+
for (; o && !it(o); ) {
|
|
970
|
+
if (F(o) && !vt(o))
|
|
931
971
|
return o;
|
|
932
|
-
o =
|
|
972
|
+
o = G(o);
|
|
933
973
|
}
|
|
934
|
-
return
|
|
974
|
+
return i;
|
|
935
975
|
}
|
|
936
|
-
let
|
|
937
|
-
for (;
|
|
938
|
-
|
|
939
|
-
return
|
|
976
|
+
let n = Vt(e, t);
|
|
977
|
+
for (; n && Ie(n) && vt(n); )
|
|
978
|
+
n = Vt(n, t);
|
|
979
|
+
return n && it(n) && vt(n) && !Et(n) ? i : n || Ne(e) || i;
|
|
940
980
|
}
|
|
941
|
-
const
|
|
942
|
-
const
|
|
981
|
+
const to = async function(e) {
|
|
982
|
+
const t = this.getOffsetParent || ae, i = this.getDimensions, n = await i(e.floating);
|
|
943
983
|
return {
|
|
944
|
-
reference:
|
|
984
|
+
reference: Qe(e.reference, await t(e.floating), e.strategy),
|
|
945
985
|
floating: {
|
|
946
986
|
x: 0,
|
|
947
987
|
y: 0,
|
|
948
|
-
width:
|
|
949
|
-
height:
|
|
988
|
+
width: n.width,
|
|
989
|
+
height: n.height
|
|
950
990
|
}
|
|
951
991
|
};
|
|
952
992
|
};
|
|
953
|
-
function
|
|
954
|
-
return
|
|
993
|
+
function eo(e) {
|
|
994
|
+
return M(e).direction === "rtl";
|
|
955
995
|
}
|
|
956
|
-
const
|
|
996
|
+
const oo = {
|
|
957
997
|
convertOffsetParentRelativeRectToViewportRelativeRect: Ue,
|
|
958
|
-
getDocumentElement:
|
|
959
|
-
getClippingRect:
|
|
998
|
+
getDocumentElement: U,
|
|
999
|
+
getClippingRect: Ze,
|
|
960
1000
|
getOffsetParent: ae,
|
|
961
|
-
getElementRects:
|
|
962
|
-
getClientRects:
|
|
963
|
-
getDimensions:
|
|
964
|
-
getScale:
|
|
965
|
-
isElement:
|
|
966
|
-
isRTL:
|
|
1001
|
+
getElementRects: to,
|
|
1002
|
+
getClientRects: Ye,
|
|
1003
|
+
getDimensions: Je,
|
|
1004
|
+
getScale: et,
|
|
1005
|
+
isElement: F,
|
|
1006
|
+
isRTL: eo
|
|
967
1007
|
};
|
|
968
|
-
function fe(
|
|
969
|
-
return
|
|
1008
|
+
function fe(e, t) {
|
|
1009
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
970
1010
|
}
|
|
971
|
-
function
|
|
972
|
-
let
|
|
973
|
-
const o =
|
|
1011
|
+
function io(e, t) {
|
|
1012
|
+
let i = null, n;
|
|
1013
|
+
const o = U(e);
|
|
974
1014
|
function r() {
|
|
975
1015
|
var l;
|
|
976
|
-
clearTimeout(
|
|
1016
|
+
clearTimeout(n), (l = i) == null || l.disconnect(), i = null;
|
|
977
1017
|
}
|
|
978
1018
|
function s(l, c) {
|
|
979
1019
|
l === void 0 && (l = !1), c === void 0 && (c = 1), r();
|
|
980
|
-
const a =
|
|
981
|
-
left:
|
|
982
|
-
top:
|
|
1020
|
+
const a = e.getBoundingClientRect(), {
|
|
1021
|
+
left: f,
|
|
1022
|
+
top: p,
|
|
983
1023
|
width: d,
|
|
984
|
-
height:
|
|
1024
|
+
height: m
|
|
985
1025
|
} = a;
|
|
986
|
-
if (l ||
|
|
1026
|
+
if (l || t(), !d || !m)
|
|
987
1027
|
return;
|
|
988
|
-
const
|
|
989
|
-
rootMargin: -
|
|
990
|
-
threshold:
|
|
1028
|
+
const v = ct(p), g = ct(o.clientWidth - (f + d)), h = ct(o.clientHeight - (p + m)), u = ct(f), w = {
|
|
1029
|
+
rootMargin: -v + "px " + -g + "px " + -h + "px " + -u + "px",
|
|
1030
|
+
threshold: _(0, q(1, c)) || 1
|
|
991
1031
|
};
|
|
992
|
-
let
|
|
1032
|
+
let O = !0;
|
|
993
1033
|
function x(D) {
|
|
994
|
-
const
|
|
995
|
-
if (
|
|
996
|
-
if (!
|
|
1034
|
+
const P = D[0].intersectionRatio;
|
|
1035
|
+
if (P !== c) {
|
|
1036
|
+
if (!O)
|
|
997
1037
|
return s();
|
|
998
|
-
|
|
1038
|
+
P ? s(!1, P) : n = setTimeout(() => {
|
|
999
1039
|
s(!1, 1e-7);
|
|
1000
1040
|
}, 1e3);
|
|
1001
1041
|
}
|
|
1002
|
-
|
|
1042
|
+
P === 1 && !fe(a, e.getBoundingClientRect()) && s(), O = !1;
|
|
1003
1043
|
}
|
|
1004
1044
|
try {
|
|
1005
|
-
|
|
1045
|
+
i = new IntersectionObserver(x, {
|
|
1006
1046
|
...w,
|
|
1007
1047
|
// Handle <iframe>s
|
|
1008
1048
|
root: o.ownerDocument
|
|
1009
1049
|
});
|
|
1010
1050
|
} catch {
|
|
1011
|
-
|
|
1051
|
+
i = new IntersectionObserver(x, w);
|
|
1012
1052
|
}
|
|
1013
|
-
|
|
1053
|
+
i.observe(e);
|
|
1014
1054
|
}
|
|
1015
1055
|
return s(!0), r;
|
|
1016
1056
|
}
|
|
1017
|
-
function no(t,
|
|
1018
|
-
|
|
1057
|
+
function no(e, t, i, n) {
|
|
1058
|
+
n === void 0 && (n = {});
|
|
1019
1059
|
const {
|
|
1020
1060
|
ancestorScroll: o = !0,
|
|
1021
1061
|
ancestorResize: r = !0,
|
|
1022
1062
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1023
1063
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
1024
1064
|
animationFrame: c = !1
|
|
1025
|
-
} =
|
|
1026
|
-
|
|
1027
|
-
o && u.addEventListener("scroll",
|
|
1065
|
+
} = n, a = Rt(e), f = o || r ? [...a ? rt(a) : [], ...rt(t)] : [];
|
|
1066
|
+
f.forEach((u) => {
|
|
1067
|
+
o && u.addEventListener("scroll", i, {
|
|
1028
1068
|
passive: !0
|
|
1029
|
-
}), r && u.addEventListener("resize",
|
|
1069
|
+
}), r && u.addEventListener("resize", i);
|
|
1030
1070
|
});
|
|
1031
|
-
const
|
|
1032
|
-
let d = -1,
|
|
1033
|
-
s && (
|
|
1071
|
+
const p = a && l ? io(a, i) : null;
|
|
1072
|
+
let d = -1, m = null;
|
|
1073
|
+
s && (m = new ResizeObserver((u) => {
|
|
1034
1074
|
let [y] = u;
|
|
1035
|
-
y && y.target === a &&
|
|
1075
|
+
y && y.target === a && m && (m.unobserve(t), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1036
1076
|
var w;
|
|
1037
|
-
(w =
|
|
1038
|
-
})),
|
|
1039
|
-
}), a && !c &&
|
|
1040
|
-
let
|
|
1077
|
+
(w = m) == null || w.observe(t);
|
|
1078
|
+
})), i();
|
|
1079
|
+
}), a && !c && m.observe(a), m.observe(t));
|
|
1080
|
+
let v, g = c ? tt(e) : null;
|
|
1041
1081
|
c && h();
|
|
1042
1082
|
function h() {
|
|
1043
|
-
const u =
|
|
1044
|
-
g && !fe(g, u) &&
|
|
1083
|
+
const u = tt(e);
|
|
1084
|
+
g && !fe(g, u) && i(), g = u, v = requestAnimationFrame(h);
|
|
1045
1085
|
}
|
|
1046
|
-
return
|
|
1086
|
+
return i(), () => {
|
|
1047
1087
|
var u;
|
|
1048
|
-
|
|
1049
|
-
o && y.removeEventListener("scroll",
|
|
1050
|
-
}),
|
|
1088
|
+
f.forEach((y) => {
|
|
1089
|
+
o && y.removeEventListener("scroll", i), r && y.removeEventListener("resize", i);
|
|
1090
|
+
}), p == null || p(), (u = m) == null || u.disconnect(), m = null, c && cancelAnimationFrame(v);
|
|
1051
1091
|
};
|
|
1052
1092
|
}
|
|
1053
|
-
const
|
|
1054
|
-
const
|
|
1055
|
-
platform:
|
|
1056
|
-
...
|
|
1093
|
+
const so = Fe, ro = ke, lo = Me, co = $e, ao = je, fo = Be, po = (e, t, i) => {
|
|
1094
|
+
const n = /* @__PURE__ */ new Map(), o = {
|
|
1095
|
+
platform: oo,
|
|
1096
|
+
...i
|
|
1057
1097
|
}, r = {
|
|
1058
1098
|
...o.platform,
|
|
1059
|
-
_c:
|
|
1099
|
+
_c: n
|
|
1060
1100
|
};
|
|
1061
|
-
return
|
|
1101
|
+
return De(e, t, {
|
|
1062
1102
|
...o,
|
|
1063
1103
|
platform: r
|
|
1064
1104
|
});
|
|
1065
|
-
},
|
|
1066
|
-
var
|
|
1105
|
+
}, mo = 16, uo = (e) => {
|
|
1106
|
+
var t;
|
|
1067
1107
|
return {
|
|
1068
|
-
visibility: (
|
|
1108
|
+
visibility: (t = e.hide) != null && t.referenceHidden ? "hidden" : "visible"
|
|
1069
1109
|
};
|
|
1070
|
-
},
|
|
1110
|
+
}, ho = (e) => ({
|
|
1071
1111
|
name: "arrowStyles",
|
|
1072
|
-
options:
|
|
1073
|
-
async fn(
|
|
1112
|
+
options: e,
|
|
1113
|
+
async fn(t) {
|
|
1074
1114
|
var St, _t;
|
|
1075
|
-
const { x:
|
|
1115
|
+
const { x: i, y: n, placement: o, rects: r, platform: s, elements: l, middlewareData: c } = t, { element: a, padding: f = 0 } = Z(e, t) || {};
|
|
1076
1116
|
if (a == null)
|
|
1077
1117
|
return {};
|
|
1078
|
-
const
|
|
1079
|
-
let
|
|
1080
|
-
(
|
|
1081
|
-
const
|
|
1082
|
-
placement:
|
|
1118
|
+
const p = oe(f), d = { x: i, y: n }, m = At(o), v = Ct(m), g = Ot(m), h = await s.getDimensions(a), u = m === "y", y = u ? "top" : "left", w = u ? "bottom" : "right", O = u ? "clientHeight" : "clientWidth", x = r.reference[g] + r.reference[m] - d[m] - r.floating[g], D = d[m] - r.reference[m], P = await ((St = s.getOffsetParent) == null ? void 0 : St.call(s, a));
|
|
1119
|
+
let L = P ? P[O] : 0;
|
|
1120
|
+
(!L || !await ((_t = s.isElement) == null ? void 0 : _t.call(s, P))) && (L = l.floating[O] || r.floating[g]);
|
|
1121
|
+
const T = x / 2 - D / 2, C = L / 2 - h.width / 2 - 1, S = q(p[y], C), j = q(p[w], C), k = S, I = L - h.width - j, Y = L / 2 - h.width / 2 + T, X = yt(k, Y, I), K = !c.arrow && H(o) != null && Y !== X && r.reference[g] / 2 - (Y < k ? S : j) - h.width / 2 < 0, N = K ? Y < k ? Y - k : Y - I : 0, B = $(o), gt = ["top", "left"].includes(B) ? -1 : 1, de = h.height * gt, ue = vo({
|
|
1122
|
+
placement: B,
|
|
1083
1123
|
arrowHeight: h.height,
|
|
1084
1124
|
arrowWidth: h.width,
|
|
1085
1125
|
// pass arrow middleware
|
|
1086
|
-
[
|
|
1126
|
+
[m]: X
|
|
1087
1127
|
// for posterity, this is what the floating-ui arrow middleware returns
|
|
1088
1128
|
// centerOffset: center - offset - alignmentOffset,
|
|
1089
1129
|
// ...(shouldAddOffset && { alignmentOffset }),
|
|
1090
1130
|
});
|
|
1091
1131
|
return {
|
|
1092
|
-
[
|
|
1093
|
-
[
|
|
1132
|
+
[m]: d[m] + N,
|
|
1133
|
+
[v]: d[v] + de,
|
|
1094
1134
|
data: ue,
|
|
1095
|
-
reset:
|
|
1135
|
+
reset: K
|
|
1096
1136
|
};
|
|
1097
1137
|
}
|
|
1098
|
-
}), at = (t,
|
|
1099
|
-
if (
|
|
1100
|
-
const o =
|
|
1101
|
-
t
|
|
1138
|
+
}), at = (e, t, i, n) => {
|
|
1139
|
+
if (n) {
|
|
1140
|
+
const o = n === !0 ? i() : i(n);
|
|
1141
|
+
e[t](o);
|
|
1102
1142
|
}
|
|
1103
|
-
},
|
|
1104
|
-
baseConfig:
|
|
1105
|
-
middleware:
|
|
1106
|
-
offset:
|
|
1107
|
-
arrow:
|
|
1143
|
+
}, go = ({
|
|
1144
|
+
baseConfig: e,
|
|
1145
|
+
middleware: t,
|
|
1146
|
+
offset: i,
|
|
1147
|
+
arrow: n,
|
|
1108
1148
|
placement: o = "top"
|
|
1109
1149
|
}) => {
|
|
1110
|
-
const r = { ...
|
|
1150
|
+
const r = { ...e, placement: o };
|
|
1111
1151
|
let s = [];
|
|
1112
|
-
if (typeof
|
|
1113
|
-
s.push(
|
|
1114
|
-
let l =
|
|
1115
|
-
|
|
1152
|
+
if (typeof t.overrides != "object") {
|
|
1153
|
+
s.push(so(i));
|
|
1154
|
+
let l = t.flip ?? !0;
|
|
1155
|
+
if (t.autoPlacement && (l = !1), at(
|
|
1116
1156
|
s,
|
|
1117
1157
|
"unshift",
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
), at(s, "
|
|
1158
|
+
ro,
|
|
1159
|
+
t.autoPlacement
|
|
1160
|
+
), at(s, "unshift", co, l), t.size) {
|
|
1161
|
+
const c = t.size === !0 ? {
|
|
1162
|
+
padding: mo,
|
|
1163
|
+
apply({ availableHeight: a, elements: f }) {
|
|
1164
|
+
Object.assign(f.floating.style, {
|
|
1165
|
+
maxHeight: `${a}px`
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
} : t.size;
|
|
1169
|
+
s.push(ao(c));
|
|
1170
|
+
}
|
|
1171
|
+
at(s, "push", lo, t.shift ?? !0), at(s, "push", fo, t.hide ?? !0);
|
|
1121
1172
|
} else
|
|
1122
|
-
s.push(...
|
|
1123
|
-
return
|
|
1124
|
-
},
|
|
1125
|
-
placement:
|
|
1126
|
-
arrowHeight:
|
|
1127
|
-
arrowWidth:
|
|
1128
|
-
x:
|
|
1173
|
+
s.push(...t.overrides);
|
|
1174
|
+
return n.hide || s.push(ho(n.options)), typeof t.overrides == "function" && (s = t.overrides(s)), r.middleware = s, r;
|
|
1175
|
+
}, vo = ({
|
|
1176
|
+
placement: e,
|
|
1177
|
+
arrowHeight: t,
|
|
1178
|
+
arrowWidth: i,
|
|
1179
|
+
x: n,
|
|
1129
1180
|
y: o
|
|
1130
1181
|
}) => {
|
|
1131
|
-
const r =
|
|
1182
|
+
const r = $(e), s = i / 2 - t, l = {
|
|
1132
1183
|
/* since the default orientation is pointing down, we don't need to rotate the arrow
|
|
1133
1184
|
if the tooltip is on top of the reference element
|
|
1134
1185
|
*/
|
|
@@ -1156,7 +1207,7 @@ const io = Fe, so = De, ro = Me, lo = $e, co = Be, ao = (t, e, n) => {
|
|
|
1156
1207
|
*/
|
|
1157
1208
|
left: `rotate(-90deg) translateX(${-s}px)`,
|
|
1158
1209
|
right: `rotate(90deg) translateX(${s}px)`
|
|
1159
|
-
}[r], c = -
|
|
1210
|
+
}[r], c = -i / 2 - t, a = {
|
|
1160
1211
|
/*
|
|
1161
1212
|
* If the tooltip is at the top of the anchor, place the arrow at the bottom of
|
|
1162
1213
|
* the tooltip with bottom: 0. The bottom of the arrow will be flush with the bottom
|
|
@@ -1170,7 +1221,7 @@ const io = Fe, so = De, ro = Me, lo = $e, co = Be, ao = (t, e, n) => {
|
|
|
1170
1221
|
* --- (bottom of tooltip)
|
|
1171
1222
|
* v (arrow)
|
|
1172
1223
|
*/
|
|
1173
|
-
top: `${-
|
|
1224
|
+
top: `${-t}px`,
|
|
1174
1225
|
/*
|
|
1175
1226
|
* Place the arrow at the top of the tooltip with top: 0. The arrow will be rotated
|
|
1176
1227
|
* to point downwards by default. When it's then rotated by 180 deg with
|
|
@@ -1182,7 +1233,7 @@ const io = Fe, so = De, ro = Me, lo = $e, co = Be, ao = (t, e, n) => {
|
|
|
1182
1233
|
*
|
|
1183
1234
|
* In summary the arrow is shifted up by 2 * arrowHeight, or top: -2 * arrowHeight
|
|
1184
1235
|
*/
|
|
1185
|
-
bottom: `${-
|
|
1236
|
+
bottom: `${-t * 2}px`,
|
|
1186
1237
|
/*
|
|
1187
1238
|
* Place the arrow at the right of the tooltip with right: 0. When we rotate
|
|
1188
1239
|
* the arrow 90 degrees clockwise about the bottom center, there will now be
|
|
@@ -1201,16 +1252,16 @@ const io = Fe, so = De, ro = Me, lo = $e, co = Be, ao = (t, e, n) => {
|
|
|
1201
1252
|
left: `${c}px`,
|
|
1202
1253
|
// similarly for the right side
|
|
1203
1254
|
right: `${c}px`
|
|
1204
|
-
}[r],
|
|
1255
|
+
}[r], f = {
|
|
1205
1256
|
transform: l
|
|
1206
1257
|
};
|
|
1207
|
-
|
|
1208
|
-
const
|
|
1209
|
-
return
|
|
1210
|
-
},
|
|
1211
|
-
class
|
|
1212
|
-
constructor(
|
|
1213
|
-
this.eventMap = /* @__PURE__ */ new Map(), this.elements = /* @__PURE__ */ new Map(),
|
|
1258
|
+
f.left = n != null ? `${n}px` : "", f.top = o != null ? `${o}px` : "";
|
|
1259
|
+
const p = st(r);
|
|
1260
|
+
return f[p] = a, f;
|
|
1261
|
+
}, bo = ".bm-floatingui{z-index:999;position:absolute;inset:unset;top:0;left:0;width:max-content}.bm-floatingui[popover]{overflow:unset;border:unset}.bm-floatingui__arrow{position:absolute;transform-origin:bottom center}.bm-floatingui__overlay{background:var(--bm-comp-dialog-color-overlay);padding:var(--bm-comp-dialog-space-viewport-offset);display:flex;justify-content:center;align-items:center;z-index:1}.bm-floatingui__overlay--transparent{background:transparent}";
|
|
1262
|
+
class yo {
|
|
1263
|
+
constructor(t) {
|
|
1264
|
+
this.eventMap = /* @__PURE__ */ new Map(), this.elements = /* @__PURE__ */ new Map(), t.addController(this);
|
|
1214
1265
|
}
|
|
1215
1266
|
/**
|
|
1216
1267
|
* Registers an element to be managed by the controller. Adds previously
|
|
@@ -1223,10 +1274,10 @@ class go {
|
|
|
1223
1274
|
* @param assignListeners - a map of categories to booleans to dynamically add the
|
|
1224
1275
|
* category listeners to the element. Or pass in true to add them all.
|
|
1225
1276
|
*/
|
|
1226
|
-
registerElement(
|
|
1227
|
-
if (this.elements.has(
|
|
1228
|
-
const o = typeof
|
|
1229
|
-
this.assignEventListeners(
|
|
1277
|
+
registerElement(t, i, n = !1) {
|
|
1278
|
+
if (this.elements.has(t) && this.removeAllEventListeners(), this.elements.set(t, i), n) {
|
|
1279
|
+
const o = typeof n == "object" ? (r) => n[r] : void 0;
|
|
1280
|
+
this.assignEventListeners(t, o);
|
|
1230
1281
|
}
|
|
1231
1282
|
}
|
|
1232
1283
|
/**
|
|
@@ -1248,16 +1299,16 @@ class go {
|
|
|
1248
1299
|
* },
|
|
1249
1300
|
* ]);
|
|
1250
1301
|
*/
|
|
1251
|
-
registerEventListeners(
|
|
1252
|
-
this.eventMap.has(
|
|
1253
|
-
const o = this.eventMap.get(
|
|
1254
|
-
if (typeof
|
|
1255
|
-
o && o.set(
|
|
1302
|
+
registerEventListeners(t, i, n) {
|
|
1303
|
+
this.eventMap.has(t) || this.eventMap.set(t, /* @__PURE__ */ new Map());
|
|
1304
|
+
const o = this.eventMap.get(t);
|
|
1305
|
+
if (typeof n == "function")
|
|
1306
|
+
o && o.set(i, [n]);
|
|
1256
1307
|
else {
|
|
1257
|
-
const r =
|
|
1308
|
+
const r = n.filter(
|
|
1258
1309
|
(s) => !!s
|
|
1259
1310
|
);
|
|
1260
|
-
o && o.set(
|
|
1311
|
+
o && o.set(i, r);
|
|
1261
1312
|
}
|
|
1262
1313
|
}
|
|
1263
1314
|
/**
|
|
@@ -1267,15 +1318,15 @@ class go {
|
|
|
1267
1318
|
* @param mouseenter
|
|
1268
1319
|
* @param mouseleave
|
|
1269
1320
|
*/
|
|
1270
|
-
registerHoverListener(
|
|
1271
|
-
this.registerEventListeners("hover",
|
|
1321
|
+
registerHoverListener(t, i, n) {
|
|
1322
|
+
this.registerEventListeners("hover", t, [
|
|
1272
1323
|
{
|
|
1273
1324
|
event: "mouseenter",
|
|
1274
|
-
handler:
|
|
1325
|
+
handler: i
|
|
1275
1326
|
},
|
|
1276
|
-
|
|
1327
|
+
n && {
|
|
1277
1328
|
event: "mouseleave",
|
|
1278
|
-
handler:
|
|
1329
|
+
handler: n
|
|
1279
1330
|
}
|
|
1280
1331
|
]);
|
|
1281
1332
|
}
|
|
@@ -1285,9 +1336,9 @@ class go {
|
|
|
1285
1336
|
* @param elementId
|
|
1286
1337
|
* @param click
|
|
1287
1338
|
*/
|
|
1288
|
-
registerClickListener(
|
|
1289
|
-
this.registerEventListeners("click",
|
|
1290
|
-
{ event: "click", handler:
|
|
1339
|
+
registerClickListener(t, i) {
|
|
1340
|
+
this.registerEventListeners("click", t, [
|
|
1341
|
+
{ event: "click", handler: i }
|
|
1291
1342
|
]);
|
|
1292
1343
|
}
|
|
1293
1344
|
/**
|
|
@@ -1297,18 +1348,18 @@ class go {
|
|
|
1297
1348
|
* @param focus
|
|
1298
1349
|
* @param blur
|
|
1299
1350
|
*/
|
|
1300
|
-
registerFocusListener(
|
|
1301
|
-
this.registerEventListeners("focus",
|
|
1302
|
-
{ event: "focus", handler:
|
|
1303
|
-
|
|
1351
|
+
registerFocusListener(t, i, n) {
|
|
1352
|
+
this.registerEventListeners("focus", t, [
|
|
1353
|
+
{ event: "focus", handler: i },
|
|
1354
|
+
n && { event: "blur", handler: n }
|
|
1304
1355
|
]);
|
|
1305
1356
|
}
|
|
1306
1357
|
/**
|
|
1307
1358
|
* Removes all event listeners
|
|
1308
1359
|
*/
|
|
1309
1360
|
removeAllEventListeners() {
|
|
1310
|
-
this.eventMap.forEach((
|
|
1311
|
-
this.removeEventListeners(
|
|
1361
|
+
this.eventMap.forEach((t, i) => {
|
|
1362
|
+
this.removeEventListeners(i);
|
|
1312
1363
|
});
|
|
1313
1364
|
}
|
|
1314
1365
|
hostDisconnected() {
|
|
@@ -1319,16 +1370,16 @@ class go {
|
|
|
1319
1370
|
*
|
|
1320
1371
|
* @param category
|
|
1321
1372
|
*/
|
|
1322
|
-
addEventListeners(
|
|
1323
|
-
this.setEventListeners(
|
|
1373
|
+
addEventListeners(t) {
|
|
1374
|
+
this.setEventListeners(t, "addEventListener");
|
|
1324
1375
|
}
|
|
1325
1376
|
/**
|
|
1326
1377
|
* Removes event listeners for a specific category
|
|
1327
1378
|
*
|
|
1328
1379
|
* @param category
|
|
1329
1380
|
*/
|
|
1330
|
-
removeEventListeners(
|
|
1331
|
-
this.setEventListeners(
|
|
1381
|
+
removeEventListeners(t) {
|
|
1382
|
+
this.setEventListeners(t, "removeEventListener");
|
|
1332
1383
|
}
|
|
1333
1384
|
/**
|
|
1334
1385
|
* Assigns event listeners to an element based on the category
|
|
@@ -1337,15 +1388,15 @@ class go {
|
|
|
1337
1388
|
* @param categoryFilter - Optional filter to only assign event listeners for a specific category
|
|
1338
1389
|
* @private
|
|
1339
1390
|
*/
|
|
1340
|
-
assignEventListeners(
|
|
1341
|
-
const
|
|
1342
|
-
return
|
|
1343
|
-
(
|
|
1344
|
-
l ===
|
|
1345
|
-
|
|
1391
|
+
assignEventListeners(t, i) {
|
|
1392
|
+
const n = this.elements.get(t);
|
|
1393
|
+
return n ? (this.eventMap.forEach((o, r) => {
|
|
1394
|
+
(i === void 0 || i(r)) && o.forEach((s, l) => {
|
|
1395
|
+
l === t && s.forEach(({ event: c, handler: a }) => {
|
|
1396
|
+
n.addEventListener(c, a);
|
|
1346
1397
|
});
|
|
1347
1398
|
});
|
|
1348
|
-
}), !0) : (console.warn(`Element ${
|
|
1399
|
+
}), !0) : (console.warn(`Element ${t} not found`), !1);
|
|
1349
1400
|
}
|
|
1350
1401
|
/**
|
|
1351
1402
|
* Perform action with handler on all elements in category
|
|
@@ -1354,29 +1405,29 @@ class go {
|
|
|
1354
1405
|
* @param action
|
|
1355
1406
|
* @private
|
|
1356
1407
|
*/
|
|
1357
|
-
setEventListeners(
|
|
1358
|
-
var
|
|
1359
|
-
if (!this.eventMap.has(
|
|
1360
|
-
console.warn(`No event listeners registered for ${
|
|
1408
|
+
setEventListeners(t, i) {
|
|
1409
|
+
var n;
|
|
1410
|
+
if (!this.eventMap.has(t)) {
|
|
1411
|
+
console.warn(`No event listeners registered for ${t}`);
|
|
1361
1412
|
return;
|
|
1362
1413
|
}
|
|
1363
|
-
(
|
|
1414
|
+
(n = this.eventMap.get(t)) == null || n.forEach((o, r) => {
|
|
1364
1415
|
const s = this.elements.get(r);
|
|
1365
1416
|
if (!s) {
|
|
1366
1417
|
console.warn(
|
|
1367
|
-
`Cannot ${
|
|
1418
|
+
`Cannot ${i} to ${r} for event category ${t}`
|
|
1368
1419
|
);
|
|
1369
1420
|
return;
|
|
1370
1421
|
}
|
|
1371
1422
|
o.forEach(({ event: l, handler: c }) => {
|
|
1372
|
-
s[
|
|
1423
|
+
s[i](l, c);
|
|
1373
1424
|
});
|
|
1374
1425
|
});
|
|
1375
1426
|
}
|
|
1376
1427
|
}
|
|
1377
|
-
class
|
|
1378
|
-
constructor(
|
|
1379
|
-
|
|
1428
|
+
class Ut {
|
|
1429
|
+
constructor(t) {
|
|
1430
|
+
t.addController(this);
|
|
1380
1431
|
}
|
|
1381
1432
|
hostDisconnected() {
|
|
1382
1433
|
this.cancelSchedule();
|
|
@@ -1387,8 +1438,8 @@ class Vt {
|
|
|
1387
1438
|
* @param callback - The function to run.
|
|
1388
1439
|
* @param delay - The delay in milliseconds.
|
|
1389
1440
|
*/
|
|
1390
|
-
schedule(
|
|
1391
|
-
this.timer || (this.timer = setTimeout(
|
|
1441
|
+
schedule(t, i) {
|
|
1442
|
+
this.timer || (this.timer = setTimeout(t, i));
|
|
1392
1443
|
}
|
|
1393
1444
|
/**
|
|
1394
1445
|
* Cancel the scheduled function.
|
|
@@ -1397,15 +1448,15 @@ class Vt {
|
|
|
1397
1448
|
clearTimeout(this.timer), this.timer = void 0;
|
|
1398
1449
|
}
|
|
1399
1450
|
}
|
|
1400
|
-
var
|
|
1401
|
-
for (var o = void 0, r =
|
|
1402
|
-
(s =
|
|
1403
|
-
return o &&
|
|
1451
|
+
var wo = Object.defineProperty, Yt = (e, t, i, n) => {
|
|
1452
|
+
for (var o = void 0, r = e.length - 1, s; r >= 0; r--)
|
|
1453
|
+
(s = e[r]) && (o = s(t, i, o) || o);
|
|
1454
|
+
return o && wo(t, i, o), o;
|
|
1404
1455
|
};
|
|
1405
|
-
const
|
|
1406
|
-
class
|
|
1407
|
-
shouldToggle(
|
|
1408
|
-
|
|
1456
|
+
const xo = (e) => {
|
|
1457
|
+
class t extends e {
|
|
1458
|
+
shouldToggle(n, o) {
|
|
1459
|
+
n && this.fireChange(o);
|
|
1409
1460
|
const r = this._isOpen === o, s = this.open === !o;
|
|
1410
1461
|
return !(r || s);
|
|
1411
1462
|
}
|
|
@@ -1415,38 +1466,38 @@ const bo = (t) => {
|
|
|
1415
1466
|
*
|
|
1416
1467
|
* @param change - whether the floating content is open or closed
|
|
1417
1468
|
*/
|
|
1418
|
-
fireChange(
|
|
1469
|
+
fireChange(n) {
|
|
1419
1470
|
const o = `${be}toggle`;
|
|
1420
1471
|
this.dispatchEvent(
|
|
1421
1472
|
new CustomEvent(o, {
|
|
1422
|
-
detail: { open:
|
|
1473
|
+
detail: { open: n },
|
|
1423
1474
|
bubbles: !0,
|
|
1424
1475
|
composed: !0
|
|
1425
1476
|
})
|
|
1426
1477
|
);
|
|
1427
1478
|
}
|
|
1428
1479
|
}
|
|
1429
|
-
return
|
|
1430
|
-
|
|
1431
|
-
],
|
|
1480
|
+
return Yt([
|
|
1481
|
+
b({ type: Boolean })
|
|
1482
|
+
], t.prototype, "open"), Yt([
|
|
1432
1483
|
Ee()
|
|
1433
|
-
],
|
|
1484
|
+
], t.prototype, "_isOpen"), t;
|
|
1434
1485
|
};
|
|
1435
|
-
var
|
|
1436
|
-
for (var o = void 0, r =
|
|
1437
|
-
(s =
|
|
1438
|
-
return o &&
|
|
1486
|
+
var Co = Object.defineProperty, R = (e, t, i, n) => {
|
|
1487
|
+
for (var o = void 0, r = e.length - 1, s; r >= 0; r--)
|
|
1488
|
+
(s = e[r]) && (o = s(t, i, o) || o);
|
|
1489
|
+
return o && Co(t, i, o), o;
|
|
1439
1490
|
};
|
|
1440
1491
|
const {
|
|
1441
|
-
subElementClassPrefix:
|
|
1442
|
-
baseClassNamePrefix:
|
|
1443
|
-
} = Zt("floatingui"),
|
|
1444
|
-
content:
|
|
1445
|
-
arrow: `${
|
|
1446
|
-
},
|
|
1447
|
-
const
|
|
1492
|
+
subElementClassPrefix: Oo,
|
|
1493
|
+
baseClassNamePrefix: Ao
|
|
1494
|
+
} = Zt("floatingui"), Kt = {
|
|
1495
|
+
content: Ao,
|
|
1496
|
+
arrow: `${Oo}arrow`
|
|
1497
|
+
}, Eo = ge("popover"), Po = (e) => {
|
|
1498
|
+
const i = class i extends xo(e) {
|
|
1448
1499
|
constructor() {
|
|
1449
|
-
super(), this.hideArrow = !1, this.shift = !0, this.autoHiding = !0, this.defaultOpen = !1, this.showDelay = 0, this.hideDelay = 0, this.popoverAPI = !0, this.disableAutoAria = !1, this.autoDescribedById = Ce(), this.openOnClick = !1, this.openOnHover = !1, this.openOnFocus = !1, this.initialRender = !0, this.contentRef = zt(), this.edgePadding = 0, this.shouldReturnFocus = !1, this.eventPrefix = "bm-floatingui", this.arrowRef = zt(), this.shouldUsePopoverAPI = !1, this.anchor = null, this.eventController = new
|
|
1500
|
+
super(), this.hideArrow = !1, this.shift = !0, this.autoHiding = !0, this.defaultOpen = !1, this.showDelay = 0, this.hideDelay = 0, this.popoverAPI = !0, this.disableAutoAria = !1, this.autoDescribedById = Ce(), this.openOnClick = !1, this.openOnHover = !1, this.openOnFocus = !1, this.initialRender = !0, this.contentRef = zt(), this.edgePadding = 0, this.shouldReturnFocus = !1, this.eventPrefix = "bm-floatingui", this.arrowRef = zt(), this.shouldUsePopoverAPI = !1, this.anchor = null, this.eventController = new yo(this), this.autoUpdateCleanup = null, this.closeController = new Ut(this), this.openController = new Ut(this), this.openContent = this.openContent.bind(this), this.mouseEnterHandler = this.mouseEnterHandler.bind(this), this.mouseLeaveHandler = this.mouseLeaveHandler.bind(this), this.closeContent = this.closeContent.bind(this), this.toggleContent = this.toggleContent.bind(this), this.contentSlotHandler = this.contentSlotHandler.bind(this), this.environmentClickListener = this.environmentClickListener.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.eventController.registerClickListener("anchor", this.toggleContent), this.eventController.registerHoverListener(
|
|
1450
1501
|
"anchor",
|
|
1451
1502
|
this.mouseEnterHandler,
|
|
1452
1503
|
this.mouseLeaveHandler
|
|
@@ -1515,7 +1566,7 @@ const {
|
|
|
1515
1566
|
var s;
|
|
1516
1567
|
(s = this.autoUpdateCleanup) == null || s.call(this);
|
|
1517
1568
|
let o = {};
|
|
1518
|
-
o =
|
|
1569
|
+
o = go({
|
|
1519
1570
|
baseConfig: o,
|
|
1520
1571
|
middleware: {
|
|
1521
1572
|
autoPlacement: this.autoPlacement,
|
|
@@ -1537,14 +1588,14 @@ const {
|
|
|
1537
1588
|
});
|
|
1538
1589
|
const r = () => (
|
|
1539
1590
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1540
|
-
|
|
1591
|
+
po(this.anchor, this.contentRef.value, o).then(
|
|
1541
1592
|
(l) => {
|
|
1542
|
-
const { x: c, y: a, middlewareData:
|
|
1593
|
+
const { x: c, y: a, middlewareData: f } = l;
|
|
1543
1594
|
Object.assign(this.contentRef.value.style, {
|
|
1544
|
-
...
|
|
1595
|
+
...uo(f),
|
|
1545
1596
|
// translation more performant than top left
|
|
1546
1597
|
transform: `translate(${c}px, ${a}px)`
|
|
1547
|
-
}), this.arrowRef.value &&
|
|
1598
|
+
}), this.arrowRef.value && f.arrowStyles && Object.assign(this.arrowRef.value.style, f.arrowStyles);
|
|
1548
1599
|
}
|
|
1549
1600
|
)
|
|
1550
1601
|
);
|
|
@@ -1592,22 +1643,22 @@ const {
|
|
|
1592
1643
|
contentSlotHandler(o) {
|
|
1593
1644
|
if (this.disableAutoAria)
|
|
1594
1645
|
return;
|
|
1595
|
-
const { child: r } =
|
|
1646
|
+
const { child: r } = kt("bm-floatingui", "content", o);
|
|
1596
1647
|
r.setAttribute("id", this.autoDescribedById);
|
|
1597
1648
|
}
|
|
1598
1649
|
environmentClickListener(o) {
|
|
1599
1650
|
if (!this._isOpen || this.open)
|
|
1600
1651
|
return;
|
|
1601
|
-
const r =
|
|
1652
|
+
const r = Tt(o, this.anchor), s = Tt(o, this.contentRef.value);
|
|
1602
1653
|
r || s || this.closeContent(!0);
|
|
1603
1654
|
}
|
|
1604
1655
|
willUpdate(o) {
|
|
1605
|
-
super.willUpdate(o), o.has("popoverAPI") && (this.shouldUsePopoverAPI = this.popoverAPI &&
|
|
1656
|
+
super.willUpdate(o), o.has("popoverAPI") && (this.shouldUsePopoverAPI = this.popoverAPI && Eo);
|
|
1606
1657
|
}
|
|
1607
1658
|
updated(o) {
|
|
1608
|
-
if (super.updated(o), this.anchor && ["click", "hover", "focus"].forEach((
|
|
1609
|
-
const
|
|
1610
|
-
o.has(
|
|
1659
|
+
if (super.updated(o), this.anchor && ["click", "hover", "focus"].forEach((f) => {
|
|
1660
|
+
const p = `openOn${ve(f)}`;
|
|
1661
|
+
o.has(p) && (this[p] ? this.eventController.addEventListeners(f) : this.eventController.removeEventListeners(f));
|
|
1611
1662
|
}), o.has("autoDescribedById") && !this.disableAutoAria && this.anchor)
|
|
1612
1663
|
if (this.autoDescribedById)
|
|
1613
1664
|
$t(this.anchor, "aria-describedby", this.autoDescribedById);
|
|
@@ -1640,7 +1691,7 @@ const {
|
|
|
1640
1691
|
this.openController.cancelSchedule(), this.closeContent(!0);
|
|
1641
1692
|
}
|
|
1642
1693
|
anchorSlotHandler(o) {
|
|
1643
|
-
const { child: r } =
|
|
1694
|
+
const { child: r } = kt("bm-floatingui", "anchor", o);
|
|
1644
1695
|
this.anchor = r, this.eventController.registerElement("anchor", r, {
|
|
1645
1696
|
hover: this.openOnHover,
|
|
1646
1697
|
click: this.openOnClick,
|
|
@@ -1651,176 +1702,176 @@ const {
|
|
|
1651
1702
|
o.key === "Escape" && this.closeContent(!0);
|
|
1652
1703
|
}
|
|
1653
1704
|
};
|
|
1654
|
-
|
|
1655
|
-
xt(
|
|
1705
|
+
i.styles = [
|
|
1706
|
+
xt(bo),
|
|
1656
1707
|
he`
|
|
1657
1708
|
:host {
|
|
1658
1709
|
display: contents;
|
|
1659
1710
|
}
|
|
1660
1711
|
`
|
|
1661
1712
|
];
|
|
1662
|
-
let
|
|
1663
|
-
return
|
|
1664
|
-
|
|
1665
|
-
],
|
|
1666
|
-
|
|
1667
|
-
],
|
|
1668
|
-
|
|
1669
|
-
],
|
|
1670
|
-
|
|
1671
|
-
],
|
|
1672
|
-
|
|
1673
|
-
],
|
|
1674
|
-
|
|
1675
|
-
],
|
|
1676
|
-
|
|
1677
|
-
],
|
|
1678
|
-
|
|
1679
|
-
],
|
|
1680
|
-
|
|
1681
|
-
],
|
|
1682
|
-
|
|
1683
|
-
],
|
|
1684
|
-
|
|
1685
|
-
],
|
|
1686
|
-
|
|
1687
|
-
],
|
|
1688
|
-
|
|
1689
|
-
],
|
|
1690
|
-
|
|
1691
|
-
],
|
|
1692
|
-
|
|
1693
|
-
],
|
|
1694
|
-
|
|
1695
|
-
],
|
|
1696
|
-
|
|
1697
|
-
],
|
|
1713
|
+
let t = i;
|
|
1714
|
+
return R([
|
|
1715
|
+
b({ type: Boolean })
|
|
1716
|
+
], t.prototype, "hideArrow"), R([
|
|
1717
|
+
b({ type: String })
|
|
1718
|
+
], t.prototype, "placement"), R([
|
|
1719
|
+
b({ type: Object })
|
|
1720
|
+
], t.prototype, "autoPlacement"), R([
|
|
1721
|
+
b({ type: Object })
|
|
1722
|
+
], t.prototype, "flip"), R([
|
|
1723
|
+
b({ type: Object })
|
|
1724
|
+
], t.prototype, "shift"), R([
|
|
1725
|
+
b({ type: Object })
|
|
1726
|
+
], t.prototype, "autoHiding"), R([
|
|
1727
|
+
b({ type: Object })
|
|
1728
|
+
], t.prototype, "middleware"), R([
|
|
1729
|
+
b({ type: Boolean })
|
|
1730
|
+
], t.prototype, "defaultOpen"), R([
|
|
1731
|
+
b({ type: Number })
|
|
1732
|
+
], t.prototype, "showDelay"), R([
|
|
1733
|
+
b({ type: Number })
|
|
1734
|
+
], t.prototype, "hideDelay"), R([
|
|
1735
|
+
b({ type: Boolean, converter: Jt })
|
|
1736
|
+
], t.prototype, "popoverAPI"), R([
|
|
1737
|
+
b({ type: Boolean })
|
|
1738
|
+
], t.prototype, "disableAutoAria"), R([
|
|
1739
|
+
b({ type: String })
|
|
1740
|
+
], t.prototype, "autoDescribedById"), R([
|
|
1741
|
+
b()
|
|
1742
|
+
], t.prototype, "offset"), R([
|
|
1743
|
+
b({ type: Boolean })
|
|
1744
|
+
], t.prototype, "openOnClick"), R([
|
|
1745
|
+
b({ type: Boolean })
|
|
1746
|
+
], t.prototype, "openOnHover"), R([
|
|
1747
|
+
b({ type: Boolean })
|
|
1748
|
+
], t.prototype, "openOnFocus"), t;
|
|
1698
1749
|
};
|
|
1699
|
-
var
|
|
1700
|
-
for (var o =
|
|
1701
|
-
(s =
|
|
1702
|
-
return
|
|
1703
|
-
}, pe = (
|
|
1704
|
-
const { subElementClassPrefix: me, baseClassNamePrefix:
|
|
1705
|
-
let
|
|
1750
|
+
var Ro = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, So = Object.getPrototypeOf, _o = Reflect.get, E = (e, t, i, n) => {
|
|
1751
|
+
for (var o = n > 1 ? void 0 : n ? Lo(t, i) : t, r = e.length - 1, s; r >= 0; r--)
|
|
1752
|
+
(s = e[r]) && (o = (n ? s(t, i, o) : s(o)) || o);
|
|
1753
|
+
return n && o && Ro(t, i, o), o;
|
|
1754
|
+
}, pe = (e, t, i) => _o(So(e), i, t);
|
|
1755
|
+
const { subElementClassPrefix: me, baseClassNamePrefix: zo } = Zt("tooltip");
|
|
1756
|
+
let A = class extends Po(qt) {
|
|
1706
1757
|
constructor() {
|
|
1707
1758
|
super(), this.disabled = !1, this.triggerSize = "md", this.eventPrefix = "tooltip", this.hideDelay = 200, Bt(we, this, "edgePadding"), Bt(xe, this, "offset");
|
|
1708
1759
|
}
|
|
1709
|
-
willUpdate(
|
|
1710
|
-
super.willUpdate(
|
|
1711
|
-
const
|
|
1712
|
-
this.openOnHover =
|
|
1760
|
+
willUpdate(e) {
|
|
1761
|
+
super.willUpdate(e);
|
|
1762
|
+
const t = (i) => {
|
|
1763
|
+
this.openOnHover = i, this.openOnFocus = i;
|
|
1713
1764
|
};
|
|
1714
|
-
|
|
1765
|
+
e.has("disabled") && t(!this.disabled);
|
|
1715
1766
|
}
|
|
1716
1767
|
render() {
|
|
1717
|
-
return
|
|
1768
|
+
return Xt` <slot name="trigger" @slotchange=${this.anchorSlotHandler}></slot>
|
|
1718
1769
|
<div
|
|
1719
1770
|
role="tooltip"
|
|
1720
1771
|
@slotchange=${this.contentSlotHandler}
|
|
1721
1772
|
aria-hidden=${!this._isOpen}
|
|
1722
|
-
${
|
|
1773
|
+
${Dt(this.contentRef)}
|
|
1723
1774
|
class=${bt(
|
|
1724
1775
|
this.theme && ye(this.theme),
|
|
1725
|
-
|
|
1726
|
-
|
|
1776
|
+
Kt.content,
|
|
1777
|
+
zo
|
|
1727
1778
|
)}
|
|
1728
1779
|
popover="manual"
|
|
1729
1780
|
style="display: ${this._isOpen ? "block" : "none"}"
|
|
1730
1781
|
>
|
|
1731
1782
|
<slot name="text"></slot>
|
|
1732
1783
|
<span
|
|
1733
|
-
class=${bt(
|
|
1734
|
-
${
|
|
1784
|
+
class=${bt(Kt.arrow, `${me}arrow`)}
|
|
1785
|
+
${Dt(this.arrowRef)}
|
|
1735
1786
|
>
|
|
1736
1787
|
</span>
|
|
1737
1788
|
</div>`;
|
|
1738
1789
|
}
|
|
1739
1790
|
};
|
|
1740
|
-
|
|
1791
|
+
A.styles = [
|
|
1741
1792
|
xt(Qt),
|
|
1742
|
-
pe(
|
|
1793
|
+
pe(A, A, "styles") ?? []
|
|
1743
1794
|
];
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
],
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
],
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
],
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
],
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
],
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
],
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
],
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
],
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
],
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
],
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
],
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
],
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
],
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
],
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
],
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
],
|
|
1792
|
-
|
|
1795
|
+
E([
|
|
1796
|
+
b({ type: String })
|
|
1797
|
+
], A.prototype, "theme", 2);
|
|
1798
|
+
E([
|
|
1799
|
+
b({ type: Boolean })
|
|
1800
|
+
], A.prototype, "open", 2);
|
|
1801
|
+
E([
|
|
1802
|
+
b({ type: Boolean })
|
|
1803
|
+
], A.prototype, "hideArrow", 2);
|
|
1804
|
+
E([
|
|
1805
|
+
b({ type: String })
|
|
1806
|
+
], A.prototype, "placement", 2);
|
|
1807
|
+
E([
|
|
1808
|
+
b({ type: Object })
|
|
1809
|
+
], A.prototype, "autoPlacement", 2);
|
|
1810
|
+
E([
|
|
1811
|
+
b({ type: Object })
|
|
1812
|
+
], A.prototype, "flip", 2);
|
|
1813
|
+
E([
|
|
1814
|
+
b({ type: Object })
|
|
1815
|
+
], A.prototype, "shift", 2);
|
|
1816
|
+
E([
|
|
1817
|
+
b({ type: Object })
|
|
1818
|
+
], A.prototype, "autoHiding", 2);
|
|
1819
|
+
E([
|
|
1820
|
+
b({ type: Object })
|
|
1821
|
+
], A.prototype, "middleware", 2);
|
|
1822
|
+
E([
|
|
1823
|
+
b({ type: Boolean })
|
|
1824
|
+
], A.prototype, "defaultOpen", 2);
|
|
1825
|
+
E([
|
|
1826
|
+
b({ type: Number })
|
|
1827
|
+
], A.prototype, "showDelay", 2);
|
|
1828
|
+
E([
|
|
1829
|
+
b({ type: Boolean, converter: Jt })
|
|
1830
|
+
], A.prototype, "popoverAPI", 2);
|
|
1831
|
+
E([
|
|
1832
|
+
b({ type: Boolean })
|
|
1833
|
+
], A.prototype, "disableAutoAria", 2);
|
|
1834
|
+
E([
|
|
1835
|
+
b({ type: String })
|
|
1836
|
+
], A.prototype, "autoDescribedById", 2);
|
|
1837
|
+
E([
|
|
1838
|
+
b({ type: Boolean })
|
|
1839
|
+
], A.prototype, "disabled", 2);
|
|
1840
|
+
E([
|
|
1841
|
+
b({ type: String })
|
|
1842
|
+
], A.prototype, "triggerSize", 2);
|
|
1843
|
+
A = E([
|
|
1793
1844
|
Gt("bm-tooltip")
|
|
1794
|
-
],
|
|
1795
|
-
let
|
|
1845
|
+
], A);
|
|
1846
|
+
let J = class extends qt {
|
|
1796
1847
|
constructor() {
|
|
1797
1848
|
super(...arguments), this.size = "md", this.disabled = !1;
|
|
1798
1849
|
}
|
|
1799
1850
|
render() {
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1802
|
-
this.size !== "none" && `${
|
|
1803
|
-
this.disabled && `${
|
|
1851
|
+
const e = `${me}icon-trigger`, t = bt(
|
|
1852
|
+
e,
|
|
1853
|
+
this.size !== "none" && `${e}--${this.size}`,
|
|
1854
|
+
this.disabled && `${e}--disabled`
|
|
1804
1855
|
);
|
|
1805
|
-
return
|
|
1856
|
+
return Xt`<button class=${t} aria-label="tooltip trigger">
|
|
1806
1857
|
<slot></slot>
|
|
1807
1858
|
</button>`;
|
|
1808
1859
|
}
|
|
1809
1860
|
};
|
|
1810
|
-
|
|
1861
|
+
J.styles = [
|
|
1811
1862
|
xt(Qt),
|
|
1812
|
-
pe(
|
|
1863
|
+
pe(J, J, "styles") ?? []
|
|
1813
1864
|
];
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
],
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
],
|
|
1820
|
-
|
|
1865
|
+
E([
|
|
1866
|
+
b({ type: String })
|
|
1867
|
+
], J.prototype, "size", 2);
|
|
1868
|
+
E([
|
|
1869
|
+
b({ type: Boolean })
|
|
1870
|
+
], J.prototype, "disabled", 2);
|
|
1871
|
+
J = E([
|
|
1821
1872
|
Gt("bm-tooltip-icon-trigger")
|
|
1822
|
-
],
|
|
1873
|
+
], J);
|
|
1823
1874
|
export {
|
|
1824
|
-
|
|
1825
|
-
|
|
1875
|
+
A as BmTooltip,
|
|
1876
|
+
J as BmTooltipIconTrigger
|
|
1826
1877
|
};
|