@codeandfunction/callaloo 3.16.1 → 3.16.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/dist/chunks/{CLA11yButton.vue_vue_type_style_index_0_lang-Cdx5rsou.js → CLA11yButton.vue_vue_type_style_index_0_lang-BPM559Fj.js} +1 -1
- package/dist/chunks/{CLButton.vue_vue_type_style_index_0_lang-CrhjC50b.js → CLButton.vue_vue_type_style_index_0_lang-DiT4TwiW.js} +4 -4
- package/dist/chunks/{CLCard.vue_vue_type_style_index_0_lang-DVuAcV5A.js → CLCard.vue_vue_type_style_index_0_lang-vXK1HBND.js} +6 -6
- package/dist/chunks/{CLFormLabel.vue_vue_type_script_setup_true_lang-fddy-FWI.js → CLFormLabel.vue_vue_type_script_setup_true_lang-B9PYNMYy.js} +1 -1
- package/dist/chunks/{CLHeading.vue_vue_type_style_index_0_lang-DILwNSgn.js → CLHeading.vue_vue_type_style_index_0_lang-HzXfA-v_.js} +1 -1
- package/dist/chunks/{CLIcon.vue_vue_type_style_index_0_lang-CZB8svPf.js → CLIcon.vue_vue_type_style_index_0_lang-YdXhAQ8-.js} +23 -22
- package/dist/chunks/{CLInputMessages.vue_vue_type_style_index_0_lang-RMOT1TQk.js → CLInputMessages.vue_vue_type_style_index_0_lang-BNAW5shz.js} +12 -11
- package/dist/chunks/{CLLink.vue_vue_type_style_index_0_lang-BUgw8Rpy.js → CLLink.vue_vue_type_style_index_0_lang-iHWgurk-.js} +12 -11
- package/dist/chunks/{CLNavLink.vue_vue_type_script_setup_true_lang-Ckz9MEj5.js → CLNavLink.vue_vue_type_script_setup_true_lang-DBu0BjSA.js} +1 -1
- package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-mkIKVHjg.js → CLPill.vue_vue_type_style_index_0_lang-DZl8_301.js} +3 -3
- package/dist/chunks/{CLProgress.vue_vue_type_style_index_0_lang-CSf7WiNb.js → CLProgress.vue_vue_type_style_index_0_lang-B2TZA2aN.js} +2 -2
- package/dist/chunks/{CLSkeleton.vue_vue_type_style_index_0_lang-E-bZeUWT.js → CLSkeleton.vue_vue_type_style_index_0_lang-BDGFXnrV.js} +1 -1
- package/dist/chunks/{CLSpinner.vue_vue_type_style_index_0_lang-C8s8K4zb.js → CLSpinner.vue_vue_type_style_index_0_lang-BsI680jS.js} +1 -1
- package/dist/chunks/{CLText.vue_vue_type_style_index_0_lang-V7LSR7DF.js → CLText.vue_vue_type_style_index_0_lang-CPdNgG4V.js} +1 -1
- package/dist/chunks/{CLToast.vue_vue_type_style_index_0_lang-DOI4DZGg.js → CLToast.vue_vue_type_style_index_0_lang-C119uLhY.js} +24 -23
- package/dist/chunks/base-theme-CYXVp7iK.js +774 -0
- package/dist/chunks/helper--hRjZVm6.js +62 -0
- package/dist/chunks/{utils-DFnkOeYP.js → utils-B7dbJd6n.js} +26 -25
- package/dist/chunks/{utils-C7Yjsqk-.js → utils-CXZw87Wc.js} +10 -9
- package/dist/chunks/utils-Dgc7kbbm.js +15 -0
- package/dist/chunks/utils-UApzileu.js +387 -0
- package/dist/chunks/utils-aUf_lkSP.js +29 -0
- package/dist/chunks/{utils-D_WP3vZz.js → utils-m8fomrFl.js} +13 -12
- package/dist/components/Buttons/CLA11yButton/CLA11yButton.js +1 -1
- package/dist/components/Buttons/CLButton/CLButton.js +1 -1
- package/dist/components/CLIcon/CLIcon.js +1 -1
- package/dist/components/CLTable/CLTable.js +30 -29
- package/dist/components/Containers/CLCard/CLCard.js +1 -1
- package/dist/components/Containers/CLCarousel/CLCarousel.js +16 -16
- package/dist/components/Containers/CLDisclosure/CLDisclosure.js +6 -6
- package/dist/components/Form/CLCheckbox/CLCheckbox.js +3 -3
- package/dist/components/Form/CLInput/CLInput.js +5 -5
- package/dist/components/Form/CLRadioButton/CLRadioButton.js +2 -2
- package/dist/components/Form/CLSelect/CLSelect.js +3 -3
- package/dist/components/Form/CLTextArea/CLTextArea.js +2 -2
- package/dist/components/Indicators/CLBadge/CLBadge.js +1 -1
- package/dist/components/Indicators/CLBanner/CLBanner.js +6 -6
- package/dist/components/Indicators/CLPill/CLPill.js +1 -1
- package/dist/components/Indicators/CLProgress/CLProgress.js +1 -1
- package/dist/components/Loading/CLSkeleton/CLSkeleton.js +1 -1
- package/dist/components/Loading/CLSpinner/CLSpinner.js +1 -1
- package/dist/components/Modals/CLModal/CLModal.js +16 -15
- package/dist/components/Navigation/CLLink/CLLink.js +1 -1
- package/dist/components/Navigation/CLNavLink/CLNavLink.js +1 -1
- package/dist/components/Navigation/CLNavSection/CLNavSection.js +2 -2
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +509 -551
- package/dist/components/Popups/CLToast/CLToast.js +1 -1
- package/dist/components/Providers/CLThemeProvider/CLThemeProvider.js +2 -2
- package/dist/components/Providers/CLToastProvider/CLToastProvider.js +1 -1
- package/dist/components/Typography/CLHeading/CLHeading.js +1 -1
- package/dist/components/Typography/CLText/CLText.js +1 -1
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/useDropdown.js +49 -0
- package/dist/{chunks/useEsc-C9QIDZ_8.js → composables/useEsc.js} +2 -2
- package/dist/{chunks/useHasSlotContent-DDqs5uK9.js → composables/useHasSlotContent.js} +2 -2
- package/dist/composables/useTheme.js +33 -0
- package/dist/composables/useToast.js +14 -0
- package/package.json +5 -3
- package/dist/chunks/base-theme-C9_Hz5HW.js +0 -832
- package/dist/chunks/useTheme-yoEfuNvB.js +0 -417
- package/dist/chunks/utils-DTWXs4YX.js +0 -14
- package/dist/chunks/utils-Da9LXXQ0.js +0 -28
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import './CLDropdownMenu.css';
|
|
2
|
-
import { computed as V, ref as
|
|
3
|
-
import { _ as ue } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-
|
|
4
|
-
import { _ as de } from "../../../chunks/CLCard.vue_vue_type_style_index_0_lang-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
2
|
+
import { computed as V, ref as E, shallowRef as te, watch as ut, getCurrentScope as ee, onScopeDispose as ne, shallowReadonly as q, unref as A, defineComponent as oe, useCssVars as ie, onBeforeUnmount as re, createElementBlock as Rt, openBlock as At, normalizeClass as dt, createVNode as Ot, createCommentVNode as le, withCtx as Et, createTextVNode as se, toDisplayString as ce, normalizeStyle as ae, renderSlot as fe } from "vue";
|
|
3
|
+
import { _ as ue } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-DiT4TwiW.js";
|
|
4
|
+
import { _ as de } from "../../../chunks/CLCard.vue_vue_type_style_index_0_lang-vXK1HBND.js";
|
|
5
|
+
import { b as me, i as mt } from "../../../chunks/helper--hRjZVm6.js";
|
|
6
|
+
import { useDropdown as he } from "../../../composables/useDropdown.js";
|
|
7
|
+
import { useEsc as ge } from "../../../composables/useEsc.js";
|
|
8
|
+
import { CLPlacement as pe, CLIconSizes as Lt, CLIconNames as we, CLColorVariants as Dt, CLSizes as ye, CLColors as Tt } from "../../../index.js";
|
|
9
|
+
const tt = Math.min, I = Math.max, et = Math.round, Q = Math.floor, B = (t) => ({
|
|
9
10
|
x: t,
|
|
10
11
|
y: t
|
|
11
12
|
}), ve = {
|
|
@@ -13,20 +14,20 @@ const et = Math.min, N = Math.max, nt = Math.round, tt = Math.floor, k = (t) =>
|
|
|
13
14
|
right: "left",
|
|
14
15
|
bottom: "top",
|
|
15
16
|
top: "bottom"
|
|
16
|
-
},
|
|
17
|
+
}, xe = {
|
|
17
18
|
start: "end",
|
|
18
19
|
end: "start"
|
|
19
20
|
};
|
|
20
|
-
function
|
|
21
|
-
return
|
|
21
|
+
function Bt(t, e, n) {
|
|
22
|
+
return I(t, tt(e, n));
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function it(t, e) {
|
|
24
25
|
return typeof t == "function" ? t(e) : t;
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function N(t) {
|
|
27
28
|
return t.split("-")[0];
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function rt(t) {
|
|
30
31
|
return t.split("-")[1];
|
|
31
32
|
}
|
|
32
33
|
function It(t) {
|
|
@@ -35,48 +36,48 @@ function It(t) {
|
|
|
35
36
|
function Nt(t) {
|
|
36
37
|
return t === "y" ? "height" : "width";
|
|
37
38
|
}
|
|
38
|
-
const
|
|
39
|
-
function
|
|
40
|
-
return
|
|
39
|
+
const be = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
40
|
+
function F(t) {
|
|
41
|
+
return be.has(N(t)) ? "y" : "x";
|
|
41
42
|
}
|
|
42
43
|
function Xt(t) {
|
|
43
|
-
return It(
|
|
44
|
+
return It(F(t));
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function Ce(t, e, n) {
|
|
46
47
|
n === void 0 && (n = !1);
|
|
47
|
-
const o =
|
|
48
|
+
const o = rt(t), i = Xt(t), l = Nt(i);
|
|
48
49
|
let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
49
|
-
return e.reference[
|
|
50
|
+
return e.reference[l] > e.floating[l] && (r = nt(r)), [r, nt(r)];
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
-
const e =
|
|
53
|
-
return [
|
|
52
|
+
function Se(t) {
|
|
53
|
+
const e = nt(t);
|
|
54
|
+
return [gt(t), e, gt(e)];
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
-
return t.replace(/start|end/g, (e) =>
|
|
56
|
+
function gt(t) {
|
|
57
|
+
return t.replace(/start|end/g, (e) => xe[e]);
|
|
57
58
|
}
|
|
58
|
-
const
|
|
59
|
-
function
|
|
59
|
+
const Pt = ["left", "right"], kt = ["right", "left"], Re = ["top", "bottom"], Ae = ["bottom", "top"];
|
|
60
|
+
function Oe(t, e, n) {
|
|
60
61
|
switch (t) {
|
|
61
62
|
case "top":
|
|
62
63
|
case "bottom":
|
|
63
|
-
return n ? e ?
|
|
64
|
+
return n ? e ? kt : Pt : e ? Pt : kt;
|
|
64
65
|
case "left":
|
|
65
66
|
case "right":
|
|
66
|
-
return e ?
|
|
67
|
+
return e ? Re : Ae;
|
|
67
68
|
default:
|
|
68
69
|
return [];
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
-
const i =
|
|
73
|
-
let
|
|
74
|
-
return i && (
|
|
72
|
+
function Ee(t, e, n, o) {
|
|
73
|
+
const i = rt(t);
|
|
74
|
+
let l = Oe(N(t), n === "start", o);
|
|
75
|
+
return i && (l = l.map((r) => r + "-" + i), e && (l = l.concat(l.map(gt)))), l;
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
+
function nt(t) {
|
|
77
78
|
return t.replace(/left|right|bottom|top/g, (e) => ve[e]);
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function Le(t) {
|
|
80
81
|
return {
|
|
81
82
|
top: 0,
|
|
82
83
|
right: 0,
|
|
@@ -85,15 +86,15 @@ function Ae(t) {
|
|
|
85
86
|
...t
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
-
return typeof t != "number" ?
|
|
89
|
+
function De(t) {
|
|
90
|
+
return typeof t != "number" ? Le(t) : {
|
|
90
91
|
top: t,
|
|
91
92
|
right: t,
|
|
92
93
|
bottom: t,
|
|
93
94
|
left: t
|
|
94
95
|
};
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
+
function ot(t) {
|
|
97
98
|
const {
|
|
98
99
|
x: e,
|
|
99
100
|
y: n,
|
|
@@ -116,31 +117,31 @@ function Vt(t, e, n) {
|
|
|
116
117
|
reference: o,
|
|
117
118
|
floating: i
|
|
118
119
|
} = t;
|
|
119
|
-
const
|
|
120
|
+
const l = F(e), r = Xt(e), s = Nt(r), c = N(e), a = l === "y", f = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, m = o[s] / 2 - i[s] / 2;
|
|
120
121
|
let d;
|
|
121
|
-
switch (
|
|
122
|
+
switch (c) {
|
|
122
123
|
case "top":
|
|
123
124
|
d = {
|
|
124
|
-
x:
|
|
125
|
+
x: f,
|
|
125
126
|
y: o.y - i.height
|
|
126
127
|
};
|
|
127
128
|
break;
|
|
128
129
|
case "bottom":
|
|
129
130
|
d = {
|
|
130
|
-
x:
|
|
131
|
+
x: f,
|
|
131
132
|
y: o.y + o.height
|
|
132
133
|
};
|
|
133
134
|
break;
|
|
134
135
|
case "right":
|
|
135
136
|
d = {
|
|
136
137
|
x: o.x + o.width,
|
|
137
|
-
y:
|
|
138
|
+
y: u
|
|
138
139
|
};
|
|
139
140
|
break;
|
|
140
141
|
case "left":
|
|
141
142
|
d = {
|
|
142
143
|
x: o.x - i.width,
|
|
143
|
-
y:
|
|
144
|
+
y: u
|
|
144
145
|
};
|
|
145
146
|
break;
|
|
146
147
|
default:
|
|
@@ -149,7 +150,7 @@ function Vt(t, e, n) {
|
|
|
149
150
|
y: o.y
|
|
150
151
|
};
|
|
151
152
|
}
|
|
152
|
-
switch (
|
|
153
|
+
switch (rt(e)) {
|
|
153
154
|
case "start":
|
|
154
155
|
d[r] -= m * (n && a ? -1 : 1);
|
|
155
156
|
break;
|
|
@@ -159,33 +160,33 @@ function Vt(t, e, n) {
|
|
|
159
160
|
}
|
|
160
161
|
return d;
|
|
161
162
|
}
|
|
162
|
-
const
|
|
163
|
+
const Te = async (t, e, n) => {
|
|
163
164
|
const {
|
|
164
165
|
placement: o = "bottom",
|
|
165
166
|
strategy: i = "absolute",
|
|
166
|
-
middleware:
|
|
167
|
+
middleware: l = [],
|
|
167
168
|
platform: r
|
|
168
|
-
} = n,
|
|
169
|
+
} = n, s = l.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
169
170
|
let a = await r.getElementRects({
|
|
170
171
|
reference: t,
|
|
171
172
|
floating: e,
|
|
172
173
|
strategy: i
|
|
173
174
|
}), {
|
|
174
|
-
x:
|
|
175
|
-
y:
|
|
176
|
-
} = Vt(a, o,
|
|
177
|
-
for (let
|
|
175
|
+
x: f,
|
|
176
|
+
y: u
|
|
177
|
+
} = Vt(a, o, c), m = o, d = {}, h = 0;
|
|
178
|
+
for (let y = 0; y < s.length; y++) {
|
|
178
179
|
const {
|
|
179
|
-
name:
|
|
180
|
-
fn:
|
|
181
|
-
} =
|
|
182
|
-
x:
|
|
180
|
+
name: v,
|
|
181
|
+
fn: g
|
|
182
|
+
} = s[y], {
|
|
183
|
+
x: w,
|
|
183
184
|
y: x,
|
|
184
185
|
data: C,
|
|
185
186
|
reset: b
|
|
186
|
-
} = await
|
|
187
|
-
x:
|
|
188
|
-
y:
|
|
187
|
+
} = await g({
|
|
188
|
+
x: f,
|
|
189
|
+
y: u,
|
|
189
190
|
initialPlacement: o,
|
|
190
191
|
placement: m,
|
|
191
192
|
strategy: i,
|
|
@@ -197,10 +198,10 @@ const De = async (t, e, n) => {
|
|
|
197
198
|
floating: e
|
|
198
199
|
}
|
|
199
200
|
});
|
|
200
|
-
|
|
201
|
+
f = w ?? f, u = x ?? u, d = {
|
|
201
202
|
...d,
|
|
202
|
-
[
|
|
203
|
-
...d[
|
|
203
|
+
[v]: {
|
|
204
|
+
...d[v],
|
|
204
205
|
...C
|
|
205
206
|
}
|
|
206
207
|
}, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (m = b.placement), b.rects && (a = b.rects === !0 ? await r.getElementRects({
|
|
@@ -208,13 +209,13 @@ const De = async (t, e, n) => {
|
|
|
208
209
|
floating: e,
|
|
209
210
|
strategy: i
|
|
210
211
|
}) : b.rects), {
|
|
211
|
-
x:
|
|
212
|
-
y:
|
|
213
|
-
} = Vt(a, m,
|
|
212
|
+
x: f,
|
|
213
|
+
y: u
|
|
214
|
+
} = Vt(a, m, c)), y = -1);
|
|
214
215
|
}
|
|
215
216
|
return {
|
|
216
|
-
x:
|
|
217
|
-
y:
|
|
217
|
+
x: f,
|
|
218
|
+
y: u,
|
|
218
219
|
placement: m,
|
|
219
220
|
strategy: i,
|
|
220
221
|
middlewareData: d
|
|
@@ -226,46 +227,46 @@ async function jt(t, e) {
|
|
|
226
227
|
const {
|
|
227
228
|
x: o,
|
|
228
229
|
y: i,
|
|
229
|
-
platform:
|
|
230
|
+
platform: l,
|
|
230
231
|
rects: r,
|
|
231
|
-
elements:
|
|
232
|
-
strategy:
|
|
232
|
+
elements: s,
|
|
233
|
+
strategy: c
|
|
233
234
|
} = t, {
|
|
234
235
|
boundary: a = "clippingAncestors",
|
|
235
|
-
rootBoundary:
|
|
236
|
-
elementContext:
|
|
236
|
+
rootBoundary: f = "viewport",
|
|
237
|
+
elementContext: u = "floating",
|
|
237
238
|
altBoundary: m = !1,
|
|
238
239
|
padding: d = 0
|
|
239
|
-
} =
|
|
240
|
-
element: (n = await (
|
|
240
|
+
} = it(e, t), h = De(d), v = s[m ? u === "floating" ? "reference" : "floating" : u], g = ot(await l.getClippingRect({
|
|
241
|
+
element: (n = await (l.isElement == null ? void 0 : l.isElement(v))) == null || n ? v : v.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(s.floating)),
|
|
241
242
|
boundary: a,
|
|
242
|
-
rootBoundary:
|
|
243
|
-
strategy:
|
|
244
|
-
})),
|
|
243
|
+
rootBoundary: f,
|
|
244
|
+
strategy: c
|
|
245
|
+
})), w = u === "floating" ? {
|
|
245
246
|
x: o,
|
|
246
247
|
y: i,
|
|
247
248
|
width: r.floating.width,
|
|
248
249
|
height: r.floating.height
|
|
249
|
-
} : r.reference, x = await (
|
|
250
|
+
} : r.reference, x = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(s.floating)), C = await (l.isElement == null ? void 0 : l.isElement(x)) ? await (l.getScale == null ? void 0 : l.getScale(x)) || {
|
|
250
251
|
x: 1,
|
|
251
252
|
y: 1
|
|
252
253
|
} : {
|
|
253
254
|
x: 1,
|
|
254
255
|
y: 1
|
|
255
|
-
}, b =
|
|
256
|
-
elements:
|
|
257
|
-
rect:
|
|
256
|
+
}, b = ot(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
257
|
+
elements: s,
|
|
258
|
+
rect: w,
|
|
258
259
|
offsetParent: x,
|
|
259
|
-
strategy:
|
|
260
|
-
}) :
|
|
260
|
+
strategy: c
|
|
261
|
+
}) : w);
|
|
261
262
|
return {
|
|
262
|
-
top: (
|
|
263
|
-
bottom: (b.bottom -
|
|
264
|
-
left: (
|
|
265
|
-
right: (b.right -
|
|
263
|
+
top: (g.top - b.top + h.top) / C.y,
|
|
264
|
+
bottom: (b.bottom - g.bottom + h.bottom) / C.y,
|
|
265
|
+
left: (g.left - b.left + h.left) / C.x,
|
|
266
|
+
right: (b.right - g.right + h.right) / C.x
|
|
266
267
|
};
|
|
267
268
|
}
|
|
268
|
-
const
|
|
269
|
+
const Be = function(t) {
|
|
269
270
|
return t === void 0 && (t = {}), {
|
|
270
271
|
name: "flip",
|
|
271
272
|
options: t,
|
|
@@ -273,108 +274,108 @@ const Te = function(t) {
|
|
|
273
274
|
var n, o;
|
|
274
275
|
const {
|
|
275
276
|
placement: i,
|
|
276
|
-
middlewareData:
|
|
277
|
+
middlewareData: l,
|
|
277
278
|
rects: r,
|
|
278
|
-
initialPlacement:
|
|
279
|
-
platform:
|
|
279
|
+
initialPlacement: s,
|
|
280
|
+
platform: c,
|
|
280
281
|
elements: a
|
|
281
282
|
} = e, {
|
|
282
|
-
mainAxis:
|
|
283
|
-
crossAxis:
|
|
283
|
+
mainAxis: f = !0,
|
|
284
|
+
crossAxis: u = !0,
|
|
284
285
|
fallbackPlacements: m,
|
|
285
286
|
fallbackStrategy: d = "bestFit",
|
|
286
287
|
fallbackAxisSideDirection: h = "none",
|
|
287
|
-
flipAlignment:
|
|
288
|
-
...
|
|
289
|
-
} =
|
|
290
|
-
if ((n =
|
|
288
|
+
flipAlignment: y = !0,
|
|
289
|
+
...v
|
|
290
|
+
} = it(t, e);
|
|
291
|
+
if ((n = l.arrow) != null && n.alignmentOffset)
|
|
291
292
|
return {};
|
|
292
|
-
const
|
|
293
|
-
!m && T && b.push(...
|
|
294
|
-
const
|
|
295
|
-
let
|
|
296
|
-
if (
|
|
297
|
-
const
|
|
298
|
-
|
|
293
|
+
const g = N(i), w = F(s), x = N(s) === s, C = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), b = m || (x || !y ? [nt(s)] : Se(s)), T = h !== "none";
|
|
294
|
+
!m && T && b.push(...Ee(s, y, h, C));
|
|
295
|
+
const p = [s, ...b], S = await jt(e, v), z = [];
|
|
296
|
+
let Y = ((o = l.flip) == null ? void 0 : o.overflows) || [];
|
|
297
|
+
if (f && z.push(S[g]), u) {
|
|
298
|
+
const H = Ce(i, r, C);
|
|
299
|
+
z.push(S[H[0]], S[H[1]]);
|
|
299
300
|
}
|
|
300
|
-
if (
|
|
301
|
+
if (Y = [...Y, {
|
|
301
302
|
placement: i,
|
|
302
|
-
overflows:
|
|
303
|
-
}], !
|
|
303
|
+
overflows: z
|
|
304
|
+
}], !z.every((H) => H <= 0)) {
|
|
304
305
|
var bt, Ct;
|
|
305
|
-
const
|
|
306
|
-
if (
|
|
306
|
+
const H = (((bt = l.flip) == null ? void 0 : bt.index) || 0) + 1, ft = p[H];
|
|
307
|
+
if (ft && (!(u === "alignment" ? w !== F(ft) : !1) || // We leave the current main axis only if every placement on that axis
|
|
307
308
|
// overflows the main axis.
|
|
308
|
-
|
|
309
|
+
Y.every((O) => F(O.placement) === w ? O.overflows[0] > 0 : !0)))
|
|
309
310
|
return {
|
|
310
311
|
data: {
|
|
311
|
-
index:
|
|
312
|
-
overflows:
|
|
312
|
+
index: H,
|
|
313
|
+
overflows: Y
|
|
313
314
|
},
|
|
314
315
|
reset: {
|
|
315
|
-
placement:
|
|
316
|
+
placement: ft
|
|
316
317
|
}
|
|
317
318
|
};
|
|
318
|
-
let
|
|
319
|
-
if (!
|
|
319
|
+
let G = (Ct = Y.filter((W) => W.overflows[0] <= 0).sort((W, O) => W.overflows[1] - O.overflows[1])[0]) == null ? void 0 : Ct.placement;
|
|
320
|
+
if (!G)
|
|
320
321
|
switch (d) {
|
|
321
322
|
case "bestFit": {
|
|
322
|
-
var
|
|
323
|
-
const
|
|
323
|
+
var St;
|
|
324
|
+
const W = (St = Y.filter((O) => {
|
|
324
325
|
if (T) {
|
|
325
|
-
const $ =
|
|
326
|
-
return $ ===
|
|
326
|
+
const $ = F(O.placement);
|
|
327
|
+
return $ === w || // Create a bias to the `y` side axis due to horizontal
|
|
327
328
|
// reading directions favoring greater width.
|
|
328
329
|
$ === "y";
|
|
329
330
|
}
|
|
330
331
|
return !0;
|
|
331
|
-
}).map((
|
|
332
|
-
|
|
332
|
+
}).map((O) => [O.placement, O.overflows.filter(($) => $ > 0).reduce(($, Qt) => $ + Qt, 0)]).sort((O, $) => O[1] - $[1])[0]) == null ? void 0 : St[0];
|
|
333
|
+
W && (G = W);
|
|
333
334
|
break;
|
|
334
335
|
}
|
|
335
336
|
case "initialPlacement":
|
|
336
|
-
|
|
337
|
+
G = s;
|
|
337
338
|
break;
|
|
338
339
|
}
|
|
339
|
-
if (i !==
|
|
340
|
+
if (i !== G)
|
|
340
341
|
return {
|
|
341
342
|
reset: {
|
|
342
|
-
placement:
|
|
343
|
+
placement: G
|
|
343
344
|
}
|
|
344
345
|
};
|
|
345
346
|
}
|
|
346
347
|
return {};
|
|
347
348
|
}
|
|
348
349
|
};
|
|
349
|
-
},
|
|
350
|
-
async function
|
|
350
|
+
}, Pe = /* @__PURE__ */ new Set(["left", "top"]);
|
|
351
|
+
async function ke(t, e) {
|
|
351
352
|
const {
|
|
352
353
|
placement: n,
|
|
353
354
|
platform: o,
|
|
354
355
|
elements: i
|
|
355
|
-
} = t,
|
|
356
|
+
} = t, l = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = N(n), s = rt(n), c = F(n) === "y", a = Pe.has(r) ? -1 : 1, f = l && c ? -1 : 1, u = it(e, t);
|
|
356
357
|
let {
|
|
357
358
|
mainAxis: m,
|
|
358
359
|
crossAxis: d,
|
|
359
360
|
alignmentAxis: h
|
|
360
|
-
} = typeof
|
|
361
|
-
mainAxis:
|
|
361
|
+
} = typeof u == "number" ? {
|
|
362
|
+
mainAxis: u,
|
|
362
363
|
crossAxis: 0,
|
|
363
364
|
alignmentAxis: null
|
|
364
365
|
} : {
|
|
365
|
-
mainAxis:
|
|
366
|
-
crossAxis:
|
|
367
|
-
alignmentAxis:
|
|
366
|
+
mainAxis: u.mainAxis || 0,
|
|
367
|
+
crossAxis: u.crossAxis || 0,
|
|
368
|
+
alignmentAxis: u.alignmentAxis
|
|
368
369
|
};
|
|
369
|
-
return
|
|
370
|
-
x: d *
|
|
370
|
+
return s && typeof h == "number" && (d = s === "end" ? h * -1 : h), c ? {
|
|
371
|
+
x: d * f,
|
|
371
372
|
y: m * a
|
|
372
373
|
} : {
|
|
373
374
|
x: m * a,
|
|
374
|
-
y: d *
|
|
375
|
+
y: d * f
|
|
375
376
|
};
|
|
376
377
|
}
|
|
377
|
-
const
|
|
378
|
+
const Ve = function(t) {
|
|
378
379
|
return t === void 0 && (t = 0), {
|
|
379
380
|
name: "offset",
|
|
380
381
|
options: t,
|
|
@@ -382,21 +383,21 @@ const Pe = function(t) {
|
|
|
382
383
|
var n, o;
|
|
383
384
|
const {
|
|
384
385
|
x: i,
|
|
385
|
-
y:
|
|
386
|
+
y: l,
|
|
386
387
|
placement: r,
|
|
387
|
-
middlewareData:
|
|
388
|
-
} = e,
|
|
389
|
-
return r === ((n =
|
|
390
|
-
x: i +
|
|
391
|
-
y:
|
|
388
|
+
middlewareData: s
|
|
389
|
+
} = e, c = await ke(e, t);
|
|
390
|
+
return r === ((n = s.offset) == null ? void 0 : n.placement) && (o = s.arrow) != null && o.alignmentOffset ? {} : {
|
|
391
|
+
x: i + c.x,
|
|
392
|
+
y: l + c.y,
|
|
392
393
|
data: {
|
|
393
|
-
...
|
|
394
|
+
...c,
|
|
394
395
|
placement: r
|
|
395
396
|
}
|
|
396
397
|
};
|
|
397
398
|
}
|
|
398
399
|
};
|
|
399
|
-
},
|
|
400
|
+
}, $e = function(t) {
|
|
400
401
|
return t === void 0 && (t = {}), {
|
|
401
402
|
name: "shift",
|
|
402
403
|
options: t,
|
|
@@ -406,47 +407,47 @@ const Pe = function(t) {
|
|
|
406
407
|
y: o,
|
|
407
408
|
placement: i
|
|
408
409
|
} = e, {
|
|
409
|
-
mainAxis:
|
|
410
|
+
mainAxis: l = !0,
|
|
410
411
|
crossAxis: r = !1,
|
|
411
|
-
limiter:
|
|
412
|
-
fn: (
|
|
412
|
+
limiter: s = {
|
|
413
|
+
fn: (v) => {
|
|
413
414
|
let {
|
|
414
|
-
x:
|
|
415
|
-
y:
|
|
416
|
-
} =
|
|
415
|
+
x: g,
|
|
416
|
+
y: w
|
|
417
|
+
} = v;
|
|
417
418
|
return {
|
|
418
|
-
x:
|
|
419
|
-
y:
|
|
419
|
+
x: g,
|
|
420
|
+
y: w
|
|
420
421
|
};
|
|
421
422
|
}
|
|
422
423
|
},
|
|
423
|
-
...
|
|
424
|
-
} =
|
|
424
|
+
...c
|
|
425
|
+
} = it(t, e), a = {
|
|
425
426
|
x: n,
|
|
426
427
|
y: o
|
|
427
|
-
},
|
|
428
|
-
let d = a[m], h = a[
|
|
429
|
-
if (
|
|
430
|
-
const
|
|
431
|
-
d =
|
|
428
|
+
}, f = await jt(e, c), u = F(N(i)), m = It(u);
|
|
429
|
+
let d = a[m], h = a[u];
|
|
430
|
+
if (l) {
|
|
431
|
+
const v = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", w = d + f[v], x = d - f[g];
|
|
432
|
+
d = Bt(w, d, x);
|
|
432
433
|
}
|
|
433
434
|
if (r) {
|
|
434
|
-
const
|
|
435
|
-
h =
|
|
435
|
+
const v = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", w = h + f[v], x = h - f[g];
|
|
436
|
+
h = Bt(w, h, x);
|
|
436
437
|
}
|
|
437
|
-
const
|
|
438
|
+
const y = s.fn({
|
|
438
439
|
...e,
|
|
439
440
|
[m]: d,
|
|
440
|
-
[
|
|
441
|
+
[u]: h
|
|
441
442
|
});
|
|
442
443
|
return {
|
|
443
|
-
...
|
|
444
|
+
...y,
|
|
444
445
|
data: {
|
|
445
|
-
x:
|
|
446
|
-
y:
|
|
446
|
+
x: y.x - n,
|
|
447
|
+
y: y.y - o,
|
|
447
448
|
enabled: {
|
|
448
|
-
[m]:
|
|
449
|
-
[
|
|
449
|
+
[m]: l,
|
|
450
|
+
[u]: r
|
|
450
451
|
}
|
|
451
452
|
}
|
|
452
453
|
};
|
|
@@ -456,46 +457,46 @@ const Pe = function(t) {
|
|
|
456
457
|
function lt() {
|
|
457
458
|
return typeof window < "u";
|
|
458
459
|
}
|
|
459
|
-
function
|
|
460
|
-
return
|
|
460
|
+
function j(t) {
|
|
461
|
+
return wt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
461
462
|
}
|
|
462
|
-
function
|
|
463
|
+
function R(t) {
|
|
463
464
|
var e;
|
|
464
465
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
465
466
|
}
|
|
466
|
-
function
|
|
467
|
+
function k(t) {
|
|
467
468
|
var e;
|
|
468
|
-
return (e = (
|
|
469
|
+
return (e = (wt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
469
470
|
}
|
|
470
|
-
function
|
|
471
|
-
return lt() ? t instanceof Node || t instanceof
|
|
471
|
+
function wt(t) {
|
|
472
|
+
return lt() ? t instanceof Node || t instanceof R(t).Node : !1;
|
|
472
473
|
}
|
|
473
|
-
function
|
|
474
|
-
return lt() ? t instanceof Element || t instanceof
|
|
474
|
+
function L(t) {
|
|
475
|
+
return lt() ? t instanceof Element || t instanceof R(t).Element : !1;
|
|
475
476
|
}
|
|
476
|
-
function
|
|
477
|
-
return lt() ? t instanceof HTMLElement || t instanceof
|
|
477
|
+
function P(t) {
|
|
478
|
+
return lt() ? t instanceof HTMLElement || t instanceof R(t).HTMLElement : !1;
|
|
478
479
|
}
|
|
479
480
|
function $t(t) {
|
|
480
|
-
return !lt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
481
|
+
return !lt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof R(t).ShadowRoot;
|
|
481
482
|
}
|
|
482
|
-
const
|
|
483
|
-
function
|
|
483
|
+
const Fe = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
484
|
+
function J(t) {
|
|
484
485
|
const {
|
|
485
486
|
overflow: e,
|
|
486
487
|
overflowX: n,
|
|
487
488
|
overflowY: o,
|
|
488
489
|
display: i
|
|
489
490
|
} = D(t);
|
|
490
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) &&
|
|
491
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Fe.has(i);
|
|
491
492
|
}
|
|
492
|
-
const
|
|
493
|
-
function
|
|
494
|
-
return
|
|
493
|
+
const Me = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
494
|
+
function ze(t) {
|
|
495
|
+
return Me.has(j(t));
|
|
495
496
|
}
|
|
496
|
-
const
|
|
497
|
-
function
|
|
498
|
-
return
|
|
497
|
+
const He = [":popover-open", ":modal"];
|
|
498
|
+
function st(t) {
|
|
499
|
+
return He.some((e) => {
|
|
499
500
|
try {
|
|
500
501
|
return t.matches(e);
|
|
501
502
|
} catch {
|
|
@@ -503,34 +504,34 @@ function ct(t) {
|
|
|
503
504
|
}
|
|
504
505
|
});
|
|
505
506
|
}
|
|
506
|
-
const
|
|
507
|
-
function
|
|
508
|
-
const e =
|
|
509
|
-
return
|
|
507
|
+
const We = ["transform", "translate", "scale", "rotate", "perspective"], Ie = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ne = ["paint", "layout", "strict", "content"];
|
|
508
|
+
function yt(t) {
|
|
509
|
+
const e = vt(), n = L(t) ? D(t) : t;
|
|
510
|
+
return We.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) || Ie.some((o) => (n.willChange || "").includes(o)) || Ne.some((o) => (n.contain || "").includes(o));
|
|
510
511
|
}
|
|
511
|
-
function
|
|
512
|
-
let e =
|
|
513
|
-
for (;
|
|
514
|
-
if (
|
|
512
|
+
function Xe(t) {
|
|
513
|
+
let e = M(t);
|
|
514
|
+
for (; P(e) && !_(e); ) {
|
|
515
|
+
if (yt(e))
|
|
515
516
|
return e;
|
|
516
|
-
if (
|
|
517
|
+
if (st(e))
|
|
517
518
|
return null;
|
|
518
|
-
e =
|
|
519
|
+
e = M(e);
|
|
519
520
|
}
|
|
520
521
|
return null;
|
|
521
522
|
}
|
|
522
|
-
function
|
|
523
|
+
function vt() {
|
|
523
524
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
524
525
|
}
|
|
525
|
-
const
|
|
526
|
-
function
|
|
527
|
-
return
|
|
526
|
+
const je = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
527
|
+
function _(t) {
|
|
528
|
+
return je.has(j(t));
|
|
528
529
|
}
|
|
529
530
|
function D(t) {
|
|
530
|
-
return
|
|
531
|
+
return R(t).getComputedStyle(t);
|
|
531
532
|
}
|
|
532
|
-
function
|
|
533
|
-
return
|
|
533
|
+
function ct(t) {
|
|
534
|
+
return L(t) ? {
|
|
534
535
|
scrollLeft: t.scrollLeft,
|
|
535
536
|
scrollTop: t.scrollTop
|
|
536
537
|
} : {
|
|
@@ -538,187 +539,187 @@ function at(t) {
|
|
|
538
539
|
scrollTop: t.scrollY
|
|
539
540
|
};
|
|
540
541
|
}
|
|
541
|
-
function
|
|
542
|
-
if (
|
|
542
|
+
function M(t) {
|
|
543
|
+
if (j(t) === "html")
|
|
543
544
|
return t;
|
|
544
545
|
const e = (
|
|
545
546
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
546
547
|
t.assignedSlot || // DOM Element detected.
|
|
547
548
|
t.parentNode || // ShadowRoot detected.
|
|
548
549
|
$t(t) && t.host || // Fallback.
|
|
549
|
-
|
|
550
|
+
k(t)
|
|
550
551
|
);
|
|
551
552
|
return $t(e) ? e.host : e;
|
|
552
553
|
}
|
|
553
554
|
function Yt(t) {
|
|
554
|
-
const e =
|
|
555
|
-
return
|
|
555
|
+
const e = M(t);
|
|
556
|
+
return _(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : P(e) && J(e) ? e : Yt(e);
|
|
556
557
|
}
|
|
557
|
-
function
|
|
558
|
+
function Z(t, e, n) {
|
|
558
559
|
var o;
|
|
559
560
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
560
|
-
const i = Yt(t),
|
|
561
|
-
if (
|
|
562
|
-
const
|
|
563
|
-
return e.concat(r, r.visualViewport || [],
|
|
561
|
+
const i = Yt(t), l = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = R(i);
|
|
562
|
+
if (l) {
|
|
563
|
+
const s = pt(r);
|
|
564
|
+
return e.concat(r, r.visualViewport || [], J(i) ? i : [], s && n ? Z(s) : []);
|
|
564
565
|
}
|
|
565
|
-
return e.concat(i,
|
|
566
|
+
return e.concat(i, Z(i, [], n));
|
|
566
567
|
}
|
|
567
|
-
function
|
|
568
|
+
function pt(t) {
|
|
568
569
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
569
570
|
}
|
|
570
571
|
function qt(t) {
|
|
571
572
|
const e = D(t);
|
|
572
573
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
573
|
-
const i =
|
|
574
|
-
return
|
|
574
|
+
const i = P(t), l = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, s = et(n) !== l || et(o) !== r;
|
|
575
|
+
return s && (n = l, o = r), {
|
|
575
576
|
width: n,
|
|
576
577
|
height: o,
|
|
577
|
-
$:
|
|
578
|
+
$: s
|
|
578
579
|
};
|
|
579
580
|
}
|
|
580
581
|
function xt(t) {
|
|
581
|
-
return
|
|
582
|
+
return L(t) ? t : t.contextElement;
|
|
582
583
|
}
|
|
583
|
-
function
|
|
584
|
+
function U(t) {
|
|
584
585
|
const e = xt(t);
|
|
585
|
-
if (!
|
|
586
|
-
return
|
|
586
|
+
if (!P(e))
|
|
587
|
+
return B(1);
|
|
587
588
|
const n = e.getBoundingClientRect(), {
|
|
588
589
|
width: o,
|
|
589
590
|
height: i,
|
|
590
|
-
$:
|
|
591
|
+
$: l
|
|
591
592
|
} = qt(e);
|
|
592
|
-
let r = (
|
|
593
|
-
return (!r || !Number.isFinite(r)) && (r = 1), (!
|
|
593
|
+
let r = (l ? et(n.width) : n.width) / o, s = (l ? et(n.height) : n.height) / i;
|
|
594
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
594
595
|
x: r,
|
|
595
|
-
y:
|
|
596
|
+
y: s
|
|
596
597
|
};
|
|
597
598
|
}
|
|
598
|
-
const
|
|
599
|
+
const Ye = /* @__PURE__ */ B(0);
|
|
599
600
|
function Ut(t) {
|
|
600
|
-
const e =
|
|
601
|
-
return !
|
|
601
|
+
const e = R(t);
|
|
602
|
+
return !vt() || !e.visualViewport ? Ye : {
|
|
602
603
|
x: e.visualViewport.offsetLeft,
|
|
603
604
|
y: e.visualViewport.offsetTop
|
|
604
605
|
};
|
|
605
606
|
}
|
|
606
|
-
function
|
|
607
|
-
return e === void 0 && (e = !1), !n || e && n !==
|
|
607
|
+
function qe(t, e, n) {
|
|
608
|
+
return e === void 0 && (e = !1), !n || e && n !== R(t) ? !1 : e;
|
|
608
609
|
}
|
|
609
|
-
function
|
|
610
|
+
function X(t, e, n, o) {
|
|
610
611
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
611
|
-
const i = t.getBoundingClientRect(),
|
|
612
|
-
let r =
|
|
613
|
-
e && (o ?
|
|
614
|
-
const
|
|
615
|
-
let
|
|
616
|
-
if (
|
|
617
|
-
const m =
|
|
618
|
-
let h = m,
|
|
619
|
-
for (;
|
|
620
|
-
const
|
|
621
|
-
|
|
612
|
+
const i = t.getBoundingClientRect(), l = xt(t);
|
|
613
|
+
let r = B(1);
|
|
614
|
+
e && (o ? L(o) && (r = U(o)) : r = U(t));
|
|
615
|
+
const s = qe(l, n, o) ? Ut(l) : B(0);
|
|
616
|
+
let c = (i.left + s.x) / r.x, a = (i.top + s.y) / r.y, f = i.width / r.x, u = i.height / r.y;
|
|
617
|
+
if (l) {
|
|
618
|
+
const m = R(l), d = o && L(o) ? R(o) : o;
|
|
619
|
+
let h = m, y = pt(h);
|
|
620
|
+
for (; y && o && d !== h; ) {
|
|
621
|
+
const v = U(y), g = y.getBoundingClientRect(), w = D(y), x = g.left + (y.clientLeft + parseFloat(w.paddingLeft)) * v.x, C = g.top + (y.clientTop + parseFloat(w.paddingTop)) * v.y;
|
|
622
|
+
c *= v.x, a *= v.y, f *= v.x, u *= v.y, c += x, a += C, h = R(y), y = pt(h);
|
|
622
623
|
}
|
|
623
624
|
}
|
|
624
|
-
return
|
|
625
|
-
width:
|
|
626
|
-
height:
|
|
627
|
-
x:
|
|
625
|
+
return ot({
|
|
626
|
+
width: f,
|
|
627
|
+
height: u,
|
|
628
|
+
x: c,
|
|
628
629
|
y: a
|
|
629
630
|
});
|
|
630
631
|
}
|
|
631
|
-
function
|
|
632
|
-
const n =
|
|
633
|
-
return e ? e.left + n :
|
|
632
|
+
function at(t, e) {
|
|
633
|
+
const n = ct(t).scrollLeft;
|
|
634
|
+
return e ? e.left + n : X(k(t)).left + n;
|
|
634
635
|
}
|
|
635
636
|
function _t(t, e) {
|
|
636
|
-
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft -
|
|
637
|
+
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - at(t, n), i = n.top + e.scrollTop;
|
|
637
638
|
return {
|
|
638
639
|
x: o,
|
|
639
640
|
y: i
|
|
640
641
|
};
|
|
641
642
|
}
|
|
642
|
-
function
|
|
643
|
+
function Ue(t) {
|
|
643
644
|
let {
|
|
644
645
|
elements: e,
|
|
645
646
|
rect: n,
|
|
646
647
|
offsetParent: o,
|
|
647
648
|
strategy: i
|
|
648
649
|
} = t;
|
|
649
|
-
const
|
|
650
|
-
if (o === r ||
|
|
650
|
+
const l = i === "fixed", r = k(o), s = e ? st(e.floating) : !1;
|
|
651
|
+
if (o === r || s && l)
|
|
651
652
|
return n;
|
|
652
|
-
let
|
|
653
|
+
let c = {
|
|
653
654
|
scrollLeft: 0,
|
|
654
655
|
scrollTop: 0
|
|
655
|
-
}, a =
|
|
656
|
-
const
|
|
657
|
-
if ((
|
|
658
|
-
const d =
|
|
659
|
-
a =
|
|
656
|
+
}, a = B(1);
|
|
657
|
+
const f = B(0), u = P(o);
|
|
658
|
+
if ((u || !u && !l) && ((j(o) !== "body" || J(r)) && (c = ct(o)), P(o))) {
|
|
659
|
+
const d = X(o);
|
|
660
|
+
a = U(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
|
|
660
661
|
}
|
|
661
|
-
const m = r && !
|
|
662
|
+
const m = r && !u && !l ? _t(r, c) : B(0);
|
|
662
663
|
return {
|
|
663
664
|
width: n.width * a.x,
|
|
664
665
|
height: n.height * a.y,
|
|
665
|
-
x: n.x * a.x -
|
|
666
|
-
y: n.y * a.y -
|
|
666
|
+
x: n.x * a.x - c.scrollLeft * a.x + f.x + m.x,
|
|
667
|
+
y: n.y * a.y - c.scrollTop * a.y + f.y + m.y
|
|
667
668
|
};
|
|
668
669
|
}
|
|
669
|
-
function
|
|
670
|
+
function _e(t) {
|
|
670
671
|
return Array.from(t.getClientRects());
|
|
671
672
|
}
|
|
672
|
-
function
|
|
673
|
-
const e =
|
|
674
|
-
let r = -n.scrollLeft +
|
|
675
|
-
const
|
|
676
|
-
return D(o).direction === "rtl" && (r +=
|
|
673
|
+
function Ge(t) {
|
|
674
|
+
const e = k(t), n = ct(t), o = t.ownerDocument.body, i = I(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), l = I(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
675
|
+
let r = -n.scrollLeft + at(t);
|
|
676
|
+
const s = -n.scrollTop;
|
|
677
|
+
return D(o).direction === "rtl" && (r += I(e.clientWidth, o.clientWidth) - i), {
|
|
677
678
|
width: i,
|
|
678
|
-
height:
|
|
679
|
+
height: l,
|
|
679
680
|
x: r,
|
|
680
|
-
y:
|
|
681
|
+
y: s
|
|
681
682
|
};
|
|
682
683
|
}
|
|
683
684
|
const Ft = 25;
|
|
684
|
-
function
|
|
685
|
-
const n =
|
|
686
|
-
let
|
|
685
|
+
function Ke(t, e) {
|
|
686
|
+
const n = R(t), o = k(t), i = n.visualViewport;
|
|
687
|
+
let l = o.clientWidth, r = o.clientHeight, s = 0, c = 0;
|
|
687
688
|
if (i) {
|
|
688
|
-
|
|
689
|
-
const
|
|
690
|
-
(!
|
|
689
|
+
l = i.width, r = i.height;
|
|
690
|
+
const f = vt();
|
|
691
|
+
(!f || f && e === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
691
692
|
}
|
|
692
|
-
const a =
|
|
693
|
+
const a = at(o);
|
|
693
694
|
if (a <= 0) {
|
|
694
|
-
const
|
|
695
|
-
h <= Ft && (
|
|
696
|
-
} else a <= Ft && (
|
|
695
|
+
const f = o.ownerDocument, u = f.body, m = getComputedStyle(u), d = f.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - u.clientWidth - d);
|
|
696
|
+
h <= Ft && (l -= h);
|
|
697
|
+
} else a <= Ft && (l += a);
|
|
697
698
|
return {
|
|
698
|
-
width:
|
|
699
|
+
width: l,
|
|
699
700
|
height: r,
|
|
700
|
-
x:
|
|
701
|
-
y:
|
|
701
|
+
x: s,
|
|
702
|
+
y: c
|
|
702
703
|
};
|
|
703
704
|
}
|
|
704
|
-
const
|
|
705
|
-
function
|
|
706
|
-
const n =
|
|
705
|
+
const Ze = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
706
|
+
function Je(t, e) {
|
|
707
|
+
const n = X(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, l = P(t) ? U(t) : B(1), r = t.clientWidth * l.x, s = t.clientHeight * l.y, c = i * l.x, a = o * l.y;
|
|
707
708
|
return {
|
|
708
709
|
width: r,
|
|
709
|
-
height:
|
|
710
|
-
x:
|
|
710
|
+
height: s,
|
|
711
|
+
x: c,
|
|
711
712
|
y: a
|
|
712
713
|
};
|
|
713
714
|
}
|
|
714
715
|
function Mt(t, e, n) {
|
|
715
716
|
let o;
|
|
716
717
|
if (e === "viewport")
|
|
717
|
-
o =
|
|
718
|
+
o = Ke(t, n);
|
|
718
719
|
else if (e === "document")
|
|
719
|
-
o =
|
|
720
|
-
else if (
|
|
721
|
-
o =
|
|
720
|
+
o = Ge(k(t));
|
|
721
|
+
else if (L(e))
|
|
722
|
+
o = Je(e, n);
|
|
722
723
|
else {
|
|
723
724
|
const i = Ut(t);
|
|
724
725
|
o = {
|
|
@@ -728,44 +729,44 @@ function Mt(t, e, n) {
|
|
|
728
729
|
height: e.height
|
|
729
730
|
};
|
|
730
731
|
}
|
|
731
|
-
return
|
|
732
|
+
return ot(o);
|
|
732
733
|
}
|
|
733
734
|
function Gt(t, e) {
|
|
734
|
-
const n =
|
|
735
|
-
return n === e || !
|
|
735
|
+
const n = M(t);
|
|
736
|
+
return n === e || !L(n) || _(n) ? !1 : D(n).position === "fixed" || Gt(n, e);
|
|
736
737
|
}
|
|
737
|
-
function
|
|
738
|
+
function Qe(t, e) {
|
|
738
739
|
const n = e.get(t);
|
|
739
740
|
if (n)
|
|
740
741
|
return n;
|
|
741
|
-
let o =
|
|
742
|
-
const
|
|
743
|
-
let r =
|
|
744
|
-
for (;
|
|
745
|
-
const
|
|
746
|
-
!
|
|
742
|
+
let o = Z(t, [], !1).filter((s) => L(s) && j(s) !== "body"), i = null;
|
|
743
|
+
const l = D(t).position === "fixed";
|
|
744
|
+
let r = l ? M(t) : t;
|
|
745
|
+
for (; L(r) && !_(r); ) {
|
|
746
|
+
const s = D(r), c = yt(r);
|
|
747
|
+
!c && s.position === "fixed" && (i = null), (l ? !c && !i : !c && s.position === "static" && !!i && Ze.has(i.position) || J(r) && !c && Gt(t, r)) ? o = o.filter((f) => f !== r) : i = s, r = M(r);
|
|
747
748
|
}
|
|
748
749
|
return e.set(t, o), o;
|
|
749
750
|
}
|
|
750
|
-
function
|
|
751
|
+
function tn(t) {
|
|
751
752
|
let {
|
|
752
753
|
element: e,
|
|
753
754
|
boundary: n,
|
|
754
755
|
rootBoundary: o,
|
|
755
756
|
strategy: i
|
|
756
757
|
} = t;
|
|
757
|
-
const r = [...n === "clippingAncestors" ?
|
|
758
|
-
const
|
|
759
|
-
return a.top =
|
|
760
|
-
}, Mt(e,
|
|
758
|
+
const r = [...n === "clippingAncestors" ? st(e) ? [] : Qe(e, this._c) : [].concat(n), o], s = r[0], c = r.reduce((a, f) => {
|
|
759
|
+
const u = Mt(e, f, i);
|
|
760
|
+
return a.top = I(u.top, a.top), a.right = tt(u.right, a.right), a.bottom = tt(u.bottom, a.bottom), a.left = I(u.left, a.left), a;
|
|
761
|
+
}, Mt(e, s, i));
|
|
761
762
|
return {
|
|
762
|
-
width:
|
|
763
|
-
height:
|
|
764
|
-
x:
|
|
765
|
-
y:
|
|
763
|
+
width: c.right - c.left,
|
|
764
|
+
height: c.bottom - c.top,
|
|
765
|
+
x: c.left,
|
|
766
|
+
y: c.top
|
|
766
767
|
};
|
|
767
768
|
}
|
|
768
|
-
function
|
|
769
|
+
function en(t) {
|
|
769
770
|
const {
|
|
770
771
|
width: e,
|
|
771
772
|
height: n
|
|
@@ -775,25 +776,25 @@ function tn(t) {
|
|
|
775
776
|
height: n
|
|
776
777
|
};
|
|
777
778
|
}
|
|
778
|
-
function
|
|
779
|
-
const o =
|
|
780
|
-
let
|
|
779
|
+
function nn(t, e, n) {
|
|
780
|
+
const o = P(e), i = k(e), l = n === "fixed", r = X(t, !0, l, e);
|
|
781
|
+
let s = {
|
|
781
782
|
scrollLeft: 0,
|
|
782
783
|
scrollTop: 0
|
|
783
784
|
};
|
|
784
|
-
const
|
|
785
|
+
const c = B(0);
|
|
785
786
|
function a() {
|
|
786
|
-
|
|
787
|
+
c.x = at(i);
|
|
787
788
|
}
|
|
788
|
-
if (o || !o && !
|
|
789
|
-
if ((
|
|
790
|
-
const d =
|
|
791
|
-
|
|
789
|
+
if (o || !o && !l)
|
|
790
|
+
if ((j(e) !== "body" || J(i)) && (s = ct(e)), o) {
|
|
791
|
+
const d = X(e, !0, l, e);
|
|
792
|
+
c.x = d.x + e.clientLeft, c.y = d.y + e.clientTop;
|
|
792
793
|
} else i && a();
|
|
793
|
-
|
|
794
|
-
const
|
|
794
|
+
l && !o && i && a();
|
|
795
|
+
const f = i && !o && !l ? _t(i, s) : B(0), u = r.left + s.scrollLeft - c.x - f.x, m = r.top + s.scrollTop - c.y - f.y;
|
|
795
796
|
return {
|
|
796
|
-
x:
|
|
797
|
+
x: u,
|
|
797
798
|
y: m,
|
|
798
799
|
width: r.width,
|
|
799
800
|
height: r.height
|
|
@@ -803,35 +804,35 @@ function ht(t) {
|
|
|
803
804
|
return D(t).position === "static";
|
|
804
805
|
}
|
|
805
806
|
function zt(t, e) {
|
|
806
|
-
if (!
|
|
807
|
+
if (!P(t) || D(t).position === "fixed")
|
|
807
808
|
return null;
|
|
808
809
|
if (e)
|
|
809
810
|
return e(t);
|
|
810
811
|
let n = t.offsetParent;
|
|
811
|
-
return
|
|
812
|
+
return k(t) === n && (n = n.ownerDocument.body), n;
|
|
812
813
|
}
|
|
813
814
|
function Kt(t, e) {
|
|
814
|
-
const n =
|
|
815
|
-
if (
|
|
815
|
+
const n = R(t);
|
|
816
|
+
if (st(t))
|
|
816
817
|
return n;
|
|
817
|
-
if (!
|
|
818
|
-
let i =
|
|
819
|
-
for (; i && !
|
|
820
|
-
if (
|
|
818
|
+
if (!P(t)) {
|
|
819
|
+
let i = M(t);
|
|
820
|
+
for (; i && !_(i); ) {
|
|
821
|
+
if (L(i) && !ht(i))
|
|
821
822
|
return i;
|
|
822
|
-
i =
|
|
823
|
+
i = M(i);
|
|
823
824
|
}
|
|
824
825
|
return n;
|
|
825
826
|
}
|
|
826
827
|
let o = zt(t, e);
|
|
827
|
-
for (; o &&
|
|
828
|
+
for (; o && ze(o) && ht(o); )
|
|
828
829
|
o = zt(o, e);
|
|
829
|
-
return o &&
|
|
830
|
+
return o && _(o) && ht(o) && !yt(o) ? n : o || Xe(t) || n;
|
|
830
831
|
}
|
|
831
|
-
const
|
|
832
|
+
const on = async function(t) {
|
|
832
833
|
const e = this.getOffsetParent || Kt, n = this.getDimensions, o = await n(t.floating);
|
|
833
834
|
return {
|
|
834
|
-
reference:
|
|
835
|
+
reference: nn(t.reference, await e(t.floating), t.strategy),
|
|
835
836
|
floating: {
|
|
836
837
|
x: 0,
|
|
837
838
|
y: 0,
|
|
@@ -840,56 +841,56 @@ const nn = async function(t) {
|
|
|
840
841
|
}
|
|
841
842
|
};
|
|
842
843
|
};
|
|
843
|
-
function
|
|
844
|
+
function rn(t) {
|
|
844
845
|
return D(t).direction === "rtl";
|
|
845
846
|
}
|
|
846
|
-
const
|
|
847
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
848
|
-
getDocumentElement:
|
|
849
|
-
getClippingRect:
|
|
847
|
+
const ln = {
|
|
848
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ue,
|
|
849
|
+
getDocumentElement: k,
|
|
850
|
+
getClippingRect: tn,
|
|
850
851
|
getOffsetParent: Kt,
|
|
851
|
-
getElementRects:
|
|
852
|
-
getClientRects:
|
|
853
|
-
getDimensions:
|
|
854
|
-
getScale:
|
|
855
|
-
isElement:
|
|
856
|
-
isRTL:
|
|
852
|
+
getElementRects: on,
|
|
853
|
+
getClientRects: _e,
|
|
854
|
+
getDimensions: en,
|
|
855
|
+
getScale: U,
|
|
856
|
+
isElement: L,
|
|
857
|
+
isRTL: rn
|
|
857
858
|
};
|
|
858
859
|
function Zt(t, e) {
|
|
859
860
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
860
861
|
}
|
|
861
862
|
function sn(t, e) {
|
|
862
863
|
let n = null, o;
|
|
863
|
-
const i =
|
|
864
|
-
function
|
|
865
|
-
var
|
|
866
|
-
clearTimeout(o), (
|
|
864
|
+
const i = k(t);
|
|
865
|
+
function l() {
|
|
866
|
+
var s;
|
|
867
|
+
clearTimeout(o), (s = n) == null || s.disconnect(), n = null;
|
|
867
868
|
}
|
|
868
|
-
function r(
|
|
869
|
-
|
|
869
|
+
function r(s, c) {
|
|
870
|
+
s === void 0 && (s = !1), c === void 0 && (c = 1), l();
|
|
870
871
|
const a = t.getBoundingClientRect(), {
|
|
871
|
-
left:
|
|
872
|
-
top:
|
|
872
|
+
left: f,
|
|
873
|
+
top: u,
|
|
873
874
|
width: m,
|
|
874
875
|
height: d
|
|
875
876
|
} = a;
|
|
876
|
-
if (
|
|
877
|
+
if (s || e(), !m || !d)
|
|
877
878
|
return;
|
|
878
|
-
const h =
|
|
879
|
-
rootMargin: -h + "px " + -
|
|
880
|
-
threshold:
|
|
879
|
+
const h = Q(u), y = Q(i.clientWidth - (f + m)), v = Q(i.clientHeight - (u + d)), g = Q(f), x = {
|
|
880
|
+
rootMargin: -h + "px " + -y + "px " + -v + "px " + -g + "px",
|
|
881
|
+
threshold: I(0, tt(1, c)) || 1
|
|
881
882
|
};
|
|
882
883
|
let C = !0;
|
|
883
884
|
function b(T) {
|
|
884
|
-
const
|
|
885
|
-
if (
|
|
885
|
+
const p = T[0].intersectionRatio;
|
|
886
|
+
if (p !== c) {
|
|
886
887
|
if (!C)
|
|
887
888
|
return r();
|
|
888
|
-
|
|
889
|
+
p ? r(!1, p) : o = setTimeout(() => {
|
|
889
890
|
r(!1, 1e-7);
|
|
890
891
|
}, 1e3);
|
|
891
892
|
}
|
|
892
|
-
|
|
893
|
+
p === 1 && !Zt(a, t.getBoundingClientRect()) && r(), C = !1;
|
|
893
894
|
}
|
|
894
895
|
try {
|
|
895
896
|
n = new IntersectionObserver(b, {
|
|
@@ -902,69 +903,69 @@ function sn(t, e) {
|
|
|
902
903
|
}
|
|
903
904
|
n.observe(t);
|
|
904
905
|
}
|
|
905
|
-
return r(!0),
|
|
906
|
+
return r(!0), l;
|
|
906
907
|
}
|
|
907
|
-
function
|
|
908
|
+
function cn(t, e, n, o) {
|
|
908
909
|
o === void 0 && (o = {});
|
|
909
910
|
const {
|
|
910
911
|
ancestorScroll: i = !0,
|
|
911
|
-
ancestorResize:
|
|
912
|
+
ancestorResize: l = !0,
|
|
912
913
|
elementResize: r = typeof ResizeObserver == "function",
|
|
913
|
-
layoutShift:
|
|
914
|
-
animationFrame:
|
|
915
|
-
} = o, a = xt(t),
|
|
916
|
-
|
|
917
|
-
i &&
|
|
914
|
+
layoutShift: s = typeof IntersectionObserver == "function",
|
|
915
|
+
animationFrame: c = !1
|
|
916
|
+
} = o, a = xt(t), f = i || l ? [...a ? Z(a) : [], ...Z(e)] : [];
|
|
917
|
+
f.forEach((g) => {
|
|
918
|
+
i && g.addEventListener("scroll", n, {
|
|
918
919
|
passive: !0
|
|
919
|
-
}),
|
|
920
|
+
}), l && g.addEventListener("resize", n);
|
|
920
921
|
});
|
|
921
|
-
const
|
|
922
|
+
const u = a && s ? sn(a, n) : null;
|
|
922
923
|
let m = -1, d = null;
|
|
923
|
-
r && (d = new ResizeObserver((
|
|
924
|
-
let [
|
|
925
|
-
|
|
924
|
+
r && (d = new ResizeObserver((g) => {
|
|
925
|
+
let [w] = g;
|
|
926
|
+
w && w.target === a && d && (d.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
926
927
|
var x;
|
|
927
928
|
(x = d) == null || x.observe(e);
|
|
928
929
|
})), n();
|
|
929
|
-
}), a && !
|
|
930
|
-
let h,
|
|
931
|
-
|
|
932
|
-
function
|
|
933
|
-
const
|
|
934
|
-
|
|
930
|
+
}), a && !c && d.observe(a), d.observe(e));
|
|
931
|
+
let h, y = c ? X(t) : null;
|
|
932
|
+
c && v();
|
|
933
|
+
function v() {
|
|
934
|
+
const g = X(t);
|
|
935
|
+
y && !Zt(y, g) && n(), y = g, h = requestAnimationFrame(v);
|
|
935
936
|
}
|
|
936
937
|
return n(), () => {
|
|
937
|
-
var
|
|
938
|
-
|
|
939
|
-
i &&
|
|
940
|
-
}),
|
|
938
|
+
var g;
|
|
939
|
+
f.forEach((w) => {
|
|
940
|
+
i && w.removeEventListener("scroll", n), l && w.removeEventListener("resize", n);
|
|
941
|
+
}), u?.(), (g = d) == null || g.disconnect(), d = null, c && cancelAnimationFrame(h);
|
|
941
942
|
};
|
|
942
943
|
}
|
|
943
|
-
const
|
|
944
|
+
const an = Ve, fn = $e, un = Be, dn = (t, e, n) => {
|
|
944
945
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
945
|
-
platform:
|
|
946
|
+
platform: ln,
|
|
946
947
|
...n
|
|
947
|
-
},
|
|
948
|
+
}, l = {
|
|
948
949
|
...i.platform,
|
|
949
950
|
_c: o
|
|
950
951
|
};
|
|
951
|
-
return
|
|
952
|
+
return Te(t, e, {
|
|
952
953
|
...i,
|
|
953
|
-
platform:
|
|
954
|
+
platform: l
|
|
954
955
|
});
|
|
955
956
|
};
|
|
956
|
-
function
|
|
957
|
+
function mn(t) {
|
|
957
958
|
return t != null && typeof t == "object" && "$el" in t;
|
|
958
959
|
}
|
|
959
960
|
function Ht(t) {
|
|
960
|
-
if (
|
|
961
|
+
if (mn(t)) {
|
|
961
962
|
const e = t.$el;
|
|
962
|
-
return
|
|
963
|
+
return wt(e) && j(e) === "#comment" ? null : e;
|
|
963
964
|
}
|
|
964
965
|
return t;
|
|
965
966
|
}
|
|
966
|
-
function
|
|
967
|
-
return typeof t == "function" ? t() :
|
|
967
|
+
function K(t) {
|
|
968
|
+
return typeof t == "function" ? t() : A(t);
|
|
968
969
|
}
|
|
969
970
|
function Jt(t) {
|
|
970
971
|
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
@@ -973,131 +974,88 @@ function Wt(t, e) {
|
|
|
973
974
|
const n = Jt(t);
|
|
974
975
|
return Math.round(e * n) / n;
|
|
975
976
|
}
|
|
976
|
-
function
|
|
977
|
+
function hn(t, e, n) {
|
|
977
978
|
n === void 0 && (n = {});
|
|
978
979
|
const o = n.whileElementsMounted, i = V(() => {
|
|
979
|
-
var
|
|
980
|
-
return (
|
|
981
|
-
}),
|
|
982
|
-
var
|
|
983
|
-
return (
|
|
980
|
+
var p;
|
|
981
|
+
return (p = K(n.open)) != null ? p : !0;
|
|
982
|
+
}), l = V(() => K(n.middleware)), r = V(() => {
|
|
983
|
+
var p;
|
|
984
|
+
return (p = K(n.placement)) != null ? p : "bottom";
|
|
985
|
+
}), s = V(() => {
|
|
986
|
+
var p;
|
|
987
|
+
return (p = K(n.strategy)) != null ? p : "absolute";
|
|
984
988
|
}), c = V(() => {
|
|
985
|
-
var
|
|
986
|
-
return (
|
|
987
|
-
}),
|
|
988
|
-
|
|
989
|
-
return (g = Z(n.transform)) != null ? g : !0;
|
|
990
|
-
}), a = V(() => Ht(t.value)), u = V(() => Ht(e.value)), f = L(0), m = L(0), d = L(c.value), h = L(r.value), v = te({}), y = L(!1), w = V(() => {
|
|
991
|
-
const g = {
|
|
989
|
+
var p;
|
|
990
|
+
return (p = K(n.transform)) != null ? p : !0;
|
|
991
|
+
}), a = V(() => Ht(t.value)), f = V(() => Ht(e.value)), u = E(0), m = E(0), d = E(s.value), h = E(r.value), y = te({}), v = E(!1), g = V(() => {
|
|
992
|
+
const p = {
|
|
992
993
|
position: d.value,
|
|
993
994
|
left: "0",
|
|
994
995
|
top: "0"
|
|
995
996
|
};
|
|
996
|
-
if (!
|
|
997
|
-
return
|
|
998
|
-
const
|
|
999
|
-
return
|
|
1000
|
-
...
|
|
1001
|
-
transform: "translate(" +
|
|
1002
|
-
...Jt(
|
|
997
|
+
if (!f.value)
|
|
998
|
+
return p;
|
|
999
|
+
const S = Wt(f.value, u.value), z = Wt(f.value, m.value);
|
|
1000
|
+
return c.value ? {
|
|
1001
|
+
...p,
|
|
1002
|
+
transform: "translate(" + S + "px, " + z + "px)",
|
|
1003
|
+
...Jt(f.value) >= 1.5 && {
|
|
1003
1004
|
willChange: "transform"
|
|
1004
1005
|
}
|
|
1005
1006
|
} : {
|
|
1006
1007
|
position: d.value,
|
|
1007
|
-
left:
|
|
1008
|
-
top:
|
|
1008
|
+
left: S + "px",
|
|
1009
|
+
top: z + "px"
|
|
1009
1010
|
};
|
|
1010
1011
|
});
|
|
1011
|
-
let
|
|
1012
|
+
let w;
|
|
1012
1013
|
function x() {
|
|
1013
|
-
if (a.value == null ||
|
|
1014
|
+
if (a.value == null || f.value == null)
|
|
1014
1015
|
return;
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1017
|
-
middleware:
|
|
1016
|
+
const p = i.value;
|
|
1017
|
+
dn(a.value, f.value, {
|
|
1018
|
+
middleware: l.value,
|
|
1018
1019
|
placement: r.value,
|
|
1019
|
-
strategy:
|
|
1020
|
-
}).then((
|
|
1021
|
-
|
|
1020
|
+
strategy: s.value
|
|
1021
|
+
}).then((S) => {
|
|
1022
|
+
u.value = S.x, m.value = S.y, d.value = S.strategy, h.value = S.placement, y.value = S.middlewareData, v.value = p !== !1;
|
|
1022
1023
|
});
|
|
1023
1024
|
}
|
|
1024
1025
|
function C() {
|
|
1025
|
-
typeof
|
|
1026
|
+
typeof w == "function" && (w(), w = void 0);
|
|
1026
1027
|
}
|
|
1027
1028
|
function b() {
|
|
1028
1029
|
if (C(), o === void 0) {
|
|
1029
1030
|
x();
|
|
1030
1031
|
return;
|
|
1031
1032
|
}
|
|
1032
|
-
if (a.value != null &&
|
|
1033
|
-
|
|
1033
|
+
if (a.value != null && f.value != null) {
|
|
1034
|
+
w = o(a.value, f.value, x);
|
|
1034
1035
|
return;
|
|
1035
1036
|
}
|
|
1036
1037
|
}
|
|
1037
1038
|
function T() {
|
|
1038
|
-
i.value || (
|
|
1039
|
+
i.value || (v.value = !1);
|
|
1039
1040
|
}
|
|
1040
|
-
return
|
|
1041
|
+
return ut([l, r, s, i], x, {
|
|
1041
1042
|
flush: "sync"
|
|
1042
|
-
}),
|
|
1043
|
+
}), ut([a, f], b, {
|
|
1043
1044
|
flush: "sync"
|
|
1044
|
-
}),
|
|
1045
|
+
}), ut(i, T, {
|
|
1045
1046
|
flush: "sync"
|
|
1046
1047
|
}), ee() && ne(C), {
|
|
1047
|
-
x:
|
|
1048
|
-
y:
|
|
1049
|
-
strategy:
|
|
1050
|
-
placement:
|
|
1051
|
-
middlewareData:
|
|
1052
|
-
isPositioned:
|
|
1053
|
-
floatingStyles:
|
|
1048
|
+
x: q(u),
|
|
1049
|
+
y: q(m),
|
|
1050
|
+
strategy: q(d),
|
|
1051
|
+
placement: q(h),
|
|
1052
|
+
middlewareData: q(y),
|
|
1053
|
+
isPositioned: q(v),
|
|
1054
|
+
floatingStyles: g,
|
|
1054
1055
|
update: x
|
|
1055
1056
|
};
|
|
1056
1057
|
}
|
|
1057
|
-
const
|
|
1058
|
-
triggerElem: t,
|
|
1059
|
-
dropdownRef: e,
|
|
1060
|
-
openDropdownHandler: n,
|
|
1061
|
-
closeDropdownHandler: o
|
|
1062
|
-
}) => {
|
|
1063
|
-
const i = L(!1), s = L(), r = () => {
|
|
1064
|
-
try {
|
|
1065
|
-
i.value = !i.value, i.value && F && (s.value = window.setTimeout(() => {
|
|
1066
|
-
window.removeEventListener("click", l), window.removeEventListener("keyup", l), window.addEventListener("click", l), window.addEventListener("keyup", l);
|
|
1067
|
-
}, 100)), n?.();
|
|
1068
|
-
} catch (f) {
|
|
1069
|
-
console.error(f);
|
|
1070
|
-
}
|
|
1071
|
-
}, c = (f) => {
|
|
1072
|
-
try {
|
|
1073
|
-
const m = f?.target, d = t?.value, h = e?.value;
|
|
1074
|
-
return F && d && h && !d.contains(m) && !h.contains(m) ? !0 : void 0;
|
|
1075
|
-
} catch (m) {
|
|
1076
|
-
console.error(m);
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
}, l = (f) => {
|
|
1080
|
-
try {
|
|
1081
|
-
c(f) && (F && (window.removeEventListener("click", l), window.removeEventListener("keyup", l)), i.value = !1, o?.());
|
|
1082
|
-
} catch (m) {
|
|
1083
|
-
console.error(m);
|
|
1084
|
-
}
|
|
1085
|
-
};
|
|
1086
|
-
return {
|
|
1087
|
-
open: i,
|
|
1088
|
-
toggleDropdown: r,
|
|
1089
|
-
closeDropdown: () => {
|
|
1090
|
-
try {
|
|
1091
|
-
F && (window.removeEventListener("click", l), window.removeEventListener("keyup", l)), i.value = !1, o?.();
|
|
1092
|
-
} catch (f) {
|
|
1093
|
-
console.error(f);
|
|
1094
|
-
}
|
|
1095
|
-
},
|
|
1096
|
-
clearEventListeners: () => {
|
|
1097
|
-
F && (s.value && window.clearTimeout(s.value), window.removeEventListener("click", l), window.removeEventListener("keyup", l));
|
|
1098
|
-
}
|
|
1099
|
-
};
|
|
1100
|
-
}, wn = ["data-testid"], gn = ["id", "aria-labelledby", "aria-hidden"], En = /* @__PURE__ */ oe({
|
|
1058
|
+
const gn = ["data-testid"], pn = ["id", "aria-labelledby", "aria-hidden"], Rn = /* @__PURE__ */ oe({
|
|
1101
1059
|
name: "CLDropdownMenu",
|
|
1102
1060
|
__name: "CLDropdownMenu",
|
|
1103
1061
|
props: {
|
|
@@ -1105,7 +1063,7 @@ const hn = ({
|
|
|
1105
1063
|
buttonBorderRadius: {},
|
|
1106
1064
|
buttonColor: { default: Tt.Secondary },
|
|
1107
1065
|
buttonHeight: { default: "auto" },
|
|
1108
|
-
buttonSize: { default:
|
|
1066
|
+
buttonSize: { default: ye.Small },
|
|
1109
1067
|
buttonVariant: { default: Dt.Soft },
|
|
1110
1068
|
buttonWidth: { default: "auto" },
|
|
1111
1069
|
buttonWrapped: { type: Boolean },
|
|
@@ -1114,66 +1072,66 @@ const hn = ({
|
|
|
1114
1072
|
containerElevated: { type: Boolean, default: !1 },
|
|
1115
1073
|
contentWidth: { default: "auto" },
|
|
1116
1074
|
dropdownId: {},
|
|
1117
|
-
iconAfter: { default:
|
|
1118
|
-
iconAfterSize: { default:
|
|
1075
|
+
iconAfter: { default: we.ChevronDown },
|
|
1076
|
+
iconAfterSize: { default: Lt.Tiny },
|
|
1119
1077
|
iconBefore: {},
|
|
1120
|
-
iconSize: { default:
|
|
1078
|
+
iconSize: { default: Lt.Tiny },
|
|
1121
1079
|
isOpen: { type: Boolean, default: !1 },
|
|
1122
1080
|
label: {},
|
|
1123
1081
|
onCloseHandler: {},
|
|
1124
1082
|
onOpenHandler: {},
|
|
1125
|
-
placement: { default:
|
|
1083
|
+
placement: { default: pe.BottomStart },
|
|
1126
1084
|
testId: { default: "clll-dropdown-menu" },
|
|
1127
1085
|
zIndex: { default: 30 }
|
|
1128
1086
|
},
|
|
1129
1087
|
setup(t) {
|
|
1130
|
-
ie((
|
|
1131
|
-
v69f60b10:
|
|
1088
|
+
ie((p) => ({
|
|
1089
|
+
v69f60b10: A(a)
|
|
1132
1090
|
}));
|
|
1133
1091
|
const e = t;
|
|
1134
|
-
let n =
|
|
1135
|
-
const i =
|
|
1136
|
-
|
|
1137
|
-
},
|
|
1138
|
-
r.value = !0, e?.onOpenHandler?.(), C(),
|
|
1092
|
+
let n = E(), o = E();
|
|
1093
|
+
const i = E(), l = E(), r = E(e.isOpen), s = E(e.placement), c = "clll-dropdown-menu", a = V(() => e.zIndex === "auto" || me(e.zIndex) ? e.zIndex : e.zIndex.toString()), f = () => {
|
|
1094
|
+
y.value ? u() : m();
|
|
1095
|
+
}, u = () => {
|
|
1096
|
+
r.value = !0, e?.onOpenHandler?.(), C(), mt && window.document.addEventListener("click", b);
|
|
1139
1097
|
}, m = () => {
|
|
1140
|
-
r.value = !1, e?.onCloseHandler?.(),
|
|
1141
|
-
}, d = (
|
|
1142
|
-
|
|
1143
|
-
}, h = (
|
|
1144
|
-
|
|
1098
|
+
r.value = !1, e?.onCloseHandler?.(), mt && window.document.removeEventListener("click", b), T(), w();
|
|
1099
|
+
}, d = (p) => {
|
|
1100
|
+
p && (n.value = p);
|
|
1101
|
+
}, h = (p) => {
|
|
1102
|
+
p && (o.value = p);
|
|
1145
1103
|
}, {
|
|
1146
|
-
open:
|
|
1147
|
-
toggleDropdown:
|
|
1148
|
-
closeDropdown:
|
|
1149
|
-
clearEventListeners:
|
|
1150
|
-
} =
|
|
1104
|
+
open: y,
|
|
1105
|
+
toggleDropdown: v,
|
|
1106
|
+
closeDropdown: g,
|
|
1107
|
+
clearEventListeners: w
|
|
1108
|
+
} = he({
|
|
1151
1109
|
triggerElem: n,
|
|
1152
|
-
dropdownRef:
|
|
1153
|
-
openDropdownHandler:
|
|
1110
|
+
dropdownRef: l,
|
|
1111
|
+
openDropdownHandler: f,
|
|
1154
1112
|
closeDropdownHandler: m
|
|
1155
|
-
}), { floatingStyles: x, update: C } =
|
|
1156
|
-
middleware: [
|
|
1157
|
-
placement:
|
|
1113
|
+
}), { floatingStyles: x, update: C } = hn(i, l, {
|
|
1114
|
+
middleware: [un(), an(10), fn()],
|
|
1115
|
+
placement: s,
|
|
1158
1116
|
open: r,
|
|
1159
|
-
whileElementsMounted:
|
|
1160
|
-
}), b = (
|
|
1161
|
-
r.value &&
|
|
1162
|
-
}, { clearEventListeners: T } =
|
|
1117
|
+
whileElementsMounted: cn
|
|
1118
|
+
}), b = (p) => {
|
|
1119
|
+
r.value && l.value?.contains(p?.target) && g();
|
|
1120
|
+
}, { clearEventListeners: T } = ge({ escHandler: g, triggerElem: n });
|
|
1163
1121
|
return re(() => {
|
|
1164
|
-
|
|
1165
|
-
}), (
|
|
1166
|
-
class:
|
|
1122
|
+
mt && window.document.removeEventListener("click", b), T(), w();
|
|
1123
|
+
}), (p, S) => (At(), Rt("div", {
|
|
1124
|
+
class: dt([`${c}__menu`]),
|
|
1167
1125
|
"data-testid": t.testId
|
|
1168
1126
|
}, [
|
|
1169
|
-
|
|
1170
|
-
id: `${
|
|
1127
|
+
Ot(A(ue), {
|
|
1128
|
+
id: `${c}__toggle--${t.dropdownId}`,
|
|
1171
1129
|
ref_key: "anchor",
|
|
1172
1130
|
ref: i,
|
|
1173
|
-
"aria-controls": `${
|
|
1174
|
-
"aria-expanded":
|
|
1131
|
+
"aria-controls": `${c}--${t.dropdownId}`,
|
|
1132
|
+
"aria-expanded": A(r) || t.isOpen,
|
|
1175
1133
|
"aria-label": t.buttonAriaLabel,
|
|
1176
|
-
class:
|
|
1134
|
+
class: dt(`${c}__toggle`),
|
|
1177
1135
|
color: t.buttonColor,
|
|
1178
1136
|
"border-radius": t.buttonBorderRadius,
|
|
1179
1137
|
"forward-ref": d,
|
|
@@ -1183,51 +1141,51 @@ const hn = ({
|
|
|
1183
1141
|
"icon-size": t.iconSize,
|
|
1184
1142
|
"icon-after-size": t.iconAfterSize,
|
|
1185
1143
|
size: t.buttonSize,
|
|
1186
|
-
"test-id": `${
|
|
1144
|
+
"test-id": `${c}__toggle`,
|
|
1187
1145
|
variant: t.buttonVariant,
|
|
1188
1146
|
width: t.buttonWidth,
|
|
1189
1147
|
wrap: t.buttonWrapped,
|
|
1190
|
-
onClick:
|
|
1148
|
+
onClick: A(v)
|
|
1191
1149
|
}, {
|
|
1192
|
-
default:
|
|
1193
|
-
|
|
1150
|
+
default: Et(() => [
|
|
1151
|
+
se(ce(t.label), 1)
|
|
1194
1152
|
]),
|
|
1195
1153
|
_: 1
|
|
1196
1154
|
}, 8, ["id", "aria-controls", "aria-expanded", "aria-label", "class", "color", "border-radius", "height", "icon-after", "icon-before", "icon-size", "icon-after-size", "size", "test-id", "variant", "width", "wrap", "onClick"]),
|
|
1197
|
-
|
|
1155
|
+
A(r) || t.isOpen ? (At(), Rt("div", {
|
|
1198
1156
|
key: 0,
|
|
1199
|
-
id: `${
|
|
1157
|
+
id: `${c}--${t.dropdownId}`,
|
|
1200
1158
|
ref_key: "dropdownElem",
|
|
1201
|
-
ref:
|
|
1202
|
-
"aria-labelledby": `${
|
|
1203
|
-
"aria-hidden": !(
|
|
1204
|
-
class:
|
|
1205
|
-
`${
|
|
1206
|
-
`${
|
|
1159
|
+
ref: l,
|
|
1160
|
+
"aria-labelledby": `${c}__toggle--${t.dropdownId}`,
|
|
1161
|
+
"aria-hidden": !(A(r) || t.isOpen),
|
|
1162
|
+
class: dt([
|
|
1163
|
+
`${c}__dropdown`,
|
|
1164
|
+
`${c}__dropdown--${A(s)}`
|
|
1207
1165
|
]),
|
|
1208
|
-
style: ae(
|
|
1166
|
+
style: ae(A(x))
|
|
1209
1167
|
}, [
|
|
1210
|
-
|
|
1168
|
+
Ot(A(de), {
|
|
1211
1169
|
bordered: t.containerBordered,
|
|
1212
1170
|
"border-radius": t.containerBorderRadius,
|
|
1213
|
-
color:
|
|
1171
|
+
color: A(Tt).Neutral,
|
|
1214
1172
|
elevated: t.containerElevated,
|
|
1215
1173
|
"forward-ref": h,
|
|
1216
1174
|
padded: !1,
|
|
1217
|
-
"test-id": `${
|
|
1218
|
-
variant:
|
|
1175
|
+
"test-id": `${c}__content`,
|
|
1176
|
+
variant: A(Dt).Ghost,
|
|
1219
1177
|
width: t.contentWidth
|
|
1220
1178
|
}, {
|
|
1221
|
-
default:
|
|
1222
|
-
fe(
|
|
1179
|
+
default: Et(() => [
|
|
1180
|
+
fe(p.$slots, "content")
|
|
1223
1181
|
]),
|
|
1224
1182
|
_: 3
|
|
1225
1183
|
}, 8, ["bordered", "border-radius", "color", "elevated", "test-id", "variant", "width"])
|
|
1226
|
-
], 14,
|
|
1227
|
-
], 10,
|
|
1184
|
+
], 14, pn)) : le("", !0)
|
|
1185
|
+
], 10, gn));
|
|
1228
1186
|
}
|
|
1229
1187
|
});
|
|
1230
1188
|
export {
|
|
1231
|
-
|
|
1232
|
-
|
|
1189
|
+
Rn as CLDropdownMenu,
|
|
1190
|
+
Rn as default
|
|
1233
1191
|
};
|