@purpurds/tooltip 5.31.0 → 5.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rush/temp/ci_build/@purpurds/tooltip/{325f48734fcb7f52e36b48e70976e92f9dedcfdb.untar.log → c4acc2ab2c305bc13bb4cdf652f941d589d29aec.untar.log} +2 -2
- package/.rush/temp/operation/ci_build/all.log +4 -4
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +5 -4
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/.rush/temp/shrinkwrap-deps.json +292 -342
- package/dist/LICENSE.txt +9 -9
- package/dist/tooltip.cjs.js +6 -6
- package/dist/tooltip.cjs.js.map +1 -1
- package/dist/tooltip.es.js +961 -926
- package/dist/tooltip.es.js.map +1 -1
- package/package.json +6 -6
package/dist/tooltip.es.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as Ge, jsx as z } from "react/jsx-runtime";
|
|
2
2
|
import * as L from "react";
|
|
3
|
-
import { forwardRef as I, useCallback as j, createContext as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
3
|
+
import { forwardRef as I, useCallback as j, createContext as Ke, useMemo as _e, createElement as _, useContext as Rt, Fragment as An, Children as se, isValidElement as ke, cloneElement as rt, useEffect as S, useRef as k, useState as q, useLayoutEffect as St, useReducer as On } from "react";
|
|
4
|
+
import * as Cn from "react-dom";
|
|
5
|
+
import En, { flushSync as Dt } from "react-dom";
|
|
6
|
+
const Tn = {
|
|
7
7
|
PRIMARY: "primary",
|
|
8
8
|
SECONDARY: "secondary",
|
|
9
9
|
EXPRESSIVE: "expressive"
|
|
10
|
-
},
|
|
10
|
+
}, Rn = {
|
|
11
|
+
XS: "xs",
|
|
11
12
|
SM: "sm",
|
|
12
13
|
MD: "md",
|
|
13
14
|
LG: "lg"
|
|
14
15
|
};
|
|
15
|
-
function
|
|
16
|
+
function Sn(e) {
|
|
16
17
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
17
18
|
}
|
|
18
|
-
var
|
|
19
|
+
var Nt = { exports: {} };
|
|
19
20
|
/*!
|
|
20
21
|
Copyright (c) 2018 Jed Watson.
|
|
21
22
|
Licensed under the MIT License (MIT), see
|
|
@@ -50,44 +51,44 @@ var Rt = { exports: {} };
|
|
|
50
51
|
}
|
|
51
52
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
52
53
|
})();
|
|
53
|
-
})(
|
|
54
|
-
var
|
|
55
|
-
const
|
|
54
|
+
})(Nt);
|
|
55
|
+
var Dn = Nt.exports;
|
|
56
|
+
const yt = /* @__PURE__ */ Sn(Dn), Nn = "_rotate_1xozj_1", Ln = "_dash_1xozj_1", xe = {
|
|
56
57
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
57
|
-
rotate:
|
|
58
|
+
rotate: Nn,
|
|
58
59
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
59
60
|
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
60
61
|
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
61
62
|
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
62
63
|
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
63
64
|
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
64
|
-
dash:
|
|
65
|
+
dash: Ln,
|
|
65
66
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
66
67
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
67
|
-
},
|
|
68
|
+
}, we = "purpur-spinner", Mn = {
|
|
68
69
|
XXS: "xxs",
|
|
69
70
|
XS: "xs",
|
|
70
71
|
SM: "sm",
|
|
71
72
|
MD: "md",
|
|
72
73
|
LG: "lg"
|
|
73
|
-
},
|
|
74
|
+
}, kn = ({
|
|
74
75
|
["data-testid"]: e,
|
|
75
76
|
disabled: t = !1,
|
|
76
77
|
negative: n = !1,
|
|
77
|
-
size: o =
|
|
78
|
+
size: o = Mn.SM,
|
|
78
79
|
...i
|
|
79
80
|
}) => /* @__PURE__ */ z(
|
|
80
81
|
"div",
|
|
81
82
|
{
|
|
82
|
-
className:
|
|
83
|
+
className: yt([xe[we], xe[`${we}--${o}`]]),
|
|
83
84
|
"data-testid": e,
|
|
84
85
|
...i,
|
|
85
86
|
children: /* @__PURE__ */ z("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ z(
|
|
86
87
|
"circle",
|
|
87
88
|
{
|
|
88
|
-
className:
|
|
89
|
-
[
|
|
90
|
-
[
|
|
89
|
+
className: yt(xe[`${we}__circle`], {
|
|
90
|
+
[xe[`${we}__circle--disabled`]]: t,
|
|
91
|
+
[xe[`${we}__circle--negative`]]: n
|
|
91
92
|
}),
|
|
92
93
|
cx: "25",
|
|
93
94
|
cy: "25",
|
|
@@ -96,10 +97,10 @@ const ht = /* @__PURE__ */ En(Tn), Sn = "_rotate_1xozj_1", Rn = "_dash_1xozj_1",
|
|
|
96
97
|
) })
|
|
97
98
|
}
|
|
98
99
|
);
|
|
99
|
-
function
|
|
100
|
+
function In(e) {
|
|
100
101
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
101
102
|
}
|
|
102
|
-
var
|
|
103
|
+
var Lt = { exports: {} };
|
|
103
104
|
/*!
|
|
104
105
|
Copyright (c) 2018 Jed Watson.
|
|
105
106
|
Licensed under the MIT License (MIT), see
|
|
@@ -134,35 +135,36 @@ var Dt = { exports: {} };
|
|
|
134
135
|
}
|
|
135
136
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
136
137
|
})();
|
|
137
|
-
})(
|
|
138
|
-
var
|
|
139
|
-
const
|
|
140
|
-
"purpur-button": "_purpur-
|
|
141
|
-
"purpur-button--
|
|
142
|
-
"purpur-button--icon-only": "_purpur-button--icon-
|
|
143
|
-
"purpur-button--
|
|
144
|
-
"purpur-button--
|
|
145
|
-
"purpur-button--
|
|
146
|
-
"purpur-button--
|
|
147
|
-
"purpur-button--
|
|
148
|
-
"purpur-button--
|
|
149
|
-
"purpur-button--
|
|
150
|
-
"purpur-button--secondary
|
|
151
|
-
"purpur-button--
|
|
152
|
-
"purpur-button--expressive
|
|
153
|
-
"purpur-button--negative": "_purpur-button--
|
|
154
|
-
"purpur-button--
|
|
155
|
-
"purpur-button--destructive
|
|
156
|
-
"purpur-button--
|
|
157
|
-
"purpur-button--tertiary-purple
|
|
158
|
-
"purpur-button--
|
|
159
|
-
"purpur-button--text": "_purpur-button--
|
|
160
|
-
|
|
161
|
-
|
|
138
|
+
})(Lt);
|
|
139
|
+
var Fn = Lt.exports;
|
|
140
|
+
const Hn = /* @__PURE__ */ In(Fn), Bn = {
|
|
141
|
+
"purpur-button": "_purpur-button_w455q_1",
|
|
142
|
+
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
143
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
144
|
+
"purpur-button--sm": "_purpur-button--sm_w455q_39",
|
|
145
|
+
"purpur-button--md": "_purpur-button--md_w455q_45",
|
|
146
|
+
"purpur-button--lg": "_purpur-button--lg_w455q_51",
|
|
147
|
+
"purpur-button--full-width": "_purpur-button--full-width_w455q_57",
|
|
148
|
+
"purpur-button--primary": "_purpur-button--primary_w455q_60",
|
|
149
|
+
"purpur-button--disabled": "_purpur-button--disabled_w455q_64",
|
|
150
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_w455q_70",
|
|
151
|
+
"purpur-button--secondary": "_purpur-button--secondary_w455q_82",
|
|
152
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_w455q_93",
|
|
153
|
+
"purpur-button--expressive": "_purpur-button--expressive_w455q_104",
|
|
154
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_w455q_114",
|
|
155
|
+
"purpur-button--negative": "_purpur-button--negative_w455q_126",
|
|
156
|
+
"purpur-button--destructive": "_purpur-button--destructive_w455q_133",
|
|
157
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_w455q_143",
|
|
158
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_w455q_153",
|
|
159
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
|
|
160
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
|
|
161
|
+
"purpur-button--text": "_purpur-button--text_w455q_181"
|
|
162
|
+
}, zn = {
|
|
163
|
+
...Tn,
|
|
162
164
|
DESTRUCTIVE: "destructive",
|
|
163
165
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
164
166
|
TEXT: "text"
|
|
165
|
-
},
|
|
167
|
+
}, jn = Hn.bind(Bn), ie = "purpur-button", Wn = ({
|
|
166
168
|
children: e,
|
|
167
169
|
className: t,
|
|
168
170
|
["data-testid"]: n,
|
|
@@ -174,50 +176,50 @@ const kn = /* @__PURE__ */ Ln(Mn), In = {
|
|
|
174
176
|
onClick: c,
|
|
175
177
|
size: l = "md",
|
|
176
178
|
variant: u,
|
|
177
|
-
type:
|
|
179
|
+
type: f = "button",
|
|
178
180
|
...p
|
|
179
|
-
},
|
|
181
|
+
}, d) => {
|
|
180
182
|
if (r && u === "destructive")
|
|
181
183
|
return null;
|
|
182
|
-
const h =
|
|
184
|
+
const h = jn(
|
|
183
185
|
[
|
|
184
|
-
|
|
185
|
-
`${
|
|
186
|
-
`${
|
|
186
|
+
ie,
|
|
187
|
+
`${ie}--${a ? `${u}-negative` : u}`,
|
|
188
|
+
`${ie}--${l}`
|
|
187
189
|
],
|
|
188
190
|
{
|
|
189
|
-
[`${
|
|
190
|
-
[`${
|
|
191
|
-
[`${
|
|
192
|
-
[`${
|
|
191
|
+
[`${ie}--icon-only`]: r,
|
|
192
|
+
[`${ie}--negative`]: a,
|
|
193
|
+
[`${ie}--full-width`]: i,
|
|
194
|
+
[`${ie}--disabled`]: o || s
|
|
193
195
|
},
|
|
194
196
|
t
|
|
195
|
-
), m = (
|
|
196
|
-
o || s ?
|
|
197
|
+
), m = (y) => {
|
|
198
|
+
o || s ? y.preventDefault() : c && c(y);
|
|
197
199
|
}, g = !!p["aria-disabled"] || o || s;
|
|
198
|
-
return /* @__PURE__ */
|
|
200
|
+
return /* @__PURE__ */ Ge(
|
|
199
201
|
"button",
|
|
200
202
|
{
|
|
201
203
|
className: h,
|
|
202
204
|
"data-testid": n,
|
|
203
|
-
type:
|
|
204
|
-
ref:
|
|
205
|
+
type: f,
|
|
206
|
+
ref: d,
|
|
205
207
|
"aria-disabled": g,
|
|
206
208
|
onClick: m,
|
|
207
209
|
...p,
|
|
208
210
|
children: [
|
|
209
|
-
s && /* @__PURE__ */ z(
|
|
211
|
+
s && /* @__PURE__ */ z(kn, { size: l === Rn.LG ? "xs" : "xxs", negative: a, disabled: g }),
|
|
210
212
|
" ",
|
|
211
213
|
e
|
|
212
214
|
]
|
|
213
215
|
}
|
|
214
216
|
);
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
function
|
|
217
|
+
}, Mt = I(Wn);
|
|
218
|
+
Mt.displayName = "Button";
|
|
219
|
+
function qn(e) {
|
|
218
220
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
219
221
|
}
|
|
220
|
-
var
|
|
222
|
+
var kt = { exports: {} };
|
|
221
223
|
/*!
|
|
222
224
|
Copyright (c) 2018 Jed Watson.
|
|
223
225
|
Licensed under the MIT License (MIT), see
|
|
@@ -252,9 +254,9 @@ var Lt = { exports: {} };
|
|
|
252
254
|
}
|
|
253
255
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
254
256
|
})();
|
|
255
|
-
})(
|
|
256
|
-
var
|
|
257
|
-
const
|
|
257
|
+
})(kt);
|
|
258
|
+
var Un = kt.exports;
|
|
259
|
+
const Vn = /* @__PURE__ */ qn(Un), Yn = {
|
|
258
260
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
259
261
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
260
262
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -262,39 +264,39 @@ const Wn = /* @__PURE__ */ zn(jn), Un = {
|
|
|
262
264
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
263
265
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
264
266
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
265
|
-
},
|
|
267
|
+
}, Xn = {
|
|
266
268
|
name: "info",
|
|
267
269
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
|
|
268
270
|
keywords: ["info"],
|
|
269
271
|
category: "status"
|
|
270
|
-
},
|
|
271
|
-
|
|
272
|
+
}, It = (e) => /* @__PURE__ */ z(
|
|
273
|
+
Ft,
|
|
272
274
|
{
|
|
273
275
|
...e,
|
|
274
|
-
svg:
|
|
276
|
+
svg: Xn
|
|
275
277
|
}
|
|
276
278
|
);
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
+
It.displayName = "IconInfo";
|
|
280
|
+
const Gn = Vn.bind(Yn), bt = "purpur-icon", Kn = "md", Zn = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), Jn = ({ content: e = "", title: t } = {}) => {
|
|
279
281
|
const n = [
|
|
280
282
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
281
283
|
{ name: "fill", value: "currentColor" },
|
|
282
284
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
283
285
|
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
284
286
|
], o = t ? `<title>${t}</title>` : "";
|
|
285
|
-
return `<svg ${
|
|
286
|
-
},
|
|
287
|
+
return `<svg ${Zn(n)}>${o}${e}</svg>`;
|
|
288
|
+
}, Qn = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ft = ({
|
|
287
289
|
["data-testid"]: e,
|
|
288
290
|
svg: t,
|
|
289
291
|
allyTitle: n,
|
|
290
292
|
className: o,
|
|
291
|
-
size: i =
|
|
293
|
+
size: i = Kn,
|
|
292
294
|
...r
|
|
293
295
|
}) => {
|
|
294
|
-
const s =
|
|
295
|
-
content:
|
|
296
|
+
const s = Jn({
|
|
297
|
+
content: Qn(t.svg),
|
|
296
298
|
title: n
|
|
297
|
-
}), a =
|
|
299
|
+
}), a = Gn(o, bt, `${bt}--${i}`);
|
|
298
300
|
return /* @__PURE__ */ z(
|
|
299
301
|
"span",
|
|
300
302
|
{
|
|
@@ -306,11 +308,11 @@ const Xn = Wn.bind(Un), gt = "purpur-icon", Yn = "md", Gn = (e) => e.filter((t)
|
|
|
306
308
|
}
|
|
307
309
|
);
|
|
308
310
|
};
|
|
309
|
-
|
|
310
|
-
function
|
|
311
|
+
Ft.displayName = "Icon";
|
|
312
|
+
function er(e) {
|
|
311
313
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
312
314
|
}
|
|
313
|
-
var
|
|
315
|
+
var Ht = { exports: {} };
|
|
314
316
|
/*!
|
|
315
317
|
Copyright (c) 2018 Jed Watson.
|
|
316
318
|
Licensed under the MIT License (MIT), see
|
|
@@ -345,9 +347,9 @@ var It = { exports: {} };
|
|
|
345
347
|
}
|
|
346
348
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
347
349
|
})();
|
|
348
|
-
})(
|
|
349
|
-
var
|
|
350
|
-
const
|
|
350
|
+
})(Ht);
|
|
351
|
+
var tr = Ht.exports;
|
|
352
|
+
const nr = /* @__PURE__ */ er(tr), ve = {
|
|
351
353
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
352
354
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
353
355
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -362,7 +364,7 @@ const Qn = /* @__PURE__ */ Zn(Jn), be = {
|
|
|
362
364
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
363
365
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
364
366
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
365
|
-
},
|
|
367
|
+
}, Bt = {
|
|
366
368
|
PARAGRAPH100: "paragraph-100",
|
|
367
369
|
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
|
368
370
|
PARAGRAPH100BOLD: "paragraph-100-bold",
|
|
@@ -373,77 +375,77 @@ const Qn = /* @__PURE__ */ Zn(Jn), be = {
|
|
|
373
375
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
374
376
|
OVERLINE100: "overline-100",
|
|
375
377
|
OVERLINE200: "overline-200"
|
|
376
|
-
}, $e = "purpur-paragraph",
|
|
378
|
+
}, $e = "purpur-paragraph", zt = ({
|
|
377
379
|
["data-testid"]: e,
|
|
378
380
|
children: t,
|
|
379
381
|
className: n,
|
|
380
382
|
disabled: o,
|
|
381
383
|
enableHyphenation: i = !1,
|
|
382
384
|
negative: r = !1,
|
|
383
|
-
variant: s =
|
|
385
|
+
variant: s = Bt.PARAGRAPH100,
|
|
384
386
|
...a
|
|
385
387
|
}) => {
|
|
386
|
-
const c =
|
|
388
|
+
const c = nr([
|
|
387
389
|
n,
|
|
388
|
-
|
|
389
|
-
|
|
390
|
+
ve[$e],
|
|
391
|
+
ve[`${$e}--${s}`],
|
|
390
392
|
{
|
|
391
|
-
[
|
|
392
|
-
[
|
|
393
|
-
[
|
|
393
|
+
[ve[`${$e}--hyphens`]]: i,
|
|
394
|
+
[ve[`${$e}--disabled`]]: o,
|
|
395
|
+
[ve[`${$e}--negative`]]: r
|
|
394
396
|
}
|
|
395
397
|
]);
|
|
396
398
|
return /* @__PURE__ */ z("p", { ...a, className: c, "data-testid": e, children: t });
|
|
397
399
|
};
|
|
398
|
-
|
|
399
|
-
const
|
|
400
|
-
function
|
|
401
|
-
return
|
|
400
|
+
zt.displayName = "Paragraph";
|
|
401
|
+
const rr = "400ms";
|
|
402
|
+
function D() {
|
|
403
|
+
return D = Object.assign ? Object.assign.bind() : function(e) {
|
|
402
404
|
for (var t = 1; t < arguments.length; t++) {
|
|
403
405
|
var n = arguments[t];
|
|
404
406
|
for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
405
407
|
}
|
|
406
408
|
return e;
|
|
407
|
-
},
|
|
409
|
+
}, D.apply(null, arguments);
|
|
408
410
|
}
|
|
409
|
-
function
|
|
411
|
+
function Q(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
410
412
|
return function(i) {
|
|
411
413
|
if (e == null || e(i), n === !1 || !i.defaultPrevented) return t == null ? void 0 : t(i);
|
|
412
414
|
};
|
|
413
415
|
}
|
|
414
|
-
function
|
|
416
|
+
function or(e, t) {
|
|
415
417
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
416
418
|
}
|
|
417
|
-
function
|
|
419
|
+
function jt(...e) {
|
|
418
420
|
return (t) => e.forEach(
|
|
419
|
-
(n) =>
|
|
421
|
+
(n) => or(n, t)
|
|
420
422
|
);
|
|
421
423
|
}
|
|
422
|
-
function
|
|
423
|
-
return j(
|
|
424
|
+
function he(...e) {
|
|
425
|
+
return j(jt(...e), e);
|
|
424
426
|
}
|
|
425
|
-
function
|
|
427
|
+
function Wt(e, t = []) {
|
|
426
428
|
let n = [];
|
|
427
429
|
function o(r, s) {
|
|
428
|
-
const a = /* @__PURE__ */
|
|
430
|
+
const a = /* @__PURE__ */ Ke(s), c = n.length;
|
|
429
431
|
n = [
|
|
430
432
|
...n,
|
|
431
433
|
s
|
|
432
434
|
];
|
|
433
|
-
function l(
|
|
434
|
-
const { scope: p, children:
|
|
435
|
+
function l(f) {
|
|
436
|
+
const { scope: p, children: d, ...h } = f, m = (p == null ? void 0 : p[e][c]) || a, g = _e(
|
|
435
437
|
() => h,
|
|
436
438
|
Object.values(h)
|
|
437
439
|
);
|
|
438
|
-
return /* @__PURE__ */
|
|
440
|
+
return /* @__PURE__ */ _(m.Provider, {
|
|
439
441
|
value: g
|
|
440
|
-
},
|
|
442
|
+
}, d);
|
|
441
443
|
}
|
|
442
|
-
function u(
|
|
443
|
-
const
|
|
444
|
+
function u(f, p) {
|
|
445
|
+
const d = (p == null ? void 0 : p[e][c]) || a, h = Rt(d);
|
|
444
446
|
if (h) return h;
|
|
445
447
|
if (s !== void 0) return s;
|
|
446
|
-
throw new Error(`\`${
|
|
448
|
+
throw new Error(`\`${f}\` must be used within \`${r}\``);
|
|
447
449
|
}
|
|
448
450
|
return l.displayName = r + "Provider", [
|
|
449
451
|
l,
|
|
@@ -451,10 +453,10 @@ function zt(e, t = []) {
|
|
|
451
453
|
];
|
|
452
454
|
}
|
|
453
455
|
const i = () => {
|
|
454
|
-
const r = n.map((s) => /* @__PURE__ */
|
|
456
|
+
const r = n.map((s) => /* @__PURE__ */ Ke(s));
|
|
455
457
|
return function(a) {
|
|
456
458
|
const c = (a == null ? void 0 : a[e]) || r;
|
|
457
|
-
return
|
|
459
|
+
return _e(
|
|
458
460
|
() => ({
|
|
459
461
|
[`__scope${e}`]: {
|
|
460
462
|
...a,
|
|
@@ -470,10 +472,10 @@ function zt(e, t = []) {
|
|
|
470
472
|
};
|
|
471
473
|
return i.scopeName = e, [
|
|
472
474
|
o,
|
|
473
|
-
|
|
475
|
+
ir(i, ...t)
|
|
474
476
|
];
|
|
475
477
|
}
|
|
476
|
-
function
|
|
478
|
+
function ir(...e) {
|
|
477
479
|
const t = e[0];
|
|
478
480
|
if (e.length === 1) return t;
|
|
479
481
|
const n = () => {
|
|
@@ -485,13 +487,13 @@ function nr(...e) {
|
|
|
485
487
|
);
|
|
486
488
|
return function(r) {
|
|
487
489
|
const s = o.reduce((a, { useScope: c, scopeName: l }) => {
|
|
488
|
-
const
|
|
490
|
+
const f = c(r)[`__scope${l}`];
|
|
489
491
|
return {
|
|
490
492
|
...a,
|
|
491
|
-
...
|
|
493
|
+
...f
|
|
492
494
|
};
|
|
493
495
|
}, {});
|
|
494
|
-
return
|
|
496
|
+
return _e(
|
|
495
497
|
() => ({
|
|
496
498
|
[`__scope${t.scopeName}`]: s
|
|
497
499
|
}),
|
|
@@ -503,32 +505,32 @@ function nr(...e) {
|
|
|
503
505
|
};
|
|
504
506
|
return n.scopeName = t.scopeName, n;
|
|
505
507
|
}
|
|
506
|
-
const
|
|
507
|
-
const { children: n, ...o } = e, i =
|
|
508
|
+
const qt = /* @__PURE__ */ I((e, t) => {
|
|
509
|
+
const { children: n, ...o } = e, i = se.toArray(n), r = i.find(sr);
|
|
508
510
|
if (r) {
|
|
509
|
-
const s = r.props.children, a = i.map((c) => c === r ?
|
|
510
|
-
return /* @__PURE__ */
|
|
511
|
+
const s = r.props.children, a = i.map((c) => c === r ? se.count(s) > 1 ? se.only(null) : /* @__PURE__ */ ke(s) ? s.props.children : null : c);
|
|
512
|
+
return /* @__PURE__ */ _(Ze, D({}, o, {
|
|
511
513
|
ref: t
|
|
512
|
-
}), /* @__PURE__ */
|
|
514
|
+
}), /* @__PURE__ */ ke(s) ? /* @__PURE__ */ rt(s, void 0, a) : null);
|
|
513
515
|
}
|
|
514
|
-
return /* @__PURE__ */
|
|
516
|
+
return /* @__PURE__ */ _(Ze, D({}, o, {
|
|
515
517
|
ref: t
|
|
516
518
|
}), n);
|
|
517
519
|
});
|
|
518
|
-
|
|
519
|
-
const
|
|
520
|
+
qt.displayName = "Slot";
|
|
521
|
+
const Ze = /* @__PURE__ */ I((e, t) => {
|
|
520
522
|
const { children: n, ...o } = e;
|
|
521
|
-
return /* @__PURE__ */
|
|
522
|
-
...
|
|
523
|
-
ref: t ?
|
|
524
|
-
}) :
|
|
523
|
+
return /* @__PURE__ */ ke(n) ? /* @__PURE__ */ rt(n, {
|
|
524
|
+
...ar(o, n.props),
|
|
525
|
+
ref: t ? jt(t, n.ref) : n.ref
|
|
526
|
+
}) : se.count(n) > 1 ? se.only(null) : null;
|
|
525
527
|
});
|
|
526
|
-
|
|
527
|
-
const
|
|
528
|
-
function
|
|
529
|
-
return /* @__PURE__ */
|
|
528
|
+
Ze.displayName = "SlotClone";
|
|
529
|
+
const Ut = ({ children: e }) => /* @__PURE__ */ _(An, null, e);
|
|
530
|
+
function sr(e) {
|
|
531
|
+
return /* @__PURE__ */ ke(e) && e.type === Ut;
|
|
530
532
|
}
|
|
531
|
-
function
|
|
533
|
+
function ar(e, t) {
|
|
532
534
|
const n = {
|
|
533
535
|
...t
|
|
534
536
|
};
|
|
@@ -549,7 +551,7 @@ function or(e, t) {
|
|
|
549
551
|
...n
|
|
550
552
|
};
|
|
551
553
|
}
|
|
552
|
-
const
|
|
554
|
+
const cr = [
|
|
553
555
|
"a",
|
|
554
556
|
"button",
|
|
555
557
|
"div",
|
|
@@ -566,12 +568,12 @@ const ir = [
|
|
|
566
568
|
"span",
|
|
567
569
|
"svg",
|
|
568
570
|
"ul"
|
|
569
|
-
],
|
|
571
|
+
], ce = cr.reduce((e, t) => {
|
|
570
572
|
const n = /* @__PURE__ */ I((o, i) => {
|
|
571
|
-
const { asChild: r, ...s } = o, a = r ?
|
|
573
|
+
const { asChild: r, ...s } = o, a = r ? qt : t;
|
|
572
574
|
return S(() => {
|
|
573
575
|
window[Symbol.for("radix-ui")] = !0;
|
|
574
|
-
}, []), /* @__PURE__ */
|
|
576
|
+
}, []), /* @__PURE__ */ _(a, D({}, s, {
|
|
575
577
|
ref: i
|
|
576
578
|
}));
|
|
577
579
|
});
|
|
@@ -580,16 +582,16 @@ const ir = [
|
|
|
580
582
|
[t]: n
|
|
581
583
|
};
|
|
582
584
|
}, {});
|
|
583
|
-
function
|
|
584
|
-
e &&
|
|
585
|
+
function lr(e, t) {
|
|
586
|
+
e && Dt(
|
|
585
587
|
() => e.dispatchEvent(t)
|
|
586
588
|
);
|
|
587
589
|
}
|
|
588
|
-
function
|
|
590
|
+
function ge(e) {
|
|
589
591
|
const t = k(e);
|
|
590
592
|
return S(() => {
|
|
591
593
|
t.current = e;
|
|
592
|
-
}),
|
|
594
|
+
}), _e(
|
|
593
595
|
() => (...n) => {
|
|
594
596
|
var o;
|
|
595
597
|
return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
|
|
@@ -597,8 +599,8 @@ function he(e) {
|
|
|
597
599
|
[]
|
|
598
600
|
);
|
|
599
601
|
}
|
|
600
|
-
function
|
|
601
|
-
const n =
|
|
602
|
+
function ur(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
603
|
+
const n = ge(e);
|
|
602
604
|
S(() => {
|
|
603
605
|
const o = (i) => {
|
|
604
606
|
i.key === "Escape" && n(i);
|
|
@@ -609,73 +611,73 @@ function ar(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
609
611
|
t
|
|
610
612
|
]);
|
|
611
613
|
}
|
|
612
|
-
const
|
|
613
|
-
let
|
|
614
|
-
const
|
|
614
|
+
const Je = "dismissableLayer.update", fr = "dismissableLayer.pointerDownOutside", dr = "dismissableLayer.focusOutside";
|
|
615
|
+
let xt;
|
|
616
|
+
const pr = /* @__PURE__ */ Ke({
|
|
615
617
|
layers: /* @__PURE__ */ new Set(),
|
|
616
618
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
617
619
|
branches: /* @__PURE__ */ new Set()
|
|
618
|
-
}),
|
|
620
|
+
}), hr = /* @__PURE__ */ I((e, t) => {
|
|
619
621
|
var n;
|
|
620
|
-
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: i, onPointerDownOutside: r, onFocusOutside: s, onInteractOutside: a, onDismiss: c, ...l } = e, u =
|
|
622
|
+
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: i, onPointerDownOutside: r, onFocusOutside: s, onInteractOutside: a, onDismiss: c, ...l } = e, u = Rt(pr), [f, p] = q(null), d = (n = f == null ? void 0 : f.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, h] = q({}), m = he(
|
|
621
623
|
t,
|
|
622
|
-
(
|
|
623
|
-
), g = Array.from(u.layers), [
|
|
624
|
+
($) => p($)
|
|
625
|
+
), g = Array.from(u.layers), [y] = [
|
|
624
626
|
...u.layersWithOutsidePointerEventsDisabled
|
|
625
|
-
].slice(-1),
|
|
626
|
-
const E =
|
|
627
|
+
].slice(-1), b = g.indexOf(y), x = f ? g.indexOf(f) : -1, w = u.layersWithOutsidePointerEventsDisabled.size > 0, v = x >= b, A = gr(($) => {
|
|
628
|
+
const E = $.target, T = [
|
|
627
629
|
...u.branches
|
|
628
630
|
].some(
|
|
629
|
-
(
|
|
631
|
+
(N) => N.contains(E)
|
|
630
632
|
);
|
|
631
|
-
|
|
632
|
-
},
|
|
633
|
-
const E =
|
|
633
|
+
!v || T || (r == null || r($), a == null || a($), $.defaultPrevented || c == null || c());
|
|
634
|
+
}, d), P = mr(($) => {
|
|
635
|
+
const E = $.target;
|
|
634
636
|
[
|
|
635
637
|
...u.branches
|
|
636
638
|
].some(
|
|
637
|
-
(
|
|
638
|
-
) || (s == null || s(
|
|
639
|
-
},
|
|
640
|
-
return
|
|
641
|
-
x === u.layers.size - 1 && (i == null || i(
|
|
642
|
-
},
|
|
643
|
-
if (
|
|
644
|
-
return o && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
645
|
-
o && u.layersWithOutsidePointerEventsDisabled.size === 1 && (
|
|
639
|
+
(N) => N.contains(E)
|
|
640
|
+
) || (s == null || s($), a == null || a($), $.defaultPrevented || c == null || c());
|
|
641
|
+
}, d);
|
|
642
|
+
return ur(($) => {
|
|
643
|
+
x === u.layers.size - 1 && (i == null || i($), !$.defaultPrevented && c && ($.preventDefault(), c()));
|
|
644
|
+
}, d), S(() => {
|
|
645
|
+
if (f)
|
|
646
|
+
return o && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (xt = d.body.style.pointerEvents, d.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(f)), u.layers.add(f), wt(), () => {
|
|
647
|
+
o && u.layersWithOutsidePointerEventsDisabled.size === 1 && (d.body.style.pointerEvents = xt);
|
|
646
648
|
};
|
|
647
649
|
}, [
|
|
648
|
-
d,
|
|
649
650
|
f,
|
|
651
|
+
d,
|
|
650
652
|
o,
|
|
651
653
|
u
|
|
652
654
|
]), S(() => () => {
|
|
653
|
-
|
|
655
|
+
f && (u.layers.delete(f), u.layersWithOutsidePointerEventsDisabled.delete(f), wt());
|
|
654
656
|
}, [
|
|
655
|
-
|
|
657
|
+
f,
|
|
656
658
|
u
|
|
657
659
|
]), S(() => {
|
|
658
|
-
const
|
|
659
|
-
return document.addEventListener(
|
|
660
|
-
}, []), /* @__PURE__ */
|
|
660
|
+
const $ = () => h({});
|
|
661
|
+
return document.addEventListener(Je, $), () => document.removeEventListener(Je, $);
|
|
662
|
+
}, []), /* @__PURE__ */ _(ce.div, D({}, l, {
|
|
661
663
|
ref: m,
|
|
662
664
|
style: {
|
|
663
|
-
pointerEvents:
|
|
665
|
+
pointerEvents: w ? v ? "auto" : "none" : void 0,
|
|
664
666
|
...e.style
|
|
665
667
|
},
|
|
666
|
-
onFocusCapture:
|
|
667
|
-
onBlurCapture:
|
|
668
|
-
onPointerDownCapture:
|
|
668
|
+
onFocusCapture: Q(e.onFocusCapture, P.onFocusCapture),
|
|
669
|
+
onBlurCapture: Q(e.onBlurCapture, P.onBlurCapture),
|
|
670
|
+
onPointerDownCapture: Q(e.onPointerDownCapture, A.onPointerDownCapture)
|
|
669
671
|
}));
|
|
670
672
|
});
|
|
671
|
-
function
|
|
672
|
-
const n =
|
|
673
|
+
function gr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
674
|
+
const n = ge(e), o = k(!1), i = k(() => {
|
|
673
675
|
});
|
|
674
676
|
return S(() => {
|
|
675
677
|
const r = (a) => {
|
|
676
678
|
if (a.target && !o.current) {
|
|
677
679
|
let l = function() {
|
|
678
|
-
|
|
680
|
+
Vt(fr, n, c, {
|
|
679
681
|
discrete: !0
|
|
680
682
|
});
|
|
681
683
|
};
|
|
@@ -702,11 +704,11 @@ function fr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
702
704
|
onPointerDownCapture: () => o.current = !0
|
|
703
705
|
};
|
|
704
706
|
}
|
|
705
|
-
function
|
|
706
|
-
const n =
|
|
707
|
+
function mr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
708
|
+
const n = ge(e), o = k(!1);
|
|
707
709
|
return S(() => {
|
|
708
710
|
const i = (r) => {
|
|
709
|
-
r.target && !o.current &&
|
|
711
|
+
r.target && !o.current && Vt(dr, n, {
|
|
710
712
|
originalEvent: r
|
|
711
713
|
}, {
|
|
712
714
|
discrete: !1
|
|
@@ -721,11 +723,11 @@ function pr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
721
723
|
onBlurCapture: () => o.current = !1
|
|
722
724
|
};
|
|
723
725
|
}
|
|
724
|
-
function
|
|
725
|
-
const e = new CustomEvent(
|
|
726
|
+
function wt() {
|
|
727
|
+
const e = new CustomEvent(Je);
|
|
726
728
|
document.dispatchEvent(e);
|
|
727
729
|
}
|
|
728
|
-
function
|
|
730
|
+
function Vt(e, t, n, { discrete: o }) {
|
|
729
731
|
const i = n.originalEvent.target, r = new CustomEvent(e, {
|
|
730
732
|
bubbles: !1,
|
|
731
733
|
cancelable: !0,
|
|
@@ -733,72 +735,72 @@ function Ut(e, t, n, { discrete: o }) {
|
|
|
733
735
|
});
|
|
734
736
|
t && i.addEventListener(e, t, {
|
|
735
737
|
once: !0
|
|
736
|
-
}), o ?
|
|
738
|
+
}), o ? lr(i, r) : i.dispatchEvent(r);
|
|
737
739
|
}
|
|
738
|
-
const de = globalThis != null && globalThis.document ?
|
|
739
|
-
},
|
|
740
|
+
const de = globalThis != null && globalThis.document ? St : () => {
|
|
741
|
+
}, yr = L.useId || (() => {
|
|
740
742
|
});
|
|
741
|
-
let
|
|
742
|
-
function
|
|
743
|
-
const [t, n] = L.useState(
|
|
743
|
+
let br = 0;
|
|
744
|
+
function xr(e) {
|
|
745
|
+
const [t, n] = L.useState(yr());
|
|
744
746
|
return de(() => {
|
|
745
747
|
n(
|
|
746
|
-
(o) => o ?? String(
|
|
748
|
+
(o) => o ?? String(br++)
|
|
747
749
|
);
|
|
748
750
|
}, [
|
|
749
751
|
e
|
|
750
752
|
]), t ? `radix-${t}` : "";
|
|
751
753
|
}
|
|
752
|
-
const
|
|
754
|
+
const wr = ["top", "right", "bottom", "left"], ne = Math.min, W = Math.max, Ie = Math.round, Ne = Math.floor, K = (e) => ({
|
|
753
755
|
x: e,
|
|
754
756
|
y: e
|
|
755
|
-
}),
|
|
757
|
+
}), vr = {
|
|
756
758
|
left: "right",
|
|
757
759
|
right: "left",
|
|
758
760
|
bottom: "top",
|
|
759
761
|
top: "bottom"
|
|
760
|
-
},
|
|
762
|
+
}, $r = {
|
|
761
763
|
start: "end",
|
|
762
764
|
end: "start"
|
|
763
765
|
};
|
|
764
|
-
function
|
|
765
|
-
return W(e,
|
|
766
|
+
function Qe(e, t, n) {
|
|
767
|
+
return W(e, ne(t, n));
|
|
766
768
|
}
|
|
767
|
-
function
|
|
769
|
+
function ee(e, t) {
|
|
768
770
|
return typeof e == "function" ? e(t) : e;
|
|
769
771
|
}
|
|
770
|
-
function
|
|
772
|
+
function te(e) {
|
|
771
773
|
return e.split("-")[0];
|
|
772
774
|
}
|
|
773
|
-
function
|
|
775
|
+
function me(e) {
|
|
774
776
|
return e.split("-")[1];
|
|
775
777
|
}
|
|
776
|
-
function
|
|
778
|
+
function ot(e) {
|
|
777
779
|
return e === "x" ? "y" : "x";
|
|
778
780
|
}
|
|
779
|
-
function
|
|
781
|
+
function it(e) {
|
|
780
782
|
return e === "y" ? "height" : "width";
|
|
781
783
|
}
|
|
782
|
-
function
|
|
783
|
-
return ["top", "bottom"].includes(
|
|
784
|
+
function re(e) {
|
|
785
|
+
return ["top", "bottom"].includes(te(e)) ? "y" : "x";
|
|
784
786
|
}
|
|
785
|
-
function
|
|
786
|
-
return
|
|
787
|
+
function st(e) {
|
|
788
|
+
return ot(re(e));
|
|
787
789
|
}
|
|
788
|
-
function
|
|
790
|
+
function _r(e, t, n) {
|
|
789
791
|
n === void 0 && (n = !1);
|
|
790
|
-
const o =
|
|
792
|
+
const o = me(e), i = st(e), r = it(i);
|
|
791
793
|
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
792
|
-
return t.reference[r] > t.floating[r] && (s =
|
|
794
|
+
return t.reference[r] > t.floating[r] && (s = Fe(s)), [s, Fe(s)];
|
|
793
795
|
}
|
|
794
|
-
function
|
|
795
|
-
const t =
|
|
796
|
-
return [
|
|
796
|
+
function Pr(e) {
|
|
797
|
+
const t = Fe(e);
|
|
798
|
+
return [et(e), t, et(t)];
|
|
797
799
|
}
|
|
798
|
-
function
|
|
799
|
-
return e.replace(/start|end/g, (t) =>
|
|
800
|
+
function et(e) {
|
|
801
|
+
return e.replace(/start|end/g, (t) => $r[t]);
|
|
800
802
|
}
|
|
801
|
-
function
|
|
803
|
+
function Ar(e, t, n) {
|
|
802
804
|
const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
|
|
803
805
|
switch (e) {
|
|
804
806
|
case "top":
|
|
@@ -811,15 +813,15 @@ function wr(e, t, n) {
|
|
|
811
813
|
return [];
|
|
812
814
|
}
|
|
813
815
|
}
|
|
814
|
-
function
|
|
815
|
-
const i =
|
|
816
|
-
let r =
|
|
817
|
-
return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(
|
|
816
|
+
function Or(e, t, n, o) {
|
|
817
|
+
const i = me(e);
|
|
818
|
+
let r = Ar(te(e), n === "start", o);
|
|
819
|
+
return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(et)))), r;
|
|
818
820
|
}
|
|
819
|
-
function
|
|
820
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
821
|
+
function Fe(e) {
|
|
822
|
+
return e.replace(/left|right|bottom|top/g, (t) => vr[t]);
|
|
821
823
|
}
|
|
822
|
-
function
|
|
824
|
+
function Cr(e) {
|
|
823
825
|
return {
|
|
824
826
|
top: 0,
|
|
825
827
|
right: 0,
|
|
@@ -828,15 +830,15 @@ function Pr(e) {
|
|
|
828
830
|
...e
|
|
829
831
|
};
|
|
830
832
|
}
|
|
831
|
-
function
|
|
832
|
-
return typeof e != "number" ?
|
|
833
|
+
function Yt(e) {
|
|
834
|
+
return typeof e != "number" ? Cr(e) : {
|
|
833
835
|
top: e,
|
|
834
836
|
right: e,
|
|
835
837
|
bottom: e,
|
|
836
838
|
left: e
|
|
837
839
|
};
|
|
838
840
|
}
|
|
839
|
-
function
|
|
841
|
+
function He(e) {
|
|
840
842
|
const {
|
|
841
843
|
x: t,
|
|
842
844
|
y: n,
|
|
@@ -854,55 +856,55 @@ function Fe(e) {
|
|
|
854
856
|
y: n
|
|
855
857
|
};
|
|
856
858
|
}
|
|
857
|
-
function
|
|
859
|
+
function vt(e, t, n) {
|
|
858
860
|
let {
|
|
859
861
|
reference: o,
|
|
860
862
|
floating: i
|
|
861
863
|
} = e;
|
|
862
|
-
const r =
|
|
863
|
-
let
|
|
864
|
+
const r = re(t), s = st(t), a = it(s), c = te(t), l = r === "y", u = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, p = o[a] / 2 - i[a] / 2;
|
|
865
|
+
let d;
|
|
864
866
|
switch (c) {
|
|
865
867
|
case "top":
|
|
866
|
-
|
|
868
|
+
d = {
|
|
867
869
|
x: u,
|
|
868
870
|
y: o.y - i.height
|
|
869
871
|
};
|
|
870
872
|
break;
|
|
871
873
|
case "bottom":
|
|
872
|
-
|
|
874
|
+
d = {
|
|
873
875
|
x: u,
|
|
874
876
|
y: o.y + o.height
|
|
875
877
|
};
|
|
876
878
|
break;
|
|
877
879
|
case "right":
|
|
878
|
-
|
|
880
|
+
d = {
|
|
879
881
|
x: o.x + o.width,
|
|
880
|
-
y:
|
|
882
|
+
y: f
|
|
881
883
|
};
|
|
882
884
|
break;
|
|
883
885
|
case "left":
|
|
884
|
-
|
|
886
|
+
d = {
|
|
885
887
|
x: o.x - i.width,
|
|
886
|
-
y:
|
|
888
|
+
y: f
|
|
887
889
|
};
|
|
888
890
|
break;
|
|
889
891
|
default:
|
|
890
|
-
|
|
892
|
+
d = {
|
|
891
893
|
x: o.x,
|
|
892
894
|
y: o.y
|
|
893
895
|
};
|
|
894
896
|
}
|
|
895
|
-
switch (
|
|
897
|
+
switch (me(t)) {
|
|
896
898
|
case "start":
|
|
897
|
-
|
|
899
|
+
d[s] -= p * (n && l ? -1 : 1);
|
|
898
900
|
break;
|
|
899
901
|
case "end":
|
|
900
|
-
|
|
902
|
+
d[s] += p * (n && l ? -1 : 1);
|
|
901
903
|
break;
|
|
902
904
|
}
|
|
903
|
-
return
|
|
905
|
+
return d;
|
|
904
906
|
}
|
|
905
|
-
const
|
|
907
|
+
const Er = async (e, t, n) => {
|
|
906
908
|
const {
|
|
907
909
|
placement: o = "bottom",
|
|
908
910
|
strategy: i = "absolute",
|
|
@@ -915,24 +917,24 @@ const Ar = async (e, t, n) => {
|
|
|
915
917
|
strategy: i
|
|
916
918
|
}), {
|
|
917
919
|
x: u,
|
|
918
|
-
y:
|
|
919
|
-
} =
|
|
920
|
+
y: f
|
|
921
|
+
} = vt(l, o, c), p = o, d = {}, h = 0;
|
|
920
922
|
for (let m = 0; m < a.length; m++) {
|
|
921
923
|
const {
|
|
922
924
|
name: g,
|
|
923
|
-
fn:
|
|
925
|
+
fn: y
|
|
924
926
|
} = a[m], {
|
|
925
|
-
x:
|
|
927
|
+
x: b,
|
|
926
928
|
y: x,
|
|
927
|
-
data:
|
|
928
|
-
reset:
|
|
929
|
-
} = await
|
|
929
|
+
data: w,
|
|
930
|
+
reset: v
|
|
931
|
+
} = await y({
|
|
930
932
|
x: u,
|
|
931
|
-
y:
|
|
933
|
+
y: f,
|
|
932
934
|
initialPlacement: o,
|
|
933
935
|
placement: p,
|
|
934
936
|
strategy: i,
|
|
935
|
-
middlewareData:
|
|
937
|
+
middlewareData: d,
|
|
936
938
|
rects: l,
|
|
937
939
|
platform: s,
|
|
938
940
|
elements: {
|
|
@@ -940,30 +942,30 @@ const Ar = async (e, t, n) => {
|
|
|
940
942
|
floating: t
|
|
941
943
|
}
|
|
942
944
|
});
|
|
943
|
-
u =
|
|
944
|
-
...
|
|
945
|
+
u = b ?? u, f = x ?? f, d = {
|
|
946
|
+
...d,
|
|
945
947
|
[g]: {
|
|
946
|
-
...
|
|
947
|
-
...
|
|
948
|
+
...d[g],
|
|
949
|
+
...w
|
|
948
950
|
}
|
|
949
|
-
},
|
|
951
|
+
}, v && h <= 50 && (h++, typeof v == "object" && (v.placement && (p = v.placement), v.rects && (l = v.rects === !0 ? await s.getElementRects({
|
|
950
952
|
reference: e,
|
|
951
953
|
floating: t,
|
|
952
954
|
strategy: i
|
|
953
|
-
}) :
|
|
955
|
+
}) : v.rects), {
|
|
954
956
|
x: u,
|
|
955
|
-
y:
|
|
956
|
-
} =
|
|
957
|
+
y: f
|
|
958
|
+
} = vt(l, p, c)), m = -1);
|
|
957
959
|
}
|
|
958
960
|
return {
|
|
959
961
|
x: u,
|
|
960
|
-
y:
|
|
962
|
+
y: f,
|
|
961
963
|
placement: p,
|
|
962
964
|
strategy: i,
|
|
963
|
-
middlewareData:
|
|
965
|
+
middlewareData: d
|
|
964
966
|
};
|
|
965
967
|
};
|
|
966
|
-
async function
|
|
968
|
+
async function Pe(e, t) {
|
|
967
969
|
var n;
|
|
968
970
|
t === void 0 && (t = {});
|
|
969
971
|
const {
|
|
@@ -976,39 +978,39 @@ async function _e(e, t) {
|
|
|
976
978
|
} = e, {
|
|
977
979
|
boundary: l = "clippingAncestors",
|
|
978
980
|
rootBoundary: u = "viewport",
|
|
979
|
-
elementContext:
|
|
981
|
+
elementContext: f = "floating",
|
|
980
982
|
altBoundary: p = !1,
|
|
981
|
-
padding:
|
|
982
|
-
} =
|
|
983
|
+
padding: d = 0
|
|
984
|
+
} = ee(t, e), h = Yt(d), g = a[p ? f === "floating" ? "reference" : "floating" : f], y = He(await r.getClippingRect({
|
|
983
985
|
element: (n = await (r.isElement == null ? void 0 : r.isElement(g))) == null || n ? g : g.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
|
|
984
986
|
boundary: l,
|
|
985
987
|
rootBoundary: u,
|
|
986
988
|
strategy: c
|
|
987
|
-
})),
|
|
989
|
+
})), b = f === "floating" ? {
|
|
988
990
|
x: o,
|
|
989
991
|
y: i,
|
|
990
992
|
width: s.floating.width,
|
|
991
993
|
height: s.floating.height
|
|
992
|
-
} : s.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)),
|
|
994
|
+
} : s.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), w = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
|
|
993
995
|
x: 1,
|
|
994
996
|
y: 1
|
|
995
997
|
} : {
|
|
996
998
|
x: 1,
|
|
997
999
|
y: 1
|
|
998
|
-
},
|
|
1000
|
+
}, v = He(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
999
1001
|
elements: a,
|
|
1000
|
-
rect:
|
|
1002
|
+
rect: b,
|
|
1001
1003
|
offsetParent: x,
|
|
1002
1004
|
strategy: c
|
|
1003
|
-
}) :
|
|
1005
|
+
}) : b);
|
|
1004
1006
|
return {
|
|
1005
|
-
top: (
|
|
1006
|
-
bottom: (
|
|
1007
|
-
left: (
|
|
1008
|
-
right: (
|
|
1007
|
+
top: (y.top - v.top + h.top) / w.y,
|
|
1008
|
+
bottom: (v.bottom - y.bottom + h.bottom) / w.y,
|
|
1009
|
+
left: (y.left - v.left + h.left) / w.x,
|
|
1010
|
+
right: (v.right - y.right + h.right) / w.x
|
|
1009
1011
|
};
|
|
1010
1012
|
}
|
|
1011
|
-
const
|
|
1013
|
+
const Tr = (e) => ({
|
|
1012
1014
|
name: "arrow",
|
|
1013
1015
|
options: e,
|
|
1014
1016
|
async fn(t) {
|
|
@@ -1023,29 +1025,29 @@ const Or = (e) => ({
|
|
|
1023
1025
|
} = t, {
|
|
1024
1026
|
element: l,
|
|
1025
1027
|
padding: u = 0
|
|
1026
|
-
} =
|
|
1028
|
+
} = ee(e, t) || {};
|
|
1027
1029
|
if (l == null)
|
|
1028
1030
|
return {};
|
|
1029
|
-
const
|
|
1031
|
+
const f = Yt(u), p = {
|
|
1030
1032
|
x: n,
|
|
1031
1033
|
y: o
|
|
1032
|
-
},
|
|
1033
|
-
let
|
|
1034
|
-
(!
|
|
1035
|
-
const
|
|
1034
|
+
}, d = st(i), h = it(d), m = await s.getDimensions(l), g = d === "y", y = g ? "top" : "left", b = g ? "bottom" : "right", x = g ? "clientHeight" : "clientWidth", w = r.reference[h] + r.reference[d] - p[d] - r.floating[h], v = p[d] - r.reference[d], A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
1035
|
+
let P = A ? A[x] : 0;
|
|
1036
|
+
(!P || !await (s.isElement == null ? void 0 : s.isElement(A))) && (P = a.floating[x] || r.floating[h]);
|
|
1037
|
+
const $ = w / 2 - v / 2, E = P / 2 - m[h] / 2 - 1, T = ne(f[y], E), N = ne(f[b], E), M = T, F = P - m[h] - N, O = P / 2 - m[h] / 2 + $, V = Qe(M, O, F), R = !c.arrow && me(i) != null && O !== V && r.reference[h] / 2 - (O < M ? T : N) - m[h] / 2 < 0, B = R ? O < M ? O - M : O - F : 0;
|
|
1036
1038
|
return {
|
|
1037
|
-
[
|
|
1039
|
+
[d]: p[d] + B,
|
|
1038
1040
|
data: {
|
|
1039
|
-
[
|
|
1040
|
-
centerOffset:
|
|
1041
|
-
...
|
|
1042
|
-
alignmentOffset:
|
|
1041
|
+
[d]: V,
|
|
1042
|
+
centerOffset: O - V - B,
|
|
1043
|
+
...R && {
|
|
1044
|
+
alignmentOffset: B
|
|
1043
1045
|
}
|
|
1044
1046
|
},
|
|
1045
|
-
reset:
|
|
1047
|
+
reset: R
|
|
1046
1048
|
};
|
|
1047
1049
|
}
|
|
1048
|
-
}),
|
|
1050
|
+
}), Rr = function(e) {
|
|
1049
1051
|
return e === void 0 && (e = {}), {
|
|
1050
1052
|
name: "flip",
|
|
1051
1053
|
options: e,
|
|
@@ -1060,64 +1062,64 @@ const Or = (e) => ({
|
|
|
1060
1062
|
elements: l
|
|
1061
1063
|
} = t, {
|
|
1062
1064
|
mainAxis: u = !0,
|
|
1063
|
-
crossAxis:
|
|
1065
|
+
crossAxis: f = !0,
|
|
1064
1066
|
fallbackPlacements: p,
|
|
1065
|
-
fallbackStrategy:
|
|
1067
|
+
fallbackStrategy: d = "bestFit",
|
|
1066
1068
|
fallbackAxisSideDirection: h = "none",
|
|
1067
1069
|
flipAlignment: m = !0,
|
|
1068
1070
|
...g
|
|
1069
|
-
} =
|
|
1071
|
+
} = ee(e, t);
|
|
1070
1072
|
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
1071
1073
|
return {};
|
|
1072
|
-
const
|
|
1073
|
-
!p &&
|
|
1074
|
-
const
|
|
1074
|
+
const y = te(i), b = re(a), x = te(a) === a, w = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), v = p || (x || !m ? [Fe(a)] : Pr(a)), A = h !== "none";
|
|
1075
|
+
!p && A && v.push(...Or(a, m, h, w));
|
|
1076
|
+
const P = [a, ...v], $ = await Pe(t, g), E = [];
|
|
1075
1077
|
let T = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
1076
|
-
if (u && E.push(
|
|
1077
|
-
const
|
|
1078
|
-
E.push(
|
|
1078
|
+
if (u && E.push($[y]), f) {
|
|
1079
|
+
const O = _r(i, s, w);
|
|
1080
|
+
E.push($[O[0]], $[O[1]]);
|
|
1079
1081
|
}
|
|
1080
1082
|
if (T = [...T, {
|
|
1081
1083
|
placement: i,
|
|
1082
1084
|
overflows: E
|
|
1083
|
-
}], !E.every((
|
|
1084
|
-
var
|
|
1085
|
-
const
|
|
1086
|
-
if (
|
|
1085
|
+
}], !E.every((O) => O <= 0)) {
|
|
1086
|
+
var N, M;
|
|
1087
|
+
const O = (((N = r.flip) == null ? void 0 : N.index) || 0) + 1, V = P[O];
|
|
1088
|
+
if (V)
|
|
1087
1089
|
return {
|
|
1088
1090
|
data: {
|
|
1089
|
-
index:
|
|
1091
|
+
index: O,
|
|
1090
1092
|
overflows: T
|
|
1091
1093
|
},
|
|
1092
1094
|
reset: {
|
|
1093
|
-
placement:
|
|
1095
|
+
placement: V
|
|
1094
1096
|
}
|
|
1095
1097
|
};
|
|
1096
|
-
let
|
|
1097
|
-
if (!
|
|
1098
|
-
switch (
|
|
1098
|
+
let R = (M = T.filter((B) => B.overflows[0] <= 0).sort((B, C) => B.overflows[1] - C.overflows[1])[0]) == null ? void 0 : M.placement;
|
|
1099
|
+
if (!R)
|
|
1100
|
+
switch (d) {
|
|
1099
1101
|
case "bestFit": {
|
|
1100
|
-
var
|
|
1101
|
-
const
|
|
1102
|
-
if (
|
|
1103
|
-
const
|
|
1104
|
-
return
|
|
1102
|
+
var F;
|
|
1103
|
+
const B = (F = T.filter((C) => {
|
|
1104
|
+
if (A) {
|
|
1105
|
+
const H = re(C.placement);
|
|
1106
|
+
return H === b || // Create a bias to the `y` side axis due to horizontal
|
|
1105
1107
|
// reading directions favoring greater width.
|
|
1106
|
-
|
|
1108
|
+
H === "y";
|
|
1107
1109
|
}
|
|
1108
1110
|
return !0;
|
|
1109
|
-
}).map((
|
|
1110
|
-
|
|
1111
|
+
}).map((C) => [C.placement, C.overflows.filter((H) => H > 0).reduce((H, G) => H + G, 0)]).sort((C, H) => C[1] - H[1])[0]) == null ? void 0 : F[0];
|
|
1112
|
+
B && (R = B);
|
|
1111
1113
|
break;
|
|
1112
1114
|
}
|
|
1113
1115
|
case "initialPlacement":
|
|
1114
|
-
|
|
1116
|
+
R = a;
|
|
1115
1117
|
break;
|
|
1116
1118
|
}
|
|
1117
|
-
if (i !==
|
|
1119
|
+
if (i !== R)
|
|
1118
1120
|
return {
|
|
1119
1121
|
reset: {
|
|
1120
|
-
placement:
|
|
1122
|
+
placement: R
|
|
1121
1123
|
}
|
|
1122
1124
|
};
|
|
1123
1125
|
}
|
|
@@ -1125,7 +1127,7 @@ const Or = (e) => ({
|
|
|
1125
1127
|
}
|
|
1126
1128
|
};
|
|
1127
1129
|
};
|
|
1128
|
-
function
|
|
1130
|
+
function $t(e, t) {
|
|
1129
1131
|
return {
|
|
1130
1132
|
top: e.top - t.height,
|
|
1131
1133
|
right: e.right - t.width,
|
|
@@ -1133,10 +1135,10 @@ function xt(e, t) {
|
|
|
1133
1135
|
left: e.left - t.width
|
|
1134
1136
|
};
|
|
1135
1137
|
}
|
|
1136
|
-
function
|
|
1137
|
-
return
|
|
1138
|
+
function _t(e) {
|
|
1139
|
+
return wr.some((t) => e[t] >= 0);
|
|
1138
1140
|
}
|
|
1139
|
-
const
|
|
1141
|
+
const Sr = function(e) {
|
|
1140
1142
|
return e === void 0 && (e = {}), {
|
|
1141
1143
|
name: "hide",
|
|
1142
1144
|
options: e,
|
|
@@ -1146,29 +1148,29 @@ const Er = function(e) {
|
|
|
1146
1148
|
} = t, {
|
|
1147
1149
|
strategy: o = "referenceHidden",
|
|
1148
1150
|
...i
|
|
1149
|
-
} =
|
|
1151
|
+
} = ee(e, t);
|
|
1150
1152
|
switch (o) {
|
|
1151
1153
|
case "referenceHidden": {
|
|
1152
|
-
const r = await
|
|
1154
|
+
const r = await Pe(t, {
|
|
1153
1155
|
...i,
|
|
1154
1156
|
elementContext: "reference"
|
|
1155
|
-
}), s =
|
|
1157
|
+
}), s = $t(r, n.reference);
|
|
1156
1158
|
return {
|
|
1157
1159
|
data: {
|
|
1158
1160
|
referenceHiddenOffsets: s,
|
|
1159
|
-
referenceHidden:
|
|
1161
|
+
referenceHidden: _t(s)
|
|
1160
1162
|
}
|
|
1161
1163
|
};
|
|
1162
1164
|
}
|
|
1163
1165
|
case "escaped": {
|
|
1164
|
-
const r = await
|
|
1166
|
+
const r = await Pe(t, {
|
|
1165
1167
|
...i,
|
|
1166
1168
|
altBoundary: !0
|
|
1167
|
-
}), s =
|
|
1169
|
+
}), s = $t(r, n.floating);
|
|
1168
1170
|
return {
|
|
1169
1171
|
data: {
|
|
1170
1172
|
escapedOffsets: s,
|
|
1171
|
-
escaped:
|
|
1173
|
+
escaped: _t(s)
|
|
1172
1174
|
}
|
|
1173
1175
|
};
|
|
1174
1176
|
}
|
|
@@ -1178,35 +1180,34 @@ const Er = function(e) {
|
|
|
1178
1180
|
}
|
|
1179
1181
|
};
|
|
1180
1182
|
};
|
|
1181
|
-
async function
|
|
1183
|
+
async function Dr(e, t) {
|
|
1182
1184
|
const {
|
|
1183
1185
|
placement: n,
|
|
1184
1186
|
platform: o,
|
|
1185
1187
|
elements: i
|
|
1186
|
-
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s =
|
|
1188
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = te(n), a = me(n), c = re(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, u = r && c ? -1 : 1, f = ee(t, e);
|
|
1187
1189
|
let {
|
|
1188
1190
|
mainAxis: p,
|
|
1189
|
-
crossAxis:
|
|
1191
|
+
crossAxis: d,
|
|
1190
1192
|
alignmentAxis: h
|
|
1191
|
-
} = typeof
|
|
1192
|
-
mainAxis:
|
|
1193
|
+
} = typeof f == "number" ? {
|
|
1194
|
+
mainAxis: f,
|
|
1193
1195
|
crossAxis: 0,
|
|
1194
1196
|
alignmentAxis: null
|
|
1195
1197
|
} : {
|
|
1196
|
-
mainAxis: 0,
|
|
1197
|
-
crossAxis: 0,
|
|
1198
|
-
alignmentAxis:
|
|
1199
|
-
...d
|
|
1198
|
+
mainAxis: f.mainAxis || 0,
|
|
1199
|
+
crossAxis: f.crossAxis || 0,
|
|
1200
|
+
alignmentAxis: f.alignmentAxis
|
|
1200
1201
|
};
|
|
1201
|
-
return a && typeof h == "number" && (
|
|
1202
|
-
x:
|
|
1202
|
+
return a && typeof h == "number" && (d = a === "end" ? h * -1 : h), c ? {
|
|
1203
|
+
x: d * u,
|
|
1203
1204
|
y: p * l
|
|
1204
1205
|
} : {
|
|
1205
1206
|
x: p * l,
|
|
1206
|
-
y:
|
|
1207
|
+
y: d * u
|
|
1207
1208
|
};
|
|
1208
1209
|
}
|
|
1209
|
-
const
|
|
1210
|
+
const Nr = function(e) {
|
|
1210
1211
|
return e === void 0 && (e = 0), {
|
|
1211
1212
|
name: "offset",
|
|
1212
1213
|
options: e,
|
|
@@ -1217,7 +1218,7 @@ const Sr = function(e) {
|
|
|
1217
1218
|
y: r,
|
|
1218
1219
|
placement: s,
|
|
1219
1220
|
middlewareData: a
|
|
1220
|
-
} = t, c = await
|
|
1221
|
+
} = t, c = await Dr(t, e);
|
|
1221
1222
|
return s === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
1222
1223
|
x: i + c.x,
|
|
1223
1224
|
y: r + c.y,
|
|
@@ -1228,7 +1229,7 @@ const Sr = function(e) {
|
|
|
1228
1229
|
};
|
|
1229
1230
|
}
|
|
1230
1231
|
};
|
|
1231
|
-
},
|
|
1232
|
+
}, Lr = function(e) {
|
|
1232
1233
|
return e === void 0 && (e = {}), {
|
|
1233
1234
|
name: "shift",
|
|
1234
1235
|
options: e,
|
|
@@ -1243,44 +1244,48 @@ const Sr = function(e) {
|
|
|
1243
1244
|
limiter: a = {
|
|
1244
1245
|
fn: (g) => {
|
|
1245
1246
|
let {
|
|
1246
|
-
x:
|
|
1247
|
-
y
|
|
1247
|
+
x: y,
|
|
1248
|
+
y: b
|
|
1248
1249
|
} = g;
|
|
1249
1250
|
return {
|
|
1250
|
-
x:
|
|
1251
|
-
y
|
|
1251
|
+
x: y,
|
|
1252
|
+
y: b
|
|
1252
1253
|
};
|
|
1253
1254
|
}
|
|
1254
1255
|
},
|
|
1255
1256
|
...c
|
|
1256
|
-
} =
|
|
1257
|
+
} = ee(e, t), l = {
|
|
1257
1258
|
x: n,
|
|
1258
1259
|
y: o
|
|
1259
|
-
}, u = await
|
|
1260
|
-
let
|
|
1260
|
+
}, u = await Pe(t, c), f = re(te(i)), p = ot(f);
|
|
1261
|
+
let d = l[p], h = l[f];
|
|
1261
1262
|
if (r) {
|
|
1262
|
-
const g = p === "y" ? "top" : "left",
|
|
1263
|
-
|
|
1263
|
+
const g = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", b = d + u[g], x = d - u[y];
|
|
1264
|
+
d = Qe(b, d, x);
|
|
1264
1265
|
}
|
|
1265
1266
|
if (s) {
|
|
1266
|
-
const g =
|
|
1267
|
-
h =
|
|
1267
|
+
const g = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", b = h + u[g], x = h - u[y];
|
|
1268
|
+
h = Qe(b, h, x);
|
|
1268
1269
|
}
|
|
1269
1270
|
const m = a.fn({
|
|
1270
1271
|
...t,
|
|
1271
|
-
[p]:
|
|
1272
|
-
[
|
|
1272
|
+
[p]: d,
|
|
1273
|
+
[f]: h
|
|
1273
1274
|
});
|
|
1274
1275
|
return {
|
|
1275
1276
|
...m,
|
|
1276
1277
|
data: {
|
|
1277
1278
|
x: m.x - n,
|
|
1278
|
-
y: m.y - o
|
|
1279
|
+
y: m.y - o,
|
|
1280
|
+
enabled: {
|
|
1281
|
+
[p]: r,
|
|
1282
|
+
[f]: s
|
|
1283
|
+
}
|
|
1279
1284
|
}
|
|
1280
1285
|
};
|
|
1281
1286
|
}
|
|
1282
1287
|
};
|
|
1283
|
-
},
|
|
1288
|
+
}, Mr = function(e) {
|
|
1284
1289
|
return e === void 0 && (e = {}), {
|
|
1285
1290
|
options: e,
|
|
1286
1291
|
fn(t) {
|
|
@@ -1294,12 +1299,12 @@ const Sr = function(e) {
|
|
|
1294
1299
|
offset: a = 0,
|
|
1295
1300
|
mainAxis: c = !0,
|
|
1296
1301
|
crossAxis: l = !0
|
|
1297
|
-
} =
|
|
1302
|
+
} = ee(e, t), u = {
|
|
1298
1303
|
x: n,
|
|
1299
1304
|
y: o
|
|
1300
|
-
},
|
|
1301
|
-
let
|
|
1302
|
-
const m =
|
|
1305
|
+
}, f = re(i), p = ot(f);
|
|
1306
|
+
let d = u[p], h = u[f];
|
|
1307
|
+
const m = ee(a, t), g = typeof m == "number" ? {
|
|
1303
1308
|
mainAxis: m,
|
|
1304
1309
|
crossAxis: 0
|
|
1305
1310
|
} : {
|
|
@@ -1308,53 +1313,54 @@ const Sr = function(e) {
|
|
|
1308
1313
|
...m
|
|
1309
1314
|
};
|
|
1310
1315
|
if (c) {
|
|
1311
|
-
const x = p === "y" ? "height" : "width",
|
|
1312
|
-
|
|
1316
|
+
const x = p === "y" ? "height" : "width", w = r.reference[p] - r.floating[x] + g.mainAxis, v = r.reference[p] + r.reference[x] - g.mainAxis;
|
|
1317
|
+
d < w ? d = w : d > v && (d = v);
|
|
1313
1318
|
}
|
|
1314
1319
|
if (l) {
|
|
1315
|
-
var
|
|
1316
|
-
const x = p === "y" ? "width" : "height",
|
|
1317
|
-
h <
|
|
1320
|
+
var y, b;
|
|
1321
|
+
const x = p === "y" ? "width" : "height", w = ["top", "left"].includes(te(i)), v = r.reference[f] - r.floating[x] + (w && ((y = s.offset) == null ? void 0 : y[f]) || 0) + (w ? 0 : g.crossAxis), A = r.reference[f] + r.reference[x] + (w ? 0 : ((b = s.offset) == null ? void 0 : b[f]) || 0) - (w ? g.crossAxis : 0);
|
|
1322
|
+
h < v ? h = v : h > A && (h = A);
|
|
1318
1323
|
}
|
|
1319
1324
|
return {
|
|
1320
|
-
[p]:
|
|
1321
|
-
[
|
|
1325
|
+
[p]: d,
|
|
1326
|
+
[f]: h
|
|
1322
1327
|
};
|
|
1323
1328
|
}
|
|
1324
1329
|
};
|
|
1325
|
-
},
|
|
1330
|
+
}, kr = function(e) {
|
|
1326
1331
|
return e === void 0 && (e = {}), {
|
|
1327
1332
|
name: "size",
|
|
1328
1333
|
options: e,
|
|
1329
1334
|
async fn(t) {
|
|
1335
|
+
var n, o;
|
|
1330
1336
|
const {
|
|
1331
|
-
placement:
|
|
1332
|
-
rects:
|
|
1333
|
-
platform:
|
|
1334
|
-
elements:
|
|
1337
|
+
placement: i,
|
|
1338
|
+
rects: r,
|
|
1339
|
+
platform: s,
|
|
1340
|
+
elements: a
|
|
1335
1341
|
} = t, {
|
|
1336
|
-
apply:
|
|
1342
|
+
apply: c = () => {
|
|
1337
1343
|
},
|
|
1338
|
-
...
|
|
1339
|
-
} =
|
|
1340
|
-
width:
|
|
1341
|
-
height:
|
|
1342
|
-
} =
|
|
1343
|
-
let
|
|
1344
|
-
|
|
1345
|
-
const
|
|
1346
|
-
let
|
|
1347
|
-
if (
|
|
1348
|
-
const
|
|
1349
|
-
d ?
|
|
1344
|
+
...l
|
|
1345
|
+
} = ee(e, t), u = await Pe(t, l), f = te(i), p = me(i), d = re(i) === "y", {
|
|
1346
|
+
width: h,
|
|
1347
|
+
height: m
|
|
1348
|
+
} = r.floating;
|
|
1349
|
+
let g, y;
|
|
1350
|
+
f === "top" || f === "bottom" ? (g = f, y = p === (await (s.isRTL == null ? void 0 : s.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (y = f, g = p === "end" ? "top" : "bottom");
|
|
1351
|
+
const b = m - u.top - u.bottom, x = h - u.left - u.right, w = ne(m - u[g], b), v = ne(h - u[y], x), A = !t.middlewareData.shift;
|
|
1352
|
+
let P = w, $ = v;
|
|
1353
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && ($ = x), (o = t.middlewareData.shift) != null && o.enabled.y && (P = b), A && !p) {
|
|
1354
|
+
const T = W(u.left, 0), N = W(u.right, 0), M = W(u.top, 0), F = W(u.bottom, 0);
|
|
1355
|
+
d ? $ = h - 2 * (T !== 0 || N !== 0 ? T + N : W(u.left, u.right)) : P = m - 2 * (M !== 0 || F !== 0 ? M + F : W(u.top, u.bottom));
|
|
1350
1356
|
}
|
|
1351
|
-
await
|
|
1357
|
+
await c({
|
|
1352
1358
|
...t,
|
|
1353
|
-
availableWidth:
|
|
1354
|
-
availableHeight:
|
|
1359
|
+
availableWidth: $,
|
|
1360
|
+
availableHeight: P
|
|
1355
1361
|
});
|
|
1356
|
-
const
|
|
1357
|
-
return
|
|
1362
|
+
const E = await s.getDimensions(a.floating);
|
|
1363
|
+
return h !== E.width || m !== E.height ? {
|
|
1358
1364
|
reset: {
|
|
1359
1365
|
rects: !0
|
|
1360
1366
|
}
|
|
@@ -1362,42 +1368,45 @@ const Sr = function(e) {
|
|
|
1362
1368
|
}
|
|
1363
1369
|
};
|
|
1364
1370
|
};
|
|
1365
|
-
function
|
|
1371
|
+
function ze() {
|
|
1372
|
+
return typeof window < "u";
|
|
1373
|
+
}
|
|
1374
|
+
function ye(e) {
|
|
1366
1375
|
return Xt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1367
1376
|
}
|
|
1368
|
-
function
|
|
1377
|
+
function U(e) {
|
|
1369
1378
|
var t;
|
|
1370
1379
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1371
1380
|
}
|
|
1372
|
-
function
|
|
1381
|
+
function J(e) {
|
|
1373
1382
|
var t;
|
|
1374
1383
|
return (t = (Xt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1375
1384
|
}
|
|
1376
1385
|
function Xt(e) {
|
|
1377
|
-
return e instanceof Node || e instanceof
|
|
1386
|
+
return ze() ? e instanceof Node || e instanceof U(e).Node : !1;
|
|
1378
1387
|
}
|
|
1379
1388
|
function Y(e) {
|
|
1380
|
-
return e instanceof Element || e instanceof
|
|
1389
|
+
return ze() ? e instanceof Element || e instanceof U(e).Element : !1;
|
|
1381
1390
|
}
|
|
1382
|
-
function
|
|
1383
|
-
return e instanceof HTMLElement || e instanceof
|
|
1391
|
+
function Z(e) {
|
|
1392
|
+
return ze() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
|
|
1384
1393
|
}
|
|
1385
|
-
function
|
|
1386
|
-
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
1394
|
+
function Pt(e) {
|
|
1395
|
+
return !ze() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
1387
1396
|
}
|
|
1388
|
-
function
|
|
1397
|
+
function Ce(e) {
|
|
1389
1398
|
const {
|
|
1390
1399
|
overflow: t,
|
|
1391
1400
|
overflowX: n,
|
|
1392
1401
|
overflowY: o,
|
|
1393
1402
|
display: i
|
|
1394
|
-
} =
|
|
1403
|
+
} = X(e);
|
|
1395
1404
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(i);
|
|
1396
1405
|
}
|
|
1397
|
-
function
|
|
1398
|
-
return ["table", "td", "th"].includes(
|
|
1406
|
+
function Ir(e) {
|
|
1407
|
+
return ["table", "td", "th"].includes(ye(e));
|
|
1399
1408
|
}
|
|
1400
|
-
function
|
|
1409
|
+
function je(e) {
|
|
1401
1410
|
return [":popover-open", ":modal"].some((t) => {
|
|
1402
1411
|
try {
|
|
1403
1412
|
return e.matches(t);
|
|
@@ -1406,31 +1415,31 @@ function Be(e) {
|
|
|
1406
1415
|
}
|
|
1407
1416
|
});
|
|
1408
1417
|
}
|
|
1409
|
-
function
|
|
1410
|
-
const t =
|
|
1411
|
-
return
|
|
1418
|
+
function at(e) {
|
|
1419
|
+
const t = ct(), n = Y(e) ? X(e) : e;
|
|
1420
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
1412
1421
|
}
|
|
1413
|
-
function
|
|
1414
|
-
let t =
|
|
1415
|
-
for (;
|
|
1416
|
-
if (
|
|
1422
|
+
function Fr(e) {
|
|
1423
|
+
let t = oe(e);
|
|
1424
|
+
for (; Z(t) && !pe(t); ) {
|
|
1425
|
+
if (at(t))
|
|
1417
1426
|
return t;
|
|
1418
|
-
if (
|
|
1427
|
+
if (je(t))
|
|
1419
1428
|
return null;
|
|
1420
|
-
t =
|
|
1429
|
+
t = oe(t);
|
|
1421
1430
|
}
|
|
1422
1431
|
return null;
|
|
1423
1432
|
}
|
|
1424
|
-
function
|
|
1433
|
+
function ct() {
|
|
1425
1434
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1426
1435
|
}
|
|
1427
|
-
function
|
|
1428
|
-
return ["html", "body", "#document"].includes(
|
|
1436
|
+
function pe(e) {
|
|
1437
|
+
return ["html", "body", "#document"].includes(ye(e));
|
|
1429
1438
|
}
|
|
1430
|
-
function
|
|
1431
|
-
return
|
|
1439
|
+
function X(e) {
|
|
1440
|
+
return U(e).getComputedStyle(e);
|
|
1432
1441
|
}
|
|
1433
|
-
function
|
|
1442
|
+
function We(e) {
|
|
1434
1443
|
return Y(e) ? {
|
|
1435
1444
|
scrollLeft: e.scrollLeft,
|
|
1436
1445
|
scrollTop: e.scrollTop
|
|
@@ -1439,145 +1448,158 @@ function ze(e) {
|
|
|
1439
1448
|
scrollTop: e.scrollY
|
|
1440
1449
|
};
|
|
1441
1450
|
}
|
|
1442
|
-
function
|
|
1443
|
-
if (
|
|
1451
|
+
function oe(e) {
|
|
1452
|
+
if (ye(e) === "html")
|
|
1444
1453
|
return e;
|
|
1445
1454
|
const t = (
|
|
1446
1455
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1447
1456
|
e.assignedSlot || // DOM Element detected.
|
|
1448
1457
|
e.parentNode || // ShadowRoot detected.
|
|
1449
|
-
|
|
1450
|
-
|
|
1458
|
+
Pt(e) && e.host || // Fallback.
|
|
1459
|
+
J(e)
|
|
1451
1460
|
);
|
|
1452
|
-
return
|
|
1461
|
+
return Pt(t) ? t.host : t;
|
|
1453
1462
|
}
|
|
1454
|
-
function
|
|
1455
|
-
const t =
|
|
1456
|
-
return
|
|
1463
|
+
function Gt(e) {
|
|
1464
|
+
const t = oe(e);
|
|
1465
|
+
return pe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) && Ce(t) ? t : Gt(t);
|
|
1457
1466
|
}
|
|
1458
|
-
function
|
|
1467
|
+
function Ae(e, t, n) {
|
|
1459
1468
|
var o;
|
|
1460
1469
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1461
|
-
const i =
|
|
1470
|
+
const i = Gt(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = U(i);
|
|
1462
1471
|
if (r) {
|
|
1463
|
-
const a =
|
|
1464
|
-
return t.concat(s, s.visualViewport || [],
|
|
1472
|
+
const a = tt(s);
|
|
1473
|
+
return t.concat(s, s.visualViewport || [], Ce(i) ? i : [], a && n ? Ae(a) : []);
|
|
1465
1474
|
}
|
|
1466
|
-
return t.concat(i,
|
|
1475
|
+
return t.concat(i, Ae(i, [], n));
|
|
1467
1476
|
}
|
|
1468
|
-
function
|
|
1477
|
+
function tt(e) {
|
|
1469
1478
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1470
1479
|
}
|
|
1471
|
-
function
|
|
1472
|
-
const t =
|
|
1480
|
+
function Kt(e) {
|
|
1481
|
+
const t = X(e);
|
|
1473
1482
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
1474
|
-
const i =
|
|
1483
|
+
const i = Z(e), r = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, a = Ie(n) !== r || Ie(o) !== s;
|
|
1475
1484
|
return a && (n = r, o = s), {
|
|
1476
1485
|
width: n,
|
|
1477
1486
|
height: o,
|
|
1478
1487
|
$: a
|
|
1479
1488
|
};
|
|
1480
1489
|
}
|
|
1481
|
-
function
|
|
1490
|
+
function lt(e) {
|
|
1482
1491
|
return Y(e) ? e : e.contextElement;
|
|
1483
1492
|
}
|
|
1484
|
-
function
|
|
1485
|
-
const t =
|
|
1486
|
-
if (!
|
|
1487
|
-
return
|
|
1493
|
+
function fe(e) {
|
|
1494
|
+
const t = lt(e);
|
|
1495
|
+
if (!Z(t))
|
|
1496
|
+
return K(1);
|
|
1488
1497
|
const n = t.getBoundingClientRect(), {
|
|
1489
1498
|
width: o,
|
|
1490
1499
|
height: i,
|
|
1491
1500
|
$: r
|
|
1492
|
-
} =
|
|
1493
|
-
let s = (r ?
|
|
1501
|
+
} = Kt(t);
|
|
1502
|
+
let s = (r ? Ie(n.width) : n.width) / o, a = (r ? Ie(n.height) : n.height) / i;
|
|
1494
1503
|
return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
1495
1504
|
x: s,
|
|
1496
1505
|
y: a
|
|
1497
1506
|
};
|
|
1498
1507
|
}
|
|
1499
|
-
const
|
|
1500
|
-
function
|
|
1501
|
-
const t =
|
|
1502
|
-
return !
|
|
1508
|
+
const Hr = /* @__PURE__ */ K(0);
|
|
1509
|
+
function Zt(e) {
|
|
1510
|
+
const t = U(e);
|
|
1511
|
+
return !ct() || !t.visualViewport ? Hr : {
|
|
1503
1512
|
x: t.visualViewport.offsetLeft,
|
|
1504
1513
|
y: t.visualViewport.offsetTop
|
|
1505
1514
|
};
|
|
1506
1515
|
}
|
|
1507
|
-
function
|
|
1508
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
1516
|
+
function Br(e, t, n) {
|
|
1517
|
+
return t === void 0 && (t = !1), !n || t && n !== U(e) ? !1 : t;
|
|
1509
1518
|
}
|
|
1510
|
-
function
|
|
1519
|
+
function ae(e, t, n, o) {
|
|
1511
1520
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1512
|
-
const i = e.getBoundingClientRect(), r =
|
|
1513
|
-
let s =
|
|
1514
|
-
t && (o ? Y(o) && (s =
|
|
1515
|
-
const a =
|
|
1516
|
-
let c = (i.left + a.x) / s.x, l = (i.top + a.y) / s.y, u = i.width / s.x,
|
|
1521
|
+
const i = e.getBoundingClientRect(), r = lt(e);
|
|
1522
|
+
let s = K(1);
|
|
1523
|
+
t && (o ? Y(o) && (s = fe(o)) : s = fe(e));
|
|
1524
|
+
const a = Br(r, n, o) ? Zt(r) : K(0);
|
|
1525
|
+
let c = (i.left + a.x) / s.x, l = (i.top + a.y) / s.y, u = i.width / s.x, f = i.height / s.y;
|
|
1517
1526
|
if (r) {
|
|
1518
|
-
const p =
|
|
1519
|
-
let h = p, m =
|
|
1520
|
-
for (; m && o &&
|
|
1521
|
-
const g =
|
|
1522
|
-
c *= g.x, l *= g.y, u *= g.x,
|
|
1527
|
+
const p = U(r), d = o && Y(o) ? U(o) : o;
|
|
1528
|
+
let h = p, m = tt(h);
|
|
1529
|
+
for (; m && o && d !== h; ) {
|
|
1530
|
+
const g = fe(m), y = m.getBoundingClientRect(), b = X(m), x = y.left + (m.clientLeft + parseFloat(b.paddingLeft)) * g.x, w = y.top + (m.clientTop + parseFloat(b.paddingTop)) * g.y;
|
|
1531
|
+
c *= g.x, l *= g.y, u *= g.x, f *= g.y, c += x, l += w, h = U(m), m = tt(h);
|
|
1523
1532
|
}
|
|
1524
1533
|
}
|
|
1525
|
-
return
|
|
1534
|
+
return He({
|
|
1526
1535
|
width: u,
|
|
1527
|
-
height:
|
|
1536
|
+
height: f,
|
|
1528
1537
|
x: c,
|
|
1529
1538
|
y: l
|
|
1530
1539
|
});
|
|
1531
1540
|
}
|
|
1532
|
-
function
|
|
1541
|
+
function ut(e, t) {
|
|
1542
|
+
const n = We(e).scrollLeft;
|
|
1543
|
+
return t ? t.left + n : ae(J(e)).left + n;
|
|
1544
|
+
}
|
|
1545
|
+
function Jt(e, t, n) {
|
|
1546
|
+
n === void 0 && (n = !1);
|
|
1547
|
+
const o = e.getBoundingClientRect(), i = o.left + t.scrollLeft - (n ? 0 : (
|
|
1548
|
+
// RTL <body> scrollbar.
|
|
1549
|
+
ut(e, o)
|
|
1550
|
+
)), r = o.top + t.scrollTop;
|
|
1551
|
+
return {
|
|
1552
|
+
x: i,
|
|
1553
|
+
y: r
|
|
1554
|
+
};
|
|
1555
|
+
}
|
|
1556
|
+
function zr(e) {
|
|
1533
1557
|
let {
|
|
1534
1558
|
elements: t,
|
|
1535
1559
|
rect: n,
|
|
1536
1560
|
offsetParent: o,
|
|
1537
1561
|
strategy: i
|
|
1538
1562
|
} = e;
|
|
1539
|
-
const r = i === "fixed", s =
|
|
1563
|
+
const r = i === "fixed", s = J(o), a = t ? je(t.floating) : !1;
|
|
1540
1564
|
if (o === s || a && r)
|
|
1541
1565
|
return n;
|
|
1542
1566
|
let c = {
|
|
1543
1567
|
scrollLeft: 0,
|
|
1544
1568
|
scrollTop: 0
|
|
1545
|
-
}, l =
|
|
1546
|
-
const u =
|
|
1547
|
-
if ((
|
|
1548
|
-
const
|
|
1549
|
-
l =
|
|
1569
|
+
}, l = K(1);
|
|
1570
|
+
const u = K(0), f = Z(o);
|
|
1571
|
+
if ((f || !f && !r) && ((ye(o) !== "body" || Ce(s)) && (c = We(o)), Z(o))) {
|
|
1572
|
+
const d = ae(o);
|
|
1573
|
+
l = fe(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
|
|
1550
1574
|
}
|
|
1575
|
+
const p = s && !f && !r ? Jt(s, c, !0) : K(0);
|
|
1551
1576
|
return {
|
|
1552
1577
|
width: n.width * l.x,
|
|
1553
1578
|
height: n.height * l.y,
|
|
1554
|
-
x: n.x * l.x - c.scrollLeft * l.x + u.x,
|
|
1555
|
-
y: n.y * l.y - c.scrollTop * l.y + u.y
|
|
1579
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + p.x,
|
|
1580
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + p.y
|
|
1556
1581
|
};
|
|
1557
1582
|
}
|
|
1558
|
-
function
|
|
1583
|
+
function jr(e) {
|
|
1559
1584
|
return Array.from(e.getClientRects());
|
|
1560
1585
|
}
|
|
1561
|
-
function
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
function Br(e) {
|
|
1565
|
-
const t = ee(e), n = ze(e), o = e.ownerDocument.body, i = W(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = W(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1566
|
-
let s = -n.scrollLeft + Kt(e);
|
|
1586
|
+
function Wr(e) {
|
|
1587
|
+
const t = J(e), n = We(e), o = e.ownerDocument.body, i = W(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = W(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1588
|
+
let s = -n.scrollLeft + ut(e);
|
|
1567
1589
|
const a = -n.scrollTop;
|
|
1568
|
-
return
|
|
1590
|
+
return X(o).direction === "rtl" && (s += W(t.clientWidth, o.clientWidth) - i), {
|
|
1569
1591
|
width: i,
|
|
1570
1592
|
height: r,
|
|
1571
1593
|
x: s,
|
|
1572
1594
|
y: a
|
|
1573
1595
|
};
|
|
1574
1596
|
}
|
|
1575
|
-
function
|
|
1576
|
-
const n =
|
|
1597
|
+
function qr(e, t) {
|
|
1598
|
+
const n = U(e), o = J(e), i = n.visualViewport;
|
|
1577
1599
|
let r = o.clientWidth, s = o.clientHeight, a = 0, c = 0;
|
|
1578
1600
|
if (i) {
|
|
1579
1601
|
r = i.width, s = i.height;
|
|
1580
|
-
const l =
|
|
1602
|
+
const l = ct();
|
|
1581
1603
|
(!l || l && t === "fixed") && (a = i.offsetLeft, c = i.offsetTop);
|
|
1582
1604
|
}
|
|
1583
1605
|
return {
|
|
@@ -1587,8 +1609,8 @@ function zr(e, t) {
|
|
|
1587
1609
|
y: c
|
|
1588
1610
|
};
|
|
1589
1611
|
}
|
|
1590
|
-
function
|
|
1591
|
-
const n =
|
|
1612
|
+
function Ur(e, t) {
|
|
1613
|
+
const n = ae(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = Z(e) ? fe(e) : K(1), s = e.clientWidth * r.x, a = e.clientHeight * r.y, c = i * r.x, l = o * r.y;
|
|
1592
1614
|
return {
|
|
1593
1615
|
width: s,
|
|
1594
1616
|
height: a,
|
|
@@ -1596,52 +1618,53 @@ function jr(e, t) {
|
|
|
1596
1618
|
y: l
|
|
1597
1619
|
};
|
|
1598
1620
|
}
|
|
1599
|
-
function
|
|
1621
|
+
function At(e, t, n) {
|
|
1600
1622
|
let o;
|
|
1601
1623
|
if (t === "viewport")
|
|
1602
|
-
o =
|
|
1624
|
+
o = qr(e, n);
|
|
1603
1625
|
else if (t === "document")
|
|
1604
|
-
o =
|
|
1626
|
+
o = Wr(J(e));
|
|
1605
1627
|
else if (Y(t))
|
|
1606
|
-
o =
|
|
1628
|
+
o = Ur(t, n);
|
|
1607
1629
|
else {
|
|
1608
|
-
const i =
|
|
1630
|
+
const i = Zt(e);
|
|
1609
1631
|
o = {
|
|
1610
|
-
...t,
|
|
1611
1632
|
x: t.x - i.x,
|
|
1612
|
-
y: t.y - i.y
|
|
1633
|
+
y: t.y - i.y,
|
|
1634
|
+
width: t.width,
|
|
1635
|
+
height: t.height
|
|
1613
1636
|
};
|
|
1614
1637
|
}
|
|
1615
|
-
return
|
|
1638
|
+
return He(o);
|
|
1616
1639
|
}
|
|
1617
|
-
function
|
|
1618
|
-
const n =
|
|
1619
|
-
return n === t || !Y(n) ||
|
|
1640
|
+
function Qt(e, t) {
|
|
1641
|
+
const n = oe(e);
|
|
1642
|
+
return n === t || !Y(n) || pe(n) ? !1 : X(n).position === "fixed" || Qt(n, t);
|
|
1620
1643
|
}
|
|
1621
|
-
function
|
|
1644
|
+
function Vr(e, t) {
|
|
1622
1645
|
const n = t.get(e);
|
|
1623
1646
|
if (n)
|
|
1624
1647
|
return n;
|
|
1625
|
-
let o =
|
|
1626
|
-
const r =
|
|
1627
|
-
let s = r ?
|
|
1628
|
-
for (; Y(s) && !
|
|
1629
|
-
const a =
|
|
1630
|
-
!c && a.position === "fixed" && (i = null), (r ? !c && !i : !c && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) ||
|
|
1648
|
+
let o = Ae(e, [], !1).filter((a) => Y(a) && ye(a) !== "body"), i = null;
|
|
1649
|
+
const r = X(e).position === "fixed";
|
|
1650
|
+
let s = r ? oe(e) : e;
|
|
1651
|
+
for (; Y(s) && !pe(s); ) {
|
|
1652
|
+
const a = X(s), c = at(s);
|
|
1653
|
+
!c && a.position === "fixed" && (i = null), (r ? !c && !i : !c && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Ce(s) && !c && Qt(e, s)) ? o = o.filter((u) => u !== s) : i = a, s = oe(s);
|
|
1631
1654
|
}
|
|
1632
1655
|
return t.set(e, o), o;
|
|
1633
1656
|
}
|
|
1634
|
-
function
|
|
1657
|
+
function Yr(e) {
|
|
1635
1658
|
let {
|
|
1636
1659
|
element: t,
|
|
1637
1660
|
boundary: n,
|
|
1638
1661
|
rootBoundary: o,
|
|
1639
1662
|
strategy: i
|
|
1640
1663
|
} = e;
|
|
1641
|
-
const s = [...n === "clippingAncestors" ?
|
|
1642
|
-
const
|
|
1643
|
-
return l.top = W(
|
|
1644
|
-
},
|
|
1664
|
+
const s = [...n === "clippingAncestors" ? je(t) ? [] : Vr(t, this._c) : [].concat(n), o], a = s[0], c = s.reduce((l, u) => {
|
|
1665
|
+
const f = At(t, u, i);
|
|
1666
|
+
return l.top = W(f.top, l.top), l.right = ne(f.right, l.right), l.bottom = ne(f.bottom, l.bottom), l.left = W(f.left, l.left), l;
|
|
1667
|
+
}, At(t, a, i));
|
|
1645
1668
|
return {
|
|
1646
1669
|
width: c.right - c.left,
|
|
1647
1670
|
height: c.bottom - c.top,
|
|
@@ -1649,64 +1672,69 @@ function Ur(e) {
|
|
|
1649
1672
|
y: c.top
|
|
1650
1673
|
};
|
|
1651
1674
|
}
|
|
1652
|
-
function
|
|
1675
|
+
function Xr(e) {
|
|
1653
1676
|
const {
|
|
1654
1677
|
width: t,
|
|
1655
1678
|
height: n
|
|
1656
|
-
} =
|
|
1679
|
+
} = Kt(e);
|
|
1657
1680
|
return {
|
|
1658
1681
|
width: t,
|
|
1659
1682
|
height: n
|
|
1660
1683
|
};
|
|
1661
1684
|
}
|
|
1662
|
-
function
|
|
1663
|
-
const o =
|
|
1685
|
+
function Gr(e, t, n) {
|
|
1686
|
+
const o = Z(t), i = J(t), r = n === "fixed", s = ae(e, !0, r, t);
|
|
1664
1687
|
let a = {
|
|
1665
1688
|
scrollLeft: 0,
|
|
1666
1689
|
scrollTop: 0
|
|
1667
1690
|
};
|
|
1668
|
-
const c =
|
|
1691
|
+
const c = K(0);
|
|
1669
1692
|
if (o || !o && !r)
|
|
1670
|
-
if ((
|
|
1671
|
-
const
|
|
1672
|
-
c.x =
|
|
1673
|
-
} else i && (c.x =
|
|
1674
|
-
const l = s.left + a.scrollLeft - c.x,
|
|
1693
|
+
if ((ye(t) !== "body" || Ce(i)) && (a = We(t)), o) {
|
|
1694
|
+
const p = ae(t, !0, r, t);
|
|
1695
|
+
c.x = p.x + t.clientLeft, c.y = p.y + t.clientTop;
|
|
1696
|
+
} else i && (c.x = ut(i));
|
|
1697
|
+
const l = i && !o && !r ? Jt(i, a) : K(0), u = s.left + a.scrollLeft - c.x - l.x, f = s.top + a.scrollTop - c.y - l.y;
|
|
1675
1698
|
return {
|
|
1676
|
-
x:
|
|
1677
|
-
y:
|
|
1699
|
+
x: u,
|
|
1700
|
+
y: f,
|
|
1678
1701
|
width: s.width,
|
|
1679
1702
|
height: s.height
|
|
1680
1703
|
};
|
|
1681
1704
|
}
|
|
1682
1705
|
function Ve(e) {
|
|
1683
|
-
return
|
|
1684
|
-
}
|
|
1685
|
-
function _t(e, t) {
|
|
1686
|
-
return !K(e) || G(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
1706
|
+
return X(e).position === "static";
|
|
1687
1707
|
}
|
|
1688
|
-
function
|
|
1689
|
-
|
|
1690
|
-
|
|
1708
|
+
function Ot(e, t) {
|
|
1709
|
+
if (!Z(e) || X(e).position === "fixed")
|
|
1710
|
+
return null;
|
|
1711
|
+
if (t)
|
|
1712
|
+
return t(e);
|
|
1713
|
+
let n = e.offsetParent;
|
|
1714
|
+
return J(e) === n && (n = n.ownerDocument.body), n;
|
|
1715
|
+
}
|
|
1716
|
+
function en(e, t) {
|
|
1717
|
+
const n = U(e);
|
|
1718
|
+
if (je(e))
|
|
1691
1719
|
return n;
|
|
1692
|
-
if (!
|
|
1693
|
-
let i =
|
|
1694
|
-
for (; i && !
|
|
1720
|
+
if (!Z(e)) {
|
|
1721
|
+
let i = oe(e);
|
|
1722
|
+
for (; i && !pe(i); ) {
|
|
1695
1723
|
if (Y(i) && !Ve(i))
|
|
1696
1724
|
return i;
|
|
1697
|
-
i =
|
|
1725
|
+
i = oe(i);
|
|
1698
1726
|
}
|
|
1699
1727
|
return n;
|
|
1700
1728
|
}
|
|
1701
|
-
let o =
|
|
1702
|
-
for (; o &&
|
|
1703
|
-
o =
|
|
1704
|
-
return o &&
|
|
1729
|
+
let o = Ot(e, t);
|
|
1730
|
+
for (; o && Ir(o) && Ve(o); )
|
|
1731
|
+
o = Ot(o, t);
|
|
1732
|
+
return o && pe(o) && Ve(o) && !at(o) ? n : o || Fr(e) || n;
|
|
1705
1733
|
}
|
|
1706
|
-
const
|
|
1707
|
-
const t = this.getOffsetParent ||
|
|
1734
|
+
const Kr = async function(e) {
|
|
1735
|
+
const t = this.getOffsetParent || en, n = this.getDimensions, o = await n(e.floating);
|
|
1708
1736
|
return {
|
|
1709
|
-
reference:
|
|
1737
|
+
reference: Gr(e.reference, await t(e.floating), e.strategy),
|
|
1710
1738
|
floating: {
|
|
1711
1739
|
x: 0,
|
|
1712
1740
|
y: 0,
|
|
@@ -1715,68 +1743,71 @@ const Yr = async function(e) {
|
|
|
1715
1743
|
}
|
|
1716
1744
|
};
|
|
1717
1745
|
};
|
|
1718
|
-
function
|
|
1719
|
-
return
|
|
1720
|
-
}
|
|
1721
|
-
const
|
|
1722
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1723
|
-
getDocumentElement:
|
|
1724
|
-
getClippingRect:
|
|
1725
|
-
getOffsetParent:
|
|
1726
|
-
getElementRects:
|
|
1727
|
-
getClientRects:
|
|
1728
|
-
getDimensions:
|
|
1729
|
-
getScale:
|
|
1746
|
+
function Zr(e) {
|
|
1747
|
+
return X(e).direction === "rtl";
|
|
1748
|
+
}
|
|
1749
|
+
const Jr = {
|
|
1750
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: zr,
|
|
1751
|
+
getDocumentElement: J,
|
|
1752
|
+
getClippingRect: Yr,
|
|
1753
|
+
getOffsetParent: en,
|
|
1754
|
+
getElementRects: Kr,
|
|
1755
|
+
getClientRects: jr,
|
|
1756
|
+
getDimensions: Xr,
|
|
1757
|
+
getScale: fe,
|
|
1730
1758
|
isElement: Y,
|
|
1731
|
-
isRTL:
|
|
1759
|
+
isRTL: Zr
|
|
1732
1760
|
};
|
|
1733
|
-
function
|
|
1761
|
+
function tn(e, t) {
|
|
1762
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1763
|
+
}
|
|
1764
|
+
function Qr(e, t) {
|
|
1734
1765
|
let n = null, o;
|
|
1735
|
-
const i =
|
|
1766
|
+
const i = J(e);
|
|
1736
1767
|
function r() {
|
|
1737
1768
|
var a;
|
|
1738
1769
|
clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
|
|
1739
1770
|
}
|
|
1740
1771
|
function s(a, c) {
|
|
1741
1772
|
a === void 0 && (a = !1), c === void 0 && (c = 1), r();
|
|
1742
|
-
const {
|
|
1743
|
-
left:
|
|
1744
|
-
top:
|
|
1745
|
-
width:
|
|
1746
|
-
height:
|
|
1747
|
-
} =
|
|
1748
|
-
if (a || t(), !
|
|
1773
|
+
const l = e.getBoundingClientRect(), {
|
|
1774
|
+
left: u,
|
|
1775
|
+
top: f,
|
|
1776
|
+
width: p,
|
|
1777
|
+
height: d
|
|
1778
|
+
} = l;
|
|
1779
|
+
if (a || t(), !p || !d)
|
|
1749
1780
|
return;
|
|
1750
|
-
const
|
|
1751
|
-
rootMargin: -
|
|
1752
|
-
threshold: W(0,
|
|
1781
|
+
const h = Ne(f), m = Ne(i.clientWidth - (u + p)), g = Ne(i.clientHeight - (f + d)), y = Ne(u), x = {
|
|
1782
|
+
rootMargin: -h + "px " + -m + "px " + -g + "px " + -y + "px",
|
|
1783
|
+
threshold: W(0, ne(1, c)) || 1
|
|
1753
1784
|
};
|
|
1754
|
-
let
|
|
1755
|
-
function
|
|
1756
|
-
const P =
|
|
1785
|
+
let w = !0;
|
|
1786
|
+
function v(A) {
|
|
1787
|
+
const P = A[0].intersectionRatio;
|
|
1757
1788
|
if (P !== c) {
|
|
1758
|
-
if (!
|
|
1789
|
+
if (!w)
|
|
1759
1790
|
return s();
|
|
1760
1791
|
P ? s(!1, P) : o = setTimeout(() => {
|
|
1761
1792
|
s(!1, 1e-7);
|
|
1762
1793
|
}, 1e3);
|
|
1763
1794
|
}
|
|
1764
|
-
|
|
1795
|
+
P === 1 && !tn(l, e.getBoundingClientRect()) && s(), w = !1;
|
|
1765
1796
|
}
|
|
1766
1797
|
try {
|
|
1767
|
-
n = new IntersectionObserver(
|
|
1768
|
-
...
|
|
1798
|
+
n = new IntersectionObserver(v, {
|
|
1799
|
+
...x,
|
|
1769
1800
|
// Handle <iframe>s
|
|
1770
1801
|
root: i.ownerDocument
|
|
1771
1802
|
});
|
|
1772
1803
|
} catch {
|
|
1773
|
-
n = new IntersectionObserver(
|
|
1804
|
+
n = new IntersectionObserver(v, x);
|
|
1774
1805
|
}
|
|
1775
1806
|
n.observe(e);
|
|
1776
1807
|
}
|
|
1777
1808
|
return s(!0), r;
|
|
1778
1809
|
}
|
|
1779
|
-
function
|
|
1810
|
+
function eo(e, t, n, o) {
|
|
1780
1811
|
o === void 0 && (o = {});
|
|
1781
1812
|
const {
|
|
1782
1813
|
ancestorScroll: i = !0,
|
|
@@ -1784,49 +1815,49 @@ function Zr(e, t, n, o) {
|
|
|
1784
1815
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1785
1816
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1786
1817
|
animationFrame: c = !1
|
|
1787
|
-
} = o, l =
|
|
1788
|
-
u.forEach((
|
|
1789
|
-
i &&
|
|
1818
|
+
} = o, l = lt(e), u = i || r ? [...l ? Ae(l) : [], ...Ae(t)] : [];
|
|
1819
|
+
u.forEach((y) => {
|
|
1820
|
+
i && y.addEventListener("scroll", n, {
|
|
1790
1821
|
passive: !0
|
|
1791
|
-
}), r &&
|
|
1822
|
+
}), r && y.addEventListener("resize", n);
|
|
1792
1823
|
});
|
|
1793
|
-
const
|
|
1794
|
-
let p = -1,
|
|
1795
|
-
s && (
|
|
1796
|
-
let [
|
|
1797
|
-
|
|
1824
|
+
const f = l && a ? Qr(l, n) : null;
|
|
1825
|
+
let p = -1, d = null;
|
|
1826
|
+
s && (d = new ResizeObserver((y) => {
|
|
1827
|
+
let [b] = y;
|
|
1828
|
+
b && b.target === l && d && (d.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1798
1829
|
var x;
|
|
1799
|
-
(x =
|
|
1830
|
+
(x = d) == null || x.observe(t);
|
|
1800
1831
|
})), n();
|
|
1801
|
-
}), l && !c &&
|
|
1802
|
-
let h, m = c ?
|
|
1832
|
+
}), l && !c && d.observe(l), d.observe(t));
|
|
1833
|
+
let h, m = c ? ae(e) : null;
|
|
1803
1834
|
c && g();
|
|
1804
1835
|
function g() {
|
|
1805
|
-
const
|
|
1806
|
-
m && (
|
|
1836
|
+
const y = ae(e);
|
|
1837
|
+
m && !tn(m, y) && n(), m = y, h = requestAnimationFrame(g);
|
|
1807
1838
|
}
|
|
1808
1839
|
return n(), () => {
|
|
1809
|
-
var
|
|
1810
|
-
u.forEach((
|
|
1811
|
-
i &&
|
|
1812
|
-
}),
|
|
1840
|
+
var y;
|
|
1841
|
+
u.forEach((b) => {
|
|
1842
|
+
i && b.removeEventListener("scroll", n), r && b.removeEventListener("resize", n);
|
|
1843
|
+
}), f == null || f(), (y = d) == null || y.disconnect(), d = null, c && cancelAnimationFrame(h);
|
|
1813
1844
|
};
|
|
1814
1845
|
}
|
|
1815
|
-
const
|
|
1846
|
+
const to = Nr, no = Lr, ro = Rr, oo = kr, io = Sr, Ct = Tr, so = Mr, ao = (e, t, n) => {
|
|
1816
1847
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
1817
|
-
platform:
|
|
1848
|
+
platform: Jr,
|
|
1818
1849
|
...n
|
|
1819
1850
|
}, r = {
|
|
1820
1851
|
...i.platform,
|
|
1821
1852
|
_c: o
|
|
1822
1853
|
};
|
|
1823
|
-
return
|
|
1854
|
+
return Er(e, t, {
|
|
1824
1855
|
...i,
|
|
1825
1856
|
platform: r
|
|
1826
1857
|
});
|
|
1827
1858
|
};
|
|
1828
|
-
var
|
|
1829
|
-
function
|
|
1859
|
+
var Me = typeof document < "u" ? St : S;
|
|
1860
|
+
function Be(e, t) {
|
|
1830
1861
|
if (e === t)
|
|
1831
1862
|
return !0;
|
|
1832
1863
|
if (typeof e != typeof t)
|
|
@@ -1838,7 +1869,7 @@ function He(e, t) {
|
|
|
1838
1869
|
if (Array.isArray(e)) {
|
|
1839
1870
|
if (n = e.length, n !== t.length) return !1;
|
|
1840
1871
|
for (o = n; o-- !== 0; )
|
|
1841
|
-
if (!
|
|
1872
|
+
if (!Be(e[o], t[o]))
|
|
1842
1873
|
return !1;
|
|
1843
1874
|
return !0;
|
|
1844
1875
|
}
|
|
@@ -1849,27 +1880,27 @@ function He(e, t) {
|
|
|
1849
1880
|
return !1;
|
|
1850
1881
|
for (o = n; o-- !== 0; ) {
|
|
1851
1882
|
const r = i[o];
|
|
1852
|
-
if (!(r === "_owner" && e.$$typeof) && !
|
|
1883
|
+
if (!(r === "_owner" && e.$$typeof) && !Be(e[r], t[r]))
|
|
1853
1884
|
return !1;
|
|
1854
1885
|
}
|
|
1855
1886
|
return !0;
|
|
1856
1887
|
}
|
|
1857
1888
|
return e !== e && t !== t;
|
|
1858
1889
|
}
|
|
1859
|
-
function
|
|
1890
|
+
function nn(e) {
|
|
1860
1891
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1861
1892
|
}
|
|
1862
|
-
function
|
|
1863
|
-
const n =
|
|
1893
|
+
function Et(e, t) {
|
|
1894
|
+
const n = nn(e);
|
|
1864
1895
|
return Math.round(t * n) / n;
|
|
1865
1896
|
}
|
|
1866
|
-
function
|
|
1897
|
+
function Ye(e) {
|
|
1867
1898
|
const t = L.useRef(e);
|
|
1868
|
-
return
|
|
1899
|
+
return Me(() => {
|
|
1869
1900
|
t.current = e;
|
|
1870
1901
|
}), t;
|
|
1871
1902
|
}
|
|
1872
|
-
function
|
|
1903
|
+
function co(e) {
|
|
1873
1904
|
e === void 0 && (e = {});
|
|
1874
1905
|
const {
|
|
1875
1906
|
placement: t = "bottom",
|
|
@@ -1883,91 +1914,95 @@ function io(e) {
|
|
|
1883
1914
|
transform: a = !0,
|
|
1884
1915
|
whileElementsMounted: c,
|
|
1885
1916
|
open: l
|
|
1886
|
-
} = e, [u,
|
|
1917
|
+
} = e, [u, f] = L.useState({
|
|
1887
1918
|
x: 0,
|
|
1888
1919
|
y: 0,
|
|
1889
1920
|
strategy: n,
|
|
1890
1921
|
placement: t,
|
|
1891
1922
|
middlewareData: {},
|
|
1892
1923
|
isPositioned: !1
|
|
1893
|
-
}), [p,
|
|
1894
|
-
|
|
1895
|
-
const [h, m] = L.useState(null), [g,
|
|
1896
|
-
|
|
1897
|
-
}, []), x = L.useCallback((
|
|
1898
|
-
|
|
1899
|
-
}, []),
|
|
1900
|
-
if (!
|
|
1924
|
+
}), [p, d] = L.useState(o);
|
|
1925
|
+
Be(p, o) || d(o);
|
|
1926
|
+
const [h, m] = L.useState(null), [g, y] = L.useState(null), b = L.useCallback((C) => {
|
|
1927
|
+
C !== A.current && (A.current = C, m(C));
|
|
1928
|
+
}, []), x = L.useCallback((C) => {
|
|
1929
|
+
C !== P.current && (P.current = C, y(C));
|
|
1930
|
+
}, []), w = r || h, v = s || g, A = L.useRef(null), P = L.useRef(null), $ = L.useRef(u), E = c != null, T = Ye(c), N = Ye(i), M = Ye(l), F = L.useCallback(() => {
|
|
1931
|
+
if (!A.current || !P.current)
|
|
1901
1932
|
return;
|
|
1902
|
-
const
|
|
1933
|
+
const C = {
|
|
1903
1934
|
placement: t,
|
|
1904
1935
|
strategy: n,
|
|
1905
1936
|
middleware: p
|
|
1906
1937
|
};
|
|
1907
|
-
|
|
1908
|
-
const
|
|
1909
|
-
...
|
|
1910
|
-
|
|
1938
|
+
N.current && (C.platform = N.current), ao(A.current, P.current, C).then((H) => {
|
|
1939
|
+
const G = {
|
|
1940
|
+
...H,
|
|
1941
|
+
// The floating element's position may be recomputed while it's closed
|
|
1942
|
+
// but still mounted (such as when transitioning out). To ensure
|
|
1943
|
+
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1944
|
+
// setting it to `true` when `open === false` (must be specified).
|
|
1945
|
+
isPositioned: M.current !== !1
|
|
1911
1946
|
};
|
|
1912
|
-
|
|
1913
|
-
|
|
1947
|
+
O.current && !Be($.current, G) && ($.current = G, Cn.flushSync(() => {
|
|
1948
|
+
f(G);
|
|
1914
1949
|
}));
|
|
1915
1950
|
});
|
|
1916
|
-
}, [p, t, n,
|
|
1917
|
-
|
|
1918
|
-
l === !1 &&
|
|
1919
|
-
...
|
|
1951
|
+
}, [p, t, n, N, M]);
|
|
1952
|
+
Me(() => {
|
|
1953
|
+
l === !1 && $.current.isPositioned && ($.current.isPositioned = !1, f((C) => ({
|
|
1954
|
+
...C,
|
|
1920
1955
|
isPositioned: !1
|
|
1921
1956
|
})));
|
|
1922
1957
|
}, [l]);
|
|
1923
|
-
const
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
}), []),
|
|
1927
|
-
if (
|
|
1958
|
+
const O = L.useRef(!1);
|
|
1959
|
+
Me(() => (O.current = !0, () => {
|
|
1960
|
+
O.current = !1;
|
|
1961
|
+
}), []), Me(() => {
|
|
1962
|
+
if (w && (A.current = w), v && (P.current = v), w && v) {
|
|
1928
1963
|
if (T.current)
|
|
1929
|
-
return T.current(
|
|
1930
|
-
|
|
1964
|
+
return T.current(w, v, F);
|
|
1965
|
+
F();
|
|
1931
1966
|
}
|
|
1932
|
-
}, [
|
|
1933
|
-
const
|
|
1934
|
-
reference:
|
|
1935
|
-
floating:
|
|
1936
|
-
setReference:
|
|
1967
|
+
}, [w, v, F, T, E]);
|
|
1968
|
+
const V = L.useMemo(() => ({
|
|
1969
|
+
reference: A,
|
|
1970
|
+
floating: P,
|
|
1971
|
+
setReference: b,
|
|
1937
1972
|
setFloating: x
|
|
1938
|
-
}), [
|
|
1939
|
-
reference:
|
|
1940
|
-
floating:
|
|
1941
|
-
}), [
|
|
1942
|
-
const
|
|
1973
|
+
}), [b, x]), R = L.useMemo(() => ({
|
|
1974
|
+
reference: w,
|
|
1975
|
+
floating: v
|
|
1976
|
+
}), [w, v]), B = L.useMemo(() => {
|
|
1977
|
+
const C = {
|
|
1943
1978
|
position: n,
|
|
1944
1979
|
left: 0,
|
|
1945
1980
|
top: 0
|
|
1946
1981
|
};
|
|
1947
|
-
if (!
|
|
1948
|
-
return
|
|
1949
|
-
const
|
|
1982
|
+
if (!R.floating)
|
|
1983
|
+
return C;
|
|
1984
|
+
const H = Et(R.floating, u.x), G = Et(R.floating, u.y);
|
|
1950
1985
|
return a ? {
|
|
1951
|
-
...
|
|
1952
|
-
transform: "translate(" +
|
|
1953
|
-
...
|
|
1986
|
+
...C,
|
|
1987
|
+
transform: "translate(" + H + "px, " + G + "px)",
|
|
1988
|
+
...nn(R.floating) >= 1.5 && {
|
|
1954
1989
|
willChange: "transform"
|
|
1955
1990
|
}
|
|
1956
1991
|
} : {
|
|
1957
1992
|
position: n,
|
|
1958
|
-
left:
|
|
1959
|
-
top:
|
|
1993
|
+
left: H,
|
|
1994
|
+
top: G
|
|
1960
1995
|
};
|
|
1961
|
-
}, [n, a,
|
|
1996
|
+
}, [n, a, R.floating, u.x, u.y]);
|
|
1962
1997
|
return L.useMemo(() => ({
|
|
1963
1998
|
...u,
|
|
1964
|
-
update:
|
|
1965
|
-
refs:
|
|
1966
|
-
elements:
|
|
1967
|
-
floatingStyles:
|
|
1968
|
-
}), [u,
|
|
1999
|
+
update: F,
|
|
2000
|
+
refs: V,
|
|
2001
|
+
elements: R,
|
|
2002
|
+
floatingStyles: B
|
|
2003
|
+
}), [u, F, V, R, B]);
|
|
1969
2004
|
}
|
|
1970
|
-
const
|
|
2005
|
+
const lo = (e) => {
|
|
1971
2006
|
function t(n) {
|
|
1972
2007
|
return {}.hasOwnProperty.call(n, "current");
|
|
1973
2008
|
}
|
|
@@ -1979,50 +2014,50 @@ const so = (e) => {
|
|
|
1979
2014
|
element: o,
|
|
1980
2015
|
padding: i
|
|
1981
2016
|
} = typeof e == "function" ? e(n) : e;
|
|
1982
|
-
return o && t(o) ? o.current != null ?
|
|
2017
|
+
return o && t(o) ? o.current != null ? Ct({
|
|
1983
2018
|
element: o.current,
|
|
1984
2019
|
padding: i
|
|
1985
|
-
}).fn(n) : {} : o ?
|
|
2020
|
+
}).fn(n) : {} : o ? Ct({
|
|
1986
2021
|
element: o,
|
|
1987
2022
|
padding: i
|
|
1988
2023
|
}).fn(n) : {};
|
|
1989
2024
|
}
|
|
1990
2025
|
};
|
|
1991
|
-
},
|
|
1992
|
-
...
|
|
1993
|
-
options: [e, t]
|
|
1994
|
-
}), co = (e, t) => ({
|
|
1995
|
-
...Qr(e),
|
|
1996
|
-
options: [e, t]
|
|
1997
|
-
}), lo = (e, t) => ({
|
|
1998
|
-
...ro(e),
|
|
1999
|
-
options: [e, t]
|
|
2000
|
-
}), uo = (e, t) => ({
|
|
2001
|
-
...eo(e),
|
|
2026
|
+
}, uo = (e, t) => ({
|
|
2027
|
+
...to(e),
|
|
2002
2028
|
options: [e, t]
|
|
2003
2029
|
}), fo = (e, t) => ({
|
|
2004
|
-
...
|
|
2030
|
+
...no(e),
|
|
2005
2031
|
options: [e, t]
|
|
2006
2032
|
}), po = (e, t) => ({
|
|
2007
|
-
...
|
|
2033
|
+
...so(e),
|
|
2008
2034
|
options: [e, t]
|
|
2009
2035
|
}), ho = (e, t) => ({
|
|
2010
|
-
...
|
|
2036
|
+
...ro(e),
|
|
2037
|
+
options: [e, t]
|
|
2038
|
+
}), go = (e, t) => ({
|
|
2039
|
+
...oo(e),
|
|
2040
|
+
options: [e, t]
|
|
2041
|
+
}), mo = (e, t) => ({
|
|
2042
|
+
...io(e),
|
|
2011
2043
|
options: [e, t]
|
|
2012
|
-
}),
|
|
2044
|
+
}), yo = (e, t) => ({
|
|
2045
|
+
...lo(e),
|
|
2046
|
+
options: [e, t]
|
|
2047
|
+
}), bo = /* @__PURE__ */ I((e, t) => {
|
|
2013
2048
|
const { children: n, width: o = 10, height: i = 5, ...r } = e;
|
|
2014
|
-
return /* @__PURE__ */
|
|
2049
|
+
return /* @__PURE__ */ _(ce.svg, D({}, r, {
|
|
2015
2050
|
ref: t,
|
|
2016
2051
|
width: o,
|
|
2017
2052
|
height: i,
|
|
2018
2053
|
viewBox: "0 0 30 10",
|
|
2019
2054
|
preserveAspectRatio: "none"
|
|
2020
|
-
}), e.asChild ? n : /* @__PURE__ */
|
|
2055
|
+
}), e.asChild ? n : /* @__PURE__ */ _("polygon", {
|
|
2021
2056
|
points: "0,0 30,0 15,10"
|
|
2022
2057
|
}));
|
|
2023
|
-
}),
|
|
2024
|
-
function
|
|
2025
|
-
const [t, n] =
|
|
2058
|
+
}), xo = bo;
|
|
2059
|
+
function wo(e) {
|
|
2060
|
+
const [t, n] = q(void 0);
|
|
2026
2061
|
return de(() => {
|
|
2027
2062
|
if (e) {
|
|
2028
2063
|
n({
|
|
@@ -2052,142 +2087,142 @@ function vo(e) {
|
|
|
2052
2087
|
e
|
|
2053
2088
|
]), t;
|
|
2054
2089
|
}
|
|
2055
|
-
const
|
|
2056
|
-
const { __scopePopper: t, children: n } = e, [o, i] =
|
|
2057
|
-
return /* @__PURE__ */
|
|
2090
|
+
const rn = "Popper", [on, sn] = Wt(rn), [vo, an] = on(rn), $o = (e) => {
|
|
2091
|
+
const { __scopePopper: t, children: n } = e, [o, i] = q(null);
|
|
2092
|
+
return /* @__PURE__ */ _(vo, {
|
|
2058
2093
|
scope: t,
|
|
2059
2094
|
anchor: o,
|
|
2060
2095
|
onAnchorChange: i
|
|
2061
2096
|
}, n);
|
|
2062
|
-
},
|
|
2063
|
-
const { __scopePopper: n, virtualRef: o, ...i } = e, r =
|
|
2097
|
+
}, _o = "PopperAnchor", Po = /* @__PURE__ */ I((e, t) => {
|
|
2098
|
+
const { __scopePopper: n, virtualRef: o, ...i } = e, r = an(_o, n), s = k(null), a = he(t, s);
|
|
2064
2099
|
return S(() => {
|
|
2065
2100
|
r.onAnchorChange((o == null ? void 0 : o.current) || s.current);
|
|
2066
|
-
}), o ? null : /* @__PURE__ */
|
|
2101
|
+
}), o ? null : /* @__PURE__ */ _(ce.div, D({}, i, {
|
|
2067
2102
|
ref: a
|
|
2068
2103
|
}));
|
|
2069
|
-
}),
|
|
2104
|
+
}), cn = "PopperContent", [Ao, Oo] = on(cn), Co = /* @__PURE__ */ I((e, t) => {
|
|
2070
2105
|
var n, o, i, r, s, a, c, l;
|
|
2071
|
-
const { __scopePopper: u, side:
|
|
2106
|
+
const { __scopePopper: u, side: f = "bottom", sideOffset: p = 0, align: d = "center", alignOffset: h = 0, arrowPadding: m = 0, avoidCollisions: g = !0, collisionBoundary: y = [], collisionPadding: b = 0, sticky: x = "partial", hideWhenDetached: w = !1, updatePositionStrategy: v = "optimized", onPlaced: A, ...P } = e, $ = an(cn, u), [E, T] = q(null), N = he(
|
|
2072
2107
|
t,
|
|
2073
|
-
(
|
|
2074
|
-
), [M,
|
|
2108
|
+
(be) => T(be)
|
|
2109
|
+
), [M, F] = q(null), O = wo(M), V = (n = O == null ? void 0 : O.width) !== null && n !== void 0 ? n : 0, R = (o = O == null ? void 0 : O.height) !== null && o !== void 0 ? o : 0, B = f + (d !== "center" ? "-" + d : ""), C = typeof b == "number" ? b : {
|
|
2075
2110
|
top: 0,
|
|
2076
2111
|
right: 0,
|
|
2077
2112
|
bottom: 0,
|
|
2078
2113
|
left: 0,
|
|
2079
|
-
...
|
|
2080
|
-
},
|
|
2081
|
-
|
|
2082
|
-
],
|
|
2083
|
-
padding:
|
|
2084
|
-
boundary:
|
|
2114
|
+
...b
|
|
2115
|
+
}, H = Array.isArray(y) ? y : [
|
|
2116
|
+
y
|
|
2117
|
+
], G = H.length > 0, Te = {
|
|
2118
|
+
padding: C,
|
|
2119
|
+
boundary: H.filter(So),
|
|
2085
2120
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2086
|
-
altBoundary:
|
|
2087
|
-
}, { refs:
|
|
2121
|
+
altBoundary: G
|
|
2122
|
+
}, { refs: pn, floatingStyles: ht, placement: hn, isPositioned: Re, middlewareData: le } = co({
|
|
2088
2123
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2089
2124
|
strategy: "fixed",
|
|
2090
|
-
placement:
|
|
2091
|
-
whileElementsMounted: (...
|
|
2092
|
-
animationFrame:
|
|
2125
|
+
placement: B,
|
|
2126
|
+
whileElementsMounted: (...be) => eo(...be, {
|
|
2127
|
+
animationFrame: v === "always"
|
|
2093
2128
|
}),
|
|
2094
2129
|
elements: {
|
|
2095
|
-
reference:
|
|
2130
|
+
reference: $.anchor
|
|
2096
2131
|
},
|
|
2097
2132
|
middleware: [
|
|
2098
|
-
|
|
2099
|
-
mainAxis: p +
|
|
2133
|
+
uo({
|
|
2134
|
+
mainAxis: p + R,
|
|
2100
2135
|
alignmentAxis: h
|
|
2101
2136
|
}),
|
|
2102
|
-
g &&
|
|
2137
|
+
g && fo({
|
|
2103
2138
|
mainAxis: !0,
|
|
2104
2139
|
crossAxis: !1,
|
|
2105
|
-
limiter: x === "partial" ?
|
|
2106
|
-
...
|
|
2140
|
+
limiter: x === "partial" ? po() : void 0,
|
|
2141
|
+
...Te
|
|
2107
2142
|
}),
|
|
2108
|
-
g &&
|
|
2109
|
-
...
|
|
2143
|
+
g && ho({
|
|
2144
|
+
...Te
|
|
2110
2145
|
}),
|
|
2111
|
-
|
|
2112
|
-
...
|
|
2113
|
-
apply: ({ elements:
|
|
2114
|
-
const { width:
|
|
2115
|
-
|
|
2146
|
+
go({
|
|
2147
|
+
...Te,
|
|
2148
|
+
apply: ({ elements: be, rects: mt, availableWidth: vn, availableHeight: $n }) => {
|
|
2149
|
+
const { width: _n, height: Pn } = mt.reference, De = be.floating.style;
|
|
2150
|
+
De.setProperty("--radix-popper-available-width", `${vn}px`), De.setProperty("--radix-popper-available-height", `${$n}px`), De.setProperty("--radix-popper-anchor-width", `${_n}px`), De.setProperty("--radix-popper-anchor-height", `${Pn}px`);
|
|
2116
2151
|
}
|
|
2117
2152
|
}),
|
|
2118
|
-
M &&
|
|
2153
|
+
M && yo({
|
|
2119
2154
|
element: M,
|
|
2120
2155
|
padding: m
|
|
2121
2156
|
}),
|
|
2122
|
-
|
|
2123
|
-
arrowWidth:
|
|
2124
|
-
arrowHeight:
|
|
2157
|
+
Do({
|
|
2158
|
+
arrowWidth: V,
|
|
2159
|
+
arrowHeight: R
|
|
2125
2160
|
}),
|
|
2126
|
-
|
|
2161
|
+
w && mo({
|
|
2127
2162
|
strategy: "referenceHidden",
|
|
2128
|
-
...
|
|
2163
|
+
...Te
|
|
2129
2164
|
})
|
|
2130
2165
|
]
|
|
2131
|
-
}), [
|
|
2166
|
+
}), [gt, gn] = ln(hn), Se = ge(A);
|
|
2132
2167
|
de(() => {
|
|
2133
|
-
|
|
2168
|
+
Re && (Se == null || Se());
|
|
2134
2169
|
}, [
|
|
2135
|
-
|
|
2170
|
+
Re,
|
|
2136
2171
|
Se
|
|
2137
2172
|
]);
|
|
2138
|
-
const
|
|
2173
|
+
const mn = (i = le.arrow) === null || i === void 0 ? void 0 : i.x, yn = (r = le.arrow) === null || r === void 0 ? void 0 : r.y, bn = ((s = le.arrow) === null || s === void 0 ? void 0 : s.centerOffset) !== 0, [xn, wn] = q();
|
|
2139
2174
|
return de(() => {
|
|
2140
|
-
E &&
|
|
2175
|
+
E && wn(window.getComputedStyle(E).zIndex);
|
|
2141
2176
|
}, [
|
|
2142
2177
|
E
|
|
2143
|
-
]), /* @__PURE__ */
|
|
2144
|
-
ref:
|
|
2178
|
+
]), /* @__PURE__ */ _("div", {
|
|
2179
|
+
ref: pn.setFloating,
|
|
2145
2180
|
"data-radix-popper-content-wrapper": "",
|
|
2146
2181
|
style: {
|
|
2147
|
-
...
|
|
2148
|
-
transform:
|
|
2182
|
+
...ht,
|
|
2183
|
+
transform: Re ? ht.transform : "translate(0, -200%)",
|
|
2149
2184
|
// keep off the page when measuring
|
|
2150
2185
|
minWidth: "max-content",
|
|
2151
|
-
zIndex:
|
|
2186
|
+
zIndex: xn,
|
|
2152
2187
|
"--radix-popper-transform-origin": [
|
|
2153
|
-
(a =
|
|
2154
|
-
(c =
|
|
2188
|
+
(a = le.transformOrigin) === null || a === void 0 ? void 0 : a.x,
|
|
2189
|
+
(c = le.transformOrigin) === null || c === void 0 ? void 0 : c.y
|
|
2155
2190
|
].join(" ")
|
|
2156
2191
|
},
|
|
2157
2192
|
dir: e.dir
|
|
2158
|
-
}, /* @__PURE__ */
|
|
2193
|
+
}, /* @__PURE__ */ _(Ao, {
|
|
2159
2194
|
scope: u,
|
|
2160
|
-
placedSide:
|
|
2161
|
-
onArrowChange:
|
|
2162
|
-
arrowX:
|
|
2163
|
-
arrowY:
|
|
2164
|
-
shouldHideArrow:
|
|
2165
|
-
}, /* @__PURE__ */
|
|
2166
|
-
"data-side":
|
|
2167
|
-
"data-align":
|
|
2168
|
-
},
|
|
2169
|
-
ref:
|
|
2195
|
+
placedSide: gt,
|
|
2196
|
+
onArrowChange: F,
|
|
2197
|
+
arrowX: mn,
|
|
2198
|
+
arrowY: yn,
|
|
2199
|
+
shouldHideArrow: bn
|
|
2200
|
+
}, /* @__PURE__ */ _(ce.div, D({
|
|
2201
|
+
"data-side": gt,
|
|
2202
|
+
"data-align": gn
|
|
2203
|
+
}, P, {
|
|
2204
|
+
ref: N,
|
|
2170
2205
|
style: {
|
|
2171
|
-
...
|
|
2206
|
+
...P.style,
|
|
2172
2207
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
2173
2208
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
2174
|
-
animation:
|
|
2209
|
+
animation: Re ? void 0 : "none",
|
|
2175
2210
|
// hide the content if using the hide middleware and should be hidden
|
|
2176
|
-
opacity: (l =
|
|
2211
|
+
opacity: (l = le.hide) !== null && l !== void 0 && l.referenceHidden ? 0 : void 0
|
|
2177
2212
|
}
|
|
2178
2213
|
}))));
|
|
2179
|
-
}),
|
|
2214
|
+
}), Eo = "PopperArrow", To = {
|
|
2180
2215
|
top: "bottom",
|
|
2181
2216
|
right: "left",
|
|
2182
2217
|
bottom: "top",
|
|
2183
2218
|
left: "right"
|
|
2184
|
-
},
|
|
2185
|
-
const { __scopePopper: o, ...i } = t, r =
|
|
2219
|
+
}, Ro = /* @__PURE__ */ I(function(t, n) {
|
|
2220
|
+
const { __scopePopper: o, ...i } = t, r = Oo(Eo, o), s = To[r.placedSide];
|
|
2186
2221
|
return (
|
|
2187
2222
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
2188
2223
|
// doesn't report size as we'd expect on SVG elements.
|
|
2189
2224
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
2190
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ _("span", {
|
|
2191
2226
|
ref: r.onArrowChange,
|
|
2192
2227
|
style: {
|
|
2193
2228
|
position: "absolute",
|
|
@@ -2208,7 +2243,7 @@ const en = "Popper", [tn, nn] = zt(en), [yo, rn] = tn(en), xo = (e) => {
|
|
|
2208
2243
|
}[r.placedSide],
|
|
2209
2244
|
visibility: r.shouldHideArrow ? "hidden" : void 0
|
|
2210
2245
|
}
|
|
2211
|
-
}, /* @__PURE__ */
|
|
2246
|
+
}, /* @__PURE__ */ _(xo, D({}, i, {
|
|
2212
2247
|
ref: n,
|
|
2213
2248
|
style: {
|
|
2214
2249
|
...i.style,
|
|
@@ -2218,59 +2253,59 @@ const en = "Popper", [tn, nn] = zt(en), [yo, rn] = tn(en), xo = (e) => {
|
|
|
2218
2253
|
})))
|
|
2219
2254
|
);
|
|
2220
2255
|
});
|
|
2221
|
-
function
|
|
2256
|
+
function So(e) {
|
|
2222
2257
|
return e !== null;
|
|
2223
2258
|
}
|
|
2224
|
-
const
|
|
2259
|
+
const Do = (e) => ({
|
|
2225
2260
|
name: "transformOrigin",
|
|
2226
2261
|
options: e,
|
|
2227
2262
|
fn(t) {
|
|
2228
2263
|
var n, o, i, r, s;
|
|
2229
|
-
const { placement: a, rects: c, middlewareData: l } = t,
|
|
2264
|
+
const { placement: a, rects: c, middlewareData: l } = t, f = ((n = l.arrow) === null || n === void 0 ? void 0 : n.centerOffset) !== 0, p = f ? 0 : e.arrowWidth, d = f ? 0 : e.arrowHeight, [h, m] = ln(a), g = {
|
|
2230
2265
|
start: "0%",
|
|
2231
2266
|
center: "50%",
|
|
2232
2267
|
end: "100%"
|
|
2233
|
-
}[m],
|
|
2234
|
-
let x = "",
|
|
2235
|
-
return h === "bottom" ? (x =
|
|
2268
|
+
}[m], y = ((o = (i = l.arrow) === null || i === void 0 ? void 0 : i.x) !== null && o !== void 0 ? o : 0) + p / 2, b = ((r = (s = l.arrow) === null || s === void 0 ? void 0 : s.y) !== null && r !== void 0 ? r : 0) + d / 2;
|
|
2269
|
+
let x = "", w = "";
|
|
2270
|
+
return h === "bottom" ? (x = f ? g : `${y}px`, w = `${-d}px`) : h === "top" ? (x = f ? g : `${y}px`, w = `${c.floating.height + d}px`) : h === "right" ? (x = `${-d}px`, w = f ? g : `${b}px`) : h === "left" && (x = `${c.floating.width + d}px`, w = f ? g : `${b}px`), {
|
|
2236
2271
|
data: {
|
|
2237
2272
|
x,
|
|
2238
|
-
y:
|
|
2273
|
+
y: w
|
|
2239
2274
|
}
|
|
2240
2275
|
};
|
|
2241
2276
|
}
|
|
2242
2277
|
});
|
|
2243
|
-
function
|
|
2278
|
+
function ln(e) {
|
|
2244
2279
|
const [t, n = "center"] = e.split("-");
|
|
2245
2280
|
return [
|
|
2246
2281
|
t,
|
|
2247
2282
|
n
|
|
2248
2283
|
];
|
|
2249
2284
|
}
|
|
2250
|
-
const
|
|
2285
|
+
const No = $o, Lo = Po, Mo = Co, ko = Ro, Io = /* @__PURE__ */ I((e, t) => {
|
|
2251
2286
|
var n;
|
|
2252
2287
|
const { container: o = globalThis == null || (n = globalThis.document) === null || n === void 0 ? void 0 : n.body, ...i } = e;
|
|
2253
|
-
return o ? /* @__PURE__ */
|
|
2288
|
+
return o ? /* @__PURE__ */ En.createPortal(/* @__PURE__ */ _(ce.div, D({}, i, {
|
|
2254
2289
|
ref: t
|
|
2255
2290
|
})), o) : null;
|
|
2256
2291
|
});
|
|
2257
|
-
function
|
|
2258
|
-
return
|
|
2292
|
+
function Fo(e, t) {
|
|
2293
|
+
return On((n, o) => {
|
|
2259
2294
|
const i = t[n][o];
|
|
2260
2295
|
return i ?? n;
|
|
2261
2296
|
}, e);
|
|
2262
2297
|
}
|
|
2263
|
-
const
|
|
2264
|
-
const { present: t, children: n } = e, o =
|
|
2298
|
+
const ft = (e) => {
|
|
2299
|
+
const { present: t, children: n } = e, o = Ho(t), i = typeof n == "function" ? n({
|
|
2265
2300
|
present: o.isPresent
|
|
2266
|
-
}) :
|
|
2267
|
-
return typeof n == "function" || o.isPresent ? /* @__PURE__ */
|
|
2301
|
+
}) : se.only(n), r = he(o.ref, i.ref);
|
|
2302
|
+
return typeof n == "function" || o.isPresent ? /* @__PURE__ */ rt(i, {
|
|
2268
2303
|
ref: r
|
|
2269
2304
|
}) : null;
|
|
2270
2305
|
};
|
|
2271
|
-
|
|
2272
|
-
function
|
|
2273
|
-
const [t, n] =
|
|
2306
|
+
ft.displayName = "Presence";
|
|
2307
|
+
function Ho(e) {
|
|
2308
|
+
const [t, n] = q(), o = k({}), i = k(e), r = k("none"), s = e ? "mounted" : "unmounted", [a, c] = Fo(s, {
|
|
2274
2309
|
mounted: {
|
|
2275
2310
|
UNMOUNT: "unmounted",
|
|
2276
2311
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -2284,28 +2319,28 @@ function ko(e) {
|
|
|
2284
2319
|
}
|
|
2285
2320
|
});
|
|
2286
2321
|
return S(() => {
|
|
2287
|
-
const l =
|
|
2322
|
+
const l = Le(o.current);
|
|
2288
2323
|
r.current = a === "mounted" ? l : "none";
|
|
2289
2324
|
}, [
|
|
2290
2325
|
a
|
|
2291
2326
|
]), de(() => {
|
|
2292
2327
|
const l = o.current, u = i.current;
|
|
2293
2328
|
if (u !== e) {
|
|
2294
|
-
const p = r.current,
|
|
2295
|
-
e ? c("MOUNT") :
|
|
2329
|
+
const p = r.current, d = Le(l);
|
|
2330
|
+
e ? c("MOUNT") : d === "none" || (l == null ? void 0 : l.display) === "none" ? c("UNMOUNT") : c(u && p !== d ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
2296
2331
|
}
|
|
2297
2332
|
}, [
|
|
2298
2333
|
e,
|
|
2299
2334
|
c
|
|
2300
2335
|
]), de(() => {
|
|
2301
2336
|
if (t) {
|
|
2302
|
-
const l = (
|
|
2303
|
-
const
|
|
2304
|
-
|
|
2337
|
+
const l = (f) => {
|
|
2338
|
+
const d = Le(o.current).includes(f.animationName);
|
|
2339
|
+
f.target === t && d && Dt(
|
|
2305
2340
|
() => c("ANIMATION_END")
|
|
2306
2341
|
);
|
|
2307
|
-
}, u = (
|
|
2308
|
-
|
|
2342
|
+
}, u = (f) => {
|
|
2343
|
+
f.target === t && (r.current = Le(o.current));
|
|
2309
2344
|
};
|
|
2310
2345
|
return t.addEventListener("animationstart", u), t.addEventListener("animationcancel", l), t.addEventListener("animationend", l), () => {
|
|
2311
2346
|
t.removeEventListener("animationstart", u), t.removeEventListener("animationcancel", l), t.removeEventListener("animationend", l);
|
|
@@ -2325,18 +2360,18 @@ function ko(e) {
|
|
|
2325
2360
|
}, [])
|
|
2326
2361
|
};
|
|
2327
2362
|
}
|
|
2328
|
-
function
|
|
2363
|
+
function Le(e) {
|
|
2329
2364
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
2330
2365
|
}
|
|
2331
|
-
function
|
|
2366
|
+
function Bo({ prop: e, defaultProp: t, onChange: n = () => {
|
|
2332
2367
|
} }) {
|
|
2333
|
-
const [o, i] =
|
|
2368
|
+
const [o, i] = zo({
|
|
2334
2369
|
defaultProp: t,
|
|
2335
2370
|
onChange: n
|
|
2336
|
-
}), r = e !== void 0, s = r ? e : o, a =
|
|
2371
|
+
}), r = e !== void 0, s = r ? e : o, a = ge(n), c = j((l) => {
|
|
2337
2372
|
if (r) {
|
|
2338
|
-
const
|
|
2339
|
-
|
|
2373
|
+
const f = typeof l == "function" ? l(e) : l;
|
|
2374
|
+
f !== e && a(f);
|
|
2340
2375
|
} else i(l);
|
|
2341
2376
|
}, [
|
|
2342
2377
|
r,
|
|
@@ -2349,8 +2384,8 @@ function Io({ prop: e, defaultProp: t, onChange: n = () => {
|
|
|
2349
2384
|
c
|
|
2350
2385
|
];
|
|
2351
2386
|
}
|
|
2352
|
-
function
|
|
2353
|
-
const n =
|
|
2387
|
+
function zo({ defaultProp: e, onChange: t }) {
|
|
2388
|
+
const n = q(e), [o] = n, i = k(o), r = ge(t);
|
|
2354
2389
|
return S(() => {
|
|
2355
2390
|
i.current !== o && (r(o), i.current = o);
|
|
2356
2391
|
}, [
|
|
@@ -2359,7 +2394,7 @@ function Fo({ defaultProp: e, onChange: t }) {
|
|
|
2359
2394
|
r
|
|
2360
2395
|
]), n;
|
|
2361
2396
|
}
|
|
2362
|
-
const
|
|
2397
|
+
const jo = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ _(ce.span, D({}, e, {
|
|
2363
2398
|
ref: t,
|
|
2364
2399
|
style: {
|
|
2365
2400
|
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
@@ -2375,14 +2410,14 @@ const Ho = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ w(ae.span, R({}, e, {
|
|
|
2375
2410
|
wordWrap: "normal",
|
|
2376
2411
|
...e.style
|
|
2377
2412
|
}
|
|
2378
|
-
}))),
|
|
2379
|
-
|
|
2380
|
-
]),
|
|
2381
|
-
const { __scopeTooltip: t, delayDuration: n =
|
|
2413
|
+
}))), Wo = jo, [qe, Di] = Wt("Tooltip", [
|
|
2414
|
+
sn
|
|
2415
|
+
]), Ue = sn(), qo = "TooltipProvider", Uo = 700, nt = "tooltip.open", [Vo, dt] = qe(qo), Yo = (e) => {
|
|
2416
|
+
const { __scopeTooltip: t, delayDuration: n = Uo, skipDelayDuration: o = 300, disableHoverableContent: i = !1, children: r } = e, [s, a] = q(!0), c = k(!1), l = k(0);
|
|
2382
2417
|
return S(() => {
|
|
2383
2418
|
const u = l.current;
|
|
2384
2419
|
return () => window.clearTimeout(u);
|
|
2385
|
-
}, []), /* @__PURE__ */
|
|
2420
|
+
}, []), /* @__PURE__ */ _(Vo, {
|
|
2386
2421
|
scope: t,
|
|
2387
2422
|
isOpenDelayed: s,
|
|
2388
2423
|
delayDuration: n,
|
|
@@ -2403,136 +2438,136 @@ const Ho = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ w(ae.span, R({}, e, {
|
|
|
2403
2438
|
}, []),
|
|
2404
2439
|
disableHoverableContent: i
|
|
2405
2440
|
}, r);
|
|
2406
|
-
},
|
|
2407
|
-
const { __scopeTooltip: t, children: n, open: o, defaultOpen: i = !1, onOpenChange: r, disableHoverableContent: s, delayDuration: a } = e, c =
|
|
2441
|
+
}, pt = "Tooltip", [Xo, Ee] = qe(pt), Go = (e) => {
|
|
2442
|
+
const { __scopeTooltip: t, children: n, open: o, defaultOpen: i = !1, onOpenChange: r, disableHoverableContent: s, delayDuration: a } = e, c = dt(pt, e.__scopeTooltip), l = Ue(t), [u, f] = q(null), p = xr(), d = k(0), h = s ?? c.disableHoverableContent, m = a ?? c.delayDuration, g = k(!1), [y = !1, b] = Bo({
|
|
2408
2443
|
prop: o,
|
|
2409
2444
|
defaultProp: i,
|
|
2410
|
-
onChange: (
|
|
2411
|
-
|
|
2445
|
+
onChange: (P) => {
|
|
2446
|
+
P ? (c.onOpen(), document.dispatchEvent(new CustomEvent(nt))) : c.onClose(), r == null || r(P);
|
|
2412
2447
|
}
|
|
2413
|
-
}), x =
|
|
2414
|
-
v
|
|
2415
|
-
]), b = j(() => {
|
|
2416
|
-
window.clearTimeout(f.current), g.current = !1, y(!0);
|
|
2417
|
-
}, [
|
|
2448
|
+
}), x = _e(() => y ? g.current ? "delayed-open" : "instant-open" : "closed", [
|
|
2418
2449
|
y
|
|
2419
|
-
]),
|
|
2420
|
-
window.clearTimeout(
|
|
2450
|
+
]), w = j(() => {
|
|
2451
|
+
window.clearTimeout(d.current), g.current = !1, b(!0);
|
|
2421
2452
|
}, [
|
|
2422
|
-
|
|
2423
|
-
]),
|
|
2424
|
-
window.clearTimeout(
|
|
2425
|
-
|
|
2453
|
+
b
|
|
2454
|
+
]), v = j(() => {
|
|
2455
|
+
window.clearTimeout(d.current), b(!1);
|
|
2456
|
+
}, [
|
|
2457
|
+
b
|
|
2458
|
+
]), A = j(() => {
|
|
2459
|
+
window.clearTimeout(d.current), d.current = window.setTimeout(() => {
|
|
2460
|
+
g.current = !0, b(!0);
|
|
2426
2461
|
}, m);
|
|
2427
2462
|
}, [
|
|
2428
2463
|
m,
|
|
2429
|
-
|
|
2464
|
+
b
|
|
2430
2465
|
]);
|
|
2431
|
-
return S(() => () => window.clearTimeout(
|
|
2466
|
+
return S(() => () => window.clearTimeout(d.current), []), /* @__PURE__ */ _(No, l, /* @__PURE__ */ _(Xo, {
|
|
2432
2467
|
scope: t,
|
|
2433
2468
|
contentId: p,
|
|
2434
|
-
open:
|
|
2469
|
+
open: y,
|
|
2435
2470
|
stateAttribute: x,
|
|
2436
2471
|
trigger: u,
|
|
2437
|
-
onTriggerChange:
|
|
2472
|
+
onTriggerChange: f,
|
|
2438
2473
|
onTriggerEnter: j(() => {
|
|
2439
|
-
c.isOpenDelayed ?
|
|
2474
|
+
c.isOpenDelayed ? A() : w();
|
|
2440
2475
|
}, [
|
|
2441
2476
|
c.isOpenDelayed,
|
|
2442
|
-
|
|
2443
|
-
|
|
2477
|
+
A,
|
|
2478
|
+
w
|
|
2444
2479
|
]),
|
|
2445
2480
|
onTriggerLeave: j(() => {
|
|
2446
|
-
h ?
|
|
2481
|
+
h ? v() : window.clearTimeout(d.current);
|
|
2447
2482
|
}, [
|
|
2448
|
-
|
|
2483
|
+
v,
|
|
2449
2484
|
h
|
|
2450
2485
|
]),
|
|
2451
|
-
onOpen:
|
|
2452
|
-
onClose:
|
|
2486
|
+
onOpen: w,
|
|
2487
|
+
onClose: v,
|
|
2453
2488
|
disableHoverableContent: h
|
|
2454
2489
|
}, n));
|
|
2455
|
-
},
|
|
2456
|
-
const { __scopeTooltip: n, ...o } = e, i =
|
|
2490
|
+
}, Tt = "TooltipTrigger", Ko = /* @__PURE__ */ I((e, t) => {
|
|
2491
|
+
const { __scopeTooltip: n, ...o } = e, i = Ee(Tt, n), r = dt(Tt, n), s = Ue(n), a = k(null), c = he(t, a, i.onTriggerChange), l = k(!1), u = k(!1), f = j(
|
|
2457
2492
|
() => l.current = !1,
|
|
2458
2493
|
[]
|
|
2459
2494
|
);
|
|
2460
|
-
return S(() => () => document.removeEventListener("pointerup",
|
|
2461
|
-
|
|
2462
|
-
]), /* @__PURE__ */
|
|
2495
|
+
return S(() => () => document.removeEventListener("pointerup", f), [
|
|
2496
|
+
f
|
|
2497
|
+
]), /* @__PURE__ */ _(Lo, D({
|
|
2463
2498
|
asChild: !0
|
|
2464
|
-
}, s), /* @__PURE__ */
|
|
2499
|
+
}, s), /* @__PURE__ */ _(ce.button, D({
|
|
2465
2500
|
// We purposefully avoid adding `type=button` here because tooltip triggers are also
|
|
2466
2501
|
// commonly anchors and the anchor `type` attribute signifies MIME type.
|
|
2467
2502
|
"aria-describedby": i.open ? i.contentId : void 0,
|
|
2468
2503
|
"data-state": i.stateAttribute
|
|
2469
2504
|
}, o, {
|
|
2470
2505
|
ref: c,
|
|
2471
|
-
onPointerMove:
|
|
2506
|
+
onPointerMove: Q(e.onPointerMove, (p) => {
|
|
2472
2507
|
p.pointerType !== "touch" && !u.current && !r.isPointerInTransitRef.current && (i.onTriggerEnter(), u.current = !0);
|
|
2473
2508
|
}),
|
|
2474
|
-
onPointerLeave:
|
|
2509
|
+
onPointerLeave: Q(e.onPointerLeave, () => {
|
|
2475
2510
|
i.onTriggerLeave(), u.current = !1;
|
|
2476
2511
|
}),
|
|
2477
|
-
onPointerDown:
|
|
2478
|
-
l.current = !0, document.addEventListener("pointerup",
|
|
2512
|
+
onPointerDown: Q(e.onPointerDown, () => {
|
|
2513
|
+
l.current = !0, document.addEventListener("pointerup", f, {
|
|
2479
2514
|
once: !0
|
|
2480
2515
|
});
|
|
2481
2516
|
}),
|
|
2482
|
-
onFocus:
|
|
2517
|
+
onFocus: Q(e.onFocus, () => {
|
|
2483
2518
|
l.current || i.onOpen();
|
|
2484
2519
|
}),
|
|
2485
|
-
onBlur:
|
|
2486
|
-
onClick:
|
|
2520
|
+
onBlur: Q(e.onBlur, i.onClose),
|
|
2521
|
+
onClick: Q(e.onClick, i.onClose)
|
|
2487
2522
|
})));
|
|
2488
|
-
}),
|
|
2523
|
+
}), un = "TooltipPortal", [Zo, Jo] = qe(un, {
|
|
2489
2524
|
forceMount: void 0
|
|
2490
|
-
}),
|
|
2491
|
-
const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r =
|
|
2492
|
-
return /* @__PURE__ */
|
|
2525
|
+
}), Qo = (e) => {
|
|
2526
|
+
const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r = Ee(un, t);
|
|
2527
|
+
return /* @__PURE__ */ _(Zo, {
|
|
2493
2528
|
scope: t,
|
|
2494
2529
|
forceMount: n
|
|
2495
|
-
}, /* @__PURE__ */
|
|
2530
|
+
}, /* @__PURE__ */ _(ft, {
|
|
2496
2531
|
present: n || r.open
|
|
2497
|
-
}, /* @__PURE__ */
|
|
2532
|
+
}, /* @__PURE__ */ _(Io, {
|
|
2498
2533
|
asChild: !0,
|
|
2499
2534
|
container: i
|
|
2500
2535
|
}, o)));
|
|
2501
|
-
},
|
|
2502
|
-
const n =
|
|
2503
|
-
return /* @__PURE__ */
|
|
2536
|
+
}, Oe = "TooltipContent", ei = /* @__PURE__ */ I((e, t) => {
|
|
2537
|
+
const n = Jo(Oe, e.__scopeTooltip), { forceMount: o = n.forceMount, side: i = "top", ...r } = e, s = Ee(Oe, e.__scopeTooltip);
|
|
2538
|
+
return /* @__PURE__ */ _(ft, {
|
|
2504
2539
|
present: o || s.open
|
|
2505
|
-
}, s.disableHoverableContent ? /* @__PURE__ */
|
|
2540
|
+
}, s.disableHoverableContent ? /* @__PURE__ */ _(fn, D({
|
|
2506
2541
|
side: i
|
|
2507
2542
|
}, r, {
|
|
2508
2543
|
ref: t
|
|
2509
|
-
})) : /* @__PURE__ */
|
|
2544
|
+
})) : /* @__PURE__ */ _(ti, D({
|
|
2510
2545
|
side: i
|
|
2511
2546
|
}, r, {
|
|
2512
2547
|
ref: t
|
|
2513
2548
|
})));
|
|
2514
|
-
}),
|
|
2515
|
-
const n =
|
|
2516
|
-
a(null),
|
|
2549
|
+
}), ti = /* @__PURE__ */ I((e, t) => {
|
|
2550
|
+
const n = Ee(Oe, e.__scopeTooltip), o = dt(Oe, e.__scopeTooltip), i = k(null), r = he(t, i), [s, a] = q(null), { trigger: c, onClose: l } = n, u = i.current, { onPointerInTransitChange: f } = o, p = j(() => {
|
|
2551
|
+
a(null), f(!1);
|
|
2517
2552
|
}, [
|
|
2518
|
-
|
|
2519
|
-
]),
|
|
2520
|
-
const g = h.currentTarget,
|
|
2553
|
+
f
|
|
2554
|
+
]), d = j((h, m) => {
|
|
2555
|
+
const g = h.currentTarget, y = {
|
|
2521
2556
|
x: h.clientX,
|
|
2522
2557
|
y: h.clientY
|
|
2523
|
-
},
|
|
2558
|
+
}, b = si(y, g.getBoundingClientRect()), x = ai(y, b), w = ci(m.getBoundingClientRect()), v = ui([
|
|
2524
2559
|
...x,
|
|
2525
|
-
...
|
|
2560
|
+
...w
|
|
2526
2561
|
]);
|
|
2527
|
-
a(
|
|
2562
|
+
a(v), f(!0);
|
|
2528
2563
|
}, [
|
|
2529
|
-
|
|
2564
|
+
f
|
|
2530
2565
|
]);
|
|
2531
2566
|
return S(() => () => p(), [
|
|
2532
2567
|
p
|
|
2533
2568
|
]), S(() => {
|
|
2534
2569
|
if (c && u) {
|
|
2535
|
-
const h = (g) =>
|
|
2570
|
+
const h = (g) => d(g, u), m = (g) => d(g, c);
|
|
2536
2571
|
return c.addEventListener("pointerleave", h), u.addEventListener("pointerleave", m), () => {
|
|
2537
2572
|
c.removeEventListener("pointerleave", h), u.removeEventListener("pointerleave", m);
|
|
2538
2573
|
};
|
|
@@ -2540,16 +2575,16 @@ const Ho = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ w(ae.span, R({}, e, {
|
|
|
2540
2575
|
}, [
|
|
2541
2576
|
c,
|
|
2542
2577
|
u,
|
|
2543
|
-
|
|
2578
|
+
d,
|
|
2544
2579
|
p
|
|
2545
2580
|
]), S(() => {
|
|
2546
2581
|
if (s) {
|
|
2547
2582
|
const h = (m) => {
|
|
2548
|
-
const g = m.target,
|
|
2583
|
+
const g = m.target, y = {
|
|
2549
2584
|
x: m.clientX,
|
|
2550
2585
|
y: m.clientY
|
|
2551
|
-
},
|
|
2552
|
-
|
|
2586
|
+
}, b = (c == null ? void 0 : c.contains(g)) || (u == null ? void 0 : u.contains(g)), x = !li(y, s);
|
|
2587
|
+
b ? p() : x && (p(), l());
|
|
2553
2588
|
};
|
|
2554
2589
|
return document.addEventListener("pointermove", h), () => document.removeEventListener("pointermove", h);
|
|
2555
2590
|
}
|
|
@@ -2559,38 +2594,38 @@ const Ho = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ w(ae.span, R({}, e, {
|
|
|
2559
2594
|
s,
|
|
2560
2595
|
l,
|
|
2561
2596
|
p
|
|
2562
|
-
]), /* @__PURE__ */
|
|
2597
|
+
]), /* @__PURE__ */ _(fn, D({}, e, {
|
|
2563
2598
|
ref: r
|
|
2564
2599
|
}));
|
|
2565
|
-
}), [
|
|
2600
|
+
}), [ni, ri] = qe(pt, {
|
|
2566
2601
|
isInside: !1
|
|
2567
|
-
}),
|
|
2568
|
-
const { __scopeTooltip: n, children: o, "aria-label": i, onEscapeKeyDown: r, onPointerDownOutside: s, ...a } = e, c =
|
|
2569
|
-
return S(() => (document.addEventListener(
|
|
2602
|
+
}), fn = /* @__PURE__ */ I((e, t) => {
|
|
2603
|
+
const { __scopeTooltip: n, children: o, "aria-label": i, onEscapeKeyDown: r, onPointerDownOutside: s, ...a } = e, c = Ee(Oe, n), l = Ue(n), { onClose: u } = c;
|
|
2604
|
+
return S(() => (document.addEventListener(nt, u), () => document.removeEventListener(nt, u)), [
|
|
2570
2605
|
u
|
|
2571
2606
|
]), S(() => {
|
|
2572
2607
|
if (c.trigger) {
|
|
2573
|
-
const
|
|
2574
|
-
const
|
|
2575
|
-
|
|
2608
|
+
const f = (p) => {
|
|
2609
|
+
const d = p.target;
|
|
2610
|
+
d != null && d.contains(c.trigger) && u();
|
|
2576
2611
|
};
|
|
2577
|
-
return window.addEventListener("scroll",
|
|
2612
|
+
return window.addEventListener("scroll", f, {
|
|
2578
2613
|
capture: !0
|
|
2579
|
-
}), () => window.removeEventListener("scroll",
|
|
2614
|
+
}), () => window.removeEventListener("scroll", f, {
|
|
2580
2615
|
capture: !0
|
|
2581
2616
|
});
|
|
2582
2617
|
}
|
|
2583
2618
|
}, [
|
|
2584
2619
|
c.trigger,
|
|
2585
2620
|
u
|
|
2586
|
-
]), /* @__PURE__ */
|
|
2621
|
+
]), /* @__PURE__ */ _(hr, {
|
|
2587
2622
|
asChild: !0,
|
|
2588
2623
|
disableOutsidePointerEvents: !1,
|
|
2589
2624
|
onEscapeKeyDown: r,
|
|
2590
2625
|
onPointerDownOutside: s,
|
|
2591
|
-
onFocusOutside: (
|
|
2626
|
+
onFocusOutside: (f) => f.preventDefault(),
|
|
2592
2627
|
onDismiss: u
|
|
2593
|
-
}, /* @__PURE__ */
|
|
2628
|
+
}, /* @__PURE__ */ _(Mo, D({
|
|
2594
2629
|
"data-state": c.stateAttribute
|
|
2595
2630
|
}, l, a, {
|
|
2596
2631
|
ref: t,
|
|
@@ -2602,20 +2637,20 @@ const Ho = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ w(ae.span, R({}, e, {
|
|
|
2602
2637
|
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
2603
2638
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2604
2639
|
}
|
|
2605
|
-
}), /* @__PURE__ */
|
|
2640
|
+
}), /* @__PURE__ */ _(Ut, null, o), /* @__PURE__ */ _(ni, {
|
|
2606
2641
|
scope: n,
|
|
2607
2642
|
isInside: !0
|
|
2608
|
-
}, /* @__PURE__ */
|
|
2643
|
+
}, /* @__PURE__ */ _(Wo, {
|
|
2609
2644
|
id: c.contentId,
|
|
2610
2645
|
role: "tooltip"
|
|
2611
2646
|
}, i || o))));
|
|
2612
|
-
}),
|
|
2613
|
-
const { __scopeTooltip: n, ...o } = e, i =
|
|
2614
|
-
return
|
|
2647
|
+
}), oi = "TooltipArrow", ii = /* @__PURE__ */ I((e, t) => {
|
|
2648
|
+
const { __scopeTooltip: n, ...o } = e, i = Ue(n);
|
|
2649
|
+
return ri(oi, n).isInside ? null : /* @__PURE__ */ _(ko, D({}, i, o, {
|
|
2615
2650
|
ref: t
|
|
2616
2651
|
}));
|
|
2617
2652
|
});
|
|
2618
|
-
function
|
|
2653
|
+
function si(e, t) {
|
|
2619
2654
|
const n = Math.abs(t.top - e.y), o = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), r = Math.abs(t.left - e.x);
|
|
2620
2655
|
switch (Math.min(n, o, i, r)) {
|
|
2621
2656
|
case r:
|
|
@@ -2630,7 +2665,7 @@ function ri(e, t) {
|
|
|
2630
2665
|
throw new Error("unreachable");
|
|
2631
2666
|
}
|
|
2632
2667
|
}
|
|
2633
|
-
function
|
|
2668
|
+
function ai(e, t, n = 5) {
|
|
2634
2669
|
const o = [];
|
|
2635
2670
|
switch (t) {
|
|
2636
2671
|
case "top":
|
|
@@ -2672,7 +2707,7 @@ function oi(e, t, n = 5) {
|
|
|
2672
2707
|
}
|
|
2673
2708
|
return o;
|
|
2674
2709
|
}
|
|
2675
|
-
function
|
|
2710
|
+
function ci(e) {
|
|
2676
2711
|
const { top: t, right: n, bottom: o, left: i } = e;
|
|
2677
2712
|
return [
|
|
2678
2713
|
{
|
|
@@ -2693,7 +2728,7 @@ function ii(e) {
|
|
|
2693
2728
|
}
|
|
2694
2729
|
];
|
|
2695
2730
|
}
|
|
2696
|
-
function
|
|
2731
|
+
function li(e, t) {
|
|
2697
2732
|
const { x: n, y: o } = e;
|
|
2698
2733
|
let i = !1;
|
|
2699
2734
|
for (let r = 0, s = t.length - 1; r < t.length; s = r++) {
|
|
@@ -2702,11 +2737,11 @@ function si(e, t) {
|
|
|
2702
2737
|
}
|
|
2703
2738
|
return i;
|
|
2704
2739
|
}
|
|
2705
|
-
function
|
|
2740
|
+
function ui(e) {
|
|
2706
2741
|
const t = e.slice();
|
|
2707
|
-
return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0),
|
|
2742
|
+
return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0), fi(t);
|
|
2708
2743
|
}
|
|
2709
|
-
function
|
|
2744
|
+
function fi(e) {
|
|
2710
2745
|
if (e.length <= 1) return e.slice();
|
|
2711
2746
|
const t = [];
|
|
2712
2747
|
for (let o = 0; o < e.length; o++) {
|
|
@@ -2731,11 +2766,11 @@ function ci(e) {
|
|
|
2731
2766
|
}
|
|
2732
2767
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
2733
2768
|
}
|
|
2734
|
-
const
|
|
2735
|
-
function
|
|
2769
|
+
const di = Yo, pi = Go, hi = Ko, gi = Qo, mi = ei, yi = ii;
|
|
2770
|
+
function bi(e) {
|
|
2736
2771
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2737
2772
|
}
|
|
2738
|
-
var
|
|
2773
|
+
var dn = { exports: {} };
|
|
2739
2774
|
/*!
|
|
2740
2775
|
Copyright (c) 2018 Jed Watson.
|
|
2741
2776
|
Licensed under the MIT License (MIT), see
|
|
@@ -2770,29 +2805,29 @@ var ln = { exports: {} };
|
|
|
2770
2805
|
}
|
|
2771
2806
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
2772
2807
|
})();
|
|
2773
|
-
})(
|
|
2774
|
-
var
|
|
2775
|
-
const
|
|
2808
|
+
})(dn);
|
|
2809
|
+
var xi = dn.exports;
|
|
2810
|
+
const wi = /* @__PURE__ */ bi(xi), vi = "_slideDownAndFade_fkagk_1", $i = "_slideLeftAndFade_fkagk_1", _i = "_slideUpAndFade_fkagk_1", Pi = "_slideRightAndFade_fkagk_1", Ai = {
|
|
2776
2811
|
"purpur-tooltip": "_purpur-tooltip_fkagk_1",
|
|
2777
2812
|
"purpur-tooltip__content": "_purpur-tooltip__content_fkagk_4",
|
|
2778
2813
|
"purpur-tooltip__content--primary": "_purpur-tooltip__content--primary_fkagk_14",
|
|
2779
2814
|
"purpur-tooltip__content--primary-negative": "_purpur-tooltip__content--primary-negative_fkagk_17",
|
|
2780
|
-
slideDownAndFade:
|
|
2781
|
-
slideLeftAndFade:
|
|
2782
|
-
slideUpAndFade:
|
|
2783
|
-
slideRightAndFade:
|
|
2815
|
+
slideDownAndFade: vi,
|
|
2816
|
+
slideLeftAndFade: $i,
|
|
2817
|
+
slideUpAndFade: _i,
|
|
2818
|
+
slideRightAndFade: Pi,
|
|
2784
2819
|
"purpur-tooltip__arrow--primary": "_purpur-tooltip__arrow--primary_fkagk_32",
|
|
2785
2820
|
"purpur-tooltip__arrow--primary-negative": "_purpur-tooltip__arrow--primary-negative_fkagk_35"
|
|
2786
|
-
}, Xe =
|
|
2821
|
+
}, Xe = wi.bind(Ai), Oi = {
|
|
2787
2822
|
TOP: "top",
|
|
2788
2823
|
BOTTOM: "bottom",
|
|
2789
2824
|
LEFT: "left",
|
|
2790
2825
|
RIGHT: "right"
|
|
2791
|
-
},
|
|
2826
|
+
}, Ci = {
|
|
2792
2827
|
START: "start",
|
|
2793
2828
|
CENTER: "center",
|
|
2794
2829
|
END: "end"
|
|
2795
|
-
},
|
|
2830
|
+
}, ue = "purpur-tooltip", Ei = I(
|
|
2796
2831
|
({
|
|
2797
2832
|
["data-testid"]: e,
|
|
2798
2833
|
buttonSize: t = "md",
|
|
@@ -2800,68 +2835,68 @@ const vi = /* @__PURE__ */ gi(mi), yi = "_slideDownAndFade_fkagk_1", xi = "_slid
|
|
|
2800
2835
|
className: o,
|
|
2801
2836
|
contentClassName: i,
|
|
2802
2837
|
negative: r = !1,
|
|
2803
|
-
position: s =
|
|
2804
|
-
align: a =
|
|
2838
|
+
position: s = Oi.TOP,
|
|
2839
|
+
align: a = Ci.CENTER,
|
|
2805
2840
|
triggerAriaLabel: c = "",
|
|
2806
2841
|
triggerElement: l,
|
|
2807
2842
|
...u
|
|
2808
|
-
},
|
|
2809
|
-
const [p,
|
|
2843
|
+
}, f) => {
|
|
2844
|
+
const [p, d] = q(!1), h = Xe([
|
|
2810
2845
|
o,
|
|
2811
|
-
|
|
2812
|
-
`${
|
|
2846
|
+
ue,
|
|
2847
|
+
`${ue}--primary${r ? "-negative" : ""}`
|
|
2813
2848
|
]), m = /* @__PURE__ */ z(
|
|
2814
|
-
|
|
2849
|
+
Mt,
|
|
2815
2850
|
{
|
|
2816
|
-
ref:
|
|
2851
|
+
ref: f,
|
|
2817
2852
|
"aria-label": c,
|
|
2818
|
-
variant:
|
|
2853
|
+
variant: zn.TERTIARY_PURPLE,
|
|
2819
2854
|
negative: r,
|
|
2820
2855
|
iconOnly: !0,
|
|
2821
2856
|
"data-testid": `${e}-trigger-button`,
|
|
2822
2857
|
size: t,
|
|
2823
|
-
children: /* @__PURE__ */ z(
|
|
2858
|
+
children: /* @__PURE__ */ z(It, { size: "md" })
|
|
2824
2859
|
}
|
|
2825
2860
|
);
|
|
2826
|
-
return /* @__PURE__ */ z("div", { "data-testid": e, className: h, children: /* @__PURE__ */ z(
|
|
2861
|
+
return /* @__PURE__ */ z("div", { "data-testid": e, className: h, children: /* @__PURE__ */ z(di, { delayDuration: parseInt(rr), children: /* @__PURE__ */ Ge(pi, { open: p, onOpenChange: d, ...u, children: [
|
|
2827
2862
|
/* @__PURE__ */ z(
|
|
2828
|
-
|
|
2863
|
+
hi,
|
|
2829
2864
|
{
|
|
2830
2865
|
asChild: !0,
|
|
2831
2866
|
onClick: (g) => {
|
|
2832
|
-
g.preventDefault(),
|
|
2867
|
+
g.preventDefault(), d(!0);
|
|
2833
2868
|
},
|
|
2834
|
-
children:
|
|
2869
|
+
children: se.count(l) === 0 ? m : l
|
|
2835
2870
|
}
|
|
2836
2871
|
),
|
|
2837
|
-
/* @__PURE__ */ z(
|
|
2838
|
-
|
|
2872
|
+
/* @__PURE__ */ z(gi, { children: /* @__PURE__ */ Ge(
|
|
2873
|
+
mi,
|
|
2839
2874
|
{
|
|
2840
2875
|
side: s,
|
|
2841
2876
|
align: a,
|
|
2842
2877
|
className: Xe([
|
|
2843
2878
|
i,
|
|
2844
|
-
`${
|
|
2845
|
-
`${
|
|
2879
|
+
`${ue}__content`,
|
|
2880
|
+
`${ue}__content--primary${r ? "-negative" : ""}`
|
|
2846
2881
|
]),
|
|
2847
2882
|
sideOffset: -5,
|
|
2848
2883
|
"data-testid": `${e}-content`,
|
|
2849
2884
|
children: [
|
|
2850
2885
|
typeof n == "string" ? /* @__PURE__ */ z(
|
|
2851
|
-
|
|
2886
|
+
zt,
|
|
2852
2887
|
{
|
|
2853
|
-
variant:
|
|
2888
|
+
variant: Bt.PARAGRAPH100,
|
|
2854
2889
|
negative: !r,
|
|
2855
2890
|
"data-testid": `${e}-paragraph`,
|
|
2856
2891
|
children: n
|
|
2857
2892
|
}
|
|
2858
2893
|
) : n,
|
|
2859
2894
|
/* @__PURE__ */ z(
|
|
2860
|
-
|
|
2895
|
+
yi,
|
|
2861
2896
|
{
|
|
2862
2897
|
className: Xe([
|
|
2863
|
-
`${
|
|
2864
|
-
`${
|
|
2898
|
+
`${ue}__arrow`,
|
|
2899
|
+
`${ue}__arrow--primary${r ? "-negative" : ""}`
|
|
2865
2900
|
])
|
|
2866
2901
|
}
|
|
2867
2902
|
)
|
|
@@ -2871,10 +2906,10 @@ const vi = /* @__PURE__ */ gi(mi), yi = "_slideDownAndFade_fkagk_1", xi = "_slid
|
|
|
2871
2906
|
] }) }) });
|
|
2872
2907
|
}
|
|
2873
2908
|
);
|
|
2874
|
-
|
|
2909
|
+
Ei.displayName = "Tooltip";
|
|
2875
2910
|
export {
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2911
|
+
Ci as TOOLTIP_ALIGN,
|
|
2912
|
+
Oi as TOOLTIP_POSITION,
|
|
2913
|
+
Ei as Tooltip
|
|
2879
2914
|
};
|
|
2880
2915
|
//# sourceMappingURL=tooltip.es.js.map
|