@stihl-design-system/components 1.0.0-RC.34 → 1.0.0-RC.35
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/{actionbutton.DLQJU6AV.js → actionbutton.Du5CT-Mt.js} +2 -2
- package/{actionlink.DEBrWfN3.js → actionlink.BK9CaQUY.js} +2 -2
- package/assets/Button.CmeGVEAY.css +1 -0
- package/assets/CustomReactSelect.BihX36Uo.css +1 -0
- package/assets/Fieldset.Oqu7pOBv.css +1 -0
- package/assets/InputFile.D7Ihod7B.css +1 -0
- package/assets/InputNumber.z_UqRYdv.css +1 -0
- package/assets/InputPassword.DZENjxJ9.css +1 -0
- package/assets/InputSearch.GBH9Eh6F.css +1 -0
- package/assets/LinkButton.88j5ckLu.css +1 -0
- package/assets/Select.CL0fqx7X.css +1 -0
- package/assets/Slider.DWLuIsNj.css +1 -0
- package/assets/Textarea.B1HOakic.css +1 -0
- package/assets/buttonround.DBpMesfr.css +1 -0
- package/assets/input.RPDR8qdT.css +1 -0
- package/{banner.CI5HnDqD.js → banner.D-RX60nJ.js} +1 -1
- package/{breadcrumb.CtwAux3P.js → breadcrumb.tvMByFgp.js} +3 -3
- package/button.CZupaV9L.js +12 -0
- package/buttonround.9IS0tUqw.js +96 -0
- package/{checkbox.DwccD0Mp.js → checkbox.XYQI-ubx.js} +2 -2
- package/{checkboxgroup.ZiUFfCJ1.js → checkboxgroup.CjnNJ8e6.js} +2 -2
- package/{chip.B0s_fS8L.js → chip.B-pxhsdb.js} +2 -2
- package/{chipgroup.Dpu66bo5.js → chipgroup.cGjn4LVV.js} +2 -2
- package/chunks/{ActionButton.DOYsEHPr.js → ActionButton.BOYQYo5M.js} +1 -1
- package/chunks/{ActionLink.DbyciN3Y.js → ActionLink.BlwvrnPN.js} +1 -1
- package/chunks/{Breadcrumb.BgnpTo01.js → Breadcrumb.Qr6bDP2N.js} +2 -2
- package/chunks/Button.Cn5yg7dG.js +138 -0
- package/chunks/{Checkbox.BcGXAuuP.js → Checkbox.D5X5T6Yg.js} +1 -1
- package/chunks/CheckboxGroup.CUR_0VMc.js +74 -0
- package/chunks/{Chip.D6pubCZV.js → Chip.DIp5hdRH.js} +1 -1
- package/chunks/{CustomReactSelect.Dg3wC_VH.js → CustomReactSelect.BA3hUVkh.js} +816 -800
- package/chunks/{Dialog.DpqSVrYR.js → Dialog.DRk_jSj5.js} +1 -1
- package/chunks/{Drawer.DISWybOa.js → Drawer.Dj6WeUC8.js} +1 -1
- package/chunks/Fieldset.C0RzpI-h.js +81 -0
- package/chunks/{Header.7TQL_J9t.js → Header.18sOO0Gf.js} +1 -1
- package/chunks/{Input.utils.Dkw7gRrr.js → Input.utils.CL1u4Ctq.js} +27 -25
- package/chunks/InputFile.Bki3bs3U.js +236 -0
- package/chunks/InputNumber.B43cqBH0.js +242 -0
- package/chunks/InputPassword.DcdMjsXr.js +121 -0
- package/chunks/InputSearch.CJm6ph8W.js +149 -0
- package/chunks/LinkButton.C6F-yuLL.js +139 -0
- package/chunks/{MegaMenu.CQbOeaib.js → MegaMenu.qttkjGbD.js} +7 -8
- package/chunks/{NavigationTabs.BwM-6CRm.js → NavigationTabs.CQxlahX1.js} +1 -1
- package/chunks/{Notification.CrojkJ0E.js → Notification.Qzz88ngL.js} +1 -1
- package/chunks/{Popover.Bb0Pjmvg.js → Popover.D7McfVaH.js} +9 -10
- package/chunks/RadioGroup.B2VCD9x-.js +106 -0
- package/chunks/Select.B0uMOSSD.js +147 -0
- package/chunks/Slider.YTIktxxD.js +306 -0
- package/chunks/{Stepper.PTQdQBYf.js → Stepper.BvPmbbqw.js} +2 -2
- package/chunks/{Tabs.DyP4whX0.js → Tabs.CoO_lrhV.js} +1 -1
- package/chunks/Textarea.lYiPXerd.js +181 -0
- package/chunks/{Toast.ug_RjGgF.js → Toast.L5HAuEOn.js} +1 -1
- package/chunks/floating-ui.react.COTL3jH5.js +2984 -0
- package/chunks/{useBreakpoint.BzR_yaIv.js → useBreakpoint.1txsny17.js} +8 -5
- package/combobox.CGEDlMo0.js +71 -0
- package/components/Button/Button.d.ts +5 -0
- package/components/Button/Button.utils.d.ts +4 -5
- package/components/CheckboxGroup/CheckboxGroup.d.ts +14 -1
- package/components/Combobox/Combobox.utils.d.ts +3 -2
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +13 -0
- package/components/Fieldset/Fieldset.d.ts +14 -1
- package/components/Input/Input.d.ts +13 -0
- package/components/Input/Input.utils.d.ts +2 -2
- package/components/InputFile/InputFile.d.ts +13 -0
- package/components/InputFile/InputFile.utils.d.ts +4 -2
- package/components/InputNumber/InputNumber.d.ts +17 -4
- package/components/InputNumber/InputNumber.utils.d.ts +2 -2
- package/components/InputPassword/InputPassword.d.ts +13 -0
- package/components/InputPassword/InputPassword.utils.d.ts +2 -2
- package/components/InputSearch/InputSearch.d.ts +13 -0
- package/components/InputSearch/InputSearch.utils.d.ts +2 -2
- package/components/LinkButton/LinkButton.d.ts +5 -0
- package/components/LinkButton/LinkButton.utils.d.ts +4 -5
- package/components/RadioGroup/RadioGroup.d.ts +13 -0
- package/components/Select/Select.d.ts +13 -0
- package/components/Select/Select.utils.d.ts +2 -2
- package/components/Slider/Slider.d.ts +13 -0
- package/components/Textarea/Textarea.d.ts +13 -0
- package/components/Textarea/Textarea.utils.d.ts +2 -2
- package/{customreactselect.BFN8cYJi.js → customreactselect.BgYf8rKE.js} +4 -3
- package/{dialog.CzM_Cxp0.js → dialog.Bq-ZyzR8.js} +2 -2
- package/{drawer._A9MQ8Cj.js → drawer.DL5UzLWf.js} +2 -2
- package/{fieldset.CId-NtI5.js → fieldset.BFLW2D9H.js} +3 -2
- package/{filelist.DgVuWpR3.js → filelist.BG6SGVJ8.js} +1 -1
- package/{floatingactionbutton.Bsnncudt.js → floatingactionbutton.B5hJ2At2.js} +1 -1
- package/{header.CelAkqtp.js → header.A77yIAH3.js} +1 -1
- package/index.es.js +38 -38
- package/input.hBWqQr3X.js +190 -0
- package/{inputfile.BjgJGefV.js → inputfile.BSZuRujU.js} +6 -5
- package/{inputnumber.BcrxBVv0.js → inputnumber.CA4JiUmq.js} +7 -6
- package/{inputpassword.CddmBW-T.js → inputpassword.Cju_crMi.js} +4 -4
- package/{inputsearch.CFOASqrd.js → inputsearch.CU9AhVVv.js} +6 -5
- package/{link.f8MMZo-w.js → link.DoiK003-.js} +2 -2
- package/{linkbutton.BYAvi-_V.js → linkbutton.CWco_B7v.js} +4 -4
- package/{logo100years.B4d_DIiB.js → logo100years.DDzCrczW.js} +10 -10
- package/{megamenu.Cy9Cc-mC.js → megamenu.BurL9MfF.js} +3 -3
- package/{navigationtabs.Dp7D2fnc.js → navigationtabs.zhRZHjgs.js} +2 -2
- package/{notification.B-norGiB.js → notification.BiXdWNo7.js} +2 -2
- package/package.json +2 -1
- package/partials/index.js +30 -30
- package/{popover.DFVDZY-m.js → popover.79Voiadz.js} +3 -3
- package/{radiogroup.DaThoMfq.js → radiogroup.CwBh7u9L.js} +2 -2
- package/{scroller.Cu7H_VCT.js → scroller.IpfbFV8B.js} +1 -1
- package/{select.CMdKf7tC.js → select.NHaEtX_u.js} +5 -4
- package/{skiptocontent.CHVh0hbr.js → skiptocontent.X4USTODk.js} +1 -1
- package/slider.jnNGEyBq.js +12 -0
- package/{step.DKf4CHGr.js → step.D5p7qppy.js} +1 -1
- package/{stepper.CCP_igpJ.js → stepper.DnMc4ex6.js} +3 -3
- package/styles/scss/ds/lib/ds-internal/_input.scss +12 -3
- package/styles/scss/ds/lib/ds-internal/_link-button.scss +10 -2
- package/styles/scss/ds/lib/link-button.scss +11 -3
- package/{tablist.DZgo49nZ.js → tablist.BFE6RAPD.js} +1 -1
- package/{tabs.BkoT7feH.js → tabs.CsOxxQyQ.js} +2 -2
- package/{textarea.DMn20z4p.js → textarea.C9OAAjhG.js} +4 -3
- package/{toast.Dvs8woTH.js → toast.OBI9qnAM.js} +2 -2
- package/{toastmanager.pi_Fhd5t.js → toastmanager.CgsA-1y_.js} +1 -1
- package/{tooltip.QJe_bfO-.js → tooltip.Cj3AvYgB.js} +22 -23
- package/{topbar.Bxwvp9Lf.js → topbar.CAujTZAE.js} +2 -2
- package/utils/useIsomorphicLayoutEffect.d.ts +2 -2
- package/assets/Button.C8sNwIeW.css +0 -1
- package/assets/CustomReactSelect.E_jJFVew.css +0 -1
- package/assets/Fieldset.CW9dBvAo.css +0 -1
- package/assets/InputFile.BnIvK65P.css +0 -1
- package/assets/InputNumber.BoiCIR1f.css +0 -1
- package/assets/InputPassword.Dk3_vNLV.css +0 -1
- package/assets/InputSearch.C1_4cVCi.css +0 -1
- package/assets/LinkButton.B86yacK5.css +0 -1
- package/assets/Select.COxLltX7.css +0 -1
- package/assets/Slider.DPEmJ3HD.css +0 -1
- package/assets/Textarea.y3MW7VW0.css +0 -1
- package/assets/buttonround.BN3vUDc_.css +0 -1
- package/assets/input.DTu4g_iA.css +0 -1
- package/button.DHuKanZP.js +0 -13
- package/buttonround.CMlmEDaN.js +0 -96
- package/chunks/Button.DCZgBNmA.js +0 -142
- package/chunks/CheckboxGroup.BuFd1luB.js +0 -72
- package/chunks/Fieldset.DiMtr6Vw.js +0 -74
- package/chunks/InputFile.C8nt9Fu8.js +0 -218
- package/chunks/InputNumber.CbH1XJfl.js +0 -267
- package/chunks/InputPassword.DbdjuSiJ.js +0 -136
- package/chunks/InputSearch.joxmugiv.js +0 -173
- package/chunks/LinkButton.BZgIGgc8.js +0 -132
- package/chunks/RadioGroup.CexC4v2Z.js +0 -104
- package/chunks/Select.BEIdNMML.js +0 -164
- package/chunks/Slider.CR0zYHeZ.js +0 -291
- package/chunks/Textarea.Du2RII5u.js +0 -168
- package/chunks/floating-ui.dom.BT8pKtCQ.js +0 -1005
- package/chunks/floating-ui.react.3FjeMiuN.js +0 -1999
- package/combobox.jG5GRA7C.js +0 -65
- package/input.DuEbg7d6.js +0 -206
- package/slider.C5dK6KcG.js +0 -11
- /package/components/InputNumber/{InputNumberutils.test.d.ts → InputNumber.utils.test.d.ts} +0 -0
|
@@ -1,1005 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
function st() {
|
|
3
|
-
return typeof window < "u";
|
|
4
|
-
}
|
|
5
|
-
function q(t) {
|
|
6
|
-
return Ct(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
7
|
-
}
|
|
8
|
-
function R(t) {
|
|
9
|
-
var e;
|
|
10
|
-
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
11
|
-
}
|
|
12
|
-
function D(t) {
|
|
13
|
-
var e;
|
|
14
|
-
return (e = (Ct(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
15
|
-
}
|
|
16
|
-
function Ct(t) {
|
|
17
|
-
return st() ? t instanceof Node || t instanceof R(t).Node : !1;
|
|
18
|
-
}
|
|
19
|
-
function L(t) {
|
|
20
|
-
return st() ? t instanceof Element || t instanceof R(t).Element : !1;
|
|
21
|
-
}
|
|
22
|
-
function P(t) {
|
|
23
|
-
return st() ? t instanceof HTMLElement || t instanceof R(t).HTMLElement : !1;
|
|
24
|
-
}
|
|
25
|
-
function xt(t) {
|
|
26
|
-
return !st() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof R(t).ShadowRoot;
|
|
27
|
-
}
|
|
28
|
-
const Nt = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
29
|
-
function Q(t) {
|
|
30
|
-
const {
|
|
31
|
-
overflow: e,
|
|
32
|
-
overflowX: n,
|
|
33
|
-
overflowY: o,
|
|
34
|
-
display: i
|
|
35
|
-
} = E(t);
|
|
36
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Nt.has(i);
|
|
37
|
-
}
|
|
38
|
-
const Vt = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
39
|
-
function Ht(t) {
|
|
40
|
-
return Vt.has(q(t));
|
|
41
|
-
}
|
|
42
|
-
const $t = [":popover-open", ":modal"];
|
|
43
|
-
function rt(t) {
|
|
44
|
-
return $t.some((e) => {
|
|
45
|
-
try {
|
|
46
|
-
return t.matches(e);
|
|
47
|
-
} catch {
|
|
48
|
-
return !1;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
const _t = ["transform", "translate", "scale", "rotate", "perspective"], zt = ["transform", "translate", "scale", "rotate", "perspective", "filter"], It = ["paint", "layout", "strict", "content"];
|
|
53
|
-
function mt(t) {
|
|
54
|
-
const e = gt(), n = L(t) ? E(t) : t;
|
|
55
|
-
return _t.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || zt.some((o) => (n.willChange || "").includes(o)) || It.some((o) => (n.contain || "").includes(o));
|
|
56
|
-
}
|
|
57
|
-
function jt(t) {
|
|
58
|
-
let e = N(t);
|
|
59
|
-
for (; P(e) && !X(e); ) {
|
|
60
|
-
if (mt(e))
|
|
61
|
-
return e;
|
|
62
|
-
if (rt(e))
|
|
63
|
-
return null;
|
|
64
|
-
e = N(e);
|
|
65
|
-
}
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
function gt() {
|
|
69
|
-
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
70
|
-
}
|
|
71
|
-
const Xt = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
72
|
-
function X(t) {
|
|
73
|
-
return Xt.has(q(t));
|
|
74
|
-
}
|
|
75
|
-
function E(t) {
|
|
76
|
-
return R(t).getComputedStyle(t);
|
|
77
|
-
}
|
|
78
|
-
function ct(t) {
|
|
79
|
-
return L(t) ? {
|
|
80
|
-
scrollLeft: t.scrollLeft,
|
|
81
|
-
scrollTop: t.scrollTop
|
|
82
|
-
} : {
|
|
83
|
-
scrollLeft: t.scrollX,
|
|
84
|
-
scrollTop: t.scrollY
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
function N(t) {
|
|
88
|
-
if (q(t) === "html")
|
|
89
|
-
return t;
|
|
90
|
-
const e = (
|
|
91
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
92
|
-
t.assignedSlot || // DOM Element detected.
|
|
93
|
-
t.parentNode || // ShadowRoot detected.
|
|
94
|
-
xt(t) && t.host || // Fallback.
|
|
95
|
-
D(t)
|
|
96
|
-
);
|
|
97
|
-
return xt(e) ? e.host : e;
|
|
98
|
-
}
|
|
99
|
-
function St(t) {
|
|
100
|
-
const e = N(t);
|
|
101
|
-
return X(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : P(e) && Q(e) ? e : St(e);
|
|
102
|
-
}
|
|
103
|
-
function J(t, e, n) {
|
|
104
|
-
var o;
|
|
105
|
-
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
106
|
-
const i = St(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = R(i);
|
|
107
|
-
if (r) {
|
|
108
|
-
const c = ft(s);
|
|
109
|
-
return e.concat(s, s.visualViewport || [], Q(i) ? i : [], c && n ? J(c) : []);
|
|
110
|
-
}
|
|
111
|
-
return e.concat(i, J(i, [], n));
|
|
112
|
-
}
|
|
113
|
-
function ft(t) {
|
|
114
|
-
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
115
|
-
}
|
|
116
|
-
const Y = Math.min, _ = Math.max, nt = Math.round, et = Math.floor, T = (t) => ({
|
|
117
|
-
x: t,
|
|
118
|
-
y: t
|
|
119
|
-
}), Yt = {
|
|
120
|
-
left: "right",
|
|
121
|
-
right: "left",
|
|
122
|
-
bottom: "top",
|
|
123
|
-
top: "bottom"
|
|
124
|
-
}, qt = {
|
|
125
|
-
start: "end",
|
|
126
|
-
end: "start"
|
|
127
|
-
};
|
|
128
|
-
function ut(t, e, n) {
|
|
129
|
-
return _(t, Y(e, n));
|
|
130
|
-
}
|
|
131
|
-
function Z(t, e) {
|
|
132
|
-
return typeof t == "function" ? t(e) : t;
|
|
133
|
-
}
|
|
134
|
-
function z(t) {
|
|
135
|
-
return t.split("-")[0];
|
|
136
|
-
}
|
|
137
|
-
function tt(t) {
|
|
138
|
-
return t.split("-")[1];
|
|
139
|
-
}
|
|
140
|
-
function Lt(t) {
|
|
141
|
-
return t === "x" ? "y" : "x";
|
|
142
|
-
}
|
|
143
|
-
function ht(t) {
|
|
144
|
-
return t === "y" ? "height" : "width";
|
|
145
|
-
}
|
|
146
|
-
const Ut = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
147
|
-
function B(t) {
|
|
148
|
-
return Ut.has(z(t)) ? "y" : "x";
|
|
149
|
-
}
|
|
150
|
-
function pt(t) {
|
|
151
|
-
return Lt(B(t));
|
|
152
|
-
}
|
|
153
|
-
function Kt(t, e, n) {
|
|
154
|
-
n === void 0 && (n = !1);
|
|
155
|
-
const o = tt(t), i = pt(t), r = ht(i);
|
|
156
|
-
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
157
|
-
return e.reference[r] > e.floating[r] && (s = ot(s)), [s, ot(s)];
|
|
158
|
-
}
|
|
159
|
-
function Gt(t) {
|
|
160
|
-
const e = ot(t);
|
|
161
|
-
return [dt(t), e, dt(e)];
|
|
162
|
-
}
|
|
163
|
-
function dt(t) {
|
|
164
|
-
return t.replace(/start|end/g, (e) => qt[e]);
|
|
165
|
-
}
|
|
166
|
-
const yt = ["left", "right"], vt = ["right", "left"], Jt = ["top", "bottom"], Qt = ["bottom", "top"];
|
|
167
|
-
function Zt(t, e, n) {
|
|
168
|
-
switch (t) {
|
|
169
|
-
case "top":
|
|
170
|
-
case "bottom":
|
|
171
|
-
return n ? e ? vt : yt : e ? yt : vt;
|
|
172
|
-
case "left":
|
|
173
|
-
case "right":
|
|
174
|
-
return e ? Jt : Qt;
|
|
175
|
-
default:
|
|
176
|
-
return [];
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
function te(t, e, n, o) {
|
|
180
|
-
const i = tt(t);
|
|
181
|
-
let r = Zt(z(t), n === "start", o);
|
|
182
|
-
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(dt)))), r;
|
|
183
|
-
}
|
|
184
|
-
function ot(t) {
|
|
185
|
-
return t.replace(/left|right|bottom|top/g, (e) => Yt[e]);
|
|
186
|
-
}
|
|
187
|
-
function ee(t) {
|
|
188
|
-
return {
|
|
189
|
-
top: 0,
|
|
190
|
-
right: 0,
|
|
191
|
-
bottom: 0,
|
|
192
|
-
left: 0,
|
|
193
|
-
...t
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
function Et(t) {
|
|
197
|
-
return typeof t != "number" ? ee(t) : {
|
|
198
|
-
top: t,
|
|
199
|
-
right: t,
|
|
200
|
-
bottom: t,
|
|
201
|
-
left: t
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
function it(t) {
|
|
205
|
-
const {
|
|
206
|
-
x: e,
|
|
207
|
-
y: n,
|
|
208
|
-
width: o,
|
|
209
|
-
height: i
|
|
210
|
-
} = t;
|
|
211
|
-
return {
|
|
212
|
-
width: o,
|
|
213
|
-
height: i,
|
|
214
|
-
top: n,
|
|
215
|
-
left: e,
|
|
216
|
-
right: e + o,
|
|
217
|
-
bottom: n + i,
|
|
218
|
-
x: e,
|
|
219
|
-
y: n
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
function bt(t, e, n) {
|
|
223
|
-
let {
|
|
224
|
-
reference: o,
|
|
225
|
-
floating: i
|
|
226
|
-
} = t;
|
|
227
|
-
const r = B(e), s = pt(e), c = ht(s), a = z(e), l = r === "y", d = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, g = o[c] / 2 - i[c] / 2;
|
|
228
|
-
let f;
|
|
229
|
-
switch (a) {
|
|
230
|
-
case "top":
|
|
231
|
-
f = {
|
|
232
|
-
x: d,
|
|
233
|
-
y: o.y - i.height
|
|
234
|
-
};
|
|
235
|
-
break;
|
|
236
|
-
case "bottom":
|
|
237
|
-
f = {
|
|
238
|
-
x: d,
|
|
239
|
-
y: o.y + o.height
|
|
240
|
-
};
|
|
241
|
-
break;
|
|
242
|
-
case "right":
|
|
243
|
-
f = {
|
|
244
|
-
x: o.x + o.width,
|
|
245
|
-
y: u
|
|
246
|
-
};
|
|
247
|
-
break;
|
|
248
|
-
case "left":
|
|
249
|
-
f = {
|
|
250
|
-
x: o.x - i.width,
|
|
251
|
-
y: u
|
|
252
|
-
};
|
|
253
|
-
break;
|
|
254
|
-
default:
|
|
255
|
-
f = {
|
|
256
|
-
x: o.x,
|
|
257
|
-
y: o.y
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
switch (tt(e)) {
|
|
261
|
-
case "start":
|
|
262
|
-
f[s] -= g * (n && l ? -1 : 1);
|
|
263
|
-
break;
|
|
264
|
-
case "end":
|
|
265
|
-
f[s] += g * (n && l ? -1 : 1);
|
|
266
|
-
break;
|
|
267
|
-
}
|
|
268
|
-
return f;
|
|
269
|
-
}
|
|
270
|
-
const ne = async (t, e, n) => {
|
|
271
|
-
const {
|
|
272
|
-
placement: o = "bottom",
|
|
273
|
-
strategy: i = "absolute",
|
|
274
|
-
middleware: r = [],
|
|
275
|
-
platform: s
|
|
276
|
-
} = n, c = r.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
277
|
-
let l = await s.getElementRects({
|
|
278
|
-
reference: t,
|
|
279
|
-
floating: e,
|
|
280
|
-
strategy: i
|
|
281
|
-
}), {
|
|
282
|
-
x: d,
|
|
283
|
-
y: u
|
|
284
|
-
} = bt(l, o, a), g = o, f = {}, m = 0;
|
|
285
|
-
for (let h = 0; h < c.length; h++) {
|
|
286
|
-
const {
|
|
287
|
-
name: w,
|
|
288
|
-
fn: p
|
|
289
|
-
} = c[h], {
|
|
290
|
-
x,
|
|
291
|
-
y,
|
|
292
|
-
data: b,
|
|
293
|
-
reset: v
|
|
294
|
-
} = await p({
|
|
295
|
-
x: d,
|
|
296
|
-
y: u,
|
|
297
|
-
initialPlacement: o,
|
|
298
|
-
placement: g,
|
|
299
|
-
strategy: i,
|
|
300
|
-
middlewareData: f,
|
|
301
|
-
rects: l,
|
|
302
|
-
platform: s,
|
|
303
|
-
elements: {
|
|
304
|
-
reference: t,
|
|
305
|
-
floating: e
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
d = x ?? d, u = y ?? u, f = {
|
|
309
|
-
...f,
|
|
310
|
-
[w]: {
|
|
311
|
-
...f[w],
|
|
312
|
-
...b
|
|
313
|
-
}
|
|
314
|
-
}, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (g = v.placement), v.rects && (l = v.rects === !0 ? await s.getElementRects({
|
|
315
|
-
reference: t,
|
|
316
|
-
floating: e,
|
|
317
|
-
strategy: i
|
|
318
|
-
}) : v.rects), {
|
|
319
|
-
x: d,
|
|
320
|
-
y: u
|
|
321
|
-
} = bt(l, g, a)), h = -1);
|
|
322
|
-
}
|
|
323
|
-
return {
|
|
324
|
-
x: d,
|
|
325
|
-
y: u,
|
|
326
|
-
placement: g,
|
|
327
|
-
strategy: i,
|
|
328
|
-
middlewareData: f
|
|
329
|
-
};
|
|
330
|
-
};
|
|
331
|
-
async function Tt(t, e) {
|
|
332
|
-
var n;
|
|
333
|
-
e === void 0 && (e = {});
|
|
334
|
-
const {
|
|
335
|
-
x: o,
|
|
336
|
-
y: i,
|
|
337
|
-
platform: r,
|
|
338
|
-
rects: s,
|
|
339
|
-
elements: c,
|
|
340
|
-
strategy: a
|
|
341
|
-
} = t, {
|
|
342
|
-
boundary: l = "clippingAncestors",
|
|
343
|
-
rootBoundary: d = "viewport",
|
|
344
|
-
elementContext: u = "floating",
|
|
345
|
-
altBoundary: g = !1,
|
|
346
|
-
padding: f = 0
|
|
347
|
-
} = Z(e, t), m = Et(f), w = c[g ? u === "floating" ? "reference" : "floating" : u], p = it(await r.getClippingRect({
|
|
348
|
-
element: (n = await (r.isElement == null ? void 0 : r.isElement(w))) == null || n ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
|
|
349
|
-
boundary: l,
|
|
350
|
-
rootBoundary: d,
|
|
351
|
-
strategy: a
|
|
352
|
-
})), x = u === "floating" ? {
|
|
353
|
-
x: o,
|
|
354
|
-
y: i,
|
|
355
|
-
width: s.floating.width,
|
|
356
|
-
height: s.floating.height
|
|
357
|
-
} : s.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), b = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
|
|
358
|
-
x: 1,
|
|
359
|
-
y: 1
|
|
360
|
-
} : {
|
|
361
|
-
x: 1,
|
|
362
|
-
y: 1
|
|
363
|
-
}, v = it(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
364
|
-
elements: c,
|
|
365
|
-
rect: x,
|
|
366
|
-
offsetParent: y,
|
|
367
|
-
strategy: a
|
|
368
|
-
}) : x);
|
|
369
|
-
return {
|
|
370
|
-
top: (p.top - v.top + m.top) / b.y,
|
|
371
|
-
bottom: (v.bottom - p.bottom + m.bottom) / b.y,
|
|
372
|
-
left: (p.left - v.left + m.left) / b.x,
|
|
373
|
-
right: (v.right - p.right + m.right) / b.x
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
const oe = (t) => ({
|
|
377
|
-
name: "arrow",
|
|
378
|
-
options: t,
|
|
379
|
-
async fn(e) {
|
|
380
|
-
const {
|
|
381
|
-
x: n,
|
|
382
|
-
y: o,
|
|
383
|
-
placement: i,
|
|
384
|
-
rects: r,
|
|
385
|
-
platform: s,
|
|
386
|
-
elements: c,
|
|
387
|
-
middlewareData: a
|
|
388
|
-
} = e, {
|
|
389
|
-
element: l,
|
|
390
|
-
padding: d = 0
|
|
391
|
-
} = Z(t, e) || {};
|
|
392
|
-
if (l == null)
|
|
393
|
-
return {};
|
|
394
|
-
const u = Et(d), g = {
|
|
395
|
-
x: n,
|
|
396
|
-
y: o
|
|
397
|
-
}, f = pt(i), m = ht(f), h = await s.getDimensions(l), w = f === "y", p = w ? "top" : "left", x = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = r.reference[m] + r.reference[f] - g[f] - r.floating[m], v = g[f] - r.reference[f], F = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
398
|
-
let O = F ? F[y] : 0;
|
|
399
|
-
(!O || !await (s.isElement == null ? void 0 : s.isElement(F))) && (O = c.floating[y] || r.floating[m]);
|
|
400
|
-
const U = b / 2 - v / 2, V = O / 2 - h[m] / 2 - 1, k = Y(u[p], V), K = Y(u[x], V), H = k, G = O - h[m] - K, A = O / 2 - h[m] / 2 + U, $ = ut(H, A, G), M = !a.arrow && tt(i) != null && A !== $ && r.reference[m] / 2 - (A < H ? k : K) - h[m] / 2 < 0, C = M ? A < H ? A - H : A - G : 0;
|
|
401
|
-
return {
|
|
402
|
-
[f]: g[f] + C,
|
|
403
|
-
data: {
|
|
404
|
-
[f]: $,
|
|
405
|
-
centerOffset: A - $ - C,
|
|
406
|
-
...M && {
|
|
407
|
-
alignmentOffset: C
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
reset: M
|
|
411
|
-
};
|
|
412
|
-
}
|
|
413
|
-
}), ie = function(t) {
|
|
414
|
-
return t === void 0 && (t = {}), {
|
|
415
|
-
name: "flip",
|
|
416
|
-
options: t,
|
|
417
|
-
async fn(e) {
|
|
418
|
-
var n, o;
|
|
419
|
-
const {
|
|
420
|
-
placement: i,
|
|
421
|
-
middlewareData: r,
|
|
422
|
-
rects: s,
|
|
423
|
-
initialPlacement: c,
|
|
424
|
-
platform: a,
|
|
425
|
-
elements: l
|
|
426
|
-
} = e, {
|
|
427
|
-
mainAxis: d = !0,
|
|
428
|
-
crossAxis: u = !0,
|
|
429
|
-
fallbackPlacements: g,
|
|
430
|
-
fallbackStrategy: f = "bestFit",
|
|
431
|
-
fallbackAxisSideDirection: m = "none",
|
|
432
|
-
flipAlignment: h = !0,
|
|
433
|
-
...w
|
|
434
|
-
} = Z(t, e);
|
|
435
|
-
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
436
|
-
return {};
|
|
437
|
-
const p = z(i), x = B(c), y = z(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = g || (y || !h ? [ot(c)] : Gt(c)), F = m !== "none";
|
|
438
|
-
!g && F && v.push(...te(c, h, m, b));
|
|
439
|
-
const O = [c, ...v], U = await Tt(e, w), V = [];
|
|
440
|
-
let k = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
441
|
-
if (d && V.push(U[p]), u) {
|
|
442
|
-
const A = Kt(i, s, b);
|
|
443
|
-
V.push(U[A[0]], U[A[1]]);
|
|
444
|
-
}
|
|
445
|
-
if (k = [...k, {
|
|
446
|
-
placement: i,
|
|
447
|
-
overflows: V
|
|
448
|
-
}], !V.every((A) => A <= 0)) {
|
|
449
|
-
var K, H;
|
|
450
|
-
const A = (((K = r.flip) == null ? void 0 : K.index) || 0) + 1, $ = O[A];
|
|
451
|
-
if ($ && (!(u === "alignment" ? x !== B($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
452
|
-
// overflows the main axis.
|
|
453
|
-
k.every((S) => B(S.placement) === x ? S.overflows[0] > 0 : !0)))
|
|
454
|
-
return {
|
|
455
|
-
data: {
|
|
456
|
-
index: A,
|
|
457
|
-
overflows: k
|
|
458
|
-
},
|
|
459
|
-
reset: {
|
|
460
|
-
placement: $
|
|
461
|
-
}
|
|
462
|
-
};
|
|
463
|
-
let M = (H = k.filter((C) => C.overflows[0] <= 0).sort((C, S) => C.overflows[1] - S.overflows[1])[0]) == null ? void 0 : H.placement;
|
|
464
|
-
if (!M)
|
|
465
|
-
switch (f) {
|
|
466
|
-
case "bestFit": {
|
|
467
|
-
var G;
|
|
468
|
-
const C = (G = k.filter((S) => {
|
|
469
|
-
if (F) {
|
|
470
|
-
const W = B(S.placement);
|
|
471
|
-
return W === x || // Create a bias to the `y` side axis due to horizontal
|
|
472
|
-
// reading directions favoring greater width.
|
|
473
|
-
W === "y";
|
|
474
|
-
}
|
|
475
|
-
return !0;
|
|
476
|
-
}).map((S) => [S.placement, S.overflows.filter((W) => W > 0).reduce((W, Bt) => W + Bt, 0)]).sort((S, W) => S[1] - W[1])[0]) == null ? void 0 : G[0];
|
|
477
|
-
C && (M = C);
|
|
478
|
-
break;
|
|
479
|
-
}
|
|
480
|
-
case "initialPlacement":
|
|
481
|
-
M = c;
|
|
482
|
-
break;
|
|
483
|
-
}
|
|
484
|
-
if (i !== M)
|
|
485
|
-
return {
|
|
486
|
-
reset: {
|
|
487
|
-
placement: M
|
|
488
|
-
}
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
return {};
|
|
492
|
-
}
|
|
493
|
-
};
|
|
494
|
-
}, se = /* @__PURE__ */ new Set(["left", "top"]);
|
|
495
|
-
async function re(t, e) {
|
|
496
|
-
const {
|
|
497
|
-
placement: n,
|
|
498
|
-
platform: o,
|
|
499
|
-
elements: i
|
|
500
|
-
} = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = z(n), c = tt(n), a = B(n) === "y", l = se.has(s) ? -1 : 1, d = r && a ? -1 : 1, u = Z(e, t);
|
|
501
|
-
let {
|
|
502
|
-
mainAxis: g,
|
|
503
|
-
crossAxis: f,
|
|
504
|
-
alignmentAxis: m
|
|
505
|
-
} = typeof u == "number" ? {
|
|
506
|
-
mainAxis: u,
|
|
507
|
-
crossAxis: 0,
|
|
508
|
-
alignmentAxis: null
|
|
509
|
-
} : {
|
|
510
|
-
mainAxis: u.mainAxis || 0,
|
|
511
|
-
crossAxis: u.crossAxis || 0,
|
|
512
|
-
alignmentAxis: u.alignmentAxis
|
|
513
|
-
};
|
|
514
|
-
return c && typeof m == "number" && (f = c === "end" ? m * -1 : m), a ? {
|
|
515
|
-
x: f * d,
|
|
516
|
-
y: g * l
|
|
517
|
-
} : {
|
|
518
|
-
x: g * l,
|
|
519
|
-
y: f * d
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
const ce = function(t) {
|
|
523
|
-
return t === void 0 && (t = 0), {
|
|
524
|
-
name: "offset",
|
|
525
|
-
options: t,
|
|
526
|
-
async fn(e) {
|
|
527
|
-
var n, o;
|
|
528
|
-
const {
|
|
529
|
-
x: i,
|
|
530
|
-
y: r,
|
|
531
|
-
placement: s,
|
|
532
|
-
middlewareData: c
|
|
533
|
-
} = e, a = await re(e, t);
|
|
534
|
-
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
535
|
-
x: i + a.x,
|
|
536
|
-
y: r + a.y,
|
|
537
|
-
data: {
|
|
538
|
-
...a,
|
|
539
|
-
placement: s
|
|
540
|
-
}
|
|
541
|
-
};
|
|
542
|
-
}
|
|
543
|
-
};
|
|
544
|
-
}, le = function(t) {
|
|
545
|
-
return t === void 0 && (t = {}), {
|
|
546
|
-
name: "shift",
|
|
547
|
-
options: t,
|
|
548
|
-
async fn(e) {
|
|
549
|
-
const {
|
|
550
|
-
x: n,
|
|
551
|
-
y: o,
|
|
552
|
-
placement: i
|
|
553
|
-
} = e, {
|
|
554
|
-
mainAxis: r = !0,
|
|
555
|
-
crossAxis: s = !1,
|
|
556
|
-
limiter: c = {
|
|
557
|
-
fn: (w) => {
|
|
558
|
-
let {
|
|
559
|
-
x: p,
|
|
560
|
-
y: x
|
|
561
|
-
} = w;
|
|
562
|
-
return {
|
|
563
|
-
x: p,
|
|
564
|
-
y: x
|
|
565
|
-
};
|
|
566
|
-
}
|
|
567
|
-
},
|
|
568
|
-
...a
|
|
569
|
-
} = Z(t, e), l = {
|
|
570
|
-
x: n,
|
|
571
|
-
y: o
|
|
572
|
-
}, d = await Tt(e, a), u = B(z(i)), g = Lt(u);
|
|
573
|
-
let f = l[g], m = l[u];
|
|
574
|
-
if (r) {
|
|
575
|
-
const w = g === "y" ? "top" : "left", p = g === "y" ? "bottom" : "right", x = f + d[w], y = f - d[p];
|
|
576
|
-
f = ut(x, f, y);
|
|
577
|
-
}
|
|
578
|
-
if (s) {
|
|
579
|
-
const w = u === "y" ? "top" : "left", p = u === "y" ? "bottom" : "right", x = m + d[w], y = m - d[p];
|
|
580
|
-
m = ut(x, m, y);
|
|
581
|
-
}
|
|
582
|
-
const h = c.fn({
|
|
583
|
-
...e,
|
|
584
|
-
[g]: f,
|
|
585
|
-
[u]: m
|
|
586
|
-
});
|
|
587
|
-
return {
|
|
588
|
-
...h,
|
|
589
|
-
data: {
|
|
590
|
-
x: h.x - n,
|
|
591
|
-
y: h.y - o,
|
|
592
|
-
enabled: {
|
|
593
|
-
[g]: r,
|
|
594
|
-
[u]: s
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
};
|
|
598
|
-
}
|
|
599
|
-
};
|
|
600
|
-
};
|
|
601
|
-
function Pt(t) {
|
|
602
|
-
const e = E(t);
|
|
603
|
-
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
604
|
-
const i = P(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, c = nt(n) !== r || nt(o) !== s;
|
|
605
|
-
return c && (n = r, o = s), {
|
|
606
|
-
width: n,
|
|
607
|
-
height: o,
|
|
608
|
-
$: c
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
function wt(t) {
|
|
612
|
-
return L(t) ? t : t.contextElement;
|
|
613
|
-
}
|
|
614
|
-
function j(t) {
|
|
615
|
-
const e = wt(t);
|
|
616
|
-
if (!P(e))
|
|
617
|
-
return T(1);
|
|
618
|
-
const n = e.getBoundingClientRect(), {
|
|
619
|
-
width: o,
|
|
620
|
-
height: i,
|
|
621
|
-
$: r
|
|
622
|
-
} = Pt(e);
|
|
623
|
-
let s = (r ? nt(n.width) : n.width) / o, c = (r ? nt(n.height) : n.height) / i;
|
|
624
|
-
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
625
|
-
x: s,
|
|
626
|
-
y: c
|
|
627
|
-
};
|
|
628
|
-
}
|
|
629
|
-
const ae = /* @__PURE__ */ T(0);
|
|
630
|
-
function Dt(t) {
|
|
631
|
-
const e = R(t);
|
|
632
|
-
return !gt() || !e.visualViewport ? ae : {
|
|
633
|
-
x: e.visualViewport.offsetLeft,
|
|
634
|
-
y: e.visualViewport.offsetTop
|
|
635
|
-
};
|
|
636
|
-
}
|
|
637
|
-
function fe(t, e, n) {
|
|
638
|
-
return e === void 0 && (e = !1), !n || e && n !== R(t) ? !1 : e;
|
|
639
|
-
}
|
|
640
|
-
function I(t, e, n, o) {
|
|
641
|
-
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
642
|
-
const i = t.getBoundingClientRect(), r = wt(t);
|
|
643
|
-
let s = T(1);
|
|
644
|
-
e && (o ? L(o) && (s = j(o)) : s = j(t));
|
|
645
|
-
const c = fe(r, n, o) ? Dt(r) : T(0);
|
|
646
|
-
let a = (i.left + c.x) / s.x, l = (i.top + c.y) / s.y, d = i.width / s.x, u = i.height / s.y;
|
|
647
|
-
if (r) {
|
|
648
|
-
const g = R(r), f = o && L(o) ? R(o) : o;
|
|
649
|
-
let m = g, h = ft(m);
|
|
650
|
-
for (; h && o && f !== m; ) {
|
|
651
|
-
const w = j(h), p = h.getBoundingClientRect(), x = E(h), y = p.left + (h.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = p.top + (h.clientTop + parseFloat(x.paddingTop)) * w.y;
|
|
652
|
-
a *= w.x, l *= w.y, d *= w.x, u *= w.y, a += y, l += b, m = R(h), h = ft(m);
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
return it({
|
|
656
|
-
width: d,
|
|
657
|
-
height: u,
|
|
658
|
-
x: a,
|
|
659
|
-
y: l
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
function lt(t, e) {
|
|
663
|
-
const n = ct(t).scrollLeft;
|
|
664
|
-
return e ? e.left + n : I(D(t)).left + n;
|
|
665
|
-
}
|
|
666
|
-
function Ft(t, e) {
|
|
667
|
-
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - lt(t, n), i = n.top + e.scrollTop;
|
|
668
|
-
return {
|
|
669
|
-
x: o,
|
|
670
|
-
y: i
|
|
671
|
-
};
|
|
672
|
-
}
|
|
673
|
-
function ue(t) {
|
|
674
|
-
let {
|
|
675
|
-
elements: e,
|
|
676
|
-
rect: n,
|
|
677
|
-
offsetParent: o,
|
|
678
|
-
strategy: i
|
|
679
|
-
} = t;
|
|
680
|
-
const r = i === "fixed", s = D(o), c = e ? rt(e.floating) : !1;
|
|
681
|
-
if (o === s || c && r)
|
|
682
|
-
return n;
|
|
683
|
-
let a = {
|
|
684
|
-
scrollLeft: 0,
|
|
685
|
-
scrollTop: 0
|
|
686
|
-
}, l = T(1);
|
|
687
|
-
const d = T(0), u = P(o);
|
|
688
|
-
if ((u || !u && !r) && ((q(o) !== "body" || Q(s)) && (a = ct(o)), P(o))) {
|
|
689
|
-
const f = I(o);
|
|
690
|
-
l = j(o), d.x = f.x + o.clientLeft, d.y = f.y + o.clientTop;
|
|
691
|
-
}
|
|
692
|
-
const g = s && !u && !r ? Ft(s, a) : T(0);
|
|
693
|
-
return {
|
|
694
|
-
width: n.width * l.x,
|
|
695
|
-
height: n.height * l.y,
|
|
696
|
-
x: n.x * l.x - a.scrollLeft * l.x + d.x + g.x,
|
|
697
|
-
y: n.y * l.y - a.scrollTop * l.y + d.y + g.y
|
|
698
|
-
};
|
|
699
|
-
}
|
|
700
|
-
function de(t) {
|
|
701
|
-
return Array.from(t.getClientRects());
|
|
702
|
-
}
|
|
703
|
-
function me(t) {
|
|
704
|
-
const e = D(t), n = ct(t), o = t.ownerDocument.body, i = _(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = _(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
705
|
-
let s = -n.scrollLeft + lt(t);
|
|
706
|
-
const c = -n.scrollTop;
|
|
707
|
-
return E(o).direction === "rtl" && (s += _(e.clientWidth, o.clientWidth) - i), {
|
|
708
|
-
width: i,
|
|
709
|
-
height: r,
|
|
710
|
-
x: s,
|
|
711
|
-
y: c
|
|
712
|
-
};
|
|
713
|
-
}
|
|
714
|
-
const At = 25;
|
|
715
|
-
function ge(t, e) {
|
|
716
|
-
const n = R(t), o = D(t), i = n.visualViewport;
|
|
717
|
-
let r = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
|
|
718
|
-
if (i) {
|
|
719
|
-
r = i.width, s = i.height;
|
|
720
|
-
const d = gt();
|
|
721
|
-
(!d || d && e === "fixed") && (c = i.offsetLeft, a = i.offsetTop);
|
|
722
|
-
}
|
|
723
|
-
const l = lt(o);
|
|
724
|
-
if (l <= 0) {
|
|
725
|
-
const d = o.ownerDocument, u = d.body, g = getComputedStyle(u), f = d.compatMode === "CSS1Compat" && parseFloat(g.marginLeft) + parseFloat(g.marginRight) || 0, m = Math.abs(o.clientWidth - u.clientWidth - f);
|
|
726
|
-
m <= At && (r -= m);
|
|
727
|
-
} else l <= At && (r += l);
|
|
728
|
-
return {
|
|
729
|
-
width: r,
|
|
730
|
-
height: s,
|
|
731
|
-
x: c,
|
|
732
|
-
y: a
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
const he = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
736
|
-
function pe(t, e) {
|
|
737
|
-
const n = I(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = P(t) ? j(t) : T(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, a = i * r.x, l = o * r.y;
|
|
738
|
-
return {
|
|
739
|
-
width: s,
|
|
740
|
-
height: c,
|
|
741
|
-
x: a,
|
|
742
|
-
y: l
|
|
743
|
-
};
|
|
744
|
-
}
|
|
745
|
-
function Rt(t, e, n) {
|
|
746
|
-
let o;
|
|
747
|
-
if (e === "viewport")
|
|
748
|
-
o = ge(t, n);
|
|
749
|
-
else if (e === "document")
|
|
750
|
-
o = me(D(t));
|
|
751
|
-
else if (L(e))
|
|
752
|
-
o = pe(e, n);
|
|
753
|
-
else {
|
|
754
|
-
const i = Dt(t);
|
|
755
|
-
o = {
|
|
756
|
-
x: e.x - i.x,
|
|
757
|
-
y: e.y - i.y,
|
|
758
|
-
width: e.width,
|
|
759
|
-
height: e.height
|
|
760
|
-
};
|
|
761
|
-
}
|
|
762
|
-
return it(o);
|
|
763
|
-
}
|
|
764
|
-
function kt(t, e) {
|
|
765
|
-
const n = N(t);
|
|
766
|
-
return n === e || !L(n) || X(n) ? !1 : E(n).position === "fixed" || kt(n, e);
|
|
767
|
-
}
|
|
768
|
-
function we(t, e) {
|
|
769
|
-
const n = e.get(t);
|
|
770
|
-
if (n)
|
|
771
|
-
return n;
|
|
772
|
-
let o = J(t, [], !1).filter((c) => L(c) && q(c) !== "body"), i = null;
|
|
773
|
-
const r = E(t).position === "fixed";
|
|
774
|
-
let s = r ? N(t) : t;
|
|
775
|
-
for (; L(s) && !X(s); ) {
|
|
776
|
-
const c = E(s), a = mt(s);
|
|
777
|
-
!a && c.position === "fixed" && (i = null), (r ? !a && !i : !a && c.position === "static" && !!i && he.has(i.position) || Q(s) && !a && kt(t, s)) ? o = o.filter((d) => d !== s) : i = c, s = N(s);
|
|
778
|
-
}
|
|
779
|
-
return e.set(t, o), o;
|
|
780
|
-
}
|
|
781
|
-
function xe(t) {
|
|
782
|
-
let {
|
|
783
|
-
element: e,
|
|
784
|
-
boundary: n,
|
|
785
|
-
rootBoundary: o,
|
|
786
|
-
strategy: i
|
|
787
|
-
} = t;
|
|
788
|
-
const s = [...n === "clippingAncestors" ? rt(e) ? [] : we(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, d) => {
|
|
789
|
-
const u = Rt(e, d, i);
|
|
790
|
-
return l.top = _(u.top, l.top), l.right = Y(u.right, l.right), l.bottom = Y(u.bottom, l.bottom), l.left = _(u.left, l.left), l;
|
|
791
|
-
}, Rt(e, c, i));
|
|
792
|
-
return {
|
|
793
|
-
width: a.right - a.left,
|
|
794
|
-
height: a.bottom - a.top,
|
|
795
|
-
x: a.left,
|
|
796
|
-
y: a.top
|
|
797
|
-
};
|
|
798
|
-
}
|
|
799
|
-
function ye(t) {
|
|
800
|
-
const {
|
|
801
|
-
width: e,
|
|
802
|
-
height: n
|
|
803
|
-
} = Pt(t);
|
|
804
|
-
return {
|
|
805
|
-
width: e,
|
|
806
|
-
height: n
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
function ve(t, e, n) {
|
|
810
|
-
const o = P(e), i = D(e), r = n === "fixed", s = I(t, !0, r, e);
|
|
811
|
-
let c = {
|
|
812
|
-
scrollLeft: 0,
|
|
813
|
-
scrollTop: 0
|
|
814
|
-
};
|
|
815
|
-
const a = T(0);
|
|
816
|
-
function l() {
|
|
817
|
-
a.x = lt(i);
|
|
818
|
-
}
|
|
819
|
-
if (o || !o && !r)
|
|
820
|
-
if ((q(e) !== "body" || Q(i)) && (c = ct(e)), o) {
|
|
821
|
-
const f = I(e, !0, r, e);
|
|
822
|
-
a.x = f.x + e.clientLeft, a.y = f.y + e.clientTop;
|
|
823
|
-
} else i && l();
|
|
824
|
-
r && !o && i && l();
|
|
825
|
-
const d = i && !o && !r ? Ft(i, c) : T(0), u = s.left + c.scrollLeft - a.x - d.x, g = s.top + c.scrollTop - a.y - d.y;
|
|
826
|
-
return {
|
|
827
|
-
x: u,
|
|
828
|
-
y: g,
|
|
829
|
-
width: s.width,
|
|
830
|
-
height: s.height
|
|
831
|
-
};
|
|
832
|
-
}
|
|
833
|
-
function at(t) {
|
|
834
|
-
return E(t).position === "static";
|
|
835
|
-
}
|
|
836
|
-
function Ot(t, e) {
|
|
837
|
-
if (!P(t) || E(t).position === "fixed")
|
|
838
|
-
return null;
|
|
839
|
-
if (e)
|
|
840
|
-
return e(t);
|
|
841
|
-
let n = t.offsetParent;
|
|
842
|
-
return D(t) === n && (n = n.ownerDocument.body), n;
|
|
843
|
-
}
|
|
844
|
-
function Mt(t, e) {
|
|
845
|
-
const n = R(t);
|
|
846
|
-
if (rt(t))
|
|
847
|
-
return n;
|
|
848
|
-
if (!P(t)) {
|
|
849
|
-
let i = N(t);
|
|
850
|
-
for (; i && !X(i); ) {
|
|
851
|
-
if (L(i) && !at(i))
|
|
852
|
-
return i;
|
|
853
|
-
i = N(i);
|
|
854
|
-
}
|
|
855
|
-
return n;
|
|
856
|
-
}
|
|
857
|
-
let o = Ot(t, e);
|
|
858
|
-
for (; o && Ht(o) && at(o); )
|
|
859
|
-
o = Ot(o, e);
|
|
860
|
-
return o && X(o) && at(o) && !mt(o) ? n : o || jt(t) || n;
|
|
861
|
-
}
|
|
862
|
-
const be = async function(t) {
|
|
863
|
-
const e = this.getOffsetParent || Mt, n = this.getDimensions, o = await n(t.floating);
|
|
864
|
-
return {
|
|
865
|
-
reference: ve(t.reference, await e(t.floating), t.strategy),
|
|
866
|
-
floating: {
|
|
867
|
-
x: 0,
|
|
868
|
-
y: 0,
|
|
869
|
-
width: o.width,
|
|
870
|
-
height: o.height
|
|
871
|
-
}
|
|
872
|
-
};
|
|
873
|
-
};
|
|
874
|
-
function Ae(t) {
|
|
875
|
-
return E(t).direction === "rtl";
|
|
876
|
-
}
|
|
877
|
-
const Re = {
|
|
878
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: ue,
|
|
879
|
-
getDocumentElement: D,
|
|
880
|
-
getClippingRect: xe,
|
|
881
|
-
getOffsetParent: Mt,
|
|
882
|
-
getElementRects: be,
|
|
883
|
-
getClientRects: de,
|
|
884
|
-
getDimensions: ye,
|
|
885
|
-
getScale: j,
|
|
886
|
-
isElement: L,
|
|
887
|
-
isRTL: Ae
|
|
888
|
-
};
|
|
889
|
-
function Wt(t, e) {
|
|
890
|
-
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
891
|
-
}
|
|
892
|
-
function Oe(t, e) {
|
|
893
|
-
let n = null, o;
|
|
894
|
-
const i = D(t);
|
|
895
|
-
function r() {
|
|
896
|
-
var c;
|
|
897
|
-
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
898
|
-
}
|
|
899
|
-
function s(c, a) {
|
|
900
|
-
c === void 0 && (c = !1), a === void 0 && (a = 1), r();
|
|
901
|
-
const l = t.getBoundingClientRect(), {
|
|
902
|
-
left: d,
|
|
903
|
-
top: u,
|
|
904
|
-
width: g,
|
|
905
|
-
height: f
|
|
906
|
-
} = l;
|
|
907
|
-
if (c || e(), !g || !f)
|
|
908
|
-
return;
|
|
909
|
-
const m = et(u), h = et(i.clientWidth - (d + g)), w = et(i.clientHeight - (u + f)), p = et(d), y = {
|
|
910
|
-
rootMargin: -m + "px " + -h + "px " + -w + "px " + -p + "px",
|
|
911
|
-
threshold: _(0, Y(1, a)) || 1
|
|
912
|
-
};
|
|
913
|
-
let b = !0;
|
|
914
|
-
function v(F) {
|
|
915
|
-
const O = F[0].intersectionRatio;
|
|
916
|
-
if (O !== a) {
|
|
917
|
-
if (!b)
|
|
918
|
-
return s();
|
|
919
|
-
O ? s(!1, O) : o = setTimeout(() => {
|
|
920
|
-
s(!1, 1e-7);
|
|
921
|
-
}, 1e3);
|
|
922
|
-
}
|
|
923
|
-
O === 1 && !Wt(l, t.getBoundingClientRect()) && s(), b = !1;
|
|
924
|
-
}
|
|
925
|
-
try {
|
|
926
|
-
n = new IntersectionObserver(v, {
|
|
927
|
-
...y,
|
|
928
|
-
// Handle <iframe>s
|
|
929
|
-
root: i.ownerDocument
|
|
930
|
-
});
|
|
931
|
-
} catch {
|
|
932
|
-
n = new IntersectionObserver(v, y);
|
|
933
|
-
}
|
|
934
|
-
n.observe(t);
|
|
935
|
-
}
|
|
936
|
-
return s(!0), r;
|
|
937
|
-
}
|
|
938
|
-
function Ce(t, e, n, o) {
|
|
939
|
-
o === void 0 && (o = {});
|
|
940
|
-
const {
|
|
941
|
-
ancestorScroll: i = !0,
|
|
942
|
-
ancestorResize: r = !0,
|
|
943
|
-
elementResize: s = typeof ResizeObserver == "function",
|
|
944
|
-
layoutShift: c = typeof IntersectionObserver == "function",
|
|
945
|
-
animationFrame: a = !1
|
|
946
|
-
} = o, l = wt(t), d = i || r ? [...l ? J(l) : [], ...J(e)] : [];
|
|
947
|
-
d.forEach((p) => {
|
|
948
|
-
i && p.addEventListener("scroll", n, {
|
|
949
|
-
passive: !0
|
|
950
|
-
}), r && p.addEventListener("resize", n);
|
|
951
|
-
});
|
|
952
|
-
const u = l && c ? Oe(l, n) : null;
|
|
953
|
-
let g = -1, f = null;
|
|
954
|
-
s && (f = new ResizeObserver((p) => {
|
|
955
|
-
let [x] = p;
|
|
956
|
-
x && x.target === l && f && (f.unobserve(e), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
957
|
-
var y;
|
|
958
|
-
(y = f) == null || y.observe(e);
|
|
959
|
-
})), n();
|
|
960
|
-
}), l && !a && f.observe(l), f.observe(e));
|
|
961
|
-
let m, h = a ? I(t) : null;
|
|
962
|
-
a && w();
|
|
963
|
-
function w() {
|
|
964
|
-
const p = I(t);
|
|
965
|
-
h && !Wt(h, p) && n(), h = p, m = requestAnimationFrame(w);
|
|
966
|
-
}
|
|
967
|
-
return n(), () => {
|
|
968
|
-
var p;
|
|
969
|
-
d.forEach((x) => {
|
|
970
|
-
i && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
|
|
971
|
-
}), u?.(), (p = f) == null || p.disconnect(), f = null, a && cancelAnimationFrame(m);
|
|
972
|
-
};
|
|
973
|
-
}
|
|
974
|
-
const Se = ce, Le = le, Ee = ie, Te = oe, Pe = (t, e, n) => {
|
|
975
|
-
const o = /* @__PURE__ */ new Map(), i = {
|
|
976
|
-
platform: Re,
|
|
977
|
-
...n
|
|
978
|
-
}, r = {
|
|
979
|
-
...i.platform,
|
|
980
|
-
_c: o
|
|
981
|
-
};
|
|
982
|
-
return ne(t, e, {
|
|
983
|
-
...i,
|
|
984
|
-
platform: r
|
|
985
|
-
});
|
|
986
|
-
};
|
|
987
|
-
export {
|
|
988
|
-
Ce as a,
|
|
989
|
-
P as b,
|
|
990
|
-
Pe as c,
|
|
991
|
-
Te as d,
|
|
992
|
-
Ct as e,
|
|
993
|
-
Ee as f,
|
|
994
|
-
L as g,
|
|
995
|
-
R as h,
|
|
996
|
-
xt as i,
|
|
997
|
-
J as j,
|
|
998
|
-
gt as k,
|
|
999
|
-
X as l,
|
|
1000
|
-
N as m,
|
|
1001
|
-
E as n,
|
|
1002
|
-
Se as o,
|
|
1003
|
-
q as p,
|
|
1004
|
-
Le as s
|
|
1005
|
-
};
|